tt-staking-lib
v0.2.3
Published
This library provides a helper class with methods for the TT staking contract.
Downloads
28
Readme
TT Staking lib
This library provides a helper class with methods for the TT staking contract.
Usage
- Install as npm package
# use yarn or npm of your choice
yarn add tt-staking-lib
- Use the helper
import {StakingHelper} from "tt-staking-lib"
const helper = new StakingHelper({
stakingAddress: config.stakingContract,
});
const apy = await helper.getAPY()
To make the return value for getAPY(), multiply that by 100.
Currently supported:
- getAPY
- getAccountStakedInfo
- getBlocksUntilSession
Develop
- Run
yarn install
- See .env.example for env config.
- Use
DEBUG=staking yarn test
to run, test and debug
Publish
yarn publish