tt-staking-lib
TypeScript icon, indicating that this package has built-in type declarations

0.2.3 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i tt-staking-lib

Weekly Downloads

1

Version

0.2.3

License

MIT

Unpacked Size

33.9 kB

Total Files

15

Last publish

Collaborators

  • scotttsai
  • peter-tt
  • benson.cho