marginpy.group module

class MarginfiGroup(config: MarginfiConfig, program: Program, admin: PublicKey, bank: Bank)

Bases: object

async static fetch(config: MarginfiConfig, program: Program) MarginfiGroup

MarginfiGroup network factory.

Fetches account data according to the config and instantiate the coxrresponding MarginfiGroup.

static from_account_data(config: MarginfiConfig, program: Program, account_raw: MarginfiGroupData) MarginfiGroup

MarginfiGroup local factory (decoded).

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

static from_account_data_raw(config: MarginfiConfig, program: Program, data: bytes) MarginfiGroup

MarginfiGroup local factory (encoded).

Instantiates a MarginfiGroup according to the provided encoded data. Checks sanity against provided config.

property pubkey: PublicKey
property admin: PublicKey
property bank: Bank
static decode(encoded: bytes) MarginfiGroupData

Decodes marginfi group data according to the Anchor IDL.

static encode(decoded: MarginfiGroupData) bytes

Encodes marginfi group data according to the Anchor IDL.

async reload() None

Updates instance data by loading the latest on-chain state.

async make_update_interest_accumulator_ix() TransactionInstruction
async update_interest_accumulator() TransactionSignature