Documentation

    Class BalanceManagerContract

    BalanceManagerContract class for managing BalanceManager operations.

    Index

    Constructors

    Methods

    • Parameters

      • managerKey: string

        The key of the BalanceManager

      • coinKey: string

        The key of the coin to check the balance of

      Returns (tx: Transaction) => void

      A function that takes a Transaction object

      Check the balance of the BalanceManager

    • Returns (tx: Transaction) => void

      A function that takes a Transaction object

      Create and share a new BalanceManager

    • Parameters

      • ownerAddress: string

      Returns (tx: Transaction) => void

      A function that takes a Transaction object

      Create and share a new BalanceManager, manually set the owner

    • Parameters

      • managerKey: string

        The key of the BalanceManager

      • coinKey: string

        The key of the coin to deposit

      • amountToDeposit: number

        The amount to deposit

      Returns (tx: Transaction) => void

      A function that takes a Transaction object

      Deposit funds into the BalanceManager

    • Parameters

      • managerKey: string

        The name of the BalanceManager

      • coinKey: string

        The name of the coin to deposit

      • amountToDeposit: number

        The amount to deposit

      Returns (tx: Transaction) => void

      A function that takes a Transaction object

      Deposit using the DepositCap

    • Parameters

      • managerKey: string

        The key of the BalanceManager

      Returns (tx: Transaction) => TransactionResult

      A function that takes a Transaction object

      Generate a trade proof for the BalanceManager. Calls the appropriate function based on whether tradeCap is set.

    • Parameters

      • managerId: string

        The ID of the BalanceManager

      Returns (tx: Transaction) => TransactionResult

      A function that takes a Transaction object

      Generate a trade proof as the owner

    • Parameters

      • managerId: string

        The ID of the BalanceManager

      • tradeCapId: string

        The ID of the tradeCap

      Returns (tx: Transaction) => TransactionResult

      A function that takes a Transaction object

      Generate a trade proof as a trader

    • Parameters

      • managerKey: string

        The key of the BalanceManager

      Returns (tx: Transaction) => void

      A function that takes a Transaction object

      Get the ID of the BalanceManager

    • Parameters

      • managerKey: string

        The name of the BalanceManager

      Returns (tx: Transaction) => TransactionResult

      A function that takes a Transaction object

      Mint a DepositCap

    • Parameters

      • managerKey: string

        The name of the BalanceManager

      Returns (tx: Transaction) => TransactionResult

      A function that takes a Transaction object

      Mint a TradeCap

    • Parameters

      • managerKey: string

        The name of the BalanceManager

      Returns (tx: Transaction) => TransactionResult

      A function that takes a Transaction object

      Mint a WithdrawalCap

    • Parameters

      • managerKey: string

        The key of the BalanceManager

      Returns (tx: Transaction) => void

      A function that takes a Transaction object

      Get the owner of the BalanceManager

    • Parameters

      • managerKey: string

        The key of the BalanceManager

      • coinKey: string

        The key of the coin to withdraw

      • recipient: string

        The recipient of the withdrawn funds

      Returns (tx: Transaction) => void

      A function that takes a Transaction object

      Withdraw all funds from the BalanceManager

    • Parameters

      • managerKey: string

        The key of the BalanceManager

      • coinKey: string

        The key of the coin to withdraw

      • amountToWithdraw: number

        The amount to withdraw

      • recipient: string

        The recipient of the withdrawn funds

      Returns (tx: Transaction) => void

      A function that takes a Transaction object

      Withdraw funds from the BalanceManager

    • Parameters

      • managerKey: string

        The name of the BalanceManager

      • coinKey: string

        The name of the coin to withdraw

      • amountToWithdraw: number

        The amount to withdraw

      Returns (tx: Transaction) => TransactionResult

      A function that takes a Transaction object

      Withdraw using the WithdrawCap

    MMNEPVFCICPMFPCPTTAAATR