UNPKG

@kamino-finance/klend-sdk

Version:

Typescript SDK for interacting with the Kamino Lending (klend) protocol

48 lines 2.38 kB
import { PublicKey, Connection } from "@solana/web3.js"; import BN from "bn.js"; export interface UserMetadataFields { /** Pubkey of the referrer/owner - pubkey::default if no referrer */ referrer: PublicKey; /** Bump used for validation of account address */ bump: BN; /** User lookup table - used to store all user accounts - atas for each reserve mint, each obligation PDA, UserMetadata itself and all referrer_token_states if there is a referrer */ userLookupTable: PublicKey; /** User metadata account owner */ owner: PublicKey; padding1: Array<BN>; padding2: Array<BN>; } export interface UserMetadataJSON { /** Pubkey of the referrer/owner - pubkey::default if no referrer */ referrer: string; /** Bump used for validation of account address */ bump: string; /** User lookup table - used to store all user accounts - atas for each reserve mint, each obligation PDA, UserMetadata itself and all referrer_token_states if there is a referrer */ userLookupTable: string; /** User metadata account owner */ owner: string; padding1: Array<string>; padding2: Array<string>; } /** Referrer account -> each owner can have multiple accounts for specific reserves */ export declare class UserMetadata { /** Pubkey of the referrer/owner - pubkey::default if no referrer */ readonly referrer: PublicKey; /** Bump used for validation of account address */ readonly bump: BN; /** User lookup table - used to store all user accounts - atas for each reserve mint, each obligation PDA, UserMetadata itself and all referrer_token_states if there is a referrer */ readonly userLookupTable: PublicKey; /** User metadata account owner */ readonly owner: PublicKey; readonly padding1: Array<BN>; readonly padding2: Array<BN>; static readonly discriminator: Buffer<ArrayBuffer>; static readonly layout: any; constructor(fields: UserMetadataFields); static fetch(c: Connection, address: PublicKey, programId?: PublicKey): Promise<UserMetadata | null>; static fetchMultiple(c: Connection, addresses: PublicKey[], programId?: PublicKey): Promise<Array<UserMetadata | null>>; static decode(data: Buffer): UserMetadata; toJSON(): UserMetadataJSON; static fromJSON(obj: UserMetadataJSON): UserMetadata; } //# sourceMappingURL=UserMetadata.d.ts.map