Options
All
  • Public
  • Public/Protected
  • All
Menu

Controls interaction with the Kolibri Savings Pool.

Hierarchy

  • SavingsPoolClient

Index

Constructors

constructor

  • new SavingsPoolClient(nodeUrl: string, wallet: InMemorySigner, savingsPoolAddress: string): SavingsPoolClient
  • Create a new Savings Pool Client.

    Parameters

    • nodeUrl: string

      The URL of the node to connect to.

    • wallet: InMemorySigner

      The wallet which will interact with this Oven.

    • savingsPoolAddress: string

      The address of the Kolibri Savings Pool.

    Returns SavingsPoolClient

Properties

Readonly savingsPoolAddress

savingsPoolAddress: string

Private Readonly tezos

tezos: TezosToolkit

A TezosToolkit

Methods

deposit

  • deposit(kUSDAmount: BigNumber, savingsPoolContract?: undefined | ContractAbstraction<Wallet, DefaultMethods<Wallet>, DefaultMethodsObject<Wallet>, DefaultViews, DefaultContractViews, unknown>): Promise<TransactionWalletOperation | TransactionOperation>
  • Deposit kUSD into the liquidity pool and receive LP tokens.

    Note: Deposit operations require an approval to be issued. This method will not issue an approval automatically.

    Parameters

    • kUSDAmount: BigNumber

      The amount of kUSD to deposit.

    • savingsPoolContract: undefined | ContractAbstraction<Wallet, DefaultMethods<Wallet>, DefaultMethodsObject<Wallet>, DefaultViews, DefaultContractViews, unknown> = ...

      The savings pool contract

    Returns Promise<TransactionWalletOperation | TransactionOperation>

    The operation hash

getInterestRateAPY

  • getInterestRateAPY(savingsPoolStorage?: any): Promise<Decimal>
  • Get the interest rate of the pool.

    Parameters

    • savingsPoolStorage: any = ...

    Returns Promise<Decimal>

getLPTokenBalance

  • getLPTokenBalance(address: string, tokenContractStorage?: any): Promise<BigNumber>
  • Get the LP token balance for the given account.

    Parameters

    • address: string
    • tokenContractStorage: any = ...

    Returns Promise<BigNumber>

getLPTokenConversionRate

  • getLPTokenConversionRate(savingsPoolStorage?: any, time?: Date): Promise<BigNumber>
  • Get the conversion rate of 1 LP token to kUSD, denominated in kUSD.

    Parameters

    • savingsPoolStorage: any = ...
    • time: Date = ...

    Returns Promise<BigNumber>

getLPTokenTotal

  • getLPTokenTotal(savingsPoolStorage?: any): Promise<BigNumber>
  • Get the number of LP tokens in existence.

    Parameters

    • savingsPoolStorage: any = ...

    Returns Promise<BigNumber>

getPoolSize

  • getPoolSize(savingsPoolStorage?: any, time?: Date): Promise<BigNumber>
  • Get the size of the pool in kUSD, accounting for the current time.

    Parameters

    • savingsPoolStorage: any = ...
    • time: Date = ...

    Returns Promise<BigNumber>

getkUSDTokenBalance

  • getkUSDTokenBalance(address: string, savingsPoolStorage?: any, tokenContractStorage?: any): Promise<BigNumber>
  • Get the kUSD balance for a given account, if they turned in all of their LP tokens.

    Parameters

    • address: string
    • savingsPoolStorage: any = ...
    • tokenContractStorage: any = ...

    Returns Promise<BigNumber>

makeDepositTransaction

  • makeDepositTransaction(kUSDAmount: BigNumber, savingsPoolContract?: undefined | ContractAbstraction<Wallet, DefaultMethods<Wallet>, DefaultMethodsObject<Wallet>, DefaultViews, DefaultContractViews, unknown>): Promise<ContractMethod<Wallet>>
  • Returns a Taquito transaction that will deposit kUSD into the liquidity pool and receive LP tokens.

    Note: Deposit operations require an approval to be issued. This method will not include an approval in the transaction.

    Parameters

    • kUSDAmount: BigNumber

      The amount of kUSD to deposit.

    • savingsPoolContract: undefined | ContractAbstraction<Wallet, DefaultMethods<Wallet>, DefaultMethodsObject<Wallet>, DefaultViews, DefaultContractViews, unknown> = ...

      The savings pool contract

    Returns Promise<ContractMethod<Wallet>>

    A transaction that will deposit kUSD.

makeRedeemTransaction

  • makeRedeemTransaction(lpTokenAmount: BigNumber, savingsPoolContract?: undefined | ContractAbstraction<Wallet, DefaultMethods<Wallet>, DefaultMethodsObject<Wallet>, DefaultViews, DefaultContractViews, unknown>): Promise<ContractMethod<Wallet>>
  • Returns a taquito transaction that will remove LP tokens from the liquidity pool and receive kUSD

    Note: Redeem operations require an approval to be issued. This method will not include an approval in the transaction. *

    Parameters

    • lpTokenAmount: BigNumber

      The amount of LP tokens to redeem.

    • savingsPoolContract: undefined | ContractAbstraction<Wallet, DefaultMethods<Wallet>, DefaultMethodsObject<Wallet>, DefaultViews, DefaultContractViews, unknown> = ...

      The savings pool contract

    Returns Promise<ContractMethod<Wallet>>

    A transaction that will redeem LP tokens

redeem

  • redeem(lpTokenAmount: BigNumber, savingsPoolContract?: undefined | ContractAbstraction<Wallet, DefaultMethods<Wallet>, DefaultMethodsObject<Wallet>, DefaultViews, DefaultContractViews, unknown>): Promise<TransactionWalletOperation | TransactionOperation>
  • Remove LP tokens from the liquidity pool and receive kUSD

    Note: Redeem operations require an approval to be issued. This method will not issue an approval automatically.

    Parameters

    • lpTokenAmount: BigNumber

      The amount of LP tokens to redeem.

    • savingsPoolContract: undefined | ContractAbstraction<Wallet, DefaultMethods<Wallet>, DefaultMethodsObject<Wallet>, DefaultViews, DefaultContractViews, unknown> = ...

      The savings pool contract

    Returns Promise<TransactionWalletOperation | TransactionOperation>

    The operation hash

Generated using TypeDoc