TypeScript SDK for DuckPools protocol containing type definitions and interfaces.
Fee configuration for pools:
stepOne: numberstepTwo: numberfeeDivisorOne: numberfeeDivisorTwo: numberfeeDivisorThree: number
Represents a balance of tokens:
tokens: BoxAsset[]value: string
Information about an Ergo asset:
name: string - Full case-insensitive namedisplayName: string - Full case-sensitive namesymbol?: string - Shortened version of nametokenId: stringdecimals: numberlogo: stringdexPriceId: stringdexNft: string
Collateral configuration:
collateral: ErgoAssetInfoDEXNFT: stringliquidationPenalty: numberliquidationThreshold: numberserializedPenaltyThreshold?: stringloanExpiration?: number
Quote information for borrowing:
quoteNFT: stringquoteScript: stringmaximumBorrowable: numberprimarySupportedCollateral: collateralSettingssecondarySupportedCollateral: collateralSettings[]
Pool configuration and state:
version: numbername: stringdisplayName: stringisToken: boolean- Common pool values:
feeAddress: stringBorrowTokenDenomination: stringLendTokenMultiplier: stringLiquidationThresholdDenomination: numberdefaultBufferHeight: numberfees: feeStructureLendTokenSupply: numberBorrowTokenSupply: numberInitializedPoolAmount: number
- Proxy scripts:
proxyLendScript: stringproxyWithdrawScript: stringproxyBorrowScript: stringproxyPartialRepayScript: stringproxyRepayScript: string
- Instance-specific values:
poolScript: stringcollateralScript: stringrepaymentScript: string
- Assets and NFTs:
pooledAsset: ErgoAssetInfopoolNFT: stringlendTokenId: stringborrowTokenId: stringinterestNFT: stringsettingsNFT: stringcurrentQuote?: QuotehistoricQuote?: Quote[]collateralSupported?: collateralSettings[]
Lending position details:
assetLent: ErgoAssetInfoamountLent: stringprofit: stringprojected: string
Borrowing position details:
spendingNFT: stringassetBorrowed: ErgoAssetInfoamountBorrowed: stringtotalOwed: stringquote: QuotecollateralLent: BalancecollateralValue: numberaveragedThreshold: numberaveragedPenalty: number
User state and positions:
addresses: string[]balance: BalancelendPositions: LendPosition[]borrowPositions: borrowPosition[]
Asset in an Ergo box:
tokenId: stringamount: number | bigintindex?: numbername?: stringdecimals?: numbertype?: string
Box registers:
R4?toR9?: Register
Register contents:
serializedValue: stringsigmaType?: stringrenderedValue?: string
Ergo box structure:
boxId: stringtransactionId: stringblockId: stringvalue: number | bigintindex: numberglobalIndex: numbercreationHeight: numbersettlementHeight: numberergoTree: stringergoTreeConstants?: stringergoTreeScript?: stringaddress: stringassets: BoxAsset[]additionalRegisters: AdditionalRegistersspentTransactionId: string | nullmainChain: boolean