@prosopo/types-database 0.2.2 → 0.2.5

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,468 @@
1
+ "use strict";
2
+ const typechainTypes = require("@727-ventures/typechain-types");
3
+ const utils = require("../shared/utils.cjs");
4
+ const captcha = require("../data/captcha.json.cjs");
5
+ class Methods {
6
+ constructor(nativeContract, nativeApi, callerAddress) {
7
+ this.__nativeContract = nativeContract;
8
+ this.__callerAddress = callerAddress;
9
+ this.__apiPromise = nativeApi;
10
+ }
11
+ /**
12
+ * getGitCommitId
13
+ *
14
+ * @returns { Result<Array<number>, ReturnTypes.LangError> }
15
+ */
16
+ getGitCommitId(__options) {
17
+ return typechainTypes.queryOkJSON(this.__apiPromise, this.__nativeContract, this.__callerAddress, "getGitCommitId", [], __options, (result) => {
18
+ return typechainTypes.handleReturnType(result, utils.getTypeDescription(16, captcha));
19
+ });
20
+ }
21
+ /**
22
+ * getAdmin
23
+ *
24
+ * @returns { Result<ReturnTypes.AccountId, ReturnTypes.LangError> }
25
+ */
26
+ getAdmin(__options) {
27
+ return typechainTypes.queryOkJSON(this.__apiPromise, this.__nativeContract, this.__callerAddress, "getAdmin", [], __options, (result) => {
28
+ return typechainTypes.handleReturnType(result, utils.getTypeDescription(18, captcha));
29
+ });
30
+ }
31
+ /**
32
+ * getPayees
33
+ *
34
+ * @returns { Result<Array<ReturnTypes.Payee>, ReturnTypes.LangError> }
35
+ */
36
+ getPayees(__options) {
37
+ return typechainTypes.queryOkJSON(this.__apiPromise, this.__nativeContract, this.__callerAddress, "getPayees", [], __options, (result) => {
38
+ return typechainTypes.handleReturnType(result, utils.getTypeDescription(19, captcha));
39
+ });
40
+ }
41
+ /**
42
+ * getDappPayees
43
+ *
44
+ * @returns { Result<Array<ReturnTypes.DappPayee>, ReturnTypes.LangError> }
45
+ */
46
+ getDappPayees(__options) {
47
+ return typechainTypes.queryOkJSON(this.__apiPromise, this.__nativeContract, this.__callerAddress, "getDappPayees", [], __options, (result) => {
48
+ return typechainTypes.handleReturnType(result, utils.getTypeDescription(22, captcha));
49
+ });
50
+ }
51
+ /**
52
+ * getStatuses
53
+ *
54
+ * @returns { Result<Array<ReturnTypes.GovernanceStatus>, ReturnTypes.LangError> }
55
+ */
56
+ getStatuses(__options) {
57
+ return typechainTypes.queryOkJSON(this.__apiPromise, this.__nativeContract, this.__callerAddress, "getStatuses", [], __options, (result) => {
58
+ return typechainTypes.handleReturnType(result, utils.getTypeDescription(25, captcha));
59
+ });
60
+ }
61
+ /**
62
+ * getProviderStakeThreshold
63
+ *
64
+ * @returns { Result<ReturnNumber, ReturnTypes.LangError> }
65
+ */
66
+ getProviderStakeThreshold(__options) {
67
+ return typechainTypes.queryOkJSON(this.__apiPromise, this.__nativeContract, this.__callerAddress, "getProviderStakeThreshold", [], __options, (result) => {
68
+ return typechainTypes.handleReturnType(result, utils.getTypeDescription(28, captcha));
69
+ });
70
+ }
71
+ /**
72
+ * getDappStakeThreshold
73
+ *
74
+ * @returns { Result<ReturnNumber, ReturnTypes.LangError> }
75
+ */
76
+ getDappStakeThreshold(__options) {
77
+ return typechainTypes.queryOkJSON(this.__apiPromise, this.__nativeContract, this.__callerAddress, "getDappStakeThreshold", [], __options, (result) => {
78
+ return typechainTypes.handleReturnType(result, utils.getTypeDescription(28, captcha));
79
+ });
80
+ }
81
+ /**
82
+ * getMaxProviderFee
83
+ *
84
+ * @returns { Result<number, ReturnTypes.LangError> }
85
+ */
86
+ getMaxProviderFee(__options) {
87
+ return typechainTypes.queryOkJSON(this.__apiPromise, this.__nativeContract, this.__callerAddress, "getMaxProviderFee", [], __options, (result) => {
88
+ return typechainTypes.handleReturnType(result, utils.getTypeDescription(29, captcha));
89
+ });
90
+ }
91
+ /**
92
+ * getMinNumActiveProviders
93
+ *
94
+ * @returns { Result<number, ReturnTypes.LangError> }
95
+ */
96
+ getMinNumActiveProviders(__options) {
97
+ return typechainTypes.queryOkJSON(this.__apiPromise, this.__nativeContract, this.__callerAddress, "getMinNumActiveProviders", [], __options, (result) => {
98
+ return typechainTypes.handleReturnType(result, utils.getTypeDescription(30, captcha));
99
+ });
100
+ }
101
+ /**
102
+ * getBlockTime
103
+ *
104
+ * @returns { Result<number, ReturnTypes.LangError> }
105
+ */
106
+ getBlockTime(__options) {
107
+ return typechainTypes.queryOkJSON(this.__apiPromise, this.__nativeContract, this.__callerAddress, "getBlockTime", [], __options, (result) => {
108
+ return typechainTypes.handleReturnType(result, utils.getTypeDescription(30, captcha));
109
+ });
110
+ }
111
+ /**
112
+ * getMaxUserHistoryAgeSeconds
113
+ *
114
+ * @returns { Result<number, ReturnTypes.LangError> }
115
+ */
116
+ getMaxUserHistoryAgeSeconds(__options) {
117
+ return typechainTypes.queryOkJSON(this.__apiPromise, this.__nativeContract, this.__callerAddress, "getMaxUserHistoryAgeSeconds", [], __options, (result) => {
118
+ return typechainTypes.handleReturnType(result, utils.getTypeDescription(29, captcha));
119
+ });
120
+ }
121
+ /**
122
+ * getMaxUserHistoryLen
123
+ *
124
+ * @returns { Result<number, ReturnTypes.LangError> }
125
+ */
126
+ getMaxUserHistoryLen(__options) {
127
+ return typechainTypes.queryOkJSON(this.__apiPromise, this.__nativeContract, this.__callerAddress, "getMaxUserHistoryLen", [], __options, (result) => {
128
+ return typechainTypes.handleReturnType(result, utils.getTypeDescription(30, captcha));
129
+ });
130
+ }
131
+ /**
132
+ * getMaxUserHistoryAgeBlocks
133
+ *
134
+ * @returns { Result<number, ReturnTypes.LangError> }
135
+ */
136
+ getMaxUserHistoryAgeBlocks(__options) {
137
+ return typechainTypes.queryOkJSON(this.__apiPromise, this.__nativeContract, this.__callerAddress, "getMaxUserHistoryAgeBlocks", [], __options, (result) => {
138
+ return typechainTypes.handleReturnType(result, utils.getTypeDescription(29, captcha));
139
+ });
140
+ }
141
+ /**
142
+ * providerRegister
143
+ *
144
+ * @param { Array<(number | string | BN)> } url,
145
+ * @param { (number | string | BN) } fee,
146
+ * @param { ArgumentTypes.Payee } payee,
147
+ * @returns { Result<Result<null, ReturnTypes.Error>, ReturnTypes.LangError> }
148
+ */
149
+ providerRegister(url, fee, payee, __options) {
150
+ return typechainTypes.queryOkJSON(this.__apiPromise, this.__nativeContract, this.__callerAddress, "providerRegister", [url, fee, payee], __options, (result) => {
151
+ return typechainTypes.handleReturnType(result, utils.getTypeDescription(10, captcha));
152
+ });
153
+ }
154
+ /**
155
+ * providerUpdate
156
+ *
157
+ * @param { Array<(number | string | BN)> } url,
158
+ * @param { (number | string | BN) } fee,
159
+ * @param { ArgumentTypes.Payee } payee,
160
+ * @returns { Result<Result<null, ReturnTypes.Error>, ReturnTypes.LangError> }
161
+ */
162
+ providerUpdate(url, fee, payee, __options) {
163
+ return typechainTypes.queryOkJSON(this.__apiPromise, this.__nativeContract, this.__callerAddress, "providerUpdate", [url, fee, payee], __options, (result) => {
164
+ return typechainTypes.handleReturnType(result, utils.getTypeDescription(10, captcha));
165
+ });
166
+ }
167
+ /**
168
+ * providerDeactivate
169
+ *
170
+ * @returns { Result<Result<null, ReturnTypes.Error>, ReturnTypes.LangError> }
171
+ */
172
+ providerDeactivate(__options) {
173
+ return typechainTypes.queryOkJSON(this.__apiPromise, this.__nativeContract, this.__callerAddress, "providerDeactivate", [], __options, (result) => {
174
+ return typechainTypes.handleReturnType(result, utils.getTypeDescription(10, captcha));
175
+ });
176
+ }
177
+ /**
178
+ * providerDeregister
179
+ *
180
+ * @returns { Result<Result<null, ReturnTypes.Error>, ReturnTypes.LangError> }
181
+ */
182
+ providerDeregister(__options) {
183
+ return typechainTypes.queryOkJSON(this.__apiPromise, this.__nativeContract, this.__callerAddress, "providerDeregister", [], __options, (result) => {
184
+ return typechainTypes.handleReturnType(result, utils.getTypeDescription(10, captcha));
185
+ });
186
+ }
187
+ /**
188
+ * getProvider
189
+ *
190
+ * @param { ArgumentTypes.AccountId } account,
191
+ * @returns { Result<Result<ReturnTypes.Provider, ReturnTypes.Error>, ReturnTypes.LangError> }
192
+ */
193
+ getProvider(account, __options) {
194
+ return typechainTypes.queryOkJSON(this.__apiPromise, this.__nativeContract, this.__callerAddress, "getProvider", [account], __options, (result) => {
195
+ return typechainTypes.handleReturnType(result, utils.getTypeDescription(32, captcha));
196
+ });
197
+ }
198
+ /**
199
+ * providerFund
200
+ *
201
+ * @returns { Result<Result<null, ReturnTypes.Error>, ReturnTypes.LangError> }
202
+ */
203
+ providerFund(__options) {
204
+ return typechainTypes.queryOkJSON(this.__apiPromise, this.__nativeContract, this.__callerAddress, "providerFund", [], __options, (result) => {
205
+ return typechainTypes.handleReturnType(result, utils.getTypeDescription(10, captcha));
206
+ });
207
+ }
208
+ /**
209
+ * providerSetDataset
210
+ *
211
+ * @param { ArgumentTypes.Hash } datasetId,
212
+ * @param { ArgumentTypes.Hash } datasetIdContent,
213
+ * @returns { Result<Result<null, ReturnTypes.Error>, ReturnTypes.LangError> }
214
+ */
215
+ providerSetDataset(datasetId, datasetIdContent, __options) {
216
+ return typechainTypes.queryOkJSON(this.__apiPromise, this.__nativeContract, this.__callerAddress, "providerSetDataset", [datasetId, datasetIdContent], __options, (result) => {
217
+ return typechainTypes.handleReturnType(result, utils.getTypeDescription(10, captcha));
218
+ });
219
+ }
220
+ /**
221
+ * getDapp
222
+ *
223
+ * @param { ArgumentTypes.AccountId } contract,
224
+ * @returns { Result<Result<ReturnTypes.Dapp, ReturnTypes.Error>, ReturnTypes.LangError> }
225
+ */
226
+ getDapp(contract, __options) {
227
+ return typechainTypes.queryOkJSON(this.__apiPromise, this.__nativeContract, this.__callerAddress, "getDapp", [contract], __options, (result) => {
228
+ return typechainTypes.handleReturnType(result, utils.getTypeDescription(35, captcha));
229
+ });
230
+ }
231
+ /**
232
+ * dappRegister
233
+ *
234
+ * @param { ArgumentTypes.AccountId } contract,
235
+ * @param { ArgumentTypes.DappPayee } payee,
236
+ * @returns { Result<Result<null, ReturnTypes.Error>, ReturnTypes.LangError> }
237
+ */
238
+ dappRegister(contract, payee, __options) {
239
+ return typechainTypes.queryOkJSON(this.__apiPromise, this.__nativeContract, this.__callerAddress, "dappRegister", [contract, payee], __options, (result) => {
240
+ return typechainTypes.handleReturnType(result, utils.getTypeDescription(10, captcha));
241
+ });
242
+ }
243
+ /**
244
+ * dappUpdate
245
+ *
246
+ * @param { ArgumentTypes.AccountId } contract,
247
+ * @param { ArgumentTypes.DappPayee } payee,
248
+ * @param { ArgumentTypes.AccountId } owner,
249
+ * @returns { Result<Result<null, ReturnTypes.Error>, ReturnTypes.LangError> }
250
+ */
251
+ dappUpdate(contract, payee, owner, __options) {
252
+ return typechainTypes.queryOkJSON(this.__apiPromise, this.__nativeContract, this.__callerAddress, "dappUpdate", [contract, payee, owner], __options, (result) => {
253
+ return typechainTypes.handleReturnType(result, utils.getTypeDescription(10, captcha));
254
+ });
255
+ }
256
+ /**
257
+ * dappFund
258
+ *
259
+ * @param { ArgumentTypes.AccountId } contract,
260
+ * @returns { Result<Result<null, ReturnTypes.Error>, ReturnTypes.LangError> }
261
+ */
262
+ dappFund(contract, __options) {
263
+ return typechainTypes.queryOkJSON(this.__apiPromise, this.__nativeContract, this.__callerAddress, "dappFund", [contract], __options, (result) => {
264
+ return typechainTypes.handleReturnType(result, utils.getTypeDescription(10, captcha));
265
+ });
266
+ }
267
+ /**
268
+ * dappDeregister
269
+ *
270
+ * @param { ArgumentTypes.AccountId } contract,
271
+ * @returns { Result<Result<null, ReturnTypes.Error>, ReturnTypes.LangError> }
272
+ */
273
+ dappDeregister(contract, __options) {
274
+ return typechainTypes.queryOkJSON(this.__apiPromise, this.__nativeContract, this.__callerAddress, "dappDeregister", [contract], __options, (result) => {
275
+ return typechainTypes.handleReturnType(result, utils.getTypeDescription(10, captcha));
276
+ });
277
+ }
278
+ /**
279
+ * dappDeactivate
280
+ *
281
+ * @param { ArgumentTypes.AccountId } contract,
282
+ * @returns { Result<Result<null, ReturnTypes.Error>, ReturnTypes.LangError> }
283
+ */
284
+ dappDeactivate(contract, __options) {
285
+ return typechainTypes.queryOkJSON(this.__apiPromise, this.__nativeContract, this.__callerAddress, "dappDeactivate", [contract], __options, (result) => {
286
+ return typechainTypes.handleReturnType(result, utils.getTypeDescription(10, captcha));
287
+ });
288
+ }
289
+ /**
290
+ * getUserHistorySummary
291
+ *
292
+ * @param { ArgumentTypes.AccountId } userAccount,
293
+ * @returns { Result<Result<ReturnTypes.UserHistorySummary, ReturnTypes.Error>, ReturnTypes.LangError> }
294
+ */
295
+ getUserHistorySummary(userAccount, __options) {
296
+ return typechainTypes.queryOkJSON(this.__apiPromise, this.__nativeContract, this.__callerAddress, "getUserHistorySummary", [userAccount], __options, (result) => {
297
+ return typechainTypes.handleReturnType(result, utils.getTypeDescription(38, captcha));
298
+ });
299
+ }
300
+ /**
301
+ * providerCommit
302
+ *
303
+ * @param { ArgumentTypes.Commit } commit,
304
+ * @returns { Result<Result<null, ReturnTypes.Error>, ReturnTypes.LangError> }
305
+ */
306
+ providerCommit(commit, __options) {
307
+ return typechainTypes.queryOkJSON(this.__apiPromise, this.__nativeContract, this.__callerAddress, "providerCommit", [commit], __options, (result) => {
308
+ return typechainTypes.handleReturnType(result, utils.getTypeDescription(10, captcha));
309
+ });
310
+ }
311
+ /**
312
+ * providerCommitMany
313
+ *
314
+ * @param { Array<ArgumentTypes.Commit> } commits,
315
+ * @returns { Result<Result<null, ReturnTypes.Error>, ReturnTypes.LangError> }
316
+ */
317
+ providerCommitMany(commits, __options) {
318
+ return typechainTypes.queryOkJSON(this.__apiPromise, this.__nativeContract, this.__callerAddress, "providerCommitMany", [commits], __options, (result) => {
319
+ return typechainTypes.handleReturnType(result, utils.getTypeDescription(10, captcha));
320
+ });
321
+ }
322
+ /**
323
+ * dappOperatorIsHumanUser
324
+ *
325
+ * @param { ArgumentTypes.AccountId } userAccount,
326
+ * @param { (number | string | BN) } threshold,
327
+ * @returns { Result<Result<boolean, ReturnTypes.Error>, ReturnTypes.LangError> }
328
+ */
329
+ dappOperatorIsHumanUser(userAccount, threshold, __options) {
330
+ return typechainTypes.queryOkJSON(this.__apiPromise, this.__nativeContract, this.__callerAddress, "dappOperatorIsHumanUser", [userAccount, threshold], __options, (result) => {
331
+ return typechainTypes.handleReturnType(result, utils.getTypeDescription(45, captcha));
332
+ });
333
+ }
334
+ /**
335
+ * dappOperatorLastCorrectCaptcha
336
+ *
337
+ * @param { ArgumentTypes.AccountId } userAccount,
338
+ * @returns { Result<Result<ReturnTypes.LastCorrectCaptcha, ReturnTypes.Error>, ReturnTypes.LangError> }
339
+ */
340
+ dappOperatorLastCorrectCaptcha(userAccount, __options) {
341
+ return typechainTypes.queryOkJSON(this.__apiPromise, this.__nativeContract, this.__callerAddress, "dappOperatorLastCorrectCaptcha", [userAccount], __options, (result) => {
342
+ return typechainTypes.handleReturnType(result, utils.getTypeDescription(48, captcha));
343
+ });
344
+ }
345
+ /**
346
+ * getCaptchaData
347
+ *
348
+ * @param { ArgumentTypes.Hash } datasetId,
349
+ * @returns { Result<Result<ReturnTypes.CaptchaData, ReturnTypes.Error>, ReturnTypes.LangError> }
350
+ */
351
+ getCaptchaData(datasetId, __options) {
352
+ return typechainTypes.queryOkJSON(this.__apiPromise, this.__nativeContract, this.__callerAddress, "getCaptchaData", [datasetId], __options, (result) => {
353
+ return typechainTypes.handleReturnType(result, utils.getTypeDescription(51, captcha));
354
+ });
355
+ }
356
+ /**
357
+ * getUser
358
+ *
359
+ * @param { ArgumentTypes.AccountId } userAccount,
360
+ * @returns { Result<Result<ReturnTypes.User, ReturnTypes.Error>, ReturnTypes.LangError> }
361
+ */
362
+ getUser(userAccount, __options) {
363
+ return typechainTypes.queryOkJSON(this.__apiPromise, this.__nativeContract, this.__callerAddress, "getUser", [userAccount], __options, (result) => {
364
+ return typechainTypes.handleReturnType(result, utils.getTypeDescription(54, captcha));
365
+ });
366
+ }
367
+ /**
368
+ * getCommit
369
+ *
370
+ * @param { ArgumentTypes.Hash } commitId,
371
+ * @returns { Result<Result<ReturnTypes.Commit, ReturnTypes.Error>, ReturnTypes.LangError> }
372
+ */
373
+ getCommit(commitId, __options) {
374
+ return typechainTypes.queryOkJSON(this.__apiPromise, this.__nativeContract, this.__callerAddress, "getCommit", [commitId], __options, (result) => {
375
+ return typechainTypes.handleReturnType(result, utils.getTypeDescription(57, captcha));
376
+ });
377
+ }
378
+ /**
379
+ * listProvidersByAccounts
380
+ *
381
+ * @param { Array<ArgumentTypes.AccountId> } providerAccounts,
382
+ * @returns { Result<Result<Array<ReturnTypes.Provider>, ReturnTypes.Error>, ReturnTypes.LangError> }
383
+ */
384
+ listProvidersByAccounts(providerAccounts, __options) {
385
+ return typechainTypes.queryOkJSON(this.__apiPromise, this.__nativeContract, this.__callerAddress, "listProvidersByAccounts", [providerAccounts], __options, (result) => {
386
+ return typechainTypes.handleReturnType(result, utils.getTypeDescription(59, captcha));
387
+ });
388
+ }
389
+ /**
390
+ * listProvidersByStatus
391
+ *
392
+ * @param { Array<ArgumentTypes.GovernanceStatus> } statuses,
393
+ * @returns { Result<Result<Array<ReturnTypes.Provider>, ReturnTypes.Error>, ReturnTypes.LangError> }
394
+ */
395
+ listProvidersByStatus(statuses, __options) {
396
+ return typechainTypes.queryOkJSON(this.__apiPromise, this.__nativeContract, this.__callerAddress, "listProvidersByStatus", [statuses], __options, (result) => {
397
+ return typechainTypes.handleReturnType(result, utils.getTypeDescription(59, captcha));
398
+ });
399
+ }
400
+ /**
401
+ * getRandomActiveProvider
402
+ *
403
+ * @param { ArgumentTypes.AccountId } userAccount,
404
+ * @param { ArgumentTypes.AccountId } dappContract,
405
+ * @returns { Result<Result<ReturnTypes.RandomProvider, ReturnTypes.Error>, ReturnTypes.LangError> }
406
+ */
407
+ getRandomActiveProvider(userAccount, dappContract, __options) {
408
+ return typechainTypes.queryOkJSON(this.__apiPromise, this.__nativeContract, this.__callerAddress, "getRandomActiveProvider", [userAccount, dappContract], __options, (result) => {
409
+ return typechainTypes.handleReturnType(result, utils.getTypeDescription(62, captcha));
410
+ });
411
+ }
412
+ /**
413
+ * getAllProviderAccounts
414
+ *
415
+ * @returns { Result<Result<Array<ReturnTypes.AccountId>, ReturnTypes.Error>, ReturnTypes.LangError> }
416
+ */
417
+ getAllProviderAccounts(__options) {
418
+ return typechainTypes.queryOkJSON(this.__apiPromise, this.__nativeContract, this.__callerAddress, "getAllProviderAccounts", [], __options, (result) => {
419
+ return typechainTypes.handleReturnType(result, utils.getTypeDescription(65, captcha));
420
+ });
421
+ }
422
+ /**
423
+ * getRandomNumber
424
+ *
425
+ * @param { (string | number | BN) } len,
426
+ * @param { ArgumentTypes.AccountId } userAccount,
427
+ * @param { ArgumentTypes.AccountId } dappContract,
428
+ * @returns { Result<ReturnNumber, ReturnTypes.LangError> }
429
+ */
430
+ getRandomNumber(len, userAccount, dappContract, __options) {
431
+ return typechainTypes.queryOkJSON(this.__apiPromise, this.__nativeContract, this.__callerAddress, "getRandomNumber", [len, userAccount, dappContract], __options, (result) => {
432
+ return typechainTypes.handleReturnType(result, utils.getTypeDescription(28, captcha));
433
+ });
434
+ }
435
+ /**
436
+ * terminate
437
+ *
438
+ * @returns { Result<Result<null, ReturnTypes.Error>, ReturnTypes.LangError> }
439
+ */
440
+ terminate(__options) {
441
+ return typechainTypes.queryOkJSON(this.__apiPromise, this.__nativeContract, this.__callerAddress, "terminate", [], __options, (result) => {
442
+ return typechainTypes.handleReturnType(result, utils.getTypeDescription(10, captcha));
443
+ });
444
+ }
445
+ /**
446
+ * withdraw
447
+ *
448
+ * @param { (string | number | BN) } amount,
449
+ * @returns { Result<Result<null, ReturnTypes.Error>, ReturnTypes.LangError> }
450
+ */
451
+ withdraw(amount, __options) {
452
+ return typechainTypes.queryOkJSON(this.__apiPromise, this.__nativeContract, this.__callerAddress, "withdraw", [amount], __options, (result) => {
453
+ return typechainTypes.handleReturnType(result, utils.getTypeDescription(10, captcha));
454
+ });
455
+ }
456
+ /**
457
+ * setCodeHash
458
+ *
459
+ * @param { Array<(number | string | BN)> } codeHash,
460
+ * @returns { Result<Result<null, ReturnTypes.Error>, ReturnTypes.LangError> }
461
+ */
462
+ setCodeHash(codeHash, __options) {
463
+ return typechainTypes.queryOkJSON(this.__apiPromise, this.__nativeContract, this.__callerAddress, "setCodeHash", [codeHash], __options, (result) => {
464
+ return typechainTypes.handleReturnType(result, utils.getTypeDescription(10, captcha));
465
+ });
466
+ }
467
+ }
468
+ module.exports = Methods;
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const typechainTypes = require("@727-ventures/typechain-types");
4
+ function getTypeDescription(id, types) {
5
+ return types[id];
6
+ }
7
+ function getEventTypeDescription(name, types) {
8
+ return types[name];
9
+ }
10
+ function decodeEvents(events, contract, types) {
11
+ return events.filter((record) => {
12
+ const { event } = record;
13
+ const [address, data] = record.event.data;
14
+ return event.method == "ContractEmitted" && address.toString() === contract.address.toString();
15
+ }).map((record) => {
16
+ const [address, data] = record.event.data;
17
+ const { args, event } = contract.abi.decodeEvent(data);
18
+ const _event = {};
19
+ for (let i = 0; i < args.length; i++) {
20
+ _event[event.args[i].name] = args[i].toJSON();
21
+ }
22
+ typechainTypes.handleEventReturn(_event, getEventTypeDescription(event.identifier.toString(), types));
23
+ return {
24
+ name: event.identifier.toString(),
25
+ args: _event
26
+ };
27
+ });
28
+ }
29
+ exports.decodeEvents = decodeEvents;
30
+ exports.getEventTypeDescription = getEventTypeDescription;
31
+ exports.getTypeDescription = getTypeDescription;