UNPKG

2.08 kBTypeScriptView Raw
1import type { Bytes } from '@polkadot/types-codec';
2import type { Inspect, Registry } from '@polkadot/types-codec/types';
3import type { HexString } from '@polkadot/util/types';
4import type { BlockHash } from '../../interfaces/chain/index.js';
5import type { ExtrinsicEra } from '../../interfaces/extrinsics/index.js';
6import type { ExtrinsicPayloadValue, ICompact, IKeyringPair, INumber, IOption } from '../../types/index.js';
7import { Struct } from '@polkadot/types-codec';
8/**
9 * @name GenericExtrinsicPayloadV4
10 * @description
11 * A signing payload for an [[Extrinsic]]. For the final encoding, it is
12 * variable length based on the contents included
13 */
14export declare class GenericExtrinsicPayloadV4 extends Struct {
15 #private;
16 constructor(registry: Registry, value?: ExtrinsicPayloadValue | Uint8Array | HexString);
17 /**
18 * @description Returns a breakdown of the hex encoding for this Codec
19 */
20 inspect(): Inspect;
21 /**
22 * @description The block [[BlockHash]] the signature applies to (mortal/immortal)
23 */
24 get blockHash(): BlockHash;
25 /**
26 * @description The [[ExtrinsicEra]]
27 */
28 get era(): ExtrinsicEra;
29 /**
30 * @description The genesis [[BlockHash]] the signature applies to (mortal/immortal)
31 */
32 get genesisHash(): BlockHash;
33 /**
34 * @description The [[Bytes]] contained in the payload
35 */
36 get method(): Bytes;
37 /**
38 * @description The [[Index]]
39 */
40 get nonce(): ICompact<INumber>;
41 /**
42 * @description The specVersion for this signature
43 */
44 get specVersion(): INumber;
45 /**
46 * @description The tip [[Balance]]
47 */
48 get tip(): ICompact<INumber>;
49 /**
50 * @description The transactionVersion for this signature
51 */
52 get transactionVersion(): INumber;
53 /**
54 * @description The (optional) asset id for this signature for chains that support transaction fees in assets
55 */
56 get assetId(): IOption<INumber>;
57 /**
58 * @description Sign the payload with the keypair
59 */
60 sign(signerPair: IKeyringPair): Uint8Array;
61}