Integration Guide
export function getFlexUserAccountAddress(owner: PublicKey, programId: PublicKey) {
return PublicKey.findProgramAddressSync(
[Buffer.from('flexlend'), owner.toBuffer()],
programId, // FL3X2pRsQ9zHENpZSKDRREtccwJuei8yg9fwDu9UN69Q
)[0]
}
#[account]
pub struct UserAccount {
pub bump: u8,
pub _padding: [u8; 7],
// wallet address that owns this UserAccount
pub owner: Pubkey,
// the marginFi userAccount which this UserAccount has authority
pub mfi_account: Pubkey,
pub _padding2: [u64; 32],
}
Last updated

