1.1.0 • Published 9 months ago

@cryptounifier/nodejs-sdk v1.1.0

Weekly downloads
-
License
MIT
Repository
-
Last release
9 months ago

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.