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