@gardenfi/swap 0.1.3-beta.16 → 0.1.3-beta.18
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/index102.cjs +1 -1
- package/dist/index102.js +1 -1
- package/dist/index106.cjs +1 -1
- package/dist/index106.js +1 -1
- package/dist/index107.cjs +1 -1
- package/dist/index107.js +7 -7
- package/dist/index109.cjs +1 -1
- package/dist/index109.js +4 -4
- package/dist/index110.cjs +1 -1
- package/dist/index110.js +3 -3
- package/dist/index116.cjs +1 -1
- package/dist/index116.js +1 -1
- package/dist/index119.cjs +1 -1
- package/dist/index119.js +1 -1
- package/dist/index120.cjs +1 -1
- package/dist/index120.js +1 -1
- package/dist/index123.cjs +1 -1
- package/dist/index123.js +2 -2
- package/dist/index124.cjs +1 -1
- package/dist/index124.js +7 -7
- package/dist/index129.cjs +1 -1
- package/dist/index129.js +3 -3
- package/dist/index130.cjs +1 -1
- package/dist/index130.js +1 -1
- package/dist/index131.cjs +1 -1
- package/dist/index131.js +2 -2
- package/dist/index132.cjs +1 -1
- package/dist/index132.js +1 -1
- package/dist/index133.cjs +1 -1
- package/dist/index133.js +3 -3
- package/dist/index134.cjs +1 -1
- package/dist/index134.js +2 -2
- package/dist/index135.cjs +1 -1
- package/dist/index135.js +1 -1
- package/dist/index136.cjs +1 -1
- package/dist/index136.js +1 -1
- package/dist/index137.cjs +1 -1
- package/dist/index137.js +1 -1
- package/dist/index138.cjs +1 -1
- package/dist/index138.js +1 -1
- package/dist/index141.cjs +1 -1
- package/dist/index141.js +4 -4
- package/dist/index142.cjs +1 -1
- package/dist/index142.js +1 -1
- package/dist/index143.cjs +1 -1
- package/dist/index143.js +3 -3
- package/dist/index146.cjs +1 -1
- package/dist/index146.js +1 -1
- package/dist/index148.cjs +1 -1
- package/dist/index148.js +1 -1
- package/dist/index149.cjs +1 -1
- package/dist/index149.js +1 -1
- package/dist/index151.cjs +1 -1
- package/dist/index151.js +1 -1
- package/dist/index152.cjs +1 -1
- package/dist/index152.js +1 -1
- package/dist/index157.cjs +1 -1
- package/dist/index157.js +1 -1
- package/dist/index159.cjs +1 -1
- package/dist/index159.js +1 -1
- package/dist/index161.cjs +1 -1
- package/dist/index161.js +1 -1
- package/dist/index162.cjs +1 -1
- package/dist/index162.js +1 -1
- package/dist/index163.cjs +1 -1
- package/dist/index163.js +1 -1
- package/dist/index164.cjs +1 -1
- package/dist/index164.js +4 -4
- package/dist/index165.cjs +1 -1
- package/dist/index165.js +3 -3
- package/dist/index170.cjs +1 -1
- package/dist/index170.js +2 -2
- package/dist/index171.cjs +1 -1
- package/dist/index171.js +3 -3
- package/dist/index172.cjs +1 -1
- package/dist/index172.js +2 -2
- package/dist/index173.cjs +1 -1
- package/dist/index173.js +2 -2
- package/dist/index174.cjs +1 -1
- package/dist/index174.js +2 -2
- package/dist/index175.cjs +1 -1
- package/dist/index175.js +2 -2
- package/dist/index176.cjs +1 -1
- package/dist/index176.js +2 -2
- package/dist/index179.cjs +1 -1
- package/dist/index179.js +1 -1
- package/dist/index18.cjs +1 -1
- package/dist/index18.js +3 -3
- package/dist/index184.cjs +1 -1
- package/dist/index184.js +1 -1
- package/dist/index19.cjs +1 -1
- package/dist/index19.js +18 -18
- package/dist/index20.cjs +1 -1
- package/dist/index20.js +2 -2
- package/dist/index21.cjs +1 -1
- package/dist/index21.js +4 -4
- package/dist/index216.cjs +1 -1
- package/dist/index216.js +1 -1
- package/dist/index217.cjs +1 -1
- package/dist/index217.js +1 -1
- package/dist/index24.cjs +1 -1
- package/dist/index24.js +2 -2
- package/dist/index245.cjs +1 -1
- package/dist/index245.js +1 -1
- package/dist/index262.cjs +1 -1
- package/dist/index262.js +1 -1
- package/dist/index265.cjs +1 -1
- package/dist/index265.js +1 -1
- package/dist/index271.cjs +1 -1
- package/dist/index271.js +41 -14
- package/dist/index272.cjs +1 -1
- package/dist/index272.js +12 -23
- package/dist/index273.cjs +1 -1
- package/dist/index273.js +24 -12
- package/dist/index274.cjs +1 -1
- package/dist/index274.js +12 -9
- package/dist/index275.cjs +1 -1
- package/dist/index275.js +9 -30
- package/dist/index276.cjs +1 -1
- package/dist/index276.js +31 -2
- package/dist/index277.cjs +1 -1
- package/dist/index277.js +2 -48
- package/dist/index278.cjs +1 -1
- package/dist/index278.js +46 -10
- package/dist/index279.cjs +1 -1
- package/dist/index279.js +10 -173
- package/dist/index280.cjs +1 -2
- package/dist/index280.js +154 -71
- package/dist/index281.cjs +2 -1
- package/dist/index281.js +90 -39
- package/dist/index282.cjs +1 -1
- package/dist/index282.js +40 -4
- package/dist/index283.cjs +1 -1
- package/dist/index283.js +4 -163
- package/dist/index284.cjs +1 -1
- package/dist/index284.js +164 -5
- package/dist/index285.cjs +1 -1
- package/dist/index285.js +5 -41
- package/dist/index302.cjs +1 -1
- package/dist/index302.js +7 -37
- package/dist/index303.cjs +1 -1
- package/dist/index303.js +36 -14
- package/dist/index304.cjs +1 -1
- package/dist/index304.js +15 -8
- package/dist/index305.cjs +1 -1
- package/dist/index305.js +8 -7
- package/dist/index306.cjs +1 -1
- package/dist/index306.js +10 -43
- package/dist/index307.cjs +1 -1
- package/dist/index307.js +16 -320
- package/dist/index308.cjs +1 -1
- package/dist/index308.js +21 -604
- package/dist/index309.cjs +1 -1
- package/dist/index309.js +14 -110
- package/dist/index310.cjs +1 -1
- package/dist/index310.js +13 -167
- package/dist/index311.cjs +1 -1
- package/dist/index311.js +13 -300
- package/dist/index312.cjs +1 -1
- package/dist/index312.js +9 -93
- package/dist/index313.cjs +1 -1
- package/dist/index313.js +13 -54
- package/dist/index314.cjs +1 -1
- package/dist/index314.js +23 -51
- package/dist/index315.cjs +1 -1
- package/dist/index315.js +30 -43
- package/dist/index316.cjs +2 -1
- package/dist/index316.js +18 -15
- package/dist/index317.cjs +1 -1
- package/dist/index317.js +14 -317
- package/dist/index318.cjs +1 -1
- package/dist/index318.js +41 -58
- package/dist/index319.cjs +1 -1
- package/dist/index319.js +319 -18
- package/dist/index320.cjs +1 -1
- package/dist/index320.js +602 -26
- package/dist/index321.cjs +1 -1
- package/dist/index321.js +110 -4
- package/dist/index322.cjs +1 -7
- package/dist/index322.js +166 -236
- package/dist/index323.cjs +1 -1
- package/dist/index323.js +302 -48
- package/dist/index324.cjs +1 -1
- package/dist/index324.js +92 -211
- package/dist/index325.cjs +1 -1
- package/dist/index325.js +49 -74
- package/dist/index326.cjs +1 -1
- package/dist/index326.js +51 -27
- package/dist/index327.cjs +1 -1
- package/dist/index327.js +42 -74
- package/dist/index328.cjs +1 -1
- package/dist/index328.js +15 -9
- package/dist/index329.cjs +1 -1
- package/dist/index329.js +317 -16
- package/dist/index330.cjs +1 -1
- package/dist/index330.js +57 -20
- package/dist/index331.cjs +1 -1
- package/dist/index331.js +18 -12
- package/dist/index332.cjs +1 -1
- package/dist/index332.js +29 -13
- package/dist/index333.cjs +1 -1
- package/dist/index333.js +3 -14
- package/dist/index334.cjs +7 -1
- package/dist/index334.js +237 -9
- package/dist/index335.cjs +1 -1
- package/dist/index335.js +48 -16
- package/dist/index336.cjs +1 -1
- package/dist/index336.js +209 -22
- package/dist/index337.cjs +1 -1
- package/dist/index337.js +80 -30
- package/dist/index338.cjs +1 -2
- package/dist/index338.js +29 -18
- package/dist/index339.cjs +1 -1
- package/dist/index339.js +75 -13
- package/dist/index350.cjs +1 -1
- package/dist/index350.js +1 -1
- package/dist/index351.cjs +1 -1
- package/dist/index351.js +3 -3
- package/dist/index352.cjs +1 -2
- package/dist/index352.js +4 -193
- package/dist/index353.cjs +2 -1
- package/dist/index353.js +168 -52
- package/dist/index354.cjs +1 -1
- package/dist/index354.js +65 -331
- package/dist/index355.cjs +1 -1
- package/dist/index355.js +332 -149
- package/dist/index356.cjs +1 -1
- package/dist/index356.js +161 -5
- package/dist/index357.cjs +1 -1
- package/dist/index357.js +5 -5
- package/dist/index358.cjs +1 -1
- package/dist/index358.js +1 -1
- package/dist/index360.cjs +1 -1
- package/dist/index360.js +1 -1
- package/dist/index364.cjs +1 -1
- package/dist/index364.js +3 -94
- package/dist/index365.cjs +1 -1
- package/dist/index365.js +137 -25
- package/dist/index366.cjs +1 -1
- package/dist/index366.js +129 -144
- package/dist/index367.cjs +1 -1
- package/dist/index367.js +71 -331
- package/dist/index368.cjs +1 -1
- package/dist/index368.js +28 -3
- package/dist/index369.cjs +1 -1
- package/dist/index369.js +143 -135
- package/dist/index370.cjs +1 -1
- package/dist/index370.js +343 -264
- package/dist/index371.cjs +1 -1
- package/dist/index371.js +73 -170
- package/dist/index372.cjs +1 -1
- package/dist/index372.js +32 -10
- package/dist/index373.cjs +1 -1
- package/dist/index373.js +5 -107
- package/dist/index374.cjs +1 -1
- package/dist/index374.js +275 -5
- package/dist/index375.cjs +1 -1
- package/dist/index375.js +170 -73
- package/dist/index376.cjs +1 -1
- package/dist/index376.js +10 -10
- package/dist/index377.cjs +1 -1
- package/dist/index377.js +105 -29
- package/dist/index378.cjs +1 -1
- package/dist/index378.js +9 -133
- package/dist/index384.cjs +1 -1
- package/dist/index384.js +2 -22
- package/dist/index385.cjs +1 -1
- package/dist/index385.js +22 -2
- package/dist/index386.cjs +1 -1
- package/dist/index386.js +59 -106
- package/dist/index387.cjs +1 -1
- package/dist/index387.js +110 -3
- package/dist/index388.cjs +1 -1
- package/dist/index388.js +3 -63
- package/dist/index41.cjs +1 -1
- package/dist/index41.js +1 -1
- package/dist/index42.cjs +1 -1
- package/dist/index42.js +12 -88
- package/dist/index43.cjs +1 -1
- package/dist/index43.js +58 -13
- package/dist/index44.cjs +1 -1
- package/dist/index44.js +522 -12
- package/dist/index45.cjs +1 -1
- package/dist/index45.js +30 -59
- package/dist/index46.cjs +1 -1
- package/dist/index46.js +26 -522
- package/dist/index47.cjs +1 -1
- package/dist/index47.js +12 -16
- package/dist/index48.cjs +1 -1
- package/dist/index48.js +34 -11
- package/dist/index49.cjs +1 -1
- package/dist/index49.js +16 -14
- package/dist/index50.cjs +1 -1
- package/dist/index50.js +16 -37
- package/dist/index51.cjs +1 -1
- package/dist/index51.js +17 -14
- package/dist/index52.cjs +1 -1
- package/dist/index52.js +19 -17
- package/dist/index53.cjs +1 -1
- package/dist/index53.js +42 -17
- package/dist/index54.cjs +1 -1
- package/dist/index54.js +39 -15
- package/dist/index55.cjs +1 -1
- package/dist/index55.js +29 -49
- package/dist/index56.cjs +1 -1
- package/dist/index56.js +29 -46
- package/dist/index57.cjs +1 -1
- package/dist/index57.js +19 -25
- package/dist/index58.cjs +1 -1
- package/dist/index58.js +18 -27
- package/dist/index59.cjs +1 -1
- package/dist/index59.js +14 -16
- package/dist/index60.cjs +1 -1
- package/dist/index60.js +24 -14
- package/dist/index61.cjs +1 -1
- package/dist/index61.js +34 -17
- package/dist/index62.cjs +1 -1
- package/dist/index62.js +33 -19
- package/dist/index63.cjs +1 -1
- package/dist/index63.js +15 -45
- package/dist/index64.cjs +1 -1
- package/dist/index64.js +14 -52
- package/dist/index65.cjs +1 -1
- package/dist/index65.js +86 -13
- package/dist/index66.cjs +1 -1
- package/dist/index66.js +13 -13
- package/dist/index68.cjs +1 -1
- package/dist/index68.js +3 -3
- package/dist/index70.cjs +1 -1
- package/dist/index70.js +1 -1
- package/dist/index71.cjs +1 -1
- package/dist/index71.js +12 -19
- package/dist/index72.cjs +1 -1
- package/dist/index72.js +36 -12
- package/dist/index73.cjs +1 -1
- package/dist/index73.js +41 -36
- package/dist/index74.cjs +1 -1
- package/dist/index74.js +39 -38
- package/dist/index75.cjs +1 -1
- package/dist/index75.js +24 -42
- package/dist/index76.cjs +1 -1
- package/dist/index76.js +52 -22
- package/dist/index77.cjs +1 -1
- package/dist/index77.js +25 -52
- package/dist/index78.cjs +1 -1
- package/dist/index78.js +20 -28
- package/dist/index80.cjs +1 -1
- package/dist/index80.js +13 -13
- package/dist/index84.cjs +1 -1
- package/dist/index84.js +1 -1
- package/dist/index95.cjs +1 -1
- package/dist/index95.js +2 -2
- package/dist/src/lib/store/swapStore.d.ts +1 -1
- package/package.json +5 -5
package/dist/index66.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
import e from "react";
|
|
2
|
+
import { motion as l } from "framer-motion";
|
|
3
|
+
const s = () => {
|
|
4
|
+
const t = () => /* @__PURE__ */ e.createElement("div", { className: "flex flex-col gap-1" }, /* @__PURE__ */ e.createElement("div", { className: "flex justify-between gap-4" }, /* @__PURE__ */ e.createElement("div", { className: "h-5 w-24 animate-pulse rounded-md bg-gray-200" }), /* @__PURE__ */ e.createElement("div", { className: "h-5 w-6 animate-pulse rounded-full bg-gray-200" }), /* @__PURE__ */ e.createElement("div", { className: "h-5 w-24 animate-pulse rounded-md bg-gray-200" })), /* @__PURE__ */ e.createElement("div", { className: "flex justify-between" }, /* @__PURE__ */ e.createElement("div", { className: "h-4 w-28 animate-pulse rounded-md bg-gray-200" }), /* @__PURE__ */ e.createElement("div", { className: "h-4 w-20 animate-pulse rounded-md bg-gray-200" })));
|
|
5
|
+
return /* @__PURE__ */ e.createElement(l.div, { layout: !0, className: "flex flex-col" }, Array.from({ length: 4 }).map((m, a) => /* @__PURE__ */ e.createElement(
|
|
6
|
+
"div",
|
|
7
|
+
{
|
|
8
|
+
key: a,
|
|
9
|
+
className: `bg-white/50 p-4 ${a === 3 ? "rounded-b-2xl" : ""}`
|
|
10
|
+
},
|
|
11
|
+
t()
|
|
12
|
+
)));
|
|
13
13
|
};
|
|
14
14
|
export {
|
|
15
|
-
|
|
15
|
+
s as TransactionsSkeleton
|
|
16
16
|
};
|
package/dist/index68.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index71.cjs"),e=require("./index72.cjs"),t=require("./index73.cjs"),s={blockTime:2e3,contracts:r.contracts,formatters:e.formatters,serializers:t.serializers};exports.chainConfig=s;
|
package/dist/index68.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { contracts as o } from "./
|
|
2
|
-
import { formatters as r } from "./
|
|
3
|
-
import { serializers as t } from "./
|
|
1
|
+
import { contracts as o } from "./index71.js";
|
|
2
|
+
import { formatters as r } from "./index72.js";
|
|
3
|
+
import { serializers as t } from "./index73.js";
|
|
4
4
|
const e = {
|
|
5
5
|
blockTime: 2e3,
|
|
6
6
|
contracts: o,
|
package/dist/index70.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),t=require("@gardenfi/garden-book"),c=require("framer-motion"),m=require("./index69.cjs"),o=require("./index6.cjs"),i=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),t=require("@gardenfi/garden-book"),c=require("framer-motion"),m=require("./index69.cjs"),o=require("./index6.cjs"),i=require("./index271.cjs"),g=({refundAddress:a,receiveAddress:r,networkFeesValue:l})=>{const{outputAsset:s,outputAmount:n}=o.swapStore();return e.createElement(c.motion.div,{className:"flex flex-col",...m.expandWithDelayAnimation},e.createElement("div",{className:"h-full"},e.createElement("div",{className:"flex items-center justify-between px-4 pt-1"},e.createElement("div",{className:"flex items-center gap-1"},e.createElement(t.Typography,{size:"h5",weight:"regular",className:"!text-mid-grey"},"Network fee")),e.createElement("div",{className:"flex gap-5 py-1"},e.createElement(t.Typography,{size:"h5",weight:"regular"},l===0?"Free":"$"+l))),e.createElement("div",{className:"flex items-center justify-between px-4"},e.createElement("div",{className:"flex items-center gap-1"},e.createElement(t.Typography,{size:"h5",weight:"regular",className:"!text-mid-grey"},"Minimum received")),e.createElement("div",{className:"flex gap-5 py-1"},e.createElement(t.Typography,{size:"h5",weight:"regular"},n," ",s==null?void 0:s.symbol))),(r||a)&&e.createElement(e.Fragment,null,e.createElement("div",{className:"flex flex-col items-stretch justify-center"},r&&e.createElement(i.AddressDetails,{address:r}),a&&e.createElement(i.AddressDetails,{address:a,isRefund:!0})))))};exports.SwapSavingsAndAddresses=g;
|
package/dist/index70.js
CHANGED
|
@@ -3,7 +3,7 @@ import { Typography as t } from "@gardenfi/garden-book";
|
|
|
3
3
|
import { motion as c } from "framer-motion";
|
|
4
4
|
import { expandWithDelayAnimation as n } from "./index69.js";
|
|
5
5
|
import { swapStore as o } from "./index6.js";
|
|
6
|
-
import { AddressDetails as i } from "./
|
|
6
|
+
import { AddressDetails as i } from "./index271.js";
|
|
7
7
|
const h = ({
|
|
8
8
|
refundAddress: a,
|
|
9
9
|
receiveAddress: m,
|
package/dist/index71.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s={gasPriceOracle:{address:"0x420000000000000000000000000000000000000F"},l1Block:{address:"0x4200000000000000000000000000000000000015"},l2CrossDomainMessenger:{address:"0x4200000000000000000000000000000000000007"},l2Erc721Bridge:{address:"0x4200000000000000000000000000000000000014"},l2StandardBridge:{address:"0x4200000000000000000000000000000000000010"},l2ToL1MessagePasser:{address:"0x4200000000000000000000000000000000000016"}};exports.contracts=s;
|
package/dist/index71.js
CHANGED
|
@@ -1,22 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
typeof window < "u" && n({
|
|
12
|
-
width: window.innerWidth,
|
|
13
|
-
height: window.innerHeight,
|
|
14
|
-
isMobile: /iPhone|iPad|iPod|Android/i.test(navigator.userAgent) || window.innerWidth < i.sm,
|
|
15
|
-
isTab: window.innerWidth >= i.md
|
|
16
|
-
});
|
|
1
|
+
const s = {
|
|
2
|
+
gasPriceOracle: { address: "0x420000000000000000000000000000000000000F" },
|
|
3
|
+
l1Block: { address: "0x4200000000000000000000000000000000000015" },
|
|
4
|
+
l2CrossDomainMessenger: {
|
|
5
|
+
address: "0x4200000000000000000000000000000000000007"
|
|
6
|
+
},
|
|
7
|
+
l2Erc721Bridge: { address: "0x4200000000000000000000000000000000000014" },
|
|
8
|
+
l2StandardBridge: { address: "0x4200000000000000000000000000000000000010" },
|
|
9
|
+
l2ToL1MessagePasser: {
|
|
10
|
+
address: "0x4200000000000000000000000000000000000016"
|
|
17
11
|
}
|
|
18
|
-
}
|
|
12
|
+
};
|
|
19
13
|
export {
|
|
20
|
-
|
|
21
|
-
o as viewPortStore
|
|
14
|
+
s as contracts
|
|
22
15
|
};
|
package/dist/index72.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index74.cjs"),c=require("./index75.cjs"),r=require("./index76.cjs"),l=require("./index77.cjs"),a={block:c.defineBlock({format(e){var s;return{transactions:(s=e.transactions)==null?void 0:s.map(t=>{if(typeof t=="string")return t;const i=r.formatTransaction(t);return i.typeHex==="0x7e"&&(i.isSystemTx=t.isSystemTx,i.mint=t.mint?o.hexToBigInt(t.mint):void 0,i.sourceHash=t.sourceHash,i.type="deposit"),i}),stateRoot:e.stateRoot}}}),transaction:r.defineTransaction({format(e){const n={};return e.type==="0x7e"&&(n.isSystemTx=e.isSystemTx,n.mint=e.mint?o.hexToBigInt(e.mint):void 0,n.sourceHash=e.sourceHash,n.type="deposit"),n}}),transactionReceipt:l.defineTransactionReceipt({format(e){return{l1GasPrice:e.l1GasPrice?o.hexToBigInt(e.l1GasPrice):null,l1GasUsed:e.l1GasUsed?o.hexToBigInt(e.l1GasUsed):null,l1Fee:e.l1Fee?o.hexToBigInt(e.l1Fee):null,l1FeeScalar:e.l1FeeScalar?Number(e.l1FeeScalar):null}}})};exports.formatters=a;
|
package/dist/index72.js
CHANGED
|
@@ -1,15 +1,39 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
import { hexToBigInt as n } from "./index74.js";
|
|
2
|
+
import { defineBlock as s } from "./index75.js";
|
|
3
|
+
import { defineTransaction as m, formatTransaction as l } from "./index76.js";
|
|
4
|
+
import { defineTransactionReceipt as c } from "./index77.js";
|
|
5
|
+
const d = {
|
|
6
|
+
block: /* @__PURE__ */ s({
|
|
7
|
+
format(e) {
|
|
8
|
+
var r;
|
|
9
|
+
return {
|
|
10
|
+
transactions: (r = e.transactions) == null ? void 0 : r.map((t) => {
|
|
11
|
+
if (typeof t == "string")
|
|
12
|
+
return t;
|
|
13
|
+
const i = l(t);
|
|
14
|
+
return i.typeHex === "0x7e" && (i.isSystemTx = t.isSystemTx, i.mint = t.mint ? n(t.mint) : void 0, i.sourceHash = t.sourceHash, i.type = "deposit"), i;
|
|
15
|
+
}),
|
|
16
|
+
stateRoot: e.stateRoot
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
}),
|
|
20
|
+
transaction: /* @__PURE__ */ m({
|
|
21
|
+
format(e) {
|
|
22
|
+
const o = {};
|
|
23
|
+
return e.type === "0x7e" && (o.isSystemTx = e.isSystemTx, o.mint = e.mint ? n(e.mint) : void 0, o.sourceHash = e.sourceHash, o.type = "deposit"), o;
|
|
24
|
+
}
|
|
25
|
+
}),
|
|
26
|
+
transactionReceipt: /* @__PURE__ */ c({
|
|
27
|
+
format(e) {
|
|
28
|
+
return {
|
|
29
|
+
l1GasPrice: e.l1GasPrice ? n(e.l1GasPrice) : null,
|
|
30
|
+
l1GasUsed: e.l1GasUsed ? n(e.l1GasUsed) : null,
|
|
31
|
+
l1Fee: e.l1Fee ? n(e.l1Fee) : null,
|
|
32
|
+
l1FeeScalar: e.l1FeeScalar ? Number(e.l1FeeScalar) : null
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
})
|
|
12
36
|
};
|
|
13
37
|
export {
|
|
14
|
-
|
|
38
|
+
d as formatters
|
|
15
39
|
};
|
package/dist/index73.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("./index81.cjs"),c=require("./index82.cjs"),T=require("./index83.cjs"),t=require("./index84.cjs"),z=require("./index85.cjs"),H=require("./index86.cjs");function d(e,r){return y(e)?m(e):H.serializeTransaction(e,r)}const q={transaction:d};function m(e){u(e);const{sourceHash:r,data:s,from:l,gas:i,isSystemTx:f,mint:o,to:x,value:n}=e,p=[r,l,x??"0x",o?t.toHex(o):"0x",n?t.toHex(n):"0x",i?t.toHex(i):"0x",f?"0x1":"0x",s??"0x"];return T.concatHex(["0x7e",z.toRlp(p)])}function y(e){return e.type==="deposit"||typeof e.sourceHash<"u"}function u(e){const{from:r,to:s}=e;if(r&&!c.isAddress(r))throw new a.InvalidAddressError({address:r});if(s&&!c.isAddress(s))throw new a.InvalidAddressError({address:s})}exports.assertTransactionDeposit=u;exports.serializeTransaction=d;exports.serializers=q;
|
package/dist/index73.js
CHANGED
|
@@ -1,39 +1,44 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
return t;
|
|
13
|
-
const i = l(t);
|
|
14
|
-
return i.typeHex === "0x7e" && (i.isSystemTx = t.isSystemTx, i.mint = t.mint ? n(t.mint) : void 0, i.sourceHash = t.sourceHash, i.type = "deposit"), i;
|
|
15
|
-
}),
|
|
16
|
-
stateRoot: e.stateRoot
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
}),
|
|
20
|
-
transaction: /* @__PURE__ */ m({
|
|
21
|
-
format(e) {
|
|
22
|
-
const o = {};
|
|
23
|
-
return e.type === "0x7e" && (o.isSystemTx = e.isSystemTx, o.mint = e.mint ? n(e.mint) : void 0, o.sourceHash = e.sourceHash, o.type = "deposit"), o;
|
|
24
|
-
}
|
|
25
|
-
}),
|
|
26
|
-
transactionReceipt: /* @__PURE__ */ c({
|
|
27
|
-
format(e) {
|
|
28
|
-
return {
|
|
29
|
-
l1GasPrice: e.l1GasPrice ? n(e.l1GasPrice) : null,
|
|
30
|
-
l1GasUsed: e.l1GasUsed ? n(e.l1GasUsed) : null,
|
|
31
|
-
l1Fee: e.l1Fee ? n(e.l1Fee) : null,
|
|
32
|
-
l1FeeScalar: e.l1FeeScalar ? Number(e.l1FeeScalar) : null
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
})
|
|
1
|
+
import { InvalidAddressError as a } from "./index81.js";
|
|
2
|
+
import { isAddress as f } from "./index82.js";
|
|
3
|
+
import { concatHex as p } from "./index83.js";
|
|
4
|
+
import { toHex as i } from "./index84.js";
|
|
5
|
+
import { toRlp as x } from "./index85.js";
|
|
6
|
+
import { serializeTransaction as l } from "./index86.js";
|
|
7
|
+
function T(r, e) {
|
|
8
|
+
return h(r) ? z(r) : l(r, e);
|
|
9
|
+
}
|
|
10
|
+
const E = {
|
|
11
|
+
transaction: T
|
|
36
12
|
};
|
|
13
|
+
function z(r) {
|
|
14
|
+
w(r);
|
|
15
|
+
const { sourceHash: e, data: o, from: m, gas: t, isSystemTx: u, mint: s, to: c, value: n } = r, d = [
|
|
16
|
+
e,
|
|
17
|
+
m,
|
|
18
|
+
c ?? "0x",
|
|
19
|
+
s ? i(s) : "0x",
|
|
20
|
+
n ? i(n) : "0x",
|
|
21
|
+
t ? i(t) : "0x",
|
|
22
|
+
u ? "0x1" : "0x",
|
|
23
|
+
o ?? "0x"
|
|
24
|
+
];
|
|
25
|
+
return p([
|
|
26
|
+
"0x7e",
|
|
27
|
+
x(d)
|
|
28
|
+
]);
|
|
29
|
+
}
|
|
30
|
+
function h(r) {
|
|
31
|
+
return r.type === "deposit" || typeof r.sourceHash < "u";
|
|
32
|
+
}
|
|
33
|
+
function w(r) {
|
|
34
|
+
const { from: e, to: o } = r;
|
|
35
|
+
if (e && !f(e))
|
|
36
|
+
throw new a({ address: e });
|
|
37
|
+
if (o && !f(o))
|
|
38
|
+
throw new a({ address: o });
|
|
39
|
+
}
|
|
37
40
|
export {
|
|
38
|
-
|
|
41
|
+
w as assertTransactionDeposit,
|
|
42
|
+
T as serializeTransaction,
|
|
43
|
+
E as serializers
|
|
39
44
|
};
|
package/dist/index74.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index89.cjs"),f=require("./index90.cjs"),t=require("./index91.cjs");function u(i,{size:e}){if(f.size(i)>e)throw new o.SizeOverflowError({givenSize:f.size(i),maxSize:e})}function a(i,e={}){const{signed:n}=e;e.size&&u(i,{size:e.size});const r=BigInt(i);if(!n)return r;const s=(i.length-2)/2,z=(1n<<BigInt(s)*8n-1n)-1n;return r<=z?r:r-BigInt(`0x${"f".padStart(s*2,"f")}`)-1n}function c(i,e={}){let n=i;if(e.size&&(u(n,{size:e.size}),n=t.trim(n)),t.trim(n)==="0x00")return!1;if(t.trim(n)==="0x01")return!0;throw new o.InvalidHexBooleanError(n)}function g(i,e={}){const n=a(i,e),r=Number(n);if(!Number.isSafeInteger(r))throw new o.IntegerOutOfRangeError({max:`${Number.MAX_SAFE_INTEGER}`,min:`${Number.MIN_SAFE_INTEGER}`,signed:e.signed,size:e.size,value:`${n}n`});return r}exports.assertSize=u;exports.hexToBigInt=a;exports.hexToBool=c;exports.hexToNumber=g;
|
package/dist/index74.js
CHANGED
|
@@ -1,44 +1,45 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { IntegerOutOfRangeError as s, SizeOverflowError as a, InvalidHexBooleanError as z } from "./index89.js";
|
|
2
|
+
import { size as f } from "./index90.js";
|
|
3
|
+
import { trim as t } from "./index91.js";
|
|
4
|
+
function u(r, { size: e }) {
|
|
5
|
+
if (f(r) > e)
|
|
6
|
+
throw new a({
|
|
7
|
+
givenSize: f(r),
|
|
8
|
+
maxSize: e
|
|
9
|
+
});
|
|
9
10
|
}
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
c ?? "0x",
|
|
19
|
-
s ? i(s) : "0x",
|
|
20
|
-
n ? i(n) : "0x",
|
|
21
|
-
t ? i(t) : "0x",
|
|
22
|
-
u ? "0x1" : "0x",
|
|
23
|
-
o ?? "0x"
|
|
24
|
-
];
|
|
25
|
-
return p([
|
|
26
|
-
"0x7e",
|
|
27
|
-
x(d)
|
|
28
|
-
]);
|
|
11
|
+
function g(r, e = {}) {
|
|
12
|
+
const { signed: n } = e;
|
|
13
|
+
e.size && u(r, { size: e.size });
|
|
14
|
+
const i = BigInt(r);
|
|
15
|
+
if (!n)
|
|
16
|
+
return i;
|
|
17
|
+
const o = (r.length - 2) / 2, m = (1n << BigInt(o) * 8n - 1n) - 1n;
|
|
18
|
+
return i <= m ? i : i - BigInt(`0x${"f".padStart(o * 2, "f")}`) - 1n;
|
|
29
19
|
}
|
|
30
|
-
function
|
|
31
|
-
|
|
20
|
+
function x(r, e = {}) {
|
|
21
|
+
let n = r;
|
|
22
|
+
if (e.size && (u(n, { size: e.size }), n = t(n)), t(n) === "0x00")
|
|
23
|
+
return !1;
|
|
24
|
+
if (t(n) === "0x01")
|
|
25
|
+
return !0;
|
|
26
|
+
throw new z(n);
|
|
32
27
|
}
|
|
33
|
-
function
|
|
34
|
-
const
|
|
35
|
-
if (
|
|
36
|
-
throw new
|
|
37
|
-
|
|
38
|
-
|
|
28
|
+
function E(r, e = {}) {
|
|
29
|
+
const n = g(r, e), i = Number(n);
|
|
30
|
+
if (!Number.isSafeInteger(i))
|
|
31
|
+
throw new s({
|
|
32
|
+
max: `${Number.MAX_SAFE_INTEGER}`,
|
|
33
|
+
min: `${Number.MIN_SAFE_INTEGER}`,
|
|
34
|
+
signed: e.signed,
|
|
35
|
+
size: e.size,
|
|
36
|
+
value: `${n}n`
|
|
37
|
+
});
|
|
38
|
+
return i;
|
|
39
39
|
}
|
|
40
40
|
export {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
u as assertSize,
|
|
42
|
+
g as hexToBigInt,
|
|
43
|
+
x as hexToBool,
|
|
44
|
+
E as hexToNumber
|
|
44
45
|
};
|
package/dist/index75.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index92.cjs"),a=require("./index76.cjs");function t(e,f){const i=(e.transactions??[]).map(n=>typeof n=="string"?n:a.formatTransaction(n));return{...e,baseFeePerGas:e.baseFeePerGas?BigInt(e.baseFeePerGas):null,blobGasUsed:e.blobGasUsed?BigInt(e.blobGasUsed):void 0,difficulty:e.difficulty?BigInt(e.difficulty):void 0,excessBlobGas:e.excessBlobGas?BigInt(e.excessBlobGas):void 0,gasLimit:e.gasLimit?BigInt(e.gasLimit):void 0,gasUsed:e.gasUsed?BigInt(e.gasUsed):void 0,hash:e.hash?e.hash:null,logsBloom:e.logsBloom?e.logsBloom:null,nonce:e.nonce?e.nonce:null,number:e.number?BigInt(e.number):null,size:e.size?BigInt(e.size):void 0,timestamp:e.timestamp?BigInt(e.timestamp):void 0,transactions:i,totalDifficulty:e.totalDifficulty?BigInt(e.totalDifficulty):null}}const u=s.defineFormatter("block",t);exports.defineBlock=u;exports.formatBlock=t;
|
package/dist/index75.js
CHANGED
|
@@ -1,45 +1,27 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
if (e.size && (u(n, { size: e.size }), n = t(n)), t(n) === "0x00")
|
|
23
|
-
return !1;
|
|
24
|
-
if (t(n) === "0x01")
|
|
25
|
-
return !0;
|
|
26
|
-
throw new z(n);
|
|
27
|
-
}
|
|
28
|
-
function E(r, e = {}) {
|
|
29
|
-
const n = g(r, e), i = Number(n);
|
|
30
|
-
if (!Number.isSafeInteger(i))
|
|
31
|
-
throw new s({
|
|
32
|
-
max: `${Number.MAX_SAFE_INTEGER}`,
|
|
33
|
-
min: `${Number.MIN_SAFE_INTEGER}`,
|
|
34
|
-
signed: e.signed,
|
|
35
|
-
size: e.size,
|
|
36
|
-
value: `${n}n`
|
|
37
|
-
});
|
|
38
|
-
return i;
|
|
1
|
+
import { defineFormatter as s } from "./index92.js";
|
|
2
|
+
import { formatTransaction as t } from "./index76.js";
|
|
3
|
+
function a(e, f) {
|
|
4
|
+
const i = (e.transactions ?? []).map((n) => typeof n == "string" ? n : t(n));
|
|
5
|
+
return {
|
|
6
|
+
...e,
|
|
7
|
+
baseFeePerGas: e.baseFeePerGas ? BigInt(e.baseFeePerGas) : null,
|
|
8
|
+
blobGasUsed: e.blobGasUsed ? BigInt(e.blobGasUsed) : void 0,
|
|
9
|
+
difficulty: e.difficulty ? BigInt(e.difficulty) : void 0,
|
|
10
|
+
excessBlobGas: e.excessBlobGas ? BigInt(e.excessBlobGas) : void 0,
|
|
11
|
+
gasLimit: e.gasLimit ? BigInt(e.gasLimit) : void 0,
|
|
12
|
+
gasUsed: e.gasUsed ? BigInt(e.gasUsed) : void 0,
|
|
13
|
+
hash: e.hash ? e.hash : null,
|
|
14
|
+
logsBloom: e.logsBloom ? e.logsBloom : null,
|
|
15
|
+
nonce: e.nonce ? e.nonce : null,
|
|
16
|
+
number: e.number ? BigInt(e.number) : null,
|
|
17
|
+
size: e.size ? BigInt(e.size) : void 0,
|
|
18
|
+
timestamp: e.timestamp ? BigInt(e.timestamp) : void 0,
|
|
19
|
+
transactions: i,
|
|
20
|
+
totalDifficulty: e.totalDifficulty ? BigInt(e.totalDifficulty) : null
|
|
21
|
+
};
|
|
39
22
|
}
|
|
23
|
+
const m = /* @__PURE__ */ s("block", a);
|
|
40
24
|
export {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
x as hexToBool,
|
|
44
|
-
E as hexToNumber
|
|
25
|
+
m as defineBlock,
|
|
26
|
+
a as formatBlock
|
|
45
27
|
};
|
package/dist/index76.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 d=require("./index74.cjs"),n=require("./index92.cjs"),u={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844","0x4":"eip7702"};function l(e,i){const r={...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,chainId:e.chainId?d.hexToNumber(e.chainId):void 0,gas:e.gas?BigInt(e.gas):void 0,gasPrice:e.gasPrice?BigInt(e.gasPrice):void 0,maxFeePerBlobGas:e.maxFeePerBlobGas?BigInt(e.maxFeePerBlobGas):void 0,maxFeePerGas:e.maxFeePerGas?BigInt(e.maxFeePerGas):void 0,maxPriorityFeePerGas:e.maxPriorityFeePerGas?BigInt(e.maxPriorityFeePerGas):void 0,nonce:e.nonce?d.hexToNumber(e.nonce):void 0,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,type:e.type?u[e.type]:void 0,typeHex:e.type?e.type:void 0,value:e.value?BigInt(e.value):void 0,v:e.v?BigInt(e.v):void 0};return e.authorizationList&&(r.authorizationList=f(e.authorizationList)),r.yParity=(()=>{if(e.yParity)return Number(e.yParity);if(typeof r.v=="bigint"){if(r.v===0n||r.v===27n)return 0;if(r.v===1n||r.v===28n)return 1;if(r.v>=35n)return r.v%2n===0n?1:0}})(),r.type==="legacy"&&(delete r.accessList,delete r.maxFeePerBlobGas,delete r.maxFeePerGas,delete r.maxPriorityFeePerGas,delete r.yParity),r.type==="eip2930"&&(delete r.maxFeePerBlobGas,delete r.maxFeePerGas,delete r.maxPriorityFeePerGas),r.type==="eip1559"&&delete r.maxFeePerBlobGas,r}const m=n.defineFormatter("transaction",l);function f(e){return e.map(i=>({address:i.address,chainId:Number(i.chainId),nonce:Number(i.nonce),r:i.r,s:i.s,yParity:Number(i.yParity)}))}exports.defineTransaction=m;exports.formatTransaction=l;exports.transactionType=u;
|
package/dist/index76.js
CHANGED
|
@@ -1,27 +1,57 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { hexToNumber as r } from "./index74.js";
|
|
2
|
+
import { defineFormatter as u } from "./index92.js";
|
|
3
|
+
const l = {
|
|
4
|
+
"0x0": "legacy",
|
|
5
|
+
"0x1": "eip2930",
|
|
6
|
+
"0x2": "eip1559",
|
|
7
|
+
"0x3": "eip4844",
|
|
8
|
+
"0x4": "eip7702"
|
|
9
|
+
};
|
|
10
|
+
function m(e, i) {
|
|
11
|
+
const d = {
|
|
6
12
|
...e,
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
nonce: e.nonce ? e.nonce :
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
13
|
+
blockHash: e.blockHash ? e.blockHash : null,
|
|
14
|
+
blockNumber: e.blockNumber ? BigInt(e.blockNumber) : null,
|
|
15
|
+
chainId: e.chainId ? r(e.chainId) : void 0,
|
|
16
|
+
gas: e.gas ? BigInt(e.gas) : void 0,
|
|
17
|
+
gasPrice: e.gasPrice ? BigInt(e.gasPrice) : void 0,
|
|
18
|
+
maxFeePerBlobGas: e.maxFeePerBlobGas ? BigInt(e.maxFeePerBlobGas) : void 0,
|
|
19
|
+
maxFeePerGas: e.maxFeePerGas ? BigInt(e.maxFeePerGas) : void 0,
|
|
20
|
+
maxPriorityFeePerGas: e.maxPriorityFeePerGas ? BigInt(e.maxPriorityFeePerGas) : void 0,
|
|
21
|
+
nonce: e.nonce ? r(e.nonce) : void 0,
|
|
22
|
+
to: e.to ? e.to : null,
|
|
23
|
+
transactionIndex: e.transactionIndex ? Number(e.transactionIndex) : null,
|
|
24
|
+
type: e.type ? l[e.type] : void 0,
|
|
25
|
+
typeHex: e.type ? e.type : void 0,
|
|
26
|
+
value: e.value ? BigInt(e.value) : void 0,
|
|
27
|
+
v: e.v ? BigInt(e.v) : void 0
|
|
21
28
|
};
|
|
29
|
+
return e.authorizationList && (d.authorizationList = f(e.authorizationList)), d.yParity = (() => {
|
|
30
|
+
if (e.yParity)
|
|
31
|
+
return Number(e.yParity);
|
|
32
|
+
if (typeof d.v == "bigint") {
|
|
33
|
+
if (d.v === 0n || d.v === 27n)
|
|
34
|
+
return 0;
|
|
35
|
+
if (d.v === 1n || d.v === 28n)
|
|
36
|
+
return 1;
|
|
37
|
+
if (d.v >= 35n)
|
|
38
|
+
return d.v % 2n === 0n ? 1 : 0;
|
|
39
|
+
}
|
|
40
|
+
})(), 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;
|
|
41
|
+
}
|
|
42
|
+
const x = /* @__PURE__ */ u("transaction", m);
|
|
43
|
+
function f(e) {
|
|
44
|
+
return e.map((i) => ({
|
|
45
|
+
address: i.address,
|
|
46
|
+
chainId: Number(i.chainId),
|
|
47
|
+
nonce: Number(i.nonce),
|
|
48
|
+
r: i.r,
|
|
49
|
+
s: i.s,
|
|
50
|
+
yParity: Number(i.yParity)
|
|
51
|
+
}));
|
|
22
52
|
}
|
|
23
|
-
const m = /* @__PURE__ */ s("block", a);
|
|
24
53
|
export {
|
|
25
|
-
|
|
26
|
-
|
|
54
|
+
x as defineTransaction,
|
|
55
|
+
m as formatTransaction,
|
|
56
|
+
l as transactionType
|
|
27
57
|
};
|
package/dist/index77.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("./index74.cjs"),o=require("./index92.cjs"),b=require("./index93.cjs"),f=require("./index76.cjs"),l={"0x0":"reverted","0x1":"success"};function u(e,m){const s={...e,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,contractAddress:e.contractAddress?e.contractAddress:null,cumulativeGasUsed:e.cumulativeGasUsed?BigInt(e.cumulativeGasUsed):null,effectiveGasPrice:e.effectiveGasPrice?BigInt(e.effectiveGasPrice):null,gasUsed:e.gasUsed?BigInt(e.gasUsed):null,logs:e.logs?e.logs.map(r=>b.formatLog(r)):null,to:e.to?e.to:null,transactionIndex:e.transactionIndex?d.hexToNumber(e.transactionIndex):null,status:e.status?l[e.status]:null,type:e.type?f.transactionType[e.type]||e.type:null};return e.blobGasPrice&&(s.blobGasPrice=BigInt(e.blobGasPrice)),e.blobGasUsed&&(s.blobGasUsed=BigInt(e.blobGasUsed)),s}const g=o.defineFormatter("transactionReceipt",u);exports.defineTransactionReceipt=g;exports.formatTransactionReceipt=u;exports.receiptStatuses=l;
|