Quick Start
This guide was created to help you get started as quickly as possible using the MNEE Typescript SDK.
If you’re not planning to use a Node.js environment, please use the MNEE API directly. We’re actively developing SDKs for other popular frameworks.
Give your AI or LLM of choice all the context they need.
1. Get your API keys
Create your MNEE Developer account and generate your API keys.
2. Install the Typescript SDK
npm i @mnee/ts-sdk
3. Configure the SDK
Configure the SDK with your API settings and call config()
. This will return the current configuration of the MNEE API based on your environment.
import Mnee from '@mnee/ts-sdk';
const config = {
environment: 'sandbox', // or 'production'
apiKey: 'your-api-key'
};
const mnee = new Mnee(config);
mnee.config().then(mneeConfig => {
console.log('MNEE Configuration:', mneeConfig);
});
If you see the configuration log, you've successfully made your first request!
4. Send MNEE
After ensuring that you've funded your wallet, you can easily send MNEE using the transfer()
method.
If you need MNEE for testing, your sandbox keys can request 10 MNEE every 24 hours using the sandbox faucet found here.
Note: If you're using the MNEE CLI, you can get your WIF by running mnee export.
const recipient = 'recipient-mnee-address';
const amount = 0.01; // Amount in MNEE as float (up to 5 decimals)
const wif = 'your-wif-private-key';
// Prepare the transfer request
const request = [
{
address: recipient,
amount,
},
];
// Send the payment
mnee.transfer(request, wif).then(response => {
console.log('Transfer result:', response);
});
If you'd like to review the MNEE SDK code, it's open-source and available here: https://github.com/mnee-xyz/mnee
Last updated