@gardenfi/utils 2.5.3-beta.1 → 2.5.3-beta.2
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/index10.cjs +1 -1
- package/dist/index10.js +4 -4
- package/dist/index100.cjs +1 -1
- package/dist/index100.js +13 -7
- package/dist/index101.cjs +1 -1
- package/dist/index101.js +3 -12
- package/dist/index102.cjs +1 -1
- package/dist/index102.js +26 -18
- package/dist/index103.cjs +2 -1
- package/dist/index103.js +19 -22
- package/dist/index104.cjs +1 -1
- package/dist/index104.js +9 -21
- package/dist/index105.cjs +1 -1
- package/dist/index105.js +8 -51
- package/dist/index106.cjs +1 -1
- package/dist/index106.js +10 -11
- package/dist/index107.cjs +1 -1
- package/dist/index107.js +11 -161
- package/dist/index108.cjs +1 -1
- package/dist/index108.js +13 -21
- package/dist/index109.cjs +1 -1
- package/dist/index109.js +14 -127
- package/dist/index110.cjs +1 -1
- package/dist/index110.js +4 -38
- package/dist/index111.cjs +1 -1
- package/dist/index111.js +6 -6
- package/dist/index112.cjs +1 -1
- package/dist/index112.js +16 -25
- package/dist/index113.cjs +1 -1
- package/dist/index113.js +13 -55
- package/dist/index114.cjs +1 -1
- package/dist/index114.js +6 -45
- package/dist/index115.cjs +1 -1
- package/dist/index115.js +7 -191
- package/dist/index116.cjs +1 -1
- package/dist/index116.js +22 -4
- package/dist/index117.cjs +1 -1
- package/dist/index117.js +7 -64
- package/dist/index118.cjs +1 -1
- package/dist/index118.js +22 -3
- package/dist/index119.cjs +1 -1
- package/dist/index119.js +16 -19
- package/dist/index120.cjs +1 -1
- package/dist/index120.js +39 -15
- package/dist/index121.cjs +1 -1
- package/dist/index121.js +21 -23
- package/dist/index122.cjs +1 -1
- package/dist/index122.js +80 -11
- package/dist/index123.cjs +1 -1
- package/dist/index123.js +11 -18
- package/dist/index124.cjs +1 -1
- package/dist/index124.js +55 -31
- package/dist/index125.cjs +1 -1
- package/dist/index125.js +14 -3
- package/dist/index126.cjs +1 -1
- package/dist/index126.js +8 -18
- package/dist/index127.cjs +1 -1
- package/dist/index127.js +20 -27
- package/dist/index128.cjs +1 -1
- package/dist/index128.js +6 -36
- package/dist/index129.cjs +1 -1
- package/dist/index129.js +35 -8
- package/dist/index130.cjs +1 -1
- package/dist/index130.js +32 -10
- package/dist/index131.cjs +1 -1
- package/dist/index131.js +8 -24
- package/dist/index132.cjs +1 -1
- package/dist/index132.js +50 -28
- package/dist/index133.cjs +1 -1
- package/dist/index133.js +19 -65
- package/dist/index134.cjs +1 -1
- package/dist/index134.js +106 -9
- package/dist/index135.cjs +1 -1
- package/dist/index135.js +66 -21
- package/dist/index136.cjs +1 -1
- package/dist/index136.js +9 -24
- package/dist/index137.cjs +1 -1
- package/dist/index137.js +71 -24
- package/dist/index138.cjs +2 -1
- package/dist/index138.js +3 -4
- package/dist/index139.cjs +1 -1
- package/dist/index139.js +9 -15
- package/dist/index140.cjs +1 -1
- package/dist/index140.js +11 -101
- package/dist/index141.cjs +1 -1
- package/dist/index141.js +4 -80
- package/dist/index142.cjs +1 -1
- package/dist/index142.js +12 -5
- package/dist/index143.cjs +1 -1
- package/dist/index143.js +2 -7
- package/dist/index144.cjs +1 -1
- package/dist/index144.js +31 -27
- package/dist/index145.cjs +1 -1
- package/dist/index145.js +21 -26
- package/dist/index146.cjs +1 -1
- package/dist/index146.js +5 -13
- package/dist/index147.cjs +1 -1
- package/dist/index147.js +5 -42
- package/dist/index148.cjs +1 -1
- package/dist/index148.js +5 -19
- package/dist/index149.cjs +9 -1
- package/dist/index149.js +31 -74
- package/dist/index150.cjs +1 -1
- package/dist/index150.js +3 -2
- package/dist/index151.cjs +1 -1
- package/dist/index151.js +13 -32
- package/dist/index152.cjs +1 -1
- package/dist/index152.js +16 -107
- package/dist/index153.cjs +1 -1
- package/dist/index153.js +33 -164
- package/dist/index154.cjs +1 -1
- package/dist/index154.js +6 -47
- package/dist/index155.cjs +4 -1
- package/dist/index155.js +194 -32
- package/dist/index156.cjs +1 -1
- package/dist/index156.js +27 -8
- package/dist/index157.cjs +1 -1
- package/dist/index157.js +161 -6
- package/dist/index158.cjs +1 -1
- package/dist/index158.js +127 -6
- package/dist/index159.cjs +1 -1
- package/dist/index159.js +27 -11
- package/dist/index160.cjs +1 -1
- package/dist/index160.js +54 -9
- package/dist/index161.cjs +1 -1
- package/dist/index161.js +190 -12
- package/dist/index162.cjs +1 -1
- package/dist/index162.js +4 -33
- package/dist/index163.cjs +1 -1
- package/dist/index163.js +21 -5
- package/dist/index164.cjs +1 -1
- package/dist/index164.js +3 -8
- package/dist/index165.cjs +1 -1
- package/dist/index165.js +14 -6
- package/dist/index166.cjs +1 -1
- package/dist/index166.js +11 -20
- package/dist/index167.cjs +1 -1
- package/dist/index167.js +32 -29
- package/dist/index168.cjs +1 -1
- package/dist/index168.js +3 -4
- package/dist/index169.cjs +1 -1
- package/dist/index169.js +27 -17
- package/dist/index17.cjs +1 -1
- package/dist/index17.js +2 -2
- package/dist/index170.cjs +1 -1
- package/dist/index170.js +8 -10
- package/dist/index171.cjs +1 -1
- package/dist/index171.js +24 -20
- package/dist/index172.cjs +1 -1
- package/dist/index172.js +28 -22
- package/dist/index173.cjs +1 -1
- package/dist/index173.js +3 -5
- package/dist/index174.cjs +1 -1
- package/dist/index174.js +6 -5
- package/dist/index175.cjs +1 -1
- package/dist/index175.js +6 -8
- package/dist/index176.cjs +1 -1
- package/dist/index176.js +30 -102
- package/dist/index177.cjs +1 -1
- package/dist/index177.js +5 -3
- package/dist/index178.cjs +1 -1
- package/dist/index178.js +36 -17
- package/dist/index179.cjs +1 -1
- package/dist/index179.js +45 -167
- package/dist/index18.cjs +1 -1
- package/dist/index18.js +8 -8
- package/dist/index180.cjs +1 -1
- package/dist/index180.js +32 -17
- package/dist/index181.cjs +1 -1
- package/dist/index181.js +6 -28
- package/dist/index182.cjs +1 -1
- package/dist/index182.js +43 -2
- package/dist/index183.cjs +1 -1
- package/dist/index183.js +51 -13
- package/dist/index184.cjs +1 -1
- package/dist/index184.js +104 -12
- package/dist/index185.cjs +1 -1
- package/dist/index185.js +3 -48
- package/dist/index186.cjs +1 -1
- package/dist/index186.js +5 -11
- package/dist/index187.cjs +1 -1
- package/dist/index187.js +3 -7
- package/dist/index188.cjs +1 -1
- package/dist/index188.js +16 -88
- package/dist/index189.cjs +1 -1
- package/dist/index189.js +5 -46
- package/dist/index190.cjs +1 -1
- package/dist/index190.js +8 -37
- package/dist/index191.cjs +1 -1
- package/dist/index191.js +103 -17
- package/dist/index192.cjs +1 -1
- package/dist/index192.js +5 -6
- package/dist/index193.cjs +1 -1
- package/dist/index193.js +6 -9
- package/dist/index194.cjs +1 -1
- package/dist/index194.js +27 -13
- package/dist/index195.cjs +1 -1
- package/dist/index195.js +34 -8
- package/dist/index196.cjs +1 -1
- package/dist/index196.js +13 -8
- package/dist/index197.cjs +1 -1
- package/dist/index197.js +78 -35
- package/dist/index198.cjs +1 -1
- package/dist/index198.js +2 -17
- package/dist/index199.cjs +1 -1
- package/dist/index199.js +18 -14
- package/dist/index20.cjs +1 -1
- package/dist/index20.js +2 -2
- package/dist/index200.cjs +1 -1
- package/dist/index200.js +171 -13
- package/dist/index201.cjs +1 -2
- package/dist/index201.js +16 -23
- package/dist/index202.cjs +1 -1
- package/dist/index202.js +10 -6
- package/dist/index203.cjs +1 -1
- package/dist/index203.js +2 -2
- package/dist/index204.cjs +1 -1
- package/dist/index204.js +5 -5
- package/dist/index206.cjs +1 -1
- package/dist/index206.js +1 -1
- package/dist/index207.cjs +1 -1
- package/dist/index207.js +2 -2
- package/dist/index208.cjs +1 -1
- package/dist/index208.js +1 -1
- package/dist/index209.cjs +1 -1
- package/dist/index209.js +5 -5
- package/dist/index21.cjs +1 -1
- package/dist/index21.js +17 -4
- package/dist/index210.cjs +1 -2
- package/dist/index210.js +24 -41
- package/dist/index211.cjs +1 -1
- package/dist/index211.js +47 -2
- package/dist/index212.cjs +1 -1
- package/dist/index212.js +9 -5
- package/dist/index213.cjs +2 -1
- package/dist/index213.js +40 -9
- package/dist/index214.cjs +1 -1
- package/dist/index214.js +2 -20
- package/dist/index215.cjs +1 -1
- package/dist/index215.js +5 -8
- package/dist/index216.cjs +1 -1
- package/dist/index216.js +9 -65
- package/dist/index217.cjs +1 -1
- package/dist/index217.js +17 -63
- package/dist/index218.cjs +1 -1
- package/dist/index218.js +8 -186
- package/dist/index219.cjs +1 -1
- package/dist/index219.js +66 -28
- package/dist/index22.cjs +1 -1
- package/dist/index22.js +3 -3
- package/dist/index220.cjs +1 -1
- package/dist/index220.js +61 -72
- package/dist/index221.cjs +1 -1
- package/dist/index221.js +183 -35
- package/dist/index222.cjs +1 -1
- package/dist/index222.js +21 -9
- package/dist/index223.cjs +1 -1
- package/dist/index223.js +70 -7
- package/dist/index224.cjs +1 -1
- package/dist/index224.js +40 -12
- package/dist/index225.cjs +1 -1
- package/dist/index225.js +16 -11
- package/dist/index226.cjs +1 -1
- package/dist/index226.js +12 -102
- package/dist/index227.cjs +1 -1
- package/dist/index227.js +11 -6
- package/dist/index228.cjs +1 -1
- package/dist/index228.js +10 -242
- package/dist/index229.cjs +1 -1
- package/dist/index229.js +2 -2
- package/dist/index23.cjs +1 -1
- package/dist/index23.js +12 -26
- package/dist/index230.cjs +1 -1
- package/dist/index230.js +2 -2
- package/dist/index231.cjs +1 -1
- package/dist/index231.js +18 -25
- package/dist/index232.cjs +1 -1
- package/dist/index232.js +107 -18
- package/dist/index233.cjs +1 -1
- package/dist/index233.js +99 -142
- package/dist/index234.cjs +1 -1
- package/dist/index234.js +26 -24
- package/dist/index235.cjs +1 -1
- package/dist/index235.js +15 -45
- package/dist/index236.cjs +1 -1
- package/dist/index236.js +213 -8
- package/dist/index237.cjs +1 -1
- package/dist/index237.js +1 -1
- package/dist/index238.cjs +1 -1
- package/dist/index238.js +1 -1
- package/dist/index24.cjs +1 -1
- package/dist/index24.js +59 -8
- package/dist/index240.cjs +1 -1
- package/dist/index240.js +1 -1
- package/dist/index241.cjs +1 -1
- package/dist/index241.js +3 -3
- package/dist/index242.cjs +2 -1
- package/dist/index242.js +66 -68
- package/dist/index243.cjs +1 -1
- package/dist/index243.js +14 -788
- package/dist/index244.cjs +1 -1
- package/dist/index244.js +67 -147
- package/dist/index245.cjs +1 -1
- package/dist/index245.js +640 -183
- package/dist/index246.cjs +1 -2
- package/dist/index246.js +203 -63
- package/dist/index247.cjs +1 -1
- package/dist/index247.js +177 -14
- package/dist/index25.cjs +16 -1
- package/dist/index25.js +113 -12
- package/dist/index26.cjs +1 -1
- package/dist/index26.js +30 -58
- 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 +171 -7
- package/dist/index30.cjs +1 -1
- package/dist/index30.js +110 -30
- package/dist/index31.cjs +1 -1
- package/dist/index31.js +30 -29
- package/dist/index32.cjs +1 -1
- package/dist/index32.js +3 -16
- package/dist/index33.cjs +1 -1
- package/dist/index33.js +2 -34
- package/dist/index34.cjs +1 -1
- package/dist/index34.js +4 -45
- package/dist/index35.cjs +2 -1
- package/dist/index35.js +59 -151
- package/dist/index36.cjs +2 -1
- package/dist/index36.js +50 -31
- package/dist/index37.cjs +3 -1
- package/dist/index37.js +210 -52
- package/dist/index38.cjs +1 -2
- package/dist/index38.js +22 -58
- package/dist/index39.cjs +1 -1
- package/dist/index39.js +18 -13
- package/dist/index40.cjs +1 -1
- package/dist/index40.js +10 -37
- package/dist/index41.cjs +1 -1
- package/dist/index41.js +20 -15
- package/dist/index42.cjs +1 -1
- package/dist/index42.js +45 -8
- package/dist/index43.cjs +1 -1
- package/dist/index43.js +12 -19
- package/dist/index44.cjs +1 -1
- package/dist/index44.js +13 -2
- package/dist/index45.cjs +1 -1
- package/dist/index45.js +24 -45
- package/dist/index46.cjs +1 -1
- package/dist/index46.js +27 -31
- package/dist/index47.cjs +1 -1
- package/dist/index47.js +47 -3
- package/dist/index48.cjs +1 -1
- package/dist/index48.js +19 -9
- package/dist/index49.cjs +1 -1
- package/dist/index49.js +10 -67
- package/dist/index50.cjs +1 -1
- package/dist/index50.js +31 -9
- package/dist/index51.cjs +1 -1
- package/dist/index51.js +36 -28
- package/dist/index52.cjs +1 -1
- package/dist/index52.js +7 -71
- package/dist/index53.cjs +1 -1
- package/dist/index53.js +29 -19
- package/dist/index54.cjs +1 -1
- package/dist/index54.js +22 -50
- package/dist/index55.cjs +1 -1
- package/dist/index55.js +7 -7
- package/dist/index56.cjs +1 -1
- package/dist/index56.js +89 -16
- package/dist/index57.cjs +1 -1
- package/dist/index57.js +46 -10
- package/dist/index58.cjs +1 -1
- package/dist/index58.js +23 -5
- package/dist/index59.cjs +1 -1
- package/dist/index59.js +36 -13
- package/dist/index60.cjs +1 -1
- package/dist/index60.js +17 -3
- package/dist/index61.cjs +1 -1
- package/dist/index61.js +6 -26
- package/dist/index62.cjs +1 -1
- package/dist/index62.js +9 -109
- package/dist/index63.cjs +1 -1
- package/dist/index63.js +13 -4
- package/dist/index64.cjs +1 -1
- package/dist/index64.js +109 -6
- package/dist/index65.cjs +1 -1
- package/dist/index65.js +7 -87
- package/dist/index66.cjs +1 -1
- package/dist/index66.js +23 -6
- package/dist/index67.cjs +1 -1
- package/dist/index67.js +6 -124
- package/dist/index68.cjs +1 -1
- package/dist/index68.js +21 -7
- package/dist/index69.cjs +1 -1
- package/dist/index69.js +8 -21
- package/dist/index70.cjs +1 -1
- package/dist/index70.js +31 -17
- package/dist/index71.cjs +1 -1
- package/dist/index71.js +7 -40
- package/dist/index72.cjs +1 -1
- package/dist/index72.js +16 -21
- package/dist/index73.cjs +1 -1
- package/dist/index73.js +72 -10
- package/dist/index74.cjs +1 -1
- package/dist/index74.js +35 -6
- package/dist/index75.cjs +1 -1
- package/dist/index75.js +16 -106
- package/dist/index76.cjs +1 -1
- package/dist/index76.js +66 -3
- package/dist/index77.cjs +1 -1
- package/dist/index77.js +12 -9
- package/dist/index78.cjs +1 -2
- package/dist/index78.js +15 -3
- package/dist/index79.cjs +3 -20
- package/dist/index79.js +71 -302
- package/dist/index80.cjs +1 -1
- package/dist/index80.js +24 -13
- package/dist/index81.cjs +1 -1
- package/dist/index81.js +33 -4
- package/dist/index82.cjs +1 -1
- package/dist/index82.js +45 -2
- package/dist/index83.cjs +1 -1
- package/dist/index83.js +6 -7
- package/dist/index84.cjs +1 -3
- package/dist/index84.js +148 -212
- package/dist/index85.cjs +20 -1
- package/dist/index85.js +327 -32
- package/dist/index86.cjs +3 -1
- package/dist/index86.js +451 -21
- package/dist/index87.cjs +1 -1
- package/dist/index87.js +64 -5
- package/dist/index88.cjs +1 -1
- package/dist/index88.js +36 -72
- package/dist/index89.cjs +1 -1
- package/dist/index89.js +15 -5
- package/dist/index90.cjs +1 -1
- package/dist/index90.js +2 -6
- package/dist/index91.cjs +1 -9
- package/dist/index91.js +16 -35
- package/dist/index92.cjs +1 -3
- package/dist/index92.js +10 -95
- package/dist/index93.cjs +1 -1
- package/dist/index93.js +126 -3
- package/dist/index94.cjs +1 -1
- package/dist/index94.js +5 -23
- package/dist/index95.cjs +1 -3
- package/dist/index95.js +21 -451
- package/dist/index96.cjs +1 -2
- package/dist/index96.js +43 -52
- package/dist/index97.cjs +1 -1
- package/dist/index97.js +35 -17
- package/dist/index98.cjs +1 -1
- package/dist/index98.js +6 -35
- package/dist/index99.cjs +1 -4
- package/dist/index99.js +85 -191
- package/package.json +1 -1
package/dist/index44.js
CHANGED
|
@@ -1,4 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
function y(t, { format: r }) {
|
|
2
|
+
if (!r)
|
|
3
|
+
return {};
|
|
4
|
+
const e = {};
|
|
5
|
+
function i(c) {
|
|
6
|
+
const s = Object.keys(c);
|
|
7
|
+
for (const n of s)
|
|
8
|
+
n in t && (e[n] = t[n]), c[n] && typeof c[n] == "object" && !Array.isArray(c[n]) && i(c[n]);
|
|
9
|
+
}
|
|
10
|
+
const o = r(t || {});
|
|
11
|
+
return i(o), e;
|
|
12
|
+
}
|
|
2
13
|
export {
|
|
3
|
-
|
|
14
|
+
y as extract
|
|
4
15
|
};
|
package/dist/index45.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 f=require("./index42.cjs"),o={legacy:"0x0",eip2930:"0x1",eip1559:"0x2",eip4844:"0x3",eip7702:"0x4"};function d(e){const n={};return typeof e.authorizationList<"u"&&(n.authorizationList=a(e.authorizationList)),typeof e.accessList<"u"&&(n.accessList=e.accessList),typeof e.blobVersionedHashes<"u"&&(n.blobVersionedHashes=e.blobVersionedHashes),typeof e.blobs<"u"&&(typeof e.blobs[0]!="string"?n.blobs=e.blobs.map(i=>f.bytesToHex(i)):n.blobs=e.blobs),typeof e.data<"u"&&(n.data=e.data),typeof e.from<"u"&&(n.from=e.from),typeof e.gas<"u"&&(n.gas=f.numberToHex(e.gas)),typeof e.gasPrice<"u"&&(n.gasPrice=f.numberToHex(e.gasPrice)),typeof e.maxFeePerBlobGas<"u"&&(n.maxFeePerBlobGas=f.numberToHex(e.maxFeePerBlobGas)),typeof e.maxFeePerGas<"u"&&(n.maxFeePerGas=f.numberToHex(e.maxFeePerGas)),typeof e.maxPriorityFeePerGas<"u"&&(n.maxPriorityFeePerGas=f.numberToHex(e.maxPriorityFeePerGas)),typeof e.nonce<"u"&&(n.nonce=f.numberToHex(e.nonce)),typeof e.to<"u"&&(n.to=e.to),typeof e.type<"u"&&(n.type=o[e.type]),typeof e.value<"u"&&(n.value=f.numberToHex(e.value)),n}function a(e){return e.map(n=>({address:n.address,r:n.r?f.numberToHex(BigInt(n.r)):n.r,s:n.s?f.numberToHex(BigInt(n.s)):n.s,chainId:f.numberToHex(n.chainId),nonce:f.numberToHex(n.nonce),...typeof n.yParity<"u"?{yParity:f.numberToHex(n.yParity)}:{},...typeof n.v<"u"&&typeof n.yParity>"u"?{v:f.numberToHex(n.v)}:{}}))}exports.formatTransactionRequest=d;exports.rpcTransactionType=o;
|
package/dist/index45.js
CHANGED
|
@@ -1,48 +1,27 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
params: [t]
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
const { atomic: l = !1, chainId: r, receipts: n, version: d = "2.0.0", ...i } = await m(f.id), [p, g] = (() => {
|
|
27
|
-
const t = i.status;
|
|
28
|
-
return t >= 100 && t < 200 ? ["pending", t] : t >= 200 && t < 300 ? ["success", t] : t >= 300 && t < 700 ? ["failure", t] : t === "CONFIRMED" ? ["success", 200] : t === "PENDING" ? ["pending", 100] : [void 0, t];
|
|
29
|
-
})();
|
|
30
|
-
return {
|
|
31
|
-
...i,
|
|
32
|
-
atomic: l,
|
|
33
|
-
// @ts-expect-error: for backwards compatibility
|
|
34
|
-
chainId: r ? u(r) : void 0,
|
|
35
|
-
receipts: (n == null ? void 0 : n.map((t) => ({
|
|
36
|
-
...t,
|
|
37
|
-
blockNumber: c(t.blockNumber),
|
|
38
|
-
gasUsed: c(t.gasUsed),
|
|
39
|
-
status: N[t.status]
|
|
40
|
-
}))) ?? [],
|
|
41
|
-
statusCode: g,
|
|
42
|
-
status: p,
|
|
43
|
-
version: d
|
|
44
|
-
};
|
|
1
|
+
import { bytesToHex as d, numberToHex as n } from "./index42.js";
|
|
2
|
+
const o = {
|
|
3
|
+
legacy: "0x0",
|
|
4
|
+
eip2930: "0x1",
|
|
5
|
+
eip1559: "0x2",
|
|
6
|
+
eip4844: "0x3",
|
|
7
|
+
eip7702: "0x4"
|
|
8
|
+
};
|
|
9
|
+
function p(e) {
|
|
10
|
+
const f = {};
|
|
11
|
+
return typeof e.authorizationList < "u" && (f.authorizationList = a(e.authorizationList)), typeof e.accessList < "u" && (f.accessList = e.accessList), typeof e.blobVersionedHashes < "u" && (f.blobVersionedHashes = e.blobVersionedHashes), typeof e.blobs < "u" && (typeof e.blobs[0] != "string" ? f.blobs = e.blobs.map((i) => d(i)) : f.blobs = e.blobs), typeof e.data < "u" && (f.data = e.data), typeof e.from < "u" && (f.from = e.from), typeof e.gas < "u" && (f.gas = n(e.gas)), typeof e.gasPrice < "u" && (f.gasPrice = n(e.gasPrice)), typeof e.maxFeePerBlobGas < "u" && (f.maxFeePerBlobGas = n(e.maxFeePerBlobGas)), typeof e.maxFeePerGas < "u" && (f.maxFeePerGas = n(e.maxFeePerGas)), typeof e.maxPriorityFeePerGas < "u" && (f.maxPriorityFeePerGas = n(e.maxPriorityFeePerGas)), typeof e.nonce < "u" && (f.nonce = n(e.nonce)), typeof e.to < "u" && (f.to = e.to), typeof e.type < "u" && (f.type = o[e.type]), typeof e.value < "u" && (f.value = n(e.value)), f;
|
|
12
|
+
}
|
|
13
|
+
function a(e) {
|
|
14
|
+
return e.map((f) => ({
|
|
15
|
+
address: f.address,
|
|
16
|
+
r: f.r ? n(BigInt(f.r)) : f.r,
|
|
17
|
+
s: f.s ? n(BigInt(f.s)) : f.s,
|
|
18
|
+
chainId: n(f.chainId),
|
|
19
|
+
nonce: n(f.nonce),
|
|
20
|
+
...typeof f.yParity < "u" ? { yParity: n(f.yParity) } : {},
|
|
21
|
+
...typeof f.v < "u" && typeof f.yParity > "u" ? { v: n(f.v) } : {}
|
|
22
|
+
}));
|
|
45
23
|
}
|
|
46
24
|
export {
|
|
47
|
-
|
|
25
|
+
p as formatTransactionRequest,
|
|
26
|
+
o as rpcTransactionType
|
|
48
27
|
};
|
package/dist/index46.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("./index126.cjs"),l=new Map;function A({fn:a,id:o,shouldSplitBatch:h,wait:y=0,sort:u}){const i=async()=>{const e=n();f();const s=e.map(({args:t})=>t);s.length!==0&&a(s).then(t=>{u&&Array.isArray(t)&&t.sort(u);for(let c=0;c<e.length;c++){const{resolve:r}=e[c];r==null||r([t[c],t])}}).catch(t=>{for(let c=0;c<e.length;c++){const{reject:r}=e[c];r==null||r(t)}})},f=()=>l.delete(o),m=()=>n().map(({args:e})=>e),n=()=>l.get(o)||[],g=e=>l.set(o,[...n(),e]);return{flush:f,async schedule(e){const{promise:s,resolve:t,reject:c}=v.withResolvers();return(h==null?void 0:h([...m(),e]))&&i(),n().length>0?(g({args:e,resolve:t,reject:c}),s):(g({args:e,resolve:t,reject:c}),setTimeout(i,y),s)}}}exports.createBatchScheduler=A;
|
package/dist/index46.js
CHANGED
|
@@ -1,35 +1,31 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
function
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
1
|
+
import { withResolvers as y } from "./index126.js";
|
|
2
|
+
const l = /* @__PURE__ */ new Map();
|
|
3
|
+
function w({ fn: m, id: o, shouldSplitBatch: h, wait: A = 0, sort: u }) {
|
|
4
|
+
const i = async () => {
|
|
5
|
+
const e = s();
|
|
6
|
+
f();
|
|
7
|
+
const r = e.map(({ args: t }) => t);
|
|
8
|
+
r.length !== 0 && m(r).then((t) => {
|
|
9
|
+
u && Array.isArray(t) && t.sort(u);
|
|
10
|
+
for (let c = 0; c < e.length; c++) {
|
|
11
|
+
const { resolve: n } = e[c];
|
|
12
|
+
n == null || n([t[c], t]);
|
|
13
|
+
}
|
|
14
|
+
}).catch((t) => {
|
|
15
|
+
for (let c = 0; c < e.length; c++) {
|
|
16
|
+
const { reject: n } = e[c];
|
|
17
|
+
n == null || n(t);
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
}, f = () => l.delete(o), p = () => s().map(({ args: e }) => e), s = () => l.get(o) || [], g = (e) => l.set(o, [...s(), e]);
|
|
21
|
+
return {
|
|
22
|
+
flush: f,
|
|
23
|
+
async schedule(e) {
|
|
24
|
+
const { promise: r, resolve: t, reject: c } = y();
|
|
25
|
+
return (h == null ? void 0 : h([...p(), e])) && i(), s().length > 0 ? (g({ args: e, resolve: t, reject: c }), r) : (g({ args: e, resolve: t, reject: c }), setTimeout(i, A), r);
|
|
26
|
+
}
|
|
21
27
|
};
|
|
22
|
-
function i(l) {
|
|
23
|
-
return (y) => {
|
|
24
|
-
const r = y(l);
|
|
25
|
-
for (const h in o)
|
|
26
|
-
delete r[h];
|
|
27
|
-
const s = { ...l, ...r };
|
|
28
|
-
return Object.assign(s, { extend: i(s) });
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
return Object.assign(o, { extend: i(o) });
|
|
32
28
|
}
|
|
33
29
|
export {
|
|
34
|
-
|
|
30
|
+
w as createBatchScheduler
|
|
35
31
|
};
|
package/dist/index47.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function r(e){
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./index142.cjs"),a=require("./index151.cjs"),f=require("./index149.cjs"),S=require("./index166.cjs"),c=require("./index42.cjs");function d(r){if(!(!r||r.length===0))return r.reduce((t,{slot:e,value:n})=>{if(e.length!==66)throw new a.InvalidBytesLengthError({size:e.length,targetSize:66,type:"hex"});if(n.length!==66)throw new a.InvalidBytesLengthError({size:n.length,targetSize:66,type:"hex"});return t[e]=n,t},{})}function u(r){const{balance:t,nonce:e,state:n,stateDiff:s,code:o}=r,i={};if(o!==void 0&&(i.code=o),t!==void 0&&(i.balance=c.numberToHex(t)),e!==void 0&&(i.nonce=c.numberToHex(e)),n!==void 0&&(i.state=d(n)),s!==void 0){if(i.state)throw new f.StateAssignmentConflictError;i.stateDiff=d(s)}return i}function h(r){if(!r)return;const t={};for(const{address:e,...n}of r){if(!S.isAddress(e,{strict:!1}))throw new l.InvalidAddressError({address:e});if(t[e])throw new f.AccountStateConflictError({address:e});t[e]=u(n)}return t}exports.serializeAccountStateOverride=u;exports.serializeStateMapping=d;exports.serializeStateOverride=h;
|
package/dist/index47.js
CHANGED
|
@@ -1,6 +1,50 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { InvalidAddressError as a } from "./index142.js";
|
|
2
|
+
import { InvalidBytesLengthError as d } from "./index151.js";
|
|
3
|
+
import { AccountStateConflictError as u, StateAssignmentConflictError as h } from "./index149.js";
|
|
4
|
+
import { isAddress as l } from "./index166.js";
|
|
5
|
+
import { numberToHex as c } from "./index42.js";
|
|
6
|
+
function s(r) {
|
|
7
|
+
if (!(!r || r.length === 0))
|
|
8
|
+
return r.reduce((t, { slot: e, value: n }) => {
|
|
9
|
+
if (e.length !== 66)
|
|
10
|
+
throw new d({
|
|
11
|
+
size: e.length,
|
|
12
|
+
targetSize: 66,
|
|
13
|
+
type: "hex"
|
|
14
|
+
});
|
|
15
|
+
if (n.length !== 66)
|
|
16
|
+
throw new d({
|
|
17
|
+
size: n.length,
|
|
18
|
+
targetSize: 66,
|
|
19
|
+
type: "hex"
|
|
20
|
+
});
|
|
21
|
+
return t[e] = n, t;
|
|
22
|
+
}, {});
|
|
23
|
+
}
|
|
24
|
+
function m(r) {
|
|
25
|
+
const { balance: t, nonce: e, state: n, stateDiff: o, code: f } = r, i = {};
|
|
26
|
+
if (f !== void 0 && (i.code = f), t !== void 0 && (i.balance = c(t)), e !== void 0 && (i.nonce = c(e)), n !== void 0 && (i.state = s(n)), o !== void 0) {
|
|
27
|
+
if (i.state)
|
|
28
|
+
throw new h();
|
|
29
|
+
i.stateDiff = s(o);
|
|
30
|
+
}
|
|
31
|
+
return i;
|
|
32
|
+
}
|
|
33
|
+
function A(r) {
|
|
34
|
+
if (!r)
|
|
35
|
+
return;
|
|
36
|
+
const t = {};
|
|
37
|
+
for (const { address: e, ...n } of r) {
|
|
38
|
+
if (!l(e, { strict: !1 }))
|
|
39
|
+
throw new a({ address: e });
|
|
40
|
+
if (t[e])
|
|
41
|
+
throw new u({ address: e });
|
|
42
|
+
t[e] = m(n);
|
|
43
|
+
}
|
|
44
|
+
return t;
|
|
3
45
|
}
|
|
4
46
|
export {
|
|
5
|
-
|
|
47
|
+
m as serializeAccountStateOverride,
|
|
48
|
+
s as serializeStateMapping,
|
|
49
|
+
A as serializeStateOverride
|
|
6
50
|
};
|
package/dist/index48.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("./index32.cjs"),f=require("./index19.cjs"),t=require("./index142.cjs"),d=require("./index155.cjs"),w=require("./index79.cjs"),i=require("./index166.cjs");function p(a){const{account:n,gasPrice:c,maxFeePerGas:e,maxPriorityFeePerGas:r,to:s}=a,o=n?u.parseAccount(n):void 0;if(o&&!i.isAddress(o.address))throw new t.InvalidAddressError({address:o.address});if(s&&!i.isAddress(s))throw new t.InvalidAddressError({address:s});if(typeof c<"u"&&(typeof e<"u"||typeof r<"u"))throw new w.FeeConflictError;if(e&&e>f.maxUint256)throw new d.FeeCapTooHighError({maxFeePerGas:e});if(r&&e&&r>e)throw new d.TipAboveFeeCapError({maxFeePerGas:e,maxPriorityFeePerGas:r})}exports.assertRequest=p;
|
package/dist/index48.js
CHANGED
|
@@ -1,12 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { parseAccount as a } from "./index32.js";
|
|
2
|
+
import { maxUint256 as m } from "./index19.js";
|
|
3
|
+
import { InvalidAddressError as n } from "./index142.js";
|
|
4
|
+
import { FeeCapTooHighError as p, TipAboveFeeCapError as c } from "./index155.js";
|
|
5
|
+
import { FeeConflictError as u } from "./index79.js";
|
|
6
|
+
import { isAddress as s } from "./index166.js";
|
|
7
|
+
function E(d) {
|
|
8
|
+
const { account: i, gasPrice: f, maxFeePerGas: r, maxPriorityFeePerGas: e, to: o } = d, t = i ? a(i) : void 0;
|
|
9
|
+
if (t && !s(t.address))
|
|
10
|
+
throw new n({ address: t.address });
|
|
11
|
+
if (o && !s(o))
|
|
12
|
+
throw new n({ address: o });
|
|
13
|
+
if (typeof f < "u" && (typeof r < "u" || typeof e < "u"))
|
|
14
|
+
throw new u();
|
|
15
|
+
if (r && r > m)
|
|
16
|
+
throw new p({ maxFeePerGas: r });
|
|
17
|
+
if (e && r && e > r)
|
|
18
|
+
throw new c({ maxFeePerGas: r, maxPriorityFeePerGas: e });
|
|
9
19
|
}
|
|
10
20
|
export {
|
|
11
|
-
|
|
21
|
+
E as assertRequest
|
|
12
22
|
};
|
package/dist/index49.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./index219.cjs"),c=require("./index220.cjs"),o=require("./index221.cjs");function a(t){const n=c.parseStructs(t),r=[],i=t.length;for(let e=0;e<i;e++){const s=t[e];u.isStructSignature(s)||r.push(o.parseSignature(s,n))}return r}exports.parseAbi=a;
|
package/dist/index49.js
CHANGED
|
@@ -1,71 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
metaMessages: [
|
|
10
|
-
u && `Status: ${u}`,
|
|
11
|
-
`URL: ${o(l)}`,
|
|
12
|
-
t && `Request body: ${s(t)}`
|
|
13
|
-
].filter(Boolean),
|
|
14
|
-
name: "HttpRequestError"
|
|
15
|
-
}), Object.defineProperty(this, "body", {
|
|
16
|
-
enumerable: !0,
|
|
17
|
-
configurable: !0,
|
|
18
|
-
writable: !0,
|
|
19
|
-
value: void 0
|
|
20
|
-
}), Object.defineProperty(this, "headers", {
|
|
21
|
-
enumerable: !0,
|
|
22
|
-
configurable: !0,
|
|
23
|
-
writable: !0,
|
|
24
|
-
value: void 0
|
|
25
|
-
}), Object.defineProperty(this, "status", {
|
|
26
|
-
enumerable: !0,
|
|
27
|
-
configurable: !0,
|
|
28
|
-
writable: !0,
|
|
29
|
-
value: void 0
|
|
30
|
-
}), Object.defineProperty(this, "url", {
|
|
31
|
-
enumerable: !0,
|
|
32
|
-
configurable: !0,
|
|
33
|
-
writable: !0,
|
|
34
|
-
value: void 0
|
|
35
|
-
}), this.body = t, this.headers = d, this.status = u, this.url = l;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
class f extends a {
|
|
39
|
-
constructor({ body: t, error: e, url: r }) {
|
|
40
|
-
super("RPC Request failed.", {
|
|
41
|
-
cause: e,
|
|
42
|
-
details: e.message,
|
|
43
|
-
metaMessages: [`URL: ${o(r)}`, `Request body: ${s(t)}`],
|
|
44
|
-
name: "RpcRequestError"
|
|
45
|
-
}), Object.defineProperty(this, "code", {
|
|
46
|
-
enumerable: !0,
|
|
47
|
-
configurable: !0,
|
|
48
|
-
writable: !0,
|
|
49
|
-
value: void 0
|
|
50
|
-
}), Object.defineProperty(this, "data", {
|
|
51
|
-
enumerable: !0,
|
|
52
|
-
configurable: !0,
|
|
53
|
-
writable: !0,
|
|
54
|
-
value: void 0
|
|
55
|
-
}), this.code = e.code, this.data = e.data;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
class p extends a {
|
|
59
|
-
constructor({ body: t, url: e }) {
|
|
60
|
-
super("The request took too long to respond.", {
|
|
61
|
-
details: "The request timed out.",
|
|
62
|
-
metaMessages: [`URL: ${o(e)}`, `Request body: ${s(t)}`],
|
|
63
|
-
name: "TimeoutError"
|
|
64
|
-
});
|
|
1
|
+
import { isStructSignature as c } from "./index219.js";
|
|
2
|
+
import { parseStructs as s } from "./index220.js";
|
|
3
|
+
import { parseSignature as p } from "./index221.js";
|
|
4
|
+
function a(t) {
|
|
5
|
+
const i = s(t), o = [], e = t.length;
|
|
6
|
+
for (let r = 0; r < e; r++) {
|
|
7
|
+
const n = t[r];
|
|
8
|
+
c(n) || o.push(p(n, i));
|
|
65
9
|
}
|
|
10
|
+
return o;
|
|
66
11
|
}
|
|
67
12
|
export {
|
|
68
|
-
|
|
69
|
-
f as RpcRequestError,
|
|
70
|
-
p as TimeoutError
|
|
13
|
+
a as parseAbi
|
|
71
14
|
};
|
package/dist/index50.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 m=require("./index51.cjs"),s=require("./index42.cjs"),q=require("./index52.cjs");async function b(r,a){const{address:u,abi:n,args:c,eventName:e,fromBlock:t,strict:l,toBlock:o}=a,d=q.createFilterRequestScope(r,{method:"eth_newFilter"}),p=e?m.encodeEventTopics({abi:n,args:c,eventName:e}):void 0,i=await r.request({method:"eth_newFilter",params:[{address:u,fromBlock:typeof t=="bigint"?s.numberToHex(t):t,toBlock:typeof o=="bigint"?s.numberToHex(o):o,topics:p}]});return{abi:n,args:c,eventName:e,id:i,request:d(i),strict:!!l,type:"event"}}exports.createContractEventFilter=b;
|
package/dist/index50.js
CHANGED
|
@@ -1,12 +1,34 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { encodeEventTopics as l } from "./index51.js";
|
|
2
|
+
import { numberToHex as s } from "./index42.js";
|
|
3
|
+
import { createFilterRequestScope as u } from "./index52.js";
|
|
4
|
+
async function h(r, a) {
|
|
5
|
+
const { address: m, abi: n, args: i, eventName: e, fromBlock: t, strict: p, toBlock: o } = a, f = u(r, {
|
|
6
|
+
method: "eth_newFilter"
|
|
7
|
+
}), d = e ? l({
|
|
8
|
+
abi: n,
|
|
9
|
+
args: i,
|
|
10
|
+
eventName: e
|
|
11
|
+
}) : void 0, c = await r.request({
|
|
12
|
+
method: "eth_newFilter",
|
|
13
|
+
params: [
|
|
14
|
+
{
|
|
15
|
+
address: m,
|
|
16
|
+
fromBlock: typeof t == "bigint" ? s(t) : t,
|
|
17
|
+
toBlock: typeof o == "bigint" ? s(o) : o,
|
|
18
|
+
topics: d
|
|
19
|
+
}
|
|
20
|
+
]
|
|
21
|
+
});
|
|
22
|
+
return {
|
|
23
|
+
abi: n,
|
|
24
|
+
args: i,
|
|
25
|
+
eventName: e,
|
|
26
|
+
id: c,
|
|
27
|
+
request: f(c),
|
|
28
|
+
strict: !!p,
|
|
29
|
+
type: "event"
|
|
30
|
+
};
|
|
9
31
|
}
|
|
10
32
|
export {
|
|
11
|
-
|
|
33
|
+
h as createContractEventFilter
|
|
12
34
|
};
|
package/dist/index51.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("./index85.cjs"),v=require("./index154.cjs"),m=require("./index160.cjs"),p=require("./index170.cjs"),E=require("./index164.cjs"),q=require("./index161.cjs"),h=require("./index140.cjs"),w=require("./index73.cjs"),b="/docs/contract/encodeEventTopics";function S(t){var l;const{abi:i,eventName:u,args:c}=t;let s=i[0];if(u){const e=w.getAbiItem({abi:i,name:u});if(!e)throw new f.AbiEventNotFoundError(u,{docsPath:b});s=e}if(s.type!=="event")throw new f.AbiEventNotFoundError(void 0,{docsPath:b});const y=h.formatAbiItem(s),A=E.toEventSelector(y);let a=[];if(c&&"inputs"in s){const e=(l=s.inputs)==null?void 0:l.filter(r=>"indexed"in r&&r.indexed),n=Array.isArray(c)?c:Object.values(c).length>0?(e==null?void 0:e.map(r=>c[r.name]))??[]:[];n.length>0&&(a=(e==null?void 0:e.map((r,o)=>Array.isArray(n[o])?n[o].map((T,g)=>d({param:r,value:n[o][g]})):typeof n[o]<"u"&&n[o]!==null?d({param:r,value:n[o]}):null))??[])}return[A,...a]}function d({param:t,value:i}){if(t.type==="string"||t.type==="bytes")return p.keccak256(m.toBytes(i));if(t.type==="tuple"||t.type.match(/^(.*)\[(\d+)?\]$/))throw new v.FilterTypeNotSupportedError(t.type);return q.encodeAbiParameters([t],[i])}exports.encodeEventTopics=S;
|
package/dist/index51.js
CHANGED
|
@@ -1,31 +1,39 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}
|
|
27
|
-
}
|
|
1
|
+
import { AbiEventNotFoundError as u } from "./index85.js";
|
|
2
|
+
import { FilterTypeNotSupportedError as b } from "./index154.js";
|
|
3
|
+
import { toBytes as g } from "./index160.js";
|
|
4
|
+
import { keccak256 as v } from "./index170.js";
|
|
5
|
+
import { toEventSelector as h } from "./index164.js";
|
|
6
|
+
import { encodeAbiParameters as w } from "./index161.js";
|
|
7
|
+
import { formatAbiItem as E } from "./index140.js";
|
|
8
|
+
import { getAbiItem as N } from "./index73.js";
|
|
9
|
+
const l = "/docs/contract/encodeEventTopics";
|
|
10
|
+
function $(e) {
|
|
11
|
+
var p;
|
|
12
|
+
const { abi: i, eventName: m, args: c } = e;
|
|
13
|
+
let f = i[0];
|
|
14
|
+
if (m) {
|
|
15
|
+
const t = N({ abi: i, name: m });
|
|
16
|
+
if (!t)
|
|
17
|
+
throw new u(m, { docsPath: l });
|
|
18
|
+
f = t;
|
|
19
|
+
}
|
|
20
|
+
if (f.type !== "event")
|
|
21
|
+
throw new u(void 0, { docsPath: l });
|
|
22
|
+
const d = E(f), a = h(d);
|
|
23
|
+
let s = [];
|
|
24
|
+
if (c && "inputs" in f) {
|
|
25
|
+
const t = (p = f.inputs) == null ? void 0 : p.filter((r) => "indexed" in r && r.indexed), o = Array.isArray(c) ? c : Object.values(c).length > 0 ? (t == null ? void 0 : t.map((r) => c[r.name])) ?? [] : [];
|
|
26
|
+
o.length > 0 && (s = (t == null ? void 0 : t.map((r, n) => Array.isArray(o[n]) ? o[n].map((T, A) => y({ param: r, value: o[n][A] })) : typeof o[n] < "u" && o[n] !== null ? y({ param: r, value: o[n] }) : null)) ?? []);
|
|
27
|
+
}
|
|
28
|
+
return [a, ...s];
|
|
29
|
+
}
|
|
30
|
+
function y({ param: e, value: i }) {
|
|
31
|
+
if (e.type === "string" || e.type === "bytes")
|
|
32
|
+
return v(g(i));
|
|
33
|
+
if (e.type === "tuple" || e.type.match(/^(.*)\[(\d+)?\]$/))
|
|
34
|
+
throw new b(e.type);
|
|
35
|
+
return w([e], [i]);
|
|
28
36
|
}
|
|
29
37
|
export {
|
|
30
|
-
|
|
38
|
+
$ as encodeEventTopics
|
|
31
39
|
};
|
package/dist/index52.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function p(e,{method:u}){var s,o;const r={};return e.transport.type==="fallback"&&((o=(s=e.transport).onResponse)==null||o.call(s,({method:t,response:a,status:c,transport:n})=>{c==="success"&&u===t&&(r[a]=n.request)})),t=>r[t]||e.request}exports.createFilterRequestScope=p;
|
package/dist/index52.js
CHANGED
|
@@ -1,74 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
async request(h) {
|
|
8
|
-
var m;
|
|
9
|
-
const { body: r, onRequest: n = o.onRequest, onResponse: f = o.onResponse, timeout: w = o.timeout ?? 1e4 } = h, d = {
|
|
10
|
-
...o.fetchOptions ?? {},
|
|
11
|
-
...h.fetchOptions ?? {}
|
|
12
|
-
}, { headers: T, method: j, signal: O } = d;
|
|
13
|
-
try {
|
|
14
|
-
const t = await k(async ({ signal: a }) => {
|
|
15
|
-
const i = {
|
|
16
|
-
...d,
|
|
17
|
-
body: Array.isArray(r) ? p(r.map((y) => ({
|
|
18
|
-
jsonrpc: "2.0",
|
|
19
|
-
id: y.id ?? l.take(),
|
|
20
|
-
...y
|
|
21
|
-
}))) : p({
|
|
22
|
-
jsonrpc: "2.0",
|
|
23
|
-
id: r.id ?? l.take(),
|
|
24
|
-
...r
|
|
25
|
-
}),
|
|
26
|
-
headers: {
|
|
27
|
-
"Content-Type": "application/json",
|
|
28
|
-
...T
|
|
29
|
-
},
|
|
30
|
-
method: j || "POST",
|
|
31
|
-
signal: O || (w > 0 ? a : null)
|
|
32
|
-
}, R = new Request(s, i), u = await (n == null ? void 0 : n(R, i)) ?? { ...i, url: s };
|
|
33
|
-
return await fetch(u.url ?? s, u);
|
|
34
|
-
}, {
|
|
35
|
-
errorInstance: new g({ body: r, url: s }),
|
|
36
|
-
timeout: w,
|
|
37
|
-
signal: !0
|
|
38
|
-
});
|
|
39
|
-
f && await f(t);
|
|
40
|
-
let e;
|
|
41
|
-
if ((m = t.headers.get("Content-Type")) != null && m.startsWith("application/json"))
|
|
42
|
-
e = await t.json();
|
|
43
|
-
else {
|
|
44
|
-
e = await t.text();
|
|
45
|
-
try {
|
|
46
|
-
e = JSON.parse(e || "{}");
|
|
47
|
-
} catch (a) {
|
|
48
|
-
if (t.ok)
|
|
49
|
-
throw a;
|
|
50
|
-
e = { error: e };
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
if (!t.ok)
|
|
54
|
-
throw new c({
|
|
55
|
-
body: r,
|
|
56
|
-
details: p(e.error) || t.statusText,
|
|
57
|
-
headers: t.headers,
|
|
58
|
-
status: t.status,
|
|
59
|
-
url: s
|
|
60
|
-
});
|
|
61
|
-
return e;
|
|
62
|
-
} catch (t) {
|
|
63
|
-
throw t instanceof c || t instanceof g ? t : new c({
|
|
64
|
-
body: r,
|
|
65
|
-
cause: t,
|
|
66
|
-
url: s
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
};
|
|
1
|
+
function c(e, { method: p }) {
|
|
2
|
+
var r, o;
|
|
3
|
+
const t = {};
|
|
4
|
+
return e.transport.type === "fallback" && ((o = (r = e.transport).onResponse) == null || o.call(r, ({ method: s, response: n, status: u, transport: a }) => {
|
|
5
|
+
u === "success" && p === s && (t[n] = a.request);
|
|
6
|
+
})), (s) => t[s] || e.request;
|
|
71
7
|
}
|
|
72
8
|
export {
|
|
73
|
-
|
|
9
|
+
c as createFilterRequestScope
|
|
74
10
|
};
|
package/dist/index53.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 g=require("./index32.cjs"),m=require("./index40.cjs"),f=require("./index54.cjs"),q=require("./index55.cjs"),G=require("./index56.cjs");async function C(i,u){const{abi:a,address:r,args:c,functionName:n,dataSuffix:o,...t}=u,d=m.encodeFunctionData({abi:a,args:c,functionName:n});try{return await q.getAction(i,G.estimateGas,"estimateGas")({data:`${d}${o?o.replace("0x",""):""}`,to:r,...t})}catch(s){const e=t.account?g.parseAccount(t.account):void 0;throw f.getContractError(s,{abi:a,address:r,args:c,docsPath:"/docs/contract/estimateContractGas",functionName:n,sender:e==null?void 0:e.address})}}exports.estimateContractGas=C;
|