/// import { Buffer } from "buffer"; import { Idl, IdlTypeDef } from "../../idl.js"; import { AccountsCoder } from "../index.js"; /** * Number of bytes of the account discriminator. */ export declare const ACCOUNT_DISCRIMINATOR_SIZE = 8; /** * Encodes and decodes account objects. */ export declare class BorshAccountsCoder implements AccountsCoder { /** * Maps account type identifier to a layout. */ private accountLayouts; /** * IDL whose acconts will be coded. */ private idl; constructor(idl: Idl); encode(accountName: A, account: T): Promise; decode(accountName: A, data: Buffer): T; decodeAny(data: Buffer): T; decodeUnchecked(accountName: A, ix: Buffer): T; memcmp(accountName: A, appendData?: Buffer): any; size(idlAccount: IdlTypeDef): number; /** * Calculates and returns a unique 8 byte discriminator prepended to all anchor accounts. * * @param name The name of the account to calculate the discriminator. */ static accountDiscriminator(name: string): Buffer; } //# sourceMappingURL=accounts.d.ts.map