@cryptounifier/nodejs-sdk
v1.1.0
Published
CryptoUnifier API Node.JS Integration.
Downloads
11
Maintainers
Readme
CryptoUnifier Node.JS SDK
A simple Node.JS SDK for interacting with Crypto Unifier API V1.
Installation
You can install the package via NPM:
npm install @cryptounifier/nodejs-sdk
Usage
Using the Wallet API client
You can use the WalletAPI
class for convenient access to API methods. Some are defined in the code:
const WalletAPI = require('@cryptounifier/nodejs-sdk').WalletAPI
const client = new WalletAPI('WALLET_KEY', 'SECRET_KEY', 'btc');
const balance = await client.getBalance();
console.log(balance)
const depositAddresses = await client.getDepositAddresses();
console.log(depositAddresses)
Using the Merchant API client
You can use the MerchantAPI
class for convenient access to API methods. Some are defined in the code:
const MerchantAPI = require('@cryptounifier/nodejs-sdk').MerchantAPI;
const client = new MerchantAPI('MERCHANT_KEY', 'SECRET_KEY');
const invoice = await client.createInvoice(['btc', 'bch', 'eth']);
console.log(invoice)
License
The MIT License (MIT). Please see License File for more information.