@gardenfi/swap 0.1.3-beta.25 → 0.1.3-beta.26
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/index100.cjs +1 -1
- package/dist/index100.js +3 -3
- package/dist/index102.cjs +1 -1
- package/dist/index102.js +1 -1
- package/dist/index105.cjs +1 -1
- package/dist/index105.js +2 -2
- package/dist/index106.cjs +1 -1
- package/dist/index106.js +2 -2
- package/dist/index107.cjs +1 -1
- package/dist/index107.js +10 -10
- package/dist/index108.cjs +1 -1
- package/dist/index108.js +2 -2
- package/dist/index109.cjs +1 -1
- package/dist/index109.js +3 -3
- package/dist/index110.cjs +1 -1
- package/dist/index110.js +2 -2
- package/dist/index112.cjs +1 -1
- package/dist/index112.js +34 -41
- package/dist/index113.cjs +1 -1
- package/dist/index113.js +3 -33
- package/dist/index114.cjs +1 -1
- package/dist/index114.js +9 -3
- package/dist/index115.cjs +1 -1
- package/dist/index115.js +116 -9
- package/dist/index116.cjs +1 -1
- package/dist/index116.js +61 -116
- package/dist/index117.cjs +1 -1
- package/dist/index117.js +20 -57
- package/dist/index118.cjs +1 -1
- package/dist/index118.js +34 -22
- package/dist/index119.cjs +1 -1
- package/dist/index119.js +38 -33
- package/dist/index120.cjs +1 -1
- package/dist/index120.js +55 -38
- package/dist/index121.cjs +1 -1
- package/dist/index121.js +37 -55
- package/dist/index122.cjs +1 -1
- package/dist/index122.js +9 -40
- package/dist/index123.cjs +1 -1
- package/dist/index123.js +30 -8
- package/dist/index124.cjs +1 -1
- package/dist/index124.js +26 -21
- package/dist/index125.cjs +1 -1
- package/dist/index125.js +8 -35
- package/dist/index126.cjs +1 -1
- package/dist/index126.js +28 -8
- package/dist/index127.cjs +1 -1
- package/dist/index127.js +48 -27
- package/dist/index128.cjs +1 -1
- package/dist/index128.js +67 -47
- package/dist/index129.cjs +1 -1
- package/dist/index129.js +38 -67
- package/dist/index130.cjs +1 -1
- package/dist/index130.js +74 -38
- package/dist/index131.cjs +1 -1
- package/dist/index131.js +8 -77
- package/dist/index132.cjs +1 -1
- package/dist/index132.js +5 -7
- package/dist/index133.cjs +1 -1
- package/dist/index133.js +17 -6
- package/dist/index134.cjs +1 -1
- package/dist/index134.js +8 -17
- package/dist/index135.cjs +1 -1
- package/dist/index135.js +13 -8
- package/dist/index136.cjs +1 -1
- package/dist/index136.js +7 -13
- package/dist/index137.cjs +1 -1
- package/dist/index137.js +16 -7
- package/dist/index138.cjs +1 -1
- package/dist/index138.js +46 -16
- package/dist/index139.cjs +1 -1
- package/dist/index139.js +13 -46
- package/dist/index140.cjs +1 -1
- package/dist/index140.js +16 -13
- package/dist/index141.cjs +1 -1
- package/dist/index141.js +11 -14
- package/dist/index142.cjs +1 -1
- package/dist/index142.js +6 -13
- package/dist/index143.cjs +1 -1
- package/dist/index143.js +34 -5
- package/dist/index144.cjs +1 -1
- package/dist/index144.js +8 -34
- package/dist/index145.cjs +1 -1
- package/dist/index145.js +7 -8
- package/dist/index146.cjs +1 -1
- package/dist/index146.js +29 -8
- package/dist/index147.cjs +1 -1
- package/dist/index147.js +10 -29
- package/dist/index148.cjs +1 -1
- package/dist/index148.js +14 -10
- package/dist/index149.cjs +1 -1
- package/dist/index149.js +12 -14
- package/dist/index150.cjs +1 -1
- package/dist/index150.js +121 -12
- package/dist/index151.cjs +1 -1
- package/dist/index151.js +79 -118
- package/dist/index152.cjs +1 -1
- package/dist/index152.js +176 -81
- package/dist/index153.cjs +1 -1
- package/dist/index153.js +41 -174
- package/dist/index154.cjs +1 -1
- package/dist/index154.js +6 -44
- package/dist/index155.cjs +1 -1
- package/dist/index155.js +13 -5
- package/dist/index156.cjs +1 -1
- package/dist/index156.js +12 -12
- package/dist/index157.cjs +1 -1
- package/dist/index157.js +103 -14
- package/dist/index158.cjs +1 -1
- package/dist/index158.js +72 -100
- package/dist/index159.cjs +1 -1
- package/dist/index159.js +78 -64
- package/dist/index160.cjs +1 -1
- package/dist/index160.js +138 -76
- package/dist/index161.cjs +1 -1
- package/dist/index161.js +102 -115
- package/dist/index162.cjs +1 -1
- package/dist/index162.js +47 -116
- package/dist/index163.cjs +1 -1
- package/dist/index163.js +23 -69
- package/dist/index164.cjs +1 -1
- package/dist/index164.js +164 -23
- package/dist/index165.cjs +1 -1
- package/dist/index165.js +6 -164
- package/dist/index166.cjs +1 -1
- package/dist/index166.js +13 -6
- package/dist/index167.cjs +1 -1
- package/dist/index167.js +19 -13
- package/dist/index168.cjs +1 -1
- package/dist/index168.js +105 -18
- package/dist/index169.cjs +1 -1
- package/dist/index169.js +77 -105
- package/dist/index170.cjs +1 -1
- package/dist/index170.js +8 -77
- package/dist/index171.cjs +1 -1
- package/dist/index171.js +27 -8
- package/dist/index172.cjs +1 -1
- package/dist/index172.js +87 -25
- package/dist/index173.cjs +1 -1
- package/dist/index173.js +3 -91
- package/dist/index174.cjs +1 -1
- package/dist/index174.js +2 -3
- package/dist/index175.cjs +2 -1
- package/dist/index175.js +3 -2
- package/dist/index176.cjs +1 -2
- package/dist/index176.js +9 -3
- package/dist/index177.cjs +20 -1
- package/dist/index177.js +327 -9
- package/dist/index178.cjs +1 -20
- package/dist/index178.js +11 -324
- package/dist/index179.cjs +2 -1
- package/dist/index179.js +58 -12
- package/dist/index180.cjs +1 -2
- package/dist/index180.js +2 -60
- package/dist/index181.cjs +1 -1
- package/dist/index181.js +8 -2
- package/dist/index182.cjs +1 -1
- package/dist/index182.js +32 -8
- package/dist/index183.cjs +1 -1
- package/dist/index183.js +22 -32
- package/dist/index184.cjs +1 -1
- package/dist/index184.js +5 -21
- package/dist/index185.cjs +1 -1
- package/dist/index185.js +73 -5
- package/dist/index186.cjs +1 -1
- package/dist/index186.js +5 -73
- package/dist/index187.cjs +1 -1
- package/dist/index187.js +4 -4
- package/dist/index188.cjs +9 -1
- package/dist/index188.js +35 -5
- package/dist/index189.cjs +2 -9
- package/dist/index189.js +113 -28
- package/dist/index190.cjs +1 -2
- package/dist/index190.js +3 -121
- package/dist/index191.cjs +1 -1
- package/dist/index191.js +19 -3
- package/dist/index192.cjs +1 -1
- package/dist/index192.js +28 -13
- package/dist/index193.cjs +1 -1
- package/dist/index193.js +33 -31
- package/dist/index194.cjs +1 -1
- package/dist/index194.js +21 -33
- package/dist/index195.cjs +1 -1
- package/dist/index195.js +5 -20
- package/dist/index196.cjs +4 -1
- package/dist/index196.js +192 -6
- package/dist/index197.cjs +1 -4
- package/dist/index197.js +2 -195
- package/dist/index198.cjs +3 -1
- package/dist/index198.js +452 -2
- package/dist/index199.cjs +1 -3
- package/dist/index199.js +19 -443
- package/dist/index200.cjs +1 -1
- package/dist/index200.js +153 -19
- package/dist/index201.cjs +1 -1
- package/dist/index201.js +124 -158
- package/dist/index202.cjs +1 -1
- package/dist/index202.js +38 -127
- package/dist/index203.cjs +1 -1
- package/dist/index203.js +24 -35
- package/dist/index204.cjs +1 -1
- package/dist/index204.js +52 -24
- package/dist/index205.cjs +1 -1
- package/dist/index205.js +191 -55
- package/dist/index206.cjs +1 -1
- package/dist/index206.js +4 -192
- package/dist/index207.cjs +1 -1
- package/dist/index207.js +74 -4
- package/dist/index208.cjs +1 -1
- package/dist/index208.js +16 -69
- package/dist/index209.cjs +1 -1
- package/dist/index209.js +3 -21
- package/dist/index210.cjs +1 -1
- package/dist/index210.js +17 -3
- package/dist/index211.cjs +1 -1
- package/dist/index211.js +23 -16
- package/dist/index212.cjs +1 -1
- package/dist/index212.js +33 -22
- package/dist/index213.cjs +1 -1
- package/dist/index213.js +3 -35
- package/dist/index214.cjs +1 -1
- package/dist/index214.js +28 -3
- package/dist/index215.cjs +1 -1
- package/dist/index215.js +34 -25
- package/dist/index216.cjs +1 -1
- package/dist/index216.js +8 -36
- package/dist/index217.cjs +1 -1
- package/dist/index217.js +25 -8
- package/dist/index218.cjs +1 -1
- package/dist/index218.js +23 -20
- package/dist/index219.cjs +1 -1
- package/dist/index219.js +74 -27
- package/dist/index220.cjs +1 -1
- package/dist/index220.js +19 -73
- package/dist/index221.cjs +1 -1
- package/dist/index221.js +8 -21
- package/dist/index222.cjs +1 -1
- package/dist/index222.js +10 -8
- package/dist/index223.cjs +1 -1
- package/dist/index223.js +11 -10
- package/dist/index224.cjs +1 -1
- package/dist/index224.js +6 -11
- package/dist/index225.cjs +1 -1
- package/dist/index225.js +6 -6
- package/dist/index226.cjs +1 -1
- package/dist/index226.js +13 -6
- package/dist/index227.cjs +1 -1
- package/dist/index227.js +31 -12
- package/dist/index228.cjs +1 -1
- package/dist/index228.js +5 -33
- package/dist/index229.cjs +1 -1
- package/dist/index229.js +38 -5
- package/dist/index230.cjs +1 -1
- package/dist/index230.js +106 -32
- package/dist/index231.cjs +1 -1
- package/dist/index231.js +44 -106
- package/dist/index232.cjs +1 -1
- package/dist/index232.js +31 -48
- package/dist/index233.cjs +1 -1
- package/dist/index233.js +8 -32
- package/dist/index234.cjs +1 -1
- package/dist/index234.js +7 -8
- package/dist/index235.cjs +1 -1
- package/dist/index235.js +16 -7
- package/dist/index236.cjs +1 -1
- package/dist/index236.js +22 -16
- package/dist/index237.cjs +1 -1
- package/dist/index237.js +104 -22
- package/dist/index238.cjs +1 -1
- package/dist/index238.js +3 -105
- package/dist/index239.cjs +1 -1
- package/dist/index239.js +6 -3
- package/dist/index240.cjs +1 -1
- package/dist/index240.js +31 -5
- package/dist/index241.cjs +1 -1
- package/dist/index241.js +20 -31
- package/dist/index242.cjs +1 -1
- package/dist/index242.js +3 -20
- package/dist/index243.cjs +1 -1
- package/dist/index243.js +17 -3
- package/dist/index244.cjs +1 -1
- package/dist/index244.js +5 -17
- package/dist/index245.cjs +1 -1
- package/dist/index245.js +8 -5
- package/dist/index246.cjs +1 -1
- package/dist/index246.js +103 -8
- package/dist/index247.cjs +1 -1
- package/dist/index247.js +60 -99
- package/dist/index248.cjs +1 -1
- package/dist/index248.js +6 -64
- package/dist/index249.cjs +1 -1
- package/dist/index249.js +27 -6
- package/dist/index250.cjs +1 -1
- package/dist/index250.js +34 -27
- package/dist/index251.cjs +1 -1
- package/dist/index251.js +16 -34
- package/dist/index252.cjs +1 -1
- package/dist/index252.js +76 -14
- package/dist/index253.cjs +1 -1
- package/dist/index253.js +2 -79
- package/dist/index254.cjs +1 -1
- package/dist/index254.js +15 -2
- package/dist/index255.cjs +1 -1
- package/dist/index255.js +18 -14
- package/dist/index256.cjs +1 -1
- package/dist/index256.js +14 -15
- package/dist/index257.cjs +1 -1
- package/dist/index257.js +10 -17
- package/dist/index258.cjs +1 -1
- package/dist/index258.js +79 -10
- package/dist/index259.cjs +1 -1
- package/dist/index259.js +3 -80
- package/dist/index260.cjs +1 -1
- package/dist/index260.js +33 -3
- package/dist/index261.cjs +1 -1
- package/dist/index261.js +111 -28
- package/dist/index262.cjs +1 -1
- package/dist/index262.js +4 -116
- package/dist/index263.cjs +1 -1
- package/dist/index263.js +16 -4
- package/dist/index264.cjs +1 -1
- package/dist/index264.js +10 -14
- package/dist/index265.cjs +1 -1
- package/dist/index265.js +18 -11
- package/dist/index266.cjs +1 -1
- package/dist/index266.js +57 -17
- package/dist/index267.cjs +1 -1
- package/dist/index267.js +19 -57
- package/dist/index268.cjs +1 -1
- package/dist/index268.js +14 -21
- package/dist/index269.cjs +1 -1
- package/dist/index269.js +284 -13
- package/dist/index270.cjs +1 -1
- package/dist/index270.js +545 -256
- package/dist/index271.cjs +1 -1
- package/dist/index271.js +37 -570
- package/dist/index272.cjs +1 -1
- package/dist/index272.js +1 -1
- package/dist/index273.cjs +1 -1
- package/dist/index273.js +2 -2
- package/dist/index275.cjs +1 -1
- package/dist/index275.js +9 -174
- package/dist/index276.cjs +1 -2
- package/dist/index276.js +30 -91
- package/dist/index277.cjs +1 -1
- package/dist/index277.js +2 -41
- package/dist/index278.cjs +1 -1
- package/dist/index278.js +47 -4
- package/dist/index279.cjs +1 -1
- package/dist/index279.js +11 -9
- package/dist/index280.cjs +1 -1
- package/dist/index280.js +174 -30
- package/dist/index281.cjs +2 -1
- package/dist/index281.js +92 -2
- package/dist/index282.cjs +1 -1
- package/dist/index282.js +38 -45
- package/dist/index283.cjs +1 -1
- package/dist/index283.js +4 -11
- package/dist/index284.cjs +1 -1
- package/dist/index284.js +3 -3
- package/dist/index303.cjs +1 -1
- package/dist/index303.js +1 -1
- package/dist/index306.cjs +1 -1
- package/dist/index306.js +1 -1
- package/dist/index307.cjs +1 -1
- package/dist/index307.js +2 -2
- package/dist/index309.cjs +1 -1
- package/dist/index309.js +2 -2
- package/dist/index310.cjs +1 -1
- package/dist/index310.js +2 -2
- package/dist/index311.cjs +1 -1
- package/dist/index311.js +1 -1
- package/dist/index314.cjs +1 -1
- package/dist/index314.js +1 -1
- package/dist/index315.cjs +1 -1
- package/dist/index315.js +1 -1
- package/dist/index318.cjs +1 -1
- package/dist/index318.js +1 -1
- package/dist/index323.cjs +1 -1
- package/dist/index323.js +7 -7
- package/dist/index324.cjs +1 -1
- package/dist/index324.js +7 -27
- package/dist/index325.cjs +1 -1
- package/dist/index325.js +26 -6
- package/dist/index327.cjs +1 -1
- package/dist/index327.js +1 -1
- package/dist/index329.cjs +1 -1
- package/dist/index329.js +3 -3
- package/dist/index331.cjs +1 -1
- package/dist/index331.js +2 -2
- package/dist/index332.cjs +1 -1
- package/dist/index332.js +1 -1
- package/dist/index333.cjs +1 -1
- package/dist/index333.js +2 -2
- package/dist/index335.cjs +1 -1
- package/dist/index335.js +2 -2
- package/dist/index338.cjs +1 -1
- package/dist/index338.js +1 -1
- package/dist/index339.cjs +1 -1
- package/dist/index339.js +3 -3
- package/dist/index340.cjs +1 -1
- package/dist/index340.js +1 -1
- package/dist/index341.cjs +1 -1
- package/dist/index341.js +1 -1
- package/dist/index342.cjs +1 -1
- package/dist/index342.js +3 -3
- package/dist/index345.cjs +1 -1
- package/dist/index345.js +2 -2
- package/dist/index346.cjs +1 -1
- package/dist/index346.js +3 -3
- package/dist/index347.cjs +1 -1
- package/dist/index347.js +5 -5
- package/dist/index350.cjs +1 -1
- package/dist/index350.js +2 -2
- package/dist/index351.cjs +1 -1
- package/dist/index351.js +3 -3
- package/dist/index353.cjs +1 -1
- package/dist/index353.js +2 -2
- package/dist/index354.cjs +1 -1
- package/dist/index354.js +1 -1
- package/dist/index355.cjs +1 -1
- package/dist/index355.js +2 -2
- package/dist/index356.cjs +1 -1
- package/dist/index356.js +1 -1
- package/dist/index358.cjs +1 -1
- package/dist/index358.js +14 -16
- package/dist/index359.cjs +1 -1
- package/dist/index359.js +16 -14
- package/dist/index360.cjs +1 -1
- package/dist/index360.js +8 -205
- package/dist/index362.cjs +1 -1
- package/dist/index362.js +205 -8
- package/dist/index365.cjs +1 -1
- package/dist/index365.js +1 -1
- package/dist/index366.cjs +1 -1
- package/dist/index366.js +2 -2
- package/dist/index370.cjs +1 -1
- package/dist/index370.js +1 -1
- package/dist/index371.cjs +1 -1
- package/dist/index371.js +1 -1
- package/dist/index376.cjs +1 -1
- package/dist/index376.js +274 -72
- package/dist/index377.cjs +1 -1
- package/dist/index377.js +171 -32
- package/dist/index378.cjs +1 -1
- package/dist/index378.js +10 -6
- package/dist/index379.cjs +1 -1
- package/dist/index379.js +105 -273
- package/dist/index380.cjs +1 -1
- package/dist/index380.js +6 -171
- package/dist/index381.cjs +1 -1
- package/dist/index381.js +74 -10
- package/dist/index382.cjs +1 -1
- package/dist/index382.js +9 -107
- package/dist/index383.cjs +1 -1
- package/dist/index383.js +31 -9
- package/dist/index386.cjs +1 -1
- package/dist/index386.js +1 -1
- package/dist/index44.cjs +1 -1
- package/dist/index44.js +2 -2
- package/dist/index45.cjs +1 -1
- package/dist/index45.js +5 -5
- package/dist/index70.cjs +1 -1
- package/dist/index70.js +1 -1
- package/dist/index79.cjs +1 -1
- package/dist/index79.js +10 -10
- package/dist/index80.cjs +1 -1
- package/dist/index80.js +2 -2
- package/dist/index81.cjs +1 -1
- package/dist/index81.js +1 -1
- package/dist/index82.cjs +1 -1
- package/dist/index82.js +1 -1
- package/dist/index84.cjs +1 -1
- package/dist/index84.js +1 -1
- package/dist/index85.cjs +1 -1
- package/dist/index85.js +3 -3
- package/dist/index86.cjs +1 -1
- package/dist/index86.js +9 -9
- package/dist/index88.cjs +1 -1
- package/dist/index88.js +1 -1
- package/dist/index89.cjs +1 -1
- package/dist/index89.js +1 -1
- package/dist/index97.cjs +1 -1
- package/dist/index97.js +13 -13
- package/dist/index98.cjs +1 -1
- package/dist/index98.js +2 -2
- package/dist/index99.cjs +1 -1
- package/dist/index99.js +2 -2
- package/package.json +5 -5
package/dist/index129.js
CHANGED
|
@@ -1,73 +1,44 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
var c, u, f;
|
|
13
|
-
const { account: m = r.account, prepare: a = !0 } = t, e = m ? F(m) : void 0, b = (() => {
|
|
14
|
-
if (Array.isArray(a))
|
|
15
|
-
return a;
|
|
16
|
-
if ((e == null ? void 0 : e.type) !== "local")
|
|
17
|
-
return ["blobVersionedHashes"];
|
|
18
|
-
})();
|
|
1
|
+
import { Eip1559FeesNotSupportedError as y } from "./index194.js";
|
|
2
|
+
import { hexToBigInt as p } from "./index74.js";
|
|
3
|
+
import { getAction as n } from "./index104.js";
|
|
4
|
+
import { getBlock as c } from "./index133.js";
|
|
5
|
+
import { getGasPrice as F } from "./index142.js";
|
|
6
|
+
async function k(e, i) {
|
|
7
|
+
return G(e, i);
|
|
8
|
+
}
|
|
9
|
+
async function G(e, i) {
|
|
10
|
+
var P, m;
|
|
11
|
+
const { block: a, chain: t = e.chain, request: u } = i || {};
|
|
19
12
|
try {
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
return i;
|
|
36
|
-
const n = (typeof p == "bigint" ? E(p) : void 0) || q, h = S(P);
|
|
37
|
-
V(t);
|
|
38
|
-
const d = (f = (u = (c = r.chain) == null ? void 0 : c.formatters) == null ? void 0 : u.transactionRequest) == null ? void 0 : f.format, s = (d || _)({
|
|
39
|
-
// Pick out extra data that might exist on the chain's transaction request type.
|
|
40
|
-
...O(T, { format: d }),
|
|
41
|
-
account: e,
|
|
42
|
-
accessList: l,
|
|
43
|
-
authorizationList: x,
|
|
44
|
-
blobs: y,
|
|
45
|
-
blobVersionedHashes: z,
|
|
46
|
-
data: w,
|
|
47
|
-
gasPrice: G,
|
|
48
|
-
maxFeePerBlobGas: k,
|
|
49
|
-
maxFeePerGas: L,
|
|
50
|
-
maxPriorityFeePerGas: v,
|
|
51
|
-
nonce: A,
|
|
52
|
-
to: o,
|
|
53
|
-
value: H
|
|
54
|
-
}, "estimateGas");
|
|
55
|
-
return BigInt(await r.request({
|
|
56
|
-
method: "eth_estimateGas",
|
|
57
|
-
params: h ? [
|
|
58
|
-
s,
|
|
59
|
-
n ?? r.experimental_blockTag ?? "latest",
|
|
60
|
-
h
|
|
61
|
-
] : n ? [s, n] : [s]
|
|
62
|
-
}));
|
|
63
|
-
} catch (o) {
|
|
64
|
-
throw N(o, {
|
|
65
|
-
...t,
|
|
66
|
-
account: e,
|
|
67
|
-
chain: r.chain
|
|
13
|
+
const r = ((P = t == null ? void 0 : t.fees) == null ? void 0 : P.maxPriorityFeePerGas) ?? ((m = t == null ? void 0 : t.fees) == null ? void 0 : m.defaultPriorityFee);
|
|
14
|
+
if (typeof r == "function") {
|
|
15
|
+
const o = a || await n(e, c, "getBlock")({}), f = await r({
|
|
16
|
+
block: o,
|
|
17
|
+
client: e,
|
|
18
|
+
request: u
|
|
19
|
+
});
|
|
20
|
+
if (f === null)
|
|
21
|
+
throw new Error();
|
|
22
|
+
return f;
|
|
23
|
+
}
|
|
24
|
+
if (typeof r < "u")
|
|
25
|
+
return r;
|
|
26
|
+
const s = await e.request({
|
|
27
|
+
method: "eth_maxPriorityFeePerGas"
|
|
68
28
|
});
|
|
29
|
+
return p(s);
|
|
30
|
+
} catch {
|
|
31
|
+
const [r, s] = await Promise.all([
|
|
32
|
+
a ? Promise.resolve(a) : n(e, c, "getBlock")({}),
|
|
33
|
+
n(e, F, "getGasPrice")({})
|
|
34
|
+
]);
|
|
35
|
+
if (typeof r.baseFeePerGas != "bigint")
|
|
36
|
+
throw new y();
|
|
37
|
+
const o = s - r.baseFeePerGas;
|
|
38
|
+
return o < 0n ? 0n : o;
|
|
69
39
|
}
|
|
70
40
|
}
|
|
71
41
|
export {
|
|
72
|
-
|
|
42
|
+
k as estimateMaxPriorityFeePerGas,
|
|
43
|
+
G as internal_estimateMaxPriorityFeePerGas
|
|
73
44
|
};
|
package/dist/index130.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 y=require("./index113.cjs"),j=require("./index194.cjs"),z=require("./index310.cjs"),N=require("./index274.cjs"),O=require("./index76.cjs"),V=require("./index111.cjs"),h=require("./index104.cjs"),$=require("./index251.cjs"),D=require("./index133.cjs"),J=require("./index136.cjs");async function K(r,a){var P,g,m,d,F;const{account:s=r.account,accessList:w,authorizationList:B,chain:t=r.chain,blobVersionedHashes:T,blobs:I,data:M,gas:k,gasPrice:A,maxFeePerBlobGas:p,maxFeePerGas:R,maxPriorityFeePerGas:S,nonce:n,nonceManager:u,to:v,type:C,value:E,..._}=a,H=await(async()=>{if(!s||!u||typeof n<"u")return n;const o=y.parseAccount(s),x=t?t.id:await h.getAction(r,J.getChainId,"getChainId")({});return await u.consume({address:o.address,chainId:x,client:r})})();$.assertRequest(a);const f=(g=(P=t==null?void 0:t.formatters)==null?void 0:P.transactionRequest)==null?void 0:g.format,l=(f||V.formatTransactionRequest)({...N.extract(_,{format:f}),account:s?y.parseAccount(s):void 0,accessList:w,authorizationList:B,blobs:I,blobVersionedHashes:T,data:M,gas:k,gasPrice:A,maxFeePerBlobGas:p,maxFeePerGas:R,maxPriorityFeePerGas:S,nonce:H,to:v,type:C,value:E},"fillTransaction");try{const o=await r.request({method:"eth_fillTransaction",params:[l]}),e=(((d=(m=t==null?void 0:t.formatters)==null?void 0:m.transaction)==null?void 0:d.format)||O.formatTransaction)(o.tx);delete e.blockHash,delete e.blockNumber,delete e.r,delete e.s,delete e.transactionIndex,delete e.v,delete e.yParity,e.data=e.input,e.gas&&(e.gas=a.gas??e.gas),e.gasPrice&&(e.gasPrice=a.gasPrice??e.gasPrice),e.maxFeePerBlobGas&&(e.maxFeePerBlobGas=a.maxFeePerBlobGas??e.maxFeePerBlobGas),e.maxFeePerGas&&(e.maxFeePerGas=a.maxFeePerGas??e.maxFeePerGas),e.maxPriorityFeePerGas&&(e.maxPriorityFeePerGas=a.maxPriorityFeePerGas??e.maxPriorityFeePerGas),e.nonce&&(e.nonce=a.nonce??e.nonce);const c=await(async()=>{var i,q;if(typeof((i=t==null?void 0:t.fees)==null?void 0:i.baseFeeMultiplier)=="function"){const L=await h.getAction(r,D.getBlock,"getBlock")({});return t.fees.baseFeeMultiplier({block:L,client:r,request:a})}return((q=t==null?void 0:t.fees)==null?void 0:q.baseFeeMultiplier)??1.2})();if(c<1)throw new j.BaseFeeScalarError;const G=10**(((F=c.toString().split(".")[1])==null?void 0:F.length)??0),b=i=>i*BigInt(Math.ceil(c*G))/BigInt(G);return e.maxFeePerGas&&!a.maxFeePerGas&&(e.maxFeePerGas=b(e.maxFeePerGas)),e.gasPrice&&!a.gasPrice&&(e.gasPrice=b(e.gasPrice)),{raw:o.raw,transaction:{from:l.from,...e}}}catch(o){throw z.getTransactionError(o,{...a,chain:r.chain})}}exports.fillTransaction=K;
|
package/dist/index130.js
CHANGED
|
@@ -1,44 +1,80 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
import { parseAccount as p } from "./index113.js";
|
|
2
|
+
import { BaseFeeScalarError as z } from "./index194.js";
|
|
3
|
+
import { getTransactionError as N } from "./index310.js";
|
|
4
|
+
import { extract as V } from "./index274.js";
|
|
5
|
+
import { formatTransaction as j } from "./index76.js";
|
|
6
|
+
import { formatTransactionRequest as D } from "./index111.js";
|
|
7
|
+
import { getAction as w } from "./index104.js";
|
|
8
|
+
import { assertRequest as J } from "./index251.js";
|
|
9
|
+
import { getBlock as K } from "./index133.js";
|
|
10
|
+
import { getChainId as O } from "./index136.js";
|
|
11
|
+
async function se(r, a) {
|
|
12
|
+
var P, u, d, g, F;
|
|
13
|
+
const { account: s = r.account, accessList: h, authorizationList: B, chain: t = r.chain, blobVersionedHashes: q, blobs: I, data: M, gas: T, gasPrice: k, maxFeePerBlobGas: R, maxFeePerGas: _, maxPriorityFeePerGas: v, nonce: i, nonceManager: m, to: A, type: C, value: E, ...H } = a, L = await (async () => {
|
|
14
|
+
if (!s || !m || typeof i < "u")
|
|
15
|
+
return i;
|
|
16
|
+
const o = p(s), x = t ? t.id : await w(r, O, "getChainId")({});
|
|
17
|
+
return await m.consume({
|
|
18
|
+
address: o.address,
|
|
19
|
+
chainId: x,
|
|
20
|
+
client: r
|
|
21
|
+
});
|
|
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");
|
|
12
43
|
try {
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
if (
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
44
|
+
const o = await r.request({
|
|
45
|
+
method: "eth_fillTransaction",
|
|
46
|
+
params: [l]
|
|
47
|
+
}), e = (((g = (d = t == null ? void 0 : t.formatters) == null ? void 0 : d.transaction) == null ? void 0 : g.format) || j)(o.tx);
|
|
48
|
+
delete e.blockHash, delete e.blockNumber, delete e.r, delete e.s, delete e.transactionIndex, delete e.v, delete e.yParity, e.data = e.input, e.gas && (e.gas = a.gas ?? e.gas), e.gasPrice && (e.gasPrice = a.gasPrice ?? e.gasPrice), e.maxFeePerBlobGas && (e.maxFeePerBlobGas = a.maxFeePerBlobGas ?? e.maxFeePerBlobGas), e.maxFeePerGas && (e.maxFeePerGas = a.maxFeePerGas ?? e.maxFeePerGas), e.maxPriorityFeePerGas && (e.maxPriorityFeePerGas = a.maxPriorityFeePerGas ?? e.maxPriorityFeePerGas), e.nonce && (e.nonce = a.nonce ?? e.nonce);
|
|
49
|
+
const c = await (async () => {
|
|
50
|
+
var n, y;
|
|
51
|
+
if (typeof ((n = t == null ? void 0 : t.fees) == null ? void 0 : n.baseFeeMultiplier) == "function") {
|
|
52
|
+
const S = await w(r, K, "getBlock")({});
|
|
53
|
+
return t.fees.baseFeeMultiplier({
|
|
54
|
+
block: S,
|
|
55
|
+
client: r,
|
|
56
|
+
request: a
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
return ((y = t == null ? void 0 : t.fees) == null ? void 0 : y.baseFeeMultiplier) ?? 1.2;
|
|
60
|
+
})();
|
|
61
|
+
if (c < 1)
|
|
62
|
+
throw new z();
|
|
63
|
+
const G = 10 ** (((F = c.toString().split(".")[1]) == null ? void 0 : F.length) ?? 0), b = (n) => n * BigInt(Math.ceil(c * G)) / BigInt(G);
|
|
64
|
+
return e.maxFeePerGas && !a.maxFeePerGas && (e.maxFeePerGas = b(e.maxFeePerGas)), e.gasPrice && !a.gasPrice && (e.gasPrice = b(e.gasPrice)), {
|
|
65
|
+
raw: o.raw,
|
|
66
|
+
transaction: {
|
|
67
|
+
from: l.from,
|
|
68
|
+
...e
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
} catch (o) {
|
|
72
|
+
throw N(o, {
|
|
73
|
+
...a,
|
|
74
|
+
chain: r.chain
|
|
28
75
|
});
|
|
29
|
-
return p(s);
|
|
30
|
-
} catch {
|
|
31
|
-
const [r, s] = await Promise.all([
|
|
32
|
-
a ? Promise.resolve(a) : n(e, c, "getBlock")({}),
|
|
33
|
-
n(e, F, "getGasPrice")({})
|
|
34
|
-
]);
|
|
35
|
-
if (typeof r.baseFeePerGas != "bigint")
|
|
36
|
-
throw new y();
|
|
37
|
-
const o = s - r.baseFeePerGas;
|
|
38
|
-
return o < 0n ? 0n : o;
|
|
39
76
|
}
|
|
40
77
|
}
|
|
41
78
|
export {
|
|
42
|
-
|
|
43
|
-
G as internal_estimateMaxPriorityFeePerGas
|
|
79
|
+
se as fillTransaction
|
|
44
80
|
};
|
package/dist/index131.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("./index84.cjs");async function i(e,{address:a,blockNumber:t,blockTag:n=e.experimental_blockTag??"latest"}){const o=typeof t=="bigint"?c.numberToHex(t):void 0,r=await e.request({method:"eth_getBalance",params:[a,o||n]});return BigInt(r)}exports.getBalance=i;
|
package/dist/index131.js
CHANGED
|
@@ -1,80 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import { assertRequest as J } from "./index252.js";
|
|
9
|
-
import { getBlock as K } from "./index134.js";
|
|
10
|
-
import { getChainId as O } from "./index137.js";
|
|
11
|
-
async function se(r, a) {
|
|
12
|
-
var P, u, d, g, F;
|
|
13
|
-
const { account: s = r.account, accessList: h, authorizationList: B, chain: t = r.chain, blobVersionedHashes: q, blobs: I, data: M, gas: T, gasPrice: k, maxFeePerBlobGas: R, maxFeePerGas: _, maxPriorityFeePerGas: v, nonce: i, nonceManager: m, to: A, type: C, value: E, ...H } = a, L = await (async () => {
|
|
14
|
-
if (!s || !m || typeof i < "u")
|
|
15
|
-
return i;
|
|
16
|
-
const o = p(s), x = t ? t.id : await w(r, O, "getChainId")({});
|
|
17
|
-
return await m.consume({
|
|
18
|
-
address: o.address,
|
|
19
|
-
chainId: x,
|
|
20
|
-
client: r
|
|
21
|
-
});
|
|
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");
|
|
43
|
-
try {
|
|
44
|
-
const o = await r.request({
|
|
45
|
-
method: "eth_fillTransaction",
|
|
46
|
-
params: [l]
|
|
47
|
-
}), e = (((g = (d = t == null ? void 0 : t.formatters) == null ? void 0 : d.transaction) == null ? void 0 : g.format) || j)(o.tx);
|
|
48
|
-
delete e.blockHash, delete e.blockNumber, delete e.r, delete e.s, delete e.transactionIndex, delete e.v, delete e.yParity, e.data = e.input, e.gas && (e.gas = a.gas ?? e.gas), e.gasPrice && (e.gasPrice = a.gasPrice ?? e.gasPrice), e.maxFeePerBlobGas && (e.maxFeePerBlobGas = a.maxFeePerBlobGas ?? e.maxFeePerBlobGas), e.maxFeePerGas && (e.maxFeePerGas = a.maxFeePerGas ?? e.maxFeePerGas), e.maxPriorityFeePerGas && (e.maxPriorityFeePerGas = a.maxPriorityFeePerGas ?? e.maxPriorityFeePerGas), e.nonce && (e.nonce = a.nonce ?? e.nonce);
|
|
49
|
-
const c = await (async () => {
|
|
50
|
-
var n, y;
|
|
51
|
-
if (typeof ((n = t == null ? void 0 : t.fees) == null ? void 0 : n.baseFeeMultiplier) == "function") {
|
|
52
|
-
const S = await w(r, K, "getBlock")({});
|
|
53
|
-
return t.fees.baseFeeMultiplier({
|
|
54
|
-
block: S,
|
|
55
|
-
client: r,
|
|
56
|
-
request: a
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
return ((y = t == null ? void 0 : t.fees) == null ? void 0 : y.baseFeeMultiplier) ?? 1.2;
|
|
60
|
-
})();
|
|
61
|
-
if (c < 1)
|
|
62
|
-
throw new z();
|
|
63
|
-
const G = 10 ** (((F = c.toString().split(".")[1]) == null ? void 0 : F.length) ?? 0), b = (n) => n * BigInt(Math.ceil(c * G)) / BigInt(G);
|
|
64
|
-
return e.maxFeePerGas && !a.maxFeePerGas && (e.maxFeePerGas = b(e.maxFeePerGas)), e.gasPrice && !a.gasPrice && (e.gasPrice = b(e.gasPrice)), {
|
|
65
|
-
raw: o.raw,
|
|
66
|
-
transaction: {
|
|
67
|
-
from: l.from,
|
|
68
|
-
...e
|
|
69
|
-
}
|
|
70
|
-
};
|
|
71
|
-
} catch (o) {
|
|
72
|
-
throw N(o, {
|
|
73
|
-
...a,
|
|
74
|
-
chain: r.chain
|
|
75
|
-
});
|
|
76
|
-
}
|
|
1
|
+
import { numberToHex as c } from "./index84.js";
|
|
2
|
+
async function m(e, { address: a, blockNumber: t, blockTag: n = e.experimental_blockTag ?? "latest" }) {
|
|
3
|
+
const o = typeof t == "bigint" ? c(t) : void 0, r = await e.request({
|
|
4
|
+
method: "eth_getBalance",
|
|
5
|
+
params: [a, o || n]
|
|
6
|
+
});
|
|
7
|
+
return BigInt(r);
|
|
77
8
|
}
|
|
78
9
|
export {
|
|
79
|
-
|
|
10
|
+
m as getBalance
|
|
80
11
|
};
|
package/dist/index132.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 o(e){const t=await e.request({method:"eth_blobBaseFee"});return BigInt(t)}exports.getBlobBaseFee=o;
|
package/dist/index132.js
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
method: "eth_getBalance",
|
|
5
|
-
params: [a, o || n]
|
|
1
|
+
async function a(e) {
|
|
2
|
+
const t = await e.request({
|
|
3
|
+
method: "eth_blobBaseFee"
|
|
6
4
|
});
|
|
7
|
-
return BigInt(
|
|
5
|
+
return BigInt(t);
|
|
8
6
|
}
|
|
9
7
|
export {
|
|
10
|
-
|
|
8
|
+
a as getBlobBaseFee
|
|
11
9
|
};
|
package/dist/index133.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});async function
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("./index181.cjs"),f=require("./index84.cjs"),m=require("./index75.cjs");async function B(e,{blockHash:o,blockNumber:r,blockTag:l=e.experimental_blockTag??"latest",includeTransactions:i}={}){var c,s,u;const n=i??!1,a=r!==void 0?f.numberToHex(r):void 0;let t=null;if(o?t=await e.request({method:"eth_getBlockByHash",params:[o,n]},{dedupe:!0}):t=await e.request({method:"eth_getBlockByNumber",params:[a||l,n]},{dedupe:!!a}),!t)throw new d.BlockNotFoundError({blockHash:o,blockNumber:r});return(((u=(s=(c=e.chain)==null?void 0:c.formatters)==null?void 0:s.block)==null?void 0:u.format)||m.formatBlock)(t,"getBlock")}exports.getBlock=B;
|
package/dist/index133.js
CHANGED
|
@@ -1,9 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { BlockNotFoundError as d } from "./index181.js";
|
|
2
|
+
import { numberToHex as i } from "./index84.js";
|
|
3
|
+
import { formatBlock as l } from "./index75.js";
|
|
4
|
+
async function h(e, { blockHash: t, blockNumber: r, blockTag: u = e.experimental_blockTag ?? "latest", includeTransactions: c } = {}) {
|
|
5
|
+
var m, s, f;
|
|
6
|
+
const a = c ?? !1, n = r !== void 0 ? i(r) : void 0;
|
|
7
|
+
let o = null;
|
|
8
|
+
if (t ? o = await e.request({
|
|
9
|
+
method: "eth_getBlockByHash",
|
|
10
|
+
params: [t, a]
|
|
11
|
+
}, { dedupe: !0 }) : o = await e.request({
|
|
12
|
+
method: "eth_getBlockByNumber",
|
|
13
|
+
params: [n || u, a]
|
|
14
|
+
}, { dedupe: !!n }), !o)
|
|
15
|
+
throw new d({ blockHash: t, blockNumber: r });
|
|
16
|
+
return (((f = (s = (m = e.chain) == null ? void 0 : m.formatters) == null ? void 0 : s.block) == null ? void 0 : f.format) || l)(o, "getBlock");
|
|
6
17
|
}
|
|
7
18
|
export {
|
|
8
|
-
|
|
19
|
+
h as getBlock
|
|
9
20
|
};
|
package/dist/index134.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 o=require("./index240.cjs"),r=e=>`blockNumber.${e}`;async function u(e,{cacheTime:c=e.cacheTime}={}){const t=await o.withCache(()=>e.request({method:"eth_blockNumber"}),{cacheKey:r(e.uid),cacheTime:c});return BigInt(t)}exports.getBlockNumber=u;
|
package/dist/index134.js
CHANGED
|
@@ -1,20 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
if (t ? o = await e.request({
|
|
9
|
-
method: "eth_getBlockByHash",
|
|
10
|
-
params: [t, a]
|
|
11
|
-
}, { dedupe: !0 }) : o = await e.request({
|
|
12
|
-
method: "eth_getBlockByNumber",
|
|
13
|
-
params: [n || u, a]
|
|
14
|
-
}, { dedupe: !!n }), !o)
|
|
15
|
-
throw new d({ blockHash: t, blockNumber: r });
|
|
16
|
-
return (((f = (s = (m = e.chain) == null ? void 0 : m.formatters) == null ? void 0 : s.block) == null ? void 0 : f.format) || l)(o, "getBlock");
|
|
1
|
+
import { withCache as t } from "./index240.js";
|
|
2
|
+
const r = (e) => `blockNumber.${e}`;
|
|
3
|
+
async function u(e, { cacheTime: c = e.cacheTime } = {}) {
|
|
4
|
+
const o = await t(() => e.request({
|
|
5
|
+
method: "eth_blockNumber"
|
|
6
|
+
}), { cacheKey: r(e.uid), cacheTime: c });
|
|
7
|
+
return BigInt(o);
|
|
17
8
|
}
|
|
18
9
|
export {
|
|
19
|
-
|
|
10
|
+
u as getBlockNumber
|
|
20
11
|
};
|
package/dist/index135.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("./index74.cjs"),s=require("./index84.cjs");async function c(t,{blockHash:o,blockNumber:n,blockTag:u="latest"}={}){const r=n!==void 0?s.numberToHex(n):void 0;let e;return o?e=await t.request({method:"eth_getBlockTransactionCountByHash",params:[o]},{dedupe:!0}):e=await t.request({method:"eth_getBlockTransactionCountByNumber",params:[r||u]},{dedupe:!!r}),a.hexToNumber(e)}exports.getBlockTransactionCount=c;
|
package/dist/index135.js
CHANGED
|
@@ -1,11 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
async function
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { hexToNumber as u } from "./index74.js";
|
|
2
|
+
import { numberToHex as m } from "./index84.js";
|
|
3
|
+
async function i(t, { blockHash: o, blockNumber: n, blockTag: a = "latest" } = {}) {
|
|
4
|
+
const r = n !== void 0 ? m(n) : void 0;
|
|
5
|
+
let e;
|
|
6
|
+
return o ? e = await t.request({
|
|
7
|
+
method: "eth_getBlockTransactionCountByHash",
|
|
8
|
+
params: [o]
|
|
9
|
+
}, { dedupe: !0 }) : e = await t.request({
|
|
10
|
+
method: "eth_getBlockTransactionCountByNumber",
|
|
11
|
+
params: [r || a]
|
|
12
|
+
}, { dedupe: !!r }), u(e);
|
|
8
13
|
}
|
|
9
14
|
export {
|
|
10
|
-
|
|
15
|
+
i as getBlockTransactionCount
|
|
11
16
|
};
|
package/dist/index136.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 n=require("./index74.cjs");async function r(e){const t=await e.request({method:"eth_chainId"},{dedupe:!0});return n.hexToNumber(t)}exports.getChainId=r;
|
package/dist/index136.js
CHANGED
|
@@ -1,16 +1,10 @@
|
|
|
1
|
-
import { hexToNumber as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
return
|
|
7
|
-
method: "eth_getBlockTransactionCountByHash",
|
|
8
|
-
params: [o]
|
|
9
|
-
}, { dedupe: !0 }) : e = await t.request({
|
|
10
|
-
method: "eth_getBlockTransactionCountByNumber",
|
|
11
|
-
params: [r || a]
|
|
12
|
-
}, { dedupe: !!r }), u(e);
|
|
1
|
+
import { hexToNumber as n } from "./index74.js";
|
|
2
|
+
async function o(e) {
|
|
3
|
+
const t = await e.request({
|
|
4
|
+
method: "eth_chainId"
|
|
5
|
+
}, { dedupe: !0 });
|
|
6
|
+
return n(t);
|
|
13
7
|
}
|
|
14
8
|
export {
|
|
15
|
-
|
|
9
|
+
o as getChainId
|
|
16
10
|
};
|
package/dist/index137.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 v=require("./index185.cjs"),b=require("./index104.cjs"),f=require("./index143.cjs");async function m(o,s){const{abi:e,address:r,args:c,blockHash:i,eventName:t,fromBlock:g,toBlock:a,strict:u}=s,n=t?v.getAbiItem({abi:e,name:t}):void 0,d=n?void 0:e.filter(l=>l.type==="event");return b.getAction(o,f.getLogs,"getLogs")({address:r,args:c,blockHash:i,event:n,events:d,fromBlock:g,toBlock:a,strict:u})}exports.getContractEvents=m;
|
package/dist/index137.js
CHANGED
|
@@ -1,10 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}, {
|
|
6
|
-
return n(
|
|
1
|
+
import { getAbiItem as p } from "./index185.js";
|
|
2
|
+
import { getAction as v } from "./index104.js";
|
|
3
|
+
import { getLogs as l } from "./index143.js";
|
|
4
|
+
async function y(n, r) {
|
|
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
|
+
});
|
|
7
16
|
}
|
|
8
17
|
export {
|
|
9
|
-
|
|
18
|
+
y as getContractEvents
|
|
10
19
|
};
|
package/dist/index138.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 p=require("./index311.cjs"),d=require("./index104.cjs"),f=require("./index108.cjs");async function g(a,i){const{address:n,factory:r,factoryData:o}=i;try{const[e,t,c,s,u,m,y]=await d.getAction(a,f.readContract,"readContract")({abi:l,address:n,functionName:"eip712Domain",factory:r,factoryData:o});return{domain:{name:t,version:c,chainId:Number(s),verifyingContract:u,salt:m},extensions:y,fields:e}}catch(e){const t=e;throw t.name==="ContractFunctionExecutionError"&&t.cause.name==="ContractFunctionZeroDataError"?new p.Eip712DomainNotFoundError({address:n}):t}}const l=[{inputs:[],name:"eip712Domain",outputs:[{name:"fields",type:"bytes1"},{name:"name",type:"string"},{name:"version",type:"string"},{name:"chainId",type:"uint256"},{name:"verifyingContract",type:"address"},{name:"salt",type:"bytes32"},{name:"extensions",type:"uint256[]"}],stateMutability:"view",type:"function"}];exports.getEip712Domain=g;
|
package/dist/index138.js
CHANGED
|
@@ -1,19 +1,49 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { getAction as
|
|
3
|
-
import {
|
|
4
|
-
async function
|
|
5
|
-
const {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
import { Eip712DomainNotFoundError as u } from "./index311.js";
|
|
2
|
+
import { getAction as d } from "./index104.js";
|
|
3
|
+
import { readContract as f } from "./index108.js";
|
|
4
|
+
async function E(a, o) {
|
|
5
|
+
const { address: e, factory: r, factoryData: i } = o;
|
|
6
|
+
try {
|
|
7
|
+
const [n, t, s, c, m, p, y] = await d(a, f, "readContract")({
|
|
8
|
+
abi: g,
|
|
9
|
+
address: e,
|
|
10
|
+
functionName: "eip712Domain",
|
|
11
|
+
factory: r,
|
|
12
|
+
factoryData: i
|
|
13
|
+
});
|
|
14
|
+
return {
|
|
15
|
+
domain: {
|
|
16
|
+
name: t,
|
|
17
|
+
version: s,
|
|
18
|
+
chainId: Number(c),
|
|
19
|
+
verifyingContract: m,
|
|
20
|
+
salt: p
|
|
21
|
+
},
|
|
22
|
+
extensions: y,
|
|
23
|
+
fields: n
|
|
24
|
+
};
|
|
25
|
+
} catch (n) {
|
|
26
|
+
const t = n;
|
|
27
|
+
throw t.name === "ContractFunctionExecutionError" && t.cause.name === "ContractFunctionZeroDataError" ? new u({ address: e }) : t;
|
|
28
|
+
}
|
|
16
29
|
}
|
|
30
|
+
const g = [
|
|
31
|
+
{
|
|
32
|
+
inputs: [],
|
|
33
|
+
name: "eip712Domain",
|
|
34
|
+
outputs: [
|
|
35
|
+
{ name: "fields", type: "bytes1" },
|
|
36
|
+
{ name: "name", type: "string" },
|
|
37
|
+
{ name: "version", type: "string" },
|
|
38
|
+
{ name: "chainId", type: "uint256" },
|
|
39
|
+
{ name: "verifyingContract", type: "address" },
|
|
40
|
+
{ name: "salt", type: "bytes32" },
|
|
41
|
+
{ name: "extensions", type: "uint256[]" }
|
|
42
|
+
],
|
|
43
|
+
stateMutability: "view",
|
|
44
|
+
type: "function"
|
|
45
|
+
}
|
|
46
|
+
];
|
|
17
47
|
export {
|
|
18
|
-
|
|
48
|
+
E as getEip712Domain
|
|
19
49
|
};
|
package/dist/index139.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 o=require("./index84.cjs"),a=require("./index312.cjs");async function y(r,{blockCount:i,blockNumber:e,blockTag:n="latest",rewardPercentiles:s}){const t=typeof e=="bigint"?o.numberToHex(e):void 0,u=await r.request({method:"eth_feeHistory",params:[o.numberToHex(i),t||n,s]},{dedupe:!!t});return a.formatFeeHistory(u)}exports.getFeeHistory=y;
|