1.0.2 • Published 3 years ago

node-mathcoin-api v1.0.2

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

node-mathcoin-api

Working with the MathCoin API

Create an API token - https://m.vk.com/app6995668#create_merchant

Install

npm install node-mathcoin-api

Usage

const MathCoinAPI = require('node-mathcoin-api');
const api = new MathCoinAPI("userId", "API Token");

Methods

Get a translation link

@amount - number of coins (optional)

api.txList(amount)
  .then((response) => console.log(response));

Get a list of translations

@txId - the number of the last transfer after which to show the transfers

api.txList(txId)
  .then((response) => console.log(response));

Find out the balance

@id - id of the user whose balance you need to find out

api.score(id)
  .then((response) => console.log(response));

Send coins

@to - id of the user to send to
@amount - number of coins sent

api.score(to, amount)
  .then((response) => console.log(response));