@turnkey/core 2.1.0 → 2.3.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.
@@ -305,6 +305,96 @@ class TurnkeySDKClientBase {
305
305
  url: fullUrl,
306
306
  };
307
307
  };
308
+ this.getMfaPolicies = async (input, stampWith) => {
309
+ const session = await this.storageManager?.getActiveSession();
310
+ return this.request("/public/v1/query/get_mfa_policies", {
311
+ ...input,
312
+ organizationId: input.organizationId ??
313
+ session?.organizationId ??
314
+ this.config.organizationId,
315
+ }, stampWith);
316
+ };
317
+ this.stampGetMfaPolicies = async (input, stampWith) => {
318
+ const activeStamper = this.getStamper(stampWith);
319
+ if (!activeStamper) {
320
+ return undefined;
321
+ }
322
+ const session = await this.storageManager?.getActiveSession();
323
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_mfa_policies";
324
+ const body = {
325
+ ...input,
326
+ organizationId: input.organizationId ??
327
+ session?.organizationId ??
328
+ this.config.organizationId,
329
+ };
330
+ const stringifiedBody = JSON.stringify(body);
331
+ const stamp = await activeStamper.stamp(stringifiedBody);
332
+ return {
333
+ body: stringifiedBody,
334
+ stamp: stamp,
335
+ url: fullUrl,
336
+ };
337
+ };
338
+ this.getMfaPolicy = async (input, stampWith) => {
339
+ const session = await this.storageManager?.getActiveSession();
340
+ return this.request("/public/v1/query/get_mfa_policy", {
341
+ ...input,
342
+ organizationId: input.organizationId ??
343
+ session?.organizationId ??
344
+ this.config.organizationId,
345
+ }, stampWith);
346
+ };
347
+ this.stampGetMfaPolicy = async (input, stampWith) => {
348
+ const activeStamper = this.getStamper(stampWith);
349
+ if (!activeStamper) {
350
+ return undefined;
351
+ }
352
+ const session = await this.storageManager?.getActiveSession();
353
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_mfa_policy";
354
+ const body = {
355
+ ...input,
356
+ organizationId: input.organizationId ??
357
+ session?.organizationId ??
358
+ this.config.organizationId,
359
+ };
360
+ const stringifiedBody = JSON.stringify(body);
361
+ const stamp = await activeStamper.stamp(stringifiedBody);
362
+ return {
363
+ body: stringifiedBody,
364
+ stamp: stamp,
365
+ url: fullUrl,
366
+ };
367
+ };
368
+ this.getMfaStatus = async (input, stampWith) => {
369
+ const session = await this.storageManager?.getActiveSession();
370
+ return this.request("/public/v1/query/get_mfa_status", {
371
+ ...input,
372
+ organizationId: input.organizationId ??
373
+ session?.organizationId ??
374
+ this.config.organizationId,
375
+ }, stampWith);
376
+ };
377
+ this.stampGetMfaStatus = async (input, stampWith) => {
378
+ const activeStamper = this.getStamper(stampWith);
379
+ if (!activeStamper) {
380
+ return undefined;
381
+ }
382
+ const session = await this.storageManager?.getActiveSession();
383
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_mfa_status";
384
+ const body = {
385
+ ...input,
386
+ organizationId: input.organizationId ??
387
+ session?.organizationId ??
388
+ this.config.organizationId,
389
+ };
390
+ const stringifiedBody = JSON.stringify(body);
391
+ const stamp = await activeStamper.stamp(stringifiedBody);
392
+ return {
393
+ body: stringifiedBody,
394
+ stamp: stamp,
395
+ url: fullUrl,
396
+ };
397
+ };
308
398
  this.getNonces = async (input, stampWith) => {
309
399
  const session = await this.storageManager?.getActiveSession();
310
400
  return this.request("/public/v1/query/get_nonces", {
@@ -575,6 +665,66 @@ class TurnkeySDKClientBase {
575
665
  url: fullUrl,
576
666
  };
577
667
  };
668
+ this.getSessionProfile = async (input, stampWith) => {
669
+ const session = await this.storageManager?.getActiveSession();
670
+ return this.request("/public/v1/query/get_session_profile", {
671
+ ...input,
672
+ organizationId: input.organizationId ??
673
+ session?.organizationId ??
674
+ this.config.organizationId,
675
+ }, stampWith);
676
+ };
677
+ this.stampGetSessionProfile = async (input, stampWith) => {
678
+ const activeStamper = this.getStamper(stampWith);
679
+ if (!activeStamper) {
680
+ return undefined;
681
+ }
682
+ const session = await this.storageManager?.getActiveSession();
683
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_session_profile";
684
+ const body = {
685
+ ...input,
686
+ organizationId: input.organizationId ??
687
+ session?.organizationId ??
688
+ this.config.organizationId,
689
+ };
690
+ const stringifiedBody = JSON.stringify(body);
691
+ const stamp = await activeStamper.stamp(stringifiedBody);
692
+ return {
693
+ body: stringifiedBody,
694
+ stamp: stamp,
695
+ url: fullUrl,
696
+ };
697
+ };
698
+ this.getSessionProfiles = async (input, stampWith) => {
699
+ const session = await this.storageManager?.getActiveSession();
700
+ return this.request("/public/v1/query/get_session_profiles", {
701
+ ...input,
702
+ organizationId: input.organizationId ??
703
+ session?.organizationId ??
704
+ this.config.organizationId,
705
+ }, stampWith);
706
+ };
707
+ this.stampGetSessionProfiles = async (input, stampWith) => {
708
+ const activeStamper = this.getStamper(stampWith);
709
+ if (!activeStamper) {
710
+ return undefined;
711
+ }
712
+ const session = await this.storageManager?.getActiveSession();
713
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_session_profiles";
714
+ const body = {
715
+ ...input,
716
+ organizationId: input.organizationId ??
717
+ session?.organizationId ??
718
+ this.config.organizationId,
719
+ };
720
+ const stringifiedBody = JSON.stringify(body);
721
+ const stamp = await activeStamper.stamp(stringifiedBody);
722
+ return {
723
+ body: stringifiedBody,
724
+ stamp: stamp,
725
+ url: fullUrl,
726
+ };
727
+ };
578
728
  this.getSmartContractInterface = async (input, stampWith) => {
579
729
  const session = await this.storageManager?.getActiveSession();
580
730
  return this.request("/public/v1/query/get_smart_contract_interface", {
@@ -665,6 +815,36 @@ class TurnkeySDKClientBase {
665
815
  url: fullUrl,
666
816
  };
667
817
  };
818
+ this.getTvcDeploymentDebugLogs = async (input, stampWith) => {
819
+ const session = await this.storageManager?.getActiveSession();
820
+ return this.request("/public/v1/query/get_tvc_deployment_debug_logs", {
821
+ ...input,
822
+ organizationId: input.organizationId ??
823
+ session?.organizationId ??
824
+ this.config.organizationId,
825
+ }, stampWith);
826
+ };
827
+ this.stampGetTvcDeploymentDebugLogs = async (input, stampWith) => {
828
+ const activeStamper = this.getStamper(stampWith);
829
+ if (!activeStamper) {
830
+ return undefined;
831
+ }
832
+ const session = await this.storageManager?.getActiveSession();
833
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_tvc_deployment_debug_logs";
834
+ const body = {
835
+ ...input,
836
+ organizationId: input.organizationId ??
837
+ session?.organizationId ??
838
+ this.config.organizationId,
839
+ };
840
+ const stringifiedBody = JSON.stringify(body);
841
+ const stamp = await activeStamper.stamp(stringifiedBody);
842
+ return {
843
+ body: stringifiedBody,
844
+ stamp: stamp,
845
+ url: fullUrl,
846
+ };
847
+ };
668
848
  this.getUser = async (input, stampWith) => {
669
849
  const session = await this.storageManager?.getActiveSession();
670
850
  return this.request("/public/v1/query/get_user", {
@@ -845,6 +1025,36 @@ class TurnkeySDKClientBase {
845
1025
  url: fullUrl,
846
1026
  };
847
1027
  };
1028
+ this.listEmailEvents = async (input, stampWith) => {
1029
+ const session = await this.storageManager?.getActiveSession();
1030
+ return this.request("/public/v1/query/list_email_events", {
1031
+ ...input,
1032
+ organizationId: input.organizationId ??
1033
+ session?.organizationId ??
1034
+ this.config.organizationId,
1035
+ }, stampWith);
1036
+ };
1037
+ this.stampListEmailEvents = async (input, stampWith) => {
1038
+ const activeStamper = this.getStamper(stampWith);
1039
+ if (!activeStamper) {
1040
+ return undefined;
1041
+ }
1042
+ const session = await this.storageManager?.getActiveSession();
1043
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/list_email_events";
1044
+ const body = {
1045
+ ...input,
1046
+ organizationId: input.organizationId ??
1047
+ session?.organizationId ??
1048
+ this.config.organizationId,
1049
+ };
1050
+ const stringifiedBody = JSON.stringify(body);
1051
+ const stamp = await activeStamper.stamp(stringifiedBody);
1052
+ return {
1053
+ body: stringifiedBody,
1054
+ stamp: stamp,
1055
+ url: fullUrl,
1056
+ };
1057
+ };
848
1058
  this.listFiatOnRampCredentials = async (input, stampWith) => {
849
1059
  const session = await this.storageManager?.getActiveSession();
850
1060
  return this.request("/public/v1/query/list_fiat_on_ramp_credentials", {
@@ -1571,6 +1781,43 @@ class TurnkeySDKClientBase {
1571
1781
  url: fullUrl,
1572
1782
  };
1573
1783
  };
1784
+ this.createMfaPolicy = async (input, stampWith) => {
1785
+ const { organizationId, timestampMs, ...rest } = input;
1786
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
1787
+ const generateAppProofs = input?.generateAppProofs ?? false;
1788
+ const session = await this.storageManager?.getActiveSession();
1789
+ return this.activity("/public/v1/submit/create_mfa_policy", {
1790
+ parameters: rest,
1791
+ organizationId: organizationId ??
1792
+ session?.organizationId ??
1793
+ this.config.organizationId,
1794
+ timestampMs: timestampMs ?? String(Date.now()),
1795
+ generateAppProofs: generateAppProofs ?? false,
1796
+ type: "ACTIVITY_TYPE_CREATE_MFA_POLICY",
1797
+ }, "createMfaPolicyResult", stampWith);
1798
+ };
1799
+ this.stampCreateMfaPolicy = async (input, stampWith) => {
1800
+ const activeStamper = this.getStamper(stampWith);
1801
+ if (!activeStamper) {
1802
+ return undefined;
1803
+ }
1804
+ const { organizationId, timestampMs, ...parameters } = input;
1805
+ const session = await this.storageManager?.getActiveSession();
1806
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_mfa_policy";
1807
+ const bodyWithType = {
1808
+ parameters,
1809
+ organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
1810
+ timestampMs: timestampMs ?? String(Date.now()),
1811
+ type: "ACTIVITY_TYPE_CREATE_MFA_POLICY",
1812
+ };
1813
+ const stringifiedBody = JSON.stringify(bodyWithType);
1814
+ const stamp = await activeStamper.stamp(stringifiedBody);
1815
+ return {
1816
+ body: stringifiedBody,
1817
+ stamp: stamp,
1818
+ url: fullUrl,
1819
+ };
1820
+ };
1574
1821
  this.createOauth2Credential = async (input, stampWith) => {
1575
1822
  const { organizationId, timestampMs, ...rest } = input;
1576
1823
  //@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 +2114,43 @@ class TurnkeySDKClientBase {
1867
2114
  url: fullUrl,
1868
2115
  };
1869
2116
  };
2117
+ this.createSessionProfile = async (input, stampWith) => {
2118
+ const { organizationId, timestampMs, ...rest } = input;
2119
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
2120
+ const generateAppProofs = input?.generateAppProofs ?? false;
2121
+ const session = await this.storageManager?.getActiveSession();
2122
+ return this.activity("/public/v1/submit/create_session_profile", {
2123
+ parameters: rest,
2124
+ organizationId: organizationId ??
2125
+ session?.organizationId ??
2126
+ this.config.organizationId,
2127
+ timestampMs: timestampMs ?? String(Date.now()),
2128
+ generateAppProofs: generateAppProofs ?? false,
2129
+ type: "ACTIVITY_TYPE_CREATE_SESSION_PROFILE",
2130
+ }, "createSessionProfileResult", stampWith);
2131
+ };
2132
+ this.stampCreateSessionProfile = async (input, stampWith) => {
2133
+ const activeStamper = this.getStamper(stampWith);
2134
+ if (!activeStamper) {
2135
+ return undefined;
2136
+ }
2137
+ const { organizationId, timestampMs, ...parameters } = input;
2138
+ const session = await this.storageManager?.getActiveSession();
2139
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_session_profile";
2140
+ const bodyWithType = {
2141
+ parameters,
2142
+ organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
2143
+ timestampMs: timestampMs ?? String(Date.now()),
2144
+ type: "ACTIVITY_TYPE_CREATE_SESSION_PROFILE",
2145
+ };
2146
+ const stringifiedBody = JSON.stringify(bodyWithType);
2147
+ const stamp = await activeStamper.stamp(stringifiedBody);
2148
+ return {
2149
+ body: stringifiedBody,
2150
+ stamp: stamp,
2151
+ url: fullUrl,
2152
+ };
2153
+ };
1870
2154
  this.createSmartContractInterface = async (input, stampWith) => {
1871
2155
  const { organizationId, timestampMs, ...rest } = input;
1872
2156
  //@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 +2672,43 @@ class TurnkeySDKClientBase {
2388
2672
  url: fullUrl,
2389
2673
  };
2390
2674
  };
2675
+ this.deleteMfaPolicy = async (input, stampWith) => {
2676
+ const { organizationId, timestampMs, ...rest } = input;
2677
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
2678
+ const generateAppProofs = input?.generateAppProofs ?? false;
2679
+ const session = await this.storageManager?.getActiveSession();
2680
+ return this.activity("/public/v1/submit/delete_mfa_policy", {
2681
+ parameters: rest,
2682
+ organizationId: organizationId ??
2683
+ session?.organizationId ??
2684
+ this.config.organizationId,
2685
+ timestampMs: timestampMs ?? String(Date.now()),
2686
+ generateAppProofs: generateAppProofs ?? false,
2687
+ type: "ACTIVITY_TYPE_DELETE_MFA_POLICY",
2688
+ }, "deleteMfaPolicyResult", stampWith);
2689
+ };
2690
+ this.stampDeleteMfaPolicy = async (input, stampWith) => {
2691
+ const activeStamper = this.getStamper(stampWith);
2692
+ if (!activeStamper) {
2693
+ return undefined;
2694
+ }
2695
+ const { organizationId, timestampMs, ...parameters } = input;
2696
+ const session = await this.storageManager?.getActiveSession();
2697
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/delete_mfa_policy";
2698
+ const bodyWithType = {
2699
+ parameters,
2700
+ organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
2701
+ timestampMs: timestampMs ?? String(Date.now()),
2702
+ type: "ACTIVITY_TYPE_DELETE_MFA_POLICY",
2703
+ };
2704
+ const stringifiedBody = JSON.stringify(bodyWithType);
2705
+ const stamp = await activeStamper.stamp(stringifiedBody);
2706
+ return {
2707
+ body: stringifiedBody,
2708
+ stamp: stamp,
2709
+ url: fullUrl,
2710
+ };
2711
+ };
2391
2712
  this.deleteOauth2Credential = async (input, stampWith) => {
2392
2713
  const { organizationId, timestampMs, ...rest } = input;
2393
2714
  //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
@@ -2982,43 +3303,6 @@ class TurnkeySDKClientBase {
2982
3303
  url: fullUrl,
2983
3304
  };
2984
3305
  };
2985
- this.ethSendTransaction = async (input, stampWith) => {
2986
- const { organizationId, timestampMs, ...rest } = input;
2987
- //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
2988
- const generateAppProofs = input?.generateAppProofs ?? false;
2989
- const session = await this.storageManager?.getActiveSession();
2990
- return this.activity("/public/v1/submit/eth_send_transaction", {
2991
- parameters: rest,
2992
- organizationId: organizationId ??
2993
- session?.organizationId ??
2994
- this.config.organizationId,
2995
- timestampMs: timestampMs ?? String(Date.now()),
2996
- generateAppProofs: generateAppProofs ?? false,
2997
- type: "ACTIVITY_TYPE_ETH_SEND_TRANSACTION",
2998
- }, "ethSendTransactionResult", stampWith);
2999
- };
3000
- this.stampEthSendTransaction = async (input, stampWith) => {
3001
- const activeStamper = this.getStamper(stampWith);
3002
- if (!activeStamper) {
3003
- return undefined;
3004
- }
3005
- const { organizationId, timestampMs, ...parameters } = input;
3006
- const session = await this.storageManager?.getActiveSession();
3007
- const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/eth_send_transaction";
3008
- const bodyWithType = {
3009
- parameters,
3010
- organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
3011
- timestampMs: timestampMs ?? String(Date.now()),
3012
- type: "ACTIVITY_TYPE_ETH_SEND_TRANSACTION",
3013
- };
3014
- const stringifiedBody = JSON.stringify(bodyWithType);
3015
- const stamp = await activeStamper.stamp(stringifiedBody);
3016
- return {
3017
- body: stringifiedBody,
3018
- stamp: stamp,
3019
- url: fullUrl,
3020
- };
3021
- };
3022
3306
  this.exportPrivateKey = async (input, stampWith) => {
3023
3307
  const { organizationId, timestampMs, ...rest } = input;
3024
3308
  //@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 +4562,43 @@ class TurnkeySDKClientBase {
4278
4562
  url: fullUrl,
4279
4563
  };
4280
4564
  };
4565
+ this.updateMfaPolicy = async (input, stampWith) => {
4566
+ const { organizationId, timestampMs, ...rest } = input;
4567
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
4568
+ const generateAppProofs = input?.generateAppProofs ?? false;
4569
+ const session = await this.storageManager?.getActiveSession();
4570
+ return this.activity("/public/v1/submit/update_mfa_policy", {
4571
+ parameters: rest,
4572
+ organizationId: organizationId ??
4573
+ session?.organizationId ??
4574
+ this.config.organizationId,
4575
+ timestampMs: timestampMs ?? String(Date.now()),
4576
+ generateAppProofs: generateAppProofs ?? false,
4577
+ type: "ACTIVITY_TYPE_UPDATE_MFA_POLICY",
4578
+ }, "updateMfaPolicyResult", stampWith);
4579
+ };
4580
+ this.stampUpdateMfaPolicy = async (input, stampWith) => {
4581
+ const activeStamper = this.getStamper(stampWith);
4582
+ if (!activeStamper) {
4583
+ return undefined;
4584
+ }
4585
+ const { organizationId, timestampMs, ...parameters } = input;
4586
+ const session = await this.storageManager?.getActiveSession();
4587
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/update_mfa_policy";
4588
+ const bodyWithType = {
4589
+ parameters,
4590
+ organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
4591
+ timestampMs: timestampMs ?? String(Date.now()),
4592
+ type: "ACTIVITY_TYPE_UPDATE_MFA_POLICY",
4593
+ };
4594
+ const stringifiedBody = JSON.stringify(bodyWithType);
4595
+ const stamp = await activeStamper.stamp(stringifiedBody);
4596
+ return {
4597
+ body: stringifiedBody,
4598
+ stamp: stamp,
4599
+ url: fullUrl,
4600
+ };
4601
+ };
4281
4602
  this.updateOauth2Credential = async (input, stampWith) => {
4282
4603
  const { organizationId, timestampMs, ...rest } = input;
4283
4604
  //@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 +5080,80 @@ class TurnkeySDKClientBase {
4759
5080
  url: fullUrl,
4760
5081
  };
4761
5082
  };
5083
+ this.ethSendTransaction = async (input, stampWith) => {
5084
+ const { organizationId, timestampMs, ...rest } = input;
5085
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
5086
+ const generateAppProofs = input?.generateAppProofs ?? false;
5087
+ const session = await this.storageManager?.getActiveSession();
5088
+ return this.activity("/public/v1/submit/eth_send_transaction", {
5089
+ parameters: rest,
5090
+ organizationId: organizationId ??
5091
+ session?.organizationId ??
5092
+ this.config.organizationId,
5093
+ timestampMs: timestampMs ?? String(Date.now()),
5094
+ generateAppProofs: generateAppProofs ?? false,
5095
+ type: "ACTIVITY_TYPE_ETH_SEND_TRANSACTION",
5096
+ }, "ethSendTransactionResult", stampWith);
5097
+ };
5098
+ this.stampEthSendTransaction = async (input, stampWith) => {
5099
+ const activeStamper = this.getStamper(stampWith);
5100
+ if (!activeStamper) {
5101
+ return undefined;
5102
+ }
5103
+ const { organizationId, timestampMs, ...parameters } = input;
5104
+ const session = await this.storageManager?.getActiveSession();
5105
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/eth_send_transaction";
5106
+ const bodyWithType = {
5107
+ parameters,
5108
+ organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
5109
+ timestampMs: timestampMs ?? String(Date.now()),
5110
+ type: "ACTIVITY_TYPE_ETH_SEND_TRANSACTION",
5111
+ };
5112
+ const stringifiedBody = JSON.stringify(bodyWithType);
5113
+ const stamp = await activeStamper.stamp(stringifiedBody);
5114
+ return {
5115
+ body: stringifiedBody,
5116
+ stamp: stamp,
5117
+ url: fullUrl,
5118
+ };
5119
+ };
5120
+ this.ethSendTransactionV2 = async (input, stampWith) => {
5121
+ const { organizationId, timestampMs, ...rest } = input;
5122
+ //@ts-ignore - generateAppProofs does not exist on all request types, so we ignore the type error here for those that are missing it
5123
+ const generateAppProofs = input?.generateAppProofs ?? false;
5124
+ const session = await this.storageManager?.getActiveSession();
5125
+ return this.activity("/public/v1/submit/eth_send_transaction", {
5126
+ parameters: rest,
5127
+ organizationId: organizationId ??
5128
+ session?.organizationId ??
5129
+ this.config.organizationId,
5130
+ timestampMs: timestampMs ?? String(Date.now()),
5131
+ generateAppProofs: generateAppProofs ?? false,
5132
+ type: "ACTIVITY_TYPE_ETH_SEND_TRANSACTION_V2",
5133
+ }, "ethSendTransactionResultV2", stampWith);
5134
+ };
5135
+ this.stampEthSendTransactionV2 = async (input, stampWith) => {
5136
+ const activeStamper = this.getStamper(stampWith);
5137
+ if (!activeStamper) {
5138
+ return undefined;
5139
+ }
5140
+ const { organizationId, timestampMs, ...parameters } = input;
5141
+ const session = await this.storageManager?.getActiveSession();
5142
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/eth_send_transaction";
5143
+ const bodyWithType = {
5144
+ parameters,
5145
+ organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
5146
+ timestampMs: timestampMs ?? String(Date.now()),
5147
+ type: "ACTIVITY_TYPE_ETH_SEND_TRANSACTION_V2",
5148
+ };
5149
+ const stringifiedBody = JSON.stringify(bodyWithType);
5150
+ const stamp = await activeStamper.stamp(stringifiedBody);
5151
+ return {
5152
+ body: stringifiedBody,
5153
+ stamp: stamp,
5154
+ url: fullUrl,
5155
+ };
5156
+ };
4762
5157
  this.proxyGetAccount = async (input) => {
4763
5158
  return this.authProxyRequest("/v1/account", input);
4764
5159
  };