1 | import type { Call, ExtrinsicEra, Hash, MultiLocation } from '@polkadot/types/interfaces';
|
2 | import type { AnyNumber, AnyU8a, ICompact, IExtrinsicEra, INumber, IOption, Registry } from '@polkadot/types/types';
|
3 | import type { AnyTuple, IMethod } from '@polkadot/types-codec/types';
|
4 | import type { HexString } from '@polkadot/util/types';
|
5 | import { Struct } from '@polkadot/types-codec';
|
6 | interface TransactionExtensionValues {
|
7 | era: AnyU8a | IExtrinsicEra;
|
8 | nonce: AnyNumber;
|
9 | tip: AnyNumber;
|
10 | transactionVersion: AnyNumber;
|
11 | assetId?: HexString;
|
12 | mode?: AnyNumber;
|
13 | metadataHash?: AnyU8a;
|
14 | }
|
15 | interface GeneralExtrinsicPayloadValues extends TransactionExtensionValues {
|
16 | method: AnyU8a | IMethod<AnyTuple>;
|
17 | }
|
18 | interface GeneralExtrinsicValue {
|
19 | payload?: GeneralExtrinsicPayloadValues;
|
20 | transactionExtensionVersion?: number;
|
21 | }
|
22 | export declare class GeneralExtrinsic extends Struct {
|
23 | #private;
|
24 | constructor(registry: Registry, value?: GeneralExtrinsicValue | Uint8Array | HexString, opt?: {
|
25 | version: number;
|
26 | });
|
27 | static decodeExtrinsic(registry: Registry, value?: GeneralExtrinsicValue | Uint8Array | HexString): object;
|
28 | /**
|
29 | * @description The length of the value when encoded as a Uint8Array
|
30 | */
|
31 | get encodedLength(): number;
|
32 | /**
|
33 | * @description The [[ExtrinsicEra]]
|
34 | */
|
35 | get era(): ExtrinsicEra;
|
36 | /**
|
37 | * @description The [[Index]]
|
38 | */
|
39 | get nonce(): ICompact<INumber>;
|
40 | /**
|
41 | * @description The tip [[Balance]]
|
42 | */
|
43 | get tip(): ICompact<INumber>;
|
44 | /**
|
45 | * @description The (optional) asset id for this signature for chains that support transaction fees in assets
|
46 | */
|
47 | get assetId(): IOption<INumber | MultiLocation>;
|
48 | /**
|
49 | * @description The mode used for the CheckMetadataHash TransactionExtension
|
50 | */
|
51 | get mode(): INumber;
|
52 | /**
|
53 | * @description The (optional) [[Hash]] for the metadata proof
|
54 | */
|
55 | get metadataHash(): IOption<Hash>;
|
56 | /**
|
57 | * @description The version of the TransactionExtensions used in this extrinsic
|
58 | */
|
59 | get transactionExtensionVersion(): INumber;
|
60 | /**
|
61 | * @description The [[Call]] this extrinsic wraps
|
62 | */
|
63 | get method(): Call;
|
64 | /**
|
65 | * @description The extrinsic's version
|
66 | */
|
67 | get version(): number;
|
68 | /**
|
69 | * @description The [[Preamble]] for the extrinsic
|
70 | */
|
71 | get preamble(): number;
|
72 | toHex(isBare?: boolean): HexString;
|
73 | toU8a(isBare?: boolean): Uint8Array;
|
74 | toRawType(): string;
|
75 | /**
|
76 | *
|
77 | * @description Returns an encoded GeneralExtrinsic
|
78 | */
|
79 | encode(): Uint8Array;
|
80 | signFake(): void;
|
81 | addSignature(): void;
|
82 | sign(): void;
|
83 | signature(): void;
|
84 | }
|
85 | export {};
|