trustisdk
v1.2.2
Published
Trusti Public API SDK
Downloads
5
Maintainers
Keywords
Readme
Trusti SDK
Official NodeJS SDK for Trusti
Overview
The Trusti NodeJS SDK provides the quickest / easiest path for interacting with the Trusti API
Installation
npm install --save trustisdk
Setup
To start, simply require the Trusti SDK and set up an instance with your Trusti Public API Keys. Don't know what your keys are? Check out your Profile Page.
const trustiSDK = require('trustisdk').trustiClient;
const trusti = trustiSDK('<API - KEY>');
Quickly test that you can connect to the API with the following call:
//await getAssetByCredential
(async () => {
let response = await trusti.getUserDetail({
pubkey: 'VEX5sYmkssvFZ3zWLYELao7mBWcCuB72kovDSDPBAFpECsMoVzW5N',
});
console.log(response);
})();
Example Usage
Once you've set up your instance, using the Trusti SDK is easy. Simply call your desired function and handle the results of the promise.
Questions? Issues? Suggestions?
Feel free to file a github issue or email us at [email protected]
We'd love to hear from you!