// from https://github.com/solana-labs/solana-program-library/blob/4b0f59e9c61554708de969b01892b90955d5fd69/token-lending/js/types/buffer-layout.d.ts declare module "buffer-layout" { export class Layout { span: number; property?: string; constructor(span: number, property?: string); decode(b: Buffer, offset?: number): T; encode(src: T, b: Buffer, offset?: number): number; getSpan(b: Buffer, offset?: number): number; replicate(name: string): this; } export class Structure extends Layout { span: any; } export function greedy( elementSpan?: number, property?: string ): Layout; export function offset( layout: Layout, offset?: number, property?: string ): Layout; export function u8(property?: string): Layout; export function u16(property?: string): Layout; export function u24(property?: string): Layout; export function u32(property?: string): Layout; export function u40(property?: string): Layout; export function u48(property?: string): Layout; export function nu64(property?: string): Layout; export function u16be(property?: string): Layout; export function u24be(property?: string): Layout; export function u32be(property?: string): Layout; export function u40be(property?: string): Layout; export function u48be(property?: string): Layout; export function nu64be(property?: string): Layout; export function s8(property?: string): Layout; export function s16(property?: string): Layout; export function s24(property?: string): Layout; export function s32(property?: string): Layout; export function s40(property?: string): Layout; export function s48(property?: string): Layout; export function ns64(property?: string): Layout; export function s16be(property?: string): Layout; export function s24be(property?: string): Layout; export function s32be(property?: string): Layout; export function s40be(property?: string): Layout; export function s48be(property?: string): Layout; export function ns64be(property?: string): Layout; export function f32(property?: string): Layout; export function f32be(property?: string): Layout; export function f64(property?: string): Layout; export function f64be(property?: string): Layout; export function struct( fields: Layout[], property?: string, decodePrefixes?: boolean ): Layout; export function bits( word: Layout, msb?: boolean, property?: string ): any; export function seq( elementLayout: Layout, count: number | Layout, property?: string ): Layout; export function union( discr: Layout, defaultLayout?: any, property?: string ): any; export function unionLayoutDiscriminator( layout: Layout, property?: string ): any; export function blob( length: number | Layout, property?: string ): Layout; export function cstr(property?: string): Layout; export function utf8(maxSpan: number, property?: string): Layout; }