/// import type { AccountsCoder } from "@coral-xyz/anchor"; import type { IdlTypeDef } from "@coral-xyz/anchor/dist/esm/idl.js"; import type { ProgramAccountParser, PublicKey } from "@saberhq/solana-contrib"; /** * Account information. */ export interface AnchorAccount extends ProgramAccountParser { /** * {@link IdlTypeDef}. */ idl: IdlTypeDef; /** * Size of the account in bytes */ size: number; /** * The discriminator. */ discriminator: Buffer; /** * Encodes the value. */ encode: (value: T) => Promise; } /** * {@link ProgramAccountParser}s associated with an IDL. */ export type AnchorAccountMap = { [K in keyof M]: AnchorAccount; }; /** * Generates the metadata of accounts. * * This is intended to be called once at initialization. */ export declare const generateAnchorAccounts: (programID: PublicKey, accounts: IdlTypeDef[], coder: AccountsCoder) => AnchorAccountMap; //# sourceMappingURL=accounts.d.ts.map