@parity/truapi 0.1.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/dist/client.js +5 -2
  2. package/dist/explorer/codegen/types.d.ts +2 -0
  3. package/dist/explorer/codegen/types.js +3610 -0
  4. package/dist/explorer/codegen/versions/0.2.0/services.d.ts +2 -0
  5. package/dist/explorer/codegen/versions/0.2.0/services.js +644 -0
  6. package/dist/explorer/codegen/versions/0.2.0/types.d.ts +2 -0
  7. package/dist/explorer/codegen/versions/0.2.0/types.js +3960 -0
  8. package/dist/explorer/codegen/versions/0.3.0/services.d.ts +2 -0
  9. package/dist/explorer/codegen/versions/0.3.0/services.js +644 -0
  10. package/dist/explorer/codegen/versions/0.3.0/types.d.ts +2 -0
  11. package/dist/explorer/codegen/versions/0.3.0/types.js +3610 -0
  12. package/dist/explorer/codegen/versions/0.3.1/services.d.ts +2 -0
  13. package/dist/explorer/codegen/versions/0.3.1/services.js +644 -0
  14. package/dist/explorer/codegen/versions/0.3.1/types.d.ts +2 -0
  15. package/dist/explorer/codegen/versions/0.3.1/types.js +3610 -0
  16. package/dist/explorer/data-types.d.ts +49 -0
  17. package/dist/explorer/data-types.js +1 -0
  18. package/dist/explorer/versions.d.ts +9 -0
  19. package/dist/explorer/versions.js +21 -0
  20. package/dist/generated/client.d.ts +86 -65
  21. package/dist/generated/client.js +166 -194
  22. package/dist/generated/types.d.ts +442 -232
  23. package/dist/generated/types.js +110 -94
  24. package/dist/generated/wire-table.d.ts +5 -11
  25. package/dist/generated/wire-table.js +5 -11
  26. package/dist/index.d.ts +2 -1
  27. package/dist/index.js +2 -1
  28. package/dist/playground/codegen/services.js +327 -84
  29. package/dist/playground/codegen/truapi-dts.d.ts +1 -0
  30. package/dist/playground/codegen/truapi-dts.js +4310 -0
  31. package/dist/playground/services-types.d.ts +11 -2
  32. package/dist/scale.d.ts +8 -1
  33. package/dist/scale.js +19 -1
  34. package/dist/transport.d.ts +33 -6
  35. package/dist/transport.js +150 -71
  36. package/dist/well-known-chains.d.ts +13 -0
  37. package/dist/well-known-chains.js +7 -0
  38. package/package.json +28 -6
@@ -0,0 +1,3610 @@
1
+ export const types = [
2
+ {
3
+ id: "account-id",
4
+ name: "AccountId",
5
+ category: "transaction",
6
+ definition: "export type AccountId = HexString;",
7
+ description: "A 32-byte raw account identifier used for legacy (non-product) accounts.",
8
+ },
9
+ {
10
+ id: "action-trigger",
11
+ name: "ActionTrigger",
12
+ category: "chat",
13
+ definition: "export interface ActionTrigger {\n messageId: string;\n actionId: string;\n payload?: HexString;\n}",
14
+ description: "Payload when a user clicks an action button.",
15
+ fields: [
16
+ {
17
+ name: "message_id",
18
+ type: "string",
19
+ description: "Message containing the action.",
20
+ },
21
+ {
22
+ name: "action_id",
23
+ type: "string",
24
+ description: "Which action was triggered.",
25
+ },
26
+ {
27
+ name: "payload",
28
+ type: "HexString | undefined",
29
+ description: "Optional additional data.",
30
+ },
31
+ ],
32
+ },
33
+ {
34
+ id: "allocatable-resource",
35
+ name: "AllocatableResource",
36
+ category: "resource_allocation",
37
+ definition: 'export type AllocatableResource =\n | { tag: "StatementStoreAllowance"; value?: undefined }\n | { tag: "BulletinAllowance"; value?: undefined }\n | { tag: "SmartContractAllowance"; value: number }\n | { tag: "AutoSigning"; value?: undefined }\n;',
38
+ description: "A resource the host can pre-allocate on behalf of the product (RFC 0010).\n\nFor the slot-table allowances (`StatementStoreAllowance`,\n`BulletinAllowance`, `SmartContractAllowance`), pre-allocation is\nopportunistic and the host may also fulfil the allowance implicitly on the\nfirst submission. `AutoSigning` must be requested explicitly through this\ncall.",
39
+ variants: [
40
+ {
41
+ name: "StatementStoreAllowance",
42
+ type: '{ tag: "StatementStoreAllowance"; value?: undefined }',
43
+ description: "Statement Store slot allowance for the product's own allowance account.",
44
+ },
45
+ {
46
+ name: "BulletinAllowance",
47
+ type: '{ tag: "BulletinAllowance"; value?: undefined }',
48
+ description: "Bulletin chain slot allowance for the product's own allowance account.",
49
+ },
50
+ {
51
+ name: "SmartContractAllowance",
52
+ type: '{ tag: "SmartContractAllowance"; value: number }',
53
+ description: "Pre-warmed PGAS balance for the smart-contract account at the given\nderivation index.",
54
+ },
55
+ {
56
+ name: "AutoSigning",
57
+ type: '{ tag: "AutoSigning"; value?: undefined }',
58
+ description: "Permission to sign on the product's behalf without per-call user prompts.",
59
+ },
60
+ ],
61
+ },
62
+ {
63
+ id: "allocation-outcome",
64
+ name: "AllocationOutcome",
65
+ category: "resource_allocation",
66
+ definition: 'export type AllocationOutcome = "Allocated" | "Rejected" | "NotAvailable";',
67
+ description: "Outcome of allocating a single resource (RFC 0010).",
68
+ variants: [
69
+ {
70
+ name: "Allocated",
71
+ type: '{ tag: "Allocated"; value?: undefined }',
72
+ description: "Resource is now available for use.",
73
+ },
74
+ {
75
+ name: "Rejected",
76
+ type: '{ tag: "Rejected"; value?: undefined }',
77
+ description: "User or host refused the allocation.",
78
+ },
79
+ {
80
+ name: "NotAvailable",
81
+ type: '{ tag: "NotAvailable"; value?: undefined }',
82
+ description: "Host cannot provide this resource on the current chain or environment.",
83
+ },
84
+ ],
85
+ },
86
+ {
87
+ id: "arrangement",
88
+ name: "Arrangement",
89
+ category: "chat",
90
+ definition: 'export type Arrangement = "Start" | "End" | "Center" | "SpaceBetween" | "SpaceAround" | "SpaceEvenly";',
91
+ description: "Layout arrangement (like CSS flexbox `justify-content`).",
92
+ variants: [
93
+ {
94
+ name: "Start",
95
+ type: '{ tag: "Start"; value?: undefined }',
96
+ },
97
+ {
98
+ name: "End",
99
+ type: '{ tag: "End"; value?: undefined }',
100
+ },
101
+ {
102
+ name: "Center",
103
+ type: '{ tag: "Center"; value?: undefined }',
104
+ },
105
+ {
106
+ name: "SpaceBetween",
107
+ type: '{ tag: "SpaceBetween"; value?: undefined }',
108
+ },
109
+ {
110
+ name: "SpaceAround",
111
+ type: '{ tag: "SpaceAround"; value?: undefined }',
112
+ },
113
+ {
114
+ name: "SpaceEvenly",
115
+ type: '{ tag: "SpaceEvenly"; value?: undefined }',
116
+ },
117
+ ],
118
+ },
119
+ {
120
+ id: "background",
121
+ name: "Background",
122
+ category: "chat",
123
+ definition: "export interface Background {\n color: ColorToken;\n shape?: Shape;\n}",
124
+ description: "Background styling.",
125
+ fields: [
126
+ {
127
+ name: "color",
128
+ type: "ColorToken",
129
+ description: "Background color.",
130
+ },
131
+ {
132
+ name: "shape",
133
+ type: "Shape | undefined",
134
+ description: "Background shape.",
135
+ },
136
+ ],
137
+ },
138
+ {
139
+ id: "balance",
140
+ name: "Balance",
141
+ category: "payment",
142
+ definition: "export type Balance = bigint;",
143
+ description: "Balance amount for payment operations. Interpreted according to the host's\nsingle fixed payment asset (e.g. pUSD).",
144
+ },
145
+ {
146
+ id: "border-style",
147
+ name: "BorderStyle",
148
+ category: "chat",
149
+ definition: "export interface BorderStyle {\n width: Size;\n color: ColorToken;\n shape?: Shape;\n}",
150
+ description: "Border styling.",
151
+ fields: [
152
+ {
153
+ name: "width",
154
+ type: "Size",
155
+ description: "Border width.",
156
+ },
157
+ {
158
+ name: "color",
159
+ type: "ColorToken",
160
+ description: "Border color.",
161
+ },
162
+ {
163
+ name: "shape",
164
+ type: "Shape | undefined",
165
+ description: "Border shape.",
166
+ },
167
+ ],
168
+ },
169
+ {
170
+ id: "box-props",
171
+ name: "BoxProps",
172
+ category: "chat",
173
+ definition: "export interface BoxProps {\n contentAlignment?: ContentAlignment;\n}",
174
+ description: "Properties for a [`CustomRendererNode::Box`] container.",
175
+ fields: [
176
+ {
177
+ name: "content_alignment",
178
+ type: "ContentAlignment | undefined",
179
+ description: "Content alignment within the box.",
180
+ },
181
+ ],
182
+ },
183
+ {
184
+ id: "button-props",
185
+ name: "ButtonProps",
186
+ category: "chat",
187
+ definition: "export interface ButtonProps {\n text: string;\n variant?: ButtonVariant;\n enabled: boolean | undefined;\n loading: boolean | undefined;\n clickAction?: string;\n}",
188
+ description: "Properties for a [`CustomRendererNode::Button`].",
189
+ fields: [
190
+ {
191
+ name: "text",
192
+ type: "string",
193
+ description: "Button label text.",
194
+ },
195
+ {
196
+ name: "variant",
197
+ type: "ButtonVariant | undefined",
198
+ description: "Button style variant.",
199
+ },
200
+ {
201
+ name: "enabled",
202
+ type: "boolean | undefined",
203
+ description: "Whether the button is enabled. Absent leaves the default to the host.",
204
+ },
205
+ {
206
+ name: "loading",
207
+ type: "boolean | undefined",
208
+ description: "Whether the button shows a loading state. Absent leaves the default to the host.",
209
+ },
210
+ {
211
+ name: "click_action",
212
+ type: "string | undefined",
213
+ description: "Action identifier triggered on click.",
214
+ },
215
+ ],
216
+ },
217
+ {
218
+ id: "button-variant",
219
+ name: "ButtonVariant",
220
+ category: "chat",
221
+ definition: 'export type ButtonVariant = "Primary" | "Secondary" | "Text";',
222
+ description: "Button style variants.",
223
+ variants: [
224
+ {
225
+ name: "Primary",
226
+ type: '{ tag: "Primary"; value?: undefined }',
227
+ },
228
+ {
229
+ name: "Secondary",
230
+ type: '{ tag: "Secondary"; value?: undefined }',
231
+ },
232
+ {
233
+ name: "Text",
234
+ type: '{ tag: "Text"; value?: undefined }',
235
+ },
236
+ ],
237
+ },
238
+ {
239
+ id: "chat-action",
240
+ name: "ChatAction",
241
+ category: "chat",
242
+ definition: "export interface ChatAction {\n actionId: string;\n title: string;\n}",
243
+ description: "A clickable action button in a chat message.",
244
+ fields: [
245
+ {
246
+ name: "action_id",
247
+ type: "string",
248
+ description: "Action identifier.",
249
+ },
250
+ {
251
+ name: "title",
252
+ type: "string",
253
+ description: "Button label.",
254
+ },
255
+ ],
256
+ },
257
+ {
258
+ id: "chat-action-layout",
259
+ name: "ChatActionLayout",
260
+ category: "chat",
261
+ definition: 'export type ChatActionLayout = "Column" | "Grid";',
262
+ description: "Layout for action buttons.",
263
+ variants: [
264
+ {
265
+ name: "Column",
266
+ type: '{ tag: "Column"; value?: undefined }',
267
+ },
268
+ {
269
+ name: "Grid",
270
+ type: '{ tag: "Grid"; value?: undefined }',
271
+ },
272
+ ],
273
+ },
274
+ {
275
+ id: "chat-action-payload",
276
+ name: "ChatActionPayload",
277
+ category: "chat",
278
+ definition: 'export type ChatActionPayload =\n | { tag: "MessagePosted"; value: ChatMessageContent }\n | { tag: "ActionTriggered"; value: ActionTrigger }\n | { tag: "Command"; value: ChatCommand }\n;',
279
+ description: "Payload of a received chat action.",
280
+ variants: [
281
+ {
282
+ name: "MessagePosted",
283
+ type: '{ tag: "MessagePosted"; value: ChatMessageContent }',
284
+ description: "A peer posted a message.",
285
+ },
286
+ {
287
+ name: "ActionTriggered",
288
+ type: '{ tag: "ActionTriggered"; value: ActionTrigger }',
289
+ description: "A user triggered an action button.",
290
+ },
291
+ {
292
+ name: "Command",
293
+ type: '{ tag: "Command"; value: ChatCommand }',
294
+ description: "A user issued a command.",
295
+ },
296
+ ],
297
+ },
298
+ {
299
+ id: "chat-actions",
300
+ name: "ChatActions",
301
+ category: "chat",
302
+ definition: "export interface ChatActions {\n text?: string;\n actions: Array<ChatAction>;\n layout: ChatActionLayout;\n}",
303
+ description: "A set of action buttons with optional text.",
304
+ fields: [
305
+ {
306
+ name: "text",
307
+ type: "string | undefined",
308
+ description: "Optional message text.",
309
+ },
310
+ {
311
+ name: "actions",
312
+ type: "Array<ChatAction>",
313
+ description: "List of action buttons.",
314
+ },
315
+ {
316
+ name: "layout",
317
+ type: "ChatActionLayout",
318
+ description: "`Column` or `Grid` layout.",
319
+ },
320
+ ],
321
+ },
322
+ {
323
+ id: "chat-bot-registration-status",
324
+ name: "ChatBotRegistrationStatus",
325
+ category: "chat",
326
+ definition: 'export type ChatBotRegistrationStatus = "New" | "Exists";',
327
+ description: "Whether the bot was newly registered or already existed.",
328
+ variants: [
329
+ {
330
+ name: "New",
331
+ type: '{ tag: "New"; value?: undefined }',
332
+ },
333
+ {
334
+ name: "Exists",
335
+ type: '{ tag: "Exists"; value?: undefined }',
336
+ },
337
+ ],
338
+ },
339
+ {
340
+ id: "chat-command",
341
+ name: "ChatCommand",
342
+ category: "chat",
343
+ definition: "export interface ChatCommand {\n command: string;\n payload: string;\n}",
344
+ description: "A slash command from a chat user.",
345
+ fields: [
346
+ {
347
+ name: "command",
348
+ type: "string",
349
+ description: "Command name.",
350
+ },
351
+ {
352
+ name: "payload",
353
+ type: "string",
354
+ description: "Command arguments.",
355
+ },
356
+ ],
357
+ },
358
+ {
359
+ id: "chat-custom-message",
360
+ name: "ChatCustomMessage",
361
+ category: "chat",
362
+ definition: "export interface ChatCustomMessage {\n messageType: string;\n payload: HexString;\n}",
363
+ description: "A custom message with application-defined type and binary payload.",
364
+ fields: [
365
+ {
366
+ name: "message_type",
367
+ type: "string",
368
+ description: "Application-defined type key.",
369
+ },
370
+ {
371
+ name: "payload",
372
+ type: "HexString",
373
+ description: "Binary payload.",
374
+ },
375
+ ],
376
+ },
377
+ {
378
+ id: "chat-file",
379
+ name: "ChatFile",
380
+ category: "chat",
381
+ definition: "export interface ChatFile {\n url: string;\n fileName: string;\n mimeType: string;\n sizeBytes: bigint;\n text?: string;\n}",
382
+ description: "A file attachment in a chat message.",
383
+ fields: [
384
+ {
385
+ name: "url",
386
+ type: "string",
387
+ description: "File download URL.",
388
+ },
389
+ {
390
+ name: "file_name",
391
+ type: "string",
392
+ description: "File name.",
393
+ },
394
+ {
395
+ name: "mime_type",
396
+ type: "string",
397
+ description: "MIME type.",
398
+ },
399
+ {
400
+ name: "size_bytes",
401
+ type: "bigint",
402
+ description: "File size in bytes.",
403
+ },
404
+ {
405
+ name: "text",
406
+ type: "string | undefined",
407
+ description: "Optional caption text.",
408
+ },
409
+ ],
410
+ },
411
+ {
412
+ id: "chat-media",
413
+ name: "ChatMedia",
414
+ category: "chat",
415
+ definition: "export interface ChatMedia {\n url: string;\n}",
416
+ description: "A media attachment.",
417
+ fields: [
418
+ {
419
+ name: "url",
420
+ type: "string",
421
+ description: "Media URL.",
422
+ },
423
+ ],
424
+ },
425
+ {
426
+ id: "chat-message-content",
427
+ name: "ChatMessageContent",
428
+ category: "chat",
429
+ definition: 'export type ChatMessageContent =\n | { tag: "Text"; value: { text: string } }\n | { tag: "RichText"; value: ChatRichText }\n | { tag: "Actions"; value: ChatActions }\n | { tag: "File"; value: ChatFile }\n | { tag: "Reaction"; value: ChatReaction }\n | { tag: "ReactionRemoved"; value: ChatReaction }\n | { tag: "Custom"; value: ChatCustomMessage }\n;',
430
+ description: "Content of a chat message -- one of several types.",
431
+ variants: [
432
+ {
433
+ name: "Text",
434
+ type: '{ tag: "Text"; value: { text: string } }',
435
+ description: "Plain text message.",
436
+ },
437
+ {
438
+ name: "RichText",
439
+ type: '{ tag: "RichText"; value: ChatRichText }',
440
+ description: "Rich text with media.",
441
+ },
442
+ {
443
+ name: "Actions",
444
+ type: '{ tag: "Actions"; value: ChatActions }',
445
+ description: "Action button set.",
446
+ },
447
+ {
448
+ name: "File",
449
+ type: '{ tag: "File"; value: ChatFile }',
450
+ description: "File attachment.",
451
+ },
452
+ {
453
+ name: "Reaction",
454
+ type: '{ tag: "Reaction"; value: ChatReaction }',
455
+ description: "Emoji reaction.",
456
+ },
457
+ {
458
+ name: "ReactionRemoved",
459
+ type: '{ tag: "ReactionRemoved"; value: ChatReaction }',
460
+ description: "Reaction removal.",
461
+ },
462
+ {
463
+ name: "Custom",
464
+ type: '{ tag: "Custom"; value: ChatCustomMessage }',
465
+ description: "Custom message.",
466
+ },
467
+ ],
468
+ },
469
+ {
470
+ id: "chat-reaction",
471
+ name: "ChatReaction",
472
+ category: "chat",
473
+ definition: "export interface ChatReaction {\n messageId: string;\n emoji: string;\n}",
474
+ description: "A reaction to a chat message.",
475
+ fields: [
476
+ {
477
+ name: "message_id",
478
+ type: "string",
479
+ description: "Message being reacted to.",
480
+ },
481
+ {
482
+ name: "emoji",
483
+ type: "string",
484
+ description: "Emoji reaction.",
485
+ },
486
+ ],
487
+ },
488
+ {
489
+ id: "chat-rich-text",
490
+ name: "ChatRichText",
491
+ category: "chat",
492
+ definition: "export interface ChatRichText {\n text?: string;\n media: Array<ChatMedia>;\n}",
493
+ description: "Rich text message with optional media.",
494
+ fields: [
495
+ {
496
+ name: "text",
497
+ type: "string | undefined",
498
+ description: "Optional text content.",
499
+ },
500
+ {
501
+ name: "media",
502
+ type: "Array<ChatMedia>",
503
+ description: "Attached media items.",
504
+ },
505
+ ],
506
+ },
507
+ {
508
+ id: "chat-room",
509
+ name: "ChatRoom",
510
+ category: "chat",
511
+ definition: "export interface ChatRoom {\n roomId: string;\n participatingAs: ChatRoomParticipation;\n}",
512
+ description: "A chat room the product participates in.",
513
+ fields: [
514
+ {
515
+ name: "room_id",
516
+ type: "string",
517
+ description: "Room identifier.",
518
+ },
519
+ {
520
+ name: "participating_as",
521
+ type: "ChatRoomParticipation",
522
+ description: "`RoomHost` or `Bot`.",
523
+ },
524
+ ],
525
+ },
526
+ {
527
+ id: "chat-room-participation",
528
+ name: "ChatRoomParticipation",
529
+ category: "chat",
530
+ definition: 'export type ChatRoomParticipation = "RoomHost" | "Bot";',
531
+ description: "How the product participates in a chat room.",
532
+ variants: [
533
+ {
534
+ name: "RoomHost",
535
+ type: '{ tag: "RoomHost"; value?: undefined }',
536
+ },
537
+ {
538
+ name: "Bot",
539
+ type: '{ tag: "Bot"; value?: undefined }',
540
+ },
541
+ ],
542
+ },
543
+ {
544
+ id: "chat-room-registration-status",
545
+ name: "ChatRoomRegistrationStatus",
546
+ category: "chat",
547
+ definition: 'export type ChatRoomRegistrationStatus = "New" | "Exists";',
548
+ description: "Whether the room was newly created or already existed.",
549
+ variants: [
550
+ {
551
+ name: "New",
552
+ type: '{ tag: "New"; value?: undefined }',
553
+ },
554
+ {
555
+ name: "Exists",
556
+ type: '{ tag: "Exists"; value?: undefined }',
557
+ },
558
+ ],
559
+ },
560
+ {
561
+ id: "color-token",
562
+ name: "ColorToken",
563
+ category: "chat",
564
+ definition: 'export type ColorToken = "FgPrimary" | "FgSecondary" | "FgTertiary" | "BgSurfaceMain" | "BgSurfaceContainer" | "BgSurfaceNested" | "FgSuccess" | "FgError" | "FgWarning";',
565
+ description: "Semantic color tokens for theming.",
566
+ variants: [
567
+ {
568
+ name: "FgPrimary",
569
+ type: '{ tag: "FgPrimary"; value?: undefined }',
570
+ },
571
+ {
572
+ name: "FgSecondary",
573
+ type: '{ tag: "FgSecondary"; value?: undefined }',
574
+ },
575
+ {
576
+ name: "FgTertiary",
577
+ type: '{ tag: "FgTertiary"; value?: undefined }',
578
+ },
579
+ {
580
+ name: "BgSurfaceMain",
581
+ type: '{ tag: "BgSurfaceMain"; value?: undefined }',
582
+ },
583
+ {
584
+ name: "BgSurfaceContainer",
585
+ type: '{ tag: "BgSurfaceContainer"; value?: undefined }',
586
+ },
587
+ {
588
+ name: "BgSurfaceNested",
589
+ type: '{ tag: "BgSurfaceNested"; value?: undefined }',
590
+ },
591
+ {
592
+ name: "FgSuccess",
593
+ type: '{ tag: "FgSuccess"; value?: undefined }',
594
+ },
595
+ {
596
+ name: "FgError",
597
+ type: '{ tag: "FgError"; value?: undefined }',
598
+ },
599
+ {
600
+ name: "FgWarning",
601
+ type: '{ tag: "FgWarning"; value?: undefined }',
602
+ },
603
+ ],
604
+ },
605
+ {
606
+ id: "column-props",
607
+ name: "ColumnProps",
608
+ category: "chat",
609
+ definition: "export interface ColumnProps {\n horizontalAlignment?: HorizontalAlignment;\n verticalArrangement?: Arrangement;\n}",
610
+ description: "Properties for a [`CustomRendererNode::Column`] layout.",
611
+ fields: [
612
+ {
613
+ name: "horizontal_alignment",
614
+ type: "HorizontalAlignment | undefined",
615
+ description: "Horizontal alignment of children.",
616
+ },
617
+ {
618
+ name: "vertical_arrangement",
619
+ type: "Arrangement | undefined",
620
+ description: "Vertical arrangement of children.",
621
+ },
622
+ ],
623
+ },
624
+ {
625
+ id: "component",
626
+ name: "Component",
627
+ category: "chat",
628
+ definition: "export interface Component<P> {\n modifiers: Array<Modifier>;\n props: P;\n children: Array<CustomRendererNode>;\n}",
629
+ description: "A component in the custom renderer UI tree, combining modifiers, typed props,\nand recursive children.",
630
+ fields: [
631
+ {
632
+ name: "modifiers",
633
+ type: "Array<Modifier>",
634
+ description: "Layout and styling modifiers.",
635
+ },
636
+ {
637
+ name: "props",
638
+ type: "P",
639
+ description: "Component-specific properties.",
640
+ },
641
+ {
642
+ name: "children",
643
+ type: "Array<CustomRendererNode>",
644
+ description: "Child nodes.",
645
+ },
646
+ ],
647
+ },
648
+ {
649
+ id: "content-alignment",
650
+ name: "ContentAlignment",
651
+ category: "chat",
652
+ definition: 'export type ContentAlignment = "TopStart" | "TopCenter" | "TopEnd" | "CenterStart" | "Center" | "CenterEnd" | "BottomStart" | "BottomCenter" | "BottomEnd";',
653
+ description: "2D content alignment.",
654
+ variants: [
655
+ {
656
+ name: "TopStart",
657
+ type: '{ tag: "TopStart"; value?: undefined }',
658
+ },
659
+ {
660
+ name: "TopCenter",
661
+ type: '{ tag: "TopCenter"; value?: undefined }',
662
+ },
663
+ {
664
+ name: "TopEnd",
665
+ type: '{ tag: "TopEnd"; value?: undefined }',
666
+ },
667
+ {
668
+ name: "CenterStart",
669
+ type: '{ tag: "CenterStart"; value?: undefined }',
670
+ },
671
+ {
672
+ name: "Center",
673
+ type: '{ tag: "Center"; value?: undefined }',
674
+ },
675
+ {
676
+ name: "CenterEnd",
677
+ type: '{ tag: "CenterEnd"; value?: undefined }',
678
+ },
679
+ {
680
+ name: "BottomStart",
681
+ type: '{ tag: "BottomStart"; value?: undefined }',
682
+ },
683
+ {
684
+ name: "BottomCenter",
685
+ type: '{ tag: "BottomCenter"; value?: undefined }',
686
+ },
687
+ {
688
+ name: "BottomEnd",
689
+ type: '{ tag: "BottomEnd"; value?: undefined }',
690
+ },
691
+ ],
692
+ },
693
+ {
694
+ id: "custom-renderer-node",
695
+ name: "CustomRendererNode",
696
+ category: "chat",
697
+ definition: 'export type CustomRendererNode =\n | { tag: "Nil"; value?: undefined }\n | { tag: "String"; value: { text: string } }\n | { tag: "Box"; value: Component<BoxProps> }\n | { tag: "Column"; value: Component<ColumnProps> }\n | { tag: "Row"; value: Component<RowProps> }\n | { tag: "Spacer"; value: Component<undefined> }\n | { tag: "Text"; value: Component<TextProps> }\n | { tag: "Button"; value: Component<ButtonProps> }\n | { tag: "TextField"; value: Component<TextFieldProps> }\n;',
698
+ description: "A node in the custom renderer UI tree. Can be nested recursively via the\n`children` field of each [`Component`].",
699
+ variants: [
700
+ {
701
+ name: "Nil",
702
+ type: '{ tag: "Nil"; value?: undefined }',
703
+ description: "Empty node.",
704
+ },
705
+ {
706
+ name: "String",
707
+ type: '{ tag: "String"; value: { text: string } }',
708
+ description: "Raw text string.",
709
+ },
710
+ {
711
+ name: "Box",
712
+ type: '{ tag: "Box"; value: Component<BoxProps> }',
713
+ description: "Generic container.",
714
+ },
715
+ {
716
+ name: "Column",
717
+ type: '{ tag: "Column"; value: Component<ColumnProps> }',
718
+ description: "Vertical layout.",
719
+ },
720
+ {
721
+ name: "Row",
722
+ type: '{ tag: "Row"; value: Component<RowProps> }',
723
+ description: "Horizontal layout.",
724
+ },
725
+ {
726
+ name: "Spacer",
727
+ type: '{ tag: "Spacer"; value: Component<undefined> }',
728
+ description: "Flexible space.",
729
+ },
730
+ {
731
+ name: "Text",
732
+ type: '{ tag: "Text"; value: Component<TextProps> }',
733
+ description: "Text display.",
734
+ },
735
+ {
736
+ name: "Button",
737
+ type: '{ tag: "Button"; value: Component<ButtonProps> }',
738
+ description: "Interactive button.",
739
+ },
740
+ {
741
+ name: "TextField",
742
+ type: '{ tag: "TextField"; value: Component<TextFieldProps> }',
743
+ description: "Text input.",
744
+ },
745
+ ],
746
+ },
747
+ {
748
+ id: "dimensions",
749
+ name: "Dimensions",
750
+ category: "chat",
751
+ definition: "export interface Dimensions {\n top: Size;\n end: Size;\n bottom?: Size;\n start?: Size;\n}",
752
+ description: "CSS-like dimensions: (top, end, bottom, start).\nBottom defaults to top, start defaults to end when `None`.",
753
+ fields: [
754
+ {
755
+ name: "top",
756
+ type: "Size",
757
+ description: "Top dimension.",
758
+ },
759
+ {
760
+ name: "end",
761
+ type: "Size",
762
+ description: "End dimension.",
763
+ },
764
+ {
765
+ name: "bottom",
766
+ type: "Size | undefined",
767
+ description: "Bottom dimension. Defaults to top when absent.",
768
+ },
769
+ {
770
+ name: "start",
771
+ type: "Size | undefined",
772
+ description: "Start dimension. Defaults to end when absent.",
773
+ },
774
+ ],
775
+ },
776
+ {
777
+ id: "generic-error",
778
+ name: "GenericError",
779
+ category: "common",
780
+ definition: "export interface GenericError {\n reason: string;\n}",
781
+ description: "Generic error payload carrying a human-readable reason string. Used by many\nmethods as a catch-all error type.",
782
+ fields: [
783
+ {
784
+ name: "reason",
785
+ type: "string",
786
+ },
787
+ ],
788
+ },
789
+ {
790
+ id: "genesis-hash",
791
+ name: "GenesisHash",
792
+ category: "transaction",
793
+ definition: "export type GenesisHash = HexString;",
794
+ description: "A 32-byte chain genesis hash used to identify the target chain.",
795
+ },
796
+ {
797
+ id: "horizontal-alignment",
798
+ name: "HorizontalAlignment",
799
+ category: "chat",
800
+ definition: 'export type HorizontalAlignment = "Start" | "Center" | "End";',
801
+ description: "Horizontal alignment options.",
802
+ variants: [
803
+ {
804
+ name: "Start",
805
+ type: '{ tag: "Start"; value?: undefined }',
806
+ },
807
+ {
808
+ name: "Center",
809
+ type: '{ tag: "Center"; value?: undefined }',
810
+ },
811
+ {
812
+ name: "End",
813
+ type: '{ tag: "End"; value?: undefined }',
814
+ },
815
+ ],
816
+ },
817
+ {
818
+ id: "host-account-connection-status-subscribe-item",
819
+ name: "HostAccountConnectionStatusSubscribeItem",
820
+ category: "account",
821
+ definition: 'export type HostAccountConnectionStatusSubscribeItem = "Disconnected" | "Connected";',
822
+ description: "User's authentication state.",
823
+ variants: [
824
+ {
825
+ name: "Disconnected",
826
+ type: '{ tag: "Disconnected"; value?: undefined }',
827
+ },
828
+ {
829
+ name: "Connected",
830
+ type: '{ tag: "Connected"; value?: undefined }',
831
+ },
832
+ ],
833
+ },
834
+ {
835
+ id: "host-account-create-proof-error",
836
+ name: "HostAccountCreateProofError",
837
+ category: "account",
838
+ definition: 'export type HostAccountCreateProofError =\n | { tag: "RingNotFound"; value?: undefined }\n | { tag: "Rejected"; value?: undefined }\n | { tag: "Unknown"; value: { reason: string } }\n;',
839
+ description: "Error returned when ring VRF proof creation fails.",
840
+ variants: [
841
+ {
842
+ name: "RingNotFound",
843
+ type: '{ tag: "RingNotFound"; value?: undefined }',
844
+ description: "Ring not available at the specified location.",
845
+ },
846
+ {
847
+ name: "Rejected",
848
+ type: '{ tag: "Rejected"; value?: undefined }',
849
+ description: "User or host rejected.",
850
+ },
851
+ {
852
+ name: "Unknown",
853
+ type: '{ tag: "Unknown"; value: { reason: string } }',
854
+ description: "Catch-all.",
855
+ },
856
+ ],
857
+ },
858
+ {
859
+ id: "host-account-create-proof-request",
860
+ name: "HostAccountCreateProofRequest",
861
+ category: "account",
862
+ definition: "export interface HostAccountCreateProofRequest {\n productAccountId: ProductAccountId;\n ringLocation: RingLocation;\n context: HexString;\n}",
863
+ description: "Request to create a ring VRF proof for a product account.",
864
+ fields: [
865
+ {
866
+ name: "product_account_id",
867
+ type: "ProductAccountId",
868
+ description: "Product account that should create the proof.",
869
+ },
870
+ {
871
+ name: "ring_location",
872
+ type: "RingLocation",
873
+ description: "Ring location to use for proof generation.",
874
+ },
875
+ {
876
+ name: "context",
877
+ type: "HexString",
878
+ description: "Context bytes bound to the proof.",
879
+ },
880
+ ],
881
+ },
882
+ {
883
+ id: "host-account-create-proof-response",
884
+ name: "HostAccountCreateProofResponse",
885
+ category: "account",
886
+ definition: "export interface HostAccountCreateProofResponse {\n proof: HexString;\n}",
887
+ description: "Response containing a ring VRF proof.",
888
+ fields: [
889
+ {
890
+ name: "proof",
891
+ type: "HexString",
892
+ description: "Variable-length ring VRF proof bytes.",
893
+ },
894
+ ],
895
+ },
896
+ {
897
+ id: "host-account-get-alias-request",
898
+ name: "HostAccountGetAliasRequest",
899
+ category: "account",
900
+ definition: "export interface HostAccountGetAliasRequest {\n productAccountId: ProductAccountId;\n}",
901
+ description: "Request to retrieve a contextual alias for a product account.",
902
+ fields: [
903
+ {
904
+ name: "product_account_id",
905
+ type: "ProductAccountId",
906
+ description: "Product account to derive the alias for.",
907
+ },
908
+ ],
909
+ },
910
+ {
911
+ id: "host-account-get-alias-response",
912
+ name: "HostAccountGetAliasResponse",
913
+ category: "account",
914
+ definition: "export interface HostAccountGetAliasResponse {\n context: HexString;\n alias: HexString;\n}",
915
+ description: "A privacy-preserving alias derived via ring VRF, bound to a specific context.",
916
+ fields: [
917
+ {
918
+ name: "context",
919
+ type: "HexString",
920
+ description: "32-byte context identifier.",
921
+ },
922
+ {
923
+ name: "alias",
924
+ type: "HexString",
925
+ description: "Ring VRF alias (variable length).",
926
+ },
927
+ ],
928
+ },
929
+ {
930
+ id: "host-account-get-error",
931
+ name: "HostAccountGetError",
932
+ category: "account",
933
+ definition: 'export type HostAccountGetError =\n | { tag: "NotConnected"; value?: undefined }\n | { tag: "Rejected"; value?: undefined }\n | { tag: "DomainNotValid"; value?: undefined }\n | { tag: "Unknown"; value: { reason: string } }\n;',
934
+ description: "Error returned when credential/account requests fail.",
935
+ variants: [
936
+ {
937
+ name: "NotConnected",
938
+ type: '{ tag: "NotConnected"; value?: undefined }',
939
+ description: "User is not logged in.",
940
+ },
941
+ {
942
+ name: "Rejected",
943
+ type: '{ tag: "Rejected"; value?: undefined }',
944
+ description: "User or host rejected the request.",
945
+ },
946
+ {
947
+ name: "DomainNotValid",
948
+ type: '{ tag: "DomainNotValid"; value?: undefined }',
949
+ description: "Domain identifier is invalid.",
950
+ },
951
+ {
952
+ name: "Unknown",
953
+ type: '{ tag: "Unknown"; value: { reason: string } }',
954
+ description: "Catch-all error with reason.",
955
+ },
956
+ ],
957
+ },
958
+ {
959
+ id: "host-account-get-request",
960
+ name: "HostAccountGetRequest",
961
+ category: "account",
962
+ definition: "export interface HostAccountGetRequest {\n productAccountId: ProductAccountId;\n}",
963
+ description: "Request to retrieve a product-scoped account.",
964
+ fields: [
965
+ {
966
+ name: "product_account_id",
967
+ type: "ProductAccountId",
968
+ description: "Product account to retrieve.",
969
+ },
970
+ ],
971
+ },
972
+ {
973
+ id: "host-account-get-response",
974
+ name: "HostAccountGetResponse",
975
+ category: "account",
976
+ definition: "export interface HostAccountGetResponse {\n account: ProductAccount;\n}",
977
+ description: "Response containing a product-scoped account.",
978
+ fields: [
979
+ {
980
+ name: "account",
981
+ type: "ProductAccount",
982
+ description: "Retrieved product account.",
983
+ },
984
+ ],
985
+ },
986
+ {
987
+ id: "host-chat-action-subscribe-item",
988
+ name: "HostChatActionSubscribeItem",
989
+ category: "chat",
990
+ definition: "export interface HostChatActionSubscribeItem {\n roomId: string;\n peer: string;\n payload: ChatActionPayload;\n}",
991
+ description: "A chat action received from the host.",
992
+ fields: [
993
+ {
994
+ name: "room_id",
995
+ type: "string",
996
+ description: "Room where the action occurred.",
997
+ },
998
+ {
999
+ name: "peer",
1000
+ type: "string",
1001
+ description: "Peer who initiated the action.",
1002
+ },
1003
+ {
1004
+ name: "payload",
1005
+ type: "ChatActionPayload",
1006
+ description: "The action payload.",
1007
+ },
1008
+ ],
1009
+ },
1010
+ {
1011
+ id: "host-chat-create-room-error",
1012
+ name: "HostChatCreateRoomError",
1013
+ category: "chat",
1014
+ definition: 'export type HostChatCreateRoomError =\n | { tag: "PermissionDenied"; value?: undefined }\n | { tag: "Unknown"; value: { reason: string } }\n;',
1015
+ description: "Chat room registration error.",
1016
+ variants: [
1017
+ {
1018
+ name: "PermissionDenied",
1019
+ type: '{ tag: "PermissionDenied"; value?: undefined }',
1020
+ description: "Not allowed.",
1021
+ },
1022
+ {
1023
+ name: "Unknown",
1024
+ type: '{ tag: "Unknown"; value: { reason: string } }',
1025
+ description: "Catch-all.",
1026
+ },
1027
+ ],
1028
+ },
1029
+ {
1030
+ id: "host-chat-create-room-request",
1031
+ name: "HostChatCreateRoomRequest",
1032
+ category: "chat",
1033
+ definition: "export interface HostChatCreateRoomRequest {\n roomId: string;\n name: string;\n icon: string;\n}",
1034
+ description: "Request to create a chat room.",
1035
+ fields: [
1036
+ {
1037
+ name: "room_id",
1038
+ type: "string",
1039
+ description: "Unique room identifier.",
1040
+ },
1041
+ {
1042
+ name: "name",
1043
+ type: "string",
1044
+ description: "Room display name.",
1045
+ },
1046
+ {
1047
+ name: "icon",
1048
+ type: "string",
1049
+ description: "URL or base64 image.",
1050
+ },
1051
+ ],
1052
+ },
1053
+ {
1054
+ id: "host-chat-create-room-response",
1055
+ name: "HostChatCreateRoomResponse",
1056
+ category: "chat",
1057
+ definition: "export interface HostChatCreateRoomResponse {\n status: ChatRoomRegistrationStatus;\n}",
1058
+ description: "Result of a room registration.",
1059
+ fields: [
1060
+ {
1061
+ name: "status",
1062
+ type: "ChatRoomRegistrationStatus",
1063
+ description: "`New` or `Exists`.",
1064
+ },
1065
+ ],
1066
+ },
1067
+ {
1068
+ id: "host-chat-list-subscribe-item",
1069
+ name: "HostChatListSubscribeItem",
1070
+ category: "chat",
1071
+ definition: "export interface HostChatListSubscribeItem {\n rooms: Array<ChatRoom>;\n}",
1072
+ description: "Item containing the current chat rooms.",
1073
+ fields: [
1074
+ {
1075
+ name: "rooms",
1076
+ type: "Array<ChatRoom>",
1077
+ description: "Chat rooms the product participates in.",
1078
+ },
1079
+ ],
1080
+ },
1081
+ {
1082
+ id: "host-chat-post-message-error",
1083
+ name: "HostChatPostMessageError",
1084
+ category: "chat",
1085
+ definition: 'export type HostChatPostMessageError =\n | { tag: "MessageTooLarge"; value?: undefined }\n | { tag: "Unknown"; value: { reason: string } }\n;',
1086
+ description: "Chat message posting error.",
1087
+ variants: [
1088
+ {
1089
+ name: "MessageTooLarge",
1090
+ type: '{ tag: "MessageTooLarge"; value?: undefined }',
1091
+ description: "Message exceeded size limit.",
1092
+ },
1093
+ {
1094
+ name: "Unknown",
1095
+ type: '{ tag: "Unknown"; value: { reason: string } }',
1096
+ description: "Catch-all.",
1097
+ },
1098
+ ],
1099
+ },
1100
+ {
1101
+ id: "host-chat-post-message-request",
1102
+ name: "HostChatPostMessageRequest",
1103
+ category: "chat",
1104
+ definition: "export interface HostChatPostMessageRequest {\n roomId: string;\n payload: ChatMessageContent;\n}",
1105
+ description: "Request to post a message to a chat room.",
1106
+ fields: [
1107
+ {
1108
+ name: "room_id",
1109
+ type: "string",
1110
+ description: "Room to post to.",
1111
+ },
1112
+ {
1113
+ name: "payload",
1114
+ type: "ChatMessageContent",
1115
+ description: "Message content.",
1116
+ },
1117
+ ],
1118
+ },
1119
+ {
1120
+ id: "host-chat-post-message-response",
1121
+ name: "HostChatPostMessageResponse",
1122
+ category: "chat",
1123
+ definition: "export interface HostChatPostMessageResponse {\n messageId: string;\n}",
1124
+ description: "Result of posting a message.",
1125
+ fields: [
1126
+ {
1127
+ name: "message_id",
1128
+ type: "string",
1129
+ description: "Assigned message ID.",
1130
+ },
1131
+ ],
1132
+ },
1133
+ {
1134
+ id: "host-chat-register-bot-error",
1135
+ name: "HostChatRegisterBotError",
1136
+ category: "chat",
1137
+ definition: 'export type HostChatRegisterBotError =\n | { tag: "PermissionDenied"; value?: undefined }\n | { tag: "Unknown"; value: { reason: string } }\n;',
1138
+ description: "Chat bot registration error.",
1139
+ variants: [
1140
+ {
1141
+ name: "PermissionDenied",
1142
+ type: '{ tag: "PermissionDenied"; value?: undefined }',
1143
+ description: "Not allowed.",
1144
+ },
1145
+ {
1146
+ name: "Unknown",
1147
+ type: '{ tag: "Unknown"; value: { reason: string } }',
1148
+ description: "Catch-all.",
1149
+ },
1150
+ ],
1151
+ },
1152
+ {
1153
+ id: "host-chat-register-bot-request",
1154
+ name: "HostChatRegisterBotRequest",
1155
+ category: "chat",
1156
+ definition: "export interface HostChatRegisterBotRequest {\n botId: string;\n name: string;\n icon: string;\n}",
1157
+ description: "Request to register a chat bot.",
1158
+ fields: [
1159
+ {
1160
+ name: "bot_id",
1161
+ type: "string",
1162
+ description: "Unique bot identifier.",
1163
+ },
1164
+ {
1165
+ name: "name",
1166
+ type: "string",
1167
+ description: "Bot display name.",
1168
+ },
1169
+ {
1170
+ name: "icon",
1171
+ type: "string",
1172
+ description: "URL or base64 image.",
1173
+ },
1174
+ ],
1175
+ },
1176
+ {
1177
+ id: "host-chat-register-bot-response",
1178
+ name: "HostChatRegisterBotResponse",
1179
+ category: "chat",
1180
+ definition: "export interface HostChatRegisterBotResponse {\n status: ChatBotRegistrationStatus;\n}",
1181
+ description: "Result of a bot registration.",
1182
+ fields: [
1183
+ {
1184
+ name: "status",
1185
+ type: "ChatBotRegistrationStatus",
1186
+ description: "`New` or `Exists`.",
1187
+ },
1188
+ ],
1189
+ },
1190
+ {
1191
+ id: "host-create-transaction-error",
1192
+ name: "HostCreateTransactionError",
1193
+ category: "transaction",
1194
+ definition: 'export type HostCreateTransactionError =\n | { tag: "FailedToDecode"; value?: undefined }\n | { tag: "Rejected"; value?: undefined }\n | { tag: "NotSupported"; value: { reason: string } }\n | { tag: "PermissionDenied"; value?: undefined }\n | { tag: "Unknown"; value: { reason: string } }\n;',
1195
+ description: "Transaction creation error.",
1196
+ variants: [
1197
+ {
1198
+ name: "FailedToDecode",
1199
+ type: '{ tag: "FailedToDecode"; value?: undefined }',
1200
+ description: "Payload could not be deserialized.",
1201
+ },
1202
+ {
1203
+ name: "Rejected",
1204
+ type: '{ tag: "Rejected"; value?: undefined }',
1205
+ description: "User rejected.",
1206
+ },
1207
+ {
1208
+ name: "NotSupported",
1209
+ type: '{ tag: "NotSupported"; value: { reason: string } }',
1210
+ description: "Unsupported payload version or extension.",
1211
+ },
1212
+ {
1213
+ name: "PermissionDenied",
1214
+ type: '{ tag: "PermissionDenied"; value?: undefined }',
1215
+ description: "Not authenticated.",
1216
+ },
1217
+ {
1218
+ name: "Unknown",
1219
+ type: '{ tag: "Unknown"; value: { reason: string } }',
1220
+ description: "Catch-all.",
1221
+ },
1222
+ ],
1223
+ },
1224
+ {
1225
+ id: "host-create-transaction-response",
1226
+ name: "HostCreateTransactionResponse",
1227
+ category: "signing",
1228
+ definition: "export interface HostCreateTransactionResponse {\n transaction: HexString;\n}",
1229
+ description: "Response containing a created transaction.",
1230
+ fields: [
1231
+ {
1232
+ name: "transaction",
1233
+ type: "HexString",
1234
+ description: "SCALE-encoded signed transaction.",
1235
+ },
1236
+ ],
1237
+ },
1238
+ {
1239
+ id: "host-create-transaction-with-legacy-account-response",
1240
+ name: "HostCreateTransactionWithLegacyAccountResponse",
1241
+ category: "signing",
1242
+ definition: "export interface HostCreateTransactionWithLegacyAccountResponse {\n transaction: HexString;\n}",
1243
+ description: "Response containing a transaction created with a non-product account.",
1244
+ fields: [
1245
+ {
1246
+ name: "transaction",
1247
+ type: "HexString",
1248
+ description: "SCALE-encoded signed transaction.",
1249
+ },
1250
+ ],
1251
+ },
1252
+ {
1253
+ id: "host-derive-entropy-error",
1254
+ name: "HostDeriveEntropyError",
1255
+ category: "entropy",
1256
+ definition: 'export type HostDeriveEntropyError =\n | { tag: "Unknown"; value: { reason: string } }\n;',
1257
+ description: "Error from [`crate::api::Entropy::derive`] (RFC 0007).",
1258
+ variants: [
1259
+ {
1260
+ name: "Unknown",
1261
+ type: '{ tag: "Unknown"; value: { reason: string } }',
1262
+ description: "Catch-all.",
1263
+ },
1264
+ ],
1265
+ },
1266
+ {
1267
+ id: "host-derive-entropy-request",
1268
+ name: "HostDeriveEntropyRequest",
1269
+ category: "entropy",
1270
+ definition: "export interface HostDeriveEntropyRequest {\n context: HexString;\n}",
1271
+ description: "Request to derive deterministic per-product entropy (RFC 0007).\n\nThe host derives 32 bytes from product-scoped seed material and `context`.\nRepeated calls with the same `context` for the same product yield the same\nentropy.",
1272
+ fields: [
1273
+ {
1274
+ name: "context",
1275
+ type: "HexString",
1276
+ description: "Domain-separated derivation context.",
1277
+ },
1278
+ ],
1279
+ },
1280
+ {
1281
+ id: "host-derive-entropy-response",
1282
+ name: "HostDeriveEntropyResponse",
1283
+ category: "entropy",
1284
+ definition: "export interface HostDeriveEntropyResponse {\n entropy: HexString;\n}",
1285
+ description: "Response carrying 32 bytes of deterministically derived entropy.",
1286
+ fields: [
1287
+ {
1288
+ name: "entropy",
1289
+ type: "HexString",
1290
+ description: "32 bytes of derived entropy.",
1291
+ },
1292
+ ],
1293
+ },
1294
+ {
1295
+ id: "host-device-permission-request",
1296
+ name: "HostDevicePermissionRequest",
1297
+ category: "permissions",
1298
+ definition: 'export type HostDevicePermissionRequest = "Notifications" | "Camera" | "Microphone" | "Bluetooth" | "NFC" | "Location" | "Clipboard" | "OpenUrl" | "Biometrics";',
1299
+ description: "Device-capability permission requested from the host (RFC 0002).\n\nThe user's decision is persisted indefinitely after the first prompt and\nsurvives app restarts, whether the decision was grant or deny; the host\ndoes not re-prompt on subsequent requests for the same capability.",
1300
+ variants: [
1301
+ {
1302
+ name: "Notifications",
1303
+ type: '{ tag: "Notifications"; value?: undefined }',
1304
+ },
1305
+ {
1306
+ name: "Camera",
1307
+ type: '{ tag: "Camera"; value?: undefined }',
1308
+ },
1309
+ {
1310
+ name: "Microphone",
1311
+ type: '{ tag: "Microphone"; value?: undefined }',
1312
+ },
1313
+ {
1314
+ name: "Bluetooth",
1315
+ type: '{ tag: "Bluetooth"; value?: undefined }',
1316
+ },
1317
+ {
1318
+ name: "NFC",
1319
+ type: '{ tag: "NFC"; value?: undefined }',
1320
+ },
1321
+ {
1322
+ name: "Location",
1323
+ type: '{ tag: "Location"; value?: undefined }',
1324
+ },
1325
+ {
1326
+ name: "Clipboard",
1327
+ type: '{ tag: "Clipboard"; value?: undefined }',
1328
+ },
1329
+ {
1330
+ name: "OpenUrl",
1331
+ type: '{ tag: "OpenUrl"; value?: undefined }',
1332
+ },
1333
+ {
1334
+ name: "Biometrics",
1335
+ type: '{ tag: "Biometrics"; value?: undefined }',
1336
+ },
1337
+ ],
1338
+ },
1339
+ {
1340
+ id: "host-device-permission-response",
1341
+ name: "HostDevicePermissionResponse",
1342
+ category: "permissions",
1343
+ definition: "export interface HostDevicePermissionResponse {\n granted: boolean;\n}",
1344
+ description: "Outcome of a device-permission request.",
1345
+ fields: [
1346
+ {
1347
+ name: "granted",
1348
+ type: "boolean",
1349
+ description: "Whether the permission was granted.",
1350
+ },
1351
+ ],
1352
+ },
1353
+ {
1354
+ id: "host-feature-supported-request",
1355
+ name: "HostFeatureSupportedRequest",
1356
+ category: "system",
1357
+ definition: 'export type HostFeatureSupportedRequest =\n | { tag: "Chain"; value: { genesisHash: HexString } }\n;',
1358
+ description: "Request to query whether a feature is supported by the host.",
1359
+ variants: [
1360
+ {
1361
+ name: "Chain",
1362
+ type: '{ tag: "Chain"; value: { genesisHash: HexString } }',
1363
+ description: "Ask whether the host can interact with the chain identified by genesis hash.",
1364
+ },
1365
+ ],
1366
+ },
1367
+ {
1368
+ id: "host-feature-supported-response",
1369
+ name: "HostFeatureSupportedResponse",
1370
+ category: "system",
1371
+ definition: "export interface HostFeatureSupportedResponse {\n supported: boolean;\n}",
1372
+ description: "Response to a feature-support query.",
1373
+ fields: [
1374
+ {
1375
+ name: "supported",
1376
+ type: "boolean",
1377
+ description: "Whether the feature is supported.",
1378
+ },
1379
+ ],
1380
+ },
1381
+ {
1382
+ id: "host-get-legacy-accounts-response",
1383
+ name: "HostGetLegacyAccountsResponse",
1384
+ category: "account",
1385
+ definition: "export interface HostGetLegacyAccountsResponse {\n accounts: Array<LegacyAccount>;\n}",
1386
+ description: "Response containing all legacy (user-imported) accounts owned by the user.",
1387
+ fields: [
1388
+ {
1389
+ name: "accounts",
1390
+ type: "Array<LegacyAccount>",
1391
+ description: "Legacy accounts.",
1392
+ },
1393
+ ],
1394
+ },
1395
+ {
1396
+ id: "host-get-user-id-error",
1397
+ name: "HostGetUserIdError",
1398
+ category: "account",
1399
+ definition: 'export type HostGetUserIdError =\n | { tag: "PermissionDenied"; value?: undefined }\n | { tag: "NotConnected"; value?: undefined }\n | { tag: "Unknown"; value: { reason: string } }\n;',
1400
+ description: "Error from [`crate::api::Account::get_user_id`].",
1401
+ variants: [
1402
+ {
1403
+ name: "PermissionDenied",
1404
+ type: '{ tag: "PermissionDenied"; value?: undefined }',
1405
+ description: "User denied the identity disclosure request.",
1406
+ },
1407
+ {
1408
+ name: "NotConnected",
1409
+ type: '{ tag: "NotConnected"; value?: undefined }',
1410
+ description: "User is not logged in.",
1411
+ },
1412
+ {
1413
+ name: "Unknown",
1414
+ type: '{ tag: "Unknown"; value: { reason: string } }',
1415
+ description: "Catch-all.",
1416
+ },
1417
+ ],
1418
+ },
1419
+ {
1420
+ id: "host-get-user-id-response",
1421
+ name: "HostGetUserIdResponse",
1422
+ category: "account",
1423
+ definition: "export interface HostGetUserIdResponse {\n primaryUsername: string;\n}",
1424
+ description: "The user's primary DotNS account identity.",
1425
+ fields: [
1426
+ {
1427
+ name: "primary_username",
1428
+ type: "string",
1429
+ description: "The user's primary DotNS username.",
1430
+ },
1431
+ ],
1432
+ },
1433
+ {
1434
+ id: "host-handshake-error",
1435
+ name: "HostHandshakeError",
1436
+ category: "system",
1437
+ definition: 'export type HostHandshakeError =\n | { tag: "Timeout"; value?: undefined }\n | { tag: "UnsupportedProtocolVersion"; value?: undefined }\n | { tag: "Unknown"; value: GenericError }\n;',
1438
+ description: "Error from [`crate::api::System::handshake`] (RFC 0009).\n\nThe handshake is the first call on a fresh connection; it does not require\nuser authentication and is used to negotiate the wire codec version.",
1439
+ variants: [
1440
+ {
1441
+ name: "Timeout",
1442
+ type: '{ tag: "Timeout"; value?: undefined }',
1443
+ description: "Host did not complete the handshake in time.",
1444
+ },
1445
+ {
1446
+ name: "UnsupportedProtocolVersion",
1447
+ type: '{ tag: "UnsupportedProtocolVersion"; value?: undefined }',
1448
+ description: "Host does not speak the codec version requested by the product.",
1449
+ },
1450
+ {
1451
+ name: "Unknown",
1452
+ type: '{ tag: "Unknown"; value: GenericError }',
1453
+ description: "Catch-all.",
1454
+ },
1455
+ ],
1456
+ },
1457
+ {
1458
+ id: "host-handshake-request",
1459
+ name: "HostHandshakeRequest",
1460
+ category: "system",
1461
+ definition: "export interface HostHandshakeRequest {\n codecVersion: number;\n}",
1462
+ description: "Wire-codec negotiation payload sent by the product (RFC 0009).",
1463
+ fields: [
1464
+ {
1465
+ name: "codec_version",
1466
+ type: "number",
1467
+ description: "Wire codec version requested by the product.",
1468
+ },
1469
+ ],
1470
+ },
1471
+ {
1472
+ id: "host-local-storage-clear-request",
1473
+ name: "HostLocalStorageClearRequest",
1474
+ category: "local_storage",
1475
+ definition: "export interface HostLocalStorageClearRequest {\n key: string;\n}",
1476
+ description: "Request to clear a local storage key.",
1477
+ fields: [
1478
+ {
1479
+ name: "key",
1480
+ type: "string",
1481
+ description: "Storage key to clear.",
1482
+ },
1483
+ ],
1484
+ },
1485
+ {
1486
+ id: "host-local-storage-read-error",
1487
+ name: "HostLocalStorageReadError",
1488
+ category: "local_storage",
1489
+ definition: 'export type HostLocalStorageReadError =\n | { tag: "Full"; value?: undefined }\n | { tag: "Unknown"; value: { reason: string } }\n;',
1490
+ description: "Local storage operation error.",
1491
+ variants: [
1492
+ {
1493
+ name: "Full",
1494
+ type: '{ tag: "Full"; value?: undefined }',
1495
+ description: "Storage quota exceeded.",
1496
+ },
1497
+ {
1498
+ name: "Unknown",
1499
+ type: '{ tag: "Unknown"; value: { reason: string } }',
1500
+ description: "Catch-all.",
1501
+ },
1502
+ ],
1503
+ },
1504
+ {
1505
+ id: "host-local-storage-read-request",
1506
+ name: "HostLocalStorageReadRequest",
1507
+ category: "local_storage",
1508
+ definition: "export interface HostLocalStorageReadRequest {\n key: string;\n}",
1509
+ description: "Request to read a local storage value.",
1510
+ fields: [
1511
+ {
1512
+ name: "key",
1513
+ type: "string",
1514
+ description: "Storage key to read.",
1515
+ },
1516
+ ],
1517
+ },
1518
+ {
1519
+ id: "host-local-storage-read-response",
1520
+ name: "HostLocalStorageReadResponse",
1521
+ category: "local_storage",
1522
+ definition: "export interface HostLocalStorageReadResponse {\n value?: HexString;\n}",
1523
+ description: "Response containing an optional local storage value.",
1524
+ fields: [
1525
+ {
1526
+ name: "value",
1527
+ type: "HexString | undefined",
1528
+ description: "Stored value, if present.",
1529
+ },
1530
+ ],
1531
+ },
1532
+ {
1533
+ id: "host-local-storage-write-request",
1534
+ name: "HostLocalStorageWriteRequest",
1535
+ category: "local_storage",
1536
+ definition: "export interface HostLocalStorageWriteRequest {\n key: string;\n value: HexString;\n}",
1537
+ description: "Request to write a value into local storage.",
1538
+ fields: [
1539
+ {
1540
+ name: "key",
1541
+ type: "string",
1542
+ description: "Storage key to write.",
1543
+ },
1544
+ {
1545
+ name: "value",
1546
+ type: "HexString",
1547
+ description: "Value to store at the key.",
1548
+ },
1549
+ ],
1550
+ },
1551
+ {
1552
+ id: "host-navigate-to-error",
1553
+ name: "HostNavigateToError",
1554
+ category: "system",
1555
+ definition: 'export type HostNavigateToError =\n | { tag: "PermissionDenied"; value?: undefined }\n | { tag: "Unknown"; value: { reason: string } }\n;',
1556
+ description: "Error from [`crate::api::System::navigate_to`].",
1557
+ variants: [
1558
+ {
1559
+ name: "PermissionDenied",
1560
+ type: '{ tag: "PermissionDenied"; value?: undefined }',
1561
+ description: "User denied the navigation prompt.",
1562
+ },
1563
+ {
1564
+ name: "Unknown",
1565
+ type: '{ tag: "Unknown"; value: { reason: string } }',
1566
+ description: "Catch-all.",
1567
+ },
1568
+ ],
1569
+ },
1570
+ {
1571
+ id: "host-navigate-to-request",
1572
+ name: "HostNavigateToRequest",
1573
+ category: "system",
1574
+ definition: "export interface HostNavigateToRequest {\n url: string;\n}",
1575
+ description: "Request to navigate the host to an external URL.",
1576
+ fields: [
1577
+ {
1578
+ name: "url",
1579
+ type: "string",
1580
+ description: "URL to open.",
1581
+ },
1582
+ ],
1583
+ },
1584
+ {
1585
+ id: "host-payment-balance-subscribe-error",
1586
+ name: "HostPaymentBalanceSubscribeError",
1587
+ category: "payment",
1588
+ definition: 'export type HostPaymentBalanceSubscribeError =\n | { tag: "PermissionDenied"; value?: undefined }\n | { tag: "Unknown"; value: { reason: string } }\n;',
1589
+ description: "Error from [`crate::api::Payment::balance_subscribe`].\n\nSee [RFC 0006].\n\n[RFC 0006]: https://github.com/paritytech/triangle-js-sdks/pull/94",
1590
+ variants: [
1591
+ {
1592
+ name: "PermissionDenied",
1593
+ type: '{ tag: "PermissionDenied"; value?: undefined }',
1594
+ description: "User denied the balance disclosure request.",
1595
+ },
1596
+ {
1597
+ name: "Unknown",
1598
+ type: '{ tag: "Unknown"; value: { reason: string } }',
1599
+ description: "Catch-all.",
1600
+ },
1601
+ ],
1602
+ },
1603
+ {
1604
+ id: "host-payment-balance-subscribe-item",
1605
+ name: "HostPaymentBalanceSubscribeItem",
1606
+ category: "payment",
1607
+ definition: "export interface HostPaymentBalanceSubscribeItem {\n available: Balance;\n}",
1608
+ description: "Current payment balance state pushed to subscribers.\n\nSee [RFC 0006].\n\n[RFC 0006]: https://github.com/paritytech/triangle-js-sdks/pull/94",
1609
+ fields: [
1610
+ {
1611
+ name: "available",
1612
+ type: "Balance",
1613
+ description: "Balance that can be spent right now.",
1614
+ },
1615
+ ],
1616
+ },
1617
+ {
1618
+ id: "host-payment-balance-subscribe-request",
1619
+ name: "HostPaymentBalanceSubscribeRequest",
1620
+ category: "payment",
1621
+ definition: "export interface HostPaymentBalanceSubscribeRequest {\n purse?: PaymentPurseId;\n}",
1622
+ description: "Request to subscribe to payment balance updates.",
1623
+ fields: [
1624
+ {
1625
+ name: "purse",
1626
+ type: "PaymentPurseId | undefined",
1627
+ description: "Optional purse selector. `None` means MAIN_PURSE.",
1628
+ },
1629
+ ],
1630
+ },
1631
+ {
1632
+ id: "host-payment-error",
1633
+ name: "HostPaymentError",
1634
+ category: "payment",
1635
+ definition: 'export type HostPaymentError =\n | { tag: "Rejected"; value?: undefined }\n | { tag: "InsufficientBalance"; value?: undefined }\n | { tag: "Unknown"; value: { reason: string } }\n;',
1636
+ description: "Error from [`crate::api::Payment::request`].\n\nSee [RFC 0006].\n\n[RFC 0006]: https://github.com/paritytech/triangle-js-sdks/pull/94",
1637
+ variants: [
1638
+ {
1639
+ name: "Rejected",
1640
+ type: '{ tag: "Rejected"; value?: undefined }',
1641
+ description: "User rejected the payment request.",
1642
+ },
1643
+ {
1644
+ name: "InsufficientBalance",
1645
+ type: '{ tag: "InsufficientBalance"; value?: undefined }',
1646
+ description: "User's available balance is not sufficient for the requested amount.",
1647
+ },
1648
+ {
1649
+ name: "Unknown",
1650
+ type: '{ tag: "Unknown"; value: { reason: string } }',
1651
+ description: "Catch-all.",
1652
+ },
1653
+ ],
1654
+ },
1655
+ {
1656
+ id: "host-payment-request",
1657
+ name: "HostPaymentRequest",
1658
+ category: "payment",
1659
+ definition: "export interface HostPaymentRequest {\n from?: PaymentPurseId;\n amount: Balance;\n destination: HexString;\n}",
1660
+ description: "Request to initiate a payment to another account.",
1661
+ fields: [
1662
+ {
1663
+ name: "from",
1664
+ type: "PaymentPurseId | undefined",
1665
+ description: "Optional purse selector. `None` means MAIN_PURSE.",
1666
+ },
1667
+ {
1668
+ name: "amount",
1669
+ type: "Balance",
1670
+ description: "Amount to pay.",
1671
+ },
1672
+ {
1673
+ name: "destination",
1674
+ type: "HexString",
1675
+ description: "Destination account.",
1676
+ },
1677
+ ],
1678
+ },
1679
+ {
1680
+ id: "host-payment-response",
1681
+ name: "HostPaymentResponse",
1682
+ category: "payment",
1683
+ definition: "export interface HostPaymentResponse {\n id: string;\n}",
1684
+ description: "Receipt returned after a successful payment request.\n\nSee [RFC 0006].\n\n[RFC 0006]: https://github.com/paritytech/triangle-js-sdks/pull/94",
1685
+ fields: [
1686
+ {
1687
+ name: "id",
1688
+ type: "string",
1689
+ description: "The assigned payment identifier.",
1690
+ },
1691
+ ],
1692
+ },
1693
+ {
1694
+ id: "host-payment-status-subscribe-error",
1695
+ name: "HostPaymentStatusSubscribeError",
1696
+ category: "payment",
1697
+ definition: 'export type HostPaymentStatusSubscribeError =\n | { tag: "PaymentNotFound"; value?: undefined }\n | { tag: "Unknown"; value: { reason: string } }\n;',
1698
+ description: "Error from [`crate::api::Payment::status_subscribe`].\n\nSee [RFC 0006].\n\n[RFC 0006]: https://github.com/paritytech/triangle-js-sdks/pull/94",
1699
+ variants: [
1700
+ {
1701
+ name: "PaymentNotFound",
1702
+ type: '{ tag: "PaymentNotFound"; value?: undefined }',
1703
+ description: "Payment ID was not found or does not belong to the current product.",
1704
+ },
1705
+ {
1706
+ name: "Unknown",
1707
+ type: '{ tag: "Unknown"; value: { reason: string } }',
1708
+ description: "Catch-all.",
1709
+ },
1710
+ ],
1711
+ },
1712
+ {
1713
+ id: "host-payment-status-subscribe-item",
1714
+ name: "HostPaymentStatusSubscribeItem",
1715
+ category: "payment",
1716
+ definition: 'export type HostPaymentStatusSubscribeItem =\n | { tag: "Processing"; value?: undefined }\n | { tag: "Completed"; value?: undefined }\n | { tag: "Failed"; value: { reason: string } }\n;',
1717
+ description: "Payment lifecycle status pushed to subscribers.\n\nOnce a terminal state (`Completed` or `Failed`) is reached, the host\ndelivers it and may close the subscription.\n\nSee [RFC 0006].\n\n[RFC 0006]: https://github.com/paritytech/triangle-js-sdks/pull/94",
1718
+ variants: [
1719
+ {
1720
+ name: "Processing",
1721
+ type: '{ tag: "Processing"; value?: undefined }',
1722
+ description: "Payment is being processed.",
1723
+ },
1724
+ {
1725
+ name: "Completed",
1726
+ type: '{ tag: "Completed"; value?: undefined }',
1727
+ description: "Payment has been settled successfully.",
1728
+ },
1729
+ {
1730
+ name: "Failed",
1731
+ type: '{ tag: "Failed"; value: { reason: string } }',
1732
+ description: "Payment has failed.",
1733
+ },
1734
+ ],
1735
+ },
1736
+ {
1737
+ id: "host-payment-status-subscribe-request",
1738
+ name: "HostPaymentStatusSubscribeRequest",
1739
+ category: "payment",
1740
+ definition: "export interface HostPaymentStatusSubscribeRequest {\n paymentId: string;\n}",
1741
+ description: "Request to subscribe to a payment status.",
1742
+ fields: [
1743
+ {
1744
+ name: "payment_id",
1745
+ type: "string",
1746
+ description: "Payment identifier to watch.",
1747
+ },
1748
+ ],
1749
+ },
1750
+ {
1751
+ id: "host-payment-top-up-error",
1752
+ name: "HostPaymentTopUpError",
1753
+ category: "payment",
1754
+ definition: 'export type HostPaymentTopUpError =\n | { tag: "InsufficientFunds"; value?: undefined }\n | { tag: "InvalidSource"; value?: undefined }\n | { tag: "PartialPayment"; value: { credited: Balance } }\n | { tag: "Unknown"; value: { reason: string } }\n;',
1755
+ description: "Error from [`crate::api::Payment::top_up`].\n\nSee [RFC 0006].\n\n[RFC 0006]: https://github.com/paritytech/triangle-js-sdks/pull/94",
1756
+ variants: [
1757
+ {
1758
+ name: "InsufficientFunds",
1759
+ type: '{ tag: "InsufficientFunds"; value?: undefined }',
1760
+ description: "The source account does not hold sufficient funds.",
1761
+ },
1762
+ {
1763
+ name: "InvalidSource",
1764
+ type: '{ tag: "InvalidSource"; value?: undefined }',
1765
+ description: "The source account was not found or is invalid.",
1766
+ },
1767
+ {
1768
+ name: "PartialPayment",
1769
+ type: '{ tag: "PartialPayment"; value: { credited: Balance } }',
1770
+ description: "Some coins were claimed but the total fell short of the requested amount.",
1771
+ },
1772
+ {
1773
+ name: "Unknown",
1774
+ type: '{ tag: "Unknown"; value: { reason: string } }',
1775
+ description: "Catch-all.",
1776
+ },
1777
+ ],
1778
+ },
1779
+ {
1780
+ id: "host-payment-top-up-request",
1781
+ name: "HostPaymentTopUpRequest",
1782
+ category: "payment",
1783
+ definition: "export interface HostPaymentTopUpRequest {\n into?: PaymentPurseId;\n amount: Balance;\n source: PaymentTopUpSource;\n}",
1784
+ description: "Request to top up the product payment balance.",
1785
+ fields: [
1786
+ {
1787
+ name: "into",
1788
+ type: "PaymentPurseId | undefined",
1789
+ description: "Optional purse selector. `None` means MAIN_PURSE.",
1790
+ },
1791
+ {
1792
+ name: "amount",
1793
+ type: "Balance",
1794
+ description: "Amount to top up.",
1795
+ },
1796
+ {
1797
+ name: "source",
1798
+ type: "PaymentTopUpSource",
1799
+ description: "Funding source for the top-up.",
1800
+ },
1801
+ ],
1802
+ },
1803
+ {
1804
+ id: "host-push-notification-cancel-request",
1805
+ name: "HostPushNotificationCancelRequest",
1806
+ category: "notifications",
1807
+ definition: "export interface HostPushNotificationCancelRequest {\n id: NotificationId;\n}",
1808
+ description: "Request to cancel a previously scheduled notification.",
1809
+ fields: [
1810
+ {
1811
+ name: "id",
1812
+ type: "NotificationId",
1813
+ description: "The notification identifier returned by [`HostPushNotificationResponse`].",
1814
+ },
1815
+ ],
1816
+ },
1817
+ {
1818
+ id: "host-push-notification-error",
1819
+ name: "HostPushNotificationError",
1820
+ category: "notifications",
1821
+ definition: 'export type HostPushNotificationError =\n | { tag: "ScheduleLimitReached"; value?: undefined }\n | { tag: "Unknown"; value: { reason: string } }\n;',
1822
+ description: "Push notification error.",
1823
+ variants: [
1824
+ {
1825
+ name: "ScheduleLimitReached",
1826
+ type: '{ tag: "ScheduleLimitReached"; value?: undefined }',
1827
+ description: "The host-wide queue of pending scheduled notifications is full.",
1828
+ },
1829
+ {
1830
+ name: "Unknown",
1831
+ type: '{ tag: "Unknown"; value: { reason: string } }',
1832
+ description: "Catch-all.",
1833
+ },
1834
+ ],
1835
+ },
1836
+ {
1837
+ id: "host-push-notification-request",
1838
+ name: "HostPushNotificationRequest",
1839
+ category: "notifications",
1840
+ definition: "export interface HostPushNotificationRequest {\n text: string;\n deeplink?: string;\n scheduledAt?: bigint;\n}",
1841
+ description: "Push notification payload.\n\nWhen `scheduled_at` is `Some`, the notification is deferred to the given\nwall-clock instant (Unix milliseconds UTC). `None` fires immediately,\npreserving prior behaviour. See [RFC 0019].\n\n[RFC 0019]: https://github.com/paritytech/truapi/blob/main/docs/rfcs/0019-scheduled-notifications.md",
1842
+ fields: [
1843
+ {
1844
+ name: "text",
1845
+ type: "string",
1846
+ description: "Notification text.",
1847
+ },
1848
+ {
1849
+ name: "deeplink",
1850
+ type: "string | undefined",
1851
+ description: "Optional URL to open on tap.",
1852
+ },
1853
+ {
1854
+ name: "scheduled_at",
1855
+ type: "bigint | undefined",
1856
+ description: "Optional Unix timestamp in milliseconds (UTC) at which the notification\nshould fire. `None` fires immediately.",
1857
+ },
1858
+ ],
1859
+ },
1860
+ {
1861
+ id: "host-push-notification-response",
1862
+ name: "HostPushNotificationResponse",
1863
+ category: "notifications",
1864
+ definition: "export interface HostPushNotificationResponse {\n id: NotificationId;\n}",
1865
+ description: "Successful push notification response carrying the assigned id.",
1866
+ fields: [
1867
+ {
1868
+ name: "id",
1869
+ type: "NotificationId",
1870
+ description: "Host-assigned notification identifier.",
1871
+ },
1872
+ ],
1873
+ },
1874
+ {
1875
+ id: "host-request-login-error",
1876
+ name: "HostRequestLoginError",
1877
+ category: "account",
1878
+ definition: 'export type HostRequestLoginError =\n | { tag: "Unknown"; value: { reason: string } }\n;',
1879
+ description: "Login request error.",
1880
+ variants: [
1881
+ {
1882
+ name: "Unknown",
1883
+ type: '{ tag: "Unknown"; value: { reason: string } }',
1884
+ description: "Catch-all.",
1885
+ },
1886
+ ],
1887
+ },
1888
+ {
1889
+ id: "host-request-login-request",
1890
+ name: "HostRequestLoginRequest",
1891
+ category: "account",
1892
+ definition: "export interface HostRequestLoginRequest {\n reason?: string;\n}",
1893
+ description: "Request to present the host login flow.",
1894
+ fields: [
1895
+ {
1896
+ name: "reason",
1897
+ type: "string | undefined",
1898
+ description: "Optional human-readable reason shown in the login UI.",
1899
+ },
1900
+ ],
1901
+ },
1902
+ {
1903
+ id: "host-request-login-response",
1904
+ name: "HostRequestLoginResponse",
1905
+ category: "account",
1906
+ definition: 'export type HostRequestLoginResponse = "Success" | "AlreadyConnected" | "Rejected";',
1907
+ description: "Result of a login request.",
1908
+ variants: [
1909
+ {
1910
+ name: "Success",
1911
+ type: '{ tag: "Success"; value?: undefined }',
1912
+ description: "User successfully authenticated.",
1913
+ },
1914
+ {
1915
+ name: "AlreadyConnected",
1916
+ type: '{ tag: "AlreadyConnected"; value?: undefined }',
1917
+ description: "User is already authenticated — no action was taken.",
1918
+ },
1919
+ {
1920
+ name: "Rejected",
1921
+ type: '{ tag: "Rejected"; value?: undefined }',
1922
+ description: "User dismissed/rejected the login UI.",
1923
+ },
1924
+ ],
1925
+ },
1926
+ {
1927
+ id: "host-request-resource-allocation-request",
1928
+ name: "HostRequestResourceAllocationRequest",
1929
+ category: "resource_allocation",
1930
+ definition: "export interface HostRequestResourceAllocationRequest {\n resources: Array<AllocatableResource>;\n}",
1931
+ description: "Batched resource pre-allocation request (RFC 0010).",
1932
+ fields: [
1933
+ {
1934
+ name: "resources",
1935
+ type: "Array<AllocatableResource>",
1936
+ description: "Resources to allocate.",
1937
+ },
1938
+ ],
1939
+ },
1940
+ {
1941
+ id: "host-request-resource-allocation-response",
1942
+ name: "HostRequestResourceAllocationResponse",
1943
+ category: "resource_allocation",
1944
+ definition: "export interface HostRequestResourceAllocationResponse {\n outcomes: Array<AllocationOutcome>;\n}",
1945
+ description: "Per-resource outcomes for a batched allocation request (RFC 0010).",
1946
+ fields: [
1947
+ {
1948
+ name: "outcomes",
1949
+ type: "Array<AllocationOutcome>",
1950
+ description: "Per-resource allocation outcomes, in the same order as the request.",
1951
+ },
1952
+ ],
1953
+ },
1954
+ {
1955
+ id: "host-sign-payload-data",
1956
+ name: "HostSignPayloadData",
1957
+ category: "signing",
1958
+ definition: "export interface HostSignPayloadData {\n blockHash: HexString;\n blockNumber: HexString;\n era: HexString;\n genesisHash: HexString;\n method: HexString;\n nonce: HexString;\n specVersion: HexString;\n tip: HexString;\n transactionVersion: HexString;\n signedExtensions: Array<string>;\n version: number;\n assetId?: HexString;\n metadataHash?: HexString;\n mode?: number;\n withSignedTransaction?: boolean;\n}",
1959
+ description: "Full Substrate extrinsic signing payload with all fields needed for signature\ngeneration.",
1960
+ fields: [
1961
+ {
1962
+ name: "block_hash",
1963
+ type: "HexString",
1964
+ description: "Reference block hash.",
1965
+ },
1966
+ {
1967
+ name: "block_number",
1968
+ type: "HexString",
1969
+ description: "Reference block number.",
1970
+ },
1971
+ {
1972
+ name: "era",
1973
+ type: "HexString",
1974
+ description: "Mortality era encoding.",
1975
+ },
1976
+ {
1977
+ name: "genesis_hash",
1978
+ type: "HexString",
1979
+ description: "Chain genesis hash.",
1980
+ },
1981
+ {
1982
+ name: "method",
1983
+ type: "HexString",
1984
+ description: "SCALE-encoded call data.",
1985
+ },
1986
+ {
1987
+ name: "nonce",
1988
+ type: "HexString",
1989
+ description: "Account nonce.",
1990
+ },
1991
+ {
1992
+ name: "spec_version",
1993
+ type: "HexString",
1994
+ description: "Runtime spec version.",
1995
+ },
1996
+ {
1997
+ name: "tip",
1998
+ type: "HexString",
1999
+ description: "Transaction tip.",
2000
+ },
2001
+ {
2002
+ name: "transaction_version",
2003
+ type: "HexString",
2004
+ description: "Transaction format version.",
2005
+ },
2006
+ {
2007
+ name: "signed_extensions",
2008
+ type: "Array<string>",
2009
+ description: "Extension identifiers.",
2010
+ },
2011
+ {
2012
+ name: "version",
2013
+ type: "number",
2014
+ description: "Extrinsic version.",
2015
+ },
2016
+ {
2017
+ name: "asset_id",
2018
+ type: "HexString | undefined",
2019
+ description: "For multi-asset tips.",
2020
+ },
2021
+ {
2022
+ name: "metadata_hash",
2023
+ type: "HexString | undefined",
2024
+ description: "CheckMetadataHash extension.",
2025
+ },
2026
+ {
2027
+ name: "mode",
2028
+ type: "number | undefined",
2029
+ description: "Metadata mode.",
2030
+ },
2031
+ {
2032
+ name: "with_signed_transaction",
2033
+ type: "boolean | undefined",
2034
+ description: "Request signed transaction back.",
2035
+ },
2036
+ ],
2037
+ },
2038
+ {
2039
+ id: "host-sign-payload-error",
2040
+ name: "HostSignPayloadError",
2041
+ category: "signing",
2042
+ definition: 'export type HostSignPayloadError =\n | { tag: "FailedToDecode"; value?: undefined }\n | { tag: "Rejected"; value?: undefined }\n | { tag: "PermissionDenied"; value?: undefined }\n | { tag: "Unknown"; value: { reason: string } }\n;',
2043
+ description: "Signing operation error.",
2044
+ variants: [
2045
+ {
2046
+ name: "FailedToDecode",
2047
+ type: '{ tag: "FailedToDecode"; value?: undefined }',
2048
+ description: "Payload could not be deserialized.",
2049
+ },
2050
+ {
2051
+ name: "Rejected",
2052
+ type: '{ tag: "Rejected"; value?: undefined }',
2053
+ description: "User rejected signing.",
2054
+ },
2055
+ {
2056
+ name: "PermissionDenied",
2057
+ type: '{ tag: "PermissionDenied"; value?: undefined }',
2058
+ description: "Not authenticated.",
2059
+ },
2060
+ {
2061
+ name: "Unknown",
2062
+ type: '{ tag: "Unknown"; value: { reason: string } }',
2063
+ description: "Catch-all.",
2064
+ },
2065
+ ],
2066
+ },
2067
+ {
2068
+ id: "host-sign-payload-request",
2069
+ name: "HostSignPayloadRequest",
2070
+ category: "signing",
2071
+ definition: "export interface HostSignPayloadRequest {\n account: ProductAccountId;\n payload: HostSignPayloadData;\n}",
2072
+ description: "Request to sign an extrinsic payload with a product account.",
2073
+ fields: [
2074
+ {
2075
+ name: "account",
2076
+ type: "ProductAccountId",
2077
+ description: "Product account that will sign this payload.",
2078
+ },
2079
+ {
2080
+ name: "payload",
2081
+ type: "HostSignPayloadData",
2082
+ description: "The extrinsic payload to sign.",
2083
+ },
2084
+ ],
2085
+ },
2086
+ {
2087
+ id: "host-sign-payload-response",
2088
+ name: "HostSignPayloadResponse",
2089
+ category: "signing",
2090
+ definition: "export interface HostSignPayloadResponse {\n signature: HexString;\n signedTransaction?: HexString;\n}",
2091
+ description: "Result of a signing operation.",
2092
+ fields: [
2093
+ {
2094
+ name: "signature",
2095
+ type: "HexString",
2096
+ description: "The cryptographic signature.",
2097
+ },
2098
+ {
2099
+ name: "signed_transaction",
2100
+ type: "HexString | undefined",
2101
+ description: "Full signed transaction, if requested.",
2102
+ },
2103
+ ],
2104
+ },
2105
+ {
2106
+ id: "host-sign-payload-with-legacy-account-request",
2107
+ name: "HostSignPayloadWithLegacyAccountRequest",
2108
+ category: "signing",
2109
+ definition: "export interface HostSignPayloadWithLegacyAccountRequest {\n signer: string;\n payload: HostSignPayloadData;\n}",
2110
+ description: "Sign a Substrate extrinsic payload with a non-product (legacy) account.\nContains the same fields as [`HostSignPayloadRequest`] minus `address`\n(replaced by `signer`).",
2111
+ fields: [
2112
+ {
2113
+ name: "signer",
2114
+ type: "string",
2115
+ description: "Signer address (SS58 or hex) of the legacy account.",
2116
+ },
2117
+ {
2118
+ name: "payload",
2119
+ type: "HostSignPayloadData",
2120
+ description: "The extrinsic payload to sign.",
2121
+ },
2122
+ ],
2123
+ },
2124
+ {
2125
+ id: "host-sign-raw-request",
2126
+ name: "HostSignRawRequest",
2127
+ category: "signing",
2128
+ definition: "export interface HostSignRawRequest {\n account: ProductAccountId;\n payload: RawPayload;\n}",
2129
+ description: "A raw signing request pairing an account with the payload to sign.",
2130
+ fields: [
2131
+ {
2132
+ name: "account",
2133
+ type: "ProductAccountId",
2134
+ description: "Product account that will sign this payload.",
2135
+ },
2136
+ {
2137
+ name: "payload",
2138
+ type: "RawPayload",
2139
+ description: "The payload to sign.",
2140
+ },
2141
+ ],
2142
+ },
2143
+ {
2144
+ id: "host-sign-raw-with-legacy-account-request",
2145
+ name: "HostSignRawWithLegacyAccountRequest",
2146
+ category: "signing",
2147
+ definition: "export interface HostSignRawWithLegacyAccountRequest {\n signer: string;\n payload: RawPayload;\n}",
2148
+ description: "Sign raw bytes with a non-product (legacy) account. The signer field\nidentifies which legacy account to use.",
2149
+ fields: [
2150
+ {
2151
+ name: "signer",
2152
+ type: "string",
2153
+ description: "Signer address (SS58 or hex) of the legacy account.",
2154
+ },
2155
+ {
2156
+ name: "payload",
2157
+ type: "RawPayload",
2158
+ description: "The data to sign.",
2159
+ },
2160
+ ],
2161
+ },
2162
+ {
2163
+ id: "host-theme-subscribe-item",
2164
+ name: "HostThemeSubscribeItem",
2165
+ category: "theme",
2166
+ definition: "export interface HostThemeSubscribeItem {\n name: ThemeName;\n variant: ThemeVariant;\n}",
2167
+ description: "Current theme state pushed to subscribers.",
2168
+ fields: [
2169
+ {
2170
+ name: "name",
2171
+ type: "ThemeName",
2172
+ description: "Theme name.",
2173
+ },
2174
+ {
2175
+ name: "variant",
2176
+ type: "ThemeVariant",
2177
+ description: "Light or dark variant.",
2178
+ },
2179
+ ],
2180
+ },
2181
+ {
2182
+ id: "legacy-account",
2183
+ name: "LegacyAccount",
2184
+ category: "account",
2185
+ definition: "export interface LegacyAccount {\n publicKey: HexString;\n name?: string;\n}",
2186
+ description: "A user-imported (legacy) account: public key plus an optional user-chosen\ndisplay name.\n\nReturned by [`HostGetLegacyAccountsResponse`]. Distinct from\n[`ProductAccount`], which is protocol-derived and never carries a label.",
2187
+ fields: [
2188
+ {
2189
+ name: "public_key",
2190
+ type: "HexString",
2191
+ description: "The account public key (variable-length bytes).",
2192
+ },
2193
+ {
2194
+ name: "name",
2195
+ type: "string | undefined",
2196
+ description: "Optional user-chosen display name.",
2197
+ },
2198
+ ],
2199
+ },
2200
+ {
2201
+ id: "legacy-account-tx-payload",
2202
+ name: "LegacyAccountTxPayload",
2203
+ category: "transaction",
2204
+ definition: "export interface LegacyAccountTxPayload {\n signer: AccountId;\n genesisHash: GenesisHash;\n callData: HexString;\n extensions: Array<TxPayloadExtension>;\n txExtVersion: number;\n}",
2205
+ description: "Transaction payload for a legacy (non-product) account.\n\nIdentical to [`ProductAccountTxPayload`] except the signer is a raw\n32-byte [`AccountId`].",
2206
+ fields: [
2207
+ {
2208
+ name: "signer",
2209
+ type: "AccountId",
2210
+ description: "Raw 32-byte public key of the legacy account.",
2211
+ },
2212
+ {
2213
+ name: "genesis_hash",
2214
+ type: "GenesisHash",
2215
+ description: "Chain where the transaction will execute.",
2216
+ },
2217
+ {
2218
+ name: "call_data",
2219
+ type: "HexString",
2220
+ description: "SCALE-encoded Call data.",
2221
+ },
2222
+ {
2223
+ name: "extensions",
2224
+ type: "Array<TxPayloadExtension>",
2225
+ description: "Transaction extensions supplied by the caller.",
2226
+ },
2227
+ {
2228
+ name: "tx_ext_version",
2229
+ type: "number",
2230
+ description: "0 for Extrinsic V4, runtime-supported value for V5.",
2231
+ },
2232
+ ],
2233
+ },
2234
+ {
2235
+ id: "modifier",
2236
+ name: "Modifier",
2237
+ category: "chat",
2238
+ definition: 'export type Modifier =\n | { tag: "Margin"; value: Dimensions }\n | { tag: "Padding"; value: Dimensions }\n | { tag: "Background"; value: Background }\n | { tag: "Border"; value: BorderStyle }\n | { tag: "Height"; value: { height: Size } }\n | { tag: "Width"; value: { width: Size } }\n | { tag: "MinWidth"; value: { width: Size } }\n | { tag: "MinHeight"; value: { height: Size } }\n | { tag: "FillWidth"; value: { enabled: boolean } }\n | { tag: "FillHeight"; value: { enabled: boolean } }\n;',
2239
+ description: "Layout and styling modifiers applied to custom renderer components.",
2240
+ variants: [
2241
+ {
2242
+ name: "Margin",
2243
+ type: '{ tag: "Margin"; value: Dimensions }',
2244
+ description: "Outer spacing.",
2245
+ },
2246
+ {
2247
+ name: "Padding",
2248
+ type: '{ tag: "Padding"; value: Dimensions }',
2249
+ description: "Inner spacing.",
2250
+ },
2251
+ {
2252
+ name: "Background",
2253
+ type: '{ tag: "Background"; value: Background }',
2254
+ description: "Background fill.",
2255
+ },
2256
+ {
2257
+ name: "Border",
2258
+ type: '{ tag: "Border"; value: BorderStyle }',
2259
+ description: "Border style.",
2260
+ },
2261
+ {
2262
+ name: "Height",
2263
+ type: '{ tag: "Height"; value: { height: Size } }',
2264
+ description: "Fixed height.",
2265
+ },
2266
+ {
2267
+ name: "Width",
2268
+ type: '{ tag: "Width"; value: { width: Size } }',
2269
+ description: "Fixed width.",
2270
+ },
2271
+ {
2272
+ name: "MinWidth",
2273
+ type: '{ tag: "MinWidth"; value: { width: Size } }',
2274
+ description: "Minimum width.",
2275
+ },
2276
+ {
2277
+ name: "MinHeight",
2278
+ type: '{ tag: "MinHeight"; value: { height: Size } }',
2279
+ description: "Minimum height.",
2280
+ },
2281
+ {
2282
+ name: "FillWidth",
2283
+ type: '{ tag: "FillWidth"; value: { enabled: boolean } }',
2284
+ description: "Fill available width.",
2285
+ },
2286
+ {
2287
+ name: "FillHeight",
2288
+ type: '{ tag: "FillHeight"; value: { enabled: boolean } }',
2289
+ description: "Fill available height.",
2290
+ },
2291
+ ],
2292
+ },
2293
+ {
2294
+ id: "notification-id",
2295
+ name: "NotificationId",
2296
+ category: "notifications",
2297
+ definition: "export type NotificationId = number;",
2298
+ description: "Opaque identifier for a push notification, unique per product.",
2299
+ },
2300
+ {
2301
+ id: "operation-started-result",
2302
+ name: "OperationStartedResult",
2303
+ category: "chain",
2304
+ definition: 'export type OperationStartedResult =\n | { tag: "Started"; value: { operationId: string } }\n | { tag: "LimitReached"; value?: undefined }\n;',
2305
+ variants: [
2306
+ {
2307
+ name: "Started",
2308
+ type: '{ tag: "Started"; value: { operationId: string } }',
2309
+ },
2310
+ {
2311
+ name: "LimitReached",
2312
+ type: '{ tag: "LimitReached"; value?: undefined }',
2313
+ },
2314
+ ],
2315
+ },
2316
+ {
2317
+ id: "payment-purse-id",
2318
+ name: "PaymentPurseId",
2319
+ category: "payment",
2320
+ definition: "export type PaymentPurseId = number;",
2321
+ description: "Identifier selecting a product payment purse.",
2322
+ },
2323
+ {
2324
+ id: "payment-top-up-source",
2325
+ name: "PaymentTopUpSource",
2326
+ category: "payment",
2327
+ definition: 'export type PaymentTopUpSource =\n | { tag: "ProductAccount"; value: { derivationIndex: number } }\n | { tag: "PrivateKey"; value: { sr25519SecretKey: HexString } }\n | { tag: "Coins"; value: { sr25519SecretKeys: Array<HexString> } }\n;',
2328
+ description: "Source for a payment top-up operation.\n\nSee [RFC 0006].\n\n[RFC 0006]: https://github.com/paritytech/triangle-js-sdks/pull/94",
2329
+ variants: [
2330
+ {
2331
+ name: "ProductAccount",
2332
+ type: '{ tag: "ProductAccount"; value: { derivationIndex: number } }',
2333
+ description: "Fund from one of the calling product's scoped accounts.",
2334
+ },
2335
+ {
2336
+ name: "PrivateKey",
2337
+ type: '{ tag: "PrivateKey"; value: { sr25519SecretKey: HexString } }',
2338
+ description: "Fund from a one-time account represented by its private key. This is a\nstandard account holding public funds, not a coin key.",
2339
+ },
2340
+ {
2341
+ name: "Coins",
2342
+ type: '{ tag: "Coins"; value: { sr25519SecretKeys: Array<HexString> } }',
2343
+ description: "Fund directly from coin secret keys. Each key is an sr25519 secret\ncontrolling a single coin.",
2344
+ },
2345
+ ],
2346
+ },
2347
+ {
2348
+ id: "preimage-submit-error",
2349
+ name: "PreimageSubmitError",
2350
+ category: "preimage",
2351
+ definition: 'export type PreimageSubmitError =\n | { tag: "Unknown"; value: { reason: string } }\n;',
2352
+ description: "Preimage submission error.",
2353
+ variants: [
2354
+ {
2355
+ name: "Unknown",
2356
+ type: '{ tag: "Unknown"; value: { reason: string } }',
2357
+ description: "Catch-all.",
2358
+ },
2359
+ ],
2360
+ },
2361
+ {
2362
+ id: "product-account",
2363
+ name: "ProductAccount",
2364
+ category: "account",
2365
+ definition: "export interface ProductAccount {\n publicKey: HexString;\n}",
2366
+ description: "A product account: public key only, no display name.",
2367
+ fields: [
2368
+ {
2369
+ name: "public_key",
2370
+ type: "HexString",
2371
+ description: "The account public key (variable-length bytes).",
2372
+ },
2373
+ ],
2374
+ },
2375
+ {
2376
+ id: "product-account-id",
2377
+ name: "ProductAccountId",
2378
+ category: "account",
2379
+ definition: "export interface ProductAccountId {\n dotNsIdentifier: string;\n derivationIndex: number;\n}",
2380
+ description: "Identifies a product-specific account by combining a dotNS domain name with a\nderivation index.",
2381
+ fields: [
2382
+ {
2383
+ name: "dot_ns_identifier",
2384
+ type: "string",
2385
+ description: 'A dotNS domain name identifier (e.g., `"my-product.dot"`).',
2386
+ },
2387
+ {
2388
+ name: "derivation_index",
2389
+ type: "number",
2390
+ description: "Key derivation index for generating product-specific accounts.",
2391
+ },
2392
+ ],
2393
+ },
2394
+ {
2395
+ id: "product-account-tx-payload",
2396
+ name: "ProductAccountTxPayload",
2397
+ category: "transaction",
2398
+ definition: "export interface ProductAccountTxPayload {\n signer: ProductAccountId;\n genesisHash: GenesisHash;\n callData: HexString;\n extensions: Array<TxPayloadExtension>;\n txExtVersion: number;\n}",
2399
+ description: "Transaction payload for a product account.\n\nContains everything the host needs to construct a signed extrinsic.\nThe signer is a [`ProductAccountId`]; the host resolves the\ncorresponding key pair through its account management layer.",
2400
+ fields: [
2401
+ {
2402
+ name: "signer",
2403
+ type: "ProductAccountId",
2404
+ description: "Product account that will sign the transaction.",
2405
+ },
2406
+ {
2407
+ name: "genesis_hash",
2408
+ type: "GenesisHash",
2409
+ description: "Chain where the transaction will execute.",
2410
+ },
2411
+ {
2412
+ name: "call_data",
2413
+ type: "HexString",
2414
+ description: "SCALE-encoded Call data.",
2415
+ },
2416
+ {
2417
+ name: "extensions",
2418
+ type: "Array<TxPayloadExtension>",
2419
+ description: "Transaction extensions supplied by the caller.",
2420
+ },
2421
+ {
2422
+ name: "tx_ext_version",
2423
+ type: "number",
2424
+ description: "0 for Extrinsic V4, runtime-supported value for V5.",
2425
+ },
2426
+ ],
2427
+ },
2428
+ {
2429
+ id: "product-chat-custom-message-render-subscribe-request",
2430
+ name: "ProductChatCustomMessageRenderSubscribeRequest",
2431
+ category: "chat",
2432
+ definition: "export interface ProductChatCustomMessageRenderSubscribeRequest {\n messageId: string;\n messageType: string;\n payload: HexString;\n}",
2433
+ description: "Subscribe payload identifying the chat message to render. The host responds\nwith a stream of [`CustomRendererNode`] trees describing the rendered UI.",
2434
+ fields: [
2435
+ {
2436
+ name: "message_id",
2437
+ type: "string",
2438
+ description: "Message identifier.",
2439
+ },
2440
+ {
2441
+ name: "message_type",
2442
+ type: "string",
2443
+ description: "Application-defined message type.",
2444
+ },
2445
+ {
2446
+ name: "payload",
2447
+ type: "HexString",
2448
+ description: "Binary payload.",
2449
+ },
2450
+ ],
2451
+ },
2452
+ {
2453
+ id: "raw-payload",
2454
+ name: "RawPayload",
2455
+ category: "signing",
2456
+ definition: 'export type RawPayload =\n | { tag: "Bytes"; value: { bytes: HexString } }\n | { tag: "Payload"; value: { payload: string } }\n;',
2457
+ description: "Raw data to sign -- either binary bytes or a string message.",
2458
+ variants: [
2459
+ {
2460
+ name: "Bytes",
2461
+ type: '{ tag: "Bytes"; value: { bytes: HexString } }',
2462
+ description: "Raw binary data to sign.",
2463
+ },
2464
+ {
2465
+ name: "Payload",
2466
+ type: '{ tag: "Payload"; value: { payload: string } }',
2467
+ description: "String message to sign.",
2468
+ },
2469
+ ],
2470
+ },
2471
+ {
2472
+ id: "remote-chain-head-body-request",
2473
+ name: "RemoteChainHeadBodyRequest",
2474
+ category: "chain",
2475
+ definition: "export interface RemoteChainHeadBodyRequest {\n genesisHash: HexString;\n followSubscriptionId: string;\n hash: HexString;\n}",
2476
+ fields: [
2477
+ {
2478
+ name: "genesis_hash",
2479
+ type: "HexString",
2480
+ description: "Chain genesis hash.",
2481
+ },
2482
+ {
2483
+ name: "follow_subscription_id",
2484
+ type: "string",
2485
+ description: "Follow subscription identifier.",
2486
+ },
2487
+ {
2488
+ name: "hash",
2489
+ type: "HexString",
2490
+ description: "Block hash.",
2491
+ },
2492
+ ],
2493
+ },
2494
+ {
2495
+ id: "remote-chain-head-body-response",
2496
+ name: "RemoteChainHeadBodyResponse",
2497
+ category: "chain",
2498
+ definition: "export interface RemoteChainHeadBodyResponse {\n operation: OperationStartedResult;\n}",
2499
+ fields: [
2500
+ {
2501
+ name: "operation",
2502
+ type: "OperationStartedResult",
2503
+ description: "Started operation result.",
2504
+ },
2505
+ ],
2506
+ },
2507
+ {
2508
+ id: "remote-chain-head-call-request",
2509
+ name: "RemoteChainHeadCallRequest",
2510
+ category: "chain",
2511
+ definition: "export interface RemoteChainHeadCallRequest {\n genesisHash: HexString;\n followSubscriptionId: string;\n hash: HexString;\n function: string;\n callParameters: HexString;\n}",
2512
+ fields: [
2513
+ {
2514
+ name: "genesis_hash",
2515
+ type: "HexString",
2516
+ description: "Chain genesis hash.",
2517
+ },
2518
+ {
2519
+ name: "follow_subscription_id",
2520
+ type: "string",
2521
+ description: "Follow subscription identifier.",
2522
+ },
2523
+ {
2524
+ name: "hash",
2525
+ type: "HexString",
2526
+ description: "Block hash.",
2527
+ },
2528
+ {
2529
+ name: "function",
2530
+ type: "string",
2531
+ description: "Runtime API function name.",
2532
+ },
2533
+ {
2534
+ name: "call_parameters",
2535
+ type: "HexString",
2536
+ description: "SCALE-encoded call parameters.",
2537
+ },
2538
+ ],
2539
+ },
2540
+ {
2541
+ id: "remote-chain-head-call-response",
2542
+ name: "RemoteChainHeadCallResponse",
2543
+ category: "chain",
2544
+ definition: "export interface RemoteChainHeadCallResponse {\n operation: OperationStartedResult;\n}",
2545
+ fields: [
2546
+ {
2547
+ name: "operation",
2548
+ type: "OperationStartedResult",
2549
+ description: "Started operation result.",
2550
+ },
2551
+ ],
2552
+ },
2553
+ {
2554
+ id: "remote-chain-head-continue-request",
2555
+ name: "RemoteChainHeadContinueRequest",
2556
+ category: "chain",
2557
+ definition: "export interface RemoteChainHeadContinueRequest {\n genesisHash: HexString;\n followSubscriptionId: string;\n operationId: string;\n}",
2558
+ fields: [
2559
+ {
2560
+ name: "genesis_hash",
2561
+ type: "HexString",
2562
+ description: "Chain genesis hash.",
2563
+ },
2564
+ {
2565
+ name: "follow_subscription_id",
2566
+ type: "string",
2567
+ description: "Follow subscription identifier.",
2568
+ },
2569
+ {
2570
+ name: "operation_id",
2571
+ type: "string",
2572
+ description: "Operation identifier.",
2573
+ },
2574
+ ],
2575
+ },
2576
+ {
2577
+ id: "remote-chain-head-follow-item",
2578
+ name: "RemoteChainHeadFollowItem",
2579
+ category: "chain",
2580
+ definition: 'export type RemoteChainHeadFollowItem =\n | { tag: "Initialized"; value: { finalizedBlockHashes: Array<HexString>; finalizedBlockRuntime?: RuntimeType } }\n | { tag: "NewBlock"; value: { blockHash: HexString; parentBlockHash: HexString; newRuntime?: RuntimeType } }\n | { tag: "BestBlockChanged"; value: { bestBlockHash: HexString } }\n | { tag: "Finalized"; value: { finalizedBlockHashes: Array<HexString>; prunedBlockHashes: Array<HexString> } }\n | { tag: "OperationBodyDone"; value: { operationId: string; value: Array<HexString> } }\n | { tag: "OperationCallDone"; value: { operationId: string; output: HexString } }\n | { tag: "OperationStorageItems"; value: { operationId: string; items: Array<StorageResultItem> } }\n | { tag: "OperationStorageDone"; value: { operationId: string } }\n | { tag: "OperationWaitingForContinue"; value: { operationId: string } }\n | { tag: "OperationInaccessible"; value: { operationId: string } }\n | { tag: "OperationError"; value: { operationId: string; error: string } }\n | { tag: "Stop"; value?: undefined }\n;',
2581
+ variants: [
2582
+ {
2583
+ name: "Initialized",
2584
+ type: '{ tag: "Initialized"; value: { finalizedBlockHashes: Array<HexString>; finalizedBlockRuntime?: RuntimeType } }',
2585
+ },
2586
+ {
2587
+ name: "NewBlock",
2588
+ type: '{ tag: "NewBlock"; value: { blockHash: HexString; parentBlockHash: HexString; newRuntime?: RuntimeType } }',
2589
+ },
2590
+ {
2591
+ name: "BestBlockChanged",
2592
+ type: '{ tag: "BestBlockChanged"; value: { bestBlockHash: HexString } }',
2593
+ },
2594
+ {
2595
+ name: "Finalized",
2596
+ type: '{ tag: "Finalized"; value: { finalizedBlockHashes: Array<HexString>; prunedBlockHashes: Array<HexString> } }',
2597
+ },
2598
+ {
2599
+ name: "OperationBodyDone",
2600
+ type: '{ tag: "OperationBodyDone"; value: { operationId: string; value: Array<HexString> } }',
2601
+ },
2602
+ {
2603
+ name: "OperationCallDone",
2604
+ type: '{ tag: "OperationCallDone"; value: { operationId: string; output: HexString } }',
2605
+ },
2606
+ {
2607
+ name: "OperationStorageItems",
2608
+ type: '{ tag: "OperationStorageItems"; value: { operationId: string; items: Array<StorageResultItem> } }',
2609
+ },
2610
+ {
2611
+ name: "OperationStorageDone",
2612
+ type: '{ tag: "OperationStorageDone"; value: { operationId: string } }',
2613
+ },
2614
+ {
2615
+ name: "OperationWaitingForContinue",
2616
+ type: '{ tag: "OperationWaitingForContinue"; value: { operationId: string } }',
2617
+ },
2618
+ {
2619
+ name: "OperationInaccessible",
2620
+ type: '{ tag: "OperationInaccessible"; value: { operationId: string } }',
2621
+ },
2622
+ {
2623
+ name: "OperationError",
2624
+ type: '{ tag: "OperationError"; value: { operationId: string; error: string } }',
2625
+ },
2626
+ {
2627
+ name: "Stop",
2628
+ type: '{ tag: "Stop"; value?: undefined }',
2629
+ },
2630
+ ],
2631
+ },
2632
+ {
2633
+ id: "remote-chain-head-follow-request",
2634
+ name: "RemoteChainHeadFollowRequest",
2635
+ category: "chain",
2636
+ definition: "export interface RemoteChainHeadFollowRequest {\n genesisHash: HexString;\n withRuntime: boolean;\n}",
2637
+ fields: [
2638
+ {
2639
+ name: "genesis_hash",
2640
+ type: "HexString",
2641
+ description: "Chain genesis hash.",
2642
+ },
2643
+ {
2644
+ name: "with_runtime",
2645
+ type: "boolean",
2646
+ description: "Whether to include runtime information in events.",
2647
+ },
2648
+ ],
2649
+ },
2650
+ {
2651
+ id: "remote-chain-head-header-request",
2652
+ name: "RemoteChainHeadHeaderRequest",
2653
+ category: "chain",
2654
+ definition: "export interface RemoteChainHeadHeaderRequest {\n genesisHash: HexString;\n followSubscriptionId: string;\n hash: HexString;\n}",
2655
+ fields: [
2656
+ {
2657
+ name: "genesis_hash",
2658
+ type: "HexString",
2659
+ description: "Chain genesis hash.",
2660
+ },
2661
+ {
2662
+ name: "follow_subscription_id",
2663
+ type: "string",
2664
+ description: "Follow subscription identifier.",
2665
+ },
2666
+ {
2667
+ name: "hash",
2668
+ type: "HexString",
2669
+ description: "Block hash.",
2670
+ },
2671
+ ],
2672
+ },
2673
+ {
2674
+ id: "remote-chain-head-header-response",
2675
+ name: "RemoteChainHeadHeaderResponse",
2676
+ category: "chain",
2677
+ definition: "export interface RemoteChainHeadHeaderResponse {\n header?: HexString;\n}",
2678
+ fields: [
2679
+ {
2680
+ name: "header",
2681
+ type: "HexString | undefined",
2682
+ description: "SCALE-encoded block header.",
2683
+ },
2684
+ ],
2685
+ },
2686
+ {
2687
+ id: "remote-chain-head-stop-operation-request",
2688
+ name: "RemoteChainHeadStopOperationRequest",
2689
+ category: "chain",
2690
+ definition: "export interface RemoteChainHeadStopOperationRequest {\n genesisHash: HexString;\n followSubscriptionId: string;\n operationId: string;\n}",
2691
+ fields: [
2692
+ {
2693
+ name: "genesis_hash",
2694
+ type: "HexString",
2695
+ description: "Chain genesis hash.",
2696
+ },
2697
+ {
2698
+ name: "follow_subscription_id",
2699
+ type: "string",
2700
+ description: "Follow subscription identifier.",
2701
+ },
2702
+ {
2703
+ name: "operation_id",
2704
+ type: "string",
2705
+ description: "Operation identifier.",
2706
+ },
2707
+ ],
2708
+ },
2709
+ {
2710
+ id: "remote-chain-head-storage-request",
2711
+ name: "RemoteChainHeadStorageRequest",
2712
+ category: "chain",
2713
+ definition: "export interface RemoteChainHeadStorageRequest {\n genesisHash: HexString;\n followSubscriptionId: string;\n hash: HexString;\n items: Array<StorageQueryItem>;\n childTrie?: HexString;\n}",
2714
+ fields: [
2715
+ {
2716
+ name: "genesis_hash",
2717
+ type: "HexString",
2718
+ description: "Chain genesis hash.",
2719
+ },
2720
+ {
2721
+ name: "follow_subscription_id",
2722
+ type: "string",
2723
+ description: "Follow subscription identifier.",
2724
+ },
2725
+ {
2726
+ name: "hash",
2727
+ type: "HexString",
2728
+ description: "Block hash.",
2729
+ },
2730
+ {
2731
+ name: "items",
2732
+ type: "Array<StorageQueryItem>",
2733
+ description: "Storage items to query.",
2734
+ },
2735
+ {
2736
+ name: "child_trie",
2737
+ type: "HexString | undefined",
2738
+ description: "Optional child trie.",
2739
+ },
2740
+ ],
2741
+ },
2742
+ {
2743
+ id: "remote-chain-head-storage-response",
2744
+ name: "RemoteChainHeadStorageResponse",
2745
+ category: "chain",
2746
+ definition: "export interface RemoteChainHeadStorageResponse {\n operation: OperationStartedResult;\n}",
2747
+ fields: [
2748
+ {
2749
+ name: "operation",
2750
+ type: "OperationStartedResult",
2751
+ description: "Started operation result.",
2752
+ },
2753
+ ],
2754
+ },
2755
+ {
2756
+ id: "remote-chain-head-unpin-request",
2757
+ name: "RemoteChainHeadUnpinRequest",
2758
+ category: "chain",
2759
+ definition: "export interface RemoteChainHeadUnpinRequest {\n genesisHash: HexString;\n followSubscriptionId: string;\n hashes: Array<HexString>;\n}",
2760
+ fields: [
2761
+ {
2762
+ name: "genesis_hash",
2763
+ type: "HexString",
2764
+ description: "Chain genesis hash.",
2765
+ },
2766
+ {
2767
+ name: "follow_subscription_id",
2768
+ type: "string",
2769
+ description: "Follow subscription identifier.",
2770
+ },
2771
+ {
2772
+ name: "hashes",
2773
+ type: "Array<HexString>",
2774
+ description: "Block hashes to unpin.",
2775
+ },
2776
+ ],
2777
+ },
2778
+ {
2779
+ id: "remote-chain-spec-chain-name-request",
2780
+ name: "RemoteChainSpecChainNameRequest",
2781
+ category: "chain",
2782
+ definition: "export interface RemoteChainSpecChainNameRequest {\n genesisHash: HexString;\n}",
2783
+ fields: [
2784
+ {
2785
+ name: "genesis_hash",
2786
+ type: "HexString",
2787
+ description: "Chain genesis hash.",
2788
+ },
2789
+ ],
2790
+ },
2791
+ {
2792
+ id: "remote-chain-spec-chain-name-response",
2793
+ name: "RemoteChainSpecChainNameResponse",
2794
+ category: "chain",
2795
+ definition: "export interface RemoteChainSpecChainNameResponse {\n chainName: string;\n}",
2796
+ fields: [
2797
+ {
2798
+ name: "chain_name",
2799
+ type: "string",
2800
+ description: "Chain display name.",
2801
+ },
2802
+ ],
2803
+ },
2804
+ {
2805
+ id: "remote-chain-spec-genesis-hash-request",
2806
+ name: "RemoteChainSpecGenesisHashRequest",
2807
+ category: "chain",
2808
+ definition: "export interface RemoteChainSpecGenesisHashRequest {\n genesisHash: HexString;\n}",
2809
+ fields: [
2810
+ {
2811
+ name: "genesis_hash",
2812
+ type: "HexString",
2813
+ description: "Chain genesis hash requested by the product.",
2814
+ },
2815
+ ],
2816
+ },
2817
+ {
2818
+ id: "remote-chain-spec-genesis-hash-response",
2819
+ name: "RemoteChainSpecGenesisHashResponse",
2820
+ category: "chain",
2821
+ definition: "export interface RemoteChainSpecGenesisHashResponse {\n genesisHash: HexString;\n}",
2822
+ fields: [
2823
+ {
2824
+ name: "genesis_hash",
2825
+ type: "HexString",
2826
+ description: "Chain genesis hash.",
2827
+ },
2828
+ ],
2829
+ },
2830
+ {
2831
+ id: "remote-chain-spec-properties-request",
2832
+ name: "RemoteChainSpecPropertiesRequest",
2833
+ category: "chain",
2834
+ definition: "export interface RemoteChainSpecPropertiesRequest {\n genesisHash: HexString;\n}",
2835
+ fields: [
2836
+ {
2837
+ name: "genesis_hash",
2838
+ type: "HexString",
2839
+ description: "Chain genesis hash.",
2840
+ },
2841
+ ],
2842
+ },
2843
+ {
2844
+ id: "remote-chain-spec-properties-response",
2845
+ name: "RemoteChainSpecPropertiesResponse",
2846
+ category: "chain",
2847
+ definition: "export interface RemoteChainSpecPropertiesResponse {\n properties: string;\n}",
2848
+ fields: [
2849
+ {
2850
+ name: "properties",
2851
+ type: "string",
2852
+ description: "JSON-encoded properties.",
2853
+ },
2854
+ ],
2855
+ },
2856
+ {
2857
+ id: "remote-chain-transaction-broadcast-request",
2858
+ name: "RemoteChainTransactionBroadcastRequest",
2859
+ category: "chain",
2860
+ definition: "export interface RemoteChainTransactionBroadcastRequest {\n genesisHash: HexString;\n transaction: HexString;\n}",
2861
+ fields: [
2862
+ {
2863
+ name: "genesis_hash",
2864
+ type: "HexString",
2865
+ description: "Chain genesis hash.",
2866
+ },
2867
+ {
2868
+ name: "transaction",
2869
+ type: "HexString",
2870
+ description: "Signed transaction bytes.",
2871
+ },
2872
+ ],
2873
+ },
2874
+ {
2875
+ id: "remote-chain-transaction-broadcast-response",
2876
+ name: "RemoteChainTransactionBroadcastResponse",
2877
+ category: "chain",
2878
+ definition: "export interface RemoteChainTransactionBroadcastResponse {\n operationId?: string;\n}",
2879
+ fields: [
2880
+ {
2881
+ name: "operation_id",
2882
+ type: "string | undefined",
2883
+ description: "Broadcast operation identifier, if available.",
2884
+ },
2885
+ ],
2886
+ },
2887
+ {
2888
+ id: "remote-chain-transaction-stop-request",
2889
+ name: "RemoteChainTransactionStopRequest",
2890
+ category: "chain",
2891
+ definition: "export interface RemoteChainTransactionStopRequest {\n genesisHash: HexString;\n operationId: string;\n}",
2892
+ fields: [
2893
+ {
2894
+ name: "genesis_hash",
2895
+ type: "HexString",
2896
+ description: "Chain genesis hash.",
2897
+ },
2898
+ {
2899
+ name: "operation_id",
2900
+ type: "string",
2901
+ description: "Operation identifier of the broadcast to stop.",
2902
+ },
2903
+ ],
2904
+ },
2905
+ {
2906
+ id: "remote-permission",
2907
+ name: "RemotePermission",
2908
+ category: "permissions",
2909
+ definition: 'export type RemotePermission =\n | { tag: "Remote"; value: { domains: Array<string> } }\n | { tag: "WebRtc"; value?: undefined }\n | { tag: "ChainSubmit"; value?: undefined }\n | { tag: "PreimageSubmit"; value?: undefined }\n | { tag: "StatementSubmit"; value?: undefined }\n;',
2910
+ description: "One remote-operation permission requested by the product (RFC 0002).\n\n`ChainSubmit`, `PreimageSubmit`, and `StatementSubmit` are also triggered\nimplicitly by the corresponding business calls when not yet granted.",
2911
+ variants: [
2912
+ {
2913
+ name: "Remote",
2914
+ type: '{ tag: "Remote"; value: { domains: Array<string> } }',
2915
+ description: "Outbound HTTP/WebSocket access to a set of domains.",
2916
+ },
2917
+ {
2918
+ name: "WebRtc",
2919
+ type: '{ tag: "WebRtc"; value?: undefined }',
2920
+ description: "WebRTC media access.",
2921
+ },
2922
+ {
2923
+ name: "ChainSubmit",
2924
+ type: '{ tag: "ChainSubmit"; value?: undefined }',
2925
+ description: "Submitting transactions on behalf of the user via `remote_chain_transaction_broadcast`.",
2926
+ },
2927
+ {
2928
+ name: "PreimageSubmit",
2929
+ type: '{ tag: "PreimageSubmit"; value?: undefined }',
2930
+ description: "Submitting preimages on behalf of the user via `remote_preimage_submit`.",
2931
+ },
2932
+ {
2933
+ name: "StatementSubmit",
2934
+ type: '{ tag: "StatementSubmit"; value?: undefined }',
2935
+ description: "Submitting statements on behalf of the user via `remote_statement_store_submit`.",
2936
+ },
2937
+ ],
2938
+ },
2939
+ {
2940
+ id: "remote-permission-request",
2941
+ name: "RemotePermissionRequest",
2942
+ category: "permissions",
2943
+ definition: "export interface RemotePermissionRequest {\n permission: RemotePermission;\n}",
2944
+ description: "remote-permission request (RFC 0002).",
2945
+ fields: [
2946
+ {
2947
+ name: "permission",
2948
+ type: "RemotePermission",
2949
+ description: "Permission requested by the product.",
2950
+ },
2951
+ ],
2952
+ },
2953
+ {
2954
+ id: "remote-permission-response",
2955
+ name: "RemotePermissionResponse",
2956
+ category: "permissions",
2957
+ definition: "export interface RemotePermissionResponse {\n granted: boolean;\n}",
2958
+ description: "Outcome of a remote-permission request.",
2959
+ fields: [
2960
+ {
2961
+ name: "granted",
2962
+ type: "boolean",
2963
+ description: "Whether the permission was granted.",
2964
+ },
2965
+ ],
2966
+ },
2967
+ {
2968
+ id: "remote-preimage-lookup-subscribe-item",
2969
+ name: "RemotePreimageLookupSubscribeItem",
2970
+ category: "preimage",
2971
+ definition: "export interface RemotePreimageLookupSubscribeItem {\n value?: HexString;\n}",
2972
+ description: "Item containing an optional preimage lookup result.",
2973
+ fields: [
2974
+ {
2975
+ name: "value",
2976
+ type: "HexString | undefined",
2977
+ description: "Preimage data, if found.",
2978
+ },
2979
+ ],
2980
+ },
2981
+ {
2982
+ id: "remote-preimage-lookup-subscribe-request",
2983
+ name: "RemotePreimageLookupSubscribeRequest",
2984
+ category: "preimage",
2985
+ definition: "export interface RemotePreimageLookupSubscribeRequest {\n key: HexString;\n}",
2986
+ description: "Request to subscribe to preimage lookup results.",
2987
+ fields: [
2988
+ {
2989
+ name: "key",
2990
+ type: "HexString",
2991
+ description: "Hash of the preimage.",
2992
+ },
2993
+ ],
2994
+ },
2995
+ {
2996
+ id: "remote-statement-store-create-proof-error",
2997
+ name: "RemoteStatementStoreCreateProofError",
2998
+ category: "statement_store",
2999
+ definition: 'export type RemoteStatementStoreCreateProofError =\n | { tag: "UnableToSign"; value?: undefined }\n | { tag: "UnknownAccount"; value?: undefined }\n | { tag: "Unknown"; value: { reason: string } }\n;',
3000
+ description: "Statement proof creation error.",
3001
+ variants: [
3002
+ {
3003
+ name: "UnableToSign",
3004
+ type: '{ tag: "UnableToSign"; value?: undefined }',
3005
+ description: "Signing operation failed.",
3006
+ },
3007
+ {
3008
+ name: "UnknownAccount",
3009
+ type: '{ tag: "UnknownAccount"; value?: undefined }',
3010
+ description: "Account not recognized.",
3011
+ },
3012
+ {
3013
+ name: "Unknown",
3014
+ type: '{ tag: "Unknown"; value: { reason: string } }',
3015
+ description: "Catch-all.",
3016
+ },
3017
+ ],
3018
+ },
3019
+ {
3020
+ id: "remote-statement-store-create-proof-request",
3021
+ name: "RemoteStatementStoreCreateProofRequest",
3022
+ category: "statement_store",
3023
+ definition: "export interface RemoteStatementStoreCreateProofRequest {\n productAccountId: ProductAccountId;\n statement: Statement;\n}",
3024
+ description: "Request to create a cryptographic proof for a statement.",
3025
+ fields: [
3026
+ {
3027
+ name: "product_account_id",
3028
+ type: "ProductAccountId",
3029
+ description: "Product account that should create the proof.",
3030
+ },
3031
+ {
3032
+ name: "statement",
3033
+ type: "Statement",
3034
+ description: "Statement to prove.",
3035
+ },
3036
+ ],
3037
+ },
3038
+ {
3039
+ id: "remote-statement-store-create-proof-response",
3040
+ name: "RemoteStatementStoreCreateProofResponse",
3041
+ category: "statement_store",
3042
+ definition: "export interface RemoteStatementStoreCreateProofResponse {\n proof: StatementProof;\n}",
3043
+ description: "Response containing a statement proof.",
3044
+ fields: [
3045
+ {
3046
+ name: "proof",
3047
+ type: "StatementProof",
3048
+ description: "Created statement proof.",
3049
+ },
3050
+ ],
3051
+ },
3052
+ {
3053
+ id: "remote-statement-store-subscribe-item",
3054
+ name: "RemoteStatementStoreSubscribeItem",
3055
+ category: "statement_store",
3056
+ definition: "export interface RemoteStatementStoreSubscribeItem {\n statements: Array<SignedStatement>;\n isComplete: boolean;\n}",
3057
+ description: "Page of signed statements delivered by the statement store subscription\n(RFC 0008). The `is_complete` flag distinguishes the historical-dump phase\n(`false`) from the live-update phase (`true`).",
3058
+ fields: [
3059
+ {
3060
+ name: "statements",
3061
+ type: "Array<SignedStatement>",
3062
+ description: "Signed statements matching the subscription.",
3063
+ },
3064
+ {
3065
+ name: "is_complete",
3066
+ type: "boolean",
3067
+ description: "`false` while the host is still streaming the historical dump (more\npages to follow). `true` once the dump is complete; all subsequent\npages are also `true` and carry only newly-arrived statements.",
3068
+ },
3069
+ ],
3070
+ },
3071
+ {
3072
+ id: "remote-statement-store-subscribe-request",
3073
+ name: "RemoteStatementStoreSubscribeRequest",
3074
+ category: "statement_store",
3075
+ definition: 'export type RemoteStatementStoreSubscribeRequest =\n | { tag: "MatchAll"; value: Array<Topic> }\n | { tag: "MatchAny"; value: Array<Topic> }\n;',
3076
+ description: "Request to subscribe to statements via a topic filter (RFC 0008).",
3077
+ variants: [
3078
+ {
3079
+ name: "MatchAll",
3080
+ type: '{ tag: "MatchAll"; value: Array<Topic> }',
3081
+ description: "AND: statement must contain every listed topic.",
3082
+ },
3083
+ {
3084
+ name: "MatchAny",
3085
+ type: '{ tag: "MatchAny"; value: Array<Topic> }',
3086
+ description: "OR: statement must contain at least one listed topic.",
3087
+ },
3088
+ ],
3089
+ },
3090
+ {
3091
+ id: "resource-allocation-error",
3092
+ name: "ResourceAllocationError",
3093
+ category: "resource_allocation",
3094
+ definition: 'export type ResourceAllocationError =\n | { tag: "Unknown"; value: { reason: string } }\n;',
3095
+ description: "Error from [`crate::api::ResourceAllocation::request`].",
3096
+ variants: [
3097
+ {
3098
+ name: "Unknown",
3099
+ type: '{ tag: "Unknown"; value: { reason: string } }',
3100
+ description: "Catch-all.",
3101
+ },
3102
+ ],
3103
+ },
3104
+ {
3105
+ id: "ring-location",
3106
+ name: "RingLocation",
3107
+ category: "account",
3108
+ definition: "export interface RingLocation {\n genesisHash: HexString;\n ringRootHash: HexString;\n hints?: RingLocationHint;\n}",
3109
+ description: "Locates a specific ring on a specific chain for ring VRF operations.",
3110
+ fields: [
3111
+ {
3112
+ name: "genesis_hash",
3113
+ type: "HexString",
3114
+ description: "Chain genesis hash.",
3115
+ },
3116
+ {
3117
+ name: "ring_root_hash",
3118
+ type: "HexString",
3119
+ description: "Root hash of the ring.",
3120
+ },
3121
+ {
3122
+ name: "hints",
3123
+ type: "RingLocationHint | undefined",
3124
+ description: "Optional location hints.",
3125
+ },
3126
+ ],
3127
+ },
3128
+ {
3129
+ id: "ring-location-hint",
3130
+ name: "RingLocationHint",
3131
+ category: "account",
3132
+ definition: "export interface RingLocationHint {\n palletInstance?: number;\n}",
3133
+ description: "Hints for locating a ring on-chain.",
3134
+ fields: [
3135
+ {
3136
+ name: "pallet_instance",
3137
+ type: "number | undefined",
3138
+ description: "Optional pallet instance index.",
3139
+ },
3140
+ ],
3141
+ },
3142
+ {
3143
+ id: "row-props",
3144
+ name: "RowProps",
3145
+ category: "chat",
3146
+ definition: "export interface RowProps {\n verticalAlignment?: VerticalAlignment;\n horizontalArrangement?: Arrangement;\n}",
3147
+ description: "Properties for a [`CustomRendererNode::Row`] layout.",
3148
+ fields: [
3149
+ {
3150
+ name: "vertical_alignment",
3151
+ type: "VerticalAlignment | undefined",
3152
+ description: "Vertical alignment of children.",
3153
+ },
3154
+ {
3155
+ name: "horizontal_arrangement",
3156
+ type: "Arrangement | undefined",
3157
+ description: "Horizontal arrangement of children.",
3158
+ },
3159
+ ],
3160
+ },
3161
+ {
3162
+ id: "runtime-api",
3163
+ name: "RuntimeApi",
3164
+ category: "chain",
3165
+ definition: "export interface RuntimeApi {\n name: string;\n version: number;\n}",
3166
+ fields: [
3167
+ {
3168
+ name: "name",
3169
+ type: "string",
3170
+ description: "Runtime API name.",
3171
+ },
3172
+ {
3173
+ name: "version",
3174
+ type: "number",
3175
+ description: "Runtime API version.",
3176
+ },
3177
+ ],
3178
+ },
3179
+ {
3180
+ id: "runtime-spec",
3181
+ name: "RuntimeSpec",
3182
+ category: "chain",
3183
+ definition: "export interface RuntimeSpec {\n specName: string;\n implName: string;\n specVersion: number;\n implVersion: number;\n transactionVersion?: number;\n apis: Array<RuntimeApi>;\n}",
3184
+ fields: [
3185
+ {
3186
+ name: "spec_name",
3187
+ type: "string",
3188
+ description: "Specification name.",
3189
+ },
3190
+ {
3191
+ name: "impl_name",
3192
+ type: "string",
3193
+ description: "Implementation name.",
3194
+ },
3195
+ {
3196
+ name: "spec_version",
3197
+ type: "number",
3198
+ description: "Spec version number.",
3199
+ },
3200
+ {
3201
+ name: "impl_version",
3202
+ type: "number",
3203
+ description: "Implementation version.",
3204
+ },
3205
+ {
3206
+ name: "transaction_version",
3207
+ type: "number | undefined",
3208
+ description: "Transaction format version.",
3209
+ },
3210
+ {
3211
+ name: "apis",
3212
+ type: "Array<RuntimeApi>",
3213
+ description: "Supported runtime APIs.",
3214
+ },
3215
+ ],
3216
+ },
3217
+ {
3218
+ id: "runtime-type",
3219
+ name: "RuntimeType",
3220
+ category: "chain",
3221
+ definition: 'export type RuntimeType =\n | { tag: "Valid"; value: RuntimeSpec }\n | { tag: "Invalid"; value: { error: string } }\n;',
3222
+ variants: [
3223
+ {
3224
+ name: "Valid",
3225
+ type: '{ tag: "Valid"; value: RuntimeSpec }',
3226
+ },
3227
+ {
3228
+ name: "Invalid",
3229
+ type: '{ tag: "Invalid"; value: { error: string } }',
3230
+ },
3231
+ ],
3232
+ },
3233
+ {
3234
+ id: "shape",
3235
+ name: "Shape",
3236
+ category: "chat",
3237
+ definition: 'export type Shape =\n | { tag: "Rounded"; value: { radius: Size } }\n | { tag: "Circle"; value?: undefined }\n;',
3238
+ description: "Shape for borders and backgrounds.",
3239
+ variants: [
3240
+ {
3241
+ name: "Rounded",
3242
+ type: '{ tag: "Rounded"; value: { radius: Size } }',
3243
+ description: "Border radius value.",
3244
+ },
3245
+ {
3246
+ name: "Circle",
3247
+ type: '{ tag: "Circle"; value?: undefined }',
3248
+ description: "Circular shape.",
3249
+ },
3250
+ ],
3251
+ },
3252
+ {
3253
+ id: "signed-statement",
3254
+ name: "SignedStatement",
3255
+ category: "statement_store",
3256
+ definition: "export interface SignedStatement {\n proof: StatementProof;\n decryptionKey?: HexString;\n expiry?: bigint;\n channel?: HexString;\n topics: Array<HexString>;\n data?: HexString;\n}",
3257
+ description: "A statement with a required (not optional) proof.",
3258
+ fields: [
3259
+ {
3260
+ name: "proof",
3261
+ type: "StatementProof",
3262
+ description: "Required cryptographic proof.",
3263
+ },
3264
+ {
3265
+ name: "decryption_key",
3266
+ type: "HexString | undefined",
3267
+ description: "Optional decryption key.",
3268
+ },
3269
+ {
3270
+ name: "expiry",
3271
+ type: "bigint | undefined",
3272
+ description: "Optional Unix timestamp expiry.",
3273
+ },
3274
+ {
3275
+ name: "channel",
3276
+ type: "HexString | undefined",
3277
+ description: "Optional channel.",
3278
+ },
3279
+ {
3280
+ name: "topics",
3281
+ type: "Array<HexString>",
3282
+ description: "[u8; 32] tags.",
3283
+ },
3284
+ {
3285
+ name: "data",
3286
+ type: "HexString | undefined",
3287
+ description: "Optional data payload.",
3288
+ },
3289
+ ],
3290
+ },
3291
+ {
3292
+ id: "size",
3293
+ name: "Size",
3294
+ category: "chat",
3295
+ definition: "export type Size = number | bigint;",
3296
+ description: "A size/dimension value (logical pixels) used across the custom renderer.\n\nEncoded as a SCALE `Compact<u64>`: the common small values cost a single\nbyte on the wire instead of eight.",
3297
+ },
3298
+ {
3299
+ id: "statement",
3300
+ name: "Statement",
3301
+ category: "statement_store",
3302
+ definition: "export interface Statement {\n proof?: StatementProof;\n decryptionKey?: HexString;\n expiry?: bigint;\n channel?: HexString;\n topics: Array<HexString>;\n data?: HexString;\n}",
3303
+ description: "A statement with optional proof and metadata.",
3304
+ fields: [
3305
+ {
3306
+ name: "proof",
3307
+ type: "StatementProof | undefined",
3308
+ description: "Optional cryptographic proof.",
3309
+ },
3310
+ {
3311
+ name: "decryption_key",
3312
+ type: "HexString | undefined",
3313
+ description: "Optional decryption key.",
3314
+ },
3315
+ {
3316
+ name: "expiry",
3317
+ type: "bigint | undefined",
3318
+ description: "Optional Unix timestamp expiry.",
3319
+ },
3320
+ {
3321
+ name: "channel",
3322
+ type: "HexString | undefined",
3323
+ description: "Optional channel.",
3324
+ },
3325
+ {
3326
+ name: "topics",
3327
+ type: "Array<HexString>",
3328
+ description: "[u8; 32] tags.",
3329
+ },
3330
+ {
3331
+ name: "data",
3332
+ type: "HexString | undefined",
3333
+ description: "Optional data payload.",
3334
+ },
3335
+ ],
3336
+ },
3337
+ {
3338
+ id: "statement-proof",
3339
+ name: "StatementProof",
3340
+ category: "statement_store",
3341
+ definition: 'export type StatementProof =\n | { tag: "Sr25519"; value: { signature: HexString; signer: HexString } }\n | { tag: "Ed25519"; value: { signature: HexString; signer: HexString } }\n | { tag: "Ecdsa"; value: { signature: HexString; signer: HexString } }\n | { tag: "OnChain"; value: { who: HexString; blockHash: HexString; event: bigint } }\n;',
3342
+ description: "Cryptographic proof for a statement.",
3343
+ variants: [
3344
+ {
3345
+ name: "Sr25519",
3346
+ type: '{ tag: "Sr25519"; value: { signature: HexString; signer: HexString } }',
3347
+ description: "Sr25519 signature proof.",
3348
+ },
3349
+ {
3350
+ name: "Ed25519",
3351
+ type: '{ tag: "Ed25519"; value: { signature: HexString; signer: HexString } }',
3352
+ description: "Ed25519 signature proof.",
3353
+ },
3354
+ {
3355
+ name: "Ecdsa",
3356
+ type: '{ tag: "Ecdsa"; value: { signature: HexString; signer: HexString } }',
3357
+ description: "ECDSA signature proof.",
3358
+ },
3359
+ {
3360
+ name: "OnChain",
3361
+ type: '{ tag: "OnChain"; value: { who: HexString; blockHash: HexString; event: bigint } }',
3362
+ description: "On-chain event proof.",
3363
+ },
3364
+ ],
3365
+ },
3366
+ {
3367
+ id: "storage-query-item",
3368
+ name: "StorageQueryItem",
3369
+ category: "chain",
3370
+ definition: "export interface StorageQueryItem {\n key: HexString;\n queryType: StorageQueryType;\n}",
3371
+ fields: [
3372
+ {
3373
+ name: "key",
3374
+ type: "HexString",
3375
+ description: "Storage key to query.",
3376
+ },
3377
+ {
3378
+ name: "query_type",
3379
+ type: "StorageQueryType",
3380
+ description: "What to return.",
3381
+ },
3382
+ ],
3383
+ },
3384
+ {
3385
+ id: "storage-query-type",
3386
+ name: "StorageQueryType",
3387
+ category: "chain",
3388
+ definition: 'export type StorageQueryType = "Value" | "Hash" | "ClosestDescendantMerkleValue" | "DescendantsValues" | "DescendantsHashes";',
3389
+ variants: [
3390
+ {
3391
+ name: "Value",
3392
+ type: '{ tag: "Value"; value?: undefined }',
3393
+ },
3394
+ {
3395
+ name: "Hash",
3396
+ type: '{ tag: "Hash"; value?: undefined }',
3397
+ },
3398
+ {
3399
+ name: "ClosestDescendantMerkleValue",
3400
+ type: '{ tag: "ClosestDescendantMerkleValue"; value?: undefined }',
3401
+ },
3402
+ {
3403
+ name: "DescendantsValues",
3404
+ type: '{ tag: "DescendantsValues"; value?: undefined }',
3405
+ },
3406
+ {
3407
+ name: "DescendantsHashes",
3408
+ type: '{ tag: "DescendantsHashes"; value?: undefined }',
3409
+ },
3410
+ ],
3411
+ },
3412
+ {
3413
+ id: "storage-result-item",
3414
+ name: "StorageResultItem",
3415
+ category: "chain",
3416
+ definition: "export interface StorageResultItem {\n key: HexString;\n value?: HexString;\n hash?: HexString;\n closestDescendantMerkleValue?: HexString;\n}",
3417
+ fields: [
3418
+ {
3419
+ name: "key",
3420
+ type: "HexString",
3421
+ description: "The queried key.",
3422
+ },
3423
+ {
3424
+ name: "value",
3425
+ type: "HexString | undefined",
3426
+ description: "Value, if requested.",
3427
+ },
3428
+ {
3429
+ name: "hash",
3430
+ type: "HexString | undefined",
3431
+ description: "Hash, if requested.",
3432
+ },
3433
+ {
3434
+ name: "closest_descendant_merkle_value",
3435
+ type: "HexString | undefined",
3436
+ description: "Merkle value, if requested.",
3437
+ },
3438
+ ],
3439
+ },
3440
+ {
3441
+ id: "text-field-props",
3442
+ name: "TextFieldProps",
3443
+ category: "chat",
3444
+ definition: "export interface TextFieldProps {\n text: string;\n placeholder?: string;\n label?: string;\n enabled: boolean | undefined;\n valueChangeAction?: string;\n}",
3445
+ description: "Properties for a [`CustomRendererNode::TextField`].",
3446
+ fields: [
3447
+ {
3448
+ name: "text",
3449
+ type: "string",
3450
+ description: "Current text value.",
3451
+ },
3452
+ {
3453
+ name: "placeholder",
3454
+ type: "string | undefined",
3455
+ description: "Placeholder text.",
3456
+ },
3457
+ {
3458
+ name: "label",
3459
+ type: "string | undefined",
3460
+ description: "Field label.",
3461
+ },
3462
+ {
3463
+ name: "enabled",
3464
+ type: "boolean | undefined",
3465
+ description: "Whether the field is enabled. Absent leaves the default to the host.",
3466
+ },
3467
+ {
3468
+ name: "value_change_action",
3469
+ type: "string | undefined",
3470
+ description: "Action identifier triggered when the value changes.",
3471
+ },
3472
+ ],
3473
+ },
3474
+ {
3475
+ id: "text-props",
3476
+ name: "TextProps",
3477
+ category: "chat",
3478
+ definition: "export interface TextProps {\n style?: TypographyStyle;\n color?: ColorToken;\n}",
3479
+ description: "Properties for a [`CustomRendererNode::Text`] display.",
3480
+ fields: [
3481
+ {
3482
+ name: "style",
3483
+ type: "TypographyStyle | undefined",
3484
+ description: "Typography preset.",
3485
+ },
3486
+ {
3487
+ name: "color",
3488
+ type: "ColorToken | undefined",
3489
+ description: "Text color.",
3490
+ },
3491
+ ],
3492
+ },
3493
+ {
3494
+ id: "theme-name",
3495
+ name: "ThemeName",
3496
+ category: "theme",
3497
+ definition: 'export type ThemeName =\n | { tag: "Custom"; value: string }\n | { tag: "Default"; value?: undefined }\n;',
3498
+ description: "Identifies a named theme.",
3499
+ variants: [
3500
+ {
3501
+ name: "Custom",
3502
+ type: '{ tag: "Custom"; value: string }',
3503
+ description: "A custom named theme.",
3504
+ },
3505
+ {
3506
+ name: "Default",
3507
+ type: '{ tag: "Default"; value?: undefined }',
3508
+ description: "The host's default theme.",
3509
+ },
3510
+ ],
3511
+ },
3512
+ {
3513
+ id: "theme-variant",
3514
+ name: "ThemeVariant",
3515
+ category: "theme",
3516
+ definition: 'export type ThemeVariant = "Light" | "Dark";',
3517
+ description: "Light or dark variant.",
3518
+ variants: [
3519
+ {
3520
+ name: "Light",
3521
+ type: '{ tag: "Light"; value?: undefined }',
3522
+ },
3523
+ {
3524
+ name: "Dark",
3525
+ type: '{ tag: "Dark"; value?: undefined }',
3526
+ },
3527
+ ],
3528
+ },
3529
+ {
3530
+ id: "topic",
3531
+ name: "Topic",
3532
+ category: "statement_store",
3533
+ definition: "export type Topic = HexString;",
3534
+ description: "32-byte statement topic.",
3535
+ },
3536
+ {
3537
+ id: "tx-payload-extension",
3538
+ name: "TxPayloadExtension",
3539
+ category: "transaction",
3540
+ definition: "export interface TxPayloadExtension {\n id: string;\n extra: HexString;\n additionalSigned: HexString;\n}",
3541
+ description: "A signed extension for a transaction payload.",
3542
+ fields: [
3543
+ {
3544
+ name: "id",
3545
+ type: "string",
3546
+ description: 'Extension name (e.g., `"CheckSpecVersion"`).',
3547
+ },
3548
+ {
3549
+ name: "extra",
3550
+ type: "HexString",
3551
+ description: "SCALE-encoded extra data (in extrinsic body).",
3552
+ },
3553
+ {
3554
+ name: "additional_signed",
3555
+ type: "HexString",
3556
+ description: "SCALE-encoded implicit data (signed, not in body).",
3557
+ },
3558
+ ],
3559
+ },
3560
+ {
3561
+ id: "typography-style",
3562
+ name: "TypographyStyle",
3563
+ category: "chat",
3564
+ definition: 'export type TypographyStyle = "HeadlineLarge" | "TitleMediumRegular" | "BodyLargeRegular" | "BodyMediumRegular" | "BodySmallRegular";',
3565
+ description: "Text typography presets.",
3566
+ variants: [
3567
+ {
3568
+ name: "HeadlineLarge",
3569
+ type: '{ tag: "HeadlineLarge"; value?: undefined }',
3570
+ },
3571
+ {
3572
+ name: "TitleMediumRegular",
3573
+ type: '{ tag: "TitleMediumRegular"; value?: undefined }',
3574
+ },
3575
+ {
3576
+ name: "BodyLargeRegular",
3577
+ type: '{ tag: "BodyLargeRegular"; value?: undefined }',
3578
+ },
3579
+ {
3580
+ name: "BodyMediumRegular",
3581
+ type: '{ tag: "BodyMediumRegular"; value?: undefined }',
3582
+ },
3583
+ {
3584
+ name: "BodySmallRegular",
3585
+ type: '{ tag: "BodySmallRegular"; value?: undefined }',
3586
+ },
3587
+ ],
3588
+ },
3589
+ {
3590
+ id: "vertical-alignment",
3591
+ name: "VerticalAlignment",
3592
+ category: "chat",
3593
+ definition: 'export type VerticalAlignment = "Top" | "Center" | "Bottom";',
3594
+ description: "Vertical alignment options.",
3595
+ variants: [
3596
+ {
3597
+ name: "Top",
3598
+ type: '{ tag: "Top"; value?: undefined }',
3599
+ },
3600
+ {
3601
+ name: "Center",
3602
+ type: '{ tag: "Center"; value?: undefined }',
3603
+ },
3604
+ {
3605
+ name: "Bottom",
3606
+ type: '{ tag: "Bottom"; value?: undefined }',
3607
+ },
3608
+ ],
3609
+ },
3610
+ ];