Zabo SDK for JS
See the Zabo API docs.
For a standard browser application, add the script tag to your html file:
As a package:
npm install zabo-sdk-js --save
The first step is always to allow a user to connect from your front-end:
My WebsiteMy Zabo ApplicationConnectOther SDK methodsCrypto BalancesAccount HistoryExchange Rates<!--Add this script to your html file-->
Or importing as a package:
const Zabo =const zabo = await Zabozabo
Or using ES6 modules:
After a user connects, the client SDK can continued to be used for the connected wallet:
Or you can send the account to your server for the server-side SDK to create a unique user:
zabo// Then in your serverconst Zabo =let account = accountReceivedFromTheClientZabo
While instantiating your new Zabo SDK instance, you have a few configuration options that can be changed to best suit your needs. Please note that some options are available only when running the SDK from the browser while others are available when running the SDK on your node.js code.
|clientId||App Key acquired when registering a team in Zabo Dashboard.||Browser|
|env||Zabo API environment the SDK is connecting with. Could be either
|apiKey||API Key generated via the Developer Settings section at Zabo Dashboard.||Node|
|secretKey||Secret Key generated via the Developer Settings section at Zabo Dashboard.||Node|
|autoConnect||Optional boolean useful if you wish to stop the SDK from fetching the team data during Zabo.init(). Defaults to
Server vs Client
The SDK can be used in either the client or server environment after a user connects their wallet, however, they have different functions available to them and utilize different authentication methods. See the Zabo API docs for more information.
Every method returns a chainable promise which can be used:
Or with async/await:
let exchangeRates = await zabocurrenciesconsole
Help and Further Information
Please read our docs and reach out to us in any or all of the following forums for questions:
If you notice any issues with our docs, this README, or the SDK, feel free to open an issue and/or a PR. We welcome community contributions!