UNPKG

933 BTypeScriptView Raw
1import type { Registry } from '@polkadot/types-codec/types';
2import type { H256 } from '../interfaces/runtime';
3import { Bytes, Enum } from '@polkadot/types-codec';
4/**
5 * @name Data
6 * @description
7 * A [[Data]] container with node, raw or hashed data
8 */
9export declare class Data extends Enum {
10 constructor(registry: Registry, value?: Record<string, any> | Uint8Array | Enum | string);
11 get asBlakeTwo256(): H256;
12 get asKeccak256(): H256;
13 get asRaw(): Bytes;
14 get asSha256(): H256;
15 get asShaThree256(): H256;
16 get isBlakeTwo256(): boolean;
17 get isKeccak256(): boolean;
18 get isNone(): boolean;
19 get isRaw(): boolean;
20 get isSha256(): boolean;
21 get isShaThree256(): boolean;
22 /**
23 * @description The encoded length
24 */
25 get encodedLength(): number;
26 /**
27 * @description Encodes the value as a Uint8Array as per the SCALE specifications
28 */
29 toU8a(): Uint8Array;
30}