Options
All
  • Public
  • Public/Protected
  • All
Menu

Entrypoint to interact with the marginfi contract.

Hierarchy

  • MarginfiClientReadonly

Index

Constructors

Properties

programId: PublicKey

Accessors

  • get provider(): AnchorProvider

Methods

  • getAllMarginfiAccountAddresses(): Promise<PublicKey[]>
  • Retrieves the addresses of all marginfi accounts in the udnerlying group.

    Returns Promise<PublicKey[]>

    Account addresses

  • getAllProgramAccountAddresses(type: AccountType): Promise<PublicKey[]>
  • Retrieves the addresses of all accounts owned by the marginfi program.

    Parameters

    Returns Promise<PublicKey[]>

    Account addresses

  • getMarginfiAccountsForAuthority(authority: Address): Promise<MarginfiAccountReadonly[]>
  • Retrieves all marginfi accounts under the specified authority.

    Parameters

    • authority: Address

    Returns Promise<MarginfiAccountReadonly[]>

    MarginfiAccount instances

  • MarginfiClient factory

    Fetch account data according to the config and instantiate the corresponding MarginfiAccount.

    Parameters

    • config: MarginfiConfig

      marginfi config

    • connection: Connection

      Solana web.js Connection object

    • Optional opts: ConfirmOptions

      Solana web.js ConfirmOptions object

    Returns Promise<MarginfiClientReadonly>

    MarginfiClient instance

Generated using TypeDoc