@gardenfi/utils 2.0.4 → 2.0.6
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/index.cjs +1 -1
- package/dist/index.js +33 -24
- package/dist/index10.cjs +1 -1
- package/dist/index10.js +24 -32
- package/dist/index100.cjs +1 -0
- package/dist/index100.js +130 -0
- package/dist/index101.cjs +1 -0
- package/dist/index101.js +115 -0
- package/dist/index102.cjs +1 -0
- package/dist/index102.js +81 -0
- package/dist/index103.cjs +1 -0
- package/dist/index103.js +4 -0
- package/dist/index104.cjs +1 -0
- package/dist/index104.js +20 -0
- package/dist/index105.cjs +1 -0
- package/dist/index105.js +21 -0
- package/dist/index106.cjs +1 -0
- package/dist/index106.js +19 -0
- package/dist/index107.cjs +1 -0
- package/dist/index107.js +226 -0
- package/dist/index108.cjs +2 -0
- package/dist/index108.js +5 -0
- package/dist/index109.cjs +1 -0
- package/dist/index109.js +37 -0
- package/dist/index11.cjs +1 -1
- package/dist/index11.js +136 -14
- package/dist/index110.cjs +1 -0
- package/dist/index110.js +21 -0
- package/dist/index111.cjs +1 -0
- package/dist/index111.js +72 -0
- package/dist/index112.cjs +1 -0
- package/dist/index112.js +70 -0
- package/dist/index113.cjs +1 -0
- package/dist/index113.js +4 -0
- package/dist/index114.cjs +1 -0
- package/dist/index114.js +43 -0
- package/dist/index115.cjs +1 -0
- package/dist/index115.js +646 -0
- package/dist/index116.cjs +1 -0
- package/dist/index116.js +234 -0
- package/dist/index117.cjs +1 -0
- package/dist/index117.js +175 -0
- package/dist/index12.cjs +1 -1
- package/dist/index12.js +9 -182
- package/dist/index13.cjs +1 -1
- package/dist/index13.js +2 -94
- package/dist/index14.cjs +1 -16
- package/dist/index14.js +32 -112
- package/dist/index15.cjs +1 -1
- package/dist/index15.js +18 -31
- package/dist/index16.cjs +1 -1
- package/dist/index16.js +188 -31
- package/dist/index17.cjs +1 -1
- package/dist/index17.js +93 -17
- package/dist/index18.cjs +1 -1
- package/dist/index18.js +35 -7
- package/dist/index19.cjs +1 -1
- package/dist/index19.js +31 -20
- package/dist/index20.cjs +16 -1
- package/dist/index20.js +113 -21
- package/dist/index21.cjs +1 -1
- package/dist/index21.js +31 -9
- package/dist/index22.cjs +1 -1
- package/dist/index22.js +17 -31
- package/dist/index23.cjs +1 -1
- package/dist/index23.js +7 -26
- package/dist/index24.cjs +1 -1
- package/dist/index24.js +41 -19
- package/dist/index25.cjs +1 -1
- package/dist/index25.js +19 -49
- package/dist/index26.cjs +1 -1
- package/dist/index26.js +8 -12
- package/dist/index27.cjs +1 -1
- package/dist/index27.js +30 -23
- package/dist/index28.cjs +1 -1
- package/dist/index28.js +25 -74
- package/dist/index29.cjs +2 -1
- package/dist/index29.js +62 -20
- package/dist/index3.cjs +1 -1
- package/dist/index3.js +30 -7
- package/dist/index30.cjs +1 -1
- package/dist/index30.js +51 -7
- package/dist/index31.cjs +1 -1
- package/dist/index31.js +12 -32
- package/dist/index32.cjs +1 -1
- package/dist/index32.js +24 -15
- package/dist/index33.cjs +1 -1
- package/dist/index33.js +76 -2
- package/dist/index34.cjs +1 -1
- package/dist/index34.js +23 -8
- package/dist/index35.cjs +1 -1
- package/dist/index35.js +7 -20
- package/dist/index36.cjs +1 -1
- package/dist/index36.js +32 -12
- package/dist/index37.cjs +1 -1
- package/dist/index37.js +15 -34
- package/dist/index38.cjs +1 -2
- package/dist/index38.js +2 -60
- package/dist/index39.cjs +1 -1
- package/dist/index39.js +9 -2
- package/dist/index4.cjs +1 -1
- package/dist/index4.js +2 -2
- package/dist/index40.cjs +1 -1
- package/dist/index40.js +20 -4
- package/dist/index41.cjs +1 -1
- package/dist/index41.js +12 -11
- package/dist/index42.cjs +1 -1
- package/dist/index42.js +34 -3
- package/dist/index43.cjs +2 -1
- package/dist/index43.js +58 -20
- package/dist/index44.cjs +1 -1
- package/dist/index44.js +2 -13
- package/dist/index45.cjs +1 -1
- package/dist/index45.js +5 -54
- package/dist/index46.cjs +1 -1
- package/dist/index46.js +6 -6
- package/dist/index47.cjs +1 -1
- package/dist/index47.js +4 -21
- package/dist/index48.cjs +1 -1
- package/dist/index48.js +11 -11
- package/dist/index49.cjs +5 -1
- package/dist/index49.js +56 -3
- package/dist/index50.cjs +2 -1
- package/dist/index50.js +32 -9
- package/dist/index51.cjs +1 -1
- package/dist/index51.js +5 -19
- package/dist/index52.cjs +1 -1
- package/dist/index52.js +3 -6
- package/dist/index53.cjs +1 -1
- package/dist/index53.js +21 -8
- package/dist/index54.cjs +1 -1
- package/dist/index54.js +11 -103
- package/dist/index55.cjs +1 -1
- package/dist/index55.js +51 -24
- package/dist/index56.cjs +1 -1
- package/dist/index56.js +8 -18
- package/dist/index57.cjs +1 -1
- package/dist/index57.js +20 -37
- package/dist/index58.cjs +1 -0
- package/dist/index58.js +14 -0
- package/dist/index59.cjs +1 -0
- package/dist/index59.js +11 -0
- package/dist/index60.cjs +1 -0
- package/dist/index60.js +13 -0
- package/dist/index61.cjs +1 -0
- package/dist/index61.js +14 -0
- package/dist/index62.cjs +1 -0
- package/dist/index62.js +9 -0
- package/dist/index63.cjs +1 -0
- package/dist/index63.js +16 -0
- package/dist/index64.cjs +1 -0
- package/dist/index64.js +35 -0
- package/dist/index65.cjs +1 -0
- package/dist/index65.js +17 -0
- package/dist/index66.cjs +1 -0
- package/dist/index66.js +67 -0
- package/dist/index67.cjs +1 -0
- package/dist/index67.js +30 -0
- package/dist/index68.cjs +1 -0
- package/dist/index68.js +5 -0
- package/dist/index69.cjs +1 -0
- package/dist/index69.js +6 -0
- package/dist/index7.cjs +1 -1
- package/dist/index7.js +2 -109
- package/dist/index70.cjs +1 -0
- package/dist/index70.js +16 -0
- package/dist/index71.cjs +1 -0
- package/dist/index71.js +44 -0
- package/dist/index72.cjs +1 -0
- package/dist/index72.js +8 -0
- package/dist/index73.cjs +1 -0
- package/dist/index73.js +11 -0
- package/dist/index74.cjs +1 -0
- package/dist/index74.js +106 -0
- package/dist/index75.cjs +1 -0
- package/dist/index75.js +194 -0
- package/dist/index76.cjs +1 -0
- package/dist/index76.js +21 -0
- package/dist/index77.cjs +1 -0
- package/dist/index77.js +14 -0
- package/dist/index78.cjs +1 -0
- package/dist/index78.js +22 -0
- package/dist/index79.cjs +1 -0
- package/dist/index79.js +15 -0
- package/dist/index8.cjs +1 -1
- package/dist/index8.js +95 -10
- package/dist/index80.cjs +1 -0
- package/dist/index80.js +28 -0
- package/dist/index81.cjs +1 -0
- package/dist/index81.js +9 -0
- package/dist/index82.cjs +1 -0
- package/dist/index82.js +16 -0
- package/dist/index83.cjs +1 -0
- package/dist/index83.js +18 -0
- package/dist/index84.cjs +1 -0
- package/dist/index84.js +8 -0
- package/dist/index85.cjs +1 -0
- package/dist/index85.js +16 -0
- package/dist/index86.cjs +1 -0
- package/dist/index86.js +13 -0
- package/dist/index87.cjs +1 -0
- package/dist/index87.js +19 -0
- package/dist/index88.cjs +1 -0
- package/dist/index88.js +174 -0
- package/dist/index89.cjs +1 -0
- package/dist/index89.js +41 -0
- package/dist/index9.cjs +1 -1
- package/dist/index9.js +44 -2
- package/dist/index90.cjs +1 -0
- package/dist/index90.js +11 -0
- package/dist/index91.cjs +1 -0
- package/dist/index91.js +7 -0
- package/dist/index92.cjs +1 -0
- package/dist/index92.js +13 -0
- package/dist/index93.cjs +1 -0
- package/dist/index93.js +4 -0
- package/dist/index94.cjs +1 -0
- package/dist/index94.js +107 -0
- package/dist/index95.cjs +1 -0
- package/dist/index95.js +45 -0
- package/dist/index96.cjs +1 -0
- package/dist/index96.js +23 -0
- package/dist/index97.cjs +1 -0
- package/dist/index97.js +9 -0
- package/dist/index98.cjs +1 -0
- package/dist/index98.js +7 -0
- package/dist/index99.cjs +1 -0
- package/dist/index99.js +40 -0
- package/dist/src/lib/auth/apikey/apikey.d.ts +12 -0
- package/dist/src/lib/auth/auth.types.d.ts +21 -8
- package/dist/src/lib/auth/index.d.ts +5 -1
- package/dist/src/lib/auth/passkey/passkey.d.ts +10 -0
- package/dist/src/lib/auth/passkey/passkey.types.d.ts +17 -0
- package/dist/src/lib/auth/passkey/passkeyLogin.d.ts +37 -0
- package/dist/src/lib/auth/{siwe.d.ts → siwe/siwe.d.ts} +4 -15
- package/dist/src/lib/utils.d.ts +3 -0
- package/package.json +2 -1
package/dist/index25.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=require("./index30.cjs");function i(e){const s=(e.transactions??[]).map(n=>typeof n=="string"?n:t.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:s,totalDifficulty:e.totalDifficulty?BigInt(e.totalDifficulty):null}}exports.formatBlock=i;
|
package/dist/index25.js
CHANGED
|
@@ -1,54 +1,24 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
"
|
|
4
|
-
|
|
5
|
-
"0x2": "eip1559",
|
|
6
|
-
"0x3": "eip4844",
|
|
7
|
-
"0x4": "eip7702"
|
|
8
|
-
};
|
|
9
|
-
function m(e) {
|
|
10
|
-
const d = {
|
|
1
|
+
import { formatTransaction as i } from "./index30.js";
|
|
2
|
+
function a(e) {
|
|
3
|
+
const s = (e.transactions ?? []).map((n) => typeof n == "string" ? n : i(n));
|
|
4
|
+
return {
|
|
11
5
|
...e,
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
nonce: e.nonce ?
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
v: e.v ? BigInt(e.v) : void 0
|
|
6
|
+
baseFeePerGas: e.baseFeePerGas ? BigInt(e.baseFeePerGas) : null,
|
|
7
|
+
blobGasUsed: e.blobGasUsed ? BigInt(e.blobGasUsed) : void 0,
|
|
8
|
+
difficulty: e.difficulty ? BigInt(e.difficulty) : void 0,
|
|
9
|
+
excessBlobGas: e.excessBlobGas ? BigInt(e.excessBlobGas) : void 0,
|
|
10
|
+
gasLimit: e.gasLimit ? BigInt(e.gasLimit) : void 0,
|
|
11
|
+
gasUsed: e.gasUsed ? BigInt(e.gasUsed) : void 0,
|
|
12
|
+
hash: e.hash ? e.hash : null,
|
|
13
|
+
logsBloom: e.logsBloom ? e.logsBloom : null,
|
|
14
|
+
nonce: e.nonce ? e.nonce : null,
|
|
15
|
+
number: e.number ? BigInt(e.number) : null,
|
|
16
|
+
size: e.size ? BigInt(e.size) : void 0,
|
|
17
|
+
timestamp: e.timestamp ? BigInt(e.timestamp) : void 0,
|
|
18
|
+
transactions: s,
|
|
19
|
+
totalDifficulty: e.totalDifficulty ? BigInt(e.totalDifficulty) : null
|
|
27
20
|
};
|
|
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
|
-
contractAddress: 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
|
-
}));
|
|
50
21
|
}
|
|
51
22
|
export {
|
|
52
|
-
|
|
53
|
-
r as transactionType
|
|
23
|
+
a as formatBlock
|
|
54
24
|
};
|
package/dist/index26.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("./index27.cjs"),r=e=>`blockNumber.${e}`;async function u(e,{cacheTime:c=e.cacheTime}={}){const t=await o.withCache(()=>e.request({method:"eth_blockNumber"}),{cacheKey:r(e.uid),cacheTime:c});return BigInt(t)}exports.getBlockNumber=u;
|
package/dist/index26.js
CHANGED
|
@@ -1,15 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
async function
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}, { dedupe: !0 });
|
|
9
|
-
if (!e)
|
|
10
|
-
throw new i({ hash: r });
|
|
11
|
-
return (((n = (a = (o = t.chain) == null ? void 0 : o.formatters) == null ? void 0 : a.transactionReceipt) == null ? void 0 : n.format) || c)(e);
|
|
1
|
+
import { withCache as t } from "./index27.js";
|
|
2
|
+
const r = (e) => `blockNumber.${e}`;
|
|
3
|
+
async function u(e, { cacheTime: c = e.cacheTime } = {}) {
|
|
4
|
+
const o = await t(() => e.request({
|
|
5
|
+
method: "eth_blockNumber"
|
|
6
|
+
}), { cacheKey: r(e.uid), cacheTime: c });
|
|
7
|
+
return BigInt(o);
|
|
12
8
|
}
|
|
13
9
|
export {
|
|
14
|
-
|
|
10
|
+
u as getBlockNumber
|
|
15
11
|
};
|
package/dist/index27.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=new Map,c=new Map;function p(o){const a=(s,t)=>({clear:()=>t.delete(s),get:()=>t.get(s),set:n=>t.set(s,n)}),r=a(o,i),e=a(o,c);return{clear:()=>{r.clear(),e.clear()},promise:r,response:e}}async function l(o,{cacheKey:a,cacheTime:r=Number.POSITIVE_INFINITY}){const e=p(a),s=e.response.get();if(s&&r>0&&new Date().getTime()-s.created.getTime()<r)return s.data;let t=e.promise.get();t||(t=o(),e.promise.set(t));try{const n=await t;return e.response.set({created:new Date,data:n}),n}finally{e.promise.clear()}}exports.getCache=p;exports.promiseCache=i;exports.responseCache=c;exports.withCache=l;
|
package/dist/index27.js
CHANGED
|
@@ -1,27 +1,34 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
effectiveGasPrice: l.effectiveGasPrice ? BigInt(l.effectiveGasPrice) : null,
|
|
15
|
-
gasUsed: l.gasUsed ? BigInt(l.gasUsed) : null,
|
|
16
|
-
logs: l.logs ? l.logs.map((s) => d(s)) : null,
|
|
17
|
-
to: l.to ? l.to : null,
|
|
18
|
-
transactionIndex: l.transactionIndex ? b(l.transactionIndex) : null,
|
|
19
|
-
status: l.status ? f[l.status] : null,
|
|
20
|
-
type: l.type ? m[l.type] || l.type : null
|
|
1
|
+
const i = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map();
|
|
2
|
+
function p(o) {
|
|
3
|
+
const a = (s, t) => ({
|
|
4
|
+
clear: () => t.delete(s),
|
|
5
|
+
get: () => t.get(s),
|
|
6
|
+
set: (r) => t.set(s, r)
|
|
7
|
+
}), n = a(o, i), e = a(o, c);
|
|
8
|
+
return {
|
|
9
|
+
clear: () => {
|
|
10
|
+
n.clear(), e.clear();
|
|
11
|
+
},
|
|
12
|
+
promise: n,
|
|
13
|
+
response: e
|
|
21
14
|
};
|
|
22
|
-
|
|
15
|
+
}
|
|
16
|
+
async function l(o, { cacheKey: a, cacheTime: n = Number.POSITIVE_INFINITY }) {
|
|
17
|
+
const e = p(a), s = e.response.get();
|
|
18
|
+
if (s && n > 0 && (/* @__PURE__ */ new Date()).getTime() - s.created.getTime() < n)
|
|
19
|
+
return s.data;
|
|
20
|
+
let t = e.promise.get();
|
|
21
|
+
t || (t = o(), e.promise.set(t));
|
|
22
|
+
try {
|
|
23
|
+
const r = await t;
|
|
24
|
+
return e.response.set({ created: /* @__PURE__ */ new Date(), data: r }), r;
|
|
25
|
+
} finally {
|
|
26
|
+
e.promise.clear();
|
|
27
|
+
}
|
|
23
28
|
}
|
|
24
29
|
export {
|
|
25
|
-
|
|
26
|
-
|
|
30
|
+
p as getCache,
|
|
31
|
+
i as promiseCache,
|
|
32
|
+
c as responseCache,
|
|
33
|
+
l as withCache
|
|
27
34
|
};
|
package/dist/index28.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=require("./index29.cjs"),u=require("./index24.cjs"),g=require("./index30.cjs");async function l(t,{blockHash:a,blockNumber:n,blockTag:f,hash:r,index:o}){var c,d,m;const s=f||"latest",i=n!==void 0?u.numberToHex(n):void 0;let e=null;if(r?e=await t.request({method:"eth_getTransactionByHash",params:[r]},{dedupe:!0}):a?e=await t.request({method:"eth_getTransactionByBlockHashAndIndex",params:[a,u.numberToHex(o)]},{dedupe:!0}):(i||s)&&(e=await t.request({method:"eth_getTransactionByBlockNumberAndIndex",params:[i||s,u.numberToHex(o)]},{dedupe:!!i})),!e)throw new T.TransactionNotFoundError({blockHash:a,blockNumber:n,blockTag:s,hash:r,index:o});return(((m=(d=(c=t.chain)==null?void 0:c.formatters)==null?void 0:d.transaction)==null?void 0:m.format)||g.formatTransaction)(e)}exports.getTransaction=l;
|
package/dist/index28.js
CHANGED
|
@@ -1,78 +1,29 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
return;
|
|
25
|
-
if (o - r > 1 && f)
|
|
26
|
-
for (let s = r + 1n; s < o; s++)
|
|
27
|
-
e.onBlockNumber(s, r), r = s;
|
|
28
|
-
}
|
|
29
|
-
(!r || o > r) && (e.onBlockNumber(o, r), r = o);
|
|
30
|
-
} catch (o) {
|
|
31
|
-
(a = e.onError) == null || a.call(e, o);
|
|
32
|
-
}
|
|
33
|
-
}, {
|
|
34
|
-
emitOnBegin: b,
|
|
35
|
-
interval: m
|
|
36
|
-
}));
|
|
37
|
-
})() : (() => {
|
|
38
|
-
const l = y([
|
|
39
|
-
"watchBlockNumber",
|
|
40
|
-
t.uid,
|
|
41
|
-
b,
|
|
42
|
-
f
|
|
43
|
-
]);
|
|
44
|
-
return i(l, { onBlockNumber: p, onError: n }, (e) => {
|
|
45
|
-
let a = !0, o = () => a = !1;
|
|
46
|
-
return (async () => {
|
|
47
|
-
try {
|
|
48
|
-
const s = (() => {
|
|
49
|
-
if (t.transport.type === "fallback") {
|
|
50
|
-
const c = t.transport.transports.find((u) => u.config.type === "webSocket");
|
|
51
|
-
return c ? c.value : t.transport;
|
|
52
|
-
}
|
|
53
|
-
return t.transport;
|
|
54
|
-
})(), { unsubscribe: w } = await s.subscribe({
|
|
55
|
-
params: ["newHeads"],
|
|
56
|
-
onData(c) {
|
|
57
|
-
var N;
|
|
58
|
-
if (!a)
|
|
59
|
-
return;
|
|
60
|
-
const u = h((N = c.result) == null ? void 0 : N.number);
|
|
61
|
-
e.onBlockNumber(u, r), r = u;
|
|
62
|
-
},
|
|
63
|
-
onError(c) {
|
|
64
|
-
var u;
|
|
65
|
-
(u = e.onError) == null || u.call(e, c);
|
|
66
|
-
}
|
|
67
|
-
});
|
|
68
|
-
o = w, a || o();
|
|
69
|
-
} catch (s) {
|
|
70
|
-
n == null || n(s);
|
|
71
|
-
}
|
|
72
|
-
})(), () => o();
|
|
1
|
+
import { TransactionNotFoundError as p } from "./index29.js";
|
|
2
|
+
import { numberToHex as i } from "./index24.js";
|
|
3
|
+
import { formatTransaction as T } from "./index30.js";
|
|
4
|
+
async function h(e, { blockHash: a, blockNumber: r, blockTag: c, hash: o, index: n }) {
|
|
5
|
+
var d, f, u;
|
|
6
|
+
const s = c || "latest", m = r !== void 0 ? i(r) : void 0;
|
|
7
|
+
let t = null;
|
|
8
|
+
if (o ? t = await e.request({
|
|
9
|
+
method: "eth_getTransactionByHash",
|
|
10
|
+
params: [o]
|
|
11
|
+
}, { dedupe: !0 }) : a ? t = await e.request({
|
|
12
|
+
method: "eth_getTransactionByBlockHashAndIndex",
|
|
13
|
+
params: [a, i(n)]
|
|
14
|
+
}, { dedupe: !0 }) : (m || s) && (t = await e.request({
|
|
15
|
+
method: "eth_getTransactionByBlockNumberAndIndex",
|
|
16
|
+
params: [m || s, i(n)]
|
|
17
|
+
}, { dedupe: !!m })), !t)
|
|
18
|
+
throw new p({
|
|
19
|
+
blockHash: a,
|
|
20
|
+
blockNumber: r,
|
|
21
|
+
blockTag: s,
|
|
22
|
+
hash: o,
|
|
23
|
+
index: n
|
|
73
24
|
});
|
|
74
|
-
|
|
25
|
+
return (((u = (f = (d = e.chain) == null ? void 0 : d.formatters) == null ? void 0 : f.transaction) == null ? void 0 : u.format) || T)(t);
|
|
75
26
|
}
|
|
76
27
|
export {
|
|
77
|
-
|
|
28
|
+
h as getTransaction
|
|
78
29
|
};
|
package/dist/index29.cjs
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index43.cjs");function c(t){const r=Object.entries(t).map(([a,e])=>e===void 0||e===!1?null:[a,e]).filter(Boolean),s=r.reduce((a,[e])=>Math.max(a,e.length),0);return r.map(([a,e])=>` ${`${a}:`.padEnd(s+1)} ${e}`).join(`
|
|
2
|
+
`)}class d extends o.BaseError{constructor({v:r}){super(`Invalid \`v\` value "${r}". Expected 27 or 28.`,{name:"InvalidLegacyVError"})}}class l extends o.BaseError{constructor({transaction:r}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",c(r),"}","","To infer the type, either provide:","- a `type` to the Transaction, or","- an EIP-1559 Transaction with `maxFeePerGas`, or","- an EIP-2930 Transaction with `gasPrice` & `accessList`, or","- an EIP-4844 Transaction with `blobs`, `blobVersionedHashes`, `sidecars`, or","- an EIP-7702 Transaction with `authorizationList`, or","- a Legacy Transaction with `gasPrice`"],name:"InvalidSerializableTransactionError"})}}class u extends o.BaseError{constructor({storageKey:r}){super(`Size for storage key "${r}" is invalid. Expected 32 bytes. Got ${Math.floor((r.length-2)/2)} bytes.`,{name:"InvalidStorageKeySizeError"})}}class T extends o.BaseError{constructor({blockHash:r,blockNumber:s,blockTag:a,hash:e,index:n}){let i="Transaction";a&&n!==void 0&&(i=`Transaction at block time "${a}" at index "${n}"`),r&&n!==void 0&&(i=`Transaction at block hash "${r}" at index "${n}"`),s&&n!==void 0&&(i=`Transaction at block number "${s}" at index "${n}"`),e&&(i=`Transaction with hash "${e}"`),super(`${i} could not be found.`,{name:"TransactionNotFoundError"})}}class E extends o.BaseError{constructor({hash:r}){super(`Transaction receipt with hash "${r}" could not be found. The Transaction may not be processed on a block yet.`,{name:"TransactionReceiptNotFoundError"})}}class p extends o.BaseError{constructor({hash:r}){super(`Timed out while waiting for transaction with hash "${r}" to be confirmed.`,{name:"WaitForTransactionReceiptTimeoutError"})}}exports.InvalidLegacyVError=d;exports.InvalidSerializableTransactionError=l;exports.InvalidStorageKeySizeError=u;exports.TransactionNotFoundError=T;exports.TransactionReceiptNotFoundError=E;exports.WaitForTransactionReceiptTimeoutError=p;exports.prettyPrint=c;
|
package/dist/index29.js
CHANGED
|
@@ -1,26 +1,68 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { BaseError as o } from "./index43.js";
|
|
2
|
+
function c(e) {
|
|
3
|
+
const r = Object.entries(e).map(([t, n]) => n === void 0 || n === !1 ? null : [t, n]).filter(Boolean), s = r.reduce((t, [n]) => Math.max(t, n.length), 0);
|
|
4
|
+
return r.map(([t, n]) => ` ${`${t}:`.padEnd(s + 1)} ${n}`).join(`
|
|
5
|
+
`);
|
|
6
|
+
}
|
|
7
|
+
class u extends o {
|
|
8
|
+
constructor({ v: r }) {
|
|
9
|
+
super(`Invalid \`v\` value "${r}". Expected 27 or 28.`, {
|
|
10
|
+
name: "InvalidLegacyVError"
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
class l extends o {
|
|
15
|
+
constructor({ transaction: r }) {
|
|
16
|
+
super("Cannot infer a transaction type from provided transaction.", {
|
|
17
|
+
metaMessages: [
|
|
18
|
+
"Provided Transaction:",
|
|
19
|
+
"{",
|
|
20
|
+
c(r),
|
|
21
|
+
"}",
|
|
22
|
+
"",
|
|
23
|
+
"To infer the type, either provide:",
|
|
24
|
+
"- a `type` to the Transaction, or",
|
|
25
|
+
"- an EIP-1559 Transaction with `maxFeePerGas`, or",
|
|
26
|
+
"- an EIP-2930 Transaction with `gasPrice` & `accessList`, or",
|
|
27
|
+
"- an EIP-4844 Transaction with `blobs`, `blobVersionedHashes`, `sidecars`, or",
|
|
28
|
+
"- an EIP-7702 Transaction with `authorizationList`, or",
|
|
29
|
+
"- a Legacy Transaction with `gasPrice`"
|
|
30
|
+
],
|
|
31
|
+
name: "InvalidSerializableTransactionError"
|
|
8
32
|
});
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
class T extends o {
|
|
36
|
+
constructor({ storageKey: r }) {
|
|
37
|
+
super(`Size for storage key "${r}" is invalid. Expected 32 bytes. Got ${Math.floor((r.length - 2) / 2)} bytes.`, { name: "InvalidStorageKeySizeError" });
|
|
38
|
+
}
|
|
9
39
|
}
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
40
|
+
class h extends o {
|
|
41
|
+
constructor({ blockHash: r, blockNumber: s, blockTag: t, hash: n, index: a }) {
|
|
42
|
+
let i = "Transaction";
|
|
43
|
+
t && a !== void 0 && (i = `Transaction at block time "${t}" at index "${a}"`), r && a !== void 0 && (i = `Transaction at block hash "${r}" at index "${a}"`), s && a !== void 0 && (i = `Transaction at block number "${s}" at index "${a}"`), n && (i = `Transaction with hash "${n}"`), super(`${i} could not be found.`, {
|
|
44
|
+
name: "TransactionNotFoundError"
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
class p extends o {
|
|
49
|
+
constructor({ hash: r }) {
|
|
50
|
+
super(`Transaction receipt with hash "${r}" could not be found. The Transaction may not be processed on a block yet.`, {
|
|
51
|
+
name: "TransactionReceiptNotFoundError"
|
|
52
|
+
});
|
|
53
|
+
}
|
|
18
54
|
}
|
|
19
|
-
|
|
20
|
-
|
|
55
|
+
class f extends o {
|
|
56
|
+
constructor({ hash: r }) {
|
|
57
|
+
super(`Timed out while waiting for transaction with hash "${r}" to be confirmed.`, { name: "WaitForTransactionReceiptTimeoutError" });
|
|
58
|
+
}
|
|
21
59
|
}
|
|
22
60
|
export {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
61
|
+
u as InvalidLegacyVError,
|
|
62
|
+
l as InvalidSerializableTransactionError,
|
|
63
|
+
T as InvalidStorageKeySizeError,
|
|
64
|
+
h as TransactionNotFoundError,
|
|
65
|
+
p as TransactionReceiptNotFoundError,
|
|
66
|
+
f as WaitForTransactionReceiptTimeoutError,
|
|
67
|
+
c as prettyPrint
|
|
26
68
|
};
|
package/dist/index3.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("jwt-decode"),u=t=>t.startsWith("0x")?t:`0x${t}`,l=t=>`Bearer ${t}`,h=t=>new Promise(r=>setTimeout(r,t)),T=t=>{try{return c.jwtDecode(t)}catch{return}};var s=(t=>(t.MAINNET="mainnet",t.TESTNET="testnet",t))(s||{}),a=(t=>(t.MAINNET="mainnet",t.TESTNET="testnet",t.LOCALNET="localnet",t))(a||{});const d=t=>t.startsWith("0x")?t:`0x${t}`;function w(t,r="big"){if(t=t.replace("0x",""),t.length!==64)throw new Error("Invalid hash length");const n=[];for(let e=0;e<8;e++){const o=t.slice(e*8,(e+1)*8).match(/.{2}/g);r==="little"&&o.reverse();const i=o.join("");n.push(parseInt(i,16))}return n}exports.Authorization=l;exports.Environment=a;exports.Network=s;exports.add0x=d;exports.hexToU32Array=w;exports.parseJwt=T;exports.sleep=h;exports.with0x=u;
|
package/dist/index3.js
CHANGED
|
@@ -1,9 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { jwtDecode as a } from "jwt-decode";
|
|
2
|
+
const h = (t) => t.startsWith("0x") ? t : `0x${t}`, T = (t) => `Bearer ${t}`, f = (t) => new Promise((r) => setTimeout(r, t)), p = (t) => {
|
|
3
|
+
try {
|
|
4
|
+
return a(t);
|
|
5
|
+
} catch {
|
|
6
|
+
return;
|
|
7
|
+
}
|
|
8
|
+
};
|
|
9
|
+
var c = /* @__PURE__ */ ((t) => (t.MAINNET = "mainnet", t.TESTNET = "testnet", t))(c || {}), i = /* @__PURE__ */ ((t) => (t.MAINNET = "mainnet", t.TESTNET = "testnet", t.LOCALNET = "localnet", t))(i || {});
|
|
10
|
+
const x = (t) => t.startsWith("0x") ? t : `0x${t}`;
|
|
11
|
+
function E(t, r = "big") {
|
|
12
|
+
if (t = t.replace("0x", ""), t.length !== 64)
|
|
13
|
+
throw new Error("Invalid hash length");
|
|
14
|
+
const n = [];
|
|
15
|
+
for (let e = 0; e < 8; e++) {
|
|
16
|
+
const s = t.slice(e * 8, (e + 1) * 8).match(/.{2}/g);
|
|
17
|
+
r === "little" && s.reverse();
|
|
18
|
+
const o = s.join("");
|
|
19
|
+
n.push(parseInt(o, 16));
|
|
20
|
+
}
|
|
21
|
+
return n;
|
|
22
|
+
}
|
|
3
23
|
export {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
24
|
+
T as Authorization,
|
|
25
|
+
i as Environment,
|
|
26
|
+
c as Network,
|
|
27
|
+
x as add0x,
|
|
28
|
+
E as hexToU32Array,
|
|
29
|
+
p as parseJwt,
|
|
30
|
+
f as sleep,
|
|
31
|
+
h as with0x
|
|
9
32
|
};
|
package/dist/index30.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 r=require("./index34.cjs"),i={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844","0x4":"eip7702"};function u(e){const d={...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,chainId:e.chainId?r.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?r.hexToNumber(e.nonce):void 0,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,type:e.type?i[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&&(d.authorizationList=l(e.authorizationList)),d.yParity=(()=>{if(e.yParity)return Number(e.yParity);if(typeof d.v=="bigint"){if(d.v===0n||d.v===27n)return 0;if(d.v===1n||d.v===28n)return 1;if(d.v>=35n)return d.v%2n===0n?1:0}})(),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}function l(e){return e.map(d=>({contractAddress:d.address,chainId:Number(d.chainId),nonce:Number(d.nonce),r:d.r,s:d.s,yParity:Number(d.yParity)}))}exports.formatTransaction=u;exports.transactionType=i;
|
package/dist/index30.js
CHANGED
|
@@ -1,10 +1,54 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { hexToNumber as i } from "./index34.js";
|
|
2
|
+
const r = {
|
|
3
|
+
"0x0": "legacy",
|
|
4
|
+
"0x1": "eip2930",
|
|
5
|
+
"0x2": "eip1559",
|
|
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
|
+
contractAddress: 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
|
+
}));
|
|
7
50
|
}
|
|
8
51
|
export {
|
|
9
|
-
|
|
52
|
+
m as formatTransaction,
|
|
53
|
+
r as transactionType
|
|
10
54
|
};
|
package/dist/index31.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("./index29.cjs"),i=require("./index32.cjs");async function s(t,{hash:e}){var a,n,o;const r=await t.request({method:"eth_getTransactionReceipt",params:[e]},{dedupe:!0});if(!r)throw new c.TransactionReceiptNotFoundError({hash:e});return(((o=(n=(a=t.chain)==null?void 0:a.formatters)==null?void 0:n.transactionReceipt)==null?void 0:o.format)||i.formatTransactionReceipt)(r)}exports.getTransactionReceipt=s;
|
package/dist/index31.js
CHANGED
|
@@ -1,35 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
function
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
n.length === 1 && t && t(), C();
|
|
13
|
-
}, o = s();
|
|
14
|
-
if (l.set(e, [
|
|
15
|
-
...o,
|
|
16
|
-
{ id: i, fns: f }
|
|
17
|
-
]), o && o.length > 0)
|
|
18
|
-
return r;
|
|
19
|
-
const u = {};
|
|
20
|
-
for (const n in f)
|
|
21
|
-
u[n] = (...t) => {
|
|
22
|
-
var p, g;
|
|
23
|
-
const c = s();
|
|
24
|
-
if (c.length !== 0)
|
|
25
|
-
for (const k of c)
|
|
26
|
-
(g = (p = k.fns)[n]) == null || g.call(p, ...t);
|
|
27
|
-
};
|
|
28
|
-
const a = w(u);
|
|
29
|
-
return typeof a == "function" && h.set(e, a), r;
|
|
1
|
+
import { TransactionReceiptNotFoundError as i } from "./index29.js";
|
|
2
|
+
import { formatTransactionReceipt as c } from "./index32.js";
|
|
3
|
+
async function f(t, { hash: r }) {
|
|
4
|
+
var o, a, n;
|
|
5
|
+
const e = await t.request({
|
|
6
|
+
method: "eth_getTransactionReceipt",
|
|
7
|
+
params: [r]
|
|
8
|
+
}, { dedupe: !0 });
|
|
9
|
+
if (!e)
|
|
10
|
+
throw new i({ hash: r });
|
|
11
|
+
return (((n = (a = (o = t.chain) == null ? void 0 : o.formatters) == null ? void 0 : a.transactionReceipt) == null ? void 0 : n.format) || c)(e);
|
|
30
12
|
}
|
|
31
13
|
export {
|
|
32
|
-
|
|
33
|
-
l as listenersCache,
|
|
34
|
-
y as observe
|
|
14
|
+
f as getTransactionReceipt
|
|
35
15
|
};
|
package/dist/index32.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("./index34.cjs"),d=require("./index48.cjs"),r=require("./index30.cjs"),u={"0x0":"reverted","0x1":"success"};function o(l){const s={...l,blockNumber:l.blockNumber?BigInt(l.blockNumber):null,contractAddress:l.contractAddress?l.contractAddress:null,cumulativeGasUsed:l.cumulativeGasUsed?BigInt(l.cumulativeGasUsed):null,effectiveGasPrice:l.effectiveGasPrice?BigInt(l.effectiveGasPrice):null,gasUsed:l.gasUsed?BigInt(l.gasUsed):null,logs:l.logs?l.logs.map(e=>d.formatLog(e)):null,to:l.to?l.to:null,transactionIndex:l.transactionIndex?b.hexToNumber(l.transactionIndex):null,status:l.status?u[l.status]:null,type:l.type?r.transactionType[l.type]||l.type:null};return l.blobGasPrice&&(s.blobGasPrice=BigInt(l.blobGasPrice)),l.blobGasUsed&&(s.blobGasUsed=BigInt(l.blobGasUsed)),s}exports.formatTransactionReceipt=o;exports.receiptStatuses=u;
|