@turnkey/core 2.3.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.
Files changed (33) hide show
  1. package/dist/__clients__/core.d.ts +7 -0
  2. package/dist/__clients__/core.d.ts.map +1 -1
  3. package/dist/__clients__/core.js +35 -26
  4. package/dist/__clients__/core.js.map +1 -1
  5. package/dist/__clients__/core.mjs +35 -26
  6. package/dist/__clients__/core.mjs.map +1 -1
  7. package/dist/__generated__/sdk-client-base.d.ts +46 -7
  8. package/dist/__generated__/sdk-client-base.d.ts.map +1 -1
  9. package/dist/__generated__/sdk-client-base.js +762 -123
  10. package/dist/__generated__/sdk-client-base.js.map +1 -1
  11. package/dist/__generated__/sdk-client-base.mjs +762 -123
  12. package/dist/__generated__/sdk-client-base.mjs.map +1 -1
  13. package/dist/__generated__/version.d.ts +1 -1
  14. package/dist/__generated__/version.js +1 -1
  15. package/dist/__generated__/version.mjs +1 -1
  16. package/dist/__tests__/sol-send-transaction-helper-test.d.ts +2 -0
  17. package/dist/__tests__/sol-send-transaction-helper-test.d.ts.map +1 -0
  18. package/dist/__tests__/sol-send-transaction-test.d.ts +2 -0
  19. package/dist/__tests__/sol-send-transaction-test.d.ts.map +1 -0
  20. package/dist/__types__/method-types/shared.d.ts +10 -2
  21. package/dist/__types__/method-types/shared.d.ts.map +1 -1
  22. package/dist/index.d.ts +1 -1
  23. package/dist/index.d.ts.map +1 -1
  24. package/dist/index.js +1 -0
  25. package/dist/index.js.map +1 -1
  26. package/dist/index.mjs +1 -1
  27. package/dist/utils.d.ts +3 -1
  28. package/dist/utils.d.ts.map +1 -1
  29. package/dist/utils.js +26 -0
  30. package/dist/utils.js.map +1 -1
  31. package/dist/utils.mjs +26 -1
  32. package/dist/utils.mjs.map +1 -1
  33. package/package.json +7 -7
@@ -215,6 +215,126 @@ 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
+ };
248
+ this.getEarnDeployStatus = async (input, stampWith) => {
249
+ const session = await this.storageManager?.getActiveSession();
250
+ return this.request("/public/v1/query/get_earn_deploy_status", {
251
+ ...input,
252
+ organizationId: input.organizationId ??
253
+ session?.organizationId ??
254
+ this.config.organizationId,
255
+ }, stampWith);
256
+ };
257
+ this.stampGetEarnDeployStatus = async (input, stampWith) => {
258
+ const activeStamper = this.getStamper(stampWith);
259
+ if (!activeStamper) {
260
+ return undefined;
261
+ }
262
+ const session = await this.storageManager?.getActiveSession();
263
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_earn_deploy_status";
264
+ const body = {
265
+ ...input,
266
+ organizationId: input.organizationId ??
267
+ session?.organizationId ??
268
+ this.config.organizationId,
269
+ };
270
+ const stringifiedBody = JSON.stringify(body);
271
+ const stamp = await activeStamper.stamp(stringifiedBody);
272
+ return {
273
+ body: stringifiedBody,
274
+ stamp: stamp,
275
+ url: fullUrl,
276
+ };
277
+ };
278
+ this.getEarnDepositStatus = async (input, stampWith) => {
279
+ const session = await this.storageManager?.getActiveSession();
280
+ return this.request("/public/v1/query/get_earn_deposit_status", {
281
+ ...input,
282
+ organizationId: input.organizationId ??
283
+ session?.organizationId ??
284
+ this.config.organizationId,
285
+ }, stampWith);
286
+ };
287
+ this.stampGetEarnDepositStatus = async (input, stampWith) => {
288
+ const activeStamper = this.getStamper(stampWith);
289
+ if (!activeStamper) {
290
+ return undefined;
291
+ }
292
+ const session = await this.storageManager?.getActiveSession();
293
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_earn_deposit_status";
294
+ const body = {
295
+ ...input,
296
+ organizationId: input.organizationId ??
297
+ session?.organizationId ??
298
+ this.config.organizationId,
299
+ };
300
+ const stringifiedBody = JSON.stringify(body);
301
+ const stamp = await activeStamper.stamp(stringifiedBody);
302
+ return {
303
+ body: stringifiedBody,
304
+ stamp: stamp,
305
+ url: fullUrl,
306
+ };
307
+ };
308
+ this.getEarnWithdrawStatus = async (input, stampWith) => {
309
+ const session = await this.storageManager?.getActiveSession();
310
+ return this.request("/public/v1/query/get_earn_withdraw_status", {
311
+ ...input,
312
+ organizationId: input.organizationId ??
313
+ session?.organizationId ??
314
+ this.config.organizationId,
315
+ }, stampWith);
316
+ };
317
+ this.stampGetEarnWithdrawStatus = async (input, stampWith) => {
318
+ const activeStamper = this.getStamper(stampWith);
319
+ if (!activeStamper) {
320
+ return undefined;
321
+ }
322
+ const session = await this.storageManager?.getActiveSession();
323
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_earn_withdraw_status";
324
+ const body = {
325
+ ...input,
326
+ organizationId: input.organizationId ??
327
+ session?.organizationId ??
328
+ this.config.organizationId,
329
+ };
330
+ const stringifiedBody = JSON.stringify(body);
331
+ const stamp = await activeStamper.stamp(stringifiedBody);
332
+ return {
333
+ body: stringifiedBody,
334
+ stamp: stamp,
335
+ url: fullUrl,
336
+ };
337
+ };
218
338
  this.getGasUsage = async (input, stampWith) => {
219
339
  const session = await this.storageManager?.getActiveSession();
220
340
  return this.request("/public/v1/query/get_gas_usage", {
@@ -755,6 +875,36 @@ class TurnkeySDKClientBase {
755
875
  url: fullUrl,
756
876
  };
757
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
+ };
758
908
  this.getTvcApp = async (input, stampWith) => {
759
909
  const session = await this.storageManager?.getActiveSession();
760
910
  return this.request("/public/v1/query/get_tvc_app", {
@@ -1025,6 +1175,96 @@ class TurnkeySDKClientBase {
1025
1175
  url: fullUrl,
1026
1176
  };
1027
1177
  };
1178
+ this.listEarnEnabledVaults = async (input, stampWith) => {
1179
+ const session = await this.storageManager?.getActiveSession();
1180
+ return this.request("/public/v1/query/list_earn_enabled_vaults", {
1181
+ ...input,
1182
+ organizationId: input.organizationId ??
1183
+ session?.organizationId ??
1184
+ this.config.organizationId,
1185
+ }, stampWith);
1186
+ };
1187
+ this.stampListEarnEnabledVaults = async (input, stampWith) => {
1188
+ const activeStamper = this.getStamper(stampWith);
1189
+ if (!activeStamper) {
1190
+ return undefined;
1191
+ }
1192
+ const session = await this.storageManager?.getActiveSession();
1193
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/list_earn_enabled_vaults";
1194
+ const body = {
1195
+ ...input,
1196
+ organizationId: input.organizationId ??
1197
+ session?.organizationId ??
1198
+ this.config.organizationId,
1199
+ };
1200
+ const stringifiedBody = JSON.stringify(body);
1201
+ const stamp = await activeStamper.stamp(stringifiedBody);
1202
+ return {
1203
+ body: stringifiedBody,
1204
+ stamp: stamp,
1205
+ url: fullUrl,
1206
+ };
1207
+ };
1208
+ this.listEarnPositions = async (input, stampWith) => {
1209
+ const session = await this.storageManager?.getActiveSession();
1210
+ return this.request("/public/v1/query/list_earn_positions", {
1211
+ ...input,
1212
+ organizationId: input.organizationId ??
1213
+ session?.organizationId ??
1214
+ this.config.organizationId,
1215
+ }, stampWith);
1216
+ };
1217
+ this.stampListEarnPositions = async (input, stampWith) => {
1218
+ const activeStamper = this.getStamper(stampWith);
1219
+ if (!activeStamper) {
1220
+ return undefined;
1221
+ }
1222
+ const session = await this.storageManager?.getActiveSession();
1223
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/list_earn_positions";
1224
+ const body = {
1225
+ ...input,
1226
+ organizationId: input.organizationId ??
1227
+ session?.organizationId ??
1228
+ this.config.organizationId,
1229
+ };
1230
+ const stringifiedBody = JSON.stringify(body);
1231
+ const stamp = await activeStamper.stamp(stringifiedBody);
1232
+ return {
1233
+ body: stringifiedBody,
1234
+ stamp: stamp,
1235
+ url: fullUrl,
1236
+ };
1237
+ };
1238
+ this.listEarnVaults = async (input, stampWith) => {
1239
+ const session = await this.storageManager?.getActiveSession();
1240
+ return this.request("/public/v1/query/list_earn_vaults", {
1241
+ ...input,
1242
+ organizationId: input.organizationId ??
1243
+ session?.organizationId ??
1244
+ this.config.organizationId,
1245
+ }, stampWith);
1246
+ };
1247
+ this.stampListEarnVaults = async (input, stampWith) => {
1248
+ const activeStamper = this.getStamper(stampWith);
1249
+ if (!activeStamper) {
1250
+ return undefined;
1251
+ }
1252
+ const session = await this.storageManager?.getActiveSession();
1253
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/list_earn_vaults";
1254
+ const body = {
1255
+ ...input,
1256
+ organizationId: input.organizationId ??
1257
+ session?.organizationId ??
1258
+ this.config.organizationId,
1259
+ };
1260
+ const stringifiedBody = JSON.stringify(body);
1261
+ const stamp = await activeStamper.stamp(stringifiedBody);
1262
+ return {
1263
+ body: stringifiedBody,
1264
+ stamp: stamp,
1265
+ url: fullUrl,
1266
+ };
1267
+ };
1028
1268
  this.listEmailEvents = async (input, stampWith) => {
1029
1269
  const session = await this.storageManager?.getActiveSession();
1030
1270
  return this.request("/public/v1/query/list_email_events", {
@@ -1055,6 +1295,36 @@ class TurnkeySDKClientBase {
1055
1295
  url: fullUrl,
1056
1296
  };
1057
1297
  };
1298
+ this.listEthTransactionHistory = async (input, stampWith) => {
1299
+ const session = await this.storageManager?.getActiveSession();
1300
+ return this.request("/public/v1/query/list_eth_transaction_history", {
1301
+ ...input,
1302
+ organizationId: input.organizationId ??
1303
+ session?.organizationId ??
1304
+ this.config.organizationId,
1305
+ }, stampWith);
1306
+ };
1307
+ this.stampListEthTransactionHistory = async (input, stampWith) => {
1308
+ const activeStamper = this.getStamper(stampWith);
1309
+ if (!activeStamper) {
1310
+ return undefined;
1311
+ }
1312
+ const session = await this.storageManager?.getActiveSession();
1313
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/list_eth_transaction_history";
1314
+ const body = {
1315
+ ...input,
1316
+ organizationId: input.organizationId ??
1317
+ session?.organizationId ??
1318
+ this.config.organizationId,
1319
+ };
1320
+ const stringifiedBody = JSON.stringify(body);
1321
+ const stamp = await activeStamper.stamp(stringifiedBody);
1322
+ return {
1323
+ body: stringifiedBody,
1324
+ stamp: stamp,
1325
+ url: fullUrl,
1326
+ };
1327
+ };
1058
1328
  this.listFiatOnRampCredentials = async (input, stampWith) => {
1059
1329
  const session = await this.storageManager?.getActiveSession();
1060
1330
  return this.request("/public/v1/query/list_fiat_on_ramp_credentials", {
@@ -1236,6 +1506,36 @@ class TurnkeySDKClientBase {
1236
1506
  url: fullUrl,
1237
1507
  };
1238
1508
  };
1509
+ this.listSolTransactionHistory = async (input, stampWith) => {
1510
+ const session = await this.storageManager?.getActiveSession();
1511
+ return this.request("/public/v1/query/list_sol_transaction_history", {
1512
+ ...input,
1513
+ organizationId: input.organizationId ??
1514
+ session?.organizationId ??
1515
+ this.config.organizationId,
1516
+ }, stampWith);
1517
+ };
1518
+ this.stampListSolTransactionHistory = async (input, stampWith) => {
1519
+ const activeStamper = this.getStamper(stampWith);
1520
+ if (!activeStamper) {
1521
+ return undefined;
1522
+ }
1523
+ const session = await this.storageManager?.getActiveSession();
1524
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/list_sol_transaction_history";
1525
+ const body = {
1526
+ ...input,
1527
+ organizationId: input.organizationId ??
1528
+ session?.organizationId ??
1529
+ this.config.organizationId,
1530
+ };
1531
+ const stringifiedBody = JSON.stringify(body);
1532
+ const stamp = await activeStamper.stamp(stringifiedBody);
1533
+ return {
1534
+ body: stringifiedBody,
1535
+ stamp: stamp,
1536
+ url: fullUrl,
1537
+ };
1538
+ };
1239
1539
  this.getSubOrgIds = async (input = {}, stampWith) => {
1240
1540
  const session = await this.storageManager?.getActiveSession();
1241
1541
  return this.request("/public/v1/query/list_suborgs", {
@@ -1632,6 +1932,80 @@ class TurnkeySDKClientBase {
1632
1932
  url: fullUrl,
1633
1933
  };
1634
1934
  };
1935
+ this.claimEarnFees = async (input, stampWith) => {
1936
+ const { organizationId, timestampMs, ...rest } = input;
1937
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
1938
+ const generateAppProofs = input?.generateAppProofs ?? false;
1939
+ const session = await this.storageManager?.getActiveSession();
1940
+ return this.activity("/public/v1/submit/claim_earn_fees", {
1941
+ parameters: rest,
1942
+ organizationId: organizationId ??
1943
+ session?.organizationId ??
1944
+ this.config.organizationId,
1945
+ timestampMs: timestampMs ?? String(Date.now()),
1946
+ generateAppProofs: generateAppProofs ?? false,
1947
+ type: "ACTIVITY_TYPE_CLAIM_EARN_FEES",
1948
+ }, "claimEarnFeesResult", stampWith);
1949
+ };
1950
+ this.stampClaimEarnFees = async (input, stampWith) => {
1951
+ const activeStamper = this.getStamper(stampWith);
1952
+ if (!activeStamper) {
1953
+ return undefined;
1954
+ }
1955
+ const { organizationId, timestampMs, ...parameters } = input;
1956
+ const session = await this.storageManager?.getActiveSession();
1957
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/claim_earn_fees";
1958
+ const bodyWithType = {
1959
+ parameters,
1960
+ organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
1961
+ timestampMs: timestampMs ?? String(Date.now()),
1962
+ type: "ACTIVITY_TYPE_CLAIM_EARN_FEES",
1963
+ };
1964
+ const stringifiedBody = JSON.stringify(bodyWithType);
1965
+ const stamp = await activeStamper.stamp(stringifiedBody);
1966
+ return {
1967
+ body: stringifiedBody,
1968
+ stamp: stamp,
1969
+ url: fullUrl,
1970
+ };
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
+ };
1635
2009
  this.createApiKeys = async (input, stampWith) => {
1636
2010
  const { organizationId, timestampMs, ...rest } = input;
1637
2011
  //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
@@ -2906,22 +3280,209 @@ class TurnkeySDKClientBase {
2906
3280
  this.config.organizationId,
2907
3281
  timestampMs: timestampMs ?? String(Date.now()),
2908
3282
  generateAppProofs: generateAppProofs ?? false,
2909
- type: "ACTIVITY_TYPE_DELETE_PRIVATE_KEYS",
2910
- }, "deletePrivateKeysResult", stampWith);
3283
+ type: "ACTIVITY_TYPE_DELETE_PRIVATE_KEYS",
3284
+ }, "deletePrivateKeysResult", stampWith);
3285
+ };
3286
+ this.stampDeletePrivateKeys = async (input, stampWith) => {
3287
+ const activeStamper = this.getStamper(stampWith);
3288
+ if (!activeStamper) {
3289
+ return undefined;
3290
+ }
3291
+ const { organizationId, timestampMs, ...parameters } = input;
3292
+ const session = await this.storageManager?.getActiveSession();
3293
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/delete_private_keys";
3294
+ const bodyWithType = {
3295
+ parameters,
3296
+ organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
3297
+ timestampMs: timestampMs ?? String(Date.now()),
3298
+ type: "ACTIVITY_TYPE_DELETE_PRIVATE_KEYS",
3299
+ };
3300
+ const stringifiedBody = JSON.stringify(bodyWithType);
3301
+ const stamp = await activeStamper.stamp(stringifiedBody);
3302
+ return {
3303
+ body: stringifiedBody,
3304
+ stamp: stamp,
3305
+ url: fullUrl,
3306
+ };
3307
+ };
3308
+ this.deleteSmartContractInterface = async (input, stampWith) => {
3309
+ const { organizationId, timestampMs, ...rest } = input;
3310
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
3311
+ const generateAppProofs = input?.generateAppProofs ?? false;
3312
+ const session = await this.storageManager?.getActiveSession();
3313
+ return this.activity("/public/v1/submit/delete_smart_contract_interface", {
3314
+ parameters: rest,
3315
+ organizationId: organizationId ??
3316
+ session?.organizationId ??
3317
+ this.config.organizationId,
3318
+ timestampMs: timestampMs ?? String(Date.now()),
3319
+ generateAppProofs: generateAppProofs ?? false,
3320
+ type: "ACTIVITY_TYPE_DELETE_SMART_CONTRACT_INTERFACE",
3321
+ }, "deleteSmartContractInterfaceResult", stampWith);
3322
+ };
3323
+ this.stampDeleteSmartContractInterface = async (input, stampWith) => {
3324
+ const activeStamper = this.getStamper(stampWith);
3325
+ if (!activeStamper) {
3326
+ return undefined;
3327
+ }
3328
+ const { organizationId, timestampMs, ...parameters } = input;
3329
+ const session = await this.storageManager?.getActiveSession();
3330
+ const fullUrl = this.config.apiBaseUrl +
3331
+ "/public/v1/submit/delete_smart_contract_interface";
3332
+ const bodyWithType = {
3333
+ parameters,
3334
+ organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
3335
+ timestampMs: timestampMs ?? String(Date.now()),
3336
+ type: "ACTIVITY_TYPE_DELETE_SMART_CONTRACT_INTERFACE",
3337
+ };
3338
+ const stringifiedBody = JSON.stringify(bodyWithType);
3339
+ const stamp = await activeStamper.stamp(stringifiedBody);
3340
+ return {
3341
+ body: stringifiedBody,
3342
+ stamp: stamp,
3343
+ url: fullUrl,
3344
+ };
3345
+ };
3346
+ this.deleteSubOrganization = async (input, stampWith) => {
3347
+ const { organizationId, timestampMs, ...rest } = input;
3348
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
3349
+ const generateAppProofs = input?.generateAppProofs ?? false;
3350
+ const session = await this.storageManager?.getActiveSession();
3351
+ return this.activity("/public/v1/submit/delete_sub_organization", {
3352
+ parameters: rest,
3353
+ organizationId: organizationId ??
3354
+ session?.organizationId ??
3355
+ this.config.organizationId,
3356
+ timestampMs: timestampMs ?? String(Date.now()),
3357
+ generateAppProofs: generateAppProofs ?? false,
3358
+ type: "ACTIVITY_TYPE_DELETE_SUB_ORGANIZATION",
3359
+ }, "deleteSubOrganizationResult", stampWith);
3360
+ };
3361
+ this.stampDeleteSubOrganization = async (input, stampWith) => {
3362
+ const activeStamper = this.getStamper(stampWith);
3363
+ if (!activeStamper) {
3364
+ return undefined;
3365
+ }
3366
+ const { organizationId, timestampMs, ...parameters } = input;
3367
+ const session = await this.storageManager?.getActiveSession();
3368
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/delete_sub_organization";
3369
+ const bodyWithType = {
3370
+ parameters,
3371
+ organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
3372
+ timestampMs: timestampMs ?? String(Date.now()),
3373
+ type: "ACTIVITY_TYPE_DELETE_SUB_ORGANIZATION",
3374
+ };
3375
+ const stringifiedBody = JSON.stringify(bodyWithType);
3376
+ const stamp = await activeStamper.stamp(stringifiedBody);
3377
+ return {
3378
+ body: stringifiedBody,
3379
+ stamp: stamp,
3380
+ url: fullUrl,
3381
+ };
3382
+ };
3383
+ this.deleteTvcAppAndDeployments = async (input, stampWith) => {
3384
+ const { organizationId, timestampMs, ...rest } = input;
3385
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
3386
+ const generateAppProofs = input?.generateAppProofs ?? false;
3387
+ const session = await this.storageManager?.getActiveSession();
3388
+ return this.activity("/public/v1/submit/delete_tvc_app_and_deployments", {
3389
+ parameters: rest,
3390
+ organizationId: organizationId ??
3391
+ session?.organizationId ??
3392
+ this.config.organizationId,
3393
+ timestampMs: timestampMs ?? String(Date.now()),
3394
+ generateAppProofs: generateAppProofs ?? false,
3395
+ type: "ACTIVITY_TYPE_DELETE_TVC_APP_AND_DEPLOYMENTS",
3396
+ }, "deleteTvcAppAndDeploymentsResult", stampWith);
3397
+ };
3398
+ this.stampDeleteTvcAppAndDeployments = async (input, stampWith) => {
3399
+ const activeStamper = this.getStamper(stampWith);
3400
+ if (!activeStamper) {
3401
+ return undefined;
3402
+ }
3403
+ const { organizationId, timestampMs, ...parameters } = input;
3404
+ const session = await this.storageManager?.getActiveSession();
3405
+ const fullUrl = this.config.apiBaseUrl +
3406
+ "/public/v1/submit/delete_tvc_app_and_deployments";
3407
+ const bodyWithType = {
3408
+ parameters,
3409
+ organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
3410
+ timestampMs: timestampMs ?? String(Date.now()),
3411
+ type: "ACTIVITY_TYPE_DELETE_TVC_APP_AND_DEPLOYMENTS",
3412
+ };
3413
+ const stringifiedBody = JSON.stringify(bodyWithType);
3414
+ const stamp = await activeStamper.stamp(stringifiedBody);
3415
+ return {
3416
+ body: stringifiedBody,
3417
+ stamp: stamp,
3418
+ url: fullUrl,
3419
+ };
3420
+ };
3421
+ this.deleteTvcDeployment = async (input, stampWith) => {
3422
+ const { organizationId, timestampMs, ...rest } = input;
3423
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
3424
+ const generateAppProofs = input?.generateAppProofs ?? false;
3425
+ const session = await this.storageManager?.getActiveSession();
3426
+ return this.activity("/public/v1/submit/delete_tvc_deployment", {
3427
+ parameters: rest,
3428
+ organizationId: organizationId ??
3429
+ session?.organizationId ??
3430
+ this.config.organizationId,
3431
+ timestampMs: timestampMs ?? String(Date.now()),
3432
+ generateAppProofs: generateAppProofs ?? false,
3433
+ type: "ACTIVITY_TYPE_DELETE_TVC_DEPLOYMENT",
3434
+ }, "deleteTvcDeploymentResult", stampWith);
3435
+ };
3436
+ this.stampDeleteTvcDeployment = async (input, stampWith) => {
3437
+ const activeStamper = this.getStamper(stampWith);
3438
+ if (!activeStamper) {
3439
+ return undefined;
3440
+ }
3441
+ const { organizationId, timestampMs, ...parameters } = input;
3442
+ const session = await this.storageManager?.getActiveSession();
3443
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/delete_tvc_deployment";
3444
+ const bodyWithType = {
3445
+ parameters,
3446
+ organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
3447
+ timestampMs: timestampMs ?? String(Date.now()),
3448
+ type: "ACTIVITY_TYPE_DELETE_TVC_DEPLOYMENT",
3449
+ };
3450
+ const stringifiedBody = JSON.stringify(bodyWithType);
3451
+ const stamp = await activeStamper.stamp(stringifiedBody);
3452
+ return {
3453
+ body: stringifiedBody,
3454
+ stamp: stamp,
3455
+ url: fullUrl,
3456
+ };
3457
+ };
3458
+ this.deleteUserTags = async (input, stampWith) => {
3459
+ const { organizationId, timestampMs, ...rest } = input;
3460
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
3461
+ const generateAppProofs = input?.generateAppProofs ?? false;
3462
+ const session = await this.storageManager?.getActiveSession();
3463
+ return this.activity("/public/v1/submit/delete_user_tags", {
3464
+ parameters: rest,
3465
+ organizationId: organizationId ??
3466
+ session?.organizationId ??
3467
+ this.config.organizationId,
3468
+ timestampMs: timestampMs ?? String(Date.now()),
3469
+ generateAppProofs: generateAppProofs ?? false,
3470
+ type: "ACTIVITY_TYPE_DELETE_USER_TAGS",
3471
+ }, "deleteUserTagsResult", stampWith);
2911
3472
  };
2912
- this.stampDeletePrivateKeys = async (input, stampWith) => {
3473
+ this.stampDeleteUserTags = async (input, stampWith) => {
2913
3474
  const activeStamper = this.getStamper(stampWith);
2914
3475
  if (!activeStamper) {
2915
3476
  return undefined;
2916
3477
  }
2917
3478
  const { organizationId, timestampMs, ...parameters } = input;
2918
3479
  const session = await this.storageManager?.getActiveSession();
2919
- const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/delete_private_keys";
3480
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/delete_user_tags";
2920
3481
  const bodyWithType = {
2921
3482
  parameters,
2922
3483
  organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
2923
3484
  timestampMs: timestampMs ?? String(Date.now()),
2924
- type: "ACTIVITY_TYPE_DELETE_PRIVATE_KEYS",
3485
+ type: "ACTIVITY_TYPE_DELETE_USER_TAGS",
2925
3486
  };
2926
3487
  const stringifiedBody = JSON.stringify(bodyWithType);
2927
3488
  const stamp = await activeStamper.stamp(stringifiedBody);
@@ -2931,35 +3492,34 @@ class TurnkeySDKClientBase {
2931
3492
  url: fullUrl,
2932
3493
  };
2933
3494
  };
2934
- this.deleteSmartContractInterface = async (input, stampWith) => {
3495
+ this.deleteUsers = async (input, stampWith) => {
2935
3496
  const { organizationId, timestampMs, ...rest } = input;
2936
3497
  //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
2937
3498
  const generateAppProofs = input?.generateAppProofs ?? false;
2938
3499
  const session = await this.storageManager?.getActiveSession();
2939
- return this.activity("/public/v1/submit/delete_smart_contract_interface", {
3500
+ return this.activity("/public/v1/submit/delete_users", {
2940
3501
  parameters: rest,
2941
3502
  organizationId: organizationId ??
2942
3503
  session?.organizationId ??
2943
3504
  this.config.organizationId,
2944
3505
  timestampMs: timestampMs ?? String(Date.now()),
2945
3506
  generateAppProofs: generateAppProofs ?? false,
2946
- type: "ACTIVITY_TYPE_DELETE_SMART_CONTRACT_INTERFACE",
2947
- }, "deleteSmartContractInterfaceResult", stampWith);
3507
+ type: "ACTIVITY_TYPE_DELETE_USERS",
3508
+ }, "deleteUsersResult", stampWith);
2948
3509
  };
2949
- this.stampDeleteSmartContractInterface = async (input, stampWith) => {
3510
+ this.stampDeleteUsers = async (input, stampWith) => {
2950
3511
  const activeStamper = this.getStamper(stampWith);
2951
3512
  if (!activeStamper) {
2952
3513
  return undefined;
2953
3514
  }
2954
3515
  const { organizationId, timestampMs, ...parameters } = input;
2955
3516
  const session = await this.storageManager?.getActiveSession();
2956
- const fullUrl = this.config.apiBaseUrl +
2957
- "/public/v1/submit/delete_smart_contract_interface";
3517
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/delete_users";
2958
3518
  const bodyWithType = {
2959
3519
  parameters,
2960
3520
  organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
2961
3521
  timestampMs: timestampMs ?? String(Date.now()),
2962
- type: "ACTIVITY_TYPE_DELETE_SMART_CONTRACT_INTERFACE",
3522
+ type: "ACTIVITY_TYPE_DELETE_USERS",
2963
3523
  };
2964
3524
  const stringifiedBody = JSON.stringify(bodyWithType);
2965
3525
  const stamp = await activeStamper.stamp(stringifiedBody);
@@ -2969,34 +3529,34 @@ class TurnkeySDKClientBase {
2969
3529
  url: fullUrl,
2970
3530
  };
2971
3531
  };
2972
- this.deleteSubOrganization = async (input, stampWith) => {
3532
+ this.deleteWalletAccounts = async (input, stampWith) => {
2973
3533
  const { organizationId, timestampMs, ...rest } = input;
2974
3534
  //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
2975
3535
  const generateAppProofs = input?.generateAppProofs ?? false;
2976
3536
  const session = await this.storageManager?.getActiveSession();
2977
- return this.activity("/public/v1/submit/delete_sub_organization", {
3537
+ return this.activity("/public/v1/submit/delete_wallet_accounts", {
2978
3538
  parameters: rest,
2979
3539
  organizationId: organizationId ??
2980
3540
  session?.organizationId ??
2981
3541
  this.config.organizationId,
2982
3542
  timestampMs: timestampMs ?? String(Date.now()),
2983
3543
  generateAppProofs: generateAppProofs ?? false,
2984
- type: "ACTIVITY_TYPE_DELETE_SUB_ORGANIZATION",
2985
- }, "deleteSubOrganizationResult", stampWith);
3544
+ type: "ACTIVITY_TYPE_DELETE_WALLET_ACCOUNTS",
3545
+ }, "deleteWalletAccountsResult", stampWith);
2986
3546
  };
2987
- this.stampDeleteSubOrganization = async (input, stampWith) => {
3547
+ this.stampDeleteWalletAccounts = async (input, stampWith) => {
2988
3548
  const activeStamper = this.getStamper(stampWith);
2989
3549
  if (!activeStamper) {
2990
3550
  return undefined;
2991
3551
  }
2992
3552
  const { organizationId, timestampMs, ...parameters } = input;
2993
3553
  const session = await this.storageManager?.getActiveSession();
2994
- const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/delete_sub_organization";
3554
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/delete_wallet_accounts";
2995
3555
  const bodyWithType = {
2996
3556
  parameters,
2997
3557
  organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
2998
3558
  timestampMs: timestampMs ?? String(Date.now()),
2999
- type: "ACTIVITY_TYPE_DELETE_SUB_ORGANIZATION",
3559
+ type: "ACTIVITY_TYPE_DELETE_WALLET_ACCOUNTS",
3000
3560
  };
3001
3561
  const stringifiedBody = JSON.stringify(bodyWithType);
3002
3562
  const stamp = await activeStamper.stamp(stringifiedBody);
@@ -3006,35 +3566,34 @@ class TurnkeySDKClientBase {
3006
3566
  url: fullUrl,
3007
3567
  };
3008
3568
  };
3009
- this.deleteTvcAppAndDeployments = async (input, stampWith) => {
3569
+ this.deleteWallets = async (input, stampWith) => {
3010
3570
  const { organizationId, timestampMs, ...rest } = input;
3011
3571
  //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
3012
3572
  const generateAppProofs = input?.generateAppProofs ?? false;
3013
3573
  const session = await this.storageManager?.getActiveSession();
3014
- return this.activity("/public/v1/submit/delete_tvc_app_and_deployments", {
3574
+ return this.activity("/public/v1/submit/delete_wallets", {
3015
3575
  parameters: rest,
3016
3576
  organizationId: organizationId ??
3017
3577
  session?.organizationId ??
3018
3578
  this.config.organizationId,
3019
3579
  timestampMs: timestampMs ?? String(Date.now()),
3020
3580
  generateAppProofs: generateAppProofs ?? false,
3021
- type: "ACTIVITY_TYPE_DELETE_TVC_APP_AND_DEPLOYMENTS",
3022
- }, "deleteTvcAppAndDeploymentsResult", stampWith);
3581
+ type: "ACTIVITY_TYPE_DELETE_WALLETS",
3582
+ }, "deleteWalletsResult", stampWith);
3023
3583
  };
3024
- this.stampDeleteTvcAppAndDeployments = async (input, stampWith) => {
3584
+ this.stampDeleteWallets = async (input, stampWith) => {
3025
3585
  const activeStamper = this.getStamper(stampWith);
3026
3586
  if (!activeStamper) {
3027
3587
  return undefined;
3028
3588
  }
3029
3589
  const { organizationId, timestampMs, ...parameters } = input;
3030
3590
  const session = await this.storageManager?.getActiveSession();
3031
- const fullUrl = this.config.apiBaseUrl +
3032
- "/public/v1/submit/delete_tvc_app_and_deployments";
3591
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/delete_wallets";
3033
3592
  const bodyWithType = {
3034
3593
  parameters,
3035
3594
  organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
3036
3595
  timestampMs: timestampMs ?? String(Date.now()),
3037
- type: "ACTIVITY_TYPE_DELETE_TVC_APP_AND_DEPLOYMENTS",
3596
+ type: "ACTIVITY_TYPE_DELETE_WALLETS",
3038
3597
  };
3039
3598
  const stringifiedBody = JSON.stringify(bodyWithType);
3040
3599
  const stamp = await activeStamper.stamp(stringifiedBody);
@@ -3044,34 +3603,34 @@ class TurnkeySDKClientBase {
3044
3603
  url: fullUrl,
3045
3604
  };
3046
3605
  };
3047
- this.deleteTvcDeployment = async (input, stampWith) => {
3606
+ this.deleteWebhookEndpoint = async (input, stampWith) => {
3048
3607
  const { organizationId, timestampMs, ...rest } = input;
3049
3608
  //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
3050
3609
  const generateAppProofs = input?.generateAppProofs ?? false;
3051
3610
  const session = await this.storageManager?.getActiveSession();
3052
- return this.activity("/public/v1/submit/delete_tvc_deployment", {
3611
+ return this.activity("/public/v1/submit/delete_webhook_endpoint", {
3053
3612
  parameters: rest,
3054
3613
  organizationId: organizationId ??
3055
3614
  session?.organizationId ??
3056
3615
  this.config.organizationId,
3057
3616
  timestampMs: timestampMs ?? String(Date.now()),
3058
3617
  generateAppProofs: generateAppProofs ?? false,
3059
- type: "ACTIVITY_TYPE_DELETE_TVC_DEPLOYMENT",
3060
- }, "deleteTvcDeploymentResult", stampWith);
3618
+ type: "ACTIVITY_TYPE_DELETE_WEBHOOK_ENDPOINT",
3619
+ }, "deleteWebhookEndpointResult", stampWith);
3061
3620
  };
3062
- this.stampDeleteTvcDeployment = async (input, stampWith) => {
3621
+ this.stampDeleteWebhookEndpoint = async (input, stampWith) => {
3063
3622
  const activeStamper = this.getStamper(stampWith);
3064
3623
  if (!activeStamper) {
3065
3624
  return undefined;
3066
3625
  }
3067
3626
  const { organizationId, timestampMs, ...parameters } = input;
3068
3627
  const session = await this.storageManager?.getActiveSession();
3069
- const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/delete_tvc_deployment";
3628
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/delete_webhook_endpoint";
3070
3629
  const bodyWithType = {
3071
3630
  parameters,
3072
3631
  organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
3073
3632
  timestampMs: timestampMs ?? String(Date.now()),
3074
- type: "ACTIVITY_TYPE_DELETE_TVC_DEPLOYMENT",
3633
+ type: "ACTIVITY_TYPE_DELETE_WEBHOOK_ENDPOINT",
3075
3634
  };
3076
3635
  const stringifiedBody = JSON.stringify(bodyWithType);
3077
3636
  const stamp = await activeStamper.stamp(stringifiedBody);
@@ -3081,34 +3640,34 @@ class TurnkeySDKClientBase {
3081
3640
  url: fullUrl,
3082
3641
  };
3083
3642
  };
3084
- this.deleteUserTags = async (input, stampWith) => {
3643
+ this.earnDeployWrapper = async (input, stampWith) => {
3085
3644
  const { organizationId, timestampMs, ...rest } = input;
3086
3645
  //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
3087
3646
  const generateAppProofs = input?.generateAppProofs ?? false;
3088
3647
  const session = await this.storageManager?.getActiveSession();
3089
- return this.activity("/public/v1/submit/delete_user_tags", {
3648
+ return this.activity("/public/v1/submit/earn_deploy_wrapper", {
3090
3649
  parameters: rest,
3091
3650
  organizationId: organizationId ??
3092
3651
  session?.organizationId ??
3093
3652
  this.config.organizationId,
3094
3653
  timestampMs: timestampMs ?? String(Date.now()),
3095
3654
  generateAppProofs: generateAppProofs ?? false,
3096
- type: "ACTIVITY_TYPE_DELETE_USER_TAGS",
3097
- }, "deleteUserTagsResult", stampWith);
3655
+ type: "ACTIVITY_TYPE_EARN_DEPLOY_WRAPPER",
3656
+ }, "earnDeployWrapperResult", stampWith);
3098
3657
  };
3099
- this.stampDeleteUserTags = async (input, stampWith) => {
3658
+ this.stampEarnDeployWrapper = async (input, stampWith) => {
3100
3659
  const activeStamper = this.getStamper(stampWith);
3101
3660
  if (!activeStamper) {
3102
3661
  return undefined;
3103
3662
  }
3104
3663
  const { organizationId, timestampMs, ...parameters } = input;
3105
3664
  const session = await this.storageManager?.getActiveSession();
3106
- const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/delete_user_tags";
3665
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/earn_deploy_wrapper";
3107
3666
  const bodyWithType = {
3108
3667
  parameters,
3109
3668
  organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
3110
3669
  timestampMs: timestampMs ?? String(Date.now()),
3111
- type: "ACTIVITY_TYPE_DELETE_USER_TAGS",
3670
+ type: "ACTIVITY_TYPE_EARN_DEPLOY_WRAPPER",
3112
3671
  };
3113
3672
  const stringifiedBody = JSON.stringify(bodyWithType);
3114
3673
  const stamp = await activeStamper.stamp(stringifiedBody);
@@ -3118,34 +3677,34 @@ class TurnkeySDKClientBase {
3118
3677
  url: fullUrl,
3119
3678
  };
3120
3679
  };
3121
- this.deleteUsers = async (input, stampWith) => {
3680
+ this.earnDeposit = async (input, stampWith) => {
3122
3681
  const { organizationId, timestampMs, ...rest } = input;
3123
3682
  //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
3124
3683
  const generateAppProofs = input?.generateAppProofs ?? false;
3125
3684
  const session = await this.storageManager?.getActiveSession();
3126
- return this.activity("/public/v1/submit/delete_users", {
3685
+ return this.activity("/public/v1/submit/earn_deposit", {
3127
3686
  parameters: rest,
3128
3687
  organizationId: organizationId ??
3129
3688
  session?.organizationId ??
3130
3689
  this.config.organizationId,
3131
3690
  timestampMs: timestampMs ?? String(Date.now()),
3132
3691
  generateAppProofs: generateAppProofs ?? false,
3133
- type: "ACTIVITY_TYPE_DELETE_USERS",
3134
- }, "deleteUsersResult", stampWith);
3692
+ type: "ACTIVITY_TYPE_EARN_DEPOSIT",
3693
+ }, "earnDepositResult", stampWith);
3135
3694
  };
3136
- this.stampDeleteUsers = async (input, stampWith) => {
3695
+ this.stampEarnDeposit = async (input, stampWith) => {
3137
3696
  const activeStamper = this.getStamper(stampWith);
3138
3697
  if (!activeStamper) {
3139
3698
  return undefined;
3140
3699
  }
3141
3700
  const { organizationId, timestampMs, ...parameters } = input;
3142
3701
  const session = await this.storageManager?.getActiveSession();
3143
- const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/delete_users";
3702
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/earn_deposit";
3144
3703
  const bodyWithType = {
3145
3704
  parameters,
3146
3705
  organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
3147
3706
  timestampMs: timestampMs ?? String(Date.now()),
3148
- type: "ACTIVITY_TYPE_DELETE_USERS",
3707
+ type: "ACTIVITY_TYPE_EARN_DEPOSIT",
3149
3708
  };
3150
3709
  const stringifiedBody = JSON.stringify(bodyWithType);
3151
3710
  const stamp = await activeStamper.stamp(stringifiedBody);
@@ -3155,34 +3714,34 @@ class TurnkeySDKClientBase {
3155
3714
  url: fullUrl,
3156
3715
  };
3157
3716
  };
3158
- this.deleteWalletAccounts = async (input, stampWith) => {
3717
+ this.earnSetWrapperState = async (input, stampWith) => {
3159
3718
  const { organizationId, timestampMs, ...rest } = input;
3160
3719
  //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
3161
3720
  const generateAppProofs = input?.generateAppProofs ?? false;
3162
3721
  const session = await this.storageManager?.getActiveSession();
3163
- return this.activity("/public/v1/submit/delete_wallet_accounts", {
3722
+ return this.activity("/public/v1/submit/earn_set_wrapper_state", {
3164
3723
  parameters: rest,
3165
3724
  organizationId: organizationId ??
3166
3725
  session?.organizationId ??
3167
3726
  this.config.organizationId,
3168
3727
  timestampMs: timestampMs ?? String(Date.now()),
3169
3728
  generateAppProofs: generateAppProofs ?? false,
3170
- type: "ACTIVITY_TYPE_DELETE_WALLET_ACCOUNTS",
3171
- }, "deleteWalletAccountsResult", stampWith);
3729
+ type: "ACTIVITY_TYPE_EARN_SET_WRAPPER_STATE",
3730
+ }, "earnSetWrapperStateResult", stampWith);
3172
3731
  };
3173
- this.stampDeleteWalletAccounts = async (input, stampWith) => {
3732
+ this.stampEarnSetWrapperState = async (input, stampWith) => {
3174
3733
  const activeStamper = this.getStamper(stampWith);
3175
3734
  if (!activeStamper) {
3176
3735
  return undefined;
3177
3736
  }
3178
3737
  const { organizationId, timestampMs, ...parameters } = input;
3179
3738
  const session = await this.storageManager?.getActiveSession();
3180
- const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/delete_wallet_accounts";
3739
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/earn_set_wrapper_state";
3181
3740
  const bodyWithType = {
3182
3741
  parameters,
3183
3742
  organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
3184
3743
  timestampMs: timestampMs ?? String(Date.now()),
3185
- type: "ACTIVITY_TYPE_DELETE_WALLET_ACCOUNTS",
3744
+ type: "ACTIVITY_TYPE_EARN_SET_WRAPPER_STATE",
3186
3745
  };
3187
3746
  const stringifiedBody = JSON.stringify(bodyWithType);
3188
3747
  const stamp = await activeStamper.stamp(stringifiedBody);
@@ -3192,34 +3751,34 @@ class TurnkeySDKClientBase {
3192
3751
  url: fullUrl,
3193
3752
  };
3194
3753
  };
3195
- this.deleteWallets = async (input, stampWith) => {
3754
+ this.earnWithdraw = async (input, stampWith) => {
3196
3755
  const { organizationId, timestampMs, ...rest } = input;
3197
3756
  //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
3198
3757
  const generateAppProofs = input?.generateAppProofs ?? false;
3199
3758
  const session = await this.storageManager?.getActiveSession();
3200
- return this.activity("/public/v1/submit/delete_wallets", {
3759
+ return this.activity("/public/v1/submit/earn_withdraw", {
3201
3760
  parameters: rest,
3202
3761
  organizationId: organizationId ??
3203
3762
  session?.organizationId ??
3204
3763
  this.config.organizationId,
3205
3764
  timestampMs: timestampMs ?? String(Date.now()),
3206
3765
  generateAppProofs: generateAppProofs ?? false,
3207
- type: "ACTIVITY_TYPE_DELETE_WALLETS",
3208
- }, "deleteWalletsResult", stampWith);
3766
+ type: "ACTIVITY_TYPE_EARN_WITHDRAW",
3767
+ }, "earnWithdrawResult", stampWith);
3209
3768
  };
3210
- this.stampDeleteWallets = async (input, stampWith) => {
3769
+ this.stampEarnWithdraw = async (input, stampWith) => {
3211
3770
  const activeStamper = this.getStamper(stampWith);
3212
3771
  if (!activeStamper) {
3213
3772
  return undefined;
3214
3773
  }
3215
3774
  const { organizationId, timestampMs, ...parameters } = input;
3216
3775
  const session = await this.storageManager?.getActiveSession();
3217
- const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/delete_wallets";
3776
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/earn_withdraw";
3218
3777
  const bodyWithType = {
3219
3778
  parameters,
3220
3779
  organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
3221
3780
  timestampMs: timestampMs ?? String(Date.now()),
3222
- type: "ACTIVITY_TYPE_DELETE_WALLETS",
3781
+ type: "ACTIVITY_TYPE_EARN_WITHDRAW",
3223
3782
  };
3224
3783
  const stringifiedBody = JSON.stringify(bodyWithType);
3225
3784
  const stamp = await activeStamper.stamp(stringifiedBody);
@@ -3229,34 +3788,34 @@ class TurnkeySDKClientBase {
3229
3788
  url: fullUrl,
3230
3789
  };
3231
3790
  };
3232
- this.deleteWebhookEndpoint = async (input, stampWith) => {
3791
+ this.emailAuth = async (input, stampWith) => {
3233
3792
  const { organizationId, timestampMs, ...rest } = input;
3234
3793
  //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
3235
3794
  const generateAppProofs = input?.generateAppProofs ?? false;
3236
3795
  const session = await this.storageManager?.getActiveSession();
3237
- return this.activity("/public/v1/submit/delete_webhook_endpoint", {
3796
+ return this.activity("/public/v1/submit/email_auth", {
3238
3797
  parameters: rest,
3239
3798
  organizationId: organizationId ??
3240
3799
  session?.organizationId ??
3241
3800
  this.config.organizationId,
3242
3801
  timestampMs: timestampMs ?? String(Date.now()),
3243
3802
  generateAppProofs: generateAppProofs ?? false,
3244
- type: "ACTIVITY_TYPE_DELETE_WEBHOOK_ENDPOINT",
3245
- }, "deleteWebhookEndpointResult", stampWith);
3803
+ type: "ACTIVITY_TYPE_EMAIL_AUTH_V3",
3804
+ }, "emailAuthResult", stampWith);
3246
3805
  };
3247
- this.stampDeleteWebhookEndpoint = async (input, stampWith) => {
3806
+ this.stampEmailAuth = async (input, stampWith) => {
3248
3807
  const activeStamper = this.getStamper(stampWith);
3249
3808
  if (!activeStamper) {
3250
3809
  return undefined;
3251
3810
  }
3252
3811
  const { organizationId, timestampMs, ...parameters } = input;
3253
3812
  const session = await this.storageManager?.getActiveSession();
3254
- const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/delete_webhook_endpoint";
3813
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/email_auth";
3255
3814
  const bodyWithType = {
3256
3815
  parameters,
3257
3816
  organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
3258
3817
  timestampMs: timestampMs ?? String(Date.now()),
3259
- type: "ACTIVITY_TYPE_DELETE_WEBHOOK_ENDPOINT",
3818
+ type: "ACTIVITY_TYPE_EMAIL_AUTH_V3",
3260
3819
  };
3261
3820
  const stringifiedBody = JSON.stringify(bodyWithType);
3262
3821
  const stamp = await activeStamper.stamp(stringifiedBody);
@@ -3266,34 +3825,34 @@ class TurnkeySDKClientBase {
3266
3825
  url: fullUrl,
3267
3826
  };
3268
3827
  };
3269
- this.emailAuth = async (input, stampWith) => {
3828
+ this.ethUndelegate7702 = async (input, stampWith) => {
3270
3829
  const { organizationId, timestampMs, ...rest } = input;
3271
3830
  //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
3272
3831
  const generateAppProofs = input?.generateAppProofs ?? false;
3273
3832
  const session = await this.storageManager?.getActiveSession();
3274
- return this.activity("/public/v1/submit/email_auth", {
3833
+ return this.activity("/public/v1/submit/eth_undelegate_7702", {
3275
3834
  parameters: rest,
3276
3835
  organizationId: organizationId ??
3277
3836
  session?.organizationId ??
3278
3837
  this.config.organizationId,
3279
3838
  timestampMs: timestampMs ?? String(Date.now()),
3280
3839
  generateAppProofs: generateAppProofs ?? false,
3281
- type: "ACTIVITY_TYPE_EMAIL_AUTH_V3",
3282
- }, "emailAuthResult", stampWith);
3840
+ type: "ACTIVITY_TYPE_ETH_UNDELEGATE_7702",
3841
+ }, "ethUndelegate7702Result", stampWith);
3283
3842
  };
3284
- this.stampEmailAuth = async (input, stampWith) => {
3843
+ this.stampEthUndelegate7702 = async (input, stampWith) => {
3285
3844
  const activeStamper = this.getStamper(stampWith);
3286
3845
  if (!activeStamper) {
3287
3846
  return undefined;
3288
3847
  }
3289
3848
  const { organizationId, timestampMs, ...parameters } = input;
3290
3849
  const session = await this.storageManager?.getActiveSession();
3291
- const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/email_auth";
3850
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/eth_undelegate_7702";
3292
3851
  const bodyWithType = {
3293
3852
  parameters,
3294
3853
  organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
3295
3854
  timestampMs: timestampMs ?? String(Date.now()),
3296
- type: "ACTIVITY_TYPE_EMAIL_AUTH_V3",
3855
+ type: "ACTIVITY_TYPE_ETH_UNDELEGATE_7702",
3297
3856
  };
3298
3857
  const stringifiedBody = JSON.stringify(bodyWithType);
3299
3858
  const stamp = await activeStamper.stamp(stringifiedBody);
@@ -4301,43 +4860,6 @@ class TurnkeySDKClientBase {
4301
4860
  url: fullUrl,
4302
4861
  };
4303
4862
  };
4304
- this.solSendTransaction = async (input, stampWith) => {
4305
- const { organizationId, timestampMs, ...rest } = input;
4306
- //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
4307
- const generateAppProofs = input?.generateAppProofs ?? false;
4308
- const session = await this.storageManager?.getActiveSession();
4309
- return this.activity("/public/v1/submit/sol_send_transaction", {
4310
- parameters: rest,
4311
- organizationId: organizationId ??
4312
- session?.organizationId ??
4313
- this.config.organizationId,
4314
- timestampMs: timestampMs ?? String(Date.now()),
4315
- generateAppProofs: generateAppProofs ?? false,
4316
- type: "ACTIVITY_TYPE_SOL_SEND_TRANSACTION",
4317
- }, "solSendTransactionResult", stampWith);
4318
- };
4319
- this.stampSolSendTransaction = async (input, stampWith) => {
4320
- const activeStamper = this.getStamper(stampWith);
4321
- if (!activeStamper) {
4322
- return undefined;
4323
- }
4324
- const { organizationId, timestampMs, ...parameters } = input;
4325
- const session = await this.storageManager?.getActiveSession();
4326
- const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/sol_send_transaction";
4327
- const bodyWithType = {
4328
- parameters,
4329
- organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
4330
- timestampMs: timestampMs ?? String(Date.now()),
4331
- type: "ACTIVITY_TYPE_SOL_SEND_TRANSACTION",
4332
- };
4333
- const stringifiedBody = JSON.stringify(bodyWithType);
4334
- const stamp = await activeStamper.stamp(stringifiedBody);
4335
- return {
4336
- body: stringifiedBody,
4337
- stamp: stamp,
4338
- url: fullUrl,
4339
- };
4340
- };
4341
4863
  this.sparkClaimTransfer = async (input, stampWith) => {
4342
4864
  const { organizationId, timestampMs, ...rest } = input;
4343
4865
  //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
@@ -5043,6 +5565,43 @@ class TurnkeySDKClientBase {
5043
5565
  url: fullUrl,
5044
5566
  };
5045
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
+ };
5046
5605
  this.verifyOtp = async (input, stampWith) => {
5047
5606
  const { organizationId, timestampMs, ...rest } = input;
5048
5607
  //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
@@ -5154,6 +5713,80 @@ class TurnkeySDKClientBase {
5154
5713
  url: fullUrl,
5155
5714
  };
5156
5715
  };
5716
+ this.solSendTransaction = async (input, stampWith) => {
5717
+ const { organizationId, timestampMs, ...rest } = input;
5718
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
5719
+ const generateAppProofs = input?.generateAppProofs ?? false;
5720
+ const session = await this.storageManager?.getActiveSession();
5721
+ return this.activity("/public/v1/submit/sol_send_transaction", {
5722
+ parameters: rest,
5723
+ organizationId: organizationId ??
5724
+ session?.organizationId ??
5725
+ this.config.organizationId,
5726
+ timestampMs: timestampMs ?? String(Date.now()),
5727
+ generateAppProofs: generateAppProofs ?? false,
5728
+ type: "ACTIVITY_TYPE_SOL_SEND_TRANSACTION",
5729
+ }, "solSendTransactionResult", stampWith);
5730
+ };
5731
+ this.stampSolSendTransaction = async (input, stampWith) => {
5732
+ const activeStamper = this.getStamper(stampWith);
5733
+ if (!activeStamper) {
5734
+ return undefined;
5735
+ }
5736
+ const { organizationId, timestampMs, ...parameters } = input;
5737
+ const session = await this.storageManager?.getActiveSession();
5738
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/sol_send_transaction";
5739
+ const bodyWithType = {
5740
+ parameters,
5741
+ organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
5742
+ timestampMs: timestampMs ?? String(Date.now()),
5743
+ type: "ACTIVITY_TYPE_SOL_SEND_TRANSACTION",
5744
+ };
5745
+ const stringifiedBody = JSON.stringify(bodyWithType);
5746
+ const stamp = await activeStamper.stamp(stringifiedBody);
5747
+ return {
5748
+ body: stringifiedBody,
5749
+ stamp: stamp,
5750
+ url: fullUrl,
5751
+ };
5752
+ };
5753
+ this.solSendTransactionV2 = async (input, stampWith) => {
5754
+ const { organizationId, timestampMs, ...rest } = input;
5755
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
5756
+ const generateAppProofs = input?.generateAppProofs ?? false;
5757
+ const session = await this.storageManager?.getActiveSession();
5758
+ return this.activity("/public/v1/submit/sol_send_transaction", {
5759
+ parameters: rest,
5760
+ organizationId: organizationId ??
5761
+ session?.organizationId ??
5762
+ this.config.organizationId,
5763
+ timestampMs: timestampMs ?? String(Date.now()),
5764
+ generateAppProofs: generateAppProofs ?? false,
5765
+ type: "ACTIVITY_TYPE_SOL_SEND_TRANSACTION_V2",
5766
+ }, "solSendTransactionResultV2", stampWith);
5767
+ };
5768
+ this.stampSolSendTransactionV2 = async (input, stampWith) => {
5769
+ const activeStamper = this.getStamper(stampWith);
5770
+ if (!activeStamper) {
5771
+ return undefined;
5772
+ }
5773
+ const { organizationId, timestampMs, ...parameters } = input;
5774
+ const session = await this.storageManager?.getActiveSession();
5775
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/sol_send_transaction";
5776
+ const bodyWithType = {
5777
+ parameters,
5778
+ organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
5779
+ timestampMs: timestampMs ?? String(Date.now()),
5780
+ type: "ACTIVITY_TYPE_SOL_SEND_TRANSACTION_V2",
5781
+ };
5782
+ const stringifiedBody = JSON.stringify(bodyWithType);
5783
+ const stamp = await activeStamper.stamp(stringifiedBody);
5784
+ return {
5785
+ body: stringifiedBody,
5786
+ stamp: stamp,
5787
+ url: fullUrl,
5788
+ };
5789
+ };
5157
5790
  this.proxyGetAccount = async (input) => {
5158
5791
  return this.authProxyRequest("/v1/account", input);
5159
5792
  };
@@ -5163,11 +5796,11 @@ class TurnkeySDKClientBase {
5163
5796
  this.proxyOAuthLogin = async (input) => {
5164
5797
  return this.authProxyRequest("/v1/oauth_login", input);
5165
5798
  };
5166
- this.proxyInitOtp = async (input) => {
5167
- return this.authProxyRequest("/v1/otp_init", input);
5799
+ this.proxyInitOtp = async (input, captchaToken) => {
5800
+ return this.authProxyRequest("/v1/otp_init", input, captchaToken);
5168
5801
  };
5169
- this.proxyInitOtpV2 = async (input) => {
5170
- return this.authProxyRequest("/v1/otp_init_v2", input);
5802
+ this.proxyInitOtpV2 = async (input, captchaToken) => {
5803
+ return this.authProxyRequest("/v1/otp_init_v2", input, captchaToken);
5171
5804
  };
5172
5805
  this.proxyOtpLogin = async (input) => {
5173
5806
  return this.authProxyRequest("/v1/otp_login", input);
@@ -5181,11 +5814,14 @@ class TurnkeySDKClientBase {
5181
5814
  this.proxyVerifyOtpV2 = async (input) => {
5182
5815
  return this.authProxyRequest("/v1/otp_verify_v2", input);
5183
5816
  };
5184
- this.proxySignup = async (input) => {
5185
- return this.authProxyRequest("/v1/signup", input);
5817
+ this.proxySignup = async (input, captchaToken) => {
5818
+ return this.authProxyRequest("/v1/signup", input, captchaToken);
5186
5819
  };
5187
- this.proxySignupV2 = async (input) => {
5188
- return this.authProxyRequest("/v1/signup_v2", input);
5820
+ this.proxySignupV2 = async (input, captchaToken) => {
5821
+ return this.authProxyRequest("/v1/signup_v2", input, captchaToken);
5822
+ };
5823
+ this.proxyGetWalletKitClientParams = async (input) => {
5824
+ return this.authProxyRequest("/v1/wallet_kit_client_params", input);
5189
5825
  };
5190
5826
  this.proxyGetWalletKitConfig = async (input) => {
5191
5827
  return this.authProxyRequest("/v1/wallet_kit_config", input);
@@ -5333,7 +5969,7 @@ class TurnkeySDKClientBase {
5333
5969
  ...activityData,
5334
5970
  };
5335
5971
  }
5336
- async authProxyRequest(url, body) {
5972
+ async authProxyRequest(url, body, captchaToken) {
5337
5973
  if (!this.config.authProxyUrl || !this.config.authProxyConfigId) {
5338
5974
  throw new TurnkeyError("Auth Proxy URL or ID is not configured.", TurnkeyErrorCodes.INVALID_CONFIGURATION);
5339
5975
  }
@@ -5343,6 +5979,9 @@ class TurnkeySDKClientBase {
5343
5979
  "Content-Type": "application/json",
5344
5980
  "X-Auth-Proxy-Config-ID": this.config.authProxyConfigId,
5345
5981
  };
5982
+ if (captchaToken) {
5983
+ headers["X-Captcha-Token"] = captchaToken;
5984
+ }
5346
5985
  const response = await fetch(fullUrl, {
5347
5986
  method: "POST",
5348
5987
  headers: headers,