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

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 (76) hide show
  1. package/README.md +103 -1
  2. package/dist/constants.d.ts +2 -0
  3. package/dist/constants.js +2 -0
  4. package/dist/helpers.d.ts +33 -0
  5. package/dist/helpers.js +46 -0
  6. package/dist/hostApi.d.ts +31 -0
  7. package/dist/hostApi.js +345 -0
  8. package/dist/index.d.ts +18 -7
  9. package/dist/index.js +14 -6
  10. package/dist/protocol/commonCodecs.d.ts +42 -0
  11. package/dist/protocol/commonCodecs.js +64 -0
  12. package/dist/protocol/commonCodecs.spec.js +72 -0
  13. package/dist/protocol/impl.d.ts +93 -0
  14. package/dist/protocol/impl.js +97 -0
  15. package/dist/protocol/messageCodec.d.ts +1245 -0
  16. package/dist/protocol/messageCodec.js +24 -0
  17. package/dist/protocol/types.js +1 -0
  18. package/dist/protocol/v1/accounts.d.ts +265 -0
  19. package/dist/{interactions → protocol}/v1/accounts.js +11 -11
  20. package/dist/{interactions → protocol}/v1/chat.d.ts +129 -83
  21. package/dist/{interactions → protocol}/v1/chat.js +12 -14
  22. package/dist/{interactions → protocol}/v1/createTransaction.d.ts +119 -78
  23. package/dist/protocol/v1/createTransaction.js +58 -0
  24. package/dist/{interactions → protocol}/v1/feature.d.ts +8 -4
  25. package/dist/protocol/v1/feature.js +7 -0
  26. package/dist/protocol/v1/handshake.d.ts +85 -0
  27. package/dist/protocol/v1/handshake.js +12 -0
  28. package/dist/{interactions → protocol}/v1/jsonRpc.d.ts +6 -2
  29. package/dist/{interactions → protocol}/v1/jsonRpc.js +2 -2
  30. package/dist/protocol/v1/permission.d.ts +90 -0
  31. package/dist/protocol/v1/permission.js +18 -0
  32. package/dist/protocol/v1/sign.d.ts +152 -0
  33. package/dist/{interactions → protocol}/v1/sign.js +6 -6
  34. package/dist/{interactions → protocol}/v1/statementStore.d.ts +77 -20
  35. package/dist/{interactions → protocol}/v1/statementStore.js +6 -6
  36. package/dist/protocol/v1/storage.d.ts +87 -0
  37. package/dist/{interactions → protocol}/v1/storage.js +5 -5
  38. package/dist/provider.d.ts +8 -0
  39. package/dist/provider.js +1 -0
  40. package/dist/transport.d.ts +3 -0
  41. package/dist/transport.js +248 -0
  42. package/dist/types.d.ts +15 -15
  43. package/package.json +2 -4
  44. package/dist/commonEncoders.d.ts +0 -2
  45. package/dist/commonEncoders.js +0 -8
  46. package/dist/createTransport.d.ts +0 -6
  47. package/dist/createTransport.js +0 -183
  48. package/dist/createTransportEncoder.d.ts +0 -7
  49. package/dist/createTransportEncoder.js +0 -5
  50. package/dist/interactions/accounts.d.ts +0 -12
  51. package/dist/interactions/accounts.js +0 -40
  52. package/dist/interactions/commonCodecs.d.ts +0 -7
  53. package/dist/interactions/commonCodecs.js +0 -8
  54. package/dist/interactions/features.d.ts +0 -13
  55. package/dist/interactions/features.js +0 -13
  56. package/dist/interactions/handshake.d.ts +0 -2
  57. package/dist/interactions/handshake.js +0 -3
  58. package/dist/interactions/message.d.ts +0 -1704
  59. package/dist/interactions/message.js +0 -60
  60. package/dist/interactions/papiProvider.d.ts +0 -8
  61. package/dist/interactions/papiProvider.js +0 -10
  62. package/dist/interactions/sign.d.ts +0 -118
  63. package/dist/interactions/sign.js +0 -127
  64. package/dist/interactions/v1/accounts.d.ts +0 -128
  65. package/dist/interactions/v1/createTransaction.js +0 -41
  66. package/dist/interactions/v1/feature.js +0 -7
  67. package/dist/interactions/v1/handshake.d.ts +0 -28
  68. package/dist/interactions/v1/handshake.js +0 -12
  69. package/dist/interactions/v1/permission.d.ts +0 -48
  70. package/dist/interactions/v1/permission.js +0 -18
  71. package/dist/interactions/v1/sign.d.ts +0 -92
  72. package/dist/interactions/v1/storage.d.ts +0 -41
  73. package/dist/messageEncoder.d.ts +0 -178
  74. package/dist/messageEncoder.js +0 -34
  75. /package/dist/{interactions/types.js → protocol/commonCodecs.spec.d.ts} +0 -0
  76. /package/dist/{interactions → protocol}/types.d.ts +0 -0
@@ -1,1704 +0,0 @@
1
- import type { Codec, CodecType } from 'scale-ts';
2
- export type MessagePayloadV1Schema = CodecType<typeof MessagePayloadV1>;
3
- export declare const MessagePayloadV1: Codec<{
4
- tag: "handshake_request";
5
- value: number;
6
- } | {
7
- tag: "handshake_response";
8
- value: import("scale-ts").ResultPayload<undefined, {
9
- tag: "Unknown";
10
- value: {
11
- reason: string;
12
- };
13
- } | {
14
- tag: "Timeout";
15
- value: undefined;
16
- } | {
17
- tag: "UnsupportedProtocolVersion";
18
- value: undefined;
19
- }>;
20
- } | {
21
- tag: "feature_request";
22
- value: {
23
- tag: "chain";
24
- value: `0x${string}`;
25
- };
26
- } | {
27
- tag: "feature_response";
28
- value: import("scale-ts").ResultPayload<boolean, {
29
- reason: string;
30
- }>;
31
- } | {
32
- tag: "permission_request_request";
33
- value: {
34
- tag: "ChainSubmit";
35
- value: `0x${string}`;
36
- } | {
37
- tag: "ChainConnect";
38
- value: {
39
- genesisHash: `0x${string}`;
40
- name: string;
41
- };
42
- } | {
43
- tag: "NetworkRequest";
44
- value: string[];
45
- };
46
- } | {
47
- tag: "permission_request_response";
48
- value: import("scale-ts").ResultPayload<undefined, {
49
- tag: "Rejected";
50
- value: undefined;
51
- } | {
52
- tag: "Unknown";
53
- value: {
54
- reason: string;
55
- };
56
- }>;
57
- } | {
58
- tag: "storage_read_request";
59
- value: `0x${string}`;
60
- } | {
61
- tag: "storage_read_response";
62
- value: import("scale-ts").ResultPayload<Uint8Array<ArrayBufferLike> | undefined, {
63
- tag: "Unknown";
64
- value: {
65
- reason: string;
66
- };
67
- } | {
68
- tag: "Full";
69
- value: undefined;
70
- }>;
71
- } | {
72
- tag: "storage_write_request";
73
- value: [`0x${string}`, Uint8Array<ArrayBufferLike>];
74
- } | {
75
- tag: "storage_write_response";
76
- value: import("scale-ts").ResultPayload<undefined, {
77
- tag: "Unknown";
78
- value: {
79
- reason: string;
80
- };
81
- } | {
82
- tag: "Full";
83
- value: undefined;
84
- }>;
85
- } | {
86
- tag: "storage_clear_request";
87
- value: `0x${string}`;
88
- } | {
89
- tag: "storage_clear_response";
90
- value: import("scale-ts").ResultPayload<undefined, {
91
- tag: "Unknown";
92
- value: {
93
- reason: string;
94
- };
95
- } | {
96
- tag: "Full";
97
- value: undefined;
98
- }>;
99
- } | {
100
- tag: "account_get_request";
101
- value: [string, number];
102
- } | {
103
- tag: "account_get_response";
104
- value: import("scale-ts").ResultPayload<{
105
- publicKey: Uint8Array<ArrayBufferLike>;
106
- name: string | undefined;
107
- }, {
108
- tag: "NotConnected";
109
- value: undefined;
110
- } | {
111
- tag: "Rejected";
112
- value: undefined;
113
- } | {
114
- tag: "DomainNotValid";
115
- value: undefined;
116
- } | {
117
- tag: "Unknown";
118
- value: {
119
- reason: string;
120
- };
121
- }>;
122
- } | {
123
- tag: "account_get_alias_request";
124
- value: [string, number];
125
- } | {
126
- tag: "account_get_alias_response";
127
- value: import("scale-ts").ResultPayload<{
128
- context: Uint8Array<ArrayBufferLike>;
129
- alias: Uint8Array<ArrayBufferLike>;
130
- }, {
131
- tag: "NotConnected";
132
- value: undefined;
133
- } | {
134
- tag: "Rejected";
135
- value: undefined;
136
- } | {
137
- tag: "DomainNotValid";
138
- value: undefined;
139
- } | {
140
- tag: "Unknown";
141
- value: {
142
- reason: string;
143
- };
144
- }>;
145
- } | {
146
- tag: "account_create_proof_request";
147
- value: [[string, number], {
148
- genesisHash: `0x${string}`;
149
- ringRootHash: `0x${string}`;
150
- hints: {
151
- palletInstance: number | undefined;
152
- } | undefined;
153
- }, Uint8Array<ArrayBufferLike>];
154
- } | {
155
- tag: "account_create_proof_response";
156
- value: import("scale-ts").ResultPayload<Uint8Array<ArrayBufferLike>, {
157
- tag: "Rejected";
158
- value: undefined;
159
- } | {
160
- tag: "Unknown";
161
- value: {
162
- reason: string;
163
- };
164
- } | {
165
- tag: "RingNotFound";
166
- value: undefined;
167
- }>;
168
- } | {
169
- tag: "get_non_product_accounts_request";
170
- value: undefined;
171
- } | {
172
- tag: "get_non_product_accounts_response";
173
- value: import("scale-ts").ResultPayload<{
174
- publicKey: Uint8Array<ArrayBufferLike>;
175
- name: string | undefined;
176
- }[], {
177
- tag: "NotConnected";
178
- value: undefined;
179
- } | {
180
- tag: "Rejected";
181
- value: undefined;
182
- } | {
183
- tag: "DomainNotValid";
184
- value: undefined;
185
- } | {
186
- tag: "Unknown";
187
- value: {
188
- reason: string;
189
- };
190
- }>;
191
- } | {
192
- tag: "create_transaction_request";
193
- value: [[string, number], {
194
- tag: "v1";
195
- value: {
196
- signer: string | null;
197
- callData: `0x${string}`;
198
- extensions: {
199
- id: string;
200
- extra: `0x${string}`;
201
- additionalSigned: `0x${string}`;
202
- }[];
203
- txExtVersion: number;
204
- context: {
205
- metadata: `0x${string}`;
206
- tokenSymbol: string;
207
- tokenDecimals: number;
208
- bestBlockHeight: number;
209
- };
210
- };
211
- }];
212
- } | {
213
- tag: "create_transaction_response";
214
- value: import("scale-ts").ResultPayload<Uint8Array<ArrayBufferLike>, {
215
- tag: "Rejected";
216
- value: undefined;
217
- } | {
218
- tag: "Unknown";
219
- value: {
220
- reason: string;
221
- };
222
- } | {
223
- tag: "FailedToDecode";
224
- value: undefined;
225
- } | {
226
- tag: "NotSupported";
227
- value: string;
228
- }>;
229
- } | {
230
- tag: "create_transaction_with_non_product_account_request";
231
- value: [Uint8Array<ArrayBufferLike>, {
232
- tag: "v1";
233
- value: {
234
- signer: string | null;
235
- callData: `0x${string}`;
236
- extensions: {
237
- id: string;
238
- extra: `0x${string}`;
239
- additionalSigned: `0x${string}`;
240
- }[];
241
- txExtVersion: number;
242
- context: {
243
- metadata: `0x${string}`;
244
- tokenSymbol: string;
245
- tokenDecimals: number;
246
- bestBlockHeight: number;
247
- };
248
- };
249
- }];
250
- } | {
251
- tag: "create_transaction_with_non_product_account_response";
252
- value: import("scale-ts").ResultPayload<Uint8Array<ArrayBufferLike>, {
253
- tag: "Rejected";
254
- value: undefined;
255
- } | {
256
- tag: "Unknown";
257
- value: {
258
- reason: string;
259
- };
260
- } | {
261
- tag: "FailedToDecode";
262
- value: undefined;
263
- } | {
264
- tag: "NotSupported";
265
- value: string;
266
- }>;
267
- } | {
268
- tag: "sign_raw_request";
269
- value: {
270
- address: string;
271
- data: {
272
- tag: "Bytes";
273
- value: Uint8Array<ArrayBufferLike>;
274
- } | {
275
- tag: "Payload";
276
- value: string;
277
- };
278
- };
279
- } | {
280
- tag: "sign_raw_response";
281
- value: import("scale-ts").ResultPayload<{
282
- signature: `0x${string}`;
283
- signedTransaction: `0x${string}` | undefined;
284
- }, {
285
- tag: "Rejected";
286
- value: undefined;
287
- } | {
288
- tag: "Unknown";
289
- value: {
290
- reason: string;
291
- };
292
- } | {
293
- tag: "FailedToDecode";
294
- value: undefined;
295
- }>;
296
- } | {
297
- tag: "sign_payload_request";
298
- value: {
299
- address: string;
300
- blockHash: `0x${string}`;
301
- blockNumber: `0x${string}`;
302
- era: `0x${string}`;
303
- genesisHash: `0x${string}`;
304
- method: `0x${string}`;
305
- nonce: `0x${string}`;
306
- specVersion: `0x${string}`;
307
- tip: `0x${string}`;
308
- transactionVersion: `0x${string}`;
309
- signedExtensions: string[];
310
- version: number;
311
- assetId: `0x${string}` | undefined;
312
- metadataHash: `0x${string}` | undefined;
313
- mode: number | undefined;
314
- withSignedTransaction: boolean | undefined;
315
- };
316
- } | {
317
- tag: "sign_payload_response";
318
- value: import("scale-ts").ResultPayload<{
319
- signature: `0x${string}`;
320
- signedTransaction: `0x${string}` | undefined;
321
- }, {
322
- tag: "Rejected";
323
- value: undefined;
324
- } | {
325
- tag: "Unknown";
326
- value: {
327
- reason: string;
328
- };
329
- } | {
330
- tag: "FailedToDecode";
331
- value: undefined;
332
- }>;
333
- } | {
334
- tag: "chat_create_contact_request";
335
- value: {
336
- name: string;
337
- icon: string;
338
- };
339
- } | {
340
- tag: "chat_create_contact_response";
341
- value: import("scale-ts").ResultPayload<undefined, {
342
- tag: "Unknown";
343
- value: {
344
- reason: string;
345
- };
346
- }>;
347
- } | {
348
- tag: "chat_post_message_request";
349
- value: {
350
- tag: "Text";
351
- value: string;
352
- } | {
353
- tag: "Actions";
354
- value: {
355
- text: string | undefined;
356
- actions: {
357
- actionId: string;
358
- title: string;
359
- }[];
360
- layout: {
361
- tag: "Column";
362
- value: undefined;
363
- } | {
364
- tag: "Grid";
365
- value: undefined;
366
- };
367
- };
368
- } | {
369
- tag: "RichText";
370
- value: {
371
- url: string;
372
- };
373
- } | {
374
- tag: "File";
375
- value: {
376
- url: string;
377
- fileName: string;
378
- mimeType: string;
379
- sizeBytes: bigint;
380
- text: string | undefined;
381
- };
382
- } | {
383
- tag: "Reaction";
384
- value: {
385
- messageId: string;
386
- emoji: string;
387
- };
388
- } | {
389
- tag: "ReactionRemoved";
390
- value: {
391
- messageId: string;
392
- emoji: string;
393
- };
394
- };
395
- } | {
396
- tag: "chat_post_message_response";
397
- value: import("scale-ts").ResultPayload<{
398
- messageId: string;
399
- }, {
400
- tag: "Unknown";
401
- value: {
402
- reason: string;
403
- };
404
- } | {
405
- tag: "OverflowMessageSize";
406
- value: undefined;
407
- }>;
408
- } | {
409
- tag: "chat_action_subscribe_start";
410
- value: undefined;
411
- } | {
412
- tag: "chat_action_subscribe_stop";
413
- value: undefined;
414
- } | {
415
- tag: "chat_action_subscribe_receive";
416
- value: {
417
- tag: "MessagePosted";
418
- value: {
419
- tag: "Text";
420
- value: string;
421
- } | {
422
- tag: "Actions";
423
- value: {
424
- text: string | undefined;
425
- actions: {
426
- actionId: string;
427
- title: string;
428
- }[];
429
- layout: {
430
- tag: "Column";
431
- value: undefined;
432
- } | {
433
- tag: "Grid";
434
- value: undefined;
435
- };
436
- };
437
- } | {
438
- tag: "RichText";
439
- value: {
440
- url: string;
441
- };
442
- } | {
443
- tag: "File";
444
- value: {
445
- url: string;
446
- fileName: string;
447
- mimeType: string;
448
- sizeBytes: bigint;
449
- text: string | undefined;
450
- };
451
- } | {
452
- tag: "Reaction";
453
- value: {
454
- messageId: string;
455
- emoji: string;
456
- };
457
- } | {
458
- tag: "ReactionRemoved";
459
- value: {
460
- messageId: string;
461
- emoji: string;
462
- };
463
- };
464
- } | {
465
- tag: "ActionTriggered";
466
- value: {
467
- messageId: string;
468
- actionId: string;
469
- };
470
- };
471
- } | {
472
- tag: "statement_store_create_proof_request";
473
- value: [[string, number], {
474
- proof: {
475
- tag: "Sr25519";
476
- value: {
477
- signature: Uint8Array<ArrayBufferLike>;
478
- signer: Uint8Array<ArrayBufferLike>;
479
- };
480
- } | {
481
- tag: "Ed25519";
482
- value: {
483
- signature: Uint8Array<ArrayBufferLike>;
484
- signer: Uint8Array<ArrayBufferLike>;
485
- };
486
- } | {
487
- tag: "Ecdsa";
488
- value: {
489
- signature: Uint8Array<ArrayBufferLike>;
490
- signer: Uint8Array<ArrayBufferLike>;
491
- };
492
- } | {
493
- tag: "OnChain";
494
- value: {
495
- who: Uint8Array<ArrayBufferLike>;
496
- blockHash: Uint8Array<ArrayBufferLike>;
497
- event: bigint;
498
- };
499
- } | undefined;
500
- decryptionKey: Uint8Array<ArrayBufferLike> | undefined;
501
- priority: number | undefined;
502
- channel: Uint8Array<ArrayBufferLike> | undefined;
503
- topics: Uint8Array<ArrayBufferLike>[];
504
- data: Uint8Array<ArrayBufferLike> | undefined;
505
- }];
506
- } | {
507
- tag: "statement_store_create_proof_response";
508
- value: import("scale-ts").ResultPayload<{
509
- tag: "Sr25519";
510
- value: {
511
- signature: Uint8Array<ArrayBufferLike>;
512
- signer: Uint8Array<ArrayBufferLike>;
513
- };
514
- } | {
515
- tag: "Ed25519";
516
- value: {
517
- signature: Uint8Array<ArrayBufferLike>;
518
- signer: Uint8Array<ArrayBufferLike>;
519
- };
520
- } | {
521
- tag: "Ecdsa";
522
- value: {
523
- signature: Uint8Array<ArrayBufferLike>;
524
- signer: Uint8Array<ArrayBufferLike>;
525
- };
526
- } | {
527
- tag: "OnChain";
528
- value: {
529
- who: Uint8Array<ArrayBufferLike>;
530
- blockHash: Uint8Array<ArrayBufferLike>;
531
- event: bigint;
532
- };
533
- }, {
534
- tag: "Unknown";
535
- value: {
536
- reason: string;
537
- };
538
- } | {
539
- tag: "UnableToSign";
540
- value: undefined;
541
- } | {
542
- tag: "UnknownAccount";
543
- value: undefined;
544
- }>;
545
- } | {
546
- tag: "jsonrpc_message_send_request";
547
- value: [`0x${string}`, string];
548
- } | {
549
- tag: "jsonrpc_message_send_response";
550
- value: import("scale-ts").ResultPayload<undefined, {
551
- reason: string;
552
- }>;
553
- } | {
554
- tag: "jsonrpc_message_subscribe_start";
555
- value: `0x${string}`;
556
- } | {
557
- tag: "jsonrpc_message_subscribe_stop";
558
- value: undefined;
559
- } | {
560
- tag: "jsonrpc_message_subscribe_receive";
561
- value: string;
562
- }>;
563
- export type MessagePayloadSchema = CodecType<typeof MessagePayload>;
564
- export declare const MessagePayload: Codec<{
565
- tag: "v1";
566
- value: {
567
- tag: "handshake_request";
568
- value: number;
569
- } | {
570
- tag: "handshake_response";
571
- value: import("scale-ts").ResultPayload<undefined, {
572
- tag: "Unknown";
573
- value: {
574
- reason: string;
575
- };
576
- } | {
577
- tag: "Timeout";
578
- value: undefined;
579
- } | {
580
- tag: "UnsupportedProtocolVersion";
581
- value: undefined;
582
- }>;
583
- } | {
584
- tag: "feature_request";
585
- value: {
586
- tag: "chain";
587
- value: `0x${string}`;
588
- };
589
- } | {
590
- tag: "feature_response";
591
- value: import("scale-ts").ResultPayload<boolean, {
592
- reason: string;
593
- }>;
594
- } | {
595
- tag: "permission_request_request";
596
- value: {
597
- tag: "ChainSubmit";
598
- value: `0x${string}`;
599
- } | {
600
- tag: "ChainConnect";
601
- value: {
602
- genesisHash: `0x${string}`;
603
- name: string;
604
- };
605
- } | {
606
- tag: "NetworkRequest";
607
- value: string[];
608
- };
609
- } | {
610
- tag: "permission_request_response";
611
- value: import("scale-ts").ResultPayload<undefined, {
612
- tag: "Rejected";
613
- value: undefined;
614
- } | {
615
- tag: "Unknown";
616
- value: {
617
- reason: string;
618
- };
619
- }>;
620
- } | {
621
- tag: "storage_read_request";
622
- value: `0x${string}`;
623
- } | {
624
- tag: "storage_read_response";
625
- value: import("scale-ts").ResultPayload<Uint8Array<ArrayBufferLike> | undefined, {
626
- tag: "Unknown";
627
- value: {
628
- reason: string;
629
- };
630
- } | {
631
- tag: "Full";
632
- value: undefined;
633
- }>;
634
- } | {
635
- tag: "storage_write_request";
636
- value: [`0x${string}`, Uint8Array<ArrayBufferLike>];
637
- } | {
638
- tag: "storage_write_response";
639
- value: import("scale-ts").ResultPayload<undefined, {
640
- tag: "Unknown";
641
- value: {
642
- reason: string;
643
- };
644
- } | {
645
- tag: "Full";
646
- value: undefined;
647
- }>;
648
- } | {
649
- tag: "storage_clear_request";
650
- value: `0x${string}`;
651
- } | {
652
- tag: "storage_clear_response";
653
- value: import("scale-ts").ResultPayload<undefined, {
654
- tag: "Unknown";
655
- value: {
656
- reason: string;
657
- };
658
- } | {
659
- tag: "Full";
660
- value: undefined;
661
- }>;
662
- } | {
663
- tag: "account_get_request";
664
- value: [string, number];
665
- } | {
666
- tag: "account_get_response";
667
- value: import("scale-ts").ResultPayload<{
668
- publicKey: Uint8Array<ArrayBufferLike>;
669
- name: string | undefined;
670
- }, {
671
- tag: "NotConnected";
672
- value: undefined;
673
- } | {
674
- tag: "Rejected";
675
- value: undefined;
676
- } | {
677
- tag: "DomainNotValid";
678
- value: undefined;
679
- } | {
680
- tag: "Unknown";
681
- value: {
682
- reason: string;
683
- };
684
- }>;
685
- } | {
686
- tag: "account_get_alias_request";
687
- value: [string, number];
688
- } | {
689
- tag: "account_get_alias_response";
690
- value: import("scale-ts").ResultPayload<{
691
- context: Uint8Array<ArrayBufferLike>;
692
- alias: Uint8Array<ArrayBufferLike>;
693
- }, {
694
- tag: "NotConnected";
695
- value: undefined;
696
- } | {
697
- tag: "Rejected";
698
- value: undefined;
699
- } | {
700
- tag: "DomainNotValid";
701
- value: undefined;
702
- } | {
703
- tag: "Unknown";
704
- value: {
705
- reason: string;
706
- };
707
- }>;
708
- } | {
709
- tag: "account_create_proof_request";
710
- value: [[string, number], {
711
- genesisHash: `0x${string}`;
712
- ringRootHash: `0x${string}`;
713
- hints: {
714
- palletInstance: number | undefined;
715
- } | undefined;
716
- }, Uint8Array<ArrayBufferLike>];
717
- } | {
718
- tag: "account_create_proof_response";
719
- value: import("scale-ts").ResultPayload<Uint8Array<ArrayBufferLike>, {
720
- tag: "Rejected";
721
- value: undefined;
722
- } | {
723
- tag: "Unknown";
724
- value: {
725
- reason: string;
726
- };
727
- } | {
728
- tag: "RingNotFound";
729
- value: undefined;
730
- }>;
731
- } | {
732
- tag: "get_non_product_accounts_request";
733
- value: undefined;
734
- } | {
735
- tag: "get_non_product_accounts_response";
736
- value: import("scale-ts").ResultPayload<{
737
- publicKey: Uint8Array<ArrayBufferLike>;
738
- name: string | undefined;
739
- }[], {
740
- tag: "NotConnected";
741
- value: undefined;
742
- } | {
743
- tag: "Rejected";
744
- value: undefined;
745
- } | {
746
- tag: "DomainNotValid";
747
- value: undefined;
748
- } | {
749
- tag: "Unknown";
750
- value: {
751
- reason: string;
752
- };
753
- }>;
754
- } | {
755
- tag: "create_transaction_request";
756
- value: [[string, number], {
757
- tag: "v1";
758
- value: {
759
- signer: string | null;
760
- callData: `0x${string}`;
761
- extensions: {
762
- id: string;
763
- extra: `0x${string}`;
764
- additionalSigned: `0x${string}`;
765
- }[];
766
- txExtVersion: number;
767
- context: {
768
- metadata: `0x${string}`;
769
- tokenSymbol: string;
770
- tokenDecimals: number;
771
- bestBlockHeight: number;
772
- };
773
- };
774
- }];
775
- } | {
776
- tag: "create_transaction_response";
777
- value: import("scale-ts").ResultPayload<Uint8Array<ArrayBufferLike>, {
778
- tag: "Rejected";
779
- value: undefined;
780
- } | {
781
- tag: "Unknown";
782
- value: {
783
- reason: string;
784
- };
785
- } | {
786
- tag: "FailedToDecode";
787
- value: undefined;
788
- } | {
789
- tag: "NotSupported";
790
- value: string;
791
- }>;
792
- } | {
793
- tag: "create_transaction_with_non_product_account_request";
794
- value: [Uint8Array<ArrayBufferLike>, {
795
- tag: "v1";
796
- value: {
797
- signer: string | null;
798
- callData: `0x${string}`;
799
- extensions: {
800
- id: string;
801
- extra: `0x${string}`;
802
- additionalSigned: `0x${string}`;
803
- }[];
804
- txExtVersion: number;
805
- context: {
806
- metadata: `0x${string}`;
807
- tokenSymbol: string;
808
- tokenDecimals: number;
809
- bestBlockHeight: number;
810
- };
811
- };
812
- }];
813
- } | {
814
- tag: "create_transaction_with_non_product_account_response";
815
- value: import("scale-ts").ResultPayload<Uint8Array<ArrayBufferLike>, {
816
- tag: "Rejected";
817
- value: undefined;
818
- } | {
819
- tag: "Unknown";
820
- value: {
821
- reason: string;
822
- };
823
- } | {
824
- tag: "FailedToDecode";
825
- value: undefined;
826
- } | {
827
- tag: "NotSupported";
828
- value: string;
829
- }>;
830
- } | {
831
- tag: "sign_raw_request";
832
- value: {
833
- address: string;
834
- data: {
835
- tag: "Bytes";
836
- value: Uint8Array<ArrayBufferLike>;
837
- } | {
838
- tag: "Payload";
839
- value: string;
840
- };
841
- };
842
- } | {
843
- tag: "sign_raw_response";
844
- value: import("scale-ts").ResultPayload<{
845
- signature: `0x${string}`;
846
- signedTransaction: `0x${string}` | undefined;
847
- }, {
848
- tag: "Rejected";
849
- value: undefined;
850
- } | {
851
- tag: "Unknown";
852
- value: {
853
- reason: string;
854
- };
855
- } | {
856
- tag: "FailedToDecode";
857
- value: undefined;
858
- }>;
859
- } | {
860
- tag: "sign_payload_request";
861
- value: {
862
- address: string;
863
- blockHash: `0x${string}`;
864
- blockNumber: `0x${string}`;
865
- era: `0x${string}`;
866
- genesisHash: `0x${string}`;
867
- method: `0x${string}`;
868
- nonce: `0x${string}`;
869
- specVersion: `0x${string}`;
870
- tip: `0x${string}`;
871
- transactionVersion: `0x${string}`;
872
- signedExtensions: string[];
873
- version: number;
874
- assetId: `0x${string}` | undefined;
875
- metadataHash: `0x${string}` | undefined;
876
- mode: number | undefined;
877
- withSignedTransaction: boolean | undefined;
878
- };
879
- } | {
880
- tag: "sign_payload_response";
881
- value: import("scale-ts").ResultPayload<{
882
- signature: `0x${string}`;
883
- signedTransaction: `0x${string}` | undefined;
884
- }, {
885
- tag: "Rejected";
886
- value: undefined;
887
- } | {
888
- tag: "Unknown";
889
- value: {
890
- reason: string;
891
- };
892
- } | {
893
- tag: "FailedToDecode";
894
- value: undefined;
895
- }>;
896
- } | {
897
- tag: "chat_create_contact_request";
898
- value: {
899
- name: string;
900
- icon: string;
901
- };
902
- } | {
903
- tag: "chat_create_contact_response";
904
- value: import("scale-ts").ResultPayload<undefined, {
905
- tag: "Unknown";
906
- value: {
907
- reason: string;
908
- };
909
- }>;
910
- } | {
911
- tag: "chat_post_message_request";
912
- value: {
913
- tag: "Text";
914
- value: string;
915
- } | {
916
- tag: "Actions";
917
- value: {
918
- text: string | undefined;
919
- actions: {
920
- actionId: string;
921
- title: string;
922
- }[];
923
- layout: {
924
- tag: "Column";
925
- value: undefined;
926
- } | {
927
- tag: "Grid";
928
- value: undefined;
929
- };
930
- };
931
- } | {
932
- tag: "RichText";
933
- value: {
934
- url: string;
935
- };
936
- } | {
937
- tag: "File";
938
- value: {
939
- url: string;
940
- fileName: string;
941
- mimeType: string;
942
- sizeBytes: bigint;
943
- text: string | undefined;
944
- };
945
- } | {
946
- tag: "Reaction";
947
- value: {
948
- messageId: string;
949
- emoji: string;
950
- };
951
- } | {
952
- tag: "ReactionRemoved";
953
- value: {
954
- messageId: string;
955
- emoji: string;
956
- };
957
- };
958
- } | {
959
- tag: "chat_post_message_response";
960
- value: import("scale-ts").ResultPayload<{
961
- messageId: string;
962
- }, {
963
- tag: "Unknown";
964
- value: {
965
- reason: string;
966
- };
967
- } | {
968
- tag: "OverflowMessageSize";
969
- value: undefined;
970
- }>;
971
- } | {
972
- tag: "chat_action_subscribe_start";
973
- value: undefined;
974
- } | {
975
- tag: "chat_action_subscribe_stop";
976
- value: undefined;
977
- } | {
978
- tag: "chat_action_subscribe_receive";
979
- value: {
980
- tag: "MessagePosted";
981
- value: {
982
- tag: "Text";
983
- value: string;
984
- } | {
985
- tag: "Actions";
986
- value: {
987
- text: string | undefined;
988
- actions: {
989
- actionId: string;
990
- title: string;
991
- }[];
992
- layout: {
993
- tag: "Column";
994
- value: undefined;
995
- } | {
996
- tag: "Grid";
997
- value: undefined;
998
- };
999
- };
1000
- } | {
1001
- tag: "RichText";
1002
- value: {
1003
- url: string;
1004
- };
1005
- } | {
1006
- tag: "File";
1007
- value: {
1008
- url: string;
1009
- fileName: string;
1010
- mimeType: string;
1011
- sizeBytes: bigint;
1012
- text: string | undefined;
1013
- };
1014
- } | {
1015
- tag: "Reaction";
1016
- value: {
1017
- messageId: string;
1018
- emoji: string;
1019
- };
1020
- } | {
1021
- tag: "ReactionRemoved";
1022
- value: {
1023
- messageId: string;
1024
- emoji: string;
1025
- };
1026
- };
1027
- } | {
1028
- tag: "ActionTriggered";
1029
- value: {
1030
- messageId: string;
1031
- actionId: string;
1032
- };
1033
- };
1034
- } | {
1035
- tag: "statement_store_create_proof_request";
1036
- value: [[string, number], {
1037
- proof: {
1038
- tag: "Sr25519";
1039
- value: {
1040
- signature: Uint8Array<ArrayBufferLike>;
1041
- signer: Uint8Array<ArrayBufferLike>;
1042
- };
1043
- } | {
1044
- tag: "Ed25519";
1045
- value: {
1046
- signature: Uint8Array<ArrayBufferLike>;
1047
- signer: Uint8Array<ArrayBufferLike>;
1048
- };
1049
- } | {
1050
- tag: "Ecdsa";
1051
- value: {
1052
- signature: Uint8Array<ArrayBufferLike>;
1053
- signer: Uint8Array<ArrayBufferLike>;
1054
- };
1055
- } | {
1056
- tag: "OnChain";
1057
- value: {
1058
- who: Uint8Array<ArrayBufferLike>;
1059
- blockHash: Uint8Array<ArrayBufferLike>;
1060
- event: bigint;
1061
- };
1062
- } | undefined;
1063
- decryptionKey: Uint8Array<ArrayBufferLike> | undefined;
1064
- priority: number | undefined;
1065
- channel: Uint8Array<ArrayBufferLike> | undefined;
1066
- topics: Uint8Array<ArrayBufferLike>[];
1067
- data: Uint8Array<ArrayBufferLike> | undefined;
1068
- }];
1069
- } | {
1070
- tag: "statement_store_create_proof_response";
1071
- value: import("scale-ts").ResultPayload<{
1072
- tag: "Sr25519";
1073
- value: {
1074
- signature: Uint8Array<ArrayBufferLike>;
1075
- signer: Uint8Array<ArrayBufferLike>;
1076
- };
1077
- } | {
1078
- tag: "Ed25519";
1079
- value: {
1080
- signature: Uint8Array<ArrayBufferLike>;
1081
- signer: Uint8Array<ArrayBufferLike>;
1082
- };
1083
- } | {
1084
- tag: "Ecdsa";
1085
- value: {
1086
- signature: Uint8Array<ArrayBufferLike>;
1087
- signer: Uint8Array<ArrayBufferLike>;
1088
- };
1089
- } | {
1090
- tag: "OnChain";
1091
- value: {
1092
- who: Uint8Array<ArrayBufferLike>;
1093
- blockHash: Uint8Array<ArrayBufferLike>;
1094
- event: bigint;
1095
- };
1096
- }, {
1097
- tag: "Unknown";
1098
- value: {
1099
- reason: string;
1100
- };
1101
- } | {
1102
- tag: "UnableToSign";
1103
- value: undefined;
1104
- } | {
1105
- tag: "UnknownAccount";
1106
- value: undefined;
1107
- }>;
1108
- } | {
1109
- tag: "jsonrpc_message_send_request";
1110
- value: [`0x${string}`, string];
1111
- } | {
1112
- tag: "jsonrpc_message_send_response";
1113
- value: import("scale-ts").ResultPayload<undefined, {
1114
- reason: string;
1115
- }>;
1116
- } | {
1117
- tag: "jsonrpc_message_subscribe_start";
1118
- value: `0x${string}`;
1119
- } | {
1120
- tag: "jsonrpc_message_subscribe_stop";
1121
- value: undefined;
1122
- } | {
1123
- tag: "jsonrpc_message_subscribe_receive";
1124
- value: string;
1125
- };
1126
- }>;
1127
- export type MessageSchema = CodecType<typeof Message>;
1128
- export declare const Message: Codec<{
1129
- requestId: string;
1130
- payload: {
1131
- tag: "v1";
1132
- value: {
1133
- tag: "handshake_request";
1134
- value: number;
1135
- } | {
1136
- tag: "handshake_response";
1137
- value: import("scale-ts").ResultPayload<undefined, {
1138
- tag: "Unknown";
1139
- value: {
1140
- reason: string;
1141
- };
1142
- } | {
1143
- tag: "Timeout";
1144
- value: undefined;
1145
- } | {
1146
- tag: "UnsupportedProtocolVersion";
1147
- value: undefined;
1148
- }>;
1149
- } | {
1150
- tag: "feature_request";
1151
- value: {
1152
- tag: "chain";
1153
- value: `0x${string}`;
1154
- };
1155
- } | {
1156
- tag: "feature_response";
1157
- value: import("scale-ts").ResultPayload<boolean, {
1158
- reason: string;
1159
- }>;
1160
- } | {
1161
- tag: "permission_request_request";
1162
- value: {
1163
- tag: "ChainSubmit";
1164
- value: `0x${string}`;
1165
- } | {
1166
- tag: "ChainConnect";
1167
- value: {
1168
- genesisHash: `0x${string}`;
1169
- name: string;
1170
- };
1171
- } | {
1172
- tag: "NetworkRequest";
1173
- value: string[];
1174
- };
1175
- } | {
1176
- tag: "permission_request_response";
1177
- value: import("scale-ts").ResultPayload<undefined, {
1178
- tag: "Rejected";
1179
- value: undefined;
1180
- } | {
1181
- tag: "Unknown";
1182
- value: {
1183
- reason: string;
1184
- };
1185
- }>;
1186
- } | {
1187
- tag: "storage_read_request";
1188
- value: `0x${string}`;
1189
- } | {
1190
- tag: "storage_read_response";
1191
- value: import("scale-ts").ResultPayload<Uint8Array<ArrayBufferLike> | undefined, {
1192
- tag: "Unknown";
1193
- value: {
1194
- reason: string;
1195
- };
1196
- } | {
1197
- tag: "Full";
1198
- value: undefined;
1199
- }>;
1200
- } | {
1201
- tag: "storage_write_request";
1202
- value: [`0x${string}`, Uint8Array<ArrayBufferLike>];
1203
- } | {
1204
- tag: "storage_write_response";
1205
- value: import("scale-ts").ResultPayload<undefined, {
1206
- tag: "Unknown";
1207
- value: {
1208
- reason: string;
1209
- };
1210
- } | {
1211
- tag: "Full";
1212
- value: undefined;
1213
- }>;
1214
- } | {
1215
- tag: "storage_clear_request";
1216
- value: `0x${string}`;
1217
- } | {
1218
- tag: "storage_clear_response";
1219
- value: import("scale-ts").ResultPayload<undefined, {
1220
- tag: "Unknown";
1221
- value: {
1222
- reason: string;
1223
- };
1224
- } | {
1225
- tag: "Full";
1226
- value: undefined;
1227
- }>;
1228
- } | {
1229
- tag: "account_get_request";
1230
- value: [string, number];
1231
- } | {
1232
- tag: "account_get_response";
1233
- value: import("scale-ts").ResultPayload<{
1234
- publicKey: Uint8Array<ArrayBufferLike>;
1235
- name: string | undefined;
1236
- }, {
1237
- tag: "NotConnected";
1238
- value: undefined;
1239
- } | {
1240
- tag: "Rejected";
1241
- value: undefined;
1242
- } | {
1243
- tag: "DomainNotValid";
1244
- value: undefined;
1245
- } | {
1246
- tag: "Unknown";
1247
- value: {
1248
- reason: string;
1249
- };
1250
- }>;
1251
- } | {
1252
- tag: "account_get_alias_request";
1253
- value: [string, number];
1254
- } | {
1255
- tag: "account_get_alias_response";
1256
- value: import("scale-ts").ResultPayload<{
1257
- context: Uint8Array<ArrayBufferLike>;
1258
- alias: Uint8Array<ArrayBufferLike>;
1259
- }, {
1260
- tag: "NotConnected";
1261
- value: undefined;
1262
- } | {
1263
- tag: "Rejected";
1264
- value: undefined;
1265
- } | {
1266
- tag: "DomainNotValid";
1267
- value: undefined;
1268
- } | {
1269
- tag: "Unknown";
1270
- value: {
1271
- reason: string;
1272
- };
1273
- }>;
1274
- } | {
1275
- tag: "account_create_proof_request";
1276
- value: [[string, number], {
1277
- genesisHash: `0x${string}`;
1278
- ringRootHash: `0x${string}`;
1279
- hints: {
1280
- palletInstance: number | undefined;
1281
- } | undefined;
1282
- }, Uint8Array<ArrayBufferLike>];
1283
- } | {
1284
- tag: "account_create_proof_response";
1285
- value: import("scale-ts").ResultPayload<Uint8Array<ArrayBufferLike>, {
1286
- tag: "Rejected";
1287
- value: undefined;
1288
- } | {
1289
- tag: "Unknown";
1290
- value: {
1291
- reason: string;
1292
- };
1293
- } | {
1294
- tag: "RingNotFound";
1295
- value: undefined;
1296
- }>;
1297
- } | {
1298
- tag: "get_non_product_accounts_request";
1299
- value: undefined;
1300
- } | {
1301
- tag: "get_non_product_accounts_response";
1302
- value: import("scale-ts").ResultPayload<{
1303
- publicKey: Uint8Array<ArrayBufferLike>;
1304
- name: string | undefined;
1305
- }[], {
1306
- tag: "NotConnected";
1307
- value: undefined;
1308
- } | {
1309
- tag: "Rejected";
1310
- value: undefined;
1311
- } | {
1312
- tag: "DomainNotValid";
1313
- value: undefined;
1314
- } | {
1315
- tag: "Unknown";
1316
- value: {
1317
- reason: string;
1318
- };
1319
- }>;
1320
- } | {
1321
- tag: "create_transaction_request";
1322
- value: [[string, number], {
1323
- tag: "v1";
1324
- value: {
1325
- signer: string | null;
1326
- callData: `0x${string}`;
1327
- extensions: {
1328
- id: string;
1329
- extra: `0x${string}`;
1330
- additionalSigned: `0x${string}`;
1331
- }[];
1332
- txExtVersion: number;
1333
- context: {
1334
- metadata: `0x${string}`;
1335
- tokenSymbol: string;
1336
- tokenDecimals: number;
1337
- bestBlockHeight: number;
1338
- };
1339
- };
1340
- }];
1341
- } | {
1342
- tag: "create_transaction_response";
1343
- value: import("scale-ts").ResultPayload<Uint8Array<ArrayBufferLike>, {
1344
- tag: "Rejected";
1345
- value: undefined;
1346
- } | {
1347
- tag: "Unknown";
1348
- value: {
1349
- reason: string;
1350
- };
1351
- } | {
1352
- tag: "FailedToDecode";
1353
- value: undefined;
1354
- } | {
1355
- tag: "NotSupported";
1356
- value: string;
1357
- }>;
1358
- } | {
1359
- tag: "create_transaction_with_non_product_account_request";
1360
- value: [Uint8Array<ArrayBufferLike>, {
1361
- tag: "v1";
1362
- value: {
1363
- signer: string | null;
1364
- callData: `0x${string}`;
1365
- extensions: {
1366
- id: string;
1367
- extra: `0x${string}`;
1368
- additionalSigned: `0x${string}`;
1369
- }[];
1370
- txExtVersion: number;
1371
- context: {
1372
- metadata: `0x${string}`;
1373
- tokenSymbol: string;
1374
- tokenDecimals: number;
1375
- bestBlockHeight: number;
1376
- };
1377
- };
1378
- }];
1379
- } | {
1380
- tag: "create_transaction_with_non_product_account_response";
1381
- value: import("scale-ts").ResultPayload<Uint8Array<ArrayBufferLike>, {
1382
- tag: "Rejected";
1383
- value: undefined;
1384
- } | {
1385
- tag: "Unknown";
1386
- value: {
1387
- reason: string;
1388
- };
1389
- } | {
1390
- tag: "FailedToDecode";
1391
- value: undefined;
1392
- } | {
1393
- tag: "NotSupported";
1394
- value: string;
1395
- }>;
1396
- } | {
1397
- tag: "sign_raw_request";
1398
- value: {
1399
- address: string;
1400
- data: {
1401
- tag: "Bytes";
1402
- value: Uint8Array<ArrayBufferLike>;
1403
- } | {
1404
- tag: "Payload";
1405
- value: string;
1406
- };
1407
- };
1408
- } | {
1409
- tag: "sign_raw_response";
1410
- value: import("scale-ts").ResultPayload<{
1411
- signature: `0x${string}`;
1412
- signedTransaction: `0x${string}` | undefined;
1413
- }, {
1414
- tag: "Rejected";
1415
- value: undefined;
1416
- } | {
1417
- tag: "Unknown";
1418
- value: {
1419
- reason: string;
1420
- };
1421
- } | {
1422
- tag: "FailedToDecode";
1423
- value: undefined;
1424
- }>;
1425
- } | {
1426
- tag: "sign_payload_request";
1427
- value: {
1428
- address: string;
1429
- blockHash: `0x${string}`;
1430
- blockNumber: `0x${string}`;
1431
- era: `0x${string}`;
1432
- genesisHash: `0x${string}`;
1433
- method: `0x${string}`;
1434
- nonce: `0x${string}`;
1435
- specVersion: `0x${string}`;
1436
- tip: `0x${string}`;
1437
- transactionVersion: `0x${string}`;
1438
- signedExtensions: string[];
1439
- version: number;
1440
- assetId: `0x${string}` | undefined;
1441
- metadataHash: `0x${string}` | undefined;
1442
- mode: number | undefined;
1443
- withSignedTransaction: boolean | undefined;
1444
- };
1445
- } | {
1446
- tag: "sign_payload_response";
1447
- value: import("scale-ts").ResultPayload<{
1448
- signature: `0x${string}`;
1449
- signedTransaction: `0x${string}` | undefined;
1450
- }, {
1451
- tag: "Rejected";
1452
- value: undefined;
1453
- } | {
1454
- tag: "Unknown";
1455
- value: {
1456
- reason: string;
1457
- };
1458
- } | {
1459
- tag: "FailedToDecode";
1460
- value: undefined;
1461
- }>;
1462
- } | {
1463
- tag: "chat_create_contact_request";
1464
- value: {
1465
- name: string;
1466
- icon: string;
1467
- };
1468
- } | {
1469
- tag: "chat_create_contact_response";
1470
- value: import("scale-ts").ResultPayload<undefined, {
1471
- tag: "Unknown";
1472
- value: {
1473
- reason: string;
1474
- };
1475
- }>;
1476
- } | {
1477
- tag: "chat_post_message_request";
1478
- value: {
1479
- tag: "Text";
1480
- value: string;
1481
- } | {
1482
- tag: "Actions";
1483
- value: {
1484
- text: string | undefined;
1485
- actions: {
1486
- actionId: string;
1487
- title: string;
1488
- }[];
1489
- layout: {
1490
- tag: "Column";
1491
- value: undefined;
1492
- } | {
1493
- tag: "Grid";
1494
- value: undefined;
1495
- };
1496
- };
1497
- } | {
1498
- tag: "RichText";
1499
- value: {
1500
- url: string;
1501
- };
1502
- } | {
1503
- tag: "File";
1504
- value: {
1505
- url: string;
1506
- fileName: string;
1507
- mimeType: string;
1508
- sizeBytes: bigint;
1509
- text: string | undefined;
1510
- };
1511
- } | {
1512
- tag: "Reaction";
1513
- value: {
1514
- messageId: string;
1515
- emoji: string;
1516
- };
1517
- } | {
1518
- tag: "ReactionRemoved";
1519
- value: {
1520
- messageId: string;
1521
- emoji: string;
1522
- };
1523
- };
1524
- } | {
1525
- tag: "chat_post_message_response";
1526
- value: import("scale-ts").ResultPayload<{
1527
- messageId: string;
1528
- }, {
1529
- tag: "Unknown";
1530
- value: {
1531
- reason: string;
1532
- };
1533
- } | {
1534
- tag: "OverflowMessageSize";
1535
- value: undefined;
1536
- }>;
1537
- } | {
1538
- tag: "chat_action_subscribe_start";
1539
- value: undefined;
1540
- } | {
1541
- tag: "chat_action_subscribe_stop";
1542
- value: undefined;
1543
- } | {
1544
- tag: "chat_action_subscribe_receive";
1545
- value: {
1546
- tag: "MessagePosted";
1547
- value: {
1548
- tag: "Text";
1549
- value: string;
1550
- } | {
1551
- tag: "Actions";
1552
- value: {
1553
- text: string | undefined;
1554
- actions: {
1555
- actionId: string;
1556
- title: string;
1557
- }[];
1558
- layout: {
1559
- tag: "Column";
1560
- value: undefined;
1561
- } | {
1562
- tag: "Grid";
1563
- value: undefined;
1564
- };
1565
- };
1566
- } | {
1567
- tag: "RichText";
1568
- value: {
1569
- url: string;
1570
- };
1571
- } | {
1572
- tag: "File";
1573
- value: {
1574
- url: string;
1575
- fileName: string;
1576
- mimeType: string;
1577
- sizeBytes: bigint;
1578
- text: string | undefined;
1579
- };
1580
- } | {
1581
- tag: "Reaction";
1582
- value: {
1583
- messageId: string;
1584
- emoji: string;
1585
- };
1586
- } | {
1587
- tag: "ReactionRemoved";
1588
- value: {
1589
- messageId: string;
1590
- emoji: string;
1591
- };
1592
- };
1593
- } | {
1594
- tag: "ActionTriggered";
1595
- value: {
1596
- messageId: string;
1597
- actionId: string;
1598
- };
1599
- };
1600
- } | {
1601
- tag: "statement_store_create_proof_request";
1602
- value: [[string, number], {
1603
- proof: {
1604
- tag: "Sr25519";
1605
- value: {
1606
- signature: Uint8Array<ArrayBufferLike>;
1607
- signer: Uint8Array<ArrayBufferLike>;
1608
- };
1609
- } | {
1610
- tag: "Ed25519";
1611
- value: {
1612
- signature: Uint8Array<ArrayBufferLike>;
1613
- signer: Uint8Array<ArrayBufferLike>;
1614
- };
1615
- } | {
1616
- tag: "Ecdsa";
1617
- value: {
1618
- signature: Uint8Array<ArrayBufferLike>;
1619
- signer: Uint8Array<ArrayBufferLike>;
1620
- };
1621
- } | {
1622
- tag: "OnChain";
1623
- value: {
1624
- who: Uint8Array<ArrayBufferLike>;
1625
- blockHash: Uint8Array<ArrayBufferLike>;
1626
- event: bigint;
1627
- };
1628
- } | undefined;
1629
- decryptionKey: Uint8Array<ArrayBufferLike> | undefined;
1630
- priority: number | undefined;
1631
- channel: Uint8Array<ArrayBufferLike> | undefined;
1632
- topics: Uint8Array<ArrayBufferLike>[];
1633
- data: Uint8Array<ArrayBufferLike> | undefined;
1634
- }];
1635
- } | {
1636
- tag: "statement_store_create_proof_response";
1637
- value: import("scale-ts").ResultPayload<{
1638
- tag: "Sr25519";
1639
- value: {
1640
- signature: Uint8Array<ArrayBufferLike>;
1641
- signer: Uint8Array<ArrayBufferLike>;
1642
- };
1643
- } | {
1644
- tag: "Ed25519";
1645
- value: {
1646
- signature: Uint8Array<ArrayBufferLike>;
1647
- signer: Uint8Array<ArrayBufferLike>;
1648
- };
1649
- } | {
1650
- tag: "Ecdsa";
1651
- value: {
1652
- signature: Uint8Array<ArrayBufferLike>;
1653
- signer: Uint8Array<ArrayBufferLike>;
1654
- };
1655
- } | {
1656
- tag: "OnChain";
1657
- value: {
1658
- who: Uint8Array<ArrayBufferLike>;
1659
- blockHash: Uint8Array<ArrayBufferLike>;
1660
- event: bigint;
1661
- };
1662
- }, {
1663
- tag: "Unknown";
1664
- value: {
1665
- reason: string;
1666
- };
1667
- } | {
1668
- tag: "UnableToSign";
1669
- value: undefined;
1670
- } | {
1671
- tag: "UnknownAccount";
1672
- value: undefined;
1673
- }>;
1674
- } | {
1675
- tag: "jsonrpc_message_send_request";
1676
- value: [`0x${string}`, string];
1677
- } | {
1678
- tag: "jsonrpc_message_send_response";
1679
- value: import("scale-ts").ResultPayload<undefined, {
1680
- reason: string;
1681
- }>;
1682
- } | {
1683
- tag: "jsonrpc_message_subscribe_start";
1684
- value: `0x${string}`;
1685
- } | {
1686
- tag: "jsonrpc_message_subscribe_stop";
1687
- value: undefined;
1688
- } | {
1689
- tag: "jsonrpc_message_subscribe_receive";
1690
- value: string;
1691
- };
1692
- };
1693
- }>;
1694
- export type MessageVersion = MessagePayloadSchema['tag'];
1695
- export type MessageActionByVersion<V extends MessageVersion> = PickMessagePayloadByVersion<V>['tag'];
1696
- type PickMessagePayloadByVersion<V extends MessageVersion> = Extract<MessagePayloadSchema, {
1697
- tag: V;
1698
- }>['value'];
1699
- export type PickMessagePayload<V extends MessageVersion, Action extends MessageActionByVersion<V>> = Extract<PickMessagePayloadByVersion<V>, {
1700
- tag: Action;
1701
- }>;
1702
- export type PickMessagePayloadValue<V extends MessageVersion, Action extends MessageActionByVersion<V>> = PickMessagePayload<V, Action>['value'];
1703
- export type ComposeMessageAction<V extends MessageVersion, Method extends string, Action extends string> = `${Method}_${Action}` extends MessageActionByVersion<V> ? `${Method}_${Action}` : never;
1704
- export {};