@turnkey/sdk-browser 7.0.0 → 8.1.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.
@@ -224,6 +224,130 @@ class TurnkeySDKClientBase {
224
224
  url: fullUrl,
225
225
  };
226
226
  };
227
+ this.getClaimEarnFeesStatus = async (input) => {
228
+ const sessionData = await getStorageValue(StorageKeys.Session);
229
+ const session = sessionData ? parseSession(sessionData) : null;
230
+ return this.request("/public/v1/query/get_claim_earn_fees_status", {
231
+ ...input,
232
+ organizationId: input.organizationId ??
233
+ session?.organizationId ??
234
+ this.config.organizationId,
235
+ });
236
+ };
237
+ this.stampGetClaimEarnFeesStatus = async (input) => {
238
+ if (!this.stamper) {
239
+ return undefined;
240
+ }
241
+ const sessionData = await getStorageValue(StorageKeys.Session);
242
+ const session = sessionData ? parseSession(sessionData) : null;
243
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_claim_earn_fees_status";
244
+ const body = {
245
+ ...input,
246
+ organizationId: input.organizationId ??
247
+ session?.organizationId ??
248
+ this.config.organizationId,
249
+ };
250
+ const stringifiedBody = JSON.stringify(body);
251
+ const stamp = await this.stamper.stamp(stringifiedBody);
252
+ return {
253
+ body: stringifiedBody,
254
+ stamp: stamp,
255
+ url: fullUrl,
256
+ };
257
+ };
258
+ this.getEarnDeployStatus = async (input) => {
259
+ const sessionData = await getStorageValue(StorageKeys.Session);
260
+ const session = sessionData ? parseSession(sessionData) : null;
261
+ return this.request("/public/v1/query/get_earn_deploy_status", {
262
+ ...input,
263
+ organizationId: input.organizationId ??
264
+ session?.organizationId ??
265
+ this.config.organizationId,
266
+ });
267
+ };
268
+ this.stampGetEarnDeployStatus = async (input) => {
269
+ if (!this.stamper) {
270
+ return undefined;
271
+ }
272
+ const sessionData = await getStorageValue(StorageKeys.Session);
273
+ const session = sessionData ? parseSession(sessionData) : null;
274
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_earn_deploy_status";
275
+ const body = {
276
+ ...input,
277
+ organizationId: input.organizationId ??
278
+ session?.organizationId ??
279
+ this.config.organizationId,
280
+ };
281
+ const stringifiedBody = JSON.stringify(body);
282
+ const stamp = await this.stamper.stamp(stringifiedBody);
283
+ return {
284
+ body: stringifiedBody,
285
+ stamp: stamp,
286
+ url: fullUrl,
287
+ };
288
+ };
289
+ this.getEarnDepositStatus = async (input) => {
290
+ const sessionData = await getStorageValue(StorageKeys.Session);
291
+ const session = sessionData ? parseSession(sessionData) : null;
292
+ return this.request("/public/v1/query/get_earn_deposit_status", {
293
+ ...input,
294
+ organizationId: input.organizationId ??
295
+ session?.organizationId ??
296
+ this.config.organizationId,
297
+ });
298
+ };
299
+ this.stampGetEarnDepositStatus = async (input) => {
300
+ if (!this.stamper) {
301
+ return undefined;
302
+ }
303
+ const sessionData = await getStorageValue(StorageKeys.Session);
304
+ const session = sessionData ? parseSession(sessionData) : null;
305
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_earn_deposit_status";
306
+ const body = {
307
+ ...input,
308
+ organizationId: input.organizationId ??
309
+ session?.organizationId ??
310
+ this.config.organizationId,
311
+ };
312
+ const stringifiedBody = JSON.stringify(body);
313
+ const stamp = await this.stamper.stamp(stringifiedBody);
314
+ return {
315
+ body: stringifiedBody,
316
+ stamp: stamp,
317
+ url: fullUrl,
318
+ };
319
+ };
320
+ this.getEarnWithdrawStatus = async (input) => {
321
+ const sessionData = await getStorageValue(StorageKeys.Session);
322
+ const session = sessionData ? parseSession(sessionData) : null;
323
+ return this.request("/public/v1/query/get_earn_withdraw_status", {
324
+ ...input,
325
+ organizationId: input.organizationId ??
326
+ session?.organizationId ??
327
+ this.config.organizationId,
328
+ });
329
+ };
330
+ this.stampGetEarnWithdrawStatus = async (input) => {
331
+ if (!this.stamper) {
332
+ return undefined;
333
+ }
334
+ const sessionData = await getStorageValue(StorageKeys.Session);
335
+ const session = sessionData ? parseSession(sessionData) : null;
336
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_earn_withdraw_status";
337
+ const body = {
338
+ ...input,
339
+ organizationId: input.organizationId ??
340
+ session?.organizationId ??
341
+ this.config.organizationId,
342
+ };
343
+ const stringifiedBody = JSON.stringify(body);
344
+ const stamp = await this.stamper.stamp(stringifiedBody);
345
+ return {
346
+ body: stringifiedBody,
347
+ stamp: stamp,
348
+ url: fullUrl,
349
+ };
350
+ };
227
351
  this.getGasUsage = async (input) => {
228
352
  const sessionData = await getStorageValue(StorageKeys.Session);
229
353
  const session = sessionData ? parseSession(sessionData) : null;
@@ -782,6 +906,37 @@ class TurnkeySDKClientBase {
782
906
  url: fullUrl,
783
907
  };
784
908
  };
909
+ this.getSwapStatus = async (input) => {
910
+ const sessionData = await getStorageValue(StorageKeys.Session);
911
+ const session = sessionData ? parseSession(sessionData) : null;
912
+ return this.request("/public/v1/query/get_swap_status", {
913
+ ...input,
914
+ organizationId: input.organizationId ??
915
+ session?.organizationId ??
916
+ this.config.organizationId,
917
+ });
918
+ };
919
+ this.stampGetSwapStatus = async (input) => {
920
+ if (!this.stamper) {
921
+ return undefined;
922
+ }
923
+ const sessionData = await getStorageValue(StorageKeys.Session);
924
+ const session = sessionData ? parseSession(sessionData) : null;
925
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_swap_status";
926
+ const body = {
927
+ ...input,
928
+ organizationId: input.organizationId ??
929
+ session?.organizationId ??
930
+ this.config.organizationId,
931
+ };
932
+ const stringifiedBody = JSON.stringify(body);
933
+ const stamp = await this.stamper.stamp(stringifiedBody);
934
+ return {
935
+ body: stringifiedBody,
936
+ stamp: stamp,
937
+ url: fullUrl,
938
+ };
939
+ };
785
940
  this.getTvcApp = async (input) => {
786
941
  const sessionData = await getStorageValue(StorageKeys.Session);
787
942
  const session = sessionData ? parseSession(sessionData) : null;
@@ -1061,6 +1216,99 @@ class TurnkeySDKClientBase {
1061
1216
  url: fullUrl,
1062
1217
  };
1063
1218
  };
1219
+ this.listEarnEnabledVaults = async (input) => {
1220
+ const sessionData = await getStorageValue(StorageKeys.Session);
1221
+ const session = sessionData ? parseSession(sessionData) : null;
1222
+ return this.request("/public/v1/query/list_earn_enabled_vaults", {
1223
+ ...input,
1224
+ organizationId: input.organizationId ??
1225
+ session?.organizationId ??
1226
+ this.config.organizationId,
1227
+ });
1228
+ };
1229
+ this.stampListEarnEnabledVaults = async (input) => {
1230
+ if (!this.stamper) {
1231
+ return undefined;
1232
+ }
1233
+ const sessionData = await getStorageValue(StorageKeys.Session);
1234
+ const session = sessionData ? parseSession(sessionData) : null;
1235
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/list_earn_enabled_vaults";
1236
+ const body = {
1237
+ ...input,
1238
+ organizationId: input.organizationId ??
1239
+ session?.organizationId ??
1240
+ this.config.organizationId,
1241
+ };
1242
+ const stringifiedBody = JSON.stringify(body);
1243
+ const stamp = await this.stamper.stamp(stringifiedBody);
1244
+ return {
1245
+ body: stringifiedBody,
1246
+ stamp: stamp,
1247
+ url: fullUrl,
1248
+ };
1249
+ };
1250
+ this.listEarnPositions = async (input) => {
1251
+ const sessionData = await getStorageValue(StorageKeys.Session);
1252
+ const session = sessionData ? parseSession(sessionData) : null;
1253
+ return this.request("/public/v1/query/list_earn_positions", {
1254
+ ...input,
1255
+ organizationId: input.organizationId ??
1256
+ session?.organizationId ??
1257
+ this.config.organizationId,
1258
+ });
1259
+ };
1260
+ this.stampListEarnPositions = async (input) => {
1261
+ if (!this.stamper) {
1262
+ return undefined;
1263
+ }
1264
+ const sessionData = await getStorageValue(StorageKeys.Session);
1265
+ const session = sessionData ? parseSession(sessionData) : null;
1266
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/list_earn_positions";
1267
+ const body = {
1268
+ ...input,
1269
+ organizationId: input.organizationId ??
1270
+ session?.organizationId ??
1271
+ this.config.organizationId,
1272
+ };
1273
+ const stringifiedBody = JSON.stringify(body);
1274
+ const stamp = await this.stamper.stamp(stringifiedBody);
1275
+ return {
1276
+ body: stringifiedBody,
1277
+ stamp: stamp,
1278
+ url: fullUrl,
1279
+ };
1280
+ };
1281
+ this.listEarnVaults = async (input) => {
1282
+ const sessionData = await getStorageValue(StorageKeys.Session);
1283
+ const session = sessionData ? parseSession(sessionData) : null;
1284
+ return this.request("/public/v1/query/list_earn_vaults", {
1285
+ ...input,
1286
+ organizationId: input.organizationId ??
1287
+ session?.organizationId ??
1288
+ this.config.organizationId,
1289
+ });
1290
+ };
1291
+ this.stampListEarnVaults = async (input) => {
1292
+ if (!this.stamper) {
1293
+ return undefined;
1294
+ }
1295
+ const sessionData = await getStorageValue(StorageKeys.Session);
1296
+ const session = sessionData ? parseSession(sessionData) : null;
1297
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/list_earn_vaults";
1298
+ const body = {
1299
+ ...input,
1300
+ organizationId: input.organizationId ??
1301
+ session?.organizationId ??
1302
+ this.config.organizationId,
1303
+ };
1304
+ const stringifiedBody = JSON.stringify(body);
1305
+ const stamp = await this.stamper.stamp(stringifiedBody);
1306
+ return {
1307
+ body: stringifiedBody,
1308
+ stamp: stamp,
1309
+ url: fullUrl,
1310
+ };
1311
+ };
1064
1312
  this.listEmailEvents = async (input) => {
1065
1313
  const sessionData = await getStorageValue(StorageKeys.Session);
1066
1314
  const session = sessionData ? parseSession(sessionData) : null;
@@ -1092,6 +1340,37 @@ class TurnkeySDKClientBase {
1092
1340
  url: fullUrl,
1093
1341
  };
1094
1342
  };
1343
+ this.listEthTransactionHistory = async (input) => {
1344
+ const sessionData = await getStorageValue(StorageKeys.Session);
1345
+ const session = sessionData ? parseSession(sessionData) : null;
1346
+ return this.request("/public/v1/query/list_eth_transaction_history", {
1347
+ ...input,
1348
+ organizationId: input.organizationId ??
1349
+ session?.organizationId ??
1350
+ this.config.organizationId,
1351
+ });
1352
+ };
1353
+ this.stampListEthTransactionHistory = async (input) => {
1354
+ if (!this.stamper) {
1355
+ return undefined;
1356
+ }
1357
+ const sessionData = await getStorageValue(StorageKeys.Session);
1358
+ const session = sessionData ? parseSession(sessionData) : null;
1359
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/list_eth_transaction_history";
1360
+ const body = {
1361
+ ...input,
1362
+ organizationId: input.organizationId ??
1363
+ session?.organizationId ??
1364
+ this.config.organizationId,
1365
+ };
1366
+ const stringifiedBody = JSON.stringify(body);
1367
+ const stamp = await this.stamper.stamp(stringifiedBody);
1368
+ return {
1369
+ body: stringifiedBody,
1370
+ stamp: stamp,
1371
+ url: fullUrl,
1372
+ };
1373
+ };
1095
1374
  this.listFiatOnRampCredentials = async (input) => {
1096
1375
  const sessionData = await getStorageValue(StorageKeys.Session);
1097
1376
  const session = sessionData ? parseSession(sessionData) : null;
@@ -1279,6 +1558,37 @@ class TurnkeySDKClientBase {
1279
1558
  url: fullUrl,
1280
1559
  };
1281
1560
  };
1561
+ this.listSolTransactionHistory = async (input) => {
1562
+ const sessionData = await getStorageValue(StorageKeys.Session);
1563
+ const session = sessionData ? parseSession(sessionData) : null;
1564
+ return this.request("/public/v1/query/list_sol_transaction_history", {
1565
+ ...input,
1566
+ organizationId: input.organizationId ??
1567
+ session?.organizationId ??
1568
+ this.config.organizationId,
1569
+ });
1570
+ };
1571
+ this.stampListSolTransactionHistory = async (input) => {
1572
+ if (!this.stamper) {
1573
+ return undefined;
1574
+ }
1575
+ const sessionData = await getStorageValue(StorageKeys.Session);
1576
+ const session = sessionData ? parseSession(sessionData) : null;
1577
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/list_sol_transaction_history";
1578
+ const body = {
1579
+ ...input,
1580
+ organizationId: input.organizationId ??
1581
+ session?.organizationId ??
1582
+ this.config.organizationId,
1583
+ };
1584
+ const stringifiedBody = JSON.stringify(body);
1585
+ const stamp = await this.stamper.stamp(stringifiedBody);
1586
+ return {
1587
+ body: stringifiedBody,
1588
+ stamp: stamp,
1589
+ url: fullUrl,
1590
+ };
1591
+ };
1282
1592
  this.getSubOrgIds = async (input = {}) => {
1283
1593
  const sessionData = await getStorageValue(StorageKeys.Session);
1284
1594
  const session = sessionData ? parseSession(sessionData) : null;
@@ -1684,6 +1994,76 @@ class TurnkeySDKClientBase {
1684
1994
  url: fullUrl,
1685
1995
  };
1686
1996
  };
1997
+ this.claimEarnFees = async (input) => {
1998
+ const sessionData = await getStorageValue(StorageKeys.Session);
1999
+ const session = sessionData ? parseSession(sessionData) : null;
2000
+ const { organizationId, timestampMs, ...rest } = input;
2001
+ return this.command("/public/v1/submit/claim_earn_fees", {
2002
+ parameters: rest,
2003
+ organizationId: organizationId ??
2004
+ session?.organizationId ??
2005
+ this.config.organizationId,
2006
+ timestampMs: timestampMs ?? String(Date.now()),
2007
+ type: "ACTIVITY_TYPE_CLAIM_EARN_FEES",
2008
+ }, "claimEarnFeesResult");
2009
+ };
2010
+ this.stampClaimEarnFees = async (input) => {
2011
+ if (!this.stamper) {
2012
+ return undefined;
2013
+ }
2014
+ const sessionData = await getStorageValue(StorageKeys.Session);
2015
+ const session = sessionData ? parseSession(sessionData) : null;
2016
+ const { organizationId, timestampMs, ...parameters } = input;
2017
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/claim_earn_fees";
2018
+ const bodyWithType = {
2019
+ parameters,
2020
+ organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
2021
+ timestampMs: timestampMs ?? String(Date.now()),
2022
+ type: "ACTIVITY_TYPE_CLAIM_EARN_FEES",
2023
+ };
2024
+ const stringifiedBody = JSON.stringify(bodyWithType);
2025
+ const stamp = await this.stamper.stamp(stringifiedBody);
2026
+ return {
2027
+ body: stringifiedBody,
2028
+ stamp: stamp,
2029
+ url: fullUrl,
2030
+ };
2031
+ };
2032
+ this.claimSwapFees = async (input) => {
2033
+ const sessionData = await getStorageValue(StorageKeys.Session);
2034
+ const session = sessionData ? parseSession(sessionData) : null;
2035
+ const { organizationId, timestampMs, ...rest } = input;
2036
+ return this.command("/public/v1/submit/claim_swap_fees", {
2037
+ parameters: rest,
2038
+ organizationId: organizationId ??
2039
+ session?.organizationId ??
2040
+ this.config.organizationId,
2041
+ timestampMs: timestampMs ?? String(Date.now()),
2042
+ type: "ACTIVITY_TYPE_CLAIM_SWAP_FEES",
2043
+ }, "claimSwapFeesResult");
2044
+ };
2045
+ this.stampClaimSwapFees = async (input) => {
2046
+ if (!this.stamper) {
2047
+ return undefined;
2048
+ }
2049
+ const sessionData = await getStorageValue(StorageKeys.Session);
2050
+ const session = sessionData ? parseSession(sessionData) : null;
2051
+ const { organizationId, timestampMs, ...parameters } = input;
2052
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/claim_swap_fees";
2053
+ const bodyWithType = {
2054
+ parameters,
2055
+ organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
2056
+ timestampMs: timestampMs ?? String(Date.now()),
2057
+ type: "ACTIVITY_TYPE_CLAIM_SWAP_FEES",
2058
+ };
2059
+ const stringifiedBody = JSON.stringify(bodyWithType);
2060
+ const stamp = await this.stamper.stamp(stringifiedBody);
2061
+ return {
2062
+ body: stringifiedBody,
2063
+ stamp: stamp,
2064
+ url: fullUrl,
2065
+ };
2066
+ };
1687
2067
  this.createApiKeys = async (input) => {
1688
2068
  const sessionData = await getStorageValue(StorageKeys.Session);
1689
2069
  const session = sessionData ? parseSession(sessionData) : null;
@@ -3230,6 +3610,146 @@ class TurnkeySDKClientBase {
3230
3610
  url: fullUrl,
3231
3611
  };
3232
3612
  };
3613
+ this.earnDeployWrapper = async (input) => {
3614
+ const sessionData = await getStorageValue(StorageKeys.Session);
3615
+ const session = sessionData ? parseSession(sessionData) : null;
3616
+ const { organizationId, timestampMs, ...rest } = input;
3617
+ return this.command("/public/v1/submit/earn_deploy_wrapper", {
3618
+ parameters: rest,
3619
+ organizationId: organizationId ??
3620
+ session?.organizationId ??
3621
+ this.config.organizationId,
3622
+ timestampMs: timestampMs ?? String(Date.now()),
3623
+ type: "ACTIVITY_TYPE_EARN_DEPLOY_WRAPPER",
3624
+ }, "earnDeployWrapperResult");
3625
+ };
3626
+ this.stampEarnDeployWrapper = async (input) => {
3627
+ if (!this.stamper) {
3628
+ return undefined;
3629
+ }
3630
+ const sessionData = await getStorageValue(StorageKeys.Session);
3631
+ const session = sessionData ? parseSession(sessionData) : null;
3632
+ const { organizationId, timestampMs, ...parameters } = input;
3633
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/earn_deploy_wrapper";
3634
+ const bodyWithType = {
3635
+ parameters,
3636
+ organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
3637
+ timestampMs: timestampMs ?? String(Date.now()),
3638
+ type: "ACTIVITY_TYPE_EARN_DEPLOY_WRAPPER",
3639
+ };
3640
+ const stringifiedBody = JSON.stringify(bodyWithType);
3641
+ const stamp = await this.stamper.stamp(stringifiedBody);
3642
+ return {
3643
+ body: stringifiedBody,
3644
+ stamp: stamp,
3645
+ url: fullUrl,
3646
+ };
3647
+ };
3648
+ this.earnDeposit = async (input) => {
3649
+ const sessionData = await getStorageValue(StorageKeys.Session);
3650
+ const session = sessionData ? parseSession(sessionData) : null;
3651
+ const { organizationId, timestampMs, ...rest } = input;
3652
+ return this.command("/public/v1/submit/earn_deposit", {
3653
+ parameters: rest,
3654
+ organizationId: organizationId ??
3655
+ session?.organizationId ??
3656
+ this.config.organizationId,
3657
+ timestampMs: timestampMs ?? String(Date.now()),
3658
+ type: "ACTIVITY_TYPE_EARN_DEPOSIT",
3659
+ }, "earnDepositResult");
3660
+ };
3661
+ this.stampEarnDeposit = async (input) => {
3662
+ if (!this.stamper) {
3663
+ return undefined;
3664
+ }
3665
+ const sessionData = await getStorageValue(StorageKeys.Session);
3666
+ const session = sessionData ? parseSession(sessionData) : null;
3667
+ const { organizationId, timestampMs, ...parameters } = input;
3668
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/earn_deposit";
3669
+ const bodyWithType = {
3670
+ parameters,
3671
+ organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
3672
+ timestampMs: timestampMs ?? String(Date.now()),
3673
+ type: "ACTIVITY_TYPE_EARN_DEPOSIT",
3674
+ };
3675
+ const stringifiedBody = JSON.stringify(bodyWithType);
3676
+ const stamp = await this.stamper.stamp(stringifiedBody);
3677
+ return {
3678
+ body: stringifiedBody,
3679
+ stamp: stamp,
3680
+ url: fullUrl,
3681
+ };
3682
+ };
3683
+ this.earnSetWrapperState = async (input) => {
3684
+ const sessionData = await getStorageValue(StorageKeys.Session);
3685
+ const session = sessionData ? parseSession(sessionData) : null;
3686
+ const { organizationId, timestampMs, ...rest } = input;
3687
+ return this.command("/public/v1/submit/earn_set_wrapper_state", {
3688
+ parameters: rest,
3689
+ organizationId: organizationId ??
3690
+ session?.organizationId ??
3691
+ this.config.organizationId,
3692
+ timestampMs: timestampMs ?? String(Date.now()),
3693
+ type: "ACTIVITY_TYPE_EARN_SET_WRAPPER_STATE",
3694
+ }, "earnSetWrapperStateResult");
3695
+ };
3696
+ this.stampEarnSetWrapperState = async (input) => {
3697
+ if (!this.stamper) {
3698
+ return undefined;
3699
+ }
3700
+ const sessionData = await getStorageValue(StorageKeys.Session);
3701
+ const session = sessionData ? parseSession(sessionData) : null;
3702
+ const { organizationId, timestampMs, ...parameters } = input;
3703
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/earn_set_wrapper_state";
3704
+ const bodyWithType = {
3705
+ parameters,
3706
+ organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
3707
+ timestampMs: timestampMs ?? String(Date.now()),
3708
+ type: "ACTIVITY_TYPE_EARN_SET_WRAPPER_STATE",
3709
+ };
3710
+ const stringifiedBody = JSON.stringify(bodyWithType);
3711
+ const stamp = await this.stamper.stamp(stringifiedBody);
3712
+ return {
3713
+ body: stringifiedBody,
3714
+ stamp: stamp,
3715
+ url: fullUrl,
3716
+ };
3717
+ };
3718
+ this.earnWithdraw = async (input) => {
3719
+ const sessionData = await getStorageValue(StorageKeys.Session);
3720
+ const session = sessionData ? parseSession(sessionData) : null;
3721
+ const { organizationId, timestampMs, ...rest } = input;
3722
+ return this.command("/public/v1/submit/earn_withdraw", {
3723
+ parameters: rest,
3724
+ organizationId: organizationId ??
3725
+ session?.organizationId ??
3726
+ this.config.organizationId,
3727
+ timestampMs: timestampMs ?? String(Date.now()),
3728
+ type: "ACTIVITY_TYPE_EARN_WITHDRAW",
3729
+ }, "earnWithdrawResult");
3730
+ };
3731
+ this.stampEarnWithdraw = async (input) => {
3732
+ if (!this.stamper) {
3733
+ return undefined;
3734
+ }
3735
+ const sessionData = await getStorageValue(StorageKeys.Session);
3736
+ const session = sessionData ? parseSession(sessionData) : null;
3737
+ const { organizationId, timestampMs, ...parameters } = input;
3738
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/earn_withdraw";
3739
+ const bodyWithType = {
3740
+ parameters,
3741
+ organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
3742
+ timestampMs: timestampMs ?? String(Date.now()),
3743
+ type: "ACTIVITY_TYPE_EARN_WITHDRAW",
3744
+ };
3745
+ const stringifiedBody = JSON.stringify(bodyWithType);
3746
+ const stamp = await this.stamper.stamp(stringifiedBody);
3747
+ return {
3748
+ body: stringifiedBody,
3749
+ stamp: stamp,
3750
+ url: fullUrl,
3751
+ };
3752
+ };
3233
3753
  this.emailAuth = async (input) => {
3234
3754
  const sessionData = await getStorageValue(StorageKeys.Session);
3235
3755
  const session = sessionData ? parseSession(sessionData) : null;
@@ -3300,6 +3820,41 @@ class TurnkeySDKClientBase {
3300
3820
  url: fullUrl,
3301
3821
  };
3302
3822
  };
3823
+ this.ethUndelegate7702 = async (input) => {
3824
+ const sessionData = await getStorageValue(StorageKeys.Session);
3825
+ const session = sessionData ? parseSession(sessionData) : null;
3826
+ const { organizationId, timestampMs, ...rest } = input;
3827
+ return this.command("/public/v1/submit/eth_undelegate_7702", {
3828
+ parameters: rest,
3829
+ organizationId: organizationId ??
3830
+ session?.organizationId ??
3831
+ this.config.organizationId,
3832
+ timestampMs: timestampMs ?? String(Date.now()),
3833
+ type: "ACTIVITY_TYPE_ETH_UNDELEGATE7702",
3834
+ }, "ethUndelegate7702Result");
3835
+ };
3836
+ this.stampEthUndelegate7702 = async (input) => {
3837
+ if (!this.stamper) {
3838
+ return undefined;
3839
+ }
3840
+ const sessionData = await getStorageValue(StorageKeys.Session);
3841
+ const session = sessionData ? parseSession(sessionData) : null;
3842
+ const { organizationId, timestampMs, ...parameters } = input;
3843
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/eth_undelegate_7702";
3844
+ const bodyWithType = {
3845
+ parameters,
3846
+ organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
3847
+ timestampMs: timestampMs ?? String(Date.now()),
3848
+ type: "ACTIVITY_TYPE_ETH_UNDELEGATE7702",
3849
+ };
3850
+ const stringifiedBody = JSON.stringify(bodyWithType);
3851
+ const stamp = await this.stamper.stamp(stringifiedBody);
3852
+ return {
3853
+ body: stringifiedBody,
3854
+ stamp: stamp,
3855
+ url: fullUrl,
3856
+ };
3857
+ };
3303
3858
  this.exportPrivateKey = async (input) => {
3304
3859
  const sessionData = await getStorageValue(StorageKeys.Session);
3305
3860
  const session = sessionData ? parseSession(sessionData) : null;
@@ -4253,8 +4808,8 @@ class TurnkeySDKClientBase {
4253
4808
  session?.organizationId ??
4254
4809
  this.config.organizationId,
4255
4810
  timestampMs: timestampMs ?? String(Date.now()),
4256
- type: "ACTIVITY_TYPE_SOL_SEND_TRANSACTION",
4257
- }, "solSendTransactionResult");
4811
+ type: "ACTIVITY_TYPE_SOL_SEND_TRANSACTION_V2",
4812
+ }, "solSendTransactionResultV2");
4258
4813
  };
4259
4814
  this.stampSolSendTransaction = async (input) => {
4260
4815
  if (!this.stamper) {
@@ -4268,7 +4823,7 @@ class TurnkeySDKClientBase {
4268
4823
  parameters,
4269
4824
  organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
4270
4825
  timestampMs: timestampMs ?? String(Date.now()),
4271
- type: "ACTIVITY_TYPE_SOL_SEND_TRANSACTION",
4826
+ type: "ACTIVITY_TYPE_SOL_SEND_TRANSACTION_V2",
4272
4827
  };
4273
4828
  const stringifiedBody = JSON.stringify(bodyWithType);
4274
4829
  const stamp = await this.stamper.stamp(stringifiedBody);
@@ -4945,6 +5500,41 @@ class TurnkeySDKClientBase {
4945
5500
  url: fullUrl,
4946
5501
  };
4947
5502
  };
5503
+ this.upsertSwapConfig = async (input) => {
5504
+ const sessionData = await getStorageValue(StorageKeys.Session);
5505
+ const session = sessionData ? parseSession(sessionData) : null;
5506
+ const { organizationId, timestampMs, ...rest } = input;
5507
+ return this.command("/public/v1/submit/upsert_swap_config", {
5508
+ parameters: rest,
5509
+ organizationId: organizationId ??
5510
+ session?.organizationId ??
5511
+ this.config.organizationId,
5512
+ timestampMs: timestampMs ?? String(Date.now()),
5513
+ type: "ACTIVITY_TYPE_UPSERT_SWAP_CONFIG",
5514
+ }, "upsertSwapConfigResult");
5515
+ };
5516
+ this.stampUpsertSwapConfig = async (input) => {
5517
+ if (!this.stamper) {
5518
+ return undefined;
5519
+ }
5520
+ const sessionData = await getStorageValue(StorageKeys.Session);
5521
+ const session = sessionData ? parseSession(sessionData) : null;
5522
+ const { organizationId, timestampMs, ...parameters } = input;
5523
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/upsert_swap_config";
5524
+ const bodyWithType = {
5525
+ parameters,
5526
+ organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
5527
+ timestampMs: timestampMs ?? String(Date.now()),
5528
+ type: "ACTIVITY_TYPE_UPSERT_SWAP_CONFIG",
5529
+ };
5530
+ const stringifiedBody = JSON.stringify(bodyWithType);
5531
+ const stamp = await this.stamper.stamp(stringifiedBody);
5532
+ return {
5533
+ body: stringifiedBody,
5534
+ stamp: stamp,
5535
+ url: fullUrl,
5536
+ };
5537
+ };
4948
5538
  this.verifyOtp = async (input) => {
4949
5539
  const sessionData = await getStorageValue(StorageKeys.Session);
4950
5540
  const session = sessionData ? parseSession(sessionData) : null;