@turnkey/core 2.8.1 → 2.9.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/__generated__/sdk-client-base.d.ts +12 -0
- package/dist/__generated__/sdk-client-base.d.ts.map +1 -1
- package/dist/__generated__/sdk-client-base.js +205 -4
- package/dist/__generated__/sdk-client-base.js.map +1 -1
- package/dist/__generated__/sdk-client-base.mjs +205 -4
- 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/package.json +7 -7
|
@@ -5,6 +5,36 @@ import { StamperType } from '../__types__/enums.mjs';
|
|
|
5
5
|
/* @generated by codegen. DO NOT EDIT BY HAND */
|
|
6
6
|
class TurnkeySDKClientBase {
|
|
7
7
|
constructor(config) {
|
|
8
|
+
this.getActivePolicies = async (input, stampWith) => {
|
|
9
|
+
const session = await this.storageManager?.getActiveSession();
|
|
10
|
+
return this.request("/public/v1/query/get_active_policies", {
|
|
11
|
+
...input,
|
|
12
|
+
organizationId: input.organizationId ??
|
|
13
|
+
session?.organizationId ??
|
|
14
|
+
this.config.organizationId,
|
|
15
|
+
}, stampWith);
|
|
16
|
+
};
|
|
17
|
+
this.stampGetActivePolicies = async (input, stampWith) => {
|
|
18
|
+
const activeStamper = this.getStamper(stampWith);
|
|
19
|
+
if (!activeStamper) {
|
|
20
|
+
return undefined;
|
|
21
|
+
}
|
|
22
|
+
const session = await this.storageManager?.getActiveSession();
|
|
23
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_active_policies";
|
|
24
|
+
const body = {
|
|
25
|
+
...input,
|
|
26
|
+
organizationId: input.organizationId ??
|
|
27
|
+
session?.organizationId ??
|
|
28
|
+
this.config.organizationId,
|
|
29
|
+
};
|
|
30
|
+
const stringifiedBody = JSON.stringify(body);
|
|
31
|
+
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
32
|
+
return {
|
|
33
|
+
body: stringifiedBody,
|
|
34
|
+
stamp: stamp,
|
|
35
|
+
url: fullUrl,
|
|
36
|
+
};
|
|
37
|
+
};
|
|
8
38
|
this.getActivity = async (input, stampWith) => {
|
|
9
39
|
const session = await this.storageManager?.getActiveSession();
|
|
10
40
|
return this.request("/public/v1/query/get_activity", {
|
|
@@ -1055,6 +1085,36 @@ class TurnkeySDKClientBase {
|
|
|
1055
1085
|
url: fullUrl,
|
|
1056
1086
|
};
|
|
1057
1087
|
};
|
|
1088
|
+
this.getVelocityControl = async (input, stampWith) => {
|
|
1089
|
+
const session = await this.storageManager?.getActiveSession();
|
|
1090
|
+
return this.request("/public/v1/query/get_velocity_control", {
|
|
1091
|
+
...input,
|
|
1092
|
+
organizationId: input.organizationId ??
|
|
1093
|
+
session?.organizationId ??
|
|
1094
|
+
this.config.organizationId,
|
|
1095
|
+
}, stampWith);
|
|
1096
|
+
};
|
|
1097
|
+
this.stampGetVelocityControl = async (input, stampWith) => {
|
|
1098
|
+
const activeStamper = this.getStamper(stampWith);
|
|
1099
|
+
if (!activeStamper) {
|
|
1100
|
+
return undefined;
|
|
1101
|
+
}
|
|
1102
|
+
const session = await this.storageManager?.getActiveSession();
|
|
1103
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_velocity_control";
|
|
1104
|
+
const body = {
|
|
1105
|
+
...input,
|
|
1106
|
+
organizationId: input.organizationId ??
|
|
1107
|
+
session?.organizationId ??
|
|
1108
|
+
this.config.organizationId,
|
|
1109
|
+
};
|
|
1110
|
+
const stringifiedBody = JSON.stringify(body);
|
|
1111
|
+
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
1112
|
+
return {
|
|
1113
|
+
body: stringifiedBody,
|
|
1114
|
+
stamp: stamp,
|
|
1115
|
+
url: fullUrl,
|
|
1116
|
+
};
|
|
1117
|
+
};
|
|
1058
1118
|
this.getWallet = async (input, stampWith) => {
|
|
1059
1119
|
const session = await this.storageManager?.getActiveSession();
|
|
1060
1120
|
return this.request("/public/v1/query/get_wallet", {
|
|
@@ -1776,6 +1836,36 @@ class TurnkeySDKClientBase {
|
|
|
1776
1836
|
url: fullUrl,
|
|
1777
1837
|
};
|
|
1778
1838
|
};
|
|
1839
|
+
this.listVelocityControls = async (input, stampWith) => {
|
|
1840
|
+
const session = await this.storageManager?.getActiveSession();
|
|
1841
|
+
return this.request("/public/v1/query/list_velocity_controls", {
|
|
1842
|
+
...input,
|
|
1843
|
+
organizationId: input.organizationId ??
|
|
1844
|
+
session?.organizationId ??
|
|
1845
|
+
this.config.organizationId,
|
|
1846
|
+
}, stampWith);
|
|
1847
|
+
};
|
|
1848
|
+
this.stampListVelocityControls = async (input, stampWith) => {
|
|
1849
|
+
const activeStamper = this.getStamper(stampWith);
|
|
1850
|
+
if (!activeStamper) {
|
|
1851
|
+
return undefined;
|
|
1852
|
+
}
|
|
1853
|
+
const session = await this.storageManager?.getActiveSession();
|
|
1854
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/query/list_velocity_controls";
|
|
1855
|
+
const body = {
|
|
1856
|
+
...input,
|
|
1857
|
+
organizationId: input.organizationId ??
|
|
1858
|
+
session?.organizationId ??
|
|
1859
|
+
this.config.organizationId,
|
|
1860
|
+
};
|
|
1861
|
+
const stringifiedBody = JSON.stringify(body);
|
|
1862
|
+
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
1863
|
+
return {
|
|
1864
|
+
body: stringifiedBody,
|
|
1865
|
+
stamp: stamp,
|
|
1866
|
+
url: fullUrl,
|
|
1867
|
+
};
|
|
1868
|
+
};
|
|
1779
1869
|
this.getVerifiedSubOrgIds = async (input, stampWith) => {
|
|
1780
1870
|
const session = await this.storageManager?.getActiveSession();
|
|
1781
1871
|
return this.request("/public/v1/query/list_verified_suborgs", {
|
|
@@ -2672,7 +2762,7 @@ class TurnkeySDKClientBase {
|
|
|
2672
2762
|
this.config.organizationId,
|
|
2673
2763
|
timestampMs: timestampMs ?? String(Date.now()),
|
|
2674
2764
|
generateAppProofs: generateAppProofs ?? false,
|
|
2675
|
-
type: "
|
|
2765
|
+
type: "ACTIVITY_TYPE_CREATE_SWAP_QUOTE_V2",
|
|
2676
2766
|
}, "createSwapQuoteResult", stampWith);
|
|
2677
2767
|
};
|
|
2678
2768
|
this.stampCreateSwapQuote = async (input, stampWith) => {
|
|
@@ -2687,7 +2777,7 @@ class TurnkeySDKClientBase {
|
|
|
2687
2777
|
parameters,
|
|
2688
2778
|
organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
|
|
2689
2779
|
timestampMs: timestampMs ?? String(Date.now()),
|
|
2690
|
-
type: "
|
|
2780
|
+
type: "ACTIVITY_TYPE_CREATE_SWAP_QUOTE_V2",
|
|
2691
2781
|
};
|
|
2692
2782
|
const stringifiedBody = JSON.stringify(bodyWithType);
|
|
2693
2783
|
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
@@ -2883,6 +2973,43 @@ class TurnkeySDKClientBase {
|
|
|
2883
2973
|
url: fullUrl,
|
|
2884
2974
|
};
|
|
2885
2975
|
};
|
|
2976
|
+
this.createVelocityControl = async (input, stampWith) => {
|
|
2977
|
+
const { organizationId, timestampMs, ...rest } = input;
|
|
2978
|
+
//@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
|
|
2979
|
+
const generateAppProofs = input?.generateAppProofs ?? false;
|
|
2980
|
+
const session = await this.storageManager?.getActiveSession();
|
|
2981
|
+
return this.activity("/public/v1/submit/create_velocity_control", {
|
|
2982
|
+
parameters: rest,
|
|
2983
|
+
organizationId: organizationId ??
|
|
2984
|
+
session?.organizationId ??
|
|
2985
|
+
this.config.organizationId,
|
|
2986
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
2987
|
+
generateAppProofs: generateAppProofs ?? false,
|
|
2988
|
+
type: "ACTIVITY_TYPE_CREATE_VELOCITY_CONTROL",
|
|
2989
|
+
}, "createVelocityControlResult", stampWith);
|
|
2990
|
+
};
|
|
2991
|
+
this.stampCreateVelocityControl = async (input, stampWith) => {
|
|
2992
|
+
const activeStamper = this.getStamper(stampWith);
|
|
2993
|
+
if (!activeStamper) {
|
|
2994
|
+
return undefined;
|
|
2995
|
+
}
|
|
2996
|
+
const { organizationId, timestampMs, ...parameters } = input;
|
|
2997
|
+
const session = await this.storageManager?.getActiveSession();
|
|
2998
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_velocity_control";
|
|
2999
|
+
const bodyWithType = {
|
|
3000
|
+
parameters,
|
|
3001
|
+
organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
|
|
3002
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
3003
|
+
type: "ACTIVITY_TYPE_CREATE_VELOCITY_CONTROL",
|
|
3004
|
+
};
|
|
3005
|
+
const stringifiedBody = JSON.stringify(bodyWithType);
|
|
3006
|
+
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
3007
|
+
return {
|
|
3008
|
+
body: stringifiedBody,
|
|
3009
|
+
stamp: stamp,
|
|
3010
|
+
url: fullUrl,
|
|
3011
|
+
};
|
|
3012
|
+
};
|
|
2886
3013
|
this.createWallet = async (input, stampWith) => {
|
|
2887
3014
|
const { organizationId, timestampMs, ...rest } = input;
|
|
2888
3015
|
//@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
|
|
@@ -3626,6 +3753,43 @@ class TurnkeySDKClientBase {
|
|
|
3626
3753
|
url: fullUrl,
|
|
3627
3754
|
};
|
|
3628
3755
|
};
|
|
3756
|
+
this.deleteVelocityControl = async (input, stampWith) => {
|
|
3757
|
+
const { organizationId, timestampMs, ...rest } = input;
|
|
3758
|
+
//@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
|
|
3759
|
+
const generateAppProofs = input?.generateAppProofs ?? false;
|
|
3760
|
+
const session = await this.storageManager?.getActiveSession();
|
|
3761
|
+
return this.activity("/public/v1/submit/delete_velocity_control", {
|
|
3762
|
+
parameters: rest,
|
|
3763
|
+
organizationId: organizationId ??
|
|
3764
|
+
session?.organizationId ??
|
|
3765
|
+
this.config.organizationId,
|
|
3766
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
3767
|
+
generateAppProofs: generateAppProofs ?? false,
|
|
3768
|
+
type: "ACTIVITY_TYPE_DELETE_VELOCITY_CONTROL",
|
|
3769
|
+
}, "deleteVelocityControlResult", stampWith);
|
|
3770
|
+
};
|
|
3771
|
+
this.stampDeleteVelocityControl = async (input, stampWith) => {
|
|
3772
|
+
const activeStamper = this.getStamper(stampWith);
|
|
3773
|
+
if (!activeStamper) {
|
|
3774
|
+
return undefined;
|
|
3775
|
+
}
|
|
3776
|
+
const { organizationId, timestampMs, ...parameters } = input;
|
|
3777
|
+
const session = await this.storageManager?.getActiveSession();
|
|
3778
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/delete_velocity_control";
|
|
3779
|
+
const bodyWithType = {
|
|
3780
|
+
parameters,
|
|
3781
|
+
organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
|
|
3782
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
3783
|
+
type: "ACTIVITY_TYPE_DELETE_VELOCITY_CONTROL",
|
|
3784
|
+
};
|
|
3785
|
+
const stringifiedBody = JSON.stringify(bodyWithType);
|
|
3786
|
+
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
3787
|
+
return {
|
|
3788
|
+
body: stringifiedBody,
|
|
3789
|
+
stamp: stamp,
|
|
3790
|
+
url: fullUrl,
|
|
3791
|
+
};
|
|
3792
|
+
};
|
|
3629
3793
|
this.deleteWalletAccounts = async (input, stampWith) => {
|
|
3630
3794
|
const { organizationId, timestampMs, ...rest } = input;
|
|
3631
3795
|
//@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
|
|
@@ -3971,7 +4135,7 @@ class TurnkeySDKClientBase {
|
|
|
3971
4135
|
this.config.organizationId,
|
|
3972
4136
|
timestampMs: timestampMs ?? String(Date.now()),
|
|
3973
4137
|
generateAppProofs: generateAppProofs ?? false,
|
|
3974
|
-
type: "
|
|
4138
|
+
type: "ACTIVITY_TYPE_EXECUTE_SWAP_V3",
|
|
3975
4139
|
}, "executeSwapResult", stampWith);
|
|
3976
4140
|
};
|
|
3977
4141
|
this.stampExecuteSwap = async (input, stampWith) => {
|
|
@@ -3986,7 +4150,7 @@ class TurnkeySDKClientBase {
|
|
|
3986
4150
|
parameters,
|
|
3987
4151
|
organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
|
|
3988
4152
|
timestampMs: timestampMs ?? String(Date.now()),
|
|
3989
|
-
type: "
|
|
4153
|
+
type: "ACTIVITY_TYPE_EXECUTE_SWAP_V3",
|
|
3990
4154
|
};
|
|
3991
4155
|
const stringifiedBody = JSON.stringify(bodyWithType);
|
|
3992
4156
|
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
@@ -4329,6 +4493,43 @@ class TurnkeySDKClientBase {
|
|
|
4329
4493
|
url: fullUrl,
|
|
4330
4494
|
};
|
|
4331
4495
|
};
|
|
4496
|
+
this.initImportSecrets = async (input, stampWith) => {
|
|
4497
|
+
const { organizationId, timestampMs, ...rest } = input;
|
|
4498
|
+
//@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
|
|
4499
|
+
const generateAppProofs = input?.generateAppProofs ?? false;
|
|
4500
|
+
const session = await this.storageManager?.getActiveSession();
|
|
4501
|
+
return this.activity("/public/v1/submit/init_import_secrets", {
|
|
4502
|
+
parameters: rest,
|
|
4503
|
+
organizationId: organizationId ??
|
|
4504
|
+
session?.organizationId ??
|
|
4505
|
+
this.config.organizationId,
|
|
4506
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
4507
|
+
generateAppProofs: generateAppProofs ?? false,
|
|
4508
|
+
type: "ACTIVITY_TYPE_INIT_IMPORT_SECRETS",
|
|
4509
|
+
}, "initImportSecretsResult", stampWith);
|
|
4510
|
+
};
|
|
4511
|
+
this.stampInitImportSecrets = async (input, stampWith) => {
|
|
4512
|
+
const activeStamper = this.getStamper(stampWith);
|
|
4513
|
+
if (!activeStamper) {
|
|
4514
|
+
return undefined;
|
|
4515
|
+
}
|
|
4516
|
+
const { organizationId, timestampMs, ...parameters } = input;
|
|
4517
|
+
const session = await this.storageManager?.getActiveSession();
|
|
4518
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/init_import_secrets";
|
|
4519
|
+
const bodyWithType = {
|
|
4520
|
+
parameters,
|
|
4521
|
+
organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
|
|
4522
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
4523
|
+
type: "ACTIVITY_TYPE_INIT_IMPORT_SECRETS",
|
|
4524
|
+
};
|
|
4525
|
+
const stringifiedBody = JSON.stringify(bodyWithType);
|
|
4526
|
+
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
4527
|
+
return {
|
|
4528
|
+
body: stringifiedBody,
|
|
4529
|
+
stamp: stamp,
|
|
4530
|
+
url: fullUrl,
|
|
4531
|
+
};
|
|
4532
|
+
};
|
|
4332
4533
|
this.initImportWallet = async (input, stampWith) => {
|
|
4333
4534
|
const { organizationId, timestampMs, ...rest } = input;
|
|
4334
4535
|
//@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
|