@parity/truapi 0.3.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/explorer/codegen/types.js +6 -6
- 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/versions.d.ts +1 -1
- package/dist/explorer/versions.js +10 -7
- package/dist/generated/types.d.ts +6 -6
- package/dist/generated/types.js +1 -1
- package/dist/playground/codegen/truapi-dts.d.ts +1 -1
- package/dist/playground/codegen/truapi-dts.js +15 -7
- package/package.json +1 -1
|
@@ -0,0 +1,644 @@
|
|
|
1
|
+
export const services = [
|
|
2
|
+
{
|
|
3
|
+
name: "Account",
|
|
4
|
+
methods: [
|
|
5
|
+
{
|
|
6
|
+
name: "connection_status_subscribe",
|
|
7
|
+
type: "subscription",
|
|
8
|
+
signature: "connectionStatusSubscribe(): ObservableLike<HostAccountConnectionStatusSubscribeItem>",
|
|
9
|
+
docUrl: "api/account/trait.Account.html#method.connection_status_subscribe",
|
|
10
|
+
description: "Subscribe to account connection status changes.",
|
|
11
|
+
responseType: "host-account-connection-status-subscribe-item",
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
name: "get_account",
|
|
15
|
+
type: "unary",
|
|
16
|
+
signature: "getAccount(request: HostAccountGetRequest): Promise<Result<HostAccountGetResponse, HostAccountGetError>>",
|
|
17
|
+
docUrl: "api/account/trait.Account.html#method.get_account",
|
|
18
|
+
description: "Retrieve a product-scoped account.",
|
|
19
|
+
requestDescription: "HostAccountGetRequest",
|
|
20
|
+
requestType: "host-account-get-request",
|
|
21
|
+
responseType: "host-account-get-response",
|
|
22
|
+
errorType: "host-account-get-error",
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
name: "get_account_alias",
|
|
26
|
+
type: "unary",
|
|
27
|
+
signature: "getAccountAlias(request: HostAccountGetAliasRequest): Promise<Result<HostAccountGetAliasResponse, HostAccountGetError>>",
|
|
28
|
+
docUrl: "api/account/trait.Account.html#method.get_account_alias",
|
|
29
|
+
description: "Retrieve a contextual alias for a product account.",
|
|
30
|
+
requestDescription: "HostAccountGetAliasRequest",
|
|
31
|
+
requestType: "host-account-get-alias-request",
|
|
32
|
+
responseType: "host-account-get-alias-response",
|
|
33
|
+
errorType: "host-account-get-error",
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
name: "create_account_proof",
|
|
37
|
+
type: "unary",
|
|
38
|
+
signature: "createAccountProof(request: HostAccountCreateProofRequest): Promise<Result<HostAccountCreateProofResponse, HostAccountCreateProofError>>",
|
|
39
|
+
docUrl: "api/account/trait.Account.html#method.create_account_proof",
|
|
40
|
+
description: "Generate a ring VRF proof for a product account.",
|
|
41
|
+
requestDescription: "HostAccountCreateProofRequest",
|
|
42
|
+
requestType: "host-account-create-proof-request",
|
|
43
|
+
responseType: "host-account-create-proof-response",
|
|
44
|
+
errorType: "host-account-create-proof-error",
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
name: "get_legacy_accounts",
|
|
48
|
+
type: "unary",
|
|
49
|
+
signature: "getLegacyAccounts(): Promise<Result<HostGetLegacyAccountsResponse, HostAccountGetError>>",
|
|
50
|
+
docUrl: "api/account/trait.Account.html#method.get_legacy_accounts",
|
|
51
|
+
description: "List non-product accounts the user owns.",
|
|
52
|
+
responseType: "host-get-legacy-accounts-response",
|
|
53
|
+
errorType: "host-account-get-error",
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
name: "get_user_id",
|
|
57
|
+
type: "unary",
|
|
58
|
+
signature: "getUserId(): Promise<Result<HostGetUserIdResponse, HostGetUserIdError>>",
|
|
59
|
+
docUrl: "api/account/trait.Account.html#method.get_user_id",
|
|
60
|
+
description: "Fetch the user's primary identity.",
|
|
61
|
+
responseType: "host-get-user-id-response",
|
|
62
|
+
errorType: "host-get-user-id-error",
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
name: "request_login",
|
|
66
|
+
type: "unary",
|
|
67
|
+
signature: "requestLogin(request: HostRequestLoginRequest): Promise<Result<HostRequestLoginResponse, HostRequestLoginError>>",
|
|
68
|
+
docUrl: "api/account/trait.Account.html#method.request_login",
|
|
69
|
+
description: 'Request the host to present the login flow to the user.\n\nProducts should call this in response to a user action (e.g. tapping a\n"Sign in" button), not automatically on load.',
|
|
70
|
+
requestDescription: "HostRequestLoginRequest",
|
|
71
|
+
requestType: "host-request-login-request",
|
|
72
|
+
responseType: "host-request-login-response",
|
|
73
|
+
errorType: "host-request-login-error",
|
|
74
|
+
},
|
|
75
|
+
],
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
name: "Chain",
|
|
79
|
+
methods: [
|
|
80
|
+
{
|
|
81
|
+
name: "follow_head_subscribe",
|
|
82
|
+
type: "subscription",
|
|
83
|
+
signature: "followHeadSubscribe(request: RemoteChainHeadFollowRequest): ObservableLike<RemoteChainHeadFollowItem>",
|
|
84
|
+
docUrl: "api/chain/trait.Chain.html#method.follow_head_subscribe",
|
|
85
|
+
description: "Follow the chain head and receive block events.",
|
|
86
|
+
requestDescription: "RemoteChainHeadFollowRequest",
|
|
87
|
+
requestType: "remote-chain-head-follow-request",
|
|
88
|
+
responseType: "remote-chain-head-follow-item",
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
name: "get_head_header",
|
|
92
|
+
type: "unary",
|
|
93
|
+
signature: "getHeadHeader(request: RemoteChainHeadHeaderRequest): Promise<Result<RemoteChainHeadHeaderResponse, GenericError>>",
|
|
94
|
+
docUrl: "api/chain/trait.Chain.html#method.get_head_header",
|
|
95
|
+
description: "Fetch a block header.",
|
|
96
|
+
requestDescription: "RemoteChainHeadHeaderRequest",
|
|
97
|
+
requestType: "remote-chain-head-header-request",
|
|
98
|
+
responseType: "remote-chain-head-header-response",
|
|
99
|
+
errorType: "generic-error",
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
name: "get_head_body",
|
|
103
|
+
type: "unary",
|
|
104
|
+
signature: "getHeadBody(request: RemoteChainHeadBodyRequest): Promise<Result<RemoteChainHeadBodyResponse, GenericError>>",
|
|
105
|
+
docUrl: "api/chain/trait.Chain.html#method.get_head_body",
|
|
106
|
+
description: "Fetch a block body.",
|
|
107
|
+
requestDescription: "RemoteChainHeadBodyRequest",
|
|
108
|
+
requestType: "remote-chain-head-body-request",
|
|
109
|
+
responseType: "remote-chain-head-body-response",
|
|
110
|
+
errorType: "generic-error",
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
name: "get_head_storage",
|
|
114
|
+
type: "unary",
|
|
115
|
+
signature: "getHeadStorage(request: RemoteChainHeadStorageRequest): Promise<Result<RemoteChainHeadStorageResponse, GenericError>>",
|
|
116
|
+
docUrl: "api/chain/trait.Chain.html#method.get_head_storage",
|
|
117
|
+
description: "Query runtime storage at a specific block.",
|
|
118
|
+
requestDescription: "RemoteChainHeadStorageRequest",
|
|
119
|
+
requestType: "remote-chain-head-storage-request",
|
|
120
|
+
responseType: "remote-chain-head-storage-response",
|
|
121
|
+
errorType: "generic-error",
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
name: "call_head",
|
|
125
|
+
type: "unary",
|
|
126
|
+
signature: "callHead(request: RemoteChainHeadCallRequest): Promise<Result<RemoteChainHeadCallResponse, GenericError>>",
|
|
127
|
+
docUrl: "api/chain/trait.Chain.html#method.call_head",
|
|
128
|
+
description: "Invoke a runtime call at a specific block.",
|
|
129
|
+
requestDescription: "RemoteChainHeadCallRequest",
|
|
130
|
+
requestType: "remote-chain-head-call-request",
|
|
131
|
+
responseType: "remote-chain-head-call-response",
|
|
132
|
+
errorType: "generic-error",
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
name: "unpin_head",
|
|
136
|
+
type: "unary",
|
|
137
|
+
signature: "unpinHead(request: RemoteChainHeadUnpinRequest): Promise<Result<undefined, GenericError>>",
|
|
138
|
+
docUrl: "api/chain/trait.Chain.html#method.unpin_head",
|
|
139
|
+
description: "Release pinned blocks.",
|
|
140
|
+
requestDescription: "RemoteChainHeadUnpinRequest",
|
|
141
|
+
requestType: "remote-chain-head-unpin-request",
|
|
142
|
+
errorType: "generic-error",
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
name: "continue_head",
|
|
146
|
+
type: "unary",
|
|
147
|
+
signature: "continueHead(request: RemoteChainHeadContinueRequest): Promise<Result<undefined, GenericError>>",
|
|
148
|
+
docUrl: "api/chain/trait.Chain.html#method.continue_head",
|
|
149
|
+
description: "Continue a paused chain-head operation.",
|
|
150
|
+
requestDescription: "RemoteChainHeadContinueRequest",
|
|
151
|
+
requestType: "remote-chain-head-continue-request",
|
|
152
|
+
errorType: "generic-error",
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
name: "stop_head_operation",
|
|
156
|
+
type: "unary",
|
|
157
|
+
signature: "stopHeadOperation(request: RemoteChainHeadStopOperationRequest): Promise<Result<undefined, GenericError>>",
|
|
158
|
+
docUrl: "api/chain/trait.Chain.html#method.stop_head_operation",
|
|
159
|
+
description: "Stop a chain-head operation.",
|
|
160
|
+
requestDescription: "RemoteChainHeadStopOperationRequest",
|
|
161
|
+
requestType: "remote-chain-head-stop-operation-request",
|
|
162
|
+
errorType: "generic-error",
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
name: "get_spec_genesis_hash",
|
|
166
|
+
type: "unary",
|
|
167
|
+
signature: "getSpecGenesisHash(request: RemoteChainSpecGenesisHashRequest): Promise<Result<RemoteChainSpecGenesisHashResponse, GenericError>>",
|
|
168
|
+
docUrl: "api/chain/trait.Chain.html#method.get_spec_genesis_hash",
|
|
169
|
+
description: "Fetch the canonical genesis hash for a chain.",
|
|
170
|
+
requestDescription: "RemoteChainSpecGenesisHashRequest",
|
|
171
|
+
requestType: "remote-chain-spec-genesis-hash-request",
|
|
172
|
+
responseType: "remote-chain-spec-genesis-hash-response",
|
|
173
|
+
errorType: "generic-error",
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
name: "get_spec_chain_name",
|
|
177
|
+
type: "unary",
|
|
178
|
+
signature: "getSpecChainName(request: RemoteChainSpecChainNameRequest): Promise<Result<RemoteChainSpecChainNameResponse, GenericError>>",
|
|
179
|
+
docUrl: "api/chain/trait.Chain.html#method.get_spec_chain_name",
|
|
180
|
+
description: "Fetch the display name of a chain.",
|
|
181
|
+
requestDescription: "RemoteChainSpecChainNameRequest",
|
|
182
|
+
requestType: "remote-chain-spec-chain-name-request",
|
|
183
|
+
responseType: "remote-chain-spec-chain-name-response",
|
|
184
|
+
errorType: "generic-error",
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
name: "get_spec_properties",
|
|
188
|
+
type: "unary",
|
|
189
|
+
signature: "getSpecProperties(request: RemoteChainSpecPropertiesRequest): Promise<Result<RemoteChainSpecPropertiesResponse, GenericError>>",
|
|
190
|
+
docUrl: "api/chain/trait.Chain.html#method.get_spec_properties",
|
|
191
|
+
description: "Fetch the JSON-encoded properties of a chain.",
|
|
192
|
+
requestDescription: "RemoteChainSpecPropertiesRequest",
|
|
193
|
+
requestType: "remote-chain-spec-properties-request",
|
|
194
|
+
responseType: "remote-chain-spec-properties-response",
|
|
195
|
+
errorType: "generic-error",
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
name: "broadcast_transaction",
|
|
199
|
+
type: "unary",
|
|
200
|
+
signature: "broadcastTransaction(request: RemoteChainTransactionBroadcastRequest): Promise<Result<RemoteChainTransactionBroadcastResponse, GenericError>>",
|
|
201
|
+
docUrl: "api/chain/trait.Chain.html#method.broadcast_transaction",
|
|
202
|
+
description: "Broadcast a signed transaction.",
|
|
203
|
+
requestDescription: "RemoteChainTransactionBroadcastRequest",
|
|
204
|
+
requestType: "remote-chain-transaction-broadcast-request",
|
|
205
|
+
responseType: "remote-chain-transaction-broadcast-response",
|
|
206
|
+
errorType: "generic-error",
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
name: "stop_transaction",
|
|
210
|
+
type: "unary",
|
|
211
|
+
signature: "stopTransaction(request: RemoteChainTransactionStopRequest): Promise<Result<undefined, GenericError>>",
|
|
212
|
+
docUrl: "api/chain/trait.Chain.html#method.stop_transaction",
|
|
213
|
+
description: "Stop a transaction broadcast.",
|
|
214
|
+
requestDescription: "RemoteChainTransactionStopRequest",
|
|
215
|
+
requestType: "remote-chain-transaction-stop-request",
|
|
216
|
+
errorType: "generic-error",
|
|
217
|
+
},
|
|
218
|
+
],
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
name: "Chat",
|
|
222
|
+
methods: [
|
|
223
|
+
{
|
|
224
|
+
name: "create_room",
|
|
225
|
+
type: "unary",
|
|
226
|
+
signature: "createRoom(request: HostChatCreateRoomRequest): Promise<Result<HostChatCreateRoomResponse, HostChatCreateRoomError>>",
|
|
227
|
+
docUrl: "api/chat/trait.Chat.html#method.create_room",
|
|
228
|
+
description: "Create a chat room.",
|
|
229
|
+
requestDescription: "HostChatCreateRoomRequest",
|
|
230
|
+
requestType: "host-chat-create-room-request",
|
|
231
|
+
responseType: "host-chat-create-room-response",
|
|
232
|
+
errorType: "host-chat-create-room-error",
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
name: "register_bot",
|
|
236
|
+
type: "unary",
|
|
237
|
+
signature: "registerBot(request: HostChatRegisterBotRequest): Promise<Result<HostChatRegisterBotResponse, HostChatRegisterBotError>>",
|
|
238
|
+
docUrl: "api/chat/trait.Chat.html#method.register_bot",
|
|
239
|
+
description: "Register a chat bot.",
|
|
240
|
+
requestDescription: "HostChatRegisterBotRequest",
|
|
241
|
+
requestType: "host-chat-register-bot-request",
|
|
242
|
+
responseType: "host-chat-register-bot-response",
|
|
243
|
+
errorType: "host-chat-register-bot-error",
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
name: "list_subscribe",
|
|
247
|
+
type: "subscription",
|
|
248
|
+
signature: "listSubscribe(): ObservableLike<HostChatListSubscribeItem>",
|
|
249
|
+
docUrl: "api/chat/trait.Chat.html#method.list_subscribe",
|
|
250
|
+
description: "Subscribe to the list of chat rooms.",
|
|
251
|
+
responseType: "host-chat-list-subscribe-item",
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
name: "post_message",
|
|
255
|
+
type: "unary",
|
|
256
|
+
signature: "postMessage(request: HostChatPostMessageRequest): Promise<Result<HostChatPostMessageResponse, HostChatPostMessageError>>",
|
|
257
|
+
docUrl: "api/chat/trait.Chat.html#method.post_message",
|
|
258
|
+
description: "Post a message to a chat room.",
|
|
259
|
+
requestDescription: "HostChatPostMessageRequest",
|
|
260
|
+
requestType: "host-chat-post-message-request",
|
|
261
|
+
responseType: "host-chat-post-message-response",
|
|
262
|
+
errorType: "host-chat-post-message-error",
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
name: "action_subscribe",
|
|
266
|
+
type: "subscription",
|
|
267
|
+
signature: "actionSubscribe(): ObservableLike<HostChatActionSubscribeItem>",
|
|
268
|
+
docUrl: "api/chat/trait.Chat.html#method.action_subscribe",
|
|
269
|
+
description: "Subscribe to received chat actions.",
|
|
270
|
+
responseType: "host-chat-action-subscribe-item",
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
name: "custom_message_render_subscribe",
|
|
274
|
+
type: "subscription",
|
|
275
|
+
signature: "customMessageRenderSubscribe(request: ProductChatCustomMessageRenderSubscribeRequest): ObservableLike<CustomRendererNode>",
|
|
276
|
+
docUrl: "api/chat/trait.Chat.html#method.custom_message_render_subscribe",
|
|
277
|
+
description: "Subscribe to custom message render requests from the host. Each\nemitted item is a [`CustomRendererNode`](crate::v01::CustomRendererNode)\ntree describing the rendered UI.",
|
|
278
|
+
requestDescription: "ProductChatCustomMessageRenderSubscribeRequest",
|
|
279
|
+
requestType: "product-chat-custom-message-render-subscribe-request",
|
|
280
|
+
responseType: "custom-renderer-node",
|
|
281
|
+
},
|
|
282
|
+
],
|
|
283
|
+
},
|
|
284
|
+
{
|
|
285
|
+
name: "Entropy",
|
|
286
|
+
methods: [
|
|
287
|
+
{
|
|
288
|
+
name: "derive",
|
|
289
|
+
type: "unary",
|
|
290
|
+
signature: "derive(request: HostDeriveEntropyRequest): Promise<Result<HostDeriveEntropyResponse, HostDeriveEntropyError>>",
|
|
291
|
+
docUrl: "api/entropy/trait.Entropy.html#method.derive",
|
|
292
|
+
description: "Derive deterministic entropy.",
|
|
293
|
+
requestDescription: "HostDeriveEntropyRequest",
|
|
294
|
+
requestType: "host-derive-entropy-request",
|
|
295
|
+
responseType: "host-derive-entropy-response",
|
|
296
|
+
errorType: "host-derive-entropy-error",
|
|
297
|
+
},
|
|
298
|
+
],
|
|
299
|
+
},
|
|
300
|
+
{
|
|
301
|
+
name: "Local Storage",
|
|
302
|
+
methods: [
|
|
303
|
+
{
|
|
304
|
+
name: "read",
|
|
305
|
+
type: "unary",
|
|
306
|
+
signature: "read(request: HostLocalStorageReadRequest): Promise<Result<HostLocalStorageReadResponse, HostLocalStorageReadError>>",
|
|
307
|
+
docUrl: "api/local_storage/trait.LocalStorage.html#method.read",
|
|
308
|
+
description: "Read a value by key.",
|
|
309
|
+
requestDescription: "HostLocalStorageReadRequest",
|
|
310
|
+
requestType: "host-local-storage-read-request",
|
|
311
|
+
responseType: "host-local-storage-read-response",
|
|
312
|
+
errorType: "host-local-storage-read-error",
|
|
313
|
+
},
|
|
314
|
+
{
|
|
315
|
+
name: "write",
|
|
316
|
+
type: "unary",
|
|
317
|
+
signature: "write(request: HostLocalStorageWriteRequest): Promise<Result<undefined, HostLocalStorageReadError>>",
|
|
318
|
+
docUrl: "api/local_storage/trait.LocalStorage.html#method.write",
|
|
319
|
+
description: "Write a value to a key.",
|
|
320
|
+
requestDescription: "HostLocalStorageWriteRequest",
|
|
321
|
+
requestType: "host-local-storage-write-request",
|
|
322
|
+
errorType: "host-local-storage-read-error",
|
|
323
|
+
},
|
|
324
|
+
{
|
|
325
|
+
name: "clear",
|
|
326
|
+
type: "unary",
|
|
327
|
+
signature: "clear(request: HostLocalStorageClearRequest): Promise<Result<undefined, HostLocalStorageReadError>>",
|
|
328
|
+
docUrl: "api/local_storage/trait.LocalStorage.html#method.clear",
|
|
329
|
+
description: "Clear a value by key.",
|
|
330
|
+
requestDescription: "HostLocalStorageClearRequest",
|
|
331
|
+
requestType: "host-local-storage-clear-request",
|
|
332
|
+
errorType: "host-local-storage-read-error",
|
|
333
|
+
},
|
|
334
|
+
],
|
|
335
|
+
},
|
|
336
|
+
{
|
|
337
|
+
name: "Notifications",
|
|
338
|
+
methods: [
|
|
339
|
+
{
|
|
340
|
+
name: "send_push_notification",
|
|
341
|
+
type: "unary",
|
|
342
|
+
signature: "sendPushNotification(request: HostPushNotificationRequest): Promise<Result<HostPushNotificationResponse, HostPushNotificationError>>",
|
|
343
|
+
docUrl: "api/notifications/trait.Notifications.html#method.send_push_notification",
|
|
344
|
+
description: "Send a push notification to the user.\n\nReturns a [`NotificationId`](crate::v01::NotificationId) that can be\npassed to [`cancel_push_notification`](Self::cancel_push_notification)\nto retract a scheduled notification. When `scheduled_at` is set the host\npersists the notification across restarts and fires it through the\nplatform-native scheduler. See [RFC 0019].\n\n[RFC 0019]: https://github.com/paritytech/truapi/blob/main/docs/rfcs/0019-scheduled-notifications.md",
|
|
345
|
+
requestDescription: "HostPushNotificationRequest",
|
|
346
|
+
requestType: "host-push-notification-request",
|
|
347
|
+
responseType: "host-push-notification-response",
|
|
348
|
+
errorType: "host-push-notification-error",
|
|
349
|
+
},
|
|
350
|
+
{
|
|
351
|
+
name: "cancel_push_notification",
|
|
352
|
+
type: "unary",
|
|
353
|
+
signature: "cancelPushNotification(request: HostPushNotificationCancelRequest): Promise<Result<undefined, GenericError>>",
|
|
354
|
+
docUrl: "api/notifications/trait.Notifications.html#method.cancel_push_notification",
|
|
355
|
+
description: "Cancels a previously issued push notification.\n\nCancellation is idempotent: returns `Ok(())` whether the notification is\nstill pending, already fired, or was never issued. See [RFC 0019].\n\n[RFC 0019]: https://github.com/paritytech/truapi/blob/main/docs/rfcs/0019-scheduled-notifications.md",
|
|
356
|
+
requestDescription: "HostPushNotificationCancelRequest",
|
|
357
|
+
requestType: "host-push-notification-cancel-request",
|
|
358
|
+
errorType: "generic-error",
|
|
359
|
+
},
|
|
360
|
+
],
|
|
361
|
+
},
|
|
362
|
+
{
|
|
363
|
+
name: "Payment",
|
|
364
|
+
methods: [
|
|
365
|
+
{
|
|
366
|
+
name: "balance_subscribe",
|
|
367
|
+
type: "subscription",
|
|
368
|
+
signature: "balanceSubscribe(request: HostPaymentBalanceSubscribeRequest): ObservableLike<HostPaymentBalanceSubscribeItem, HostPaymentBalanceSubscribeError>",
|
|
369
|
+
docUrl: "api/payment/trait.Payment.html#method.balance_subscribe",
|
|
370
|
+
description: "Subscribe to payment balance updates.",
|
|
371
|
+
requestDescription: "HostPaymentBalanceSubscribeRequest",
|
|
372
|
+
requestType: "host-payment-balance-subscribe-request",
|
|
373
|
+
responseType: "host-payment-balance-subscribe-item",
|
|
374
|
+
errorType: "host-payment-balance-subscribe-error",
|
|
375
|
+
},
|
|
376
|
+
{
|
|
377
|
+
name: "top_up",
|
|
378
|
+
type: "unary",
|
|
379
|
+
signature: "topUp(request: HostPaymentTopUpRequest): Promise<Result<undefined, HostPaymentTopUpError>>",
|
|
380
|
+
docUrl: "api/payment/trait.Payment.html#method.top_up",
|
|
381
|
+
description: "Top up the user's payment balance.",
|
|
382
|
+
requestDescription: "HostPaymentTopUpRequest",
|
|
383
|
+
requestType: "host-payment-top-up-request",
|
|
384
|
+
errorType: "host-payment-top-up-error",
|
|
385
|
+
},
|
|
386
|
+
{
|
|
387
|
+
name: "request",
|
|
388
|
+
type: "unary",
|
|
389
|
+
signature: "request(request: HostPaymentRequest): Promise<Result<HostPaymentResponse, HostPaymentError>>",
|
|
390
|
+
docUrl: "api/payment/trait.Payment.html#method.request",
|
|
391
|
+
description: "Request a payment from the user.",
|
|
392
|
+
requestDescription: "HostPaymentRequest",
|
|
393
|
+
requestType: "host-payment-request",
|
|
394
|
+
responseType: "host-payment-response",
|
|
395
|
+
errorType: "host-payment-error",
|
|
396
|
+
},
|
|
397
|
+
{
|
|
398
|
+
name: "status_subscribe",
|
|
399
|
+
type: "subscription",
|
|
400
|
+
signature: "statusSubscribe(request: HostPaymentStatusSubscribeRequest): ObservableLike<HostPaymentStatusSubscribeItem, HostPaymentStatusSubscribeError>",
|
|
401
|
+
docUrl: "api/payment/trait.Payment.html#method.status_subscribe",
|
|
402
|
+
description: "Subscribe to payment lifecycle updates for a specific payment.",
|
|
403
|
+
requestDescription: "HostPaymentStatusSubscribeRequest",
|
|
404
|
+
requestType: "host-payment-status-subscribe-request",
|
|
405
|
+
responseType: "host-payment-status-subscribe-item",
|
|
406
|
+
errorType: "host-payment-status-subscribe-error",
|
|
407
|
+
},
|
|
408
|
+
],
|
|
409
|
+
},
|
|
410
|
+
{
|
|
411
|
+
name: "Permissions",
|
|
412
|
+
methods: [
|
|
413
|
+
{
|
|
414
|
+
name: "request_device_permission",
|
|
415
|
+
type: "unary",
|
|
416
|
+
signature: "requestDevicePermission(request: HostDevicePermissionRequest): Promise<Result<HostDevicePermissionResponse, GenericError>>",
|
|
417
|
+
docUrl: "api/permissions/trait.Permissions.html#method.request_device_permission",
|
|
418
|
+
description: "Request a device-capability permission from the user.",
|
|
419
|
+
requestDescription: "Enum values: Notifications / Camera / Microphone / Bluetooth / NFC / Location / Clipboard / OpenUrl / Biometrics",
|
|
420
|
+
requestType: "host-device-permission-request",
|
|
421
|
+
responseType: "host-device-permission-response",
|
|
422
|
+
errorType: "generic-error",
|
|
423
|
+
},
|
|
424
|
+
{
|
|
425
|
+
name: "request_remote_permission",
|
|
426
|
+
type: "unary",
|
|
427
|
+
signature: "requestRemotePermission(request: RemotePermissionRequest): Promise<Result<RemotePermissionResponse, GenericError>>",
|
|
428
|
+
docUrl: "api/permissions/trait.Permissions.html#method.request_remote_permission",
|
|
429
|
+
description: "Request a remote-operation permission.",
|
|
430
|
+
requestDescription: "RemotePermissionRequest",
|
|
431
|
+
requestType: "remote-permission-request",
|
|
432
|
+
responseType: "remote-permission-response",
|
|
433
|
+
errorType: "generic-error",
|
|
434
|
+
},
|
|
435
|
+
],
|
|
436
|
+
},
|
|
437
|
+
{
|
|
438
|
+
name: "Preimage",
|
|
439
|
+
methods: [
|
|
440
|
+
{
|
|
441
|
+
name: "lookup_subscribe",
|
|
442
|
+
type: "subscription",
|
|
443
|
+
signature: "lookupSubscribe(request: RemotePreimageLookupSubscribeRequest): ObservableLike<RemotePreimageLookupSubscribeItem>",
|
|
444
|
+
docUrl: "api/preimage/trait.Preimage.html#method.lookup_subscribe",
|
|
445
|
+
description: "Subscribe to preimage lookups for a given key.",
|
|
446
|
+
requestDescription: "RemotePreimageLookupSubscribeRequest",
|
|
447
|
+
requestType: "remote-preimage-lookup-subscribe-request",
|
|
448
|
+
responseType: "remote-preimage-lookup-subscribe-item",
|
|
449
|
+
},
|
|
450
|
+
{
|
|
451
|
+
name: "submit",
|
|
452
|
+
type: "unary",
|
|
453
|
+
signature: "submit(request: HexString): Promise<Result<HexString, PreimageSubmitError>>",
|
|
454
|
+
docUrl: "api/preimage/trait.Preimage.html#method.submit",
|
|
455
|
+
description: "Submit a preimage. Returns the preimage key (hash) on success.",
|
|
456
|
+
requestDescription: "HexString",
|
|
457
|
+
errorType: "preimage-submit-error",
|
|
458
|
+
},
|
|
459
|
+
],
|
|
460
|
+
},
|
|
461
|
+
{
|
|
462
|
+
name: "Resource Allocation",
|
|
463
|
+
methods: [
|
|
464
|
+
{
|
|
465
|
+
name: "request",
|
|
466
|
+
type: "unary",
|
|
467
|
+
signature: "request(request: HostRequestResourceAllocationRequest): Promise<Result<HostRequestResourceAllocationResponse, ResourceAllocationError>>",
|
|
468
|
+
docUrl: "api/resource_allocation/trait.ResourceAllocation.html#method.request",
|
|
469
|
+
description: "Request the host to pre-allocate one or more resources.",
|
|
470
|
+
requestDescription: "HostRequestResourceAllocationRequest",
|
|
471
|
+
requestType: "host-request-resource-allocation-request",
|
|
472
|
+
responseType: "host-request-resource-allocation-response",
|
|
473
|
+
errorType: "resource-allocation-error",
|
|
474
|
+
},
|
|
475
|
+
],
|
|
476
|
+
},
|
|
477
|
+
{
|
|
478
|
+
name: "Signing",
|
|
479
|
+
methods: [
|
|
480
|
+
{
|
|
481
|
+
name: "create_transaction",
|
|
482
|
+
type: "unary",
|
|
483
|
+
signature: "createTransaction(request: ProductAccountTxPayload): Promise<Result<HostCreateTransactionResponse, HostCreateTransactionError>>",
|
|
484
|
+
docUrl: "api/signing/trait.Signing.html#method.create_transaction",
|
|
485
|
+
description: "Construct a signed transaction for a product account.",
|
|
486
|
+
requestDescription: "ProductAccountTxPayload",
|
|
487
|
+
requestType: "product-account-tx-payload",
|
|
488
|
+
responseType: "host-create-transaction-response",
|
|
489
|
+
errorType: "host-create-transaction-error",
|
|
490
|
+
},
|
|
491
|
+
{
|
|
492
|
+
name: "create_transaction_with_legacy_account",
|
|
493
|
+
type: "unary",
|
|
494
|
+
signature: "createTransactionWithLegacyAccount(request: LegacyAccountTxPayload): Promise<Result<HostCreateTransactionWithLegacyAccountResponse, HostCreateTransactionError>>",
|
|
495
|
+
docUrl: "api/signing/trait.Signing.html#method.create_transaction_with_legacy_account",
|
|
496
|
+
description: "Construct a signed transaction for a non-product (legacy) account.",
|
|
497
|
+
requestDescription: "LegacyAccountTxPayload",
|
|
498
|
+
requestType: "legacy-account-tx-payload",
|
|
499
|
+
responseType: "host-create-transaction-with-legacy-account-response",
|
|
500
|
+
errorType: "host-create-transaction-error",
|
|
501
|
+
},
|
|
502
|
+
{
|
|
503
|
+
name: "sign_raw_with_legacy_account",
|
|
504
|
+
type: "unary",
|
|
505
|
+
signature: "signRawWithLegacyAccount(request: HostSignRawWithLegacyAccountRequest): Promise<Result<HostSignPayloadResponse, HostSignPayloadError>>",
|
|
506
|
+
docUrl: "api/signing/trait.Signing.html#method.sign_raw_with_legacy_account",
|
|
507
|
+
description: "Sign raw bytes with a non-product account.",
|
|
508
|
+
requestDescription: "HostSignRawWithLegacyAccountRequest",
|
|
509
|
+
requestType: "host-sign-raw-with-legacy-account-request",
|
|
510
|
+
responseType: "host-sign-payload-response",
|
|
511
|
+
errorType: "host-sign-payload-error",
|
|
512
|
+
},
|
|
513
|
+
{
|
|
514
|
+
name: "sign_payload_with_legacy_account",
|
|
515
|
+
type: "unary",
|
|
516
|
+
signature: "signPayloadWithLegacyAccount(request: HostSignPayloadWithLegacyAccountRequest): Promise<Result<HostSignPayloadResponse, HostSignPayloadError>>",
|
|
517
|
+
docUrl: "api/signing/trait.Signing.html#method.sign_payload_with_legacy_account",
|
|
518
|
+
description: "Sign an extrinsic payload with a non-product account.",
|
|
519
|
+
requestDescription: "HostSignPayloadWithLegacyAccountRequest",
|
|
520
|
+
requestType: "host-sign-payload-with-legacy-account-request",
|
|
521
|
+
responseType: "host-sign-payload-response",
|
|
522
|
+
errorType: "host-sign-payload-error",
|
|
523
|
+
},
|
|
524
|
+
{
|
|
525
|
+
name: "sign_raw",
|
|
526
|
+
type: "unary",
|
|
527
|
+
signature: "signRaw(request: HostSignRawRequest): Promise<Result<HostSignPayloadResponse, HostSignPayloadError>>",
|
|
528
|
+
docUrl: "api/signing/trait.Signing.html#method.sign_raw",
|
|
529
|
+
description: "Sign raw bytes or a message.",
|
|
530
|
+
requestDescription: "HostSignRawRequest",
|
|
531
|
+
requestType: "host-sign-raw-request",
|
|
532
|
+
responseType: "host-sign-payload-response",
|
|
533
|
+
errorType: "host-sign-payload-error",
|
|
534
|
+
},
|
|
535
|
+
{
|
|
536
|
+
name: "sign_payload",
|
|
537
|
+
type: "unary",
|
|
538
|
+
signature: "signPayload(request: HostSignPayloadRequest): Promise<Result<HostSignPayloadResponse, HostSignPayloadError>>",
|
|
539
|
+
docUrl: "api/signing/trait.Signing.html#method.sign_payload",
|
|
540
|
+
description: "Sign an extrinsic payload.",
|
|
541
|
+
requestDescription: "HostSignPayloadRequest",
|
|
542
|
+
requestType: "host-sign-payload-request",
|
|
543
|
+
responseType: "host-sign-payload-response",
|
|
544
|
+
errorType: "host-sign-payload-error",
|
|
545
|
+
},
|
|
546
|
+
],
|
|
547
|
+
},
|
|
548
|
+
{
|
|
549
|
+
name: "Statement Store",
|
|
550
|
+
methods: [
|
|
551
|
+
{
|
|
552
|
+
name: "subscribe",
|
|
553
|
+
type: "subscription",
|
|
554
|
+
signature: "subscribe(request: RemoteStatementStoreSubscribeRequest): ObservableLike<RemoteStatementStoreSubscribeItem>",
|
|
555
|
+
docUrl: "api/statement_store/trait.StatementStore.html#method.subscribe",
|
|
556
|
+
description: "Subscribe to statements matching a topic filter.",
|
|
557
|
+
requestDescription: "RemoteStatementStoreSubscribeRequest",
|
|
558
|
+
requestType: "remote-statement-store-subscribe-request",
|
|
559
|
+
responseType: "remote-statement-store-subscribe-item",
|
|
560
|
+
},
|
|
561
|
+
{
|
|
562
|
+
name: "create_proof",
|
|
563
|
+
type: "unary",
|
|
564
|
+
signature: "createProof(request: RemoteStatementStoreCreateProofRequest): Promise<Result<RemoteStatementStoreCreateProofResponse, RemoteStatementStoreCreateProofError>>",
|
|
565
|
+
docUrl: "api/statement_store/trait.StatementStore.html#method.create_proof",
|
|
566
|
+
description: "Create a proof for a statement.\n\n**Deprecated:** use [`create_proof_authorized`](Self::create_proof_authorized)\ninstead, which uses a pre-allocated allowance account and does not\nrequire a per-call signing prompt.",
|
|
567
|
+
requestDescription: "RemoteStatementStoreCreateProofRequest",
|
|
568
|
+
requestType: "remote-statement-store-create-proof-request",
|
|
569
|
+
responseType: "remote-statement-store-create-proof-response",
|
|
570
|
+
errorType: "remote-statement-store-create-proof-error",
|
|
571
|
+
},
|
|
572
|
+
{
|
|
573
|
+
name: "submit",
|
|
574
|
+
type: "unary",
|
|
575
|
+
signature: "submit(request: SignedStatement): Promise<Result<undefined, GenericError>>",
|
|
576
|
+
docUrl: "api/statement_store/trait.StatementStore.html#method.submit",
|
|
577
|
+
description: "Submit a signed statement to the network. The request body is the\n[`SignedStatement`](crate::v01::SignedStatement) directly (no wrapping\nstruct), matching upstream `triangle-js-sdks`.",
|
|
578
|
+
requestDescription: "SignedStatement",
|
|
579
|
+
requestType: "signed-statement",
|
|
580
|
+
errorType: "generic-error",
|
|
581
|
+
},
|
|
582
|
+
{
|
|
583
|
+
name: "create_proof_authorized",
|
|
584
|
+
type: "unary",
|
|
585
|
+
signature: "createProofAuthorized(request: Statement): Promise<Result<RemoteStatementStoreCreateProofResponse, RemoteStatementStoreCreateProofError>>",
|
|
586
|
+
docUrl: "api/statement_store/trait.StatementStore.html#method.create_proof_authorized",
|
|
587
|
+
description: "Create a proof for a statement using a pre-allocated allowance account,\nbypassing the per-call signing prompt.",
|
|
588
|
+
requestDescription: "Statement",
|
|
589
|
+
requestType: "statement",
|
|
590
|
+
responseType: "remote-statement-store-create-proof-response",
|
|
591
|
+
errorType: "remote-statement-store-create-proof-error",
|
|
592
|
+
},
|
|
593
|
+
],
|
|
594
|
+
},
|
|
595
|
+
{
|
|
596
|
+
name: "System",
|
|
597
|
+
methods: [
|
|
598
|
+
{
|
|
599
|
+
name: "handshake",
|
|
600
|
+
type: "unary",
|
|
601
|
+
signature: "handshake(request: HostHandshakeRequest): Promise<Result<undefined, HostHandshakeError>>",
|
|
602
|
+
docUrl: "api/system/trait.System.html#method.handshake",
|
|
603
|
+
description: "Negotiate the wire codec version with the product.",
|
|
604
|
+
requestDescription: "HostHandshakeRequest",
|
|
605
|
+
requestType: "host-handshake-request",
|
|
606
|
+
errorType: "host-handshake-error",
|
|
607
|
+
},
|
|
608
|
+
{
|
|
609
|
+
name: "feature_supported",
|
|
610
|
+
type: "unary",
|
|
611
|
+
signature: "featureSupported(request: HostFeatureSupportedRequest): Promise<Result<HostFeatureSupportedResponse, GenericError>>",
|
|
612
|
+
docUrl: "api/system/trait.System.html#method.feature_supported",
|
|
613
|
+
description: "Query whether the host supports a specific feature.",
|
|
614
|
+
requestDescription: "HostFeatureSupportedRequest",
|
|
615
|
+
requestType: "host-feature-supported-request",
|
|
616
|
+
responseType: "host-feature-supported-response",
|
|
617
|
+
errorType: "generic-error",
|
|
618
|
+
},
|
|
619
|
+
{
|
|
620
|
+
name: "navigate_to",
|
|
621
|
+
type: "unary",
|
|
622
|
+
signature: "navigateTo(request: HostNavigateToRequest): Promise<Result<undefined, HostNavigateToError>>",
|
|
623
|
+
docUrl: "api/system/trait.System.html#method.navigate_to",
|
|
624
|
+
description: "Request the host to open a URL.",
|
|
625
|
+
requestDescription: "HostNavigateToRequest",
|
|
626
|
+
requestType: "host-navigate-to-request",
|
|
627
|
+
errorType: "host-navigate-to-error",
|
|
628
|
+
},
|
|
629
|
+
],
|
|
630
|
+
},
|
|
631
|
+
{
|
|
632
|
+
name: "Theme",
|
|
633
|
+
methods: [
|
|
634
|
+
{
|
|
635
|
+
name: "subscribe",
|
|
636
|
+
type: "subscription",
|
|
637
|
+
signature: "subscribe(): ObservableLike<HostThemeSubscribeItem>",
|
|
638
|
+
docUrl: "api/theme/trait.Theme.html#method.subscribe",
|
|
639
|
+
description: "Subscribe to host theme changes.",
|
|
640
|
+
responseType: "host-theme-subscribe-item",
|
|
641
|
+
},
|
|
642
|
+
],
|
|
643
|
+
},
|
|
644
|
+
];
|