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