@gardenfi/utils 3.0.0-beta.7 → 3.0.0-beta.8
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 -2
- package/dist/index100.js +3 -121
- package/dist/index101.cjs +1 -1
- package/dist/index101.js +18 -14
- package/dist/index102.cjs +1 -1
- package/dist/index102.js +20 -24
- package/dist/index103.cjs +1 -1
- package/dist/index103.js +33 -31
- package/dist/index104.cjs +1 -1
- package/dist/index104.js +21 -42
- package/dist/index105.cjs +1 -1
- package/dist/index105.js +8 -6
- package/dist/index106.cjs +4 -1
- package/dist/index106.js +193 -102
- package/dist/index107.cjs +3 -1
- package/dist/index107.js +451 -37
- package/dist/index108.cjs +1 -1
- package/dist/index108.js +27 -8
- package/dist/index109.cjs +1 -1
- package/dist/index109.js +160 -19
- package/dist/index110.cjs +1 -1
- package/dist/index110.js +22 -2
- package/dist/index111.cjs +1 -1
- package/dist/index111.js +127 -75
- package/dist/index112.cjs +1 -1
- package/dist/index112.js +38 -15
- package/dist/index113.cjs +1 -1
- package/dist/index113.js +6 -151
- package/dist/index114.cjs +1 -20
- package/dist/index114.js +27 -326
- package/dist/index115.cjs +1 -3
- package/dist/index115.js +55 -451
- package/dist/index116.cjs +1 -1
- package/dist/index116.js +42 -70
- package/dist/index117.cjs +1 -1
- package/dist/index117.js +191 -16
- package/dist/index118.cjs +1 -1
- package/dist/index118.js +4 -11
- package/dist/index119.cjs +1 -1
- package/dist/index119.js +68 -120
- package/dist/index120.cjs +1 -1
- package/dist/index120.js +20 -5
- package/dist/index121.cjs +1 -1
- package/dist/index121.js +3 -46
- package/dist/index122.cjs +1 -1
- package/dist/index122.js +15 -37
- package/dist/index123.cjs +1 -1
- package/dist/index123.js +23 -6
- package/dist/index124.cjs +1 -1
- package/dist/index124.js +11 -90
- package/dist/index125.cjs +1 -1
- package/dist/index125.js +18 -14
- package/dist/index126.cjs +1 -1
- package/dist/index126.js +34 -3
- package/dist/index127.cjs +1 -1
- package/dist/index127.js +3 -27
- package/dist/index128.cjs +1 -2
- package/dist/index128.js +18 -24
- package/dist/index129.cjs +1 -1
- package/dist/index129.js +27 -9
- package/dist/index130.cjs +1 -1
- package/dist/index130.js +36 -8
- package/dist/index131.cjs +1 -1
- package/dist/index131.js +8 -10
- package/dist/index132.cjs +1 -1
- package/dist/index132.js +10 -11
- package/dist/index133.cjs +1 -1
- package/dist/index133.js +24 -12
- package/dist/index134.cjs +1 -1
- package/dist/index134.js +27 -20
- package/dist/index135.cjs +1 -1
- package/dist/index135.js +3 -14
- package/dist/index136.cjs +1 -1
- package/dist/index136.js +75 -4
- package/dist/index137.cjs +1 -1
- package/dist/index137.js +9 -6
- package/dist/index138.cjs +1 -1
- package/dist/index138.js +21 -18
- package/dist/index139.cjs +1 -1
- package/dist/index139.js +8 -10
- package/dist/index140.cjs +1 -1
- package/dist/index140.js +9 -57
- package/dist/index141.cjs +1 -1
- package/dist/index141.js +11 -6
- package/dist/index142.cjs +1 -1
- package/dist/index142.js +6 -13
- package/dist/index143.cjs +1 -1
- package/dist/index143.js +6 -7
- package/dist/index144.cjs +1 -1
- package/dist/index144.js +12 -137
- package/dist/index145.cjs +1 -1
- package/dist/index145.js +32 -7
- package/dist/index146.cjs +1 -1
- package/dist/index146.js +5 -22
- package/dist/index147.cjs +1 -1
- package/dist/index147.js +36 -16
- package/dist/index148.cjs +1 -1
- package/dist/index148.js +109 -41
- package/dist/index149.cjs +1 -1
- package/dist/index149.js +170 -20
- package/dist/index150.cjs +1 -1
- package/dist/index150.js +46 -77
- package/dist/index151.cjs +1 -1
- package/dist/index151.js +32 -11
- package/dist/index152.cjs +1 -1
- package/dist/index152.js +7 -13
- package/dist/index153.cjs +1 -1
- package/dist/index153.js +17 -6
- package/dist/index154.cjs +1 -1
- package/dist/index154.js +20 -41
- package/dist/index155.cjs +1 -1
- package/dist/index155.js +32 -5
- package/dist/index156.cjs +1 -1
- package/dist/index156.js +41 -32
- package/dist/index157.cjs +1 -1
- package/dist/index157.js +22 -9
- package/dist/index158.cjs +1 -1
- package/dist/index158.js +19 -58
- package/dist/index159.cjs +1 -1
- package/dist/index159.js +50 -18
- package/dist/index160.cjs +1 -1
- package/dist/index160.js +11 -105
- package/dist/index161.cjs +1 -1
- package/dist/index161.js +24 -78
- package/dist/index162.cjs +1 -1
- package/dist/index162.js +24 -9
- package/dist/index163.cjs +1 -1
- package/dist/index163.js +101 -87
- package/dist/index164.cjs +1 -2
- package/dist/index164.js +3 -3
- package/dist/index165.cjs +1 -1
- package/dist/index165.js +6 -9
- package/dist/index166.cjs +1 -1
- package/dist/index166.js +30 -12
- package/dist/index167.cjs +1 -1
- package/dist/index167.js +3 -4
- package/dist/index168.cjs +1 -1
- package/dist/index168.js +18 -2
- package/dist/index169.cjs +1 -1
- package/dist/index169.js +6 -32
- package/dist/index170.cjs +1 -1
- package/dist/index170.js +8 -21
- package/dist/index171.cjs +1 -1
- package/dist/index171.js +103 -5
- package/dist/index172.cjs +1 -1
- package/dist/index172.js +80 -5
- package/dist/index173.cjs +1 -1
- package/dist/index173.js +5 -5
- package/dist/index174.cjs +1 -9
- package/dist/index174.js +6 -35
- package/dist/index175.cjs +1 -1
- package/dist/index175.js +28 -3
- package/dist/index176.cjs +1 -1
- package/dist/index176.js +33 -17
- package/dist/index177.cjs +1 -1
- package/dist/index177.js +13 -20
- package/dist/index178.cjs +1 -1
- package/dist/index178.js +16 -35
- package/dist/index179.cjs +1 -1
- package/dist/index179.js +77 -7
- package/dist/index18.cjs +1 -1
- package/dist/index18.js +8 -8
- package/dist/index180.cjs +1 -4
- package/dist/index180.js +2 -195
- package/dist/index181.cjs +1 -1
- package/dist/index181.js +14 -27
- package/dist/index182.cjs +1 -1
- package/dist/index182.js +18 -161
- package/dist/index183.cjs +1 -1
- package/dist/index183.js +170 -126
- package/dist/index184.cjs +1 -1
- package/dist/index184.js +17 -27
- package/dist/index185.cjs +1 -1
- package/dist/index185.js +10 -191
- package/dist/index186.cjs +1 -1
- package/dist/index186.js +31 -4
- package/dist/index187.cjs +1 -1
- package/dist/index187.js +2 -21
- package/dist/index188.cjs +1 -1
- package/dist/index188.js +14 -3
- package/dist/index189.cjs +1 -1
- package/dist/index189.js +12 -16
- package/dist/index190.cjs +1 -1
- package/dist/index190.js +44 -31
- package/dist/index191.cjs +1 -1
- package/dist/index191.js +12 -3
- package/dist/index192.cjs +1 -1
- package/dist/index192.js +7 -27
- package/dist/index193.cjs +1 -1
- package/dist/index193.js +68 -23
- package/dist/index194.cjs +1 -1
- package/dist/index194.js +45 -27
- package/dist/index195.cjs +1 -1
- package/dist/index195.js +37 -6
- package/dist/index196.cjs +1 -1
- package/dist/index196.js +17 -6
- package/dist/index197.cjs +1 -1
- package/dist/index197.js +6 -32
- package/dist/index198.cjs +1 -1
- package/dist/index198.js +10 -5
- package/dist/index199.cjs +1 -1
- package/dist/index199.js +13 -37
- package/dist/index20.cjs +1 -1
- package/dist/index20.js +2 -2
- package/dist/index200.cjs +1 -1
- package/dist/index200.js +13 -49
- package/dist/index201.cjs +1 -1
- package/dist/index201.js +8 -32
- package/dist/index202.cjs +1 -1
- package/dist/index202.js +34 -16
- package/dist/index203.cjs +1 -1
- package/dist/index203.js +16 -42
- package/dist/index204.cjs +1 -1
- package/dist/index204.js +29 -104
- package/dist/index205.cjs +1 -1
- package/dist/index205.js +15 -3
- package/dist/index206.cjs +1 -1
- package/dist/index206.js +6 -5
- package/dist/index207.cjs +1 -1
- package/dist/index207.js +103 -3
- package/dist/index208.cjs +1 -1
- package/dist/index208.js +73 -15
- package/dist/index209.cjs +2 -1
- package/dist/index209.js +24 -8
- package/dist/index210.cjs +1 -1
- package/dist/index210.js +25 -5
- package/dist/index211.cjs +1 -1
- package/dist/index211.js +18 -27
- package/dist/index212.cjs +1 -1
- package/dist/index212.js +15 -78
- package/dist/index213.cjs +1 -1
- package/dist/index213.js +6 -2
- package/dist/index214.cjs +1 -1
- package/dist/index214.js +13 -18
- package/dist/index215.cjs +1 -1
- package/dist/index215.js +10 -17
- package/dist/index216.cjs +1 -1
- package/dist/index216.js +16 -10
- package/dist/index217.cjs +2 -1
- package/dist/index217.js +40 -102
- package/dist/index218.cjs +1 -1
- package/dist/index218.js +2 -17
- package/dist/index219.cjs +1 -1
- package/dist/index219.js +5 -214
- package/dist/index22.cjs +1 -1
- package/dist/index22.js +9 -9
- package/dist/index220.cjs +1 -1
- package/dist/index220.js +10 -42
- package/dist/index221.cjs +1 -1
- package/dist/index221.js +18 -107
- package/dist/index222.cjs +1 -1
- package/dist/index222.js +8 -78
- package/dist/index223.cjs +1 -1
- package/dist/index223.js +67 -2
- package/dist/index224.cjs +1 -1
- package/dist/index224.js +65 -24
- package/dist/index225.cjs +1 -1
- package/dist/index225.js +184 -42
- package/dist/index226.cjs +1 -1
- package/dist/index226.js +28 -9
- package/dist/index227.cjs +1 -2
- package/dist/index227.js +59 -24
- package/dist/index228.cjs +1 -1
- package/dist/index228.js +41 -2
- package/dist/index229.cjs +1 -1
- package/dist/index229.js +16 -5
- package/dist/index230.cjs +1 -1
- package/dist/index230.js +12 -9
- package/dist/index231.cjs +1 -1
- package/dist/index231.js +11 -19
- package/dist/index232.cjs +1 -1
- package/dist/index232.js +12 -8
- package/dist/index233.cjs +1 -1
- package/dist/index233.js +20 -67
- package/dist/index234.cjs +1 -1
- package/dist/index234.js +106 -63
- package/dist/index235.cjs +1 -1
- package/dist/index235.js +99 -184
- package/dist/index236.cjs +1 -1
- package/dist/index236.js +6 -28
- package/dist/index237.cjs +1 -1
- package/dist/index237.js +7 -77
- package/dist/index238.cjs +1 -1
- package/dist/index238.js +25 -39
- package/dist/index239.cjs +1 -1
- package/dist/index239.js +16 -16
- package/dist/index240.cjs +1 -1
- package/dist/index240.js +213 -12
- package/dist/index241.cjs +1 -1
- package/dist/index241.js +24 -11
- package/dist/index242.cjs +1 -1
- package/dist/index242.js +47 -13
- package/dist/index243.cjs +1 -1
- package/dist/index243.js +9 -19
- package/dist/index244.cjs +1 -1
- package/dist/index244.js +206 -6
- package/dist/index245.cjs +1 -1
- package/dist/index245.js +43 -7
- package/dist/index246.cjs +1 -1
- package/dist/index246.js +74 -22
- package/dist/index247.cjs +1 -1
- package/dist/index247.js +2 -12
- package/dist/index248.cjs +1 -1
- package/dist/index248.js +11 -19
- package/dist/index249.cjs +1 -1
- package/dist/index249.js +18 -656
- package/dist/index25.cjs +1 -1
- package/dist/index25.js +2 -2
- package/dist/index250.cjs +1 -1
- package/dist/index250.js +68 -206
- package/dist/index251.cjs +2 -1
- package/dist/index251.js +88 -174
- package/dist/index252.cjs +1 -2
- package/dist/index252.js +14 -91
- package/dist/index253.cjs +1 -1
- package/dist/index253.js +657 -14
- package/dist/index254.cjs +1 -1
- package/dist/index254.js +176 -67
- package/dist/index26.cjs +1 -1
- package/dist/index26.js +5 -5
- package/dist/index27.cjs +1 -1
- package/dist/index27.js +3 -3
- package/dist/index28.cjs +1 -1
- package/dist/index28.js +1 -1
- package/dist/index29.cjs +1 -1
- package/dist/index29.js +7 -13
- package/dist/index30.cjs +1 -1
- package/dist/index30.js +31 -34
- package/dist/index31.cjs +1 -1
- package/dist/index31.js +27 -30
- package/dist/index32.cjs +1 -1
- package/dist/index32.js +16 -55
- package/dist/index33.cjs +1 -1
- package/dist/index33.js +31 -43
- package/dist/index34.cjs +1 -1
- package/dist/index34.js +41 -22
- package/dist/index35.cjs +1 -1
- package/dist/index35.js +151 -6
- package/dist/index36.cjs +1 -1
- package/dist/index36.js +41 -18
- package/dist/index37.cjs +1 -1
- package/dist/index37.js +57 -14
- package/dist/index38.cjs +2 -1
- package/dist/index38.js +59 -5
- package/dist/index39.cjs +1 -1
- package/dist/index39.js +13 -13
- package/dist/index40.cjs +1 -1
- package/dist/index40.js +37 -10
- package/dist/index41.cjs +1 -1
- package/dist/index41.js +15 -12
- package/dist/index42.cjs +1 -1
- package/dist/index42.js +8 -11
- package/dist/index43.cjs +1 -1
- package/dist/index43.js +20 -3
- package/dist/index44.cjs +1 -1
- package/dist/index44.js +2 -22
- package/dist/index45.cjs +1 -1
- package/dist/index45.js +45 -8
- package/dist/index46.cjs +1 -1
- package/dist/index46.js +33 -3
- package/dist/index47.cjs +1 -1
- package/dist/index47.js +3 -16
- package/dist/index48.cjs +1 -1
- package/dist/index48.js +9 -5
- package/dist/index49.cjs +1 -1
- package/dist/index49.js +60 -171
- package/dist/index50.cjs +1 -1
- package/dist/index50.js +75 -101
- package/dist/index51.cjs +1 -1
- package/dist/index51.js +7 -171
- package/dist/index52.cjs +1 -1
- package/dist/index52.js +15 -110
- package/dist/index53.cjs +1 -1
- package/dist/index53.js +10 -30
- package/dist/index54.cjs +1 -1
- package/dist/index54.js +6 -2
- package/dist/index55.cjs +1 -1
- package/dist/index55.js +15 -4
- package/dist/index56.cjs +1 -2
- package/dist/index56.js +3 -59
- package/dist/index57.cjs +1 -2
- package/dist/index57.js +25 -53
- package/dist/index58.cjs +1 -3
- package/dist/index58.js +159 -210
- package/dist/index59.cjs +1 -1
- package/dist/index59.js +4 -23
- package/dist/index60.cjs +1 -1
- package/dist/index60.js +6 -18
- package/dist/index61.cjs +1 -1
- package/dist/index61.js +90 -10
- package/dist/index62.cjs +1 -1
- package/dist/index62.js +10 -20
- package/dist/index63.cjs +1 -1
- package/dist/index63.js +6 -13
- package/dist/index64.cjs +1 -1
- package/dist/index64.js +13 -12
- package/dist/index65.cjs +1 -1
- package/dist/index65.js +125 -24
- package/dist/index66.cjs +1 -1
- package/dist/index66.js +136 -26
- package/dist/index67.cjs +1 -1
- package/dist/index67.js +7 -47
- package/dist/index68.cjs +1 -1
- package/dist/index68.js +21 -16
- package/dist/index69.cjs +1 -1
- package/dist/index69.js +17 -11
- package/dist/index70.cjs +1 -1
- package/dist/index70.js +39 -27
- package/dist/index71.cjs +1 -1
- package/dist/index71.js +21 -36
- package/dist/index72.cjs +1 -1
- package/dist/index72.js +11 -7
- package/dist/index73.cjs +1 -1
- package/dist/index73.js +6 -29
- package/dist/index74.cjs +1 -1
- package/dist/index74.js +5 -22
- package/dist/index75.cjs +1 -1
- package/dist/index75.js +19 -7
- package/dist/index76.cjs +1 -1
- package/dist/index76.js +106 -70
- package/dist/index77.cjs +1 -1
- package/dist/index77.js +76 -44
- package/dist/index78.cjs +1 -1
- package/dist/index78.js +6 -20
- package/dist/index79.cjs +1 -1
- package/dist/index79.js +27 -36
- package/dist/index8.cjs +1 -1
- package/dist/index8.js +13 -9
- package/dist/index80.cjs +1 -1
- package/dist/index80.js +90 -17
- package/dist/index81.cjs +1 -1
- package/dist/index81.js +4 -7
- package/dist/index82.cjs +2 -1
- package/dist/index82.js +3 -10
- package/dist/index83.cjs +1 -1
- package/dist/index83.js +9 -14
- package/dist/index84.cjs +20 -1
- package/dist/index84.js +324 -162
- package/dist/index85.cjs +1 -1
- package/dist/index85.js +13 -77
- package/dist/index86.cjs +1 -1
- package/dist/index86.js +4 -13
- package/dist/index87.cjs +1 -1
- package/dist/index87.js +12 -51
- package/dist/index88.cjs +1 -1
- package/dist/index88.js +2 -8
- package/dist/index89.cjs +1 -1
- package/dist/index89.js +1 -1
- package/dist/index90.cjs +2 -1
- package/dist/index90.js +54 -21
- package/dist/index91.cjs +3 -1
- package/dist/index91.js +215 -8
- package/dist/index92.cjs +1 -1
- package/dist/index92.js +32 -32
- package/dist/index93.cjs +1 -1
- package/dist/index93.js +21 -16
- package/dist/index94.cjs +1 -1
- package/dist/index94.js +5 -73
- package/dist/index95.cjs +1 -1
- package/dist/index95.js +72 -34
- package/dist/index96.cjs +1 -1
- package/dist/index96.js +5 -16
- package/dist/index97.cjs +1 -1
- package/dist/index97.js +5 -75
- package/dist/index98.cjs +9 -1
- package/dist/index98.js +35 -12
- package/dist/index99.cjs +2 -1
- package/dist/index99.js +119 -28
- package/package.json +1 -1
package/dist/index135.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 r(t,{strict:e=!0}={}){return!t||typeof t!="string"?!1:e?/^0x[0-9a-fA-F]*$/.test(t):t.startsWith("0x")}exports.isHex=r;
|
package/dist/index135.js
CHANGED
|
@@ -1,17 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
if (e.type)
|
|
4
|
-
return e.type;
|
|
5
|
-
if (typeof e.authorizationList < "u")
|
|
6
|
-
return "eip7702";
|
|
7
|
-
if (typeof e.blobs < "u" || typeof e.blobVersionedHashes < "u" || typeof e.maxFeePerBlobGas < "u" || typeof e.sidecars < "u")
|
|
8
|
-
return "eip4844";
|
|
9
|
-
if (typeof e.maxFeePerGas < "u" || typeof e.maxPriorityFeePerGas < "u")
|
|
10
|
-
return "eip1559";
|
|
11
|
-
if (typeof e.gasPrice < "u")
|
|
12
|
-
return typeof e.accessList < "u" ? "eip2930" : "legacy";
|
|
13
|
-
throw new f({ transaction: e });
|
|
1
|
+
function e(t, { strict: r = !0 } = {}) {
|
|
2
|
+
return !t || typeof t != "string" ? !1 : r ? /^0x[0-9a-fA-F]*$/.test(t) : t.startsWith("0x");
|
|
14
3
|
}
|
|
15
4
|
export {
|
|
16
|
-
|
|
5
|
+
e as isHex
|
|
17
6
|
};
|
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 A=require("./index137.cjs"),m=require("./index115.cjs"),v=require("./index131.cjs"),g=require("./index121.cjs"),d=require("./index119.cjs");function b(c){const{abi:i,args:a,logs:u,strict:f=!0}=c,r=(()=>{if(c.eventName)return Array.isArray(c.eventName)?c.eventName:[c.eventName]})();return u.map(e=>{var y;const t=i.filter(o=>o.type==="event"&&e.topics[0]===g.toEventSelector(o));if(t.length===0)return null;let s,n;for(const o of t)try{s=d.decodeEventLog({...e,abi:[o],strict:!0}),n=o;break}catch{}if(!s&&!f){n=t[0];try{s=d.decodeEventLog({...e,abi:[n],strict:!1})}catch{const o=(y=n.inputs)==null?void 0:y.some(l=>!("name"in l&&l.name));return{...e,args:o?[]:{},eventName:n.name}}}return!s||!n||r&&!r.includes(s.eventName)||!p({args:s.args,inputs:n.inputs,matchArgs:a})?null:{...s,...e}}).filter(Boolean)}function p(c){const{args:i,inputs:a,matchArgs:u}=c;if(!u)return!0;if(!i)return!1;function f(r,e,t){try{return r.type==="address"?A.isAddressEqual(e,t):r.type==="string"||r.type==="bytes"?v.keccak256(m.toBytes(e))===t:e===t}catch{return!1}}return Array.isArray(i)&&Array.isArray(u)?u.every((r,e)=>{if(r==null)return!0;const t=a[e];return t?(Array.isArray(r)?r:[r]).some(n=>f(t,n,i[e])):!1}):typeof i=="object"&&!Array.isArray(i)&&typeof u=="object"&&!Array.isArray(u)?Object.entries(u).every(([r,e])=>{if(e==null)return!0;const t=a.find(n=>n.name===r);return t?(Array.isArray(e)?e:[e]).some(n=>f(t,n,i[r])):!1}):!1}exports.parseEventLogs=b;
|
package/dist/index136.js
CHANGED
|
@@ -1,7 +1,78 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { isAddressEqual as A } from "./index137.js";
|
|
2
|
+
import { toBytes as d } from "./index115.js";
|
|
3
|
+
import { keccak256 as p } from "./index131.js";
|
|
4
|
+
import { toEventSelector as b } from "./index121.js";
|
|
5
|
+
import { decodeEventLog as l } from "./index119.js";
|
|
6
|
+
function j(f) {
|
|
7
|
+
const { abi: s, args: a, logs: u, strict: c = !0 } = f, e = (() => {
|
|
8
|
+
if (f.eventName)
|
|
9
|
+
return Array.isArray(f.eventName) ? f.eventName : [f.eventName];
|
|
10
|
+
})();
|
|
11
|
+
return u.map((r) => {
|
|
12
|
+
var m;
|
|
13
|
+
const t = s.filter((o) => o.type === "event" && r.topics[0] === b(o));
|
|
14
|
+
if (t.length === 0)
|
|
15
|
+
return null;
|
|
16
|
+
let i, n;
|
|
17
|
+
for (const o of t)
|
|
18
|
+
try {
|
|
19
|
+
i = l({
|
|
20
|
+
...r,
|
|
21
|
+
abi: [o],
|
|
22
|
+
strict: !0
|
|
23
|
+
}), n = o;
|
|
24
|
+
break;
|
|
25
|
+
} catch {
|
|
26
|
+
}
|
|
27
|
+
if (!i && !c) {
|
|
28
|
+
n = t[0];
|
|
29
|
+
try {
|
|
30
|
+
i = l({
|
|
31
|
+
...r,
|
|
32
|
+
abi: [n],
|
|
33
|
+
strict: !1
|
|
34
|
+
});
|
|
35
|
+
} catch {
|
|
36
|
+
const o = (m = n.inputs) == null ? void 0 : m.some((y) => !("name" in y && y.name));
|
|
37
|
+
return {
|
|
38
|
+
...r,
|
|
39
|
+
args: o ? [] : {},
|
|
40
|
+
eventName: n.name
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
return !i || !n || e && !e.includes(i.eventName) || !v({
|
|
45
|
+
args: i.args,
|
|
46
|
+
inputs: n.inputs,
|
|
47
|
+
matchArgs: a
|
|
48
|
+
}) ? null : { ...i, ...r };
|
|
49
|
+
}).filter(Boolean);
|
|
50
|
+
}
|
|
51
|
+
function v(f) {
|
|
52
|
+
const { args: s, inputs: a, matchArgs: u } = f;
|
|
53
|
+
if (!u)
|
|
54
|
+
return !0;
|
|
55
|
+
if (!s)
|
|
56
|
+
return !1;
|
|
57
|
+
function c(e, r, t) {
|
|
58
|
+
try {
|
|
59
|
+
return e.type === "address" ? A(r, t) : e.type === "string" || e.type === "bytes" ? p(d(r)) === t : r === t;
|
|
60
|
+
} catch {
|
|
61
|
+
return !1;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
return Array.isArray(s) && Array.isArray(u) ? u.every((e, r) => {
|
|
65
|
+
if (e == null)
|
|
66
|
+
return !0;
|
|
67
|
+
const t = a[r];
|
|
68
|
+
return t ? (Array.isArray(e) ? e : [e]).some((n) => c(t, n, s[r])) : !1;
|
|
69
|
+
}) : typeof s == "object" && !Array.isArray(s) && typeof u == "object" && !Array.isArray(u) ? Object.entries(u).every(([e, r]) => {
|
|
70
|
+
if (r == null)
|
|
71
|
+
return !0;
|
|
72
|
+
const t = a.find((n) => n.name === e);
|
|
73
|
+
return t ? (Array.isArray(r) ? r : [r]).some((n) => c(t, n, s[e])) : !1;
|
|
74
|
+
}) : !1;
|
|
4
75
|
}
|
|
5
76
|
export {
|
|
6
|
-
|
|
77
|
+
j as parseEventLogs
|
|
7
78
|
};
|
package/dist/index137.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index87.cjs"),d=require("./index124.cjs");function t(s,r){if(!d.isAddress(s,{strict:!1}))throw new e.InvalidAddressError({address:s});if(!d.isAddress(r,{strict:!1}))throw new e.InvalidAddressError({address:r});return s.toLowerCase()===r.toLowerCase()}exports.isAddressEqual=t;
|
package/dist/index137.js
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { InvalidAddressError as e } from "./index87.js";
|
|
2
|
+
import { isAddress as o } from "./index124.js";
|
|
3
|
+
function i(r, s) {
|
|
4
|
+
if (!o(r, { strict: !1 }))
|
|
5
|
+
throw new e({ address: r });
|
|
6
|
+
if (!o(s, { strict: !1 }))
|
|
7
|
+
throw new e({ address: s });
|
|
8
|
+
return r.toLowerCase() === s.toLowerCase();
|
|
6
9
|
}
|
|
7
10
|
export {
|
|
8
|
-
|
|
11
|
+
i as isAddressEqual
|
|
9
12
|
};
|
package/dist/index138.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});class i extends Map{constructor(e){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=e}get(e){const t=super.get(e);return super.has(e)&&t!==void 0&&(this.delete(e),super.set(e,t)),t}set(e,t){if(super.set(e,t),this.maxSize&&this.size>this.maxSize){const s=this.keys().next().value;s&&this.delete(s)}return this}}exports.LruMap=i;
|
package/dist/index138.js
CHANGED
|
@@ -1,21 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
class r extends Map {
|
|
2
|
+
constructor(e) {
|
|
3
|
+
super(), Object.defineProperty(this, "maxSize", {
|
|
4
|
+
enumerable: !0,
|
|
5
|
+
configurable: !0,
|
|
6
|
+
writable: !0,
|
|
7
|
+
value: void 0
|
|
8
|
+
}), this.maxSize = e;
|
|
9
|
+
}
|
|
10
|
+
get(e) {
|
|
11
|
+
const t = super.get(e);
|
|
12
|
+
return super.has(e) && t !== void 0 && (this.delete(e), super.set(e, t)), t;
|
|
13
|
+
}
|
|
14
|
+
set(e, t) {
|
|
15
|
+
if (super.set(e, t), this.maxSize && this.size > this.maxSize) {
|
|
16
|
+
const s = this.keys().next().value;
|
|
17
|
+
s && this.delete(s);
|
|
18
|
+
}
|
|
19
|
+
return this;
|
|
20
|
+
}
|
|
16
21
|
}
|
|
17
22
|
export {
|
|
18
|
-
|
|
19
|
-
c as concatBytes,
|
|
20
|
-
f as concatHex
|
|
23
|
+
r as LruMap
|
|
21
24
|
};
|
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 i=require("./index115.cjs"),l=require("./index116.cjs");function c(o){const{kzg:s}=o,n=o.to??(typeof o.blobs[0]=="string"?"hex":"bytes"),e=typeof o.blobs[0]=="string"?o.blobs.map(t=>i.hexToBytes(t)):o.blobs,b=[];for(const t of e)b.push(Uint8Array.from(s.blobToKzgCommitment(t)));return n==="bytes"?b:b.map(t=>l.bytesToHex(t))}exports.blobsToCommitments=c;
|
package/dist/index139.js
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
const {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
timeout: i
|
|
9
|
-
});
|
|
1
|
+
import { hexToBytes as i } from "./index115.js";
|
|
2
|
+
import { bytesToHex as f } from "./index116.js";
|
|
3
|
+
function y(o) {
|
|
4
|
+
const { kzg: s } = o, n = o.to ?? (typeof o.blobs[0] == "string" ? "hex" : "bytes"), m = typeof o.blobs[0] == "string" ? o.blobs.map((t) => i(t)) : o.blobs, b = [];
|
|
5
|
+
for (const t of m)
|
|
6
|
+
b.push(Uint8Array.from(s.blobToKzgCommitment(t)));
|
|
7
|
+
return n === "bytes" ? b : b.map((t) => f(t));
|
|
10
8
|
}
|
|
11
9
|
export {
|
|
12
|
-
|
|
10
|
+
y as blobsToCommitments
|
|
13
11
|
};
|
package/dist/index140.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 b=require("./index115.cjs"),y=require("./index116.cjs");function f(t){const{kzg:c}=t,e=t.to??(typeof t.blobs[0]=="string"?"hex":"bytes"),n=typeof t.blobs[0]=="string"?t.blobs.map(o=>b.hexToBytes(o)):t.blobs,i=typeof t.commitments[0]=="string"?t.commitments.map(o=>b.hexToBytes(o)):t.commitments,s=[];for(let o=0;o<n.length;o++){const l=n[o],m=i[o];s.push(Uint8Array.from(c.computeBlobKzgProof(l,m)))}return e==="bytes"?s:s.map(o=>y.bytesToHex(o))}exports.blobsToProofs=f;
|
package/dist/index140.js
CHANGED
|
@@ -1,61 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import { stringify as I } from "./index110.js";
|
|
9
|
-
import { getCallsStatus as j } from "./index121.js";
|
|
10
|
-
async function z(e, o) {
|
|
11
|
-
const {
|
|
12
|
-
id: i,
|
|
13
|
-
pollingInterval: f = e.pollingInterval,
|
|
14
|
-
status: p = ({ statusCode: t }) => t === 200 || t >= 300,
|
|
15
|
-
retryCount: w = 4,
|
|
16
|
-
retryDelay: d = ({ count: t }) => ~~(1 << t) * 200,
|
|
17
|
-
// exponential backoff
|
|
18
|
-
timeout: l = 6e4,
|
|
19
|
-
throwOnFailure: y = !1
|
|
20
|
-
} = o, v = I(["waitForCallsStatus", e.uid, i]), { promise: g, resolve: h, reject: n } = E();
|
|
21
|
-
let s;
|
|
22
|
-
const u = T(v, { resolve: h, reject: n }, (t) => {
|
|
23
|
-
const m = b(async () => {
|
|
24
|
-
const c = (r) => {
|
|
25
|
-
clearTimeout(s), m(), r(), u();
|
|
26
|
-
};
|
|
27
|
-
try {
|
|
28
|
-
const r = await B(async () => {
|
|
29
|
-
const a = await S(e, j, "getCallsStatus")({ id: i });
|
|
30
|
-
if (y && a.status === "failure")
|
|
31
|
-
throw new F(a);
|
|
32
|
-
return a;
|
|
33
|
-
}, {
|
|
34
|
-
retryCount: w,
|
|
35
|
-
delay: d
|
|
36
|
-
});
|
|
37
|
-
if (!p(r))
|
|
38
|
-
return;
|
|
39
|
-
c(() => t.resolve(r));
|
|
40
|
-
} catch (r) {
|
|
41
|
-
c(() => t.reject(r));
|
|
42
|
-
}
|
|
43
|
-
}, {
|
|
44
|
-
interval: f,
|
|
45
|
-
emitOnBegin: !0
|
|
46
|
-
});
|
|
47
|
-
return m;
|
|
48
|
-
});
|
|
49
|
-
return s = l ? setTimeout(() => {
|
|
50
|
-
u(), clearTimeout(s), n(new x({ id: i }));
|
|
51
|
-
}, l) : void 0, await g;
|
|
52
|
-
}
|
|
53
|
-
class x extends C {
|
|
54
|
-
constructor({ id: o }) {
|
|
55
|
-
super(`Timed out while waiting for call bundle with id "${o}" to be confirmed.`, { name: "WaitForCallsStatusTimeoutError" });
|
|
1
|
+
import { hexToBytes as b } from "./index115.js";
|
|
2
|
+
import { bytesToHex as y } from "./index116.js";
|
|
3
|
+
function h(t) {
|
|
4
|
+
const { kzg: m } = t, c = t.to ?? (typeof t.blobs[0] == "string" ? "hex" : "bytes"), s = typeof t.blobs[0] == "string" ? t.blobs.map((o) => b(o)) : t.blobs, i = typeof t.commitments[0] == "string" ? t.commitments.map((o) => b(o)) : t.commitments, n = [];
|
|
5
|
+
for (let o = 0; o < s.length; o++) {
|
|
6
|
+
const f = s[o], l = i[o];
|
|
7
|
+
n.push(Uint8Array.from(m.computeBlobKzgProof(f, l)));
|
|
56
8
|
}
|
|
9
|
+
return c === "bytes" ? n : n.map((o) => y(o));
|
|
57
10
|
}
|
|
58
11
|
export {
|
|
59
|
-
|
|
60
|
-
z as waitForCallsStatus
|
|
12
|
+
h as blobsToProofs
|
|
61
13
|
};
|
package/dist/index141.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index142.cjs");function c(o){const{commitments:e,version:s}=o,n=o.to??(typeof e[0]=="string"?"hex":"bytes"),t=[];for(const m of e)t.push(i.commitmentToVersionedHash({commitment:m,to:n,version:s}));return t}exports.commitmentsToVersionedHashes=c;
|
package/dist/index141.js
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { commitmentToVersionedHash as i } from "./index142.js";
|
|
2
|
+
function r(o) {
|
|
3
|
+
const { commitments: t, version: n } = o, e = o.to ?? (typeof t[0] == "string" ? "hex" : "bytes"), s = [];
|
|
4
|
+
for (const m of t)
|
|
5
|
+
s.push(i({
|
|
6
|
+
commitment: m,
|
|
7
|
+
to: e,
|
|
8
|
+
version: n
|
|
9
|
+
}));
|
|
10
|
+
return s;
|
|
6
11
|
}
|
|
7
12
|
export {
|
|
8
|
-
|
|
13
|
+
r as commitmentsToVersionedHashes
|
|
9
14
|
};
|
package/dist/index142.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"),r=require("./index143.cjs");function c(t){const{commitment:o,version:s=1}=t,n=t.to??(typeof o=="string"?"hex":"bytes"),e=r.sha256(o);return e.set([s],0),n==="bytes"?e:i.bytesToHex(e)}exports.commitmentToVersionedHash=c;
|
package/dist/index142.js
CHANGED
|
@@ -1,16 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const s = await r.request({
|
|
7
|
-
method: "eth_sendRawTransactionSync",
|
|
8
|
-
params: o ? [e, p(o)] : [e]
|
|
9
|
-
}, { retryCount: 0 }), t = (((c = (n = (a = r.chain) == null ? void 0 : a.formatters) == null ? void 0 : n.transactionReceipt) == null ? void 0 : c.format) || f)(s);
|
|
10
|
-
if (t.status === "reverted" && m)
|
|
11
|
-
throw new i({ receipt: t });
|
|
12
|
-
return t;
|
|
1
|
+
import { bytesToHex as i } from "./index116.js";
|
|
2
|
+
import { sha256 as m } from "./index143.js";
|
|
3
|
+
function f(t) {
|
|
4
|
+
const { commitment: e, version: s = 1 } = t, n = t.to ?? (typeof e == "string" ? "hex" : "bytes"), o = m(e);
|
|
5
|
+
return o.set([s], 0), n === "bytes" ? o : i(o);
|
|
13
6
|
}
|
|
14
7
|
export {
|
|
15
|
-
|
|
8
|
+
f as commitmentToVersionedHash
|
|
16
9
|
};
|
package/dist/index143.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index164.cjs"),s=require("./index135.cjs"),r=require("./index115.cjs");function o(t,i){return e.sha256(s.isHex(t,{strict:!1})?r.toBytes(t):t)}exports.sha256=o;
|
package/dist/index143.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
throw new i({ chain: r, currentChainId: o });
|
|
1
|
+
import { sha256 as o } from "./index164.js";
|
|
2
|
+
import { isHex as s } from "./index135.js";
|
|
3
|
+
import { toBytes as r } from "./index115.js";
|
|
4
|
+
function p(t, i) {
|
|
5
|
+
return o(s(t, { strict: !1 }) ? r(t) : t);
|
|
7
6
|
}
|
|
8
7
|
export {
|
|
9
|
-
|
|
8
|
+
p as sha256
|
|
10
9
|
};
|
package/dist/index144.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("./index139.cjs"),m=require("./index140.cjs"),u=require("./index145.cjs");function f(t){const{data:i,kzg:n,to:b}=t,s=t.blobs??u.toBlobs({data:i,to:b}),e=t.commitments??r.blobsToCommitments({blobs:s,kzg:n,to:b}),l=t.proofs??m.blobsToProofs({blobs:s,commitments:e,kzg:n,to:b}),c=[];for(let o=0;o<s.length;o++)c.push({blob:s[o],commitment:e[o],proof:l[o]});return c}exports.toBlobSidecars=f;
|
package/dist/index144.js
CHANGED
|
@@ -1,141 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
import { LruMap as Y } from "./index134.js";
|
|
12
|
-
import { assertRequest as Z } from "./index68.js";
|
|
13
|
-
import { getChainId as $ } from "./index88.js";
|
|
14
|
-
import { waitForTransactionReceipt as tt } from "./index106.js";
|
|
15
|
-
import { prepareTransactionRequest as rt, defaultParameters as et } from "./index84.js";
|
|
16
|
-
import { sendRawTransactionSync as ot } from "./index142.js";
|
|
17
|
-
const w = new Y(128);
|
|
18
|
-
async function gt(r, e) {
|
|
19
|
-
var S, v, z, A;
|
|
20
|
-
const { account: m = r.account, assertChainId: G = !0, chain: o = r.chain, accessList: l, authorizationList: s, blobs: y, data: R, gas: T, gasPrice: g, maxFeePerBlobGas: E, maxFeePerGas: q, maxPriorityFeePerGas: C, nonce: P, pollingInterval: O, throwOnReceiptRevert: F, type: I, value: M, ...N } = e, k = e.timeout ?? Math.max(((o == null ? void 0 : o.blockTime) ?? 0) * 3, 5e3);
|
|
21
|
-
if (typeof m > "u")
|
|
22
|
-
throw new j({
|
|
23
|
-
docsPath: "/docs/actions/wallet/sendTransactionSync"
|
|
1
|
+
import { blobsToCommitments as f } from "./index139.js";
|
|
2
|
+
import { blobsToProofs as l } from "./index140.js";
|
|
3
|
+
import { toBlobs as p } from "./index145.js";
|
|
4
|
+
function k(t) {
|
|
5
|
+
const { data: i, kzg: n, to: m } = t, s = t.blobs ?? p({ data: i, to: m }), b = t.commitments ?? f({ blobs: s, kzg: n, to: m }), r = t.proofs ?? l({ blobs: s, commitments: b, kzg: n, to: m }), c = [];
|
|
6
|
+
for (let o = 0; o < s.length; o++)
|
|
7
|
+
c.push({
|
|
8
|
+
blob: s[o],
|
|
9
|
+
commitment: b[o],
|
|
10
|
+
proof: r[o]
|
|
24
11
|
});
|
|
25
|
-
|
|
26
|
-
try {
|
|
27
|
-
Z(e);
|
|
28
|
-
const a = await (async () => {
|
|
29
|
-
if (e.to)
|
|
30
|
-
return e.to;
|
|
31
|
-
if (e.to !== null && s && s.length > 0)
|
|
32
|
-
return await J({
|
|
33
|
-
authorization: s[0]
|
|
34
|
-
}).catch(() => {
|
|
35
|
-
throw new D("`to` is required. Could not infer from `authorizationList`.");
|
|
36
|
-
});
|
|
37
|
-
})();
|
|
38
|
-
if ((t == null ? void 0 : t.type) === "json-rpc" || t === null) {
|
|
39
|
-
let i;
|
|
40
|
-
o !== null && (i = await d(r, $, "getChainId")({}), G && K({
|
|
41
|
-
currentChainId: i,
|
|
42
|
-
chain: o
|
|
43
|
-
}));
|
|
44
|
-
const c = (z = (v = (S = r.chain) == null ? void 0 : S.formatters) == null ? void 0 : v.transactionRequest) == null ? void 0 : z.format, b = (c || X)({
|
|
45
|
-
// Pick out extra data that might exist on the chain's transaction request type.
|
|
46
|
-
...V(N, { 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: C,
|
|
58
|
-
nonce: P,
|
|
59
|
-
to: a,
|
|
60
|
-
type: I,
|
|
61
|
-
value: M
|
|
62
|
-
}, "sendTransaction"), _ = w.get(r.uid), B = _ ? "wallet_sendTransaction" : "eth_sendTransaction", U = await (async () => {
|
|
63
|
-
try {
|
|
64
|
-
return await r.request({
|
|
65
|
-
method: B,
|
|
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((p) => (w.set(r.uid, !0), p)).catch((p) => {
|
|
77
|
-
const f = p;
|
|
78
|
-
throw f.name === "MethodNotFoundRpcError" || f.name === "MethodNotSupportedRpcError" ? (w.set(r.uid, !1), n) : f;
|
|
79
|
-
});
|
|
80
|
-
throw n;
|
|
81
|
-
}
|
|
82
|
-
})(), u = await d(r, tt, "waitForTransactionReceipt")({
|
|
83
|
-
checkReplacement: !1,
|
|
84
|
-
hash: U,
|
|
85
|
-
pollingInterval: O,
|
|
86
|
-
timeout: k
|
|
87
|
-
});
|
|
88
|
-
if (F && u.status === "reverted")
|
|
89
|
-
throw new H({ receipt: u });
|
|
90
|
-
return u;
|
|
91
|
-
}
|
|
92
|
-
if ((t == null ? void 0 : t.type) === "local") {
|
|
93
|
-
const i = await d(r, rt, "prepareTransactionRequest")({
|
|
94
|
-
account: t,
|
|
95
|
-
accessList: l,
|
|
96
|
-
authorizationList: s,
|
|
97
|
-
blobs: y,
|
|
98
|
-
chain: o,
|
|
99
|
-
data: R,
|
|
100
|
-
gas: T,
|
|
101
|
-
gasPrice: g,
|
|
102
|
-
maxFeePerBlobGas: E,
|
|
103
|
-
maxFeePerGas: q,
|
|
104
|
-
maxPriorityFeePerGas: C,
|
|
105
|
-
nonce: P,
|
|
106
|
-
nonceManager: t.nonceManager,
|
|
107
|
-
parameters: [...et, "sidecars"],
|
|
108
|
-
type: I,
|
|
109
|
-
value: M,
|
|
110
|
-
...N,
|
|
111
|
-
to: a
|
|
112
|
-
}), c = (A = o == null ? void 0 : o.serializers) == null ? void 0 : A.transaction, x = await t.signTransaction(i, {
|
|
113
|
-
serializer: c
|
|
114
|
-
});
|
|
115
|
-
return await d(r, ot, "sendRawTransactionSync")({
|
|
116
|
-
serializedTransaction: x,
|
|
117
|
-
throwOnReceiptRevert: F,
|
|
118
|
-
timeout: e.timeout
|
|
119
|
-
});
|
|
120
|
-
}
|
|
121
|
-
throw (t == null ? void 0 : t.type) === "smart" ? new h({
|
|
122
|
-
metaMessages: [
|
|
123
|
-
"Consider using the `sendUserOperation` Action instead."
|
|
124
|
-
],
|
|
125
|
-
docsPath: "/docs/actions/bundler/sendUserOperation",
|
|
126
|
-
type: "smart"
|
|
127
|
-
}) : new h({
|
|
128
|
-
docsPath: "/docs/actions/wallet/sendTransactionSync",
|
|
129
|
-
type: t == null ? void 0 : t.type
|
|
130
|
-
});
|
|
131
|
-
} catch (a) {
|
|
132
|
-
throw a instanceof h ? a : Q(a, {
|
|
133
|
-
...e,
|
|
134
|
-
account: t,
|
|
135
|
-
chain: e.chain || void 0
|
|
136
|
-
});
|
|
137
|
-
}
|
|
12
|
+
return c;
|
|
138
13
|
}
|
|
139
14
|
export {
|
|
140
|
-
|
|
15
|
+
k as toBlobSidecars
|
|
141
16
|
};
|
package/dist/index145.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index146.cjs"),y=require("./index147.cjs"),u=require("./index111.cjs"),B=require("./index86.cjs"),h=require("./index115.cjs"),d=require("./index116.cjs");function f(t){const a=t.to??(typeof t.data=="string"?"hex":"bytes"),n=typeof t.data=="string"?h.hexToBytes(t.data):t.data,s=B.size(n);if(!s)throw new y.EmptyBlobError;if(s>o.maxBytesPerTransaction)throw new y.BlobSizeTooLargeError({maxSize:o.maxBytesPerTransaction,size:s});const r=[];let b=!0,i=0;for(;b;){const e=u.createCursor(new Uint8Array(o.bytesPerBlob));let l=0;for(;l<o.fieldElementsPerBlob;){const c=n.slice(i,i+(o.bytesPerFieldElement-1));if(e.pushByte(0),e.pushBytes(c),c.length<31){e.pushByte(128),b=!1;break}l++,i+=31}r.push(e)}return a==="bytes"?r.map(e=>e.bytes):r.map(e=>d.bytesToHex(e.bytes))}exports.toBlobs=f;
|
package/dist/index145.js
CHANGED
|
@@ -1,10 +1,35 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { maxBytesPerTransaction as y, fieldElementsPerBlob as a, bytesPerFieldElement as f, bytesPerBlob as p } from "./index146.js";
|
|
2
|
+
import { EmptyBlobError as c, BlobSizeTooLargeError as h } from "./index147.js";
|
|
3
|
+
import { createCursor as B } from "./index111.js";
|
|
4
|
+
import { size as u } from "./index86.js";
|
|
5
|
+
import { hexToBytes as x } from "./index115.js";
|
|
6
|
+
import { bytesToHex as d } from "./index116.js";
|
|
7
|
+
function S(e) {
|
|
8
|
+
const m = e.to ?? (typeof e.data == "string" ? "hex" : "bytes"), i = typeof e.data == "string" ? x(e.data) : e.data, o = u(i);
|
|
9
|
+
if (!o)
|
|
10
|
+
throw new c();
|
|
11
|
+
if (o > y)
|
|
12
|
+
throw new h({
|
|
13
|
+
maxSize: y,
|
|
14
|
+
size: o
|
|
15
|
+
});
|
|
16
|
+
const s = [];
|
|
17
|
+
let n = !0, r = 0;
|
|
18
|
+
for (; n; ) {
|
|
19
|
+
const t = B(new Uint8Array(p));
|
|
20
|
+
let l = 0;
|
|
21
|
+
for (; l < a; ) {
|
|
22
|
+
const b = i.slice(r, r + (f - 1));
|
|
23
|
+
if (t.pushByte(0), t.pushBytes(b), b.length < 31) {
|
|
24
|
+
t.pushByte(128), n = !1;
|
|
25
|
+
break;
|
|
26
|
+
}
|
|
27
|
+
l++, r += 31;
|
|
28
|
+
}
|
|
29
|
+
s.push(t);
|
|
30
|
+
}
|
|
31
|
+
return m === "bytes" ? s.map((t) => t.bytes) : s.map((t) => d(t.bytes));
|
|
7
32
|
}
|
|
8
33
|
export {
|
|
9
|
-
|
|
34
|
+
S as toBlobs
|
|
10
35
|
};
|
package/dist/index146.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 t=6,s=32,e=4096,n=s*e,o=n*t-1-1*e*t;exports.bytesPerBlob=n;exports.bytesPerFieldElement=s;exports.fieldElementsPerBlob=e;exports.maxBytesPerTransaction=o;
|