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.

import { MinteandomeSDK } from "minteandome-sdk";

const sdk = await MinteandomeSDK.register({
        email: 'tester@mctester.com',
        wallet: '0xb92fb131E0824D0eE1B2B16BB603cd744616A7b8'
}, 'testnet');

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:

const sdk = await MinteandomeSDK.login('36ff14e1-2bd9-4563-b752-d830d6b8eb0c');

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.

Login signature

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.

const sdk = await MinteandomeSDK.loginSignature();

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.

Next steps

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.

Last updated