@novasamatech/host-api 0.5.0-16 → 0.5.0-18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/dist/commonEncoders.d.ts +0 -7
  2. package/dist/commonEncoders.js +1 -7
  3. package/dist/createTransport.js +1 -1
  4. package/dist/index.d.ts +1 -1
  5. package/dist/interactions/accounts.js +2 -1
  6. package/dist/interactions/commonCodecs.d.ts +7 -0
  7. package/dist/interactions/commonCodecs.js +8 -0
  8. package/dist/interactions/features.d.ts +2 -2
  9. package/dist/interactions/features.js +2 -2
  10. package/dist/interactions/message.d.ts +1704 -0
  11. package/dist/interactions/message.js +60 -0
  12. package/dist/interactions/papiProvider.d.ts +2 -2
  13. package/dist/interactions/papiProvider.js +3 -2
  14. package/dist/interactions/sign.d.ts +20 -3
  15. package/dist/interactions/sign.js +1 -42
  16. package/dist/interactions/types.d.ts +1 -0
  17. package/dist/interactions/types.js +1 -0
  18. package/dist/interactions/v1/accounts.d.ts +128 -0
  19. package/dist/interactions/v1/accounts.js +51 -0
  20. package/dist/interactions/v1/chat.d.ts +295 -0
  21. package/dist/interactions/v1/chat.js +73 -0
  22. package/dist/interactions/v1/createTransaction.d.ts +197 -0
  23. package/dist/interactions/v1/createTransaction.js +41 -0
  24. package/dist/interactions/v1/feature.d.ts +11 -0
  25. package/dist/interactions/v1/feature.js +7 -0
  26. package/dist/interactions/v1/handshake.d.ts +28 -0
  27. package/dist/interactions/v1/handshake.js +12 -0
  28. package/dist/interactions/v1/jsonRpc.d.ts +6 -0
  29. package/dist/interactions/v1/jsonRpc.js +6 -0
  30. package/dist/interactions/v1/permission.d.ts +48 -0
  31. package/dist/interactions/v1/permission.js +18 -0
  32. package/dist/interactions/v1/sign.d.ts +92 -0
  33. package/dist/interactions/v1/sign.js +43 -0
  34. package/dist/interactions/v1/statementStore.d.ts +118 -0
  35. package/dist/interactions/v1/statementStore.js +47 -0
  36. package/dist/interactions/v1/storage.d.ts +41 -0
  37. package/dist/interactions/v1/storage.js +16 -0
  38. package/dist/messageEncoder.d.ts +68 -107
  39. package/dist/messageEncoder.js +11 -14
  40. package/package.json +1 -1
@@ -0,0 +1,73 @@
1
+ import { Enum, Option, Result, Struct, Vector, _void, str, u64 } from 'scale-ts';
2
+ import { GenericErr } from '../commonCodecs.js';
3
+ // contact
4
+ export const ChatContactRegistrationErr = Enum({
5
+ Unknown: GenericErr,
6
+ });
7
+ export const ChatContact = Struct({
8
+ name: str,
9
+ icon: str, // url or base64 encoded image for contact
10
+ });
11
+ export const ChatCreateContactV1_request = ChatContact;
12
+ export const ChatCreateContactV1_response = Result(_void, ChatContactRegistrationErr);
13
+ // message format
14
+ export const ChatAction = Struct({
15
+ actionId: str,
16
+ title: str,
17
+ });
18
+ export const ChatActionLayout = Enum({
19
+ Column: _void,
20
+ Grid: _void,
21
+ });
22
+ export const ChatActions = Struct({
23
+ text: Option(str),
24
+ actions: Vector(ChatAction),
25
+ layout: ChatActionLayout,
26
+ });
27
+ export const ChatMedia = Struct({
28
+ url: str,
29
+ });
30
+ export const ChatRichText = Struct({
31
+ text: Option(str),
32
+ media: Vector(ChatMedia),
33
+ });
34
+ export const ChatFile = Struct({
35
+ url: str,
36
+ fileName: str,
37
+ mimeType: str,
38
+ sizeBytes: u64,
39
+ text: Option(str),
40
+ });
41
+ export const ChatReaction = Struct({
42
+ messageId: str,
43
+ emoji: str,
44
+ });
45
+ export const ChatMessage = Enum({
46
+ Text: str,
47
+ Actions: ChatActions,
48
+ RichText: ChatMedia,
49
+ File: ChatFile,
50
+ Reaction: ChatReaction,
51
+ ReactionRemoved: ChatReaction,
52
+ });
53
+ // sending message
54
+ export const ChatMessagePostingErr = Enum({
55
+ OverflowMessageSize: _void,
56
+ Unknown: GenericErr,
57
+ });
58
+ export const ChatPostMessageResult = Struct({
59
+ messageId: str,
60
+ });
61
+ export const ChatPostMessageV1_request = ChatMessage;
62
+ export const ChatPostMessageV1_response = Result(ChatPostMessageResult, ChatMessagePostingErr);
63
+ // receiving message
64
+ export const ActionTrigger = Struct({
65
+ messageId: str,
66
+ actionId: str,
67
+ });
68
+ export const ReceivedChatAction = Enum({
69
+ MessagePosted: ChatMessage,
70
+ ActionTriggered: ActionTrigger,
71
+ });
72
+ export const ChatActionSubscribeV1_start = _void;
73
+ export const ChatActionSubscribeV1_receive = ReceivedChatAction;
@@ -0,0 +1,197 @@
1
+ import type { HexString } from '../types.js';
2
+ /**
3
+ * createTransaction implementation
4
+ * @see https://github.com/polkadot-js/api/issues/6213
5
+ */
6
+ export declare const CreateTransactionErr: import("scale-ts").Codec<{
7
+ tag: "Rejected";
8
+ value: undefined;
9
+ } | {
10
+ tag: "Unknown";
11
+ value: {
12
+ reason: string;
13
+ };
14
+ } | {
15
+ tag: "FailedToDecode";
16
+ value: undefined;
17
+ } | {
18
+ tag: "NotSupported";
19
+ value: string;
20
+ }>;
21
+ export declare const TxPayloadExtensionV1: import("scale-ts").Codec<{
22
+ id: string;
23
+ extra: `0x${string}`;
24
+ additionalSigned: `0x${string}`;
25
+ }>;
26
+ export declare const TxPayloadContextV1: import("scale-ts").Codec<{
27
+ metadata: `0x${string}`;
28
+ tokenSymbol: string;
29
+ tokenDecimals: number;
30
+ bestBlockHeight: number;
31
+ }>;
32
+ export declare const TxPayloadV1: import("scale-ts").Codec<{
33
+ signer: string | null;
34
+ callData: `0x${string}`;
35
+ extensions: {
36
+ id: string;
37
+ extra: `0x${string}`;
38
+ additionalSigned: `0x${string}`;
39
+ }[];
40
+ txExtVersion: number;
41
+ context: {
42
+ metadata: `0x${string}`;
43
+ tokenSymbol: string;
44
+ tokenDecimals: number;
45
+ bestBlockHeight: number;
46
+ };
47
+ }>;
48
+ export declare const VersionedTxPayload: import("scale-ts").Codec<{
49
+ tag: "v1";
50
+ value: {
51
+ signer: string | null;
52
+ callData: `0x${string}`;
53
+ extensions: {
54
+ id: string;
55
+ extra: `0x${string}`;
56
+ additionalSigned: `0x${string}`;
57
+ }[];
58
+ txExtVersion: number;
59
+ context: {
60
+ metadata: `0x${string}`;
61
+ tokenSymbol: string;
62
+ tokenDecimals: number;
63
+ bestBlockHeight: number;
64
+ };
65
+ };
66
+ }>;
67
+ export declare const CreateTransactionV1_request: import("scale-ts").Codec<[[string, number], {
68
+ tag: "v1";
69
+ value: {
70
+ signer: string | null;
71
+ callData: `0x${string}`;
72
+ extensions: {
73
+ id: string;
74
+ extra: `0x${string}`;
75
+ additionalSigned: `0x${string}`;
76
+ }[];
77
+ txExtVersion: number;
78
+ context: {
79
+ metadata: `0x${string}`;
80
+ tokenSymbol: string;
81
+ tokenDecimals: number;
82
+ bestBlockHeight: number;
83
+ };
84
+ };
85
+ }]>;
86
+ export declare const CreateTransactionV1_response: import("scale-ts").Codec<import("scale-ts").ResultPayload<Uint8Array<ArrayBufferLike>, {
87
+ tag: "Rejected";
88
+ value: undefined;
89
+ } | {
90
+ tag: "Unknown";
91
+ value: {
92
+ reason: string;
93
+ };
94
+ } | {
95
+ tag: "FailedToDecode";
96
+ value: undefined;
97
+ } | {
98
+ tag: "NotSupported";
99
+ value: string;
100
+ }>>;
101
+ export declare const CreateTransactionWithNonProductAccountV1_request: import("scale-ts").Codec<[Uint8Array<ArrayBufferLike>, {
102
+ tag: "v1";
103
+ value: {
104
+ signer: string | null;
105
+ callData: `0x${string}`;
106
+ extensions: {
107
+ id: string;
108
+ extra: `0x${string}`;
109
+ additionalSigned: `0x${string}`;
110
+ }[];
111
+ txExtVersion: number;
112
+ context: {
113
+ metadata: `0x${string}`;
114
+ tokenSymbol: string;
115
+ tokenDecimals: number;
116
+ bestBlockHeight: number;
117
+ };
118
+ };
119
+ }]>;
120
+ export declare const CreateTransactionWithNonProductAccountV1_response: import("scale-ts").Codec<import("scale-ts").ResultPayload<Uint8Array<ArrayBufferLike>, {
121
+ tag: "Rejected";
122
+ value: undefined;
123
+ } | {
124
+ tag: "Unknown";
125
+ value: {
126
+ reason: string;
127
+ };
128
+ } | {
129
+ tag: "FailedToDecode";
130
+ value: undefined;
131
+ } | {
132
+ tag: "NotSupported";
133
+ value: string;
134
+ }>>;
135
+ export interface TxPayloadV1Interface {
136
+ /** Payload version. MUST be 1. */
137
+ version: 1;
138
+ /**
139
+ * Signer selection hint. Allows the implementer to identify which private-key / scheme to use.
140
+ * - Use a wallet-defined handle (e.g., address/SS58, account-name, etc). This identifier
141
+ * was previously made available to the consumer.
142
+ * - Set `null` to let the implementer pick the signer (or if the signer is implied).
143
+ */
144
+ signer: string | null;
145
+ /**
146
+ * SCALE-encoded Call (module indicator + function indicator + params).
147
+ */
148
+ callData: HexString;
149
+ /**
150
+ * Transaction extensions supplied by the caller (order irrelevant).
151
+ * The consumer SHOULD provide every extension that is relevant to them.
152
+ * The implementer MAY infer missing ones.
153
+ */
154
+ extensions: Array<{
155
+ /** Identifier as defined in metadata (e.g., "CheckSpecVersion", "ChargeAssetTxPayment"). */
156
+ id: string;
157
+ /**
158
+ * Explicit "extra" to sign (goes into the extrinsic body).
159
+ * SCALE-encoded per the extension's "extra" type as defined in the metadata.
160
+ */
161
+ extra: HexString;
162
+ /**
163
+ * "Implicit" data to sign (known by the chain, not included into the extrinsic body).
164
+ * SCALE-encoded per the extension's "additionalSigned" type as defined in the metadata.
165
+ */
166
+ additionalSigned: HexString;
167
+ }>;
168
+ /**
169
+ * Transaction Extension Version.
170
+ * - For Extrinsic V4 MUST be 0.
171
+ * - For Extrinsic V5, set to any version supported by the runtime.
172
+ * The implementer:
173
+ * - MUST use this field to determine the required extensions for creating the extrinsic.
174
+ * - MAY use this field to infer missing extensions that the implementer could know how to handle.
175
+ */
176
+ txExtVersion: number;
177
+ /**
178
+ * Context needed for decoding, display, and (optionally) inferring certain extensions.
179
+ */
180
+ context: {
181
+ /**
182
+ * RuntimeMetadataPrefixed blob (SCALE), starting with ASCII "meta" magic (`0x6d657461`),
183
+ * then a metadata version (V14+). For V5+ versioned extensions, MUST provide V16+.
184
+ */
185
+ metadata: HexString;
186
+ /**
187
+ * Native token display info (used by some implementers), also needed to compute
188
+ * the `CheckMetadataHash` value.
189
+ */
190
+ tokenSymbol: string;
191
+ tokenDecimals: number;
192
+ /**
193
+ * Highest known block number to aid mortality UX.
194
+ */
195
+ bestBlockHeight: number;
196
+ };
197
+ }
@@ -0,0 +1,41 @@
1
+ import { Bytes, Enum, Result, Struct, Tuple, Vector, _void, str, u32, u8 } from 'scale-ts';
2
+ import { GenericErr, Hex, Nullable } from '../commonCodecs.js';
3
+ import { AccountId, ProductAccountId } from './accounts.js';
4
+ /**
5
+ * createTransaction implementation
6
+ * @see https://github.com/polkadot-js/api/issues/6213
7
+ */
8
+ export const CreateTransactionErr = Enum({
9
+ FailedToDecode: _void,
10
+ Rejected: _void,
11
+ // Unsupported payload version
12
+ // Failed to infer missing extensions, some extension is unsupported, etc.
13
+ NotSupported: str,
14
+ Unknown: GenericErr,
15
+ });
16
+ export const TxPayloadExtensionV1 = Struct({
17
+ id: str,
18
+ extra: Hex(),
19
+ additionalSigned: Hex(),
20
+ });
21
+ export const TxPayloadContextV1 = Struct({
22
+ metadata: Hex(),
23
+ tokenSymbol: str,
24
+ tokenDecimals: u32,
25
+ bestBlockHeight: u32,
26
+ });
27
+ export const TxPayloadV1 = Struct({
28
+ signer: Nullable(str),
29
+ callData: Hex(),
30
+ extensions: Vector(TxPayloadExtensionV1),
31
+ txExtVersion: u8,
32
+ context: TxPayloadContextV1,
33
+ });
34
+ export const VersionedTxPayload = Enum({
35
+ v1: TxPayloadV1,
36
+ });
37
+ // transaction in context of host api account model
38
+ export const CreateTransactionV1_request = Tuple(ProductAccountId, VersionedTxPayload);
39
+ export const CreateTransactionV1_response = Result(Bytes(), CreateTransactionErr);
40
+ export const CreateTransactionWithNonProductAccountV1_request = Tuple(AccountId, VersionedTxPayload);
41
+ export const CreateTransactionWithNonProductAccountV1_response = Result(Bytes(), CreateTransactionErr);
@@ -0,0 +1,11 @@
1
+ export declare const Feature: import("scale-ts").Codec<{
2
+ tag: "chain";
3
+ value: `0x${string}`;
4
+ }>;
5
+ export declare const FeatureV1_request: import("scale-ts").Codec<{
6
+ tag: "chain";
7
+ value: `0x${string}`;
8
+ }>;
9
+ export declare const FeatureV1_response: import("scale-ts").Codec<import("scale-ts").ResultPayload<boolean, {
10
+ reason: string;
11
+ }>>;
@@ -0,0 +1,7 @@
1
+ import { Enum, Result, bool } from 'scale-ts';
2
+ import { GenericErr, Hex } from '../commonCodecs.js';
3
+ export const Feature = Enum({
4
+ chain: Hex(),
5
+ });
6
+ export const FeatureV1_request = Feature;
7
+ export const FeatureV1_response = Result(bool, GenericErr);
@@ -0,0 +1,28 @@
1
+ export declare const HandshakeErr: import("scale-ts").Codec<{
2
+ tag: "Unknown";
3
+ value: {
4
+ reason: string;
5
+ };
6
+ } | {
7
+ tag: "Timeout";
8
+ value: undefined;
9
+ } | {
10
+ tag: "UnsupportedProtocolVersion";
11
+ value: undefined;
12
+ }>;
13
+ /**
14
+ * HandshakeV1_request = 1 - JAM codec
15
+ */
16
+ export declare const HandshakeV1_request: import("scale-ts").Codec<number>;
17
+ export declare const HandshakeV1_response: import("scale-ts").Codec<import("scale-ts").ResultPayload<undefined, {
18
+ tag: "Unknown";
19
+ value: {
20
+ reason: string;
21
+ };
22
+ } | {
23
+ tag: "Timeout";
24
+ value: undefined;
25
+ } | {
26
+ tag: "UnsupportedProtocolVersion";
27
+ value: undefined;
28
+ }>>;
@@ -0,0 +1,12 @@
1
+ import { Enum, Result, _void, u8 } from 'scale-ts';
2
+ import { GenericErr } from '../commonCodecs.js';
3
+ export const HandshakeErr = Enum({
4
+ Timeout: _void,
5
+ UnsupportedProtocolVersion: _void,
6
+ Unknown: GenericErr,
7
+ });
8
+ /**
9
+ * HandshakeV1_request = 1 - JAM codec
10
+ */
11
+ export const HandshakeV1_request = u8;
12
+ export const HandshakeV1_response = Result(_void, HandshakeErr);
@@ -0,0 +1,6 @@
1
+ export declare const JsonRpcMessageSendV1_request: import("scale-ts").Codec<[`0x${string}`, string]>;
2
+ export declare const JsonRpcMessageSendV1_response: import("scale-ts").Codec<import("scale-ts").ResultPayload<undefined, {
3
+ reason: string;
4
+ }>>;
5
+ export declare const JsonRpcMessageSubscribeV1_start: import("scale-ts").Codec<`0x${string}`>;
6
+ export declare const JsonRpcMessageSubscribeV1_receive: import("scale-ts").Codec<string>;
@@ -0,0 +1,6 @@
1
+ import { Result, Tuple, _void, str } from 'scale-ts';
2
+ import { GenericErr, GenesisHash } from '../commonCodecs.js';
3
+ export const JsonRpcMessageSendV1_request = Tuple(GenesisHash, str);
4
+ export const JsonRpcMessageSendV1_response = Result(_void, GenericErr);
5
+ export const JsonRpcMessageSubscribeV1_start = GenesisHash;
6
+ export const JsonRpcMessageSubscribeV1_receive = str;
@@ -0,0 +1,48 @@
1
+ export declare const PermissionErr: import("scale-ts").Codec<{
2
+ tag: "Rejected";
3
+ value: undefined;
4
+ } | {
5
+ tag: "Unknown";
6
+ value: {
7
+ reason: string;
8
+ };
9
+ }>;
10
+ export declare const ChainConnectPermission: import("scale-ts").Codec<{
11
+ genesisHash: `0x${string}`;
12
+ name: string;
13
+ }>;
14
+ export declare const Permission: import("scale-ts").Codec<{
15
+ tag: "ChainSubmit";
16
+ value: `0x${string}`;
17
+ } | {
18
+ tag: "ChainConnect";
19
+ value: {
20
+ genesisHash: `0x${string}`;
21
+ name: string;
22
+ };
23
+ } | {
24
+ tag: "NetworkRequest";
25
+ value: string[];
26
+ }>;
27
+ export declare const PermissionRequestV1_request: import("scale-ts").Codec<{
28
+ tag: "ChainSubmit";
29
+ value: `0x${string}`;
30
+ } | {
31
+ tag: "ChainConnect";
32
+ value: {
33
+ genesisHash: `0x${string}`;
34
+ name: string;
35
+ };
36
+ } | {
37
+ tag: "NetworkRequest";
38
+ value: string[];
39
+ }>;
40
+ export declare const PermissionRequestV1_response: import("scale-ts").Codec<import("scale-ts").ResultPayload<undefined, {
41
+ tag: "Rejected";
42
+ value: undefined;
43
+ } | {
44
+ tag: "Unknown";
45
+ value: {
46
+ reason: string;
47
+ };
48
+ }>>;
@@ -0,0 +1,18 @@
1
+ import { Enum, Result, Struct, Vector, _void, str } from 'scale-ts';
2
+ import { GenericErr, Hex } from '../commonCodecs.js';
3
+ export const PermissionErr = Enum({
4
+ Rejected: _void,
5
+ Unknown: GenericErr,
6
+ });
7
+ export const ChainConnectPermission = Struct({
8
+ genesisHash: Hex(),
9
+ name: str,
10
+ });
11
+ export const Permission = Enum({
12
+ ChainSubmit: Hex(),
13
+ ChainConnect: ChainConnectPermission,
14
+ NetworkRequest: Vector(str),
15
+ // TBD
16
+ });
17
+ export const PermissionRequestV1_request = Permission;
18
+ export const PermissionRequestV1_response = Result(_void, PermissionErr);
@@ -0,0 +1,92 @@
1
+ export declare const SigningErr: import("scale-ts").Codec<{
2
+ tag: "Rejected";
3
+ value: undefined;
4
+ } | {
5
+ tag: "Unknown";
6
+ value: {
7
+ reason: string;
8
+ };
9
+ } | {
10
+ tag: "FailedToDecode";
11
+ value: undefined;
12
+ }>;
13
+ export declare const SigningResult: import("scale-ts").Codec<{
14
+ signature: `0x${string}`;
15
+ signedTransaction: `0x${string}` | undefined;
16
+ }>;
17
+ export declare const SignRawV1_request: import("scale-ts").Codec<{
18
+ address: string;
19
+ data: {
20
+ tag: "Bytes";
21
+ value: Uint8Array<ArrayBufferLike>;
22
+ } | {
23
+ tag: "Payload";
24
+ value: string;
25
+ };
26
+ }>;
27
+ export declare const SignRawV1_response: import("scale-ts").Codec<import("scale-ts").ResultPayload<{
28
+ signature: `0x${string}`;
29
+ signedTransaction: `0x${string}` | undefined;
30
+ }, {
31
+ tag: "Rejected";
32
+ value: undefined;
33
+ } | {
34
+ tag: "Unknown";
35
+ value: {
36
+ reason: string;
37
+ };
38
+ } | {
39
+ tag: "FailedToDecode";
40
+ value: undefined;
41
+ }>>;
42
+ export declare const SigningPayload: import("scale-ts").Codec<{
43
+ address: string;
44
+ blockHash: `0x${string}`;
45
+ blockNumber: `0x${string}`;
46
+ era: `0x${string}`;
47
+ genesisHash: `0x${string}`;
48
+ method: `0x${string}`;
49
+ nonce: `0x${string}`;
50
+ specVersion: `0x${string}`;
51
+ tip: `0x${string}`;
52
+ transactionVersion: `0x${string}`;
53
+ signedExtensions: string[];
54
+ version: number;
55
+ assetId: `0x${string}` | undefined;
56
+ metadataHash: `0x${string}` | undefined;
57
+ mode: number | undefined;
58
+ withSignedTransaction: boolean | undefined;
59
+ }>;
60
+ export declare const SignPayloadV1_request: import("scale-ts").Codec<{
61
+ address: string;
62
+ blockHash: `0x${string}`;
63
+ blockNumber: `0x${string}`;
64
+ era: `0x${string}`;
65
+ genesisHash: `0x${string}`;
66
+ method: `0x${string}`;
67
+ nonce: `0x${string}`;
68
+ specVersion: `0x${string}`;
69
+ tip: `0x${string}`;
70
+ transactionVersion: `0x${string}`;
71
+ signedExtensions: string[];
72
+ version: number;
73
+ assetId: `0x${string}` | undefined;
74
+ metadataHash: `0x${string}` | undefined;
75
+ mode: number | undefined;
76
+ withSignedTransaction: boolean | undefined;
77
+ }>;
78
+ export declare const SignPayloadV1_response: import("scale-ts").Codec<import("scale-ts").ResultPayload<{
79
+ signature: `0x${string}`;
80
+ signedTransaction: `0x${string}` | undefined;
81
+ }, {
82
+ tag: "Rejected";
83
+ value: undefined;
84
+ } | {
85
+ tag: "Unknown";
86
+ value: {
87
+ reason: string;
88
+ };
89
+ } | {
90
+ tag: "FailedToDecode";
91
+ value: undefined;
92
+ }>>;
@@ -0,0 +1,43 @@
1
+ import { Bytes, Enum, Option, Result, Struct, Vector, _void, bool, str, u32 } from 'scale-ts';
2
+ import { GenericErr, GenesisHash, Hex } from '../commonCodecs.js';
3
+ // common structures
4
+ export const SigningErr = Enum({
5
+ FailedToDecode: _void,
6
+ Rejected: _void,
7
+ Unknown: GenericErr,
8
+ });
9
+ export const SigningResult = Struct({
10
+ signature: Hex(),
11
+ signedTransaction: Option(Hex()),
12
+ });
13
+ // sign raw
14
+ const SigningRawPayload = Struct({
15
+ address: str,
16
+ data: Enum({
17
+ Bytes: Bytes(),
18
+ Payload: str,
19
+ }),
20
+ });
21
+ export const SignRawV1_request = SigningRawPayload;
22
+ export const SignRawV1_response = Result(SigningResult, SigningErr);
23
+ // sign payload
24
+ export const SigningPayload = Struct({
25
+ address: str,
26
+ blockHash: Hex(),
27
+ blockNumber: Hex(),
28
+ era: Hex(),
29
+ genesisHash: GenesisHash,
30
+ method: Hex(),
31
+ nonce: Hex(),
32
+ specVersion: Hex(),
33
+ tip: Hex(),
34
+ transactionVersion: Hex(),
35
+ signedExtensions: Vector(str),
36
+ version: u32,
37
+ assetId: Option(Hex()),
38
+ metadataHash: Option(Hex()),
39
+ mode: Option(u32),
40
+ withSignedTransaction: Option(bool),
41
+ });
42
+ export const SignPayloadV1_request = SigningPayload;
43
+ export const SignPayloadV1_response = Result(SigningResult, SigningErr);