@linear-protocol/phoenix-bonds-sdk
v0.1.27
Published
Phoenix Bonds SDK for building frontend and analytics
Downloads
72
Readme
phoenix-bonds-sdk
Phoenix Bonds SDK for building frontend, and analytics
This SDK can be used both in frontend with WalletSelector
and backend with KeyStore
Base Usage
// For frontend
// Near and WalletSelector objects
const near = new Near(/* args */)
const selector = setupWalletSelector(/* args */)
// SDK config
const config: PhoenixBondsSDKConfig = { /* options */ }
// sdk object
const sdk = initPhoenixBondsSDK(selector, near, config)
// e.g. bond, transaction will be signed with wallet selector
const bondNoteId = await sdk.phoenixBondsContract.bond(/* args */)
console.log(bondNoteId)