🔧Usage
Last updated
Last updated
In order to use this SDK, you need an API_KEY from Minteandome. You can get this from our dashboard.
Another way is to create a new account via SDK with the method register.
The second param env
is in which environment you are planning to create your account. By default, this value is set to testnet
, however, you can create accounts in mainnet
changing this param.
This method returns an instance of the SDK logged with your new account.
If you already have an API_KEY, use the login
method below:
This will return an instance of the SDK logged with your existing account. Again, you can choose the environment as the second param, which is testnet
by default.
Another option is to be on a browser and be able to sign a message with Metamask.
This library has a browser export which allow to logging with Metamask and without the use of an API_KEY.
This method will open a Metamask modal in the current browser and will ask for the user to sign a message. If that message is signed with a wallet which is registered in Minteandome, the login would be completed.
This method will return an instance of the SDK with an integrated JWT.
From now on, you can use the methods from the SDK. Note that the API_KEY has no expiration time while the JWT has 1 hour of duration.