Documentation
    Preparing search index...

    MarginPoolContract class for managing MarginPool operations.

    Index

    Constructors

    Methods

    • Parameters

      • coinKey: string

        The key to identify the pool

      Returns (tx: Transaction) => TransactionResult

      A function that takes a Transaction object

      Get the total borrow shares

    • Parameters

      • coinKey: string

        The key to identify the margin pool

      • deepbookPoolId: string

        The ID of the deepbook pool

      Returns (tx: Transaction) => TransactionResult

      A function that takes a Transaction object

      Check if a deepbook pool is allowed for borrowing

    • Parameters

      • coinKey: string

        The key to identify the pool

      Returns (tx: Transaction) => TransactionResult

      A function that takes a Transaction object

      Get the margin pool ID

    • Parameters

      • coinKey: string

        The key to identify the pool

      Returns (tx: Transaction) => TransactionResult

      A function that takes a Transaction object

      Get the current interest rate

    • Parameters

      • coinKey: string

        The key to identify the pool

      Returns (tx: Transaction) => TransactionResult

      A function that takes a Transaction object

      Get the last update timestamp

    • Parameters

      • coinKey: string

        The key to identify the pool

      Returns (tx: Transaction) => TransactionResult

      A function that takes a Transaction object

      Get the max utilization rate

    • Parameters

      • coinKey: string

        The key to identify the pool

      Returns (tx: Transaction) => TransactionResult

      A function that takes a Transaction object

      Get the minimum borrow amount

    • Returns (tx: Transaction) => TransactionResult

      A function that takes a Transaction object

      Mint a supplier cap for margin pool

    • Parameters

      • coinKey: string

        The key to identify the pool

      Returns (tx: Transaction) => void

      A function that takes a Transaction object

      Mint a referral for a margin pool

    • Parameters

      • coinKey: string

        The key to identify the pool

      Returns (tx: Transaction) => TransactionResult

      A function that takes a Transaction object

      Get the protocol spread

    • Parameters

      • coinKey: string

        The key to identify the pool

      Returns (tx: Transaction) => TransactionResult

      A function that takes a Transaction object

      Get the supply cap

    • Parameters

      • coinKey: string

        The key to identify the pool

      Returns (tx: Transaction) => TransactionResult

      A function that takes a Transaction object

      Get the total supply shares

    • Parameters

      • coinKey: string

        The key to identify the pool

      • supplierCap: TransactionObjectArgument

        The supplier cap object

      • amountToDeposit: number

        The amount to deposit

      • OptionalreferralId: string

        The ID of the referral

      Returns (tx: Transaction) => void

      A function that takes a Transaction object

      Supply to a margin pool

    • Parameters

      • coinKey: string

        The key to identify the pool

      Returns (tx: Transaction) => TransactionResult

      A function that takes a Transaction object

      Get the total borrow amount

    • Parameters

      • coinKey: string

        The key to identify the pool

      Returns (tx: Transaction) => TransactionResult

      A function that takes a Transaction object

      Get the total supply amount

    • Parameters

      • coinKey: string

        The key to identify the pool

      • supplierCapId: string

        The ID of the supplier cap

      Returns (tx: Transaction) => TransactionResult

      A function that takes a Transaction object

      Get user supply amount for a supplier cap

    • Parameters

      • coinKey: string

        The key to identify the pool

      • supplierCapId: string

        The ID of the supplier cap

      Returns (tx: Transaction) => TransactionResult

      A function that takes a Transaction object

      Get user supply shares for a supplier cap

    • Parameters

      • coinKey: string

        The key to identify the pool

      • supplierCap: TransactionObjectArgument

        The supplier cap object

      • OptionalamountToWithdraw: number

        The amount to withdraw

      Returns (tx: Transaction) => TransactionResult

      A function that takes a Transaction object

      Withdraw from a margin pool

    • Parameters

      • coinKey: string

        The key to identify the pool

      • referralId: string

        The ID of the referral

      Returns (tx: Transaction) => void

      A function that takes a Transaction object

      Withdraw referral fees from a margin pool