Quick Start

This guide was created to help you get started as quickly as possible using the MNEE Typescript SDK.

1. Get your API keys

Create your MNEE Developer account and generate your API keys.

Developer Portal

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);
});

4. Send MNEE

After ensuring that you've funded your wallet, you can easily send MNEE using the transfer() method.

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