1 | import type { Vec } from '@polkadot/types-codec';
|
2 | import type { AnyNumber, AnyU8a, IU8a, Registry } from '@polkadot/types-codec/types';
|
3 | import type { GenericExtrinsic } from '../extrinsic/Extrinsic.js';
|
4 | import type { Digest, DigestItem, Header } from '../interfaces/runtime/index.js';
|
5 | import { Struct } from '@polkadot/types-codec';
|
6 | export interface HeaderValue {
|
7 | digest?: Digest | {
|
8 | logs: DigestItem[] | string[];
|
9 | };
|
10 | extrinsicsRoot?: AnyU8a;
|
11 | number?: AnyNumber;
|
12 | parentHash?: AnyU8a;
|
13 | stateRoot?: AnyU8a;
|
14 | }
|
15 | export interface BlockValue {
|
16 | extrinsics?: AnyU8a[];
|
17 | header?: HeaderValue;
|
18 | }
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 | export declare class GenericBlock extends Struct {
|
25 | constructor(registry: Registry, value?: BlockValue | Uint8Array);
|
26 | /**
|
27 | * @description Encodes a content [[Hash]] for the block
|
28 | */
|
29 | get contentHash(): IU8a;
|
30 | /**
|
31 | * @description The [[Extrinsic]] contained in the block
|
32 | */
|
33 | get extrinsics(): Vec<GenericExtrinsic>;
|
34 | /**
|
35 | * @description Block/header [[Hash]]
|
36 | */
|
37 | get hash(): IU8a;
|
38 | /**
|
39 | * @description The [[Header]] of the block
|
40 | */
|
41 | get header(): Header;
|
42 | }
|