UNPKG

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