@turnkey/core 2.5.0 → 2.6.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 +15 -1
- package/dist/__clients__/core.d.ts.map +1 -1
- package/dist/__clients__/core.js +15 -1
- package/dist/__clients__/core.js.map +1 -1
- package/dist/__clients__/core.mjs +15 -1
- 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 +208 -0
- package/dist/__generated__/sdk-client-base.js.map +1 -1
- package/dist/__generated__/sdk-client-base.mjs +208 -0
- 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 +6 -6
|
@@ -997,6 +997,36 @@ class TurnkeySDKClientBase {
|
|
|
997
997
|
url: fullUrl,
|
|
998
998
|
};
|
|
999
999
|
};
|
|
1000
|
+
this.getTvcQosVersions = async (input, stampWith) => {
|
|
1001
|
+
const session = await this.storageManager?.getActiveSession();
|
|
1002
|
+
return this.request("/public/v1/query/get_tvc_qos_versions", {
|
|
1003
|
+
...input,
|
|
1004
|
+
organizationId: input.organizationId ??
|
|
1005
|
+
session?.organizationId ??
|
|
1006
|
+
this.config.organizationId,
|
|
1007
|
+
}, stampWith);
|
|
1008
|
+
};
|
|
1009
|
+
this.stampGetTvcQosVersions = async (input, stampWith) => {
|
|
1010
|
+
const activeStamper = this.getStamper(stampWith);
|
|
1011
|
+
if (!activeStamper) {
|
|
1012
|
+
return undefined;
|
|
1013
|
+
}
|
|
1014
|
+
const session = await this.storageManager?.getActiveSession();
|
|
1015
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_tvc_qos_versions";
|
|
1016
|
+
const body = {
|
|
1017
|
+
...input,
|
|
1018
|
+
organizationId: input.organizationId ??
|
|
1019
|
+
session?.organizationId ??
|
|
1020
|
+
this.config.organizationId,
|
|
1021
|
+
};
|
|
1022
|
+
const stringifiedBody = JSON.stringify(body);
|
|
1023
|
+
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
1024
|
+
return {
|
|
1025
|
+
body: stringifiedBody,
|
|
1026
|
+
stamp: stamp,
|
|
1027
|
+
url: fullUrl,
|
|
1028
|
+
};
|
|
1029
|
+
};
|
|
1000
1030
|
this.getUser = async (input, stampWith) => {
|
|
1001
1031
|
const session = await this.storageManager?.getActiveSession();
|
|
1002
1032
|
return this.request("/public/v1/query/get_user", {
|
|
@@ -1477,6 +1507,36 @@ class TurnkeySDKClientBase {
|
|
|
1477
1507
|
url: fullUrl,
|
|
1478
1508
|
};
|
|
1479
1509
|
};
|
|
1510
|
+
this.listSecrets = async (input, stampWith) => {
|
|
1511
|
+
const session = await this.storageManager?.getActiveSession();
|
|
1512
|
+
return this.request("/public/v1/query/list_secrets", {
|
|
1513
|
+
...input,
|
|
1514
|
+
organizationId: input.organizationId ??
|
|
1515
|
+
session?.organizationId ??
|
|
1516
|
+
this.config.organizationId,
|
|
1517
|
+
}, stampWith);
|
|
1518
|
+
};
|
|
1519
|
+
this.stampListSecrets = async (input, stampWith) => {
|
|
1520
|
+
const activeStamper = this.getStamper(stampWith);
|
|
1521
|
+
if (!activeStamper) {
|
|
1522
|
+
return undefined;
|
|
1523
|
+
}
|
|
1524
|
+
const session = await this.storageManager?.getActiveSession();
|
|
1525
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/query/list_secrets";
|
|
1526
|
+
const body = {
|
|
1527
|
+
...input,
|
|
1528
|
+
organizationId: input.organizationId ??
|
|
1529
|
+
session?.organizationId ??
|
|
1530
|
+
this.config.organizationId,
|
|
1531
|
+
};
|
|
1532
|
+
const stringifiedBody = JSON.stringify(body);
|
|
1533
|
+
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
1534
|
+
return {
|
|
1535
|
+
body: stringifiedBody,
|
|
1536
|
+
stamp: stamp,
|
|
1537
|
+
url: fullUrl,
|
|
1538
|
+
};
|
|
1539
|
+
};
|
|
1480
1540
|
this.getSmartContractInterfaces = async (input, stampWith) => {
|
|
1481
1541
|
const session = await this.storageManager?.getActiveSession();
|
|
1482
1542
|
return this.request("/public/v1/query/list_smart_contract_interfaces", {
|
|
@@ -2602,6 +2662,43 @@ class TurnkeySDKClientBase {
|
|
|
2602
2662
|
url: fullUrl,
|
|
2603
2663
|
};
|
|
2604
2664
|
};
|
|
2665
|
+
this.createSwapQuote = async (input, stampWith) => {
|
|
2666
|
+
const { organizationId, timestampMs, ...rest } = input;
|
|
2667
|
+
//@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
|
|
2668
|
+
const generateAppProofs = input?.generateAppProofs ?? false;
|
|
2669
|
+
const session = await this.storageManager?.getActiveSession();
|
|
2670
|
+
return this.activity("/public/v1/submit/create_swap_quote", {
|
|
2671
|
+
parameters: rest,
|
|
2672
|
+
organizationId: organizationId ??
|
|
2673
|
+
session?.organizationId ??
|
|
2674
|
+
this.config.organizationId,
|
|
2675
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
2676
|
+
generateAppProofs: generateAppProofs ?? false,
|
|
2677
|
+
type: "ACTIVITY_TYPE_CREATE_SWAP_QUOTE",
|
|
2678
|
+
}, "createSwapQuoteResult", stampWith);
|
|
2679
|
+
};
|
|
2680
|
+
this.stampCreateSwapQuote = async (input, stampWith) => {
|
|
2681
|
+
const activeStamper = this.getStamper(stampWith);
|
|
2682
|
+
if (!activeStamper) {
|
|
2683
|
+
return undefined;
|
|
2684
|
+
}
|
|
2685
|
+
const { organizationId, timestampMs, ...parameters } = input;
|
|
2686
|
+
const session = await this.storageManager?.getActiveSession();
|
|
2687
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_swap_quote";
|
|
2688
|
+
const bodyWithType = {
|
|
2689
|
+
parameters,
|
|
2690
|
+
organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
|
|
2691
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
2692
|
+
type: "ACTIVITY_TYPE_CREATE_SWAP_QUOTE",
|
|
2693
|
+
};
|
|
2694
|
+
const stringifiedBody = JSON.stringify(bodyWithType);
|
|
2695
|
+
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
2696
|
+
return {
|
|
2697
|
+
body: stringifiedBody,
|
|
2698
|
+
stamp: stamp,
|
|
2699
|
+
url: fullUrl,
|
|
2700
|
+
};
|
|
2701
|
+
};
|
|
2605
2702
|
this.createTvcApp = async (input, stampWith) => {
|
|
2606
2703
|
const { organizationId, timestampMs, ...rest } = input;
|
|
2607
2704
|
//@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
|
|
@@ -3864,6 +3961,43 @@ class TurnkeySDKClientBase {
|
|
|
3864
3961
|
url: fullUrl,
|
|
3865
3962
|
};
|
|
3866
3963
|
};
|
|
3964
|
+
this.executeSwap = async (input, stampWith) => {
|
|
3965
|
+
const { organizationId, timestampMs, ...rest } = input;
|
|
3966
|
+
//@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
|
|
3967
|
+
const generateAppProofs = input?.generateAppProofs ?? false;
|
|
3968
|
+
const session = await this.storageManager?.getActiveSession();
|
|
3969
|
+
return this.activity("/public/v1/submit/execute_swap", {
|
|
3970
|
+
parameters: rest,
|
|
3971
|
+
organizationId: organizationId ??
|
|
3972
|
+
session?.organizationId ??
|
|
3973
|
+
this.config.organizationId,
|
|
3974
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
3975
|
+
generateAppProofs: generateAppProofs ?? false,
|
|
3976
|
+
type: "ACTIVITY_TYPE_EXECUTE_SWAP_V2",
|
|
3977
|
+
}, "executeSwapResult", stampWith);
|
|
3978
|
+
};
|
|
3979
|
+
this.stampExecuteSwap = async (input, stampWith) => {
|
|
3980
|
+
const activeStamper = this.getStamper(stampWith);
|
|
3981
|
+
if (!activeStamper) {
|
|
3982
|
+
return undefined;
|
|
3983
|
+
}
|
|
3984
|
+
const { organizationId, timestampMs, ...parameters } = input;
|
|
3985
|
+
const session = await this.storageManager?.getActiveSession();
|
|
3986
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/execute_swap";
|
|
3987
|
+
const bodyWithType = {
|
|
3988
|
+
parameters,
|
|
3989
|
+
organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
|
|
3990
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
3991
|
+
type: "ACTIVITY_TYPE_EXECUTE_SWAP_V2",
|
|
3992
|
+
};
|
|
3993
|
+
const stringifiedBody = JSON.stringify(bodyWithType);
|
|
3994
|
+
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
3995
|
+
return {
|
|
3996
|
+
body: stringifiedBody,
|
|
3997
|
+
stamp: stamp,
|
|
3998
|
+
url: fullUrl,
|
|
3999
|
+
};
|
|
4000
|
+
};
|
|
3867
4001
|
this.exportPrivateKey = async (input, stampWith) => {
|
|
3868
4002
|
const { organizationId, timestampMs, ...rest } = input;
|
|
3869
4003
|
//@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
|
|
@@ -3901,6 +4035,43 @@ class TurnkeySDKClientBase {
|
|
|
3901
4035
|
url: fullUrl,
|
|
3902
4036
|
};
|
|
3903
4037
|
};
|
|
4038
|
+
this.exportSecrets = async (input, stampWith) => {
|
|
4039
|
+
const { organizationId, timestampMs, ...rest } = input;
|
|
4040
|
+
//@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
|
|
4041
|
+
const generateAppProofs = input?.generateAppProofs ?? false;
|
|
4042
|
+
const session = await this.storageManager?.getActiveSession();
|
|
4043
|
+
return this.activity("/public/v1/submit/export_secrets", {
|
|
4044
|
+
parameters: rest,
|
|
4045
|
+
organizationId: organizationId ??
|
|
4046
|
+
session?.organizationId ??
|
|
4047
|
+
this.config.organizationId,
|
|
4048
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
4049
|
+
generateAppProofs: generateAppProofs ?? false,
|
|
4050
|
+
type: "ACTIVITY_TYPE_EXPORT_SECRETS",
|
|
4051
|
+
}, "exportSecretsResult", stampWith);
|
|
4052
|
+
};
|
|
4053
|
+
this.stampExportSecrets = async (input, stampWith) => {
|
|
4054
|
+
const activeStamper = this.getStamper(stampWith);
|
|
4055
|
+
if (!activeStamper) {
|
|
4056
|
+
return undefined;
|
|
4057
|
+
}
|
|
4058
|
+
const { organizationId, timestampMs, ...parameters } = input;
|
|
4059
|
+
const session = await this.storageManager?.getActiveSession();
|
|
4060
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/export_secrets";
|
|
4061
|
+
const bodyWithType = {
|
|
4062
|
+
parameters,
|
|
4063
|
+
organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
|
|
4064
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
4065
|
+
type: "ACTIVITY_TYPE_EXPORT_SECRETS",
|
|
4066
|
+
};
|
|
4067
|
+
const stringifiedBody = JSON.stringify(bodyWithType);
|
|
4068
|
+
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
4069
|
+
return {
|
|
4070
|
+
body: stringifiedBody,
|
|
4071
|
+
stamp: stamp,
|
|
4072
|
+
url: fullUrl,
|
|
4073
|
+
};
|
|
4074
|
+
};
|
|
3904
4075
|
this.exportWallet = async (input, stampWith) => {
|
|
3905
4076
|
const { organizationId, timestampMs, ...rest } = input;
|
|
3906
4077
|
//@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
|
|
@@ -4012,6 +4183,43 @@ class TurnkeySDKClientBase {
|
|
|
4012
4183
|
url: fullUrl,
|
|
4013
4184
|
};
|
|
4014
4185
|
};
|
|
4186
|
+
this.importSecrets = async (input, stampWith) => {
|
|
4187
|
+
const { organizationId, timestampMs, ...rest } = input;
|
|
4188
|
+
//@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
|
|
4189
|
+
const generateAppProofs = input?.generateAppProofs ?? false;
|
|
4190
|
+
const session = await this.storageManager?.getActiveSession();
|
|
4191
|
+
return this.activity("/public/v1/submit/import_secrets", {
|
|
4192
|
+
parameters: rest,
|
|
4193
|
+
organizationId: organizationId ??
|
|
4194
|
+
session?.organizationId ??
|
|
4195
|
+
this.config.organizationId,
|
|
4196
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
4197
|
+
generateAppProofs: generateAppProofs ?? false,
|
|
4198
|
+
type: "ACTIVITY_TYPE_IMPORT_SECRETS",
|
|
4199
|
+
}, "importSecretsResult", stampWith);
|
|
4200
|
+
};
|
|
4201
|
+
this.stampImportSecrets = async (input, stampWith) => {
|
|
4202
|
+
const activeStamper = this.getStamper(stampWith);
|
|
4203
|
+
if (!activeStamper) {
|
|
4204
|
+
return undefined;
|
|
4205
|
+
}
|
|
4206
|
+
const { organizationId, timestampMs, ...parameters } = input;
|
|
4207
|
+
const session = await this.storageManager?.getActiveSession();
|
|
4208
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/import_secrets";
|
|
4209
|
+
const bodyWithType = {
|
|
4210
|
+
parameters,
|
|
4211
|
+
organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
|
|
4212
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
4213
|
+
type: "ACTIVITY_TYPE_IMPORT_SECRETS",
|
|
4214
|
+
};
|
|
4215
|
+
const stringifiedBody = JSON.stringify(bodyWithType);
|
|
4216
|
+
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
4217
|
+
return {
|
|
4218
|
+
body: stringifiedBody,
|
|
4219
|
+
stamp: stamp,
|
|
4220
|
+
url: fullUrl,
|
|
4221
|
+
};
|
|
4222
|
+
};
|
|
4015
4223
|
this.importWallet = async (input, stampWith) => {
|
|
4016
4224
|
const { organizationId, timestampMs, ...rest } = input;
|
|
4017
4225
|
//@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
|