/** * Length of the self-describing discriminator prefixed to a present * `OptionalDiscriminatedData` trailing field. Mirrors * `Discriminator::LENGTH` in rust/sealevel/libraries/account-utils. */ export declare const SEALEVEL_DISCRIMINATOR_SIZE = 8; /** * Read a self-describing optional trailing field, mirroring * `OptionalDiscriminatedData::deserialize_reader` in * rust/sealevel/libraries/account-utils/src/discriminator.rs. * * A present value is serialized on-chain as `[T::DISCRIMINATOR][payload]` and * an absent one as zero bytes. On read the tail is the value's payload only if * it begins with exactly `discriminator`; an empty tail, a tail shorter than * the discriminator, or any non-matching tail (e.g. stale bytes in an * over-allocated account) all decode to `undefined` rather than erroring. * * Returns the payload bytes following the discriminator, or `undefined` when * absent. A matching discriminator with a truncated payload is the caller's * responsibility to detect. */ export declare function readOptionalDiscriminatedTrailing(rawAccountData: Buffer, offset: number, discriminator: Buffer): Buffer | undefined; export declare class SealevelInstructionWrapper { readonly fields: any; instruction: number; data: Instr; constructor(fields: any); } export declare class SealevelAccountDataWrapper { readonly fields: any; initialized: boolean; discriminator?: unknown; data: T; constructor(fields: any); } export declare function getSealevelAccountDataSchema(DataClass: T, discriminator?: any): { kind: string; fields: any[][]; }; export declare class SealevelSimulationReturnData { readonly fields: any; return_data: T; trailing_byte: number; constructor(fields: any); } export declare function getSealevelSimulationReturnDataSchema(DataClass: T): { kind: string; fields: (string | T)[][]; }; //# sourceMappingURL=sealevelSerialization.d.ts.map