@turnkey/core 2.2.0 → 2.4.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 -6
- package/dist/__clients__/core.d.ts.map +1 -1
- package/dist/__clients__/core.js +46 -64
- package/dist/__clients__/core.js.map +1 -1
- package/dist/__clients__/core.mjs +46 -64
- package/dist/__clients__/core.mjs.map +1 -1
- package/dist/__generated__/sdk-client-base.d.ts +62 -9
- package/dist/__generated__/sdk-client-base.d.ts.map +1 -1
- package/dist/__generated__/sdk-client-base.js +947 -84
- package/dist/__generated__/sdk-client-base.js.map +1 -1
- package/dist/__generated__/sdk-client-base.mjs +947 -84
- 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 +11 -22
- 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 +8 -8
|
@@ -217,6 +217,96 @@ class TurnkeySDKClientBase {
|
|
|
217
217
|
url: fullUrl,
|
|
218
218
|
};
|
|
219
219
|
};
|
|
220
|
+
this.getEarnDeployStatus = async (input, stampWith) => {
|
|
221
|
+
const session = await this.storageManager?.getActiveSession();
|
|
222
|
+
return this.request("/public/v1/query/get_earn_deploy_status", {
|
|
223
|
+
...input,
|
|
224
|
+
organizationId: input.organizationId ??
|
|
225
|
+
session?.organizationId ??
|
|
226
|
+
this.config.organizationId,
|
|
227
|
+
}, stampWith);
|
|
228
|
+
};
|
|
229
|
+
this.stampGetEarnDeployStatus = 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_earn_deploy_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.getEarnDepositStatus = async (input, stampWith) => {
|
|
251
|
+
const session = await this.storageManager?.getActiveSession();
|
|
252
|
+
return this.request("/public/v1/query/get_earn_deposit_status", {
|
|
253
|
+
...input,
|
|
254
|
+
organizationId: input.organizationId ??
|
|
255
|
+
session?.organizationId ??
|
|
256
|
+
this.config.organizationId,
|
|
257
|
+
}, stampWith);
|
|
258
|
+
};
|
|
259
|
+
this.stampGetEarnDepositStatus = 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_deposit_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.getEarnWithdrawStatus = async (input, stampWith) => {
|
|
281
|
+
const session = await this.storageManager?.getActiveSession();
|
|
282
|
+
return this.request("/public/v1/query/get_earn_withdraw_status", {
|
|
283
|
+
...input,
|
|
284
|
+
organizationId: input.organizationId ??
|
|
285
|
+
session?.organizationId ??
|
|
286
|
+
this.config.organizationId,
|
|
287
|
+
}, stampWith);
|
|
288
|
+
};
|
|
289
|
+
this.stampGetEarnWithdrawStatus = 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_withdraw_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
|
+
};
|
|
220
310
|
this.getGasUsage = async (input, stampWith) => {
|
|
221
311
|
const session = await this.storageManager?.getActiveSession();
|
|
222
312
|
return this.request("/public/v1/query/get_gas_usage", {
|
|
@@ -307,6 +397,96 @@ class TurnkeySDKClientBase {
|
|
|
307
397
|
url: fullUrl,
|
|
308
398
|
};
|
|
309
399
|
};
|
|
400
|
+
this.getMfaPolicies = async (input, stampWith) => {
|
|
401
|
+
const session = await this.storageManager?.getActiveSession();
|
|
402
|
+
return this.request("/public/v1/query/get_mfa_policies", {
|
|
403
|
+
...input,
|
|
404
|
+
organizationId: input.organizationId ??
|
|
405
|
+
session?.organizationId ??
|
|
406
|
+
this.config.organizationId,
|
|
407
|
+
}, stampWith);
|
|
408
|
+
};
|
|
409
|
+
this.stampGetMfaPolicies = async (input, stampWith) => {
|
|
410
|
+
const activeStamper = this.getStamper(stampWith);
|
|
411
|
+
if (!activeStamper) {
|
|
412
|
+
return undefined;
|
|
413
|
+
}
|
|
414
|
+
const session = await this.storageManager?.getActiveSession();
|
|
415
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_mfa_policies";
|
|
416
|
+
const body = {
|
|
417
|
+
...input,
|
|
418
|
+
organizationId: input.organizationId ??
|
|
419
|
+
session?.organizationId ??
|
|
420
|
+
this.config.organizationId,
|
|
421
|
+
};
|
|
422
|
+
const stringifiedBody = JSON.stringify(body);
|
|
423
|
+
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
424
|
+
return {
|
|
425
|
+
body: stringifiedBody,
|
|
426
|
+
stamp: stamp,
|
|
427
|
+
url: fullUrl,
|
|
428
|
+
};
|
|
429
|
+
};
|
|
430
|
+
this.getMfaPolicy = async (input, stampWith) => {
|
|
431
|
+
const session = await this.storageManager?.getActiveSession();
|
|
432
|
+
return this.request("/public/v1/query/get_mfa_policy", {
|
|
433
|
+
...input,
|
|
434
|
+
organizationId: input.organizationId ??
|
|
435
|
+
session?.organizationId ??
|
|
436
|
+
this.config.organizationId,
|
|
437
|
+
}, stampWith);
|
|
438
|
+
};
|
|
439
|
+
this.stampGetMfaPolicy = async (input, stampWith) => {
|
|
440
|
+
const activeStamper = this.getStamper(stampWith);
|
|
441
|
+
if (!activeStamper) {
|
|
442
|
+
return undefined;
|
|
443
|
+
}
|
|
444
|
+
const session = await this.storageManager?.getActiveSession();
|
|
445
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_mfa_policy";
|
|
446
|
+
const body = {
|
|
447
|
+
...input,
|
|
448
|
+
organizationId: input.organizationId ??
|
|
449
|
+
session?.organizationId ??
|
|
450
|
+
this.config.organizationId,
|
|
451
|
+
};
|
|
452
|
+
const stringifiedBody = JSON.stringify(body);
|
|
453
|
+
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
454
|
+
return {
|
|
455
|
+
body: stringifiedBody,
|
|
456
|
+
stamp: stamp,
|
|
457
|
+
url: fullUrl,
|
|
458
|
+
};
|
|
459
|
+
};
|
|
460
|
+
this.getMfaStatus = async (input, stampWith) => {
|
|
461
|
+
const session = await this.storageManager?.getActiveSession();
|
|
462
|
+
return this.request("/public/v1/query/get_mfa_status", {
|
|
463
|
+
...input,
|
|
464
|
+
organizationId: input.organizationId ??
|
|
465
|
+
session?.organizationId ??
|
|
466
|
+
this.config.organizationId,
|
|
467
|
+
}, stampWith);
|
|
468
|
+
};
|
|
469
|
+
this.stampGetMfaStatus = async (input, stampWith) => {
|
|
470
|
+
const activeStamper = this.getStamper(stampWith);
|
|
471
|
+
if (!activeStamper) {
|
|
472
|
+
return undefined;
|
|
473
|
+
}
|
|
474
|
+
const session = await this.storageManager?.getActiveSession();
|
|
475
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_mfa_status";
|
|
476
|
+
const body = {
|
|
477
|
+
...input,
|
|
478
|
+
organizationId: input.organizationId ??
|
|
479
|
+
session?.organizationId ??
|
|
480
|
+
this.config.organizationId,
|
|
481
|
+
};
|
|
482
|
+
const stringifiedBody = JSON.stringify(body);
|
|
483
|
+
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
484
|
+
return {
|
|
485
|
+
body: stringifiedBody,
|
|
486
|
+
stamp: stamp,
|
|
487
|
+
url: fullUrl,
|
|
488
|
+
};
|
|
489
|
+
};
|
|
310
490
|
this.getNonces = async (input, stampWith) => {
|
|
311
491
|
const session = await this.storageManager?.getActiveSession();
|
|
312
492
|
return this.request("/public/v1/query/get_nonces", {
|
|
@@ -577,6 +757,66 @@ class TurnkeySDKClientBase {
|
|
|
577
757
|
url: fullUrl,
|
|
578
758
|
};
|
|
579
759
|
};
|
|
760
|
+
this.getSessionProfile = async (input, stampWith) => {
|
|
761
|
+
const session = await this.storageManager?.getActiveSession();
|
|
762
|
+
return this.request("/public/v1/query/get_session_profile", {
|
|
763
|
+
...input,
|
|
764
|
+
organizationId: input.organizationId ??
|
|
765
|
+
session?.organizationId ??
|
|
766
|
+
this.config.organizationId,
|
|
767
|
+
}, stampWith);
|
|
768
|
+
};
|
|
769
|
+
this.stampGetSessionProfile = async (input, stampWith) => {
|
|
770
|
+
const activeStamper = this.getStamper(stampWith);
|
|
771
|
+
if (!activeStamper) {
|
|
772
|
+
return undefined;
|
|
773
|
+
}
|
|
774
|
+
const session = await this.storageManager?.getActiveSession();
|
|
775
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_session_profile";
|
|
776
|
+
const body = {
|
|
777
|
+
...input,
|
|
778
|
+
organizationId: input.organizationId ??
|
|
779
|
+
session?.organizationId ??
|
|
780
|
+
this.config.organizationId,
|
|
781
|
+
};
|
|
782
|
+
const stringifiedBody = JSON.stringify(body);
|
|
783
|
+
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
784
|
+
return {
|
|
785
|
+
body: stringifiedBody,
|
|
786
|
+
stamp: stamp,
|
|
787
|
+
url: fullUrl,
|
|
788
|
+
};
|
|
789
|
+
};
|
|
790
|
+
this.getSessionProfiles = async (input, stampWith) => {
|
|
791
|
+
const session = await this.storageManager?.getActiveSession();
|
|
792
|
+
return this.request("/public/v1/query/get_session_profiles", {
|
|
793
|
+
...input,
|
|
794
|
+
organizationId: input.organizationId ??
|
|
795
|
+
session?.organizationId ??
|
|
796
|
+
this.config.organizationId,
|
|
797
|
+
}, stampWith);
|
|
798
|
+
};
|
|
799
|
+
this.stampGetSessionProfiles = async (input, stampWith) => {
|
|
800
|
+
const activeStamper = this.getStamper(stampWith);
|
|
801
|
+
if (!activeStamper) {
|
|
802
|
+
return undefined;
|
|
803
|
+
}
|
|
804
|
+
const session = await this.storageManager?.getActiveSession();
|
|
805
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_session_profiles";
|
|
806
|
+
const body = {
|
|
807
|
+
...input,
|
|
808
|
+
organizationId: input.organizationId ??
|
|
809
|
+
session?.organizationId ??
|
|
810
|
+
this.config.organizationId,
|
|
811
|
+
};
|
|
812
|
+
const stringifiedBody = JSON.stringify(body);
|
|
813
|
+
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
814
|
+
return {
|
|
815
|
+
body: stringifiedBody,
|
|
816
|
+
stamp: stamp,
|
|
817
|
+
url: fullUrl,
|
|
818
|
+
};
|
|
819
|
+
};
|
|
580
820
|
this.getSmartContractInterface = async (input, stampWith) => {
|
|
581
821
|
const session = await this.storageManager?.getActiveSession();
|
|
582
822
|
return this.request("/public/v1/query/get_smart_contract_interface", {
|
|
@@ -667,6 +907,36 @@ class TurnkeySDKClientBase {
|
|
|
667
907
|
url: fullUrl,
|
|
668
908
|
};
|
|
669
909
|
};
|
|
910
|
+
this.getTvcDeploymentDebugLogs = async (input, stampWith) => {
|
|
911
|
+
const session = await this.storageManager?.getActiveSession();
|
|
912
|
+
return this.request("/public/v1/query/get_tvc_deployment_debug_logs", {
|
|
913
|
+
...input,
|
|
914
|
+
organizationId: input.organizationId ??
|
|
915
|
+
session?.organizationId ??
|
|
916
|
+
this.config.organizationId,
|
|
917
|
+
}, stampWith);
|
|
918
|
+
};
|
|
919
|
+
this.stampGetTvcDeploymentDebugLogs = async (input, stampWith) => {
|
|
920
|
+
const activeStamper = this.getStamper(stampWith);
|
|
921
|
+
if (!activeStamper) {
|
|
922
|
+
return undefined;
|
|
923
|
+
}
|
|
924
|
+
const session = await this.storageManager?.getActiveSession();
|
|
925
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_tvc_deployment_debug_logs";
|
|
926
|
+
const body = {
|
|
927
|
+
...input,
|
|
928
|
+
organizationId: input.organizationId ??
|
|
929
|
+
session?.organizationId ??
|
|
930
|
+
this.config.organizationId,
|
|
931
|
+
};
|
|
932
|
+
const stringifiedBody = JSON.stringify(body);
|
|
933
|
+
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
934
|
+
return {
|
|
935
|
+
body: stringifiedBody,
|
|
936
|
+
stamp: stamp,
|
|
937
|
+
url: fullUrl,
|
|
938
|
+
};
|
|
939
|
+
};
|
|
670
940
|
this.getUser = async (input, stampWith) => {
|
|
671
941
|
const session = await this.storageManager?.getActiveSession();
|
|
672
942
|
return this.request("/public/v1/query/get_user", {
|
|
@@ -847,6 +1117,156 @@ class TurnkeySDKClientBase {
|
|
|
847
1117
|
url: fullUrl,
|
|
848
1118
|
};
|
|
849
1119
|
};
|
|
1120
|
+
this.listEarnEnabledVaults = async (input, stampWith) => {
|
|
1121
|
+
const session = await this.storageManager?.getActiveSession();
|
|
1122
|
+
return this.request("/public/v1/query/list_earn_enabled_vaults", {
|
|
1123
|
+
...input,
|
|
1124
|
+
organizationId: input.organizationId ??
|
|
1125
|
+
session?.organizationId ??
|
|
1126
|
+
this.config.organizationId,
|
|
1127
|
+
}, stampWith);
|
|
1128
|
+
};
|
|
1129
|
+
this.stampListEarnEnabledVaults = async (input, stampWith) => {
|
|
1130
|
+
const activeStamper = this.getStamper(stampWith);
|
|
1131
|
+
if (!activeStamper) {
|
|
1132
|
+
return undefined;
|
|
1133
|
+
}
|
|
1134
|
+
const session = await this.storageManager?.getActiveSession();
|
|
1135
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/query/list_earn_enabled_vaults";
|
|
1136
|
+
const body = {
|
|
1137
|
+
...input,
|
|
1138
|
+
organizationId: input.organizationId ??
|
|
1139
|
+
session?.organizationId ??
|
|
1140
|
+
this.config.organizationId,
|
|
1141
|
+
};
|
|
1142
|
+
const stringifiedBody = JSON.stringify(body);
|
|
1143
|
+
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
1144
|
+
return {
|
|
1145
|
+
body: stringifiedBody,
|
|
1146
|
+
stamp: stamp,
|
|
1147
|
+
url: fullUrl,
|
|
1148
|
+
};
|
|
1149
|
+
};
|
|
1150
|
+
this.listEarnPositions = async (input, stampWith) => {
|
|
1151
|
+
const session = await this.storageManager?.getActiveSession();
|
|
1152
|
+
return this.request("/public/v1/query/list_earn_positions", {
|
|
1153
|
+
...input,
|
|
1154
|
+
organizationId: input.organizationId ??
|
|
1155
|
+
session?.organizationId ??
|
|
1156
|
+
this.config.organizationId,
|
|
1157
|
+
}, stampWith);
|
|
1158
|
+
};
|
|
1159
|
+
this.stampListEarnPositions = async (input, stampWith) => {
|
|
1160
|
+
const activeStamper = this.getStamper(stampWith);
|
|
1161
|
+
if (!activeStamper) {
|
|
1162
|
+
return undefined;
|
|
1163
|
+
}
|
|
1164
|
+
const session = await this.storageManager?.getActiveSession();
|
|
1165
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/query/list_earn_positions";
|
|
1166
|
+
const body = {
|
|
1167
|
+
...input,
|
|
1168
|
+
organizationId: input.organizationId ??
|
|
1169
|
+
session?.organizationId ??
|
|
1170
|
+
this.config.organizationId,
|
|
1171
|
+
};
|
|
1172
|
+
const stringifiedBody = JSON.stringify(body);
|
|
1173
|
+
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
1174
|
+
return {
|
|
1175
|
+
body: stringifiedBody,
|
|
1176
|
+
stamp: stamp,
|
|
1177
|
+
url: fullUrl,
|
|
1178
|
+
};
|
|
1179
|
+
};
|
|
1180
|
+
this.listEarnVaults = async (input, stampWith) => {
|
|
1181
|
+
const session = await this.storageManager?.getActiveSession();
|
|
1182
|
+
return this.request("/public/v1/query/list_earn_vaults", {
|
|
1183
|
+
...input,
|
|
1184
|
+
organizationId: input.organizationId ??
|
|
1185
|
+
session?.organizationId ??
|
|
1186
|
+
this.config.organizationId,
|
|
1187
|
+
}, stampWith);
|
|
1188
|
+
};
|
|
1189
|
+
this.stampListEarnVaults = 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_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.listEmailEvents = async (input, stampWith) => {
|
|
1211
|
+
const session = await this.storageManager?.getActiveSession();
|
|
1212
|
+
return this.request("/public/v1/query/list_email_events", {
|
|
1213
|
+
...input,
|
|
1214
|
+
organizationId: input.organizationId ??
|
|
1215
|
+
session?.organizationId ??
|
|
1216
|
+
this.config.organizationId,
|
|
1217
|
+
}, stampWith);
|
|
1218
|
+
};
|
|
1219
|
+
this.stampListEmailEvents = 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_email_events";
|
|
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.listEthTransactionHistory = async (input, stampWith) => {
|
|
1241
|
+
const session = await this.storageManager?.getActiveSession();
|
|
1242
|
+
return this.request("/public/v1/query/list_eth_transaction_history", {
|
|
1243
|
+
...input,
|
|
1244
|
+
organizationId: input.organizationId ??
|
|
1245
|
+
session?.organizationId ??
|
|
1246
|
+
this.config.organizationId,
|
|
1247
|
+
}, stampWith);
|
|
1248
|
+
};
|
|
1249
|
+
this.stampListEthTransactionHistory = 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_eth_transaction_history";
|
|
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
|
+
};
|
|
850
1270
|
this.listFiatOnRampCredentials = async (input, stampWith) => {
|
|
851
1271
|
const session = await this.storageManager?.getActiveSession();
|
|
852
1272
|
return this.request("/public/v1/query/list_fiat_on_ramp_credentials", {
|
|
@@ -1028,6 +1448,36 @@ class TurnkeySDKClientBase {
|
|
|
1028
1448
|
url: fullUrl,
|
|
1029
1449
|
};
|
|
1030
1450
|
};
|
|
1451
|
+
this.listSolTransactionHistory = async (input, stampWith) => {
|
|
1452
|
+
const session = await this.storageManager?.getActiveSession();
|
|
1453
|
+
return this.request("/public/v1/query/list_sol_transaction_history", {
|
|
1454
|
+
...input,
|
|
1455
|
+
organizationId: input.organizationId ??
|
|
1456
|
+
session?.organizationId ??
|
|
1457
|
+
this.config.organizationId,
|
|
1458
|
+
}, stampWith);
|
|
1459
|
+
};
|
|
1460
|
+
this.stampListSolTransactionHistory = async (input, stampWith) => {
|
|
1461
|
+
const activeStamper = this.getStamper(stampWith);
|
|
1462
|
+
if (!activeStamper) {
|
|
1463
|
+
return undefined;
|
|
1464
|
+
}
|
|
1465
|
+
const session = await this.storageManager?.getActiveSession();
|
|
1466
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/query/list_sol_transaction_history";
|
|
1467
|
+
const body = {
|
|
1468
|
+
...input,
|
|
1469
|
+
organizationId: input.organizationId ??
|
|
1470
|
+
session?.organizationId ??
|
|
1471
|
+
this.config.organizationId,
|
|
1472
|
+
};
|
|
1473
|
+
const stringifiedBody = JSON.stringify(body);
|
|
1474
|
+
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
1475
|
+
return {
|
|
1476
|
+
body: stringifiedBody,
|
|
1477
|
+
stamp: stamp,
|
|
1478
|
+
url: fullUrl,
|
|
1479
|
+
};
|
|
1480
|
+
};
|
|
1031
1481
|
this.getSubOrgIds = async (input = {}, stampWith) => {
|
|
1032
1482
|
const session = await this.storageManager?.getActiveSession();
|
|
1033
1483
|
return this.request("/public/v1/query/list_suborgs", {
|
|
@@ -1424,6 +1874,43 @@ class TurnkeySDKClientBase {
|
|
|
1424
1874
|
url: fullUrl,
|
|
1425
1875
|
};
|
|
1426
1876
|
};
|
|
1877
|
+
this.claimEarnFees = async (input, stampWith) => {
|
|
1878
|
+
const { organizationId, timestampMs, ...rest } = input;
|
|
1879
|
+
//@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
|
|
1880
|
+
const generateAppProofs = input?.generateAppProofs ?? false;
|
|
1881
|
+
const session = await this.storageManager?.getActiveSession();
|
|
1882
|
+
return this.activity("/public/v1/submit/claim_earn_fees", {
|
|
1883
|
+
parameters: rest,
|
|
1884
|
+
organizationId: organizationId ??
|
|
1885
|
+
session?.organizationId ??
|
|
1886
|
+
this.config.organizationId,
|
|
1887
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
1888
|
+
generateAppProofs: generateAppProofs ?? false,
|
|
1889
|
+
type: "ACTIVITY_TYPE_CLAIM_EARN_FEES",
|
|
1890
|
+
}, "claimEarnFeesResult", stampWith);
|
|
1891
|
+
};
|
|
1892
|
+
this.stampClaimEarnFees = async (input, stampWith) => {
|
|
1893
|
+
const activeStamper = this.getStamper(stampWith);
|
|
1894
|
+
if (!activeStamper) {
|
|
1895
|
+
return undefined;
|
|
1896
|
+
}
|
|
1897
|
+
const { organizationId, timestampMs, ...parameters } = input;
|
|
1898
|
+
const session = await this.storageManager?.getActiveSession();
|
|
1899
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/claim_earn_fees";
|
|
1900
|
+
const bodyWithType = {
|
|
1901
|
+
parameters,
|
|
1902
|
+
organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
|
|
1903
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
1904
|
+
type: "ACTIVITY_TYPE_CLAIM_EARN_FEES",
|
|
1905
|
+
};
|
|
1906
|
+
const stringifiedBody = JSON.stringify(bodyWithType);
|
|
1907
|
+
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
1908
|
+
return {
|
|
1909
|
+
body: stringifiedBody,
|
|
1910
|
+
stamp: stamp,
|
|
1911
|
+
url: fullUrl,
|
|
1912
|
+
};
|
|
1913
|
+
};
|
|
1427
1914
|
this.createApiKeys = async (input, stampWith) => {
|
|
1428
1915
|
const { organizationId, timestampMs, ...rest } = input;
|
|
1429
1916
|
//@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
|
|
@@ -1573,6 +2060,43 @@ class TurnkeySDKClientBase {
|
|
|
1573
2060
|
url: fullUrl,
|
|
1574
2061
|
};
|
|
1575
2062
|
};
|
|
2063
|
+
this.createMfaPolicy = async (input, stampWith) => {
|
|
2064
|
+
const { organizationId, timestampMs, ...rest } = input;
|
|
2065
|
+
//@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
|
|
2066
|
+
const generateAppProofs = input?.generateAppProofs ?? false;
|
|
2067
|
+
const session = await this.storageManager?.getActiveSession();
|
|
2068
|
+
return this.activity("/public/v1/submit/create_mfa_policy", {
|
|
2069
|
+
parameters: rest,
|
|
2070
|
+
organizationId: organizationId ??
|
|
2071
|
+
session?.organizationId ??
|
|
2072
|
+
this.config.organizationId,
|
|
2073
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
2074
|
+
generateAppProofs: generateAppProofs ?? false,
|
|
2075
|
+
type: "ACTIVITY_TYPE_CREATE_MFA_POLICY",
|
|
2076
|
+
}, "createMfaPolicyResult", stampWith);
|
|
2077
|
+
};
|
|
2078
|
+
this.stampCreateMfaPolicy = async (input, stampWith) => {
|
|
2079
|
+
const activeStamper = this.getStamper(stampWith);
|
|
2080
|
+
if (!activeStamper) {
|
|
2081
|
+
return undefined;
|
|
2082
|
+
}
|
|
2083
|
+
const { organizationId, timestampMs, ...parameters } = input;
|
|
2084
|
+
const session = await this.storageManager?.getActiveSession();
|
|
2085
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_mfa_policy";
|
|
2086
|
+
const bodyWithType = {
|
|
2087
|
+
parameters,
|
|
2088
|
+
organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
|
|
2089
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
2090
|
+
type: "ACTIVITY_TYPE_CREATE_MFA_POLICY",
|
|
2091
|
+
};
|
|
2092
|
+
const stringifiedBody = JSON.stringify(bodyWithType);
|
|
2093
|
+
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
2094
|
+
return {
|
|
2095
|
+
body: stringifiedBody,
|
|
2096
|
+
stamp: stamp,
|
|
2097
|
+
url: fullUrl,
|
|
2098
|
+
};
|
|
2099
|
+
};
|
|
1576
2100
|
this.createOauth2Credential = async (input, stampWith) => {
|
|
1577
2101
|
const { organizationId, timestampMs, ...rest } = input;
|
|
1578
2102
|
//@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
|
|
@@ -1869,6 +2393,43 @@ class TurnkeySDKClientBase {
|
|
|
1869
2393
|
url: fullUrl,
|
|
1870
2394
|
};
|
|
1871
2395
|
};
|
|
2396
|
+
this.createSessionProfile = async (input, stampWith) => {
|
|
2397
|
+
const { organizationId, timestampMs, ...rest } = input;
|
|
2398
|
+
//@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
|
|
2399
|
+
const generateAppProofs = input?.generateAppProofs ?? false;
|
|
2400
|
+
const session = await this.storageManager?.getActiveSession();
|
|
2401
|
+
return this.activity("/public/v1/submit/create_session_profile", {
|
|
2402
|
+
parameters: rest,
|
|
2403
|
+
organizationId: organizationId ??
|
|
2404
|
+
session?.organizationId ??
|
|
2405
|
+
this.config.organizationId,
|
|
2406
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
2407
|
+
generateAppProofs: generateAppProofs ?? false,
|
|
2408
|
+
type: "ACTIVITY_TYPE_CREATE_SESSION_PROFILE",
|
|
2409
|
+
}, "createSessionProfileResult", stampWith);
|
|
2410
|
+
};
|
|
2411
|
+
this.stampCreateSessionProfile = async (input, stampWith) => {
|
|
2412
|
+
const activeStamper = this.getStamper(stampWith);
|
|
2413
|
+
if (!activeStamper) {
|
|
2414
|
+
return undefined;
|
|
2415
|
+
}
|
|
2416
|
+
const { organizationId, timestampMs, ...parameters } = input;
|
|
2417
|
+
const session = await this.storageManager?.getActiveSession();
|
|
2418
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_session_profile";
|
|
2419
|
+
const bodyWithType = {
|
|
2420
|
+
parameters,
|
|
2421
|
+
organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
|
|
2422
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
2423
|
+
type: "ACTIVITY_TYPE_CREATE_SESSION_PROFILE",
|
|
2424
|
+
};
|
|
2425
|
+
const stringifiedBody = JSON.stringify(bodyWithType);
|
|
2426
|
+
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
2427
|
+
return {
|
|
2428
|
+
body: stringifiedBody,
|
|
2429
|
+
stamp: stamp,
|
|
2430
|
+
url: fullUrl,
|
|
2431
|
+
};
|
|
2432
|
+
};
|
|
1872
2433
|
this.createSmartContractInterface = async (input, stampWith) => {
|
|
1873
2434
|
const { organizationId, timestampMs, ...rest } = input;
|
|
1874
2435
|
//@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
|
|
@@ -2390,6 +2951,43 @@ class TurnkeySDKClientBase {
|
|
|
2390
2951
|
url: fullUrl,
|
|
2391
2952
|
};
|
|
2392
2953
|
};
|
|
2954
|
+
this.deleteMfaPolicy = async (input, stampWith) => {
|
|
2955
|
+
const { organizationId, timestampMs, ...rest } = input;
|
|
2956
|
+
//@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
|
|
2957
|
+
const generateAppProofs = input?.generateAppProofs ?? false;
|
|
2958
|
+
const session = await this.storageManager?.getActiveSession();
|
|
2959
|
+
return this.activity("/public/v1/submit/delete_mfa_policy", {
|
|
2960
|
+
parameters: rest,
|
|
2961
|
+
organizationId: organizationId ??
|
|
2962
|
+
session?.organizationId ??
|
|
2963
|
+
this.config.organizationId,
|
|
2964
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
2965
|
+
generateAppProofs: generateAppProofs ?? false,
|
|
2966
|
+
type: "ACTIVITY_TYPE_DELETE_MFA_POLICY",
|
|
2967
|
+
}, "deleteMfaPolicyResult", stampWith);
|
|
2968
|
+
};
|
|
2969
|
+
this.stampDeleteMfaPolicy = async (input, stampWith) => {
|
|
2970
|
+
const activeStamper = this.getStamper(stampWith);
|
|
2971
|
+
if (!activeStamper) {
|
|
2972
|
+
return undefined;
|
|
2973
|
+
}
|
|
2974
|
+
const { organizationId, timestampMs, ...parameters } = input;
|
|
2975
|
+
const session = await this.storageManager?.getActiveSession();
|
|
2976
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/delete_mfa_policy";
|
|
2977
|
+
const bodyWithType = {
|
|
2978
|
+
parameters,
|
|
2979
|
+
organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
|
|
2980
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
2981
|
+
type: "ACTIVITY_TYPE_DELETE_MFA_POLICY",
|
|
2982
|
+
};
|
|
2983
|
+
const stringifiedBody = JSON.stringify(bodyWithType);
|
|
2984
|
+
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
2985
|
+
return {
|
|
2986
|
+
body: stringifiedBody,
|
|
2987
|
+
stamp: stamp,
|
|
2988
|
+
url: fullUrl,
|
|
2989
|
+
};
|
|
2990
|
+
};
|
|
2393
2991
|
this.deleteOauth2Credential = async (input, stampWith) => {
|
|
2394
2992
|
const { organizationId, timestampMs, ...rest } = input;
|
|
2395
2993
|
//@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
|
|
@@ -2814,19 +3412,130 @@ class TurnkeySDKClientBase {
|
|
|
2814
3412
|
type: "ACTIVITY_TYPE_DELETE_USERS",
|
|
2815
3413
|
}, "deleteUsersResult", stampWith);
|
|
2816
3414
|
};
|
|
2817
|
-
this.stampDeleteUsers = async (input, stampWith) => {
|
|
3415
|
+
this.stampDeleteUsers = async (input, stampWith) => {
|
|
3416
|
+
const activeStamper = this.getStamper(stampWith);
|
|
3417
|
+
if (!activeStamper) {
|
|
3418
|
+
return undefined;
|
|
3419
|
+
}
|
|
3420
|
+
const { organizationId, timestampMs, ...parameters } = input;
|
|
3421
|
+
const session = await this.storageManager?.getActiveSession();
|
|
3422
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/delete_users";
|
|
3423
|
+
const bodyWithType = {
|
|
3424
|
+
parameters,
|
|
3425
|
+
organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
|
|
3426
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
3427
|
+
type: "ACTIVITY_TYPE_DELETE_USERS",
|
|
3428
|
+
};
|
|
3429
|
+
const stringifiedBody = JSON.stringify(bodyWithType);
|
|
3430
|
+
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
3431
|
+
return {
|
|
3432
|
+
body: stringifiedBody,
|
|
3433
|
+
stamp: stamp,
|
|
3434
|
+
url: fullUrl,
|
|
3435
|
+
};
|
|
3436
|
+
};
|
|
3437
|
+
this.deleteWalletAccounts = async (input, stampWith) => {
|
|
3438
|
+
const { organizationId, timestampMs, ...rest } = input;
|
|
3439
|
+
//@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
|
|
3440
|
+
const generateAppProofs = input?.generateAppProofs ?? false;
|
|
3441
|
+
const session = await this.storageManager?.getActiveSession();
|
|
3442
|
+
return this.activity("/public/v1/submit/delete_wallet_accounts", {
|
|
3443
|
+
parameters: rest,
|
|
3444
|
+
organizationId: organizationId ??
|
|
3445
|
+
session?.organizationId ??
|
|
3446
|
+
this.config.organizationId,
|
|
3447
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
3448
|
+
generateAppProofs: generateAppProofs ?? false,
|
|
3449
|
+
type: "ACTIVITY_TYPE_DELETE_WALLET_ACCOUNTS",
|
|
3450
|
+
}, "deleteWalletAccountsResult", stampWith);
|
|
3451
|
+
};
|
|
3452
|
+
this.stampDeleteWalletAccounts = async (input, stampWith) => {
|
|
3453
|
+
const activeStamper = this.getStamper(stampWith);
|
|
3454
|
+
if (!activeStamper) {
|
|
3455
|
+
return undefined;
|
|
3456
|
+
}
|
|
3457
|
+
const { organizationId, timestampMs, ...parameters } = input;
|
|
3458
|
+
const session = await this.storageManager?.getActiveSession();
|
|
3459
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/delete_wallet_accounts";
|
|
3460
|
+
const bodyWithType = {
|
|
3461
|
+
parameters,
|
|
3462
|
+
organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
|
|
3463
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
3464
|
+
type: "ACTIVITY_TYPE_DELETE_WALLET_ACCOUNTS",
|
|
3465
|
+
};
|
|
3466
|
+
const stringifiedBody = JSON.stringify(bodyWithType);
|
|
3467
|
+
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
3468
|
+
return {
|
|
3469
|
+
body: stringifiedBody,
|
|
3470
|
+
stamp: stamp,
|
|
3471
|
+
url: fullUrl,
|
|
3472
|
+
};
|
|
3473
|
+
};
|
|
3474
|
+
this.deleteWallets = async (input, stampWith) => {
|
|
3475
|
+
const { organizationId, timestampMs, ...rest } = input;
|
|
3476
|
+
//@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
|
|
3477
|
+
const generateAppProofs = input?.generateAppProofs ?? false;
|
|
3478
|
+
const session = await this.storageManager?.getActiveSession();
|
|
3479
|
+
return this.activity("/public/v1/submit/delete_wallets", {
|
|
3480
|
+
parameters: rest,
|
|
3481
|
+
organizationId: organizationId ??
|
|
3482
|
+
session?.organizationId ??
|
|
3483
|
+
this.config.organizationId,
|
|
3484
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
3485
|
+
generateAppProofs: generateAppProofs ?? false,
|
|
3486
|
+
type: "ACTIVITY_TYPE_DELETE_WALLETS",
|
|
3487
|
+
}, "deleteWalletsResult", stampWith);
|
|
3488
|
+
};
|
|
3489
|
+
this.stampDeleteWallets = async (input, stampWith) => {
|
|
3490
|
+
const activeStamper = this.getStamper(stampWith);
|
|
3491
|
+
if (!activeStamper) {
|
|
3492
|
+
return undefined;
|
|
3493
|
+
}
|
|
3494
|
+
const { organizationId, timestampMs, ...parameters } = input;
|
|
3495
|
+
const session = await this.storageManager?.getActiveSession();
|
|
3496
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/delete_wallets";
|
|
3497
|
+
const bodyWithType = {
|
|
3498
|
+
parameters,
|
|
3499
|
+
organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
|
|
3500
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
3501
|
+
type: "ACTIVITY_TYPE_DELETE_WALLETS",
|
|
3502
|
+
};
|
|
3503
|
+
const stringifiedBody = JSON.stringify(bodyWithType);
|
|
3504
|
+
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
3505
|
+
return {
|
|
3506
|
+
body: stringifiedBody,
|
|
3507
|
+
stamp: stamp,
|
|
3508
|
+
url: fullUrl,
|
|
3509
|
+
};
|
|
3510
|
+
};
|
|
3511
|
+
this.deleteWebhookEndpoint = async (input, stampWith) => {
|
|
3512
|
+
const { organizationId, timestampMs, ...rest } = input;
|
|
3513
|
+
//@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
|
|
3514
|
+
const generateAppProofs = input?.generateAppProofs ?? false;
|
|
3515
|
+
const session = await this.storageManager?.getActiveSession();
|
|
3516
|
+
return this.activity("/public/v1/submit/delete_webhook_endpoint", {
|
|
3517
|
+
parameters: rest,
|
|
3518
|
+
organizationId: organizationId ??
|
|
3519
|
+
session?.organizationId ??
|
|
3520
|
+
this.config.organizationId,
|
|
3521
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
3522
|
+
generateAppProofs: generateAppProofs ?? false,
|
|
3523
|
+
type: "ACTIVITY_TYPE_DELETE_WEBHOOK_ENDPOINT",
|
|
3524
|
+
}, "deleteWebhookEndpointResult", stampWith);
|
|
3525
|
+
};
|
|
3526
|
+
this.stampDeleteWebhookEndpoint = async (input, stampWith) => {
|
|
2818
3527
|
const activeStamper = this.getStamper(stampWith);
|
|
2819
3528
|
if (!activeStamper) {
|
|
2820
3529
|
return undefined;
|
|
2821
3530
|
}
|
|
2822
3531
|
const { organizationId, timestampMs, ...parameters } = input;
|
|
2823
3532
|
const session = await this.storageManager?.getActiveSession();
|
|
2824
|
-
const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/
|
|
3533
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/delete_webhook_endpoint";
|
|
2825
3534
|
const bodyWithType = {
|
|
2826
3535
|
parameters,
|
|
2827
3536
|
organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
|
|
2828
3537
|
timestampMs: timestampMs ?? String(Date.now()),
|
|
2829
|
-
type: "
|
|
3538
|
+
type: "ACTIVITY_TYPE_DELETE_WEBHOOK_ENDPOINT",
|
|
2830
3539
|
};
|
|
2831
3540
|
const stringifiedBody = JSON.stringify(bodyWithType);
|
|
2832
3541
|
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
@@ -2836,34 +3545,34 @@ class TurnkeySDKClientBase {
|
|
|
2836
3545
|
url: fullUrl,
|
|
2837
3546
|
};
|
|
2838
3547
|
};
|
|
2839
|
-
this.
|
|
3548
|
+
this.earnDeployWrapper = async (input, stampWith) => {
|
|
2840
3549
|
const { organizationId, timestampMs, ...rest } = input;
|
|
2841
3550
|
//@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
|
|
2842
3551
|
const generateAppProofs = input?.generateAppProofs ?? false;
|
|
2843
3552
|
const session = await this.storageManager?.getActiveSession();
|
|
2844
|
-
return this.activity("/public/v1/submit/
|
|
3553
|
+
return this.activity("/public/v1/submit/earn_deploy_wrapper", {
|
|
2845
3554
|
parameters: rest,
|
|
2846
3555
|
organizationId: organizationId ??
|
|
2847
3556
|
session?.organizationId ??
|
|
2848
3557
|
this.config.organizationId,
|
|
2849
3558
|
timestampMs: timestampMs ?? String(Date.now()),
|
|
2850
3559
|
generateAppProofs: generateAppProofs ?? false,
|
|
2851
|
-
type: "
|
|
2852
|
-
}, "
|
|
3560
|
+
type: "ACTIVITY_TYPE_EARN_DEPLOY_WRAPPER",
|
|
3561
|
+
}, "earnDeployWrapperResult", stampWith);
|
|
2853
3562
|
};
|
|
2854
|
-
this.
|
|
3563
|
+
this.stampEarnDeployWrapper = async (input, stampWith) => {
|
|
2855
3564
|
const activeStamper = this.getStamper(stampWith);
|
|
2856
3565
|
if (!activeStamper) {
|
|
2857
3566
|
return undefined;
|
|
2858
3567
|
}
|
|
2859
3568
|
const { organizationId, timestampMs, ...parameters } = input;
|
|
2860
3569
|
const session = await this.storageManager?.getActiveSession();
|
|
2861
|
-
const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/
|
|
3570
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/earn_deploy_wrapper";
|
|
2862
3571
|
const bodyWithType = {
|
|
2863
3572
|
parameters,
|
|
2864
3573
|
organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
|
|
2865
3574
|
timestampMs: timestampMs ?? String(Date.now()),
|
|
2866
|
-
type: "
|
|
3575
|
+
type: "ACTIVITY_TYPE_EARN_DEPLOY_WRAPPER",
|
|
2867
3576
|
};
|
|
2868
3577
|
const stringifiedBody = JSON.stringify(bodyWithType);
|
|
2869
3578
|
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
@@ -2873,34 +3582,34 @@ class TurnkeySDKClientBase {
|
|
|
2873
3582
|
url: fullUrl,
|
|
2874
3583
|
};
|
|
2875
3584
|
};
|
|
2876
|
-
this.
|
|
3585
|
+
this.earnDeposit = async (input, stampWith) => {
|
|
2877
3586
|
const { organizationId, timestampMs, ...rest } = input;
|
|
2878
3587
|
//@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
|
|
2879
3588
|
const generateAppProofs = input?.generateAppProofs ?? false;
|
|
2880
3589
|
const session = await this.storageManager?.getActiveSession();
|
|
2881
|
-
return this.activity("/public/v1/submit/
|
|
3590
|
+
return this.activity("/public/v1/submit/earn_deposit", {
|
|
2882
3591
|
parameters: rest,
|
|
2883
3592
|
organizationId: organizationId ??
|
|
2884
3593
|
session?.organizationId ??
|
|
2885
3594
|
this.config.organizationId,
|
|
2886
3595
|
timestampMs: timestampMs ?? String(Date.now()),
|
|
2887
3596
|
generateAppProofs: generateAppProofs ?? false,
|
|
2888
|
-
type: "
|
|
2889
|
-
}, "
|
|
3597
|
+
type: "ACTIVITY_TYPE_EARN_DEPOSIT",
|
|
3598
|
+
}, "earnDepositResult", stampWith);
|
|
2890
3599
|
};
|
|
2891
|
-
this.
|
|
3600
|
+
this.stampEarnDeposit = async (input, stampWith) => {
|
|
2892
3601
|
const activeStamper = this.getStamper(stampWith);
|
|
2893
3602
|
if (!activeStamper) {
|
|
2894
3603
|
return undefined;
|
|
2895
3604
|
}
|
|
2896
3605
|
const { organizationId, timestampMs, ...parameters } = input;
|
|
2897
3606
|
const session = await this.storageManager?.getActiveSession();
|
|
2898
|
-
const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/
|
|
3607
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/earn_deposit";
|
|
2899
3608
|
const bodyWithType = {
|
|
2900
3609
|
parameters,
|
|
2901
3610
|
organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
|
|
2902
3611
|
timestampMs: timestampMs ?? String(Date.now()),
|
|
2903
|
-
type: "
|
|
3612
|
+
type: "ACTIVITY_TYPE_EARN_DEPOSIT",
|
|
2904
3613
|
};
|
|
2905
3614
|
const stringifiedBody = JSON.stringify(bodyWithType);
|
|
2906
3615
|
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
@@ -2910,34 +3619,34 @@ class TurnkeySDKClientBase {
|
|
|
2910
3619
|
url: fullUrl,
|
|
2911
3620
|
};
|
|
2912
3621
|
};
|
|
2913
|
-
this.
|
|
3622
|
+
this.earnSetWrapperState = async (input, stampWith) => {
|
|
2914
3623
|
const { organizationId, timestampMs, ...rest } = input;
|
|
2915
3624
|
//@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
|
|
2916
3625
|
const generateAppProofs = input?.generateAppProofs ?? false;
|
|
2917
3626
|
const session = await this.storageManager?.getActiveSession();
|
|
2918
|
-
return this.activity("/public/v1/submit/
|
|
3627
|
+
return this.activity("/public/v1/submit/earn_set_wrapper_state", {
|
|
2919
3628
|
parameters: rest,
|
|
2920
3629
|
organizationId: organizationId ??
|
|
2921
3630
|
session?.organizationId ??
|
|
2922
3631
|
this.config.organizationId,
|
|
2923
3632
|
timestampMs: timestampMs ?? String(Date.now()),
|
|
2924
3633
|
generateAppProofs: generateAppProofs ?? false,
|
|
2925
|
-
type: "
|
|
2926
|
-
}, "
|
|
3634
|
+
type: "ACTIVITY_TYPE_EARN_SET_WRAPPER_STATE",
|
|
3635
|
+
}, "earnSetWrapperStateResult", stampWith);
|
|
2927
3636
|
};
|
|
2928
|
-
this.
|
|
3637
|
+
this.stampEarnSetWrapperState = async (input, stampWith) => {
|
|
2929
3638
|
const activeStamper = this.getStamper(stampWith);
|
|
2930
3639
|
if (!activeStamper) {
|
|
2931
3640
|
return undefined;
|
|
2932
3641
|
}
|
|
2933
3642
|
const { organizationId, timestampMs, ...parameters } = input;
|
|
2934
3643
|
const session = await this.storageManager?.getActiveSession();
|
|
2935
|
-
const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/
|
|
3644
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/earn_set_wrapper_state";
|
|
2936
3645
|
const bodyWithType = {
|
|
2937
3646
|
parameters,
|
|
2938
3647
|
organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
|
|
2939
3648
|
timestampMs: timestampMs ?? String(Date.now()),
|
|
2940
|
-
type: "
|
|
3649
|
+
type: "ACTIVITY_TYPE_EARN_SET_WRAPPER_STATE",
|
|
2941
3650
|
};
|
|
2942
3651
|
const stringifiedBody = JSON.stringify(bodyWithType);
|
|
2943
3652
|
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
@@ -2947,34 +3656,34 @@ class TurnkeySDKClientBase {
|
|
|
2947
3656
|
url: fullUrl,
|
|
2948
3657
|
};
|
|
2949
3658
|
};
|
|
2950
|
-
this.
|
|
3659
|
+
this.earnWithdraw = async (input, stampWith) => {
|
|
2951
3660
|
const { organizationId, timestampMs, ...rest } = input;
|
|
2952
3661
|
//@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
|
|
2953
3662
|
const generateAppProofs = input?.generateAppProofs ?? false;
|
|
2954
3663
|
const session = await this.storageManager?.getActiveSession();
|
|
2955
|
-
return this.activity("/public/v1/submit/
|
|
3664
|
+
return this.activity("/public/v1/submit/earn_withdraw", {
|
|
2956
3665
|
parameters: rest,
|
|
2957
3666
|
organizationId: organizationId ??
|
|
2958
3667
|
session?.organizationId ??
|
|
2959
3668
|
this.config.organizationId,
|
|
2960
3669
|
timestampMs: timestampMs ?? String(Date.now()),
|
|
2961
3670
|
generateAppProofs: generateAppProofs ?? false,
|
|
2962
|
-
type: "
|
|
2963
|
-
}, "
|
|
3671
|
+
type: "ACTIVITY_TYPE_EARN_WITHDRAW",
|
|
3672
|
+
}, "earnWithdrawResult", stampWith);
|
|
2964
3673
|
};
|
|
2965
|
-
this.
|
|
3674
|
+
this.stampEarnWithdraw = async (input, stampWith) => {
|
|
2966
3675
|
const activeStamper = this.getStamper(stampWith);
|
|
2967
3676
|
if (!activeStamper) {
|
|
2968
3677
|
return undefined;
|
|
2969
3678
|
}
|
|
2970
3679
|
const { organizationId, timestampMs, ...parameters } = input;
|
|
2971
3680
|
const session = await this.storageManager?.getActiveSession();
|
|
2972
|
-
const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/
|
|
3681
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/earn_withdraw";
|
|
2973
3682
|
const bodyWithType = {
|
|
2974
3683
|
parameters,
|
|
2975
3684
|
organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
|
|
2976
3685
|
timestampMs: timestampMs ?? String(Date.now()),
|
|
2977
|
-
type: "
|
|
3686
|
+
type: "ACTIVITY_TYPE_EARN_WITHDRAW",
|
|
2978
3687
|
};
|
|
2979
3688
|
const stringifiedBody = JSON.stringify(bodyWithType);
|
|
2980
3689
|
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
@@ -2984,34 +3693,34 @@ class TurnkeySDKClientBase {
|
|
|
2984
3693
|
url: fullUrl,
|
|
2985
3694
|
};
|
|
2986
3695
|
};
|
|
2987
|
-
this.
|
|
3696
|
+
this.emailAuth = async (input, stampWith) => {
|
|
2988
3697
|
const { organizationId, timestampMs, ...rest } = input;
|
|
2989
3698
|
//@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
|
|
2990
3699
|
const generateAppProofs = input?.generateAppProofs ?? false;
|
|
2991
3700
|
const session = await this.storageManager?.getActiveSession();
|
|
2992
|
-
return this.activity("/public/v1/submit/
|
|
3701
|
+
return this.activity("/public/v1/submit/email_auth", {
|
|
2993
3702
|
parameters: rest,
|
|
2994
3703
|
organizationId: organizationId ??
|
|
2995
3704
|
session?.organizationId ??
|
|
2996
3705
|
this.config.organizationId,
|
|
2997
3706
|
timestampMs: timestampMs ?? String(Date.now()),
|
|
2998
3707
|
generateAppProofs: generateAppProofs ?? false,
|
|
2999
|
-
type: "
|
|
3000
|
-
}, "
|
|
3708
|
+
type: "ACTIVITY_TYPE_EMAIL_AUTH_V3",
|
|
3709
|
+
}, "emailAuthResult", stampWith);
|
|
3001
3710
|
};
|
|
3002
|
-
this.
|
|
3711
|
+
this.stampEmailAuth = async (input, stampWith) => {
|
|
3003
3712
|
const activeStamper = this.getStamper(stampWith);
|
|
3004
3713
|
if (!activeStamper) {
|
|
3005
3714
|
return undefined;
|
|
3006
3715
|
}
|
|
3007
3716
|
const { organizationId, timestampMs, ...parameters } = input;
|
|
3008
3717
|
const session = await this.storageManager?.getActiveSession();
|
|
3009
|
-
const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/
|
|
3718
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/email_auth";
|
|
3010
3719
|
const bodyWithType = {
|
|
3011
3720
|
parameters,
|
|
3012
3721
|
organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
|
|
3013
3722
|
timestampMs: timestampMs ?? String(Date.now()),
|
|
3014
|
-
type: "
|
|
3723
|
+
type: "ACTIVITY_TYPE_EMAIL_AUTH_V3",
|
|
3015
3724
|
};
|
|
3016
3725
|
const stringifiedBody = JSON.stringify(bodyWithType);
|
|
3017
3726
|
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
@@ -4019,43 +4728,6 @@ class TurnkeySDKClientBase {
|
|
|
4019
4728
|
url: fullUrl,
|
|
4020
4729
|
};
|
|
4021
4730
|
};
|
|
4022
|
-
this.solSendTransaction = async (input, stampWith) => {
|
|
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;
|
|
4026
|
-
const session = await this.storageManager?.getActiveSession();
|
|
4027
|
-
return this.activity("/public/v1/submit/sol_send_transaction", {
|
|
4028
|
-
parameters: rest,
|
|
4029
|
-
organizationId: organizationId ??
|
|
4030
|
-
session?.organizationId ??
|
|
4031
|
-
this.config.organizationId,
|
|
4032
|
-
timestampMs: timestampMs ?? String(Date.now()),
|
|
4033
|
-
generateAppProofs: generateAppProofs ?? false,
|
|
4034
|
-
type: "ACTIVITY_TYPE_SOL_SEND_TRANSACTION",
|
|
4035
|
-
}, "solSendTransactionResult", stampWith);
|
|
4036
|
-
};
|
|
4037
|
-
this.stampSolSendTransaction = async (input, stampWith) => {
|
|
4038
|
-
const activeStamper = this.getStamper(stampWith);
|
|
4039
|
-
if (!activeStamper) {
|
|
4040
|
-
return undefined;
|
|
4041
|
-
}
|
|
4042
|
-
const { organizationId, timestampMs, ...parameters } = input;
|
|
4043
|
-
const session = await this.storageManager?.getActiveSession();
|
|
4044
|
-
const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/sol_send_transaction";
|
|
4045
|
-
const bodyWithType = {
|
|
4046
|
-
parameters,
|
|
4047
|
-
organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
|
|
4048
|
-
timestampMs: timestampMs ?? String(Date.now()),
|
|
4049
|
-
type: "ACTIVITY_TYPE_SOL_SEND_TRANSACTION",
|
|
4050
|
-
};
|
|
4051
|
-
const stringifiedBody = JSON.stringify(bodyWithType);
|
|
4052
|
-
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
4053
|
-
return {
|
|
4054
|
-
body: stringifiedBody,
|
|
4055
|
-
stamp: stamp,
|
|
4056
|
-
url: fullUrl,
|
|
4057
|
-
};
|
|
4058
|
-
};
|
|
4059
4731
|
this.sparkClaimTransfer = async (input, stampWith) => {
|
|
4060
4732
|
const { organizationId, timestampMs, ...rest } = input;
|
|
4061
4733
|
//@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
|
|
@@ -4280,6 +4952,43 @@ class TurnkeySDKClientBase {
|
|
|
4280
4952
|
url: fullUrl,
|
|
4281
4953
|
};
|
|
4282
4954
|
};
|
|
4955
|
+
this.updateMfaPolicy = async (input, stampWith) => {
|
|
4956
|
+
const { organizationId, timestampMs, ...rest } = input;
|
|
4957
|
+
//@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
|
|
4958
|
+
const generateAppProofs = input?.generateAppProofs ?? false;
|
|
4959
|
+
const session = await this.storageManager?.getActiveSession();
|
|
4960
|
+
return this.activity("/public/v1/submit/update_mfa_policy", {
|
|
4961
|
+
parameters: rest,
|
|
4962
|
+
organizationId: organizationId ??
|
|
4963
|
+
session?.organizationId ??
|
|
4964
|
+
this.config.organizationId,
|
|
4965
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
4966
|
+
generateAppProofs: generateAppProofs ?? false,
|
|
4967
|
+
type: "ACTIVITY_TYPE_UPDATE_MFA_POLICY",
|
|
4968
|
+
}, "updateMfaPolicyResult", stampWith);
|
|
4969
|
+
};
|
|
4970
|
+
this.stampUpdateMfaPolicy = async (input, stampWith) => {
|
|
4971
|
+
const activeStamper = this.getStamper(stampWith);
|
|
4972
|
+
if (!activeStamper) {
|
|
4973
|
+
return undefined;
|
|
4974
|
+
}
|
|
4975
|
+
const { organizationId, timestampMs, ...parameters } = input;
|
|
4976
|
+
const session = await this.storageManager?.getActiveSession();
|
|
4977
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/update_mfa_policy";
|
|
4978
|
+
const bodyWithType = {
|
|
4979
|
+
parameters,
|
|
4980
|
+
organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
|
|
4981
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
4982
|
+
type: "ACTIVITY_TYPE_UPDATE_MFA_POLICY",
|
|
4983
|
+
};
|
|
4984
|
+
const stringifiedBody = JSON.stringify(bodyWithType);
|
|
4985
|
+
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
4986
|
+
return {
|
|
4987
|
+
body: stringifiedBody,
|
|
4988
|
+
stamp: stamp,
|
|
4989
|
+
url: fullUrl,
|
|
4990
|
+
};
|
|
4991
|
+
};
|
|
4283
4992
|
this.updateOauth2Credential = async (input, stampWith) => {
|
|
4284
4993
|
const { organizationId, timestampMs, ...rest } = input;
|
|
4285
4994
|
//@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
|
|
@@ -4761,6 +5470,154 @@ class TurnkeySDKClientBase {
|
|
|
4761
5470
|
url: fullUrl,
|
|
4762
5471
|
};
|
|
4763
5472
|
};
|
|
5473
|
+
this.ethSendTransaction = async (input, stampWith) => {
|
|
5474
|
+
const { organizationId, timestampMs, ...rest } = input;
|
|
5475
|
+
//@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
|
|
5476
|
+
const generateAppProofs = input?.generateAppProofs ?? false;
|
|
5477
|
+
const session = await this.storageManager?.getActiveSession();
|
|
5478
|
+
return this.activity("/public/v1/submit/eth_send_transaction", {
|
|
5479
|
+
parameters: rest,
|
|
5480
|
+
organizationId: organizationId ??
|
|
5481
|
+
session?.organizationId ??
|
|
5482
|
+
this.config.organizationId,
|
|
5483
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
5484
|
+
generateAppProofs: generateAppProofs ?? false,
|
|
5485
|
+
type: "ACTIVITY_TYPE_ETH_SEND_TRANSACTION",
|
|
5486
|
+
}, "ethSendTransactionResult", stampWith);
|
|
5487
|
+
};
|
|
5488
|
+
this.stampEthSendTransaction = async (input, stampWith) => {
|
|
5489
|
+
const activeStamper = this.getStamper(stampWith);
|
|
5490
|
+
if (!activeStamper) {
|
|
5491
|
+
return undefined;
|
|
5492
|
+
}
|
|
5493
|
+
const { organizationId, timestampMs, ...parameters } = input;
|
|
5494
|
+
const session = await this.storageManager?.getActiveSession();
|
|
5495
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/eth_send_transaction";
|
|
5496
|
+
const bodyWithType = {
|
|
5497
|
+
parameters,
|
|
5498
|
+
organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
|
|
5499
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
5500
|
+
type: "ACTIVITY_TYPE_ETH_SEND_TRANSACTION",
|
|
5501
|
+
};
|
|
5502
|
+
const stringifiedBody = JSON.stringify(bodyWithType);
|
|
5503
|
+
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
5504
|
+
return {
|
|
5505
|
+
body: stringifiedBody,
|
|
5506
|
+
stamp: stamp,
|
|
5507
|
+
url: fullUrl,
|
|
5508
|
+
};
|
|
5509
|
+
};
|
|
5510
|
+
this.ethSendTransactionV2 = async (input, stampWith) => {
|
|
5511
|
+
const { organizationId, timestampMs, ...rest } = input;
|
|
5512
|
+
//@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
|
|
5513
|
+
const generateAppProofs = input?.generateAppProofs ?? false;
|
|
5514
|
+
const session = await this.storageManager?.getActiveSession();
|
|
5515
|
+
return this.activity("/public/v1/submit/eth_send_transaction", {
|
|
5516
|
+
parameters: rest,
|
|
5517
|
+
organizationId: organizationId ??
|
|
5518
|
+
session?.organizationId ??
|
|
5519
|
+
this.config.organizationId,
|
|
5520
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
5521
|
+
generateAppProofs: generateAppProofs ?? false,
|
|
5522
|
+
type: "ACTIVITY_TYPE_ETH_SEND_TRANSACTION_V2",
|
|
5523
|
+
}, "ethSendTransactionResultV2", stampWith);
|
|
5524
|
+
};
|
|
5525
|
+
this.stampEthSendTransactionV2 = async (input, stampWith) => {
|
|
5526
|
+
const activeStamper = this.getStamper(stampWith);
|
|
5527
|
+
if (!activeStamper) {
|
|
5528
|
+
return undefined;
|
|
5529
|
+
}
|
|
5530
|
+
const { organizationId, timestampMs, ...parameters } = input;
|
|
5531
|
+
const session = await this.storageManager?.getActiveSession();
|
|
5532
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/eth_send_transaction";
|
|
5533
|
+
const bodyWithType = {
|
|
5534
|
+
parameters,
|
|
5535
|
+
organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
|
|
5536
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
5537
|
+
type: "ACTIVITY_TYPE_ETH_SEND_TRANSACTION_V2",
|
|
5538
|
+
};
|
|
5539
|
+
const stringifiedBody = JSON.stringify(bodyWithType);
|
|
5540
|
+
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
5541
|
+
return {
|
|
5542
|
+
body: stringifiedBody,
|
|
5543
|
+
stamp: stamp,
|
|
5544
|
+
url: fullUrl,
|
|
5545
|
+
};
|
|
5546
|
+
};
|
|
5547
|
+
this.solSendTransaction = async (input, stampWith) => {
|
|
5548
|
+
const { organizationId, timestampMs, ...rest } = input;
|
|
5549
|
+
//@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
|
|
5550
|
+
const generateAppProofs = input?.generateAppProofs ?? false;
|
|
5551
|
+
const session = await this.storageManager?.getActiveSession();
|
|
5552
|
+
return this.activity("/public/v1/submit/sol_send_transaction", {
|
|
5553
|
+
parameters: rest,
|
|
5554
|
+
organizationId: organizationId ??
|
|
5555
|
+
session?.organizationId ??
|
|
5556
|
+
this.config.organizationId,
|
|
5557
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
5558
|
+
generateAppProofs: generateAppProofs ?? false,
|
|
5559
|
+
type: "ACTIVITY_TYPE_SOL_SEND_TRANSACTION",
|
|
5560
|
+
}, "solSendTransactionResult", stampWith);
|
|
5561
|
+
};
|
|
5562
|
+
this.stampSolSendTransaction = async (input, stampWith) => {
|
|
5563
|
+
const activeStamper = this.getStamper(stampWith);
|
|
5564
|
+
if (!activeStamper) {
|
|
5565
|
+
return undefined;
|
|
5566
|
+
}
|
|
5567
|
+
const { organizationId, timestampMs, ...parameters } = input;
|
|
5568
|
+
const session = await this.storageManager?.getActiveSession();
|
|
5569
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/sol_send_transaction";
|
|
5570
|
+
const bodyWithType = {
|
|
5571
|
+
parameters,
|
|
5572
|
+
organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
|
|
5573
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
5574
|
+
type: "ACTIVITY_TYPE_SOL_SEND_TRANSACTION",
|
|
5575
|
+
};
|
|
5576
|
+
const stringifiedBody = JSON.stringify(bodyWithType);
|
|
5577
|
+
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
5578
|
+
return {
|
|
5579
|
+
body: stringifiedBody,
|
|
5580
|
+
stamp: stamp,
|
|
5581
|
+
url: fullUrl,
|
|
5582
|
+
};
|
|
5583
|
+
};
|
|
5584
|
+
this.solSendTransactionV2 = async (input, stampWith) => {
|
|
5585
|
+
const { organizationId, timestampMs, ...rest } = input;
|
|
5586
|
+
//@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
|
|
5587
|
+
const generateAppProofs = input?.generateAppProofs ?? false;
|
|
5588
|
+
const session = await this.storageManager?.getActiveSession();
|
|
5589
|
+
return this.activity("/public/v1/submit/sol_send_transaction", {
|
|
5590
|
+
parameters: rest,
|
|
5591
|
+
organizationId: organizationId ??
|
|
5592
|
+
session?.organizationId ??
|
|
5593
|
+
this.config.organizationId,
|
|
5594
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
5595
|
+
generateAppProofs: generateAppProofs ?? false,
|
|
5596
|
+
type: "ACTIVITY_TYPE_SOL_SEND_TRANSACTION_V2",
|
|
5597
|
+
}, "solSendTransactionResultV2", stampWith);
|
|
5598
|
+
};
|
|
5599
|
+
this.stampSolSendTransactionV2 = async (input, stampWith) => {
|
|
5600
|
+
const activeStamper = this.getStamper(stampWith);
|
|
5601
|
+
if (!activeStamper) {
|
|
5602
|
+
return undefined;
|
|
5603
|
+
}
|
|
5604
|
+
const { organizationId, timestampMs, ...parameters } = input;
|
|
5605
|
+
const session = await this.storageManager?.getActiveSession();
|
|
5606
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/sol_send_transaction";
|
|
5607
|
+
const bodyWithType = {
|
|
5608
|
+
parameters,
|
|
5609
|
+
organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
|
|
5610
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
5611
|
+
type: "ACTIVITY_TYPE_SOL_SEND_TRANSACTION_V2",
|
|
5612
|
+
};
|
|
5613
|
+
const stringifiedBody = JSON.stringify(bodyWithType);
|
|
5614
|
+
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
5615
|
+
return {
|
|
5616
|
+
body: stringifiedBody,
|
|
5617
|
+
stamp: stamp,
|
|
5618
|
+
url: fullUrl,
|
|
5619
|
+
};
|
|
5620
|
+
};
|
|
4764
5621
|
this.proxyGetAccount = async (input) => {
|
|
4765
5622
|
return this.authProxyRequest("/v1/account", input);
|
|
4766
5623
|
};
|
|
@@ -4770,11 +5627,11 @@ class TurnkeySDKClientBase {
|
|
|
4770
5627
|
this.proxyOAuthLogin = async (input) => {
|
|
4771
5628
|
return this.authProxyRequest("/v1/oauth_login", input);
|
|
4772
5629
|
};
|
|
4773
|
-
this.proxyInitOtp = async (input) => {
|
|
4774
|
-
return this.authProxyRequest("/v1/otp_init", input);
|
|
5630
|
+
this.proxyInitOtp = async (input, captchaToken) => {
|
|
5631
|
+
return this.authProxyRequest("/v1/otp_init", input, captchaToken);
|
|
4775
5632
|
};
|
|
4776
|
-
this.proxyInitOtpV2 = async (input) => {
|
|
4777
|
-
return this.authProxyRequest("/v1/otp_init_v2", input);
|
|
5633
|
+
this.proxyInitOtpV2 = async (input, captchaToken) => {
|
|
5634
|
+
return this.authProxyRequest("/v1/otp_init_v2", input, captchaToken);
|
|
4778
5635
|
};
|
|
4779
5636
|
this.proxyOtpLogin = async (input) => {
|
|
4780
5637
|
return this.authProxyRequest("/v1/otp_login", input);
|
|
@@ -4788,11 +5645,14 @@ class TurnkeySDKClientBase {
|
|
|
4788
5645
|
this.proxyVerifyOtpV2 = async (input) => {
|
|
4789
5646
|
return this.authProxyRequest("/v1/otp_verify_v2", input);
|
|
4790
5647
|
};
|
|
4791
|
-
this.proxySignup = async (input) => {
|
|
4792
|
-
return this.authProxyRequest("/v1/signup", input);
|
|
5648
|
+
this.proxySignup = async (input, captchaToken) => {
|
|
5649
|
+
return this.authProxyRequest("/v1/signup", input, captchaToken);
|
|
4793
5650
|
};
|
|
4794
|
-
this.proxySignupV2 = async (input) => {
|
|
4795
|
-
return this.authProxyRequest("/v1/signup_v2", input);
|
|
5651
|
+
this.proxySignupV2 = async (input, captchaToken) => {
|
|
5652
|
+
return this.authProxyRequest("/v1/signup_v2", input, captchaToken);
|
|
5653
|
+
};
|
|
5654
|
+
this.proxyGetWalletKitClientParams = async (input) => {
|
|
5655
|
+
return this.authProxyRequest("/v1/wallet_kit_client_params", input);
|
|
4796
5656
|
};
|
|
4797
5657
|
this.proxyGetWalletKitConfig = async (input) => {
|
|
4798
5658
|
return this.authProxyRequest("/v1/wallet_kit_config", input);
|
|
@@ -4940,7 +5800,7 @@ class TurnkeySDKClientBase {
|
|
|
4940
5800
|
...activityData,
|
|
4941
5801
|
};
|
|
4942
5802
|
}
|
|
4943
|
-
async authProxyRequest(url, body) {
|
|
5803
|
+
async authProxyRequest(url, body, captchaToken) {
|
|
4944
5804
|
if (!this.config.authProxyUrl || !this.config.authProxyConfigId) {
|
|
4945
5805
|
throw new sdkTypes.TurnkeyError("Auth Proxy URL or ID is not configured.", sdkTypes.TurnkeyErrorCodes.INVALID_CONFIGURATION);
|
|
4946
5806
|
}
|
|
@@ -4950,6 +5810,9 @@ class TurnkeySDKClientBase {
|
|
|
4950
5810
|
"Content-Type": "application/json",
|
|
4951
5811
|
"X-Auth-Proxy-Config-ID": this.config.authProxyConfigId,
|
|
4952
5812
|
};
|
|
5813
|
+
if (captchaToken) {
|
|
5814
|
+
headers["X-Captcha-Token"] = captchaToken;
|
|
5815
|
+
}
|
|
4953
5816
|
const response = await fetch(fullUrl, {
|
|
4954
5817
|
method: "POST",
|
|
4955
5818
|
headers: headers,
|