@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.
- package/dist/client.js +5 -2
- package/dist/explorer/codegen/types.d.ts +2 -0
- package/dist/explorer/codegen/types.js +3610 -0
- package/dist/explorer/codegen/versions/0.2.0/services.d.ts +2 -0
- package/dist/explorer/codegen/versions/0.2.0/services.js +644 -0
- package/dist/explorer/codegen/versions/0.2.0/types.d.ts +2 -0
- package/dist/explorer/codegen/versions/0.2.0/types.js +3960 -0
- package/dist/explorer/codegen/versions/0.3.0/services.d.ts +2 -0
- package/dist/explorer/codegen/versions/0.3.0/services.js +644 -0
- package/dist/explorer/codegen/versions/0.3.0/types.d.ts +2 -0
- package/dist/explorer/codegen/versions/0.3.0/types.js +3610 -0
- package/dist/explorer/codegen/versions/0.3.1/services.d.ts +2 -0
- package/dist/explorer/codegen/versions/0.3.1/services.js +644 -0
- package/dist/explorer/codegen/versions/0.3.1/types.d.ts +2 -0
- package/dist/explorer/codegen/versions/0.3.1/types.js +3610 -0
- package/dist/explorer/data-types.d.ts +49 -0
- package/dist/explorer/data-types.js +1 -0
- package/dist/explorer/versions.d.ts +9 -0
- package/dist/explorer/versions.js +21 -0
- package/dist/generated/client.d.ts +86 -65
- package/dist/generated/client.js +166 -194
- package/dist/generated/types.d.ts +442 -232
- package/dist/generated/types.js +110 -94
- package/dist/generated/wire-table.d.ts +5 -11
- package/dist/generated/wire-table.js +5 -11
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/dist/playground/codegen/services.js +327 -84
- package/dist/playground/codegen/truapi-dts.d.ts +1 -0
- package/dist/playground/codegen/truapi-dts.js +4310 -0
- package/dist/playground/services-types.d.ts +11 -2
- package/dist/scale.d.ts +8 -1
- package/dist/scale.js +19 -1
- package/dist/transport.d.ts +33 -6
- package/dist/transport.js +150 -71
- package/dist/well-known-chains.d.ts +13 -0
- package/dist/well-known-chains.js +7 -0
- package/package.json +28 -6
|
@@ -1,18 +1,8 @@
|
|
|
1
1
|
import * as S from "../scale.js";
|
|
2
2
|
import type { HexString } from "../scale.js";
|
|
3
|
-
/**
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
* Used by [`HostGetLegacyAccountsResponse`] for non-product (legacy) accounts
|
|
7
|
-
* that may carry a display name.
|
|
8
|
-
*/
|
|
9
|
-
export interface Account {
|
|
10
|
-
/** The account public key (variable-length bytes). */
|
|
11
|
-
publicKey: HexString;
|
|
12
|
-
/** Optional human-readable display name. */
|
|
13
|
-
name?: string;
|
|
14
|
-
}
|
|
15
|
-
export declare const Account: S.Codec<Account>;
|
|
3
|
+
/** A 32-byte raw account identifier used for legacy (non-product) accounts. */
|
|
4
|
+
export type AccountId = HexString;
|
|
5
|
+
export declare const AccountId: S.Codec<AccountId>;
|
|
16
6
|
/** Payload when a user clicks an action button. */
|
|
17
7
|
export interface ActionTrigger {
|
|
18
8
|
/** Message containing the action. */
|
|
@@ -23,20 +13,41 @@ export interface ActionTrigger {
|
|
|
23
13
|
payload?: HexString;
|
|
24
14
|
}
|
|
25
15
|
export declare const ActionTrigger: S.Codec<ActionTrigger>;
|
|
26
|
-
|
|
16
|
+
/**
|
|
17
|
+
* A resource the host can pre-allocate on behalf of the product (RFC 0010).
|
|
18
|
+
*
|
|
19
|
+
* For the slot-table allowances (`StatementStoreAllowance`,
|
|
20
|
+
* `BulletinAllowance`, `SmartContractAllowance`), pre-allocation is
|
|
21
|
+
* opportunistic and the host may also fulfil the allowance implicitly on the
|
|
22
|
+
* first submission. `AutoSigning` must be requested explicitly through this
|
|
23
|
+
* call.
|
|
24
|
+
*/
|
|
25
|
+
export type AllocatableResource =
|
|
26
|
+
/** Statement Store slot allowance for the product's own allowance account. */
|
|
27
|
+
{
|
|
27
28
|
tag: "StatementStoreAllowance";
|
|
28
29
|
value?: undefined;
|
|
29
|
-
}
|
|
30
|
+
}
|
|
31
|
+
/** Bulletin chain slot allowance for the product's own allowance account. */
|
|
32
|
+
| {
|
|
30
33
|
tag: "BulletinAllowance";
|
|
31
34
|
value?: undefined;
|
|
32
|
-
}
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Pre-warmed PGAS balance for the smart-contract account at the given
|
|
38
|
+
* derivation index.
|
|
39
|
+
*/
|
|
40
|
+
| {
|
|
33
41
|
tag: "SmartContractAllowance";
|
|
34
42
|
value: number;
|
|
35
|
-
}
|
|
43
|
+
}
|
|
44
|
+
/** Permission to sign on the product's behalf without per-call user prompts. */
|
|
45
|
+
| {
|
|
36
46
|
tag: "AutoSigning";
|
|
37
47
|
value?: undefined;
|
|
38
48
|
};
|
|
39
49
|
export declare const AllocatableResource: S.Codec<AllocatableResource>;
|
|
50
|
+
/** Outcome of allocating a single resource (RFC 0010). */
|
|
40
51
|
export type AllocationOutcome = "Allocated" | "Rejected" | "NotAvailable";
|
|
41
52
|
export declare const AllocationOutcome: S.Codec<AllocationOutcome>;
|
|
42
53
|
/** Layout arrangement (like CSS flexbox `justify-content`). */
|
|
@@ -59,7 +70,7 @@ export declare const Balance: S.Codec<Balance>;
|
|
|
59
70
|
/** Border styling. */
|
|
60
71
|
export interface BorderStyle {
|
|
61
72
|
/** Border width. */
|
|
62
|
-
width:
|
|
73
|
+
width: Size;
|
|
63
74
|
/** Border color. */
|
|
64
75
|
color: ColorToken;
|
|
65
76
|
/** Border shape. */
|
|
@@ -78,8 +89,12 @@ export interface ButtonProps {
|
|
|
78
89
|
text: string;
|
|
79
90
|
/** Button style variant. */
|
|
80
91
|
variant?: ButtonVariant;
|
|
92
|
+
/** Whether the button is enabled. Absent leaves the default to the host. */
|
|
93
|
+
enabled: boolean | undefined;
|
|
94
|
+
/** Whether the button shows a loading state. Absent leaves the default to the host. */
|
|
95
|
+
loading: boolean | undefined;
|
|
81
96
|
/** Action identifier triggered on click. */
|
|
82
|
-
clickAction
|
|
97
|
+
clickAction?: string;
|
|
83
98
|
}
|
|
84
99
|
export declare const ButtonProps: S.Codec<ButtonProps>;
|
|
85
100
|
/** Button style variants. */
|
|
@@ -234,7 +249,7 @@ export declare const ChatRoomParticipation: S.Codec<ChatRoomParticipation>;
|
|
|
234
249
|
export type ChatRoomRegistrationStatus = "New" | "Exists";
|
|
235
250
|
export declare const ChatRoomRegistrationStatus: S.Codec<ChatRoomRegistrationStatus>;
|
|
236
251
|
/** Semantic color tokens for theming. */
|
|
237
|
-
export type ColorToken = "
|
|
252
|
+
export type ColorToken = "FgPrimary" | "FgSecondary" | "FgTertiary" | "BgSurfaceMain" | "BgSurfaceContainer" | "BgSurfaceNested" | "FgSuccess" | "FgError" | "FgWarning";
|
|
238
253
|
export declare const ColorToken: S.Codec<ColorToken>;
|
|
239
254
|
/** Properties for a [`CustomRendererNode::Column`] layout. */
|
|
240
255
|
export interface ColumnProps {
|
|
@@ -321,29 +336,26 @@ export declare const CustomRendererNode: S.Codec<CustomRendererNode>;
|
|
|
321
336
|
*/
|
|
322
337
|
export interface Dimensions {
|
|
323
338
|
/** Top dimension. */
|
|
324
|
-
top:
|
|
339
|
+
top: Size;
|
|
325
340
|
/** End dimension. */
|
|
326
|
-
end:
|
|
341
|
+
end: Size;
|
|
327
342
|
/** Bottom dimension. Defaults to top when absent. */
|
|
328
|
-
bottom?:
|
|
343
|
+
bottom?: Size;
|
|
329
344
|
/** Start dimension. Defaults to end when absent. */
|
|
330
|
-
start?:
|
|
345
|
+
start?: Size;
|
|
331
346
|
}
|
|
332
347
|
export declare const Dimensions: S.Codec<Dimensions>;
|
|
333
|
-
/** Generic error payload carrying a human-readable reason string. */
|
|
334
|
-
export interface GenericErr {
|
|
335
|
-
reason: string;
|
|
336
|
-
}
|
|
337
|
-
export declare const GenericErr: S.Codec<GenericErr>;
|
|
338
348
|
/**
|
|
339
|
-
*
|
|
340
|
-
* catch-all error type.
|
|
349
|
+
* Generic error payload carrying a human-readable reason string. Used by many
|
|
350
|
+
* methods as a catch-all error type.
|
|
341
351
|
*/
|
|
342
|
-
export
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
};
|
|
352
|
+
export interface GenericError {
|
|
353
|
+
reason: string;
|
|
354
|
+
}
|
|
346
355
|
export declare const GenericError: S.Codec<GenericError>;
|
|
356
|
+
/** A 32-byte chain genesis hash used to identify the target chain. */
|
|
357
|
+
export type GenesisHash = HexString;
|
|
358
|
+
export declare const GenesisHash: S.Codec<GenesisHash>;
|
|
347
359
|
/** Horizontal alignment options. */
|
|
348
360
|
export type HorizontalAlignment = "Start" | "Center" | "End";
|
|
349
361
|
export declare const HorizontalAlignment: S.Codec<HorizontalAlignment>;
|
|
@@ -482,7 +494,7 @@ export declare const VersionedHostCreateTransactionError: S.Codec<VersionedHostC
|
|
|
482
494
|
/** Versioned envelope for [`HostCreateTransactionRequest`]. */
|
|
483
495
|
export type VersionedHostCreateTransactionRequest = {
|
|
484
496
|
tag: "V1";
|
|
485
|
-
value:
|
|
497
|
+
value: ProductAccountTxPayload;
|
|
486
498
|
};
|
|
487
499
|
export declare const VersionedHostCreateTransactionRequest: S.Codec<VersionedHostCreateTransactionRequest>;
|
|
488
500
|
/** Versioned envelope for [`HostCreateTransactionResponse`]. */
|
|
@@ -500,7 +512,7 @@ export declare const VersionedHostCreateTransactionWithLegacyAccountError: S.Cod
|
|
|
500
512
|
/** Versioned envelope for [`HostCreateTransactionWithLegacyAccountRequest`]. */
|
|
501
513
|
export type VersionedHostCreateTransactionWithLegacyAccountRequest = {
|
|
502
514
|
tag: "V1";
|
|
503
|
-
value:
|
|
515
|
+
value: LegacyAccountTxPayload;
|
|
504
516
|
};
|
|
505
517
|
export declare const VersionedHostCreateTransactionWithLegacyAccountRequest: S.Codec<VersionedHostCreateTransactionWithLegacyAccountRequest>;
|
|
506
518
|
/** Versioned envelope for [`HostCreateTransactionWithLegacyAccountResponse`]. */
|
|
@@ -617,36 +629,6 @@ export type VersionedHostHandshakeResponse = {
|
|
|
617
629
|
value?: undefined;
|
|
618
630
|
};
|
|
619
631
|
export declare const VersionedHostHandshakeResponse: S.Codec<VersionedHostHandshakeResponse>;
|
|
620
|
-
/** Versioned envelope for [`HostJsonrpcMessageSendError`]. */
|
|
621
|
-
export type VersionedHostJsonrpcMessageSendError = {
|
|
622
|
-
tag: "V1";
|
|
623
|
-
value: GenericError;
|
|
624
|
-
};
|
|
625
|
-
export declare const VersionedHostJsonrpcMessageSendError: S.Codec<VersionedHostJsonrpcMessageSendError>;
|
|
626
|
-
/** Versioned envelope for [`HostJsonrpcMessageSendRequest`]. */
|
|
627
|
-
export type VersionedHostJsonrpcMessageSendRequest = {
|
|
628
|
-
tag: "V1";
|
|
629
|
-
value: HostJsonrpcMessageSendRequest;
|
|
630
|
-
};
|
|
631
|
-
export declare const VersionedHostJsonrpcMessageSendRequest: S.Codec<VersionedHostJsonrpcMessageSendRequest>;
|
|
632
|
-
/** Versioned envelope for [`HostJsonrpcMessageSendResponse`]. */
|
|
633
|
-
export type VersionedHostJsonrpcMessageSendResponse = {
|
|
634
|
-
tag: "V1";
|
|
635
|
-
value?: undefined;
|
|
636
|
-
};
|
|
637
|
-
export declare const VersionedHostJsonrpcMessageSendResponse: S.Codec<VersionedHostJsonrpcMessageSendResponse>;
|
|
638
|
-
/** Versioned envelope for [`HostJsonrpcMessageSubscribeItem`]. */
|
|
639
|
-
export type VersionedHostJsonrpcMessageSubscribeItem = {
|
|
640
|
-
tag: "V1";
|
|
641
|
-
value: HostJsonrpcMessageSubscribeItem;
|
|
642
|
-
};
|
|
643
|
-
export declare const VersionedHostJsonrpcMessageSubscribeItem: S.Codec<VersionedHostJsonrpcMessageSubscribeItem>;
|
|
644
|
-
/** Versioned envelope for [`HostJsonrpcMessageSubscribeRequest`]. */
|
|
645
|
-
export type VersionedHostJsonrpcMessageSubscribeRequest = {
|
|
646
|
-
tag: "V1";
|
|
647
|
-
value: HostJsonrpcMessageSubscribeRequest;
|
|
648
|
-
};
|
|
649
|
-
export declare const VersionedHostJsonrpcMessageSubscribeRequest: S.Codec<VersionedHostJsonrpcMessageSubscribeRequest>;
|
|
650
632
|
/** Versioned envelope for [`HostLocalStorageClearError`]. */
|
|
651
633
|
export type VersionedHostLocalStorageClearError = {
|
|
652
634
|
tag: "V1";
|
|
@@ -734,27 +716,27 @@ export declare const VersionedHostPaymentBalanceSubscribeItem: S.Codec<Versioned
|
|
|
734
716
|
/** Versioned envelope for [`HostPaymentBalanceSubscribeRequest`]. */
|
|
735
717
|
export type VersionedHostPaymentBalanceSubscribeRequest = {
|
|
736
718
|
tag: "V1";
|
|
737
|
-
value
|
|
719
|
+
value: HostPaymentBalanceSubscribeRequest;
|
|
738
720
|
};
|
|
739
721
|
export declare const VersionedHostPaymentBalanceSubscribeRequest: S.Codec<VersionedHostPaymentBalanceSubscribeRequest>;
|
|
740
|
-
/** Versioned envelope for [`
|
|
741
|
-
export type
|
|
722
|
+
/** Versioned envelope for [`HostPaymentError`]. */
|
|
723
|
+
export type VersionedHostPaymentError = {
|
|
742
724
|
tag: "V1";
|
|
743
|
-
value:
|
|
725
|
+
value: HostPaymentError;
|
|
744
726
|
};
|
|
745
|
-
export declare const
|
|
746
|
-
/** Versioned envelope for [`
|
|
747
|
-
export type
|
|
727
|
+
export declare const VersionedHostPaymentError: S.Codec<VersionedHostPaymentError>;
|
|
728
|
+
/** Versioned envelope for [`HostPaymentRequest`]. */
|
|
729
|
+
export type VersionedHostPaymentRequest = {
|
|
748
730
|
tag: "V1";
|
|
749
|
-
value:
|
|
731
|
+
value: HostPaymentRequest;
|
|
750
732
|
};
|
|
751
|
-
export declare const
|
|
752
|
-
/** Versioned envelope for [`
|
|
753
|
-
export type
|
|
733
|
+
export declare const VersionedHostPaymentRequest: S.Codec<VersionedHostPaymentRequest>;
|
|
734
|
+
/** Versioned envelope for [`HostPaymentResponse`]. */
|
|
735
|
+
export type VersionedHostPaymentResponse = {
|
|
754
736
|
tag: "V1";
|
|
755
|
-
value:
|
|
737
|
+
value: HostPaymentResponse;
|
|
756
738
|
};
|
|
757
|
-
export declare const
|
|
739
|
+
export declare const VersionedHostPaymentResponse: S.Codec<VersionedHostPaymentResponse>;
|
|
758
740
|
/** Versioned envelope for [`HostPaymentStatusSubscribeError`]. */
|
|
759
741
|
export type VersionedHostPaymentStatusSubscribeError = {
|
|
760
742
|
tag: "V1";
|
|
@@ -791,10 +773,28 @@ export type VersionedHostPaymentTopUpResponse = {
|
|
|
791
773
|
value?: undefined;
|
|
792
774
|
};
|
|
793
775
|
export declare const VersionedHostPaymentTopUpResponse: S.Codec<VersionedHostPaymentTopUpResponse>;
|
|
776
|
+
/** Versioned envelope for [`HostPushNotificationCancelError`]. */
|
|
777
|
+
export type VersionedHostPushNotificationCancelError = {
|
|
778
|
+
tag: "V1";
|
|
779
|
+
value: GenericError;
|
|
780
|
+
};
|
|
781
|
+
export declare const VersionedHostPushNotificationCancelError: S.Codec<VersionedHostPushNotificationCancelError>;
|
|
782
|
+
/** Versioned envelope for [`HostPushNotificationCancelRequest`]. */
|
|
783
|
+
export type VersionedHostPushNotificationCancelRequest = {
|
|
784
|
+
tag: "V1";
|
|
785
|
+
value: HostPushNotificationCancelRequest;
|
|
786
|
+
};
|
|
787
|
+
export declare const VersionedHostPushNotificationCancelRequest: S.Codec<VersionedHostPushNotificationCancelRequest>;
|
|
788
|
+
/** Versioned envelope for [`HostPushNotificationCancelResponse`]. */
|
|
789
|
+
export type VersionedHostPushNotificationCancelResponse = {
|
|
790
|
+
tag: "V1";
|
|
791
|
+
value?: undefined;
|
|
792
|
+
};
|
|
793
|
+
export declare const VersionedHostPushNotificationCancelResponse: S.Codec<VersionedHostPushNotificationCancelResponse>;
|
|
794
794
|
/** Versioned envelope for [`HostPushNotificationError`]. */
|
|
795
795
|
export type VersionedHostPushNotificationError = {
|
|
796
796
|
tag: "V1";
|
|
797
|
-
value:
|
|
797
|
+
value: HostPushNotificationError;
|
|
798
798
|
};
|
|
799
799
|
export declare const VersionedHostPushNotificationError: S.Codec<VersionedHostPushNotificationError>;
|
|
800
800
|
/** Versioned envelope for [`HostPushNotificationRequest`]. */
|
|
@@ -806,7 +806,7 @@ export declare const VersionedHostPushNotificationRequest: S.Codec<VersionedHost
|
|
|
806
806
|
/** Versioned envelope for [`HostPushNotificationResponse`]. */
|
|
807
807
|
export type VersionedHostPushNotificationResponse = {
|
|
808
808
|
tag: "V1";
|
|
809
|
-
value
|
|
809
|
+
value: HostPushNotificationResponse;
|
|
810
810
|
};
|
|
811
811
|
export declare const VersionedHostPushNotificationResponse: S.Codec<VersionedHostPushNotificationResponse>;
|
|
812
812
|
/** Versioned envelope for [`HostRequestLoginError`]. */
|
|
@@ -845,6 +845,43 @@ export type VersionedHostRequestResourceAllocationResponse = {
|
|
|
845
845
|
value: HostRequestResourceAllocationResponse;
|
|
846
846
|
};
|
|
847
847
|
export declare const VersionedHostRequestResourceAllocationResponse: S.Codec<VersionedHostRequestResourceAllocationResponse>;
|
|
848
|
+
/**
|
|
849
|
+
* Full Substrate extrinsic signing payload with all fields needed for signature
|
|
850
|
+
* generation.
|
|
851
|
+
*/
|
|
852
|
+
export interface HostSignPayloadData {
|
|
853
|
+
/** Reference block hash. */
|
|
854
|
+
blockHash: HexString;
|
|
855
|
+
/** Reference block number. */
|
|
856
|
+
blockNumber: HexString;
|
|
857
|
+
/** Mortality era encoding. */
|
|
858
|
+
era: HexString;
|
|
859
|
+
/** Chain genesis hash. */
|
|
860
|
+
genesisHash: HexString;
|
|
861
|
+
/** SCALE-encoded call data. */
|
|
862
|
+
method: HexString;
|
|
863
|
+
/** Account nonce. */
|
|
864
|
+
nonce: HexString;
|
|
865
|
+
/** Runtime spec version. */
|
|
866
|
+
specVersion: HexString;
|
|
867
|
+
/** Transaction tip. */
|
|
868
|
+
tip: HexString;
|
|
869
|
+
/** Transaction format version. */
|
|
870
|
+
transactionVersion: HexString;
|
|
871
|
+
/** Extension identifiers. */
|
|
872
|
+
signedExtensions: Array<string>;
|
|
873
|
+
/** Extrinsic version. */
|
|
874
|
+
version: number;
|
|
875
|
+
/** For multi-asset tips. */
|
|
876
|
+
assetId?: HexString;
|
|
877
|
+
/** CheckMetadataHash extension. */
|
|
878
|
+
metadataHash?: HexString;
|
|
879
|
+
/** Metadata mode. */
|
|
880
|
+
mode?: number;
|
|
881
|
+
/** Request signed transaction back. */
|
|
882
|
+
withSignedTransaction?: boolean;
|
|
883
|
+
}
|
|
884
|
+
export declare const HostSignPayloadData: S.Codec<HostSignPayloadData>;
|
|
848
885
|
/** Versioned envelope for [`HostSignPayloadError`]. */
|
|
849
886
|
export type VersionedHostSignPayloadError = {
|
|
850
887
|
tag: "V1";
|
|
@@ -923,6 +960,39 @@ export type VersionedHostThemeSubscribeItem = {
|
|
|
923
960
|
value: HostThemeSubscribeItem;
|
|
924
961
|
};
|
|
925
962
|
export declare const VersionedHostThemeSubscribeItem: S.Codec<VersionedHostThemeSubscribeItem>;
|
|
963
|
+
/**
|
|
964
|
+
* A user-imported (legacy) account: public key plus an optional user-chosen
|
|
965
|
+
* display name.
|
|
966
|
+
*
|
|
967
|
+
* Returned by [`HostGetLegacyAccountsResponse`]. Distinct from
|
|
968
|
+
* [`ProductAccount`], which is protocol-derived and never carries a label.
|
|
969
|
+
*/
|
|
970
|
+
export interface LegacyAccount {
|
|
971
|
+
/** The account public key (variable-length bytes). */
|
|
972
|
+
publicKey: HexString;
|
|
973
|
+
/** Optional user-chosen display name. */
|
|
974
|
+
name?: string;
|
|
975
|
+
}
|
|
976
|
+
export declare const LegacyAccount: S.Codec<LegacyAccount>;
|
|
977
|
+
/**
|
|
978
|
+
* Transaction payload for a legacy (non-product) account.
|
|
979
|
+
*
|
|
980
|
+
* Identical to [`ProductAccountTxPayload`] except the signer is a raw
|
|
981
|
+
* 32-byte [`AccountId`].
|
|
982
|
+
*/
|
|
983
|
+
export interface LegacyAccountTxPayload {
|
|
984
|
+
/** Raw 32-byte public key of the legacy account. */
|
|
985
|
+
signer: AccountId;
|
|
986
|
+
/** Chain where the transaction will execute. */
|
|
987
|
+
genesisHash: GenesisHash;
|
|
988
|
+
/** SCALE-encoded Call data. */
|
|
989
|
+
callData: HexString;
|
|
990
|
+
/** Transaction extensions supplied by the caller. */
|
|
991
|
+
extensions: Array<TxPayloadExtension>;
|
|
992
|
+
/** 0 for Extrinsic V4, runtime-supported value for V5. */
|
|
993
|
+
txExtVersion: number;
|
|
994
|
+
}
|
|
995
|
+
export declare const LegacyAccountTxPayload: S.Codec<LegacyAccountTxPayload>;
|
|
926
996
|
/** Layout and styling modifiers applied to custom renderer components. */
|
|
927
997
|
export type Modifier =
|
|
928
998
|
/** Outer spacing. */
|
|
@@ -949,28 +1019,28 @@ export type Modifier =
|
|
|
949
1019
|
| {
|
|
950
1020
|
tag: "Height";
|
|
951
1021
|
value: {
|
|
952
|
-
height:
|
|
1022
|
+
height: Size;
|
|
953
1023
|
};
|
|
954
1024
|
}
|
|
955
1025
|
/** Fixed width. */
|
|
956
1026
|
| {
|
|
957
1027
|
tag: "Width";
|
|
958
1028
|
value: {
|
|
959
|
-
width:
|
|
1029
|
+
width: Size;
|
|
960
1030
|
};
|
|
961
1031
|
}
|
|
962
1032
|
/** Minimum width. */
|
|
963
1033
|
| {
|
|
964
1034
|
tag: "MinWidth";
|
|
965
1035
|
value: {
|
|
966
|
-
width:
|
|
1036
|
+
width: Size;
|
|
967
1037
|
};
|
|
968
1038
|
}
|
|
969
1039
|
/** Minimum height. */
|
|
970
1040
|
| {
|
|
971
1041
|
tag: "MinHeight";
|
|
972
1042
|
value: {
|
|
973
|
-
height:
|
|
1043
|
+
height: Size;
|
|
974
1044
|
};
|
|
975
1045
|
}
|
|
976
1046
|
/** Fill available width. */
|
|
@@ -988,6 +1058,9 @@ export type Modifier =
|
|
|
988
1058
|
};
|
|
989
1059
|
};
|
|
990
1060
|
export declare const Modifier: S.Codec<Modifier>;
|
|
1061
|
+
/** Opaque identifier for a push notification, unique per product. */
|
|
1062
|
+
export type NotificationId = number;
|
|
1063
|
+
export declare const NotificationId: S.Codec<NotificationId>;
|
|
991
1064
|
export type OperationStartedResult = {
|
|
992
1065
|
tag: "Started";
|
|
993
1066
|
value: {
|
|
@@ -998,6 +1071,9 @@ export type OperationStartedResult = {
|
|
|
998
1071
|
value?: undefined;
|
|
999
1072
|
};
|
|
1000
1073
|
export declare const OperationStartedResult: S.Codec<OperationStartedResult>;
|
|
1074
|
+
/** Identifier selecting a product payment purse. */
|
|
1075
|
+
export type PaymentPurseId = number;
|
|
1076
|
+
export declare const PaymentPurseId: S.Codec<PaymentPurseId>;
|
|
1001
1077
|
/**
|
|
1002
1078
|
* Source for a payment top-up operation.
|
|
1003
1079
|
*
|
|
@@ -1020,7 +1096,17 @@ export type PaymentTopUpSource =
|
|
|
1020
1096
|
| {
|
|
1021
1097
|
tag: "PrivateKey";
|
|
1022
1098
|
value: {
|
|
1023
|
-
|
|
1099
|
+
sr25519SecretKey: HexString;
|
|
1100
|
+
};
|
|
1101
|
+
}
|
|
1102
|
+
/**
|
|
1103
|
+
* Fund directly from coin secret keys. Each key is an sr25519 secret
|
|
1104
|
+
* controlling a single coin.
|
|
1105
|
+
*/
|
|
1106
|
+
| {
|
|
1107
|
+
tag: "Coins";
|
|
1108
|
+
value: {
|
|
1109
|
+
sr25519SecretKeys: Array<HexString>;
|
|
1024
1110
|
};
|
|
1025
1111
|
};
|
|
1026
1112
|
export declare const PaymentTopUpSource: S.Codec<PaymentTopUpSource>;
|
|
@@ -1051,6 +1137,26 @@ export interface ProductAccountId {
|
|
|
1051
1137
|
derivationIndex: number;
|
|
1052
1138
|
}
|
|
1053
1139
|
export declare const ProductAccountId: S.Codec<ProductAccountId>;
|
|
1140
|
+
/**
|
|
1141
|
+
* Transaction payload for a product account.
|
|
1142
|
+
*
|
|
1143
|
+
* Contains everything the host needs to construct a signed extrinsic.
|
|
1144
|
+
* The signer is a [`ProductAccountId`]; the host resolves the
|
|
1145
|
+
* corresponding key pair through its account management layer.
|
|
1146
|
+
*/
|
|
1147
|
+
export interface ProductAccountTxPayload {
|
|
1148
|
+
/** Product account that will sign the transaction. */
|
|
1149
|
+
signer: ProductAccountId;
|
|
1150
|
+
/** Chain where the transaction will execute. */
|
|
1151
|
+
genesisHash: GenesisHash;
|
|
1152
|
+
/** SCALE-encoded Call data. */
|
|
1153
|
+
callData: HexString;
|
|
1154
|
+
/** Transaction extensions supplied by the caller. */
|
|
1155
|
+
extensions: Array<TxPayloadExtension>;
|
|
1156
|
+
/** 0 for Extrinsic V4, runtime-supported value for V5. */
|
|
1157
|
+
txExtVersion: number;
|
|
1158
|
+
}
|
|
1159
|
+
export declare const ProductAccountTxPayload: S.Codec<ProductAccountTxPayload>;
|
|
1054
1160
|
/** Versioned envelope for [`ProductChatCustomMessageRenderSubscribeItem`]. */
|
|
1055
1161
|
export type VersionedProductChatCustomMessageRenderSubscribeItem = {
|
|
1056
1162
|
tag: "V1";
|
|
@@ -1063,12 +1169,17 @@ export type VersionedProductChatCustomMessageRenderSubscribeRequest = {
|
|
|
1063
1169
|
value: ProductChatCustomMessageRenderSubscribeRequest;
|
|
1064
1170
|
};
|
|
1065
1171
|
export declare const VersionedProductChatCustomMessageRenderSubscribeRequest: S.Codec<VersionedProductChatCustomMessageRenderSubscribeRequest>;
|
|
1066
|
-
|
|
1172
|
+
/** Raw data to sign -- either binary bytes or a string message. */
|
|
1173
|
+
export type RawPayload =
|
|
1174
|
+
/** Raw binary data to sign. */
|
|
1175
|
+
{
|
|
1067
1176
|
tag: "Bytes";
|
|
1068
1177
|
value: {
|
|
1069
1178
|
bytes: HexString;
|
|
1070
1179
|
};
|
|
1071
|
-
}
|
|
1180
|
+
}
|
|
1181
|
+
/** String message to sign. */
|
|
1182
|
+
| {
|
|
1072
1183
|
tag: "Payload";
|
|
1073
1184
|
value: {
|
|
1074
1185
|
payload: string;
|
|
@@ -1303,21 +1414,37 @@ export type VersionedRemoteChainTransactionStopResponse = {
|
|
|
1303
1414
|
value?: undefined;
|
|
1304
1415
|
};
|
|
1305
1416
|
export declare const VersionedRemoteChainTransactionStopResponse: S.Codec<VersionedRemoteChainTransactionStopResponse>;
|
|
1306
|
-
|
|
1417
|
+
/**
|
|
1418
|
+
* One remote-operation permission requested by the product (RFC 0002).
|
|
1419
|
+
*
|
|
1420
|
+
* `ChainSubmit`, `PreimageSubmit`, and `StatementSubmit` are also triggered
|
|
1421
|
+
* implicitly by the corresponding business calls when not yet granted.
|
|
1422
|
+
*/
|
|
1423
|
+
export type RemotePermission =
|
|
1424
|
+
/** Outbound HTTP/WebSocket access to a set of domains. */
|
|
1425
|
+
{
|
|
1307
1426
|
tag: "Remote";
|
|
1308
1427
|
value: {
|
|
1309
1428
|
domains: Array<string>;
|
|
1310
1429
|
};
|
|
1311
|
-
}
|
|
1430
|
+
}
|
|
1431
|
+
/** WebRTC media access. */
|
|
1432
|
+
| {
|
|
1312
1433
|
tag: "WebRtc";
|
|
1313
1434
|
value?: undefined;
|
|
1314
|
-
}
|
|
1435
|
+
}
|
|
1436
|
+
/** Submitting transactions on behalf of the user via `remote_chain_transaction_broadcast`. */
|
|
1437
|
+
| {
|
|
1315
1438
|
tag: "ChainSubmit";
|
|
1316
1439
|
value?: undefined;
|
|
1317
|
-
}
|
|
1440
|
+
}
|
|
1441
|
+
/** Submitting preimages on behalf of the user via `remote_preimage_submit`. */
|
|
1442
|
+
| {
|
|
1318
1443
|
tag: "PreimageSubmit";
|
|
1319
1444
|
value?: undefined;
|
|
1320
|
-
}
|
|
1445
|
+
}
|
|
1446
|
+
/** Submitting statements on behalf of the user via `remote_statement_store_submit`. */
|
|
1447
|
+
| {
|
|
1321
1448
|
tag: "StatementSubmit";
|
|
1322
1449
|
value?: undefined;
|
|
1323
1450
|
};
|
|
@@ -1430,7 +1557,10 @@ export type VersionedRemoteStatementStoreSubscribeRequest = {
|
|
|
1430
1557
|
value: RemoteStatementStoreSubscribeRequest;
|
|
1431
1558
|
};
|
|
1432
1559
|
export declare const VersionedRemoteStatementStoreSubscribeRequest: S.Codec<VersionedRemoteStatementStoreSubscribeRequest>;
|
|
1433
|
-
|
|
1560
|
+
/** Error from [`crate::api::ResourceAllocation::request`]. */
|
|
1561
|
+
export type ResourceAllocationError =
|
|
1562
|
+
/** Catch-all. */
|
|
1563
|
+
{
|
|
1434
1564
|
tag: "Unknown";
|
|
1435
1565
|
value: {
|
|
1436
1566
|
reason: string;
|
|
@@ -1499,7 +1629,7 @@ export type Shape =
|
|
|
1499
1629
|
{
|
|
1500
1630
|
tag: "Rounded";
|
|
1501
1631
|
value: {
|
|
1502
|
-
radius:
|
|
1632
|
+
radius: Size;
|
|
1503
1633
|
};
|
|
1504
1634
|
}
|
|
1505
1635
|
/** Circular shape. */
|
|
@@ -1524,6 +1654,14 @@ export interface SignedStatement {
|
|
|
1524
1654
|
data?: HexString;
|
|
1525
1655
|
}
|
|
1526
1656
|
export declare const SignedStatement: S.Codec<SignedStatement>;
|
|
1657
|
+
/**
|
|
1658
|
+
* A size/dimension value (logical pixels) used across the custom renderer.
|
|
1659
|
+
*
|
|
1660
|
+
* Encoded as a SCALE `Compact<u64>`: the common small values cost a single
|
|
1661
|
+
* byte on the wire instead of eight.
|
|
1662
|
+
*/
|
|
1663
|
+
export type Size = number | bigint;
|
|
1664
|
+
export declare const Size: S.Codec<Size>;
|
|
1527
1665
|
/** A statement with optional proof and metadata. */
|
|
1528
1666
|
export interface Statement {
|
|
1529
1667
|
/** Optional cryptographic proof. */
|
|
@@ -1598,12 +1736,16 @@ export interface StorageResultItem {
|
|
|
1598
1736
|
export declare const StorageResultItem: S.Codec<StorageResultItem>;
|
|
1599
1737
|
/** Properties for a [`CustomRendererNode::TextField`]. */
|
|
1600
1738
|
export interface TextFieldProps {
|
|
1739
|
+
/** Current text value. */
|
|
1740
|
+
text: string;
|
|
1601
1741
|
/** Placeholder text. */
|
|
1602
1742
|
placeholder?: string;
|
|
1603
|
-
/**
|
|
1604
|
-
|
|
1605
|
-
/**
|
|
1606
|
-
|
|
1743
|
+
/** Field label. */
|
|
1744
|
+
label?: string;
|
|
1745
|
+
/** Whether the field is enabled. Absent leaves the default to the host. */
|
|
1746
|
+
enabled: boolean | undefined;
|
|
1747
|
+
/** Action identifier triggered when the value changes. */
|
|
1748
|
+
valueChangeAction?: string;
|
|
1607
1749
|
}
|
|
1608
1750
|
export declare const TextFieldProps: S.Codec<TextFieldProps>;
|
|
1609
1751
|
/** Properties for a [`CustomRendererNode::Text`] display. */
|
|
@@ -1614,23 +1756,27 @@ export interface TextProps {
|
|
|
1614
1756
|
color?: ColorToken;
|
|
1615
1757
|
}
|
|
1616
1758
|
export declare const TextProps: S.Codec<TextProps>;
|
|
1617
|
-
|
|
1618
|
-
export
|
|
1759
|
+
/** Identifies a named theme. */
|
|
1760
|
+
export type ThemeName =
|
|
1761
|
+
/** A custom named theme. */
|
|
1762
|
+
{
|
|
1763
|
+
tag: "Custom";
|
|
1764
|
+
value: string;
|
|
1765
|
+
}
|
|
1766
|
+
/** The host's default theme. */
|
|
1767
|
+
| {
|
|
1768
|
+
tag: "Default";
|
|
1769
|
+
value?: undefined;
|
|
1770
|
+
};
|
|
1771
|
+
export declare const ThemeName: S.Codec<ThemeName>;
|
|
1772
|
+
/** Light or dark variant. */
|
|
1773
|
+
export type ThemeVariant = "Light" | "Dark";
|
|
1774
|
+
export declare const ThemeVariant: S.Codec<ThemeVariant>;
|
|
1619
1775
|
/** 32-byte statement topic. */
|
|
1620
1776
|
export type Topic = HexString;
|
|
1621
1777
|
export declare const Topic: S.Codec<Topic>;
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
metadata: HexString;
|
|
1625
|
-
/** Native token symbol. */
|
|
1626
|
-
tokenSymbol: string;
|
|
1627
|
-
/** Native token decimals. */
|
|
1628
|
-
tokenDecimals: number;
|
|
1629
|
-
/** Highest known block number. */
|
|
1630
|
-
bestBlockHeight: number;
|
|
1631
|
-
}
|
|
1632
|
-
export declare const TxPayloadContextV1: S.Codec<TxPayloadContextV1>;
|
|
1633
|
-
export interface TxPayloadExtensionV1 {
|
|
1778
|
+
/** A signed extension for a transaction payload. */
|
|
1779
|
+
export interface TxPayloadExtension {
|
|
1634
1780
|
/** Extension name (e.g., `"CheckSpecVersion"`). */
|
|
1635
1781
|
id: string;
|
|
1636
1782
|
/** SCALE-encoded extra data (in extrinsic body). */
|
|
@@ -1638,22 +1784,9 @@ export interface TxPayloadExtensionV1 {
|
|
|
1638
1784
|
/** SCALE-encoded implicit data (signed, not in body). */
|
|
1639
1785
|
additionalSigned: HexString;
|
|
1640
1786
|
}
|
|
1641
|
-
export declare const
|
|
1642
|
-
export interface TxPayloadV1 {
|
|
1643
|
-
/** Signer hint (address/name), `None` = host picks. */
|
|
1644
|
-
signer?: string;
|
|
1645
|
-
/** SCALE-encoded Call data. */
|
|
1646
|
-
callData: HexString;
|
|
1647
|
-
/** Signed extensions. */
|
|
1648
|
-
extensions: Array<TxPayloadExtensionV1>;
|
|
1649
|
-
/** 0 for Extrinsic V4, any for V5. */
|
|
1650
|
-
txExtVersion: number;
|
|
1651
|
-
/** Transaction context. */
|
|
1652
|
-
context: TxPayloadContextV1;
|
|
1653
|
-
}
|
|
1654
|
-
export declare const TxPayloadV1: S.Codec<TxPayloadV1>;
|
|
1787
|
+
export declare const TxPayloadExtension: S.Codec<TxPayloadExtension>;
|
|
1655
1788
|
/** Text typography presets. */
|
|
1656
|
-
export type TypographyStyle = "
|
|
1789
|
+
export type TypographyStyle = "HeadlineLarge" | "TitleMediumRegular" | "BodyLargeRegular" | "BodyMediumRegular" | "BodySmallRegular";
|
|
1657
1790
|
export declare const TypographyStyle: S.Codec<TypographyStyle>;
|
|
1658
1791
|
/** User's authentication state. */
|
|
1659
1792
|
export type HostAccountConnectionStatusSubscribeItem = "Disconnected" | "Connected";
|
|
@@ -1852,84 +1985,113 @@ export interface HostChatRegisterBotResponse {
|
|
|
1852
1985
|
status: ChatBotRegistrationStatus;
|
|
1853
1986
|
}
|
|
1854
1987
|
export declare const HostChatRegisterBotResponse: S.Codec<HostChatRegisterBotResponse>;
|
|
1855
|
-
|
|
1988
|
+
/** Transaction creation error. */
|
|
1989
|
+
export type HostCreateTransactionError =
|
|
1990
|
+
/** Payload could not be deserialized. */
|
|
1991
|
+
{
|
|
1856
1992
|
tag: "FailedToDecode";
|
|
1857
1993
|
value?: undefined;
|
|
1858
|
-
}
|
|
1994
|
+
}
|
|
1995
|
+
/** User rejected. */
|
|
1996
|
+
| {
|
|
1859
1997
|
tag: "Rejected";
|
|
1860
1998
|
value?: undefined;
|
|
1861
|
-
}
|
|
1999
|
+
}
|
|
2000
|
+
/** Unsupported payload version or extension. */
|
|
2001
|
+
| {
|
|
1862
2002
|
tag: "NotSupported";
|
|
1863
2003
|
value: {
|
|
1864
2004
|
reason: string;
|
|
1865
2005
|
};
|
|
1866
|
-
}
|
|
2006
|
+
}
|
|
2007
|
+
/** Not authenticated. */
|
|
2008
|
+
| {
|
|
1867
2009
|
tag: "PermissionDenied";
|
|
1868
2010
|
value?: undefined;
|
|
1869
|
-
}
|
|
2011
|
+
}
|
|
2012
|
+
/** Catch-all. */
|
|
2013
|
+
| {
|
|
1870
2014
|
tag: "Unknown";
|
|
1871
2015
|
value: {
|
|
1872
2016
|
reason: string;
|
|
1873
2017
|
};
|
|
1874
2018
|
};
|
|
1875
2019
|
export declare const HostCreateTransactionError: S.Codec<HostCreateTransactionError>;
|
|
1876
|
-
|
|
1877
|
-
/** Product account that will sign the transaction. */
|
|
1878
|
-
productAccountId: ProductAccountId;
|
|
1879
|
-
/** Versioned transaction payload. */
|
|
1880
|
-
payload: VersionedTxPayload;
|
|
1881
|
-
}
|
|
1882
|
-
export declare const HostCreateTransactionRequest: S.Codec<HostCreateTransactionRequest>;
|
|
2020
|
+
/** Response containing a created transaction. */
|
|
1883
2021
|
export interface HostCreateTransactionResponse {
|
|
1884
2022
|
/** SCALE-encoded signed transaction. */
|
|
1885
2023
|
transaction: HexString;
|
|
1886
2024
|
}
|
|
1887
2025
|
export declare const HostCreateTransactionResponse: S.Codec<HostCreateTransactionResponse>;
|
|
1888
|
-
|
|
1889
|
-
/** Versioned transaction payload to sign. */
|
|
1890
|
-
payload: VersionedTxPayload;
|
|
1891
|
-
}
|
|
1892
|
-
export declare const HostCreateTransactionWithLegacyAccountRequest: S.Codec<HostCreateTransactionWithLegacyAccountRequest>;
|
|
2026
|
+
/** Response containing a transaction created with a non-product account. */
|
|
1893
2027
|
export interface HostCreateTransactionWithLegacyAccountResponse {
|
|
1894
2028
|
/** SCALE-encoded signed transaction. */
|
|
1895
2029
|
transaction: HexString;
|
|
1896
2030
|
}
|
|
1897
2031
|
export declare const HostCreateTransactionWithLegacyAccountResponse: S.Codec<HostCreateTransactionWithLegacyAccountResponse>;
|
|
1898
|
-
|
|
2032
|
+
/** Error from [`crate::api::Entropy::derive`] (RFC 0007). */
|
|
2033
|
+
export type HostDeriveEntropyError =
|
|
2034
|
+
/** Catch-all. */
|
|
2035
|
+
{
|
|
2036
|
+
tag: "Unknown";
|
|
2037
|
+
value: {
|
|
2038
|
+
reason: string;
|
|
2039
|
+
};
|
|
2040
|
+
};
|
|
1899
2041
|
export declare const HostDeriveEntropyError: S.Codec<HostDeriveEntropyError>;
|
|
2042
|
+
/**
|
|
2043
|
+
* Request to derive deterministic per-product entropy (RFC 0007).
|
|
2044
|
+
*
|
|
2045
|
+
* The host derives 32 bytes from product-scoped seed material and `context`.
|
|
2046
|
+
* Repeated calls with the same `context` for the same product yield the same
|
|
2047
|
+
* entropy.
|
|
2048
|
+
*/
|
|
1900
2049
|
export interface HostDeriveEntropyRequest {
|
|
1901
2050
|
/** Domain-separated derivation context. */
|
|
1902
2051
|
context: HexString;
|
|
1903
2052
|
}
|
|
1904
2053
|
export declare const HostDeriveEntropyRequest: S.Codec<HostDeriveEntropyRequest>;
|
|
2054
|
+
/** Response carrying 32 bytes of deterministically derived entropy. */
|
|
1905
2055
|
export interface HostDeriveEntropyResponse {
|
|
1906
2056
|
/** 32 bytes of derived entropy. */
|
|
1907
2057
|
entropy: HexString;
|
|
1908
2058
|
}
|
|
1909
2059
|
export declare const HostDeriveEntropyResponse: S.Codec<HostDeriveEntropyResponse>;
|
|
2060
|
+
/**
|
|
2061
|
+
* Device-capability permission requested from the host (RFC 0002).
|
|
2062
|
+
*
|
|
2063
|
+
* The user's decision is persisted indefinitely after the first prompt and
|
|
2064
|
+
* survives app restarts, whether the decision was grant or deny; the host
|
|
2065
|
+
* does not re-prompt on subsequent requests for the same capability.
|
|
2066
|
+
*/
|
|
1910
2067
|
export type HostDevicePermissionRequest = "Notifications" | "Camera" | "Microphone" | "Bluetooth" | "NFC" | "Location" | "Clipboard" | "OpenUrl" | "Biometrics";
|
|
1911
2068
|
export declare const HostDevicePermissionRequest: S.Codec<HostDevicePermissionRequest>;
|
|
2069
|
+
/** Outcome of a device-permission request. */
|
|
1912
2070
|
export interface HostDevicePermissionResponse {
|
|
1913
2071
|
/** Whether the permission was granted. */
|
|
1914
2072
|
granted: boolean;
|
|
1915
2073
|
}
|
|
1916
2074
|
export declare const HostDevicePermissionResponse: S.Codec<HostDevicePermissionResponse>;
|
|
1917
|
-
|
|
2075
|
+
/** Request to query whether a feature is supported by the host. */
|
|
2076
|
+
export type HostFeatureSupportedRequest =
|
|
2077
|
+
/** Ask whether the host can interact with the chain identified by genesis hash. */
|
|
2078
|
+
{
|
|
1918
2079
|
tag: "Chain";
|
|
1919
2080
|
value: {
|
|
1920
2081
|
genesisHash: HexString;
|
|
1921
2082
|
};
|
|
1922
2083
|
};
|
|
1923
2084
|
export declare const HostFeatureSupportedRequest: S.Codec<HostFeatureSupportedRequest>;
|
|
2085
|
+
/** Response to a feature-support query. */
|
|
1924
2086
|
export interface HostFeatureSupportedResponse {
|
|
1925
2087
|
/** Whether the feature is supported. */
|
|
1926
2088
|
supported: boolean;
|
|
1927
2089
|
}
|
|
1928
2090
|
export declare const HostFeatureSupportedResponse: S.Codec<HostFeatureSupportedResponse>;
|
|
1929
|
-
/** Response containing all
|
|
2091
|
+
/** Response containing all legacy (user-imported) accounts owned by the user. */
|
|
1930
2092
|
export interface HostGetLegacyAccountsResponse {
|
|
1931
|
-
/**
|
|
1932
|
-
accounts: Array<
|
|
2093
|
+
/** Legacy accounts. */
|
|
2094
|
+
accounts: Array<LegacyAccount>;
|
|
1933
2095
|
}
|
|
1934
2096
|
export declare const HostGetLegacyAccountsResponse: S.Codec<HostGetLegacyAccountsResponse>;
|
|
1935
2097
|
/** Error from [`crate::api::Account::get_user_id`]. */
|
|
@@ -1958,39 +2120,35 @@ export interface HostGetUserIdResponse {
|
|
|
1958
2120
|
primaryUsername: string;
|
|
1959
2121
|
}
|
|
1960
2122
|
export declare const HostGetUserIdResponse: S.Codec<HostGetUserIdResponse>;
|
|
1961
|
-
|
|
2123
|
+
/**
|
|
2124
|
+
* Error from [`crate::api::System::handshake`] (RFC 0009).
|
|
2125
|
+
*
|
|
2126
|
+
* The handshake is the first call on a fresh connection; it does not require
|
|
2127
|
+
* user authentication and is used to negotiate the wire codec version.
|
|
2128
|
+
*/
|
|
2129
|
+
export type HostHandshakeError =
|
|
2130
|
+
/** Host did not complete the handshake in time. */
|
|
2131
|
+
{
|
|
1962
2132
|
tag: "Timeout";
|
|
1963
2133
|
value?: undefined;
|
|
1964
|
-
}
|
|
2134
|
+
}
|
|
2135
|
+
/** Host does not speak the codec version requested by the product. */
|
|
2136
|
+
| {
|
|
1965
2137
|
tag: "UnsupportedProtocolVersion";
|
|
1966
2138
|
value?: undefined;
|
|
1967
|
-
}
|
|
2139
|
+
}
|
|
2140
|
+
/** Catch-all. */
|
|
2141
|
+
| {
|
|
1968
2142
|
tag: "Unknown";
|
|
1969
|
-
value:
|
|
2143
|
+
value: GenericError;
|
|
1970
2144
|
};
|
|
1971
2145
|
export declare const HostHandshakeError: S.Codec<HostHandshakeError>;
|
|
2146
|
+
/** Wire-codec negotiation payload sent by the product (RFC 0009). */
|
|
1972
2147
|
export interface HostHandshakeRequest {
|
|
1973
|
-
/** Wire codec version requested by the
|
|
2148
|
+
/** Wire codec version requested by the product. */
|
|
1974
2149
|
codecVersion: number;
|
|
1975
2150
|
}
|
|
1976
2151
|
export declare const HostHandshakeRequest: S.Codec<HostHandshakeRequest>;
|
|
1977
|
-
export interface HostJsonrpcMessageSendRequest {
|
|
1978
|
-
/** Chain genesis hash. */
|
|
1979
|
-
genesisHash: HexString;
|
|
1980
|
-
/** JSON-RPC message body. */
|
|
1981
|
-
message: string;
|
|
1982
|
-
}
|
|
1983
|
-
export declare const HostJsonrpcMessageSendRequest: S.Codec<HostJsonrpcMessageSendRequest>;
|
|
1984
|
-
export interface HostJsonrpcMessageSubscribeItem {
|
|
1985
|
-
/** JSON-RPC message body. */
|
|
1986
|
-
message: string;
|
|
1987
|
-
}
|
|
1988
|
-
export declare const HostJsonrpcMessageSubscribeItem: S.Codec<HostJsonrpcMessageSubscribeItem>;
|
|
1989
|
-
export interface HostJsonrpcMessageSubscribeRequest {
|
|
1990
|
-
/** Chain genesis hash. */
|
|
1991
|
-
genesisHash: HexString;
|
|
1992
|
-
}
|
|
1993
|
-
export declare const HostJsonrpcMessageSubscribeRequest: S.Codec<HostJsonrpcMessageSubscribeRequest>;
|
|
1994
2152
|
/** Request to clear a local storage key. */
|
|
1995
2153
|
export interface HostLocalStorageClearRequest {
|
|
1996
2154
|
/** Storage key to clear. */
|
|
@@ -2032,16 +2190,22 @@ export interface HostLocalStorageWriteRequest {
|
|
|
2032
2190
|
value: HexString;
|
|
2033
2191
|
}
|
|
2034
2192
|
export declare const HostLocalStorageWriteRequest: S.Codec<HostLocalStorageWriteRequest>;
|
|
2035
|
-
|
|
2193
|
+
/** Error from [`crate::api::System::navigate_to`]. */
|
|
2194
|
+
export type HostNavigateToError =
|
|
2195
|
+
/** User denied the navigation prompt. */
|
|
2196
|
+
{
|
|
2036
2197
|
tag: "PermissionDenied";
|
|
2037
2198
|
value?: undefined;
|
|
2038
|
-
}
|
|
2199
|
+
}
|
|
2200
|
+
/** Catch-all. */
|
|
2201
|
+
| {
|
|
2039
2202
|
tag: "Unknown";
|
|
2040
2203
|
value: {
|
|
2041
2204
|
reason: string;
|
|
2042
2205
|
};
|
|
2043
2206
|
};
|
|
2044
2207
|
export declare const HostNavigateToError: S.Codec<HostNavigateToError>;
|
|
2208
|
+
/** Request to navigate the host to an external URL. */
|
|
2045
2209
|
export interface HostNavigateToRequest {
|
|
2046
2210
|
/** URL to open. */
|
|
2047
2211
|
url: string;
|
|
@@ -2080,6 +2244,12 @@ export interface HostPaymentBalanceSubscribeItem {
|
|
|
2080
2244
|
available: Balance;
|
|
2081
2245
|
}
|
|
2082
2246
|
export declare const HostPaymentBalanceSubscribeItem: S.Codec<HostPaymentBalanceSubscribeItem>;
|
|
2247
|
+
/** Request to subscribe to payment balance updates. */
|
|
2248
|
+
export interface HostPaymentBalanceSubscribeRequest {
|
|
2249
|
+
/** Optional purse selector. `None` means MAIN_PURSE. */
|
|
2250
|
+
purse?: PaymentPurseId;
|
|
2251
|
+
}
|
|
2252
|
+
export declare const HostPaymentBalanceSubscribeRequest: S.Codec<HostPaymentBalanceSubscribeRequest>;
|
|
2083
2253
|
/**
|
|
2084
2254
|
* Error from [`crate::api::Payment::request`].
|
|
2085
2255
|
*
|
|
@@ -2087,7 +2257,7 @@ export declare const HostPaymentBalanceSubscribeItem: S.Codec<HostPaymentBalance
|
|
|
2087
2257
|
*
|
|
2088
2258
|
* [RFC 0006]: https://github.com/paritytech/triangle-js-sdks/pull/94
|
|
2089
2259
|
*/
|
|
2090
|
-
export type
|
|
2260
|
+
export type HostPaymentError =
|
|
2091
2261
|
/** User rejected the payment request. */
|
|
2092
2262
|
{
|
|
2093
2263
|
tag: "Rejected";
|
|
@@ -2105,15 +2275,17 @@ export type HostPaymentRequestError =
|
|
|
2105
2275
|
reason: string;
|
|
2106
2276
|
};
|
|
2107
2277
|
};
|
|
2108
|
-
export declare const
|
|
2278
|
+
export declare const HostPaymentError: S.Codec<HostPaymentError>;
|
|
2109
2279
|
/** Request to initiate a payment to another account. */
|
|
2110
|
-
export interface
|
|
2280
|
+
export interface HostPaymentRequest {
|
|
2281
|
+
/** Optional purse selector. `None` means MAIN_PURSE. */
|
|
2282
|
+
from?: PaymentPurseId;
|
|
2111
2283
|
/** Amount to pay. */
|
|
2112
2284
|
amount: Balance;
|
|
2113
2285
|
/** Destination account. */
|
|
2114
2286
|
destination: HexString;
|
|
2115
2287
|
}
|
|
2116
|
-
export declare const
|
|
2288
|
+
export declare const HostPaymentRequest: S.Codec<HostPaymentRequest>;
|
|
2117
2289
|
/**
|
|
2118
2290
|
* Receipt returned after a successful payment request.
|
|
2119
2291
|
*
|
|
@@ -2121,11 +2293,11 @@ export declare const HostPaymentRequestRequest: S.Codec<HostPaymentRequestReques
|
|
|
2121
2293
|
*
|
|
2122
2294
|
* [RFC 0006]: https://github.com/paritytech/triangle-js-sdks/pull/94
|
|
2123
2295
|
*/
|
|
2124
|
-
export interface
|
|
2296
|
+
export interface HostPaymentResponse {
|
|
2125
2297
|
/** The assigned payment identifier. */
|
|
2126
2298
|
id: string;
|
|
2127
2299
|
}
|
|
2128
|
-
export declare const
|
|
2300
|
+
export declare const HostPaymentResponse: S.Codec<HostPaymentResponse>;
|
|
2129
2301
|
/**
|
|
2130
2302
|
* Error from [`crate::api::Payment::status_subscribe`].
|
|
2131
2303
|
*
|
|
@@ -2200,6 +2372,13 @@ export type HostPaymentTopUpError =
|
|
|
2200
2372
|
tag: "InvalidSource";
|
|
2201
2373
|
value?: undefined;
|
|
2202
2374
|
}
|
|
2375
|
+
/** Some coins were claimed but the total fell short of the requested amount. */
|
|
2376
|
+
| {
|
|
2377
|
+
tag: "PartialPayment";
|
|
2378
|
+
value: {
|
|
2379
|
+
credited: Balance;
|
|
2380
|
+
};
|
|
2381
|
+
}
|
|
2203
2382
|
/** Catch-all. */
|
|
2204
2383
|
| {
|
|
2205
2384
|
tag: "Unknown";
|
|
@@ -2210,19 +2389,62 @@ export type HostPaymentTopUpError =
|
|
|
2210
2389
|
export declare const HostPaymentTopUpError: S.Codec<HostPaymentTopUpError>;
|
|
2211
2390
|
/** Request to top up the product payment balance. */
|
|
2212
2391
|
export interface HostPaymentTopUpRequest {
|
|
2392
|
+
/** Optional purse selector. `None` means MAIN_PURSE. */
|
|
2393
|
+
into?: PaymentPurseId;
|
|
2213
2394
|
/** Amount to top up. */
|
|
2214
2395
|
amount: Balance;
|
|
2215
2396
|
/** Funding source for the top-up. */
|
|
2216
2397
|
source: PaymentTopUpSource;
|
|
2217
2398
|
}
|
|
2218
2399
|
export declare const HostPaymentTopUpRequest: S.Codec<HostPaymentTopUpRequest>;
|
|
2400
|
+
/** Request to cancel a previously scheduled notification. */
|
|
2401
|
+
export interface HostPushNotificationCancelRequest {
|
|
2402
|
+
/** The notification identifier returned by [`HostPushNotificationResponse`]. */
|
|
2403
|
+
id: NotificationId;
|
|
2404
|
+
}
|
|
2405
|
+
export declare const HostPushNotificationCancelRequest: S.Codec<HostPushNotificationCancelRequest>;
|
|
2406
|
+
/** Push notification error. */
|
|
2407
|
+
export type HostPushNotificationError =
|
|
2408
|
+
/** The host-wide queue of pending scheduled notifications is full. */
|
|
2409
|
+
{
|
|
2410
|
+
tag: "ScheduleLimitReached";
|
|
2411
|
+
value?: undefined;
|
|
2412
|
+
}
|
|
2413
|
+
/** Catch-all. */
|
|
2414
|
+
| {
|
|
2415
|
+
tag: "Unknown";
|
|
2416
|
+
value: {
|
|
2417
|
+
reason: string;
|
|
2418
|
+
};
|
|
2419
|
+
};
|
|
2420
|
+
export declare const HostPushNotificationError: S.Codec<HostPushNotificationError>;
|
|
2421
|
+
/**
|
|
2422
|
+
* Push notification payload.
|
|
2423
|
+
*
|
|
2424
|
+
* When `scheduled_at` is `Some`, the notification is deferred to the given
|
|
2425
|
+
* wall-clock instant (Unix milliseconds UTC). `None` fires immediately,
|
|
2426
|
+
* preserving prior behaviour. See [RFC 0019].
|
|
2427
|
+
*
|
|
2428
|
+
* [RFC 0019]: https://github.com/paritytech/truapi/blob/main/docs/rfcs/0019-scheduled-notifications.md
|
|
2429
|
+
*/
|
|
2219
2430
|
export interface HostPushNotificationRequest {
|
|
2220
2431
|
/** Notification text. */
|
|
2221
2432
|
text: string;
|
|
2222
2433
|
/** Optional URL to open on tap. */
|
|
2223
2434
|
deeplink?: string;
|
|
2435
|
+
/**
|
|
2436
|
+
* Optional Unix timestamp in milliseconds (UTC) at which the notification
|
|
2437
|
+
* should fire. `None` fires immediately.
|
|
2438
|
+
*/
|
|
2439
|
+
scheduledAt?: bigint;
|
|
2224
2440
|
}
|
|
2225
2441
|
export declare const HostPushNotificationRequest: S.Codec<HostPushNotificationRequest>;
|
|
2442
|
+
/** Successful push notification response carrying the assigned id. */
|
|
2443
|
+
export interface HostPushNotificationResponse {
|
|
2444
|
+
/** Host-assigned notification identifier. */
|
|
2445
|
+
id: NotificationId;
|
|
2446
|
+
}
|
|
2447
|
+
export declare const HostPushNotificationResponse: S.Codec<HostPushNotificationResponse>;
|
|
2226
2448
|
/** Login request error. */
|
|
2227
2449
|
export type HostRequestLoginError =
|
|
2228
2450
|
/** Catch-all. */
|
|
@@ -2242,67 +2464,52 @@ export declare const HostRequestLoginRequest: S.Codec<HostRequestLoginRequest>;
|
|
|
2242
2464
|
/** Result of a login request. */
|
|
2243
2465
|
export type HostRequestLoginResponse = "Success" | "AlreadyConnected" | "Rejected";
|
|
2244
2466
|
export declare const HostRequestLoginResponse: S.Codec<HostRequestLoginResponse>;
|
|
2467
|
+
/** Batched resource pre-allocation request (RFC 0010). */
|
|
2245
2468
|
export interface HostRequestResourceAllocationRequest {
|
|
2246
2469
|
/** Resources to allocate. */
|
|
2247
2470
|
resources: Array<AllocatableResource>;
|
|
2248
2471
|
}
|
|
2249
2472
|
export declare const HostRequestResourceAllocationRequest: S.Codec<HostRequestResourceAllocationRequest>;
|
|
2473
|
+
/** Per-resource outcomes for a batched allocation request (RFC 0010). */
|
|
2250
2474
|
export interface HostRequestResourceAllocationResponse {
|
|
2251
2475
|
/** Per-resource allocation outcomes, in the same order as the request. */
|
|
2252
2476
|
outcomes: Array<AllocationOutcome>;
|
|
2253
2477
|
}
|
|
2254
2478
|
export declare const HostRequestResourceAllocationResponse: S.Codec<HostRequestResourceAllocationResponse>;
|
|
2255
|
-
|
|
2479
|
+
/** Signing operation error. */
|
|
2480
|
+
export type HostSignPayloadError =
|
|
2481
|
+
/** Payload could not be deserialized. */
|
|
2482
|
+
{
|
|
2256
2483
|
tag: "FailedToDecode";
|
|
2257
2484
|
value?: undefined;
|
|
2258
|
-
}
|
|
2485
|
+
}
|
|
2486
|
+
/** User rejected signing. */
|
|
2487
|
+
| {
|
|
2259
2488
|
tag: "Rejected";
|
|
2260
2489
|
value?: undefined;
|
|
2261
|
-
}
|
|
2490
|
+
}
|
|
2491
|
+
/** Not authenticated. */
|
|
2492
|
+
| {
|
|
2262
2493
|
tag: "PermissionDenied";
|
|
2263
2494
|
value?: undefined;
|
|
2264
|
-
}
|
|
2495
|
+
}
|
|
2496
|
+
/** Catch-all. */
|
|
2497
|
+
| {
|
|
2265
2498
|
tag: "Unknown";
|
|
2266
2499
|
value: {
|
|
2267
2500
|
reason: string;
|
|
2268
2501
|
};
|
|
2269
2502
|
};
|
|
2270
2503
|
export declare const HostSignPayloadError: S.Codec<HostSignPayloadError>;
|
|
2504
|
+
/** Request to sign an extrinsic payload with a product account. */
|
|
2271
2505
|
export interface HostSignPayloadRequest {
|
|
2272
2506
|
/** Product account that will sign this payload. */
|
|
2273
2507
|
account: ProductAccountId;
|
|
2274
|
-
/**
|
|
2275
|
-
|
|
2276
|
-
/** Reference block number. */
|
|
2277
|
-
blockNumber: HexString;
|
|
2278
|
-
/** Mortality era encoding. */
|
|
2279
|
-
era: HexString;
|
|
2280
|
-
/** Chain genesis hash. */
|
|
2281
|
-
genesisHash: HexString;
|
|
2282
|
-
/** SCALE-encoded call data. */
|
|
2283
|
-
method: HexString;
|
|
2284
|
-
/** Account nonce. */
|
|
2285
|
-
nonce: HexString;
|
|
2286
|
-
/** Runtime spec version. */
|
|
2287
|
-
specVersion: HexString;
|
|
2288
|
-
/** Transaction tip. */
|
|
2289
|
-
tip: HexString;
|
|
2290
|
-
/** Transaction format version. */
|
|
2291
|
-
transactionVersion: HexString;
|
|
2292
|
-
/** Extension identifiers. */
|
|
2293
|
-
signedExtensions: Array<string>;
|
|
2294
|
-
/** Extrinsic version. */
|
|
2295
|
-
version: number;
|
|
2296
|
-
/** For multi-asset tips. */
|
|
2297
|
-
assetId?: HexString;
|
|
2298
|
-
/** CheckMetadataHash extension. */
|
|
2299
|
-
metadataHash?: HexString;
|
|
2300
|
-
/** Metadata mode. */
|
|
2301
|
-
mode?: number;
|
|
2302
|
-
/** Request signed transaction back. */
|
|
2303
|
-
withSignedTransaction?: boolean;
|
|
2508
|
+
/** The extrinsic payload to sign. */
|
|
2509
|
+
payload: HostSignPayloadData;
|
|
2304
2510
|
}
|
|
2305
2511
|
export declare const HostSignPayloadRequest: S.Codec<HostSignPayloadRequest>;
|
|
2512
|
+
/** Result of a signing operation. */
|
|
2306
2513
|
export interface HostSignPayloadResponse {
|
|
2307
2514
|
/** The cryptographic signature. */
|
|
2308
2515
|
signature: HexString;
|
|
@@ -2310,13 +2517,19 @@ export interface HostSignPayloadResponse {
|
|
|
2310
2517
|
signedTransaction?: HexString;
|
|
2311
2518
|
}
|
|
2312
2519
|
export declare const HostSignPayloadResponse: S.Codec<HostSignPayloadResponse>;
|
|
2520
|
+
/**
|
|
2521
|
+
* Sign a Substrate extrinsic payload with a non-product (legacy) account.
|
|
2522
|
+
* Contains the same fields as [`HostSignPayloadRequest`] minus `address`
|
|
2523
|
+
* (replaced by `signer`).
|
|
2524
|
+
*/
|
|
2313
2525
|
export interface HostSignPayloadWithLegacyAccountRequest {
|
|
2314
2526
|
/** Signer address (SS58 or hex) of the legacy account. */
|
|
2315
2527
|
signer: string;
|
|
2316
2528
|
/** The extrinsic payload to sign. */
|
|
2317
|
-
payload:
|
|
2529
|
+
payload: HostSignPayloadData;
|
|
2318
2530
|
}
|
|
2319
2531
|
export declare const HostSignPayloadWithLegacyAccountRequest: S.Codec<HostSignPayloadWithLegacyAccountRequest>;
|
|
2532
|
+
/** A raw signing request pairing an account with the payload to sign. */
|
|
2320
2533
|
export interface HostSignRawRequest {
|
|
2321
2534
|
/** Product account that will sign this payload. */
|
|
2322
2535
|
account: ProductAccountId;
|
|
@@ -2324,6 +2537,10 @@ export interface HostSignRawRequest {
|
|
|
2324
2537
|
payload: RawPayload;
|
|
2325
2538
|
}
|
|
2326
2539
|
export declare const HostSignRawRequest: S.Codec<HostSignRawRequest>;
|
|
2540
|
+
/**
|
|
2541
|
+
* Sign raw bytes with a non-product (legacy) account. The signer field
|
|
2542
|
+
* identifies which legacy account to use.
|
|
2543
|
+
*/
|
|
2327
2544
|
export interface HostSignRawWithLegacyAccountRequest {
|
|
2328
2545
|
/** Signer address (SS58 or hex) of the legacy account. */
|
|
2329
2546
|
signer: string;
|
|
@@ -2331,9 +2548,12 @@ export interface HostSignRawWithLegacyAccountRequest {
|
|
|
2331
2548
|
payload: RawPayload;
|
|
2332
2549
|
}
|
|
2333
2550
|
export declare const HostSignRawWithLegacyAccountRequest: S.Codec<HostSignRawWithLegacyAccountRequest>;
|
|
2551
|
+
/** Current theme state pushed to subscribers. */
|
|
2334
2552
|
export interface HostThemeSubscribeItem {
|
|
2335
|
-
/**
|
|
2336
|
-
|
|
2553
|
+
/** Theme name. */
|
|
2554
|
+
name: ThemeName;
|
|
2555
|
+
/** Light or dark variant. */
|
|
2556
|
+
variant: ThemeVariant;
|
|
2337
2557
|
}
|
|
2338
2558
|
export declare const HostThemeSubscribeItem: S.Codec<HostThemeSubscribeItem>;
|
|
2339
2559
|
/**
|
|
@@ -2564,11 +2784,13 @@ export interface RemoteChainTransactionStopRequest {
|
|
|
2564
2784
|
operationId: string;
|
|
2565
2785
|
}
|
|
2566
2786
|
export declare const RemoteChainTransactionStopRequest: S.Codec<RemoteChainTransactionStopRequest>;
|
|
2787
|
+
/** remote-permission request (RFC 0002). */
|
|
2567
2788
|
export interface RemotePermissionRequest {
|
|
2568
|
-
/**
|
|
2569
|
-
|
|
2789
|
+
/** Permission requested by the product. */
|
|
2790
|
+
permission: RemotePermission;
|
|
2570
2791
|
}
|
|
2571
2792
|
export declare const RemotePermissionRequest: S.Codec<RemotePermissionRequest>;
|
|
2793
|
+
/** Outcome of a remote-permission request. */
|
|
2572
2794
|
export interface RemotePermissionResponse {
|
|
2573
2795
|
/** Whether the permission was granted. */
|
|
2574
2796
|
granted: boolean;
|
|
@@ -2649,18 +2871,6 @@ export type RemoteStatementStoreSubscribeRequest =
|
|
|
2649
2871
|
value: Array<Topic>;
|
|
2650
2872
|
};
|
|
2651
2873
|
export declare const RemoteStatementStoreSubscribeRequest: S.Codec<RemoteStatementStoreSubscribeRequest>;
|
|
2652
|
-
export type Version =
|
|
2653
|
-
/** Initial protocol version. */
|
|
2654
|
-
{
|
|
2655
|
-
tag: "V1";
|
|
2656
|
-
value?: undefined;
|
|
2657
|
-
};
|
|
2658
|
-
export declare const Version: S.Codec<Version>;
|
|
2659
|
-
export type VersionedTxPayload = {
|
|
2660
|
-
tag: "V1";
|
|
2661
|
-
value: TxPayloadV1;
|
|
2662
|
-
};
|
|
2663
|
-
export declare const VersionedTxPayload: S.Codec<VersionedTxPayload>;
|
|
2664
2874
|
/** Vertical alignment options. */
|
|
2665
2875
|
export type VerticalAlignment = "Top" | "Center" | "Bottom";
|
|
2666
2876
|
export declare const VerticalAlignment: S.Codec<VerticalAlignment>;
|