UNPKG

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