@turnkey/core 2.4.0 → 2.5.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 +10 -0
- package/dist/__generated__/sdk-client-base.d.ts.map +1 -1
- package/dist/__generated__/sdk-client-base.js +171 -0
- package/dist/__generated__/sdk-client-base.js.map +1 -1
- package/dist/__generated__/sdk-client-base.mjs +171 -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 +7 -7
|
@@ -215,6 +215,36 @@ class TurnkeySDKClientBase {
|
|
|
215
215
|
url: fullUrl,
|
|
216
216
|
};
|
|
217
217
|
};
|
|
218
|
+
this.getClaimEarnFeesStatus = async (input, stampWith) => {
|
|
219
|
+
const session = await this.storageManager?.getActiveSession();
|
|
220
|
+
return this.request("/public/v1/query/get_claim_earn_fees_status", {
|
|
221
|
+
...input,
|
|
222
|
+
organizationId: input.organizationId ??
|
|
223
|
+
session?.organizationId ??
|
|
224
|
+
this.config.organizationId,
|
|
225
|
+
}, stampWith);
|
|
226
|
+
};
|
|
227
|
+
this.stampGetClaimEarnFeesStatus = async (input, stampWith) => {
|
|
228
|
+
const activeStamper = this.getStamper(stampWith);
|
|
229
|
+
if (!activeStamper) {
|
|
230
|
+
return undefined;
|
|
231
|
+
}
|
|
232
|
+
const session = await this.storageManager?.getActiveSession();
|
|
233
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_claim_earn_fees_status";
|
|
234
|
+
const body = {
|
|
235
|
+
...input,
|
|
236
|
+
organizationId: input.organizationId ??
|
|
237
|
+
session?.organizationId ??
|
|
238
|
+
this.config.organizationId,
|
|
239
|
+
};
|
|
240
|
+
const stringifiedBody = JSON.stringify(body);
|
|
241
|
+
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
242
|
+
return {
|
|
243
|
+
body: stringifiedBody,
|
|
244
|
+
stamp: stamp,
|
|
245
|
+
url: fullUrl,
|
|
246
|
+
};
|
|
247
|
+
};
|
|
218
248
|
this.getEarnDeployStatus = async (input, stampWith) => {
|
|
219
249
|
const session = await this.storageManager?.getActiveSession();
|
|
220
250
|
return this.request("/public/v1/query/get_earn_deploy_status", {
|
|
@@ -845,6 +875,36 @@ class TurnkeySDKClientBase {
|
|
|
845
875
|
url: fullUrl,
|
|
846
876
|
};
|
|
847
877
|
};
|
|
878
|
+
this.getSwapStatus = async (input, stampWith) => {
|
|
879
|
+
const session = await this.storageManager?.getActiveSession();
|
|
880
|
+
return this.request("/public/v1/query/get_swap_status", {
|
|
881
|
+
...input,
|
|
882
|
+
organizationId: input.organizationId ??
|
|
883
|
+
session?.organizationId ??
|
|
884
|
+
this.config.organizationId,
|
|
885
|
+
}, stampWith);
|
|
886
|
+
};
|
|
887
|
+
this.stampGetSwapStatus = async (input, stampWith) => {
|
|
888
|
+
const activeStamper = this.getStamper(stampWith);
|
|
889
|
+
if (!activeStamper) {
|
|
890
|
+
return undefined;
|
|
891
|
+
}
|
|
892
|
+
const session = await this.storageManager?.getActiveSession();
|
|
893
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_swap_status";
|
|
894
|
+
const body = {
|
|
895
|
+
...input,
|
|
896
|
+
organizationId: input.organizationId ??
|
|
897
|
+
session?.organizationId ??
|
|
898
|
+
this.config.organizationId,
|
|
899
|
+
};
|
|
900
|
+
const stringifiedBody = JSON.stringify(body);
|
|
901
|
+
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
902
|
+
return {
|
|
903
|
+
body: stringifiedBody,
|
|
904
|
+
stamp: stamp,
|
|
905
|
+
url: fullUrl,
|
|
906
|
+
};
|
|
907
|
+
};
|
|
848
908
|
this.getTvcApp = async (input, stampWith) => {
|
|
849
909
|
const session = await this.storageManager?.getActiveSession();
|
|
850
910
|
return this.request("/public/v1/query/get_tvc_app", {
|
|
@@ -1909,6 +1969,43 @@ class TurnkeySDKClientBase {
|
|
|
1909
1969
|
url: fullUrl,
|
|
1910
1970
|
};
|
|
1911
1971
|
};
|
|
1972
|
+
this.claimSwapFees = async (input, stampWith) => {
|
|
1973
|
+
const { organizationId, timestampMs, ...rest } = input;
|
|
1974
|
+
//@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
|
|
1975
|
+
const generateAppProofs = input?.generateAppProofs ?? false;
|
|
1976
|
+
const session = await this.storageManager?.getActiveSession();
|
|
1977
|
+
return this.activity("/public/v1/submit/claim_swap_fees", {
|
|
1978
|
+
parameters: rest,
|
|
1979
|
+
organizationId: organizationId ??
|
|
1980
|
+
session?.organizationId ??
|
|
1981
|
+
this.config.organizationId,
|
|
1982
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
1983
|
+
generateAppProofs: generateAppProofs ?? false,
|
|
1984
|
+
type: "ACTIVITY_TYPE_CLAIM_SWAP_FEES",
|
|
1985
|
+
}, "claimSwapFeesResult", stampWith);
|
|
1986
|
+
};
|
|
1987
|
+
this.stampClaimSwapFees = async (input, stampWith) => {
|
|
1988
|
+
const activeStamper = this.getStamper(stampWith);
|
|
1989
|
+
if (!activeStamper) {
|
|
1990
|
+
return undefined;
|
|
1991
|
+
}
|
|
1992
|
+
const { organizationId, timestampMs, ...parameters } = input;
|
|
1993
|
+
const session = await this.storageManager?.getActiveSession();
|
|
1994
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/claim_swap_fees";
|
|
1995
|
+
const bodyWithType = {
|
|
1996
|
+
parameters,
|
|
1997
|
+
organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
|
|
1998
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
1999
|
+
type: "ACTIVITY_TYPE_CLAIM_SWAP_FEES",
|
|
2000
|
+
};
|
|
2001
|
+
const stringifiedBody = JSON.stringify(bodyWithType);
|
|
2002
|
+
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
2003
|
+
return {
|
|
2004
|
+
body: stringifiedBody,
|
|
2005
|
+
stamp: stamp,
|
|
2006
|
+
url: fullUrl,
|
|
2007
|
+
};
|
|
2008
|
+
};
|
|
1912
2009
|
this.createApiKeys = async (input, stampWith) => {
|
|
1913
2010
|
const { organizationId, timestampMs, ...rest } = input;
|
|
1914
2011
|
//@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
|
|
@@ -3728,6 +3825,43 @@ class TurnkeySDKClientBase {
|
|
|
3728
3825
|
url: fullUrl,
|
|
3729
3826
|
};
|
|
3730
3827
|
};
|
|
3828
|
+
this.ethUndelegate7702 = async (input, stampWith) => {
|
|
3829
|
+
const { organizationId, timestampMs, ...rest } = input;
|
|
3830
|
+
//@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
|
|
3831
|
+
const generateAppProofs = input?.generateAppProofs ?? false;
|
|
3832
|
+
const session = await this.storageManager?.getActiveSession();
|
|
3833
|
+
return this.activity("/public/v1/submit/eth_undelegate_7702", {
|
|
3834
|
+
parameters: rest,
|
|
3835
|
+
organizationId: organizationId ??
|
|
3836
|
+
session?.organizationId ??
|
|
3837
|
+
this.config.organizationId,
|
|
3838
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
3839
|
+
generateAppProofs: generateAppProofs ?? false,
|
|
3840
|
+
type: "ACTIVITY_TYPE_ETH_UNDELEGATE_7702",
|
|
3841
|
+
}, "ethUndelegate7702Result", stampWith);
|
|
3842
|
+
};
|
|
3843
|
+
this.stampEthUndelegate7702 = async (input, stampWith) => {
|
|
3844
|
+
const activeStamper = this.getStamper(stampWith);
|
|
3845
|
+
if (!activeStamper) {
|
|
3846
|
+
return undefined;
|
|
3847
|
+
}
|
|
3848
|
+
const { organizationId, timestampMs, ...parameters } = input;
|
|
3849
|
+
const session = await this.storageManager?.getActiveSession();
|
|
3850
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/eth_undelegate_7702";
|
|
3851
|
+
const bodyWithType = {
|
|
3852
|
+
parameters,
|
|
3853
|
+
organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
|
|
3854
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
3855
|
+
type: "ACTIVITY_TYPE_ETH_UNDELEGATE_7702",
|
|
3856
|
+
};
|
|
3857
|
+
const stringifiedBody = JSON.stringify(bodyWithType);
|
|
3858
|
+
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
3859
|
+
return {
|
|
3860
|
+
body: stringifiedBody,
|
|
3861
|
+
stamp: stamp,
|
|
3862
|
+
url: fullUrl,
|
|
3863
|
+
};
|
|
3864
|
+
};
|
|
3731
3865
|
this.exportPrivateKey = async (input, stampWith) => {
|
|
3732
3866
|
const { organizationId, timestampMs, ...rest } = input;
|
|
3733
3867
|
//@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
|
|
@@ -5431,6 +5565,43 @@ class TurnkeySDKClientBase {
|
|
|
5431
5565
|
url: fullUrl,
|
|
5432
5566
|
};
|
|
5433
5567
|
};
|
|
5568
|
+
this.upsertSwapConfig = async (input, stampWith) => {
|
|
5569
|
+
const { organizationId, timestampMs, ...rest } = input;
|
|
5570
|
+
//@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
|
|
5571
|
+
const generateAppProofs = input?.generateAppProofs ?? false;
|
|
5572
|
+
const session = await this.storageManager?.getActiveSession();
|
|
5573
|
+
return this.activity("/public/v1/submit/upsert_swap_config", {
|
|
5574
|
+
parameters: rest,
|
|
5575
|
+
organizationId: organizationId ??
|
|
5576
|
+
session?.organizationId ??
|
|
5577
|
+
this.config.organizationId,
|
|
5578
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
5579
|
+
generateAppProofs: generateAppProofs ?? false,
|
|
5580
|
+
type: "ACTIVITY_TYPE_UPSERT_SWAP_CONFIG",
|
|
5581
|
+
}, "upsertSwapConfigResult", stampWith);
|
|
5582
|
+
};
|
|
5583
|
+
this.stampUpsertSwapConfig = async (input, stampWith) => {
|
|
5584
|
+
const activeStamper = this.getStamper(stampWith);
|
|
5585
|
+
if (!activeStamper) {
|
|
5586
|
+
return undefined;
|
|
5587
|
+
}
|
|
5588
|
+
const { organizationId, timestampMs, ...parameters } = input;
|
|
5589
|
+
const session = await this.storageManager?.getActiveSession();
|
|
5590
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/upsert_swap_config";
|
|
5591
|
+
const bodyWithType = {
|
|
5592
|
+
parameters,
|
|
5593
|
+
organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
|
|
5594
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
5595
|
+
type: "ACTIVITY_TYPE_UPSERT_SWAP_CONFIG",
|
|
5596
|
+
};
|
|
5597
|
+
const stringifiedBody = JSON.stringify(bodyWithType);
|
|
5598
|
+
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
5599
|
+
return {
|
|
5600
|
+
body: stringifiedBody,
|
|
5601
|
+
stamp: stamp,
|
|
5602
|
+
url: fullUrl,
|
|
5603
|
+
};
|
|
5604
|
+
};
|
|
5434
5605
|
this.verifyOtp = async (input, stampWith) => {
|
|
5435
5606
|
const { organizationId, timestampMs, ...rest } = input;
|
|
5436
5607
|
//@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
|