Options
All
  • Public
  • Public/Protected
  • All
Menu

Wrapper class around a specific marginfi group.

Hierarchy

  • MarginfiGroup

Index

Properties

_program: Program<MarginfiIdl>
admin: PublicKey
bank: Bank
publicKey: PublicKey

Methods

  • fetch(): Promise<void>
  • Update instance data by fetching and storing the latest on-chain state.

    Returns Promise<void>

  • makeUpdateInterestAccumulatorIx(): Promise<TransactionInstruction>
  • Create UpdateInterestAccumulator transaction instruction.

    Returns Promise<TransactionInstruction>

  • updateInterestAccumulator(): Promise<string>
  • Update interest accumulator.

    Returns Promise<string>

  • Fetch marginfi group account data according to the config. Check sanity against provided config.

    Parameters

    Returns Promise<MarginfiGroupData>

    Decoded marginfi group account data struct

  • Decode marginfi group account data according to the Anchor IDL.

    Parameters

    • encoded: Buffer

      Raw data buffer

    Returns MarginfiGroupData

    Decoded marginfi group account data struct

  • Encode marginfi group account data according to the Anchor IDL.

    Parameters

    Returns Promise<Buffer>

    Raw data buffer

  • MarginfiGroup network factory

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

    Parameters

    Returns Promise<MarginfiGroup>

    MarginfiGroup instance

  • MarginfiGroup local factory (decoded)

    Instantiate a MarginfiGroup according to the provided decoded data. Check sanity against provided config.

    Parameters

    Returns MarginfiGroup

    MarginfiGroup instance

  • MarginfiGroup local factory (encoded)

    Instantiate a MarginfiGroup according to the provided encoded data. Check sanity against provided config.

    Parameters

    Returns MarginfiGroup

    MarginfiGroup instance

Generated using TypeDoc