@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
@@ -1,6 +1,6 @@
1
1
  // Auto-generated by truapi-codegen. Do not edit.
2
2
  import * as S from "../scale.js";
3
- export const Account = S.lazy(() => S.Struct({ publicKey: S.Hex(), name: S.Option(S.str) }));
3
+ export const AccountId = S.lazy(() => S.Hex(32));
4
4
  export const ActionTrigger = S.lazy(() => S.Struct({
5
5
  messageId: S.str,
6
6
  actionId: S.str,
@@ -20,7 +20,7 @@ export const Background = S.lazy(() => S.Struct({
20
20
  }));
21
21
  export const Balance = S.lazy(() => S.u128);
22
22
  export const BorderStyle = S.lazy(() => S.Struct({
23
- width: S.u64,
23
+ width: Size,
24
24
  color: ColorToken,
25
25
  shape: S.Option(Shape),
26
26
  }));
@@ -30,7 +30,9 @@ export const BoxProps = S.lazy(() => S.Struct({
30
30
  export const ButtonProps = S.lazy(() => S.Struct({
31
31
  text: S.str,
32
32
  variant: S.Option(ButtonVariant),
33
- clickAction: S.str,
33
+ enabled: S.OptionBool,
34
+ loading: S.OptionBool,
35
+ clickAction: S.Option(S.str),
34
36
  }));
35
37
  export const ButtonVariant = S.lazy(() => S.Status("Primary", "Secondary", "Text"));
36
38
  export const ChatAction = S.lazy(() => S.Struct({ actionId: S.str, title: S.str }));
@@ -79,7 +81,7 @@ export const ChatRoom = S.lazy(() => S.Struct({
79
81
  }));
80
82
  export const ChatRoomParticipation = S.lazy(() => S.Status("RoomHost", "Bot"));
81
83
  export const ChatRoomRegistrationStatus = S.lazy(() => S.Status("New", "Exists"));
82
- export const ColorToken = S.lazy(() => S.Status("TextPrimary", "TextSecondary", "TextTertiary", "BackgroundPrimary", "BackgroundSecondary", "BackgroundTertiary", "Success", "Error", "Warning"));
84
+ export const ColorToken = S.lazy(() => S.Status("FgPrimary", "FgSecondary", "FgTertiary", "BgSurfaceMain", "BgSurfaceContainer", "BgSurfaceNested", "FgSuccess", "FgError", "FgWarning"));
83
85
  export const ColumnProps = S.lazy(() => S.Struct({
84
86
  horizontalAlignment: S.Option(HorizontalAlignment),
85
87
  verticalArrangement: S.Option(Arrangement),
@@ -106,13 +108,13 @@ export const CustomRendererNode = S.lazy(() => S.TaggedUnion({
106
108
  TextField: Component(TextFieldProps),
107
109
  }));
108
110
  export const Dimensions = S.lazy(() => S.Struct({
109
- top: S.u64,
110
- end: S.u64,
111
- bottom: S.Option(S.u64),
112
- start: S.Option(S.u64),
111
+ top: Size,
112
+ end: Size,
113
+ bottom: S.Option(Size),
114
+ start: S.Option(Size),
113
115
  }));
114
- export const GenericErr = S.lazy(() => S.Struct({ reason: S.str }));
115
- export const GenericError = S.lazy(() => S.TaggedUnion({ GenericError: GenericErr }));
116
+ export const GenericError = S.lazy(() => S.Struct({ reason: S.str }));
117
+ export const GenesisHash = S.lazy(() => S.Hex(32));
116
118
  export const HorizontalAlignment = S.lazy(() => S.Status("Start", "Center", "End"));
117
119
  export const VersionedHostAccountConnectionStatusSubscribeItem = S.lazy(() => S.indexedTaggedUnion({
118
120
  V1: [0, HostAccountConnectionStatusSubscribeItem],
@@ -140,12 +142,10 @@ export const VersionedHostChatRegisterBotError = S.lazy(() => S.indexedTaggedUni
140
142
  export const VersionedHostChatRegisterBotRequest = S.lazy(() => S.indexedTaggedUnion({ V1: [0, HostChatRegisterBotRequest] }));
141
143
  export const VersionedHostChatRegisterBotResponse = S.lazy(() => S.indexedTaggedUnion({ V1: [0, HostChatRegisterBotResponse] }));
142
144
  export const VersionedHostCreateTransactionError = S.lazy(() => S.indexedTaggedUnion({ V1: [0, HostCreateTransactionError] }));
143
- export const VersionedHostCreateTransactionRequest = S.lazy(() => S.indexedTaggedUnion({ V1: [0, HostCreateTransactionRequest] }));
145
+ export const VersionedHostCreateTransactionRequest = S.lazy(() => S.indexedTaggedUnion({ V1: [0, ProductAccountTxPayload] }));
144
146
  export const VersionedHostCreateTransactionResponse = S.lazy(() => S.indexedTaggedUnion({ V1: [0, HostCreateTransactionResponse] }));
145
147
  export const VersionedHostCreateTransactionWithLegacyAccountError = S.lazy(() => S.indexedTaggedUnion({ V1: [0, HostCreateTransactionError] }));
146
- export const VersionedHostCreateTransactionWithLegacyAccountRequest = S.lazy(() => S.indexedTaggedUnion({
147
- V1: [0, HostCreateTransactionWithLegacyAccountRequest],
148
- }));
148
+ export const VersionedHostCreateTransactionWithLegacyAccountRequest = S.lazy(() => S.indexedTaggedUnion({ V1: [0, LegacyAccountTxPayload] }));
149
149
  export const VersionedHostCreateTransactionWithLegacyAccountResponse = S.lazy(() => S.indexedTaggedUnion({
150
150
  V1: [0, HostCreateTransactionWithLegacyAccountResponse],
151
151
  }));
@@ -167,15 +167,6 @@ export const VersionedHostGetUserIdResponse = S.lazy(() => S.indexedTaggedUnion(
167
167
  export const VersionedHostHandshakeError = S.lazy(() => S.indexedTaggedUnion({ V1: [0, HostHandshakeError] }));
168
168
  export const VersionedHostHandshakeRequest = S.lazy(() => S.indexedTaggedUnion({ V1: [0, HostHandshakeRequest] }));
169
169
  export const VersionedHostHandshakeResponse = S.lazy(() => S.indexedTaggedUnion({ V1: [0, S._void] }));
170
- export const VersionedHostJsonrpcMessageSendError = S.lazy(() => S.indexedTaggedUnion({ V1: [0, GenericError] }));
171
- export const VersionedHostJsonrpcMessageSendRequest = S.lazy(() => S.indexedTaggedUnion({ V1: [0, HostJsonrpcMessageSendRequest] }));
172
- export const VersionedHostJsonrpcMessageSendResponse = S.lazy(() => S.indexedTaggedUnion({ V1: [0, S._void] }));
173
- export const VersionedHostJsonrpcMessageSubscribeItem = S.lazy(() => S.indexedTaggedUnion({
174
- V1: [0, HostJsonrpcMessageSubscribeItem],
175
- }));
176
- export const VersionedHostJsonrpcMessageSubscribeRequest = S.lazy(() => S.indexedTaggedUnion({
177
- V1: [0, HostJsonrpcMessageSubscribeRequest],
178
- }));
179
170
  export const VersionedHostLocalStorageClearError = S.lazy(() => S.indexedTaggedUnion({ V1: [0, HostLocalStorageReadError] }));
180
171
  export const VersionedHostLocalStorageClearRequest = S.lazy(() => S.indexedTaggedUnion({ V1: [0, HostLocalStorageClearRequest] }));
181
172
  export const VersionedHostLocalStorageClearResponse = S.lazy(() => S.indexedTaggedUnion({ V1: [0, S._void] }));
@@ -194,10 +185,12 @@ export const VersionedHostPaymentBalanceSubscribeError = S.lazy(() => S.indexedT
194
185
  export const VersionedHostPaymentBalanceSubscribeItem = S.lazy(() => S.indexedTaggedUnion({
195
186
  V1: [0, HostPaymentBalanceSubscribeItem],
196
187
  }));
197
- export const VersionedHostPaymentBalanceSubscribeRequest = S.lazy(() => S.indexedTaggedUnion({ V1: [0, S._void] }));
198
- export const VersionedHostPaymentRequestError = S.lazy(() => S.indexedTaggedUnion({ V1: [0, HostPaymentRequestError] }));
199
- export const VersionedHostPaymentRequestRequest = S.lazy(() => S.indexedTaggedUnion({ V1: [0, HostPaymentRequestRequest] }));
200
- export const VersionedHostPaymentRequestResponse = S.lazy(() => S.indexedTaggedUnion({ V1: [0, HostPaymentRequestResponse] }));
188
+ export const VersionedHostPaymentBalanceSubscribeRequest = S.lazy(() => S.indexedTaggedUnion({
189
+ V1: [0, HostPaymentBalanceSubscribeRequest],
190
+ }));
191
+ export const VersionedHostPaymentError = S.lazy(() => S.indexedTaggedUnion({ V1: [0, HostPaymentError] }));
192
+ export const VersionedHostPaymentRequest = S.lazy(() => S.indexedTaggedUnion({ V1: [0, HostPaymentRequest] }));
193
+ export const VersionedHostPaymentResponse = S.lazy(() => S.indexedTaggedUnion({ V1: [0, HostPaymentResponse] }));
201
194
  export const VersionedHostPaymentStatusSubscribeError = S.lazy(() => S.indexedTaggedUnion({
202
195
  V1: [0, HostPaymentStatusSubscribeError],
203
196
  }));
@@ -210,9 +203,14 @@ export const VersionedHostPaymentStatusSubscribeRequest = S.lazy(() => S.indexed
210
203
  export const VersionedHostPaymentTopUpError = S.lazy(() => S.indexedTaggedUnion({ V1: [0, HostPaymentTopUpError] }));
211
204
  export const VersionedHostPaymentTopUpRequest = S.lazy(() => S.indexedTaggedUnion({ V1: [0, HostPaymentTopUpRequest] }));
212
205
  export const VersionedHostPaymentTopUpResponse = S.lazy(() => S.indexedTaggedUnion({ V1: [0, S._void] }));
213
- export const VersionedHostPushNotificationError = S.lazy(() => S.indexedTaggedUnion({ V1: [0, GenericError] }));
206
+ export const VersionedHostPushNotificationCancelError = S.lazy(() => S.indexedTaggedUnion({ V1: [0, GenericError] }));
207
+ export const VersionedHostPushNotificationCancelRequest = S.lazy(() => S.indexedTaggedUnion({
208
+ V1: [0, HostPushNotificationCancelRequest],
209
+ }));
210
+ export const VersionedHostPushNotificationCancelResponse = S.lazy(() => S.indexedTaggedUnion({ V1: [0, S._void] }));
211
+ export const VersionedHostPushNotificationError = S.lazy(() => S.indexedTaggedUnion({ V1: [0, HostPushNotificationError] }));
214
212
  export const VersionedHostPushNotificationRequest = S.lazy(() => S.indexedTaggedUnion({ V1: [0, HostPushNotificationRequest] }));
215
- export const VersionedHostPushNotificationResponse = S.lazy(() => S.indexedTaggedUnion({ V1: [0, S._void] }));
213
+ export const VersionedHostPushNotificationResponse = S.lazy(() => S.indexedTaggedUnion({ V1: [0, HostPushNotificationResponse] }));
216
214
  export const VersionedHostRequestLoginError = S.lazy(() => S.indexedTaggedUnion({ V1: [0, HostRequestLoginError] }));
217
215
  export const VersionedHostRequestLoginRequest = S.lazy(() => S.indexedTaggedUnion({ V1: [0, HostRequestLoginRequest] }));
218
216
  export const VersionedHostRequestLoginResponse = S.lazy(() => S.indexedTaggedUnion({ V1: [0, HostRequestLoginResponse] }));
@@ -223,6 +221,23 @@ export const VersionedHostRequestResourceAllocationRequest = S.lazy(() => S.inde
223
221
  export const VersionedHostRequestResourceAllocationResponse = S.lazy(() => S.indexedTaggedUnion({
224
222
  V1: [0, HostRequestResourceAllocationResponse],
225
223
  }));
224
+ export const HostSignPayloadData = S.lazy(() => S.Struct({
225
+ blockHash: S.Hex(),
226
+ blockNumber: S.Hex(),
227
+ era: S.Hex(),
228
+ genesisHash: S.Hex(),
229
+ method: S.Hex(),
230
+ nonce: S.Hex(),
231
+ specVersion: S.Hex(),
232
+ tip: S.Hex(),
233
+ transactionVersion: S.Hex(),
234
+ signedExtensions: S.Vector(S.str),
235
+ version: S.u32,
236
+ assetId: S.Option(S.Hex()),
237
+ metadataHash: S.Option(S.Hex()),
238
+ mode: S.Option(S.u32),
239
+ withSignedTransaction: S.Option(S.bool),
240
+ }));
226
241
  export const VersionedHostSignPayloadError = S.lazy(() => S.indexedTaggedUnion({ V1: [0, HostSignPayloadError] }));
227
242
  export const VersionedHostSignPayloadRequest = S.lazy(() => S.indexedTaggedUnion({ V1: [0, HostSignPayloadRequest] }));
228
243
  export const VersionedHostSignPayloadResponse = S.lazy(() => S.indexedTaggedUnion({ V1: [0, HostSignPayloadResponse] }));
@@ -240,25 +255,39 @@ export const VersionedHostSignRawWithLegacyAccountRequest = S.lazy(() => S.index
240
255
  }));
241
256
  export const VersionedHostSignRawWithLegacyAccountResponse = S.lazy(() => S.indexedTaggedUnion({ V1: [0, HostSignPayloadResponse] }));
242
257
  export const VersionedHostThemeSubscribeItem = S.lazy(() => S.indexedTaggedUnion({ V1: [0, HostThemeSubscribeItem] }));
258
+ export const LegacyAccount = S.lazy(() => S.Struct({
259
+ publicKey: S.Hex(),
260
+ name: S.Option(S.str),
261
+ }));
262
+ export const LegacyAccountTxPayload = S.lazy(() => S.Struct({
263
+ signer: AccountId,
264
+ genesisHash: GenesisHash,
265
+ callData: S.Hex(),
266
+ extensions: S.Vector(TxPayloadExtension),
267
+ txExtVersion: S.u8,
268
+ }));
243
269
  export const Modifier = S.lazy(() => S.TaggedUnion({
244
270
  Margin: Dimensions,
245
271
  Padding: Dimensions,
246
272
  Background: Background,
247
273
  Border: BorderStyle,
248
- Height: S.Struct({ height: S.u64 }),
249
- Width: S.Struct({ width: S.u64 }),
250
- MinWidth: S.Struct({ width: S.u64 }),
251
- MinHeight: S.Struct({ height: S.u64 }),
274
+ Height: S.Struct({ height: Size }),
275
+ Width: S.Struct({ width: Size }),
276
+ MinWidth: S.Struct({ width: Size }),
277
+ MinHeight: S.Struct({ height: Size }),
252
278
  FillWidth: S.Struct({ enabled: S.bool }),
253
279
  FillHeight: S.Struct({ enabled: S.bool }),
254
280
  }));
281
+ export const NotificationId = S.lazy(() => S.u32);
255
282
  export const OperationStartedResult = S.lazy(() => S.TaggedUnion({
256
283
  Started: S.Struct({ operationId: S.str }),
257
284
  LimitReached: S._void,
258
285
  }));
286
+ export const PaymentPurseId = S.lazy(() => S.u32);
259
287
  export const PaymentTopUpSource = S.lazy(() => S.TaggedUnion({
260
288
  ProductAccount: S.Struct({ derivationIndex: S.u32 }),
261
- PrivateKey: S.Struct({ ed25519PrivateKey: S.Hex(32) }),
289
+ PrivateKey: S.Struct({ sr25519SecretKey: S.Hex(64) }),
290
+ Coins: S.Struct({ sr25519SecretKeys: S.Vector(S.Hex(64)) }),
262
291
  }));
263
292
  export const PreimageSubmitError = S.lazy(() => S.TaggedUnion({
264
293
  Unknown: S.Struct({ reason: S.str }),
@@ -268,6 +297,13 @@ export const ProductAccountId = S.lazy(() => S.Struct({
268
297
  dotNsIdentifier: S.str,
269
298
  derivationIndex: S.u32,
270
299
  }));
300
+ export const ProductAccountTxPayload = S.lazy(() => S.Struct({
301
+ signer: ProductAccountId,
302
+ genesisHash: GenesisHash,
303
+ callData: S.Hex(),
304
+ extensions: S.Vector(TxPayloadExtension),
305
+ txExtVersion: S.u8,
306
+ }));
271
307
  export const VersionedProductChatCustomMessageRenderSubscribeItem = S.lazy(() => S.indexedTaggedUnion({ V1: [0, CustomRendererNode] }));
272
308
  export const VersionedProductChatCustomMessageRenderSubscribeRequest = S.lazy(() => S.indexedTaggedUnion({
273
309
  V1: [0, ProductChatCustomMessageRenderSubscribeRequest],
@@ -408,7 +444,7 @@ export const RuntimeType = S.lazy(() => S.TaggedUnion({
408
444
  Invalid: S.Struct({ error: S.str }),
409
445
  }));
410
446
  export const Shape = S.lazy(() => S.TaggedUnion({
411
- Rounded: S.Struct({ radius: S.u64 }),
447
+ Rounded: S.Struct({ radius: Size }),
412
448
  Circle: S._void,
413
449
  }));
414
450
  export const SignedStatement = S.lazy(() => S.Struct({
@@ -419,6 +455,7 @@ export const SignedStatement = S.lazy(() => S.Struct({
419
455
  topics: S.Vector(S.Hex(32)),
420
456
  data: S.Option(S.Hex()),
421
457
  }));
458
+ export const Size = S.lazy(() => S.compact);
422
459
  export const Statement = S.lazy(() => S.Struct({
423
460
  proof: S.Option(StatementProof),
424
461
  decryptionKey: S.Option(S.Hex(32)),
@@ -455,35 +492,25 @@ export const StorageResultItem = S.lazy(() => S.Struct({
455
492
  closestDescendantMerkleValue: S.Option(S.Hex()),
456
493
  }));
457
494
  export const TextFieldProps = S.lazy(() => S.Struct({
495
+ text: S.str,
458
496
  placeholder: S.Option(S.str),
459
- initialValue: S.Option(S.str),
460
- submitAction: S.str,
497
+ label: S.Option(S.str),
498
+ enabled: S.OptionBool,
499
+ valueChangeAction: S.Option(S.str),
461
500
  }));
462
501
  export const TextProps = S.lazy(() => S.Struct({
463
502
  style: S.Option(TypographyStyle),
464
503
  color: S.Option(ColorToken),
465
504
  }));
466
- export const Theme = S.lazy(() => S.Status("Light", "Dark"));
505
+ export const ThemeName = S.lazy(() => S.TaggedUnion({ Custom: S.str, Default: S._void }));
506
+ export const ThemeVariant = S.lazy(() => S.Status("Light", "Dark"));
467
507
  export const Topic = S.lazy(() => S.Hex(32));
468
- export const TxPayloadContextV1 = S.lazy(() => S.Struct({
469
- metadata: S.Hex(),
470
- tokenSymbol: S.str,
471
- tokenDecimals: S.u32,
472
- bestBlockHeight: S.u32,
473
- }));
474
- export const TxPayloadExtensionV1 = S.lazy(() => S.Struct({
508
+ export const TxPayloadExtension = S.lazy(() => S.Struct({
475
509
  id: S.str,
476
510
  extra: S.Hex(),
477
511
  additionalSigned: S.Hex(),
478
512
  }));
479
- export const TxPayloadV1 = S.lazy(() => S.Struct({
480
- signer: S.Option(S.str),
481
- callData: S.Hex(),
482
- extensions: S.Vector(TxPayloadExtensionV1),
483
- txExtVersion: S.u8,
484
- context: TxPayloadContextV1,
485
- }));
486
- export const TypographyStyle = S.lazy(() => S.Status("TitleXL", "Headline", "BodyM", "BodyS", "Caption"));
513
+ export const TypographyStyle = S.lazy(() => S.Status("HeadlineLarge", "TitleMediumRegular", "BodyLargeRegular", "BodyMediumRegular", "BodySmallRegular"));
487
514
  export const HostAccountConnectionStatusSubscribeItem = S.lazy(() => S.Status("Disconnected", "Connected"));
488
515
  export const HostAccountCreateProofError = S.lazy(() => S.TaggedUnion({
489
516
  RingNotFound: S._void,
@@ -561,20 +588,15 @@ export const HostCreateTransactionError = S.lazy(() => S.TaggedUnion({
561
588
  PermissionDenied: S._void,
562
589
  Unknown: S.Struct({ reason: S.str }),
563
590
  }));
564
- export const HostCreateTransactionRequest = S.lazy(() => S.Struct({
565
- productAccountId: ProductAccountId,
566
- payload: VersionedTxPayload,
567
- }));
568
591
  export const HostCreateTransactionResponse = S.lazy(() => S.Struct({
569
592
  transaction: S.Hex(),
570
593
  }));
571
- export const HostCreateTransactionWithLegacyAccountRequest = S.lazy(() => S.Struct({
572
- payload: VersionedTxPayload,
573
- }));
574
594
  export const HostCreateTransactionWithLegacyAccountResponse = S.lazy(() => S.Struct({
575
595
  transaction: S.Hex(),
576
596
  }));
577
- export const HostDeriveEntropyError = S.lazy(() => S.Status("Unknown"));
597
+ export const HostDeriveEntropyError = S.lazy(() => S.TaggedUnion({
598
+ Unknown: S.Struct({ reason: S.str }),
599
+ }));
578
600
  export const HostDeriveEntropyRequest = S.lazy(() => S.Struct({ context: S.Hex() }));
579
601
  export const HostDeriveEntropyResponse = S.lazy(() => S.Struct({ entropy: S.Hex(32) }));
580
602
  export const HostDevicePermissionRequest = S.lazy(() => S.Status("Notifications", "Camera", "Microphone", "Bluetooth", "NFC", "Location", "Clipboard", "OpenUrl", "Biometrics"));
@@ -584,7 +606,7 @@ export const HostFeatureSupportedRequest = S.lazy(() => S.TaggedUnion({
584
606
  }));
585
607
  export const HostFeatureSupportedResponse = S.lazy(() => S.Struct({ supported: S.bool }));
586
608
  export const HostGetLegacyAccountsResponse = S.lazy(() => S.Struct({
587
- accounts: S.Vector(Account),
609
+ accounts: S.Vector(LegacyAccount),
588
610
  }));
589
611
  export const HostGetUserIdError = S.lazy(() => S.TaggedUnion({
590
612
  PermissionDenied: S._void,
@@ -595,17 +617,9 @@ export const HostGetUserIdResponse = S.lazy(() => S.Struct({ primaryUsername: S.
595
617
  export const HostHandshakeError = S.lazy(() => S.TaggedUnion({
596
618
  Timeout: S._void,
597
619
  UnsupportedProtocolVersion: S._void,
598
- Unknown: GenericErr,
620
+ Unknown: GenericError,
599
621
  }));
600
622
  export const HostHandshakeRequest = S.lazy(() => S.Struct({ codecVersion: S.u8 }));
601
- export const HostJsonrpcMessageSendRequest = S.lazy(() => S.Struct({
602
- genesisHash: S.Hex(),
603
- message: S.str,
604
- }));
605
- export const HostJsonrpcMessageSubscribeItem = S.lazy(() => S.Struct({ message: S.str }));
606
- export const HostJsonrpcMessageSubscribeRequest = S.lazy(() => S.Struct({
607
- genesisHash: S.Hex(),
608
- }));
609
623
  export const HostLocalStorageClearRequest = S.lazy(() => S.Struct({ key: S.str }));
610
624
  export const HostLocalStorageReadError = S.lazy(() => S.TaggedUnion({
611
625
  Full: S._void,
@@ -631,16 +645,20 @@ export const HostPaymentBalanceSubscribeError = S.lazy(() => S.TaggedUnion({
631
645
  export const HostPaymentBalanceSubscribeItem = S.lazy(() => S.Struct({
632
646
  available: Balance,
633
647
  }));
634
- export const HostPaymentRequestError = S.lazy(() => S.TaggedUnion({
648
+ export const HostPaymentBalanceSubscribeRequest = S.lazy(() => S.Struct({
649
+ purse: S.Option(PaymentPurseId),
650
+ }));
651
+ export const HostPaymentError = S.lazy(() => S.TaggedUnion({
635
652
  Rejected: S._void,
636
653
  InsufficientBalance: S._void,
637
654
  Unknown: S.Struct({ reason: S.str }),
638
655
  }));
639
- export const HostPaymentRequestRequest = S.lazy(() => S.Struct({
656
+ export const HostPaymentRequest = S.lazy(() => S.Struct({
657
+ from: S.Option(PaymentPurseId),
640
658
  amount: Balance,
641
659
  destination: S.Hex(32),
642
660
  }));
643
- export const HostPaymentRequestResponse = S.lazy(() => S.Struct({ id: S.str }));
661
+ export const HostPaymentResponse = S.lazy(() => S.Struct({ id: S.str }));
644
662
  export const HostPaymentStatusSubscribeError = S.lazy(() => S.TaggedUnion({
645
663
  PaymentNotFound: S._void,
646
664
  Unknown: S.Struct({ reason: S.str }),
@@ -656,16 +674,27 @@ export const HostPaymentStatusSubscribeRequest = S.lazy(() => S.Struct({
656
674
  export const HostPaymentTopUpError = S.lazy(() => S.TaggedUnion({
657
675
  InsufficientFunds: S._void,
658
676
  InvalidSource: S._void,
677
+ PartialPayment: S.Struct({ credited: Balance }),
659
678
  Unknown: S.Struct({ reason: S.str }),
660
679
  }));
661
680
  export const HostPaymentTopUpRequest = S.lazy(() => S.Struct({
681
+ into: S.Option(PaymentPurseId),
662
682
  amount: Balance,
663
683
  source: PaymentTopUpSource,
664
684
  }));
685
+ export const HostPushNotificationCancelRequest = S.lazy(() => S.Struct({
686
+ id: NotificationId,
687
+ }));
688
+ export const HostPushNotificationError = S.lazy(() => S.TaggedUnion({
689
+ ScheduleLimitReached: S._void,
690
+ Unknown: S.Struct({ reason: S.str }),
691
+ }));
665
692
  export const HostPushNotificationRequest = S.lazy(() => S.Struct({
666
693
  text: S.str,
667
694
  deeplink: S.Option(S.str),
695
+ scheduledAt: S.Option(S.u64),
668
696
  }));
697
+ export const HostPushNotificationResponse = S.lazy(() => S.Struct({ id: NotificationId }));
669
698
  export const HostRequestLoginError = S.lazy(() => S.TaggedUnion({
670
699
  Unknown: S.Struct({ reason: S.str }),
671
700
  }));
@@ -685,21 +714,7 @@ export const HostSignPayloadError = S.lazy(() => S.TaggedUnion({
685
714
  }));
686
715
  export const HostSignPayloadRequest = S.lazy(() => S.Struct({
687
716
  account: ProductAccountId,
688
- blockHash: S.Hex(),
689
- blockNumber: S.Hex(),
690
- era: S.Hex(),
691
- genesisHash: S.Hex(),
692
- method: S.Hex(),
693
- nonce: S.Hex(),
694
- specVersion: S.Hex(),
695
- tip: S.Hex(),
696
- transactionVersion: S.Hex(),
697
- signedExtensions: S.Vector(S.str),
698
- version: S.u32,
699
- assetId: S.Option(S.Hex()),
700
- metadataHash: S.Option(S.Hex()),
701
- mode: S.Option(S.u32),
702
- withSignedTransaction: S.Option(S.bool),
717
+ payload: HostSignPayloadData,
703
718
  }));
704
719
  export const HostSignPayloadResponse = S.lazy(() => S.Struct({
705
720
  signature: S.Hex(),
@@ -707,7 +722,7 @@ export const HostSignPayloadResponse = S.lazy(() => S.Struct({
707
722
  }));
708
723
  export const HostSignPayloadWithLegacyAccountRequest = S.lazy(() => S.Struct({
709
724
  signer: S.str,
710
- payload: HostSignPayloadRequest,
725
+ payload: HostSignPayloadData,
711
726
  }));
712
727
  export const HostSignRawRequest = S.lazy(() => S.Struct({
713
728
  account: ProductAccountId,
@@ -717,7 +732,10 @@ export const HostSignRawWithLegacyAccountRequest = S.lazy(() => S.Struct({
717
732
  signer: S.str,
718
733
  payload: RawPayload,
719
734
  }));
720
- export const HostThemeSubscribeItem = S.lazy(() => S.Struct({ theme: Theme }));
735
+ export const HostThemeSubscribeItem = S.lazy(() => S.Struct({
736
+ name: ThemeName,
737
+ variant: ThemeVariant,
738
+ }));
721
739
  export const ProductChatCustomMessageRenderSubscribeRequest = S.lazy(() => S.Struct({
722
740
  messageId: S.str,
723
741
  messageType: S.str,
@@ -846,7 +864,7 @@ export const RemoteChainTransactionStopRequest = S.lazy(() => S.Struct({
846
864
  operationId: S.str,
847
865
  }));
848
866
  export const RemotePermissionRequest = S.lazy(() => S.Struct({
849
- permissions: S.Vector(RemotePermission),
867
+ permission: RemotePermission,
850
868
  }));
851
869
  export const RemotePermissionResponse = S.lazy(() => S.Struct({ granted: S.bool }));
852
870
  export const RemotePreimageLookupSubscribeItem = S.lazy(() => S.Struct({
@@ -872,6 +890,4 @@ export const RemoteStatementStoreSubscribeItem = S.lazy(() => S.Struct({
872
890
  isComplete: S.bool,
873
891
  }));
874
892
  export const RemoteStatementStoreSubscribeRequest = S.lazy(() => S.TaggedUnion({ MatchAll: S.Vector(Topic), MatchAny: S.Vector(Topic) }));
875
- export const Version = S.lazy(() => S.indexedTaggedUnion({ V1: [0, S._void] }));
876
- export const VersionedTxPayload = S.lazy(() => S.indexedTaggedUnion({ V1: [0, TxPayloadV1] }));
877
893
  export const VerticalAlignment = S.lazy(() => S.Status("Top", "Center", "Bottom"));
@@ -6,7 +6,7 @@ export declare const SYSTEM_FEATURE_SUPPORTED: {
6
6
  readonly request: 2;
7
7
  readonly response: 3;
8
8
  };
9
- export declare const SYSTEM_PUSH_NOTIFICATION: {
9
+ export declare const NOTIFICATIONS_SEND_PUSH_NOTIFICATION: {
10
10
  readonly request: 4;
11
11
  readonly response: 5;
12
12
  };
@@ -126,16 +126,6 @@ export declare const PREIMAGE_SUBMIT: {
126
126
  readonly request: 68;
127
127
  readonly response: 69;
128
128
  };
129
- export declare const JSON_RPC_SEND_MESSAGE: {
130
- readonly request: 70;
131
- readonly response: 71;
132
- };
133
- export declare const JSON_RPC_SUBSCRIBE_MESSAGES: {
134
- readonly start: 72;
135
- readonly stop: 73;
136
- readonly interrupt: 74;
137
- readonly receive: 75;
138
- };
139
129
  export declare const CHAIN_FOLLOW_HEAD_SUBSCRIBE: {
140
130
  readonly start: 76;
141
131
  readonly stop: 77;
@@ -244,3 +234,7 @@ export declare const STATEMENT_STORE_CREATE_PROOF_AUTHORIZED: {
244
234
  readonly request: 132;
245
235
  readonly response: 133;
246
236
  };
237
+ export declare const NOTIFICATIONS_CANCEL_PUSH_NOTIFICATION: {
238
+ readonly request: 134;
239
+ readonly response: 135;
240
+ };
@@ -9,7 +9,7 @@ export const SYSTEM_FEATURE_SUPPORTED = {
9
9
  request: 2,
10
10
  response: 3,
11
11
  };
12
- export const SYSTEM_PUSH_NOTIFICATION = {
12
+ export const NOTIFICATIONS_SEND_PUSH_NOTIFICATION = {
13
13
  request: 4,
14
14
  response: 5,
15
15
  };
@@ -129,16 +129,6 @@ export const PREIMAGE_SUBMIT = {
129
129
  request: 68,
130
130
  response: 69,
131
131
  };
132
- export const JSON_RPC_SEND_MESSAGE = {
133
- request: 70,
134
- response: 71,
135
- };
136
- export const JSON_RPC_SUBSCRIBE_MESSAGES = {
137
- start: 72,
138
- stop: 73,
139
- interrupt: 74,
140
- receive: 75,
141
- };
142
132
  export const CHAIN_FOLLOW_HEAD_SUBSCRIBE = {
143
133
  start: 76,
144
134
  stop: 77,
@@ -247,3 +237,7 @@ export const STATEMENT_STORE_CREATE_PROOF_AUTHORIZED = {
247
237
  request: 132,
248
238
  response: 133,
249
239
  };
240
+ export const NOTIFICATIONS_CANCEL_PUSH_NOTIFICATION = {
241
+ request: 134,
242
+ response: 135,
243
+ };
package/dist/index.d.ts CHANGED
@@ -1,7 +1,8 @@
1
1
  export type { ObservableLike, Observer, Payload, Provider, ProtocolMessage, RequestFrameIds, RequestParams, SubscriptionFrameIds, Subscription, SubscribeRawParams, TrUApiTransport, } from "./transport.js";
2
2
  export type { CreateTransportOptions } from "./client.js";
3
- export { SubscriptionError, createMessagePortProvider } from "./transport.js";
3
+ export { SubscriptionError, createIframeProvider, createMessagePortProvider, decodeWireMessage, encodeWireMessage, } from "./transport.js";
4
4
  export { createTransport } from "./client.js";
5
5
  export * as scale from "./scale.js";
6
6
  export type { Codec, HexString } from "./scale.js";
7
7
  export * from "./generated/index.js";
8
+ export * from "./well-known-chains.js";
package/dist/index.js CHANGED
@@ -1,4 +1,5 @@
1
- export { SubscriptionError, createMessagePortProvider } from "./transport.js";
1
+ export { SubscriptionError, createIframeProvider, createMessagePortProvider, decodeWireMessage, encodeWireMessage, } from "./transport.js";
2
2
  export { createTransport } from "./client.js";
3
3
  export * as scale from "./scale.js";
4
4
  export * from "./generated/index.js";
5
+ export * from "./well-known-chains.js";