@useragent-kit/truapi 0.2.0

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.
@@ -0,0 +1,3299 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "protocol": {
4
+ "name": "TrUAPI",
5
+ "version": "0.2",
6
+ "source": {
7
+ "repo": "https://github.com/paritytech/truapi",
8
+ "path": "truapi-spec/src/v02/mod.rs",
9
+ "revision": "a7fa645"
10
+ },
11
+ "transport": "message-port",
12
+ "wireFormat": "scale-host-api"
13
+ },
14
+ "methods": [
15
+ {
16
+ "name": "host_feature_supported",
17
+ "tag": 0,
18
+ "kind": "request",
19
+ "group": "truapi-calls",
20
+ "request": "Feature",
21
+ "response": "Result(bool, GenericError)",
22
+ "errorType": null
23
+ },
24
+ {
25
+ "name": "host_navigate_to",
26
+ "tag": 1,
27
+ "kind": "request",
28
+ "group": "truapi-calls",
29
+ "request": "str",
30
+ "response": "Result(void, NavigateToErr)",
31
+ "errorType": "NavigateToErr"
32
+ },
33
+ {
34
+ "name": "host_push_notification",
35
+ "tag": 2,
36
+ "kind": "request",
37
+ "group": "truapi-calls",
38
+ "request": "PushNotification",
39
+ "response": "Result(void, GenericError)",
40
+ "errorType": null
41
+ },
42
+ {
43
+ "name": "host_device_permission",
44
+ "tag": 3,
45
+ "kind": "request",
46
+ "group": "permissions",
47
+ "request": "DevicePermission",
48
+ "response": "Result(bool, GenericError)",
49
+ "errorType": null
50
+ },
51
+ {
52
+ "name": "remote_permission",
53
+ "tag": 4,
54
+ "kind": "request",
55
+ "group": "permissions",
56
+ "request": "Vector(RemotePermission)",
57
+ "response": "Result(bool, GenericError)",
58
+ "errorType": null
59
+ },
60
+ {
61
+ "name": "host_local_storage_read",
62
+ "tag": 5,
63
+ "kind": "request",
64
+ "group": "local-storage",
65
+ "request": "StorageKey",
66
+ "response": "Result(Option(StorageValue), StorageErr)",
67
+ "errorType": "StorageErr"
68
+ },
69
+ {
70
+ "name": "host_local_storage_write",
71
+ "tag": 6,
72
+ "kind": "request",
73
+ "group": "local-storage",
74
+ "request": "Tuple(StorageKey, StorageValue)",
75
+ "response": "Result(void, StorageErr)",
76
+ "errorType": "StorageErr"
77
+ },
78
+ {
79
+ "name": "host_local_storage_clear",
80
+ "tag": 7,
81
+ "kind": "request",
82
+ "group": "local-storage",
83
+ "request": "StorageKey",
84
+ "response": "Result(void, StorageErr)",
85
+ "errorType": "StorageErr"
86
+ },
87
+ {
88
+ "name": "host_account_get",
89
+ "tag": 8,
90
+ "kind": "request",
91
+ "group": "account-management",
92
+ "request": "ProductAccountId",
93
+ "response": "Result(ProductAccount, RequestCredentialsErr)",
94
+ "errorType": "RequestCredentialsErr"
95
+ },
96
+ {
97
+ "name": "host_account_get_alias",
98
+ "tag": 9,
99
+ "kind": "request",
100
+ "group": "account-management",
101
+ "request": "ProductAccountId",
102
+ "response": "Result(ContextualAlias, RequestCredentialsErr)",
103
+ "errorType": "RequestCredentialsErr"
104
+ },
105
+ {
106
+ "name": "host_account_create_proof",
107
+ "tag": 10,
108
+ "kind": "request",
109
+ "group": "account-management",
110
+ "request": "Tuple(ProductAccountId, RingLocation, Bytes)",
111
+ "response": "Result(RingVrfProof, CreateProofErr)",
112
+ "errorType": "CreateProofErr"
113
+ },
114
+ {
115
+ "name": "host_get_legacy_accounts",
116
+ "tag": 11,
117
+ "kind": "request",
118
+ "group": "account-management",
119
+ "request": "void",
120
+ "response": "Result(Vector(LegacyAccount), RequestCredentialsErr)",
121
+ "errorType": "RequestCredentialsErr"
122
+ },
123
+ {
124
+ "name": "host_account_connection_status_subscribe",
125
+ "tag": 12,
126
+ "kind": "subscription",
127
+ "group": "account-management",
128
+ "request": "void",
129
+ "response": "AccountConnectionStatus",
130
+ "errorType": null
131
+ },
132
+ {
133
+ "name": "host_get_user_id",
134
+ "tag": 13,
135
+ "kind": "request",
136
+ "group": "account-management",
137
+ "request": "void",
138
+ "response": "Result(UserIdentity, UserIdentityErr)",
139
+ "errorType": "UserIdentityErr"
140
+ },
141
+ {
142
+ "name": "host_request_login",
143
+ "tag": 14,
144
+ "kind": "request",
145
+ "group": "account-management",
146
+ "request": "Option(str)",
147
+ "response": "Result(LoginResult, LoginError)",
148
+ "errorType": "LoginError"
149
+ },
150
+ {
151
+ "name": "host_sign_payload",
152
+ "tag": 15,
153
+ "kind": "request",
154
+ "group": "signing",
155
+ "request": "SigningPayload",
156
+ "response": "Result(SigningResult, SigningErr)",
157
+ "errorType": "SigningErr"
158
+ },
159
+ {
160
+ "name": "host_sign_raw",
161
+ "tag": 16,
162
+ "kind": "request",
163
+ "group": "signing",
164
+ "request": "SigningRawPayload",
165
+ "response": "Result(SigningResult, SigningErr)",
166
+ "errorType": "SigningErr"
167
+ },
168
+ {
169
+ "name": "host_sign_raw_with_legacy_account",
170
+ "tag": 17,
171
+ "kind": "request",
172
+ "group": "signing",
173
+ "request": "SigningRawPayloadWithoutAccount",
174
+ "response": "Result(SigningResult, SigningErr)",
175
+ "errorType": "SigningErr"
176
+ },
177
+ {
178
+ "name": "host_sign_payload_with_legacy_account",
179
+ "tag": 18,
180
+ "kind": "request",
181
+ "group": "signing",
182
+ "request": "SigningPayloadWithoutAccount",
183
+ "response": "Result(SigningResult, SigningErr)",
184
+ "errorType": "SigningErr"
185
+ },
186
+ {
187
+ "name": "host_create_transaction",
188
+ "tag": 19,
189
+ "kind": "request",
190
+ "group": "signing",
191
+ "request": "Tuple(ProductAccountId, VersionedTxPayload)",
192
+ "response": "Result(Bytes, CreateTransactionErr)",
193
+ "errorType": "CreateTransactionErr"
194
+ },
195
+ {
196
+ "name": "host_create_transaction_with_legacy_account",
197
+ "tag": 20,
198
+ "kind": "request",
199
+ "group": "signing",
200
+ "request": "VersionedTxPayload",
201
+ "response": "Result(Bytes, CreateTransactionErr)",
202
+ "errorType": "CreateTransactionErr"
203
+ },
204
+ {
205
+ "name": "host_chat_create_room",
206
+ "tag": 21,
207
+ "kind": "request",
208
+ "group": "chat",
209
+ "request": "ChatRoomRequest",
210
+ "response": "Result(ChatRoomRegistrationResult, ChatRoomRegistrationErr)",
211
+ "errorType": "ChatRoomRegistrationErr"
212
+ },
213
+ {
214
+ "name": "host_chat_create_simple_group",
215
+ "tag": 22,
216
+ "kind": "request",
217
+ "group": "chat",
218
+ "request": "SimpleGroupChatRequest",
219
+ "response": "Result(SimpleGroupChatResult, ChatRoomRegistrationErr)",
220
+ "errorType": "ChatRoomRegistrationErr"
221
+ },
222
+ {
223
+ "name": "host_chat_register_bot",
224
+ "tag": 23,
225
+ "kind": "request",
226
+ "group": "chat",
227
+ "request": "ChatBotRequest",
228
+ "response": "Result(ChatBotRegistrationResult, ChatBotRegistrationErr)",
229
+ "errorType": "ChatBotRegistrationErr"
230
+ },
231
+ {
232
+ "name": "host_chat_post_message",
233
+ "tag": 24,
234
+ "kind": "request",
235
+ "group": "chat",
236
+ "request": "Struct { roomId: str, payload: ChatMessageContent }",
237
+ "response": "Result(ChatPostMessageResult, ChatMessagePostingErr)",
238
+ "errorType": "ChatMessagePostingErr"
239
+ },
240
+ {
241
+ "name": "host_chat_list_subscribe",
242
+ "tag": 25,
243
+ "kind": "subscription",
244
+ "group": "chat",
245
+ "request": "void",
246
+ "response": "Vector(ChatRoom)",
247
+ "errorType": null
248
+ },
249
+ {
250
+ "name": "host_chat_action_subscribe",
251
+ "tag": 26,
252
+ "kind": "subscription",
253
+ "group": "chat",
254
+ "request": "void",
255
+ "response": "ReceivedChatAction",
256
+ "errorType": null
257
+ },
258
+ {
259
+ "name": "product_chat_custom_message_render_subscribe",
260
+ "tag": 27,
261
+ "kind": "reverse-subscription",
262
+ "group": "chat",
263
+ "request": "Struct { messageId: str, messageType: str, payload: Bytes }",
264
+ "response": "CustomRendererNode",
265
+ "errorType": null
266
+ },
267
+ {
268
+ "name": "remote_statement_store_subscribe",
269
+ "tag": 28,
270
+ "kind": "subscription",
271
+ "group": "statement-store",
272
+ "request": "TopicFilter",
273
+ "response": "SignedStatementsPage",
274
+ "errorType": null
275
+ },
276
+ {
277
+ "name": "remote_statement_store_create_proof",
278
+ "tag": 29,
279
+ "kind": "request",
280
+ "group": "statement-store",
281
+ "request": "Tuple(ProductAccountId, Statement)",
282
+ "response": "Result(StatementProof, StatementProofErr)",
283
+ "errorType": "StatementProofErr"
284
+ },
285
+ {
286
+ "name": "remote_statement_store_submit",
287
+ "tag": 30,
288
+ "kind": "request",
289
+ "group": "statement-store",
290
+ "request": "SignedStatement",
291
+ "response": "Result(void, GenericError)",
292
+ "errorType": null
293
+ },
294
+ {
295
+ "name": "remote_preimage_lookup_subscribe",
296
+ "tag": 31,
297
+ "kind": "subscription",
298
+ "group": "preimage",
299
+ "request": "PreimageKey",
300
+ "response": "Nullable(PreimageValue)",
301
+ "errorType": null
302
+ },
303
+ {
304
+ "name": "remote_chain_head_follow",
305
+ "tag": 32,
306
+ "kind": "subscription",
307
+ "group": "chain-interaction",
308
+ "request": "Struct { genesisHash: GenesisHash, withRuntime: bool }",
309
+ "response": "ChainHeadEvent",
310
+ "errorType": null
311
+ },
312
+ {
313
+ "name": "remote_chain_head_header",
314
+ "tag": 33,
315
+ "kind": "request",
316
+ "group": "chain-interaction",
317
+ "request": "Struct { genesisHash: GenesisHash, followSubscriptionId: str, hash: BlockHash }",
318
+ "response": "Result(Nullable(Hex), GenericError)",
319
+ "errorType": null
320
+ },
321
+ {
322
+ "name": "remote_chain_head_body",
323
+ "tag": 34,
324
+ "kind": "request",
325
+ "group": "chain-interaction",
326
+ "request": "Struct { genesisHash: GenesisHash, followSubscriptionId: str, hash: BlockHash }",
327
+ "response": "Result(OperationStartedResult, GenericError)",
328
+ "errorType": null
329
+ },
330
+ {
331
+ "name": "remote_chain_head_storage",
332
+ "tag": 35,
333
+ "kind": "request",
334
+ "group": "chain-interaction",
335
+ "request": "Struct { genesisHash: GenesisHash, followSubscriptionId: str, hash: BlockHash, items: Vector(StorageQueryItem), childTrie: Nullable(Hex) }",
336
+ "response": "Result(OperationStartedResult, GenericError)",
337
+ "errorType": null
338
+ },
339
+ {
340
+ "name": "remote_chain_head_call",
341
+ "tag": 36,
342
+ "kind": "request",
343
+ "group": "chain-interaction",
344
+ "request": "Struct { genesisHash: GenesisHash, followSubscriptionId: str, hash: BlockHash, function: str, callParameters: Hex }",
345
+ "response": "Result(OperationStartedResult, GenericError)",
346
+ "errorType": null
347
+ },
348
+ {
349
+ "name": "remote_chain_head_unpin",
350
+ "tag": 37,
351
+ "kind": "request",
352
+ "group": "chain-interaction",
353
+ "request": "Struct { genesisHash: GenesisHash, followSubscriptionId: str, hashes: Vector(BlockHash) }",
354
+ "response": "Result(void, GenericError)",
355
+ "errorType": null
356
+ },
357
+ {
358
+ "name": "remote_chain_head_continue",
359
+ "tag": 38,
360
+ "kind": "request",
361
+ "group": "chain-interaction",
362
+ "request": "Struct { genesisHash: GenesisHash, followSubscriptionId: str, operationId: OperationId }",
363
+ "response": "Result(void, GenericError)",
364
+ "errorType": null
365
+ },
366
+ {
367
+ "name": "remote_chain_head_stop_operation",
368
+ "tag": 39,
369
+ "kind": "request",
370
+ "group": "chain-interaction",
371
+ "request": "Struct { genesisHash: GenesisHash, followSubscriptionId: str, operationId: OperationId }",
372
+ "response": "Result(void, GenericError)",
373
+ "errorType": null
374
+ },
375
+ {
376
+ "name": "remote_chain_spec_genesis_hash",
377
+ "tag": 40,
378
+ "kind": "request",
379
+ "group": "chain-interaction",
380
+ "request": "GenesisHash",
381
+ "response": "Result(Hex, GenericError)",
382
+ "errorType": null
383
+ },
384
+ {
385
+ "name": "remote_chain_spec_chain_name",
386
+ "tag": 41,
387
+ "kind": "request",
388
+ "group": "chain-interaction",
389
+ "request": "GenesisHash",
390
+ "response": "Result(str, GenericError)",
391
+ "errorType": null
392
+ },
393
+ {
394
+ "name": "remote_chain_spec_properties",
395
+ "tag": 42,
396
+ "kind": "request",
397
+ "group": "chain-interaction",
398
+ "request": "GenesisHash",
399
+ "response": "Result(str, GenericError)",
400
+ "errorType": null
401
+ },
402
+ {
403
+ "name": "remote_chain_transaction_broadcast",
404
+ "tag": 43,
405
+ "kind": "request",
406
+ "group": "chain-interaction",
407
+ "request": "Struct { genesisHash: GenesisHash, transaction: Hex }",
408
+ "response": "Result(Nullable(str), GenericError)",
409
+ "errorType": null
410
+ },
411
+ {
412
+ "name": "remote_chain_transaction_stop",
413
+ "tag": 44,
414
+ "kind": "request",
415
+ "group": "chain-interaction",
416
+ "request": "Struct { genesisHash: GenesisHash, operationId: OperationId }",
417
+ "response": "Result(void, GenericError)",
418
+ "errorType": null
419
+ },
420
+ {
421
+ "name": "host_payment_balance_subscribe",
422
+ "tag": 45,
423
+ "kind": "subscription",
424
+ "group": "payment",
425
+ "request": "void",
426
+ "response": "PaymentBalance",
427
+ "errorType": "PaymentBalanceErr"
428
+ },
429
+ {
430
+ "name": "host_payment_top_up",
431
+ "tag": 46,
432
+ "kind": "request",
433
+ "group": "payment",
434
+ "request": "Tuple(Balance, PaymentTopUpSource)",
435
+ "response": "Result(void, PaymentTopUpErr)",
436
+ "errorType": "PaymentTopUpErr"
437
+ },
438
+ {
439
+ "name": "host_payment_request",
440
+ "tag": 47,
441
+ "kind": "request",
442
+ "group": "payment",
443
+ "request": "Tuple(Balance, AccountId)",
444
+ "response": "Result(PaymentReceipt, PaymentRequestErr)",
445
+ "errorType": "PaymentRequestErr"
446
+ },
447
+ {
448
+ "name": "host_payment_status_subscribe",
449
+ "tag": 48,
450
+ "kind": "subscription",
451
+ "group": "payment",
452
+ "request": "PaymentId",
453
+ "response": "PaymentStatus",
454
+ "errorType": "PaymentStatusErr"
455
+ },
456
+ {
457
+ "name": "host_derive_entropy",
458
+ "tag": 49,
459
+ "kind": "request",
460
+ "group": "entropy",
461
+ "request": "Vector(u8)",
462
+ "response": "Result(Entropy, DeriveEntropyErr)",
463
+ "errorType": "DeriveEntropyErr"
464
+ },
465
+ {
466
+ "name": "host_theme_subscribe",
467
+ "tag": 50,
468
+ "kind": "subscription",
469
+ "group": "theme",
470
+ "request": "void",
471
+ "response": "Theme",
472
+ "errorType": null
473
+ }
474
+ ],
475
+ "groups": [
476
+ {
477
+ "id": "truapi-calls",
478
+ "name": "TrUAPI Calls",
479
+ "description": "General-purpose TrUAPI methods for feature detection, navigation, notifications, and permissions.",
480
+ "methods": [
481
+ "host_feature_supported",
482
+ "host_navigate_to",
483
+ "host_push_notification"
484
+ ]
485
+ },
486
+ {
487
+ "id": "permissions",
488
+ "name": "Permissions",
489
+ "description": "Device and remote permission requests for camera, microphone, HTTP, and transaction access.",
490
+ "methods": [
491
+ "host_device_permission",
492
+ "remote_permission"
493
+ ]
494
+ },
495
+ {
496
+ "id": "local-storage",
497
+ "name": "Local Storage",
498
+ "description": "Scoped key-value storage. The host namespaces keys so different products cannot read each other's data.",
499
+ "methods": [
500
+ "host_local_storage_read",
501
+ "host_local_storage_write",
502
+ "host_local_storage_clear"
503
+ ]
504
+ },
505
+ {
506
+ "id": "account-management",
507
+ "name": "Account Management",
508
+ "description": "Product-specific account derivation, alias retrieval, ring VRF proofs, connection status, and user identity.",
509
+ "methods": [
510
+ "host_account_get",
511
+ "host_account_get_alias",
512
+ "host_account_create_proof",
513
+ "host_get_legacy_accounts",
514
+ "host_account_connection_status_subscribe",
515
+ "host_get_user_id",
516
+ "host_request_login"
517
+ ]
518
+ },
519
+ {
520
+ "id": "signing",
521
+ "name": "Signing",
522
+ "description": "Transaction payload signing, raw message signing, and full transaction creation.",
523
+ "methods": [
524
+ "host_sign_payload",
525
+ "host_sign_raw",
526
+ "host_create_transaction",
527
+ "host_sign_raw_with_legacy_account",
528
+ "host_sign_payload_with_legacy_account",
529
+ "host_create_transaction_with_legacy_account"
530
+ ]
531
+ },
532
+ {
533
+ "id": "chat",
534
+ "name": "Chat",
535
+ "description": "Chat room management, bot registration, message posting, simple group chats, and custom message rendering.",
536
+ "methods": [
537
+ "host_chat_create_room",
538
+ "host_chat_register_bot",
539
+ "host_chat_post_message",
540
+ "host_chat_list_subscribe",
541
+ "host_chat_action_subscribe",
542
+ "product_chat_custom_message_render_subscribe",
543
+ "host_chat_create_simple_group"
544
+ ]
545
+ },
546
+ {
547
+ "id": "statement-store",
548
+ "name": "Statement Store",
549
+ "description": "Subscribe to, create proofs for, and submit cryptographic statements.",
550
+ "methods": [
551
+ "remote_statement_store_subscribe",
552
+ "remote_statement_store_create_proof",
553
+ "remote_statement_store_submit"
554
+ ]
555
+ },
556
+ {
557
+ "id": "preimage",
558
+ "name": "Preimage",
559
+ "description": "Lookup preimages by hash.",
560
+ "methods": [
561
+ "remote_preimage_lookup_subscribe"
562
+ ]
563
+ },
564
+ {
565
+ "id": "chain-interaction",
566
+ "name": "Chain Interaction",
567
+ "description": "Substrate blockchain RPC access implementing the chainHead v1 JSON-RPC spec over binary protocol.",
568
+ "methods": [
569
+ "remote_chain_head_follow",
570
+ "remote_chain_head_header",
571
+ "remote_chain_head_body",
572
+ "remote_chain_head_storage",
573
+ "remote_chain_head_call",
574
+ "remote_chain_head_unpin",
575
+ "remote_chain_head_continue",
576
+ "remote_chain_head_stop_operation",
577
+ "remote_chain_spec_genesis_hash",
578
+ "remote_chain_spec_chain_name",
579
+ "remote_chain_spec_properties",
580
+ "remote_chain_transaction_broadcast",
581
+ "remote_chain_transaction_stop"
582
+ ]
583
+ },
584
+ {
585
+ "id": "payment",
586
+ "name": "Payment",
587
+ "description": "Coinage API for balance subscriptions, top-ups, payment requests, and payment status tracking.",
588
+ "methods": [
589
+ "host_payment_balance_subscribe",
590
+ "host_payment_top_up",
591
+ "host_payment_request",
592
+ "host_payment_status_subscribe"
593
+ ]
594
+ },
595
+ {
596
+ "id": "entropy",
597
+ "name": "Entropy",
598
+ "description": "Deterministic entropy derivation scoped to product and user via BLAKE2b-256 keyed hashing.",
599
+ "methods": [
600
+ "host_derive_entropy"
601
+ ]
602
+ },
603
+ {
604
+ "id": "theme",
605
+ "name": "Theme",
606
+ "description": "Host visual theme subscription.",
607
+ "methods": [
608
+ "host_theme_subscribe"
609
+ ]
610
+ }
611
+ ],
612
+ "dataTypes": [
613
+ {
614
+ "id": "str",
615
+ "name": "str",
616
+ "category": "Primitives",
617
+ "source": null,
618
+ "definition": "length-prefixed UTF-8",
619
+ "description": "String value, SCALE-encoded as length-prefixed UTF-8 bytes.",
620
+ "fields": [],
621
+ "variants": []
622
+ },
623
+ {
624
+ "id": "bool",
625
+ "name": "bool",
626
+ "category": "Primitives",
627
+ "source": null,
628
+ "definition": "single byte",
629
+ "description": "Boolean value encoded as a single byte (0x00 = false, 0x01 = true).",
630
+ "fields": [],
631
+ "variants": []
632
+ },
633
+ {
634
+ "id": "u8",
635
+ "name": "u8",
636
+ "category": "Primitives",
637
+ "source": null,
638
+ "definition": "1 byte unsigned",
639
+ "description": "8-bit unsigned integer.",
640
+ "fields": [],
641
+ "variants": []
642
+ },
643
+ {
644
+ "id": "u32",
645
+ "name": "u32",
646
+ "category": "Primitives",
647
+ "source": null,
648
+ "definition": "4 bytes LE unsigned",
649
+ "description": "32-bit unsigned integer, little-endian encoded.",
650
+ "fields": [],
651
+ "variants": []
652
+ },
653
+ {
654
+ "id": "u64",
655
+ "name": "u64",
656
+ "category": "Primitives",
657
+ "source": null,
658
+ "definition": "8 bytes LE unsigned",
659
+ "description": "64-bit unsigned integer, little-endian encoded.",
660
+ "fields": [],
661
+ "variants": []
662
+ },
663
+ {
664
+ "id": "u128",
665
+ "name": "u128",
666
+ "category": "Primitives",
667
+ "source": null,
668
+ "definition": "16 bytes LE unsigned",
669
+ "description": "128-bit unsigned integer, little-endian encoded.",
670
+ "fields": [],
671
+ "variants": []
672
+ },
673
+ {
674
+ "id": "compact",
675
+ "name": "compact",
676
+ "category": "Primitives",
677
+ "source": null,
678
+ "definition": "SCALE compact integer",
679
+ "description": "Variable-length unsigned integer using SCALE compact encoding.",
680
+ "fields": [],
681
+ "variants": []
682
+ },
683
+ {
684
+ "id": "Hex",
685
+ "name": "Hex / Hex()",
686
+ "category": "Primitives",
687
+ "source": null,
688
+ "definition": "length-prefixed bytes",
689
+ "description": "Arbitrary hex-encoded bytes, SCALE length-prefixed.",
690
+ "fields": [],
691
+ "variants": []
692
+ },
693
+ {
694
+ "id": "Bytes",
695
+ "name": "Bytes()",
696
+ "category": "Primitives",
697
+ "source": null,
698
+ "definition": "length-prefixed bytes",
699
+ "description": "Arbitrary binary data, SCALE length-prefixed.",
700
+ "fields": [],
701
+ "variants": []
702
+ },
703
+ {
704
+ "id": "BytesN",
705
+ "name": "Bytes(N)",
706
+ "category": "Primitives",
707
+ "source": null,
708
+ "definition": "fixed N bytes",
709
+ "description": "Fixed-length binary data of exactly N bytes.",
710
+ "fields": [],
711
+ "variants": []
712
+ },
713
+ {
714
+ "id": "_void",
715
+ "name": "_void",
716
+ "category": "Primitives",
717
+ "source": null,
718
+ "definition": "zero bytes",
719
+ "description": "Unit type / no data. Takes zero bytes on the wire.",
720
+ "fields": [],
721
+ "variants": []
722
+ },
723
+ {
724
+ "id": "Option",
725
+ "name": "Option(T)",
726
+ "category": "Combinators",
727
+ "source": null,
728
+ "definition": "None (0x00) or Some(T) (0x01 + encoded T)",
729
+ "description": "Optional value. Encoded as 0x00 for None, or 0x01 followed by the encoded inner value.",
730
+ "fields": [],
731
+ "variants": []
732
+ },
733
+ {
734
+ "id": "Nullable",
735
+ "name": "Nullable(T)",
736
+ "category": "Combinators",
737
+ "source": null,
738
+ "definition": "Null or T",
739
+ "description": "Similar to Option but with different encoding semantics for null values.",
740
+ "fields": [],
741
+ "variants": []
742
+ },
743
+ {
744
+ "id": "Vector",
745
+ "name": "Vector(T)",
746
+ "category": "Combinators",
747
+ "source": null,
748
+ "definition": "Length-prefixed array of T",
749
+ "description": "A variable-length array. Encoded as a compact length prefix followed by each element.",
750
+ "fields": [],
751
+ "variants": []
752
+ },
753
+ {
754
+ "id": "Tuple",
755
+ "name": "Tuple(A, B, ...)",
756
+ "category": "Combinators",
757
+ "source": null,
758
+ "definition": "Concatenated encodings of A, B, ...",
759
+ "description": "Fixed-size collection of values of potentially different types, encoded by concatenation.",
760
+ "fields": [],
761
+ "variants": []
762
+ },
763
+ {
764
+ "id": "Struct",
765
+ "name": "Struct({ k: T, ... })",
766
+ "category": "Combinators",
767
+ "source": null,
768
+ "definition": "Concatenated encodings of fields in definition order",
769
+ "description": "Named fields encoded in declaration order by concatenation.",
770
+ "fields": [],
771
+ "variants": []
772
+ },
773
+ {
774
+ "id": "Enum",
775
+ "name": "Enum({ V1: T1, V2: T2, ... })",
776
+ "category": "Combinators",
777
+ "source": null,
778
+ "definition": "Tag byte + variant encoding",
779
+ "description": "Tagged union. A single tag byte selects the variant, followed by that variant's encoding.",
780
+ "fields": [],
781
+ "variants": []
782
+ },
783
+ {
784
+ "id": "Status",
785
+ "name": "Status(s1, s2, ...)",
786
+ "category": "Combinators",
787
+ "source": null,
788
+ "definition": "Enum where each variant carries _void",
789
+ "description": "Enumeration of named states, each carrying no data (all variants are _void).",
790
+ "fields": [],
791
+ "variants": []
792
+ },
793
+ {
794
+ "id": "Result",
795
+ "name": "Result(Ok, Err)",
796
+ "category": "Combinators",
797
+ "source": null,
798
+ "definition": "0x00 + Ok encoding, or 0x01 + Err encoding",
799
+ "description": "Success/failure wrapper. 0x00 prefix for Ok, 0x01 prefix for Err.",
800
+ "fields": [],
801
+ "variants": []
802
+ },
803
+ {
804
+ "id": "ErrEnum",
805
+ "name": "ErrEnum(name, variants)",
806
+ "category": "Combinators",
807
+ "source": null,
808
+ "definition": "Error enum with descriptive variant names",
809
+ "description": "Specialized enum used for error types with human-readable variant names.",
810
+ "fields": [],
811
+ "variants": []
812
+ },
813
+ {
814
+ "id": "GenesisHash",
815
+ "name": "GenesisHash",
816
+ "category": "Common",
817
+ "source": "commonCodecs.ts",
818
+ "definition": "Hex()",
819
+ "description": "Blockchain genesis hash, used to identify a specific chain.",
820
+ "fields": [],
821
+ "variants": []
822
+ },
823
+ {
824
+ "id": "GenericErr",
825
+ "name": "GenericErr",
826
+ "category": "Common",
827
+ "source": "commonCodecs.ts",
828
+ "definition": "Struct({ reason: str })",
829
+ "description": "Generic error payload carrying a human-readable reason string.",
830
+ "fields": [],
831
+ "variants": []
832
+ },
833
+ {
834
+ "id": "GenericError",
835
+ "name": "GenericError",
836
+ "category": "Common",
837
+ "source": "commonCodecs.ts",
838
+ "definition": "ErrEnum { GenericError(GenericErr) }",
839
+ "description": "Single-variant error enum wrapping GenericErr. Used by many methods as a catch-all error type.",
840
+ "fields": [],
841
+ "variants": []
842
+ },
843
+ {
844
+ "id": "AccountId",
845
+ "name": "AccountId",
846
+ "category": "Account",
847
+ "source": "accounts.ts",
848
+ "definition": "Bytes(32)",
849
+ "description": "32-byte account identifier (typically an SS58 public key).",
850
+ "fields": [],
851
+ "variants": []
852
+ },
853
+ {
854
+ "id": "PublicKey",
855
+ "name": "PublicKey",
856
+ "category": "Account",
857
+ "source": "accounts.ts",
858
+ "definition": "Bytes()",
859
+ "description": "Variable-length public key.",
860
+ "fields": [],
861
+ "variants": []
862
+ },
863
+ {
864
+ "id": "DotNsIdentifier",
865
+ "name": "DotNsIdentifier",
866
+ "category": "Account",
867
+ "source": "accounts.ts",
868
+ "definition": "str",
869
+ "description": "A dotNS domain name identifier (e.g., \"my-product.dot\").",
870
+ "fields": [],
871
+ "variants": []
872
+ },
873
+ {
874
+ "id": "DerivationIndex",
875
+ "name": "DerivationIndex",
876
+ "category": "Account",
877
+ "source": "accounts.ts",
878
+ "definition": "u32",
879
+ "description": "Key derivation index for generating product-specific accounts.",
880
+ "fields": [],
881
+ "variants": []
882
+ },
883
+ {
884
+ "id": "ProductAccountId",
885
+ "name": "ProductAccountId",
886
+ "category": "Account",
887
+ "source": "accounts.ts",
888
+ "definition": "Tuple(DotNsIdentifier, DerivationIndex)",
889
+ "description": "Identifies a product-specific account by combining a dotNS domain name with a derivation index.",
890
+ "fields": [],
891
+ "variants": []
892
+ },
893
+ {
894
+ "id": "ProductAccount",
895
+ "name": "ProductAccount",
896
+ "category": "Account",
897
+ "source": "accounts.ts",
898
+ "definition": "Struct({ publicKey: PublicKey })",
899
+ "description": "A protocol-derived, product-scoped account. No user-chosen label.",
900
+ "fields": [
901
+ {
902
+ "name": "publicKey",
903
+ "type": "PublicKey",
904
+ "description": "The account public key (variable-length Bytes)"
905
+ }
906
+ ],
907
+ "variants": []
908
+ },
909
+ {
910
+ "id": "LegacyAccount",
911
+ "name": "LegacyAccount",
912
+ "category": "Account",
913
+ "source": "accounts.ts",
914
+ "definition": "Struct({ publicKey: PublicKey, name: Option(str) })",
915
+ "description": "A user-imported account. May carry a user-chosen label.",
916
+ "fields": [
917
+ {
918
+ "name": "publicKey",
919
+ "type": "PublicKey",
920
+ "description": "The account public key (variable-length Bytes)"
921
+ },
922
+ {
923
+ "name": "name",
924
+ "type": "Option(str)",
925
+ "description": "Optional human-readable display name"
926
+ }
927
+ ],
928
+ "variants": []
929
+ },
930
+ {
931
+ "id": "ContextualAlias",
932
+ "name": "ContextualAlias",
933
+ "category": "Account",
934
+ "source": "accounts.ts",
935
+ "definition": "Struct({ context: Bytes(32), alias: Bytes() })",
936
+ "description": "A privacy-preserving alias derived via ring VRF, bound to a specific context.",
937
+ "fields": [
938
+ {
939
+ "name": "context",
940
+ "type": "Bytes(32)",
941
+ "description": "32-byte context identifier"
942
+ },
943
+ {
944
+ "name": "alias",
945
+ "type": "Bytes()",
946
+ "description": "Ring VRF alias (variable length)"
947
+ }
948
+ ],
949
+ "variants": []
950
+ },
951
+ {
952
+ "id": "RingLocationHint",
953
+ "name": "RingLocationHint",
954
+ "category": "Account",
955
+ "source": "accounts.ts",
956
+ "definition": "Struct({ palletInstance: Option(u32) })",
957
+ "description": "Hints for locating a ring on-chain.",
958
+ "fields": [
959
+ {
960
+ "name": "palletInstance",
961
+ "type": "Option(u32)",
962
+ "description": "Optional pallet instance index"
963
+ }
964
+ ],
965
+ "variants": []
966
+ },
967
+ {
968
+ "id": "RingLocation",
969
+ "name": "RingLocation",
970
+ "category": "Account",
971
+ "source": "accounts.ts",
972
+ "definition": "Struct({ genesisHash: GenesisHash, ringRootHash: Hex(), hints: Option(RingLocationHint) })",
973
+ "description": "Locates a specific ring on a specific chain for ring VRF operations.",
974
+ "fields": [
975
+ {
976
+ "name": "genesisHash",
977
+ "type": "GenesisHash",
978
+ "description": "Chain genesis hash"
979
+ },
980
+ {
981
+ "name": "ringRootHash",
982
+ "type": "Hex()",
983
+ "description": "Root hash of the ring"
984
+ },
985
+ {
986
+ "name": "hints",
987
+ "type": "Option(RingLocationHint)",
988
+ "description": "Optional location hints"
989
+ }
990
+ ],
991
+ "variants": []
992
+ },
993
+ {
994
+ "id": "RingVrfProof",
995
+ "name": "RingVrfProof",
996
+ "category": "Account",
997
+ "source": "accounts.ts",
998
+ "definition": "Bytes()",
999
+ "description": "Variable-length ring VRF proof bytes.",
1000
+ "fields": [],
1001
+ "variants": []
1002
+ },
1003
+ {
1004
+ "id": "AccountConnectionStatus",
1005
+ "name": "AccountConnectionStatus",
1006
+ "category": "Account",
1007
+ "source": "accounts.ts",
1008
+ "definition": "Status('disconnected', 'connected')",
1009
+ "description": "Status enum representing the user's authentication state.",
1010
+ "fields": [],
1011
+ "variants": []
1012
+ },
1013
+ {
1014
+ "id": "LoginResult",
1015
+ "name": "LoginResult",
1016
+ "category": "Account",
1017
+ "source": "accounts.ts",
1018
+ "definition": "Status('Success', 'AlreadyConnected', 'Rejected')",
1019
+ "description": "Outcome of a login request.",
1020
+ "fields": [],
1021
+ "variants": []
1022
+ },
1023
+ {
1024
+ "id": "LoginError",
1025
+ "name": "LoginError",
1026
+ "category": "Account",
1027
+ "source": "accounts.ts",
1028
+ "definition": "ErrEnum { Unknown({ reason: str }) }",
1029
+ "description": "Error from host_request_login.",
1030
+ "fields": [],
1031
+ "variants": [
1032
+ {
1033
+ "name": "Unknown",
1034
+ "type": "Struct({ reason: str })",
1035
+ "description": "Catch-all"
1036
+ }
1037
+ ]
1038
+ },
1039
+ {
1040
+ "id": "UserIdentity",
1041
+ "name": "UserIdentity",
1042
+ "category": "Account",
1043
+ "source": "accounts.ts",
1044
+ "definition": "Struct({ primaryUsername: DotNsIdentifier, publicKey: PublicKey })",
1045
+ "description": "The user's primary DotNS account identity. V0.2 addition.",
1046
+ "fields": [
1047
+ {
1048
+ "name": "primaryUsername",
1049
+ "type": "DotNsIdentifier",
1050
+ "description": "The user's primary DotNS username"
1051
+ },
1052
+ {
1053
+ "name": "publicKey",
1054
+ "type": "PublicKey",
1055
+ "description": "The user's primary public key"
1056
+ }
1057
+ ],
1058
+ "variants": []
1059
+ },
1060
+ {
1061
+ "id": "UserIdentityErr",
1062
+ "name": "UserIdentityErr",
1063
+ "category": "Account",
1064
+ "source": "accounts.ts",
1065
+ "definition": "ErrEnum { PermissionDenied, NotConnected, Unknown({ reason: str }) }",
1066
+ "description": "Error from host_get_user_id. V0.2 addition.",
1067
+ "fields": [],
1068
+ "variants": [
1069
+ {
1070
+ "name": "PermissionDenied",
1071
+ "type": "_void",
1072
+ "description": "User denied the identity disclosure request"
1073
+ },
1074
+ {
1075
+ "name": "NotConnected",
1076
+ "type": "_void",
1077
+ "description": "User is not logged in"
1078
+ },
1079
+ {
1080
+ "name": "Unknown",
1081
+ "type": "Struct({ reason: str })",
1082
+ "description": "Catch-all"
1083
+ }
1084
+ ]
1085
+ },
1086
+ {
1087
+ "id": "RequestCredentialsErr",
1088
+ "name": "RequestCredentialsErr",
1089
+ "category": "Account",
1090
+ "source": "accounts.ts",
1091
+ "definition": "ErrEnum { NotConnected, Rejected, DomainNotValid, Unknown({ reason: str }) }",
1092
+ "description": "Error returned when credential/account requests fail.",
1093
+ "fields": [],
1094
+ "variants": [
1095
+ {
1096
+ "name": "NotConnected",
1097
+ "type": "_void",
1098
+ "description": "User is not logged in"
1099
+ },
1100
+ {
1101
+ "name": "Rejected",
1102
+ "type": "_void",
1103
+ "description": "User or host rejected the request"
1104
+ },
1105
+ {
1106
+ "name": "DomainNotValid",
1107
+ "type": "_void",
1108
+ "description": "Domain identifier is invalid"
1109
+ },
1110
+ {
1111
+ "name": "Unknown",
1112
+ "type": "Struct({ reason: str })",
1113
+ "description": "Catch-all error with reason"
1114
+ }
1115
+ ]
1116
+ },
1117
+ {
1118
+ "id": "CreateProofErr",
1119
+ "name": "CreateProofErr",
1120
+ "category": "Account",
1121
+ "source": "accounts.ts",
1122
+ "definition": "ErrEnum { RingNotFound, Rejected, Unknown({ reason: str }) }",
1123
+ "description": "Error returned when ring VRF proof creation fails.",
1124
+ "fields": [],
1125
+ "variants": [
1126
+ {
1127
+ "name": "RingNotFound",
1128
+ "type": "_void",
1129
+ "description": "Ring not available at the specified location"
1130
+ },
1131
+ {
1132
+ "name": "Rejected",
1133
+ "type": "_void",
1134
+ "description": "User or host rejected"
1135
+ },
1136
+ {
1137
+ "name": "Unknown",
1138
+ "type": "Struct({ reason: str })",
1139
+ "description": "Catch-all"
1140
+ }
1141
+ ]
1142
+ },
1143
+ {
1144
+ "id": "SigningPayload",
1145
+ "name": "SigningPayload",
1146
+ "category": "Signing",
1147
+ "source": "sign.ts",
1148
+ "definition": "Struct({ account, blockHash, blockNumber, era, genesisHash, method, nonce, specVersion, tip, transactionVersion, signedExtensions, version, assetId?, metadataHash?, mode?, withSignedTransaction? })",
1149
+ "description": "Full Substrate extrinsic signing payload. V0.2: uses ProductAccountId instead of address string.",
1150
+ "fields": [
1151
+ {
1152
+ "name": "account",
1153
+ "type": "ProductAccountId",
1154
+ "description": "Product account that will sign this payload"
1155
+ },
1156
+ {
1157
+ "name": "blockHash",
1158
+ "type": "Hex()",
1159
+ "description": "Reference block hash"
1160
+ },
1161
+ {
1162
+ "name": "blockNumber",
1163
+ "type": "Hex()",
1164
+ "description": "Reference block number"
1165
+ },
1166
+ {
1167
+ "name": "era",
1168
+ "type": "Hex()",
1169
+ "description": "Mortality era encoding"
1170
+ },
1171
+ {
1172
+ "name": "genesisHash",
1173
+ "type": "GenesisHash",
1174
+ "description": "Chain genesis hash"
1175
+ },
1176
+ {
1177
+ "name": "method",
1178
+ "type": "Hex()",
1179
+ "description": "SCALE-encoded call data"
1180
+ },
1181
+ {
1182
+ "name": "nonce",
1183
+ "type": "Hex()",
1184
+ "description": "Account nonce"
1185
+ },
1186
+ {
1187
+ "name": "specVersion",
1188
+ "type": "Hex()",
1189
+ "description": "Runtime spec version"
1190
+ },
1191
+ {
1192
+ "name": "tip",
1193
+ "type": "Hex()",
1194
+ "description": "Transaction tip"
1195
+ },
1196
+ {
1197
+ "name": "transactionVersion",
1198
+ "type": "Hex()",
1199
+ "description": "Transaction format version"
1200
+ },
1201
+ {
1202
+ "name": "signedExtensions",
1203
+ "type": "Vector(str)",
1204
+ "description": "Extension identifiers"
1205
+ },
1206
+ {
1207
+ "name": "version",
1208
+ "type": "u32",
1209
+ "description": "Extrinsic version"
1210
+ },
1211
+ {
1212
+ "name": "assetId",
1213
+ "type": "Option(Hex())",
1214
+ "description": "For multi-asset tips"
1215
+ },
1216
+ {
1217
+ "name": "metadataHash",
1218
+ "type": "Option(Hex())",
1219
+ "description": "CheckMetadataHash extension"
1220
+ },
1221
+ {
1222
+ "name": "mode",
1223
+ "type": "Option(u32)",
1224
+ "description": "Metadata mode"
1225
+ },
1226
+ {
1227
+ "name": "withSignedTransaction",
1228
+ "type": "Option(bool)",
1229
+ "description": "Request signed tx back"
1230
+ }
1231
+ ],
1232
+ "variants": []
1233
+ },
1234
+ {
1235
+ "id": "RawPayload",
1236
+ "name": "RawPayload",
1237
+ "category": "Signing",
1238
+ "source": "sign.ts",
1239
+ "definition": "Enum({ Bytes: Bytes(), Payload: str })",
1240
+ "description": "Raw data to sign — either binary bytes or a string message.",
1241
+ "fields": [],
1242
+ "variants": [
1243
+ {
1244
+ "name": "Bytes",
1245
+ "type": "Bytes()",
1246
+ "description": "Raw binary data to sign"
1247
+ },
1248
+ {
1249
+ "name": "Payload",
1250
+ "type": "str",
1251
+ "description": "String message to sign"
1252
+ }
1253
+ ]
1254
+ },
1255
+ {
1256
+ "id": "SigningRawPayload",
1257
+ "name": "SigningRawPayload",
1258
+ "category": "Signing",
1259
+ "source": "sign.ts",
1260
+ "definition": "Struct({ account: ProductAccountId, payload: RawPayload })",
1261
+ "description": "A raw signing request pairing a product account with raw data. V0.2: uses ProductAccountId instead of address string.",
1262
+ "fields": [
1263
+ {
1264
+ "name": "account",
1265
+ "type": "ProductAccountId",
1266
+ "description": "Product account that will sign this data"
1267
+ },
1268
+ {
1269
+ "name": "payload",
1270
+ "type": "RawPayload",
1271
+ "description": "The data to sign"
1272
+ }
1273
+ ],
1274
+ "variants": []
1275
+ },
1276
+ {
1277
+ "id": "SigningPayloadPayload",
1278
+ "name": "SigningPayloadPayload",
1279
+ "category": "Signing",
1280
+ "source": "sign.ts",
1281
+ "definition": "Struct({ blockHash, blockNumber, era, genesisHash, method, nonce, specVersion, tip, transactionVersion, signedExtensions, version, assetId?, metadataHash?, mode?, withSignedTransaction? })",
1282
+ "description": "The structured payload fields of a SigningPayload, without the account.",
1283
+ "fields": [
1284
+ {
1285
+ "name": "blockHash",
1286
+ "type": "Hex()",
1287
+ "description": "Reference block hash"
1288
+ },
1289
+ {
1290
+ "name": "blockNumber",
1291
+ "type": "Hex()",
1292
+ "description": "Reference block number"
1293
+ },
1294
+ {
1295
+ "name": "era",
1296
+ "type": "Hex()",
1297
+ "description": "Mortality era encoding"
1298
+ },
1299
+ {
1300
+ "name": "genesisHash",
1301
+ "type": "GenesisHash",
1302
+ "description": "Chain genesis hash"
1303
+ },
1304
+ {
1305
+ "name": "method",
1306
+ "type": "Hex()",
1307
+ "description": "SCALE-encoded call data"
1308
+ },
1309
+ {
1310
+ "name": "nonce",
1311
+ "type": "Hex()",
1312
+ "description": "Account nonce"
1313
+ },
1314
+ {
1315
+ "name": "specVersion",
1316
+ "type": "Hex()",
1317
+ "description": "Runtime spec version"
1318
+ },
1319
+ {
1320
+ "name": "tip",
1321
+ "type": "Hex()",
1322
+ "description": "Transaction tip"
1323
+ },
1324
+ {
1325
+ "name": "transactionVersion",
1326
+ "type": "Hex()",
1327
+ "description": "Transaction format version"
1328
+ },
1329
+ {
1330
+ "name": "signedExtensions",
1331
+ "type": "Vector(str)",
1332
+ "description": "Extension identifiers"
1333
+ },
1334
+ {
1335
+ "name": "version",
1336
+ "type": "u32",
1337
+ "description": "Extrinsic version"
1338
+ },
1339
+ {
1340
+ "name": "assetId",
1341
+ "type": "Option(Hex())",
1342
+ "description": "For multi-asset tips"
1343
+ },
1344
+ {
1345
+ "name": "metadataHash",
1346
+ "type": "Option(Hex())",
1347
+ "description": "CheckMetadataHash extension"
1348
+ },
1349
+ {
1350
+ "name": "mode",
1351
+ "type": "Option(u32)",
1352
+ "description": "Metadata mode"
1353
+ },
1354
+ {
1355
+ "name": "withSignedTransaction",
1356
+ "type": "Option(bool)",
1357
+ "description": "Request signed tx back"
1358
+ }
1359
+ ],
1360
+ "variants": []
1361
+ },
1362
+ {
1363
+ "id": "SigningRawPayloadWithoutAccount",
1364
+ "name": "SigningRawPayloadWithoutAccount",
1365
+ "category": "Signing",
1366
+ "source": "sign.ts",
1367
+ "definition": "Struct({ signer: str, payload: RawPayload })",
1368
+ "description": "A raw signing request using a legacy (non-product) account.",
1369
+ "fields": [
1370
+ {
1371
+ "name": "signer",
1372
+ "type": "str",
1373
+ "description": "Signer identifier (e.g. SS58 address)"
1374
+ },
1375
+ {
1376
+ "name": "payload",
1377
+ "type": "RawPayload",
1378
+ "description": "The data to sign"
1379
+ }
1380
+ ],
1381
+ "variants": []
1382
+ },
1383
+ {
1384
+ "id": "SigningPayloadWithoutAccount",
1385
+ "name": "SigningPayloadWithoutAccount",
1386
+ "category": "Signing",
1387
+ "source": "sign.ts",
1388
+ "definition": "Struct({ signer: str, payload: SigningPayloadPayload })",
1389
+ "description": "A signing request using a legacy (non-product) account.",
1390
+ "fields": [
1391
+ {
1392
+ "name": "signer",
1393
+ "type": "str",
1394
+ "description": "Signer identifier (e.g. SS58 address)"
1395
+ },
1396
+ {
1397
+ "name": "payload",
1398
+ "type": "SigningPayloadPayload",
1399
+ "description": "The structured payload to sign"
1400
+ }
1401
+ ],
1402
+ "variants": []
1403
+ },
1404
+ {
1405
+ "id": "SigningResult",
1406
+ "name": "SigningResult",
1407
+ "category": "Signing",
1408
+ "source": "sign.ts",
1409
+ "definition": "Struct({ signature: Hex(), signedTransaction: Option(Hex()) })",
1410
+ "description": "Result of a signing operation.",
1411
+ "fields": [
1412
+ {
1413
+ "name": "signature",
1414
+ "type": "Hex()",
1415
+ "description": "The cryptographic signature"
1416
+ },
1417
+ {
1418
+ "name": "signedTransaction",
1419
+ "type": "Option(Hex())",
1420
+ "description": "Full signed transaction, if requested"
1421
+ }
1422
+ ],
1423
+ "variants": []
1424
+ },
1425
+ {
1426
+ "id": "SigningErr",
1427
+ "name": "SigningErr",
1428
+ "category": "Signing",
1429
+ "source": "sign.ts",
1430
+ "definition": "ErrEnum { FailedToDecode, Rejected, PermissionDenied, Unknown({ reason: str }) }",
1431
+ "description": "Signing operation error.",
1432
+ "fields": [],
1433
+ "variants": [
1434
+ {
1435
+ "name": "FailedToDecode",
1436
+ "type": "_void",
1437
+ "description": "Payload could not be deserialized"
1438
+ },
1439
+ {
1440
+ "name": "Rejected",
1441
+ "type": "_void",
1442
+ "description": "User rejected signing"
1443
+ },
1444
+ {
1445
+ "name": "PermissionDenied",
1446
+ "type": "_void",
1447
+ "description": "Not authenticated"
1448
+ },
1449
+ {
1450
+ "name": "Unknown",
1451
+ "type": "Struct({ reason: str })",
1452
+ "description": "Catch-all"
1453
+ }
1454
+ ]
1455
+ },
1456
+ {
1457
+ "id": "TxPayloadExtensionV1",
1458
+ "name": "TxPayloadExtensionV1",
1459
+ "category": "Transaction",
1460
+ "source": "createTransaction.ts",
1461
+ "definition": "Struct({ id: str, extra: Hex(), additionalSigned: Hex() })",
1462
+ "description": "A signed extension for a transaction payload.",
1463
+ "fields": [
1464
+ {
1465
+ "name": "id",
1466
+ "type": "str",
1467
+ "description": "Extension name (e.g., \"CheckSpecVersion\")"
1468
+ },
1469
+ {
1470
+ "name": "extra",
1471
+ "type": "Hex()",
1472
+ "description": "SCALE-encoded extra data (in extrinsic body)"
1473
+ },
1474
+ {
1475
+ "name": "additionalSigned",
1476
+ "type": "Hex()",
1477
+ "description": "SCALE-encoded implicit data (signed, not in body)"
1478
+ }
1479
+ ],
1480
+ "variants": []
1481
+ },
1482
+ {
1483
+ "id": "TxPayloadContextV1",
1484
+ "name": "TxPayloadContextV1",
1485
+ "category": "Transaction",
1486
+ "source": "createTransaction.ts",
1487
+ "definition": "Struct({ metadata: Hex(), tokenSymbol: str, tokenDecimals: u32, bestBlockHeight: u32 })",
1488
+ "description": "Context information for transaction construction.",
1489
+ "fields": [
1490
+ {
1491
+ "name": "metadata",
1492
+ "type": "Hex()",
1493
+ "description": "RuntimeMetadataPrefixed blob (SCALE)"
1494
+ },
1495
+ {
1496
+ "name": "tokenSymbol",
1497
+ "type": "str",
1498
+ "description": "Native token symbol"
1499
+ },
1500
+ {
1501
+ "name": "tokenDecimals",
1502
+ "type": "u32",
1503
+ "description": "Native token decimals"
1504
+ },
1505
+ {
1506
+ "name": "bestBlockHeight",
1507
+ "type": "u32",
1508
+ "description": "Highest known block number"
1509
+ }
1510
+ ],
1511
+ "variants": []
1512
+ },
1513
+ {
1514
+ "id": "TxPayloadV1",
1515
+ "name": "TxPayloadV1",
1516
+ "category": "Transaction",
1517
+ "source": "createTransaction.ts",
1518
+ "definition": "Struct({ signer: Nullable(str), callData: Hex(), extensions: Vector(TxPayloadExtensionV1), txExtVersion: u8, context: TxPayloadContextV1 })",
1519
+ "description": "Version 1 transaction payload with all data needed to construct a signed extrinsic.",
1520
+ "fields": [
1521
+ {
1522
+ "name": "signer",
1523
+ "type": "Nullable(str)",
1524
+ "description": "Signer hint (address/name), null = host picks"
1525
+ },
1526
+ {
1527
+ "name": "callData",
1528
+ "type": "Hex()",
1529
+ "description": "SCALE-encoded Call data"
1530
+ },
1531
+ {
1532
+ "name": "extensions",
1533
+ "type": "Vector(TxPayloadExtensionV1)",
1534
+ "description": "Signed extensions"
1535
+ },
1536
+ {
1537
+ "name": "txExtVersion",
1538
+ "type": "u8",
1539
+ "description": "0 for Extrinsic V4, any for V5"
1540
+ },
1541
+ {
1542
+ "name": "context",
1543
+ "type": "TxPayloadContextV1",
1544
+ "description": "Transaction context"
1545
+ }
1546
+ ],
1547
+ "variants": []
1548
+ },
1549
+ {
1550
+ "id": "VersionedTxPayload",
1551
+ "name": "VersionedTxPayload",
1552
+ "category": "Transaction",
1553
+ "source": "createTransaction.ts",
1554
+ "definition": "Enum({ v1: TxPayloadV1 })",
1555
+ "description": "Versioned transaction payload envelope.",
1556
+ "fields": [],
1557
+ "variants": [
1558
+ {
1559
+ "name": "v1",
1560
+ "type": "TxPayloadV1",
1561
+ "description": "Version 1 payload"
1562
+ }
1563
+ ]
1564
+ },
1565
+ {
1566
+ "id": "CreateTransactionErr",
1567
+ "name": "CreateTransactionErr",
1568
+ "category": "Transaction",
1569
+ "source": "createTransaction.ts",
1570
+ "definition": "ErrEnum { FailedToDecode, Rejected, NotSupported(str), PermissionDenied, Unknown({ reason: str }) }",
1571
+ "description": "Transaction creation error.",
1572
+ "fields": [],
1573
+ "variants": [
1574
+ {
1575
+ "name": "FailedToDecode",
1576
+ "type": "_void",
1577
+ "description": "Payload could not be deserialized"
1578
+ },
1579
+ {
1580
+ "name": "Rejected",
1581
+ "type": "_void",
1582
+ "description": "User rejected"
1583
+ },
1584
+ {
1585
+ "name": "NotSupported",
1586
+ "type": "str",
1587
+ "description": "Unsupported payload version or extension"
1588
+ },
1589
+ {
1590
+ "name": "PermissionDenied",
1591
+ "type": "_void",
1592
+ "description": "Not authenticated"
1593
+ },
1594
+ {
1595
+ "name": "Unknown",
1596
+ "type": "Struct({ reason: str })",
1597
+ "description": "Catch-all"
1598
+ }
1599
+ ]
1600
+ },
1601
+ {
1602
+ "id": "StorageKey",
1603
+ "name": "StorageKey",
1604
+ "category": "Storage",
1605
+ "source": "localStorage.ts",
1606
+ "definition": "str",
1607
+ "description": "Key name for local storage operations.",
1608
+ "fields": [],
1609
+ "variants": []
1610
+ },
1611
+ {
1612
+ "id": "StorageValue",
1613
+ "name": "StorageValue",
1614
+ "category": "Storage",
1615
+ "source": "localStorage.ts",
1616
+ "definition": "Bytes()",
1617
+ "description": "Binary value stored in local storage.",
1618
+ "fields": [],
1619
+ "variants": []
1620
+ },
1621
+ {
1622
+ "id": "StorageErr",
1623
+ "name": "StorageErr",
1624
+ "category": "Storage",
1625
+ "source": "localStorage.ts",
1626
+ "definition": "ErrEnum { Full, Unknown({ reason: str }) }",
1627
+ "description": "Local storage operation error.",
1628
+ "fields": [],
1629
+ "variants": [
1630
+ {
1631
+ "name": "Full",
1632
+ "type": "_void",
1633
+ "description": "Storage quota exceeded"
1634
+ },
1635
+ {
1636
+ "name": "Unknown",
1637
+ "type": "Struct({ reason: str })",
1638
+ "description": "Catch-all"
1639
+ }
1640
+ ]
1641
+ },
1642
+ {
1643
+ "id": "NavigateToErr",
1644
+ "name": "NavigateToErr",
1645
+ "category": "Navigation",
1646
+ "source": "navigation.ts",
1647
+ "definition": "ErrEnum { PermissionDenied, Unknown({ reason: str }) }",
1648
+ "description": "Navigation error.",
1649
+ "fields": [],
1650
+ "variants": [
1651
+ {
1652
+ "name": "PermissionDenied",
1653
+ "type": "_void",
1654
+ "description": "Navigation not allowed"
1655
+ },
1656
+ {
1657
+ "name": "Unknown",
1658
+ "type": "Struct({ reason: str })",
1659
+ "description": "Catch-all"
1660
+ }
1661
+ ]
1662
+ },
1663
+ {
1664
+ "id": "PushNotification",
1665
+ "name": "PushNotification",
1666
+ "category": "Notification",
1667
+ "source": "notification.ts",
1668
+ "definition": "Struct({ text: str, deeplink: Option(str) })",
1669
+ "description": "Push notification payload.",
1670
+ "fields": [
1671
+ {
1672
+ "name": "text",
1673
+ "type": "str",
1674
+ "description": "Notification text"
1675
+ },
1676
+ {
1677
+ "name": "deeplink",
1678
+ "type": "Option(str)",
1679
+ "description": "Optional URL to open on tap"
1680
+ }
1681
+ ],
1682
+ "variants": []
1683
+ },
1684
+ {
1685
+ "id": "DevicePermission",
1686
+ "name": "DevicePermission",
1687
+ "category": "Permission",
1688
+ "source": "devicePermission.ts",
1689
+ "definition": "Status('Notifications', 'Camera', 'Microphone', 'Bluetooth', 'Nfc', 'Location', 'Clipboard', 'OpenUrl', 'Biometrics')",
1690
+ "description": "Device capability to request access to. V0.2: extended to 9 variants including Notifications, Nfc, Clipboard, OpenUrl, and Biometrics.",
1691
+ "fields": [],
1692
+ "variants": []
1693
+ },
1694
+ {
1695
+ "id": "RemotePermission",
1696
+ "name": "RemotePermission",
1697
+ "category": "Permission",
1698
+ "source": "remotePermission.ts",
1699
+ "definition": "Enum({ Remote: Vector(str), WebRtc: _void, ChainSubmit: _void, StatementSubmit: _void, PreimageSubmit: _void })",
1700
+ "description": "A single remote-operation permission entry. V0.2: replaces RemotePermissionRequest with batching support via Vector(RemotePermission).",
1701
+ "fields": [],
1702
+ "variants": [
1703
+ {
1704
+ "name": "Remote",
1705
+ "type": "Vector(str)",
1706
+ "description": "HTTP/HTTPS/WS/WSS access to specific domain patterns"
1707
+ },
1708
+ {
1709
+ "name": "WebRtc",
1710
+ "type": "_void",
1711
+ "description": "WebRTC access (can expose user IP)"
1712
+ },
1713
+ {
1714
+ "name": "ChainSubmit",
1715
+ "type": "_void",
1716
+ "description": "Broadcast signed transactions via remote_chain_transaction_broadcast"
1717
+ },
1718
+ {
1719
+ "name": "StatementSubmit",
1720
+ "type": "_void",
1721
+ "description": "Submit statements via remote_statement_store_submit"
1722
+ },
1723
+ {
1724
+ "name": "PreimageSubmit",
1725
+ "type": "_void",
1726
+ "description": "Submit preimages via remote_preimage_submit"
1727
+ }
1728
+ ]
1729
+ },
1730
+ {
1731
+ "id": "Feature",
1732
+ "name": "Feature",
1733
+ "category": "Feature",
1734
+ "source": "feature.ts",
1735
+ "definition": "Enum({ Chain: GenesisHash })",
1736
+ "description": "Feature to check for host support.",
1737
+ "fields": [],
1738
+ "variants": [
1739
+ {
1740
+ "name": "Chain",
1741
+ "type": "GenesisHash",
1742
+ "description": "Is this blockchain supported?"
1743
+ }
1744
+ ]
1745
+ },
1746
+ {
1747
+ "id": "ChatRoomRequest",
1748
+ "name": "ChatRoomRequest",
1749
+ "category": "Chat",
1750
+ "source": "chat.ts",
1751
+ "definition": "Struct({ roomId: str, name: str, icon: str })",
1752
+ "description": "Request to create a chat room.",
1753
+ "fields": [
1754
+ {
1755
+ "name": "roomId",
1756
+ "type": "str",
1757
+ "description": "Unique room identifier"
1758
+ },
1759
+ {
1760
+ "name": "name",
1761
+ "type": "str",
1762
+ "description": "Room display name"
1763
+ },
1764
+ {
1765
+ "name": "icon",
1766
+ "type": "str",
1767
+ "description": "URL or base64 image"
1768
+ }
1769
+ ],
1770
+ "variants": []
1771
+ },
1772
+ {
1773
+ "id": "ChatRoomRegistrationStatus",
1774
+ "name": "ChatRoomRegistrationStatus",
1775
+ "category": "Chat",
1776
+ "source": "chat.ts",
1777
+ "definition": "Status('New', 'Exists')",
1778
+ "description": "Whether the room was newly created or already existed.",
1779
+ "fields": [],
1780
+ "variants": []
1781
+ },
1782
+ {
1783
+ "id": "ChatRoomRegistrationResult",
1784
+ "name": "ChatRoomRegistrationResult",
1785
+ "category": "Chat",
1786
+ "source": "chat.ts",
1787
+ "definition": "Struct({ status: ChatRoomRegistrationStatus })",
1788
+ "description": "Result of a room registration.",
1789
+ "fields": [
1790
+ {
1791
+ "name": "status",
1792
+ "type": "ChatRoomRegistrationStatus",
1793
+ "description": "\"New\" or \"Exists\""
1794
+ }
1795
+ ],
1796
+ "variants": []
1797
+ },
1798
+ {
1799
+ "id": "SimpleGroupChatRequest",
1800
+ "name": "SimpleGroupChatRequest",
1801
+ "category": "Chat",
1802
+ "source": "chat.ts",
1803
+ "definition": "Struct({ roomId: str, name: str, icon: str })",
1804
+ "description": "Request to create a simple group chat room. V0.2 addition: lightweight group chat where participants join via deep link.",
1805
+ "fields": [
1806
+ {
1807
+ "name": "roomId",
1808
+ "type": "str",
1809
+ "description": "Unique room identifier source"
1810
+ },
1811
+ {
1812
+ "name": "name",
1813
+ "type": "str",
1814
+ "description": "Room display name"
1815
+ },
1816
+ {
1817
+ "name": "icon",
1818
+ "type": "str",
1819
+ "description": "URL or base64 image for room avatar"
1820
+ }
1821
+ ],
1822
+ "variants": []
1823
+ },
1824
+ {
1825
+ "id": "SimpleGroupChatResult",
1826
+ "name": "SimpleGroupChatResult",
1827
+ "category": "Chat",
1828
+ "source": "chat.ts",
1829
+ "definition": "Struct({ status: ChatRoomRegistrationStatus, joinLink: str })",
1830
+ "description": "Result of creating a simple group chat room. V0.2 addition.",
1831
+ "fields": [
1832
+ {
1833
+ "name": "status",
1834
+ "type": "ChatRoomRegistrationStatus",
1835
+ "description": "Whether the room was newly created or already existed"
1836
+ },
1837
+ {
1838
+ "name": "joinLink",
1839
+ "type": "str",
1840
+ "description": "Deep link that participants can use to join the room"
1841
+ }
1842
+ ],
1843
+ "variants": []
1844
+ },
1845
+ {
1846
+ "id": "ChatBotRequest",
1847
+ "name": "ChatBotRequest",
1848
+ "category": "Chat",
1849
+ "source": "chat.ts",
1850
+ "definition": "Struct({ botId: str, name: str, icon: str })",
1851
+ "description": "Request to register a chat bot.",
1852
+ "fields": [
1853
+ {
1854
+ "name": "botId",
1855
+ "type": "str",
1856
+ "description": "Unique bot identifier"
1857
+ },
1858
+ {
1859
+ "name": "name",
1860
+ "type": "str",
1861
+ "description": "Bot display name"
1862
+ },
1863
+ {
1864
+ "name": "icon",
1865
+ "type": "str",
1866
+ "description": "URL or base64 image"
1867
+ }
1868
+ ],
1869
+ "variants": []
1870
+ },
1871
+ {
1872
+ "id": "ChatBotRegistrationStatus",
1873
+ "name": "ChatBotRegistrationStatus",
1874
+ "category": "Chat",
1875
+ "source": "chat.ts",
1876
+ "definition": "Status('New', 'Exists')",
1877
+ "description": "Whether the bot was newly registered or already existed.",
1878
+ "fields": [],
1879
+ "variants": []
1880
+ },
1881
+ {
1882
+ "id": "ChatBotRegistrationResult",
1883
+ "name": "ChatBotRegistrationResult",
1884
+ "category": "Chat",
1885
+ "source": "chat.ts",
1886
+ "definition": "Struct({ status: ChatBotRegistrationStatus })",
1887
+ "description": "Result of a bot registration.",
1888
+ "fields": [
1889
+ {
1890
+ "name": "status",
1891
+ "type": "ChatBotRegistrationStatus",
1892
+ "description": "\"New\" or \"Exists\""
1893
+ }
1894
+ ],
1895
+ "variants": []
1896
+ },
1897
+ {
1898
+ "id": "ChatRoomParticipation",
1899
+ "name": "ChatRoomParticipation",
1900
+ "category": "Chat",
1901
+ "source": "chat.ts",
1902
+ "definition": "Status('RoomHost', 'Bot')",
1903
+ "description": "How the product participates in a chat room.",
1904
+ "fields": [],
1905
+ "variants": []
1906
+ },
1907
+ {
1908
+ "id": "ChatRoom",
1909
+ "name": "ChatRoom",
1910
+ "category": "Chat",
1911
+ "source": "chat.ts",
1912
+ "definition": "Struct({ roomId: str, participatingAs: ChatRoomParticipation })",
1913
+ "description": "A chat room the product participates in.",
1914
+ "fields": [
1915
+ {
1916
+ "name": "roomId",
1917
+ "type": "str",
1918
+ "description": "Room identifier"
1919
+ },
1920
+ {
1921
+ "name": "participatingAs",
1922
+ "type": "ChatRoomParticipation",
1923
+ "description": "\"RoomHost\" or \"Bot\""
1924
+ }
1925
+ ],
1926
+ "variants": []
1927
+ },
1928
+ {
1929
+ "id": "ChatAction",
1930
+ "name": "ChatAction",
1931
+ "category": "Chat",
1932
+ "source": "chat.ts",
1933
+ "definition": "Struct({ actionId: str, title: str })",
1934
+ "description": "A clickable action button in a chat message.",
1935
+ "fields": [
1936
+ {
1937
+ "name": "actionId",
1938
+ "type": "str",
1939
+ "description": "Action identifier"
1940
+ },
1941
+ {
1942
+ "name": "title",
1943
+ "type": "str",
1944
+ "description": "Button label"
1945
+ }
1946
+ ],
1947
+ "variants": []
1948
+ },
1949
+ {
1950
+ "id": "ChatActionLayout",
1951
+ "name": "ChatActionLayout",
1952
+ "category": "Chat",
1953
+ "source": "chat.ts",
1954
+ "definition": "Status('Column', 'Grid')",
1955
+ "description": "Layout for action buttons.",
1956
+ "fields": [],
1957
+ "variants": []
1958
+ },
1959
+ {
1960
+ "id": "ChatActions",
1961
+ "name": "ChatActions",
1962
+ "category": "Chat",
1963
+ "source": "chat.ts",
1964
+ "definition": "Struct({ text: Option(str), actions: Vector(ChatAction), layout: ChatActionLayout })",
1965
+ "description": "A set of action buttons with optional text.",
1966
+ "fields": [
1967
+ {
1968
+ "name": "text",
1969
+ "type": "Option(str)",
1970
+ "description": "Optional message text"
1971
+ },
1972
+ {
1973
+ "name": "actions",
1974
+ "type": "Vector(ChatAction)",
1975
+ "description": "List of action buttons"
1976
+ },
1977
+ {
1978
+ "name": "layout",
1979
+ "type": "ChatActionLayout",
1980
+ "description": "\"Column\" or \"Grid\" layout"
1981
+ }
1982
+ ],
1983
+ "variants": []
1984
+ },
1985
+ {
1986
+ "id": "ChatMedia",
1987
+ "name": "ChatMedia",
1988
+ "category": "Chat",
1989
+ "source": "chat.ts",
1990
+ "definition": "Struct({ url: str })",
1991
+ "description": "A media attachment.",
1992
+ "fields": [
1993
+ {
1994
+ "name": "url",
1995
+ "type": "str",
1996
+ "description": "Media URL"
1997
+ }
1998
+ ],
1999
+ "variants": []
2000
+ },
2001
+ {
2002
+ "id": "ChatRichText",
2003
+ "name": "ChatRichText",
2004
+ "category": "Chat",
2005
+ "source": "chat.ts",
2006
+ "definition": "Struct({ text: Option(str), media: Vector(ChatMedia) })",
2007
+ "description": "Rich text message with optional media.",
2008
+ "fields": [
2009
+ {
2010
+ "name": "text",
2011
+ "type": "Option(str)",
2012
+ "description": "Optional text content"
2013
+ },
2014
+ {
2015
+ "name": "media",
2016
+ "type": "Vector(ChatMedia)",
2017
+ "description": "Attached media items"
2018
+ }
2019
+ ],
2020
+ "variants": []
2021
+ },
2022
+ {
2023
+ "id": "ChatFile",
2024
+ "name": "ChatFile",
2025
+ "category": "Chat",
2026
+ "source": "chat.ts",
2027
+ "definition": "Struct({ url: str, fileName: str, mimeType: str, sizeBytes: u64, text: Option(str) })",
2028
+ "description": "A file attachment in a chat message.",
2029
+ "fields": [
2030
+ {
2031
+ "name": "url",
2032
+ "type": "str",
2033
+ "description": "File download URL"
2034
+ },
2035
+ {
2036
+ "name": "fileName",
2037
+ "type": "str",
2038
+ "description": "File name"
2039
+ },
2040
+ {
2041
+ "name": "mimeType",
2042
+ "type": "str",
2043
+ "description": "MIME type"
2044
+ },
2045
+ {
2046
+ "name": "sizeBytes",
2047
+ "type": "u64",
2048
+ "description": "File size in bytes"
2049
+ },
2050
+ {
2051
+ "name": "text",
2052
+ "type": "Option(str)",
2053
+ "description": "Optional caption text"
2054
+ }
2055
+ ],
2056
+ "variants": []
2057
+ },
2058
+ {
2059
+ "id": "ChatReaction",
2060
+ "name": "ChatReaction",
2061
+ "category": "Chat",
2062
+ "source": "chat.ts",
2063
+ "definition": "Struct({ messageId: str, emoji: str })",
2064
+ "description": "A reaction to a chat message.",
2065
+ "fields": [
2066
+ {
2067
+ "name": "messageId",
2068
+ "type": "str",
2069
+ "description": "Message being reacted to"
2070
+ },
2071
+ {
2072
+ "name": "emoji",
2073
+ "type": "str",
2074
+ "description": "Emoji reaction"
2075
+ }
2076
+ ],
2077
+ "variants": []
2078
+ },
2079
+ {
2080
+ "id": "ChatCustomMessage",
2081
+ "name": "ChatCustomMessage",
2082
+ "category": "Chat",
2083
+ "source": "chat.ts",
2084
+ "definition": "Struct({ messageType: str, payload: Bytes() })",
2085
+ "description": "A custom message with application-defined type and binary payload.",
2086
+ "fields": [
2087
+ {
2088
+ "name": "messageType",
2089
+ "type": "str",
2090
+ "description": "Application-defined type key"
2091
+ },
2092
+ {
2093
+ "name": "payload",
2094
+ "type": "Bytes()",
2095
+ "description": "Binary payload"
2096
+ }
2097
+ ],
2098
+ "variants": []
2099
+ },
2100
+ {
2101
+ "id": "ChatMessageContent",
2102
+ "name": "ChatMessageContent",
2103
+ "category": "Chat",
2104
+ "source": "chat.ts",
2105
+ "definition": "Enum({ Text: str, RichText: ChatRichText, Actions: ChatActions, File: ChatFile, Reaction: ChatReaction, ReactionRemoved: ChatReaction, Custom: ChatCustomMessage })",
2106
+ "description": "Content of a chat message — one of several types.",
2107
+ "fields": [],
2108
+ "variants": [
2109
+ {
2110
+ "name": "Text",
2111
+ "type": "str",
2112
+ "description": "Plain text message"
2113
+ },
2114
+ {
2115
+ "name": "RichText",
2116
+ "type": "ChatRichText",
2117
+ "description": "Rich text with media"
2118
+ },
2119
+ {
2120
+ "name": "Actions",
2121
+ "type": "ChatActions",
2122
+ "description": "Action button set"
2123
+ },
2124
+ {
2125
+ "name": "File",
2126
+ "type": "ChatFile",
2127
+ "description": "File attachment"
2128
+ },
2129
+ {
2130
+ "name": "Reaction",
2131
+ "type": "ChatReaction",
2132
+ "description": "Emoji reaction"
2133
+ },
2134
+ {
2135
+ "name": "ReactionRemoved",
2136
+ "type": "ChatReaction",
2137
+ "description": "Reaction removal"
2138
+ },
2139
+ {
2140
+ "name": "Custom",
2141
+ "type": "ChatCustomMessage",
2142
+ "description": "Custom message"
2143
+ }
2144
+ ]
2145
+ },
2146
+ {
2147
+ "id": "ChatPostMessageResult",
2148
+ "name": "ChatPostMessageResult",
2149
+ "category": "Chat",
2150
+ "source": "chat.ts",
2151
+ "definition": "Struct({ messageId: str })",
2152
+ "description": "Result of posting a message.",
2153
+ "fields": [
2154
+ {
2155
+ "name": "messageId",
2156
+ "type": "str",
2157
+ "description": "Assigned message ID"
2158
+ }
2159
+ ],
2160
+ "variants": []
2161
+ },
2162
+ {
2163
+ "id": "ActionTrigger",
2164
+ "name": "ActionTrigger",
2165
+ "category": "Chat",
2166
+ "source": "chat.ts",
2167
+ "definition": "Struct({ messageId: str, actionId: str, payload: Option(Bytes()) })",
2168
+ "description": "Payload when a user clicks an action button.",
2169
+ "fields": [
2170
+ {
2171
+ "name": "messageId",
2172
+ "type": "str",
2173
+ "description": "Message containing the action"
2174
+ },
2175
+ {
2176
+ "name": "actionId",
2177
+ "type": "str",
2178
+ "description": "Which action was triggered"
2179
+ },
2180
+ {
2181
+ "name": "payload",
2182
+ "type": "Option(Bytes())",
2183
+ "description": "Optional additional data"
2184
+ }
2185
+ ],
2186
+ "variants": []
2187
+ },
2188
+ {
2189
+ "id": "ChatCommand",
2190
+ "name": "ChatCommand",
2191
+ "category": "Chat",
2192
+ "source": "chat.ts",
2193
+ "definition": "Struct({ command: str, payload: str })",
2194
+ "description": "A slash command from a chat user.",
2195
+ "fields": [
2196
+ {
2197
+ "name": "command",
2198
+ "type": "str",
2199
+ "description": "Command name"
2200
+ },
2201
+ {
2202
+ "name": "payload",
2203
+ "type": "str",
2204
+ "description": "Command arguments"
2205
+ }
2206
+ ],
2207
+ "variants": []
2208
+ },
2209
+ {
2210
+ "id": "ChatActionPayload",
2211
+ "name": "ChatActionPayload",
2212
+ "category": "Chat",
2213
+ "source": "chat.ts",
2214
+ "definition": "Enum({ MessagePosted: ChatMessageContent, ActionTriggered: ActionTrigger, Command: ChatCommand })",
2215
+ "description": "Payload of a received chat action.",
2216
+ "fields": [],
2217
+ "variants": [
2218
+ {
2219
+ "name": "MessagePosted",
2220
+ "type": "ChatMessageContent",
2221
+ "description": "A peer posted a message"
2222
+ },
2223
+ {
2224
+ "name": "ActionTriggered",
2225
+ "type": "ActionTrigger",
2226
+ "description": "A user triggered an action button"
2227
+ },
2228
+ {
2229
+ "name": "Command",
2230
+ "type": "ChatCommand",
2231
+ "description": "A user issued a command"
2232
+ }
2233
+ ]
2234
+ },
2235
+ {
2236
+ "id": "ReceivedChatAction",
2237
+ "name": "ReceivedChatAction",
2238
+ "category": "Chat",
2239
+ "source": "chat.ts",
2240
+ "definition": "Struct({ roomId: str, peer: str, payload: ChatActionPayload })",
2241
+ "description": "A chat action received from the host.",
2242
+ "fields": [
2243
+ {
2244
+ "name": "roomId",
2245
+ "type": "str",
2246
+ "description": "Room where the action occurred"
2247
+ },
2248
+ {
2249
+ "name": "peer",
2250
+ "type": "str",
2251
+ "description": "Peer who initiated the action"
2252
+ },
2253
+ {
2254
+ "name": "payload",
2255
+ "type": "ChatActionPayload",
2256
+ "description": "The action payload"
2257
+ }
2258
+ ],
2259
+ "variants": []
2260
+ },
2261
+ {
2262
+ "id": "ChatRoomRegistrationErr",
2263
+ "name": "ChatRoomRegistrationErr",
2264
+ "category": "Chat",
2265
+ "source": "chat.ts",
2266
+ "definition": "ErrEnum { PermissionDenied, Unknown({ reason: str }) }",
2267
+ "description": "Chat room registration error.",
2268
+ "fields": [],
2269
+ "variants": [
2270
+ {
2271
+ "name": "PermissionDenied",
2272
+ "type": "_void",
2273
+ "description": "Not allowed"
2274
+ },
2275
+ {
2276
+ "name": "Unknown",
2277
+ "type": "Struct({ reason: str })",
2278
+ "description": "Catch-all"
2279
+ }
2280
+ ]
2281
+ },
2282
+ {
2283
+ "id": "ChatBotRegistrationErr",
2284
+ "name": "ChatBotRegistrationErr",
2285
+ "category": "Chat",
2286
+ "source": "chat.ts",
2287
+ "definition": "ErrEnum { PermissionDenied, Unknown({ reason: str }) }",
2288
+ "description": "Chat bot registration error.",
2289
+ "fields": [],
2290
+ "variants": [
2291
+ {
2292
+ "name": "PermissionDenied",
2293
+ "type": "_void",
2294
+ "description": "Not allowed"
2295
+ },
2296
+ {
2297
+ "name": "Unknown",
2298
+ "type": "Struct({ reason: str })",
2299
+ "description": "Catch-all"
2300
+ }
2301
+ ]
2302
+ },
2303
+ {
2304
+ "id": "ChatMessagePostingErr",
2305
+ "name": "ChatMessagePostingErr",
2306
+ "category": "Chat",
2307
+ "source": "chat.ts",
2308
+ "definition": "ErrEnum { MessageTooLarge, Unknown({ reason: str }) }",
2309
+ "description": "Chat message posting error.",
2310
+ "fields": [],
2311
+ "variants": [
2312
+ {
2313
+ "name": "MessageTooLarge",
2314
+ "type": "_void",
2315
+ "description": "Message exceeded size limit"
2316
+ },
2317
+ {
2318
+ "name": "Unknown",
2319
+ "type": "Struct({ reason: str })",
2320
+ "description": "Catch-all"
2321
+ }
2322
+ ]
2323
+ },
2324
+ {
2325
+ "id": "Size",
2326
+ "name": "Size",
2327
+ "category": "Custom Renderer",
2328
+ "source": "customRenderer.ts",
2329
+ "definition": "compact",
2330
+ "description": "Variable-length unsigned integer used for dimensions.",
2331
+ "fields": [],
2332
+ "variants": []
2333
+ },
2334
+ {
2335
+ "id": "Dimensions",
2336
+ "name": "Dimensions",
2337
+ "category": "Custom Renderer",
2338
+ "source": "customRenderer.ts",
2339
+ "definition": "Tuple(Size, Size, Option(Size), Option(Size))",
2340
+ "description": "CSS-like dimensions: (top, end, bottom?, start?). Bottom defaults to top, start defaults to end.",
2341
+ "fields": [],
2342
+ "variants": []
2343
+ },
2344
+ {
2345
+ "id": "TypographyStyle",
2346
+ "name": "TypographyStyle",
2347
+ "category": "Custom Renderer",
2348
+ "source": "customRenderer.ts",
2349
+ "definition": "Status('titleXL', 'headline', 'bodyM', 'bodyS', 'caption')",
2350
+ "description": "Text typography presets.",
2351
+ "fields": [],
2352
+ "variants": []
2353
+ },
2354
+ {
2355
+ "id": "ButtonVariant",
2356
+ "name": "ButtonVariant",
2357
+ "category": "Custom Renderer",
2358
+ "source": "customRenderer.ts",
2359
+ "definition": "Status('primary', 'secondary', 'text')",
2360
+ "description": "Button style variants.",
2361
+ "fields": [],
2362
+ "variants": []
2363
+ },
2364
+ {
2365
+ "id": "ColorToken",
2366
+ "name": "ColorToken",
2367
+ "category": "Custom Renderer",
2368
+ "source": "customRenderer.ts",
2369
+ "definition": "Status('textPrimary', 'textSecondary', 'textTertiary', 'backgroundPrimary', 'backgroundSecondary', 'backgroundTertiary', 'success', 'error', 'warning')",
2370
+ "description": "Semantic color tokens for theming.",
2371
+ "fields": [],
2372
+ "variants": []
2373
+ },
2374
+ {
2375
+ "id": "ContentAlignment",
2376
+ "name": "ContentAlignment",
2377
+ "category": "Custom Renderer",
2378
+ "source": "customRenderer.ts",
2379
+ "definition": "Status('topStart', 'topCenter', 'topEnd', 'centerStart', 'center', 'centerEnd', 'bottomStart', 'bottomCenter', 'bottomEnd')",
2380
+ "description": "2D content alignment.",
2381
+ "fields": [],
2382
+ "variants": []
2383
+ },
2384
+ {
2385
+ "id": "HorizontalAlignment",
2386
+ "name": "HorizontalAlignment",
2387
+ "category": "Custom Renderer",
2388
+ "source": "customRenderer.ts",
2389
+ "definition": "Status('start', 'center', 'end')",
2390
+ "description": "Horizontal alignment options.",
2391
+ "fields": [],
2392
+ "variants": []
2393
+ },
2394
+ {
2395
+ "id": "VerticalAlignment",
2396
+ "name": "VerticalAlignment",
2397
+ "category": "Custom Renderer",
2398
+ "source": "customRenderer.ts",
2399
+ "definition": "Status('top', 'center', 'bottom')",
2400
+ "description": "Vertical alignment options.",
2401
+ "fields": [],
2402
+ "variants": []
2403
+ },
2404
+ {
2405
+ "id": "Arrangement",
2406
+ "name": "Arrangement",
2407
+ "category": "Custom Renderer",
2408
+ "source": "customRenderer.ts",
2409
+ "definition": "Status('start', 'end', 'center', 'spaceBetween', 'spaceAround', 'spaceEvenly')",
2410
+ "description": "Layout arrangement (like CSS flexbox justify-content).",
2411
+ "fields": [],
2412
+ "variants": []
2413
+ },
2414
+ {
2415
+ "id": "Shape",
2416
+ "name": "Shape",
2417
+ "category": "Custom Renderer",
2418
+ "source": "customRenderer.ts",
2419
+ "definition": "Enum({ Rounded: Size, Circle: _void })",
2420
+ "description": "Shape for borders and backgrounds.",
2421
+ "fields": [],
2422
+ "variants": [
2423
+ {
2424
+ "name": "Rounded",
2425
+ "type": "Size",
2426
+ "description": "Border radius value"
2427
+ },
2428
+ {
2429
+ "name": "Circle",
2430
+ "type": "_void",
2431
+ "description": "Circular shape"
2432
+ }
2433
+ ]
2434
+ },
2435
+ {
2436
+ "id": "BorderStyle",
2437
+ "name": "BorderStyle",
2438
+ "category": "Custom Renderer",
2439
+ "source": "customRenderer.ts",
2440
+ "definition": "Struct({ width: Size, color: ColorToken, shape: Option(Shape) })",
2441
+ "description": "Border styling.",
2442
+ "fields": [
2443
+ {
2444
+ "name": "width",
2445
+ "type": "Size",
2446
+ "description": "Border width"
2447
+ },
2448
+ {
2449
+ "name": "color",
2450
+ "type": "ColorToken",
2451
+ "description": "Border color"
2452
+ },
2453
+ {
2454
+ "name": "shape",
2455
+ "type": "Option(Shape)",
2456
+ "description": "Border shape"
2457
+ }
2458
+ ],
2459
+ "variants": []
2460
+ },
2461
+ {
2462
+ "id": "Modifier",
2463
+ "name": "Modifier",
2464
+ "category": "Custom Renderer",
2465
+ "source": "customRenderer.ts",
2466
+ "definition": "Enum({ margin, padding, background, border, height, width, minWidth, minHeight, fillWidth, fillHeight })",
2467
+ "description": "Layout and styling modifiers applied to custom renderer components.",
2468
+ "fields": [],
2469
+ "variants": [
2470
+ {
2471
+ "name": "margin",
2472
+ "type": "Dimensions",
2473
+ "description": "Outer spacing"
2474
+ },
2475
+ {
2476
+ "name": "padding",
2477
+ "type": "Dimensions",
2478
+ "description": "Inner spacing"
2479
+ },
2480
+ {
2481
+ "name": "background",
2482
+ "type": "Struct({ color: ColorToken, shape: Option(Shape) })",
2483
+ "description": "Background fill"
2484
+ },
2485
+ {
2486
+ "name": "border",
2487
+ "type": "BorderStyle",
2488
+ "description": "Border style"
2489
+ },
2490
+ {
2491
+ "name": "height",
2492
+ "type": "Size",
2493
+ "description": "Fixed height"
2494
+ },
2495
+ {
2496
+ "name": "width",
2497
+ "type": "Size",
2498
+ "description": "Fixed width"
2499
+ },
2500
+ {
2501
+ "name": "minWidth",
2502
+ "type": "Size",
2503
+ "description": "Minimum width"
2504
+ },
2505
+ {
2506
+ "name": "minHeight",
2507
+ "type": "Size",
2508
+ "description": "Minimum height"
2509
+ },
2510
+ {
2511
+ "name": "fillWidth",
2512
+ "type": "bool",
2513
+ "description": "Fill available width"
2514
+ },
2515
+ {
2516
+ "name": "fillHeight",
2517
+ "type": "bool",
2518
+ "description": "Fill available height"
2519
+ }
2520
+ ]
2521
+ },
2522
+ {
2523
+ "id": "CustomRendererNode",
2524
+ "name": "CustomRendererNode",
2525
+ "category": "Custom Renderer",
2526
+ "source": "customRenderer.ts",
2527
+ "definition": "Enum({ Nil: _void, String: str, Box: Component<BoxProps>, Column: Component<ColumnProps>, Row: Component<RowProps>, Spacer: Component<_void>, Text: Component<TextProps>, Button: Component<ButtonProps>, TextField: Component<TextFieldProps> })",
2528
+ "description": "A node in the custom renderer UI tree. Can be nested recursively via children.",
2529
+ "fields": [],
2530
+ "variants": [
2531
+ {
2532
+ "name": "Nil",
2533
+ "type": "_void",
2534
+ "description": "Empty node"
2535
+ },
2536
+ {
2537
+ "name": "String",
2538
+ "type": "str",
2539
+ "description": "Raw text string"
2540
+ },
2541
+ {
2542
+ "name": "Box",
2543
+ "type": "Component<BoxProps>",
2544
+ "description": "Generic container"
2545
+ },
2546
+ {
2547
+ "name": "Column",
2548
+ "type": "Component<ColumnProps>",
2549
+ "description": "Vertical layout"
2550
+ },
2551
+ {
2552
+ "name": "Row",
2553
+ "type": "Component<RowProps>",
2554
+ "description": "Horizontal layout"
2555
+ },
2556
+ {
2557
+ "name": "Spacer",
2558
+ "type": "Component<_void>",
2559
+ "description": "Flexible space"
2560
+ },
2561
+ {
2562
+ "name": "Text",
2563
+ "type": "Component<TextProps>",
2564
+ "description": "Text display"
2565
+ },
2566
+ {
2567
+ "name": "Button",
2568
+ "type": "Component<ButtonProps>",
2569
+ "description": "Interactive button"
2570
+ },
2571
+ {
2572
+ "name": "TextField",
2573
+ "type": "Component<TextFieldProps>",
2574
+ "description": "Text input"
2575
+ }
2576
+ ]
2577
+ },
2578
+ {
2579
+ "id": "BlockHash",
2580
+ "name": "BlockHash",
2581
+ "category": "Chain",
2582
+ "source": "chainInteraction.ts",
2583
+ "definition": "Hex()",
2584
+ "description": "Block hash identifier.",
2585
+ "fields": [],
2586
+ "variants": []
2587
+ },
2588
+ {
2589
+ "id": "OperationId",
2590
+ "name": "OperationId",
2591
+ "category": "Chain",
2592
+ "source": "chainInteraction.ts",
2593
+ "definition": "str",
2594
+ "description": "Operation identifier for async chain operations.",
2595
+ "fields": [],
2596
+ "variants": []
2597
+ },
2598
+ {
2599
+ "id": "RuntimeApi",
2600
+ "name": "RuntimeApi",
2601
+ "category": "Chain",
2602
+ "source": "chainInteraction.ts",
2603
+ "definition": "Tuple(str, u32)",
2604
+ "description": "A runtime API identified by name and version.",
2605
+ "fields": [],
2606
+ "variants": []
2607
+ },
2608
+ {
2609
+ "id": "RuntimeSpec",
2610
+ "name": "RuntimeSpec",
2611
+ "category": "Chain",
2612
+ "source": "chainInteraction.ts",
2613
+ "definition": "Struct({ specName, implName, specVersion, implVersion, transactionVersion?, apis })",
2614
+ "description": "Runtime specification metadata.",
2615
+ "fields": [
2616
+ {
2617
+ "name": "specName",
2618
+ "type": "str",
2619
+ "description": "Specification name"
2620
+ },
2621
+ {
2622
+ "name": "implName",
2623
+ "type": "str",
2624
+ "description": "Implementation name"
2625
+ },
2626
+ {
2627
+ "name": "specVersion",
2628
+ "type": "u32",
2629
+ "description": "Spec version number"
2630
+ },
2631
+ {
2632
+ "name": "implVersion",
2633
+ "type": "u32",
2634
+ "description": "Implementation version"
2635
+ },
2636
+ {
2637
+ "name": "transactionVersion",
2638
+ "type": "Option(u32)",
2639
+ "description": "Transaction format version"
2640
+ },
2641
+ {
2642
+ "name": "apis",
2643
+ "type": "Vector(RuntimeApi)",
2644
+ "description": "Supported runtime APIs"
2645
+ }
2646
+ ],
2647
+ "variants": []
2648
+ },
2649
+ {
2650
+ "id": "RuntimeType",
2651
+ "name": "RuntimeType",
2652
+ "category": "Chain",
2653
+ "source": "chainInteraction.ts",
2654
+ "definition": "Enum({ Valid: RuntimeSpec, Invalid: Struct({ error: str }) })",
2655
+ "description": "Runtime validity check result.",
2656
+ "fields": [],
2657
+ "variants": [
2658
+ {
2659
+ "name": "Valid",
2660
+ "type": "RuntimeSpec",
2661
+ "description": "Valid runtime with spec"
2662
+ },
2663
+ {
2664
+ "name": "Invalid",
2665
+ "type": "Struct({ error: str })",
2666
+ "description": "Invalid runtime with error"
2667
+ }
2668
+ ]
2669
+ },
2670
+ {
2671
+ "id": "StorageQueryType",
2672
+ "name": "StorageQueryType",
2673
+ "category": "Chain",
2674
+ "source": "chainInteraction.ts",
2675
+ "definition": "Status('Value', 'Hash', 'ClosestDescendantMerkleValue', 'DescendantsValues', 'DescendantsHashes')",
2676
+ "description": "Type of storage query to perform.",
2677
+ "fields": [],
2678
+ "variants": []
2679
+ },
2680
+ {
2681
+ "id": "StorageQueryItem",
2682
+ "name": "StorageQueryItem",
2683
+ "category": "Chain",
2684
+ "source": "chainInteraction.ts",
2685
+ "definition": "Struct({ key: Hex(), type: StorageQueryType })",
2686
+ "description": "A single storage query.",
2687
+ "fields": [
2688
+ {
2689
+ "name": "key",
2690
+ "type": "Hex()",
2691
+ "description": "Storage key to query"
2692
+ },
2693
+ {
2694
+ "name": "type",
2695
+ "type": "StorageQueryType",
2696
+ "description": "What to return"
2697
+ }
2698
+ ],
2699
+ "variants": []
2700
+ },
2701
+ {
2702
+ "id": "StorageResultItem",
2703
+ "name": "StorageResultItem",
2704
+ "category": "Chain",
2705
+ "source": "chainInteraction.ts",
2706
+ "definition": "Struct({ key, value, hash, closestDescendantMerkleValue })",
2707
+ "description": "Result of a storage query.",
2708
+ "fields": [
2709
+ {
2710
+ "name": "key",
2711
+ "type": "Hex()",
2712
+ "description": "The queried key"
2713
+ },
2714
+ {
2715
+ "name": "value",
2716
+ "type": "Nullable(Hex())",
2717
+ "description": "Value, if requested"
2718
+ },
2719
+ {
2720
+ "name": "hash",
2721
+ "type": "Nullable(Hex())",
2722
+ "description": "Hash, if requested"
2723
+ },
2724
+ {
2725
+ "name": "closestDescendantMerkleValue",
2726
+ "type": "Nullable(Hex())",
2727
+ "description": "Merkle value, if requested"
2728
+ }
2729
+ ],
2730
+ "variants": []
2731
+ },
2732
+ {
2733
+ "id": "OperationStartedResult",
2734
+ "name": "OperationStartedResult",
2735
+ "category": "Chain",
2736
+ "source": "chainInteraction.ts",
2737
+ "definition": "Enum({ Started: Struct({ operationId: OperationId }), LimitReached: _void })",
2738
+ "description": "Result of starting a chain operation.",
2739
+ "fields": [],
2740
+ "variants": [
2741
+ {
2742
+ "name": "Started",
2743
+ "type": "Struct({ operationId: OperationId })",
2744
+ "description": "Operation started successfully"
2745
+ },
2746
+ {
2747
+ "name": "LimitReached",
2748
+ "type": "_void",
2749
+ "description": "Too many concurrent operations"
2750
+ }
2751
+ ]
2752
+ },
2753
+ {
2754
+ "id": "ChainHeadEvent",
2755
+ "name": "ChainHeadEvent",
2756
+ "category": "Chain",
2757
+ "source": "chainInteraction.ts",
2758
+ "definition": "Enum with 12 variants",
2759
+ "description": "Events received when following the chain head.",
2760
+ "fields": [],
2761
+ "variants": [
2762
+ {
2763
+ "name": "Initialized",
2764
+ "type": "Struct({ finalizedBlockHashes, finalizedBlockRuntime? })",
2765
+ "description": "Initial state with finalized blocks"
2766
+ },
2767
+ {
2768
+ "name": "NewBlock",
2769
+ "type": "Struct({ blockHash, parentBlockHash, newRuntime? })",
2770
+ "description": "A new block was produced"
2771
+ },
2772
+ {
2773
+ "name": "BestBlockChanged",
2774
+ "type": "Struct({ bestBlockHash })",
2775
+ "description": "Best block changed"
2776
+ },
2777
+ {
2778
+ "name": "Finalized",
2779
+ "type": "Struct({ finalizedBlockHashes, prunedBlockHashes })",
2780
+ "description": "Blocks were finalized"
2781
+ },
2782
+ {
2783
+ "name": "OperationBodyDone",
2784
+ "type": "Struct({ operationId, value })",
2785
+ "description": "Body fetch completed"
2786
+ },
2787
+ {
2788
+ "name": "OperationCallDone",
2789
+ "type": "Struct({ operationId, output })",
2790
+ "description": "Runtime call completed"
2791
+ },
2792
+ {
2793
+ "name": "OperationStorageItems",
2794
+ "type": "Struct({ operationId, items })",
2795
+ "description": "Storage results batch"
2796
+ },
2797
+ {
2798
+ "name": "OperationStorageDone",
2799
+ "type": "Struct({ operationId })",
2800
+ "description": "Storage query completed"
2801
+ },
2802
+ {
2803
+ "name": "OperationWaitingForContinue",
2804
+ "type": "Struct({ operationId })",
2805
+ "description": "Operation paused, needs continue"
2806
+ },
2807
+ {
2808
+ "name": "OperationInaccessible",
2809
+ "type": "Struct({ operationId })",
2810
+ "description": "Block became inaccessible"
2811
+ },
2812
+ {
2813
+ "name": "OperationError",
2814
+ "type": "Struct({ operationId, error })",
2815
+ "description": "Operation failed"
2816
+ },
2817
+ {
2818
+ "name": "Stop",
2819
+ "type": "_void",
2820
+ "description": "Subscription terminated by server"
2821
+ }
2822
+ ]
2823
+ },
2824
+ {
2825
+ "id": "Topic",
2826
+ "name": "Topic",
2827
+ "category": "Statement Store",
2828
+ "source": "statementStore.ts",
2829
+ "definition": "Bytes(32)",
2830
+ "description": "32-byte topic identifier.",
2831
+ "fields": [],
2832
+ "variants": []
2833
+ },
2834
+ {
2835
+ "id": "Channel",
2836
+ "name": "Channel",
2837
+ "category": "Statement Store",
2838
+ "source": "statementStore.ts",
2839
+ "definition": "Bytes(32)",
2840
+ "description": "32-byte channel identifier.",
2841
+ "fields": [],
2842
+ "variants": []
2843
+ },
2844
+ {
2845
+ "id": "DecryptionKey",
2846
+ "name": "DecryptionKey",
2847
+ "category": "Statement Store",
2848
+ "source": "statementStore.ts",
2849
+ "definition": "Bytes(32)",
2850
+ "description": "32-byte decryption key.",
2851
+ "fields": [],
2852
+ "variants": []
2853
+ },
2854
+ {
2855
+ "id": "TopicFilter",
2856
+ "name": "TopicFilter",
2857
+ "category": "Statement Store",
2858
+ "source": "statementStore.ts",
2859
+ "definition": "Enum({ MatchAll: Vector(Topic), MatchAny: Vector(Topic) })",
2860
+ "description": "Filter for statement subscriptions. MatchAll requires every listed topic (AND). MatchAny requires at least one listed topic (OR). V0.2 addition replacing plain topic vectors.",
2861
+ "fields": [],
2862
+ "variants": [
2863
+ {
2864
+ "name": "MatchAll",
2865
+ "type": "Vector(Topic)",
2866
+ "description": "AND: statement must contain every listed topic."
2867
+ },
2868
+ {
2869
+ "name": "MatchAny",
2870
+ "type": "Vector(Topic)",
2871
+ "description": "OR: statement must contain at least one listed topic."
2872
+ }
2873
+ ]
2874
+ },
2875
+ {
2876
+ "id": "StatementProof",
2877
+ "name": "StatementProof",
2878
+ "category": "Statement Store",
2879
+ "source": "statementStore.ts",
2880
+ "definition": "Enum({ Sr25519, Ed25519, Ecdsa, OnChain })",
2881
+ "description": "Cryptographic proof for a statement.",
2882
+ "fields": [],
2883
+ "variants": [
2884
+ {
2885
+ "name": "Sr25519",
2886
+ "type": "Struct({ signature: Bytes(64), signer: Bytes(32) })",
2887
+ "description": "Sr25519 signature proof"
2888
+ },
2889
+ {
2890
+ "name": "Ed25519",
2891
+ "type": "Struct({ signature: Bytes(64), signer: Bytes(32) })",
2892
+ "description": "Ed25519 signature proof"
2893
+ },
2894
+ {
2895
+ "name": "Ecdsa",
2896
+ "type": "Struct({ signature: Bytes(65), signer: Bytes(33) })",
2897
+ "description": "ECDSA signature proof"
2898
+ },
2899
+ {
2900
+ "name": "OnChain",
2901
+ "type": "Struct({ who: Bytes(32), blockHash: Bytes(32), event: u64 })",
2902
+ "description": "On-chain event proof"
2903
+ }
2904
+ ]
2905
+ },
2906
+ {
2907
+ "id": "Statement",
2908
+ "name": "Statement",
2909
+ "category": "Statement Store",
2910
+ "source": "statementStore.ts",
2911
+ "definition": "Struct({ proof?, decryptionKey?, expiry?, channel?, topics, data? })",
2912
+ "description": "A statement with optional proof and metadata.",
2913
+ "fields": [
2914
+ {
2915
+ "name": "proof",
2916
+ "type": "Option(StatementProof)",
2917
+ "description": "Optional cryptographic proof"
2918
+ },
2919
+ {
2920
+ "name": "decryptionKey",
2921
+ "type": "Option(DecryptionKey)",
2922
+ "description": "Optional decryption key"
2923
+ },
2924
+ {
2925
+ "name": "expiry",
2926
+ "type": "Option(u64)",
2927
+ "description": "Optional Unix timestamp expiry"
2928
+ },
2929
+ {
2930
+ "name": "channel",
2931
+ "type": "Option(Channel)",
2932
+ "description": "Optional channel"
2933
+ },
2934
+ {
2935
+ "name": "topics",
2936
+ "type": "Vector(Topic)",
2937
+ "description": "Topic tags"
2938
+ },
2939
+ {
2940
+ "name": "data",
2941
+ "type": "Option(Bytes())",
2942
+ "description": "Optional data payload"
2943
+ }
2944
+ ],
2945
+ "variants": []
2946
+ },
2947
+ {
2948
+ "id": "SignedStatement",
2949
+ "name": "SignedStatement",
2950
+ "category": "Statement Store",
2951
+ "source": "statementStore.ts",
2952
+ "definition": "Struct({ proof, decryptionKey?, expiry?, channel?, topics, data? })",
2953
+ "description": "A statement with required (not optional) proof.",
2954
+ "fields": [
2955
+ {
2956
+ "name": "proof",
2957
+ "type": "StatementProof",
2958
+ "description": "Required cryptographic proof"
2959
+ },
2960
+ {
2961
+ "name": "decryptionKey",
2962
+ "type": "Option(DecryptionKey)",
2963
+ "description": "Optional decryption key"
2964
+ },
2965
+ {
2966
+ "name": "expiry",
2967
+ "type": "Option(u64)",
2968
+ "description": "Optional Unix timestamp expiry"
2969
+ },
2970
+ {
2971
+ "name": "channel",
2972
+ "type": "Option(Channel)",
2973
+ "description": "Optional channel"
2974
+ },
2975
+ {
2976
+ "name": "topics",
2977
+ "type": "Vector(Topic)",
2978
+ "description": "Topic tags"
2979
+ },
2980
+ {
2981
+ "name": "data",
2982
+ "type": "Option(Bytes())",
2983
+ "description": "Optional data payload"
2984
+ }
2985
+ ],
2986
+ "variants": []
2987
+ },
2988
+ {
2989
+ "id": "SignedStatementsPage",
2990
+ "name": "SignedStatementsPage",
2991
+ "category": "Statement Store",
2992
+ "source": "statementStore.ts",
2993
+ "definition": "Struct({ statements: Vector(SignedStatement), isComplete: bool })",
2994
+ "description": "A page of signed statements delivered to subscribers.",
2995
+ "fields": [
2996
+ {
2997
+ "name": "statements",
2998
+ "type": "Vector(SignedStatement)",
2999
+ "description": "Statements in this page"
3000
+ },
3001
+ {
3002
+ "name": "isComplete",
3003
+ "type": "bool",
3004
+ "description": "false = intermediate page of initial dump; true = initial dump complete"
3005
+ }
3006
+ ],
3007
+ "variants": []
3008
+ },
3009
+ {
3010
+ "id": "StatementProofErr",
3011
+ "name": "StatementProofErr",
3012
+ "category": "Statement Store",
3013
+ "source": "statementStore.ts",
3014
+ "definition": "ErrEnum { UnableToSign, UnknownAccount, Unknown({ reason: str }) }",
3015
+ "description": "Statement proof creation error.",
3016
+ "fields": [],
3017
+ "variants": [
3018
+ {
3019
+ "name": "UnableToSign",
3020
+ "type": "_void",
3021
+ "description": "Signing operation failed"
3022
+ },
3023
+ {
3024
+ "name": "UnknownAccount",
3025
+ "type": "_void",
3026
+ "description": "Account not recognized"
3027
+ },
3028
+ {
3029
+ "name": "Unknown",
3030
+ "type": "Struct({ reason: str })",
3031
+ "description": "Catch-all"
3032
+ }
3033
+ ]
3034
+ },
3035
+ {
3036
+ "id": "PreimageKey",
3037
+ "name": "PreimageKey",
3038
+ "category": "Preimage",
3039
+ "source": "preimage.ts",
3040
+ "definition": "Hex()",
3041
+ "description": "Hash of the preimage.",
3042
+ "fields": [],
3043
+ "variants": []
3044
+ },
3045
+ {
3046
+ "id": "PreimageValue",
3047
+ "name": "PreimageValue",
3048
+ "category": "Preimage",
3049
+ "source": "preimage.ts",
3050
+ "definition": "Bytes()",
3051
+ "description": "The preimage data.",
3052
+ "fields": [],
3053
+ "variants": []
3054
+ },
3055
+ {
3056
+ "id": "Balance",
3057
+ "name": "Balance",
3058
+ "category": "Payment",
3059
+ "source": "payment.ts",
3060
+ "definition": "u128",
3061
+ "description": "Balance amount for payment operations. Interpreted according to the host's single fixed payment asset (e.g. pUSD).",
3062
+ "fields": [],
3063
+ "variants": []
3064
+ },
3065
+ {
3066
+ "id": "PaymentId",
3067
+ "name": "PaymentId",
3068
+ "category": "Payment",
3069
+ "source": "payment.ts",
3070
+ "definition": "str",
3071
+ "description": "Unique payment identifier, scoped to the product that created it.",
3072
+ "fields": [],
3073
+ "variants": []
3074
+ },
3075
+ {
3076
+ "id": "Ed25519PrivateKey",
3077
+ "name": "Ed25519PrivateKey",
3078
+ "category": "Payment",
3079
+ "source": "payment.ts",
3080
+ "definition": "Bytes(32)",
3081
+ "description": "Ed25519 private key bytes (32 bytes).",
3082
+ "fields": [],
3083
+ "variants": []
3084
+ },
3085
+ {
3086
+ "id": "PaymentBalance",
3087
+ "name": "PaymentBalance",
3088
+ "category": "Payment",
3089
+ "source": "payment.ts",
3090
+ "definition": "Struct({ available: Balance })",
3091
+ "description": "Current payment balance state pushed to subscribers.",
3092
+ "fields": [
3093
+ {
3094
+ "name": "available",
3095
+ "type": "Balance",
3096
+ "description": "Balance that can be spent right now"
3097
+ }
3098
+ ],
3099
+ "variants": []
3100
+ },
3101
+ {
3102
+ "id": "PaymentTopUpSource",
3103
+ "name": "PaymentTopUpSource",
3104
+ "category": "Payment",
3105
+ "source": "payment.ts",
3106
+ "definition": "Enum({ ProductAccount: DerivationIndex, PrivateKey: Ed25519PrivateKey })",
3107
+ "description": "Source for a payment top-up operation.",
3108
+ "fields": [],
3109
+ "variants": [
3110
+ {
3111
+ "name": "ProductAccount",
3112
+ "type": "DerivationIndex",
3113
+ "description": "Fund from one of the calling product's scoped accounts"
3114
+ },
3115
+ {
3116
+ "name": "PrivateKey",
3117
+ "type": "Ed25519PrivateKey",
3118
+ "description": "Fund from a one-time account represented by its private key"
3119
+ }
3120
+ ]
3121
+ },
3122
+ {
3123
+ "id": "PaymentReceipt",
3124
+ "name": "PaymentReceipt",
3125
+ "category": "Payment",
3126
+ "source": "payment.ts",
3127
+ "definition": "Struct({ id: PaymentId })",
3128
+ "description": "Receipt returned after a successful payment request.",
3129
+ "fields": [
3130
+ {
3131
+ "name": "id",
3132
+ "type": "PaymentId",
3133
+ "description": "The assigned payment identifier"
3134
+ }
3135
+ ],
3136
+ "variants": []
3137
+ },
3138
+ {
3139
+ "id": "PaymentStatus",
3140
+ "name": "PaymentStatus",
3141
+ "category": "Payment",
3142
+ "source": "payment.ts",
3143
+ "definition": "Enum({ Processing: _void, Completed: _void, Failed: str })",
3144
+ "description": "Payment lifecycle status. Once a terminal state (Completed or Failed) is reached, the host delivers it and may close the subscription.",
3145
+ "fields": [],
3146
+ "variants": [
3147
+ {
3148
+ "name": "Processing",
3149
+ "type": "_void",
3150
+ "description": "Payment is being processed"
3151
+ },
3152
+ {
3153
+ "name": "Completed",
3154
+ "type": "_void",
3155
+ "description": "Payment has been settled successfully"
3156
+ },
3157
+ {
3158
+ "name": "Failed",
3159
+ "type": "str",
3160
+ "description": "Payment has failed with a reason"
3161
+ }
3162
+ ]
3163
+ },
3164
+ {
3165
+ "id": "PaymentBalanceErr",
3166
+ "name": "PaymentBalanceErr",
3167
+ "category": "Payment",
3168
+ "source": "payment.ts",
3169
+ "definition": "ErrEnum { PermissionDenied, Unknown({ reason: str }) }",
3170
+ "description": "Error from host_payment_balance_subscribe.",
3171
+ "fields": [],
3172
+ "variants": [
3173
+ {
3174
+ "name": "PermissionDenied",
3175
+ "type": "_void",
3176
+ "description": "User denied the balance disclosure request"
3177
+ },
3178
+ {
3179
+ "name": "Unknown",
3180
+ "type": "Struct({ reason: str })",
3181
+ "description": "Catch-all"
3182
+ }
3183
+ ]
3184
+ },
3185
+ {
3186
+ "id": "PaymentTopUpErr",
3187
+ "name": "PaymentTopUpErr",
3188
+ "category": "Payment",
3189
+ "source": "payment.ts",
3190
+ "definition": "ErrEnum { InsufficientFunds, InvalidSource, Unknown({ reason: str }) }",
3191
+ "description": "Error from host_payment_top_up.",
3192
+ "fields": [],
3193
+ "variants": [
3194
+ {
3195
+ "name": "InsufficientFunds",
3196
+ "type": "_void",
3197
+ "description": "The source account does not hold sufficient funds"
3198
+ },
3199
+ {
3200
+ "name": "InvalidSource",
3201
+ "type": "_void",
3202
+ "description": "The source account was not found or is invalid"
3203
+ },
3204
+ {
3205
+ "name": "Unknown",
3206
+ "type": "Struct({ reason: str })",
3207
+ "description": "Catch-all"
3208
+ }
3209
+ ]
3210
+ },
3211
+ {
3212
+ "id": "PaymentRequestErr",
3213
+ "name": "PaymentRequestErr",
3214
+ "category": "Payment",
3215
+ "source": "payment.ts",
3216
+ "definition": "ErrEnum { Rejected, InsufficientBalance, Unknown({ reason: str }) }",
3217
+ "description": "Error from host_payment_request.",
3218
+ "fields": [],
3219
+ "variants": [
3220
+ {
3221
+ "name": "Rejected",
3222
+ "type": "_void",
3223
+ "description": "User denied the payment request"
3224
+ },
3225
+ {
3226
+ "name": "InsufficientBalance",
3227
+ "type": "_void",
3228
+ "description": "User's available balance is not sufficient"
3229
+ },
3230
+ {
3231
+ "name": "Unknown",
3232
+ "type": "Struct({ reason: str })",
3233
+ "description": "Catch-all"
3234
+ }
3235
+ ]
3236
+ },
3237
+ {
3238
+ "id": "PaymentStatusErr",
3239
+ "name": "PaymentStatusErr",
3240
+ "category": "Payment",
3241
+ "source": "payment.ts",
3242
+ "definition": "ErrEnum { PaymentNotFound, Unknown({ reason: str }) }",
3243
+ "description": "Error from host_payment_status_subscribe.",
3244
+ "fields": [],
3245
+ "variants": [
3246
+ {
3247
+ "name": "PaymentNotFound",
3248
+ "type": "_void",
3249
+ "description": "Payment ID was not found or does not belong to the current product"
3250
+ },
3251
+ {
3252
+ "name": "Unknown",
3253
+ "type": "Struct({ reason: str })",
3254
+ "description": "Catch-all"
3255
+ }
3256
+ ]
3257
+ },
3258
+ {
3259
+ "id": "Entropy",
3260
+ "name": "Entropy",
3261
+ "category": "Entropy",
3262
+ "source": "entropy.ts",
3263
+ "definition": "Bytes(32)",
3264
+ "description": "32 bytes of deterministic entropy derived from the user's root BIP-39 entropy via a three-layer BLAKE2b-256 keyed hashing scheme.",
3265
+ "fields": [],
3266
+ "variants": []
3267
+ },
3268
+ {
3269
+ "id": "DeriveEntropyErr",
3270
+ "name": "DeriveEntropyErr",
3271
+ "category": "Entropy",
3272
+ "source": "entropy.ts",
3273
+ "definition": "ErrEnum { Unknown }",
3274
+ "description": "Error from host_derive_entropy. Under normal operation the function always succeeds; Unknown indicates an unrecoverable internal host error.",
3275
+ "fields": [],
3276
+ "variants": [
3277
+ {
3278
+ "name": "Unknown",
3279
+ "type": "_void",
3280
+ "description": "An unexpected error occurred in the host"
3281
+ }
3282
+ ]
3283
+ },
3284
+ {
3285
+ "id": "Theme",
3286
+ "name": "Theme",
3287
+ "category": "Theme",
3288
+ "source": "theme.ts",
3289
+ "definition": "Status('Light', 'Dark')",
3290
+ "description": "Visual theme preference.",
3291
+ "fields": [],
3292
+ "variants": []
3293
+ }
3294
+ ],
3295
+ "deprecatedAliases": {
3296
+ "host_get_non_product_accounts": "host_get_legacy_accounts",
3297
+ "host_create_transaction_with_non_product_account": "host_create_transaction_with_legacy_account"
3298
+ }
3299
+ }