UNPKG

1.72 kBTypeScriptView Raw
1import type { Registry } from '@polkadot/types-codec/types';
2import type { HexString } from '@polkadot/util/types';
3import type { Address, Call, ExtrinsicEra, Hash } from '../interfaces';
4import type { Codec, ICompact, INumber, IRuntimeVersion, ISignerPayload, SignerPayloadJSON, SignerPayloadRaw } from '../types';
5import { Struct, Text, Vec } from '@polkadot/types-codec';
6export interface SignerPayloadType extends Codec {
7 address: Address;
8 blockHash: Hash;
9 blockNumber: INumber;
10 era: ExtrinsicEra;
11 genesisHash: Hash;
12 method: Call;
13 nonce: ICompact<INumber>;
14 runtimeVersion: IRuntimeVersion;
15 signedExtensions: Vec<Text>;
16 tip: ICompact<INumber>;
17 version: INumber;
18}
19/**
20 * @name GenericSignerPayload
21 * @description
22 * A generic signer payload that can be used for serialization between API and signer
23 */
24export declare class GenericSignerPayload extends Struct implements ISignerPayload, SignerPayloadType {
25 #private;
26 constructor(registry: Registry, value?: HexString | {
27 [x: string]: unknown;
28 } | Map<unknown, unknown> | unknown[]);
29 get address(): Address;
30 get blockHash(): Hash;
31 get blockNumber(): INumber;
32 get era(): ExtrinsicEra;
33 get genesisHash(): Hash;
34 get method(): Call;
35 get nonce(): ICompact<INumber>;
36 get runtimeVersion(): IRuntimeVersion;
37 get signedExtensions(): Vec<Text>;
38 get tip(): ICompact<INumber>;
39 get version(): INumber;
40 /**
41 * @description Creates an representation of the structure as an ISignerPayload JSON
42 */
43 toPayload(): SignerPayloadJSON;
44 /**
45 * @description Creates a representation of the payload in raw Exrinsic form
46 */
47 toRaw(): SignerPayloadRaw;
48}