@gardenfi/utils 3.0.0-beta.3 → 3.0.0-beta.4
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/index.cjs +1 -1
- package/dist/index.js +36 -35
- package/dist/index10.cjs +1 -1
- package/dist/index10.js +4 -4
- package/dist/index100.cjs +1 -1
- package/dist/index100.js +3 -126
- package/dist/index101.cjs +1 -1
- package/dist/index101.js +18 -5
- package/dist/index102.cjs +1 -1
- package/dist/index102.js +19 -20
- package/dist/index103.cjs +1 -1
- package/dist/index103.js +33 -43
- package/dist/index104.cjs +1 -1
- package/dist/index104.js +19 -34
- package/dist/index105.cjs +1 -1
- package/dist/index105.js +8 -6
- package/dist/index106.cjs +4 -1
- package/dist/index106.js +191 -87
- package/dist/index107.cjs +3 -1
- package/dist/index107.js +451 -14
- package/dist/index108.cjs +1 -1
- package/dist/index108.js +27 -3
- package/dist/index109.cjs +1 -1
- package/dist/index109.js +160 -25
- package/dist/index110.cjs +1 -2
- package/dist/index110.js +20 -23
- package/dist/index111.cjs +1 -1
- package/dist/index111.js +127 -9
- package/dist/index112.cjs +1 -1
- package/dist/index112.js +38 -8
- package/dist/index113.cjs +1 -1
- package/dist/index113.js +6 -10
- package/dist/index114.cjs +1 -1
- package/dist/index114.js +27 -11
- package/dist/index115.cjs +1 -1
- package/dist/index115.js +55 -13
- package/dist/index116.cjs +1 -1
- package/dist/index116.js +44 -20
- package/dist/index117.cjs +1 -1
- package/dist/index117.js +191 -14
- package/dist/index118.cjs +1 -1
- package/dist/index118.js +4 -5
- package/dist/index119.cjs +1 -1
- package/dist/index119.js +64 -6
- package/dist/index120.cjs +1 -1
- package/dist/index120.js +18 -16
- package/dist/index121.cjs +1 -1
- package/dist/index121.js +3 -11
- package/dist/index122.cjs +1 -1
- package/dist/index122.js +15 -57
- package/dist/index123.cjs +1 -1
- package/dist/index123.js +23 -6
- package/dist/index124.cjs +1 -1
- package/dist/index124.js +11 -13
- package/dist/index125.cjs +1 -1
- package/dist/index125.js +18 -7
- package/dist/index126.cjs +1 -1
- package/dist/index126.js +31 -134
- package/dist/index127.cjs +1 -1
- package/dist/index127.js +3 -8
- package/dist/index128.cjs +1 -1
- package/dist/index128.js +18 -21
- package/dist/index129.cjs +1 -1
- package/dist/index129.js +27 -17
- package/dist/index130.cjs +1 -1
- package/dist/index130.js +36 -43
- package/dist/index131.cjs +1 -1
- package/dist/index131.js +8 -21
- package/dist/index132.cjs +1 -1
- package/dist/index132.js +10 -80
- package/dist/index133.cjs +1 -1
- package/dist/index133.js +25 -11
- package/dist/index134.cjs +1 -1
- package/dist/index134.js +27 -12
- package/dist/index135.cjs +1 -1
- package/dist/index135.js +3 -6
- package/dist/index136.cjs +1 -1
- package/dist/index136.js +72 -38
- package/dist/index137.cjs +1 -1
- package/dist/index137.js +9 -5
- package/dist/index138.cjs +1 -1
- package/dist/index138.js +20 -32
- package/dist/index139.cjs +1 -1
- package/dist/index139.js +8 -9
- package/dist/index140.cjs +1 -1
- package/dist/index140.js +10 -60
- package/dist/index141.cjs +1 -1
- package/dist/index141.js +11 -19
- package/dist/index142.cjs +1 -1
- package/dist/index142.js +6 -106
- package/dist/index143.cjs +1 -1
- package/dist/index143.js +6 -78
- package/dist/index144.cjs +1 -1
- package/dist/index144.js +12 -8
- package/dist/index145.cjs +1 -1
- package/dist/index145.js +30 -69
- package/dist/index146.cjs +1 -2
- package/dist/index146.js +5 -3
- package/dist/index147.cjs +1 -1
- package/dist/index147.js +38 -9
- package/dist/index148.cjs +1 -1
- package/dist/index148.js +110 -12
- package/dist/index149.cjs +1 -1
- package/dist/index149.js +171 -4
- package/dist/index150.cjs +1 -1
- package/dist/index150.js +45 -8
- package/dist/index151.cjs +1 -1
- package/dist/index151.js +33 -2
- package/dist/index152.cjs +1 -1
- package/dist/index152.js +8 -32
- package/dist/index153.cjs +1 -1
- package/dist/index153.js +16 -20
- package/dist/index154.cjs +1 -1
- package/dist/index154.js +20 -5
- package/dist/index155.cjs +1 -1
- package/dist/index155.js +23 -5
- package/dist/index156.cjs +1 -1
- package/dist/index156.js +42 -5
- package/dist/index157.cjs +1 -9
- package/dist/index157.js +22 -35
- package/dist/index158.cjs +1 -1
- package/dist/index158.js +22 -3
- package/dist/index159.cjs +1 -1
- package/dist/index159.js +50 -17
- package/dist/index160.cjs +1 -1
- package/dist/index160.js +12 -20
- package/dist/index161.cjs +1 -1
- package/dist/index161.js +24 -35
- package/dist/index162.cjs +1 -1
- package/dist/index162.js +24 -8
- package/dist/index163.cjs +1 -4
- package/dist/index163.js +91 -181
- package/dist/index164.cjs +1 -1
- package/dist/index164.js +3 -28
- package/dist/index165.cjs +1 -1
- package/dist/index165.js +5 -161
- package/dist/index166.cjs +1 -1
- package/dist/index166.js +30 -126
- package/dist/index167.cjs +1 -1
- package/dist/index167.js +3 -27
- package/dist/index168.cjs +1 -1
- package/dist/index168.js +17 -55
- package/dist/index169.cjs +1 -1
- package/dist/index169.js +5 -191
- package/dist/index17.cjs +1 -1
- package/dist/index17.js +2 -2
- package/dist/index170.cjs +1 -1
- package/dist/index170.js +9 -4
- package/dist/index171.cjs +1 -1
- package/dist/index171.js +98 -15
- package/dist/index172.cjs +1 -1
- package/dist/index172.js +81 -3
- package/dist/index173.cjs +1 -1
- package/dist/index173.js +5 -16
- package/dist/index174.cjs +1 -1
- package/dist/index174.js +6 -11
- package/dist/index175.cjs +1 -1
- package/dist/index175.js +26 -33
- package/dist/index176.cjs +1 -1
- package/dist/index176.js +35 -3
- package/dist/index177.cjs +1 -1
- package/dist/index177.js +13 -27
- package/dist/index178.cjs +1 -1
- package/dist/index178.js +16 -8
- package/dist/index179.cjs +1 -1
- package/dist/index179.js +77 -24
- package/dist/index18.cjs +1 -1
- package/dist/index18.js +8 -8
- package/dist/index180.cjs +1 -1
- package/dist/index180.js +2 -29
- package/dist/index181.cjs +1 -1
- package/dist/index181.js +14 -3
- package/dist/index182.cjs +1 -1
- package/dist/index182.js +18 -6
- package/dist/index183.cjs +1 -1
- package/dist/index183.js +171 -6
- package/dist/index184.cjs +1 -1
- package/dist/index184.js +16 -31
- package/dist/index185.cjs +1 -1
- package/dist/index185.js +11 -5
- package/dist/index186.cjs +1 -1
- package/dist/index186.js +24 -36
- package/dist/index187.cjs +1 -1
- package/dist/index187.js +18 -49
- package/dist/index188.cjs +1 -1
- package/dist/index188.js +14 -31
- package/dist/index189.cjs +1 -1
- package/dist/index189.js +5 -17
- package/dist/index190.cjs +1 -1
- package/dist/index190.js +13 -42
- package/dist/index191.cjs +1 -1
- package/dist/index191.js +10 -104
- package/dist/index192.cjs +1 -1
- package/dist/index192.js +17 -3
- package/dist/index193.cjs +1 -1
- package/dist/index193.js +30 -5
- package/dist/index194.cjs +1 -1
- package/dist/index194.js +2 -4
- package/dist/index195.cjs +1 -1
- package/dist/index195.js +12 -16
- package/dist/index196.cjs +1 -1
- package/dist/index196.js +12 -5
- package/dist/index197.cjs +1 -1
- package/dist/index197.js +47 -8
- package/dist/index198.cjs +1 -1
- package/dist/index198.js +10 -102
- package/dist/index199.cjs +1 -1
- package/dist/index199.js +7 -5
- package/dist/index20.cjs +1 -1
- package/dist/index20.js +2 -2
- package/dist/index200.cjs +1 -1
- package/dist/index200.js +70 -6
- package/dist/index201.cjs +1 -1
- package/dist/index201.js +46 -27
- package/dist/index202.cjs +1 -1
- package/dist/index202.js +36 -33
- package/dist/index203.cjs +1 -1
- package/dist/index203.js +17 -13
- package/dist/index204.cjs +1 -1
- package/dist/index204.js +6 -78
- package/dist/index205.cjs +1 -1
- package/dist/index205.js +10 -2
- package/dist/index206.cjs +1 -1
- package/dist/index206.js +13 -18
- package/dist/index207.cjs +1 -1
- package/dist/index207.js +13 -171
- package/dist/index208.cjs +1 -1
- package/dist/index208.js +8 -17
- package/dist/index209.cjs +1 -1
- package/dist/index209.js +35 -10
- package/dist/index210.cjs +1 -1
- package/dist/index210.js +16 -25
- package/dist/index211.cjs +1 -1
- package/dist/index211.js +29 -18
- package/dist/index212.cjs +1 -1
- package/dist/index212.js +13 -14
- package/dist/index213.cjs +1 -1
- package/dist/index213.js +6 -5
- package/dist/index214.cjs +1 -1
- package/dist/index214.js +103 -13
- package/dist/index215.cjs +1 -1
- package/dist/index215.js +75 -10
- package/dist/index216.cjs +2 -1
- package/dist/index216.js +24 -16
- package/dist/index217.cjs +2 -1
- package/dist/index217.js +41 -24
- package/dist/index218.cjs +1 -1
- package/dist/index218.js +2 -47
- package/dist/index219.cjs +1 -1
- package/dist/index219.js +5 -9
- package/dist/index22.cjs +1 -1
- package/dist/index22.js +9 -9
- package/dist/index220.cjs +1 -2
- package/dist/index220.js +9 -40
- package/dist/index221.cjs +1 -1
- package/dist/index221.js +20 -2
- package/dist/index222.cjs +1 -1
- package/dist/index222.js +8 -5
- package/dist/index223.cjs +1 -1
- package/dist/index223.js +65 -9
- package/dist/index224.cjs +1 -1
- package/dist/index224.js +63 -17
- package/dist/index225.cjs +1 -1
- package/dist/index225.js +188 -8
- package/dist/index226.cjs +1 -1
- package/dist/index226.js +28 -66
- package/dist/index227.cjs +1 -1
- package/dist/index227.js +72 -61
- package/dist/index228.cjs +1 -1
- package/dist/index228.js +35 -183
- package/dist/index229.cjs +1 -1
- package/dist/index229.js +9 -21
- package/dist/index23.cjs +1 -1
- package/dist/index23.js +12 -26
- package/dist/index230.cjs +1 -1
- package/dist/index230.js +7 -70
- package/dist/index231.cjs +1 -1
- package/dist/index231.js +11 -40
- package/dist/index232.cjs +1 -1
- package/dist/index232.js +12 -16
- package/dist/index233.cjs +1 -1
- package/dist/index233.js +18 -12
- package/dist/index234.cjs +1 -1
- package/dist/index234.js +108 -11
- package/dist/index235.cjs +1 -1
- package/dist/index235.js +6 -12
- package/dist/index236.cjs +1 -1
- package/dist/index236.js +7 -20
- package/dist/index237.cjs +1 -1
- package/dist/index237.js +25 -107
- package/dist/index238.cjs +1 -1
- package/dist/index238.js +2 -2
- package/dist/index239.cjs +1 -1
- package/dist/index239.js +16 -6
- package/dist/index24.cjs +1 -1
- package/dist/index24.js +59 -8
- package/dist/index240.cjs +1 -1
- package/dist/index240.js +215 -7
- package/dist/index241.cjs +1 -1
- package/dist/index241.js +203 -23
- package/dist/index242.cjs +1 -1
- package/dist/index242.js +42 -16
- package/dist/index243.cjs +1 -1
- package/dist/index243.js +76 -212
- package/dist/index244.cjs +1 -1
- package/dist/index244.js +2 -207
- package/dist/index245.cjs +1 -1
- package/dist/index245.js +24 -42
- package/dist/index246.cjs +1 -1
- package/dist/index246.js +42 -74
- package/dist/index247.cjs +1 -1
- package/dist/index247.js +10 -2
- package/dist/index248.cjs +1 -1
- package/dist/index248.js +1 -1
- package/dist/index25.cjs +16 -1
- package/dist/index25.js +113 -12
- package/dist/index250.cjs +1 -2
- package/dist/index250.js +68 -91
- package/dist/index251.cjs +1 -1
- package/dist/index251.js +657 -14
- package/dist/index252.cjs +1 -1
- package/dist/index252.js +176 -67
- package/dist/index253.cjs +2 -1
- package/dist/index253.js +88 -654
- package/dist/index254.cjs +1 -1
- package/dist/index254.js +14 -177
- package/dist/index26.cjs +1 -1
- package/dist/index26.js +30 -59
- package/dist/index27.cjs +1 -16
- package/dist/index27.js +24 -111
- package/dist/index28.cjs +1 -1
- package/dist/index28.js +7 -29
- package/dist/index29.cjs +1 -1
- package/dist/index29.js +7 -171
- package/dist/index3.cjs +1 -1
- package/dist/index3.js +41 -24
- package/dist/index30.cjs +1 -1
- package/dist/index30.js +30 -110
- package/dist/index31.cjs +1 -1
- package/dist/index31.js +29 -30
- package/dist/index32.cjs +1 -1
- package/dist/index32.js +16 -3
- package/dist/index33.cjs +1 -1
- package/dist/index33.js +34 -2
- package/dist/index34.cjs +1 -1
- package/dist/index34.js +45 -4
- package/dist/index35.cjs +1 -2
- package/dist/index35.js +151 -59
- package/dist/index36.cjs +1 -2
- package/dist/index36.js +39 -52
- package/dist/index37.cjs +1 -3
- package/dist/index37.js +53 -210
- package/dist/index38.cjs +2 -1
- package/dist/index38.js +58 -22
- package/dist/index39.cjs +1 -1
- package/dist/index39.js +13 -18
- package/dist/index40.cjs +1 -1
- package/dist/index40.js +37 -10
- package/dist/index41.cjs +1 -1
- package/dist/index41.js +15 -20
- package/dist/index42.cjs +1 -1
- package/dist/index42.js +8 -45
- package/dist/index43.cjs +1 -1
- package/dist/index43.js +19 -12
- package/dist/index44.cjs +1 -1
- package/dist/index44.js +2 -13
- package/dist/index45.cjs +1 -1
- package/dist/index45.js +45 -24
- package/dist/index46.cjs +1 -1
- package/dist/index46.js +32 -27
- package/dist/index47.cjs +1 -1
- package/dist/index47.js +3 -47
- package/dist/index48.cjs +1 -1
- package/dist/index48.js +9 -16
- package/dist/index49.cjs +1 -1
- package/dist/index49.js +60 -11
- package/dist/index50.cjs +1 -1
- package/dist/index50.js +76 -30
- package/dist/index51.cjs +1 -1
- package/dist/index51.js +7 -36
- package/dist/index52.cjs +1 -1
- package/dist/index52.js +16 -7
- package/dist/index53.cjs +1 -1
- package/dist/index53.js +9 -28
- package/dist/index54.cjs +1 -1
- package/dist/index54.js +5 -22
- package/dist/index55.cjs +1 -1
- package/dist/index55.js +14 -7
- package/dist/index56.cjs +1 -1
- package/dist/index56.js +3 -70
- package/dist/index57.cjs +1 -1
- package/dist/index57.js +24 -44
- package/dist/index58.cjs +1 -1
- package/dist/index58.js +160 -19
- package/dist/index59.cjs +1 -1
- package/dist/index59.js +4 -37
- package/dist/index60.cjs +1 -1
- package/dist/index60.js +6 -17
- package/dist/index61.cjs +1 -1
- package/dist/index61.js +89 -5
- package/dist/index62.cjs +1 -1
- package/dist/index62.js +9 -8
- package/dist/index63.cjs +1 -1
- package/dist/index63.js +6 -13
- package/dist/index64.cjs +1 -1
- package/dist/index64.js +13 -164
- package/dist/index65.cjs +1 -1
- package/dist/index65.js +124 -22
- package/dist/index66.cjs +1 -1
- package/dist/index66.js +131 -71
- package/dist/index67.cjs +1 -1
- package/dist/index67.js +6 -12
- package/dist/index68.cjs +1 -1
- package/dist/index68.js +21 -51
- package/dist/index69.cjs +1 -1
- package/dist/index69.js +17 -7
- package/dist/index70.cjs +1 -1
- package/dist/index70.js +43 -7
- package/dist/index71.cjs +1 -1
- package/dist/index71.js +20 -20
- package/dist/index72.cjs +1 -1
- package/dist/index72.js +11 -8
- package/dist/index73.cjs +1 -1
- package/dist/index73.js +6 -31
- package/dist/index74.cjs +1 -1
- package/dist/index74.js +5 -16
- package/dist/index75.cjs +1 -1
- package/dist/index75.js +19 -73
- package/dist/index76.cjs +1 -1
- package/dist/index76.js +105 -34
- package/dist/index77.cjs +1 -1
- package/dist/index77.js +78 -16
- package/dist/index78.cjs +1 -1
- package/dist/index78.js +8 -74
- package/dist/index79.cjs +1 -1
- package/dist/index79.js +26 -10
- package/dist/index80.cjs +1 -1
- package/dist/index80.js +71 -29
- package/dist/index81.cjs +1 -2
- package/dist/index81.js +4 -121
- package/dist/index82.cjs +2 -1
- package/dist/index82.js +3 -15
- package/dist/index83.cjs +1 -1
- package/dist/index83.js +8 -24
- package/dist/index84.cjs +20 -1
- package/dist/index84.js +324 -31
- package/dist/index85.cjs +1 -1
- package/dist/index85.js +13 -44
- package/dist/index86.cjs +1 -1
- package/dist/index86.js +4 -6
- package/dist/index87.cjs +1 -1
- package/dist/index87.js +11 -102
- package/dist/index88.cjs +1 -1
- package/dist/index88.js +2 -38
- package/dist/index89.cjs +1 -1
- package/dist/index89.js +7 -8
- package/dist/index90.cjs +2 -1
- package/dist/index90.js +54 -20
- package/dist/index91.cjs +3 -1
- package/dist/index91.js +216 -2
- package/dist/index92.cjs +1 -1
- package/dist/index92.js +32 -76
- package/dist/index93.cjs +1 -1
- package/dist/index93.js +21 -15
- package/dist/index94.cjs +1 -1
- package/dist/index94.js +5 -151
- package/dist/index95.cjs +1 -20
- package/dist/index95.js +72 -325
- package/dist/index96.cjs +1 -3
- package/dist/index96.js +5 -451
- package/dist/index97.cjs +1 -1
- package/dist/index97.js +5 -64
- package/dist/index98.cjs +9 -1
- package/dist/index98.js +35 -16
- package/dist/index99.cjs +2 -1
- package/dist/index99.js +120 -10
- package/dist/src/lib/utils.d.ts +15 -0
- package/package.json +1 -1
package/dist/index66.js
CHANGED
|
@@ -1,80 +1,140 @@
|
|
|
1
|
-
import { parseAccount as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
1
|
+
import { parseAccount as U } from "./index47.js";
|
|
2
|
+
import { AccountNotFoundError as W, AccountTypeNotSupportedError as h } from "./index216.js";
|
|
3
|
+
import { BaseError as j } from "./index38.js";
|
|
4
|
+
import { TransactionReceiptRevertedError as D } from "./index99.js";
|
|
5
|
+
import { recoverAuthorizationAddress as H } from "./index205.js";
|
|
6
|
+
import { assertCurrentChain as J } from "./index152.js";
|
|
7
|
+
import { getTransactionError as K } from "./index207.js";
|
|
8
|
+
import { extract as Q } from "./index196.js";
|
|
9
|
+
import { formatTransactionRequest as V } from "./index162.js";
|
|
10
|
+
import { getAction as d } from "./index29.js";
|
|
11
|
+
import { LruMap as X } from "./index138.js";
|
|
12
|
+
import { assertRequest as Y } from "./index178.js";
|
|
13
|
+
import { getChainId as Z } from "./index51.js";
|
|
14
|
+
import { waitForTransactionReceipt as $ } from "./index214.js";
|
|
15
|
+
import { prepareTransactionRequest as tt, defaultParameters as rt } from "./index58.js";
|
|
16
|
+
import { sendRawTransactionSync as et } from "./index64.js";
|
|
17
|
+
const w = new X(128);
|
|
18
|
+
async function Tt(r, o) {
|
|
19
|
+
var v, I, z, A;
|
|
20
|
+
const { account: m = r.account, chain: e = r.chain, accessList: l, authorizationList: s, blobs: y, data: R, gas: T, gasPrice: g, maxFeePerBlobGas: E, maxFeePerGas: q, maxPriorityFeePerGas: P, nonce: C, pollingInterval: G, throwOnReceiptRevert: F, type: M, value: N, ...S } = o, O = o.timeout ?? Math.max(((e == null ? void 0 : e.blockTime) ?? 0) * 3, 5e3);
|
|
21
|
+
if (typeof m > "u")
|
|
22
|
+
throw new W({
|
|
23
|
+
docsPath: "/docs/actions/wallet/sendTransactionSync"
|
|
21
24
|
});
|
|
22
|
-
|
|
23
|
-
J(a);
|
|
24
|
-
const f = (u = (P = t == null ? void 0 : t.formatters) == null ? void 0 : P.transactionRequest) == null ? void 0 : u.format, l = (f || D)({
|
|
25
|
-
// Pick out extra data that might exist on the chain's transaction request type.
|
|
26
|
-
...V(H, { format: f }),
|
|
27
|
-
account: s ? p(s) : void 0,
|
|
28
|
-
accessList: h,
|
|
29
|
-
authorizationList: B,
|
|
30
|
-
blobs: I,
|
|
31
|
-
blobVersionedHashes: q,
|
|
32
|
-
data: M,
|
|
33
|
-
gas: T,
|
|
34
|
-
gasPrice: k,
|
|
35
|
-
maxFeePerBlobGas: R,
|
|
36
|
-
maxFeePerGas: _,
|
|
37
|
-
maxPriorityFeePerGas: v,
|
|
38
|
-
nonce: L,
|
|
39
|
-
to: A,
|
|
40
|
-
type: C,
|
|
41
|
-
value: E
|
|
42
|
-
}, "fillTransaction");
|
|
25
|
+
const t = m ? U(m) : null;
|
|
43
26
|
try {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
return t.fees.baseFeeMultiplier({
|
|
54
|
-
block: S,
|
|
55
|
-
client: r,
|
|
56
|
-
request: a
|
|
27
|
+
Y(o);
|
|
28
|
+
const a = await (async () => {
|
|
29
|
+
if (o.to)
|
|
30
|
+
return o.to;
|
|
31
|
+
if (o.to !== null && s && s.length > 0)
|
|
32
|
+
return await H({
|
|
33
|
+
authorization: s[0]
|
|
34
|
+
}).catch(() => {
|
|
35
|
+
throw new j("`to` is required. Could not infer from `authorizationList`.");
|
|
57
36
|
});
|
|
58
|
-
}
|
|
59
|
-
return ((y = t == null ? void 0 : t.fees) == null ? void 0 : y.baseFeeMultiplier) ?? 1.2;
|
|
60
37
|
})();
|
|
61
|
-
if (
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
38
|
+
if ((t == null ? void 0 : t.type) === "json-rpc" || t === null) {
|
|
39
|
+
let i;
|
|
40
|
+
e !== null && (i = await d(r, Z, "getChainId")({}), J({
|
|
41
|
+
currentChainId: i,
|
|
42
|
+
chain: e
|
|
43
|
+
}));
|
|
44
|
+
const c = (z = (I = (v = r.chain) == null ? void 0 : v.formatters) == null ? void 0 : I.transactionRequest) == null ? void 0 : z.format, b = (c || V)({
|
|
45
|
+
// Pick out extra data that might exist on the chain's transaction request type.
|
|
46
|
+
...Q(S, { format: c }),
|
|
47
|
+
accessList: l,
|
|
48
|
+
account: t,
|
|
49
|
+
authorizationList: s,
|
|
50
|
+
blobs: y,
|
|
51
|
+
chainId: i,
|
|
52
|
+
data: R,
|
|
53
|
+
gas: T,
|
|
54
|
+
gasPrice: g,
|
|
55
|
+
maxFeePerBlobGas: E,
|
|
56
|
+
maxFeePerGas: q,
|
|
57
|
+
maxPriorityFeePerGas: P,
|
|
58
|
+
nonce: C,
|
|
59
|
+
to: a,
|
|
60
|
+
type: M,
|
|
61
|
+
value: N
|
|
62
|
+
}, "sendTransaction"), _ = w.get(r.uid), k = _ ? "wallet_sendTransaction" : "eth_sendTransaction", B = await (async () => {
|
|
63
|
+
try {
|
|
64
|
+
return await r.request({
|
|
65
|
+
method: k,
|
|
66
|
+
params: [b]
|
|
67
|
+
}, { retryCount: 0 });
|
|
68
|
+
} catch (L) {
|
|
69
|
+
if (_ === !1)
|
|
70
|
+
throw L;
|
|
71
|
+
const n = L;
|
|
72
|
+
if (n.name === "InvalidInputRpcError" || n.name === "InvalidParamsRpcError" || n.name === "MethodNotFoundRpcError" || n.name === "MethodNotSupportedRpcError")
|
|
73
|
+
return await r.request({
|
|
74
|
+
method: "wallet_sendTransaction",
|
|
75
|
+
params: [b]
|
|
76
|
+
}, { retryCount: 0 }).then((u) => (w.set(r.uid, !0), u)).catch((u) => {
|
|
77
|
+
const f = u;
|
|
78
|
+
throw f.name === "MethodNotFoundRpcError" || f.name === "MethodNotSupportedRpcError" ? (w.set(r.uid, !1), n) : f;
|
|
79
|
+
});
|
|
80
|
+
throw n;
|
|
81
|
+
}
|
|
82
|
+
})(), p = await d(r, $, "waitForTransactionReceipt")({
|
|
83
|
+
checkReplacement: !1,
|
|
84
|
+
hash: B,
|
|
85
|
+
pollingInterval: G,
|
|
86
|
+
timeout: O
|
|
87
|
+
});
|
|
88
|
+
if (F && p.status === "reverted")
|
|
89
|
+
throw new D({ receipt: p });
|
|
90
|
+
return p;
|
|
91
|
+
}
|
|
92
|
+
if ((t == null ? void 0 : t.type) === "local") {
|
|
93
|
+
const i = await d(r, tt, "prepareTransactionRequest")({
|
|
94
|
+
account: t,
|
|
95
|
+
accessList: l,
|
|
96
|
+
authorizationList: s,
|
|
97
|
+
blobs: y,
|
|
98
|
+
chain: e,
|
|
99
|
+
data: R,
|
|
100
|
+
gas: T,
|
|
101
|
+
gasPrice: g,
|
|
102
|
+
maxFeePerBlobGas: E,
|
|
103
|
+
maxFeePerGas: q,
|
|
104
|
+
maxPriorityFeePerGas: P,
|
|
105
|
+
nonce: C,
|
|
106
|
+
nonceManager: t.nonceManager,
|
|
107
|
+
parameters: [...rt, "sidecars"],
|
|
108
|
+
type: M,
|
|
109
|
+
value: N,
|
|
110
|
+
...S,
|
|
111
|
+
to: a
|
|
112
|
+
}), c = (A = e == null ? void 0 : e.serializers) == null ? void 0 : A.transaction, x = await t.signTransaction(i, {
|
|
113
|
+
serializer: c
|
|
114
|
+
});
|
|
115
|
+
return await d(r, et, "sendRawTransactionSync")({
|
|
116
|
+
serializedTransaction: x,
|
|
117
|
+
throwOnReceiptRevert: F
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
throw (t == null ? void 0 : t.type) === "smart" ? new h({
|
|
121
|
+
metaMessages: [
|
|
122
|
+
"Consider using the `sendUserOperation` Action instead."
|
|
123
|
+
],
|
|
124
|
+
docsPath: "/docs/actions/bundler/sendUserOperation",
|
|
125
|
+
type: "smart"
|
|
126
|
+
}) : new h({
|
|
127
|
+
docsPath: "/docs/actions/wallet/sendTransactionSync",
|
|
128
|
+
type: t == null ? void 0 : t.type
|
|
129
|
+
});
|
|
130
|
+
} catch (a) {
|
|
131
|
+
throw a instanceof h ? a : K(a, {
|
|
132
|
+
...o,
|
|
133
|
+
account: t,
|
|
134
|
+
chain: o.chain || void 0
|
|
75
135
|
});
|
|
76
136
|
}
|
|
77
137
|
}
|
|
78
138
|
export {
|
|
79
|
-
|
|
139
|
+
Tt as sendTransactionSync
|
|
80
140
|
};
|
package/dist/index67.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});async function e(t,s){const{id:a}=s;await t.request({method:"wallet_showCallsStatus",params:[a]})}exports.showCallsStatus=e;
|
package/dist/index67.js
CHANGED
|
@@ -1,16 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const n = u(r, o);
|
|
7
|
-
return n instanceof c ? r : n;
|
|
8
|
-
})();
|
|
9
|
-
return new i(e, {
|
|
10
|
-
docsPath: t,
|
|
11
|
-
...o
|
|
1
|
+
async function e(t, a) {
|
|
2
|
+
const { id: s } = a;
|
|
3
|
+
await t.request({
|
|
4
|
+
method: "wallet_showCallsStatus",
|
|
5
|
+
params: [s]
|
|
12
6
|
});
|
|
13
7
|
}
|
|
14
8
|
export {
|
|
15
|
-
|
|
9
|
+
e as showCallsStatus
|
|
16
10
|
};
|
package/dist/index68.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./index47.cjs"),r=require("./index216.cjs"),e=require("./index57.cjs");async function a(t,n){const{account:i=t.account}=n;if(!i)throw new r.AccountNotFoundError({docsPath:"/docs/eip7702/signAuthorization"});const o=u.parseAccount(i);if(!o.signAuthorization)throw new r.AccountTypeNotSupportedError({docsPath:"/docs/eip7702/signAuthorization",metaMessages:["The `signAuthorization` Action does not support JSON-RPC Accounts."],type:o.type});const c=await e.prepareAuthorization(t,n);return o.signAuthorization(c)}exports.signAuthorization=a;
|
package/dist/index68.js
CHANGED
|
@@ -1,54 +1,24 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
to: e.to ? e.to : null,
|
|
22
|
-
transactionIndex: e.transactionIndex ? Number(e.transactionIndex) : null,
|
|
23
|
-
type: e.type ? u[e.type] : void 0,
|
|
24
|
-
typeHex: e.type ? e.type : void 0,
|
|
25
|
-
value: e.value ? BigInt(e.value) : void 0,
|
|
26
|
-
v: e.v ? BigInt(e.v) : void 0
|
|
27
|
-
};
|
|
28
|
-
return e.authorizationList && (d.authorizationList = l(e.authorizationList)), d.yParity = (() => {
|
|
29
|
-
if (e.yParity)
|
|
30
|
-
return Number(e.yParity);
|
|
31
|
-
if (typeof d.v == "bigint") {
|
|
32
|
-
if (d.v === 0n || d.v === 27n)
|
|
33
|
-
return 0;
|
|
34
|
-
if (d.v === 1n || d.v === 28n)
|
|
35
|
-
return 1;
|
|
36
|
-
if (d.v >= 35n)
|
|
37
|
-
return d.v % 2n === 0n ? 1 : 0;
|
|
38
|
-
}
|
|
39
|
-
})(), d.type === "legacy" && (delete d.accessList, delete d.maxFeePerBlobGas, delete d.maxFeePerGas, delete d.maxPriorityFeePerGas, delete d.yParity), d.type === "eip2930" && (delete d.maxFeePerBlobGas, delete d.maxFeePerGas, delete d.maxPriorityFeePerGas), d.type === "eip1559" && delete d.maxFeePerBlobGas, d;
|
|
40
|
-
}
|
|
41
|
-
function l(e) {
|
|
42
|
-
return e.map((i) => ({
|
|
43
|
-
address: i.address,
|
|
44
|
-
chainId: Number(i.chainId),
|
|
45
|
-
nonce: Number(i.nonce),
|
|
46
|
-
r: i.r,
|
|
47
|
-
s: i.s,
|
|
48
|
-
yParity: Number(i.yParity)
|
|
49
|
-
}));
|
|
1
|
+
import { parseAccount as c } from "./index47.js";
|
|
2
|
+
import { AccountNotFoundError as u, AccountTypeNotSupportedError as a } from "./index216.js";
|
|
3
|
+
import { prepareAuthorization as s } from "./index57.js";
|
|
4
|
+
async function A(t, n) {
|
|
5
|
+
const { account: i = t.account } = n;
|
|
6
|
+
if (!i)
|
|
7
|
+
throw new u({
|
|
8
|
+
docsPath: "/docs/eip7702/signAuthorization"
|
|
9
|
+
});
|
|
10
|
+
const o = c(i);
|
|
11
|
+
if (!o.signAuthorization)
|
|
12
|
+
throw new a({
|
|
13
|
+
docsPath: "/docs/eip7702/signAuthorization",
|
|
14
|
+
metaMessages: [
|
|
15
|
+
"The `signAuthorization` Action does not support JSON-RPC Accounts."
|
|
16
|
+
],
|
|
17
|
+
type: o.type
|
|
18
|
+
});
|
|
19
|
+
const r = await s(t, n);
|
|
20
|
+
return o.signAuthorization(r);
|
|
50
21
|
}
|
|
51
22
|
export {
|
|
52
|
-
|
|
53
|
-
u as transactionType
|
|
23
|
+
A as signAuthorization
|
|
54
24
|
};
|
package/dist/index69.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./index47.cjs"),a=require("./index216.cjs"),o=require("./index116.cjs");async function i(n,{account:e=n.account,message:r}){if(!e)throw new a.AccountNotFoundError({docsPath:"/docs/actions/wallet/signMessage"});const t=c.parseAccount(e);if(t.signMessage)return t.signMessage({message:r});const s=typeof r=="string"?o.stringToHex(r):r.raw instanceof Uint8Array?o.toHex(r.raw):r.raw;return n.request({method:"personal_sign",params:[s,t.address]},{retryCount:0})}exports.signMessage=i;
|
package/dist/index69.js
CHANGED
|
@@ -1,10 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { parseAccount as e } from "./index47.js";
|
|
2
|
+
import { AccountNotFoundError as i } from "./index216.js";
|
|
3
|
+
import { stringToHex as a, toHex as c } from "./index116.js";
|
|
4
|
+
async function g(n, { account: o = n.account, message: r }) {
|
|
5
|
+
if (!o)
|
|
6
|
+
throw new i({
|
|
7
|
+
docsPath: "/docs/actions/wallet/signMessage"
|
|
8
|
+
});
|
|
9
|
+
const t = e(o);
|
|
10
|
+
if (t.signMessage)
|
|
11
|
+
return t.signMessage({ message: r });
|
|
12
|
+
const s = typeof r == "string" ? a(r) : r.raw instanceof Uint8Array ? c(r.raw) : r.raw;
|
|
13
|
+
return n.request({
|
|
14
|
+
method: "personal_sign",
|
|
15
|
+
params: [s, t.address]
|
|
16
|
+
}, { retryCount: 0 });
|
|
7
17
|
}
|
|
8
18
|
export {
|
|
9
|
-
|
|
19
|
+
g as signMessage
|
|
10
20
|
};
|
package/dist/index70.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const q=require("./index47.cjs"),f=require("./index216.cjs"),T=require("./index152.cjs"),C=require("./index116.cjs"),m=require("./index162.cjs"),I=require("./index29.cjs"),w=require("./index178.cjs"),A=require("./index51.cjs");async function R(t,e){var i,u,d,g;const{account:o=t.account,chain:n=t.chain,...c}=e;if(!o)throw new f.AccountNotFoundError({docsPath:"/docs/actions/wallet/signTransaction"});const r=q.parseAccount(o);w.assertRequest({account:r,...e});const a=await I.getAction(t,A.getChainId,"getChainId")({});n!==null&&T.assertCurrentChain({currentChainId:a,chain:n});const s=(n==null?void 0:n.formatters)||((i=t.chain)==null?void 0:i.formatters),h=((u=s==null?void 0:s.transactionRequest)==null?void 0:u.format)||m.formatTransactionRequest;return r.signTransaction?r.signTransaction({...c,chainId:a},{serializer:(g=(d=t.chain)==null?void 0:d.serializers)==null?void 0:g.transaction}):await t.request({method:"eth_signTransaction",params:[{...h({...c,account:r},"signTransaction"),chainId:C.numberToHex(a),from:r.address}]},{retryCount:0})}exports.signTransaction=R;
|
package/dist/index70.js
CHANGED
|
@@ -1,10 +1,46 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { parseAccount as d } from "./index47.js";
|
|
2
|
+
import { AccountNotFoundError as p } from "./index216.js";
|
|
3
|
+
import { assertCurrentChain as g } from "./index152.js";
|
|
4
|
+
import { numberToHex as T } from "./index116.js";
|
|
5
|
+
import { formatTransactionRequest as C } from "./index162.js";
|
|
6
|
+
import { getAction as w } from "./index29.js";
|
|
7
|
+
import { assertRequest as I } from "./index178.js";
|
|
8
|
+
import { getChainId as q } from "./index51.js";
|
|
9
|
+
async function E(t, s) {
|
|
10
|
+
var e, m, u, f;
|
|
11
|
+
const { account: i = t.account, chain: r = t.chain, ...c } = s;
|
|
12
|
+
if (!i)
|
|
13
|
+
throw new p({
|
|
14
|
+
docsPath: "/docs/actions/wallet/signTransaction"
|
|
15
|
+
});
|
|
16
|
+
const o = d(i);
|
|
17
|
+
I({
|
|
18
|
+
account: o,
|
|
19
|
+
...s
|
|
20
|
+
});
|
|
21
|
+
const n = await w(t, q, "getChainId")({});
|
|
22
|
+
r !== null && g({
|
|
23
|
+
currentChainId: n,
|
|
24
|
+
chain: r
|
|
25
|
+
});
|
|
26
|
+
const a = (r == null ? void 0 : r.formatters) || ((e = t.chain) == null ? void 0 : e.formatters), h = ((m = a == null ? void 0 : a.transactionRequest) == null ? void 0 : m.format) || C;
|
|
27
|
+
return o.signTransaction ? o.signTransaction({
|
|
28
|
+
...c,
|
|
29
|
+
chainId: n
|
|
30
|
+
}, { serializer: (f = (u = t.chain) == null ? void 0 : u.serializers) == null ? void 0 : f.transaction }) : await t.request({
|
|
31
|
+
method: "eth_signTransaction",
|
|
32
|
+
params: [
|
|
33
|
+
{
|
|
34
|
+
...h({
|
|
35
|
+
...c,
|
|
36
|
+
account: o
|
|
37
|
+
}, "signTransaction"),
|
|
38
|
+
chainId: T(n),
|
|
39
|
+
from: o.address
|
|
40
|
+
}
|
|
41
|
+
]
|
|
42
|
+
}, { retryCount: 0 });
|
|
7
43
|
}
|
|
8
44
|
export {
|
|
9
|
-
|
|
45
|
+
E as signTransaction
|
|
10
46
|
};
|
package/dist/index71.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./index47.cjs"),y=require("./index216.cjs"),s=require("./index172.cjs");async function p(c,r){const{account:i=c.account,domain:t,message:a,primaryType:e}=r;if(!i)throw new y.AccountNotFoundError({docsPath:"/docs/actions/wallet/signTypedData"});const n=u.parseAccount(i),o={EIP712Domain:s.getTypesForEIP712Domain({domain:t}),...r.types};if(s.validateTypedData({domain:t,message:a,primaryType:e,types:o}),n.signTypedData)return n.signTypedData({domain:t,message:a,primaryType:e,types:o});const d=s.serializeTypedData({domain:t,message:a,primaryType:e,types:o});return c.request({method:"eth_signTypedData_v4",params:[n.address,d]},{retryCount:0})}exports.signTypedData=p;
|
package/dist/index71.js
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
logsBloom: e.logsBloom ? e.logsBloom : null,
|
|
14
|
-
nonce: e.nonce ? e.nonce : null,
|
|
15
|
-
number: e.number ? BigInt(e.number) : null,
|
|
16
|
-
size: e.size ? BigInt(e.size) : void 0,
|
|
17
|
-
timestamp: e.timestamp ? BigInt(e.timestamp) : void 0,
|
|
18
|
-
transactions: s,
|
|
19
|
-
totalDifficulty: e.totalDifficulty ? BigInt(e.totalDifficulty) : null
|
|
1
|
+
import { parseAccount as p } from "./index47.js";
|
|
2
|
+
import { AccountNotFoundError as d } from "./index216.js";
|
|
3
|
+
import { getTypesForEIP712Domain as y, validateTypedData as m, serializeTypedData as u } from "./index172.js";
|
|
4
|
+
async function f(r, s) {
|
|
5
|
+
const { account: c = r.account, domain: t, message: a, primaryType: o } = s;
|
|
6
|
+
if (!c)
|
|
7
|
+
throw new d({
|
|
8
|
+
docsPath: "/docs/actions/wallet/signTypedData"
|
|
9
|
+
});
|
|
10
|
+
const e = p(c), n = {
|
|
11
|
+
EIP712Domain: y({ domain: t }),
|
|
12
|
+
...s.types
|
|
20
13
|
};
|
|
14
|
+
if (m({ domain: t, message: a, primaryType: o, types: n }), e.signTypedData)
|
|
15
|
+
return e.signTypedData({ domain: t, message: a, primaryType: o, types: n });
|
|
16
|
+
const i = u({ domain: t, message: a, primaryType: o, types: n });
|
|
17
|
+
return r.request({
|
|
18
|
+
method: "eth_signTypedData_v4",
|
|
19
|
+
params: [e.address, i]
|
|
20
|
+
}, { retryCount: 0 });
|
|
21
21
|
}
|
|
22
22
|
export {
|
|
23
|
-
|
|
23
|
+
f as signTypedData
|
|
24
24
|
};
|
package/dist/index72.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index116.cjs");async function a(e,{id:t}){await e.request({method:"wallet_switchEthereumChain",params:[{chainId:i.numberToHex(t)}]},{retryCount:0})}exports.switchChain=a;
|
package/dist/index72.js
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { numberToHex as a } from "./index116.js";
|
|
2
|
+
async function i(t, { id: e }) {
|
|
3
|
+
await t.request({
|
|
4
|
+
method: "wallet_switchEthereumChain",
|
|
5
|
+
params: [
|
|
6
|
+
{
|
|
7
|
+
chainId: a(e)
|
|
8
|
+
}
|
|
9
|
+
]
|
|
10
|
+
}, { retryCount: 0 });
|
|
8
11
|
}
|
|
9
12
|
export {
|
|
10
|
-
|
|
13
|
+
i as switchChain
|
|
11
14
|
};
|
package/dist/index73.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});async function a(t,e){return await t.request({method:"wallet_watchAsset",params:e},{retryCount:0})}exports.watchAsset=a;
|
package/dist/index73.js
CHANGED
|
@@ -1,34 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
set: (r) => t.set(s, r)
|
|
7
|
-
}), n = a(o, i), e = a(o, c);
|
|
8
|
-
return {
|
|
9
|
-
clear: () => {
|
|
10
|
-
n.clear(), e.clear();
|
|
11
|
-
},
|
|
12
|
-
promise: n,
|
|
13
|
-
response: e
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
async function l(o, { cacheKey: a, cacheTime: n = Number.POSITIVE_INFINITY }) {
|
|
17
|
-
const e = p(a), s = e.response.get();
|
|
18
|
-
if (s && n > 0 && Date.now() - s.created.getTime() < n)
|
|
19
|
-
return s.data;
|
|
20
|
-
let t = e.promise.get();
|
|
21
|
-
t || (t = o(), e.promise.set(t));
|
|
22
|
-
try {
|
|
23
|
-
const r = await t;
|
|
24
|
-
return e.response.set({ created: /* @__PURE__ */ new Date(), data: r }), r;
|
|
25
|
-
} finally {
|
|
26
|
-
e.promise.clear();
|
|
27
|
-
}
|
|
1
|
+
async function d(t, e) {
|
|
2
|
+
return await t.request({
|
|
3
|
+
method: "wallet_watchAsset",
|
|
4
|
+
params: e
|
|
5
|
+
}, { retryCount: 0 });
|
|
28
6
|
}
|
|
29
7
|
export {
|
|
30
|
-
|
|
31
|
-
i as promiseCache,
|
|
32
|
-
c as responseCache,
|
|
33
|
-
l as withCache
|
|
8
|
+
d as watchAsset
|
|
34
9
|
};
|
package/dist/index74.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index66.cjs"),e=require("./index36.cjs");async function c(n,t){return e.writeContract.internal(n,r.sendTransactionSync,"sendTransactionSync",t)}exports.writeContractSync=c;
|
package/dist/index74.js
CHANGED
|
@@ -1,19 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const { abi: t, address: s, args: c, blockHash: i, eventName: e, fromBlock: m, toBlock: a, strict: f } = r, o = e ? p({ abi: t, name: e }) : void 0, g = o ? void 0 : t.filter((d) => d.type === "event");
|
|
6
|
-
return v(n, l, "getLogs")({
|
|
7
|
-
address: s,
|
|
8
|
-
args: c,
|
|
9
|
-
blockHash: i,
|
|
10
|
-
event: o,
|
|
11
|
-
events: g,
|
|
12
|
-
fromBlock: m,
|
|
13
|
-
toBlock: a,
|
|
14
|
-
strict: f
|
|
15
|
-
});
|
|
1
|
+
import { sendTransactionSync as t } from "./index66.js";
|
|
2
|
+
import { writeContract as o } from "./index36.js";
|
|
3
|
+
async function i(n, r) {
|
|
4
|
+
return o.internal(n, t, "sendTransactionSync", r);
|
|
16
5
|
}
|
|
17
6
|
export {
|
|
18
|
-
|
|
7
|
+
i as writeContractSync
|
|
19
8
|
};
|
package/dist/index75.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index76.cjs"),b=require("./index48.cjs");function l({key:r,methods:e,name:n,request:u,retryCount:i=3,retryDelay:t=150,timeout:c,type:o},s){const d=b.uid();return{config:{key:r,methods:e,name:n,request:u,retryCount:i,retryDelay:t,timeout:c,type:o},request:a.buildRequest(u,{methods:e,retryCount:i,retryDelay:t,uid:d}),value:s}}exports.createTransport=l;
|