@turnkey/sdk-browser 6.1.1 → 8.0.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.
@@ -226,6 +226,99 @@ class TurnkeySDKClientBase {
226
226
  url: fullUrl,
227
227
  };
228
228
  };
229
+ this.getEarnDeployStatus = async (input) => {
230
+ const sessionData = await storage.getStorageValue(storage.StorageKeys.Session);
231
+ const session = sessionData ? utils.parseSession(sessionData) : null;
232
+ return this.request("/public/v1/query/get_earn_deploy_status", {
233
+ ...input,
234
+ organizationId: input.organizationId ??
235
+ session?.organizationId ??
236
+ this.config.organizationId,
237
+ });
238
+ };
239
+ this.stampGetEarnDeployStatus = async (input) => {
240
+ if (!this.stamper) {
241
+ return undefined;
242
+ }
243
+ const sessionData = await storage.getStorageValue(storage.StorageKeys.Session);
244
+ const session = sessionData ? utils.parseSession(sessionData) : null;
245
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_earn_deploy_status";
246
+ const body = {
247
+ ...input,
248
+ organizationId: input.organizationId ??
249
+ session?.organizationId ??
250
+ this.config.organizationId,
251
+ };
252
+ const stringifiedBody = JSON.stringify(body);
253
+ const stamp = await this.stamper.stamp(stringifiedBody);
254
+ return {
255
+ body: stringifiedBody,
256
+ stamp: stamp,
257
+ url: fullUrl,
258
+ };
259
+ };
260
+ this.getEarnDepositStatus = async (input) => {
261
+ const sessionData = await storage.getStorageValue(storage.StorageKeys.Session);
262
+ const session = sessionData ? utils.parseSession(sessionData) : null;
263
+ return this.request("/public/v1/query/get_earn_deposit_status", {
264
+ ...input,
265
+ organizationId: input.organizationId ??
266
+ session?.organizationId ??
267
+ this.config.organizationId,
268
+ });
269
+ };
270
+ this.stampGetEarnDepositStatus = async (input) => {
271
+ if (!this.stamper) {
272
+ return undefined;
273
+ }
274
+ const sessionData = await storage.getStorageValue(storage.StorageKeys.Session);
275
+ const session = sessionData ? utils.parseSession(sessionData) : null;
276
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_earn_deposit_status";
277
+ const body = {
278
+ ...input,
279
+ organizationId: input.organizationId ??
280
+ session?.organizationId ??
281
+ this.config.organizationId,
282
+ };
283
+ const stringifiedBody = JSON.stringify(body);
284
+ const stamp = await this.stamper.stamp(stringifiedBody);
285
+ return {
286
+ body: stringifiedBody,
287
+ stamp: stamp,
288
+ url: fullUrl,
289
+ };
290
+ };
291
+ this.getEarnWithdrawStatus = async (input) => {
292
+ const sessionData = await storage.getStorageValue(storage.StorageKeys.Session);
293
+ const session = sessionData ? utils.parseSession(sessionData) : null;
294
+ return this.request("/public/v1/query/get_earn_withdraw_status", {
295
+ ...input,
296
+ organizationId: input.organizationId ??
297
+ session?.organizationId ??
298
+ this.config.organizationId,
299
+ });
300
+ };
301
+ this.stampGetEarnWithdrawStatus = async (input) => {
302
+ if (!this.stamper) {
303
+ return undefined;
304
+ }
305
+ const sessionData = await storage.getStorageValue(storage.StorageKeys.Session);
306
+ const session = sessionData ? utils.parseSession(sessionData) : null;
307
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_earn_withdraw_status";
308
+ const body = {
309
+ ...input,
310
+ organizationId: input.organizationId ??
311
+ session?.organizationId ??
312
+ this.config.organizationId,
313
+ };
314
+ const stringifiedBody = JSON.stringify(body);
315
+ const stamp = await this.stamper.stamp(stringifiedBody);
316
+ return {
317
+ body: stringifiedBody,
318
+ stamp: stamp,
319
+ url: fullUrl,
320
+ };
321
+ };
229
322
  this.getGasUsage = async (input) => {
230
323
  const sessionData = await storage.getStorageValue(storage.StorageKeys.Session);
231
324
  const session = sessionData ? utils.parseSession(sessionData) : null;
@@ -319,6 +412,99 @@ class TurnkeySDKClientBase {
319
412
  url: fullUrl,
320
413
  };
321
414
  };
415
+ this.getMfaPolicies = async (input) => {
416
+ const sessionData = await storage.getStorageValue(storage.StorageKeys.Session);
417
+ const session = sessionData ? utils.parseSession(sessionData) : null;
418
+ return this.request("/public/v1/query/get_mfa_policies", {
419
+ ...input,
420
+ organizationId: input.organizationId ??
421
+ session?.organizationId ??
422
+ this.config.organizationId,
423
+ });
424
+ };
425
+ this.stampGetMfaPolicies = async (input) => {
426
+ if (!this.stamper) {
427
+ return undefined;
428
+ }
429
+ const sessionData = await storage.getStorageValue(storage.StorageKeys.Session);
430
+ const session = sessionData ? utils.parseSession(sessionData) : null;
431
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_mfa_policies";
432
+ const body = {
433
+ ...input,
434
+ organizationId: input.organizationId ??
435
+ session?.organizationId ??
436
+ this.config.organizationId,
437
+ };
438
+ const stringifiedBody = JSON.stringify(body);
439
+ const stamp = await this.stamper.stamp(stringifiedBody);
440
+ return {
441
+ body: stringifiedBody,
442
+ stamp: stamp,
443
+ url: fullUrl,
444
+ };
445
+ };
446
+ this.getMfaPolicy = async (input) => {
447
+ const sessionData = await storage.getStorageValue(storage.StorageKeys.Session);
448
+ const session = sessionData ? utils.parseSession(sessionData) : null;
449
+ return this.request("/public/v1/query/get_mfa_policy", {
450
+ ...input,
451
+ organizationId: input.organizationId ??
452
+ session?.organizationId ??
453
+ this.config.organizationId,
454
+ });
455
+ };
456
+ this.stampGetMfaPolicy = async (input) => {
457
+ if (!this.stamper) {
458
+ return undefined;
459
+ }
460
+ const sessionData = await storage.getStorageValue(storage.StorageKeys.Session);
461
+ const session = sessionData ? utils.parseSession(sessionData) : null;
462
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_mfa_policy";
463
+ const body = {
464
+ ...input,
465
+ organizationId: input.organizationId ??
466
+ session?.organizationId ??
467
+ this.config.organizationId,
468
+ };
469
+ const stringifiedBody = JSON.stringify(body);
470
+ const stamp = await this.stamper.stamp(stringifiedBody);
471
+ return {
472
+ body: stringifiedBody,
473
+ stamp: stamp,
474
+ url: fullUrl,
475
+ };
476
+ };
477
+ this.getMfaStatus = async (input) => {
478
+ const sessionData = await storage.getStorageValue(storage.StorageKeys.Session);
479
+ const session = sessionData ? utils.parseSession(sessionData) : null;
480
+ return this.request("/public/v1/query/get_mfa_status", {
481
+ ...input,
482
+ organizationId: input.organizationId ??
483
+ session?.organizationId ??
484
+ this.config.organizationId,
485
+ });
486
+ };
487
+ this.stampGetMfaStatus = async (input) => {
488
+ if (!this.stamper) {
489
+ return undefined;
490
+ }
491
+ const sessionData = await storage.getStorageValue(storage.StorageKeys.Session);
492
+ const session = sessionData ? utils.parseSession(sessionData) : null;
493
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_mfa_status";
494
+ const body = {
495
+ ...input,
496
+ organizationId: input.organizationId ??
497
+ session?.organizationId ??
498
+ this.config.organizationId,
499
+ };
500
+ const stringifiedBody = JSON.stringify(body);
501
+ const stamp = await this.stamper.stamp(stringifiedBody);
502
+ return {
503
+ body: stringifiedBody,
504
+ stamp: stamp,
505
+ url: fullUrl,
506
+ };
507
+ };
322
508
  this.getNonces = async (input) => {
323
509
  const sessionData = await storage.getStorageValue(storage.StorageKeys.Session);
324
510
  const session = sessionData ? utils.parseSession(sessionData) : null;
@@ -598,6 +784,68 @@ class TurnkeySDKClientBase {
598
784
  url: fullUrl,
599
785
  };
600
786
  };
787
+ this.getSessionProfile = async (input) => {
788
+ const sessionData = await storage.getStorageValue(storage.StorageKeys.Session);
789
+ const session = sessionData ? utils.parseSession(sessionData) : null;
790
+ return this.request("/public/v1/query/get_session_profile", {
791
+ ...input,
792
+ organizationId: input.organizationId ??
793
+ session?.organizationId ??
794
+ this.config.organizationId,
795
+ });
796
+ };
797
+ this.stampGetSessionProfile = async (input) => {
798
+ if (!this.stamper) {
799
+ return undefined;
800
+ }
801
+ const sessionData = await storage.getStorageValue(storage.StorageKeys.Session);
802
+ const session = sessionData ? utils.parseSession(sessionData) : null;
803
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_session_profile";
804
+ const body = {
805
+ ...input,
806
+ organizationId: input.organizationId ??
807
+ session?.organizationId ??
808
+ this.config.organizationId,
809
+ };
810
+ const stringifiedBody = JSON.stringify(body);
811
+ const stamp = await this.stamper.stamp(stringifiedBody);
812
+ return {
813
+ body: stringifiedBody,
814
+ stamp: stamp,
815
+ url: fullUrl,
816
+ };
817
+ };
818
+ this.getSessionProfiles = async (input) => {
819
+ const sessionData = await storage.getStorageValue(storage.StorageKeys.Session);
820
+ const session = sessionData ? utils.parseSession(sessionData) : null;
821
+ return this.request("/public/v1/query/get_session_profiles", {
822
+ ...input,
823
+ organizationId: input.organizationId ??
824
+ session?.organizationId ??
825
+ this.config.organizationId,
826
+ });
827
+ };
828
+ this.stampGetSessionProfiles = async (input) => {
829
+ if (!this.stamper) {
830
+ return undefined;
831
+ }
832
+ const sessionData = await storage.getStorageValue(storage.StorageKeys.Session);
833
+ const session = sessionData ? utils.parseSession(sessionData) : null;
834
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_session_profiles";
835
+ const body = {
836
+ ...input,
837
+ organizationId: input.organizationId ??
838
+ session?.organizationId ??
839
+ this.config.organizationId,
840
+ };
841
+ const stringifiedBody = JSON.stringify(body);
842
+ const stamp = await this.stamper.stamp(stringifiedBody);
843
+ return {
844
+ body: stringifiedBody,
845
+ stamp: stamp,
846
+ url: fullUrl,
847
+ };
848
+ };
601
849
  this.getSmartContractInterface = async (input) => {
602
850
  const sessionData = await storage.getStorageValue(storage.StorageKeys.Session);
603
851
  const session = sessionData ? utils.parseSession(sessionData) : null;
@@ -691,6 +939,37 @@ class TurnkeySDKClientBase {
691
939
  url: fullUrl,
692
940
  };
693
941
  };
942
+ this.getTvcDeploymentDebugLogs = async (input) => {
943
+ const sessionData = await storage.getStorageValue(storage.StorageKeys.Session);
944
+ const session = sessionData ? utils.parseSession(sessionData) : null;
945
+ return this.request("/public/v1/query/get_tvc_deployment_debug_logs", {
946
+ ...input,
947
+ organizationId: input.organizationId ??
948
+ session?.organizationId ??
949
+ this.config.organizationId,
950
+ });
951
+ };
952
+ this.stampGetTvcDeploymentDebugLogs = async (input) => {
953
+ if (!this.stamper) {
954
+ return undefined;
955
+ }
956
+ const sessionData = await storage.getStorageValue(storage.StorageKeys.Session);
957
+ const session = sessionData ? utils.parseSession(sessionData) : null;
958
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_tvc_deployment_debug_logs";
959
+ const body = {
960
+ ...input,
961
+ organizationId: input.organizationId ??
962
+ session?.organizationId ??
963
+ this.config.organizationId,
964
+ };
965
+ const stringifiedBody = JSON.stringify(body);
966
+ const stamp = await this.stamper.stamp(stringifiedBody);
967
+ return {
968
+ body: stringifiedBody,
969
+ stamp: stamp,
970
+ url: fullUrl,
971
+ };
972
+ };
694
973
  this.getUser = async (input) => {
695
974
  const sessionData = await storage.getStorageValue(storage.StorageKeys.Session);
696
975
  const session = sessionData ? utils.parseSession(sessionData) : null;
@@ -877,6 +1156,161 @@ class TurnkeySDKClientBase {
877
1156
  url: fullUrl,
878
1157
  };
879
1158
  };
1159
+ this.listEarnEnabledVaults = async (input) => {
1160
+ const sessionData = await storage.getStorageValue(storage.StorageKeys.Session);
1161
+ const session = sessionData ? utils.parseSession(sessionData) : null;
1162
+ return this.request("/public/v1/query/list_earn_enabled_vaults", {
1163
+ ...input,
1164
+ organizationId: input.organizationId ??
1165
+ session?.organizationId ??
1166
+ this.config.organizationId,
1167
+ });
1168
+ };
1169
+ this.stampListEarnEnabledVaults = async (input) => {
1170
+ if (!this.stamper) {
1171
+ return undefined;
1172
+ }
1173
+ const sessionData = await storage.getStorageValue(storage.StorageKeys.Session);
1174
+ const session = sessionData ? utils.parseSession(sessionData) : null;
1175
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/list_earn_enabled_vaults";
1176
+ const body = {
1177
+ ...input,
1178
+ organizationId: input.organizationId ??
1179
+ session?.organizationId ??
1180
+ this.config.organizationId,
1181
+ };
1182
+ const stringifiedBody = JSON.stringify(body);
1183
+ const stamp = await this.stamper.stamp(stringifiedBody);
1184
+ return {
1185
+ body: stringifiedBody,
1186
+ stamp: stamp,
1187
+ url: fullUrl,
1188
+ };
1189
+ };
1190
+ this.listEarnPositions = async (input) => {
1191
+ const sessionData = await storage.getStorageValue(storage.StorageKeys.Session);
1192
+ const session = sessionData ? utils.parseSession(sessionData) : null;
1193
+ return this.request("/public/v1/query/list_earn_positions", {
1194
+ ...input,
1195
+ organizationId: input.organizationId ??
1196
+ session?.organizationId ??
1197
+ this.config.organizationId,
1198
+ });
1199
+ };
1200
+ this.stampListEarnPositions = async (input) => {
1201
+ if (!this.stamper) {
1202
+ return undefined;
1203
+ }
1204
+ const sessionData = await storage.getStorageValue(storage.StorageKeys.Session);
1205
+ const session = sessionData ? utils.parseSession(sessionData) : null;
1206
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/list_earn_positions";
1207
+ const body = {
1208
+ ...input,
1209
+ organizationId: input.organizationId ??
1210
+ session?.organizationId ??
1211
+ this.config.organizationId,
1212
+ };
1213
+ const stringifiedBody = JSON.stringify(body);
1214
+ const stamp = await this.stamper.stamp(stringifiedBody);
1215
+ return {
1216
+ body: stringifiedBody,
1217
+ stamp: stamp,
1218
+ url: fullUrl,
1219
+ };
1220
+ };
1221
+ this.listEarnVaults = async (input) => {
1222
+ const sessionData = await storage.getStorageValue(storage.StorageKeys.Session);
1223
+ const session = sessionData ? utils.parseSession(sessionData) : null;
1224
+ return this.request("/public/v1/query/list_earn_vaults", {
1225
+ ...input,
1226
+ organizationId: input.organizationId ??
1227
+ session?.organizationId ??
1228
+ this.config.organizationId,
1229
+ });
1230
+ };
1231
+ this.stampListEarnVaults = async (input) => {
1232
+ if (!this.stamper) {
1233
+ return undefined;
1234
+ }
1235
+ const sessionData = await storage.getStorageValue(storage.StorageKeys.Session);
1236
+ const session = sessionData ? utils.parseSession(sessionData) : null;
1237
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/list_earn_vaults";
1238
+ const body = {
1239
+ ...input,
1240
+ organizationId: input.organizationId ??
1241
+ session?.organizationId ??
1242
+ this.config.organizationId,
1243
+ };
1244
+ const stringifiedBody = JSON.stringify(body);
1245
+ const stamp = await this.stamper.stamp(stringifiedBody);
1246
+ return {
1247
+ body: stringifiedBody,
1248
+ stamp: stamp,
1249
+ url: fullUrl,
1250
+ };
1251
+ };
1252
+ this.listEmailEvents = async (input) => {
1253
+ const sessionData = await storage.getStorageValue(storage.StorageKeys.Session);
1254
+ const session = sessionData ? utils.parseSession(sessionData) : null;
1255
+ return this.request("/public/v1/query/list_email_events", {
1256
+ ...input,
1257
+ organizationId: input.organizationId ??
1258
+ session?.organizationId ??
1259
+ this.config.organizationId,
1260
+ });
1261
+ };
1262
+ this.stampListEmailEvents = async (input) => {
1263
+ if (!this.stamper) {
1264
+ return undefined;
1265
+ }
1266
+ const sessionData = await storage.getStorageValue(storage.StorageKeys.Session);
1267
+ const session = sessionData ? utils.parseSession(sessionData) : null;
1268
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/list_email_events";
1269
+ const body = {
1270
+ ...input,
1271
+ organizationId: input.organizationId ??
1272
+ session?.organizationId ??
1273
+ this.config.organizationId,
1274
+ };
1275
+ const stringifiedBody = JSON.stringify(body);
1276
+ const stamp = await this.stamper.stamp(stringifiedBody);
1277
+ return {
1278
+ body: stringifiedBody,
1279
+ stamp: stamp,
1280
+ url: fullUrl,
1281
+ };
1282
+ };
1283
+ this.listEthTransactionHistory = async (input) => {
1284
+ const sessionData = await storage.getStorageValue(storage.StorageKeys.Session);
1285
+ const session = sessionData ? utils.parseSession(sessionData) : null;
1286
+ return this.request("/public/v1/query/list_eth_transaction_history", {
1287
+ ...input,
1288
+ organizationId: input.organizationId ??
1289
+ session?.organizationId ??
1290
+ this.config.organizationId,
1291
+ });
1292
+ };
1293
+ this.stampListEthTransactionHistory = async (input) => {
1294
+ if (!this.stamper) {
1295
+ return undefined;
1296
+ }
1297
+ const sessionData = await storage.getStorageValue(storage.StorageKeys.Session);
1298
+ const session = sessionData ? utils.parseSession(sessionData) : null;
1299
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/list_eth_transaction_history";
1300
+ const body = {
1301
+ ...input,
1302
+ organizationId: input.organizationId ??
1303
+ session?.organizationId ??
1304
+ this.config.organizationId,
1305
+ };
1306
+ const stringifiedBody = JSON.stringify(body);
1307
+ const stamp = await this.stamper.stamp(stringifiedBody);
1308
+ return {
1309
+ body: stringifiedBody,
1310
+ stamp: stamp,
1311
+ url: fullUrl,
1312
+ };
1313
+ };
880
1314
  this.listFiatOnRampCredentials = async (input) => {
881
1315
  const sessionData = await storage.getStorageValue(storage.StorageKeys.Session);
882
1316
  const session = sessionData ? utils.parseSession(sessionData) : null;
@@ -1035,21 +1469,52 @@ class TurnkeySDKClientBase {
1035
1469
  this.getSmartContractInterfaces = async (input) => {
1036
1470
  const sessionData = await storage.getStorageValue(storage.StorageKeys.Session);
1037
1471
  const session = sessionData ? utils.parseSession(sessionData) : null;
1038
- return this.request("/public/v1/query/list_smart_contract_interfaces", {
1472
+ return this.request("/public/v1/query/list_smart_contract_interfaces", {
1473
+ ...input,
1474
+ organizationId: input.organizationId ??
1475
+ session?.organizationId ??
1476
+ this.config.organizationId,
1477
+ });
1478
+ };
1479
+ this.stampGetSmartContractInterfaces = async (input) => {
1480
+ if (!this.stamper) {
1481
+ return undefined;
1482
+ }
1483
+ const sessionData = await storage.getStorageValue(storage.StorageKeys.Session);
1484
+ const session = sessionData ? utils.parseSession(sessionData) : null;
1485
+ const fullUrl = this.config.apiBaseUrl +
1486
+ "/public/v1/query/list_smart_contract_interfaces";
1487
+ const body = {
1488
+ ...input,
1489
+ organizationId: input.organizationId ??
1490
+ session?.organizationId ??
1491
+ this.config.organizationId,
1492
+ };
1493
+ const stringifiedBody = JSON.stringify(body);
1494
+ const stamp = await this.stamper.stamp(stringifiedBody);
1495
+ return {
1496
+ body: stringifiedBody,
1497
+ stamp: stamp,
1498
+ url: fullUrl,
1499
+ };
1500
+ };
1501
+ this.listSolTransactionHistory = async (input) => {
1502
+ const sessionData = await storage.getStorageValue(storage.StorageKeys.Session);
1503
+ const session = sessionData ? utils.parseSession(sessionData) : null;
1504
+ return this.request("/public/v1/query/list_sol_transaction_history", {
1039
1505
  ...input,
1040
1506
  organizationId: input.organizationId ??
1041
1507
  session?.organizationId ??
1042
1508
  this.config.organizationId,
1043
1509
  });
1044
1510
  };
1045
- this.stampGetSmartContractInterfaces = async (input) => {
1511
+ this.stampListSolTransactionHistory = async (input) => {
1046
1512
  if (!this.stamper) {
1047
1513
  return undefined;
1048
1514
  }
1049
1515
  const sessionData = await storage.getStorageValue(storage.StorageKeys.Session);
1050
1516
  const session = sessionData ? utils.parseSession(sessionData) : null;
1051
- const fullUrl = this.config.apiBaseUrl +
1052
- "/public/v1/query/list_smart_contract_interfaces";
1517
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/list_sol_transaction_history";
1053
1518
  const body = {
1054
1519
  ...input,
1055
1520
  organizationId: input.organizationId ??
@@ -1469,6 +1934,41 @@ class TurnkeySDKClientBase {
1469
1934
  url: fullUrl,
1470
1935
  };
1471
1936
  };
1937
+ this.claimEarnFees = async (input) => {
1938
+ const sessionData = await storage.getStorageValue(storage.StorageKeys.Session);
1939
+ const session = sessionData ? utils.parseSession(sessionData) : null;
1940
+ const { organizationId, timestampMs, ...rest } = input;
1941
+ return this.command("/public/v1/submit/claim_earn_fees", {
1942
+ parameters: rest,
1943
+ organizationId: organizationId ??
1944
+ session?.organizationId ??
1945
+ this.config.organizationId,
1946
+ timestampMs: timestampMs ?? String(Date.now()),
1947
+ type: "ACTIVITY_TYPE_CLAIM_EARN_FEES",
1948
+ }, "claimEarnFeesResult");
1949
+ };
1950
+ this.stampClaimEarnFees = async (input) => {
1951
+ if (!this.stamper) {
1952
+ return undefined;
1953
+ }
1954
+ const sessionData = await storage.getStorageValue(storage.StorageKeys.Session);
1955
+ const session = sessionData ? utils.parseSession(sessionData) : null;
1956
+ const { organizationId, timestampMs, ...parameters } = input;
1957
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/claim_earn_fees";
1958
+ const bodyWithType = {
1959
+ parameters,
1960
+ organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
1961
+ timestampMs: timestampMs ?? String(Date.now()),
1962
+ type: "ACTIVITY_TYPE_CLAIM_EARN_FEES",
1963
+ };
1964
+ const stringifiedBody = JSON.stringify(bodyWithType);
1965
+ const stamp = await this.stamper.stamp(stringifiedBody);
1966
+ return {
1967
+ body: stringifiedBody,
1968
+ stamp: stamp,
1969
+ url: fullUrl,
1970
+ };
1971
+ };
1472
1972
  this.createApiKeys = async (input) => {
1473
1973
  const sessionData = await storage.getStorageValue(storage.StorageKeys.Session);
1474
1974
  const session = sessionData ? utils.parseSession(sessionData) : null;
@@ -1610,6 +2110,41 @@ class TurnkeySDKClientBase {
1610
2110
  url: fullUrl,
1611
2111
  };
1612
2112
  };
2113
+ this.createMfaPolicy = async (input) => {
2114
+ const sessionData = await storage.getStorageValue(storage.StorageKeys.Session);
2115
+ const session = sessionData ? utils.parseSession(sessionData) : null;
2116
+ const { organizationId, timestampMs, ...rest } = input;
2117
+ return this.command("/public/v1/submit/create_mfa_policy", {
2118
+ parameters: rest,
2119
+ organizationId: organizationId ??
2120
+ session?.organizationId ??
2121
+ this.config.organizationId,
2122
+ timestampMs: timestampMs ?? String(Date.now()),
2123
+ type: "ACTIVITY_TYPE_CREATE_MFA_POLICY",
2124
+ }, "createMfaPolicyResult");
2125
+ };
2126
+ this.stampCreateMfaPolicy = async (input) => {
2127
+ if (!this.stamper) {
2128
+ return undefined;
2129
+ }
2130
+ const sessionData = await storage.getStorageValue(storage.StorageKeys.Session);
2131
+ const session = sessionData ? utils.parseSession(sessionData) : null;
2132
+ const { organizationId, timestampMs, ...parameters } = input;
2133
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_mfa_policy";
2134
+ const bodyWithType = {
2135
+ parameters,
2136
+ organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
2137
+ timestampMs: timestampMs ?? String(Date.now()),
2138
+ type: "ACTIVITY_TYPE_CREATE_MFA_POLICY",
2139
+ };
2140
+ const stringifiedBody = JSON.stringify(bodyWithType);
2141
+ const stamp = await this.stamper.stamp(stringifiedBody);
2142
+ return {
2143
+ body: stringifiedBody,
2144
+ stamp: stamp,
2145
+ url: fullUrl,
2146
+ };
2147
+ };
1613
2148
  this.createOauth2Credential = async (input) => {
1614
2149
  const sessionData = await storage.getStorageValue(storage.StorageKeys.Session);
1615
2150
  const session = sessionData ? utils.parseSession(sessionData) : null;
@@ -1890,6 +2425,41 @@ class TurnkeySDKClientBase {
1890
2425
  url: fullUrl,
1891
2426
  };
1892
2427
  };
2428
+ this.createSessionProfile = async (input) => {
2429
+ const sessionData = await storage.getStorageValue(storage.StorageKeys.Session);
2430
+ const session = sessionData ? utils.parseSession(sessionData) : null;
2431
+ const { organizationId, timestampMs, ...rest } = input;
2432
+ return this.command("/public/v1/submit/create_session_profile", {
2433
+ parameters: rest,
2434
+ organizationId: organizationId ??
2435
+ session?.organizationId ??
2436
+ this.config.organizationId,
2437
+ timestampMs: timestampMs ?? String(Date.now()),
2438
+ type: "ACTIVITY_TYPE_CREATE_SESSION_PROFILE",
2439
+ }, "createSessionProfileResult");
2440
+ };
2441
+ this.stampCreateSessionProfile = async (input) => {
2442
+ if (!this.stamper) {
2443
+ return undefined;
2444
+ }
2445
+ const sessionData = await storage.getStorageValue(storage.StorageKeys.Session);
2446
+ const session = sessionData ? utils.parseSession(sessionData) : null;
2447
+ const { organizationId, timestampMs, ...parameters } = input;
2448
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_session_profile";
2449
+ const bodyWithType = {
2450
+ parameters,
2451
+ organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
2452
+ timestampMs: timestampMs ?? String(Date.now()),
2453
+ type: "ACTIVITY_TYPE_CREATE_SESSION_PROFILE",
2454
+ };
2455
+ const stringifiedBody = JSON.stringify(bodyWithType);
2456
+ const stamp = await this.stamper.stamp(stringifiedBody);
2457
+ return {
2458
+ body: stringifiedBody,
2459
+ stamp: stamp,
2460
+ url: fullUrl,
2461
+ };
2462
+ };
1893
2463
  this.createSmartContractInterface = async (input) => {
1894
2464
  const sessionData = await storage.getStorageValue(storage.StorageKeys.Session);
1895
2465
  const session = sessionData ? utils.parseSession(sessionData) : null;
@@ -2383,6 +2953,41 @@ class TurnkeySDKClientBase {
2383
2953
  url: fullUrl,
2384
2954
  };
2385
2955
  };
2956
+ this.deleteMfaPolicy = async (input) => {
2957
+ const sessionData = await storage.getStorageValue(storage.StorageKeys.Session);
2958
+ const session = sessionData ? utils.parseSession(sessionData) : null;
2959
+ const { organizationId, timestampMs, ...rest } = input;
2960
+ return this.command("/public/v1/submit/delete_mfa_policy", {
2961
+ parameters: rest,
2962
+ organizationId: organizationId ??
2963
+ session?.organizationId ??
2964
+ this.config.organizationId,
2965
+ timestampMs: timestampMs ?? String(Date.now()),
2966
+ type: "ACTIVITY_TYPE_DELETE_MFA_POLICY",
2967
+ }, "deleteMfaPolicyResult");
2968
+ };
2969
+ this.stampDeleteMfaPolicy = async (input) => {
2970
+ if (!this.stamper) {
2971
+ return undefined;
2972
+ }
2973
+ const sessionData = await storage.getStorageValue(storage.StorageKeys.Session);
2974
+ const session = sessionData ? utils.parseSession(sessionData) : null;
2975
+ const { organizationId, timestampMs, ...parameters } = input;
2976
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/delete_mfa_policy";
2977
+ const bodyWithType = {
2978
+ parameters,
2979
+ organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
2980
+ timestampMs: timestampMs ?? String(Date.now()),
2981
+ type: "ACTIVITY_TYPE_DELETE_MFA_POLICY",
2982
+ };
2983
+ const stringifiedBody = JSON.stringify(bodyWithType);
2984
+ const stamp = await this.stamper.stamp(stringifiedBody);
2985
+ return {
2986
+ body: stringifiedBody,
2987
+ stamp: stamp,
2988
+ url: fullUrl,
2989
+ };
2990
+ };
2386
2991
  this.deleteOauth2Credential = async (input) => {
2387
2992
  const sessionData = await storage.getStorageValue(storage.StorageKeys.Session);
2388
2993
  const session = sessionData ? utils.parseSession(sessionData) : null;
@@ -2910,6 +3515,146 @@ class TurnkeySDKClientBase {
2910
3515
  url: fullUrl,
2911
3516
  };
2912
3517
  };
3518
+ this.earnDeployWrapper = async (input) => {
3519
+ const sessionData = await storage.getStorageValue(storage.StorageKeys.Session);
3520
+ const session = sessionData ? utils.parseSession(sessionData) : null;
3521
+ const { organizationId, timestampMs, ...rest } = input;
3522
+ return this.command("/public/v1/submit/earn_deploy_wrapper", {
3523
+ parameters: rest,
3524
+ organizationId: organizationId ??
3525
+ session?.organizationId ??
3526
+ this.config.organizationId,
3527
+ timestampMs: timestampMs ?? String(Date.now()),
3528
+ type: "ACTIVITY_TYPE_EARN_DEPLOY_WRAPPER",
3529
+ }, "earnDeployWrapperResult");
3530
+ };
3531
+ this.stampEarnDeployWrapper = async (input) => {
3532
+ if (!this.stamper) {
3533
+ return undefined;
3534
+ }
3535
+ const sessionData = await storage.getStorageValue(storage.StorageKeys.Session);
3536
+ const session = sessionData ? utils.parseSession(sessionData) : null;
3537
+ const { organizationId, timestampMs, ...parameters } = input;
3538
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/earn_deploy_wrapper";
3539
+ const bodyWithType = {
3540
+ parameters,
3541
+ organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
3542
+ timestampMs: timestampMs ?? String(Date.now()),
3543
+ type: "ACTIVITY_TYPE_EARN_DEPLOY_WRAPPER",
3544
+ };
3545
+ const stringifiedBody = JSON.stringify(bodyWithType);
3546
+ const stamp = await this.stamper.stamp(stringifiedBody);
3547
+ return {
3548
+ body: stringifiedBody,
3549
+ stamp: stamp,
3550
+ url: fullUrl,
3551
+ };
3552
+ };
3553
+ this.earnDeposit = async (input) => {
3554
+ const sessionData = await storage.getStorageValue(storage.StorageKeys.Session);
3555
+ const session = sessionData ? utils.parseSession(sessionData) : null;
3556
+ const { organizationId, timestampMs, ...rest } = input;
3557
+ return this.command("/public/v1/submit/earn_deposit", {
3558
+ parameters: rest,
3559
+ organizationId: organizationId ??
3560
+ session?.organizationId ??
3561
+ this.config.organizationId,
3562
+ timestampMs: timestampMs ?? String(Date.now()),
3563
+ type: "ACTIVITY_TYPE_EARN_DEPOSIT",
3564
+ }, "earnDepositResult");
3565
+ };
3566
+ this.stampEarnDeposit = async (input) => {
3567
+ if (!this.stamper) {
3568
+ return undefined;
3569
+ }
3570
+ const sessionData = await storage.getStorageValue(storage.StorageKeys.Session);
3571
+ const session = sessionData ? utils.parseSession(sessionData) : null;
3572
+ const { organizationId, timestampMs, ...parameters } = input;
3573
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/earn_deposit";
3574
+ const bodyWithType = {
3575
+ parameters,
3576
+ organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
3577
+ timestampMs: timestampMs ?? String(Date.now()),
3578
+ type: "ACTIVITY_TYPE_EARN_DEPOSIT",
3579
+ };
3580
+ const stringifiedBody = JSON.stringify(bodyWithType);
3581
+ const stamp = await this.stamper.stamp(stringifiedBody);
3582
+ return {
3583
+ body: stringifiedBody,
3584
+ stamp: stamp,
3585
+ url: fullUrl,
3586
+ };
3587
+ };
3588
+ this.earnSetWrapperState = async (input) => {
3589
+ const sessionData = await storage.getStorageValue(storage.StorageKeys.Session);
3590
+ const session = sessionData ? utils.parseSession(sessionData) : null;
3591
+ const { organizationId, timestampMs, ...rest } = input;
3592
+ return this.command("/public/v1/submit/earn_set_wrapper_state", {
3593
+ parameters: rest,
3594
+ organizationId: organizationId ??
3595
+ session?.organizationId ??
3596
+ this.config.organizationId,
3597
+ timestampMs: timestampMs ?? String(Date.now()),
3598
+ type: "ACTIVITY_TYPE_EARN_SET_WRAPPER_STATE",
3599
+ }, "earnSetWrapperStateResult");
3600
+ };
3601
+ this.stampEarnSetWrapperState = async (input) => {
3602
+ if (!this.stamper) {
3603
+ return undefined;
3604
+ }
3605
+ const sessionData = await storage.getStorageValue(storage.StorageKeys.Session);
3606
+ const session = sessionData ? utils.parseSession(sessionData) : null;
3607
+ const { organizationId, timestampMs, ...parameters } = input;
3608
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/earn_set_wrapper_state";
3609
+ const bodyWithType = {
3610
+ parameters,
3611
+ organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
3612
+ timestampMs: timestampMs ?? String(Date.now()),
3613
+ type: "ACTIVITY_TYPE_EARN_SET_WRAPPER_STATE",
3614
+ };
3615
+ const stringifiedBody = JSON.stringify(bodyWithType);
3616
+ const stamp = await this.stamper.stamp(stringifiedBody);
3617
+ return {
3618
+ body: stringifiedBody,
3619
+ stamp: stamp,
3620
+ url: fullUrl,
3621
+ };
3622
+ };
3623
+ this.earnWithdraw = async (input) => {
3624
+ const sessionData = await storage.getStorageValue(storage.StorageKeys.Session);
3625
+ const session = sessionData ? utils.parseSession(sessionData) : null;
3626
+ const { organizationId, timestampMs, ...rest } = input;
3627
+ return this.command("/public/v1/submit/earn_withdraw", {
3628
+ parameters: rest,
3629
+ organizationId: organizationId ??
3630
+ session?.organizationId ??
3631
+ this.config.organizationId,
3632
+ timestampMs: timestampMs ?? String(Date.now()),
3633
+ type: "ACTIVITY_TYPE_EARN_WITHDRAW",
3634
+ }, "earnWithdrawResult");
3635
+ };
3636
+ this.stampEarnWithdraw = async (input) => {
3637
+ if (!this.stamper) {
3638
+ return undefined;
3639
+ }
3640
+ const sessionData = await storage.getStorageValue(storage.StorageKeys.Session);
3641
+ const session = sessionData ? utils.parseSession(sessionData) : null;
3642
+ const { organizationId, timestampMs, ...parameters } = input;
3643
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/earn_withdraw";
3644
+ const bodyWithType = {
3645
+ parameters,
3646
+ organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
3647
+ timestampMs: timestampMs ?? String(Date.now()),
3648
+ type: "ACTIVITY_TYPE_EARN_WITHDRAW",
3649
+ };
3650
+ const stringifiedBody = JSON.stringify(bodyWithType);
3651
+ const stamp = await this.stamper.stamp(stringifiedBody);
3652
+ return {
3653
+ body: stringifiedBody,
3654
+ stamp: stamp,
3655
+ url: fullUrl,
3656
+ };
3657
+ };
2913
3658
  this.emailAuth = async (input) => {
2914
3659
  const sessionData = await storage.getStorageValue(storage.StorageKeys.Session);
2915
3660
  const session = sessionData ? utils.parseSession(sessionData) : null;
@@ -2955,8 +3700,8 @@ class TurnkeySDKClientBase {
2955
3700
  session?.organizationId ??
2956
3701
  this.config.organizationId,
2957
3702
  timestampMs: timestampMs ?? String(Date.now()),
2958
- type: "ACTIVITY_TYPE_ETH_SEND_TRANSACTION",
2959
- }, "ethSendTransactionResult");
3703
+ type: "ACTIVITY_TYPE_ETH_SEND_TRANSACTION_V2",
3704
+ }, "ethSendTransactionResultV2");
2960
3705
  };
2961
3706
  this.stampEthSendTransaction = async (input) => {
2962
3707
  if (!this.stamper) {
@@ -2970,7 +3715,7 @@ class TurnkeySDKClientBase {
2970
3715
  parameters,
2971
3716
  organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
2972
3717
  timestampMs: timestampMs ?? String(Date.now()),
2973
- type: "ACTIVITY_TYPE_ETH_SEND_TRANSACTION",
3718
+ type: "ACTIVITY_TYPE_ETH_SEND_TRANSACTION_V2",
2974
3719
  };
2975
3720
  const stringifiedBody = JSON.stringify(bodyWithType);
2976
3721
  const stamp = await this.stamper.stamp(stringifiedBody);
@@ -3933,8 +4678,8 @@ class TurnkeySDKClientBase {
3933
4678
  session?.organizationId ??
3934
4679
  this.config.organizationId,
3935
4680
  timestampMs: timestampMs ?? String(Date.now()),
3936
- type: "ACTIVITY_TYPE_SOL_SEND_TRANSACTION",
3937
- }, "solSendTransactionResult");
4681
+ type: "ACTIVITY_TYPE_SOL_SEND_TRANSACTION_V2",
4682
+ }, "solSendTransactionResultV2");
3938
4683
  };
3939
4684
  this.stampSolSendTransaction = async (input) => {
3940
4685
  if (!this.stamper) {
@@ -3948,7 +4693,7 @@ class TurnkeySDKClientBase {
3948
4693
  parameters,
3949
4694
  organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
3950
4695
  timestampMs: timestampMs ?? String(Date.now()),
3951
- type: "ACTIVITY_TYPE_SOL_SEND_TRANSACTION",
4696
+ type: "ACTIVITY_TYPE_SOL_SEND_TRANSACTION_V2",
3952
4697
  };
3953
4698
  const stringifiedBody = JSON.stringify(bodyWithType);
3954
4699
  const stamp = await this.stamper.stamp(stringifiedBody);
@@ -4170,6 +4915,41 @@ class TurnkeySDKClientBase {
4170
4915
  url: fullUrl,
4171
4916
  };
4172
4917
  };
4918
+ this.updateMfaPolicy = async (input) => {
4919
+ const sessionData = await storage.getStorageValue(storage.StorageKeys.Session);
4920
+ const session = sessionData ? utils.parseSession(sessionData) : null;
4921
+ const { organizationId, timestampMs, ...rest } = input;
4922
+ return this.command("/public/v1/submit/update_mfa_policy", {
4923
+ parameters: rest,
4924
+ organizationId: organizationId ??
4925
+ session?.organizationId ??
4926
+ this.config.organizationId,
4927
+ timestampMs: timestampMs ?? String(Date.now()),
4928
+ type: "ACTIVITY_TYPE_UPDATE_MFA_POLICY",
4929
+ }, "updateMfaPolicyResult");
4930
+ };
4931
+ this.stampUpdateMfaPolicy = async (input) => {
4932
+ if (!this.stamper) {
4933
+ return undefined;
4934
+ }
4935
+ const sessionData = await storage.getStorageValue(storage.StorageKeys.Session);
4936
+ const session = sessionData ? utils.parseSession(sessionData) : null;
4937
+ const { organizationId, timestampMs, ...parameters } = input;
4938
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/update_mfa_policy";
4939
+ const bodyWithType = {
4940
+ parameters,
4941
+ organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
4942
+ timestampMs: timestampMs ?? String(Date.now()),
4943
+ type: "ACTIVITY_TYPE_UPDATE_MFA_POLICY",
4944
+ };
4945
+ const stringifiedBody = JSON.stringify(bodyWithType);
4946
+ const stamp = await this.stamper.stamp(stringifiedBody);
4947
+ return {
4948
+ body: stringifiedBody,
4949
+ stamp: stamp,
4950
+ url: fullUrl,
4951
+ };
4952
+ };
4173
4953
  this.updateOauth2Credential = async (input) => {
4174
4954
  const sessionData = await storage.getStorageValue(storage.StorageKeys.Session);
4175
4955
  const session = sessionData ? utils.parseSession(sessionData) : null;