@gardenfi/utils 3.0.0-beta.1 → 3.0.0-beta.3
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 +125 -3
- package/dist/index101.cjs +1 -1
- package/dist/index101.js +5 -26
- package/dist/index102.cjs +1 -2
- package/dist/index102.js +20 -23
- package/dist/index103.cjs +1 -1
- package/dist/index103.js +45 -9
- package/dist/index104.cjs +1 -1
- package/dist/index104.js +38 -8
- package/dist/index105.cjs +1 -1
- package/dist/index105.js +6 -10
- package/dist/index106.cjs +1 -1
- package/dist/index106.js +90 -11
- package/dist/index107.cjs +1 -1
- package/dist/index107.js +14 -13
- package/dist/index108.cjs +1 -1
- package/dist/index108.js +3 -14
- package/dist/index109.cjs +1 -1
- package/dist/index109.js +26 -4
- package/dist/index110.cjs +2 -1
- package/dist/index110.js +24 -6
- package/dist/index111.cjs +1 -1
- package/dist/index111.js +9 -18
- package/dist/index112.cjs +1 -1
- package/dist/index112.js +8 -13
- package/dist/index113.cjs +1 -1
- package/dist/index113.js +10 -6
- package/dist/index114.cjs +1 -1
- package/dist/index114.js +11 -7
- package/dist/index115.cjs +1 -1
- package/dist/index115.js +13 -21
- package/dist/index116.cjs +1 -1
- package/dist/index116.js +21 -7
- package/dist/index117.cjs +1 -1
- package/dist/index117.js +14 -21
- package/dist/index118.cjs +1 -1
- package/dist/index118.js +4 -17
- package/dist/index119.cjs +1 -1
- package/dist/index119.js +5 -39
- package/dist/index120.cjs +1 -1
- package/dist/index120.js +18 -21
- package/dist/index121.cjs +1 -1
- package/dist/index121.js +10 -80
- package/dist/index122.cjs +1 -1
- package/dist/index122.js +57 -10
- package/dist/index123.cjs +1 -1
- package/dist/index123.js +6 -58
- package/dist/index124.cjs +1 -1
- package/dist/index124.js +13 -13
- package/dist/index125.cjs +1 -1
- package/dist/index125.js +7 -8
- package/dist/index126.cjs +1 -1
- package/dist/index126.js +137 -20
- package/dist/index127.cjs +1 -1
- package/dist/index127.js +7 -6
- package/dist/index128.cjs +1 -1
- package/dist/index128.js +19 -33
- package/dist/index129.cjs +1 -1
- package/dist/index129.js +17 -32
- package/dist/index130.cjs +1 -1
- package/dist/index130.js +43 -9
- package/dist/index131.cjs +1 -1
- package/dist/index131.js +20 -49
- package/dist/index132.cjs +1 -1
- package/dist/index132.js +79 -18
- package/dist/index133.cjs +1 -1
- package/dist/index133.js +10 -105
- package/dist/index134.cjs +1 -1
- package/dist/index134.js +8 -63
- package/dist/index135.cjs +1 -1
- package/dist/index135.js +6 -9
- package/dist/index136.cjs +1 -1
- package/dist/index136.js +41 -71
- package/dist/index137.cjs +1 -2
- package/dist/index137.js +6 -3
- package/dist/index138.cjs +1 -1
- package/dist/index138.js +34 -9
- package/dist/index139.cjs +1 -1
- package/dist/index139.js +9 -13
- package/dist/index140.cjs +1 -1
- package/dist/index140.js +60 -4
- package/dist/index141.cjs +1 -1
- package/dist/index141.js +19 -12
- package/dist/index142.cjs +1 -1
- package/dist/index142.js +107 -2
- package/dist/index143.cjs +1 -1
- package/dist/index143.js +79 -32
- package/dist/index144.cjs +1 -1
- package/dist/index144.js +8 -20
- package/dist/index145.cjs +1 -1
- package/dist/index145.js +71 -5
- package/dist/index146.cjs +2 -1
- package/dist/index146.js +3 -6
- package/dist/index147.cjs +1 -1
- package/dist/index147.js +9 -6
- package/dist/index148.cjs +1 -9
- package/dist/index148.js +11 -33
- package/dist/index149.cjs +1 -1
- package/dist/index149.js +5 -3
- package/dist/index150.cjs +1 -1
- package/dist/index150.js +11 -17
- package/dist/index151.cjs +1 -1
- package/dist/index151.js +2 -21
- package/dist/index152.cjs +1 -1
- package/dist/index152.js +32 -36
- package/dist/index153.cjs +1 -1
- package/dist/index153.js +20 -7
- package/dist/index154.cjs +1 -4
- package/dist/index154.js +5 -194
- package/dist/index155.cjs +1 -1
- package/dist/index155.js +5 -27
- package/dist/index156.cjs +1 -1
- package/dist/index156.js +5 -161
- package/dist/index157.cjs +9 -1
- package/dist/index157.js +34 -126
- package/dist/index158.cjs +1 -1
- package/dist/index158.js +3 -28
- package/dist/index159.cjs +1 -1
- package/dist/index159.js +15 -52
- package/dist/index160.cjs +1 -1
- package/dist/index160.js +14 -185
- package/dist/index161.cjs +1 -1
- package/dist/index161.js +36 -4
- package/dist/index162.cjs +1 -1
- package/dist/index162.js +6 -18
- package/dist/index163.cjs +4 -1
- package/dist/index163.js +195 -3
- package/dist/index164.cjs +1 -1
- package/dist/index164.js +26 -15
- package/dist/index165.cjs +1 -1
- package/dist/index165.js +161 -11
- package/dist/index166.cjs +1 -1
- package/dist/index166.js +126 -33
- package/dist/index167.cjs +1 -1
- package/dist/index167.js +28 -3
- package/dist/index168.cjs +1 -1
- package/dist/index168.js +54 -26
- package/dist/index169.cjs +1 -1
- package/dist/index169.js +191 -8
- package/dist/index17.cjs +1 -1
- package/dist/index17.js +2 -2
- package/dist/index170.cjs +1 -1
- package/dist/index170.js +4 -26
- package/dist/index171.cjs +1 -1
- package/dist/index171.js +19 -27
- package/dist/index172.cjs +1 -1
- package/dist/index172.js +3 -4
- package/dist/index173.cjs +1 -1
- package/dist/index173.js +16 -6
- package/dist/index174.cjs +1 -1
- package/dist/index174.js +11 -6
- package/dist/index175.cjs +1 -1
- package/dist/index175.js +32 -30
- package/dist/index176.cjs +1 -1
- package/dist/index176.js +3 -5
- package/dist/index177.cjs +1 -1
- package/dist/index177.js +25 -35
- package/dist/index178.cjs +1 -1
- package/dist/index178.js +8 -49
- package/dist/index179.cjs +1 -1
- package/dist/index179.js +25 -32
- package/dist/index18.cjs +1 -1
- package/dist/index18.js +5 -5
- package/dist/index180.cjs +1 -1
- package/dist/index180.js +28 -8
- package/dist/index181.cjs +1 -1
- package/dist/index181.js +3 -42
- package/dist/index182.cjs +1 -1
- package/dist/index182.js +6 -51
- package/dist/index183.cjs +1 -1
- package/dist/index183.js +6 -104
- package/dist/index184.cjs +1 -1
- package/dist/index184.js +33 -3
- package/dist/index185.cjs +1 -1
- package/dist/index185.js +5 -6
- package/dist/index186.cjs +1 -1
- package/dist/index186.js +37 -3
- package/dist/index187.cjs +1 -1
- package/dist/index187.js +49 -17
- package/dist/index188.cjs +1 -1
- package/dist/index188.js +32 -5
- package/dist/index189.cjs +1 -1
- package/dist/index189.js +17 -8
- package/dist/index190.cjs +1 -1
- package/dist/index190.js +39 -100
- package/dist/index191.cjs +1 -1
- package/dist/index191.js +104 -5
- package/dist/index192.cjs +1 -1
- package/dist/index192.js +3 -7
- package/dist/index193.cjs +1 -1
- package/dist/index193.js +5 -27
- package/dist/index194.cjs +1 -1
- package/dist/index194.js +3 -34
- package/dist/index195.cjs +1 -1
- package/dist/index195.js +17 -13
- package/dist/index196.cjs +1 -1
- package/dist/index196.js +5 -78
- package/dist/index197.cjs +1 -1
- package/dist/index197.js +9 -2
- package/dist/index198.cjs +1 -1
- package/dist/index198.js +102 -17
- package/dist/index199.cjs +1 -1
- package/dist/index199.js +5 -171
- package/dist/index20.cjs +1 -1
- package/dist/index20.js +8 -8
- package/dist/index200.cjs +1 -1
- package/dist/index200.js +6 -17
- package/dist/index201.cjs +1 -1
- package/dist/index201.js +27 -10
- package/dist/index202.cjs +1 -1
- package/dist/index202.js +34 -25
- package/dist/index203.cjs +1 -1
- package/dist/index203.js +13 -18
- package/dist/index204.cjs +1 -1
- package/dist/index204.js +78 -15
- package/dist/index205.cjs +1 -1
- package/dist/index205.js +2 -6
- package/dist/index206.cjs +1 -1
- package/dist/index206.js +18 -13
- package/dist/index207.cjs +1 -1
- package/dist/index207.js +171 -10
- package/dist/index208.cjs +1 -1
- package/dist/index208.js +17 -16
- package/dist/index209.cjs +1 -1
- package/dist/index209.js +10 -24
- package/dist/index210.cjs +1 -1
- package/dist/index210.js +24 -45
- package/dist/index211.cjs +1 -1
- package/dist/index211.js +17 -8
- package/dist/index212.cjs +1 -2
- package/dist/index212.js +15 -41
- package/dist/index213.cjs +1 -1
- package/dist/index213.js +6 -2
- package/dist/index214.cjs +1 -1
- package/dist/index214.js +13 -5
- package/dist/index215.cjs +1 -1
- package/dist/index215.js +10 -10
- package/dist/index216.cjs +1 -1
- package/dist/index216.js +16 -19
- package/dist/index217.cjs +1 -1
- package/dist/index217.js +24 -8
- package/dist/index218.cjs +1 -1
- package/dist/index218.js +46 -66
- package/dist/index219.cjs +1 -1
- package/dist/index219.js +9 -65
- package/dist/index22.cjs +1 -1
- package/dist/index22.js +8 -8
- package/dist/index220.cjs +2 -1
- package/dist/index220.js +40 -187
- package/dist/index221.cjs +1 -1
- package/dist/index221.js +2 -29
- package/dist/index222.cjs +1 -1
- package/dist/index222.js +5 -76
- package/dist/index223.cjs +1 -1
- package/dist/index223.js +9 -39
- package/dist/index224.cjs +1 -1
- package/dist/index224.js +17 -14
- package/dist/index225.cjs +1 -1
- package/dist/index225.js +8 -13
- package/dist/index226.cjs +1 -1
- package/dist/index226.js +66 -11
- package/dist/index227.cjs +1 -1
- package/dist/index227.js +64 -11
- package/dist/index228.cjs +1 -1
- package/dist/index228.js +187 -18
- package/dist/index229.cjs +1 -1
- package/dist/index229.js +26 -106
- package/dist/index23.cjs +1 -1
- package/dist/index23.js +26 -12
- package/dist/index230.cjs +1 -1
- package/dist/index230.js +76 -6
- package/dist/index231.cjs +1 -1
- package/dist/index231.js +41 -7
- package/dist/index232.cjs +1 -1
- package/dist/index232.js +15 -102
- package/dist/index233.cjs +1 -1
- package/dist/index233.js +12 -25
- package/dist/index234.cjs +1 -1
- package/dist/index234.js +11 -16
- package/dist/index235.cjs +1 -1
- package/dist/index235.js +10 -212
- package/dist/index236.cjs +1 -1
- package/dist/index236.js +18 -41
- package/dist/index237.cjs +1 -1
- package/dist/index237.js +106 -76
- package/dist/index238.cjs +1 -1
- package/dist/index238.js +104 -2
- package/dist/index239.cjs +1 -1
- package/dist/index239.js +6 -11
- package/dist/index24.cjs +1 -1
- package/dist/index24.js +8 -59
- package/dist/index240.cjs +1 -1
- package/dist/index240.js +7 -20
- package/dist/index241.cjs +1 -2
- package/dist/index241.js +24 -64
- package/dist/index242.cjs +1 -1
- package/dist/index242.js +16 -14
- package/dist/index243.cjs +1 -1
- package/dist/index243.js +214 -68
- package/dist/index244.cjs +1 -1
- package/dist/index244.js +196 -647
- package/dist/index245.cjs +1 -1
- package/dist/index245.js +39 -203
- package/dist/index246.cjs +1 -1
- package/dist/index246.js +72 -171
- package/dist/index247.cjs +1 -1
- package/dist/index247.js +2 -5
- package/dist/index248.cjs +1 -1
- package/dist/index248.js +12 -2
- package/dist/index249.cjs +1 -0
- package/dist/index249.js +22 -0
- package/dist/index25.cjs +1 -16
- package/dist/index25.js +12 -113
- package/dist/index250.cjs +2 -0
- package/dist/index250.js +94 -0
- package/dist/index251.cjs +1 -0
- package/dist/index251.js +17 -0
- package/dist/index252.cjs +1 -0
- package/dist/index252.js +71 -0
- package/dist/index253.cjs +1 -0
- package/dist/index253.js +660 -0
- package/dist/index254.cjs +1 -0
- package/dist/index254.js +180 -0
- package/dist/index255.cjs +1 -0
- package/dist/index255.js +7 -0
- package/dist/index256.cjs +1 -0
- package/dist/index256.js +4 -0
- package/dist/index26.cjs +1 -1
- package/dist/index26.js +59 -30
- package/dist/index27.cjs +16 -1
- package/dist/index27.js +111 -24
- package/dist/index28.cjs +1 -1
- package/dist/index28.js +29 -7
- package/dist/index29.cjs +1 -1
- package/dist/index29.js +35 -35
- package/dist/index30.cjs +1 -1
- package/dist/index30.js +9 -9
- package/dist/index31.cjs +1 -1
- package/dist/index31.js +2 -2
- package/dist/index35.cjs +1 -1
- package/dist/index35.js +1 -1
- package/dist/index37.cjs +1 -1
- package/dist/index37.js +11 -11
- package/dist/index38.cjs +1 -1
- package/dist/index38.js +3 -3
- package/dist/index39.cjs +1 -1
- package/dist/index39.js +3 -3
- package/dist/index40.cjs +1 -1
- package/dist/index40.js +3 -3
- package/dist/index42.cjs +1 -1
- package/dist/index42.js +2 -2
- package/dist/index43.cjs +1 -1
- package/dist/index43.js +2 -2
- package/dist/index45.cjs +1 -1
- package/dist/index45.js +15 -15
- package/dist/index46.cjs +1 -1
- package/dist/index46.js +1 -1
- package/dist/index47.cjs +1 -1
- package/dist/index47.js +4 -4
- package/dist/index48.cjs +1 -1
- package/dist/index48.js +14 -17
- package/dist/index49.cjs +1 -1
- package/dist/index49.js +3 -3
- package/dist/index51.cjs +1 -1
- package/dist/index51.js +8 -8
- package/dist/index54.cjs +1 -1
- package/dist/index54.js +14 -14
- package/dist/index56.cjs +1 -1
- package/dist/index56.js +60 -56
- package/dist/index58.cjs +1 -1
- package/dist/index58.js +1 -1
- package/dist/index60.cjs +1 -1
- package/dist/index60.js +8 -8
- package/dist/index62.cjs +1 -1
- package/dist/index62.js +2 -2
- package/dist/index63.cjs +1 -1
- package/dist/index63.js +3 -3
- package/dist/index64.cjs +1 -1
- package/dist/index64.js +131 -76
- package/dist/index65.cjs +1 -1
- package/dist/index65.js +2 -2
- package/dist/index66.cjs +1 -1
- package/dist/index66.js +76 -6
- package/dist/index67.cjs +1 -1
- package/dist/index67.js +13 -21
- package/dist/index68.cjs +1 -1
- package/dist/index68.js +51 -8
- package/dist/index69.cjs +1 -1
- package/dist/index69.js +7 -31
- package/dist/index70.cjs +1 -1
- package/dist/index70.js +7 -7
- package/dist/index71.cjs +1 -1
- package/dist/index71.js +21 -16
- package/dist/index72.cjs +1 -1
- package/dist/index72.js +8 -73
- package/dist/index73.cjs +1 -1
- package/dist/index73.js +31 -35
- package/dist/index74.cjs +1 -1
- package/dist/index74.js +15 -15
- package/dist/index75.cjs +1 -1
- package/dist/index75.js +69 -61
- package/dist/index76.cjs +1 -1
- package/dist/index76.js +35 -11
- package/dist/index77.cjs +1 -1
- package/dist/index77.js +15 -13
- package/dist/index78.cjs +1 -3
- package/dist/index78.js +72 -92
- package/dist/index79.cjs +1 -1
- package/dist/index79.js +11 -23
- package/dist/index80.cjs +1 -1
- package/dist/index80.js +28 -32
- package/dist/index81.cjs +2 -1
- package/dist/index81.js +118 -42
- package/dist/index82.cjs +1 -1
- package/dist/index82.js +13 -5
- package/dist/index83.cjs +1 -1
- package/dist/index83.js +24 -151
- package/dist/index84.cjs +1 -20
- package/dist/index84.js +31 -324
- package/dist/index85.cjs +1 -3
- package/dist/index85.js +42 -449
- package/dist/index86.cjs +1 -1
- package/dist/index86.js +6 -64
- package/dist/index87.cjs +1 -1
- package/dist/index87.js +101 -35
- package/dist/index88.cjs +1 -1
- package/dist/index88.js +36 -14
- package/dist/index89.cjs +1 -1
- package/dist/index89.js +9 -2
- package/dist/index90.cjs +1 -1
- package/dist/index90.js +19 -15
- package/dist/index91.cjs +1 -1
- package/dist/index91.js +2 -11
- package/dist/index92.cjs +1 -1
- package/dist/index92.js +72 -122
- package/dist/index93.cjs +1 -1
- package/dist/index93.js +15 -5
- package/dist/index94.cjs +1 -1
- package/dist/index94.js +151 -21
- package/dist/index95.cjs +20 -1
- package/dist/index95.js +326 -45
- package/dist/index96.cjs +3 -1
- package/dist/index96.js +451 -38
- package/dist/index97.cjs +1 -1
- package/dist/index97.js +64 -6
- package/dist/index98.cjs +1 -1
- package/dist/index98.js +15 -87
- package/dist/index99.cjs +1 -1
- package/dist/index99.js +10 -14
- package/package.json +3 -3
package/dist/index179.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("./index95.cjs"),u=require("./index170.cjs"),b=require("./index148.cjs"),m=require("./index75.cjs"),r="/docs/contract/encodeFunctionData";function s(c){const{abi:n,args:a,functionName:e}=c;let t=n[0];if(e){const o=m.getAbiItem({abi:n,args:a,name:e});if(!o)throw new i.AbiFunctionNotFoundError(e,{docsPath:r});t=o}if(t.type!=="function")throw new i.AbiFunctionNotFoundError(void 0,{docsPath:r});return{abi:[t],functionName:u.toFunctionSelector(b.formatAbiItem(t))}}exports.prepareEncodeFunctionData=s;
|
package/dist/index179.js
CHANGED
|
@@ -1,35 +1,28 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
args: [t.status, t.shortMessage]
|
|
26
|
-
}) : n({
|
|
27
|
-
abi: [l],
|
|
28
|
-
errorName: "Error",
|
|
29
|
-
args: ["shortMessage" in t ? t.shortMessage : t.message]
|
|
30
|
-
});
|
|
1
|
+
import { AbiFunctionNotFoundError as i } from "./index95.js";
|
|
2
|
+
import { toFunctionSelector as a } from "./index170.js";
|
|
3
|
+
import { formatAbiItem as f } from "./index148.js";
|
|
4
|
+
import { getAbiItem as u } from "./index75.js";
|
|
5
|
+
const r = "/docs/contract/encodeFunctionData";
|
|
6
|
+
function F(c) {
|
|
7
|
+
const { abi: n, args: m, functionName: o } = c;
|
|
8
|
+
let t = n[0];
|
|
9
|
+
if (o) {
|
|
10
|
+
const e = u({
|
|
11
|
+
abi: n,
|
|
12
|
+
args: m,
|
|
13
|
+
name: o
|
|
14
|
+
});
|
|
15
|
+
if (!e)
|
|
16
|
+
throw new i(o, { docsPath: r });
|
|
17
|
+
t = e;
|
|
18
|
+
}
|
|
19
|
+
if (t.type !== "function")
|
|
20
|
+
throw new i(void 0, { docsPath: r });
|
|
21
|
+
return {
|
|
22
|
+
abi: [t],
|
|
23
|
+
functionName: a(f(t))
|
|
24
|
+
};
|
|
31
25
|
}
|
|
32
26
|
export {
|
|
33
|
-
|
|
34
|
-
d as localBatchGatewayUrl
|
|
27
|
+
F as prepareEncodeFunctionData
|
|
35
28
|
};
|
package/dist/index18.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("./index55.cjs"),P=require("./index50.cjs"),v=require("./index53.cjs"),q=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("./index55.cjs"),P=require("./index50.cjs"),v=require("./index53.cjs"),q=require("./index74.cjs"),F=require("./index84.cjs"),_=require("./index85.cjs"),x=require("./index94.cjs"),b=require("./index136.cjs");function G({abi:t,address:o,client:l}){const n=l,[s,f]=n?"public"in n&&"wallet"in n?[n.public,n.wallet]:"public"in n?[n.public,void 0]:"wallet"in n?[void 0,n.wallet]:[n,n]:[void 0,void 0],h=s!=null,A=f!=null,u={};let m=!1,w=!1,d=!1;for(const a of t)if(a.type==="function"?a.stateMutability==="view"||a.stateMutability==="pure"?m=!0:w=!0:a.type==="event"&&(d=!0),m&&w&&d)break;return h&&(m&&(u.read=new Proxy({},{get(a,e){return(...i)=>{const{args:c,options:r}=y(i);return p.getAction(s,F.readContract,"readContract")({abi:t,address:o,functionName:e,args:c,...r})}}})),w&&(u.simulate=new Proxy({},{get(a,e){return(...i)=>{const{args:c,options:r}=y(i);return p.getAction(s,_.simulateContract,"simulateContract")({abi:t,address:o,functionName:e,args:c,...r})}}})),d&&(u.createEventFilter=new Proxy({},{get(a,e){return(...i)=>{const c=t.find(g=>g.type==="event"&&g.name===e),{args:r,options:C}=E(i,c);return p.getAction(s,P.createContractEventFilter,"createContractEventFilter")({abi:t,address:o,eventName:e,args:r,...C})}}}),u.getEvents=new Proxy({},{get(a,e){return(...i)=>{const c=t.find(g=>g.type==="event"&&g.name===e),{args:r,options:C}=E(i,c);return p.getAction(s,q.getContractEvents,"getContractEvents")({abi:t,address:o,eventName:e,args:r,...C})}}}),u.watchEvent=new Proxy({},{get(a,e){return(...i)=>{const c=t.find(g=>g.type==="event"&&g.name===e),{args:r,options:C}=E(i,c);return p.getAction(s,x.watchContractEvent,"watchContractEvent")({abi:t,address:o,eventName:e,args:r,...C})}}}))),A&&w&&(u.write=new Proxy({},{get(a,e){return(...i)=>{const{args:c,options:r}=y(i);return p.getAction(f,b.writeContract,"writeContract")({abi:t,address:o,functionName:e,args:c,...r})}}})),(h||A)&&w&&(u.estimateGas=new Proxy({},{get(a,e){return(...i)=>{const{args:c,options:r}=y(i),C=s??f;return p.getAction(C,v.estimateContractGas,"estimateContractGas")({abi:t,address:o,functionName:e,args:c,...r,account:r.account??f.account})}}})),u.address=o,u.abi=t,u}function y(t){const o=t.length&&Array.isArray(t[0]),l=o?t[0]:[],n=(o?t[1]:t[0])??{};return{args:l,options:n}}function E(t,o){let l=!1;Array.isArray(t[0])?l=!0:t.length===1?l=o.inputs.some(f=>f.indexed):t.length===2&&(l=!0);const n=l?t[0]:void 0,s=(l?t[1]:t[0])??{};return{args:n,options:s}}exports.getContract=G;exports.getEventParameters=E;exports.getFunctionParameters=y;
|
package/dist/index18.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { getAction as g } from "./index55.js";
|
|
2
2
|
import { createContractEventFilter as v } from "./index50.js";
|
|
3
3
|
import { estimateContractGas as A } from "./index53.js";
|
|
4
|
-
import { getContractEvents as _ } from "./
|
|
5
|
-
import { readContract as x } from "./
|
|
6
|
-
import { simulateContract as F } from "./
|
|
7
|
-
import { watchContractEvent as G } from "./
|
|
8
|
-
import { writeContract as b } from "./
|
|
4
|
+
import { getContractEvents as _ } from "./index74.js";
|
|
5
|
+
import { readContract as x } from "./index84.js";
|
|
6
|
+
import { simulateContract as F } from "./index85.js";
|
|
7
|
+
import { watchContractEvent as G } from "./index94.js";
|
|
8
|
+
import { writeContract as b } from "./index136.js";
|
|
9
9
|
function D({ abi: t, address: o, client: f }) {
|
|
10
10
|
const e = f, [a, p] = e ? "public" in e && "wallet" in e ? [e.public, e.wallet] : "public" in e ? [e.public, void 0] : "wallet" in e ? [void 0, e.wallet] : [e, e] : [void 0, void 0], d = a != null, P = p != null, u = {};
|
|
11
11
|
let y = !1, w = !1, E = !1;
|
package/dist/index180.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 n=require("./index95.cjs"),a=require("./index169.cjs"),d=require("./index75.cjs"),r="/docs/contract/encodeFunctionResult";function b(c){const{abi:i,functionName:o,result:e}=c;let t=i[0];if(o){const u=d.getAbiItem({abi:i,name:o});if(!u)throw new n.AbiFunctionNotFoundError(o,{docsPath:r});t=u}if(t.type!=="function")throw new n.AbiFunctionNotFoundError(void 0,{docsPath:r});if(!t.outputs)throw new n.AbiFunctionOutputsNotFoundError(t.name,{docsPath:r});const s=(()=>{if(t.outputs.length===0)return[];if(t.outputs.length===1)return[e];if(Array.isArray(e))return e;throw new n.InvalidArrayError(e)})();return a.encodeAbiParameters(t.outputs,s)}exports.encodeFunctionResult=b;
|
package/dist/index180.js
CHANGED
|
@@ -1,11 +1,31 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { AbiFunctionNotFoundError as i, AbiFunctionOutputsNotFoundError as a, InvalidArrayError as f } from "./index95.js";
|
|
2
|
+
import { encodeAbiParameters as m } from "./index169.js";
|
|
3
|
+
import { getAbiItem as d } from "./index75.js";
|
|
4
|
+
const r = "/docs/contract/encodeFunctionResult";
|
|
5
|
+
function h(c) {
|
|
6
|
+
const { abi: e, functionName: o, result: n } = c;
|
|
7
|
+
let t = e[0];
|
|
8
|
+
if (o) {
|
|
9
|
+
const u = d({ abi: e, name: o });
|
|
10
|
+
if (!u)
|
|
11
|
+
throw new i(o, { docsPath: r });
|
|
12
|
+
t = u;
|
|
13
|
+
}
|
|
14
|
+
if (t.type !== "function")
|
|
15
|
+
throw new i(void 0, { docsPath: r });
|
|
16
|
+
if (!t.outputs)
|
|
17
|
+
throw new a(t.name, { docsPath: r });
|
|
18
|
+
const s = (() => {
|
|
19
|
+
if (t.outputs.length === 0)
|
|
20
|
+
return [];
|
|
21
|
+
if (t.outputs.length === 1)
|
|
22
|
+
return [n];
|
|
23
|
+
if (Array.isArray(n))
|
|
24
|
+
return n;
|
|
25
|
+
throw new f(n);
|
|
26
|
+
})();
|
|
27
|
+
return m(t.outputs, s);
|
|
8
28
|
}
|
|
9
29
|
export {
|
|
10
|
-
|
|
30
|
+
h as encodeFunctionResult
|
|
11
31
|
};
|
package/dist/index181.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/index181.js
CHANGED
|
@@ -1,45 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import { hexToBytes as g } from "./index159.js";
|
|
4
|
-
import { bytesToHex as u } from "./index42.js";
|
|
5
|
-
function m(n, e = "hex") {
|
|
6
|
-
const i = s(n), h = r(new Uint8Array(i.length));
|
|
7
|
-
return i.encode(h), e === "hex" ? u(h.bytes) : h.bytes;
|
|
8
|
-
}
|
|
9
|
-
function s(n) {
|
|
10
|
-
return Array.isArray(n) ? p(n.map((e) => s(e))) : y(n);
|
|
11
|
-
}
|
|
12
|
-
function p(n) {
|
|
13
|
-
const e = n.reduce((t, f) => t + f.length, 0), i = o(e);
|
|
14
|
-
return {
|
|
15
|
-
length: e <= 55 ? 1 + e : 1 + i + e,
|
|
16
|
-
encode(t) {
|
|
17
|
-
e <= 55 ? t.pushByte(192 + e) : (t.pushByte(247 + i), i === 1 ? t.pushUint8(e) : i === 2 ? t.pushUint16(e) : i === 3 ? t.pushUint24(e) : t.pushUint32(e));
|
|
18
|
-
for (const { encode: f } of n)
|
|
19
|
-
f(t);
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
function y(n) {
|
|
24
|
-
const e = typeof n == "string" ? g(n) : n, i = o(e.length);
|
|
25
|
-
return {
|
|
26
|
-
length: e.length === 1 && e[0] < 128 ? 1 : e.length <= 55 ? 1 + e.length : 1 + i + e.length,
|
|
27
|
-
encode(t) {
|
|
28
|
-
e.length === 1 && e[0] < 128 ? t.pushBytes(e) : e.length <= 55 ? (t.pushByte(128 + e.length), t.pushBytes(e)) : (t.pushByte(183 + i), i === 1 ? t.pushUint8(e.length) : i === 2 ? t.pushUint16(e.length) : i === 3 ? t.pushUint24(e.length) : t.pushUint32(e.length), t.pushBytes(e));
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
function o(n) {
|
|
33
|
-
if (n < 2 ** 8)
|
|
34
|
-
return 1;
|
|
35
|
-
if (n < 2 ** 16)
|
|
36
|
-
return 2;
|
|
37
|
-
if (n < 2 ** 24)
|
|
38
|
-
return 3;
|
|
39
|
-
if (n < 2 ** 32)
|
|
40
|
-
return 4;
|
|
41
|
-
throw new l("Length is too large.");
|
|
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");
|
|
42
3
|
}
|
|
43
4
|
export {
|
|
44
|
-
|
|
5
|
+
e as isHex
|
|
45
6
|
};
|
package/dist/index182.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("./index42.cjs"),r=require("./index183.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/index182.js
CHANGED
|
@@ -1,54 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
"0x3": "eip4844",
|
|
7
|
-
"0x4": "eip7702"
|
|
8
|
-
};
|
|
9
|
-
function m(e) {
|
|
10
|
-
const d = {
|
|
11
|
-
...e,
|
|
12
|
-
blockHash: e.blockHash ? e.blockHash : null,
|
|
13
|
-
blockNumber: e.blockNumber ? BigInt(e.blockNumber) : null,
|
|
14
|
-
chainId: e.chainId ? i(e.chainId) : void 0,
|
|
15
|
-
gas: e.gas ? BigInt(e.gas) : void 0,
|
|
16
|
-
gasPrice: e.gasPrice ? BigInt(e.gasPrice) : void 0,
|
|
17
|
-
maxFeePerBlobGas: e.maxFeePerBlobGas ? BigInt(e.maxFeePerBlobGas) : void 0,
|
|
18
|
-
maxFeePerGas: e.maxFeePerGas ? BigInt(e.maxFeePerGas) : void 0,
|
|
19
|
-
maxPriorityFeePerGas: e.maxPriorityFeePerGas ? BigInt(e.maxPriorityFeePerGas) : void 0,
|
|
20
|
-
nonce: e.nonce ? i(e.nonce) : void 0,
|
|
21
|
-
to: e.to ? e.to : null,
|
|
22
|
-
transactionIndex: e.transactionIndex ? Number(e.transactionIndex) : null,
|
|
23
|
-
type: e.type ? r[e.type] : void 0,
|
|
24
|
-
typeHex: e.type ? e.type : void 0,
|
|
25
|
-
value: e.value ? BigInt(e.value) : void 0,
|
|
26
|
-
v: e.v ? BigInt(e.v) : void 0
|
|
27
|
-
};
|
|
28
|
-
return e.authorizationList && (d.authorizationList = u(e.authorizationList)), d.yParity = (() => {
|
|
29
|
-
if (e.yParity)
|
|
30
|
-
return Number(e.yParity);
|
|
31
|
-
if (typeof d.v == "bigint") {
|
|
32
|
-
if (d.v === 0n || d.v === 27n)
|
|
33
|
-
return 0;
|
|
34
|
-
if (d.v === 1n || d.v === 28n)
|
|
35
|
-
return 1;
|
|
36
|
-
if (d.v >= 35n)
|
|
37
|
-
return d.v % 2n === 0n ? 1 : 0;
|
|
38
|
-
}
|
|
39
|
-
})(), d.type === "legacy" && (delete d.accessList, delete d.maxFeePerBlobGas, delete d.maxFeePerGas, delete d.maxPriorityFeePerGas, delete d.yParity), d.type === "eip2930" && (delete d.maxFeePerBlobGas, delete d.maxFeePerGas, delete d.maxPriorityFeePerGas), d.type === "eip1559" && delete d.maxFeePerBlobGas, d;
|
|
40
|
-
}
|
|
41
|
-
function u(e) {
|
|
42
|
-
return e.map((d) => ({
|
|
43
|
-
address: d.address,
|
|
44
|
-
chainId: Number(d.chainId),
|
|
45
|
-
nonce: Number(d.nonce),
|
|
46
|
-
r: d.r,
|
|
47
|
-
s: d.s,
|
|
48
|
-
yParity: Number(d.yParity)
|
|
49
|
-
}));
|
|
1
|
+
import { bytesToHex as i } from "./index42.js";
|
|
2
|
+
import { sha256 as m } from "./index183.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);
|
|
50
6
|
}
|
|
51
7
|
export {
|
|
52
|
-
|
|
53
|
-
r as transactionType
|
|
8
|
+
f as commitmentToVersionedHash
|
|
54
9
|
};
|
package/dist/index183.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 e=require("./index192.cjs"),s=require("./index181.cjs"),r=require("./index168.cjs");function o(t,i){return e.sha256(s.isHex(t,{strict:!1})?r.toBytes(t):t)}exports.sha256=o;
|
package/dist/index183.js
CHANGED
|
@@ -1,107 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
let o = R;
|
|
7
|
-
for (let r = 0; r < 7; r++)
|
|
8
|
-
t = (t << f ^ (t >> q) * z) % v, t & j && (o ^= f << (f << /* @__PURE__ */ BigInt(r)) - f);
|
|
9
|
-
B.push(o);
|
|
1
|
+
import { sha256 as o } from "./index192.js";
|
|
2
|
+
import { isHex as s } from "./index181.js";
|
|
3
|
+
import { toBytes as r } from "./index168.js";
|
|
4
|
+
function p(t, i) {
|
|
5
|
+
return o(s(t, { strict: !1 }) ? r(t) : t);
|
|
10
6
|
}
|
|
11
|
-
const A = L(B, !0), C = A[0], D = A[1], O = (n, t, s) => s > 32 ? m(n, t, s) : T(n, t, s), w = (n, t, s) => s > 32 ? F(n, t, s) : S(n, t, s);
|
|
12
|
-
function G(n, t = 24) {
|
|
13
|
-
const s = new Uint32Array(10);
|
|
14
|
-
for (let i = 24 - t; i < 24; i++) {
|
|
15
|
-
for (let e = 0; e < 10; e++)
|
|
16
|
-
s[e] = n[e] ^ n[e + 10] ^ n[e + 20] ^ n[e + 30] ^ n[e + 40];
|
|
17
|
-
for (let e = 0; e < 10; e += 2) {
|
|
18
|
-
const h = (e + 8) % 10, l = (e + 2) % 10, u = s[l], c = s[l + 1], b = O(u, c, 1) ^ s[h], H = w(u, c, 1) ^ s[h + 1];
|
|
19
|
-
for (let a = 0; a < 50; a += 10)
|
|
20
|
-
n[e + a] ^= b, n[e + a + 1] ^= H;
|
|
21
|
-
}
|
|
22
|
-
let o = n[2], r = n[3];
|
|
23
|
-
for (let e = 0; e < 24; e++) {
|
|
24
|
-
const h = g[e], l = O(o, r, h), u = w(o, r, h), c = _[e];
|
|
25
|
-
o = n[c], r = n[c + 1], n[c] = l, n[c + 1] = u;
|
|
26
|
-
}
|
|
27
|
-
for (let e = 0; e < 50; e += 10) {
|
|
28
|
-
for (let h = 0; h < 10; h++)
|
|
29
|
-
s[h] = n[e + h];
|
|
30
|
-
for (let h = 0; h < 10; h++)
|
|
31
|
-
n[e + h] ^= ~s[(h + 2) % 10] & s[(h + 4) % 10];
|
|
32
|
-
}
|
|
33
|
-
n[0] ^= C[i], n[1] ^= D[i];
|
|
34
|
-
}
|
|
35
|
-
y(s);
|
|
36
|
-
}
|
|
37
|
-
class p extends E {
|
|
38
|
-
// NOTE: we accept arguments in bytes instead of bits here.
|
|
39
|
-
constructor(t, s, i, o = !1, r = 24) {
|
|
40
|
-
if (super(), this.pos = 0, this.posOut = 0, this.finished = !1, this.destroyed = !1, this.enableXOF = !1, this.blockLen = t, this.suffix = s, this.outputLen = i, this.enableXOF = o, this.rounds = r, d(i), !(0 < t && t < 200))
|
|
41
|
-
throw new Error("only keccak-f1600 function is supported");
|
|
42
|
-
this.state = new Uint8Array(200), this.state32 = U(this.state);
|
|
43
|
-
}
|
|
44
|
-
clone() {
|
|
45
|
-
return this._cloneInto();
|
|
46
|
-
}
|
|
47
|
-
keccak() {
|
|
48
|
-
I(this.state32), G(this.state32, this.rounds), I(this.state32), this.posOut = 0, this.pos = 0;
|
|
49
|
-
}
|
|
50
|
-
update(t) {
|
|
51
|
-
x(this), t = P(t), k(t);
|
|
52
|
-
const { blockLen: s, state: i } = this, o = t.length;
|
|
53
|
-
for (let r = 0; r < o; ) {
|
|
54
|
-
const e = Math.min(s - this.pos, o - r);
|
|
55
|
-
for (let h = 0; h < e; h++)
|
|
56
|
-
i[this.pos++] ^= t[r++];
|
|
57
|
-
this.pos === s && this.keccak();
|
|
58
|
-
}
|
|
59
|
-
return this;
|
|
60
|
-
}
|
|
61
|
-
finish() {
|
|
62
|
-
if (this.finished)
|
|
63
|
-
return;
|
|
64
|
-
this.finished = !0;
|
|
65
|
-
const { state: t, suffix: s, pos: i, blockLen: o } = this;
|
|
66
|
-
t[i] ^= s, s & 128 && i === o - 1 && this.keccak(), t[o - 1] ^= 128, this.keccak();
|
|
67
|
-
}
|
|
68
|
-
writeInto(t) {
|
|
69
|
-
x(this, !1), k(t), this.finish();
|
|
70
|
-
const s = this.state, { blockLen: i } = this;
|
|
71
|
-
for (let o = 0, r = t.length; o < r; ) {
|
|
72
|
-
this.posOut >= i && this.keccak();
|
|
73
|
-
const e = Math.min(i - this.posOut, r - o);
|
|
74
|
-
t.set(s.subarray(this.posOut, this.posOut + e), o), this.posOut += e, o += e;
|
|
75
|
-
}
|
|
76
|
-
return t;
|
|
77
|
-
}
|
|
78
|
-
xofInto(t) {
|
|
79
|
-
if (!this.enableXOF)
|
|
80
|
-
throw new Error("XOF is not possible for this instance");
|
|
81
|
-
return this.writeInto(t);
|
|
82
|
-
}
|
|
83
|
-
xof(t) {
|
|
84
|
-
return d(t), this.xofInto(new Uint8Array(t));
|
|
85
|
-
}
|
|
86
|
-
digestInto(t) {
|
|
87
|
-
if (M(t, this), this.finished)
|
|
88
|
-
throw new Error("digest() was already called");
|
|
89
|
-
return this.writeInto(t), this.destroy(), t;
|
|
90
|
-
}
|
|
91
|
-
digest() {
|
|
92
|
-
return this.digestInto(new Uint8Array(this.outputLen));
|
|
93
|
-
}
|
|
94
|
-
destroy() {
|
|
95
|
-
this.destroyed = !0, y(this.state);
|
|
96
|
-
}
|
|
97
|
-
_cloneInto(t) {
|
|
98
|
-
const { blockLen: s, suffix: i, outputLen: o, rounds: r, enableXOF: e } = this;
|
|
99
|
-
return t || (t = new p(s, i, o, e, r)), t.state32.set(this.state32), t.pos = this.pos, t.posOut = this.posOut, t.finished = this.finished, t.rounds = r, t.suffix = i, t.outputLen = o, t.enableXOF = e, t.destroyed = this.destroyed, t;
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
const J = (n, t, s) => X(() => new p(t, n, s)), Q = J(1, 136, 256 / 8);
|
|
103
7
|
export {
|
|
104
|
-
p as
|
|
105
|
-
G as keccakP,
|
|
106
|
-
Q as keccak_256
|
|
8
|
+
p as sha256
|
|
107
9
|
};
|
package/dist/index184.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("./index185.cjs"),y=require("./index186.cjs"),u=require("./index166.cjs"),B=require("./index149.cjs"),h=require("./index168.cjs"),d=require("./index42.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/index184.js
CHANGED
|
@@ -1,5 +1,35 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { maxBytesPerTransaction as y, fieldElementsPerBlob as a, bytesPerFieldElement as f, bytesPerBlob as p } from "./index185.js";
|
|
2
|
+
import { EmptyBlobError as c, BlobSizeTooLargeError as h } from "./index186.js";
|
|
3
|
+
import { createCursor as B } from "./index166.js";
|
|
4
|
+
import { size as u } from "./index149.js";
|
|
5
|
+
import { hexToBytes as x } from "./index168.js";
|
|
6
|
+
import { bytesToHex as d } from "./index42.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));
|
|
32
|
+
}
|
|
3
33
|
export {
|
|
4
|
-
|
|
34
|
+
S as toBlobs
|
|
5
35
|
};
|
package/dist/index185.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=
|
|
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;
|
package/dist/index185.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
import { toSignature as o } from "./index231.js";
|
|
3
|
-
function a(r) {
|
|
4
|
-
return t(o(r));
|
|
5
|
-
}
|
|
1
|
+
const e = 32, s = 4096, t = 131072, l = 761855;
|
|
6
2
|
export {
|
|
7
|
-
|
|
3
|
+
t as bytesPerBlob,
|
|
4
|
+
e as bytesPerFieldElement,
|
|
5
|
+
s as fieldElementsPerBlob,
|
|
6
|
+
l as maxBytesPerTransaction
|
|
8
7
|
};
|
package/dist/index186.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 a=require("./index205.cjs"),s=require("./index35.cjs");class i extends s.BaseError{constructor({maxSize:e,size:r}){super("Blob size is too large.",{metaMessages:[`Max: ${e} bytes`,`Given: ${r} bytes`],name:"BlobSizeTooLargeError"})}}class n extends s.BaseError{constructor(){super("Blob data must not be empty.",{name:"EmptyBlobError"})}}class t extends s.BaseError{constructor({hash:e,size:r}){super(`Versioned hash "${e}" size is invalid.`,{metaMessages:["Expected: 32",`Received: ${r}`],name:"InvalidVersionedHashSizeError"})}}class d extends s.BaseError{constructor({hash:e,version:r}){super(`Versioned hash "${e}" version is invalid.`,{metaMessages:[`Expected: ${a.versionedHashVersionKzg}`,`Received: ${r}`],name:"InvalidVersionedHashVersionError"})}}exports.BlobSizeTooLargeError=i;exports.EmptyBlobError=n;exports.InvalidVersionedHashSizeError=t;exports.InvalidVersionedHashVersionError=d;
|
package/dist/index186.js
CHANGED
|
@@ -1,6 +1,40 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { versionedHashVersionKzg as a } from "./index205.js";
|
|
2
|
+
import { BaseError as s } from "./index35.js";
|
|
3
|
+
class t extends s {
|
|
4
|
+
constructor({ maxSize: e, size: r }) {
|
|
5
|
+
super("Blob size is too large.", {
|
|
6
|
+
metaMessages: [`Max: ${e} bytes`, `Given: ${r} bytes`],
|
|
7
|
+
name: "BlobSizeTooLargeError"
|
|
8
|
+
});
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
class d extends s {
|
|
12
|
+
constructor() {
|
|
13
|
+
super("Blob data must not be empty.", { name: "EmptyBlobError" });
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
class l extends s {
|
|
17
|
+
constructor({ hash: e, size: r }) {
|
|
18
|
+
super(`Versioned hash "${e}" size is invalid.`, {
|
|
19
|
+
metaMessages: ["Expected: 32", `Received: ${r}`],
|
|
20
|
+
name: "InvalidVersionedHashSizeError"
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
class c extends s {
|
|
25
|
+
constructor({ hash: e, version: r }) {
|
|
26
|
+
super(`Versioned hash "${e}" version is invalid.`, {
|
|
27
|
+
metaMessages: [
|
|
28
|
+
`Expected: ${a}`,
|
|
29
|
+
`Received: ${r}`
|
|
30
|
+
],
|
|
31
|
+
name: "InvalidVersionedHashVersionError"
|
|
32
|
+
});
|
|
33
|
+
}
|
|
3
34
|
}
|
|
4
35
|
export {
|
|
5
|
-
|
|
36
|
+
t as BlobSizeTooLargeError,
|
|
37
|
+
d as EmptyBlobError,
|
|
38
|
+
l as InvalidVersionedHashSizeError,
|
|
39
|
+
c as InvalidVersionedHashVersionError
|
|
6
40
|
};
|
package/dist/index187.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 u=require("./index91.cjs"),s=require("./index35.cjs"),n=require("./index158.cjs");class h extends s.BaseError{constructor({callbackSelector:r,cause:e,data:c,extraData:f,sender:i,urls:o}){var t;super(e.shortMessage||"An error occurred while fetching for an offchain result.",{cause:e,metaMessages:[...e.metaMessages||[],(t=e.metaMessages)!=null&&t.length?"":[],"Offchain Gateway Call:",o&&[" Gateway URL(s):",...o.map(d=>` ${n.getUrl(d)}`)],` Sender: ${i}`,` Data: ${c}`,` Callback selector: ${r}`,` Extra data: ${f}`].flat(),name:"OffchainLookupError"})}}class l extends s.BaseError{constructor({result:r,url:e}){super("Offchain gateway response is malformed. Response data must be a hex value.",{metaMessages:[`Gateway URL: ${n.getUrl(e)}`,`Response: ${u.stringify(r)}`],name:"OffchainLookupResponseMalformedError"})}}class p extends s.BaseError{constructor({sender:r,to:e}){super("Reverted sender address does not match target contract address (`to`).",{metaMessages:[`Contract address: ${e}`,`OffchainLookup sender address: ${r}`],name:"OffchainLookupSenderMismatchError"})}}exports.OffchainLookupError=h;exports.OffchainLookupResponseMalformedError=l;exports.OffchainLookupSenderMismatchError=p;
|
package/dist/index187.js
CHANGED
|
@@ -1,20 +1,52 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
(t
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
})
|
|
16
|
-
|
|
1
|
+
import { stringify as i } from "./index91.js";
|
|
2
|
+
import { BaseError as a } from "./index35.js";
|
|
3
|
+
import { getUrl as n } from "./index158.js";
|
|
4
|
+
class u extends a {
|
|
5
|
+
constructor({ callbackSelector: r, cause: e, data: f, extraData: c, sender: d, urls: o }) {
|
|
6
|
+
var t;
|
|
7
|
+
super(e.shortMessage || "An error occurred while fetching for an offchain result.", {
|
|
8
|
+
cause: e,
|
|
9
|
+
metaMessages: [
|
|
10
|
+
...e.metaMessages || [],
|
|
11
|
+
(t = e.metaMessages) != null && t.length ? "" : [],
|
|
12
|
+
"Offchain Gateway Call:",
|
|
13
|
+
o && [
|
|
14
|
+
" Gateway URL(s):",
|
|
15
|
+
...o.map((m) => ` ${n(m)}`)
|
|
16
|
+
],
|
|
17
|
+
` Sender: ${d}`,
|
|
18
|
+
` Data: ${f}`,
|
|
19
|
+
` Callback selector: ${r}`,
|
|
20
|
+
` Extra data: ${c}`
|
|
21
|
+
].flat(),
|
|
22
|
+
name: "OffchainLookupError"
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
class g extends a {
|
|
27
|
+
constructor({ result: r, url: e }) {
|
|
28
|
+
super("Offchain gateway response is malformed. Response data must be a hex value.", {
|
|
29
|
+
metaMessages: [
|
|
30
|
+
`Gateway URL: ${n(e)}`,
|
|
31
|
+
`Response: ${i(r)}`
|
|
32
|
+
],
|
|
33
|
+
name: "OffchainLookupResponseMalformedError"
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
class M extends a {
|
|
38
|
+
constructor({ sender: r, to: e }) {
|
|
39
|
+
super("Reverted sender address does not match target contract address (`to`).", {
|
|
40
|
+
metaMessages: [
|
|
41
|
+
`Contract address: ${e}`,
|
|
42
|
+
`OffchainLookup sender address: ${r}`
|
|
43
|
+
],
|
|
44
|
+
name: "OffchainLookupSenderMismatchError"
|
|
45
|
+
});
|
|
46
|
+
}
|
|
17
47
|
}
|
|
18
48
|
export {
|
|
19
|
-
u as
|
|
49
|
+
u as OffchainLookupError,
|
|
50
|
+
g as OffchainLookupResponseMalformedError,
|
|
51
|
+
M as OffchainLookupSenderMismatchError
|
|
20
52
|
};
|
package/dist/index188.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("./index21.cjs"),y=require("./index152.cjs"),h=require("./index173.cjs"),n=require("./index177.cjs"),w=require("./index180.cjs"),u="x-batch-gateway:true";async function i(t){const{data:l,ccipRequest:o}=t,{args:[d]}=h.decodeFunctionData({abi:c.batchGatewayAbi,data:l}),a=[],s=[];return await Promise.all(d.map(async(r,e)=>{try{s[e]=r.urls.includes(u)?await i({data:r.data,ccipRequest:o}):await o(r),a[e]=!1}catch(b){a[e]=!0,s[e]=g(b)}})),w.encodeFunctionResult({abi:c.batchGatewayAbi,functionName:"query",result:[a,s]})}function g(t){return t.name==="HttpRequestError"&&t.status?n.encodeErrorResult({abi:c.batchGatewayAbi,errorName:"HttpError",args:[t.status,t.shortMessage]}):n.encodeErrorResult({abi:[y.solidityError],errorName:"Error",args:["shortMessage"in t?t.shortMessage:t.message]})}exports.localBatchGatewayRequest=i;exports.localBatchGatewayUrl=u;
|