thorn-protocol-sdk
v1.0.18
Published
- [Table of contents](#table-of-contents) - [THORN PROTOCOL SDK](#thorn-protocol-sdk) - [Install](#install) - [Thorn Pools Info](#Thorn-pool-Info)
Downloads
75
Readme
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
)