thorn-protocol-sdk
TypeScript icon, indicating that this package has built-in type declarations

1.0.10 • Public • Published

Table of contents

THORN PROTOCOL SDK

Install

npm install thorn-protocol-sdk

Thorn Pool Info

import {StableSwapInfo} from "thorn-protocol-sdk"

Enum type

enum StableSwapType {
  TwoPool = 2,
  ThreePool = 3
}

Pool info construction:

  const poolInfo= new StableSwapInfo(
    _rpc: string,
    _chainId: number,
    type: StableSwapType, 
  )

Pool info execution

User Share

 const userShare= await poolInfo.getUserShareAmount(
    poolAddress: address of a pool,
    userAddress: address of a user
 )

User current amounts

const userCurrentAmounts= await poolInfo.getUserCurrentAmounts(
    poolAddress: address of a pool,
    userAddress: address of a user
 )

Readme

Keywords

none

Package Sidebar

Install

npm i thorn-protocol-sdk

Weekly Downloads

17

Version

1.0.10

License

ISC

Unpacked Size

1.06 MB

Total Files

44

Last publish

Collaborators

  • phuongnguyenlaaithe