@turnkey/core 1.14.1 → 2.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.
Files changed (87) hide show
  1. package/dist/__clients__/core.d.ts +86 -33
  2. package/dist/__clients__/core.d.ts.map +1 -1
  3. package/dist/__clients__/core.js +364 -201
  4. package/dist/__clients__/core.js.map +1 -1
  5. package/dist/__clients__/core.mjs +365 -202
  6. package/dist/__clients__/core.mjs.map +1 -1
  7. package/dist/__generated__/sdk-client-base.d.ts +40 -3
  8. package/dist/__generated__/sdk-client-base.d.ts.map +1 -1
  9. package/dist/__generated__/sdk-client-base.js +961 -101
  10. package/dist/__generated__/sdk-client-base.js.map +1 -1
  11. package/dist/__generated__/sdk-client-base.mjs +956 -96
  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.d.ts.map +1 -1
  15. package/dist/__generated__/version.js +1 -1
  16. package/dist/__generated__/version.mjs +1 -1
  17. package/dist/__stampers__/api/base.d.ts +2 -1
  18. package/dist/__stampers__/api/base.d.ts.map +1 -1
  19. package/dist/__stampers__/api/mobile/stamper.d.ts +2 -1
  20. package/dist/__stampers__/api/mobile/stamper.d.ts.map +1 -1
  21. package/dist/__stampers__/api/mobile/stamper.js.map +1 -1
  22. package/dist/__stampers__/api/mobile/stamper.mjs.map +1 -1
  23. package/dist/__stampers__/api/web/stamper.d.ts +2 -1
  24. package/dist/__stampers__/api/web/stamper.d.ts.map +1 -1
  25. package/dist/__stampers__/api/web/stamper.js.map +1 -1
  26. package/dist/__stampers__/api/web/stamper.mjs.map +1 -1
  27. package/dist/__stampers__/passkey/base.d.ts +3 -1
  28. package/dist/__stampers__/passkey/base.d.ts.map +1 -1
  29. package/dist/__stampers__/passkey/base.js +19 -0
  30. package/dist/__stampers__/passkey/base.js.map +1 -1
  31. package/dist/__stampers__/passkey/base.mjs +20 -1
  32. package/dist/__stampers__/passkey/base.mjs.map +1 -1
  33. package/dist/__tests__/poll-transaction-status-test.d.ts +2 -0
  34. package/dist/__tests__/poll-transaction-status-test.d.ts.map +1 -0
  35. package/dist/__tests__/utils-test.d.ts +2 -0
  36. package/dist/__tests__/utils-test.d.ts.map +1 -0
  37. package/dist/__types__/auth.d.ts +2 -41
  38. package/dist/__types__/auth.d.ts.map +1 -1
  39. package/dist/__types__/auth.js.map +1 -1
  40. package/dist/__types__/auth.mjs.map +1 -1
  41. package/dist/__types__/config.d.ts +3 -2
  42. package/dist/__types__/config.d.ts.map +1 -1
  43. package/dist/__types__/enums.d.ts +1 -0
  44. package/dist/__types__/enums.d.ts.map +1 -1
  45. package/dist/__types__/enums.js +1 -0
  46. package/dist/__types__/enums.js.map +1 -1
  47. package/dist/__types__/enums.mjs +1 -0
  48. package/dist/__types__/enums.mjs.map +1 -1
  49. package/dist/__types__/http.d.ts +1 -14
  50. package/dist/__types__/http.d.ts.map +1 -1
  51. package/dist/__types__/index.d.ts +0 -1
  52. package/dist/__types__/index.d.ts.map +1 -1
  53. package/dist/__types__/method-types/shared.d.ts +28 -13
  54. package/dist/__types__/method-types/shared.d.ts.map +1 -1
  55. package/dist/__wallet__/stamper.d.ts +2 -1
  56. package/dist/__wallet__/stamper.d.ts.map +1 -1
  57. package/dist/__wallet__/stamper.js.map +1 -1
  58. package/dist/__wallet__/stamper.mjs.map +1 -1
  59. package/dist/index.d.ts +1 -2
  60. package/dist/index.d.ts.map +1 -1
  61. package/dist/index.js +8 -6
  62. package/dist/index.js.map +1 -1
  63. package/dist/index.mjs +2 -4
  64. package/dist/index.mjs.map +1 -1
  65. package/dist/turnkey-helpers.d.ts +4 -0
  66. package/dist/turnkey-helpers.d.ts.map +1 -1
  67. package/dist/turnkey-helpers.js +28 -0
  68. package/dist/turnkey-helpers.js.map +1 -1
  69. package/dist/turnkey-helpers.mjs +25 -1
  70. package/dist/turnkey-helpers.mjs.map +1 -1
  71. package/dist/utils.d.ts +41 -18
  72. package/dist/utils.d.ts.map +1 -1
  73. package/dist/utils.js +126 -57
  74. package/dist/utils.js.map +1 -1
  75. package/dist/utils.mjs +100 -38
  76. package/dist/utils.mjs.map +1 -1
  77. package/package.json +8 -8
  78. package/dist/__types__/error.d.ts +0 -13
  79. package/dist/__types__/error.d.ts.map +0 -1
  80. package/dist/__types__/error.js +0 -18
  81. package/dist/__types__/error.js.map +0 -1
  82. package/dist/__types__/error.mjs +0 -16
  83. package/dist/__types__/error.mjs.map +0 -1
  84. package/dist/__types__/http.js +0 -11
  85. package/dist/__types__/http.js.map +0 -1
  86. package/dist/__types__/http.mjs +0 -9
  87. package/dist/__types__/http.mjs.map +0 -1
@@ -1,8 +1,6 @@
1
- import { StamperType } from '../__types__/enums.mjs';
2
- import { TurnkeyRequestError } from '../__types__/error.mjs';
3
- import { TERMINAL_ACTIVITY_STATUSES } from '../__types__/http.mjs';
4
1
  import { VERSION } from './version.mjs';
5
- import { TurnkeyError, TurnkeyErrorCodes } from '@turnkey/sdk-types';
2
+ import { TERMINAL_ACTIVITY_STATUSES, TurnkeyRequestError, TurnkeyError, TurnkeyErrorCodes } from '@turnkey/sdk-types';
3
+ import { StamperType } from '../__types__/enums.mjs';
6
4
 
7
5
  /* @generated by codegen. DO NOT EDIT BY HAND */
8
6
  class TurnkeySDKClientBase {
@@ -247,6 +245,36 @@ class TurnkeySDKClientBase {
247
245
  url: fullUrl,
248
246
  };
249
247
  };
248
+ this.getIpAllowlist = async (input, stampWith) => {
249
+ const session = await this.storageManager?.getActiveSession();
250
+ return this.request("/public/v1/query/get_ip_allowlist", {
251
+ ...input,
252
+ organizationId: input.organizationId ??
253
+ session?.organizationId ??
254
+ this.config.organizationId,
255
+ }, stampWith);
256
+ };
257
+ this.stampGetIpAllowlist = 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_ip_allowlist";
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
+ };
250
278
  this.getLatestBootProof = async (input, stampWith) => {
251
279
  const session = await this.storageManager?.getActiveSession();
252
280
  return this.request("/public/v1/query/get_latest_boot_proof", {
@@ -577,6 +605,66 @@ class TurnkeySDKClientBase {
577
605
  url: fullUrl,
578
606
  };
579
607
  };
608
+ this.getTvcApp = async (input, stampWith) => {
609
+ const session = await this.storageManager?.getActiveSession();
610
+ return this.request("/public/v1/query/get_tvc_app", {
611
+ ...input,
612
+ organizationId: input.organizationId ??
613
+ session?.organizationId ??
614
+ this.config.organizationId,
615
+ }, stampWith);
616
+ };
617
+ this.stampGetTvcApp = async (input, stampWith) => {
618
+ const activeStamper = this.getStamper(stampWith);
619
+ if (!activeStamper) {
620
+ return undefined;
621
+ }
622
+ const session = await this.storageManager?.getActiveSession();
623
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_tvc_app";
624
+ const body = {
625
+ ...input,
626
+ organizationId: input.organizationId ??
627
+ session?.organizationId ??
628
+ this.config.organizationId,
629
+ };
630
+ const stringifiedBody = JSON.stringify(body);
631
+ const stamp = await activeStamper.stamp(stringifiedBody);
632
+ return {
633
+ body: stringifiedBody,
634
+ stamp: stamp,
635
+ url: fullUrl,
636
+ };
637
+ };
638
+ this.getTvcDeployment = async (input, stampWith) => {
639
+ const session = await this.storageManager?.getActiveSession();
640
+ return this.request("/public/v1/query/get_tvc_deployment", {
641
+ ...input,
642
+ organizationId: input.organizationId ??
643
+ session?.organizationId ??
644
+ this.config.organizationId,
645
+ }, stampWith);
646
+ };
647
+ this.stampGetTvcDeployment = async (input, stampWith) => {
648
+ const activeStamper = this.getStamper(stampWith);
649
+ if (!activeStamper) {
650
+ return undefined;
651
+ }
652
+ const session = await this.storageManager?.getActiveSession();
653
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_tvc_deployment";
654
+ const body = {
655
+ ...input,
656
+ organizationId: input.organizationId ??
657
+ session?.organizationId ??
658
+ this.config.organizationId,
659
+ };
660
+ const stringifiedBody = JSON.stringify(body);
661
+ const stamp = await activeStamper.stamp(stringifiedBody);
662
+ return {
663
+ body: stringifiedBody,
664
+ stamp: stamp,
665
+ url: fullUrl,
666
+ };
667
+ };
580
668
  this.getUser = async (input, stampWith) => {
581
669
  const session = await this.storageManager?.getActiveSession();
582
670
  return this.request("/public/v1/query/get_user", {
@@ -998,6 +1086,66 @@ class TurnkeySDKClientBase {
998
1086
  url: fullUrl,
999
1087
  };
1000
1088
  };
1089
+ this.getTvcAppDeployments = async (input, stampWith) => {
1090
+ const session = await this.storageManager?.getActiveSession();
1091
+ return this.request("/public/v1/query/list_tvc_app_deployments", {
1092
+ ...input,
1093
+ organizationId: input.organizationId ??
1094
+ session?.organizationId ??
1095
+ this.config.organizationId,
1096
+ }, stampWith);
1097
+ };
1098
+ this.stampGetTvcAppDeployments = async (input, stampWith) => {
1099
+ const activeStamper = this.getStamper(stampWith);
1100
+ if (!activeStamper) {
1101
+ return undefined;
1102
+ }
1103
+ const session = await this.storageManager?.getActiveSession();
1104
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/list_tvc_app_deployments";
1105
+ const body = {
1106
+ ...input,
1107
+ organizationId: input.organizationId ??
1108
+ session?.organizationId ??
1109
+ this.config.organizationId,
1110
+ };
1111
+ const stringifiedBody = JSON.stringify(body);
1112
+ const stamp = await activeStamper.stamp(stringifiedBody);
1113
+ return {
1114
+ body: stringifiedBody,
1115
+ stamp: stamp,
1116
+ url: fullUrl,
1117
+ };
1118
+ };
1119
+ this.getTvcApps = async (input, stampWith) => {
1120
+ const session = await this.storageManager?.getActiveSession();
1121
+ return this.request("/public/v1/query/list_tvc_apps", {
1122
+ ...input,
1123
+ organizationId: input.organizationId ??
1124
+ session?.organizationId ??
1125
+ this.config.organizationId,
1126
+ }, stampWith);
1127
+ };
1128
+ this.stampGetTvcApps = async (input, stampWith) => {
1129
+ const activeStamper = this.getStamper(stampWith);
1130
+ if (!activeStamper) {
1131
+ return undefined;
1132
+ }
1133
+ const session = await this.storageManager?.getActiveSession();
1134
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/list_tvc_apps";
1135
+ const body = {
1136
+ ...input,
1137
+ organizationId: input.organizationId ??
1138
+ session?.organizationId ??
1139
+ this.config.organizationId,
1140
+ };
1141
+ const stringifiedBody = JSON.stringify(body);
1142
+ const stamp = await activeStamper.stamp(stringifiedBody);
1143
+ return {
1144
+ body: stringifiedBody,
1145
+ stamp: stamp,
1146
+ url: fullUrl,
1147
+ };
1148
+ };
1001
1149
  this.listUserTags = async (input = {}, stampWith) => {
1002
1150
  const session = await this.storageManager?.getActiveSession();
1003
1151
  return this.request("/public/v1/query/list_user_tags", {
@@ -1178,22 +1326,22 @@ class TurnkeySDKClientBase {
1178
1326
  url: fullUrl,
1179
1327
  };
1180
1328
  };
1181
- this.getWhoami = async (input = {}, stampWith) => {
1329
+ this.validateTvcImage = async (input, stampWith) => {
1182
1330
  const session = await this.storageManager?.getActiveSession();
1183
- return this.request("/public/v1/query/whoami", {
1331
+ return this.request("/public/v1/query/validate_tvc_image", {
1184
1332
  ...input,
1185
1333
  organizationId: input.organizationId ??
1186
1334
  session?.organizationId ??
1187
1335
  this.config.organizationId,
1188
1336
  }, stampWith);
1189
1337
  };
1190
- this.stampGetWhoami = async (input, stampWith) => {
1338
+ this.stampValidateTvcImage = async (input, stampWith) => {
1191
1339
  const activeStamper = this.getStamper(stampWith);
1192
1340
  if (!activeStamper) {
1193
1341
  return undefined;
1194
1342
  }
1195
1343
  const session = await this.storageManager?.getActiveSession();
1196
- const fullUrl = this.config.apiBaseUrl + "/public/v1/query/whoami";
1344
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/validate_tvc_image";
1197
1345
  const body = {
1198
1346
  ...input,
1199
1347
  organizationId: input.organizationId ??
@@ -1208,33 +1356,29 @@ class TurnkeySDKClientBase {
1208
1356
  url: fullUrl,
1209
1357
  };
1210
1358
  };
1211
- this.approveActivity = async (input, stampWith) => {
1212
- const { organizationId, timestampMs, ...rest } = input;
1359
+ this.getWhoami = async (input = {}, stampWith) => {
1213
1360
  const session = await this.storageManager?.getActiveSession();
1214
- return this.activityDecision("/public/v1/submit/approve_activity", {
1215
- parameters: rest,
1216
- organizationId: organizationId ??
1361
+ return this.request("/public/v1/query/whoami", {
1362
+ ...input,
1363
+ organizationId: input.organizationId ??
1217
1364
  session?.organizationId ??
1218
1365
  this.config.organizationId,
1219
- timestampMs: timestampMs ?? String(Date.now()),
1220
- type: "ACTIVITY_TYPE_APPROVE_ACTIVITY",
1221
1366
  }, stampWith);
1222
1367
  };
1223
- this.stampApproveActivity = async (input, stampWith) => {
1368
+ this.stampGetWhoami = async (input, stampWith) => {
1224
1369
  const activeStamper = this.getStamper(stampWith);
1225
1370
  if (!activeStamper) {
1226
1371
  return undefined;
1227
1372
  }
1228
- const { organizationId, timestampMs, ...parameters } = input;
1229
1373
  const session = await this.storageManager?.getActiveSession();
1230
- const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/approve_activity";
1231
- const bodyWithType = {
1232
- parameters,
1233
- organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
1234
- timestampMs: timestampMs ?? String(Date.now()),
1235
- type: "ACTIVITY_TYPE_APPROVE_ACTIVITY",
1374
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/whoami";
1375
+ const body = {
1376
+ ...input,
1377
+ organizationId: input.organizationId ??
1378
+ session?.organizationId ??
1379
+ this.config.organizationId,
1236
1380
  };
1237
- const stringifiedBody = JSON.stringify(bodyWithType);
1381
+ const stringifiedBody = JSON.stringify(body);
1238
1382
  const stamp = await activeStamper.stamp(stringifiedBody);
1239
1383
  return {
1240
1384
  body: stringifiedBody,
@@ -1242,31 +1386,33 @@ class TurnkeySDKClientBase {
1242
1386
  url: fullUrl,
1243
1387
  };
1244
1388
  };
1245
- this.createApiKeys = async (input, stampWith) => {
1389
+ this.approveActivity = async (input, stampWith) => {
1246
1390
  const { organizationId, timestampMs, ...rest } = input;
1391
+ const generateAppProofs = input?.generateAppProofs ?? false;
1247
1392
  const session = await this.storageManager?.getActiveSession();
1248
- return this.activity("/public/v1/submit/create_api_keys", {
1393
+ return this.activityDecision("/public/v1/submit/approve_activity", {
1249
1394
  parameters: rest,
1250
1395
  organizationId: organizationId ??
1251
1396
  session?.organizationId ??
1252
1397
  this.config.organizationId,
1253
1398
  timestampMs: timestampMs ?? String(Date.now()),
1254
- type: "ACTIVITY_TYPE_CREATE_API_KEYS_V2",
1255
- }, "createApiKeysResult", stampWith);
1399
+ generateAppProofs: generateAppProofs ?? false,
1400
+ type: "ACTIVITY_TYPE_APPROVE_ACTIVITY",
1401
+ }, stampWith);
1256
1402
  };
1257
- this.stampCreateApiKeys = async (input, stampWith) => {
1403
+ this.stampApproveActivity = async (input, stampWith) => {
1258
1404
  const activeStamper = this.getStamper(stampWith);
1259
1405
  if (!activeStamper) {
1260
1406
  return undefined;
1261
1407
  }
1262
1408
  const { organizationId, timestampMs, ...parameters } = input;
1263
1409
  const session = await this.storageManager?.getActiveSession();
1264
- const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_api_keys";
1410
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/approve_activity";
1265
1411
  const bodyWithType = {
1266
1412
  parameters,
1267
1413
  organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
1268
1414
  timestampMs: timestampMs ?? String(Date.now()),
1269
- type: "ACTIVITY_TYPE_CREATE_API_KEYS_V2",
1415
+ type: "ACTIVITY_TYPE_APPROVE_ACTIVITY",
1270
1416
  };
1271
1417
  const stringifiedBody = JSON.stringify(bodyWithType);
1272
1418
  const stamp = await activeStamper.stamp(stringifiedBody);
@@ -1276,31 +1422,34 @@ class TurnkeySDKClientBase {
1276
1422
  url: fullUrl,
1277
1423
  };
1278
1424
  };
1279
- this.createApiOnlyUsers = async (input, stampWith) => {
1425
+ this.createApiKeys = async (input, stampWith) => {
1280
1426
  const { organizationId, timestampMs, ...rest } = input;
1427
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
1428
+ const generateAppProofs = input?.generateAppProofs ?? false;
1281
1429
  const session = await this.storageManager?.getActiveSession();
1282
- return this.activity("/public/v1/submit/create_api_only_users", {
1430
+ return this.activity("/public/v1/submit/create_api_keys", {
1283
1431
  parameters: rest,
1284
1432
  organizationId: organizationId ??
1285
1433
  session?.organizationId ??
1286
1434
  this.config.organizationId,
1287
1435
  timestampMs: timestampMs ?? String(Date.now()),
1288
- type: "ACTIVITY_TYPE_CREATE_API_ONLY_USERS",
1289
- }, "createApiOnlyUsersResult", stampWith);
1436
+ generateAppProofs: generateAppProofs ?? false,
1437
+ type: "ACTIVITY_TYPE_CREATE_API_KEYS_V2",
1438
+ }, "createApiKeysResult", stampWith);
1290
1439
  };
1291
- this.stampCreateApiOnlyUsers = async (input, stampWith) => {
1440
+ this.stampCreateApiKeys = async (input, stampWith) => {
1292
1441
  const activeStamper = this.getStamper(stampWith);
1293
1442
  if (!activeStamper) {
1294
1443
  return undefined;
1295
1444
  }
1296
1445
  const { organizationId, timestampMs, ...parameters } = input;
1297
1446
  const session = await this.storageManager?.getActiveSession();
1298
- const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_api_only_users";
1447
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_api_keys";
1299
1448
  const bodyWithType = {
1300
1449
  parameters,
1301
1450
  organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
1302
1451
  timestampMs: timestampMs ?? String(Date.now()),
1303
- type: "ACTIVITY_TYPE_CREATE_API_ONLY_USERS",
1452
+ type: "ACTIVITY_TYPE_CREATE_API_KEYS_V2",
1304
1453
  };
1305
1454
  const stringifiedBody = JSON.stringify(bodyWithType);
1306
1455
  const stamp = await activeStamper.stamp(stringifiedBody);
@@ -1312,6 +1461,8 @@ class TurnkeySDKClientBase {
1312
1461
  };
1313
1462
  this.createAuthenticators = async (input, stampWith) => {
1314
1463
  const { organizationId, timestampMs, ...rest } = input;
1464
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
1465
+ const generateAppProofs = input?.generateAppProofs ?? false;
1315
1466
  const session = await this.storageManager?.getActiveSession();
1316
1467
  return this.activity("/public/v1/submit/create_authenticators", {
1317
1468
  parameters: rest,
@@ -1319,6 +1470,7 @@ class TurnkeySDKClientBase {
1319
1470
  session?.organizationId ??
1320
1471
  this.config.organizationId,
1321
1472
  timestampMs: timestampMs ?? String(Date.now()),
1473
+ generateAppProofs: generateAppProofs ?? false,
1322
1474
  type: "ACTIVITY_TYPE_CREATE_AUTHENTICATORS_V2",
1323
1475
  }, "createAuthenticatorsResult", stampWith);
1324
1476
  };
@@ -1346,6 +1498,8 @@ class TurnkeySDKClientBase {
1346
1498
  };
1347
1499
  this.createFiatOnRampCredential = async (input, stampWith) => {
1348
1500
  const { organizationId, timestampMs, ...rest } = input;
1501
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
1502
+ const generateAppProofs = input?.generateAppProofs ?? false;
1349
1503
  const session = await this.storageManager?.getActiveSession();
1350
1504
  return this.activity("/public/v1/submit/create_fiat_on_ramp_credential", {
1351
1505
  parameters: rest,
@@ -1353,6 +1507,7 @@ class TurnkeySDKClientBase {
1353
1507
  session?.organizationId ??
1354
1508
  this.config.organizationId,
1355
1509
  timestampMs: timestampMs ?? String(Date.now()),
1510
+ generateAppProofs: generateAppProofs ?? false,
1356
1511
  type: "ACTIVITY_TYPE_CREATE_FIAT_ON_RAMP_CREDENTIAL",
1357
1512
  }, "createFiatOnRampCredentialResult", stampWith);
1358
1513
  };
@@ -1381,6 +1536,8 @@ class TurnkeySDKClientBase {
1381
1536
  };
1382
1537
  this.createInvitations = async (input, stampWith) => {
1383
1538
  const { organizationId, timestampMs, ...rest } = input;
1539
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
1540
+ const generateAppProofs = input?.generateAppProofs ?? false;
1384
1541
  const session = await this.storageManager?.getActiveSession();
1385
1542
  return this.activity("/public/v1/submit/create_invitations", {
1386
1543
  parameters: rest,
@@ -1388,6 +1545,7 @@ class TurnkeySDKClientBase {
1388
1545
  session?.organizationId ??
1389
1546
  this.config.organizationId,
1390
1547
  timestampMs: timestampMs ?? String(Date.now()),
1548
+ generateAppProofs: generateAppProofs ?? false,
1391
1549
  type: "ACTIVITY_TYPE_CREATE_INVITATIONS",
1392
1550
  }, "createInvitationsResult", stampWith);
1393
1551
  };
@@ -1415,6 +1573,8 @@ class TurnkeySDKClientBase {
1415
1573
  };
1416
1574
  this.createOauth2Credential = async (input, stampWith) => {
1417
1575
  const { organizationId, timestampMs, ...rest } = input;
1576
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
1577
+ const generateAppProofs = input?.generateAppProofs ?? false;
1418
1578
  const session = await this.storageManager?.getActiveSession();
1419
1579
  return this.activity("/public/v1/submit/create_oauth2_credential", {
1420
1580
  parameters: rest,
@@ -1422,6 +1582,7 @@ class TurnkeySDKClientBase {
1422
1582
  session?.organizationId ??
1423
1583
  this.config.organizationId,
1424
1584
  timestampMs: timestampMs ?? String(Date.now()),
1585
+ generateAppProofs: generateAppProofs ?? false,
1425
1586
  type: "ACTIVITY_TYPE_CREATE_OAUTH2_CREDENTIAL",
1426
1587
  }, "createOauth2CredentialResult", stampWith);
1427
1588
  };
@@ -1449,6 +1610,8 @@ class TurnkeySDKClientBase {
1449
1610
  };
1450
1611
  this.createOauthProviders = async (input, stampWith) => {
1451
1612
  const { organizationId, timestampMs, ...rest } = input;
1613
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
1614
+ const generateAppProofs = input?.generateAppProofs ?? false;
1452
1615
  const session = await this.storageManager?.getActiveSession();
1453
1616
  return this.activity("/public/v1/submit/create_oauth_providers", {
1454
1617
  parameters: rest,
@@ -1456,8 +1619,9 @@ class TurnkeySDKClientBase {
1456
1619
  session?.organizationId ??
1457
1620
  this.config.organizationId,
1458
1621
  timestampMs: timestampMs ?? String(Date.now()),
1459
- type: "ACTIVITY_TYPE_CREATE_OAUTH_PROVIDERS",
1460
- }, "createOauthProvidersResult", stampWith);
1622
+ generateAppProofs: generateAppProofs ?? false,
1623
+ type: "ACTIVITY_TYPE_CREATE_OAUTH_PROVIDERS_V2",
1624
+ }, "createOauthProvidersResultV2", stampWith);
1461
1625
  };
1462
1626
  this.stampCreateOauthProviders = async (input, stampWith) => {
1463
1627
  const activeStamper = this.getStamper(stampWith);
@@ -1471,7 +1635,7 @@ class TurnkeySDKClientBase {
1471
1635
  parameters,
1472
1636
  organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
1473
1637
  timestampMs: timestampMs ?? String(Date.now()),
1474
- type: "ACTIVITY_TYPE_CREATE_OAUTH_PROVIDERS",
1638
+ type: "ACTIVITY_TYPE_CREATE_OAUTH_PROVIDERS_V2",
1475
1639
  };
1476
1640
  const stringifiedBody = JSON.stringify(bodyWithType);
1477
1641
  const stamp = await activeStamper.stamp(stringifiedBody);
@@ -1483,6 +1647,8 @@ class TurnkeySDKClientBase {
1483
1647
  };
1484
1648
  this.createPolicies = async (input, stampWith) => {
1485
1649
  const { organizationId, timestampMs, ...rest } = input;
1650
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
1651
+ const generateAppProofs = input?.generateAppProofs ?? false;
1486
1652
  const session = await this.storageManager?.getActiveSession();
1487
1653
  return this.activity("/public/v1/submit/create_policies", {
1488
1654
  parameters: rest,
@@ -1490,6 +1656,7 @@ class TurnkeySDKClientBase {
1490
1656
  session?.organizationId ??
1491
1657
  this.config.organizationId,
1492
1658
  timestampMs: timestampMs ?? String(Date.now()),
1659
+ generateAppProofs: generateAppProofs ?? false,
1493
1660
  type: "ACTIVITY_TYPE_CREATE_POLICIES",
1494
1661
  }, "createPoliciesResult", stampWith);
1495
1662
  };
@@ -1517,6 +1684,8 @@ class TurnkeySDKClientBase {
1517
1684
  };
1518
1685
  this.createPolicy = async (input, stampWith) => {
1519
1686
  const { organizationId, timestampMs, ...rest } = input;
1687
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
1688
+ const generateAppProofs = input?.generateAppProofs ?? false;
1520
1689
  const session = await this.storageManager?.getActiveSession();
1521
1690
  return this.activity("/public/v1/submit/create_policy", {
1522
1691
  parameters: rest,
@@ -1524,6 +1693,7 @@ class TurnkeySDKClientBase {
1524
1693
  session?.organizationId ??
1525
1694
  this.config.organizationId,
1526
1695
  timestampMs: timestampMs ?? String(Date.now()),
1696
+ generateAppProofs: generateAppProofs ?? false,
1527
1697
  type: "ACTIVITY_TYPE_CREATE_POLICY_V3",
1528
1698
  }, "createPolicyResult", stampWith);
1529
1699
  };
@@ -1551,6 +1721,8 @@ class TurnkeySDKClientBase {
1551
1721
  };
1552
1722
  this.createPrivateKeyTag = async (input, stampWith) => {
1553
1723
  const { organizationId, timestampMs, ...rest } = input;
1724
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
1725
+ const generateAppProofs = input?.generateAppProofs ?? false;
1554
1726
  const session = await this.storageManager?.getActiveSession();
1555
1727
  return this.activity("/public/v1/submit/create_private_key_tag", {
1556
1728
  parameters: rest,
@@ -1558,6 +1730,7 @@ class TurnkeySDKClientBase {
1558
1730
  session?.organizationId ??
1559
1731
  this.config.organizationId,
1560
1732
  timestampMs: timestampMs ?? String(Date.now()),
1733
+ generateAppProofs: generateAppProofs ?? false,
1561
1734
  type: "ACTIVITY_TYPE_CREATE_PRIVATE_KEY_TAG",
1562
1735
  }, "createPrivateKeyTagResult", stampWith);
1563
1736
  };
@@ -1585,6 +1758,8 @@ class TurnkeySDKClientBase {
1585
1758
  };
1586
1759
  this.createPrivateKeys = async (input, stampWith) => {
1587
1760
  const { organizationId, timestampMs, ...rest } = input;
1761
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
1762
+ const generateAppProofs = input?.generateAppProofs ?? false;
1588
1763
  const session = await this.storageManager?.getActiveSession();
1589
1764
  return this.activity("/public/v1/submit/create_private_keys", {
1590
1765
  parameters: rest,
@@ -1592,6 +1767,7 @@ class TurnkeySDKClientBase {
1592
1767
  session?.organizationId ??
1593
1768
  this.config.organizationId,
1594
1769
  timestampMs: timestampMs ?? String(Date.now()),
1770
+ generateAppProofs: generateAppProofs ?? false,
1595
1771
  type: "ACTIVITY_TYPE_CREATE_PRIVATE_KEYS_V2",
1596
1772
  }, "createPrivateKeysResultV2", stampWith);
1597
1773
  };
@@ -1619,6 +1795,8 @@ class TurnkeySDKClientBase {
1619
1795
  };
1620
1796
  this.createReadOnlySession = async (input, stampWith) => {
1621
1797
  const { organizationId, timestampMs, ...rest } = input;
1798
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
1799
+ const generateAppProofs = input?.generateAppProofs ?? false;
1622
1800
  const session = await this.storageManager?.getActiveSession();
1623
1801
  return this.activity("/public/v1/submit/create_read_only_session", {
1624
1802
  parameters: rest,
@@ -1626,6 +1804,7 @@ class TurnkeySDKClientBase {
1626
1804
  session?.organizationId ??
1627
1805
  this.config.organizationId,
1628
1806
  timestampMs: timestampMs ?? String(Date.now()),
1807
+ generateAppProofs: generateAppProofs ?? false,
1629
1808
  type: "ACTIVITY_TYPE_CREATE_READ_ONLY_SESSION",
1630
1809
  }, "createReadOnlySessionResult", stampWith);
1631
1810
  };
@@ -1653,6 +1832,8 @@ class TurnkeySDKClientBase {
1653
1832
  };
1654
1833
  this.createReadWriteSession = async (input, stampWith) => {
1655
1834
  const { organizationId, timestampMs, ...rest } = input;
1835
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
1836
+ const generateAppProofs = input?.generateAppProofs ?? false;
1656
1837
  const session = await this.storageManager?.getActiveSession();
1657
1838
  return this.activity("/public/v1/submit/create_read_write_session", {
1658
1839
  parameters: rest,
@@ -1660,8 +1841,9 @@ class TurnkeySDKClientBase {
1660
1841
  session?.organizationId ??
1661
1842
  this.config.organizationId,
1662
1843
  timestampMs: timestampMs ?? String(Date.now()),
1844
+ generateAppProofs: generateAppProofs ?? false,
1663
1845
  type: "ACTIVITY_TYPE_CREATE_READ_WRITE_SESSION_V2",
1664
- }, "createReadWriteSessionResult", stampWith);
1846
+ }, "createReadWriteSessionResultV2", stampWith);
1665
1847
  };
1666
1848
  this.stampCreateReadWriteSession = async (input, stampWith) => {
1667
1849
  const activeStamper = this.getStamper(stampWith);
@@ -1687,6 +1869,8 @@ class TurnkeySDKClientBase {
1687
1869
  };
1688
1870
  this.createSmartContractInterface = async (input, stampWith) => {
1689
1871
  const { organizationId, timestampMs, ...rest } = input;
1872
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
1873
+ const generateAppProofs = input?.generateAppProofs ?? false;
1690
1874
  const session = await this.storageManager?.getActiveSession();
1691
1875
  return this.activity("/public/v1/submit/create_smart_contract_interface", {
1692
1876
  parameters: rest,
@@ -1694,6 +1878,7 @@ class TurnkeySDKClientBase {
1694
1878
  session?.organizationId ??
1695
1879
  this.config.organizationId,
1696
1880
  timestampMs: timestampMs ?? String(Date.now()),
1881
+ generateAppProofs: generateAppProofs ?? false,
1697
1882
  type: "ACTIVITY_TYPE_CREATE_SMART_CONTRACT_INTERFACE",
1698
1883
  }, "createSmartContractInterfaceResult", stampWith);
1699
1884
  };
@@ -1722,6 +1907,8 @@ class TurnkeySDKClientBase {
1722
1907
  };
1723
1908
  this.createSubOrganization = async (input, stampWith) => {
1724
1909
  const { organizationId, timestampMs, ...rest } = input;
1910
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
1911
+ const generateAppProofs = input?.generateAppProofs ?? false;
1725
1912
  const session = await this.storageManager?.getActiveSession();
1726
1913
  return this.activity("/public/v1/submit/create_sub_organization", {
1727
1914
  parameters: rest,
@@ -1729,8 +1916,9 @@ class TurnkeySDKClientBase {
1729
1916
  session?.organizationId ??
1730
1917
  this.config.organizationId,
1731
1918
  timestampMs: timestampMs ?? String(Date.now()),
1732
- type: "ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V7",
1733
- }, "createSubOrganizationResultV7", stampWith);
1919
+ generateAppProofs: generateAppProofs ?? false,
1920
+ type: "ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V8",
1921
+ }, "createSubOrganizationResultV8", stampWith);
1734
1922
  };
1735
1923
  this.stampCreateSubOrganization = async (input, stampWith) => {
1736
1924
  const activeStamper = this.getStamper(stampWith);
@@ -1744,7 +1932,7 @@ class TurnkeySDKClientBase {
1744
1932
  parameters,
1745
1933
  organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
1746
1934
  timestampMs: timestampMs ?? String(Date.now()),
1747
- type: "ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V7",
1935
+ type: "ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V8",
1748
1936
  };
1749
1937
  const stringifiedBody = JSON.stringify(bodyWithType);
1750
1938
  const stamp = await activeStamper.stamp(stringifiedBody);
@@ -1754,31 +1942,34 @@ class TurnkeySDKClientBase {
1754
1942
  url: fullUrl,
1755
1943
  };
1756
1944
  };
1757
- this.createUserTag = async (input, stampWith) => {
1945
+ this.createTvcApp = async (input, stampWith) => {
1758
1946
  const { organizationId, timestampMs, ...rest } = input;
1947
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
1948
+ const generateAppProofs = input?.generateAppProofs ?? false;
1759
1949
  const session = await this.storageManager?.getActiveSession();
1760
- return this.activity("/public/v1/submit/create_user_tag", {
1950
+ return this.activity("/public/v1/submit/create_tvc_app", {
1761
1951
  parameters: rest,
1762
1952
  organizationId: organizationId ??
1763
1953
  session?.organizationId ??
1764
1954
  this.config.organizationId,
1765
1955
  timestampMs: timestampMs ?? String(Date.now()),
1766
- type: "ACTIVITY_TYPE_CREATE_USER_TAG",
1767
- }, "createUserTagResult", stampWith);
1956
+ generateAppProofs: generateAppProofs ?? false,
1957
+ type: "ACTIVITY_TYPE_CREATE_TVC_APP",
1958
+ }, "createTvcAppResult", stampWith);
1768
1959
  };
1769
- this.stampCreateUserTag = async (input, stampWith) => {
1960
+ this.stampCreateTvcApp = async (input, stampWith) => {
1770
1961
  const activeStamper = this.getStamper(stampWith);
1771
1962
  if (!activeStamper) {
1772
1963
  return undefined;
1773
1964
  }
1774
1965
  const { organizationId, timestampMs, ...parameters } = input;
1775
1966
  const session = await this.storageManager?.getActiveSession();
1776
- const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_user_tag";
1967
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_tvc_app";
1777
1968
  const bodyWithType = {
1778
1969
  parameters,
1779
1970
  organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
1780
1971
  timestampMs: timestampMs ?? String(Date.now()),
1781
- type: "ACTIVITY_TYPE_CREATE_USER_TAG",
1972
+ type: "ACTIVITY_TYPE_CREATE_TVC_APP",
1782
1973
  };
1783
1974
  const stringifiedBody = JSON.stringify(bodyWithType);
1784
1975
  const stamp = await activeStamper.stamp(stringifiedBody);
@@ -1788,31 +1979,34 @@ class TurnkeySDKClientBase {
1788
1979
  url: fullUrl,
1789
1980
  };
1790
1981
  };
1791
- this.createUsers = async (input, stampWith) => {
1982
+ this.createTvcDeployment = async (input, stampWith) => {
1792
1983
  const { organizationId, timestampMs, ...rest } = input;
1984
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
1985
+ const generateAppProofs = input?.generateAppProofs ?? false;
1793
1986
  const session = await this.storageManager?.getActiveSession();
1794
- return this.activity("/public/v1/submit/create_users", {
1987
+ return this.activity("/public/v1/submit/create_tvc_deployment", {
1795
1988
  parameters: rest,
1796
1989
  organizationId: organizationId ??
1797
1990
  session?.organizationId ??
1798
1991
  this.config.organizationId,
1799
1992
  timestampMs: timestampMs ?? String(Date.now()),
1800
- type: "ACTIVITY_TYPE_CREATE_USERS_V3",
1801
- }, "createUsersResult", stampWith);
1993
+ generateAppProofs: generateAppProofs ?? false,
1994
+ type: "ACTIVITY_TYPE_CREATE_TVC_DEPLOYMENT",
1995
+ }, "createTvcDeploymentResult", stampWith);
1802
1996
  };
1803
- this.stampCreateUsers = async (input, stampWith) => {
1997
+ this.stampCreateTvcDeployment = async (input, stampWith) => {
1804
1998
  const activeStamper = this.getStamper(stampWith);
1805
1999
  if (!activeStamper) {
1806
2000
  return undefined;
1807
2001
  }
1808
2002
  const { organizationId, timestampMs, ...parameters } = input;
1809
2003
  const session = await this.storageManager?.getActiveSession();
1810
- const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_users";
2004
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_tvc_deployment";
1811
2005
  const bodyWithType = {
1812
2006
  parameters,
1813
2007
  organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
1814
2008
  timestampMs: timestampMs ?? String(Date.now()),
1815
- type: "ACTIVITY_TYPE_CREATE_USERS_V3",
2009
+ type: "ACTIVITY_TYPE_CREATE_TVC_DEPLOYMENT",
1816
2010
  };
1817
2011
  const stringifiedBody = JSON.stringify(bodyWithType);
1818
2012
  const stamp = await activeStamper.stamp(stringifiedBody);
@@ -1822,31 +2016,35 @@ class TurnkeySDKClientBase {
1822
2016
  url: fullUrl,
1823
2017
  };
1824
2018
  };
1825
- this.createWallet = async (input, stampWith) => {
2019
+ this.createTvcManifestApprovals = async (input, stampWith) => {
1826
2020
  const { organizationId, timestampMs, ...rest } = input;
2021
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
2022
+ const generateAppProofs = input?.generateAppProofs ?? false;
1827
2023
  const session = await this.storageManager?.getActiveSession();
1828
- return this.activity("/public/v1/submit/create_wallet", {
2024
+ return this.activity("/public/v1/submit/create_tvc_manifest_approvals", {
1829
2025
  parameters: rest,
1830
2026
  organizationId: organizationId ??
1831
2027
  session?.organizationId ??
1832
2028
  this.config.organizationId,
1833
2029
  timestampMs: timestampMs ?? String(Date.now()),
1834
- type: "ACTIVITY_TYPE_CREATE_WALLET",
1835
- }, "createWalletResult", stampWith);
2030
+ generateAppProofs: generateAppProofs ?? false,
2031
+ type: "ACTIVITY_TYPE_CREATE_TVC_MANIFEST_APPROVALS",
2032
+ }, "createTvcManifestApprovalsResult", stampWith);
1836
2033
  };
1837
- this.stampCreateWallet = async (input, stampWith) => {
2034
+ this.stampCreateTvcManifestApprovals = async (input, stampWith) => {
1838
2035
  const activeStamper = this.getStamper(stampWith);
1839
2036
  if (!activeStamper) {
1840
2037
  return undefined;
1841
2038
  }
1842
2039
  const { organizationId, timestampMs, ...parameters } = input;
1843
2040
  const session = await this.storageManager?.getActiveSession();
1844
- const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_wallet";
2041
+ const fullUrl = this.config.apiBaseUrl +
2042
+ "/public/v1/submit/create_tvc_manifest_approvals";
1845
2043
  const bodyWithType = {
1846
2044
  parameters,
1847
2045
  organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
1848
2046
  timestampMs: timestampMs ?? String(Date.now()),
1849
- type: "ACTIVITY_TYPE_CREATE_WALLET",
2047
+ type: "ACTIVITY_TYPE_CREATE_TVC_MANIFEST_APPROVALS",
1850
2048
  };
1851
2049
  const stringifiedBody = JSON.stringify(bodyWithType);
1852
2050
  const stamp = await activeStamper.stamp(stringifiedBody);
@@ -1856,31 +2054,34 @@ class TurnkeySDKClientBase {
1856
2054
  url: fullUrl,
1857
2055
  };
1858
2056
  };
1859
- this.createWalletAccounts = async (input, stampWith) => {
2057
+ this.createUserTag = async (input, stampWith) => {
1860
2058
  const { organizationId, timestampMs, ...rest } = input;
2059
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
2060
+ const generateAppProofs = input?.generateAppProofs ?? false;
1861
2061
  const session = await this.storageManager?.getActiveSession();
1862
- return this.activity("/public/v1/submit/create_wallet_accounts", {
2062
+ return this.activity("/public/v1/submit/create_user_tag", {
1863
2063
  parameters: rest,
1864
2064
  organizationId: organizationId ??
1865
2065
  session?.organizationId ??
1866
2066
  this.config.organizationId,
1867
2067
  timestampMs: timestampMs ?? String(Date.now()),
1868
- type: "ACTIVITY_TYPE_CREATE_WALLET_ACCOUNTS",
1869
- }, "createWalletAccountsResult", stampWith);
2068
+ generateAppProofs: generateAppProofs ?? false,
2069
+ type: "ACTIVITY_TYPE_CREATE_USER_TAG",
2070
+ }, "createUserTagResult", stampWith);
1870
2071
  };
1871
- this.stampCreateWalletAccounts = async (input, stampWith) => {
2072
+ this.stampCreateUserTag = async (input, stampWith) => {
1872
2073
  const activeStamper = this.getStamper(stampWith);
1873
2074
  if (!activeStamper) {
1874
2075
  return undefined;
1875
2076
  }
1876
2077
  const { organizationId, timestampMs, ...parameters } = input;
1877
2078
  const session = await this.storageManager?.getActiveSession();
1878
- const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_wallet_accounts";
2079
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_user_tag";
1879
2080
  const bodyWithType = {
1880
2081
  parameters,
1881
2082
  organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
1882
2083
  timestampMs: timestampMs ?? String(Date.now()),
1883
- type: "ACTIVITY_TYPE_CREATE_WALLET_ACCOUNTS",
2084
+ type: "ACTIVITY_TYPE_CREATE_USER_TAG",
1884
2085
  };
1885
2086
  const stringifiedBody = JSON.stringify(bodyWithType);
1886
2087
  const stamp = await activeStamper.stamp(stringifiedBody);
@@ -1890,31 +2091,34 @@ class TurnkeySDKClientBase {
1890
2091
  url: fullUrl,
1891
2092
  };
1892
2093
  };
1893
- this.createWebhookEndpoint = async (input, stampWith) => {
2094
+ this.createUsers = async (input, stampWith) => {
1894
2095
  const { organizationId, timestampMs, ...rest } = input;
2096
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
2097
+ const generateAppProofs = input?.generateAppProofs ?? false;
1895
2098
  const session = await this.storageManager?.getActiveSession();
1896
- return this.activity("/public/v1/submit/create_webhook_endpoint", {
2099
+ return this.activity("/public/v1/submit/create_users", {
1897
2100
  parameters: rest,
1898
2101
  organizationId: organizationId ??
1899
2102
  session?.organizationId ??
1900
2103
  this.config.organizationId,
1901
2104
  timestampMs: timestampMs ?? String(Date.now()),
1902
- type: "ACTIVITY_TYPE_CREATE_WEBHOOK_ENDPOINT",
1903
- }, "createWebhookEndpointResult", stampWith);
2105
+ generateAppProofs: generateAppProofs ?? false,
2106
+ type: "ACTIVITY_TYPE_CREATE_USERS_V4",
2107
+ }, "createUsersResult", stampWith);
1904
2108
  };
1905
- this.stampCreateWebhookEndpoint = async (input, stampWith) => {
2109
+ this.stampCreateUsers = async (input, stampWith) => {
1906
2110
  const activeStamper = this.getStamper(stampWith);
1907
2111
  if (!activeStamper) {
1908
2112
  return undefined;
1909
2113
  }
1910
2114
  const { organizationId, timestampMs, ...parameters } = input;
1911
2115
  const session = await this.storageManager?.getActiveSession();
1912
- const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_webhook_endpoint";
2116
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_users";
1913
2117
  const bodyWithType = {
1914
2118
  parameters,
1915
2119
  organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
1916
2120
  timestampMs: timestampMs ?? String(Date.now()),
1917
- type: "ACTIVITY_TYPE_CREATE_WEBHOOK_ENDPOINT",
2121
+ type: "ACTIVITY_TYPE_CREATE_USERS_V4",
1918
2122
  };
1919
2123
  const stringifiedBody = JSON.stringify(bodyWithType);
1920
2124
  const stamp = await activeStamper.stamp(stringifiedBody);
@@ -1924,31 +2128,34 @@ class TurnkeySDKClientBase {
1924
2128
  url: fullUrl,
1925
2129
  };
1926
2130
  };
1927
- this.deleteApiKeys = async (input, stampWith) => {
2131
+ this.createWallet = async (input, stampWith) => {
1928
2132
  const { organizationId, timestampMs, ...rest } = input;
2133
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
2134
+ const generateAppProofs = input?.generateAppProofs ?? false;
1929
2135
  const session = await this.storageManager?.getActiveSession();
1930
- return this.activity("/public/v1/submit/delete_api_keys", {
2136
+ return this.activity("/public/v1/submit/create_wallet", {
1931
2137
  parameters: rest,
1932
2138
  organizationId: organizationId ??
1933
2139
  session?.organizationId ??
1934
2140
  this.config.organizationId,
1935
2141
  timestampMs: timestampMs ?? String(Date.now()),
1936
- type: "ACTIVITY_TYPE_DELETE_API_KEYS",
1937
- }, "deleteApiKeysResult", stampWith);
2142
+ generateAppProofs: generateAppProofs ?? false,
2143
+ type: "ACTIVITY_TYPE_CREATE_WALLET",
2144
+ }, "createWalletResult", stampWith);
1938
2145
  };
1939
- this.stampDeleteApiKeys = async (input, stampWith) => {
2146
+ this.stampCreateWallet = async (input, stampWith) => {
1940
2147
  const activeStamper = this.getStamper(stampWith);
1941
2148
  if (!activeStamper) {
1942
2149
  return undefined;
1943
2150
  }
1944
2151
  const { organizationId, timestampMs, ...parameters } = input;
1945
2152
  const session = await this.storageManager?.getActiveSession();
1946
- const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/delete_api_keys";
2153
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_wallet";
1947
2154
  const bodyWithType = {
1948
2155
  parameters,
1949
2156
  organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
1950
2157
  timestampMs: timestampMs ?? String(Date.now()),
1951
- type: "ACTIVITY_TYPE_DELETE_API_KEYS",
2158
+ type: "ACTIVITY_TYPE_CREATE_WALLET",
1952
2159
  };
1953
2160
  const stringifiedBody = JSON.stringify(bodyWithType);
1954
2161
  const stamp = await activeStamper.stamp(stringifiedBody);
@@ -1958,26 +2165,140 @@ class TurnkeySDKClientBase {
1958
2165
  url: fullUrl,
1959
2166
  };
1960
2167
  };
1961
- this.deleteAuthenticators = async (input, stampWith) => {
2168
+ this.createWalletAccounts = async (input, stampWith) => {
1962
2169
  const { organizationId, timestampMs, ...rest } = input;
2170
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
2171
+ const generateAppProofs = input?.generateAppProofs ?? false;
1963
2172
  const session = await this.storageManager?.getActiveSession();
1964
- return this.activity("/public/v1/submit/delete_authenticators", {
2173
+ return this.activity("/public/v1/submit/create_wallet_accounts", {
1965
2174
  parameters: rest,
1966
2175
  organizationId: organizationId ??
1967
2176
  session?.organizationId ??
1968
2177
  this.config.organizationId,
1969
2178
  timestampMs: timestampMs ?? String(Date.now()),
1970
- type: "ACTIVITY_TYPE_DELETE_AUTHENTICATORS",
1971
- }, "deleteAuthenticatorsResult", stampWith);
2179
+ generateAppProofs: generateAppProofs ?? false,
2180
+ type: "ACTIVITY_TYPE_CREATE_WALLET_ACCOUNTS",
2181
+ }, "createWalletAccountsResult", stampWith);
1972
2182
  };
1973
- this.stampDeleteAuthenticators = async (input, stampWith) => {
2183
+ this.stampCreateWalletAccounts = async (input, stampWith) => {
1974
2184
  const activeStamper = this.getStamper(stampWith);
1975
2185
  if (!activeStamper) {
1976
2186
  return undefined;
1977
2187
  }
1978
2188
  const { organizationId, timestampMs, ...parameters } = input;
1979
2189
  const session = await this.storageManager?.getActiveSession();
1980
- const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/delete_authenticators";
2190
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_wallet_accounts";
2191
+ const bodyWithType = {
2192
+ parameters,
2193
+ organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
2194
+ timestampMs: timestampMs ?? String(Date.now()),
2195
+ type: "ACTIVITY_TYPE_CREATE_WALLET_ACCOUNTS",
2196
+ };
2197
+ const stringifiedBody = JSON.stringify(bodyWithType);
2198
+ const stamp = await activeStamper.stamp(stringifiedBody);
2199
+ return {
2200
+ body: stringifiedBody,
2201
+ stamp: stamp,
2202
+ url: fullUrl,
2203
+ };
2204
+ };
2205
+ this.createWebhookEndpoint = async (input, stampWith) => {
2206
+ const { organizationId, timestampMs, ...rest } = input;
2207
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
2208
+ const generateAppProofs = input?.generateAppProofs ?? false;
2209
+ const session = await this.storageManager?.getActiveSession();
2210
+ return this.activity("/public/v1/submit/create_webhook_endpoint", {
2211
+ parameters: rest,
2212
+ organizationId: organizationId ??
2213
+ session?.organizationId ??
2214
+ this.config.organizationId,
2215
+ timestampMs: timestampMs ?? String(Date.now()),
2216
+ generateAppProofs: generateAppProofs ?? false,
2217
+ type: "ACTIVITY_TYPE_CREATE_WEBHOOK_ENDPOINT",
2218
+ }, "createWebhookEndpointResult", stampWith);
2219
+ };
2220
+ this.stampCreateWebhookEndpoint = async (input, stampWith) => {
2221
+ const activeStamper = this.getStamper(stampWith);
2222
+ if (!activeStamper) {
2223
+ return undefined;
2224
+ }
2225
+ const { organizationId, timestampMs, ...parameters } = input;
2226
+ const session = await this.storageManager?.getActiveSession();
2227
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_webhook_endpoint";
2228
+ const bodyWithType = {
2229
+ parameters,
2230
+ organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
2231
+ timestampMs: timestampMs ?? String(Date.now()),
2232
+ type: "ACTIVITY_TYPE_CREATE_WEBHOOK_ENDPOINT",
2233
+ };
2234
+ const stringifiedBody = JSON.stringify(bodyWithType);
2235
+ const stamp = await activeStamper.stamp(stringifiedBody);
2236
+ return {
2237
+ body: stringifiedBody,
2238
+ stamp: stamp,
2239
+ url: fullUrl,
2240
+ };
2241
+ };
2242
+ this.deleteApiKeys = async (input, stampWith) => {
2243
+ const { organizationId, timestampMs, ...rest } = input;
2244
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
2245
+ const generateAppProofs = input?.generateAppProofs ?? false;
2246
+ const session = await this.storageManager?.getActiveSession();
2247
+ return this.activity("/public/v1/submit/delete_api_keys", {
2248
+ parameters: rest,
2249
+ organizationId: organizationId ??
2250
+ session?.organizationId ??
2251
+ this.config.organizationId,
2252
+ timestampMs: timestampMs ?? String(Date.now()),
2253
+ generateAppProofs: generateAppProofs ?? false,
2254
+ type: "ACTIVITY_TYPE_DELETE_API_KEYS",
2255
+ }, "deleteApiKeysResult", stampWith);
2256
+ };
2257
+ this.stampDeleteApiKeys = async (input, stampWith) => {
2258
+ const activeStamper = this.getStamper(stampWith);
2259
+ if (!activeStamper) {
2260
+ return undefined;
2261
+ }
2262
+ const { organizationId, timestampMs, ...parameters } = input;
2263
+ const session = await this.storageManager?.getActiveSession();
2264
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/delete_api_keys";
2265
+ const bodyWithType = {
2266
+ parameters,
2267
+ organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
2268
+ timestampMs: timestampMs ?? String(Date.now()),
2269
+ type: "ACTIVITY_TYPE_DELETE_API_KEYS",
2270
+ };
2271
+ const stringifiedBody = JSON.stringify(bodyWithType);
2272
+ const stamp = await activeStamper.stamp(stringifiedBody);
2273
+ return {
2274
+ body: stringifiedBody,
2275
+ stamp: stamp,
2276
+ url: fullUrl,
2277
+ };
2278
+ };
2279
+ this.deleteAuthenticators = async (input, stampWith) => {
2280
+ const { organizationId, timestampMs, ...rest } = input;
2281
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
2282
+ const generateAppProofs = input?.generateAppProofs ?? false;
2283
+ const session = await this.storageManager?.getActiveSession();
2284
+ return this.activity("/public/v1/submit/delete_authenticators", {
2285
+ parameters: rest,
2286
+ organizationId: organizationId ??
2287
+ session?.organizationId ??
2288
+ this.config.organizationId,
2289
+ timestampMs: timestampMs ?? String(Date.now()),
2290
+ generateAppProofs: generateAppProofs ?? false,
2291
+ type: "ACTIVITY_TYPE_DELETE_AUTHENTICATORS",
2292
+ }, "deleteAuthenticatorsResult", stampWith);
2293
+ };
2294
+ this.stampDeleteAuthenticators = async (input, stampWith) => {
2295
+ const activeStamper = this.getStamper(stampWith);
2296
+ if (!activeStamper) {
2297
+ return undefined;
2298
+ }
2299
+ const { organizationId, timestampMs, ...parameters } = input;
2300
+ const session = await this.storageManager?.getActiveSession();
2301
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/delete_authenticators";
1981
2302
  const bodyWithType = {
1982
2303
  parameters,
1983
2304
  organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
@@ -1994,6 +2315,8 @@ class TurnkeySDKClientBase {
1994
2315
  };
1995
2316
  this.deleteFiatOnRampCredential = async (input, stampWith) => {
1996
2317
  const { organizationId, timestampMs, ...rest } = input;
2318
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
2319
+ const generateAppProofs = input?.generateAppProofs ?? false;
1997
2320
  const session = await this.storageManager?.getActiveSession();
1998
2321
  return this.activity("/public/v1/submit/delete_fiat_on_ramp_credential", {
1999
2322
  parameters: rest,
@@ -2001,6 +2324,7 @@ class TurnkeySDKClientBase {
2001
2324
  session?.organizationId ??
2002
2325
  this.config.organizationId,
2003
2326
  timestampMs: timestampMs ?? String(Date.now()),
2327
+ generateAppProofs: generateAppProofs ?? false,
2004
2328
  type: "ACTIVITY_TYPE_DELETE_FIAT_ON_RAMP_CREDENTIAL",
2005
2329
  }, "deleteFiatOnRampCredentialResult", stampWith);
2006
2330
  };
@@ -2029,6 +2353,8 @@ class TurnkeySDKClientBase {
2029
2353
  };
2030
2354
  this.deleteInvitation = async (input, stampWith) => {
2031
2355
  const { organizationId, timestampMs, ...rest } = input;
2356
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
2357
+ const generateAppProofs = input?.generateAppProofs ?? false;
2032
2358
  const session = await this.storageManager?.getActiveSession();
2033
2359
  return this.activity("/public/v1/submit/delete_invitation", {
2034
2360
  parameters: rest,
@@ -2036,6 +2362,7 @@ class TurnkeySDKClientBase {
2036
2362
  session?.organizationId ??
2037
2363
  this.config.organizationId,
2038
2364
  timestampMs: timestampMs ?? String(Date.now()),
2365
+ generateAppProofs: generateAppProofs ?? false,
2039
2366
  type: "ACTIVITY_TYPE_DELETE_INVITATION",
2040
2367
  }, "deleteInvitationResult", stampWith);
2041
2368
  };
@@ -2063,6 +2390,8 @@ class TurnkeySDKClientBase {
2063
2390
  };
2064
2391
  this.deleteOauth2Credential = async (input, stampWith) => {
2065
2392
  const { organizationId, timestampMs, ...rest } = input;
2393
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
2394
+ const generateAppProofs = input?.generateAppProofs ?? false;
2066
2395
  const session = await this.storageManager?.getActiveSession();
2067
2396
  return this.activity("/public/v1/submit/delete_oauth2_credential", {
2068
2397
  parameters: rest,
@@ -2070,6 +2399,7 @@ class TurnkeySDKClientBase {
2070
2399
  session?.organizationId ??
2071
2400
  this.config.organizationId,
2072
2401
  timestampMs: timestampMs ?? String(Date.now()),
2402
+ generateAppProofs: generateAppProofs ?? false,
2073
2403
  type: "ACTIVITY_TYPE_DELETE_OAUTH2_CREDENTIAL",
2074
2404
  }, "deleteOauth2CredentialResult", stampWith);
2075
2405
  };
@@ -2097,6 +2427,8 @@ class TurnkeySDKClientBase {
2097
2427
  };
2098
2428
  this.deleteOauthProviders = async (input, stampWith) => {
2099
2429
  const { organizationId, timestampMs, ...rest } = input;
2430
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
2431
+ const generateAppProofs = input?.generateAppProofs ?? false;
2100
2432
  const session = await this.storageManager?.getActiveSession();
2101
2433
  return this.activity("/public/v1/submit/delete_oauth_providers", {
2102
2434
  parameters: rest,
@@ -2104,6 +2436,7 @@ class TurnkeySDKClientBase {
2104
2436
  session?.organizationId ??
2105
2437
  this.config.organizationId,
2106
2438
  timestampMs: timestampMs ?? String(Date.now()),
2439
+ generateAppProofs: generateAppProofs ?? false,
2107
2440
  type: "ACTIVITY_TYPE_DELETE_OAUTH_PROVIDERS",
2108
2441
  }, "deleteOauthProvidersResult", stampWith);
2109
2442
  };
@@ -2131,6 +2464,8 @@ class TurnkeySDKClientBase {
2131
2464
  };
2132
2465
  this.deletePolicies = async (input, stampWith) => {
2133
2466
  const { organizationId, timestampMs, ...rest } = input;
2467
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
2468
+ const generateAppProofs = input?.generateAppProofs ?? false;
2134
2469
  const session = await this.storageManager?.getActiveSession();
2135
2470
  return this.activity("/public/v1/submit/delete_policies", {
2136
2471
  parameters: rest,
@@ -2138,6 +2473,7 @@ class TurnkeySDKClientBase {
2138
2473
  session?.organizationId ??
2139
2474
  this.config.organizationId,
2140
2475
  timestampMs: timestampMs ?? String(Date.now()),
2476
+ generateAppProofs: generateAppProofs ?? false,
2141
2477
  type: "ACTIVITY_TYPE_DELETE_POLICIES",
2142
2478
  }, "deletePoliciesResult", stampWith);
2143
2479
  };
@@ -2165,6 +2501,8 @@ class TurnkeySDKClientBase {
2165
2501
  };
2166
2502
  this.deletePolicy = async (input, stampWith) => {
2167
2503
  const { organizationId, timestampMs, ...rest } = input;
2504
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
2505
+ const generateAppProofs = input?.generateAppProofs ?? false;
2168
2506
  const session = await this.storageManager?.getActiveSession();
2169
2507
  return this.activity("/public/v1/submit/delete_policy", {
2170
2508
  parameters: rest,
@@ -2172,6 +2510,7 @@ class TurnkeySDKClientBase {
2172
2510
  session?.organizationId ??
2173
2511
  this.config.organizationId,
2174
2512
  timestampMs: timestampMs ?? String(Date.now()),
2513
+ generateAppProofs: generateAppProofs ?? false,
2175
2514
  type: "ACTIVITY_TYPE_DELETE_POLICY",
2176
2515
  }, "deletePolicyResult", stampWith);
2177
2516
  };
@@ -2199,6 +2538,8 @@ class TurnkeySDKClientBase {
2199
2538
  };
2200
2539
  this.deletePrivateKeyTags = async (input, stampWith) => {
2201
2540
  const { organizationId, timestampMs, ...rest } = input;
2541
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
2542
+ const generateAppProofs = input?.generateAppProofs ?? false;
2202
2543
  const session = await this.storageManager?.getActiveSession();
2203
2544
  return this.activity("/public/v1/submit/delete_private_key_tags", {
2204
2545
  parameters: rest,
@@ -2206,6 +2547,7 @@ class TurnkeySDKClientBase {
2206
2547
  session?.organizationId ??
2207
2548
  this.config.organizationId,
2208
2549
  timestampMs: timestampMs ?? String(Date.now()),
2550
+ generateAppProofs: generateAppProofs ?? false,
2209
2551
  type: "ACTIVITY_TYPE_DELETE_PRIVATE_KEY_TAGS",
2210
2552
  }, "deletePrivateKeyTagsResult", stampWith);
2211
2553
  };
@@ -2233,6 +2575,8 @@ class TurnkeySDKClientBase {
2233
2575
  };
2234
2576
  this.deletePrivateKeys = async (input, stampWith) => {
2235
2577
  const { organizationId, timestampMs, ...rest } = input;
2578
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
2579
+ const generateAppProofs = input?.generateAppProofs ?? false;
2236
2580
  const session = await this.storageManager?.getActiveSession();
2237
2581
  return this.activity("/public/v1/submit/delete_private_keys", {
2238
2582
  parameters: rest,
@@ -2240,6 +2584,7 @@ class TurnkeySDKClientBase {
2240
2584
  session?.organizationId ??
2241
2585
  this.config.organizationId,
2242
2586
  timestampMs: timestampMs ?? String(Date.now()),
2587
+ generateAppProofs: generateAppProofs ?? false,
2243
2588
  type: "ACTIVITY_TYPE_DELETE_PRIVATE_KEYS",
2244
2589
  }, "deletePrivateKeysResult", stampWith);
2245
2590
  };
@@ -2267,6 +2612,8 @@ class TurnkeySDKClientBase {
2267
2612
  };
2268
2613
  this.deleteSmartContractInterface = async (input, stampWith) => {
2269
2614
  const { organizationId, timestampMs, ...rest } = input;
2615
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
2616
+ const generateAppProofs = input?.generateAppProofs ?? false;
2270
2617
  const session = await this.storageManager?.getActiveSession();
2271
2618
  return this.activity("/public/v1/submit/delete_smart_contract_interface", {
2272
2619
  parameters: rest,
@@ -2274,6 +2621,7 @@ class TurnkeySDKClientBase {
2274
2621
  session?.organizationId ??
2275
2622
  this.config.organizationId,
2276
2623
  timestampMs: timestampMs ?? String(Date.now()),
2624
+ generateAppProofs: generateAppProofs ?? false,
2277
2625
  type: "ACTIVITY_TYPE_DELETE_SMART_CONTRACT_INTERFACE",
2278
2626
  }, "deleteSmartContractInterfaceResult", stampWith);
2279
2627
  };
@@ -2302,6 +2650,8 @@ class TurnkeySDKClientBase {
2302
2650
  };
2303
2651
  this.deleteSubOrganization = async (input, stampWith) => {
2304
2652
  const { organizationId, timestampMs, ...rest } = input;
2653
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
2654
+ const generateAppProofs = input?.generateAppProofs ?? false;
2305
2655
  const session = await this.storageManager?.getActiveSession();
2306
2656
  return this.activity("/public/v1/submit/delete_sub_organization", {
2307
2657
  parameters: rest,
@@ -2309,6 +2659,7 @@ class TurnkeySDKClientBase {
2309
2659
  session?.organizationId ??
2310
2660
  this.config.organizationId,
2311
2661
  timestampMs: timestampMs ?? String(Date.now()),
2662
+ generateAppProofs: generateAppProofs ?? false,
2312
2663
  type: "ACTIVITY_TYPE_DELETE_SUB_ORGANIZATION",
2313
2664
  }, "deleteSubOrganizationResult", stampWith);
2314
2665
  };
@@ -2334,8 +2685,85 @@ class TurnkeySDKClientBase {
2334
2685
  url: fullUrl,
2335
2686
  };
2336
2687
  };
2688
+ this.deleteTvcAppAndDeployments = async (input, stampWith) => {
2689
+ const { organizationId, timestampMs, ...rest } = input;
2690
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
2691
+ const generateAppProofs = input?.generateAppProofs ?? false;
2692
+ const session = await this.storageManager?.getActiveSession();
2693
+ return this.activity("/public/v1/submit/delete_tvc_app_and_deployments", {
2694
+ parameters: rest,
2695
+ organizationId: organizationId ??
2696
+ session?.organizationId ??
2697
+ this.config.organizationId,
2698
+ timestampMs: timestampMs ?? String(Date.now()),
2699
+ generateAppProofs: generateAppProofs ?? false,
2700
+ type: "ACTIVITY_TYPE_DELETE_TVC_APP_AND_DEPLOYMENTS",
2701
+ }, "deleteTvcAppAndDeploymentsResult", stampWith);
2702
+ };
2703
+ this.stampDeleteTvcAppAndDeployments = async (input, stampWith) => {
2704
+ const activeStamper = this.getStamper(stampWith);
2705
+ if (!activeStamper) {
2706
+ return undefined;
2707
+ }
2708
+ const { organizationId, timestampMs, ...parameters } = input;
2709
+ const session = await this.storageManager?.getActiveSession();
2710
+ const fullUrl = this.config.apiBaseUrl +
2711
+ "/public/v1/submit/delete_tvc_app_and_deployments";
2712
+ const bodyWithType = {
2713
+ parameters,
2714
+ organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
2715
+ timestampMs: timestampMs ?? String(Date.now()),
2716
+ type: "ACTIVITY_TYPE_DELETE_TVC_APP_AND_DEPLOYMENTS",
2717
+ };
2718
+ const stringifiedBody = JSON.stringify(bodyWithType);
2719
+ const stamp = await activeStamper.stamp(stringifiedBody);
2720
+ return {
2721
+ body: stringifiedBody,
2722
+ stamp: stamp,
2723
+ url: fullUrl,
2724
+ };
2725
+ };
2726
+ this.deleteTvcDeployment = async (input, stampWith) => {
2727
+ const { organizationId, timestampMs, ...rest } = input;
2728
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
2729
+ const generateAppProofs = input?.generateAppProofs ?? false;
2730
+ const session = await this.storageManager?.getActiveSession();
2731
+ return this.activity("/public/v1/submit/delete_tvc_deployment", {
2732
+ parameters: rest,
2733
+ organizationId: organizationId ??
2734
+ session?.organizationId ??
2735
+ this.config.organizationId,
2736
+ timestampMs: timestampMs ?? String(Date.now()),
2737
+ generateAppProofs: generateAppProofs ?? false,
2738
+ type: "ACTIVITY_TYPE_DELETE_TVC_DEPLOYMENT",
2739
+ }, "deleteTvcDeploymentResult", stampWith);
2740
+ };
2741
+ this.stampDeleteTvcDeployment = async (input, stampWith) => {
2742
+ const activeStamper = this.getStamper(stampWith);
2743
+ if (!activeStamper) {
2744
+ return undefined;
2745
+ }
2746
+ const { organizationId, timestampMs, ...parameters } = input;
2747
+ const session = await this.storageManager?.getActiveSession();
2748
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/delete_tvc_deployment";
2749
+ const bodyWithType = {
2750
+ parameters,
2751
+ organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
2752
+ timestampMs: timestampMs ?? String(Date.now()),
2753
+ type: "ACTIVITY_TYPE_DELETE_TVC_DEPLOYMENT",
2754
+ };
2755
+ const stringifiedBody = JSON.stringify(bodyWithType);
2756
+ const stamp = await activeStamper.stamp(stringifiedBody);
2757
+ return {
2758
+ body: stringifiedBody,
2759
+ stamp: stamp,
2760
+ url: fullUrl,
2761
+ };
2762
+ };
2337
2763
  this.deleteUserTags = async (input, stampWith) => {
2338
2764
  const { organizationId, timestampMs, ...rest } = input;
2765
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
2766
+ const generateAppProofs = input?.generateAppProofs ?? false;
2339
2767
  const session = await this.storageManager?.getActiveSession();
2340
2768
  return this.activity("/public/v1/submit/delete_user_tags", {
2341
2769
  parameters: rest,
@@ -2343,6 +2771,7 @@ class TurnkeySDKClientBase {
2343
2771
  session?.organizationId ??
2344
2772
  this.config.organizationId,
2345
2773
  timestampMs: timestampMs ?? String(Date.now()),
2774
+ generateAppProofs: generateAppProofs ?? false,
2346
2775
  type: "ACTIVITY_TYPE_DELETE_USER_TAGS",
2347
2776
  }, "deleteUserTagsResult", stampWith);
2348
2777
  };
@@ -2370,6 +2799,8 @@ class TurnkeySDKClientBase {
2370
2799
  };
2371
2800
  this.deleteUsers = async (input, stampWith) => {
2372
2801
  const { organizationId, timestampMs, ...rest } = input;
2802
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
2803
+ const generateAppProofs = input?.generateAppProofs ?? false;
2373
2804
  const session = await this.storageManager?.getActiveSession();
2374
2805
  return this.activity("/public/v1/submit/delete_users", {
2375
2806
  parameters: rest,
@@ -2377,6 +2808,7 @@ class TurnkeySDKClientBase {
2377
2808
  session?.organizationId ??
2378
2809
  this.config.organizationId,
2379
2810
  timestampMs: timestampMs ?? String(Date.now()),
2811
+ generateAppProofs: generateAppProofs ?? false,
2380
2812
  type: "ACTIVITY_TYPE_DELETE_USERS",
2381
2813
  }, "deleteUsersResult", stampWith);
2382
2814
  };
@@ -2404,6 +2836,8 @@ class TurnkeySDKClientBase {
2404
2836
  };
2405
2837
  this.deleteWalletAccounts = async (input, stampWith) => {
2406
2838
  const { organizationId, timestampMs, ...rest } = input;
2839
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
2840
+ const generateAppProofs = input?.generateAppProofs ?? false;
2407
2841
  const session = await this.storageManager?.getActiveSession();
2408
2842
  return this.activity("/public/v1/submit/delete_wallet_accounts", {
2409
2843
  parameters: rest,
@@ -2411,6 +2845,7 @@ class TurnkeySDKClientBase {
2411
2845
  session?.organizationId ??
2412
2846
  this.config.organizationId,
2413
2847
  timestampMs: timestampMs ?? String(Date.now()),
2848
+ generateAppProofs: generateAppProofs ?? false,
2414
2849
  type: "ACTIVITY_TYPE_DELETE_WALLET_ACCOUNTS",
2415
2850
  }, "deleteWalletAccountsResult", stampWith);
2416
2851
  };
@@ -2438,6 +2873,8 @@ class TurnkeySDKClientBase {
2438
2873
  };
2439
2874
  this.deleteWallets = async (input, stampWith) => {
2440
2875
  const { organizationId, timestampMs, ...rest } = input;
2876
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
2877
+ const generateAppProofs = input?.generateAppProofs ?? false;
2441
2878
  const session = await this.storageManager?.getActiveSession();
2442
2879
  return this.activity("/public/v1/submit/delete_wallets", {
2443
2880
  parameters: rest,
@@ -2445,6 +2882,7 @@ class TurnkeySDKClientBase {
2445
2882
  session?.organizationId ??
2446
2883
  this.config.organizationId,
2447
2884
  timestampMs: timestampMs ?? String(Date.now()),
2885
+ generateAppProofs: generateAppProofs ?? false,
2448
2886
  type: "ACTIVITY_TYPE_DELETE_WALLETS",
2449
2887
  }, "deleteWalletsResult", stampWith);
2450
2888
  };
@@ -2472,6 +2910,8 @@ class TurnkeySDKClientBase {
2472
2910
  };
2473
2911
  this.deleteWebhookEndpoint = async (input, stampWith) => {
2474
2912
  const { organizationId, timestampMs, ...rest } = input;
2913
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
2914
+ const generateAppProofs = input?.generateAppProofs ?? false;
2475
2915
  const session = await this.storageManager?.getActiveSession();
2476
2916
  return this.activity("/public/v1/submit/delete_webhook_endpoint", {
2477
2917
  parameters: rest,
@@ -2479,6 +2919,7 @@ class TurnkeySDKClientBase {
2479
2919
  session?.organizationId ??
2480
2920
  this.config.organizationId,
2481
2921
  timestampMs: timestampMs ?? String(Date.now()),
2922
+ generateAppProofs: generateAppProofs ?? false,
2482
2923
  type: "ACTIVITY_TYPE_DELETE_WEBHOOK_ENDPOINT",
2483
2924
  }, "deleteWebhookEndpointResult", stampWith);
2484
2925
  };
@@ -2506,6 +2947,8 @@ class TurnkeySDKClientBase {
2506
2947
  };
2507
2948
  this.emailAuth = async (input, stampWith) => {
2508
2949
  const { organizationId, timestampMs, ...rest } = input;
2950
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
2951
+ const generateAppProofs = input?.generateAppProofs ?? false;
2509
2952
  const session = await this.storageManager?.getActiveSession();
2510
2953
  return this.activity("/public/v1/submit/email_auth", {
2511
2954
  parameters: rest,
@@ -2513,6 +2956,7 @@ class TurnkeySDKClientBase {
2513
2956
  session?.organizationId ??
2514
2957
  this.config.organizationId,
2515
2958
  timestampMs: timestampMs ?? String(Date.now()),
2959
+ generateAppProofs: generateAppProofs ?? false,
2516
2960
  type: "ACTIVITY_TYPE_EMAIL_AUTH_V3",
2517
2961
  }, "emailAuthResult", stampWith);
2518
2962
  };
@@ -2540,6 +2984,8 @@ class TurnkeySDKClientBase {
2540
2984
  };
2541
2985
  this.ethSendTransaction = async (input, stampWith) => {
2542
2986
  const { organizationId, timestampMs, ...rest } = input;
2987
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
2988
+ const generateAppProofs = input?.generateAppProofs ?? false;
2543
2989
  const session = await this.storageManager?.getActiveSession();
2544
2990
  return this.activity("/public/v1/submit/eth_send_transaction", {
2545
2991
  parameters: rest,
@@ -2547,6 +2993,7 @@ class TurnkeySDKClientBase {
2547
2993
  session?.organizationId ??
2548
2994
  this.config.organizationId,
2549
2995
  timestampMs: timestampMs ?? String(Date.now()),
2996
+ generateAppProofs: generateAppProofs ?? false,
2550
2997
  type: "ACTIVITY_TYPE_ETH_SEND_TRANSACTION",
2551
2998
  }, "ethSendTransactionResult", stampWith);
2552
2999
  };
@@ -2574,6 +3021,8 @@ class TurnkeySDKClientBase {
2574
3021
  };
2575
3022
  this.exportPrivateKey = async (input, stampWith) => {
2576
3023
  const { organizationId, timestampMs, ...rest } = input;
3024
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
3025
+ const generateAppProofs = input?.generateAppProofs ?? false;
2577
3026
  const session = await this.storageManager?.getActiveSession();
2578
3027
  return this.activity("/public/v1/submit/export_private_key", {
2579
3028
  parameters: rest,
@@ -2581,6 +3030,7 @@ class TurnkeySDKClientBase {
2581
3030
  session?.organizationId ??
2582
3031
  this.config.organizationId,
2583
3032
  timestampMs: timestampMs ?? String(Date.now()),
3033
+ generateAppProofs: generateAppProofs ?? false,
2584
3034
  type: "ACTIVITY_TYPE_EXPORT_PRIVATE_KEY",
2585
3035
  }, "exportPrivateKeyResult", stampWith);
2586
3036
  };
@@ -2608,6 +3058,8 @@ class TurnkeySDKClientBase {
2608
3058
  };
2609
3059
  this.exportWallet = async (input, stampWith) => {
2610
3060
  const { organizationId, timestampMs, ...rest } = input;
3061
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
3062
+ const generateAppProofs = input?.generateAppProofs ?? false;
2611
3063
  const session = await this.storageManager?.getActiveSession();
2612
3064
  return this.activity("/public/v1/submit/export_wallet", {
2613
3065
  parameters: rest,
@@ -2615,6 +3067,7 @@ class TurnkeySDKClientBase {
2615
3067
  session?.organizationId ??
2616
3068
  this.config.organizationId,
2617
3069
  timestampMs: timestampMs ?? String(Date.now()),
3070
+ generateAppProofs: generateAppProofs ?? false,
2618
3071
  type: "ACTIVITY_TYPE_EXPORT_WALLET",
2619
3072
  }, "exportWalletResult", stampWith);
2620
3073
  };
@@ -2642,6 +3095,8 @@ class TurnkeySDKClientBase {
2642
3095
  };
2643
3096
  this.exportWalletAccount = async (input, stampWith) => {
2644
3097
  const { organizationId, timestampMs, ...rest } = input;
3098
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
3099
+ const generateAppProofs = input?.generateAppProofs ?? false;
2645
3100
  const session = await this.storageManager?.getActiveSession();
2646
3101
  return this.activity("/public/v1/submit/export_wallet_account", {
2647
3102
  parameters: rest,
@@ -2649,6 +3104,7 @@ class TurnkeySDKClientBase {
2649
3104
  session?.organizationId ??
2650
3105
  this.config.organizationId,
2651
3106
  timestampMs: timestampMs ?? String(Date.now()),
3107
+ generateAppProofs: generateAppProofs ?? false,
2652
3108
  type: "ACTIVITY_TYPE_EXPORT_WALLET_ACCOUNT",
2653
3109
  }, "exportWalletAccountResult", stampWith);
2654
3110
  };
@@ -2676,6 +3132,8 @@ class TurnkeySDKClientBase {
2676
3132
  };
2677
3133
  this.importPrivateKey = async (input, stampWith) => {
2678
3134
  const { organizationId, timestampMs, ...rest } = input;
3135
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
3136
+ const generateAppProofs = input?.generateAppProofs ?? false;
2679
3137
  const session = await this.storageManager?.getActiveSession();
2680
3138
  return this.activity("/public/v1/submit/import_private_key", {
2681
3139
  parameters: rest,
@@ -2683,6 +3141,7 @@ class TurnkeySDKClientBase {
2683
3141
  session?.organizationId ??
2684
3142
  this.config.organizationId,
2685
3143
  timestampMs: timestampMs ?? String(Date.now()),
3144
+ generateAppProofs: generateAppProofs ?? false,
2686
3145
  type: "ACTIVITY_TYPE_IMPORT_PRIVATE_KEY",
2687
3146
  }, "importPrivateKeyResult", stampWith);
2688
3147
  };
@@ -2710,6 +3169,8 @@ class TurnkeySDKClientBase {
2710
3169
  };
2711
3170
  this.importWallet = async (input, stampWith) => {
2712
3171
  const { organizationId, timestampMs, ...rest } = input;
3172
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
3173
+ const generateAppProofs = input?.generateAppProofs ?? false;
2713
3174
  const session = await this.storageManager?.getActiveSession();
2714
3175
  return this.activity("/public/v1/submit/import_wallet", {
2715
3176
  parameters: rest,
@@ -2717,6 +3178,7 @@ class TurnkeySDKClientBase {
2717
3178
  session?.organizationId ??
2718
3179
  this.config.organizationId,
2719
3180
  timestampMs: timestampMs ?? String(Date.now()),
3181
+ generateAppProofs: generateAppProofs ?? false,
2720
3182
  type: "ACTIVITY_TYPE_IMPORT_WALLET",
2721
3183
  }, "importWalletResult", stampWith);
2722
3184
  };
@@ -2744,6 +3206,8 @@ class TurnkeySDKClientBase {
2744
3206
  };
2745
3207
  this.initFiatOnRamp = async (input, stampWith) => {
2746
3208
  const { organizationId, timestampMs, ...rest } = input;
3209
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
3210
+ const generateAppProofs = input?.generateAppProofs ?? false;
2747
3211
  const session = await this.storageManager?.getActiveSession();
2748
3212
  return this.activity("/public/v1/submit/init_fiat_on_ramp", {
2749
3213
  parameters: rest,
@@ -2751,6 +3215,7 @@ class TurnkeySDKClientBase {
2751
3215
  session?.organizationId ??
2752
3216
  this.config.organizationId,
2753
3217
  timestampMs: timestampMs ?? String(Date.now()),
3218
+ generateAppProofs: generateAppProofs ?? false,
2754
3219
  type: "ACTIVITY_TYPE_INIT_FIAT_ON_RAMP",
2755
3220
  }, "initFiatOnRampResult", stampWith);
2756
3221
  };
@@ -2778,6 +3243,8 @@ class TurnkeySDKClientBase {
2778
3243
  };
2779
3244
  this.initImportPrivateKey = async (input, stampWith) => {
2780
3245
  const { organizationId, timestampMs, ...rest } = input;
3246
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
3247
+ const generateAppProofs = input?.generateAppProofs ?? false;
2781
3248
  const session = await this.storageManager?.getActiveSession();
2782
3249
  return this.activity("/public/v1/submit/init_import_private_key", {
2783
3250
  parameters: rest,
@@ -2785,6 +3252,7 @@ class TurnkeySDKClientBase {
2785
3252
  session?.organizationId ??
2786
3253
  this.config.organizationId,
2787
3254
  timestampMs: timestampMs ?? String(Date.now()),
3255
+ generateAppProofs: generateAppProofs ?? false,
2788
3256
  type: "ACTIVITY_TYPE_INIT_IMPORT_PRIVATE_KEY",
2789
3257
  }, "initImportPrivateKeyResult", stampWith);
2790
3258
  };
@@ -2812,6 +3280,8 @@ class TurnkeySDKClientBase {
2812
3280
  };
2813
3281
  this.initImportWallet = async (input, stampWith) => {
2814
3282
  const { organizationId, timestampMs, ...rest } = input;
3283
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
3284
+ const generateAppProofs = input?.generateAppProofs ?? false;
2815
3285
  const session = await this.storageManager?.getActiveSession();
2816
3286
  return this.activity("/public/v1/submit/init_import_wallet", {
2817
3287
  parameters: rest,
@@ -2819,6 +3289,7 @@ class TurnkeySDKClientBase {
2819
3289
  session?.organizationId ??
2820
3290
  this.config.organizationId,
2821
3291
  timestampMs: timestampMs ?? String(Date.now()),
3292
+ generateAppProofs: generateAppProofs ?? false,
2822
3293
  type: "ACTIVITY_TYPE_INIT_IMPORT_WALLET",
2823
3294
  }, "initImportWalletResult", stampWith);
2824
3295
  };
@@ -2846,6 +3317,8 @@ class TurnkeySDKClientBase {
2846
3317
  };
2847
3318
  this.initOtp = async (input, stampWith) => {
2848
3319
  const { organizationId, timestampMs, ...rest } = input;
3320
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
3321
+ const generateAppProofs = input?.generateAppProofs ?? false;
2849
3322
  const session = await this.storageManager?.getActiveSession();
2850
3323
  return this.activity("/public/v1/submit/init_otp", {
2851
3324
  parameters: rest,
@@ -2853,8 +3326,9 @@ class TurnkeySDKClientBase {
2853
3326
  session?.organizationId ??
2854
3327
  this.config.organizationId,
2855
3328
  timestampMs: timestampMs ?? String(Date.now()),
2856
- type: "ACTIVITY_TYPE_INIT_OTP_V2",
2857
- }, "initOtpResult", stampWith);
3329
+ generateAppProofs: generateAppProofs ?? false,
3330
+ type: "ACTIVITY_TYPE_INIT_OTP_V3",
3331
+ }, "initOtpResultV2", stampWith);
2858
3332
  };
2859
3333
  this.stampInitOtp = async (input, stampWith) => {
2860
3334
  const activeStamper = this.getStamper(stampWith);
@@ -2868,7 +3342,7 @@ class TurnkeySDKClientBase {
2868
3342
  parameters,
2869
3343
  organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
2870
3344
  timestampMs: timestampMs ?? String(Date.now()),
2871
- type: "ACTIVITY_TYPE_INIT_OTP_V2",
3345
+ type: "ACTIVITY_TYPE_INIT_OTP_V3",
2872
3346
  };
2873
3347
  const stringifiedBody = JSON.stringify(bodyWithType);
2874
3348
  const stamp = await activeStamper.stamp(stringifiedBody);
@@ -2880,6 +3354,8 @@ class TurnkeySDKClientBase {
2880
3354
  };
2881
3355
  this.initOtpAuth = async (input, stampWith) => {
2882
3356
  const { organizationId, timestampMs, ...rest } = input;
3357
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
3358
+ const generateAppProofs = input?.generateAppProofs ?? false;
2883
3359
  const session = await this.storageManager?.getActiveSession();
2884
3360
  return this.activity("/public/v1/submit/init_otp_auth", {
2885
3361
  parameters: rest,
@@ -2887,6 +3363,7 @@ class TurnkeySDKClientBase {
2887
3363
  session?.organizationId ??
2888
3364
  this.config.organizationId,
2889
3365
  timestampMs: timestampMs ?? String(Date.now()),
3366
+ generateAppProofs: generateAppProofs ?? false,
2890
3367
  type: "ACTIVITY_TYPE_INIT_OTP_AUTH_V3",
2891
3368
  }, "initOtpAuthResultV2", stampWith);
2892
3369
  };
@@ -2914,6 +3391,8 @@ class TurnkeySDKClientBase {
2914
3391
  };
2915
3392
  this.initUserEmailRecovery = async (input, stampWith) => {
2916
3393
  const { organizationId, timestampMs, ...rest } = input;
3394
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
3395
+ const generateAppProofs = input?.generateAppProofs ?? false;
2917
3396
  const session = await this.storageManager?.getActiveSession();
2918
3397
  return this.activity("/public/v1/submit/init_user_email_recovery", {
2919
3398
  parameters: rest,
@@ -2921,6 +3400,7 @@ class TurnkeySDKClientBase {
2921
3400
  session?.organizationId ??
2922
3401
  this.config.organizationId,
2923
3402
  timestampMs: timestampMs ?? String(Date.now()),
3403
+ generateAppProofs: generateAppProofs ?? false,
2924
3404
  type: "ACTIVITY_TYPE_INIT_USER_EMAIL_RECOVERY_V2",
2925
3405
  }, "initUserEmailRecoveryResult", stampWith);
2926
3406
  };
@@ -2948,6 +3428,8 @@ class TurnkeySDKClientBase {
2948
3428
  };
2949
3429
  this.oauth = async (input, stampWith) => {
2950
3430
  const { organizationId, timestampMs, ...rest } = input;
3431
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
3432
+ const generateAppProofs = input?.generateAppProofs ?? false;
2951
3433
  const session = await this.storageManager?.getActiveSession();
2952
3434
  return this.activity("/public/v1/submit/oauth", {
2953
3435
  parameters: rest,
@@ -2955,6 +3437,7 @@ class TurnkeySDKClientBase {
2955
3437
  session?.organizationId ??
2956
3438
  this.config.organizationId,
2957
3439
  timestampMs: timestampMs ?? String(Date.now()),
3440
+ generateAppProofs: generateAppProofs ?? false,
2958
3441
  type: "ACTIVITY_TYPE_OAUTH",
2959
3442
  }, "oauthResult", stampWith);
2960
3443
  };
@@ -2982,6 +3465,8 @@ class TurnkeySDKClientBase {
2982
3465
  };
2983
3466
  this.oauth2Authenticate = async (input, stampWith) => {
2984
3467
  const { organizationId, timestampMs, ...rest } = input;
3468
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
3469
+ const generateAppProofs = input?.generateAppProofs ?? false;
2985
3470
  const session = await this.storageManager?.getActiveSession();
2986
3471
  return this.activity("/public/v1/submit/oauth2_authenticate", {
2987
3472
  parameters: rest,
@@ -2989,6 +3474,7 @@ class TurnkeySDKClientBase {
2989
3474
  session?.organizationId ??
2990
3475
  this.config.organizationId,
2991
3476
  timestampMs: timestampMs ?? String(Date.now()),
3477
+ generateAppProofs: generateAppProofs ?? false,
2992
3478
  type: "ACTIVITY_TYPE_OAUTH2_AUTHENTICATE",
2993
3479
  }, "oauth2AuthenticateResult", stampWith);
2994
3480
  };
@@ -3016,6 +3502,8 @@ class TurnkeySDKClientBase {
3016
3502
  };
3017
3503
  this.oauthLogin = async (input, stampWith) => {
3018
3504
  const { organizationId, timestampMs, ...rest } = input;
3505
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
3506
+ const generateAppProofs = input?.generateAppProofs ?? false;
3019
3507
  const session = await this.storageManager?.getActiveSession();
3020
3508
  return this.activity("/public/v1/submit/oauth_login", {
3021
3509
  parameters: rest,
@@ -3023,6 +3511,7 @@ class TurnkeySDKClientBase {
3023
3511
  session?.organizationId ??
3024
3512
  this.config.organizationId,
3025
3513
  timestampMs: timestampMs ?? String(Date.now()),
3514
+ generateAppProofs: generateAppProofs ?? false,
3026
3515
  type: "ACTIVITY_TYPE_OAUTH_LOGIN",
3027
3516
  }, "oauthLoginResult", stampWith);
3028
3517
  };
@@ -3050,6 +3539,8 @@ class TurnkeySDKClientBase {
3050
3539
  };
3051
3540
  this.otpAuth = async (input, stampWith) => {
3052
3541
  const { organizationId, timestampMs, ...rest } = input;
3542
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
3543
+ const generateAppProofs = input?.generateAppProofs ?? false;
3053
3544
  const session = await this.storageManager?.getActiveSession();
3054
3545
  return this.activity("/public/v1/submit/otp_auth", {
3055
3546
  parameters: rest,
@@ -3057,6 +3548,7 @@ class TurnkeySDKClientBase {
3057
3548
  session?.organizationId ??
3058
3549
  this.config.organizationId,
3059
3550
  timestampMs: timestampMs ?? String(Date.now()),
3551
+ generateAppProofs: generateAppProofs ?? false,
3060
3552
  type: "ACTIVITY_TYPE_OTP_AUTH",
3061
3553
  }, "otpAuthResult", stampWith);
3062
3554
  };
@@ -3084,6 +3576,8 @@ class TurnkeySDKClientBase {
3084
3576
  };
3085
3577
  this.otpLogin = async (input, stampWith) => {
3086
3578
  const { organizationId, timestampMs, ...rest } = input;
3579
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
3580
+ const generateAppProofs = input?.generateAppProofs ?? false;
3087
3581
  const session = await this.storageManager?.getActiveSession();
3088
3582
  return this.activity("/public/v1/submit/otp_login", {
3089
3583
  parameters: rest,
@@ -3091,6 +3585,7 @@ class TurnkeySDKClientBase {
3091
3585
  session?.organizationId ??
3092
3586
  this.config.organizationId,
3093
3587
  timestampMs: timestampMs ?? String(Date.now()),
3588
+ generateAppProofs: generateAppProofs ?? false,
3094
3589
  type: "ACTIVITY_TYPE_OTP_LOGIN",
3095
3590
  }, "otpLoginResult", stampWith);
3096
3591
  };
@@ -3118,6 +3613,8 @@ class TurnkeySDKClientBase {
3118
3613
  };
3119
3614
  this.recoverUser = async (input, stampWith) => {
3120
3615
  const { organizationId, timestampMs, ...rest } = input;
3616
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
3617
+ const generateAppProofs = input?.generateAppProofs ?? false;
3121
3618
  const session = await this.storageManager?.getActiveSession();
3122
3619
  return this.activity("/public/v1/submit/recover_user", {
3123
3620
  parameters: rest,
@@ -3125,6 +3622,7 @@ class TurnkeySDKClientBase {
3125
3622
  session?.organizationId ??
3126
3623
  this.config.organizationId,
3127
3624
  timestampMs: timestampMs ?? String(Date.now()),
3625
+ generateAppProofs: generateAppProofs ?? false,
3128
3626
  type: "ACTIVITY_TYPE_RECOVER_USER",
3129
3627
  }, "recoverUserResult", stampWith);
3130
3628
  };
@@ -3152,6 +3650,7 @@ class TurnkeySDKClientBase {
3152
3650
  };
3153
3651
  this.rejectActivity = async (input, stampWith) => {
3154
3652
  const { organizationId, timestampMs, ...rest } = input;
3653
+ const generateAppProofs = input?.generateAppProofs ?? false;
3155
3654
  const session = await this.storageManager?.getActiveSession();
3156
3655
  return this.activityDecision("/public/v1/submit/reject_activity", {
3157
3656
  parameters: rest,
@@ -3159,6 +3658,7 @@ class TurnkeySDKClientBase {
3159
3658
  session?.organizationId ??
3160
3659
  this.config.organizationId,
3161
3660
  timestampMs: timestampMs ?? String(Date.now()),
3661
+ generateAppProofs: generateAppProofs ?? false,
3162
3662
  type: "ACTIVITY_TYPE_REJECT_ACTIVITY",
3163
3663
  }, stampWith);
3164
3664
  };
@@ -3184,8 +3684,47 @@ class TurnkeySDKClientBase {
3184
3684
  url: fullUrl,
3185
3685
  };
3186
3686
  };
3687
+ this.removeIpAllowlist = async (input, stampWith) => {
3688
+ const { organizationId, timestampMs, ...rest } = input;
3689
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
3690
+ const generateAppProofs = input?.generateAppProofs ?? false;
3691
+ const session = await this.storageManager?.getActiveSession();
3692
+ return this.activity("/public/v1/submit/remove_ip_allowlist", {
3693
+ parameters: rest,
3694
+ organizationId: organizationId ??
3695
+ session?.organizationId ??
3696
+ this.config.organizationId,
3697
+ timestampMs: timestampMs ?? String(Date.now()),
3698
+ generateAppProofs: generateAppProofs ?? false,
3699
+ type: "ACTIVITY_TYPE_REMOVE_IP_ALLOWLIST",
3700
+ }, "removeIpAllowlistResult", stampWith);
3701
+ };
3702
+ this.stampRemoveIpAllowlist = async (input, stampWith) => {
3703
+ const activeStamper = this.getStamper(stampWith);
3704
+ if (!activeStamper) {
3705
+ return undefined;
3706
+ }
3707
+ const { organizationId, timestampMs, ...parameters } = input;
3708
+ const session = await this.storageManager?.getActiveSession();
3709
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/remove_ip_allowlist";
3710
+ const bodyWithType = {
3711
+ parameters,
3712
+ organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
3713
+ timestampMs: timestampMs ?? String(Date.now()),
3714
+ type: "ACTIVITY_TYPE_REMOVE_IP_ALLOWLIST",
3715
+ };
3716
+ const stringifiedBody = JSON.stringify(bodyWithType);
3717
+ const stamp = await activeStamper.stamp(stringifiedBody);
3718
+ return {
3719
+ body: stringifiedBody,
3720
+ stamp: stamp,
3721
+ url: fullUrl,
3722
+ };
3723
+ };
3187
3724
  this.removeOrganizationFeature = async (input, stampWith) => {
3188
3725
  const { organizationId, timestampMs, ...rest } = input;
3726
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
3727
+ const generateAppProofs = input?.generateAppProofs ?? false;
3189
3728
  const session = await this.storageManager?.getActiveSession();
3190
3729
  return this.activity("/public/v1/submit/remove_organization_feature", {
3191
3730
  parameters: rest,
@@ -3193,6 +3732,7 @@ class TurnkeySDKClientBase {
3193
3732
  session?.organizationId ??
3194
3733
  this.config.organizationId,
3195
3734
  timestampMs: timestampMs ?? String(Date.now()),
3735
+ generateAppProofs: generateAppProofs ?? false,
3196
3736
  type: "ACTIVITY_TYPE_REMOVE_ORGANIZATION_FEATURE",
3197
3737
  }, "removeOrganizationFeatureResult", stampWith);
3198
3738
  };
@@ -3218,8 +3758,84 @@ class TurnkeySDKClientBase {
3218
3758
  url: fullUrl,
3219
3759
  };
3220
3760
  };
3761
+ this.restoreTvcDeployment = async (input, stampWith) => {
3762
+ const { organizationId, timestampMs, ...rest } = input;
3763
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
3764
+ const generateAppProofs = input?.generateAppProofs ?? false;
3765
+ const session = await this.storageManager?.getActiveSession();
3766
+ return this.activity("/public/v1/submit/restore_tvc_deployment", {
3767
+ parameters: rest,
3768
+ organizationId: organizationId ??
3769
+ session?.organizationId ??
3770
+ this.config.organizationId,
3771
+ timestampMs: timestampMs ?? String(Date.now()),
3772
+ generateAppProofs: generateAppProofs ?? false,
3773
+ type: "ACTIVITY_TYPE_RESTORE_TVC_DEPLOYMENT",
3774
+ }, "restoreTvcDeploymentResult", stampWith);
3775
+ };
3776
+ this.stampRestoreTvcDeployment = async (input, stampWith) => {
3777
+ const activeStamper = this.getStamper(stampWith);
3778
+ if (!activeStamper) {
3779
+ return undefined;
3780
+ }
3781
+ const { organizationId, timestampMs, ...parameters } = input;
3782
+ const session = await this.storageManager?.getActiveSession();
3783
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/restore_tvc_deployment";
3784
+ const bodyWithType = {
3785
+ parameters,
3786
+ organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
3787
+ timestampMs: timestampMs ?? String(Date.now()),
3788
+ type: "ACTIVITY_TYPE_RESTORE_TVC_DEPLOYMENT",
3789
+ };
3790
+ const stringifiedBody = JSON.stringify(bodyWithType);
3791
+ const stamp = await activeStamper.stamp(stringifiedBody);
3792
+ return {
3793
+ body: stringifiedBody,
3794
+ stamp: stamp,
3795
+ url: fullUrl,
3796
+ };
3797
+ };
3798
+ this.setIpAllowlist = async (input, stampWith) => {
3799
+ const { organizationId, timestampMs, ...rest } = input;
3800
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
3801
+ const generateAppProofs = input?.generateAppProofs ?? false;
3802
+ const session = await this.storageManager?.getActiveSession();
3803
+ return this.activity("/public/v1/submit/set_ip_allowlist", {
3804
+ parameters: rest,
3805
+ organizationId: organizationId ??
3806
+ session?.organizationId ??
3807
+ this.config.organizationId,
3808
+ timestampMs: timestampMs ?? String(Date.now()),
3809
+ generateAppProofs: generateAppProofs ?? false,
3810
+ type: "ACTIVITY_TYPE_SET_IP_ALLOWLIST",
3811
+ }, "setIpAllowlistResult", stampWith);
3812
+ };
3813
+ this.stampSetIpAllowlist = async (input, stampWith) => {
3814
+ const activeStamper = this.getStamper(stampWith);
3815
+ if (!activeStamper) {
3816
+ return undefined;
3817
+ }
3818
+ const { organizationId, timestampMs, ...parameters } = input;
3819
+ const session = await this.storageManager?.getActiveSession();
3820
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/set_ip_allowlist";
3821
+ const bodyWithType = {
3822
+ parameters,
3823
+ organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
3824
+ timestampMs: timestampMs ?? String(Date.now()),
3825
+ type: "ACTIVITY_TYPE_SET_IP_ALLOWLIST",
3826
+ };
3827
+ const stringifiedBody = JSON.stringify(bodyWithType);
3828
+ const stamp = await activeStamper.stamp(stringifiedBody);
3829
+ return {
3830
+ body: stringifiedBody,
3831
+ stamp: stamp,
3832
+ url: fullUrl,
3833
+ };
3834
+ };
3221
3835
  this.setOrganizationFeature = async (input, stampWith) => {
3222
3836
  const { organizationId, timestampMs, ...rest } = input;
3837
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
3838
+ const generateAppProofs = input?.generateAppProofs ?? false;
3223
3839
  const session = await this.storageManager?.getActiveSession();
3224
3840
  return this.activity("/public/v1/submit/set_organization_feature", {
3225
3841
  parameters: rest,
@@ -3227,6 +3843,7 @@ class TurnkeySDKClientBase {
3227
3843
  session?.organizationId ??
3228
3844
  this.config.organizationId,
3229
3845
  timestampMs: timestampMs ?? String(Date.now()),
3846
+ generateAppProofs: generateAppProofs ?? false,
3230
3847
  type: "ACTIVITY_TYPE_SET_ORGANIZATION_FEATURE",
3231
3848
  }, "setOrganizationFeatureResult", stampWith);
3232
3849
  };
@@ -3252,8 +3869,47 @@ class TurnkeySDKClientBase {
3252
3869
  url: fullUrl,
3253
3870
  };
3254
3871
  };
3872
+ this.updateTvcAppLiveDeployment = async (input, stampWith) => {
3873
+ const { organizationId, timestampMs, ...rest } = input;
3874
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
3875
+ const generateAppProofs = input?.generateAppProofs ?? false;
3876
+ const session = await this.storageManager?.getActiveSession();
3877
+ return this.activity("/public/v1/submit/set_tvc_app_live_deployment", {
3878
+ parameters: rest,
3879
+ organizationId: organizationId ??
3880
+ session?.organizationId ??
3881
+ this.config.organizationId,
3882
+ timestampMs: timestampMs ?? String(Date.now()),
3883
+ generateAppProofs: generateAppProofs ?? false,
3884
+ type: "ACTIVITY_TYPE_UPDATE_TVC_APP_LIVE_DEPLOYMENT",
3885
+ }, "updateTvcAppLiveDeploymentResult", stampWith);
3886
+ };
3887
+ this.stampUpdateTvcAppLiveDeployment = async (input, stampWith) => {
3888
+ const activeStamper = this.getStamper(stampWith);
3889
+ if (!activeStamper) {
3890
+ return undefined;
3891
+ }
3892
+ const { organizationId, timestampMs, ...parameters } = input;
3893
+ const session = await this.storageManager?.getActiveSession();
3894
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/set_tvc_app_live_deployment";
3895
+ const bodyWithType = {
3896
+ parameters,
3897
+ organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
3898
+ timestampMs: timestampMs ?? String(Date.now()),
3899
+ type: "ACTIVITY_TYPE_UPDATE_TVC_APP_LIVE_DEPLOYMENT",
3900
+ };
3901
+ const stringifiedBody = JSON.stringify(bodyWithType);
3902
+ const stamp = await activeStamper.stamp(stringifiedBody);
3903
+ return {
3904
+ body: stringifiedBody,
3905
+ stamp: stamp,
3906
+ url: fullUrl,
3907
+ };
3908
+ };
3255
3909
  this.signRawPayload = async (input, stampWith) => {
3256
3910
  const { organizationId, timestampMs, ...rest } = input;
3911
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
3912
+ const generateAppProofs = input?.generateAppProofs ?? false;
3257
3913
  const session = await this.storageManager?.getActiveSession();
3258
3914
  return this.activity("/public/v1/submit/sign_raw_payload", {
3259
3915
  parameters: rest,
@@ -3261,6 +3917,7 @@ class TurnkeySDKClientBase {
3261
3917
  session?.organizationId ??
3262
3918
  this.config.organizationId,
3263
3919
  timestampMs: timestampMs ?? String(Date.now()),
3920
+ generateAppProofs: generateAppProofs ?? false,
3264
3921
  type: "ACTIVITY_TYPE_SIGN_RAW_PAYLOAD_V2",
3265
3922
  }, "signRawPayloadResult", stampWith);
3266
3923
  };
@@ -3288,6 +3945,8 @@ class TurnkeySDKClientBase {
3288
3945
  };
3289
3946
  this.signRawPayloads = async (input, stampWith) => {
3290
3947
  const { organizationId, timestampMs, ...rest } = input;
3948
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
3949
+ const generateAppProofs = input?.generateAppProofs ?? false;
3291
3950
  const session = await this.storageManager?.getActiveSession();
3292
3951
  return this.activity("/public/v1/submit/sign_raw_payloads", {
3293
3952
  parameters: rest,
@@ -3295,6 +3954,7 @@ class TurnkeySDKClientBase {
3295
3954
  session?.organizationId ??
3296
3955
  this.config.organizationId,
3297
3956
  timestampMs: timestampMs ?? String(Date.now()),
3957
+ generateAppProofs: generateAppProofs ?? false,
3298
3958
  type: "ACTIVITY_TYPE_SIGN_RAW_PAYLOADS",
3299
3959
  }, "signRawPayloadsResult", stampWith);
3300
3960
  };
@@ -3322,6 +3982,8 @@ class TurnkeySDKClientBase {
3322
3982
  };
3323
3983
  this.signTransaction = async (input, stampWith) => {
3324
3984
  const { organizationId, timestampMs, ...rest } = input;
3985
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
3986
+ const generateAppProofs = input?.generateAppProofs ?? false;
3325
3987
  const session = await this.storageManager?.getActiveSession();
3326
3988
  return this.activity("/public/v1/submit/sign_transaction", {
3327
3989
  parameters: rest,
@@ -3329,6 +3991,7 @@ class TurnkeySDKClientBase {
3329
3991
  session?.organizationId ??
3330
3992
  this.config.organizationId,
3331
3993
  timestampMs: timestampMs ?? String(Date.now()),
3994
+ generateAppProofs: generateAppProofs ?? false,
3332
3995
  type: "ACTIVITY_TYPE_SIGN_TRANSACTION_V2",
3333
3996
  }, "signTransactionResult", stampWith);
3334
3997
  };
@@ -3356,6 +4019,8 @@ class TurnkeySDKClientBase {
3356
4019
  };
3357
4020
  this.solSendTransaction = async (input, stampWith) => {
3358
4021
  const { organizationId, timestampMs, ...rest } = input;
4022
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
4023
+ const generateAppProofs = input?.generateAppProofs ?? false;
3359
4024
  const session = await this.storageManager?.getActiveSession();
3360
4025
  return this.activity("/public/v1/submit/sol_send_transaction", {
3361
4026
  parameters: rest,
@@ -3363,6 +4028,7 @@ class TurnkeySDKClientBase {
3363
4028
  session?.organizationId ??
3364
4029
  this.config.organizationId,
3365
4030
  timestampMs: timestampMs ?? String(Date.now()),
4031
+ generateAppProofs: generateAppProofs ?? false,
3366
4032
  type: "ACTIVITY_TYPE_SOL_SEND_TRANSACTION",
3367
4033
  }, "solSendTransactionResult", stampWith);
3368
4034
  };
@@ -3388,8 +4054,159 @@ class TurnkeySDKClientBase {
3388
4054
  url: fullUrl,
3389
4055
  };
3390
4056
  };
4057
+ this.sparkClaimTransfer = async (input, stampWith) => {
4058
+ const { organizationId, timestampMs, ...rest } = input;
4059
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
4060
+ const generateAppProofs = input?.generateAppProofs ?? false;
4061
+ const session = await this.storageManager?.getActiveSession();
4062
+ return this.activity("/public/v1/submit/spark_claim_transfer", {
4063
+ parameters: rest,
4064
+ organizationId: organizationId ??
4065
+ session?.organizationId ??
4066
+ this.config.organizationId,
4067
+ timestampMs: timestampMs ?? String(Date.now()),
4068
+ generateAppProofs: generateAppProofs ?? false,
4069
+ type: "ACTIVITY_TYPE_SPARK_CLAIM_TRANSFER",
4070
+ }, "sparkClaimTransferResult", stampWith);
4071
+ };
4072
+ this.stampSparkClaimTransfer = async (input, stampWith) => {
4073
+ const activeStamper = this.getStamper(stampWith);
4074
+ if (!activeStamper) {
4075
+ return undefined;
4076
+ }
4077
+ const { organizationId, timestampMs, ...parameters } = input;
4078
+ const session = await this.storageManager?.getActiveSession();
4079
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/spark_claim_transfer";
4080
+ const bodyWithType = {
4081
+ parameters,
4082
+ organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
4083
+ timestampMs: timestampMs ?? String(Date.now()),
4084
+ type: "ACTIVITY_TYPE_SPARK_CLAIM_TRANSFER",
4085
+ };
4086
+ const stringifiedBody = JSON.stringify(bodyWithType);
4087
+ const stamp = await activeStamper.stamp(stringifiedBody);
4088
+ return {
4089
+ body: stringifiedBody,
4090
+ stamp: stamp,
4091
+ url: fullUrl,
4092
+ };
4093
+ };
4094
+ this.sparkPrepareLightningReceive = async (input, stampWith) => {
4095
+ const { organizationId, timestampMs, ...rest } = input;
4096
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
4097
+ const generateAppProofs = input?.generateAppProofs ?? false;
4098
+ const session = await this.storageManager?.getActiveSession();
4099
+ return this.activity("/public/v1/submit/spark_prepare_lightning_receive", {
4100
+ parameters: rest,
4101
+ organizationId: organizationId ??
4102
+ session?.organizationId ??
4103
+ this.config.organizationId,
4104
+ timestampMs: timestampMs ?? String(Date.now()),
4105
+ generateAppProofs: generateAppProofs ?? false,
4106
+ type: "ACTIVITY_TYPE_SPARK_PREPARE_LIGHTNING_RECEIVE",
4107
+ }, "sparkPrepareLightningReceiveResult", stampWith);
4108
+ };
4109
+ this.stampSparkPrepareLightningReceive = async (input, stampWith) => {
4110
+ const activeStamper = this.getStamper(stampWith);
4111
+ if (!activeStamper) {
4112
+ return undefined;
4113
+ }
4114
+ const { organizationId, timestampMs, ...parameters } = input;
4115
+ const session = await this.storageManager?.getActiveSession();
4116
+ const fullUrl = this.config.apiBaseUrl +
4117
+ "/public/v1/submit/spark_prepare_lightning_receive";
4118
+ const bodyWithType = {
4119
+ parameters,
4120
+ organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
4121
+ timestampMs: timestampMs ?? String(Date.now()),
4122
+ type: "ACTIVITY_TYPE_SPARK_PREPARE_LIGHTNING_RECEIVE",
4123
+ };
4124
+ const stringifiedBody = JSON.stringify(bodyWithType);
4125
+ const stamp = await activeStamper.stamp(stringifiedBody);
4126
+ return {
4127
+ body: stringifiedBody,
4128
+ stamp: stamp,
4129
+ url: fullUrl,
4130
+ };
4131
+ };
4132
+ this.sparkPrepareTransfer = async (input, stampWith) => {
4133
+ const { organizationId, timestampMs, ...rest } = input;
4134
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
4135
+ const generateAppProofs = input?.generateAppProofs ?? false;
4136
+ const session = await this.storageManager?.getActiveSession();
4137
+ return this.activity("/public/v1/submit/spark_prepare_transfer", {
4138
+ parameters: rest,
4139
+ organizationId: organizationId ??
4140
+ session?.organizationId ??
4141
+ this.config.organizationId,
4142
+ timestampMs: timestampMs ?? String(Date.now()),
4143
+ generateAppProofs: generateAppProofs ?? false,
4144
+ type: "ACTIVITY_TYPE_SPARK_PREPARE_TRANSFER",
4145
+ }, "sparkPrepareTransferResult", stampWith);
4146
+ };
4147
+ this.stampSparkPrepareTransfer = async (input, stampWith) => {
4148
+ const activeStamper = this.getStamper(stampWith);
4149
+ if (!activeStamper) {
4150
+ return undefined;
4151
+ }
4152
+ const { organizationId, timestampMs, ...parameters } = input;
4153
+ const session = await this.storageManager?.getActiveSession();
4154
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/spark_prepare_transfer";
4155
+ const bodyWithType = {
4156
+ parameters,
4157
+ organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
4158
+ timestampMs: timestampMs ?? String(Date.now()),
4159
+ type: "ACTIVITY_TYPE_SPARK_PREPARE_TRANSFER",
4160
+ };
4161
+ const stringifiedBody = JSON.stringify(bodyWithType);
4162
+ const stamp = await activeStamper.stamp(stringifiedBody);
4163
+ return {
4164
+ body: stringifiedBody,
4165
+ stamp: stamp,
4166
+ url: fullUrl,
4167
+ };
4168
+ };
4169
+ this.sparkSignFrost = async (input, stampWith) => {
4170
+ const { organizationId, timestampMs, ...rest } = input;
4171
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
4172
+ const generateAppProofs = input?.generateAppProofs ?? false;
4173
+ const session = await this.storageManager?.getActiveSession();
4174
+ return this.activity("/public/v1/submit/spark_sign_frost", {
4175
+ parameters: rest,
4176
+ organizationId: organizationId ??
4177
+ session?.organizationId ??
4178
+ this.config.organizationId,
4179
+ timestampMs: timestampMs ?? String(Date.now()),
4180
+ generateAppProofs: generateAppProofs ?? false,
4181
+ type: "ACTIVITY_TYPE_SPARK_SIGN_FROST",
4182
+ }, "sparkSignFrostResult", stampWith);
4183
+ };
4184
+ this.stampSparkSignFrost = async (input, stampWith) => {
4185
+ const activeStamper = this.getStamper(stampWith);
4186
+ if (!activeStamper) {
4187
+ return undefined;
4188
+ }
4189
+ const { organizationId, timestampMs, ...parameters } = input;
4190
+ const session = await this.storageManager?.getActiveSession();
4191
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/spark_sign_frost";
4192
+ const bodyWithType = {
4193
+ parameters,
4194
+ organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
4195
+ timestampMs: timestampMs ?? String(Date.now()),
4196
+ type: "ACTIVITY_TYPE_SPARK_SIGN_FROST",
4197
+ };
4198
+ const stringifiedBody = JSON.stringify(bodyWithType);
4199
+ const stamp = await activeStamper.stamp(stringifiedBody);
4200
+ return {
4201
+ body: stringifiedBody,
4202
+ stamp: stamp,
4203
+ url: fullUrl,
4204
+ };
4205
+ };
3391
4206
  this.stampLogin = async (input, stampWith) => {
3392
4207
  const { organizationId, timestampMs, ...rest } = input;
4208
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
4209
+ const generateAppProofs = input?.generateAppProofs ?? false;
3393
4210
  const session = await this.storageManager?.getActiveSession();
3394
4211
  return this.activity("/public/v1/submit/stamp_login", {
3395
4212
  parameters: rest,
@@ -3397,6 +4214,7 @@ class TurnkeySDKClientBase {
3397
4214
  session?.organizationId ??
3398
4215
  this.config.organizationId,
3399
4216
  timestampMs: timestampMs ?? String(Date.now()),
4217
+ generateAppProofs: generateAppProofs ?? false,
3400
4218
  type: "ACTIVITY_TYPE_STAMP_LOGIN",
3401
4219
  }, "stampLoginResult", stampWith);
3402
4220
  };
@@ -3424,6 +4242,8 @@ class TurnkeySDKClientBase {
3424
4242
  };
3425
4243
  this.updateFiatOnRampCredential = async (input, stampWith) => {
3426
4244
  const { organizationId, timestampMs, ...rest } = input;
4245
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
4246
+ const generateAppProofs = input?.generateAppProofs ?? false;
3427
4247
  const session = await this.storageManager?.getActiveSession();
3428
4248
  return this.activity("/public/v1/submit/update_fiat_on_ramp_credential", {
3429
4249
  parameters: rest,
@@ -3431,6 +4251,7 @@ class TurnkeySDKClientBase {
3431
4251
  session?.organizationId ??
3432
4252
  this.config.organizationId,
3433
4253
  timestampMs: timestampMs ?? String(Date.now()),
4254
+ generateAppProofs: generateAppProofs ?? false,
3434
4255
  type: "ACTIVITY_TYPE_UPDATE_FIAT_ON_RAMP_CREDENTIAL",
3435
4256
  }, "updateFiatOnRampCredentialResult", stampWith);
3436
4257
  };
@@ -3459,6 +4280,8 @@ class TurnkeySDKClientBase {
3459
4280
  };
3460
4281
  this.updateOauth2Credential = async (input, stampWith) => {
3461
4282
  const { organizationId, timestampMs, ...rest } = input;
4283
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
4284
+ const generateAppProofs = input?.generateAppProofs ?? false;
3462
4285
  const session = await this.storageManager?.getActiveSession();
3463
4286
  return this.activity("/public/v1/submit/update_oauth2_credential", {
3464
4287
  parameters: rest,
@@ -3466,6 +4289,7 @@ class TurnkeySDKClientBase {
3466
4289
  session?.organizationId ??
3467
4290
  this.config.organizationId,
3468
4291
  timestampMs: timestampMs ?? String(Date.now()),
4292
+ generateAppProofs: generateAppProofs ?? false,
3469
4293
  type: "ACTIVITY_TYPE_UPDATE_OAUTH2_CREDENTIAL",
3470
4294
  }, "updateOauth2CredentialResult", stampWith);
3471
4295
  };
@@ -3493,6 +4317,8 @@ class TurnkeySDKClientBase {
3493
4317
  };
3494
4318
  this.updateOrganizationName = async (input, stampWith) => {
3495
4319
  const { organizationId, timestampMs, ...rest } = input;
4320
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
4321
+ const generateAppProofs = input?.generateAppProofs ?? false;
3496
4322
  const session = await this.storageManager?.getActiveSession();
3497
4323
  return this.activity("/public/v1/submit/update_organization_name", {
3498
4324
  parameters: rest,
@@ -3500,6 +4326,7 @@ class TurnkeySDKClientBase {
3500
4326
  session?.organizationId ??
3501
4327
  this.config.organizationId,
3502
4328
  timestampMs: timestampMs ?? String(Date.now()),
4329
+ generateAppProofs: generateAppProofs ?? false,
3503
4330
  type: "ACTIVITY_TYPE_UPDATE_ORGANIZATION_NAME",
3504
4331
  }, "updateOrganizationNameResult", stampWith);
3505
4332
  };
@@ -3527,6 +4354,8 @@ class TurnkeySDKClientBase {
3527
4354
  };
3528
4355
  this.updatePolicy = async (input, stampWith) => {
3529
4356
  const { organizationId, timestampMs, ...rest } = input;
4357
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
4358
+ const generateAppProofs = input?.generateAppProofs ?? false;
3530
4359
  const session = await this.storageManager?.getActiveSession();
3531
4360
  return this.activity("/public/v1/submit/update_policy", {
3532
4361
  parameters: rest,
@@ -3534,6 +4363,7 @@ class TurnkeySDKClientBase {
3534
4363
  session?.organizationId ??
3535
4364
  this.config.organizationId,
3536
4365
  timestampMs: timestampMs ?? String(Date.now()),
4366
+ generateAppProofs: generateAppProofs ?? false,
3537
4367
  type: "ACTIVITY_TYPE_UPDATE_POLICY_V2",
3538
4368
  }, "updatePolicyResultV2", stampWith);
3539
4369
  };
@@ -3561,6 +4391,8 @@ class TurnkeySDKClientBase {
3561
4391
  };
3562
4392
  this.updatePrivateKeyTag = async (input, stampWith) => {
3563
4393
  const { organizationId, timestampMs, ...rest } = input;
4394
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
4395
+ const generateAppProofs = input?.generateAppProofs ?? false;
3564
4396
  const session = await this.storageManager?.getActiveSession();
3565
4397
  return this.activity("/public/v1/submit/update_private_key_tag", {
3566
4398
  parameters: rest,
@@ -3568,6 +4400,7 @@ class TurnkeySDKClientBase {
3568
4400
  session?.organizationId ??
3569
4401
  this.config.organizationId,
3570
4402
  timestampMs: timestampMs ?? String(Date.now()),
4403
+ generateAppProofs: generateAppProofs ?? false,
3571
4404
  type: "ACTIVITY_TYPE_UPDATE_PRIVATE_KEY_TAG",
3572
4405
  }, "updatePrivateKeyTagResult", stampWith);
3573
4406
  };
@@ -3595,6 +4428,8 @@ class TurnkeySDKClientBase {
3595
4428
  };
3596
4429
  this.updateRootQuorum = async (input, stampWith) => {
3597
4430
  const { organizationId, timestampMs, ...rest } = input;
4431
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
4432
+ const generateAppProofs = input?.generateAppProofs ?? false;
3598
4433
  const session = await this.storageManager?.getActiveSession();
3599
4434
  return this.activity("/public/v1/submit/update_root_quorum", {
3600
4435
  parameters: rest,
@@ -3602,6 +4437,7 @@ class TurnkeySDKClientBase {
3602
4437
  session?.organizationId ??
3603
4438
  this.config.organizationId,
3604
4439
  timestampMs: timestampMs ?? String(Date.now()),
4440
+ generateAppProofs: generateAppProofs ?? false,
3605
4441
  type: "ACTIVITY_TYPE_UPDATE_ROOT_QUORUM",
3606
4442
  }, "updateRootQuorumResult", stampWith);
3607
4443
  };
@@ -3629,6 +4465,8 @@ class TurnkeySDKClientBase {
3629
4465
  };
3630
4466
  this.updateUser = async (input, stampWith) => {
3631
4467
  const { organizationId, timestampMs, ...rest } = input;
4468
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
4469
+ const generateAppProofs = input?.generateAppProofs ?? false;
3632
4470
  const session = await this.storageManager?.getActiveSession();
3633
4471
  return this.activity("/public/v1/submit/update_user", {
3634
4472
  parameters: rest,
@@ -3636,6 +4474,7 @@ class TurnkeySDKClientBase {
3636
4474
  session?.organizationId ??
3637
4475
  this.config.organizationId,
3638
4476
  timestampMs: timestampMs ?? String(Date.now()),
4477
+ generateAppProofs: generateAppProofs ?? false,
3639
4478
  type: "ACTIVITY_TYPE_UPDATE_USER",
3640
4479
  }, "updateUserResult", stampWith);
3641
4480
  };
@@ -3663,6 +4502,8 @@ class TurnkeySDKClientBase {
3663
4502
  };
3664
4503
  this.updateUserEmail = async (input, stampWith) => {
3665
4504
  const { organizationId, timestampMs, ...rest } = input;
4505
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
4506
+ const generateAppProofs = input?.generateAppProofs ?? false;
3666
4507
  const session = await this.storageManager?.getActiveSession();
3667
4508
  return this.activity("/public/v1/submit/update_user_email", {
3668
4509
  parameters: rest,
@@ -3670,6 +4511,7 @@ class TurnkeySDKClientBase {
3670
4511
  session?.organizationId ??
3671
4512
  this.config.organizationId,
3672
4513
  timestampMs: timestampMs ?? String(Date.now()),
4514
+ generateAppProofs: generateAppProofs ?? false,
3673
4515
  type: "ACTIVITY_TYPE_UPDATE_USER_EMAIL",
3674
4516
  }, "updateUserEmailResult", stampWith);
3675
4517
  };
@@ -3697,6 +4539,8 @@ class TurnkeySDKClientBase {
3697
4539
  };
3698
4540
  this.updateUserName = async (input, stampWith) => {
3699
4541
  const { organizationId, timestampMs, ...rest } = input;
4542
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
4543
+ const generateAppProofs = input?.generateAppProofs ?? false;
3700
4544
  const session = await this.storageManager?.getActiveSession();
3701
4545
  return this.activity("/public/v1/submit/update_user_name", {
3702
4546
  parameters: rest,
@@ -3704,6 +4548,7 @@ class TurnkeySDKClientBase {
3704
4548
  session?.organizationId ??
3705
4549
  this.config.organizationId,
3706
4550
  timestampMs: timestampMs ?? String(Date.now()),
4551
+ generateAppProofs: generateAppProofs ?? false,
3707
4552
  type: "ACTIVITY_TYPE_UPDATE_USER_NAME",
3708
4553
  }, "updateUserNameResult", stampWith);
3709
4554
  };
@@ -3731,6 +4576,8 @@ class TurnkeySDKClientBase {
3731
4576
  };
3732
4577
  this.updateUserPhoneNumber = async (input, stampWith) => {
3733
4578
  const { organizationId, timestampMs, ...rest } = input;
4579
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
4580
+ const generateAppProofs = input?.generateAppProofs ?? false;
3734
4581
  const session = await this.storageManager?.getActiveSession();
3735
4582
  return this.activity("/public/v1/submit/update_user_phone_number", {
3736
4583
  parameters: rest,
@@ -3738,6 +4585,7 @@ class TurnkeySDKClientBase {
3738
4585
  session?.organizationId ??
3739
4586
  this.config.organizationId,
3740
4587
  timestampMs: timestampMs ?? String(Date.now()),
4588
+ generateAppProofs: generateAppProofs ?? false,
3741
4589
  type: "ACTIVITY_TYPE_UPDATE_USER_PHONE_NUMBER",
3742
4590
  }, "updateUserPhoneNumberResult", stampWith);
3743
4591
  };
@@ -3765,6 +4613,8 @@ class TurnkeySDKClientBase {
3765
4613
  };
3766
4614
  this.updateUserTag = async (input, stampWith) => {
3767
4615
  const { organizationId, timestampMs, ...rest } = input;
4616
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
4617
+ const generateAppProofs = input?.generateAppProofs ?? false;
3768
4618
  const session = await this.storageManager?.getActiveSession();
3769
4619
  return this.activity("/public/v1/submit/update_user_tag", {
3770
4620
  parameters: rest,
@@ -3772,6 +4622,7 @@ class TurnkeySDKClientBase {
3772
4622
  session?.organizationId ??
3773
4623
  this.config.organizationId,
3774
4624
  timestampMs: timestampMs ?? String(Date.now()),
4625
+ generateAppProofs: generateAppProofs ?? false,
3775
4626
  type: "ACTIVITY_TYPE_UPDATE_USER_TAG",
3776
4627
  }, "updateUserTagResult", stampWith);
3777
4628
  };
@@ -3799,6 +4650,8 @@ class TurnkeySDKClientBase {
3799
4650
  };
3800
4651
  this.updateWallet = async (input, stampWith) => {
3801
4652
  const { organizationId, timestampMs, ...rest } = input;
4653
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
4654
+ const generateAppProofs = input?.generateAppProofs ?? false;
3802
4655
  const session = await this.storageManager?.getActiveSession();
3803
4656
  return this.activity("/public/v1/submit/update_wallet", {
3804
4657
  parameters: rest,
@@ -3806,6 +4659,7 @@ class TurnkeySDKClientBase {
3806
4659
  session?.organizationId ??
3807
4660
  this.config.organizationId,
3808
4661
  timestampMs: timestampMs ?? String(Date.now()),
4662
+ generateAppProofs: generateAppProofs ?? false,
3809
4663
  type: "ACTIVITY_TYPE_UPDATE_WALLET",
3810
4664
  }, "updateWalletResult", stampWith);
3811
4665
  };
@@ -3833,6 +4687,8 @@ class TurnkeySDKClientBase {
3833
4687
  };
3834
4688
  this.updateWebhookEndpoint = async (input, stampWith) => {
3835
4689
  const { organizationId, timestampMs, ...rest } = input;
4690
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
4691
+ const generateAppProofs = input?.generateAppProofs ?? false;
3836
4692
  const session = await this.storageManager?.getActiveSession();
3837
4693
  return this.activity("/public/v1/submit/update_webhook_endpoint", {
3838
4694
  parameters: rest,
@@ -3840,6 +4696,7 @@ class TurnkeySDKClientBase {
3840
4696
  session?.organizationId ??
3841
4697
  this.config.organizationId,
3842
4698
  timestampMs: timestampMs ?? String(Date.now()),
4699
+ generateAppProofs: generateAppProofs ?? false,
3843
4700
  type: "ACTIVITY_TYPE_UPDATE_WEBHOOK_ENDPOINT",
3844
4701
  }, "updateWebhookEndpointResult", stampWith);
3845
4702
  };
@@ -3867,6 +4724,8 @@ class TurnkeySDKClientBase {
3867
4724
  };
3868
4725
  this.verifyOtp = async (input, stampWith) => {
3869
4726
  const { organizationId, timestampMs, ...rest } = input;
4727
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
4728
+ const generateAppProofs = input?.generateAppProofs ?? false;
3870
4729
  const session = await this.storageManager?.getActiveSession();
3871
4730
  return this.activity("/public/v1/submit/verify_otp", {
3872
4731
  parameters: rest,
@@ -3874,6 +4733,7 @@ class TurnkeySDKClientBase {
3874
4733
  session?.organizationId ??
3875
4734
  this.config.organizationId,
3876
4735
  timestampMs: timestampMs ?? String(Date.now()),
4736
+ generateAppProofs: generateAppProofs ?? false,
3877
4737
  type: "ACTIVITY_TYPE_VERIFY_OTP",
3878
4738
  }, "verifyOtpResult", stampWith);
3879
4739
  };