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