XendBridge NodeJs SDK

Xendbridge provides a NodeJs SDK which can be integrated by installing directly from the Node Package Manager. This library abstracts the necessary API endpoints required to interact with the XendBridge P2P application into javascript functions. The package details can be found at https://www.npmjs.com/package/@xendbridge/nodejssdk

Setup

The steps below can be used to integrate the sdk to your NodeJs application

  1. npm install @xendbridge/nodejssdk

  2. Create a config folder on your application's root directory

  3. Create an {environment}.json file (eg. Sandbox.json) in the config folder and add the json object below

{ 
    "baseUrl": "xendbridge base url", 
    "publicKey": "Your xendbridge public key", 
    "secretKey": "Your xendbridge secret key" 
} 

Please note that the {environment}.json file should correspond to your app's deployment environment (eg. development, sandbox, production).

  1. Import the XendBridge library into your javascript file using the code below and you'd be able to interract with the XendBridge api

const xendbridgeSDK = require('@xendbridge/nodejssdk')

Last updated