Provider Initialisation
Last updated
Last updated
This function does not trigger any UI elements
The base component for the Metafi SDK which takes in your API Key, unique user ID, and other options as Arguments. Call this function as soon as your initial scene is loaded, before any other functions are invoked.
Parameter | Type | Definition |
---|---|---|
N/A
apiKey
String
Your API Key. This can be displayed publicly
secretKey
String
Your Secret Key. Keep this securely and do not expose.
options
dynamic
A list of options to customise the look and feel of how the Metafi wallet looks. Here you can pass in a custom logo, as well as theme styling options. More information can be found in the UI customisation section.
supportedChains
List<Metafi.Unity.Chain>
An array of chains supported by your application. Please refer to the section on Chains for more information on what chains we support.
customTokens
List<Metafi.Unity.Token>
An array of custom tokens that you want supported in your users wallet. To pass a custom token, you will need to use the Metafi.Unity.Token
constructor to generate a new token. The format of the inputs are as follows:
You can refer to the example below to understand how to register Wrapped Ethereum in the wallet.
metafiSSO
bool
Specify whether to use MetafiSSO or not. Set to false
if you are using your own custom login mechanism.