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