UNPKG

@avalabs/avalanchejs

Version:
17 lines 840 B
import type { FromBytesReturn } from '../../utils/struct'; import type { Transaction } from '../../vms/common/transaction'; import type { Serializable, SerializableStatic } from '../common/types'; import { Short } from '../primitives'; import type { Codec } from './codec'; export declare class Manager { codecs: Record<number, Codec>; RegisterCodec(version: number, codec: Codec): void; unpack: <T extends SerializableStatic>(buff: Uint8Array, unpacker: T) => FromBytesReturn<T>; unpackTransaction: (buff: Uint8Array) => Transaction; getCodecFromBuffer(buff: Uint8Array): [Codec, Uint8Array]; getCodecForVersion(codecId: Short): Codec; getDefaultCodec(): Codec; getDefaultCodecId(): Short; packCodec(serializable: Serializable, codecVersion?: number): Uint8Array; } //# sourceMappingURL=manager.d.ts.map