flexbuf
Version:
20 lines • 975 B
TypeScript
import type { Uint, Uint256 } from "low-level";
import { type DataEncoder } from "flexbuf";
type NewContainer<T extends Container> = new (...args: any[]) => T;
export declare abstract class Container {
encodeToHex(forHash?: boolean): Uint;
static fromDecodedHex<T extends Container>(this: NewContainer<T>, hexData: Uint, returnLength?: false): T | null;
static fromDecodedHex<T extends Container>(this: NewContainer<T>, hexData: Uint, returnLength: true): {
data: T;
length: number;
} | null;
static fromDecodedHex<T extends Container>(this: NewContainer<T>, hexData: Uint, returnLength: boolean): T | null;
protected static fromDict(obj: Dict<any>): Container | null;
protected static readonly encodingSettings: readonly DataEncoder[];
}
export declare abstract class HashableContainer extends Container {
calculateHash(): Uint256;
validateHash(hash: Uint256): boolean;
}
export {};
//# sourceMappingURL=container.d.ts.map