UNPKG

@native-to-anchor/buffer-layout

Version:
25 lines 1.38 kB
/// <reference types="node" /> import BN from "bn.js"; import { Layout, Structure } from "@solana/buffer-layout"; export { blob, f32, f64, Layout, s16 as i16, s32 as i32, s8 as i8, seq, struct, u16, u32, u8, union, } from "@solana/buffer-layout"; export { bool, decimal, publicKey } from "@solana/buffer-layout-utils"; export declare function u64(property?: string): Layout<BN>; export declare function i64(property?: string): Layout<BN>; export declare function u128(property?: string): Layout<BN>; export declare function i128(property?: string): Layout<BN>; export declare function option<T>(layout: Layout<T>, property?: string): Layout<T | null>; export declare function coption<T>(layout: Layout<T>, property?: string): Layout<T | null>; export declare function vec<T, U>(layout: Layout<T>, property?: string): Layout<U>; export declare function bytes(property?: string): Layout<Uint8Array>; export declare function utf8Str(property?: string): Utf8StringLayout; declare class Utf8StringLayout extends Layout<string | null> { layout: Structure<Readonly<{ length?: number | undefined; src: Buffer; }>>; constructor(property?: string); encode(src: string | null, b: Buffer, offset?: number): number; decode(b: Buffer, offset?: number): string | null; getSpan(b: Buffer, offset?: number): number; } //# sourceMappingURL=index.d.ts.map