@turnkey/core 2.1.0 → 2.3.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.
- package/dist/__clients__/core.d.ts +0 -6
- package/dist/__clients__/core.d.ts.map +1 -1
- package/dist/__clients__/core.js +11 -38
- package/dist/__clients__/core.js.map +1 -1
- package/dist/__clients__/core.mjs +11 -38
- package/dist/__clients__/core.mjs.map +1 -1
- package/dist/__generated__/sdk-client-base.d.ts +26 -2
- package/dist/__generated__/sdk-client-base.d.ts.map +1 -1
- package/dist/__generated__/sdk-client-base.js +432 -37
- package/dist/__generated__/sdk-client-base.js.map +1 -1
- package/dist/__generated__/sdk-client-base.mjs +432 -37
- 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/__types__/external-wallets.d.ts +50 -0
- package/dist/__types__/external-wallets.d.ts.map +1 -1
- package/dist/__types__/method-types/shared.d.ts +3 -22
- package/dist/__types__/method-types/shared.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/utils.d.ts +13 -1
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +75 -0
- package/dist/utils.js.map +1 -1
- package/dist/utils.mjs +74 -1
- package/dist/utils.mjs.map +1 -1
- package/package.json +8 -8
|
@@ -307,6 +307,96 @@ class TurnkeySDKClientBase {
|
|
|
307
307
|
url: fullUrl,
|
|
308
308
|
};
|
|
309
309
|
};
|
|
310
|
+
this.getMfaPolicies = async (input, stampWith) => {
|
|
311
|
+
const session = await this.storageManager?.getActiveSession();
|
|
312
|
+
return this.request("/public/v1/query/get_mfa_policies", {
|
|
313
|
+
...input,
|
|
314
|
+
organizationId: input.organizationId ??
|
|
315
|
+
session?.organizationId ??
|
|
316
|
+
this.config.organizationId,
|
|
317
|
+
}, stampWith);
|
|
318
|
+
};
|
|
319
|
+
this.stampGetMfaPolicies = async (input, stampWith) => {
|
|
320
|
+
const activeStamper = this.getStamper(stampWith);
|
|
321
|
+
if (!activeStamper) {
|
|
322
|
+
return undefined;
|
|
323
|
+
}
|
|
324
|
+
const session = await this.storageManager?.getActiveSession();
|
|
325
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_mfa_policies";
|
|
326
|
+
const body = {
|
|
327
|
+
...input,
|
|
328
|
+
organizationId: input.organizationId ??
|
|
329
|
+
session?.organizationId ??
|
|
330
|
+
this.config.organizationId,
|
|
331
|
+
};
|
|
332
|
+
const stringifiedBody = JSON.stringify(body);
|
|
333
|
+
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
334
|
+
return {
|
|
335
|
+
body: stringifiedBody,
|
|
336
|
+
stamp: stamp,
|
|
337
|
+
url: fullUrl,
|
|
338
|
+
};
|
|
339
|
+
};
|
|
340
|
+
this.getMfaPolicy = async (input, stampWith) => {
|
|
341
|
+
const session = await this.storageManager?.getActiveSession();
|
|
342
|
+
return this.request("/public/v1/query/get_mfa_policy", {
|
|
343
|
+
...input,
|
|
344
|
+
organizationId: input.organizationId ??
|
|
345
|
+
session?.organizationId ??
|
|
346
|
+
this.config.organizationId,
|
|
347
|
+
}, stampWith);
|
|
348
|
+
};
|
|
349
|
+
this.stampGetMfaPolicy = async (input, stampWith) => {
|
|
350
|
+
const activeStamper = this.getStamper(stampWith);
|
|
351
|
+
if (!activeStamper) {
|
|
352
|
+
return undefined;
|
|
353
|
+
}
|
|
354
|
+
const session = await this.storageManager?.getActiveSession();
|
|
355
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_mfa_policy";
|
|
356
|
+
const body = {
|
|
357
|
+
...input,
|
|
358
|
+
organizationId: input.organizationId ??
|
|
359
|
+
session?.organizationId ??
|
|
360
|
+
this.config.organizationId,
|
|
361
|
+
};
|
|
362
|
+
const stringifiedBody = JSON.stringify(body);
|
|
363
|
+
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
364
|
+
return {
|
|
365
|
+
body: stringifiedBody,
|
|
366
|
+
stamp: stamp,
|
|
367
|
+
url: fullUrl,
|
|
368
|
+
};
|
|
369
|
+
};
|
|
370
|
+
this.getMfaStatus = async (input, stampWith) => {
|
|
371
|
+
const session = await this.storageManager?.getActiveSession();
|
|
372
|
+
return this.request("/public/v1/query/get_mfa_status", {
|
|
373
|
+
...input,
|
|
374
|
+
organizationId: input.organizationId ??
|
|
375
|
+
session?.organizationId ??
|
|
376
|
+
this.config.organizationId,
|
|
377
|
+
}, stampWith);
|
|
378
|
+
};
|
|
379
|
+
this.stampGetMfaStatus = async (input, stampWith) => {
|
|
380
|
+
const activeStamper = this.getStamper(stampWith);
|
|
381
|
+
if (!activeStamper) {
|
|
382
|
+
return undefined;
|
|
383
|
+
}
|
|
384
|
+
const session = await this.storageManager?.getActiveSession();
|
|
385
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_mfa_status";
|
|
386
|
+
const body = {
|
|
387
|
+
...input,
|
|
388
|
+
organizationId: input.organizationId ??
|
|
389
|
+
session?.organizationId ??
|
|
390
|
+
this.config.organizationId,
|
|
391
|
+
};
|
|
392
|
+
const stringifiedBody = JSON.stringify(body);
|
|
393
|
+
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
394
|
+
return {
|
|
395
|
+
body: stringifiedBody,
|
|
396
|
+
stamp: stamp,
|
|
397
|
+
url: fullUrl,
|
|
398
|
+
};
|
|
399
|
+
};
|
|
310
400
|
this.getNonces = async (input, stampWith) => {
|
|
311
401
|
const session = await this.storageManager?.getActiveSession();
|
|
312
402
|
return this.request("/public/v1/query/get_nonces", {
|
|
@@ -577,6 +667,66 @@ class TurnkeySDKClientBase {
|
|
|
577
667
|
url: fullUrl,
|
|
578
668
|
};
|
|
579
669
|
};
|
|
670
|
+
this.getSessionProfile = async (input, stampWith) => {
|
|
671
|
+
const session = await this.storageManager?.getActiveSession();
|
|
672
|
+
return this.request("/public/v1/query/get_session_profile", {
|
|
673
|
+
...input,
|
|
674
|
+
organizationId: input.organizationId ??
|
|
675
|
+
session?.organizationId ??
|
|
676
|
+
this.config.organizationId,
|
|
677
|
+
}, stampWith);
|
|
678
|
+
};
|
|
679
|
+
this.stampGetSessionProfile = async (input, stampWith) => {
|
|
680
|
+
const activeStamper = this.getStamper(stampWith);
|
|
681
|
+
if (!activeStamper) {
|
|
682
|
+
return undefined;
|
|
683
|
+
}
|
|
684
|
+
const session = await this.storageManager?.getActiveSession();
|
|
685
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_session_profile";
|
|
686
|
+
const body = {
|
|
687
|
+
...input,
|
|
688
|
+
organizationId: input.organizationId ??
|
|
689
|
+
session?.organizationId ??
|
|
690
|
+
this.config.organizationId,
|
|
691
|
+
};
|
|
692
|
+
const stringifiedBody = JSON.stringify(body);
|
|
693
|
+
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
694
|
+
return {
|
|
695
|
+
body: stringifiedBody,
|
|
696
|
+
stamp: stamp,
|
|
697
|
+
url: fullUrl,
|
|
698
|
+
};
|
|
699
|
+
};
|
|
700
|
+
this.getSessionProfiles = async (input, stampWith) => {
|
|
701
|
+
const session = await this.storageManager?.getActiveSession();
|
|
702
|
+
return this.request("/public/v1/query/get_session_profiles", {
|
|
703
|
+
...input,
|
|
704
|
+
organizationId: input.organizationId ??
|
|
705
|
+
session?.organizationId ??
|
|
706
|
+
this.config.organizationId,
|
|
707
|
+
}, stampWith);
|
|
708
|
+
};
|
|
709
|
+
this.stampGetSessionProfiles = async (input, stampWith) => {
|
|
710
|
+
const activeStamper = this.getStamper(stampWith);
|
|
711
|
+
if (!activeStamper) {
|
|
712
|
+
return undefined;
|
|
713
|
+
}
|
|
714
|
+
const session = await this.storageManager?.getActiveSession();
|
|
715
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_session_profiles";
|
|
716
|
+
const body = {
|
|
717
|
+
...input,
|
|
718
|
+
organizationId: input.organizationId ??
|
|
719
|
+
session?.organizationId ??
|
|
720
|
+
this.config.organizationId,
|
|
721
|
+
};
|
|
722
|
+
const stringifiedBody = JSON.stringify(body);
|
|
723
|
+
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
724
|
+
return {
|
|
725
|
+
body: stringifiedBody,
|
|
726
|
+
stamp: stamp,
|
|
727
|
+
url: fullUrl,
|
|
728
|
+
};
|
|
729
|
+
};
|
|
580
730
|
this.getSmartContractInterface = async (input, stampWith) => {
|
|
581
731
|
const session = await this.storageManager?.getActiveSession();
|
|
582
732
|
return this.request("/public/v1/query/get_smart_contract_interface", {
|
|
@@ -667,6 +817,36 @@ class TurnkeySDKClientBase {
|
|
|
667
817
|
url: fullUrl,
|
|
668
818
|
};
|
|
669
819
|
};
|
|
820
|
+
this.getTvcDeploymentDebugLogs = async (input, stampWith) => {
|
|
821
|
+
const session = await this.storageManager?.getActiveSession();
|
|
822
|
+
return this.request("/public/v1/query/get_tvc_deployment_debug_logs", {
|
|
823
|
+
...input,
|
|
824
|
+
organizationId: input.organizationId ??
|
|
825
|
+
session?.organizationId ??
|
|
826
|
+
this.config.organizationId,
|
|
827
|
+
}, stampWith);
|
|
828
|
+
};
|
|
829
|
+
this.stampGetTvcDeploymentDebugLogs = async (input, stampWith) => {
|
|
830
|
+
const activeStamper = this.getStamper(stampWith);
|
|
831
|
+
if (!activeStamper) {
|
|
832
|
+
return undefined;
|
|
833
|
+
}
|
|
834
|
+
const session = await this.storageManager?.getActiveSession();
|
|
835
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_tvc_deployment_debug_logs";
|
|
836
|
+
const body = {
|
|
837
|
+
...input,
|
|
838
|
+
organizationId: input.organizationId ??
|
|
839
|
+
session?.organizationId ??
|
|
840
|
+
this.config.organizationId,
|
|
841
|
+
};
|
|
842
|
+
const stringifiedBody = JSON.stringify(body);
|
|
843
|
+
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
844
|
+
return {
|
|
845
|
+
body: stringifiedBody,
|
|
846
|
+
stamp: stamp,
|
|
847
|
+
url: fullUrl,
|
|
848
|
+
};
|
|
849
|
+
};
|
|
670
850
|
this.getUser = async (input, stampWith) => {
|
|
671
851
|
const session = await this.storageManager?.getActiveSession();
|
|
672
852
|
return this.request("/public/v1/query/get_user", {
|
|
@@ -847,6 +1027,36 @@ class TurnkeySDKClientBase {
|
|
|
847
1027
|
url: fullUrl,
|
|
848
1028
|
};
|
|
849
1029
|
};
|
|
1030
|
+
this.listEmailEvents = async (input, stampWith) => {
|
|
1031
|
+
const session = await this.storageManager?.getActiveSession();
|
|
1032
|
+
return this.request("/public/v1/query/list_email_events", {
|
|
1033
|
+
...input,
|
|
1034
|
+
organizationId: input.organizationId ??
|
|
1035
|
+
session?.organizationId ??
|
|
1036
|
+
this.config.organizationId,
|
|
1037
|
+
}, stampWith);
|
|
1038
|
+
};
|
|
1039
|
+
this.stampListEmailEvents = async (input, stampWith) => {
|
|
1040
|
+
const activeStamper = this.getStamper(stampWith);
|
|
1041
|
+
if (!activeStamper) {
|
|
1042
|
+
return undefined;
|
|
1043
|
+
}
|
|
1044
|
+
const session = await this.storageManager?.getActiveSession();
|
|
1045
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/query/list_email_events";
|
|
1046
|
+
const body = {
|
|
1047
|
+
...input,
|
|
1048
|
+
organizationId: input.organizationId ??
|
|
1049
|
+
session?.organizationId ??
|
|
1050
|
+
this.config.organizationId,
|
|
1051
|
+
};
|
|
1052
|
+
const stringifiedBody = JSON.stringify(body);
|
|
1053
|
+
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
1054
|
+
return {
|
|
1055
|
+
body: stringifiedBody,
|
|
1056
|
+
stamp: stamp,
|
|
1057
|
+
url: fullUrl,
|
|
1058
|
+
};
|
|
1059
|
+
};
|
|
850
1060
|
this.listFiatOnRampCredentials = async (input, stampWith) => {
|
|
851
1061
|
const session = await this.storageManager?.getActiveSession();
|
|
852
1062
|
return this.request("/public/v1/query/list_fiat_on_ramp_credentials", {
|
|
@@ -1573,6 +1783,43 @@ class TurnkeySDKClientBase {
|
|
|
1573
1783
|
url: fullUrl,
|
|
1574
1784
|
};
|
|
1575
1785
|
};
|
|
1786
|
+
this.createMfaPolicy = async (input, stampWith) => {
|
|
1787
|
+
const { organizationId, timestampMs, ...rest } = input;
|
|
1788
|
+
//@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
|
|
1789
|
+
const generateAppProofs = input?.generateAppProofs ?? false;
|
|
1790
|
+
const session = await this.storageManager?.getActiveSession();
|
|
1791
|
+
return this.activity("/public/v1/submit/create_mfa_policy", {
|
|
1792
|
+
parameters: rest,
|
|
1793
|
+
organizationId: organizationId ??
|
|
1794
|
+
session?.organizationId ??
|
|
1795
|
+
this.config.organizationId,
|
|
1796
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
1797
|
+
generateAppProofs: generateAppProofs ?? false,
|
|
1798
|
+
type: "ACTIVITY_TYPE_CREATE_MFA_POLICY",
|
|
1799
|
+
}, "createMfaPolicyResult", stampWith);
|
|
1800
|
+
};
|
|
1801
|
+
this.stampCreateMfaPolicy = async (input, stampWith) => {
|
|
1802
|
+
const activeStamper = this.getStamper(stampWith);
|
|
1803
|
+
if (!activeStamper) {
|
|
1804
|
+
return undefined;
|
|
1805
|
+
}
|
|
1806
|
+
const { organizationId, timestampMs, ...parameters } = input;
|
|
1807
|
+
const session = await this.storageManager?.getActiveSession();
|
|
1808
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_mfa_policy";
|
|
1809
|
+
const bodyWithType = {
|
|
1810
|
+
parameters,
|
|
1811
|
+
organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
|
|
1812
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
1813
|
+
type: "ACTIVITY_TYPE_CREATE_MFA_POLICY",
|
|
1814
|
+
};
|
|
1815
|
+
const stringifiedBody = JSON.stringify(bodyWithType);
|
|
1816
|
+
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
1817
|
+
return {
|
|
1818
|
+
body: stringifiedBody,
|
|
1819
|
+
stamp: stamp,
|
|
1820
|
+
url: fullUrl,
|
|
1821
|
+
};
|
|
1822
|
+
};
|
|
1576
1823
|
this.createOauth2Credential = async (input, stampWith) => {
|
|
1577
1824
|
const { organizationId, timestampMs, ...rest } = input;
|
|
1578
1825
|
//@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
|
|
@@ -1869,6 +2116,43 @@ class TurnkeySDKClientBase {
|
|
|
1869
2116
|
url: fullUrl,
|
|
1870
2117
|
};
|
|
1871
2118
|
};
|
|
2119
|
+
this.createSessionProfile = async (input, stampWith) => {
|
|
2120
|
+
const { organizationId, timestampMs, ...rest } = input;
|
|
2121
|
+
//@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
|
|
2122
|
+
const generateAppProofs = input?.generateAppProofs ?? false;
|
|
2123
|
+
const session = await this.storageManager?.getActiveSession();
|
|
2124
|
+
return this.activity("/public/v1/submit/create_session_profile", {
|
|
2125
|
+
parameters: rest,
|
|
2126
|
+
organizationId: organizationId ??
|
|
2127
|
+
session?.organizationId ??
|
|
2128
|
+
this.config.organizationId,
|
|
2129
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
2130
|
+
generateAppProofs: generateAppProofs ?? false,
|
|
2131
|
+
type: "ACTIVITY_TYPE_CREATE_SESSION_PROFILE",
|
|
2132
|
+
}, "createSessionProfileResult", stampWith);
|
|
2133
|
+
};
|
|
2134
|
+
this.stampCreateSessionProfile = async (input, stampWith) => {
|
|
2135
|
+
const activeStamper = this.getStamper(stampWith);
|
|
2136
|
+
if (!activeStamper) {
|
|
2137
|
+
return undefined;
|
|
2138
|
+
}
|
|
2139
|
+
const { organizationId, timestampMs, ...parameters } = input;
|
|
2140
|
+
const session = await this.storageManager?.getActiveSession();
|
|
2141
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_session_profile";
|
|
2142
|
+
const bodyWithType = {
|
|
2143
|
+
parameters,
|
|
2144
|
+
organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
|
|
2145
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
2146
|
+
type: "ACTIVITY_TYPE_CREATE_SESSION_PROFILE",
|
|
2147
|
+
};
|
|
2148
|
+
const stringifiedBody = JSON.stringify(bodyWithType);
|
|
2149
|
+
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
2150
|
+
return {
|
|
2151
|
+
body: stringifiedBody,
|
|
2152
|
+
stamp: stamp,
|
|
2153
|
+
url: fullUrl,
|
|
2154
|
+
};
|
|
2155
|
+
};
|
|
1872
2156
|
this.createSmartContractInterface = async (input, stampWith) => {
|
|
1873
2157
|
const { organizationId, timestampMs, ...rest } = input;
|
|
1874
2158
|
//@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
|
|
@@ -2390,6 +2674,43 @@ class TurnkeySDKClientBase {
|
|
|
2390
2674
|
url: fullUrl,
|
|
2391
2675
|
};
|
|
2392
2676
|
};
|
|
2677
|
+
this.deleteMfaPolicy = async (input, stampWith) => {
|
|
2678
|
+
const { organizationId, timestampMs, ...rest } = input;
|
|
2679
|
+
//@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
|
|
2680
|
+
const generateAppProofs = input?.generateAppProofs ?? false;
|
|
2681
|
+
const session = await this.storageManager?.getActiveSession();
|
|
2682
|
+
return this.activity("/public/v1/submit/delete_mfa_policy", {
|
|
2683
|
+
parameters: rest,
|
|
2684
|
+
organizationId: organizationId ??
|
|
2685
|
+
session?.organizationId ??
|
|
2686
|
+
this.config.organizationId,
|
|
2687
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
2688
|
+
generateAppProofs: generateAppProofs ?? false,
|
|
2689
|
+
type: "ACTIVITY_TYPE_DELETE_MFA_POLICY",
|
|
2690
|
+
}, "deleteMfaPolicyResult", stampWith);
|
|
2691
|
+
};
|
|
2692
|
+
this.stampDeleteMfaPolicy = async (input, stampWith) => {
|
|
2693
|
+
const activeStamper = this.getStamper(stampWith);
|
|
2694
|
+
if (!activeStamper) {
|
|
2695
|
+
return undefined;
|
|
2696
|
+
}
|
|
2697
|
+
const { organizationId, timestampMs, ...parameters } = input;
|
|
2698
|
+
const session = await this.storageManager?.getActiveSession();
|
|
2699
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/delete_mfa_policy";
|
|
2700
|
+
const bodyWithType = {
|
|
2701
|
+
parameters,
|
|
2702
|
+
organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
|
|
2703
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
2704
|
+
type: "ACTIVITY_TYPE_DELETE_MFA_POLICY",
|
|
2705
|
+
};
|
|
2706
|
+
const stringifiedBody = JSON.stringify(bodyWithType);
|
|
2707
|
+
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
2708
|
+
return {
|
|
2709
|
+
body: stringifiedBody,
|
|
2710
|
+
stamp: stamp,
|
|
2711
|
+
url: fullUrl,
|
|
2712
|
+
};
|
|
2713
|
+
};
|
|
2393
2714
|
this.deleteOauth2Credential = async (input, stampWith) => {
|
|
2394
2715
|
const { organizationId, timestampMs, ...rest } = input;
|
|
2395
2716
|
//@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
|
|
@@ -2984,43 +3305,6 @@ class TurnkeySDKClientBase {
|
|
|
2984
3305
|
url: fullUrl,
|
|
2985
3306
|
};
|
|
2986
3307
|
};
|
|
2987
|
-
this.ethSendTransaction = async (input, stampWith) => {
|
|
2988
|
-
const { organizationId, timestampMs, ...rest } = input;
|
|
2989
|
-
//@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
|
|
2990
|
-
const generateAppProofs = input?.generateAppProofs ?? false;
|
|
2991
|
-
const session = await this.storageManager?.getActiveSession();
|
|
2992
|
-
return this.activity("/public/v1/submit/eth_send_transaction", {
|
|
2993
|
-
parameters: rest,
|
|
2994
|
-
organizationId: organizationId ??
|
|
2995
|
-
session?.organizationId ??
|
|
2996
|
-
this.config.organizationId,
|
|
2997
|
-
timestampMs: timestampMs ?? String(Date.now()),
|
|
2998
|
-
generateAppProofs: generateAppProofs ?? false,
|
|
2999
|
-
type: "ACTIVITY_TYPE_ETH_SEND_TRANSACTION",
|
|
3000
|
-
}, "ethSendTransactionResult", stampWith);
|
|
3001
|
-
};
|
|
3002
|
-
this.stampEthSendTransaction = async (input, stampWith) => {
|
|
3003
|
-
const activeStamper = this.getStamper(stampWith);
|
|
3004
|
-
if (!activeStamper) {
|
|
3005
|
-
return undefined;
|
|
3006
|
-
}
|
|
3007
|
-
const { organizationId, timestampMs, ...parameters } = input;
|
|
3008
|
-
const session = await this.storageManager?.getActiveSession();
|
|
3009
|
-
const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/eth_send_transaction";
|
|
3010
|
-
const bodyWithType = {
|
|
3011
|
-
parameters,
|
|
3012
|
-
organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
|
|
3013
|
-
timestampMs: timestampMs ?? String(Date.now()),
|
|
3014
|
-
type: "ACTIVITY_TYPE_ETH_SEND_TRANSACTION",
|
|
3015
|
-
};
|
|
3016
|
-
const stringifiedBody = JSON.stringify(bodyWithType);
|
|
3017
|
-
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
3018
|
-
return {
|
|
3019
|
-
body: stringifiedBody,
|
|
3020
|
-
stamp: stamp,
|
|
3021
|
-
url: fullUrl,
|
|
3022
|
-
};
|
|
3023
|
-
};
|
|
3024
3308
|
this.exportPrivateKey = async (input, stampWith) => {
|
|
3025
3309
|
const { organizationId, timestampMs, ...rest } = input;
|
|
3026
3310
|
//@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
|
|
@@ -4280,6 +4564,43 @@ class TurnkeySDKClientBase {
|
|
|
4280
4564
|
url: fullUrl,
|
|
4281
4565
|
};
|
|
4282
4566
|
};
|
|
4567
|
+
this.updateMfaPolicy = async (input, stampWith) => {
|
|
4568
|
+
const { organizationId, timestampMs, ...rest } = input;
|
|
4569
|
+
//@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
|
|
4570
|
+
const generateAppProofs = input?.generateAppProofs ?? false;
|
|
4571
|
+
const session = await this.storageManager?.getActiveSession();
|
|
4572
|
+
return this.activity("/public/v1/submit/update_mfa_policy", {
|
|
4573
|
+
parameters: rest,
|
|
4574
|
+
organizationId: organizationId ??
|
|
4575
|
+
session?.organizationId ??
|
|
4576
|
+
this.config.organizationId,
|
|
4577
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
4578
|
+
generateAppProofs: generateAppProofs ?? false,
|
|
4579
|
+
type: "ACTIVITY_TYPE_UPDATE_MFA_POLICY",
|
|
4580
|
+
}, "updateMfaPolicyResult", stampWith);
|
|
4581
|
+
};
|
|
4582
|
+
this.stampUpdateMfaPolicy = async (input, stampWith) => {
|
|
4583
|
+
const activeStamper = this.getStamper(stampWith);
|
|
4584
|
+
if (!activeStamper) {
|
|
4585
|
+
return undefined;
|
|
4586
|
+
}
|
|
4587
|
+
const { organizationId, timestampMs, ...parameters } = input;
|
|
4588
|
+
const session = await this.storageManager?.getActiveSession();
|
|
4589
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/update_mfa_policy";
|
|
4590
|
+
const bodyWithType = {
|
|
4591
|
+
parameters,
|
|
4592
|
+
organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
|
|
4593
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
4594
|
+
type: "ACTIVITY_TYPE_UPDATE_MFA_POLICY",
|
|
4595
|
+
};
|
|
4596
|
+
const stringifiedBody = JSON.stringify(bodyWithType);
|
|
4597
|
+
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
4598
|
+
return {
|
|
4599
|
+
body: stringifiedBody,
|
|
4600
|
+
stamp: stamp,
|
|
4601
|
+
url: fullUrl,
|
|
4602
|
+
};
|
|
4603
|
+
};
|
|
4283
4604
|
this.updateOauth2Credential = async (input, stampWith) => {
|
|
4284
4605
|
const { organizationId, timestampMs, ...rest } = input;
|
|
4285
4606
|
//@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
|
|
@@ -4761,6 +5082,80 @@ class TurnkeySDKClientBase {
|
|
|
4761
5082
|
url: fullUrl,
|
|
4762
5083
|
};
|
|
4763
5084
|
};
|
|
5085
|
+
this.ethSendTransaction = async (input, stampWith) => {
|
|
5086
|
+
const { organizationId, timestampMs, ...rest } = input;
|
|
5087
|
+
//@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
|
|
5088
|
+
const generateAppProofs = input?.generateAppProofs ?? false;
|
|
5089
|
+
const session = await this.storageManager?.getActiveSession();
|
|
5090
|
+
return this.activity("/public/v1/submit/eth_send_transaction", {
|
|
5091
|
+
parameters: rest,
|
|
5092
|
+
organizationId: organizationId ??
|
|
5093
|
+
session?.organizationId ??
|
|
5094
|
+
this.config.organizationId,
|
|
5095
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
5096
|
+
generateAppProofs: generateAppProofs ?? false,
|
|
5097
|
+
type: "ACTIVITY_TYPE_ETH_SEND_TRANSACTION",
|
|
5098
|
+
}, "ethSendTransactionResult", stampWith);
|
|
5099
|
+
};
|
|
5100
|
+
this.stampEthSendTransaction = async (input, stampWith) => {
|
|
5101
|
+
const activeStamper = this.getStamper(stampWith);
|
|
5102
|
+
if (!activeStamper) {
|
|
5103
|
+
return undefined;
|
|
5104
|
+
}
|
|
5105
|
+
const { organizationId, timestampMs, ...parameters } = input;
|
|
5106
|
+
const session = await this.storageManager?.getActiveSession();
|
|
5107
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/eth_send_transaction";
|
|
5108
|
+
const bodyWithType = {
|
|
5109
|
+
parameters,
|
|
5110
|
+
organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
|
|
5111
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
5112
|
+
type: "ACTIVITY_TYPE_ETH_SEND_TRANSACTION",
|
|
5113
|
+
};
|
|
5114
|
+
const stringifiedBody = JSON.stringify(bodyWithType);
|
|
5115
|
+
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
5116
|
+
return {
|
|
5117
|
+
body: stringifiedBody,
|
|
5118
|
+
stamp: stamp,
|
|
5119
|
+
url: fullUrl,
|
|
5120
|
+
};
|
|
5121
|
+
};
|
|
5122
|
+
this.ethSendTransactionV2 = async (input, stampWith) => {
|
|
5123
|
+
const { organizationId, timestampMs, ...rest } = input;
|
|
5124
|
+
//@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
|
|
5125
|
+
const generateAppProofs = input?.generateAppProofs ?? false;
|
|
5126
|
+
const session = await this.storageManager?.getActiveSession();
|
|
5127
|
+
return this.activity("/public/v1/submit/eth_send_transaction", {
|
|
5128
|
+
parameters: rest,
|
|
5129
|
+
organizationId: organizationId ??
|
|
5130
|
+
session?.organizationId ??
|
|
5131
|
+
this.config.organizationId,
|
|
5132
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
5133
|
+
generateAppProofs: generateAppProofs ?? false,
|
|
5134
|
+
type: "ACTIVITY_TYPE_ETH_SEND_TRANSACTION_V2",
|
|
5135
|
+
}, "ethSendTransactionResultV2", stampWith);
|
|
5136
|
+
};
|
|
5137
|
+
this.stampEthSendTransactionV2 = async (input, stampWith) => {
|
|
5138
|
+
const activeStamper = this.getStamper(stampWith);
|
|
5139
|
+
if (!activeStamper) {
|
|
5140
|
+
return undefined;
|
|
5141
|
+
}
|
|
5142
|
+
const { organizationId, timestampMs, ...parameters } = input;
|
|
5143
|
+
const session = await this.storageManager?.getActiveSession();
|
|
5144
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/eth_send_transaction";
|
|
5145
|
+
const bodyWithType = {
|
|
5146
|
+
parameters,
|
|
5147
|
+
organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
|
|
5148
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
5149
|
+
type: "ACTIVITY_TYPE_ETH_SEND_TRANSACTION_V2",
|
|
5150
|
+
};
|
|
5151
|
+
const stringifiedBody = JSON.stringify(bodyWithType);
|
|
5152
|
+
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
5153
|
+
return {
|
|
5154
|
+
body: stringifiedBody,
|
|
5155
|
+
stamp: stamp,
|
|
5156
|
+
url: fullUrl,
|
|
5157
|
+
};
|
|
5158
|
+
};
|
|
4764
5159
|
this.proxyGetAccount = async (input) => {
|
|
4765
5160
|
return this.authProxyRequest("/v1/account", input);
|
|
4766
5161
|
};
|