@turnkey/core 1.0.0-beta.2 → 1.0.0-beta.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/__clients__/core.d.ts +92 -9
- package/dist/__clients__/core.d.ts.map +1 -1
- package/dist/__clients__/core.js +699 -535
- package/dist/__clients__/core.js.map +1 -1
- package/dist/__clients__/core.mjs +702 -538
- package/dist/__clients__/core.mjs.map +1 -1
- package/dist/__generated__/sdk-client-base.d.ts +1 -1
- package/dist/__generated__/sdk-client-base.d.ts.map +1 -1
- package/dist/__generated__/sdk-client-base.js +156 -253
- package/dist/__generated__/sdk-client-base.js.map +1 -1
- package/dist/__generated__/sdk-client-base.mjs +156 -253
- package/dist/__generated__/sdk-client-base.mjs.map +1 -1
- package/dist/__generated__/version.d.ts +1 -1
- package/dist/__generated__/version.js +1 -1
- package/dist/__generated__/version.mjs +1 -1
- package/dist/__inputs__/public_api.types.d.ts +377 -504
- package/dist/__inputs__/public_api.types.d.ts.map +1 -1
- package/dist/__types__/base.d.ts +193 -75
- package/dist/__types__/base.d.ts.map +1 -1
- package/dist/__types__/base.js +14 -13
- package/dist/__types__/base.js.map +1 -1
- package/dist/__types__/base.mjs +15 -14
- package/dist/__types__/base.mjs.map +1 -1
- package/dist/__wallet__/base.d.ts +11 -0
- package/dist/__wallet__/base.d.ts.map +1 -1
- package/dist/__wallet__/base.js +12 -1
- package/dist/__wallet__/base.js.map +1 -1
- package/dist/__wallet__/base.mjs +12 -1
- package/dist/__wallet__/base.mjs.map +1 -1
- package/dist/__wallet__/connector.d.ts +31 -4
- package/dist/__wallet__/connector.d.ts.map +1 -1
- package/dist/__wallet__/connector.js +35 -5
- package/dist/__wallet__/connector.js.map +1 -1
- package/dist/__wallet__/connector.mjs +35 -5
- package/dist/__wallet__/connector.mjs.map +1 -1
- package/dist/__wallet__/mobile/manager.d.ts +21 -5
- package/dist/__wallet__/mobile/manager.d.ts.map +1 -1
- package/dist/__wallet__/mobile/manager.js +28 -11
- package/dist/__wallet__/mobile/manager.js.map +1 -1
- package/dist/__wallet__/mobile/manager.mjs +28 -11
- package/dist/__wallet__/mobile/manager.mjs.map +1 -1
- package/dist/__wallet__/stamper.d.ts +73 -2
- package/dist/__wallet__/stamper.d.ts.map +1 -1
- package/dist/__wallet__/stamper.js +81 -15
- package/dist/__wallet__/stamper.js.map +1 -1
- package/dist/__wallet__/stamper.mjs +82 -16
- package/dist/__wallet__/stamper.mjs.map +1 -1
- package/dist/__wallet__/wallet-connect/base.d.ts +102 -19
- package/dist/__wallet__/wallet-connect/base.d.ts.map +1 -1
- package/dist/__wallet__/wallet-connect/base.js +198 -77
- package/dist/__wallet__/wallet-connect/base.js.map +1 -1
- package/dist/__wallet__/wallet-connect/base.mjs +198 -77
- package/dist/__wallet__/wallet-connect/base.mjs.map +1 -1
- package/dist/__wallet__/wallet-connect/client.d.ts +50 -17
- package/dist/__wallet__/wallet-connect/client.d.ts.map +1 -1
- package/dist/__wallet__/wallet-connect/client.js +76 -19
- package/dist/__wallet__/wallet-connect/client.js.map +1 -1
- package/dist/__wallet__/wallet-connect/client.mjs +76 -19
- package/dist/__wallet__/wallet-connect/client.mjs.map +1 -1
- package/dist/__wallet__/web/manager.d.ts +20 -12
- package/dist/__wallet__/web/manager.d.ts.map +1 -1
- package/dist/__wallet__/web/manager.js +29 -21
- package/dist/__wallet__/web/manager.js.map +1 -1
- package/dist/__wallet__/web/manager.mjs +29 -21
- package/dist/__wallet__/web/manager.mjs.map +1 -1
- package/dist/__wallet__/web/native/ethereum.d.ts +45 -11
- package/dist/__wallet__/web/native/ethereum.d.ts.map +1 -1
- package/dist/__wallet__/web/native/ethereum.js +58 -17
- package/dist/__wallet__/web/native/ethereum.js.map +1 -1
- package/dist/__wallet__/web/native/ethereum.mjs +58 -17
- package/dist/__wallet__/web/native/ethereum.mjs.map +1 -1
- package/dist/__wallet__/web/native/solana.d.ts +56 -3
- package/dist/__wallet__/web/native/solana.d.ts.map +1 -1
- package/dist/__wallet__/web/native/solana.js +95 -36
- package/dist/__wallet__/web/native/solana.js.map +1 -1
- package/dist/__wallet__/web/native/solana.mjs +95 -36
- package/dist/__wallet__/web/native/solana.mjs.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -10
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/utils.d.ts +59 -13
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +105 -30
- package/dist/utils.js.map +1 -1
- package/dist/utils.mjs +103 -29
- package/dist/utils.mjs.map +1 -1
- package/package.json +8 -8
|
@@ -2,14 +2,12 @@ import { TERMINAL_ACTIVITY_STATUSES } from '@turnkey/http';
|
|
|
2
2
|
import { StamperType, TurnkeyRequestError } from '../__types__/base.mjs';
|
|
3
3
|
import { VERSION } from './version.mjs';
|
|
4
4
|
import { TurnkeyError, TurnkeyErrorCodes } from '@turnkey/sdk-types';
|
|
5
|
-
import { parseSession } from '../utils.mjs';
|
|
6
5
|
|
|
7
6
|
/* @generated by codegen. DO NOT EDIT BY HAND */
|
|
8
7
|
class TurnkeySDKClientBase {
|
|
9
8
|
constructor(config) {
|
|
10
9
|
this.getActivity = async (input, stampWith) => {
|
|
11
|
-
|
|
12
|
-
session = parseSession(session); // TODO (Amir): We may not need this anymore since we want to store the full session object in storage
|
|
10
|
+
const session = await this.storageManager?.getActiveSession();
|
|
13
11
|
return this.request("/public/v1/query/get_activity", {
|
|
14
12
|
...input,
|
|
15
13
|
organizationId: input.organizationId ??
|
|
@@ -38,8 +36,7 @@ class TurnkeySDKClientBase {
|
|
|
38
36
|
};
|
|
39
37
|
};
|
|
40
38
|
this.getApiKey = async (input, stampWith) => {
|
|
41
|
-
|
|
42
|
-
session = parseSession(session); // TODO (Amir): We may not need this anymore since we want to store the full session object in storage
|
|
39
|
+
const session = await this.storageManager?.getActiveSession();
|
|
43
40
|
return this.request("/public/v1/query/get_api_key", {
|
|
44
41
|
...input,
|
|
45
42
|
organizationId: input.organizationId ??
|
|
@@ -68,8 +65,7 @@ class TurnkeySDKClientBase {
|
|
|
68
65
|
};
|
|
69
66
|
};
|
|
70
67
|
this.getApiKeys = async (input = {}, stampWith) => {
|
|
71
|
-
|
|
72
|
-
session = parseSession(session); // TODO (Amir): We may not need this anymore since we want to store the full session object in storage
|
|
68
|
+
const session = await this.storageManager?.getActiveSession();
|
|
73
69
|
return this.request("/public/v1/query/get_api_keys", {
|
|
74
70
|
...input,
|
|
75
71
|
organizationId: input.organizationId ??
|
|
@@ -98,8 +94,7 @@ class TurnkeySDKClientBase {
|
|
|
98
94
|
};
|
|
99
95
|
};
|
|
100
96
|
this.getAttestationDocument = async (input, stampWith) => {
|
|
101
|
-
|
|
102
|
-
session = parseSession(session); // TODO (Amir): We may not need this anymore since we want to store the full session object in storage
|
|
97
|
+
const session = await this.storageManager?.getActiveSession();
|
|
103
98
|
return this.request("/public/v1/query/get_attestation", {
|
|
104
99
|
...input,
|
|
105
100
|
organizationId: input.organizationId ??
|
|
@@ -128,8 +123,7 @@ class TurnkeySDKClientBase {
|
|
|
128
123
|
};
|
|
129
124
|
};
|
|
130
125
|
this.getAuthenticator = async (input, stampWith) => {
|
|
131
|
-
|
|
132
|
-
session = parseSession(session); // TODO (Amir): We may not need this anymore since we want to store the full session object in storage
|
|
126
|
+
const session = await this.storageManager?.getActiveSession();
|
|
133
127
|
return this.request("/public/v1/query/get_authenticator", {
|
|
134
128
|
...input,
|
|
135
129
|
organizationId: input.organizationId ??
|
|
@@ -158,8 +152,7 @@ class TurnkeySDKClientBase {
|
|
|
158
152
|
};
|
|
159
153
|
};
|
|
160
154
|
this.getAuthenticators = async (input, stampWith) => {
|
|
161
|
-
|
|
162
|
-
session = parseSession(session); // TODO (Amir): We may not need this anymore since we want to store the full session object in storage
|
|
155
|
+
const session = await this.storageManager?.getActiveSession();
|
|
163
156
|
return this.request("/public/v1/query/get_authenticators", {
|
|
164
157
|
...input,
|
|
165
158
|
organizationId: input.organizationId ??
|
|
@@ -188,8 +181,7 @@ class TurnkeySDKClientBase {
|
|
|
188
181
|
};
|
|
189
182
|
};
|
|
190
183
|
this.getOauthProviders = async (input, stampWith) => {
|
|
191
|
-
|
|
192
|
-
session = parseSession(session); // TODO (Amir): We may not need this anymore since we want to store the full session object in storage
|
|
184
|
+
const session = await this.storageManager?.getActiveSession();
|
|
193
185
|
return this.request("/public/v1/query/get_oauth_providers", {
|
|
194
186
|
...input,
|
|
195
187
|
organizationId: input.organizationId ??
|
|
@@ -218,8 +210,7 @@ class TurnkeySDKClientBase {
|
|
|
218
210
|
};
|
|
219
211
|
};
|
|
220
212
|
this.getOrganization = async (input = {}, stampWith) => {
|
|
221
|
-
|
|
222
|
-
session = parseSession(session); // TODO (Amir): We may not need this anymore since we want to store the full session object in storage
|
|
213
|
+
const session = await this.storageManager?.getActiveSession();
|
|
223
214
|
return this.request("/public/v1/query/get_organization", {
|
|
224
215
|
...input,
|
|
225
216
|
organizationId: input.organizationId ??
|
|
@@ -248,8 +239,7 @@ class TurnkeySDKClientBase {
|
|
|
248
239
|
};
|
|
249
240
|
};
|
|
250
241
|
this.getOrganizationConfigs = async (input, stampWith) => {
|
|
251
|
-
|
|
252
|
-
session = parseSession(session); // TODO (Amir): We may not need this anymore since we want to store the full session object in storage
|
|
242
|
+
const session = await this.storageManager?.getActiveSession();
|
|
253
243
|
return this.request("/public/v1/query/get_organization_configs", {
|
|
254
244
|
...input,
|
|
255
245
|
organizationId: input.organizationId ??
|
|
@@ -278,8 +268,7 @@ class TurnkeySDKClientBase {
|
|
|
278
268
|
};
|
|
279
269
|
};
|
|
280
270
|
this.getPolicy = async (input, stampWith) => {
|
|
281
|
-
|
|
282
|
-
session = parseSession(session); // TODO (Amir): We may not need this anymore since we want to store the full session object in storage
|
|
271
|
+
const session = await this.storageManager?.getActiveSession();
|
|
283
272
|
return this.request("/public/v1/query/get_policy", {
|
|
284
273
|
...input,
|
|
285
274
|
organizationId: input.organizationId ??
|
|
@@ -308,8 +297,7 @@ class TurnkeySDKClientBase {
|
|
|
308
297
|
};
|
|
309
298
|
};
|
|
310
299
|
this.getPolicyEvaluations = async (input, stampWith) => {
|
|
311
|
-
|
|
312
|
-
session = parseSession(session); // TODO (Amir): We may not need this anymore since we want to store the full session object in storage
|
|
300
|
+
const session = await this.storageManager?.getActiveSession();
|
|
313
301
|
return this.request("/public/v1/query/get_policy_evaluations", {
|
|
314
302
|
...input,
|
|
315
303
|
organizationId: input.organizationId ??
|
|
@@ -338,8 +326,7 @@ class TurnkeySDKClientBase {
|
|
|
338
326
|
};
|
|
339
327
|
};
|
|
340
328
|
this.getPrivateKey = async (input, stampWith) => {
|
|
341
|
-
|
|
342
|
-
session = parseSession(session); // TODO (Amir): We may not need this anymore since we want to store the full session object in storage
|
|
329
|
+
const session = await this.storageManager?.getActiveSession();
|
|
343
330
|
return this.request("/public/v1/query/get_private_key", {
|
|
344
331
|
...input,
|
|
345
332
|
organizationId: input.organizationId ??
|
|
@@ -368,8 +355,7 @@ class TurnkeySDKClientBase {
|
|
|
368
355
|
};
|
|
369
356
|
};
|
|
370
357
|
this.getSmartContractInterface = async (input, stampWith) => {
|
|
371
|
-
|
|
372
|
-
session = parseSession(session); // TODO (Amir): We may not need this anymore since we want to store the full session object in storage
|
|
358
|
+
const session = await this.storageManager?.getActiveSession();
|
|
373
359
|
return this.request("/public/v1/query/get_smart_contract_interface", {
|
|
374
360
|
...input,
|
|
375
361
|
organizationId: input.organizationId ??
|
|
@@ -398,8 +384,7 @@ class TurnkeySDKClientBase {
|
|
|
398
384
|
};
|
|
399
385
|
};
|
|
400
386
|
this.getUser = async (input, stampWith) => {
|
|
401
|
-
|
|
402
|
-
session = parseSession(session); // TODO (Amir): We may not need this anymore since we want to store the full session object in storage
|
|
387
|
+
const session = await this.storageManager?.getActiveSession();
|
|
403
388
|
return this.request("/public/v1/query/get_user", {
|
|
404
389
|
...input,
|
|
405
390
|
organizationId: input.organizationId ??
|
|
@@ -428,8 +413,7 @@ class TurnkeySDKClientBase {
|
|
|
428
413
|
};
|
|
429
414
|
};
|
|
430
415
|
this.getWallet = async (input, stampWith) => {
|
|
431
|
-
|
|
432
|
-
session = parseSession(session); // TODO (Amir): We may not need this anymore since we want to store the full session object in storage
|
|
416
|
+
const session = await this.storageManager?.getActiveSession();
|
|
433
417
|
return this.request("/public/v1/query/get_wallet", {
|
|
434
418
|
...input,
|
|
435
419
|
organizationId: input.organizationId ??
|
|
@@ -458,8 +442,7 @@ class TurnkeySDKClientBase {
|
|
|
458
442
|
};
|
|
459
443
|
};
|
|
460
444
|
this.getWalletAccount = async (input, stampWith) => {
|
|
461
|
-
|
|
462
|
-
session = parseSession(session); // TODO (Amir): We may not need this anymore since we want to store the full session object in storage
|
|
445
|
+
const session = await this.storageManager?.getActiveSession();
|
|
463
446
|
return this.request("/public/v1/query/get_wallet_account", {
|
|
464
447
|
...input,
|
|
465
448
|
organizationId: input.organizationId ??
|
|
@@ -488,8 +471,7 @@ class TurnkeySDKClientBase {
|
|
|
488
471
|
};
|
|
489
472
|
};
|
|
490
473
|
this.getActivities = async (input = {}, stampWith) => {
|
|
491
|
-
|
|
492
|
-
session = parseSession(session); // TODO (Amir): We may not need this anymore since we want to store the full session object in storage
|
|
474
|
+
const session = await this.storageManager?.getActiveSession();
|
|
493
475
|
return this.request("/public/v1/query/list_activities", {
|
|
494
476
|
...input,
|
|
495
477
|
organizationId: input.organizationId ??
|
|
@@ -518,8 +500,7 @@ class TurnkeySDKClientBase {
|
|
|
518
500
|
};
|
|
519
501
|
};
|
|
520
502
|
this.getPolicies = async (input = {}, stampWith) => {
|
|
521
|
-
|
|
522
|
-
session = parseSession(session); // TODO (Amir): We may not need this anymore since we want to store the full session object in storage
|
|
503
|
+
const session = await this.storageManager?.getActiveSession();
|
|
523
504
|
return this.request("/public/v1/query/list_policies", {
|
|
524
505
|
...input,
|
|
525
506
|
organizationId: input.organizationId ??
|
|
@@ -548,8 +529,7 @@ class TurnkeySDKClientBase {
|
|
|
548
529
|
};
|
|
549
530
|
};
|
|
550
531
|
this.listPrivateKeyTags = async (input, stampWith) => {
|
|
551
|
-
|
|
552
|
-
session = parseSession(session); // TODO (Amir): We may not need this anymore since we want to store the full session object in storage
|
|
532
|
+
const session = await this.storageManager?.getActiveSession();
|
|
553
533
|
return this.request("/public/v1/query/list_private_key_tags", {
|
|
554
534
|
...input,
|
|
555
535
|
organizationId: input.organizationId ??
|
|
@@ -578,8 +558,7 @@ class TurnkeySDKClientBase {
|
|
|
578
558
|
};
|
|
579
559
|
};
|
|
580
560
|
this.getPrivateKeys = async (input = {}, stampWith) => {
|
|
581
|
-
|
|
582
|
-
session = parseSession(session); // TODO (Amir): We may not need this anymore since we want to store the full session object in storage
|
|
561
|
+
const session = await this.storageManager?.getActiveSession();
|
|
583
562
|
return this.request("/public/v1/query/list_private_keys", {
|
|
584
563
|
...input,
|
|
585
564
|
organizationId: input.organizationId ??
|
|
@@ -608,8 +587,7 @@ class TurnkeySDKClientBase {
|
|
|
608
587
|
};
|
|
609
588
|
};
|
|
610
589
|
this.getSmartContractInterfaces = async (input, stampWith) => {
|
|
611
|
-
|
|
612
|
-
session = parseSession(session); // TODO (Amir): We may not need this anymore since we want to store the full session object in storage
|
|
590
|
+
const session = await this.storageManager?.getActiveSession();
|
|
613
591
|
return this.request("/public/v1/query/list_smart_contract_interfaces", {
|
|
614
592
|
...input,
|
|
615
593
|
organizationId: input.organizationId ??
|
|
@@ -639,8 +617,7 @@ class TurnkeySDKClientBase {
|
|
|
639
617
|
};
|
|
640
618
|
};
|
|
641
619
|
this.getSubOrgIds = async (input = {}, stampWith) => {
|
|
642
|
-
|
|
643
|
-
session = parseSession(session); // TODO (Amir): We may not need this anymore since we want to store the full session object in storage
|
|
620
|
+
const session = await this.storageManager?.getActiveSession();
|
|
644
621
|
return this.request("/public/v1/query/list_suborgs", {
|
|
645
622
|
...input,
|
|
646
623
|
organizationId: input.organizationId ??
|
|
@@ -669,8 +646,7 @@ class TurnkeySDKClientBase {
|
|
|
669
646
|
};
|
|
670
647
|
};
|
|
671
648
|
this.listUserTags = async (input = {}, stampWith) => {
|
|
672
|
-
|
|
673
|
-
session = parseSession(session); // TODO (Amir): We may not need this anymore since we want to store the full session object in storage
|
|
649
|
+
const session = await this.storageManager?.getActiveSession();
|
|
674
650
|
return this.request("/public/v1/query/list_user_tags", {
|
|
675
651
|
...input,
|
|
676
652
|
organizationId: input.organizationId ??
|
|
@@ -699,8 +675,7 @@ class TurnkeySDKClientBase {
|
|
|
699
675
|
};
|
|
700
676
|
};
|
|
701
677
|
this.getUsers = async (input = {}, stampWith) => {
|
|
702
|
-
|
|
703
|
-
session = parseSession(session); // TODO (Amir): We may not need this anymore since we want to store the full session object in storage
|
|
678
|
+
const session = await this.storageManager?.getActiveSession();
|
|
704
679
|
return this.request("/public/v1/query/list_users", {
|
|
705
680
|
...input,
|
|
706
681
|
organizationId: input.organizationId ??
|
|
@@ -729,8 +704,7 @@ class TurnkeySDKClientBase {
|
|
|
729
704
|
};
|
|
730
705
|
};
|
|
731
706
|
this.getVerifiedSubOrgIds = async (input, stampWith) => {
|
|
732
|
-
|
|
733
|
-
session = parseSession(session); // TODO (Amir): We may not need this anymore since we want to store the full session object in storage
|
|
707
|
+
const session = await this.storageManager?.getActiveSession();
|
|
734
708
|
return this.request("/public/v1/query/list_verified_suborgs", {
|
|
735
709
|
...input,
|
|
736
710
|
organizationId: input.organizationId ??
|
|
@@ -759,8 +733,7 @@ class TurnkeySDKClientBase {
|
|
|
759
733
|
};
|
|
760
734
|
};
|
|
761
735
|
this.getWalletAccounts = async (input, stampWith) => {
|
|
762
|
-
|
|
763
|
-
session = parseSession(session); // TODO (Amir): We may not need this anymore since we want to store the full session object in storage
|
|
736
|
+
const session = await this.storageManager?.getActiveSession();
|
|
764
737
|
return this.request("/public/v1/query/list_wallet_accounts", {
|
|
765
738
|
...input,
|
|
766
739
|
organizationId: input.organizationId ??
|
|
@@ -789,8 +762,7 @@ class TurnkeySDKClientBase {
|
|
|
789
762
|
};
|
|
790
763
|
};
|
|
791
764
|
this.getWallets = async (input = {}, stampWith) => {
|
|
792
|
-
|
|
793
|
-
session = parseSession(session); // TODO (Amir): We may not need this anymore since we want to store the full session object in storage
|
|
765
|
+
const session = await this.storageManager?.getActiveSession();
|
|
794
766
|
return this.request("/public/v1/query/list_wallets", {
|
|
795
767
|
...input,
|
|
796
768
|
organizationId: input.organizationId ??
|
|
@@ -819,8 +791,7 @@ class TurnkeySDKClientBase {
|
|
|
819
791
|
};
|
|
820
792
|
};
|
|
821
793
|
this.getWhoami = async (input = {}, stampWith) => {
|
|
822
|
-
|
|
823
|
-
session = parseSession(session); // TODO (Amir): We may not need this anymore since we want to store the full session object in storage
|
|
794
|
+
const session = await this.storageManager?.getActiveSession();
|
|
824
795
|
return this.request("/public/v1/query/whoami", {
|
|
825
796
|
...input,
|
|
826
797
|
organizationId: input.organizationId ??
|
|
@@ -850,8 +821,7 @@ class TurnkeySDKClientBase {
|
|
|
850
821
|
};
|
|
851
822
|
this.approveActivity = async (input, stampWith) => {
|
|
852
823
|
const { organizationId, timestampMs, ...rest } = input;
|
|
853
|
-
|
|
854
|
-
session = parseSession(session); // TODO (Amir): We may not need this anymore since we want to store the full session object in storage
|
|
824
|
+
const session = await this.storageManager?.getActiveSession();
|
|
855
825
|
return this.activityDecision("/public/v1/submit/approve_activity", {
|
|
856
826
|
parameters: rest,
|
|
857
827
|
organizationId: organizationId ??
|
|
@@ -884,9 +854,8 @@ class TurnkeySDKClientBase {
|
|
|
884
854
|
};
|
|
885
855
|
this.createApiKeys = async (input, stampWith) => {
|
|
886
856
|
const { organizationId, timestampMs, ...rest } = input;
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
return this.command("/public/v1/submit/create_api_keys", {
|
|
857
|
+
const session = await this.storageManager?.getActiveSession();
|
|
858
|
+
return this.activity("/public/v1/submit/create_api_keys", {
|
|
890
859
|
parameters: rest,
|
|
891
860
|
organizationId: organizationId ??
|
|
892
861
|
session?.organizationId ??
|
|
@@ -918,9 +887,8 @@ class TurnkeySDKClientBase {
|
|
|
918
887
|
};
|
|
919
888
|
this.createApiOnlyUsers = async (input, stampWith) => {
|
|
920
889
|
const { organizationId, timestampMs, ...rest } = input;
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
return this.command("/public/v1/submit/create_api_only_users", {
|
|
890
|
+
const session = await this.storageManager?.getActiveSession();
|
|
891
|
+
return this.activity("/public/v1/submit/create_api_only_users", {
|
|
924
892
|
parameters: rest,
|
|
925
893
|
organizationId: organizationId ??
|
|
926
894
|
session?.organizationId ??
|
|
@@ -952,9 +920,8 @@ class TurnkeySDKClientBase {
|
|
|
952
920
|
};
|
|
953
921
|
this.createAuthenticators = async (input, stampWith) => {
|
|
954
922
|
const { organizationId, timestampMs, ...rest } = input;
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
return this.command("/public/v1/submit/create_authenticators", {
|
|
923
|
+
const session = await this.storageManager?.getActiveSession();
|
|
924
|
+
return this.activity("/public/v1/submit/create_authenticators", {
|
|
958
925
|
parameters: rest,
|
|
959
926
|
organizationId: organizationId ??
|
|
960
927
|
session?.organizationId ??
|
|
@@ -986,9 +953,8 @@ class TurnkeySDKClientBase {
|
|
|
986
953
|
};
|
|
987
954
|
this.createInvitations = async (input, stampWith) => {
|
|
988
955
|
const { organizationId, timestampMs, ...rest } = input;
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
return this.command("/public/v1/submit/create_invitations", {
|
|
956
|
+
const session = await this.storageManager?.getActiveSession();
|
|
957
|
+
return this.activity("/public/v1/submit/create_invitations", {
|
|
992
958
|
parameters: rest,
|
|
993
959
|
organizationId: organizationId ??
|
|
994
960
|
session?.organizationId ??
|
|
@@ -1020,9 +986,8 @@ class TurnkeySDKClientBase {
|
|
|
1020
986
|
};
|
|
1021
987
|
this.createOauthProviders = async (input, stampWith) => {
|
|
1022
988
|
const { organizationId, timestampMs, ...rest } = input;
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
return this.command("/public/v1/submit/create_oauth_providers", {
|
|
989
|
+
const session = await this.storageManager?.getActiveSession();
|
|
990
|
+
return this.activity("/public/v1/submit/create_oauth_providers", {
|
|
1026
991
|
parameters: rest,
|
|
1027
992
|
organizationId: organizationId ??
|
|
1028
993
|
session?.organizationId ??
|
|
@@ -1054,9 +1019,8 @@ class TurnkeySDKClientBase {
|
|
|
1054
1019
|
};
|
|
1055
1020
|
this.createPolicies = async (input, stampWith) => {
|
|
1056
1021
|
const { organizationId, timestampMs, ...rest } = input;
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
return this.command("/public/v1/submit/create_policies", {
|
|
1022
|
+
const session = await this.storageManager?.getActiveSession();
|
|
1023
|
+
return this.activity("/public/v1/submit/create_policies", {
|
|
1060
1024
|
parameters: rest,
|
|
1061
1025
|
organizationId: organizationId ??
|
|
1062
1026
|
session?.organizationId ??
|
|
@@ -1088,9 +1052,8 @@ class TurnkeySDKClientBase {
|
|
|
1088
1052
|
};
|
|
1089
1053
|
this.createPolicy = async (input, stampWith) => {
|
|
1090
1054
|
const { organizationId, timestampMs, ...rest } = input;
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
return this.command("/public/v1/submit/create_policy", {
|
|
1055
|
+
const session = await this.storageManager?.getActiveSession();
|
|
1056
|
+
return this.activity("/public/v1/submit/create_policy", {
|
|
1094
1057
|
parameters: rest,
|
|
1095
1058
|
organizationId: organizationId ??
|
|
1096
1059
|
session?.organizationId ??
|
|
@@ -1122,9 +1085,8 @@ class TurnkeySDKClientBase {
|
|
|
1122
1085
|
};
|
|
1123
1086
|
this.createPrivateKeyTag = async (input, stampWith) => {
|
|
1124
1087
|
const { organizationId, timestampMs, ...rest } = input;
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
return this.command("/public/v1/submit/create_private_key_tag", {
|
|
1088
|
+
const session = await this.storageManager?.getActiveSession();
|
|
1089
|
+
return this.activity("/public/v1/submit/create_private_key_tag", {
|
|
1128
1090
|
parameters: rest,
|
|
1129
1091
|
organizationId: organizationId ??
|
|
1130
1092
|
session?.organizationId ??
|
|
@@ -1156,9 +1118,8 @@ class TurnkeySDKClientBase {
|
|
|
1156
1118
|
};
|
|
1157
1119
|
this.createPrivateKeys = async (input, stampWith) => {
|
|
1158
1120
|
const { organizationId, timestampMs, ...rest } = input;
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
return this.command("/public/v1/submit/create_private_keys", {
|
|
1121
|
+
const session = await this.storageManager?.getActiveSession();
|
|
1122
|
+
return this.activity("/public/v1/submit/create_private_keys", {
|
|
1162
1123
|
parameters: rest,
|
|
1163
1124
|
organizationId: organizationId ??
|
|
1164
1125
|
session?.organizationId ??
|
|
@@ -1190,9 +1151,8 @@ class TurnkeySDKClientBase {
|
|
|
1190
1151
|
};
|
|
1191
1152
|
this.createReadOnlySession = async (input, stampWith) => {
|
|
1192
1153
|
const { organizationId, timestampMs, ...rest } = input;
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
return this.command("/public/v1/submit/create_read_only_session", {
|
|
1154
|
+
const session = await this.storageManager?.getActiveSession();
|
|
1155
|
+
return this.activity("/public/v1/submit/create_read_only_session", {
|
|
1196
1156
|
parameters: rest,
|
|
1197
1157
|
organizationId: organizationId ??
|
|
1198
1158
|
session?.organizationId ??
|
|
@@ -1224,9 +1184,8 @@ class TurnkeySDKClientBase {
|
|
|
1224
1184
|
};
|
|
1225
1185
|
this.createReadWriteSession = async (input, stampWith) => {
|
|
1226
1186
|
const { organizationId, timestampMs, ...rest } = input;
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
return this.command("/public/v1/submit/create_read_write_session", {
|
|
1187
|
+
const session = await this.storageManager?.getActiveSession();
|
|
1188
|
+
return this.activity("/public/v1/submit/create_read_write_session", {
|
|
1230
1189
|
parameters: rest,
|
|
1231
1190
|
organizationId: organizationId ??
|
|
1232
1191
|
session?.organizationId ??
|
|
@@ -1258,9 +1217,8 @@ class TurnkeySDKClientBase {
|
|
|
1258
1217
|
};
|
|
1259
1218
|
this.createSmartContractInterface = async (input, stampWith) => {
|
|
1260
1219
|
const { organizationId, timestampMs, ...rest } = input;
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
return this.command("/public/v1/submit/create_smart_contract_interface", {
|
|
1220
|
+
const session = await this.storageManager?.getActiveSession();
|
|
1221
|
+
return this.activity("/public/v1/submit/create_smart_contract_interface", {
|
|
1264
1222
|
parameters: rest,
|
|
1265
1223
|
organizationId: organizationId ??
|
|
1266
1224
|
session?.organizationId ??
|
|
@@ -1293,9 +1251,8 @@ class TurnkeySDKClientBase {
|
|
|
1293
1251
|
};
|
|
1294
1252
|
this.createSubOrganization = async (input, stampWith) => {
|
|
1295
1253
|
const { organizationId, timestampMs, ...rest } = input;
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
return this.command("/public/v1/submit/create_sub_organization", {
|
|
1254
|
+
const session = await this.storageManager?.getActiveSession();
|
|
1255
|
+
return this.activity("/public/v1/submit/create_sub_organization", {
|
|
1299
1256
|
parameters: rest,
|
|
1300
1257
|
organizationId: organizationId ??
|
|
1301
1258
|
session?.organizationId ??
|
|
@@ -1327,9 +1284,8 @@ class TurnkeySDKClientBase {
|
|
|
1327
1284
|
};
|
|
1328
1285
|
this.createUserTag = async (input, stampWith) => {
|
|
1329
1286
|
const { organizationId, timestampMs, ...rest } = input;
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
return this.command("/public/v1/submit/create_user_tag", {
|
|
1287
|
+
const session = await this.storageManager?.getActiveSession();
|
|
1288
|
+
return this.activity("/public/v1/submit/create_user_tag", {
|
|
1333
1289
|
parameters: rest,
|
|
1334
1290
|
organizationId: organizationId ??
|
|
1335
1291
|
session?.organizationId ??
|
|
@@ -1361,9 +1317,8 @@ class TurnkeySDKClientBase {
|
|
|
1361
1317
|
};
|
|
1362
1318
|
this.createUsers = async (input, stampWith) => {
|
|
1363
1319
|
const { organizationId, timestampMs, ...rest } = input;
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
return this.command("/public/v1/submit/create_users", {
|
|
1320
|
+
const session = await this.storageManager?.getActiveSession();
|
|
1321
|
+
return this.activity("/public/v1/submit/create_users", {
|
|
1367
1322
|
parameters: rest,
|
|
1368
1323
|
organizationId: organizationId ??
|
|
1369
1324
|
session?.organizationId ??
|
|
@@ -1395,9 +1350,8 @@ class TurnkeySDKClientBase {
|
|
|
1395
1350
|
};
|
|
1396
1351
|
this.createWallet = async (input, stampWith) => {
|
|
1397
1352
|
const { organizationId, timestampMs, ...rest } = input;
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
return this.command("/public/v1/submit/create_wallet", {
|
|
1353
|
+
const session = await this.storageManager?.getActiveSession();
|
|
1354
|
+
return this.activity("/public/v1/submit/create_wallet", {
|
|
1401
1355
|
parameters: rest,
|
|
1402
1356
|
organizationId: organizationId ??
|
|
1403
1357
|
session?.organizationId ??
|
|
@@ -1429,9 +1383,8 @@ class TurnkeySDKClientBase {
|
|
|
1429
1383
|
};
|
|
1430
1384
|
this.createWalletAccounts = async (input, stampWith) => {
|
|
1431
1385
|
const { organizationId, timestampMs, ...rest } = input;
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
return this.command("/public/v1/submit/create_wallet_accounts", {
|
|
1386
|
+
const session = await this.storageManager?.getActiveSession();
|
|
1387
|
+
return this.activity("/public/v1/submit/create_wallet_accounts", {
|
|
1435
1388
|
parameters: rest,
|
|
1436
1389
|
organizationId: organizationId ??
|
|
1437
1390
|
session?.organizationId ??
|
|
@@ -1463,9 +1416,8 @@ class TurnkeySDKClientBase {
|
|
|
1463
1416
|
};
|
|
1464
1417
|
this.deleteApiKeys = async (input, stampWith) => {
|
|
1465
1418
|
const { organizationId, timestampMs, ...rest } = input;
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
return this.command("/public/v1/submit/delete_api_keys", {
|
|
1419
|
+
const session = await this.storageManager?.getActiveSession();
|
|
1420
|
+
return this.activity("/public/v1/submit/delete_api_keys", {
|
|
1469
1421
|
parameters: rest,
|
|
1470
1422
|
organizationId: organizationId ??
|
|
1471
1423
|
session?.organizationId ??
|
|
@@ -1497,9 +1449,8 @@ class TurnkeySDKClientBase {
|
|
|
1497
1449
|
};
|
|
1498
1450
|
this.deleteAuthenticators = async (input, stampWith) => {
|
|
1499
1451
|
const { organizationId, timestampMs, ...rest } = input;
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
return this.command("/public/v1/submit/delete_authenticators", {
|
|
1452
|
+
const session = await this.storageManager?.getActiveSession();
|
|
1453
|
+
return this.activity("/public/v1/submit/delete_authenticators", {
|
|
1503
1454
|
parameters: rest,
|
|
1504
1455
|
organizationId: organizationId ??
|
|
1505
1456
|
session?.organizationId ??
|
|
@@ -1531,9 +1482,8 @@ class TurnkeySDKClientBase {
|
|
|
1531
1482
|
};
|
|
1532
1483
|
this.deleteInvitation = async (input, stampWith) => {
|
|
1533
1484
|
const { organizationId, timestampMs, ...rest } = input;
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
return this.command("/public/v1/submit/delete_invitation", {
|
|
1485
|
+
const session = await this.storageManager?.getActiveSession();
|
|
1486
|
+
return this.activity("/public/v1/submit/delete_invitation", {
|
|
1537
1487
|
parameters: rest,
|
|
1538
1488
|
organizationId: organizationId ??
|
|
1539
1489
|
session?.organizationId ??
|
|
@@ -1565,9 +1515,8 @@ class TurnkeySDKClientBase {
|
|
|
1565
1515
|
};
|
|
1566
1516
|
this.deleteOauthProviders = async (input, stampWith) => {
|
|
1567
1517
|
const { organizationId, timestampMs, ...rest } = input;
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
return this.command("/public/v1/submit/delete_oauth_providers", {
|
|
1518
|
+
const session = await this.storageManager?.getActiveSession();
|
|
1519
|
+
return this.activity("/public/v1/submit/delete_oauth_providers", {
|
|
1571
1520
|
parameters: rest,
|
|
1572
1521
|
organizationId: organizationId ??
|
|
1573
1522
|
session?.organizationId ??
|
|
@@ -1599,9 +1548,8 @@ class TurnkeySDKClientBase {
|
|
|
1599
1548
|
};
|
|
1600
1549
|
this.deletePolicy = async (input, stampWith) => {
|
|
1601
1550
|
const { organizationId, timestampMs, ...rest } = input;
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
return this.command("/public/v1/submit/delete_policy", {
|
|
1551
|
+
const session = await this.storageManager?.getActiveSession();
|
|
1552
|
+
return this.activity("/public/v1/submit/delete_policy", {
|
|
1605
1553
|
parameters: rest,
|
|
1606
1554
|
organizationId: organizationId ??
|
|
1607
1555
|
session?.organizationId ??
|
|
@@ -1633,9 +1581,8 @@ class TurnkeySDKClientBase {
|
|
|
1633
1581
|
};
|
|
1634
1582
|
this.deletePrivateKeyTags = async (input, stampWith) => {
|
|
1635
1583
|
const { organizationId, timestampMs, ...rest } = input;
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
return this.command("/public/v1/submit/delete_private_key_tags", {
|
|
1584
|
+
const session = await this.storageManager?.getActiveSession();
|
|
1585
|
+
return this.activity("/public/v1/submit/delete_private_key_tags", {
|
|
1639
1586
|
parameters: rest,
|
|
1640
1587
|
organizationId: organizationId ??
|
|
1641
1588
|
session?.organizationId ??
|
|
@@ -1667,9 +1614,8 @@ class TurnkeySDKClientBase {
|
|
|
1667
1614
|
};
|
|
1668
1615
|
this.deletePrivateKeys = async (input, stampWith) => {
|
|
1669
1616
|
const { organizationId, timestampMs, ...rest } = input;
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
return this.command("/public/v1/submit/delete_private_keys", {
|
|
1617
|
+
const session = await this.storageManager?.getActiveSession();
|
|
1618
|
+
return this.activity("/public/v1/submit/delete_private_keys", {
|
|
1673
1619
|
parameters: rest,
|
|
1674
1620
|
organizationId: organizationId ??
|
|
1675
1621
|
session?.organizationId ??
|
|
@@ -1701,9 +1647,8 @@ class TurnkeySDKClientBase {
|
|
|
1701
1647
|
};
|
|
1702
1648
|
this.deleteSmartContractInterface = async (input, stampWith) => {
|
|
1703
1649
|
const { organizationId, timestampMs, ...rest } = input;
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
return this.command("/public/v1/submit/delete_smart_contract_interface", {
|
|
1650
|
+
const session = await this.storageManager?.getActiveSession();
|
|
1651
|
+
return this.activity("/public/v1/submit/delete_smart_contract_interface", {
|
|
1707
1652
|
parameters: rest,
|
|
1708
1653
|
organizationId: organizationId ??
|
|
1709
1654
|
session?.organizationId ??
|
|
@@ -1736,9 +1681,8 @@ class TurnkeySDKClientBase {
|
|
|
1736
1681
|
};
|
|
1737
1682
|
this.deleteSubOrganization = async (input, stampWith) => {
|
|
1738
1683
|
const { organizationId, timestampMs, ...rest } = input;
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
return this.command("/public/v1/submit/delete_sub_organization", {
|
|
1684
|
+
const session = await this.storageManager?.getActiveSession();
|
|
1685
|
+
return this.activity("/public/v1/submit/delete_sub_organization", {
|
|
1742
1686
|
parameters: rest,
|
|
1743
1687
|
organizationId: organizationId ??
|
|
1744
1688
|
session?.organizationId ??
|
|
@@ -1770,9 +1714,8 @@ class TurnkeySDKClientBase {
|
|
|
1770
1714
|
};
|
|
1771
1715
|
this.deleteUserTags = async (input, stampWith) => {
|
|
1772
1716
|
const { organizationId, timestampMs, ...rest } = input;
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
return this.command("/public/v1/submit/delete_user_tags", {
|
|
1717
|
+
const session = await this.storageManager?.getActiveSession();
|
|
1718
|
+
return this.activity("/public/v1/submit/delete_user_tags", {
|
|
1776
1719
|
parameters: rest,
|
|
1777
1720
|
organizationId: organizationId ??
|
|
1778
1721
|
session?.organizationId ??
|
|
@@ -1804,9 +1747,8 @@ class TurnkeySDKClientBase {
|
|
|
1804
1747
|
};
|
|
1805
1748
|
this.deleteUsers = async (input, stampWith) => {
|
|
1806
1749
|
const { organizationId, timestampMs, ...rest } = input;
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
return this.command("/public/v1/submit/delete_users", {
|
|
1750
|
+
const session = await this.storageManager?.getActiveSession();
|
|
1751
|
+
return this.activity("/public/v1/submit/delete_users", {
|
|
1810
1752
|
parameters: rest,
|
|
1811
1753
|
organizationId: organizationId ??
|
|
1812
1754
|
session?.organizationId ??
|
|
@@ -1838,9 +1780,8 @@ class TurnkeySDKClientBase {
|
|
|
1838
1780
|
};
|
|
1839
1781
|
this.deleteWallets = async (input, stampWith) => {
|
|
1840
1782
|
const { organizationId, timestampMs, ...rest } = input;
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
return this.command("/public/v1/submit/delete_wallets", {
|
|
1783
|
+
const session = await this.storageManager?.getActiveSession();
|
|
1784
|
+
return this.activity("/public/v1/submit/delete_wallets", {
|
|
1844
1785
|
parameters: rest,
|
|
1845
1786
|
organizationId: organizationId ??
|
|
1846
1787
|
session?.organizationId ??
|
|
@@ -1872,9 +1813,8 @@ class TurnkeySDKClientBase {
|
|
|
1872
1813
|
};
|
|
1873
1814
|
this.emailAuth = async (input, stampWith) => {
|
|
1874
1815
|
const { organizationId, timestampMs, ...rest } = input;
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
return this.command("/public/v1/submit/email_auth", {
|
|
1816
|
+
const session = await this.storageManager?.getActiveSession();
|
|
1817
|
+
return this.activity("/public/v1/submit/email_auth", {
|
|
1878
1818
|
parameters: rest,
|
|
1879
1819
|
organizationId: organizationId ??
|
|
1880
1820
|
session?.organizationId ??
|
|
@@ -1906,9 +1846,8 @@ class TurnkeySDKClientBase {
|
|
|
1906
1846
|
};
|
|
1907
1847
|
this.exportPrivateKey = async (input, stampWith) => {
|
|
1908
1848
|
const { organizationId, timestampMs, ...rest } = input;
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
return this.command("/public/v1/submit/export_private_key", {
|
|
1849
|
+
const session = await this.storageManager?.getActiveSession();
|
|
1850
|
+
return this.activity("/public/v1/submit/export_private_key", {
|
|
1912
1851
|
parameters: rest,
|
|
1913
1852
|
organizationId: organizationId ??
|
|
1914
1853
|
session?.organizationId ??
|
|
@@ -1940,9 +1879,8 @@ class TurnkeySDKClientBase {
|
|
|
1940
1879
|
};
|
|
1941
1880
|
this.exportWallet = async (input, stampWith) => {
|
|
1942
1881
|
const { organizationId, timestampMs, ...rest } = input;
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
return this.command("/public/v1/submit/export_wallet", {
|
|
1882
|
+
const session = await this.storageManager?.getActiveSession();
|
|
1883
|
+
return this.activity("/public/v1/submit/export_wallet", {
|
|
1946
1884
|
parameters: rest,
|
|
1947
1885
|
organizationId: organizationId ??
|
|
1948
1886
|
session?.organizationId ??
|
|
@@ -1974,9 +1912,8 @@ class TurnkeySDKClientBase {
|
|
|
1974
1912
|
};
|
|
1975
1913
|
this.exportWalletAccount = async (input, stampWith) => {
|
|
1976
1914
|
const { organizationId, timestampMs, ...rest } = input;
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
return this.command("/public/v1/submit/export_wallet_account", {
|
|
1915
|
+
const session = await this.storageManager?.getActiveSession();
|
|
1916
|
+
return this.activity("/public/v1/submit/export_wallet_account", {
|
|
1980
1917
|
parameters: rest,
|
|
1981
1918
|
organizationId: organizationId ??
|
|
1982
1919
|
session?.organizationId ??
|
|
@@ -2008,9 +1945,8 @@ class TurnkeySDKClientBase {
|
|
|
2008
1945
|
};
|
|
2009
1946
|
this.importPrivateKey = async (input, stampWith) => {
|
|
2010
1947
|
const { organizationId, timestampMs, ...rest } = input;
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
return this.command("/public/v1/submit/import_private_key", {
|
|
1948
|
+
const session = await this.storageManager?.getActiveSession();
|
|
1949
|
+
return this.activity("/public/v1/submit/import_private_key", {
|
|
2014
1950
|
parameters: rest,
|
|
2015
1951
|
organizationId: organizationId ??
|
|
2016
1952
|
session?.organizationId ??
|
|
@@ -2042,9 +1978,8 @@ class TurnkeySDKClientBase {
|
|
|
2042
1978
|
};
|
|
2043
1979
|
this.importWallet = async (input, stampWith) => {
|
|
2044
1980
|
const { organizationId, timestampMs, ...rest } = input;
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
return this.command("/public/v1/submit/import_wallet", {
|
|
1981
|
+
const session = await this.storageManager?.getActiveSession();
|
|
1982
|
+
return this.activity("/public/v1/submit/import_wallet", {
|
|
2048
1983
|
parameters: rest,
|
|
2049
1984
|
organizationId: organizationId ??
|
|
2050
1985
|
session?.organizationId ??
|
|
@@ -2076,9 +2011,8 @@ class TurnkeySDKClientBase {
|
|
|
2076
2011
|
};
|
|
2077
2012
|
this.initFiatOnRamp = async (input, stampWith) => {
|
|
2078
2013
|
const { organizationId, timestampMs, ...rest } = input;
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
return this.command("/public/v1/submit/init_fiat_on_ramp", {
|
|
2014
|
+
const session = await this.storageManager?.getActiveSession();
|
|
2015
|
+
return this.activity("/public/v1/submit/init_fiat_on_ramp", {
|
|
2082
2016
|
parameters: rest,
|
|
2083
2017
|
organizationId: organizationId ??
|
|
2084
2018
|
session?.organizationId ??
|
|
@@ -2110,9 +2044,8 @@ class TurnkeySDKClientBase {
|
|
|
2110
2044
|
};
|
|
2111
2045
|
this.initImportPrivateKey = async (input, stampWith) => {
|
|
2112
2046
|
const { organizationId, timestampMs, ...rest } = input;
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
return this.command("/public/v1/submit/init_import_private_key", {
|
|
2047
|
+
const session = await this.storageManager?.getActiveSession();
|
|
2048
|
+
return this.activity("/public/v1/submit/init_import_private_key", {
|
|
2116
2049
|
parameters: rest,
|
|
2117
2050
|
organizationId: organizationId ??
|
|
2118
2051
|
session?.organizationId ??
|
|
@@ -2144,9 +2077,8 @@ class TurnkeySDKClientBase {
|
|
|
2144
2077
|
};
|
|
2145
2078
|
this.initImportWallet = async (input, stampWith) => {
|
|
2146
2079
|
const { organizationId, timestampMs, ...rest } = input;
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
return this.command("/public/v1/submit/init_import_wallet", {
|
|
2080
|
+
const session = await this.storageManager?.getActiveSession();
|
|
2081
|
+
return this.activity("/public/v1/submit/init_import_wallet", {
|
|
2150
2082
|
parameters: rest,
|
|
2151
2083
|
organizationId: organizationId ??
|
|
2152
2084
|
session?.organizationId ??
|
|
@@ -2178,9 +2110,8 @@ class TurnkeySDKClientBase {
|
|
|
2178
2110
|
};
|
|
2179
2111
|
this.initOtp = async (input, stampWith) => {
|
|
2180
2112
|
const { organizationId, timestampMs, ...rest } = input;
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
return this.command("/public/v1/submit/init_otp", {
|
|
2113
|
+
const session = await this.storageManager?.getActiveSession();
|
|
2114
|
+
return this.activity("/public/v1/submit/init_otp", {
|
|
2184
2115
|
parameters: rest,
|
|
2185
2116
|
organizationId: organizationId ??
|
|
2186
2117
|
session?.organizationId ??
|
|
@@ -2212,9 +2143,8 @@ class TurnkeySDKClientBase {
|
|
|
2212
2143
|
};
|
|
2213
2144
|
this.initOtpAuth = async (input, stampWith) => {
|
|
2214
2145
|
const { organizationId, timestampMs, ...rest } = input;
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
return this.command("/public/v1/submit/init_otp_auth", {
|
|
2146
|
+
const session = await this.storageManager?.getActiveSession();
|
|
2147
|
+
return this.activity("/public/v1/submit/init_otp_auth", {
|
|
2218
2148
|
parameters: rest,
|
|
2219
2149
|
organizationId: organizationId ??
|
|
2220
2150
|
session?.organizationId ??
|
|
@@ -2246,9 +2176,8 @@ class TurnkeySDKClientBase {
|
|
|
2246
2176
|
};
|
|
2247
2177
|
this.initUserEmailRecovery = async (input, stampWith) => {
|
|
2248
2178
|
const { organizationId, timestampMs, ...rest } = input;
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
return this.command("/public/v1/submit/init_user_email_recovery", {
|
|
2179
|
+
const session = await this.storageManager?.getActiveSession();
|
|
2180
|
+
return this.activity("/public/v1/submit/init_user_email_recovery", {
|
|
2252
2181
|
parameters: rest,
|
|
2253
2182
|
organizationId: organizationId ??
|
|
2254
2183
|
session?.organizationId ??
|
|
@@ -2280,9 +2209,8 @@ class TurnkeySDKClientBase {
|
|
|
2280
2209
|
};
|
|
2281
2210
|
this.oauth = async (input, stampWith) => {
|
|
2282
2211
|
const { organizationId, timestampMs, ...rest } = input;
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
return this.command("/public/v1/submit/oauth", {
|
|
2212
|
+
const session = await this.storageManager?.getActiveSession();
|
|
2213
|
+
return this.activity("/public/v1/submit/oauth", {
|
|
2286
2214
|
parameters: rest,
|
|
2287
2215
|
organizationId: organizationId ??
|
|
2288
2216
|
session?.organizationId ??
|
|
@@ -2314,9 +2242,8 @@ class TurnkeySDKClientBase {
|
|
|
2314
2242
|
};
|
|
2315
2243
|
this.oauthLogin = async (input, stampWith) => {
|
|
2316
2244
|
const { organizationId, timestampMs, ...rest } = input;
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
return this.command("/public/v1/submit/oauth_login", {
|
|
2245
|
+
const session = await this.storageManager?.getActiveSession();
|
|
2246
|
+
return this.activity("/public/v1/submit/oauth_login", {
|
|
2320
2247
|
parameters: rest,
|
|
2321
2248
|
organizationId: organizationId ??
|
|
2322
2249
|
session?.organizationId ??
|
|
@@ -2348,9 +2275,8 @@ class TurnkeySDKClientBase {
|
|
|
2348
2275
|
};
|
|
2349
2276
|
this.otpAuth = async (input, stampWith) => {
|
|
2350
2277
|
const { organizationId, timestampMs, ...rest } = input;
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
return this.command("/public/v1/submit/otp_auth", {
|
|
2278
|
+
const session = await this.storageManager?.getActiveSession();
|
|
2279
|
+
return this.activity("/public/v1/submit/otp_auth", {
|
|
2354
2280
|
parameters: rest,
|
|
2355
2281
|
organizationId: organizationId ??
|
|
2356
2282
|
session?.organizationId ??
|
|
@@ -2382,9 +2308,8 @@ class TurnkeySDKClientBase {
|
|
|
2382
2308
|
};
|
|
2383
2309
|
this.otpLogin = async (input, stampWith) => {
|
|
2384
2310
|
const { organizationId, timestampMs, ...rest } = input;
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
return this.command("/public/v1/submit/otp_login", {
|
|
2311
|
+
const session = await this.storageManager?.getActiveSession();
|
|
2312
|
+
return this.activity("/public/v1/submit/otp_login", {
|
|
2388
2313
|
parameters: rest,
|
|
2389
2314
|
organizationId: organizationId ??
|
|
2390
2315
|
session?.organizationId ??
|
|
@@ -2416,9 +2341,8 @@ class TurnkeySDKClientBase {
|
|
|
2416
2341
|
};
|
|
2417
2342
|
this.recoverUser = async (input, stampWith) => {
|
|
2418
2343
|
const { organizationId, timestampMs, ...rest } = input;
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
return this.command("/public/v1/submit/recover_user", {
|
|
2344
|
+
const session = await this.storageManager?.getActiveSession();
|
|
2345
|
+
return this.activity("/public/v1/submit/recover_user", {
|
|
2422
2346
|
parameters: rest,
|
|
2423
2347
|
organizationId: organizationId ??
|
|
2424
2348
|
session?.organizationId ??
|
|
@@ -2450,8 +2374,7 @@ class TurnkeySDKClientBase {
|
|
|
2450
2374
|
};
|
|
2451
2375
|
this.rejectActivity = async (input, stampWith) => {
|
|
2452
2376
|
const { organizationId, timestampMs, ...rest } = input;
|
|
2453
|
-
|
|
2454
|
-
session = parseSession(session); // TODO (Amir): We may not need this anymore since we want to store the full session object in storage
|
|
2377
|
+
const session = await this.storageManager?.getActiveSession();
|
|
2455
2378
|
return this.activityDecision("/public/v1/submit/reject_activity", {
|
|
2456
2379
|
parameters: rest,
|
|
2457
2380
|
organizationId: organizationId ??
|
|
@@ -2484,9 +2407,8 @@ class TurnkeySDKClientBase {
|
|
|
2484
2407
|
};
|
|
2485
2408
|
this.removeOrganizationFeature = async (input, stampWith) => {
|
|
2486
2409
|
const { organizationId, timestampMs, ...rest } = input;
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
return this.command("/public/v1/submit/remove_organization_feature", {
|
|
2410
|
+
const session = await this.storageManager?.getActiveSession();
|
|
2411
|
+
return this.activity("/public/v1/submit/remove_organization_feature", {
|
|
2490
2412
|
parameters: rest,
|
|
2491
2413
|
organizationId: organizationId ??
|
|
2492
2414
|
session?.organizationId ??
|
|
@@ -2518,9 +2440,8 @@ class TurnkeySDKClientBase {
|
|
|
2518
2440
|
};
|
|
2519
2441
|
this.setOrganizationFeature = async (input, stampWith) => {
|
|
2520
2442
|
const { organizationId, timestampMs, ...rest } = input;
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
return this.command("/public/v1/submit/set_organization_feature", {
|
|
2443
|
+
const session = await this.storageManager?.getActiveSession();
|
|
2444
|
+
return this.activity("/public/v1/submit/set_organization_feature", {
|
|
2524
2445
|
parameters: rest,
|
|
2525
2446
|
organizationId: organizationId ??
|
|
2526
2447
|
session?.organizationId ??
|
|
@@ -2552,9 +2473,8 @@ class TurnkeySDKClientBase {
|
|
|
2552
2473
|
};
|
|
2553
2474
|
this.signRawPayload = async (input, stampWith) => {
|
|
2554
2475
|
const { organizationId, timestampMs, ...rest } = input;
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
return this.command("/public/v1/submit/sign_raw_payload", {
|
|
2476
|
+
const session = await this.storageManager?.getActiveSession();
|
|
2477
|
+
return this.activity("/public/v1/submit/sign_raw_payload", {
|
|
2558
2478
|
parameters: rest,
|
|
2559
2479
|
organizationId: organizationId ??
|
|
2560
2480
|
session?.organizationId ??
|
|
@@ -2586,9 +2506,8 @@ class TurnkeySDKClientBase {
|
|
|
2586
2506
|
};
|
|
2587
2507
|
this.signRawPayloads = async (input, stampWith) => {
|
|
2588
2508
|
const { organizationId, timestampMs, ...rest } = input;
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
return this.command("/public/v1/submit/sign_raw_payloads", {
|
|
2509
|
+
const session = await this.storageManager?.getActiveSession();
|
|
2510
|
+
return this.activity("/public/v1/submit/sign_raw_payloads", {
|
|
2592
2511
|
parameters: rest,
|
|
2593
2512
|
organizationId: organizationId ??
|
|
2594
2513
|
session?.organizationId ??
|
|
@@ -2620,9 +2539,8 @@ class TurnkeySDKClientBase {
|
|
|
2620
2539
|
};
|
|
2621
2540
|
this.signTransaction = async (input, stampWith) => {
|
|
2622
2541
|
const { organizationId, timestampMs, ...rest } = input;
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
return this.command("/public/v1/submit/sign_transaction", {
|
|
2542
|
+
const session = await this.storageManager?.getActiveSession();
|
|
2543
|
+
return this.activity("/public/v1/submit/sign_transaction", {
|
|
2626
2544
|
parameters: rest,
|
|
2627
2545
|
organizationId: organizationId ??
|
|
2628
2546
|
session?.organizationId ??
|
|
@@ -2654,9 +2572,8 @@ class TurnkeySDKClientBase {
|
|
|
2654
2572
|
};
|
|
2655
2573
|
this.stampLogin = async (input, stampWith) => {
|
|
2656
2574
|
const { organizationId, timestampMs, ...rest } = input;
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
return this.command("/public/v1/submit/stamp_login", {
|
|
2575
|
+
const session = await this.storageManager?.getActiveSession();
|
|
2576
|
+
return this.activity("/public/v1/submit/stamp_login", {
|
|
2660
2577
|
parameters: rest,
|
|
2661
2578
|
organizationId: organizationId ??
|
|
2662
2579
|
session?.organizationId ??
|
|
@@ -2688,9 +2605,8 @@ class TurnkeySDKClientBase {
|
|
|
2688
2605
|
};
|
|
2689
2606
|
this.updatePolicy = async (input, stampWith) => {
|
|
2690
2607
|
const { organizationId, timestampMs, ...rest } = input;
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
return this.command("/public/v1/submit/update_policy", {
|
|
2608
|
+
const session = await this.storageManager?.getActiveSession();
|
|
2609
|
+
return this.activity("/public/v1/submit/update_policy", {
|
|
2694
2610
|
parameters: rest,
|
|
2695
2611
|
organizationId: organizationId ??
|
|
2696
2612
|
session?.organizationId ??
|
|
@@ -2722,9 +2638,8 @@ class TurnkeySDKClientBase {
|
|
|
2722
2638
|
};
|
|
2723
2639
|
this.updatePrivateKeyTag = async (input, stampWith) => {
|
|
2724
2640
|
const { organizationId, timestampMs, ...rest } = input;
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
return this.command("/public/v1/submit/update_private_key_tag", {
|
|
2641
|
+
const session = await this.storageManager?.getActiveSession();
|
|
2642
|
+
return this.activity("/public/v1/submit/update_private_key_tag", {
|
|
2728
2643
|
parameters: rest,
|
|
2729
2644
|
organizationId: organizationId ??
|
|
2730
2645
|
session?.organizationId ??
|
|
@@ -2756,9 +2671,8 @@ class TurnkeySDKClientBase {
|
|
|
2756
2671
|
};
|
|
2757
2672
|
this.updateRootQuorum = async (input, stampWith) => {
|
|
2758
2673
|
const { organizationId, timestampMs, ...rest } = input;
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
return this.command("/public/v1/submit/update_root_quorum", {
|
|
2674
|
+
const session = await this.storageManager?.getActiveSession();
|
|
2675
|
+
return this.activity("/public/v1/submit/update_root_quorum", {
|
|
2762
2676
|
parameters: rest,
|
|
2763
2677
|
organizationId: organizationId ??
|
|
2764
2678
|
session?.organizationId ??
|
|
@@ -2790,9 +2704,8 @@ class TurnkeySDKClientBase {
|
|
|
2790
2704
|
};
|
|
2791
2705
|
this.updateUser = async (input, stampWith) => {
|
|
2792
2706
|
const { organizationId, timestampMs, ...rest } = input;
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
return this.command("/public/v1/submit/update_user", {
|
|
2707
|
+
const session = await this.storageManager?.getActiveSession();
|
|
2708
|
+
return this.activity("/public/v1/submit/update_user", {
|
|
2796
2709
|
parameters: rest,
|
|
2797
2710
|
organizationId: organizationId ??
|
|
2798
2711
|
session?.organizationId ??
|
|
@@ -2824,9 +2737,8 @@ class TurnkeySDKClientBase {
|
|
|
2824
2737
|
};
|
|
2825
2738
|
this.updateUserEmail = async (input, stampWith) => {
|
|
2826
2739
|
const { organizationId, timestampMs, ...rest } = input;
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
return this.command("/public/v1/submit/update_user_email", {
|
|
2740
|
+
const session = await this.storageManager?.getActiveSession();
|
|
2741
|
+
return this.activity("/public/v1/submit/update_user_email", {
|
|
2830
2742
|
parameters: rest,
|
|
2831
2743
|
organizationId: organizationId ??
|
|
2832
2744
|
session?.organizationId ??
|
|
@@ -2858,9 +2770,8 @@ class TurnkeySDKClientBase {
|
|
|
2858
2770
|
};
|
|
2859
2771
|
this.updateUserName = async (input, stampWith) => {
|
|
2860
2772
|
const { organizationId, timestampMs, ...rest } = input;
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
return this.command("/public/v1/submit/update_user_name", {
|
|
2773
|
+
const session = await this.storageManager?.getActiveSession();
|
|
2774
|
+
return this.activity("/public/v1/submit/update_user_name", {
|
|
2864
2775
|
parameters: rest,
|
|
2865
2776
|
organizationId: organizationId ??
|
|
2866
2777
|
session?.organizationId ??
|
|
@@ -2892,9 +2803,8 @@ class TurnkeySDKClientBase {
|
|
|
2892
2803
|
};
|
|
2893
2804
|
this.updateUserPhoneNumber = async (input, stampWith) => {
|
|
2894
2805
|
const { organizationId, timestampMs, ...rest } = input;
|
|
2895
|
-
|
|
2896
|
-
|
|
2897
|
-
return this.command("/public/v1/submit/update_user_phone_number", {
|
|
2806
|
+
const session = await this.storageManager?.getActiveSession();
|
|
2807
|
+
return this.activity("/public/v1/submit/update_user_phone_number", {
|
|
2898
2808
|
parameters: rest,
|
|
2899
2809
|
organizationId: organizationId ??
|
|
2900
2810
|
session?.organizationId ??
|
|
@@ -2926,9 +2836,8 @@ class TurnkeySDKClientBase {
|
|
|
2926
2836
|
};
|
|
2927
2837
|
this.updateUserTag = async (input, stampWith) => {
|
|
2928
2838
|
const { organizationId, timestampMs, ...rest } = input;
|
|
2929
|
-
|
|
2930
|
-
|
|
2931
|
-
return this.command("/public/v1/submit/update_user_tag", {
|
|
2839
|
+
const session = await this.storageManager?.getActiveSession();
|
|
2840
|
+
return this.activity("/public/v1/submit/update_user_tag", {
|
|
2932
2841
|
parameters: rest,
|
|
2933
2842
|
organizationId: organizationId ??
|
|
2934
2843
|
session?.organizationId ??
|
|
@@ -2960,9 +2869,8 @@ class TurnkeySDKClientBase {
|
|
|
2960
2869
|
};
|
|
2961
2870
|
this.updateWallet = async (input, stampWith) => {
|
|
2962
2871
|
const { organizationId, timestampMs, ...rest } = input;
|
|
2963
|
-
|
|
2964
|
-
|
|
2965
|
-
return this.command("/public/v1/submit/update_wallet", {
|
|
2872
|
+
const session = await this.storageManager?.getActiveSession();
|
|
2873
|
+
return this.activity("/public/v1/submit/update_wallet", {
|
|
2966
2874
|
parameters: rest,
|
|
2967
2875
|
organizationId: organizationId ??
|
|
2968
2876
|
session?.organizationId ??
|
|
@@ -2994,9 +2902,8 @@ class TurnkeySDKClientBase {
|
|
|
2994
2902
|
};
|
|
2995
2903
|
this.verifyOtp = async (input, stampWith) => {
|
|
2996
2904
|
const { organizationId, timestampMs, ...rest } = input;
|
|
2997
|
-
|
|
2998
|
-
|
|
2999
|
-
return this.command("/public/v1/submit/verify_otp", {
|
|
2905
|
+
const session = await this.storageManager?.getActiveSession();
|
|
2906
|
+
return this.activity("/public/v1/submit/verify_otp", {
|
|
3000
2907
|
parameters: rest,
|
|
3001
2908
|
organizationId: organizationId ??
|
|
3002
2909
|
session?.organizationId ??
|
|
@@ -3027,8 +2934,7 @@ class TurnkeySDKClientBase {
|
|
|
3027
2934
|
};
|
|
3028
2935
|
};
|
|
3029
2936
|
this.testRateLimits = async (input, stampWith) => {
|
|
3030
|
-
|
|
3031
|
-
session = parseSession(session); // TODO (Amir): We may not need this anymore since we want to store the full session object in storage
|
|
2937
|
+
const session = await this.storageManager?.getActiveSession();
|
|
3032
2938
|
return this.request("/tkhq/api/v1/test_rate_limits", {
|
|
3033
2939
|
...input,
|
|
3034
2940
|
organizationId: input.organizationId ??
|
|
@@ -3117,9 +3023,6 @@ class TurnkeySDKClientBase {
|
|
|
3117
3023
|
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
3118
3024
|
headers[stamp.stampHeaderName] = stamp.stampHeaderValue;
|
|
3119
3025
|
}
|
|
3120
|
-
if (this.config.readOnlySession) {
|
|
3121
|
-
headers["X-Session"] = this.config.readOnlySession;
|
|
3122
|
-
}
|
|
3123
3026
|
const response = await fetch(fullUrl, {
|
|
3124
3027
|
method: "POST",
|
|
3125
3028
|
headers: headers,
|
|
@@ -3139,7 +3042,7 @@ class TurnkeySDKClientBase {
|
|
|
3139
3042
|
const data = await response.json();
|
|
3140
3043
|
return data;
|
|
3141
3044
|
}
|
|
3142
|
-
async
|
|
3045
|
+
async activity(url, body, resultKey, stampWith) {
|
|
3143
3046
|
const pollingDuration = this.config.activityPoller?.intervalMs ?? 1000;
|
|
3144
3047
|
const maxRetries = this.config.activityPoller?.numRetries ?? 3;
|
|
3145
3048
|
const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|