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