@parity/truapi 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,246 @@
1
+ export declare const SYSTEM_HANDSHAKE: {
2
+ readonly request: 0;
3
+ readonly response: 1;
4
+ };
5
+ export declare const SYSTEM_FEATURE_SUPPORTED: {
6
+ readonly request: 2;
7
+ readonly response: 3;
8
+ };
9
+ export declare const SYSTEM_PUSH_NOTIFICATION: {
10
+ readonly request: 4;
11
+ readonly response: 5;
12
+ };
13
+ export declare const SYSTEM_NAVIGATE_TO: {
14
+ readonly request: 6;
15
+ readonly response: 7;
16
+ };
17
+ export declare const PERMISSIONS_REQUEST_DEVICE_PERMISSION: {
18
+ readonly request: 8;
19
+ readonly response: 9;
20
+ };
21
+ export declare const PERMISSIONS_REQUEST_REMOTE_PERMISSION: {
22
+ readonly request: 10;
23
+ readonly response: 11;
24
+ };
25
+ export declare const LOCAL_STORAGE_READ: {
26
+ readonly request: 12;
27
+ readonly response: 13;
28
+ };
29
+ export declare const LOCAL_STORAGE_WRITE: {
30
+ readonly request: 14;
31
+ readonly response: 15;
32
+ };
33
+ export declare const LOCAL_STORAGE_CLEAR: {
34
+ readonly request: 16;
35
+ readonly response: 17;
36
+ };
37
+ export declare const ACCOUNT_CONNECTION_STATUS_SUBSCRIBE: {
38
+ readonly start: 18;
39
+ readonly stop: 19;
40
+ readonly interrupt: 20;
41
+ readonly receive: 21;
42
+ };
43
+ export declare const ACCOUNT_GET_ACCOUNT: {
44
+ readonly request: 22;
45
+ readonly response: 23;
46
+ };
47
+ export declare const ACCOUNT_GET_ACCOUNT_ALIAS: {
48
+ readonly request: 24;
49
+ readonly response: 25;
50
+ };
51
+ export declare const ACCOUNT_CREATE_ACCOUNT_PROOF: {
52
+ readonly request: 26;
53
+ readonly response: 27;
54
+ };
55
+ export declare const ACCOUNT_GET_LEGACY_ACCOUNTS: {
56
+ readonly request: 28;
57
+ readonly response: 29;
58
+ };
59
+ export declare const SIGNING_CREATE_TRANSACTION: {
60
+ readonly request: 30;
61
+ readonly response: 31;
62
+ };
63
+ export declare const SIGNING_CREATE_TRANSACTION_WITH_LEGACY_ACCOUNT: {
64
+ readonly request: 32;
65
+ readonly response: 33;
66
+ };
67
+ export declare const SIGNING_SIGN_RAW_WITH_LEGACY_ACCOUNT: {
68
+ readonly request: 34;
69
+ readonly response: 35;
70
+ };
71
+ export declare const SIGNING_SIGN_PAYLOAD_WITH_LEGACY_ACCOUNT: {
72
+ readonly request: 36;
73
+ readonly response: 37;
74
+ };
75
+ export declare const CHAT_CREATE_ROOM: {
76
+ readonly request: 38;
77
+ readonly response: 39;
78
+ };
79
+ export declare const CHAT_REGISTER_BOT: {
80
+ readonly request: 40;
81
+ readonly response: 41;
82
+ };
83
+ export declare const CHAT_LIST_SUBSCRIBE: {
84
+ readonly start: 42;
85
+ readonly stop: 43;
86
+ readonly interrupt: 44;
87
+ readonly receive: 45;
88
+ };
89
+ export declare const CHAT_POST_MESSAGE: {
90
+ readonly request: 46;
91
+ readonly response: 47;
92
+ };
93
+ export declare const CHAT_ACTION_SUBSCRIBE: {
94
+ readonly start: 48;
95
+ readonly stop: 49;
96
+ readonly interrupt: 50;
97
+ readonly receive: 51;
98
+ };
99
+ export declare const CHAT_CUSTOM_MESSAGE_RENDER_SUBSCRIBE: {
100
+ readonly start: 52;
101
+ readonly stop: 53;
102
+ readonly interrupt: 54;
103
+ readonly receive: 55;
104
+ };
105
+ export declare const STATEMENT_STORE_SUBSCRIBE: {
106
+ readonly start: 56;
107
+ readonly stop: 57;
108
+ readonly interrupt: 58;
109
+ readonly receive: 59;
110
+ };
111
+ export declare const STATEMENT_STORE_CREATE_PROOF: {
112
+ readonly request: 60;
113
+ readonly response: 61;
114
+ };
115
+ export declare const STATEMENT_STORE_SUBMIT: {
116
+ readonly request: 62;
117
+ readonly response: 63;
118
+ };
119
+ export declare const PREIMAGE_LOOKUP_SUBSCRIBE: {
120
+ readonly start: 64;
121
+ readonly stop: 65;
122
+ readonly interrupt: 66;
123
+ readonly receive: 67;
124
+ };
125
+ export declare const PREIMAGE_SUBMIT: {
126
+ readonly request: 68;
127
+ readonly response: 69;
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
+ export declare const CHAIN_FOLLOW_HEAD_SUBSCRIBE: {
140
+ readonly start: 76;
141
+ readonly stop: 77;
142
+ readonly interrupt: 78;
143
+ readonly receive: 79;
144
+ };
145
+ export declare const CHAIN_GET_HEAD_HEADER: {
146
+ readonly request: 80;
147
+ readonly response: 81;
148
+ };
149
+ export declare const CHAIN_GET_HEAD_BODY: {
150
+ readonly request: 82;
151
+ readonly response: 83;
152
+ };
153
+ export declare const CHAIN_GET_HEAD_STORAGE: {
154
+ readonly request: 84;
155
+ readonly response: 85;
156
+ };
157
+ export declare const CHAIN_CALL_HEAD: {
158
+ readonly request: 86;
159
+ readonly response: 87;
160
+ };
161
+ export declare const CHAIN_UNPIN_HEAD: {
162
+ readonly request: 88;
163
+ readonly response: 89;
164
+ };
165
+ export declare const CHAIN_CONTINUE_HEAD: {
166
+ readonly request: 90;
167
+ readonly response: 91;
168
+ };
169
+ export declare const CHAIN_STOP_HEAD_OPERATION: {
170
+ readonly request: 92;
171
+ readonly response: 93;
172
+ };
173
+ export declare const CHAIN_GET_SPEC_GENESIS_HASH: {
174
+ readonly request: 94;
175
+ readonly response: 95;
176
+ };
177
+ export declare const CHAIN_GET_SPEC_CHAIN_NAME: {
178
+ readonly request: 96;
179
+ readonly response: 97;
180
+ };
181
+ export declare const CHAIN_GET_SPEC_PROPERTIES: {
182
+ readonly request: 98;
183
+ readonly response: 99;
184
+ };
185
+ export declare const CHAIN_BROADCAST_TRANSACTION: {
186
+ readonly request: 100;
187
+ readonly response: 101;
188
+ };
189
+ export declare const CHAIN_STOP_TRANSACTION: {
190
+ readonly request: 102;
191
+ readonly response: 103;
192
+ };
193
+ export declare const THEME_SUBSCRIBE: {
194
+ readonly start: 104;
195
+ readonly stop: 105;
196
+ readonly interrupt: 106;
197
+ readonly receive: 107;
198
+ };
199
+ export declare const ENTROPY_DERIVE: {
200
+ readonly request: 108;
201
+ readonly response: 109;
202
+ };
203
+ export declare const ACCOUNT_GET_USER_ID: {
204
+ readonly request: 110;
205
+ readonly response: 111;
206
+ };
207
+ export declare const ACCOUNT_REQUEST_LOGIN: {
208
+ readonly request: 112;
209
+ readonly response: 113;
210
+ };
211
+ export declare const SIGNING_SIGN_RAW: {
212
+ readonly request: 114;
213
+ readonly response: 115;
214
+ };
215
+ export declare const SIGNING_SIGN_PAYLOAD: {
216
+ readonly request: 116;
217
+ readonly response: 117;
218
+ };
219
+ export declare const PAYMENT_BALANCE_SUBSCRIBE: {
220
+ readonly start: 118;
221
+ readonly stop: 119;
222
+ readonly interrupt: 120;
223
+ readonly receive: 121;
224
+ };
225
+ export declare const PAYMENT_TOP_UP: {
226
+ readonly request: 122;
227
+ readonly response: 123;
228
+ };
229
+ export declare const PAYMENT_REQUEST: {
230
+ readonly request: 124;
231
+ readonly response: 125;
232
+ };
233
+ export declare const PAYMENT_STATUS_SUBSCRIBE: {
234
+ readonly start: 126;
235
+ readonly stop: 127;
236
+ readonly interrupt: 128;
237
+ readonly receive: 129;
238
+ };
239
+ export declare const RESOURCE_ALLOCATION_REQUEST: {
240
+ readonly request: 130;
241
+ readonly response: 131;
242
+ };
243
+ export declare const STATEMENT_STORE_CREATE_PROOF_AUTHORIZED: {
244
+ readonly request: 132;
245
+ readonly response: 133;
246
+ };
@@ -0,0 +1,249 @@
1
+ // Auto-generated by truapi-codegen. Do not edit.
2
+ // Wire-protocol discriminants. Method ordering is part of the
3
+ // protocol; only ever append or explicitly reserve gaps.
4
+ export const SYSTEM_HANDSHAKE = {
5
+ request: 0,
6
+ response: 1,
7
+ };
8
+ export const SYSTEM_FEATURE_SUPPORTED = {
9
+ request: 2,
10
+ response: 3,
11
+ };
12
+ export const SYSTEM_PUSH_NOTIFICATION = {
13
+ request: 4,
14
+ response: 5,
15
+ };
16
+ export const SYSTEM_NAVIGATE_TO = {
17
+ request: 6,
18
+ response: 7,
19
+ };
20
+ export const PERMISSIONS_REQUEST_DEVICE_PERMISSION = {
21
+ request: 8,
22
+ response: 9,
23
+ };
24
+ export const PERMISSIONS_REQUEST_REMOTE_PERMISSION = {
25
+ request: 10,
26
+ response: 11,
27
+ };
28
+ export const LOCAL_STORAGE_READ = {
29
+ request: 12,
30
+ response: 13,
31
+ };
32
+ export const LOCAL_STORAGE_WRITE = {
33
+ request: 14,
34
+ response: 15,
35
+ };
36
+ export const LOCAL_STORAGE_CLEAR = {
37
+ request: 16,
38
+ response: 17,
39
+ };
40
+ export const ACCOUNT_CONNECTION_STATUS_SUBSCRIBE = {
41
+ start: 18,
42
+ stop: 19,
43
+ interrupt: 20,
44
+ receive: 21,
45
+ };
46
+ export const ACCOUNT_GET_ACCOUNT = {
47
+ request: 22,
48
+ response: 23,
49
+ };
50
+ export const ACCOUNT_GET_ACCOUNT_ALIAS = {
51
+ request: 24,
52
+ response: 25,
53
+ };
54
+ export const ACCOUNT_CREATE_ACCOUNT_PROOF = {
55
+ request: 26,
56
+ response: 27,
57
+ };
58
+ export const ACCOUNT_GET_LEGACY_ACCOUNTS = {
59
+ request: 28,
60
+ response: 29,
61
+ };
62
+ export const SIGNING_CREATE_TRANSACTION = {
63
+ request: 30,
64
+ response: 31,
65
+ };
66
+ export const SIGNING_CREATE_TRANSACTION_WITH_LEGACY_ACCOUNT = {
67
+ request: 32,
68
+ response: 33,
69
+ };
70
+ export const SIGNING_SIGN_RAW_WITH_LEGACY_ACCOUNT = {
71
+ request: 34,
72
+ response: 35,
73
+ };
74
+ export const SIGNING_SIGN_PAYLOAD_WITH_LEGACY_ACCOUNT = {
75
+ request: 36,
76
+ response: 37,
77
+ };
78
+ export const CHAT_CREATE_ROOM = {
79
+ request: 38,
80
+ response: 39,
81
+ };
82
+ export const CHAT_REGISTER_BOT = {
83
+ request: 40,
84
+ response: 41,
85
+ };
86
+ export const CHAT_LIST_SUBSCRIBE = {
87
+ start: 42,
88
+ stop: 43,
89
+ interrupt: 44,
90
+ receive: 45,
91
+ };
92
+ export const CHAT_POST_MESSAGE = {
93
+ request: 46,
94
+ response: 47,
95
+ };
96
+ export const CHAT_ACTION_SUBSCRIBE = {
97
+ start: 48,
98
+ stop: 49,
99
+ interrupt: 50,
100
+ receive: 51,
101
+ };
102
+ export const CHAT_CUSTOM_MESSAGE_RENDER_SUBSCRIBE = {
103
+ start: 52,
104
+ stop: 53,
105
+ interrupt: 54,
106
+ receive: 55,
107
+ };
108
+ export const STATEMENT_STORE_SUBSCRIBE = {
109
+ start: 56,
110
+ stop: 57,
111
+ interrupt: 58,
112
+ receive: 59,
113
+ };
114
+ export const STATEMENT_STORE_CREATE_PROOF = {
115
+ request: 60,
116
+ response: 61,
117
+ };
118
+ export const STATEMENT_STORE_SUBMIT = {
119
+ request: 62,
120
+ response: 63,
121
+ };
122
+ export const PREIMAGE_LOOKUP_SUBSCRIBE = {
123
+ start: 64,
124
+ stop: 65,
125
+ interrupt: 66,
126
+ receive: 67,
127
+ };
128
+ export const PREIMAGE_SUBMIT = {
129
+ request: 68,
130
+ response: 69,
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
+ export const CHAIN_FOLLOW_HEAD_SUBSCRIBE = {
143
+ start: 76,
144
+ stop: 77,
145
+ interrupt: 78,
146
+ receive: 79,
147
+ };
148
+ export const CHAIN_GET_HEAD_HEADER = {
149
+ request: 80,
150
+ response: 81,
151
+ };
152
+ export const CHAIN_GET_HEAD_BODY = {
153
+ request: 82,
154
+ response: 83,
155
+ };
156
+ export const CHAIN_GET_HEAD_STORAGE = {
157
+ request: 84,
158
+ response: 85,
159
+ };
160
+ export const CHAIN_CALL_HEAD = {
161
+ request: 86,
162
+ response: 87,
163
+ };
164
+ export const CHAIN_UNPIN_HEAD = {
165
+ request: 88,
166
+ response: 89,
167
+ };
168
+ export const CHAIN_CONTINUE_HEAD = {
169
+ request: 90,
170
+ response: 91,
171
+ };
172
+ export const CHAIN_STOP_HEAD_OPERATION = {
173
+ request: 92,
174
+ response: 93,
175
+ };
176
+ export const CHAIN_GET_SPEC_GENESIS_HASH = {
177
+ request: 94,
178
+ response: 95,
179
+ };
180
+ export const CHAIN_GET_SPEC_CHAIN_NAME = {
181
+ request: 96,
182
+ response: 97,
183
+ };
184
+ export const CHAIN_GET_SPEC_PROPERTIES = {
185
+ request: 98,
186
+ response: 99,
187
+ };
188
+ export const CHAIN_BROADCAST_TRANSACTION = {
189
+ request: 100,
190
+ response: 101,
191
+ };
192
+ export const CHAIN_STOP_TRANSACTION = {
193
+ request: 102,
194
+ response: 103,
195
+ };
196
+ export const THEME_SUBSCRIBE = {
197
+ start: 104,
198
+ stop: 105,
199
+ interrupt: 106,
200
+ receive: 107,
201
+ };
202
+ export const ENTROPY_DERIVE = {
203
+ request: 108,
204
+ response: 109,
205
+ };
206
+ export const ACCOUNT_GET_USER_ID = {
207
+ request: 110,
208
+ response: 111,
209
+ };
210
+ export const ACCOUNT_REQUEST_LOGIN = {
211
+ request: 112,
212
+ response: 113,
213
+ };
214
+ export const SIGNING_SIGN_RAW = {
215
+ request: 114,
216
+ response: 115,
217
+ };
218
+ export const SIGNING_SIGN_PAYLOAD = {
219
+ request: 116,
220
+ response: 117,
221
+ };
222
+ export const PAYMENT_BALANCE_SUBSCRIBE = {
223
+ start: 118,
224
+ stop: 119,
225
+ interrupt: 120,
226
+ receive: 121,
227
+ };
228
+ export const PAYMENT_TOP_UP = {
229
+ request: 122,
230
+ response: 123,
231
+ };
232
+ export const PAYMENT_REQUEST = {
233
+ request: 124,
234
+ response: 125,
235
+ };
236
+ export const PAYMENT_STATUS_SUBSCRIBE = {
237
+ start: 126,
238
+ stop: 127,
239
+ interrupt: 128,
240
+ receive: 129,
241
+ };
242
+ export const RESOURCE_ALLOCATION_REQUEST = {
243
+ request: 130,
244
+ response: 131,
245
+ };
246
+ export const STATEMENT_STORE_CREATE_PROOF_AUTHORIZED = {
247
+ request: 132,
248
+ response: 133,
249
+ };
@@ -0,0 +1,7 @@
1
+ export type { ObservableLike, Observer, Payload, Provider, ProtocolMessage, RequestFrameIds, RequestParams, SubscriptionFrameIds, Subscription, SubscribeRawParams, TrUApiTransport, } from "./transport.js";
2
+ export type { CreateTransportOptions } from "./client.js";
3
+ export { SubscriptionError, createMessagePortProvider } from "./transport.js";
4
+ export { createTransport } from "./client.js";
5
+ export * as scale from "./scale.js";
6
+ export type { Codec, HexString } from "./scale.js";
7
+ export * from "./generated/index.js";
package/dist/index.js ADDED
@@ -0,0 +1,4 @@
1
+ export { SubscriptionError, createMessagePortProvider } from "./transport.js";
2
+ export { createTransport } from "./client.js";
3
+ export * as scale from "./scale.js";
4
+ export * from "./generated/index.js";
@@ -0,0 +1,2 @@
1
+ import type { ServiceInfo } from "../services-types.js";
2
+ export declare const services: ServiceInfo[];