@dannyfi/sdk
v0.0.3
Published
SDK for dannyfi.
Downloads
2
Readme
@dannyfi/sdk
Docs Link
Installation
yarn add @dannyfi/sdk
// or
npm i @dannyfi/sdk --save
Usage
Api Host
- Mainnet Version https://api.dannyfi.app/rest
- Testnet Version https://api.testnet.dannyfi.app/rest
- Devnet Version https://api.devnet.dannyfi.app/rest
Use
import dannyfi from '@dannyfi/sdk';
import { useWeb3React } from '@web3-react/core';
const { account, library } = useWeb3React();
dannyfi.initConfig({
cluster: 'mainnet',
provider: library.provider,
currentAccount: account,
});
await dannyfi.rpc({
// params
});
await dannyfi.private.xxx({
// params
});
await dannyfi.public.xxx({
// params
});
// signature for websocket
dannyfi.utils.signHmac(
timestamp,
'',
IRequestPath.wsAccounts,
'',
apiKey.secret
);