@0xkey-io/sdk-server 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.
Files changed (56) hide show
  1. package/CHANGELOG.md +5 -0
  2. package/LICENSE +201 -0
  3. package/README.md +40 -0
  4. package/dist/0xkey-helpers.d.ts +67 -0
  5. package/dist/0xkey-helpers.d.ts.map +1 -0
  6. package/dist/0xkey-helpers.js +468 -0
  7. package/dist/0xkey-helpers.js.map +1 -0
  8. package/dist/0xkey-helpers.mjs +402 -0
  9. package/dist/0xkey-helpers.mjs.map +1 -0
  10. package/dist/__generated__/sdk-client-base.d.ts +234 -0
  11. package/dist/__generated__/sdk-client-base.d.ts.map +1 -0
  12. package/dist/__generated__/sdk-client-base.js +3093 -0
  13. package/dist/__generated__/sdk-client-base.js.map +1 -0
  14. package/dist/__generated__/sdk-client-base.mjs +3091 -0
  15. package/dist/__generated__/sdk-client-base.mjs.map +1 -0
  16. package/dist/__generated__/sdk_api_types.d.ts +559 -0
  17. package/dist/__generated__/sdk_api_types.d.ts.map +1 -0
  18. package/dist/__generated__/version.d.ts +2 -0
  19. package/dist/__generated__/version.d.ts.map +1 -0
  20. package/dist/__generated__/version.js +6 -0
  21. package/dist/__generated__/version.js.map +1 -0
  22. package/dist/__generated__/version.mjs +4 -0
  23. package/dist/__generated__/version.mjs.map +1 -0
  24. package/dist/__inputs__/public_api.types.d.ts +6732 -0
  25. package/dist/__inputs__/public_api.types.d.ts.map +1 -0
  26. package/dist/__types__/base.d.ts +212 -0
  27. package/dist/__types__/base.d.ts.map +1 -0
  28. package/dist/__types__/base.js +30 -0
  29. package/dist/__types__/base.js.map +1 -0
  30. package/dist/__types__/base.mjs +28 -0
  31. package/dist/__types__/base.mjs.map +1 -0
  32. package/dist/actions.d.ts +13 -0
  33. package/dist/actions.d.ts.map +1 -0
  34. package/dist/actions.js +313 -0
  35. package/dist/actions.js.map +1 -0
  36. package/dist/actions.mjs +301 -0
  37. package/dist/actions.mjs.map +1 -0
  38. package/dist/index.d.ts +27 -0
  39. package/dist/index.d.ts.map +1 -0
  40. package/dist/index.js +127 -0
  41. package/dist/index.js.map +1 -0
  42. package/dist/index.mjs +24 -0
  43. package/dist/index.mjs.map +1 -0
  44. package/dist/sdk-client.d.ts +30 -0
  45. package/dist/sdk-client.d.ts.map +1 -0
  46. package/dist/sdk-client.js +152 -0
  47. package/dist/sdk-client.js.map +1 -0
  48. package/dist/sdk-client.mjs +148 -0
  49. package/dist/sdk-client.mjs.map +1 -0
  50. package/dist/universal.d.ts +3 -0
  51. package/dist/universal.d.ts.map +1 -0
  52. package/dist/universal.js +9 -0
  53. package/dist/universal.js.map +1 -0
  54. package/dist/universal.mjs +7 -0
  55. package/dist/universal.mjs.map +1 -0
  56. package/package.json +63 -0
@@ -0,0 +1,3093 @@
1
+ 'use strict';
2
+
3
+ var http = require('@0xkey-io/http');
4
+ var base = require('../__types__/base.js');
5
+ var version = require('./version.js');
6
+
7
+ /* @generated by codegen. DO NOT EDIT BY HAND */
8
+ class ZeroXKeySDKClientBase {
9
+ constructor(config) {
10
+ this.getActivity = async (input) => {
11
+ return this.request("/public/v1/query/get_activity", {
12
+ ...input,
13
+ organizationId: input.organizationId ?? this.config.organizationId,
14
+ });
15
+ };
16
+ this.stampGetActivity = async (input) => {
17
+ if (!this.stamper) {
18
+ return undefined;
19
+ }
20
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_activity";
21
+ const body = {
22
+ ...input,
23
+ organizationId: input.organizationId ?? this.config.organizationId,
24
+ };
25
+ const stringifiedBody = JSON.stringify(body);
26
+ const stamp = await this.stamper.stamp(stringifiedBody);
27
+ return {
28
+ body: stringifiedBody,
29
+ stamp: stamp,
30
+ url: fullUrl,
31
+ };
32
+ };
33
+ this.getApiKey = async (input) => {
34
+ return this.request("/public/v1/query/get_api_key", {
35
+ ...input,
36
+ organizationId: input.organizationId ?? this.config.organizationId,
37
+ });
38
+ };
39
+ this.stampGetApiKey = async (input) => {
40
+ if (!this.stamper) {
41
+ return undefined;
42
+ }
43
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_api_key";
44
+ const body = {
45
+ ...input,
46
+ organizationId: input.organizationId ?? this.config.organizationId,
47
+ };
48
+ const stringifiedBody = JSON.stringify(body);
49
+ const stamp = await this.stamper.stamp(stringifiedBody);
50
+ return {
51
+ body: stringifiedBody,
52
+ stamp: stamp,
53
+ url: fullUrl,
54
+ };
55
+ };
56
+ this.getApiKeys = async (input = {}) => {
57
+ return this.request("/public/v1/query/get_api_keys", {
58
+ ...input,
59
+ organizationId: input.organizationId ?? this.config.organizationId,
60
+ });
61
+ };
62
+ this.stampGetApiKeys = async (input) => {
63
+ if (!this.stamper) {
64
+ return undefined;
65
+ }
66
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_api_keys";
67
+ const body = {
68
+ ...input,
69
+ organizationId: input.organizationId ?? this.config.organizationId,
70
+ };
71
+ const stringifiedBody = JSON.stringify(body);
72
+ const stamp = await this.stamper.stamp(stringifiedBody);
73
+ return {
74
+ body: stringifiedBody,
75
+ stamp: stamp,
76
+ url: fullUrl,
77
+ };
78
+ };
79
+ this.getAuthenticator = async (input) => {
80
+ return this.request("/public/v1/query/get_authenticator", {
81
+ ...input,
82
+ organizationId: input.organizationId ?? this.config.organizationId,
83
+ });
84
+ };
85
+ this.stampGetAuthenticator = async (input) => {
86
+ if (!this.stamper) {
87
+ return undefined;
88
+ }
89
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_authenticator";
90
+ const body = {
91
+ ...input,
92
+ organizationId: input.organizationId ?? this.config.organizationId,
93
+ };
94
+ const stringifiedBody = JSON.stringify(body);
95
+ const stamp = await this.stamper.stamp(stringifiedBody);
96
+ return {
97
+ body: stringifiedBody,
98
+ stamp: stamp,
99
+ url: fullUrl,
100
+ };
101
+ };
102
+ this.getAuthenticators = async (input) => {
103
+ return this.request("/public/v1/query/get_authenticators", {
104
+ ...input,
105
+ organizationId: input.organizationId ?? this.config.organizationId,
106
+ });
107
+ };
108
+ this.stampGetAuthenticators = async (input) => {
109
+ if (!this.stamper) {
110
+ return undefined;
111
+ }
112
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_authenticators";
113
+ const body = {
114
+ ...input,
115
+ organizationId: input.organizationId ?? this.config.organizationId,
116
+ };
117
+ const stringifiedBody = JSON.stringify(body);
118
+ const stamp = await this.stamper.stamp(stringifiedBody);
119
+ return {
120
+ body: stringifiedBody,
121
+ stamp: stamp,
122
+ url: fullUrl,
123
+ };
124
+ };
125
+ this.getBootProof = async (input) => {
126
+ return this.request("/public/v1/query/get_boot_proof", {
127
+ ...input,
128
+ organizationId: input.organizationId ?? this.config.organizationId,
129
+ });
130
+ };
131
+ this.stampGetBootProof = async (input) => {
132
+ if (!this.stamper) {
133
+ return undefined;
134
+ }
135
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_boot_proof";
136
+ const body = {
137
+ ...input,
138
+ organizationId: input.organizationId ?? this.config.organizationId,
139
+ };
140
+ const stringifiedBody = JSON.stringify(body);
141
+ const stamp = await this.stamper.stamp(stringifiedBody);
142
+ return {
143
+ body: stringifiedBody,
144
+ stamp: stamp,
145
+ url: fullUrl,
146
+ };
147
+ };
148
+ this.getGasUsage = async (input) => {
149
+ return this.request("/public/v1/query/get_gas_usage", {
150
+ ...input,
151
+ organizationId: input.organizationId ?? this.config.organizationId,
152
+ });
153
+ };
154
+ this.stampGetGasUsage = async (input) => {
155
+ if (!this.stamper) {
156
+ return undefined;
157
+ }
158
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_gas_usage";
159
+ const body = {
160
+ ...input,
161
+ organizationId: input.organizationId ?? this.config.organizationId,
162
+ };
163
+ const stringifiedBody = JSON.stringify(body);
164
+ const stamp = await this.stamper.stamp(stringifiedBody);
165
+ return {
166
+ body: stringifiedBody,
167
+ stamp: stamp,
168
+ url: fullUrl,
169
+ };
170
+ };
171
+ this.getLatestBootProof = async (input) => {
172
+ return this.request("/public/v1/query/get_latest_boot_proof", {
173
+ ...input,
174
+ organizationId: input.organizationId ?? this.config.organizationId,
175
+ });
176
+ };
177
+ this.stampGetLatestBootProof = async (input) => {
178
+ if (!this.stamper) {
179
+ return undefined;
180
+ }
181
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_latest_boot_proof";
182
+ const body = {
183
+ ...input,
184
+ organizationId: input.organizationId ?? this.config.organizationId,
185
+ };
186
+ const stringifiedBody = JSON.stringify(body);
187
+ const stamp = await this.stamper.stamp(stringifiedBody);
188
+ return {
189
+ body: stringifiedBody,
190
+ stamp: stamp,
191
+ url: fullUrl,
192
+ };
193
+ };
194
+ this.getNonces = async (input) => {
195
+ return this.request("/public/v1/query/get_nonces", {
196
+ ...input,
197
+ organizationId: input.organizationId ?? this.config.organizationId,
198
+ });
199
+ };
200
+ this.stampGetNonces = async (input) => {
201
+ if (!this.stamper) {
202
+ return undefined;
203
+ }
204
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_nonces";
205
+ const body = {
206
+ ...input,
207
+ organizationId: input.organizationId ?? this.config.organizationId,
208
+ };
209
+ const stringifiedBody = JSON.stringify(body);
210
+ const stamp = await this.stamper.stamp(stringifiedBody);
211
+ return {
212
+ body: stringifiedBody,
213
+ stamp: stamp,
214
+ url: fullUrl,
215
+ };
216
+ };
217
+ this.getOauth2Credential = async (input) => {
218
+ return this.request("/public/v1/query/get_oauth2_credential", {
219
+ ...input,
220
+ organizationId: input.organizationId ?? this.config.organizationId,
221
+ });
222
+ };
223
+ this.stampGetOauth2Credential = async (input) => {
224
+ if (!this.stamper) {
225
+ return undefined;
226
+ }
227
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_oauth2_credential";
228
+ const body = {
229
+ ...input,
230
+ organizationId: input.organizationId ?? this.config.organizationId,
231
+ };
232
+ const stringifiedBody = JSON.stringify(body);
233
+ const stamp = await this.stamper.stamp(stringifiedBody);
234
+ return {
235
+ body: stringifiedBody,
236
+ stamp: stamp,
237
+ url: fullUrl,
238
+ };
239
+ };
240
+ this.getOauthProviders = async (input) => {
241
+ return this.request("/public/v1/query/get_oauth_providers", {
242
+ ...input,
243
+ organizationId: input.organizationId ?? this.config.organizationId,
244
+ });
245
+ };
246
+ this.stampGetOauthProviders = async (input) => {
247
+ if (!this.stamper) {
248
+ return undefined;
249
+ }
250
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_oauth_providers";
251
+ const body = {
252
+ ...input,
253
+ organizationId: input.organizationId ?? this.config.organizationId,
254
+ };
255
+ const stringifiedBody = JSON.stringify(body);
256
+ const stamp = await this.stamper.stamp(stringifiedBody);
257
+ return {
258
+ body: stringifiedBody,
259
+ stamp: stamp,
260
+ url: fullUrl,
261
+ };
262
+ };
263
+ this.getOnRampTransactionStatus = async (input) => {
264
+ return this.request("/public/v1/query/get_onramp_transaction_status", {
265
+ ...input,
266
+ organizationId: input.organizationId ?? this.config.organizationId,
267
+ });
268
+ };
269
+ this.stampGetOnRampTransactionStatus = async (input) => {
270
+ if (!this.stamper) {
271
+ return undefined;
272
+ }
273
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_onramp_transaction_status";
274
+ const body = {
275
+ ...input,
276
+ organizationId: input.organizationId ?? this.config.organizationId,
277
+ };
278
+ const stringifiedBody = JSON.stringify(body);
279
+ const stamp = await this.stamper.stamp(stringifiedBody);
280
+ return {
281
+ body: stringifiedBody,
282
+ stamp: stamp,
283
+ url: fullUrl,
284
+ };
285
+ };
286
+ this.getOrganizationConfigs = async (input) => {
287
+ return this.request("/public/v1/query/get_organization_configs", {
288
+ ...input,
289
+ organizationId: input.organizationId ?? this.config.organizationId,
290
+ });
291
+ };
292
+ this.stampGetOrganizationConfigs = async (input) => {
293
+ if (!this.stamper) {
294
+ return undefined;
295
+ }
296
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_organization_configs";
297
+ const body = {
298
+ ...input,
299
+ organizationId: input.organizationId ?? this.config.organizationId,
300
+ };
301
+ const stringifiedBody = JSON.stringify(body);
302
+ const stamp = await this.stamper.stamp(stringifiedBody);
303
+ return {
304
+ body: stringifiedBody,
305
+ stamp: stamp,
306
+ url: fullUrl,
307
+ };
308
+ };
309
+ this.getPolicy = async (input) => {
310
+ return this.request("/public/v1/query/get_policy", {
311
+ ...input,
312
+ organizationId: input.organizationId ?? this.config.organizationId,
313
+ });
314
+ };
315
+ this.stampGetPolicy = async (input) => {
316
+ if (!this.stamper) {
317
+ return undefined;
318
+ }
319
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_policy";
320
+ const body = {
321
+ ...input,
322
+ organizationId: input.organizationId ?? this.config.organizationId,
323
+ };
324
+ const stringifiedBody = JSON.stringify(body);
325
+ const stamp = await this.stamper.stamp(stringifiedBody);
326
+ return {
327
+ body: stringifiedBody,
328
+ stamp: stamp,
329
+ url: fullUrl,
330
+ };
331
+ };
332
+ this.getPolicyEvaluations = async (input) => {
333
+ return this.request("/public/v1/query/get_policy_evaluations", {
334
+ ...input,
335
+ organizationId: input.organizationId ?? this.config.organizationId,
336
+ });
337
+ };
338
+ this.stampGetPolicyEvaluations = async (input) => {
339
+ if (!this.stamper) {
340
+ return undefined;
341
+ }
342
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_policy_evaluations";
343
+ const body = {
344
+ ...input,
345
+ organizationId: input.organizationId ?? this.config.organizationId,
346
+ };
347
+ const stringifiedBody = JSON.stringify(body);
348
+ const stamp = await this.stamper.stamp(stringifiedBody);
349
+ return {
350
+ body: stringifiedBody,
351
+ stamp: stamp,
352
+ url: fullUrl,
353
+ };
354
+ };
355
+ this.getPrivateKey = async (input) => {
356
+ return this.request("/public/v1/query/get_private_key", {
357
+ ...input,
358
+ organizationId: input.organizationId ?? this.config.organizationId,
359
+ });
360
+ };
361
+ this.stampGetPrivateKey = async (input) => {
362
+ if (!this.stamper) {
363
+ return undefined;
364
+ }
365
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_private_key";
366
+ const body = {
367
+ ...input,
368
+ organizationId: input.organizationId ?? this.config.organizationId,
369
+ };
370
+ const stringifiedBody = JSON.stringify(body);
371
+ const stamp = await this.stamper.stamp(stringifiedBody);
372
+ return {
373
+ body: stringifiedBody,
374
+ stamp: stamp,
375
+ url: fullUrl,
376
+ };
377
+ };
378
+ this.getSendTransactionStatus = async (input) => {
379
+ return this.request("/public/v1/query/get_send_transaction_status", {
380
+ ...input,
381
+ organizationId: input.organizationId ?? this.config.organizationId,
382
+ });
383
+ };
384
+ this.stampGetSendTransactionStatus = async (input) => {
385
+ if (!this.stamper) {
386
+ return undefined;
387
+ }
388
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_send_transaction_status";
389
+ const body = {
390
+ ...input,
391
+ organizationId: input.organizationId ?? this.config.organizationId,
392
+ };
393
+ const stringifiedBody = JSON.stringify(body);
394
+ const stamp = await this.stamper.stamp(stringifiedBody);
395
+ return {
396
+ body: stringifiedBody,
397
+ stamp: stamp,
398
+ url: fullUrl,
399
+ };
400
+ };
401
+ this.getSmartContractInterface = async (input) => {
402
+ return this.request("/public/v1/query/get_smart_contract_interface", {
403
+ ...input,
404
+ organizationId: input.organizationId ?? this.config.organizationId,
405
+ });
406
+ };
407
+ this.stampGetSmartContractInterface = async (input) => {
408
+ if (!this.stamper) {
409
+ return undefined;
410
+ }
411
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_smart_contract_interface";
412
+ const body = {
413
+ ...input,
414
+ organizationId: input.organizationId ?? this.config.organizationId,
415
+ };
416
+ const stringifiedBody = JSON.stringify(body);
417
+ const stamp = await this.stamper.stamp(stringifiedBody);
418
+ return {
419
+ body: stringifiedBody,
420
+ stamp: stamp,
421
+ url: fullUrl,
422
+ };
423
+ };
424
+ this.getUser = async (input) => {
425
+ return this.request("/public/v1/query/get_user", {
426
+ ...input,
427
+ organizationId: input.organizationId ?? this.config.organizationId,
428
+ });
429
+ };
430
+ this.stampGetUser = async (input) => {
431
+ if (!this.stamper) {
432
+ return undefined;
433
+ }
434
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_user";
435
+ const body = {
436
+ ...input,
437
+ organizationId: input.organizationId ?? this.config.organizationId,
438
+ };
439
+ const stringifiedBody = JSON.stringify(body);
440
+ const stamp = await this.stamper.stamp(stringifiedBody);
441
+ return {
442
+ body: stringifiedBody,
443
+ stamp: stamp,
444
+ url: fullUrl,
445
+ };
446
+ };
447
+ this.getWallet = async (input) => {
448
+ return this.request("/public/v1/query/get_wallet", {
449
+ ...input,
450
+ organizationId: input.organizationId ?? this.config.organizationId,
451
+ });
452
+ };
453
+ this.stampGetWallet = async (input) => {
454
+ if (!this.stamper) {
455
+ return undefined;
456
+ }
457
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_wallet";
458
+ const body = {
459
+ ...input,
460
+ organizationId: input.organizationId ?? this.config.organizationId,
461
+ };
462
+ const stringifiedBody = JSON.stringify(body);
463
+ const stamp = await this.stamper.stamp(stringifiedBody);
464
+ return {
465
+ body: stringifiedBody,
466
+ stamp: stamp,
467
+ url: fullUrl,
468
+ };
469
+ };
470
+ this.getWalletAccount = async (input) => {
471
+ return this.request("/public/v1/query/get_wallet_account", {
472
+ ...input,
473
+ organizationId: input.organizationId ?? this.config.organizationId,
474
+ });
475
+ };
476
+ this.stampGetWalletAccount = async (input) => {
477
+ if (!this.stamper) {
478
+ return undefined;
479
+ }
480
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_wallet_account";
481
+ const body = {
482
+ ...input,
483
+ organizationId: input.organizationId ?? this.config.organizationId,
484
+ };
485
+ const stringifiedBody = JSON.stringify(body);
486
+ const stamp = await this.stamper.stamp(stringifiedBody);
487
+ return {
488
+ body: stringifiedBody,
489
+ stamp: stamp,
490
+ url: fullUrl,
491
+ };
492
+ };
493
+ this.getActivities = async (input = {}) => {
494
+ return this.request("/public/v1/query/list_activities", {
495
+ ...input,
496
+ organizationId: input.organizationId ?? this.config.organizationId,
497
+ });
498
+ };
499
+ this.stampGetActivities = async (input) => {
500
+ if (!this.stamper) {
501
+ return undefined;
502
+ }
503
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/list_activities";
504
+ const body = {
505
+ ...input,
506
+ organizationId: input.organizationId ?? this.config.organizationId,
507
+ };
508
+ const stringifiedBody = JSON.stringify(body);
509
+ const stamp = await this.stamper.stamp(stringifiedBody);
510
+ return {
511
+ body: stringifiedBody,
512
+ stamp: stamp,
513
+ url: fullUrl,
514
+ };
515
+ };
516
+ this.getAppProofs = async (input) => {
517
+ return this.request("/public/v1/query/list_app_proofs", {
518
+ ...input,
519
+ organizationId: input.organizationId ?? this.config.organizationId,
520
+ });
521
+ };
522
+ this.stampGetAppProofs = async (input) => {
523
+ if (!this.stamper) {
524
+ return undefined;
525
+ }
526
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/list_app_proofs";
527
+ const body = {
528
+ ...input,
529
+ organizationId: input.organizationId ?? this.config.organizationId,
530
+ };
531
+ const stringifiedBody = JSON.stringify(body);
532
+ const stamp = await this.stamper.stamp(stringifiedBody);
533
+ return {
534
+ body: stringifiedBody,
535
+ stamp: stamp,
536
+ url: fullUrl,
537
+ };
538
+ };
539
+ this.listFiatOnRampCredentials = async (input) => {
540
+ return this.request("/public/v1/query/list_fiat_on_ramp_credentials", {
541
+ ...input,
542
+ organizationId: input.organizationId ?? this.config.organizationId,
543
+ });
544
+ };
545
+ this.stampListFiatOnRampCredentials = async (input) => {
546
+ if (!this.stamper) {
547
+ return undefined;
548
+ }
549
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/list_fiat_on_ramp_credentials";
550
+ const body = {
551
+ ...input,
552
+ organizationId: input.organizationId ?? this.config.organizationId,
553
+ };
554
+ const stringifiedBody = JSON.stringify(body);
555
+ const stamp = await this.stamper.stamp(stringifiedBody);
556
+ return {
557
+ body: stringifiedBody,
558
+ stamp: stamp,
559
+ url: fullUrl,
560
+ };
561
+ };
562
+ this.listOauth2Credentials = async (input) => {
563
+ return this.request("/public/v1/query/list_oauth2_credentials", {
564
+ ...input,
565
+ organizationId: input.organizationId ?? this.config.organizationId,
566
+ });
567
+ };
568
+ this.stampListOauth2Credentials = async (input) => {
569
+ if (!this.stamper) {
570
+ return undefined;
571
+ }
572
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/list_oauth2_credentials";
573
+ const body = {
574
+ ...input,
575
+ organizationId: input.organizationId ?? this.config.organizationId,
576
+ };
577
+ const stringifiedBody = JSON.stringify(body);
578
+ const stamp = await this.stamper.stamp(stringifiedBody);
579
+ return {
580
+ body: stringifiedBody,
581
+ stamp: stamp,
582
+ url: fullUrl,
583
+ };
584
+ };
585
+ this.getPolicies = async (input = {}) => {
586
+ return this.request("/public/v1/query/list_policies", {
587
+ ...input,
588
+ organizationId: input.organizationId ?? this.config.organizationId,
589
+ });
590
+ };
591
+ this.stampGetPolicies = async (input) => {
592
+ if (!this.stamper) {
593
+ return undefined;
594
+ }
595
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/list_policies";
596
+ const body = {
597
+ ...input,
598
+ organizationId: input.organizationId ?? this.config.organizationId,
599
+ };
600
+ const stringifiedBody = JSON.stringify(body);
601
+ const stamp = await this.stamper.stamp(stringifiedBody);
602
+ return {
603
+ body: stringifiedBody,
604
+ stamp: stamp,
605
+ url: fullUrl,
606
+ };
607
+ };
608
+ this.listPrivateKeyTags = async (input) => {
609
+ return this.request("/public/v1/query/list_private_key_tags", {
610
+ ...input,
611
+ organizationId: input.organizationId ?? this.config.organizationId,
612
+ });
613
+ };
614
+ this.stampListPrivateKeyTags = async (input) => {
615
+ if (!this.stamper) {
616
+ return undefined;
617
+ }
618
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/list_private_key_tags";
619
+ const body = {
620
+ ...input,
621
+ organizationId: input.organizationId ?? this.config.organizationId,
622
+ };
623
+ const stringifiedBody = JSON.stringify(body);
624
+ const stamp = await this.stamper.stamp(stringifiedBody);
625
+ return {
626
+ body: stringifiedBody,
627
+ stamp: stamp,
628
+ url: fullUrl,
629
+ };
630
+ };
631
+ this.getPrivateKeys = async (input = {}) => {
632
+ return this.request("/public/v1/query/list_private_keys", {
633
+ ...input,
634
+ organizationId: input.organizationId ?? this.config.organizationId,
635
+ });
636
+ };
637
+ this.stampGetPrivateKeys = async (input) => {
638
+ if (!this.stamper) {
639
+ return undefined;
640
+ }
641
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/list_private_keys";
642
+ const body = {
643
+ ...input,
644
+ organizationId: input.organizationId ?? this.config.organizationId,
645
+ };
646
+ const stringifiedBody = JSON.stringify(body);
647
+ const stamp = await this.stamper.stamp(stringifiedBody);
648
+ return {
649
+ body: stringifiedBody,
650
+ stamp: stamp,
651
+ url: fullUrl,
652
+ };
653
+ };
654
+ this.getSmartContractInterfaces = async (input) => {
655
+ return this.request("/public/v1/query/list_smart_contract_interfaces", {
656
+ ...input,
657
+ organizationId: input.organizationId ?? this.config.organizationId,
658
+ });
659
+ };
660
+ this.stampGetSmartContractInterfaces = async (input) => {
661
+ if (!this.stamper) {
662
+ return undefined;
663
+ }
664
+ const fullUrl = this.config.apiBaseUrl +
665
+ "/public/v1/query/list_smart_contract_interfaces";
666
+ const body = {
667
+ ...input,
668
+ organizationId: input.organizationId ?? this.config.organizationId,
669
+ };
670
+ const stringifiedBody = JSON.stringify(body);
671
+ const stamp = await this.stamper.stamp(stringifiedBody);
672
+ return {
673
+ body: stringifiedBody,
674
+ stamp: stamp,
675
+ url: fullUrl,
676
+ };
677
+ };
678
+ this.getSubOrgIds = async (input = {}) => {
679
+ return this.request("/public/v1/query/list_suborgs", {
680
+ ...input,
681
+ organizationId: input.organizationId ?? this.config.organizationId,
682
+ });
683
+ };
684
+ this.stampGetSubOrgIds = async (input) => {
685
+ if (!this.stamper) {
686
+ return undefined;
687
+ }
688
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/list_suborgs";
689
+ const body = {
690
+ ...input,
691
+ organizationId: input.organizationId ?? this.config.organizationId,
692
+ };
693
+ const stringifiedBody = JSON.stringify(body);
694
+ const stamp = await this.stamper.stamp(stringifiedBody);
695
+ return {
696
+ body: stringifiedBody,
697
+ stamp: stamp,
698
+ url: fullUrl,
699
+ };
700
+ };
701
+ this.listUserTags = async (input = {}) => {
702
+ return this.request("/public/v1/query/list_user_tags", {
703
+ ...input,
704
+ organizationId: input.organizationId ?? this.config.organizationId,
705
+ });
706
+ };
707
+ this.stampListUserTags = async (input) => {
708
+ if (!this.stamper) {
709
+ return undefined;
710
+ }
711
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/list_user_tags";
712
+ const body = {
713
+ ...input,
714
+ organizationId: input.organizationId ?? this.config.organizationId,
715
+ };
716
+ const stringifiedBody = JSON.stringify(body);
717
+ const stamp = await this.stamper.stamp(stringifiedBody);
718
+ return {
719
+ body: stringifiedBody,
720
+ stamp: stamp,
721
+ url: fullUrl,
722
+ };
723
+ };
724
+ this.getUsers = async (input = {}) => {
725
+ return this.request("/public/v1/query/list_users", {
726
+ ...input,
727
+ organizationId: input.organizationId ?? this.config.organizationId,
728
+ });
729
+ };
730
+ this.stampGetUsers = async (input) => {
731
+ if (!this.stamper) {
732
+ return undefined;
733
+ }
734
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/list_users";
735
+ const body = {
736
+ ...input,
737
+ organizationId: input.organizationId ?? this.config.organizationId,
738
+ };
739
+ const stringifiedBody = JSON.stringify(body);
740
+ const stamp = await this.stamper.stamp(stringifiedBody);
741
+ return {
742
+ body: stringifiedBody,
743
+ stamp: stamp,
744
+ url: fullUrl,
745
+ };
746
+ };
747
+ this.getVerifiedSubOrgIds = async (input) => {
748
+ return this.request("/public/v1/query/list_verified_suborgs", {
749
+ ...input,
750
+ organizationId: input.organizationId ?? this.config.organizationId,
751
+ });
752
+ };
753
+ this.stampGetVerifiedSubOrgIds = async (input) => {
754
+ if (!this.stamper) {
755
+ return undefined;
756
+ }
757
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/list_verified_suborgs";
758
+ const body = {
759
+ ...input,
760
+ organizationId: input.organizationId ?? this.config.organizationId,
761
+ };
762
+ const stringifiedBody = JSON.stringify(body);
763
+ const stamp = await this.stamper.stamp(stringifiedBody);
764
+ return {
765
+ body: stringifiedBody,
766
+ stamp: stamp,
767
+ url: fullUrl,
768
+ };
769
+ };
770
+ this.getWalletAccounts = async (input) => {
771
+ return this.request("/public/v1/query/list_wallet_accounts", {
772
+ ...input,
773
+ organizationId: input.organizationId ?? this.config.organizationId,
774
+ });
775
+ };
776
+ this.stampGetWalletAccounts = async (input) => {
777
+ if (!this.stamper) {
778
+ return undefined;
779
+ }
780
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/list_wallet_accounts";
781
+ const body = {
782
+ ...input,
783
+ organizationId: input.organizationId ?? this.config.organizationId,
784
+ };
785
+ const stringifiedBody = JSON.stringify(body);
786
+ const stamp = await this.stamper.stamp(stringifiedBody);
787
+ return {
788
+ body: stringifiedBody,
789
+ stamp: stamp,
790
+ url: fullUrl,
791
+ };
792
+ };
793
+ this.getWallets = async (input = {}) => {
794
+ return this.request("/public/v1/query/list_wallets", {
795
+ ...input,
796
+ organizationId: input.organizationId ?? this.config.organizationId,
797
+ });
798
+ };
799
+ this.stampGetWallets = async (input) => {
800
+ if (!this.stamper) {
801
+ return undefined;
802
+ }
803
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/list_wallets";
804
+ const body = {
805
+ ...input,
806
+ organizationId: input.organizationId ?? this.config.organizationId,
807
+ };
808
+ const stringifiedBody = JSON.stringify(body);
809
+ const stamp = await this.stamper.stamp(stringifiedBody);
810
+ return {
811
+ body: stringifiedBody,
812
+ stamp: stamp,
813
+ url: fullUrl,
814
+ };
815
+ };
816
+ this.getWhoami = async (input = {}) => {
817
+ return this.request("/public/v1/query/whoami", {
818
+ ...input,
819
+ organizationId: input.organizationId ?? this.config.organizationId,
820
+ });
821
+ };
822
+ this.stampGetWhoami = async (input) => {
823
+ if (!this.stamper) {
824
+ return undefined;
825
+ }
826
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/whoami";
827
+ const body = {
828
+ ...input,
829
+ organizationId: input.organizationId ?? this.config.organizationId,
830
+ };
831
+ const stringifiedBody = JSON.stringify(body);
832
+ const stamp = await this.stamper.stamp(stringifiedBody);
833
+ return {
834
+ body: stringifiedBody,
835
+ stamp: stamp,
836
+ url: fullUrl,
837
+ };
838
+ };
839
+ this.approveActivity = async (input) => {
840
+ const { organizationId, timestampMs, ...rest } = input;
841
+ return this.activityDecision("/public/v1/submit/approve_activity", {
842
+ parameters: rest,
843
+ organizationId: organizationId ?? this.config.organizationId,
844
+ timestampMs: timestampMs ?? String(Date.now()),
845
+ type: "ACTIVITY_TYPE_APPROVE_ACTIVITY",
846
+ });
847
+ };
848
+ this.stampApproveActivity = async (input) => {
849
+ if (!this.stamper) {
850
+ return undefined;
851
+ }
852
+ const { organizationId, timestampMs, ...parameters } = input;
853
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/approve_activity";
854
+ const bodyWithType = {
855
+ parameters,
856
+ organizationId: organizationId ?? this.config.organizationId,
857
+ timestampMs: timestampMs ?? String(Date.now()),
858
+ type: "ACTIVITY_TYPE_APPROVE_ACTIVITY",
859
+ };
860
+ const stringifiedBody = JSON.stringify(bodyWithType);
861
+ const stamp = await this.stamper.stamp(stringifiedBody);
862
+ return {
863
+ body: stringifiedBody,
864
+ stamp: stamp,
865
+ url: fullUrl,
866
+ };
867
+ };
868
+ this.createApiKeys = async (input) => {
869
+ const { organizationId, timestampMs, ...rest } = input;
870
+ return this.command("/public/v1/submit/create_api_keys", {
871
+ parameters: rest,
872
+ organizationId: organizationId ?? this.config.organizationId,
873
+ timestampMs: timestampMs ?? String(Date.now()),
874
+ type: "ACTIVITY_TYPE_CREATE_API_KEYS_V2",
875
+ }, "createApiKeysResult");
876
+ };
877
+ this.stampCreateApiKeys = async (input) => {
878
+ if (!this.stamper) {
879
+ return undefined;
880
+ }
881
+ const { organizationId, timestampMs, ...parameters } = input;
882
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_api_keys";
883
+ const bodyWithType = {
884
+ parameters,
885
+ organizationId: organizationId ?? this.config.organizationId,
886
+ timestampMs: timestampMs ?? String(Date.now()),
887
+ type: "ACTIVITY_TYPE_CREATE_API_KEYS_V2",
888
+ };
889
+ const stringifiedBody = JSON.stringify(bodyWithType);
890
+ const stamp = await this.stamper.stamp(stringifiedBody);
891
+ return {
892
+ body: stringifiedBody,
893
+ stamp: stamp,
894
+ url: fullUrl,
895
+ };
896
+ };
897
+ this.createAuthenticators = async (input) => {
898
+ const { organizationId, timestampMs, ...rest } = input;
899
+ return this.command("/public/v1/submit/create_authenticators", {
900
+ parameters: rest,
901
+ organizationId: organizationId ?? this.config.organizationId,
902
+ timestampMs: timestampMs ?? String(Date.now()),
903
+ type: "ACTIVITY_TYPE_CREATE_AUTHENTICATORS_V2",
904
+ }, "createAuthenticatorsResult");
905
+ };
906
+ this.stampCreateAuthenticators = async (input) => {
907
+ if (!this.stamper) {
908
+ return undefined;
909
+ }
910
+ const { organizationId, timestampMs, ...parameters } = input;
911
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_authenticators";
912
+ const bodyWithType = {
913
+ parameters,
914
+ organizationId: organizationId ?? this.config.organizationId,
915
+ timestampMs: timestampMs ?? String(Date.now()),
916
+ type: "ACTIVITY_TYPE_CREATE_AUTHENTICATORS_V2",
917
+ };
918
+ const stringifiedBody = JSON.stringify(bodyWithType);
919
+ const stamp = await this.stamper.stamp(stringifiedBody);
920
+ return {
921
+ body: stringifiedBody,
922
+ stamp: stamp,
923
+ url: fullUrl,
924
+ };
925
+ };
926
+ this.createFiatOnRampCredential = async (input) => {
927
+ const { organizationId, timestampMs, ...rest } = input;
928
+ return this.command("/public/v1/submit/create_fiat_on_ramp_credential", {
929
+ parameters: rest,
930
+ organizationId: organizationId ?? this.config.organizationId,
931
+ timestampMs: timestampMs ?? String(Date.now()),
932
+ type: "ACTIVITY_TYPE_CREATE_FIAT_ON_RAMP_CREDENTIAL",
933
+ }, "createFiatOnRampCredentialResult");
934
+ };
935
+ this.stampCreateFiatOnRampCredential = async (input) => {
936
+ if (!this.stamper) {
937
+ return undefined;
938
+ }
939
+ const { organizationId, timestampMs, ...parameters } = input;
940
+ const fullUrl = this.config.apiBaseUrl +
941
+ "/public/v1/submit/create_fiat_on_ramp_credential";
942
+ const bodyWithType = {
943
+ parameters,
944
+ organizationId: organizationId ?? this.config.organizationId,
945
+ timestampMs: timestampMs ?? String(Date.now()),
946
+ type: "ACTIVITY_TYPE_CREATE_FIAT_ON_RAMP_CREDENTIAL",
947
+ };
948
+ const stringifiedBody = JSON.stringify(bodyWithType);
949
+ const stamp = await this.stamper.stamp(stringifiedBody);
950
+ return {
951
+ body: stringifiedBody,
952
+ stamp: stamp,
953
+ url: fullUrl,
954
+ };
955
+ };
956
+ this.createInvitations = async (input) => {
957
+ const { organizationId, timestampMs, ...rest } = input;
958
+ return this.command("/public/v1/submit/create_invitations", {
959
+ parameters: rest,
960
+ organizationId: organizationId ?? this.config.organizationId,
961
+ timestampMs: timestampMs ?? String(Date.now()),
962
+ type: "ACTIVITY_TYPE_CREATE_INVITATIONS",
963
+ }, "createInvitationsResult");
964
+ };
965
+ this.stampCreateInvitations = async (input) => {
966
+ if (!this.stamper) {
967
+ return undefined;
968
+ }
969
+ const { organizationId, timestampMs, ...parameters } = input;
970
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_invitations";
971
+ const bodyWithType = {
972
+ parameters,
973
+ organizationId: organizationId ?? this.config.organizationId,
974
+ timestampMs: timestampMs ?? String(Date.now()),
975
+ type: "ACTIVITY_TYPE_CREATE_INVITATIONS",
976
+ };
977
+ const stringifiedBody = JSON.stringify(bodyWithType);
978
+ const stamp = await this.stamper.stamp(stringifiedBody);
979
+ return {
980
+ body: stringifiedBody,
981
+ stamp: stamp,
982
+ url: fullUrl,
983
+ };
984
+ };
985
+ this.createOauth2Credential = async (input) => {
986
+ const { organizationId, timestampMs, ...rest } = input;
987
+ return this.command("/public/v1/submit/create_oauth2_credential", {
988
+ parameters: rest,
989
+ organizationId: organizationId ?? this.config.organizationId,
990
+ timestampMs: timestampMs ?? String(Date.now()),
991
+ type: "ACTIVITY_TYPE_CREATE_OAUTH2_CREDENTIAL",
992
+ }, "createOauth2CredentialResult");
993
+ };
994
+ this.stampCreateOauth2Credential = async (input) => {
995
+ if (!this.stamper) {
996
+ return undefined;
997
+ }
998
+ const { organizationId, timestampMs, ...parameters } = input;
999
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_oauth2_credential";
1000
+ const bodyWithType = {
1001
+ parameters,
1002
+ organizationId: organizationId ?? this.config.organizationId,
1003
+ timestampMs: timestampMs ?? String(Date.now()),
1004
+ type: "ACTIVITY_TYPE_CREATE_OAUTH2_CREDENTIAL",
1005
+ };
1006
+ const stringifiedBody = JSON.stringify(bodyWithType);
1007
+ const stamp = await this.stamper.stamp(stringifiedBody);
1008
+ return {
1009
+ body: stringifiedBody,
1010
+ stamp: stamp,
1011
+ url: fullUrl,
1012
+ };
1013
+ };
1014
+ this.createOauthProviders = async (input) => {
1015
+ const { organizationId, timestampMs, ...rest } = input;
1016
+ return this.command("/public/v1/submit/create_oauth_providers", {
1017
+ parameters: rest,
1018
+ organizationId: organizationId ?? this.config.organizationId,
1019
+ timestampMs: timestampMs ?? String(Date.now()),
1020
+ type: "ACTIVITY_TYPE_CREATE_OAUTH_PROVIDERS",
1021
+ }, "createOauthProvidersResult");
1022
+ };
1023
+ this.stampCreateOauthProviders = async (input) => {
1024
+ if (!this.stamper) {
1025
+ return undefined;
1026
+ }
1027
+ const { organizationId, timestampMs, ...parameters } = input;
1028
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_oauth_providers";
1029
+ const bodyWithType = {
1030
+ parameters,
1031
+ organizationId: organizationId ?? this.config.organizationId,
1032
+ timestampMs: timestampMs ?? String(Date.now()),
1033
+ type: "ACTIVITY_TYPE_CREATE_OAUTH_PROVIDERS",
1034
+ };
1035
+ const stringifiedBody = JSON.stringify(bodyWithType);
1036
+ const stamp = await this.stamper.stamp(stringifiedBody);
1037
+ return {
1038
+ body: stringifiedBody,
1039
+ stamp: stamp,
1040
+ url: fullUrl,
1041
+ };
1042
+ };
1043
+ this.createPolicies = async (input) => {
1044
+ const { organizationId, timestampMs, ...rest } = input;
1045
+ return this.command("/public/v1/submit/create_policies", {
1046
+ parameters: rest,
1047
+ organizationId: organizationId ?? this.config.organizationId,
1048
+ timestampMs: timestampMs ?? String(Date.now()),
1049
+ type: "ACTIVITY_TYPE_CREATE_POLICIES",
1050
+ }, "createPoliciesResult");
1051
+ };
1052
+ this.stampCreatePolicies = async (input) => {
1053
+ if (!this.stamper) {
1054
+ return undefined;
1055
+ }
1056
+ const { organizationId, timestampMs, ...parameters } = input;
1057
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_policies";
1058
+ const bodyWithType = {
1059
+ parameters,
1060
+ organizationId: organizationId ?? this.config.organizationId,
1061
+ timestampMs: timestampMs ?? String(Date.now()),
1062
+ type: "ACTIVITY_TYPE_CREATE_POLICIES",
1063
+ };
1064
+ const stringifiedBody = JSON.stringify(bodyWithType);
1065
+ const stamp = await this.stamper.stamp(stringifiedBody);
1066
+ return {
1067
+ body: stringifiedBody,
1068
+ stamp: stamp,
1069
+ url: fullUrl,
1070
+ };
1071
+ };
1072
+ this.createPolicy = async (input) => {
1073
+ const { organizationId, timestampMs, ...rest } = input;
1074
+ return this.command("/public/v1/submit/create_policy", {
1075
+ parameters: rest,
1076
+ organizationId: organizationId ?? this.config.organizationId,
1077
+ timestampMs: timestampMs ?? String(Date.now()),
1078
+ type: "ACTIVITY_TYPE_CREATE_POLICY_V3",
1079
+ }, "createPolicyResult");
1080
+ };
1081
+ this.stampCreatePolicy = async (input) => {
1082
+ if (!this.stamper) {
1083
+ return undefined;
1084
+ }
1085
+ const { organizationId, timestampMs, ...parameters } = input;
1086
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_policy";
1087
+ const bodyWithType = {
1088
+ parameters,
1089
+ organizationId: organizationId ?? this.config.organizationId,
1090
+ timestampMs: timestampMs ?? String(Date.now()),
1091
+ type: "ACTIVITY_TYPE_CREATE_POLICY_V3",
1092
+ };
1093
+ const stringifiedBody = JSON.stringify(bodyWithType);
1094
+ const stamp = await this.stamper.stamp(stringifiedBody);
1095
+ return {
1096
+ body: stringifiedBody,
1097
+ stamp: stamp,
1098
+ url: fullUrl,
1099
+ };
1100
+ };
1101
+ this.createPrivateKeyTag = async (input) => {
1102
+ const { organizationId, timestampMs, ...rest } = input;
1103
+ return this.command("/public/v1/submit/create_private_key_tag", {
1104
+ parameters: rest,
1105
+ organizationId: organizationId ?? this.config.organizationId,
1106
+ timestampMs: timestampMs ?? String(Date.now()),
1107
+ type: "ACTIVITY_TYPE_CREATE_PRIVATE_KEY_TAG",
1108
+ }, "createPrivateKeyTagResult");
1109
+ };
1110
+ this.stampCreatePrivateKeyTag = async (input) => {
1111
+ if (!this.stamper) {
1112
+ return undefined;
1113
+ }
1114
+ const { organizationId, timestampMs, ...parameters } = input;
1115
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_private_key_tag";
1116
+ const bodyWithType = {
1117
+ parameters,
1118
+ organizationId: organizationId ?? this.config.organizationId,
1119
+ timestampMs: timestampMs ?? String(Date.now()),
1120
+ type: "ACTIVITY_TYPE_CREATE_PRIVATE_KEY_TAG",
1121
+ };
1122
+ const stringifiedBody = JSON.stringify(bodyWithType);
1123
+ const stamp = await this.stamper.stamp(stringifiedBody);
1124
+ return {
1125
+ body: stringifiedBody,
1126
+ stamp: stamp,
1127
+ url: fullUrl,
1128
+ };
1129
+ };
1130
+ this.createPrivateKeys = async (input) => {
1131
+ const { organizationId, timestampMs, ...rest } = input;
1132
+ return this.command("/public/v1/submit/create_private_keys", {
1133
+ parameters: rest,
1134
+ organizationId: organizationId ?? this.config.organizationId,
1135
+ timestampMs: timestampMs ?? String(Date.now()),
1136
+ type: "ACTIVITY_TYPE_CREATE_PRIVATE_KEYS_V2",
1137
+ }, "createPrivateKeysResultV2");
1138
+ };
1139
+ this.stampCreatePrivateKeys = async (input) => {
1140
+ if (!this.stamper) {
1141
+ return undefined;
1142
+ }
1143
+ const { organizationId, timestampMs, ...parameters } = input;
1144
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_private_keys";
1145
+ const bodyWithType = {
1146
+ parameters,
1147
+ organizationId: organizationId ?? this.config.organizationId,
1148
+ timestampMs: timestampMs ?? String(Date.now()),
1149
+ type: "ACTIVITY_TYPE_CREATE_PRIVATE_KEYS_V2",
1150
+ };
1151
+ const stringifiedBody = JSON.stringify(bodyWithType);
1152
+ const stamp = await this.stamper.stamp(stringifiedBody);
1153
+ return {
1154
+ body: stringifiedBody,
1155
+ stamp: stamp,
1156
+ url: fullUrl,
1157
+ };
1158
+ };
1159
+ this.createReadOnlySession = async (input) => {
1160
+ const { organizationId, timestampMs, ...rest } = input;
1161
+ return this.command("/public/v1/submit/create_read_only_session", {
1162
+ parameters: rest,
1163
+ organizationId: organizationId ?? this.config.organizationId,
1164
+ timestampMs: timestampMs ?? String(Date.now()),
1165
+ type: "ACTIVITY_TYPE_CREATE_READ_ONLY_SESSION",
1166
+ }, "createReadOnlySessionResult");
1167
+ };
1168
+ this.stampCreateReadOnlySession = async (input) => {
1169
+ if (!this.stamper) {
1170
+ return undefined;
1171
+ }
1172
+ const { organizationId, timestampMs, ...parameters } = input;
1173
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_read_only_session";
1174
+ const bodyWithType = {
1175
+ parameters,
1176
+ organizationId: organizationId ?? this.config.organizationId,
1177
+ timestampMs: timestampMs ?? String(Date.now()),
1178
+ type: "ACTIVITY_TYPE_CREATE_READ_ONLY_SESSION",
1179
+ };
1180
+ const stringifiedBody = JSON.stringify(bodyWithType);
1181
+ const stamp = await this.stamper.stamp(stringifiedBody);
1182
+ return {
1183
+ body: stringifiedBody,
1184
+ stamp: stamp,
1185
+ url: fullUrl,
1186
+ };
1187
+ };
1188
+ this.createReadWriteSession = async (input) => {
1189
+ const { organizationId, timestampMs, ...rest } = input;
1190
+ return this.command("/public/v1/submit/create_read_write_session", {
1191
+ parameters: rest,
1192
+ organizationId: organizationId ?? this.config.organizationId,
1193
+ timestampMs: timestampMs ?? String(Date.now()),
1194
+ type: "ACTIVITY_TYPE_CREATE_READ_WRITE_SESSION_V2",
1195
+ }, "createReadWriteSessionResultV2");
1196
+ };
1197
+ this.stampCreateReadWriteSession = async (input) => {
1198
+ if (!this.stamper) {
1199
+ return undefined;
1200
+ }
1201
+ const { organizationId, timestampMs, ...parameters } = input;
1202
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_read_write_session";
1203
+ const bodyWithType = {
1204
+ parameters,
1205
+ organizationId: organizationId ?? this.config.organizationId,
1206
+ timestampMs: timestampMs ?? String(Date.now()),
1207
+ type: "ACTIVITY_TYPE_CREATE_READ_WRITE_SESSION_V2",
1208
+ };
1209
+ const stringifiedBody = JSON.stringify(bodyWithType);
1210
+ const stamp = await this.stamper.stamp(stringifiedBody);
1211
+ return {
1212
+ body: stringifiedBody,
1213
+ stamp: stamp,
1214
+ url: fullUrl,
1215
+ };
1216
+ };
1217
+ this.createSmartContractInterface = async (input) => {
1218
+ const { organizationId, timestampMs, ...rest } = input;
1219
+ return this.command("/public/v1/submit/create_smart_contract_interface", {
1220
+ parameters: rest,
1221
+ organizationId: organizationId ?? this.config.organizationId,
1222
+ timestampMs: timestampMs ?? String(Date.now()),
1223
+ type: "ACTIVITY_TYPE_CREATE_SMART_CONTRACT_INTERFACE",
1224
+ }, "createSmartContractInterfaceResult");
1225
+ };
1226
+ this.stampCreateSmartContractInterface = async (input) => {
1227
+ if (!this.stamper) {
1228
+ return undefined;
1229
+ }
1230
+ const { organizationId, timestampMs, ...parameters } = input;
1231
+ const fullUrl = this.config.apiBaseUrl +
1232
+ "/public/v1/submit/create_smart_contract_interface";
1233
+ const bodyWithType = {
1234
+ parameters,
1235
+ organizationId: organizationId ?? this.config.organizationId,
1236
+ timestampMs: timestampMs ?? String(Date.now()),
1237
+ type: "ACTIVITY_TYPE_CREATE_SMART_CONTRACT_INTERFACE",
1238
+ };
1239
+ const stringifiedBody = JSON.stringify(bodyWithType);
1240
+ const stamp = await this.stamper.stamp(stringifiedBody);
1241
+ return {
1242
+ body: stringifiedBody,
1243
+ stamp: stamp,
1244
+ url: fullUrl,
1245
+ };
1246
+ };
1247
+ this.createSubOrganization = async (input) => {
1248
+ const { organizationId, timestampMs, ...rest } = input;
1249
+ return this.command("/public/v1/submit/create_sub_organization", {
1250
+ parameters: rest,
1251
+ organizationId: organizationId ?? this.config.organizationId,
1252
+ timestampMs: timestampMs ?? String(Date.now()),
1253
+ type: "ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V7",
1254
+ }, "createSubOrganizationResultV7");
1255
+ };
1256
+ this.stampCreateSubOrganization = async (input) => {
1257
+ if (!this.stamper) {
1258
+ return undefined;
1259
+ }
1260
+ const { organizationId, timestampMs, ...parameters } = input;
1261
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_sub_organization";
1262
+ const bodyWithType = {
1263
+ parameters,
1264
+ organizationId: organizationId ?? this.config.organizationId,
1265
+ timestampMs: timestampMs ?? String(Date.now()),
1266
+ type: "ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V7",
1267
+ };
1268
+ const stringifiedBody = JSON.stringify(bodyWithType);
1269
+ const stamp = await this.stamper.stamp(stringifiedBody);
1270
+ return {
1271
+ body: stringifiedBody,
1272
+ stamp: stamp,
1273
+ url: fullUrl,
1274
+ };
1275
+ };
1276
+ this.createUserTag = async (input) => {
1277
+ const { organizationId, timestampMs, ...rest } = input;
1278
+ return this.command("/public/v1/submit/create_user_tag", {
1279
+ parameters: rest,
1280
+ organizationId: organizationId ?? this.config.organizationId,
1281
+ timestampMs: timestampMs ?? String(Date.now()),
1282
+ type: "ACTIVITY_TYPE_CREATE_USER_TAG",
1283
+ }, "createUserTagResult");
1284
+ };
1285
+ this.stampCreateUserTag = async (input) => {
1286
+ if (!this.stamper) {
1287
+ return undefined;
1288
+ }
1289
+ const { organizationId, timestampMs, ...parameters } = input;
1290
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_user_tag";
1291
+ const bodyWithType = {
1292
+ parameters,
1293
+ organizationId: organizationId ?? this.config.organizationId,
1294
+ timestampMs: timestampMs ?? String(Date.now()),
1295
+ type: "ACTIVITY_TYPE_CREATE_USER_TAG",
1296
+ };
1297
+ const stringifiedBody = JSON.stringify(bodyWithType);
1298
+ const stamp = await this.stamper.stamp(stringifiedBody);
1299
+ return {
1300
+ body: stringifiedBody,
1301
+ stamp: stamp,
1302
+ url: fullUrl,
1303
+ };
1304
+ };
1305
+ this.createUsers = async (input) => {
1306
+ const { organizationId, timestampMs, ...rest } = input;
1307
+ return this.command("/public/v1/submit/create_users", {
1308
+ parameters: rest,
1309
+ organizationId: organizationId ?? this.config.organizationId,
1310
+ timestampMs: timestampMs ?? String(Date.now()),
1311
+ type: "ACTIVITY_TYPE_CREATE_USERS_V3",
1312
+ }, "createUsersResult");
1313
+ };
1314
+ this.stampCreateUsers = async (input) => {
1315
+ if (!this.stamper) {
1316
+ return undefined;
1317
+ }
1318
+ const { organizationId, timestampMs, ...parameters } = input;
1319
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_users";
1320
+ const bodyWithType = {
1321
+ parameters,
1322
+ organizationId: organizationId ?? this.config.organizationId,
1323
+ timestampMs: timestampMs ?? String(Date.now()),
1324
+ type: "ACTIVITY_TYPE_CREATE_USERS_V3",
1325
+ };
1326
+ const stringifiedBody = JSON.stringify(bodyWithType);
1327
+ const stamp = await this.stamper.stamp(stringifiedBody);
1328
+ return {
1329
+ body: stringifiedBody,
1330
+ stamp: stamp,
1331
+ url: fullUrl,
1332
+ };
1333
+ };
1334
+ this.createWallet = async (input) => {
1335
+ const { organizationId, timestampMs, ...rest } = input;
1336
+ return this.command("/public/v1/submit/create_wallet", {
1337
+ parameters: rest,
1338
+ organizationId: organizationId ?? this.config.organizationId,
1339
+ timestampMs: timestampMs ?? String(Date.now()),
1340
+ type: "ACTIVITY_TYPE_CREATE_WALLET",
1341
+ }, "createWalletResult");
1342
+ };
1343
+ this.stampCreateWallet = async (input) => {
1344
+ if (!this.stamper) {
1345
+ return undefined;
1346
+ }
1347
+ const { organizationId, timestampMs, ...parameters } = input;
1348
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_wallet";
1349
+ const bodyWithType = {
1350
+ parameters,
1351
+ organizationId: organizationId ?? this.config.organizationId,
1352
+ timestampMs: timestampMs ?? String(Date.now()),
1353
+ type: "ACTIVITY_TYPE_CREATE_WALLET",
1354
+ };
1355
+ const stringifiedBody = JSON.stringify(bodyWithType);
1356
+ const stamp = await this.stamper.stamp(stringifiedBody);
1357
+ return {
1358
+ body: stringifiedBody,
1359
+ stamp: stamp,
1360
+ url: fullUrl,
1361
+ };
1362
+ };
1363
+ this.createWalletAccounts = async (input) => {
1364
+ const { organizationId, timestampMs, ...rest } = input;
1365
+ return this.command("/public/v1/submit/create_wallet_accounts", {
1366
+ parameters: rest,
1367
+ organizationId: organizationId ?? this.config.organizationId,
1368
+ timestampMs: timestampMs ?? String(Date.now()),
1369
+ type: "ACTIVITY_TYPE_CREATE_WALLET_ACCOUNTS",
1370
+ }, "createWalletAccountsResult");
1371
+ };
1372
+ this.stampCreateWalletAccounts = async (input) => {
1373
+ if (!this.stamper) {
1374
+ return undefined;
1375
+ }
1376
+ const { organizationId, timestampMs, ...parameters } = input;
1377
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_wallet_accounts";
1378
+ const bodyWithType = {
1379
+ parameters,
1380
+ organizationId: organizationId ?? this.config.organizationId,
1381
+ timestampMs: timestampMs ?? String(Date.now()),
1382
+ type: "ACTIVITY_TYPE_CREATE_WALLET_ACCOUNTS",
1383
+ };
1384
+ const stringifiedBody = JSON.stringify(bodyWithType);
1385
+ const stamp = await this.stamper.stamp(stringifiedBody);
1386
+ return {
1387
+ body: stringifiedBody,
1388
+ stamp: stamp,
1389
+ url: fullUrl,
1390
+ };
1391
+ };
1392
+ this.deleteApiKeys = async (input) => {
1393
+ const { organizationId, timestampMs, ...rest } = input;
1394
+ return this.command("/public/v1/submit/delete_api_keys", {
1395
+ parameters: rest,
1396
+ organizationId: organizationId ?? this.config.organizationId,
1397
+ timestampMs: timestampMs ?? String(Date.now()),
1398
+ type: "ACTIVITY_TYPE_DELETE_API_KEYS",
1399
+ }, "deleteApiKeysResult");
1400
+ };
1401
+ this.stampDeleteApiKeys = async (input) => {
1402
+ if (!this.stamper) {
1403
+ return undefined;
1404
+ }
1405
+ const { organizationId, timestampMs, ...parameters } = input;
1406
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/delete_api_keys";
1407
+ const bodyWithType = {
1408
+ parameters,
1409
+ organizationId: organizationId ?? this.config.organizationId,
1410
+ timestampMs: timestampMs ?? String(Date.now()),
1411
+ type: "ACTIVITY_TYPE_DELETE_API_KEYS",
1412
+ };
1413
+ const stringifiedBody = JSON.stringify(bodyWithType);
1414
+ const stamp = await this.stamper.stamp(stringifiedBody);
1415
+ return {
1416
+ body: stringifiedBody,
1417
+ stamp: stamp,
1418
+ url: fullUrl,
1419
+ };
1420
+ };
1421
+ this.deleteAuthenticators = async (input) => {
1422
+ const { organizationId, timestampMs, ...rest } = input;
1423
+ return this.command("/public/v1/submit/delete_authenticators", {
1424
+ parameters: rest,
1425
+ organizationId: organizationId ?? this.config.organizationId,
1426
+ timestampMs: timestampMs ?? String(Date.now()),
1427
+ type: "ACTIVITY_TYPE_DELETE_AUTHENTICATORS",
1428
+ }, "deleteAuthenticatorsResult");
1429
+ };
1430
+ this.stampDeleteAuthenticators = async (input) => {
1431
+ if (!this.stamper) {
1432
+ return undefined;
1433
+ }
1434
+ const { organizationId, timestampMs, ...parameters } = input;
1435
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/delete_authenticators";
1436
+ const bodyWithType = {
1437
+ parameters,
1438
+ organizationId: organizationId ?? this.config.organizationId,
1439
+ timestampMs: timestampMs ?? String(Date.now()),
1440
+ type: "ACTIVITY_TYPE_DELETE_AUTHENTICATORS",
1441
+ };
1442
+ const stringifiedBody = JSON.stringify(bodyWithType);
1443
+ const stamp = await this.stamper.stamp(stringifiedBody);
1444
+ return {
1445
+ body: stringifiedBody,
1446
+ stamp: stamp,
1447
+ url: fullUrl,
1448
+ };
1449
+ };
1450
+ this.deleteFiatOnRampCredential = async (input) => {
1451
+ const { organizationId, timestampMs, ...rest } = input;
1452
+ return this.command("/public/v1/submit/delete_fiat_on_ramp_credential", {
1453
+ parameters: rest,
1454
+ organizationId: organizationId ?? this.config.organizationId,
1455
+ timestampMs: timestampMs ?? String(Date.now()),
1456
+ type: "ACTIVITY_TYPE_DELETE_FIAT_ON_RAMP_CREDENTIAL",
1457
+ }, "deleteFiatOnRampCredentialResult");
1458
+ };
1459
+ this.stampDeleteFiatOnRampCredential = async (input) => {
1460
+ if (!this.stamper) {
1461
+ return undefined;
1462
+ }
1463
+ const { organizationId, timestampMs, ...parameters } = input;
1464
+ const fullUrl = this.config.apiBaseUrl +
1465
+ "/public/v1/submit/delete_fiat_on_ramp_credential";
1466
+ const bodyWithType = {
1467
+ parameters,
1468
+ organizationId: organizationId ?? this.config.organizationId,
1469
+ timestampMs: timestampMs ?? String(Date.now()),
1470
+ type: "ACTIVITY_TYPE_DELETE_FIAT_ON_RAMP_CREDENTIAL",
1471
+ };
1472
+ const stringifiedBody = JSON.stringify(bodyWithType);
1473
+ const stamp = await this.stamper.stamp(stringifiedBody);
1474
+ return {
1475
+ body: stringifiedBody,
1476
+ stamp: stamp,
1477
+ url: fullUrl,
1478
+ };
1479
+ };
1480
+ this.deleteInvitation = async (input) => {
1481
+ const { organizationId, timestampMs, ...rest } = input;
1482
+ return this.command("/public/v1/submit/delete_invitation", {
1483
+ parameters: rest,
1484
+ organizationId: organizationId ?? this.config.organizationId,
1485
+ timestampMs: timestampMs ?? String(Date.now()),
1486
+ type: "ACTIVITY_TYPE_DELETE_INVITATION",
1487
+ }, "deleteInvitationResult");
1488
+ };
1489
+ this.stampDeleteInvitation = async (input) => {
1490
+ if (!this.stamper) {
1491
+ return undefined;
1492
+ }
1493
+ const { organizationId, timestampMs, ...parameters } = input;
1494
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/delete_invitation";
1495
+ const bodyWithType = {
1496
+ parameters,
1497
+ organizationId: organizationId ?? this.config.organizationId,
1498
+ timestampMs: timestampMs ?? String(Date.now()),
1499
+ type: "ACTIVITY_TYPE_DELETE_INVITATION",
1500
+ };
1501
+ const stringifiedBody = JSON.stringify(bodyWithType);
1502
+ const stamp = await this.stamper.stamp(stringifiedBody);
1503
+ return {
1504
+ body: stringifiedBody,
1505
+ stamp: stamp,
1506
+ url: fullUrl,
1507
+ };
1508
+ };
1509
+ this.deleteOauth2Credential = async (input) => {
1510
+ const { organizationId, timestampMs, ...rest } = input;
1511
+ return this.command("/public/v1/submit/delete_oauth2_credential", {
1512
+ parameters: rest,
1513
+ organizationId: organizationId ?? this.config.organizationId,
1514
+ timestampMs: timestampMs ?? String(Date.now()),
1515
+ type: "ACTIVITY_TYPE_DELETE_OAUTH2_CREDENTIAL",
1516
+ }, "deleteOauth2CredentialResult");
1517
+ };
1518
+ this.stampDeleteOauth2Credential = async (input) => {
1519
+ if (!this.stamper) {
1520
+ return undefined;
1521
+ }
1522
+ const { organizationId, timestampMs, ...parameters } = input;
1523
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/delete_oauth2_credential";
1524
+ const bodyWithType = {
1525
+ parameters,
1526
+ organizationId: organizationId ?? this.config.organizationId,
1527
+ timestampMs: timestampMs ?? String(Date.now()),
1528
+ type: "ACTIVITY_TYPE_DELETE_OAUTH2_CREDENTIAL",
1529
+ };
1530
+ const stringifiedBody = JSON.stringify(bodyWithType);
1531
+ const stamp = await this.stamper.stamp(stringifiedBody);
1532
+ return {
1533
+ body: stringifiedBody,
1534
+ stamp: stamp,
1535
+ url: fullUrl,
1536
+ };
1537
+ };
1538
+ this.deleteOauthProviders = async (input) => {
1539
+ const { organizationId, timestampMs, ...rest } = input;
1540
+ return this.command("/public/v1/submit/delete_oauth_providers", {
1541
+ parameters: rest,
1542
+ organizationId: organizationId ?? this.config.organizationId,
1543
+ timestampMs: timestampMs ?? String(Date.now()),
1544
+ type: "ACTIVITY_TYPE_DELETE_OAUTH_PROVIDERS",
1545
+ }, "deleteOauthProvidersResult");
1546
+ };
1547
+ this.stampDeleteOauthProviders = async (input) => {
1548
+ if (!this.stamper) {
1549
+ return undefined;
1550
+ }
1551
+ const { organizationId, timestampMs, ...parameters } = input;
1552
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/delete_oauth_providers";
1553
+ const bodyWithType = {
1554
+ parameters,
1555
+ organizationId: organizationId ?? this.config.organizationId,
1556
+ timestampMs: timestampMs ?? String(Date.now()),
1557
+ type: "ACTIVITY_TYPE_DELETE_OAUTH_PROVIDERS",
1558
+ };
1559
+ const stringifiedBody = JSON.stringify(bodyWithType);
1560
+ const stamp = await this.stamper.stamp(stringifiedBody);
1561
+ return {
1562
+ body: stringifiedBody,
1563
+ stamp: stamp,
1564
+ url: fullUrl,
1565
+ };
1566
+ };
1567
+ this.deletePolicies = async (input) => {
1568
+ const { organizationId, timestampMs, ...rest } = input;
1569
+ return this.command("/public/v1/submit/delete_policies", {
1570
+ parameters: rest,
1571
+ organizationId: organizationId ?? this.config.organizationId,
1572
+ timestampMs: timestampMs ?? String(Date.now()),
1573
+ type: "ACTIVITY_TYPE_DELETE_POLICIES",
1574
+ }, "deletePoliciesResult");
1575
+ };
1576
+ this.stampDeletePolicies = async (input) => {
1577
+ if (!this.stamper) {
1578
+ return undefined;
1579
+ }
1580
+ const { organizationId, timestampMs, ...parameters } = input;
1581
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/delete_policies";
1582
+ const bodyWithType = {
1583
+ parameters,
1584
+ organizationId: organizationId ?? this.config.organizationId,
1585
+ timestampMs: timestampMs ?? String(Date.now()),
1586
+ type: "ACTIVITY_TYPE_DELETE_POLICIES",
1587
+ };
1588
+ const stringifiedBody = JSON.stringify(bodyWithType);
1589
+ const stamp = await this.stamper.stamp(stringifiedBody);
1590
+ return {
1591
+ body: stringifiedBody,
1592
+ stamp: stamp,
1593
+ url: fullUrl,
1594
+ };
1595
+ };
1596
+ this.deletePolicy = async (input) => {
1597
+ const { organizationId, timestampMs, ...rest } = input;
1598
+ return this.command("/public/v1/submit/delete_policy", {
1599
+ parameters: rest,
1600
+ organizationId: organizationId ?? this.config.organizationId,
1601
+ timestampMs: timestampMs ?? String(Date.now()),
1602
+ type: "ACTIVITY_TYPE_DELETE_POLICY",
1603
+ }, "deletePolicyResult");
1604
+ };
1605
+ this.stampDeletePolicy = async (input) => {
1606
+ if (!this.stamper) {
1607
+ return undefined;
1608
+ }
1609
+ const { organizationId, timestampMs, ...parameters } = input;
1610
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/delete_policy";
1611
+ const bodyWithType = {
1612
+ parameters,
1613
+ organizationId: organizationId ?? this.config.organizationId,
1614
+ timestampMs: timestampMs ?? String(Date.now()),
1615
+ type: "ACTIVITY_TYPE_DELETE_POLICY",
1616
+ };
1617
+ const stringifiedBody = JSON.stringify(bodyWithType);
1618
+ const stamp = await this.stamper.stamp(stringifiedBody);
1619
+ return {
1620
+ body: stringifiedBody,
1621
+ stamp: stamp,
1622
+ url: fullUrl,
1623
+ };
1624
+ };
1625
+ this.deletePrivateKeyTags = async (input) => {
1626
+ const { organizationId, timestampMs, ...rest } = input;
1627
+ return this.command("/public/v1/submit/delete_private_key_tags", {
1628
+ parameters: rest,
1629
+ organizationId: organizationId ?? this.config.organizationId,
1630
+ timestampMs: timestampMs ?? String(Date.now()),
1631
+ type: "ACTIVITY_TYPE_DELETE_PRIVATE_KEY_TAGS",
1632
+ }, "deletePrivateKeyTagsResult");
1633
+ };
1634
+ this.stampDeletePrivateKeyTags = async (input) => {
1635
+ if (!this.stamper) {
1636
+ return undefined;
1637
+ }
1638
+ const { organizationId, timestampMs, ...parameters } = input;
1639
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/delete_private_key_tags";
1640
+ const bodyWithType = {
1641
+ parameters,
1642
+ organizationId: organizationId ?? this.config.organizationId,
1643
+ timestampMs: timestampMs ?? String(Date.now()),
1644
+ type: "ACTIVITY_TYPE_DELETE_PRIVATE_KEY_TAGS",
1645
+ };
1646
+ const stringifiedBody = JSON.stringify(bodyWithType);
1647
+ const stamp = await this.stamper.stamp(stringifiedBody);
1648
+ return {
1649
+ body: stringifiedBody,
1650
+ stamp: stamp,
1651
+ url: fullUrl,
1652
+ };
1653
+ };
1654
+ this.deletePrivateKeys = async (input) => {
1655
+ const { organizationId, timestampMs, ...rest } = input;
1656
+ return this.command("/public/v1/submit/delete_private_keys", {
1657
+ parameters: rest,
1658
+ organizationId: organizationId ?? this.config.organizationId,
1659
+ timestampMs: timestampMs ?? String(Date.now()),
1660
+ type: "ACTIVITY_TYPE_DELETE_PRIVATE_KEYS",
1661
+ }, "deletePrivateKeysResult");
1662
+ };
1663
+ this.stampDeletePrivateKeys = async (input) => {
1664
+ if (!this.stamper) {
1665
+ return undefined;
1666
+ }
1667
+ const { organizationId, timestampMs, ...parameters } = input;
1668
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/delete_private_keys";
1669
+ const bodyWithType = {
1670
+ parameters,
1671
+ organizationId: organizationId ?? this.config.organizationId,
1672
+ timestampMs: timestampMs ?? String(Date.now()),
1673
+ type: "ACTIVITY_TYPE_DELETE_PRIVATE_KEYS",
1674
+ };
1675
+ const stringifiedBody = JSON.stringify(bodyWithType);
1676
+ const stamp = await this.stamper.stamp(stringifiedBody);
1677
+ return {
1678
+ body: stringifiedBody,
1679
+ stamp: stamp,
1680
+ url: fullUrl,
1681
+ };
1682
+ };
1683
+ this.deleteSmartContractInterface = async (input) => {
1684
+ const { organizationId, timestampMs, ...rest } = input;
1685
+ return this.command("/public/v1/submit/delete_smart_contract_interface", {
1686
+ parameters: rest,
1687
+ organizationId: organizationId ?? this.config.organizationId,
1688
+ timestampMs: timestampMs ?? String(Date.now()),
1689
+ type: "ACTIVITY_TYPE_DELETE_SMART_CONTRACT_INTERFACE",
1690
+ }, "deleteSmartContractInterfaceResult");
1691
+ };
1692
+ this.stampDeleteSmartContractInterface = async (input) => {
1693
+ if (!this.stamper) {
1694
+ return undefined;
1695
+ }
1696
+ const { organizationId, timestampMs, ...parameters } = input;
1697
+ const fullUrl = this.config.apiBaseUrl +
1698
+ "/public/v1/submit/delete_smart_contract_interface";
1699
+ const bodyWithType = {
1700
+ parameters,
1701
+ organizationId: organizationId ?? this.config.organizationId,
1702
+ timestampMs: timestampMs ?? String(Date.now()),
1703
+ type: "ACTIVITY_TYPE_DELETE_SMART_CONTRACT_INTERFACE",
1704
+ };
1705
+ const stringifiedBody = JSON.stringify(bodyWithType);
1706
+ const stamp = await this.stamper.stamp(stringifiedBody);
1707
+ return {
1708
+ body: stringifiedBody,
1709
+ stamp: stamp,
1710
+ url: fullUrl,
1711
+ };
1712
+ };
1713
+ this.deleteSubOrganization = async (input) => {
1714
+ const { organizationId, timestampMs, ...rest } = input;
1715
+ return this.command("/public/v1/submit/delete_sub_organization", {
1716
+ parameters: rest,
1717
+ organizationId: organizationId ?? this.config.organizationId,
1718
+ timestampMs: timestampMs ?? String(Date.now()),
1719
+ type: "ACTIVITY_TYPE_DELETE_SUB_ORGANIZATION",
1720
+ }, "deleteSubOrganizationResult");
1721
+ };
1722
+ this.stampDeleteSubOrganization = async (input) => {
1723
+ if (!this.stamper) {
1724
+ return undefined;
1725
+ }
1726
+ const { organizationId, timestampMs, ...parameters } = input;
1727
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/delete_sub_organization";
1728
+ const bodyWithType = {
1729
+ parameters,
1730
+ organizationId: organizationId ?? this.config.organizationId,
1731
+ timestampMs: timestampMs ?? String(Date.now()),
1732
+ type: "ACTIVITY_TYPE_DELETE_SUB_ORGANIZATION",
1733
+ };
1734
+ const stringifiedBody = JSON.stringify(bodyWithType);
1735
+ const stamp = await this.stamper.stamp(stringifiedBody);
1736
+ return {
1737
+ body: stringifiedBody,
1738
+ stamp: stamp,
1739
+ url: fullUrl,
1740
+ };
1741
+ };
1742
+ this.deleteUserTags = async (input) => {
1743
+ const { organizationId, timestampMs, ...rest } = input;
1744
+ return this.command("/public/v1/submit/delete_user_tags", {
1745
+ parameters: rest,
1746
+ organizationId: organizationId ?? this.config.organizationId,
1747
+ timestampMs: timestampMs ?? String(Date.now()),
1748
+ type: "ACTIVITY_TYPE_DELETE_USER_TAGS",
1749
+ }, "deleteUserTagsResult");
1750
+ };
1751
+ this.stampDeleteUserTags = async (input) => {
1752
+ if (!this.stamper) {
1753
+ return undefined;
1754
+ }
1755
+ const { organizationId, timestampMs, ...parameters } = input;
1756
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/delete_user_tags";
1757
+ const bodyWithType = {
1758
+ parameters,
1759
+ organizationId: organizationId ?? this.config.organizationId,
1760
+ timestampMs: timestampMs ?? String(Date.now()),
1761
+ type: "ACTIVITY_TYPE_DELETE_USER_TAGS",
1762
+ };
1763
+ const stringifiedBody = JSON.stringify(bodyWithType);
1764
+ const stamp = await this.stamper.stamp(stringifiedBody);
1765
+ return {
1766
+ body: stringifiedBody,
1767
+ stamp: stamp,
1768
+ url: fullUrl,
1769
+ };
1770
+ };
1771
+ this.deleteUsers = async (input) => {
1772
+ const { organizationId, timestampMs, ...rest } = input;
1773
+ return this.command("/public/v1/submit/delete_users", {
1774
+ parameters: rest,
1775
+ organizationId: organizationId ?? this.config.organizationId,
1776
+ timestampMs: timestampMs ?? String(Date.now()),
1777
+ type: "ACTIVITY_TYPE_DELETE_USERS",
1778
+ }, "deleteUsersResult");
1779
+ };
1780
+ this.stampDeleteUsers = async (input) => {
1781
+ if (!this.stamper) {
1782
+ return undefined;
1783
+ }
1784
+ const { organizationId, timestampMs, ...parameters } = input;
1785
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/delete_users";
1786
+ const bodyWithType = {
1787
+ parameters,
1788
+ organizationId: organizationId ?? this.config.organizationId,
1789
+ timestampMs: timestampMs ?? String(Date.now()),
1790
+ type: "ACTIVITY_TYPE_DELETE_USERS",
1791
+ };
1792
+ const stringifiedBody = JSON.stringify(bodyWithType);
1793
+ const stamp = await this.stamper.stamp(stringifiedBody);
1794
+ return {
1795
+ body: stringifiedBody,
1796
+ stamp: stamp,
1797
+ url: fullUrl,
1798
+ };
1799
+ };
1800
+ this.deleteWalletAccounts = async (input) => {
1801
+ const { organizationId, timestampMs, ...rest } = input;
1802
+ return this.command("/public/v1/submit/delete_wallet_accounts", {
1803
+ parameters: rest,
1804
+ organizationId: organizationId ?? this.config.organizationId,
1805
+ timestampMs: timestampMs ?? String(Date.now()),
1806
+ type: "ACTIVITY_TYPE_DELETE_WALLET_ACCOUNTS",
1807
+ }, "deleteWalletAccountsResult");
1808
+ };
1809
+ this.stampDeleteWalletAccounts = async (input) => {
1810
+ if (!this.stamper) {
1811
+ return undefined;
1812
+ }
1813
+ const { organizationId, timestampMs, ...parameters } = input;
1814
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/delete_wallet_accounts";
1815
+ const bodyWithType = {
1816
+ parameters,
1817
+ organizationId: organizationId ?? this.config.organizationId,
1818
+ timestampMs: timestampMs ?? String(Date.now()),
1819
+ type: "ACTIVITY_TYPE_DELETE_WALLET_ACCOUNTS",
1820
+ };
1821
+ const stringifiedBody = JSON.stringify(bodyWithType);
1822
+ const stamp = await this.stamper.stamp(stringifiedBody);
1823
+ return {
1824
+ body: stringifiedBody,
1825
+ stamp: stamp,
1826
+ url: fullUrl,
1827
+ };
1828
+ };
1829
+ this.deleteWallets = async (input) => {
1830
+ const { organizationId, timestampMs, ...rest } = input;
1831
+ return this.command("/public/v1/submit/delete_wallets", {
1832
+ parameters: rest,
1833
+ organizationId: organizationId ?? this.config.organizationId,
1834
+ timestampMs: timestampMs ?? String(Date.now()),
1835
+ type: "ACTIVITY_TYPE_DELETE_WALLETS",
1836
+ }, "deleteWalletsResult");
1837
+ };
1838
+ this.stampDeleteWallets = async (input) => {
1839
+ if (!this.stamper) {
1840
+ return undefined;
1841
+ }
1842
+ const { organizationId, timestampMs, ...parameters } = input;
1843
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/delete_wallets";
1844
+ const bodyWithType = {
1845
+ parameters,
1846
+ organizationId: organizationId ?? this.config.organizationId,
1847
+ timestampMs: timestampMs ?? String(Date.now()),
1848
+ type: "ACTIVITY_TYPE_DELETE_WALLETS",
1849
+ };
1850
+ const stringifiedBody = JSON.stringify(bodyWithType);
1851
+ const stamp = await this.stamper.stamp(stringifiedBody);
1852
+ return {
1853
+ body: stringifiedBody,
1854
+ stamp: stamp,
1855
+ url: fullUrl,
1856
+ };
1857
+ };
1858
+ this.emailAuth = async (input) => {
1859
+ const { organizationId, timestampMs, ...rest } = input;
1860
+ return this.command("/public/v1/submit/email_auth", {
1861
+ parameters: rest,
1862
+ organizationId: organizationId ?? this.config.organizationId,
1863
+ timestampMs: timestampMs ?? String(Date.now()),
1864
+ type: "ACTIVITY_TYPE_EMAIL_AUTH_V3",
1865
+ }, "emailAuthResult");
1866
+ };
1867
+ this.stampEmailAuth = async (input) => {
1868
+ if (!this.stamper) {
1869
+ return undefined;
1870
+ }
1871
+ const { organizationId, timestampMs, ...parameters } = input;
1872
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/email_auth";
1873
+ const bodyWithType = {
1874
+ parameters,
1875
+ organizationId: organizationId ?? this.config.organizationId,
1876
+ timestampMs: timestampMs ?? String(Date.now()),
1877
+ type: "ACTIVITY_TYPE_EMAIL_AUTH_V3",
1878
+ };
1879
+ const stringifiedBody = JSON.stringify(bodyWithType);
1880
+ const stamp = await this.stamper.stamp(stringifiedBody);
1881
+ return {
1882
+ body: stringifiedBody,
1883
+ stamp: stamp,
1884
+ url: fullUrl,
1885
+ };
1886
+ };
1887
+ this.ethSendTransaction = async (input) => {
1888
+ const { organizationId, timestampMs, ...rest } = input;
1889
+ return this.command("/public/v1/submit/eth_send_transaction", {
1890
+ parameters: rest,
1891
+ organizationId: organizationId ?? this.config.organizationId,
1892
+ timestampMs: timestampMs ?? String(Date.now()),
1893
+ type: "ACTIVITY_TYPE_ETH_SEND_TRANSACTION",
1894
+ }, "ethSendTransactionResult");
1895
+ };
1896
+ this.stampEthSendTransaction = async (input) => {
1897
+ if (!this.stamper) {
1898
+ return undefined;
1899
+ }
1900
+ const { organizationId, timestampMs, ...parameters } = input;
1901
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/eth_send_transaction";
1902
+ const bodyWithType = {
1903
+ parameters,
1904
+ organizationId: organizationId ?? this.config.organizationId,
1905
+ timestampMs: timestampMs ?? String(Date.now()),
1906
+ type: "ACTIVITY_TYPE_ETH_SEND_TRANSACTION",
1907
+ };
1908
+ const stringifiedBody = JSON.stringify(bodyWithType);
1909
+ const stamp = await this.stamper.stamp(stringifiedBody);
1910
+ return {
1911
+ body: stringifiedBody,
1912
+ stamp: stamp,
1913
+ url: fullUrl,
1914
+ };
1915
+ };
1916
+ this.exportPrivateKey = async (input) => {
1917
+ const { organizationId, timestampMs, ...rest } = input;
1918
+ return this.command("/public/v1/submit/export_private_key", {
1919
+ parameters: rest,
1920
+ organizationId: organizationId ?? this.config.organizationId,
1921
+ timestampMs: timestampMs ?? String(Date.now()),
1922
+ type: "ACTIVITY_TYPE_EXPORT_PRIVATE_KEY",
1923
+ }, "exportPrivateKeyResult");
1924
+ };
1925
+ this.stampExportPrivateKey = async (input) => {
1926
+ if (!this.stamper) {
1927
+ return undefined;
1928
+ }
1929
+ const { organizationId, timestampMs, ...parameters } = input;
1930
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/export_private_key";
1931
+ const bodyWithType = {
1932
+ parameters,
1933
+ organizationId: organizationId ?? this.config.organizationId,
1934
+ timestampMs: timestampMs ?? String(Date.now()),
1935
+ type: "ACTIVITY_TYPE_EXPORT_PRIVATE_KEY",
1936
+ };
1937
+ const stringifiedBody = JSON.stringify(bodyWithType);
1938
+ const stamp = await this.stamper.stamp(stringifiedBody);
1939
+ return {
1940
+ body: stringifiedBody,
1941
+ stamp: stamp,
1942
+ url: fullUrl,
1943
+ };
1944
+ };
1945
+ this.exportWallet = async (input) => {
1946
+ const { organizationId, timestampMs, ...rest } = input;
1947
+ return this.command("/public/v1/submit/export_wallet", {
1948
+ parameters: rest,
1949
+ organizationId: organizationId ?? this.config.organizationId,
1950
+ timestampMs: timestampMs ?? String(Date.now()),
1951
+ type: "ACTIVITY_TYPE_EXPORT_WALLET",
1952
+ }, "exportWalletResult");
1953
+ };
1954
+ this.stampExportWallet = async (input) => {
1955
+ if (!this.stamper) {
1956
+ return undefined;
1957
+ }
1958
+ const { organizationId, timestampMs, ...parameters } = input;
1959
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/export_wallet";
1960
+ const bodyWithType = {
1961
+ parameters,
1962
+ organizationId: organizationId ?? this.config.organizationId,
1963
+ timestampMs: timestampMs ?? String(Date.now()),
1964
+ type: "ACTIVITY_TYPE_EXPORT_WALLET",
1965
+ };
1966
+ const stringifiedBody = JSON.stringify(bodyWithType);
1967
+ const stamp = await this.stamper.stamp(stringifiedBody);
1968
+ return {
1969
+ body: stringifiedBody,
1970
+ stamp: stamp,
1971
+ url: fullUrl,
1972
+ };
1973
+ };
1974
+ this.exportWalletAccount = async (input) => {
1975
+ const { organizationId, timestampMs, ...rest } = input;
1976
+ return this.command("/public/v1/submit/export_wallet_account", {
1977
+ parameters: rest,
1978
+ organizationId: organizationId ?? this.config.organizationId,
1979
+ timestampMs: timestampMs ?? String(Date.now()),
1980
+ type: "ACTIVITY_TYPE_EXPORT_WALLET_ACCOUNT",
1981
+ }, "exportWalletAccountResult");
1982
+ };
1983
+ this.stampExportWalletAccount = async (input) => {
1984
+ if (!this.stamper) {
1985
+ return undefined;
1986
+ }
1987
+ const { organizationId, timestampMs, ...parameters } = input;
1988
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/export_wallet_account";
1989
+ const bodyWithType = {
1990
+ parameters,
1991
+ organizationId: organizationId ?? this.config.organizationId,
1992
+ timestampMs: timestampMs ?? String(Date.now()),
1993
+ type: "ACTIVITY_TYPE_EXPORT_WALLET_ACCOUNT",
1994
+ };
1995
+ const stringifiedBody = JSON.stringify(bodyWithType);
1996
+ const stamp = await this.stamper.stamp(stringifiedBody);
1997
+ return {
1998
+ body: stringifiedBody,
1999
+ stamp: stamp,
2000
+ url: fullUrl,
2001
+ };
2002
+ };
2003
+ this.importPrivateKey = async (input) => {
2004
+ const { organizationId, timestampMs, ...rest } = input;
2005
+ return this.command("/public/v1/submit/import_private_key", {
2006
+ parameters: rest,
2007
+ organizationId: organizationId ?? this.config.organizationId,
2008
+ timestampMs: timestampMs ?? String(Date.now()),
2009
+ type: "ACTIVITY_TYPE_IMPORT_PRIVATE_KEY",
2010
+ }, "importPrivateKeyResult");
2011
+ };
2012
+ this.stampImportPrivateKey = async (input) => {
2013
+ if (!this.stamper) {
2014
+ return undefined;
2015
+ }
2016
+ const { organizationId, timestampMs, ...parameters } = input;
2017
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/import_private_key";
2018
+ const bodyWithType = {
2019
+ parameters,
2020
+ organizationId: organizationId ?? this.config.organizationId,
2021
+ timestampMs: timestampMs ?? String(Date.now()),
2022
+ type: "ACTIVITY_TYPE_IMPORT_PRIVATE_KEY",
2023
+ };
2024
+ const stringifiedBody = JSON.stringify(bodyWithType);
2025
+ const stamp = await this.stamper.stamp(stringifiedBody);
2026
+ return {
2027
+ body: stringifiedBody,
2028
+ stamp: stamp,
2029
+ url: fullUrl,
2030
+ };
2031
+ };
2032
+ this.importWallet = async (input) => {
2033
+ const { organizationId, timestampMs, ...rest } = input;
2034
+ return this.command("/public/v1/submit/import_wallet", {
2035
+ parameters: rest,
2036
+ organizationId: organizationId ?? this.config.organizationId,
2037
+ timestampMs: timestampMs ?? String(Date.now()),
2038
+ type: "ACTIVITY_TYPE_IMPORT_WALLET",
2039
+ }, "importWalletResult");
2040
+ };
2041
+ this.stampImportWallet = async (input) => {
2042
+ if (!this.stamper) {
2043
+ return undefined;
2044
+ }
2045
+ const { organizationId, timestampMs, ...parameters } = input;
2046
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/import_wallet";
2047
+ const bodyWithType = {
2048
+ parameters,
2049
+ organizationId: organizationId ?? this.config.organizationId,
2050
+ timestampMs: timestampMs ?? String(Date.now()),
2051
+ type: "ACTIVITY_TYPE_IMPORT_WALLET",
2052
+ };
2053
+ const stringifiedBody = JSON.stringify(bodyWithType);
2054
+ const stamp = await this.stamper.stamp(stringifiedBody);
2055
+ return {
2056
+ body: stringifiedBody,
2057
+ stamp: stamp,
2058
+ url: fullUrl,
2059
+ };
2060
+ };
2061
+ this.initFiatOnRamp = async (input) => {
2062
+ const { organizationId, timestampMs, ...rest } = input;
2063
+ return this.command("/public/v1/submit/init_fiat_on_ramp", {
2064
+ parameters: rest,
2065
+ organizationId: organizationId ?? this.config.organizationId,
2066
+ timestampMs: timestampMs ?? String(Date.now()),
2067
+ type: "ACTIVITY_TYPE_INIT_FIAT_ON_RAMP",
2068
+ }, "initFiatOnRampResult");
2069
+ };
2070
+ this.stampInitFiatOnRamp = async (input) => {
2071
+ if (!this.stamper) {
2072
+ return undefined;
2073
+ }
2074
+ const { organizationId, timestampMs, ...parameters } = input;
2075
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/init_fiat_on_ramp";
2076
+ const bodyWithType = {
2077
+ parameters,
2078
+ organizationId: organizationId ?? this.config.organizationId,
2079
+ timestampMs: timestampMs ?? String(Date.now()),
2080
+ type: "ACTIVITY_TYPE_INIT_FIAT_ON_RAMP",
2081
+ };
2082
+ const stringifiedBody = JSON.stringify(bodyWithType);
2083
+ const stamp = await this.stamper.stamp(stringifiedBody);
2084
+ return {
2085
+ body: stringifiedBody,
2086
+ stamp: stamp,
2087
+ url: fullUrl,
2088
+ };
2089
+ };
2090
+ this.initImportPrivateKey = async (input) => {
2091
+ const { organizationId, timestampMs, ...rest } = input;
2092
+ return this.command("/public/v1/submit/init_import_private_key", {
2093
+ parameters: rest,
2094
+ organizationId: organizationId ?? this.config.organizationId,
2095
+ timestampMs: timestampMs ?? String(Date.now()),
2096
+ type: "ACTIVITY_TYPE_INIT_IMPORT_PRIVATE_KEY",
2097
+ }, "initImportPrivateKeyResult");
2098
+ };
2099
+ this.stampInitImportPrivateKey = async (input) => {
2100
+ if (!this.stamper) {
2101
+ return undefined;
2102
+ }
2103
+ const { organizationId, timestampMs, ...parameters } = input;
2104
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/init_import_private_key";
2105
+ const bodyWithType = {
2106
+ parameters,
2107
+ organizationId: organizationId ?? this.config.organizationId,
2108
+ timestampMs: timestampMs ?? String(Date.now()),
2109
+ type: "ACTIVITY_TYPE_INIT_IMPORT_PRIVATE_KEY",
2110
+ };
2111
+ const stringifiedBody = JSON.stringify(bodyWithType);
2112
+ const stamp = await this.stamper.stamp(stringifiedBody);
2113
+ return {
2114
+ body: stringifiedBody,
2115
+ stamp: stamp,
2116
+ url: fullUrl,
2117
+ };
2118
+ };
2119
+ this.initImportWallet = async (input) => {
2120
+ const { organizationId, timestampMs, ...rest } = input;
2121
+ return this.command("/public/v1/submit/init_import_wallet", {
2122
+ parameters: rest,
2123
+ organizationId: organizationId ?? this.config.organizationId,
2124
+ timestampMs: timestampMs ?? String(Date.now()),
2125
+ type: "ACTIVITY_TYPE_INIT_IMPORT_WALLET",
2126
+ }, "initImportWalletResult");
2127
+ };
2128
+ this.stampInitImportWallet = async (input) => {
2129
+ if (!this.stamper) {
2130
+ return undefined;
2131
+ }
2132
+ const { organizationId, timestampMs, ...parameters } = input;
2133
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/init_import_wallet";
2134
+ const bodyWithType = {
2135
+ parameters,
2136
+ organizationId: organizationId ?? this.config.organizationId,
2137
+ timestampMs: timestampMs ?? String(Date.now()),
2138
+ type: "ACTIVITY_TYPE_INIT_IMPORT_WALLET",
2139
+ };
2140
+ const stringifiedBody = JSON.stringify(bodyWithType);
2141
+ const stamp = await this.stamper.stamp(stringifiedBody);
2142
+ return {
2143
+ body: stringifiedBody,
2144
+ stamp: stamp,
2145
+ url: fullUrl,
2146
+ };
2147
+ };
2148
+ this.initOtp = async (input) => {
2149
+ const { organizationId, timestampMs, ...rest } = input;
2150
+ return this.command("/public/v1/submit/init_otp", {
2151
+ parameters: rest,
2152
+ organizationId: organizationId ?? this.config.organizationId,
2153
+ timestampMs: timestampMs ?? String(Date.now()),
2154
+ type: "ACTIVITY_TYPE_INIT_OTP_V2",
2155
+ }, "initOtpResult");
2156
+ };
2157
+ this.stampInitOtp = async (input) => {
2158
+ if (!this.stamper) {
2159
+ return undefined;
2160
+ }
2161
+ const { organizationId, timestampMs, ...parameters } = input;
2162
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/init_otp";
2163
+ const bodyWithType = {
2164
+ parameters,
2165
+ organizationId: organizationId ?? this.config.organizationId,
2166
+ timestampMs: timestampMs ?? String(Date.now()),
2167
+ type: "ACTIVITY_TYPE_INIT_OTP_V2",
2168
+ };
2169
+ const stringifiedBody = JSON.stringify(bodyWithType);
2170
+ const stamp = await this.stamper.stamp(stringifiedBody);
2171
+ return {
2172
+ body: stringifiedBody,
2173
+ stamp: stamp,
2174
+ url: fullUrl,
2175
+ };
2176
+ };
2177
+ this.initOtpAuth = async (input) => {
2178
+ const { organizationId, timestampMs, ...rest } = input;
2179
+ return this.command("/public/v1/submit/init_otp_auth", {
2180
+ parameters: rest,
2181
+ organizationId: organizationId ?? this.config.organizationId,
2182
+ timestampMs: timestampMs ?? String(Date.now()),
2183
+ type: "ACTIVITY_TYPE_INIT_OTP_AUTH_V3",
2184
+ }, "initOtpAuthResultV2");
2185
+ };
2186
+ this.stampInitOtpAuth = async (input) => {
2187
+ if (!this.stamper) {
2188
+ return undefined;
2189
+ }
2190
+ const { organizationId, timestampMs, ...parameters } = input;
2191
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/init_otp_auth";
2192
+ const bodyWithType = {
2193
+ parameters,
2194
+ organizationId: organizationId ?? this.config.organizationId,
2195
+ timestampMs: timestampMs ?? String(Date.now()),
2196
+ type: "ACTIVITY_TYPE_INIT_OTP_AUTH_V3",
2197
+ };
2198
+ const stringifiedBody = JSON.stringify(bodyWithType);
2199
+ const stamp = await this.stamper.stamp(stringifiedBody);
2200
+ return {
2201
+ body: stringifiedBody,
2202
+ stamp: stamp,
2203
+ url: fullUrl,
2204
+ };
2205
+ };
2206
+ this.initUserEmailRecovery = async (input) => {
2207
+ const { organizationId, timestampMs, ...rest } = input;
2208
+ return this.command("/public/v1/submit/init_user_email_recovery", {
2209
+ parameters: rest,
2210
+ organizationId: organizationId ?? this.config.organizationId,
2211
+ timestampMs: timestampMs ?? String(Date.now()),
2212
+ type: "ACTIVITY_TYPE_INIT_USER_EMAIL_RECOVERY_V2",
2213
+ }, "initUserEmailRecoveryResult");
2214
+ };
2215
+ this.stampInitUserEmailRecovery = async (input) => {
2216
+ if (!this.stamper) {
2217
+ return undefined;
2218
+ }
2219
+ const { organizationId, timestampMs, ...parameters } = input;
2220
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/init_user_email_recovery";
2221
+ const bodyWithType = {
2222
+ parameters,
2223
+ organizationId: organizationId ?? this.config.organizationId,
2224
+ timestampMs: timestampMs ?? String(Date.now()),
2225
+ type: "ACTIVITY_TYPE_INIT_USER_EMAIL_RECOVERY_V2",
2226
+ };
2227
+ const stringifiedBody = JSON.stringify(bodyWithType);
2228
+ const stamp = await this.stamper.stamp(stringifiedBody);
2229
+ return {
2230
+ body: stringifiedBody,
2231
+ stamp: stamp,
2232
+ url: fullUrl,
2233
+ };
2234
+ };
2235
+ this.oauth = async (input) => {
2236
+ const { organizationId, timestampMs, ...rest } = input;
2237
+ return this.command("/public/v1/submit/oauth", {
2238
+ parameters: rest,
2239
+ organizationId: organizationId ?? this.config.organizationId,
2240
+ timestampMs: timestampMs ?? String(Date.now()),
2241
+ type: "ACTIVITY_TYPE_OAUTH",
2242
+ }, "oauthResult");
2243
+ };
2244
+ this.stampOauth = async (input) => {
2245
+ if (!this.stamper) {
2246
+ return undefined;
2247
+ }
2248
+ const { organizationId, timestampMs, ...parameters } = input;
2249
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/oauth";
2250
+ const bodyWithType = {
2251
+ parameters,
2252
+ organizationId: organizationId ?? this.config.organizationId,
2253
+ timestampMs: timestampMs ?? String(Date.now()),
2254
+ type: "ACTIVITY_TYPE_OAUTH",
2255
+ };
2256
+ const stringifiedBody = JSON.stringify(bodyWithType);
2257
+ const stamp = await this.stamper.stamp(stringifiedBody);
2258
+ return {
2259
+ body: stringifiedBody,
2260
+ stamp: stamp,
2261
+ url: fullUrl,
2262
+ };
2263
+ };
2264
+ this.oauth2Authenticate = async (input) => {
2265
+ const { organizationId, timestampMs, ...rest } = input;
2266
+ return this.command("/public/v1/submit/oauth2_authenticate", {
2267
+ parameters: rest,
2268
+ organizationId: organizationId ?? this.config.organizationId,
2269
+ timestampMs: timestampMs ?? String(Date.now()),
2270
+ type: "ACTIVITY_TYPE_OAUTH2_AUTHENTICATE",
2271
+ }, "oauth2AuthenticateResult");
2272
+ };
2273
+ this.stampOauth2Authenticate = async (input) => {
2274
+ if (!this.stamper) {
2275
+ return undefined;
2276
+ }
2277
+ const { organizationId, timestampMs, ...parameters } = input;
2278
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/oauth2_authenticate";
2279
+ const bodyWithType = {
2280
+ parameters,
2281
+ organizationId: organizationId ?? this.config.organizationId,
2282
+ timestampMs: timestampMs ?? String(Date.now()),
2283
+ type: "ACTIVITY_TYPE_OAUTH2_AUTHENTICATE",
2284
+ };
2285
+ const stringifiedBody = JSON.stringify(bodyWithType);
2286
+ const stamp = await this.stamper.stamp(stringifiedBody);
2287
+ return {
2288
+ body: stringifiedBody,
2289
+ stamp: stamp,
2290
+ url: fullUrl,
2291
+ };
2292
+ };
2293
+ this.oauthLogin = async (input) => {
2294
+ const { organizationId, timestampMs, ...rest } = input;
2295
+ return this.command("/public/v1/submit/oauth_login", {
2296
+ parameters: rest,
2297
+ organizationId: organizationId ?? this.config.organizationId,
2298
+ timestampMs: timestampMs ?? String(Date.now()),
2299
+ type: "ACTIVITY_TYPE_OAUTH_LOGIN",
2300
+ }, "oauthLoginResult");
2301
+ };
2302
+ this.stampOauthLogin = async (input) => {
2303
+ if (!this.stamper) {
2304
+ return undefined;
2305
+ }
2306
+ const { organizationId, timestampMs, ...parameters } = input;
2307
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/oauth_login";
2308
+ const bodyWithType = {
2309
+ parameters,
2310
+ organizationId: organizationId ?? this.config.organizationId,
2311
+ timestampMs: timestampMs ?? String(Date.now()),
2312
+ type: "ACTIVITY_TYPE_OAUTH_LOGIN",
2313
+ };
2314
+ const stringifiedBody = JSON.stringify(bodyWithType);
2315
+ const stamp = await this.stamper.stamp(stringifiedBody);
2316
+ return {
2317
+ body: stringifiedBody,
2318
+ stamp: stamp,
2319
+ url: fullUrl,
2320
+ };
2321
+ };
2322
+ this.otpAuth = async (input) => {
2323
+ const { organizationId, timestampMs, ...rest } = input;
2324
+ return this.command("/public/v1/submit/otp_auth", {
2325
+ parameters: rest,
2326
+ organizationId: organizationId ?? this.config.organizationId,
2327
+ timestampMs: timestampMs ?? String(Date.now()),
2328
+ type: "ACTIVITY_TYPE_OTP_AUTH",
2329
+ }, "otpAuthResult");
2330
+ };
2331
+ this.stampOtpAuth = async (input) => {
2332
+ if (!this.stamper) {
2333
+ return undefined;
2334
+ }
2335
+ const { organizationId, timestampMs, ...parameters } = input;
2336
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/otp_auth";
2337
+ const bodyWithType = {
2338
+ parameters,
2339
+ organizationId: organizationId ?? this.config.organizationId,
2340
+ timestampMs: timestampMs ?? String(Date.now()),
2341
+ type: "ACTIVITY_TYPE_OTP_AUTH",
2342
+ };
2343
+ const stringifiedBody = JSON.stringify(bodyWithType);
2344
+ const stamp = await this.stamper.stamp(stringifiedBody);
2345
+ return {
2346
+ body: stringifiedBody,
2347
+ stamp: stamp,
2348
+ url: fullUrl,
2349
+ };
2350
+ };
2351
+ this.otpLogin = async (input) => {
2352
+ const { organizationId, timestampMs, ...rest } = input;
2353
+ return this.command("/public/v1/submit/otp_login", {
2354
+ parameters: rest,
2355
+ organizationId: organizationId ?? this.config.organizationId,
2356
+ timestampMs: timestampMs ?? String(Date.now()),
2357
+ type: "ACTIVITY_TYPE_OTP_LOGIN",
2358
+ }, "otpLoginResult");
2359
+ };
2360
+ this.stampOtpLogin = async (input) => {
2361
+ if (!this.stamper) {
2362
+ return undefined;
2363
+ }
2364
+ const { organizationId, timestampMs, ...parameters } = input;
2365
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/otp_login";
2366
+ const bodyWithType = {
2367
+ parameters,
2368
+ organizationId: organizationId ?? this.config.organizationId,
2369
+ timestampMs: timestampMs ?? String(Date.now()),
2370
+ type: "ACTIVITY_TYPE_OTP_LOGIN",
2371
+ };
2372
+ const stringifiedBody = JSON.stringify(bodyWithType);
2373
+ const stamp = await this.stamper.stamp(stringifiedBody);
2374
+ return {
2375
+ body: stringifiedBody,
2376
+ stamp: stamp,
2377
+ url: fullUrl,
2378
+ };
2379
+ };
2380
+ this.recoverUser = async (input) => {
2381
+ const { organizationId, timestampMs, ...rest } = input;
2382
+ return this.command("/public/v1/submit/recover_user", {
2383
+ parameters: rest,
2384
+ organizationId: organizationId ?? this.config.organizationId,
2385
+ timestampMs: timestampMs ?? String(Date.now()),
2386
+ type: "ACTIVITY_TYPE_RECOVER_USER",
2387
+ }, "recoverUserResult");
2388
+ };
2389
+ this.stampRecoverUser = async (input) => {
2390
+ if (!this.stamper) {
2391
+ return undefined;
2392
+ }
2393
+ const { organizationId, timestampMs, ...parameters } = input;
2394
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/recover_user";
2395
+ const bodyWithType = {
2396
+ parameters,
2397
+ organizationId: organizationId ?? this.config.organizationId,
2398
+ timestampMs: timestampMs ?? String(Date.now()),
2399
+ type: "ACTIVITY_TYPE_RECOVER_USER",
2400
+ };
2401
+ const stringifiedBody = JSON.stringify(bodyWithType);
2402
+ const stamp = await this.stamper.stamp(stringifiedBody);
2403
+ return {
2404
+ body: stringifiedBody,
2405
+ stamp: stamp,
2406
+ url: fullUrl,
2407
+ };
2408
+ };
2409
+ this.rejectActivity = async (input) => {
2410
+ const { organizationId, timestampMs, ...rest } = input;
2411
+ return this.activityDecision("/public/v1/submit/reject_activity", {
2412
+ parameters: rest,
2413
+ organizationId: organizationId ?? this.config.organizationId,
2414
+ timestampMs: timestampMs ?? String(Date.now()),
2415
+ type: "ACTIVITY_TYPE_REJECT_ACTIVITY",
2416
+ });
2417
+ };
2418
+ this.stampRejectActivity = async (input) => {
2419
+ if (!this.stamper) {
2420
+ return undefined;
2421
+ }
2422
+ const { organizationId, timestampMs, ...parameters } = input;
2423
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/reject_activity";
2424
+ const bodyWithType = {
2425
+ parameters,
2426
+ organizationId: organizationId ?? this.config.organizationId,
2427
+ timestampMs: timestampMs ?? String(Date.now()),
2428
+ type: "ACTIVITY_TYPE_REJECT_ACTIVITY",
2429
+ };
2430
+ const stringifiedBody = JSON.stringify(bodyWithType);
2431
+ const stamp = await this.stamper.stamp(stringifiedBody);
2432
+ return {
2433
+ body: stringifiedBody,
2434
+ stamp: stamp,
2435
+ url: fullUrl,
2436
+ };
2437
+ };
2438
+ this.removeOrganizationFeature = async (input) => {
2439
+ const { organizationId, timestampMs, ...rest } = input;
2440
+ return this.command("/public/v1/submit/remove_organization_feature", {
2441
+ parameters: rest,
2442
+ organizationId: organizationId ?? this.config.organizationId,
2443
+ timestampMs: timestampMs ?? String(Date.now()),
2444
+ type: "ACTIVITY_TYPE_REMOVE_ORGANIZATION_FEATURE",
2445
+ }, "removeOrganizationFeatureResult");
2446
+ };
2447
+ this.stampRemoveOrganizationFeature = async (input) => {
2448
+ if (!this.stamper) {
2449
+ return undefined;
2450
+ }
2451
+ const { organizationId, timestampMs, ...parameters } = input;
2452
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/remove_organization_feature";
2453
+ const bodyWithType = {
2454
+ parameters,
2455
+ organizationId: organizationId ?? this.config.organizationId,
2456
+ timestampMs: timestampMs ?? String(Date.now()),
2457
+ type: "ACTIVITY_TYPE_REMOVE_ORGANIZATION_FEATURE",
2458
+ };
2459
+ const stringifiedBody = JSON.stringify(bodyWithType);
2460
+ const stamp = await this.stamper.stamp(stringifiedBody);
2461
+ return {
2462
+ body: stringifiedBody,
2463
+ stamp: stamp,
2464
+ url: fullUrl,
2465
+ };
2466
+ };
2467
+ this.setOrganizationFeature = async (input) => {
2468
+ const { organizationId, timestampMs, ...rest } = input;
2469
+ return this.command("/public/v1/submit/set_organization_feature", {
2470
+ parameters: rest,
2471
+ organizationId: organizationId ?? this.config.organizationId,
2472
+ timestampMs: timestampMs ?? String(Date.now()),
2473
+ type: "ACTIVITY_TYPE_SET_ORGANIZATION_FEATURE",
2474
+ }, "setOrganizationFeatureResult");
2475
+ };
2476
+ this.stampSetOrganizationFeature = async (input) => {
2477
+ if (!this.stamper) {
2478
+ return undefined;
2479
+ }
2480
+ const { organizationId, timestampMs, ...parameters } = input;
2481
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/set_organization_feature";
2482
+ const bodyWithType = {
2483
+ parameters,
2484
+ organizationId: organizationId ?? this.config.organizationId,
2485
+ timestampMs: timestampMs ?? String(Date.now()),
2486
+ type: "ACTIVITY_TYPE_SET_ORGANIZATION_FEATURE",
2487
+ };
2488
+ const stringifiedBody = JSON.stringify(bodyWithType);
2489
+ const stamp = await this.stamper.stamp(stringifiedBody);
2490
+ return {
2491
+ body: stringifiedBody,
2492
+ stamp: stamp,
2493
+ url: fullUrl,
2494
+ };
2495
+ };
2496
+ this.signRawPayload = async (input) => {
2497
+ const { organizationId, timestampMs, ...rest } = input;
2498
+ return this.command("/public/v1/submit/sign_raw_payload", {
2499
+ parameters: rest,
2500
+ organizationId: organizationId ?? this.config.organizationId,
2501
+ timestampMs: timestampMs ?? String(Date.now()),
2502
+ type: "ACTIVITY_TYPE_SIGN_RAW_PAYLOAD_V2",
2503
+ }, "signRawPayloadResult");
2504
+ };
2505
+ this.stampSignRawPayload = async (input) => {
2506
+ if (!this.stamper) {
2507
+ return undefined;
2508
+ }
2509
+ const { organizationId, timestampMs, ...parameters } = input;
2510
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/sign_raw_payload";
2511
+ const bodyWithType = {
2512
+ parameters,
2513
+ organizationId: organizationId ?? this.config.organizationId,
2514
+ timestampMs: timestampMs ?? String(Date.now()),
2515
+ type: "ACTIVITY_TYPE_SIGN_RAW_PAYLOAD_V2",
2516
+ };
2517
+ const stringifiedBody = JSON.stringify(bodyWithType);
2518
+ const stamp = await this.stamper.stamp(stringifiedBody);
2519
+ return {
2520
+ body: stringifiedBody,
2521
+ stamp: stamp,
2522
+ url: fullUrl,
2523
+ };
2524
+ };
2525
+ this.signRawPayloads = async (input) => {
2526
+ const { organizationId, timestampMs, ...rest } = input;
2527
+ return this.command("/public/v1/submit/sign_raw_payloads", {
2528
+ parameters: rest,
2529
+ organizationId: organizationId ?? this.config.organizationId,
2530
+ timestampMs: timestampMs ?? String(Date.now()),
2531
+ type: "ACTIVITY_TYPE_SIGN_RAW_PAYLOADS",
2532
+ }, "signRawPayloadsResult");
2533
+ };
2534
+ this.stampSignRawPayloads = async (input) => {
2535
+ if (!this.stamper) {
2536
+ return undefined;
2537
+ }
2538
+ const { organizationId, timestampMs, ...parameters } = input;
2539
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/sign_raw_payloads";
2540
+ const bodyWithType = {
2541
+ parameters,
2542
+ organizationId: organizationId ?? this.config.organizationId,
2543
+ timestampMs: timestampMs ?? String(Date.now()),
2544
+ type: "ACTIVITY_TYPE_SIGN_RAW_PAYLOADS",
2545
+ };
2546
+ const stringifiedBody = JSON.stringify(bodyWithType);
2547
+ const stamp = await this.stamper.stamp(stringifiedBody);
2548
+ return {
2549
+ body: stringifiedBody,
2550
+ stamp: stamp,
2551
+ url: fullUrl,
2552
+ };
2553
+ };
2554
+ this.signTransaction = async (input) => {
2555
+ const { organizationId, timestampMs, ...rest } = input;
2556
+ return this.command("/public/v1/submit/sign_transaction", {
2557
+ parameters: rest,
2558
+ organizationId: organizationId ?? this.config.organizationId,
2559
+ timestampMs: timestampMs ?? String(Date.now()),
2560
+ type: "ACTIVITY_TYPE_SIGN_TRANSACTION_V2",
2561
+ }, "signTransactionResult");
2562
+ };
2563
+ this.stampSignTransaction = async (input) => {
2564
+ if (!this.stamper) {
2565
+ return undefined;
2566
+ }
2567
+ const { organizationId, timestampMs, ...parameters } = input;
2568
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/sign_transaction";
2569
+ const bodyWithType = {
2570
+ parameters,
2571
+ organizationId: organizationId ?? this.config.organizationId,
2572
+ timestampMs: timestampMs ?? String(Date.now()),
2573
+ type: "ACTIVITY_TYPE_SIGN_TRANSACTION_V2",
2574
+ };
2575
+ const stringifiedBody = JSON.stringify(bodyWithType);
2576
+ const stamp = await this.stamper.stamp(stringifiedBody);
2577
+ return {
2578
+ body: stringifiedBody,
2579
+ stamp: stamp,
2580
+ url: fullUrl,
2581
+ };
2582
+ };
2583
+ this.solSendTransaction = async (input) => {
2584
+ const { organizationId, timestampMs, ...rest } = input;
2585
+ return this.command("/public/v1/submit/sol_send_transaction", {
2586
+ parameters: rest,
2587
+ organizationId: organizationId ?? this.config.organizationId,
2588
+ timestampMs: timestampMs ?? String(Date.now()),
2589
+ type: "ACTIVITY_TYPE_SOL_SEND_TRANSACTION",
2590
+ }, "solSendTransactionResult");
2591
+ };
2592
+ this.stampSolSendTransaction = async (input) => {
2593
+ if (!this.stamper) {
2594
+ return undefined;
2595
+ }
2596
+ const { organizationId, timestampMs, ...parameters } = input;
2597
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/sol_send_transaction";
2598
+ const bodyWithType = {
2599
+ parameters,
2600
+ organizationId: organizationId ?? this.config.organizationId,
2601
+ timestampMs: timestampMs ?? String(Date.now()),
2602
+ type: "ACTIVITY_TYPE_SOL_SEND_TRANSACTION",
2603
+ };
2604
+ const stringifiedBody = JSON.stringify(bodyWithType);
2605
+ const stamp = await this.stamper.stamp(stringifiedBody);
2606
+ return {
2607
+ body: stringifiedBody,
2608
+ stamp: stamp,
2609
+ url: fullUrl,
2610
+ };
2611
+ };
2612
+ this.stampLogin = async (input) => {
2613
+ const { organizationId, timestampMs, ...rest } = input;
2614
+ return this.command("/public/v1/submit/stamp_login", {
2615
+ parameters: rest,
2616
+ organizationId: organizationId ?? this.config.organizationId,
2617
+ timestampMs: timestampMs ?? String(Date.now()),
2618
+ type: "ACTIVITY_TYPE_STAMP_LOGIN",
2619
+ }, "stampLoginResult");
2620
+ };
2621
+ this.stampStampLogin = async (input) => {
2622
+ if (!this.stamper) {
2623
+ return undefined;
2624
+ }
2625
+ const { organizationId, timestampMs, ...parameters } = input;
2626
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/stamp_login";
2627
+ const bodyWithType = {
2628
+ parameters,
2629
+ organizationId: organizationId ?? this.config.organizationId,
2630
+ timestampMs: timestampMs ?? String(Date.now()),
2631
+ type: "ACTIVITY_TYPE_STAMP_LOGIN",
2632
+ };
2633
+ const stringifiedBody = JSON.stringify(bodyWithType);
2634
+ const stamp = await this.stamper.stamp(stringifiedBody);
2635
+ return {
2636
+ body: stringifiedBody,
2637
+ stamp: stamp,
2638
+ url: fullUrl,
2639
+ };
2640
+ };
2641
+ this.updateFiatOnRampCredential = async (input) => {
2642
+ const { organizationId, timestampMs, ...rest } = input;
2643
+ return this.command("/public/v1/submit/update_fiat_on_ramp_credential", {
2644
+ parameters: rest,
2645
+ organizationId: organizationId ?? this.config.organizationId,
2646
+ timestampMs: timestampMs ?? String(Date.now()),
2647
+ type: "ACTIVITY_TYPE_UPDATE_FIAT_ON_RAMP_CREDENTIAL",
2648
+ }, "updateFiatOnRampCredentialResult");
2649
+ };
2650
+ this.stampUpdateFiatOnRampCredential = async (input) => {
2651
+ if (!this.stamper) {
2652
+ return undefined;
2653
+ }
2654
+ const { organizationId, timestampMs, ...parameters } = input;
2655
+ const fullUrl = this.config.apiBaseUrl +
2656
+ "/public/v1/submit/update_fiat_on_ramp_credential";
2657
+ const bodyWithType = {
2658
+ parameters,
2659
+ organizationId: organizationId ?? this.config.organizationId,
2660
+ timestampMs: timestampMs ?? String(Date.now()),
2661
+ type: "ACTIVITY_TYPE_UPDATE_FIAT_ON_RAMP_CREDENTIAL",
2662
+ };
2663
+ const stringifiedBody = JSON.stringify(bodyWithType);
2664
+ const stamp = await this.stamper.stamp(stringifiedBody);
2665
+ return {
2666
+ body: stringifiedBody,
2667
+ stamp: stamp,
2668
+ url: fullUrl,
2669
+ };
2670
+ };
2671
+ this.updateOauth2Credential = async (input) => {
2672
+ const { organizationId, timestampMs, ...rest } = input;
2673
+ return this.command("/public/v1/submit/update_oauth2_credential", {
2674
+ parameters: rest,
2675
+ organizationId: organizationId ?? this.config.organizationId,
2676
+ timestampMs: timestampMs ?? String(Date.now()),
2677
+ type: "ACTIVITY_TYPE_UPDATE_OAUTH2_CREDENTIAL",
2678
+ }, "updateOauth2CredentialResult");
2679
+ };
2680
+ this.stampUpdateOauth2Credential = async (input) => {
2681
+ if (!this.stamper) {
2682
+ return undefined;
2683
+ }
2684
+ const { organizationId, timestampMs, ...parameters } = input;
2685
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/update_oauth2_credential";
2686
+ const bodyWithType = {
2687
+ parameters,
2688
+ organizationId: organizationId ?? this.config.organizationId,
2689
+ timestampMs: timestampMs ?? String(Date.now()),
2690
+ type: "ACTIVITY_TYPE_UPDATE_OAUTH2_CREDENTIAL",
2691
+ };
2692
+ const stringifiedBody = JSON.stringify(bodyWithType);
2693
+ const stamp = await this.stamper.stamp(stringifiedBody);
2694
+ return {
2695
+ body: stringifiedBody,
2696
+ stamp: stamp,
2697
+ url: fullUrl,
2698
+ };
2699
+ };
2700
+ this.updateOrganizationName = async (input) => {
2701
+ const { organizationId, timestampMs, ...rest } = input;
2702
+ return this.command("/public/v1/submit/update_organization_name", {
2703
+ parameters: rest,
2704
+ organizationId: organizationId ?? this.config.organizationId,
2705
+ timestampMs: timestampMs ?? String(Date.now()),
2706
+ type: "ACTIVITY_TYPE_UPDATE_ORGANIZATION_NAME",
2707
+ }, "updateOrganizationNameResult");
2708
+ };
2709
+ this.stampUpdateOrganizationName = async (input) => {
2710
+ if (!this.stamper) {
2711
+ return undefined;
2712
+ }
2713
+ const { organizationId, timestampMs, ...parameters } = input;
2714
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/update_organization_name";
2715
+ const bodyWithType = {
2716
+ parameters,
2717
+ organizationId: organizationId ?? this.config.organizationId,
2718
+ timestampMs: timestampMs ?? String(Date.now()),
2719
+ type: "ACTIVITY_TYPE_UPDATE_ORGANIZATION_NAME",
2720
+ };
2721
+ const stringifiedBody = JSON.stringify(bodyWithType);
2722
+ const stamp = await this.stamper.stamp(stringifiedBody);
2723
+ return {
2724
+ body: stringifiedBody,
2725
+ stamp: stamp,
2726
+ url: fullUrl,
2727
+ };
2728
+ };
2729
+ this.updatePolicy = async (input) => {
2730
+ const { organizationId, timestampMs, ...rest } = input;
2731
+ return this.command("/public/v1/submit/update_policy", {
2732
+ parameters: rest,
2733
+ organizationId: organizationId ?? this.config.organizationId,
2734
+ timestampMs: timestampMs ?? String(Date.now()),
2735
+ type: "ACTIVITY_TYPE_UPDATE_POLICY_V2",
2736
+ }, "updatePolicyResultV2");
2737
+ };
2738
+ this.stampUpdatePolicy = async (input) => {
2739
+ if (!this.stamper) {
2740
+ return undefined;
2741
+ }
2742
+ const { organizationId, timestampMs, ...parameters } = input;
2743
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/update_policy";
2744
+ const bodyWithType = {
2745
+ parameters,
2746
+ organizationId: organizationId ?? this.config.organizationId,
2747
+ timestampMs: timestampMs ?? String(Date.now()),
2748
+ type: "ACTIVITY_TYPE_UPDATE_POLICY_V2",
2749
+ };
2750
+ const stringifiedBody = JSON.stringify(bodyWithType);
2751
+ const stamp = await this.stamper.stamp(stringifiedBody);
2752
+ return {
2753
+ body: stringifiedBody,
2754
+ stamp: stamp,
2755
+ url: fullUrl,
2756
+ };
2757
+ };
2758
+ this.updatePrivateKeyTag = async (input) => {
2759
+ const { organizationId, timestampMs, ...rest } = input;
2760
+ return this.command("/public/v1/submit/update_private_key_tag", {
2761
+ parameters: rest,
2762
+ organizationId: organizationId ?? this.config.organizationId,
2763
+ timestampMs: timestampMs ?? String(Date.now()),
2764
+ type: "ACTIVITY_TYPE_UPDATE_PRIVATE_KEY_TAG",
2765
+ }, "updatePrivateKeyTagResult");
2766
+ };
2767
+ this.stampUpdatePrivateKeyTag = async (input) => {
2768
+ if (!this.stamper) {
2769
+ return undefined;
2770
+ }
2771
+ const { organizationId, timestampMs, ...parameters } = input;
2772
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/update_private_key_tag";
2773
+ const bodyWithType = {
2774
+ parameters,
2775
+ organizationId: organizationId ?? this.config.organizationId,
2776
+ timestampMs: timestampMs ?? String(Date.now()),
2777
+ type: "ACTIVITY_TYPE_UPDATE_PRIVATE_KEY_TAG",
2778
+ };
2779
+ const stringifiedBody = JSON.stringify(bodyWithType);
2780
+ const stamp = await this.stamper.stamp(stringifiedBody);
2781
+ return {
2782
+ body: stringifiedBody,
2783
+ stamp: stamp,
2784
+ url: fullUrl,
2785
+ };
2786
+ };
2787
+ this.updateRootQuorum = async (input) => {
2788
+ const { organizationId, timestampMs, ...rest } = input;
2789
+ return this.command("/public/v1/submit/update_root_quorum", {
2790
+ parameters: rest,
2791
+ organizationId: organizationId ?? this.config.organizationId,
2792
+ timestampMs: timestampMs ?? String(Date.now()),
2793
+ type: "ACTIVITY_TYPE_UPDATE_ROOT_QUORUM",
2794
+ }, "updateRootQuorumResult");
2795
+ };
2796
+ this.stampUpdateRootQuorum = async (input) => {
2797
+ if (!this.stamper) {
2798
+ return undefined;
2799
+ }
2800
+ const { organizationId, timestampMs, ...parameters } = input;
2801
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/update_root_quorum";
2802
+ const bodyWithType = {
2803
+ parameters,
2804
+ organizationId: organizationId ?? this.config.organizationId,
2805
+ timestampMs: timestampMs ?? String(Date.now()),
2806
+ type: "ACTIVITY_TYPE_UPDATE_ROOT_QUORUM",
2807
+ };
2808
+ const stringifiedBody = JSON.stringify(bodyWithType);
2809
+ const stamp = await this.stamper.stamp(stringifiedBody);
2810
+ return {
2811
+ body: stringifiedBody,
2812
+ stamp: stamp,
2813
+ url: fullUrl,
2814
+ };
2815
+ };
2816
+ this.updateUser = async (input) => {
2817
+ const { organizationId, timestampMs, ...rest } = input;
2818
+ return this.command("/public/v1/submit/update_user", {
2819
+ parameters: rest,
2820
+ organizationId: organizationId ?? this.config.organizationId,
2821
+ timestampMs: timestampMs ?? String(Date.now()),
2822
+ type: "ACTIVITY_TYPE_UPDATE_USER",
2823
+ }, "updateUserResult");
2824
+ };
2825
+ this.stampUpdateUser = async (input) => {
2826
+ if (!this.stamper) {
2827
+ return undefined;
2828
+ }
2829
+ const { organizationId, timestampMs, ...parameters } = input;
2830
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/update_user";
2831
+ const bodyWithType = {
2832
+ parameters,
2833
+ organizationId: organizationId ?? this.config.organizationId,
2834
+ timestampMs: timestampMs ?? String(Date.now()),
2835
+ type: "ACTIVITY_TYPE_UPDATE_USER",
2836
+ };
2837
+ const stringifiedBody = JSON.stringify(bodyWithType);
2838
+ const stamp = await this.stamper.stamp(stringifiedBody);
2839
+ return {
2840
+ body: stringifiedBody,
2841
+ stamp: stamp,
2842
+ url: fullUrl,
2843
+ };
2844
+ };
2845
+ this.updateUserEmail = async (input) => {
2846
+ const { organizationId, timestampMs, ...rest } = input;
2847
+ return this.command("/public/v1/submit/update_user_email", {
2848
+ parameters: rest,
2849
+ organizationId: organizationId ?? this.config.organizationId,
2850
+ timestampMs: timestampMs ?? String(Date.now()),
2851
+ type: "ACTIVITY_TYPE_UPDATE_USER_EMAIL",
2852
+ }, "updateUserEmailResult");
2853
+ };
2854
+ this.stampUpdateUserEmail = async (input) => {
2855
+ if (!this.stamper) {
2856
+ return undefined;
2857
+ }
2858
+ const { organizationId, timestampMs, ...parameters } = input;
2859
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/update_user_email";
2860
+ const bodyWithType = {
2861
+ parameters,
2862
+ organizationId: organizationId ?? this.config.organizationId,
2863
+ timestampMs: timestampMs ?? String(Date.now()),
2864
+ type: "ACTIVITY_TYPE_UPDATE_USER_EMAIL",
2865
+ };
2866
+ const stringifiedBody = JSON.stringify(bodyWithType);
2867
+ const stamp = await this.stamper.stamp(stringifiedBody);
2868
+ return {
2869
+ body: stringifiedBody,
2870
+ stamp: stamp,
2871
+ url: fullUrl,
2872
+ };
2873
+ };
2874
+ this.updateUserName = async (input) => {
2875
+ const { organizationId, timestampMs, ...rest } = input;
2876
+ return this.command("/public/v1/submit/update_user_name", {
2877
+ parameters: rest,
2878
+ organizationId: organizationId ?? this.config.organizationId,
2879
+ timestampMs: timestampMs ?? String(Date.now()),
2880
+ type: "ACTIVITY_TYPE_UPDATE_USER_NAME",
2881
+ }, "updateUserNameResult");
2882
+ };
2883
+ this.stampUpdateUserName = async (input) => {
2884
+ if (!this.stamper) {
2885
+ return undefined;
2886
+ }
2887
+ const { organizationId, timestampMs, ...parameters } = input;
2888
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/update_user_name";
2889
+ const bodyWithType = {
2890
+ parameters,
2891
+ organizationId: organizationId ?? this.config.organizationId,
2892
+ timestampMs: timestampMs ?? String(Date.now()),
2893
+ type: "ACTIVITY_TYPE_UPDATE_USER_NAME",
2894
+ };
2895
+ const stringifiedBody = JSON.stringify(bodyWithType);
2896
+ const stamp = await this.stamper.stamp(stringifiedBody);
2897
+ return {
2898
+ body: stringifiedBody,
2899
+ stamp: stamp,
2900
+ url: fullUrl,
2901
+ };
2902
+ };
2903
+ this.updateUserPhoneNumber = async (input) => {
2904
+ const { organizationId, timestampMs, ...rest } = input;
2905
+ return this.command("/public/v1/submit/update_user_phone_number", {
2906
+ parameters: rest,
2907
+ organizationId: organizationId ?? this.config.organizationId,
2908
+ timestampMs: timestampMs ?? String(Date.now()),
2909
+ type: "ACTIVITY_TYPE_UPDATE_USER_PHONE_NUMBER",
2910
+ }, "updateUserPhoneNumberResult");
2911
+ };
2912
+ this.stampUpdateUserPhoneNumber = async (input) => {
2913
+ if (!this.stamper) {
2914
+ return undefined;
2915
+ }
2916
+ const { organizationId, timestampMs, ...parameters } = input;
2917
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/update_user_phone_number";
2918
+ const bodyWithType = {
2919
+ parameters,
2920
+ organizationId: organizationId ?? this.config.organizationId,
2921
+ timestampMs: timestampMs ?? String(Date.now()),
2922
+ type: "ACTIVITY_TYPE_UPDATE_USER_PHONE_NUMBER",
2923
+ };
2924
+ const stringifiedBody = JSON.stringify(bodyWithType);
2925
+ const stamp = await this.stamper.stamp(stringifiedBody);
2926
+ return {
2927
+ body: stringifiedBody,
2928
+ stamp: stamp,
2929
+ url: fullUrl,
2930
+ };
2931
+ };
2932
+ this.updateUserTag = async (input) => {
2933
+ const { organizationId, timestampMs, ...rest } = input;
2934
+ return this.command("/public/v1/submit/update_user_tag", {
2935
+ parameters: rest,
2936
+ organizationId: organizationId ?? this.config.organizationId,
2937
+ timestampMs: timestampMs ?? String(Date.now()),
2938
+ type: "ACTIVITY_TYPE_UPDATE_USER_TAG",
2939
+ }, "updateUserTagResult");
2940
+ };
2941
+ this.stampUpdateUserTag = async (input) => {
2942
+ if (!this.stamper) {
2943
+ return undefined;
2944
+ }
2945
+ const { organizationId, timestampMs, ...parameters } = input;
2946
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/update_user_tag";
2947
+ const bodyWithType = {
2948
+ parameters,
2949
+ organizationId: organizationId ?? this.config.organizationId,
2950
+ timestampMs: timestampMs ?? String(Date.now()),
2951
+ type: "ACTIVITY_TYPE_UPDATE_USER_TAG",
2952
+ };
2953
+ const stringifiedBody = JSON.stringify(bodyWithType);
2954
+ const stamp = await this.stamper.stamp(stringifiedBody);
2955
+ return {
2956
+ body: stringifiedBody,
2957
+ stamp: stamp,
2958
+ url: fullUrl,
2959
+ };
2960
+ };
2961
+ this.updateWallet = async (input) => {
2962
+ const { organizationId, timestampMs, ...rest } = input;
2963
+ return this.command("/public/v1/submit/update_wallet", {
2964
+ parameters: rest,
2965
+ organizationId: organizationId ?? this.config.organizationId,
2966
+ timestampMs: timestampMs ?? String(Date.now()),
2967
+ type: "ACTIVITY_TYPE_UPDATE_WALLET",
2968
+ }, "updateWalletResult");
2969
+ };
2970
+ this.stampUpdateWallet = async (input) => {
2971
+ if (!this.stamper) {
2972
+ return undefined;
2973
+ }
2974
+ const { organizationId, timestampMs, ...parameters } = input;
2975
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/update_wallet";
2976
+ const bodyWithType = {
2977
+ parameters,
2978
+ organizationId: organizationId ?? this.config.organizationId,
2979
+ timestampMs: timestampMs ?? String(Date.now()),
2980
+ type: "ACTIVITY_TYPE_UPDATE_WALLET",
2981
+ };
2982
+ const stringifiedBody = JSON.stringify(bodyWithType);
2983
+ const stamp = await this.stamper.stamp(stringifiedBody);
2984
+ return {
2985
+ body: stringifiedBody,
2986
+ stamp: stamp,
2987
+ url: fullUrl,
2988
+ };
2989
+ };
2990
+ this.verifyOtp = async (input) => {
2991
+ const { organizationId, timestampMs, ...rest } = input;
2992
+ return this.command("/public/v1/submit/verify_otp", {
2993
+ parameters: rest,
2994
+ organizationId: organizationId ?? this.config.organizationId,
2995
+ timestampMs: timestampMs ?? String(Date.now()),
2996
+ type: "ACTIVITY_TYPE_VERIFY_OTP",
2997
+ }, "verifyOtpResult");
2998
+ };
2999
+ this.stampVerifyOtp = async (input) => {
3000
+ if (!this.stamper) {
3001
+ return undefined;
3002
+ }
3003
+ const { organizationId, timestampMs, ...parameters } = input;
3004
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/verify_otp";
3005
+ const bodyWithType = {
3006
+ parameters,
3007
+ organizationId: organizationId ?? this.config.organizationId,
3008
+ timestampMs: timestampMs ?? String(Date.now()),
3009
+ type: "ACTIVITY_TYPE_VERIFY_OTP",
3010
+ };
3011
+ const stringifiedBody = JSON.stringify(bodyWithType);
3012
+ const stamp = await this.stamper.stamp(stringifiedBody);
3013
+ return {
3014
+ body: stringifiedBody,
3015
+ stamp: stamp,
3016
+ url: fullUrl,
3017
+ };
3018
+ };
3019
+ this.config = config;
3020
+ this.stamper = config.stamper;
3021
+ }
3022
+ async request(url, body) {
3023
+ const fullUrl = this.config.apiBaseUrl + url;
3024
+ const stringifiedBody = JSON.stringify(body);
3025
+ const stamp = await this.stamper.stamp(stringifiedBody);
3026
+ const response = await fetch(fullUrl, {
3027
+ method: "POST",
3028
+ headers: {
3029
+ [stamp.stampHeaderName]: stamp.stampHeaderValue,
3030
+ "Content-Type": "application/json",
3031
+ "X-Client-Version": version.VERSION,
3032
+ },
3033
+ body: stringifiedBody,
3034
+ redirect: "follow",
3035
+ });
3036
+ if (!response.ok) {
3037
+ let res;
3038
+ try {
3039
+ res = await response.json();
3040
+ }
3041
+ catch (_) {
3042
+ throw new Error(`${response.status} ${response.statusText}`);
3043
+ }
3044
+ throw new base.ZeroXKeyRequestError(res);
3045
+ }
3046
+ const data = await response.json();
3047
+ return data;
3048
+ }
3049
+ async command(url, body, resultKey) {
3050
+ const pollingDuration = this.config.activityPoller?.intervalMs ?? 1000;
3051
+ const maxRetries = this.config.activityPoller?.numRetries ?? 3;
3052
+ const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
3053
+ const handleResponse = (activityData) => {
3054
+ const { result, status } = activityData.activity;
3055
+ if (status === "ACTIVITY_STATUS_COMPLETED") {
3056
+ return {
3057
+ ...result[`${resultKey}`],
3058
+ ...activityData,
3059
+ };
3060
+ }
3061
+ return activityData;
3062
+ };
3063
+ let attempts = 0;
3064
+ const pollStatus = async (activityId, organizationId) => {
3065
+ const pollBody = { activityId, organizationId };
3066
+ const pollData = (await this.getActivity(pollBody));
3067
+ if (attempts > maxRetries) {
3068
+ return handleResponse(pollData);
3069
+ }
3070
+ attempts += 1;
3071
+ if (!http.TERMINAL_ACTIVITY_STATUSES.includes(pollData.activity.status)) {
3072
+ await sleep(pollingDuration);
3073
+ return pollStatus(activityId, organizationId);
3074
+ }
3075
+ return handleResponse(pollData);
3076
+ };
3077
+ const responseData = (await this.request(url, body));
3078
+ if (!http.TERMINAL_ACTIVITY_STATUSES.includes(responseData.activity.status)) {
3079
+ return pollStatus(responseData.activity.id, responseData.activity.organizationId);
3080
+ }
3081
+ return handleResponse(responseData);
3082
+ }
3083
+ async activityDecision(url, body) {
3084
+ const activityData = (await this.request(url, body));
3085
+ return {
3086
+ ...activityData["activity"]["result"],
3087
+ ...activityData,
3088
+ };
3089
+ }
3090
+ }
3091
+
3092
+ exports.ZeroXKeySDKClientBase = ZeroXKeySDKClientBase;
3093
+ //# sourceMappingURL=sdk-client-base.js.map