UNPKG

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