UNPKG

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