@locuschain/lib 0.1.38 → 0.1.40
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/accounts/index.amd.js +306 -0
- package/dist/accounts/index.cjs.cjs +2 -2
- package/dist/accounts/index.esm.js +2 -2
- package/dist/autogen/index.amd.js +151 -0
- package/dist/autogen/index.cjs.cjs +2 -2
- package/dist/autogen/index.esm.js +2 -2
- package/dist/chunks/account-BSrvZ7S8.js +77 -0
- package/dist/chunks/address-class-Dp7aNQb2.js +18 -0
- package/dist/chunks/base-B_kRRfsf.js +27 -0
- package/dist/chunks/debugWalletActions-BDz-h2tl.js +993 -0
- package/dist/chunks/{keystore-BFVSylSw.js → keystore-B86UzV8A.js} +1 -1
- package/dist/chunks/{keystore-BbK5pVrh.cjs → keystore-BUskzeOs.cjs} +1 -1
- package/dist/chunks/keystore-y1JlFTKh.js +143 -0
- package/dist/chunks/lclib-Bv86gksL.js +3861 -0
- package/dist/chunks/{lclib-C2eG5HzD.js → lclib-j2x9RvDY.js} +55 -32
- package/dist/chunks/{lclib-DuoOR0-Q.cjs → lclib-rGyKpClJ.cjs} +64 -41
- package/dist/chunks/rpc-C4n7t9y0.js +25 -0
- package/dist/chunks/transport-BBAz1kmP.js +30 -0
- package/dist/chunks/tslib.es6-D29rxPkW.js +37 -0
- package/dist/chunks/tx-type-CS4wIUJ8.js +68 -0
- package/dist/chunks/{wasm-DTyHBxcY.cjs → wasm-BYOKRR31.cjs} +1 -1
- package/dist/chunks/{wasm-BtPcXTR4.js → wasm-CLXJDrJA.js} +1 -1
- package/dist/chunks/wasm-CkFW222S.js +213 -0
- package/dist/clients/index.amd.js +97 -0
- package/dist/clients/index.cjs.cjs +1 -1
- package/dist/clients/index.esm.js +1 -1
- package/dist/constant/index.amd.js +458 -0
- package/dist/contracts/index.amd.js +19640 -0
- package/dist/contracts/index.cjs.cjs +2 -2
- package/dist/contracts/index.esm.js +2 -2
- package/dist/errors/index.amd.js +17 -0
- package/dist/index.amd.js +43 -0
- package/dist/index.cjs.cjs +3 -3
- package/dist/index.esm.js +3 -3
- package/dist/transports/index.amd.js +98 -0
- package/dist/utils/index.amd.js +353 -0
- package/dist/utils/index.cjs.cjs +3 -3
- package/dist/utils/index.esm.js +4 -4
- package/dist/vite-plugin/index.amd.js +186 -0
- package/dist/vite-plugin/index.cjs.cjs +189 -0
- package/dist/vite-plugin/index.d.cts +46 -0
- package/dist/vite-plugin/index.d.mts +46 -0
- package/dist/vite-plugin/index.esm.js +183 -0
- package/dist/webpack-plugin/index.amd.js +101 -0
- package/dist/webpack-plugin/index.cjs.cjs +104 -0
- package/dist/webpack-plugin/index.d.cts +46 -0
- package/dist/webpack-plugin/index.d.mts +46 -0
- package/dist/webpack-plugin/index.esm.js +98 -0
- package/package.json +36 -6
- package/dist/index.umd.d.mts +0 -15
- package/dist/umd/index.umd.js +0 -26296
|
@@ -0,0 +1,993 @@
|
|
|
1
|
+
define(['exports', './tslib.es6-D29rxPkW', './rpc-C4n7t9y0', './account-BSrvZ7S8'], (function (exports, tslib_es6, rpc, account) { 'use strict';
|
|
2
|
+
|
|
3
|
+
// Automatically generated file. DO NOT EDIT.
|
|
4
|
+
function accountHeightsToDownload(client, param) {
|
|
5
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
6
|
+
return client.request({ method: 'locus_accountHeightsToDownload', params: [param] });
|
|
7
|
+
});
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
// Automatically generated file. DO NOT EDIT.
|
|
11
|
+
function accountHeightsToUpload(client, param) {
|
|
12
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
13
|
+
return client.request({ method: 'locus_accountHeightsToUpload', params: [param] });
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
// Automatically generated file. DO NOT EDIT.
|
|
18
|
+
function calculateSpentByExpress(client, param) {
|
|
19
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
20
|
+
return client.request({ method: 'locus_calculateSpentByExpress', params: [param] });
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// Automatically generated file. DO NOT EDIT.
|
|
25
|
+
function clientMessage(client, param) {
|
|
26
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
27
|
+
return client.request({ method: 'locus_clientMessage', params: [param] });
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
// Automatically generated file. DO NOT EDIT.
|
|
32
|
+
function downloadAccountTxs(client, param) {
|
|
33
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
34
|
+
return client.request({ method: 'locus_downloadAccountTxs', params: [param] });
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// Automatically generated file. DO NOT EDIT.
|
|
39
|
+
function echo$1(client, str) {
|
|
40
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
41
|
+
return client.request({ method: 'locus_echo', params: [str] });
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// Automatically generated file. DO NOT EDIT.
|
|
46
|
+
function findDuplicateSubscriber(client, params) {
|
|
47
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
48
|
+
return client.request({ method: 'locus_findDuplicateSubscriber', params: [params] });
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// Automatically generated file. DO NOT EDIT.
|
|
53
|
+
function generateLatestStoredDataProof(client, params) {
|
|
54
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
55
|
+
return client.request({ method: 'locus_generateLatestStoredDataProof', params: [params] });
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// Automatically generated file. DO NOT EDIT.
|
|
60
|
+
function getAccountAssetList(client, params) {
|
|
61
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
62
|
+
return client.request({ method: 'locus_getAccountAssetList', params: [params] });
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// Automatically generated file. DO NOT EDIT.
|
|
67
|
+
function getAccountAssetObject(client, params) {
|
|
68
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
69
|
+
return client.request({ method: 'locus_getAccountAssetObject', params: [params] });
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
// Automatically generated file. DO NOT EDIT.
|
|
74
|
+
function getAccountDetail(client, param) {
|
|
75
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
76
|
+
return client.request({ method: 'locus_getAccountDetail', params: [param] });
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// Automatically generated file. DO NOT EDIT.
|
|
81
|
+
function getAccountHistory(client, param) {
|
|
82
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
83
|
+
return client.request({ method: 'locus_getAccountHistory', params: [param] });
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
// Automatically generated file. DO NOT EDIT.
|
|
88
|
+
function getAccountTokenList(client, params) {
|
|
89
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
90
|
+
return client.request({ method: 'locus_getAccountTokenList', params: [params] });
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
// Automatically generated file. DO NOT EDIT.
|
|
95
|
+
function getConciseNodeStatus(client) {
|
|
96
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
97
|
+
return client.request({ method: 'locus_getConciseNodeStatus', params: [] });
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
// Automatically generated file. DO NOT EDIT.
|
|
102
|
+
function getGenesisAccount(client) {
|
|
103
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
104
|
+
return client.request({ method: 'locus_getGenesisAccount', params: [] });
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
// Automatically generated file. DO NOT EDIT.
|
|
109
|
+
function getIdentityProof(client, param) {
|
|
110
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
111
|
+
return client.request({ method: 'locus_getIdentityProof', params: [param] });
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
// Automatically generated file. DO NOT EDIT.
|
|
116
|
+
function getInactiveTxList(client, param) {
|
|
117
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
118
|
+
return client.request({ method: 'locus_getInactiveTxList', params: [param] });
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
// Automatically generated file. DO NOT EDIT.
|
|
123
|
+
function getMontInfoList(client, param) {
|
|
124
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
125
|
+
return client.request({ method: 'locus_getMontInfoList', params: [param] });
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
// Automatically generated file. DO NOT EDIT.
|
|
130
|
+
function getNodeStatus(client) {
|
|
131
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
132
|
+
return client.request({ method: 'locus_getNodeStatus', params: [] });
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
// Automatically generated file. DO NOT EDIT.
|
|
137
|
+
function getOwnerBalance(client) {
|
|
138
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
139
|
+
return client.request({ method: 'locus_getOwnerBalance', params: [] });
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
// Automatically generated file. DO NOT EDIT.
|
|
144
|
+
function getRoundState(client, param) {
|
|
145
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
146
|
+
return client.request({ method: 'locus_getRoundState', params: [param] });
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
// Automatically generated file. DO NOT EDIT.
|
|
151
|
+
function getRoundStatesList(client, param) {
|
|
152
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
153
|
+
return client.request({ method: 'locus_getRoundStatesList', params: [param] });
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
// Automatically generated file. DO NOT EDIT.
|
|
158
|
+
function getShardOfAccount(client, params) {
|
|
159
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
160
|
+
return client.request({ method: 'locus_getShardOfAccount', params: [params] });
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
// Automatically generated file. DO NOT EDIT.
|
|
165
|
+
function getSyncState(client) {
|
|
166
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
167
|
+
return client.request({ method: 'locus_getSyncState', params: [] });
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
// Automatically generated file. DO NOT EDIT.
|
|
172
|
+
function getTx(client, param) {
|
|
173
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
174
|
+
return client.request({ method: 'locus_getTx', params: [param] });
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
// Automatically generated file. DO NOT EDIT.
|
|
179
|
+
function getWorldRoundState(client, param) {
|
|
180
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
181
|
+
return client.request({ method: 'locus_getWorldRoundState', params: [param] });
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
// Automatically generated file. DO NOT EDIT.
|
|
186
|
+
function getWorldRoundStatesList(client, param) {
|
|
187
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
188
|
+
return client.request({ method: 'locus_getWorldRoundStatesList', params: [param] });
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
// Automatically generated file. DO NOT EDIT.
|
|
193
|
+
function hasSystemToken(client, params) {
|
|
194
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
195
|
+
return client.request({ method: 'locus_hasSystemToken', params: [params] });
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
// Automatically generated file. DO NOT EDIT.
|
|
200
|
+
function makeTxProof(client, params) {
|
|
201
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
202
|
+
return client.request({ method: 'locus_makeTxProof', params: [params] });
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
// Automatically generated file. DO NOT EDIT.
|
|
207
|
+
function queryAddress(client, params) {
|
|
208
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
209
|
+
return client.request({ method: 'locus_queryAddress', params: [params] });
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
// Automatically generated file. DO NOT EDIT.
|
|
214
|
+
function readTxListWitness(client, params) {
|
|
215
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
216
|
+
return client.request({ method: 'locus_readTxListWitness', params: [params] });
|
|
217
|
+
});
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
// Automatically generated file. DO NOT EDIT.
|
|
221
|
+
function setHost(client, param) {
|
|
222
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
223
|
+
return client.request({ method: 'locus_setHost', params: [param] });
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
// Automatically generated file. DO NOT EDIT.
|
|
228
|
+
function subscribeAddress(client, params) {
|
|
229
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
230
|
+
return client.request({ method: 'locus_subscribeAddress', params: [params] });
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
// Automatically generated file. DO NOT EDIT.
|
|
235
|
+
function uploadAccountTxs(client, param) {
|
|
236
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
237
|
+
return client.request({ method: 'locus_uploadAccountTxs', params: [param] });
|
|
238
|
+
});
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
// Automatically generated file. DO NOT EDIT.
|
|
242
|
+
function verifyAndSignChallenge(client, param) {
|
|
243
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
244
|
+
return client.request({ method: 'locus_verifyAndSignChallenge', params: [param] });
|
|
245
|
+
});
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
// Automatically generated file. DO NOT EDIT.
|
|
249
|
+
function verifyIdentityProof(client, param) {
|
|
250
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
251
|
+
return client.request({ method: 'locus_verifyIdentityProof', params: [param] });
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
// Automatically generated file. DO NOT EDIT.
|
|
256
|
+
function verifyLatestStoredDataProof(client, params) {
|
|
257
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
258
|
+
return client.request({ method: 'locus_verifyLatestStoredDataProof', params: [params] });
|
|
259
|
+
});
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
// Automatically generated file. DO NOT EDIT.
|
|
263
|
+
function verifyTxListWitness(client, params) {
|
|
264
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
265
|
+
return client.request({ method: 'locus_verifyTxListWitness', params: [params] });
|
|
266
|
+
});
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
// Automatically generated file. DO NOT EDIT.
|
|
270
|
+
const publicActions = (client) => ({
|
|
271
|
+
accountHeightsToDownload: (param) => accountHeightsToDownload(client, param),
|
|
272
|
+
accountHeightsToUpload: (param) => accountHeightsToUpload(client, param),
|
|
273
|
+
calculateSpentByExpress: (param) => calculateSpentByExpress(client, param),
|
|
274
|
+
clientMessage: (param) => clientMessage(client, param),
|
|
275
|
+
downloadAccountTxs: (param) => downloadAccountTxs(client, param),
|
|
276
|
+
echo: (str) => echo$1(client, str),
|
|
277
|
+
findDuplicateSubscriber: (params) => findDuplicateSubscriber(client, params),
|
|
278
|
+
generateLatestStoredDataProof: (params) => generateLatestStoredDataProof(client, params),
|
|
279
|
+
getAccountAssetList: (params) => getAccountAssetList(client, params),
|
|
280
|
+
getAccountAssetObject: (params) => getAccountAssetObject(client, params),
|
|
281
|
+
getAccountDetail: (param) => getAccountDetail(client, param),
|
|
282
|
+
getAccountHistory: (param) => getAccountHistory(client, param),
|
|
283
|
+
getAccountTokenList: (params) => getAccountTokenList(client, params),
|
|
284
|
+
getConciseNodeStatus: () => getConciseNodeStatus(client),
|
|
285
|
+
getGenesisAccount: () => getGenesisAccount(client),
|
|
286
|
+
getIdentityProof: (param) => getIdentityProof(client, param),
|
|
287
|
+
getInactiveTxList: (param) => getInactiveTxList(client, param),
|
|
288
|
+
getMontInfoList: (param) => getMontInfoList(client, param),
|
|
289
|
+
getNodeStatus: () => getNodeStatus(client),
|
|
290
|
+
getOwnerBalance: () => getOwnerBalance(client),
|
|
291
|
+
getRoundState: (param) => getRoundState(client, param),
|
|
292
|
+
getRoundStatesList: (param) => getRoundStatesList(client, param),
|
|
293
|
+
getShardOfAccount: (params) => getShardOfAccount(client, params),
|
|
294
|
+
getSyncState: () => getSyncState(client),
|
|
295
|
+
getTx: (param) => getTx(client, param),
|
|
296
|
+
getWorldRoundState: (param) => getWorldRoundState(client, param),
|
|
297
|
+
getWorldRoundStatesList: (param) => getWorldRoundStatesList(client, param),
|
|
298
|
+
hasSystemToken: (params) => hasSystemToken(client, params),
|
|
299
|
+
makeTxProof: (params) => makeTxProof(client, params),
|
|
300
|
+
queryAddress: (params) => queryAddress(client, params),
|
|
301
|
+
readTxListWitness: (params) => readTxListWitness(client, params),
|
|
302
|
+
setHost: (param) => setHost(client, param),
|
|
303
|
+
subscribeAddress: (params) => subscribeAddress(client, params),
|
|
304
|
+
uploadAccountTxs: (param) => uploadAccountTxs(client, param),
|
|
305
|
+
verifyAndSignChallenge: (param) => verifyAndSignChallenge(client, param),
|
|
306
|
+
verifyIdentityProof: (param) => verifyIdentityProof(client, param),
|
|
307
|
+
verifyLatestStoredDataProof: (params) => verifyLatestStoredDataProof(client, params),
|
|
308
|
+
verifyTxListWitness: (params) => verifyTxListWitness(client, params),
|
|
309
|
+
});
|
|
310
|
+
|
|
311
|
+
/**
|
|
312
|
+
* Locus TX 2-step 흐름의 1 단계.
|
|
313
|
+
*
|
|
314
|
+
* TX_CREATION RPC 를 호출자 params 로 호출하고, 응답이 `hash` 와 `tx` 를
|
|
315
|
+
* 모두 포함하는지 (즉 일반 read 응답이 아니라 진짜 prepare 결과인지)
|
|
316
|
+
* 검증한다. _signLocusTransaction 과 _sendPreparedTransaction 이 소비할
|
|
317
|
+
* envelope 를 반환한다.
|
|
318
|
+
*
|
|
319
|
+
* 클라이언트가 `prepareParams` 를 제공하는 DualKeyAccount 에 바인드되어
|
|
320
|
+
* 있으면 params 는 그 훅을 먼저 거친다. OPEN_ACCOUNT / CHANGE_KEYPAIR 가
|
|
321
|
+
* 노드 검증 전에 master 가 증명한 key-bind 서명을 채우는 경로가 이것.
|
|
322
|
+
*/
|
|
323
|
+
function _prepareTransaction(client, args) {
|
|
324
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
325
|
+
var _a;
|
|
326
|
+
if (args.params.length === 0) {
|
|
327
|
+
throw new rpc.RpcRequestError(`prepareTransaction: 'params' must be a non-empty array`, { method: args.method });
|
|
328
|
+
}
|
|
329
|
+
const params = ((_a = client.account) === null || _a === void 0 ? void 0 : _a.prepareParams)
|
|
330
|
+
? yield client.account.prepareParams({
|
|
331
|
+
method: args.method,
|
|
332
|
+
params: args.params,
|
|
333
|
+
})
|
|
334
|
+
: args.params;
|
|
335
|
+
const prepared = yield client.request({
|
|
336
|
+
method: args.method,
|
|
337
|
+
params,
|
|
338
|
+
});
|
|
339
|
+
if (!prepared ||
|
|
340
|
+
typeof prepared !== 'object' ||
|
|
341
|
+
!('hash' in prepared) ||
|
|
342
|
+
!('tx' in prepared)) {
|
|
343
|
+
throw new account.InvalidTxResultError(`prepareTransaction: invalid response shape from ${args.method} (expected { hash, tx, ... })`, { method: args.method, cause: prepared });
|
|
344
|
+
}
|
|
345
|
+
return { method: args.method, params, prepared };
|
|
346
|
+
});
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
/**
|
|
350
|
+
* prepared.tx 의 type 으로부터 submit RPC 호출 params[0] 에 echo 해야 할 부가
|
|
351
|
+
* 필드들을 추출한다.
|
|
352
|
+
*
|
|
353
|
+
* 노드는 prepare 단계에서 일부 필드를 직접 생성하거나 확정한 뒤 1차 응답의
|
|
354
|
+
* `tx` 안에 담아 돌려준다. 이어지는 submit 호출은 *동일 method* 를 다시
|
|
355
|
+
* 호출하기 때문에, 호출자가 보낸 params 에 이 값들을 다시 채워 넣지 않으면
|
|
356
|
+
* 노드 검증 단계에서 hash 불일치 또는 빈 필드로 실패한다.
|
|
357
|
+
*
|
|
358
|
+
* TX_CREATE_CONTRACT -> contractAccount = tx.target
|
|
359
|
+
* TX_CREATE_SA -> synthAccount = tx.target
|
|
360
|
+
* TX_CREATE_VME -> sysId = tx.sysId
|
|
361
|
+
* TX_CHANGE_VKEY -> newValidationPkey = tx.newKey
|
|
362
|
+
*
|
|
363
|
+
* prefix 매칭이라 `*_FEE` 변종 (TX_CREATE_CONTRACT_FEE 등) 도 같이 잡힌다.
|
|
364
|
+
*/
|
|
365
|
+
function _deriveTxAdditions(prepared) {
|
|
366
|
+
const tx = prepared.tx;
|
|
367
|
+
const t = typeof (tx === null || tx === void 0 ? void 0 : tx.type) === 'string' ? tx.type : '';
|
|
368
|
+
if (!t)
|
|
369
|
+
return {};
|
|
370
|
+
if (t.startsWith('TX_CREATE_CONTRACT')) {
|
|
371
|
+
return { contractAccount: tx['target'] };
|
|
372
|
+
}
|
|
373
|
+
if (t.startsWith('TX_CREATE_SA')) {
|
|
374
|
+
return { synthAccount: tx['target'] };
|
|
375
|
+
}
|
|
376
|
+
if (t.startsWith('TX_CREATE_VME')) {
|
|
377
|
+
return { sysId: tx['sysId'] };
|
|
378
|
+
}
|
|
379
|
+
if (t.startsWith('TX_CHANGE_VKEY')) {
|
|
380
|
+
return { newValidationPkey: tx['newKey'] };
|
|
381
|
+
}
|
|
382
|
+
return {};
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
/**
|
|
386
|
+
* Locus TX 2-step 흐름의 2 단계.
|
|
387
|
+
*
|
|
388
|
+
* prepared envelope 를 account 에 넘기고, account 가 master / normal /
|
|
389
|
+
* signKeyBind 라우팅을 한 곳에서 수행한다 (accounts/account.mts 참고).
|
|
390
|
+
*
|
|
391
|
+
* 동시에 `_deriveTxAdditions` 로 prepared.tx 에서 echo 해야 할 TX-type 별
|
|
392
|
+
* 필드 (contractAccount / synthAccount / sysId / newValidationPkey) 를
|
|
393
|
+
* 추출해 sign 결과와 함께 submit 단계 (`_sendPreparedTransaction`) 의
|
|
394
|
+
* params[0] 머지 대상에 포함시킨다.
|
|
395
|
+
*/
|
|
396
|
+
function _signLocusTransaction(account$1, envelope) {
|
|
397
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
398
|
+
if (!account$1)
|
|
399
|
+
throw new account.AccountRequiredError(envelope.method);
|
|
400
|
+
const signAdditions = yield account$1.signTransaction({ prepared: envelope.prepared });
|
|
401
|
+
const derived = _deriveTxAdditions(envelope.prepared);
|
|
402
|
+
return {
|
|
403
|
+
method: envelope.method,
|
|
404
|
+
params: envelope.params,
|
|
405
|
+
additions: Object.assign(Object.assign({}, derived), signAdditions),
|
|
406
|
+
};
|
|
407
|
+
});
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
/**
|
|
411
|
+
* Locus TX 2-step 흐름의 3 단계.
|
|
412
|
+
*
|
|
413
|
+
* sign 단계 결과를 params[0] 에 병합한 뒤 같은 RPC 메서드를 다시 호출한다.
|
|
414
|
+
* 노드는 이제 완성된 payload 를 받아 최종 결과를 반환한다.
|
|
415
|
+
*/
|
|
416
|
+
function _sendPreparedTransaction(client, signed) {
|
|
417
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
418
|
+
const newParams = signed.params.map((p, idx) => idx === 0 && p && typeof p === 'object'
|
|
419
|
+
? Object.assign(Object.assign({}, p), signed.additions) : p);
|
|
420
|
+
return client.request({ method: signed.method, params: newParams });
|
|
421
|
+
});
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
// Automatically generated file. DO NOT EDIT.
|
|
425
|
+
function acceptScript(client, params) {
|
|
426
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
427
|
+
const prepared = yield _prepareTransaction(client, { method: 'locus_acceptScript', params: [params] });
|
|
428
|
+
const signed = yield _signLocusTransaction(client.account, prepared);
|
|
429
|
+
return _sendPreparedTransaction(client, signed);
|
|
430
|
+
});
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
// Automatically generated file. DO NOT EDIT.
|
|
434
|
+
function becomeGuest(client, param) {
|
|
435
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
436
|
+
const prepared = yield _prepareTransaction(client, { method: 'locus_becomeGuest', params: [param] });
|
|
437
|
+
const signed = yield _signLocusTransaction(client.account, prepared);
|
|
438
|
+
return _sendPreparedTransaction(client, signed);
|
|
439
|
+
});
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
// Automatically generated file. DO NOT EDIT.
|
|
443
|
+
function becomeHost(client, param) {
|
|
444
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
445
|
+
const prepared = yield _prepareTransaction(client, { method: 'locus_becomeHost', params: [param] });
|
|
446
|
+
const signed = yield _signLocusTransaction(client.account, prepared);
|
|
447
|
+
return _sendPreparedTransaction(client, signed);
|
|
448
|
+
});
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
// Automatically generated file. DO NOT EDIT.
|
|
452
|
+
function changeKey(client, params) {
|
|
453
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
454
|
+
const prepared = yield _prepareTransaction(client, { method: 'locus_changeKey', params: [params] });
|
|
455
|
+
const signed = yield _signLocusTransaction(client.account, prepared);
|
|
456
|
+
return _sendPreparedTransaction(client, signed);
|
|
457
|
+
});
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
// Automatically generated file. DO NOT EDIT.
|
|
461
|
+
function changeVkey(client, params) {
|
|
462
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
463
|
+
const prepared = yield _prepareTransaction(client, { method: 'locus_changeVkey', params: [params] });
|
|
464
|
+
const signed = yield _signLocusTransaction(client.account, prepared);
|
|
465
|
+
return _sendPreparedTransaction(client, signed);
|
|
466
|
+
});
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
// Automatically generated file. DO NOT EDIT.
|
|
470
|
+
function closeAccount(client, param) {
|
|
471
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
472
|
+
const prepared = yield _prepareTransaction(client, { method: 'locus_closeAccount', params: [param] });
|
|
473
|
+
const signed = yield _signLocusTransaction(client.account, prepared);
|
|
474
|
+
return _sendPreparedTransaction(client, signed);
|
|
475
|
+
});
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
// Automatically generated file. DO NOT EDIT.
|
|
479
|
+
function createAssetObject(client, param) {
|
|
480
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
481
|
+
const prepared = yield _prepareTransaction(client, { method: 'locus_createAssetObject', params: [param] });
|
|
482
|
+
const signed = yield _signLocusTransaction(client.account, prepared);
|
|
483
|
+
return _sendPreparedTransaction(client, signed);
|
|
484
|
+
});
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
// Automatically generated file. DO NOT EDIT.
|
|
488
|
+
function createToken(client, param) {
|
|
489
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
490
|
+
const prepared = yield _prepareTransaction(client, { method: 'locus_createToken', params: [param] });
|
|
491
|
+
const signed = yield _signLocusTransaction(client.account, prepared);
|
|
492
|
+
return _sendPreparedTransaction(client, signed);
|
|
493
|
+
});
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
// Automatically generated file. DO NOT EDIT.
|
|
497
|
+
function createVme(client, param) {
|
|
498
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
499
|
+
const prepared = yield _prepareTransaction(client, { method: 'locus_createVme', params: [param] });
|
|
500
|
+
const signed = yield _signLocusTransaction(client.account, prepared);
|
|
501
|
+
return _sendPreparedTransaction(client, signed);
|
|
502
|
+
});
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
// Automatically generated file. DO NOT EDIT.
|
|
506
|
+
function lockStake(client, params) {
|
|
507
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
508
|
+
const prepared = yield _prepareTransaction(client, { method: 'locus_lockStake', params: [params] });
|
|
509
|
+
const signed = yield _signLocusTransaction(client.account, prepared);
|
|
510
|
+
return _sendPreparedTransaction(client, signed);
|
|
511
|
+
});
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
// Automatically generated file. DO NOT EDIT.
|
|
515
|
+
function openAccount(client, param) {
|
|
516
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
517
|
+
const prepared = yield _prepareTransaction(client, { method: 'locus_openAccount', params: [param] });
|
|
518
|
+
const signed = yield _signLocusTransaction(client.account, prepared);
|
|
519
|
+
return _sendPreparedTransaction(client, signed);
|
|
520
|
+
});
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
// Automatically generated file. DO NOT EDIT.
|
|
524
|
+
function postData(client, params) {
|
|
525
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
526
|
+
const prepared = yield _prepareTransaction(client, { method: 'locus_postData', params: [params] });
|
|
527
|
+
const signed = yield _signLocusTransaction(client.account, prepared);
|
|
528
|
+
return _sendPreparedTransaction(client, signed);
|
|
529
|
+
});
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
// Automatically generated file. DO NOT EDIT.
|
|
533
|
+
function provideScript(client, params) {
|
|
534
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
535
|
+
const prepared = yield _prepareTransaction(client, { method: 'locus_provideScript', params: [params] });
|
|
536
|
+
const signed = yield _signLocusTransaction(client.account, prepared);
|
|
537
|
+
return _sendPreparedTransaction(client, signed);
|
|
538
|
+
});
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
// Automatically generated file. DO NOT EDIT.
|
|
542
|
+
function requestDataTrade(client, params) {
|
|
543
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
544
|
+
const prepared = yield _prepareTransaction(client, { method: 'locus_requestDataTrade', params: [params] });
|
|
545
|
+
const signed = yield _signLocusTransaction(client.account, prepared);
|
|
546
|
+
return _sendPreparedTransaction(client, signed);
|
|
547
|
+
});
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
// Automatically generated file. DO NOT EDIT.
|
|
551
|
+
function transferAssetObject(client, params) {
|
|
552
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
553
|
+
const prepared = yield _prepareTransaction(client, { method: 'locus_transferAssetObject', params: [params] });
|
|
554
|
+
const signed = yield _signLocusTransaction(client.account, prepared);
|
|
555
|
+
return _sendPreparedTransaction(client, signed);
|
|
556
|
+
});
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
// Automatically generated file. DO NOT EDIT.
|
|
560
|
+
function transferCoin(client, param) {
|
|
561
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
562
|
+
const prepared = yield _prepareTransaction(client, { method: 'locus_transferCoin', params: [param] });
|
|
563
|
+
const signed = yield _signLocusTransaction(client.account, prepared);
|
|
564
|
+
return _sendPreparedTransaction(client, signed);
|
|
565
|
+
});
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
// Automatically generated file. DO NOT EDIT.
|
|
569
|
+
function transferCoinExpress(client, param) {
|
|
570
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
571
|
+
const prepared = yield _prepareTransaction(client, { method: 'locus_transferCoinExpress', params: [param] });
|
|
572
|
+
const signed = yield _signLocusTransaction(client.account, prepared);
|
|
573
|
+
return _sendPreparedTransaction(client, signed);
|
|
574
|
+
});
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
// Automatically generated file. DO NOT EDIT.
|
|
578
|
+
function transferToken(client, params) {
|
|
579
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
580
|
+
const prepared = yield _prepareTransaction(client, { method: 'locus_transferToken', params: [params] });
|
|
581
|
+
const signed = yield _signLocusTransaction(client.account, prepared);
|
|
582
|
+
return _sendPreparedTransaction(client, signed);
|
|
583
|
+
});
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
// Automatically generated file. DO NOT EDIT.
|
|
587
|
+
function unlockStake(client, params) {
|
|
588
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
589
|
+
const prepared = yield _prepareTransaction(client, { method: 'locus_unlockStake', params: [params] });
|
|
590
|
+
const signed = yield _signLocusTransaction(client.account, prepared);
|
|
591
|
+
return _sendPreparedTransaction(client, signed);
|
|
592
|
+
});
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
// Automatically generated file. DO NOT EDIT.
|
|
596
|
+
const walletActions = (client) => ({
|
|
597
|
+
acceptScript: (params) => acceptScript(client, params),
|
|
598
|
+
becomeGuest: (param) => becomeGuest(client, param),
|
|
599
|
+
becomeHost: (param) => becomeHost(client, param),
|
|
600
|
+
changeKey: (params) => changeKey(client, params),
|
|
601
|
+
changeVkey: (params) => changeVkey(client, params),
|
|
602
|
+
closeAccount: (param) => closeAccount(client, param),
|
|
603
|
+
createAssetObject: (param) => createAssetObject(client, param),
|
|
604
|
+
createToken: (param) => createToken(client, param),
|
|
605
|
+
createVme: (param) => createVme(client, param),
|
|
606
|
+
lockStake: (params) => lockStake(client, params),
|
|
607
|
+
openAccount: (param) => openAccount(client, param),
|
|
608
|
+
postData: (params) => postData(client, params),
|
|
609
|
+
provideScript: (params) => provideScript(client, params),
|
|
610
|
+
requestDataTrade: (params) => requestDataTrade(client, params),
|
|
611
|
+
transferAssetObject: (params) => transferAssetObject(client, params),
|
|
612
|
+
transferCoin: (param) => transferCoin(client, param),
|
|
613
|
+
transferCoinExpress: (param) => transferCoinExpress(client, param),
|
|
614
|
+
transferToken: (params) => transferToken(client, params),
|
|
615
|
+
unlockStake: (params) => unlockStake(client, params),
|
|
616
|
+
});
|
|
617
|
+
|
|
618
|
+
// Automatically generated file. DO NOT EDIT.
|
|
619
|
+
function allHeights(client) {
|
|
620
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
621
|
+
return client.request({ method: 'debug_allHeights', params: [] });
|
|
622
|
+
});
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
// Automatically generated file. DO NOT EDIT.
|
|
626
|
+
function balanceGrantList(client) {
|
|
627
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
628
|
+
return client.request({ method: 'debug_balanceGrantList', params: [] });
|
|
629
|
+
});
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
// Automatically generated file. DO NOT EDIT.
|
|
633
|
+
function balanceList(client) {
|
|
634
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
635
|
+
return client.request({ method: 'debug_balanceList', params: [] });
|
|
636
|
+
});
|
|
637
|
+
}
|
|
638
|
+
|
|
639
|
+
// Automatically generated file. DO NOT EDIT.
|
|
640
|
+
function createAccount(client) {
|
|
641
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
642
|
+
return client.request({ method: 'debug_createAccount', params: [] });
|
|
643
|
+
});
|
|
644
|
+
}
|
|
645
|
+
|
|
646
|
+
// Automatically generated file. DO NOT EDIT.
|
|
647
|
+
function createNode(client, param) {
|
|
648
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
649
|
+
return client.request({ method: 'debug_createNode', params: [param] });
|
|
650
|
+
});
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
// Automatically generated file. DO NOT EDIT.
|
|
654
|
+
function dumpAllAccounts(client) {
|
|
655
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
656
|
+
return client.request({ method: 'debug_dumpAllAccounts', params: [] });
|
|
657
|
+
});
|
|
658
|
+
}
|
|
659
|
+
|
|
660
|
+
// Automatically generated file. DO NOT EDIT.
|
|
661
|
+
function echo(client, str) {
|
|
662
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
663
|
+
return client.request({ method: 'debug_echo', params: [str] });
|
|
664
|
+
});
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
// Automatically generated file. DO NOT EDIT.
|
|
668
|
+
function gameChainCmd(client, param) {
|
|
669
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
670
|
+
return client.request({ method: 'debug_gameChainCmd', params: [param] });
|
|
671
|
+
});
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
// Automatically generated file. DO NOT EDIT.
|
|
675
|
+
function getAccountsBalances(client, param) {
|
|
676
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
677
|
+
return client.request({ method: 'debug_getAccountsBalances', params: [param] });
|
|
678
|
+
});
|
|
679
|
+
}
|
|
680
|
+
|
|
681
|
+
// Automatically generated file. DO NOT EDIT.
|
|
682
|
+
function getAccountsHeights(client, param) {
|
|
683
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
684
|
+
return client.request({ method: 'debug_getAccountsHeights', params: [param] });
|
|
685
|
+
});
|
|
686
|
+
}
|
|
687
|
+
|
|
688
|
+
// Automatically generated file. DO NOT EDIT.
|
|
689
|
+
function getContractLog(client, param) {
|
|
690
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
691
|
+
return client.request({ method: 'debug_getContractLog', params: [param] });
|
|
692
|
+
});
|
|
693
|
+
}
|
|
694
|
+
|
|
695
|
+
// Automatically generated file. DO NOT EDIT.
|
|
696
|
+
function getGuestsInfo(client) {
|
|
697
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
698
|
+
return client.request({ method: 'debug_getGuestsInfo', params: [] });
|
|
699
|
+
});
|
|
700
|
+
}
|
|
701
|
+
|
|
702
|
+
// Automatically generated file. DO NOT EDIT.
|
|
703
|
+
function getHomeShard(client, param) {
|
|
704
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
705
|
+
return client.request({ method: 'debug_getHomeShard', params: [param] });
|
|
706
|
+
});
|
|
707
|
+
}
|
|
708
|
+
|
|
709
|
+
// Automatically generated file. DO NOT EDIT.
|
|
710
|
+
function getImportAccount(client, params) {
|
|
711
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
712
|
+
return client.request({ method: 'debug_getImportAccount', params: [params] });
|
|
713
|
+
});
|
|
714
|
+
}
|
|
715
|
+
|
|
716
|
+
// Automatically generated file. DO NOT EDIT.
|
|
717
|
+
function getImportAccountLog(client, params) {
|
|
718
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
719
|
+
return client.request({ method: 'debug_getImportAccountLog', params: [params] });
|
|
720
|
+
});
|
|
721
|
+
}
|
|
722
|
+
|
|
723
|
+
// Automatically generated file. DO NOT EDIT.
|
|
724
|
+
function getKeys(client, params) {
|
|
725
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
726
|
+
return client.request({ method: 'debug_getKeys', params: [params] });
|
|
727
|
+
});
|
|
728
|
+
}
|
|
729
|
+
|
|
730
|
+
// Automatically generated file. DO NOT EDIT.
|
|
731
|
+
function getNodeBlocks(client) {
|
|
732
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
733
|
+
return client.request({ method: 'debug_getNodeBlocks', params: [] });
|
|
734
|
+
});
|
|
735
|
+
}
|
|
736
|
+
|
|
737
|
+
// Automatically generated file. DO NOT EDIT.
|
|
738
|
+
function getPeerPool(client) {
|
|
739
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
740
|
+
return client.request({ method: 'debug_getPeerPool', params: [] });
|
|
741
|
+
});
|
|
742
|
+
}
|
|
743
|
+
|
|
744
|
+
// Automatically generated file. DO NOT EDIT.
|
|
745
|
+
function getPeersInfo(client) {
|
|
746
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
747
|
+
return client.request({ method: 'debug_getPeersInfo', params: [] });
|
|
748
|
+
});
|
|
749
|
+
}
|
|
750
|
+
|
|
751
|
+
// Automatically generated file. DO NOT EDIT.
|
|
752
|
+
function importAccount(client, params) {
|
|
753
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
754
|
+
return client.request({ method: 'debug_importAccount', params: [params] });
|
|
755
|
+
});
|
|
756
|
+
}
|
|
757
|
+
|
|
758
|
+
// Automatically generated file. DO NOT EDIT.
|
|
759
|
+
function initReliableNodes(client, param) {
|
|
760
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
761
|
+
return client.request({ method: 'debug_initReliableNodes', params: [param] });
|
|
762
|
+
});
|
|
763
|
+
}
|
|
764
|
+
|
|
765
|
+
// Automatically generated file. DO NOT EDIT.
|
|
766
|
+
function noArgsRets(client) {
|
|
767
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
768
|
+
return client.request({ method: 'debug_noArgsRets', params: [] });
|
|
769
|
+
});
|
|
770
|
+
}
|
|
771
|
+
|
|
772
|
+
// Automatically generated file. DO NOT EDIT.
|
|
773
|
+
function nodeCmd(client, cmd) {
|
|
774
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
775
|
+
return client.request({ method: 'debug_nodeCmd', params: [cmd] });
|
|
776
|
+
});
|
|
777
|
+
}
|
|
778
|
+
|
|
779
|
+
// Automatically generated file. DO NOT EDIT.
|
|
780
|
+
function removeHoldTxs(client, param) {
|
|
781
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
782
|
+
return client.request({ method: 'debug_removeHoldTxs', params: [param] });
|
|
783
|
+
});
|
|
784
|
+
}
|
|
785
|
+
|
|
786
|
+
// Automatically generated file. DO NOT EDIT.
|
|
787
|
+
function requestVme(client, params) {
|
|
788
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
789
|
+
return client.request({ method: 'debug_requestVme', params: [params] });
|
|
790
|
+
});
|
|
791
|
+
}
|
|
792
|
+
|
|
793
|
+
// Automatically generated file. DO NOT EDIT.
|
|
794
|
+
function sendRawTransaction(client, params) {
|
|
795
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
796
|
+
return client.request({ method: 'debug_sendRawTransaction', params: [params] });
|
|
797
|
+
});
|
|
798
|
+
}
|
|
799
|
+
|
|
800
|
+
// Automatically generated file. DO NOT EDIT.
|
|
801
|
+
function setImportAccountTx(client, params) {
|
|
802
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
803
|
+
return client.request({ method: 'debug_setImportAccountTx', params: [params] });
|
|
804
|
+
});
|
|
805
|
+
}
|
|
806
|
+
|
|
807
|
+
// Automatically generated file. DO NOT EDIT.
|
|
808
|
+
function setReliableNode(client, param) {
|
|
809
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
810
|
+
return client.request({ method: 'debug_setReliableNode', params: [param] });
|
|
811
|
+
});
|
|
812
|
+
}
|
|
813
|
+
|
|
814
|
+
// Automatically generated file. DO NOT EDIT.
|
|
815
|
+
function viewContract(client, param) {
|
|
816
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
817
|
+
return client.request({ method: 'debug_viewContract', params: [param] });
|
|
818
|
+
});
|
|
819
|
+
}
|
|
820
|
+
|
|
821
|
+
// Automatically generated file. DO NOT EDIT.
|
|
822
|
+
const debugPublicActions = (client) => ({
|
|
823
|
+
allHeights: () => allHeights(client),
|
|
824
|
+
balanceGrantList: () => balanceGrantList(client),
|
|
825
|
+
balanceList: () => balanceList(client),
|
|
826
|
+
createAccount: () => createAccount(client),
|
|
827
|
+
createNode: (param) => createNode(client, param),
|
|
828
|
+
dumpAllAccounts: () => dumpAllAccounts(client),
|
|
829
|
+
echo: (str) => echo(client, str),
|
|
830
|
+
gameChainCmd: (param) => gameChainCmd(client, param),
|
|
831
|
+
getAccountsBalances: (param) => getAccountsBalances(client, param),
|
|
832
|
+
getAccountsHeights: (param) => getAccountsHeights(client, param),
|
|
833
|
+
getContractLog: (param) => getContractLog(client, param),
|
|
834
|
+
getGuestsInfo: () => getGuestsInfo(client),
|
|
835
|
+
getHomeShard: (param) => getHomeShard(client, param),
|
|
836
|
+
getImportAccount: (params) => getImportAccount(client, params),
|
|
837
|
+
getImportAccountLog: (params) => getImportAccountLog(client, params),
|
|
838
|
+
getKeys: (params) => getKeys(client, params),
|
|
839
|
+
getNodeBlocks: () => getNodeBlocks(client),
|
|
840
|
+
getPeerPool: () => getPeerPool(client),
|
|
841
|
+
getPeersInfo: () => getPeersInfo(client),
|
|
842
|
+
importAccount: (params) => importAccount(client, params),
|
|
843
|
+
initReliableNodes: (param) => initReliableNodes(client, param),
|
|
844
|
+
noArgsRets: () => noArgsRets(client),
|
|
845
|
+
nodeCmd: (cmd) => nodeCmd(client, cmd),
|
|
846
|
+
removeHoldTxs: (param) => removeHoldTxs(client, param),
|
|
847
|
+
requestVme: (params) => requestVme(client, params),
|
|
848
|
+
sendRawTransaction: (params) => sendRawTransaction(client, params),
|
|
849
|
+
setImportAccountTx: (params) => setImportAccountTx(client, params),
|
|
850
|
+
setReliableNode: (param) => setReliableNode(client, param),
|
|
851
|
+
viewContract: (param) => viewContract(client, param),
|
|
852
|
+
});
|
|
853
|
+
|
|
854
|
+
// Automatically generated file. DO NOT EDIT.
|
|
855
|
+
function callContract(client, param) {
|
|
856
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
857
|
+
const prepared = yield _prepareTransaction(client, { method: 'debug_callContract', params: [param] });
|
|
858
|
+
const signed = yield _signLocusTransaction(client.account, prepared);
|
|
859
|
+
return _sendPreparedTransaction(client, signed);
|
|
860
|
+
});
|
|
861
|
+
}
|
|
862
|
+
|
|
863
|
+
// Automatically generated file. DO NOT EDIT.
|
|
864
|
+
function createContract(client, param) {
|
|
865
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
866
|
+
const prepared = yield _prepareTransaction(client, { method: 'debug_createContract', params: [param] });
|
|
867
|
+
const signed = yield _signLocusTransaction(client.account, prepared);
|
|
868
|
+
return _sendPreparedTransaction(client, signed);
|
|
869
|
+
});
|
|
870
|
+
}
|
|
871
|
+
|
|
872
|
+
// Automatically generated file. DO NOT EDIT.
|
|
873
|
+
function createSynthAccount(client, param) {
|
|
874
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
875
|
+
const prepared = yield _prepareTransaction(client, { method: 'debug_createSynthAccount', params: [param] });
|
|
876
|
+
const signed = yield _signLocusTransaction(client.account, prepared);
|
|
877
|
+
return _sendPreparedTransaction(client, signed);
|
|
878
|
+
});
|
|
879
|
+
}
|
|
880
|
+
|
|
881
|
+
// Automatically generated file. DO NOT EDIT.
|
|
882
|
+
function postDataToSynthAccount(client, param) {
|
|
883
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
884
|
+
const prepared = yield _prepareTransaction(client, { method: 'debug_postDataToSynthAccount', params: [param] });
|
|
885
|
+
const signed = yield _signLocusTransaction(client.account, prepared);
|
|
886
|
+
return _sendPreparedTransaction(client, signed);
|
|
887
|
+
});
|
|
888
|
+
}
|
|
889
|
+
|
|
890
|
+
// Automatically generated file. DO NOT EDIT.
|
|
891
|
+
const debugWalletActions = (client) => ({
|
|
892
|
+
callContract: (param) => callContract(client, param),
|
|
893
|
+
createContract: (param) => createContract(client, param),
|
|
894
|
+
createSynthAccount: (param) => createSynthAccount(client, param),
|
|
895
|
+
postDataToSynthAccount: (param) => postDataToSynthAccount(client, param),
|
|
896
|
+
});
|
|
897
|
+
|
|
898
|
+
exports.acceptScript = acceptScript;
|
|
899
|
+
exports.accountHeightsToDownload = accountHeightsToDownload;
|
|
900
|
+
exports.accountHeightsToUpload = accountHeightsToUpload;
|
|
901
|
+
exports.allHeights = allHeights;
|
|
902
|
+
exports.balanceGrantList = balanceGrantList;
|
|
903
|
+
exports.balanceList = balanceList;
|
|
904
|
+
exports.becomeGuest = becomeGuest;
|
|
905
|
+
exports.becomeHost = becomeHost;
|
|
906
|
+
exports.calculateSpentByExpress = calculateSpentByExpress;
|
|
907
|
+
exports.callContract = callContract;
|
|
908
|
+
exports.changeKey = changeKey;
|
|
909
|
+
exports.changeVkey = changeVkey;
|
|
910
|
+
exports.clientMessage = clientMessage;
|
|
911
|
+
exports.closeAccount = closeAccount;
|
|
912
|
+
exports.createAccount = createAccount;
|
|
913
|
+
exports.createAssetObject = createAssetObject;
|
|
914
|
+
exports.createContract = createContract;
|
|
915
|
+
exports.createNode = createNode;
|
|
916
|
+
exports.createSynthAccount = createSynthAccount;
|
|
917
|
+
exports.createToken = createToken;
|
|
918
|
+
exports.createVme = createVme;
|
|
919
|
+
exports.debugPublicActions = debugPublicActions;
|
|
920
|
+
exports.debugWalletActions = debugWalletActions;
|
|
921
|
+
exports.downloadAccountTxs = downloadAccountTxs;
|
|
922
|
+
exports.dumpAllAccounts = dumpAllAccounts;
|
|
923
|
+
exports.echo = echo;
|
|
924
|
+
exports.echo$1 = echo$1;
|
|
925
|
+
exports.findDuplicateSubscriber = findDuplicateSubscriber;
|
|
926
|
+
exports.gameChainCmd = gameChainCmd;
|
|
927
|
+
exports.generateLatestStoredDataProof = generateLatestStoredDataProof;
|
|
928
|
+
exports.getAccountAssetList = getAccountAssetList;
|
|
929
|
+
exports.getAccountAssetObject = getAccountAssetObject;
|
|
930
|
+
exports.getAccountDetail = getAccountDetail;
|
|
931
|
+
exports.getAccountHistory = getAccountHistory;
|
|
932
|
+
exports.getAccountTokenList = getAccountTokenList;
|
|
933
|
+
exports.getAccountsBalances = getAccountsBalances;
|
|
934
|
+
exports.getAccountsHeights = getAccountsHeights;
|
|
935
|
+
exports.getConciseNodeStatus = getConciseNodeStatus;
|
|
936
|
+
exports.getContractLog = getContractLog;
|
|
937
|
+
exports.getGenesisAccount = getGenesisAccount;
|
|
938
|
+
exports.getGuestsInfo = getGuestsInfo;
|
|
939
|
+
exports.getHomeShard = getHomeShard;
|
|
940
|
+
exports.getIdentityProof = getIdentityProof;
|
|
941
|
+
exports.getImportAccount = getImportAccount;
|
|
942
|
+
exports.getImportAccountLog = getImportAccountLog;
|
|
943
|
+
exports.getInactiveTxList = getInactiveTxList;
|
|
944
|
+
exports.getKeys = getKeys;
|
|
945
|
+
exports.getMontInfoList = getMontInfoList;
|
|
946
|
+
exports.getNodeBlocks = getNodeBlocks;
|
|
947
|
+
exports.getNodeStatus = getNodeStatus;
|
|
948
|
+
exports.getOwnerBalance = getOwnerBalance;
|
|
949
|
+
exports.getPeerPool = getPeerPool;
|
|
950
|
+
exports.getPeersInfo = getPeersInfo;
|
|
951
|
+
exports.getRoundState = getRoundState;
|
|
952
|
+
exports.getRoundStatesList = getRoundStatesList;
|
|
953
|
+
exports.getShardOfAccount = getShardOfAccount;
|
|
954
|
+
exports.getSyncState = getSyncState;
|
|
955
|
+
exports.getTx = getTx;
|
|
956
|
+
exports.getWorldRoundState = getWorldRoundState;
|
|
957
|
+
exports.getWorldRoundStatesList = getWorldRoundStatesList;
|
|
958
|
+
exports.hasSystemToken = hasSystemToken;
|
|
959
|
+
exports.importAccount = importAccount;
|
|
960
|
+
exports.initReliableNodes = initReliableNodes;
|
|
961
|
+
exports.lockStake = lockStake;
|
|
962
|
+
exports.makeTxProof = makeTxProof;
|
|
963
|
+
exports.noArgsRets = noArgsRets;
|
|
964
|
+
exports.nodeCmd = nodeCmd;
|
|
965
|
+
exports.openAccount = openAccount;
|
|
966
|
+
exports.postData = postData;
|
|
967
|
+
exports.postDataToSynthAccount = postDataToSynthAccount;
|
|
968
|
+
exports.provideScript = provideScript;
|
|
969
|
+
exports.publicActions = publicActions;
|
|
970
|
+
exports.queryAddress = queryAddress;
|
|
971
|
+
exports.readTxListWitness = readTxListWitness;
|
|
972
|
+
exports.removeHoldTxs = removeHoldTxs;
|
|
973
|
+
exports.requestDataTrade = requestDataTrade;
|
|
974
|
+
exports.requestVme = requestVme;
|
|
975
|
+
exports.sendRawTransaction = sendRawTransaction;
|
|
976
|
+
exports.setHost = setHost;
|
|
977
|
+
exports.setImportAccountTx = setImportAccountTx;
|
|
978
|
+
exports.setReliableNode = setReliableNode;
|
|
979
|
+
exports.subscribeAddress = subscribeAddress;
|
|
980
|
+
exports.transferAssetObject = transferAssetObject;
|
|
981
|
+
exports.transferCoin = transferCoin;
|
|
982
|
+
exports.transferCoinExpress = transferCoinExpress;
|
|
983
|
+
exports.transferToken = transferToken;
|
|
984
|
+
exports.unlockStake = unlockStake;
|
|
985
|
+
exports.uploadAccountTxs = uploadAccountTxs;
|
|
986
|
+
exports.verifyAndSignChallenge = verifyAndSignChallenge;
|
|
987
|
+
exports.verifyIdentityProof = verifyIdentityProof;
|
|
988
|
+
exports.verifyLatestStoredDataProof = verifyLatestStoredDataProof;
|
|
989
|
+
exports.verifyTxListWitness = verifyTxListWitness;
|
|
990
|
+
exports.viewContract = viewContract;
|
|
991
|
+
exports.walletActions = walletActions;
|
|
992
|
+
|
|
993
|
+
}));
|