@gardenfi/utils 2.4.0 → 2.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index107.cjs +1 -1
- package/dist/index107.js +1 -1
- package/dist/index110.cjs +1 -1
- package/dist/index110.js +1 -1
- package/dist/index111.cjs +1 -1
- package/dist/index111.js +4 -4
- package/dist/index113.cjs +1 -1
- package/dist/index113.js +1 -1
- package/dist/index114.cjs +1 -1
- package/dist/index114.js +1 -1
- package/dist/index115.cjs +1 -1
- package/dist/index115.js +1 -1
- package/dist/index116.cjs +1 -1
- package/dist/index116.js +1 -1
- package/dist/index23.cjs +1 -1
- package/dist/index23.js +6 -6
- package/dist/index233.cjs +1 -1
- package/dist/index233.js +25 -10
- package/dist/index234.cjs +1 -1
- package/dist/index234.js +13 -16
- package/dist/index235.cjs +1 -1
- package/dist/index235.js +14 -21
- package/dist/index236.cjs +1 -1
- package/dist/index236.js +5 -30
- package/dist/index237.cjs +1 -1
- package/dist/index237.js +14 -2
- package/dist/index238.cjs +1 -1
- package/dist/index238.js +9 -12
- package/dist/index239.cjs +1 -1
- package/dist/index239.js +16 -12
- package/dist/index240.cjs +1 -1
- package/dist/index240.js +10 -47
- package/dist/index241.cjs +1 -1
- package/dist/index241.js +15 -10
- package/dist/index242.cjs +1 -1
- package/dist/index242.js +22 -7
- package/dist/index243.cjs +1 -1
- package/dist/index243.js +30 -9
- package/dist/index244.cjs +1 -1
- package/dist/index244.js +2 -14
- package/dist/index245.cjs +1 -1
- package/dist/index245.js +13 -14
- package/dist/index246.cjs +1 -1
- package/dist/index246.js +12 -9
- package/dist/index247.cjs +1 -1
- package/dist/index247.js +47 -24
- package/dist/index248.cjs +1 -1
- package/dist/index248.js +11 -12
- package/dist/index249.cjs +1 -1
- package/dist/index249.js +7 -24
- package/dist/index250.cjs +1 -1
- package/dist/index250.js +8 -12
- package/dist/index251.cjs +1 -1
- package/dist/index251.js +13 -15
- package/dist/index252.cjs +1 -2
- package/dist/index252.js +11 -21
- package/dist/index253.cjs +1 -1
- package/dist/index253.js +9 -52
- package/dist/index254.cjs +1 -1
- package/dist/index254.js +24 -25
- package/dist/index255.cjs +1 -1
- package/dist/index255.js +12 -13
- package/dist/index256.cjs +1 -1
- package/dist/index256.js +24 -15
- package/dist/index257.cjs +1 -1
- package/dist/index257.js +13 -5
- package/dist/index258.cjs +1 -1
- package/dist/index258.js +15 -13
- package/dist/index259.cjs +2 -1
- package/dist/index259.js +24 -10
- package/dist/index260.cjs +1 -1
- package/dist/index260.js +52 -16
- package/dist/index280.cjs +1 -1
- package/dist/index280.js +1 -1
- package/dist/index282.cjs +1 -1
- package/dist/index282.js +1 -1
- package/dist/index287.cjs +1 -1
- package/dist/index287.js +1 -1
- package/dist/index288.cjs +1 -1
- package/dist/index288.js +139 -3
- package/dist/index289.cjs +1 -1
- package/dist/index289.js +39 -137
- package/dist/index290.cjs +1 -1
- package/dist/index290.js +72 -149
- package/dist/index291.cjs +1 -1
- package/dist/index291.js +2 -10
- package/dist/index292.cjs +1 -1
- package/dist/index292.js +3 -113
- package/dist/index293.cjs +1 -2
- package/dist/index293.js +128 -122
- package/dist/index294.cjs +1 -1
- package/dist/index294.js +153 -137
- package/dist/index295.cjs +1 -1
- package/dist/index295.js +9 -42
- package/dist/index296.cjs +1 -1
- package/dist/index296.js +107 -72
- package/dist/index297.cjs +2 -1
- package/dist/index297.js +135 -2
- package/dist/index301.cjs +1 -1
- package/dist/index301.js +2 -2
- package/dist/index302.cjs +1 -1
- package/dist/index302.js +1 -1
- package/dist/index305.cjs +1 -1
- package/dist/index305.js +1 -1
- package/dist/index306.cjs +1 -1
- package/dist/index306.js +1 -1
- package/dist/index310.cjs +1 -1
- package/dist/index310.js +2 -2
- package/dist/index311.cjs +1 -1
- package/dist/index311.js +1 -1
- package/dist/index33.cjs +1 -1
- package/dist/index33.js +1 -1
- package/dist/index39.cjs +1 -1
- package/dist/index39.js +1 -1
- package/dist/index56.cjs +1 -1
- package/dist/index56.js +2 -2
- package/dist/index57.cjs +1 -1
- package/dist/index57.js +1 -1
- package/dist/index58.cjs +1 -1
- package/dist/index58.js +2 -2
- package/dist/index59.cjs +1 -1
- package/dist/index59.js +1 -1
- package/dist/index60.cjs +1 -1
- package/dist/index60.js +2 -2
- package/dist/index61.cjs +1 -1
- package/dist/index61.js +6 -6
- package/dist/index62.cjs +1 -1
- package/dist/index62.js +2 -2
- package/dist/index63.cjs +1 -1
- package/dist/index63.js +1 -1
- package/dist/index64.cjs +1 -1
- package/dist/index64.js +1 -1
- package/dist/index65.cjs +1 -1
- package/dist/index65.js +1 -1
- package/dist/index67.cjs +1 -1
- package/dist/index67.js +4 -4
- package/dist/index76.cjs +1 -1
- package/dist/index76.js +1 -1
- package/dist/index77.cjs +1 -1
- package/dist/index77.js +1 -1
- package/dist/index82.cjs +1 -1
- package/dist/index82.js +1 -1
- package/dist/index88.cjs +1 -1
- package/dist/index88.js +3 -3
- package/dist/index89.cjs +1 -1
- package/dist/index89.js +2 -2
- package/dist/index91.cjs +1 -1
- package/dist/index91.js +1 -1
- package/dist/index92.cjs +1 -1
- package/dist/index92.js +1 -1
- package/dist/index98.cjs +1 -1
- package/dist/index98.js +1 -1
- package/package.json +1 -1
package/dist/index33.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { encodeEventTopics as l } from "./index179.js";
|
|
2
2
|
import { numberToHex as s } from "./index153.js";
|
|
3
|
-
import { createFilterRequestScope as u } from "./
|
|
3
|
+
import { createFilterRequestScope as u } from "./index249.js";
|
|
4
4
|
async function h(r, a) {
|
|
5
5
|
const { address: m, abi: n, args: i, eventName: e, fromBlock: t, strict: p, toBlock: o } = a, f = u(r, {
|
|
6
6
|
method: "eth_newFilter"
|
package/dist/index39.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=require("./index48.cjs"),g=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=require("./index48.cjs"),g=require("./index259.cjs"),q=require("./index180.cjs"),C=require("./index224.cjs"),h=require("./index32.cjs"),l=require("./index111.cjs");async function p(n,i){const{abi:c,account:r=n.account,address:o,args:e,dataSuffix:a,functionName:s,...u}=i;if(typeof r>"u")throw new g.AccountNotFoundError({docsPath:"/docs/contract/writeContract"});const t=r?w.parseAccount(r):null,d=q.encodeFunctionData({abi:c,args:e,functionName:s});try{return await h.getAction(n,l.sendTransaction,"sendTransaction")({data:`${d}${a?a.replace("0x",""):""}`,to:o,account:t,...u})}catch(f){throw C.getContractError(f,{abi:c,address:o,args:e,docsPath:"/docs/contract/writeContract",functionName:s,sender:t==null?void 0:t.address})}}exports.writeContract=p;
|
package/dist/index39.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { parseAccount as u } from "./index48.js";
|
|
2
|
-
import { AccountNotFoundError as p } from "./
|
|
2
|
+
import { AccountNotFoundError as p } from "./index259.js";
|
|
3
3
|
import { encodeFunctionData as w } from "./index180.js";
|
|
4
4
|
import { getContractError as h } from "./index224.js";
|
|
5
5
|
import { getAction as C } from "./index32.js";
|
package/dist/index56.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index22.cjs"),q=require("./index173.cjs"),R=require("./index180.cjs"),b=require("./index217.cjs"),m=require("./index165.cjs"),y=require("./index153.cjs"),C=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index22.cjs"),q=require("./index173.cjs"),R=require("./index180.cjs"),b=require("./index217.cjs"),m=require("./index165.cjs"),y=require("./index153.cjs"),C=require("./index240.cjs"),w=require("./index206.cjs"),i=require("./index156.cjs"),B=require("./index241.cjs"),T=require("./index32.cjs"),x=require("./index36.cjs");async function N(c,s){const{blockNumber:u,blockTag:v,coinType:n,name:r,gatewayUrls:g,strict:h}=s,{chain:t}=c,f=(()=>{if(s.universalResolverAddress)return s.universalResolverAddress;if(!t)throw new Error("client chain not configured. universalResolverAddress is required.");return b.getChainContractAddress({blockNumber:u,chain:t,contract:"ensUniversalResolver"})})(),d=t==null?void 0:t.ensTlds;if(d&&!d.some(e=>r.endsWith(e)))return null;try{const e=R.encodeFunctionData({abi:a.addressResolverAbi,functionName:"addr",...n!=null?{args:[i.namehash(r),BigInt(n)]}:{args:[i.namehash(r)]}}),A={address:f,abi:a.universalResolverResolveAbi,functionName:"resolve",args:[y.toHex(B.packetToBytes(r)),e,g??[w.localBatchGatewayUrl]],blockNumber:u,blockTag:v},l=await T.getAction(c,x.readContract,"readContract")(A);if(l[0]==="0x")return null;const o=q.decodeFunctionResult({abi:a.addressResolverAbi,args:n!=null?[i.namehash(r),BigInt(n)]:void 0,functionName:"addr",data:l[0]});return o==="0x"||m.trim(o)==="0x00"?null:o}catch(e){if(h)throw e;if(C.isNullUniversalResolverError(e,"resolve"))return null;throw e}}exports.getEnsAddress=N;
|
package/dist/index56.js
CHANGED
|
@@ -4,10 +4,10 @@ import { encodeFunctionData as h } from "./index180.js";
|
|
|
4
4
|
import { getChainContractAddress as b } from "./index217.js";
|
|
5
5
|
import { trim as w } from "./index165.js";
|
|
6
6
|
import { toHex as C } from "./index153.js";
|
|
7
|
-
import { isNullUniversalResolverError as y } from "./
|
|
7
|
+
import { isNullUniversalResolverError as y } from "./index240.js";
|
|
8
8
|
import { localBatchGatewayUrl as x } from "./index206.js";
|
|
9
9
|
import { namehash as i } from "./index156.js";
|
|
10
|
-
import { packetToBytes as N } from "./
|
|
10
|
+
import { packetToBytes as N } from "./index241.js";
|
|
11
11
|
import { getAction as B } from "./index32.js";
|
|
12
12
|
import { readContract as T } from "./index36.js";
|
|
13
13
|
async function J(a, n) {
|
package/dist/index57.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index242.cjs"),g=require("./index32.cjs"),l=require("./index60.cjs");async function v(t,{blockNumber:r,blockTag:a,assetGatewayUrls:n,name:s,gatewayUrls:c,strict:o,universalResolverAddress:u}){const e=await g.getAction(t,l.getEnsText,"getEnsText")({blockNumber:r,blockTag:a,key:"avatar",name:s,universalResolverAddress:u,gatewayUrls:c,strict:o});if(!e)return null;try{return await i.parseAvatarRecord(t,{record:e,gatewayUrls:n})}catch{return null}}exports.getEnsAvatar=v;
|
package/dist/index57.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { parseAvatarRecord as m } from "./
|
|
1
|
+
import { parseAvatarRecord as m } from "./index242.js";
|
|
2
2
|
import { getAction as u } from "./index32.js";
|
|
3
3
|
import { getEnsText as f } from "./index60.js";
|
|
4
4
|
async function y(t, { blockNumber: a, blockTag: e, assetGatewayUrls: n, name: o, gatewayUrls: c, strict: i, universalResolverAddress: s }) {
|
package/dist/index58.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("./index22.cjs"),C=require("./index217.cjs"),h=require("./index153.cjs"),A=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("./index22.cjs"),C=require("./index217.cjs"),h=require("./index153.cjs"),A=require("./index240.cjs"),f=require("./index241.cjs"),q=require("./index32.cjs"),w=require("./index36.cjs");async function R(r,{address:s,blockNumber:n,blockTag:i,gatewayUrls:o,strict:c,universalResolverAddress:d}){let t=d;if(!t){if(!r.chain)throw new Error("client chain not configured. universalResolverAddress is required.");t=C.getChainContractAddress({blockNumber:n,chain:r.chain,contract:"ensUniversalResolver"})}const u=`${s.toLowerCase().substring(2)}.addr.reverse`;try{const e={address:t,abi:g.universalResolverReverseAbi,functionName:"reverse",args:[h.toHex(f.packetToBytes(u))],blockNumber:n,blockTag:i},a=q.getAction(r,w.readContract,"readContract"),[l,v]=o?await a({...e,args:[...e.args,o]}):await a(e);return s.toLowerCase()!==v.toLowerCase()?null:l}catch(e){if(c)throw e;if(A.isNullUniversalResolverError(e,"reverse"))return null;throw e}}exports.getEnsName=R;
|
package/dist/index58.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { universalResolverReverseAbi as f } from "./index22.js";
|
|
2
2
|
import { getChainContractAddress as u } from "./index217.js";
|
|
3
3
|
import { toHex as h } from "./index153.js";
|
|
4
|
-
import { isNullUniversalResolverError as p } from "./
|
|
5
|
-
import { packetToBytes as C } from "./
|
|
4
|
+
import { isNullUniversalResolverError as p } from "./index240.js";
|
|
5
|
+
import { packetToBytes as C } from "./index241.js";
|
|
6
6
|
import { getAction as w } from "./index32.js";
|
|
7
7
|
import { readContract as A } from "./index36.js";
|
|
8
8
|
async function b(e, { address: t, blockNumber: s, blockTag: i, gatewayUrls: a, strict: c, universalResolverAddress: d }) {
|
package/dist/index59.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./index217.cjs"),l=require("./index153.cjs"),v=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./index217.cjs"),l=require("./index153.cjs"),v=require("./index241.cjs"),y=require("./index32.cjs"),f=require("./index36.cjs");async function g(n,t){const{blockNumber:o,blockTag:i,name:s}=t,{chain:e}=n,a=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!e)throw new Error("client chain not configured. universalResolverAddress is required.");return u.getChainContractAddress({blockNumber:o,chain:e,contract:"ensUniversalResolver"})})(),r=e==null?void 0:e.ensTlds;if(r&&!r.some(d=>s.endsWith(d)))throw new Error(`${s} is not a valid ENS TLD (${r==null?void 0:r.join(", ")}) for chain "${e.name}" (id: ${e.id}).`);const[c]=await y.getAction(n,f.readContract,"readContract")({address:a,abi:[{inputs:[{type:"bytes"}],name:"findResolver",outputs:[{type:"address"},{type:"bytes32"}],stateMutability:"view",type:"function"}],functionName:"findResolver",args:[l.toHex(v.packetToBytes(s))],blockNumber:o,blockTag:i});return c}exports.getEnsResolver=g;
|
package/dist/index59.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getChainContractAddress as l } from "./index217.js";
|
|
2
2
|
import { toHex as u } from "./index153.js";
|
|
3
|
-
import { packetToBytes as v } from "./
|
|
3
|
+
import { packetToBytes as v } from "./index241.js";
|
|
4
4
|
import { getAction as f } from "./index32.js";
|
|
5
5
|
import { readContract as m } from "./index36.js";
|
|
6
6
|
async function g(t, o) {
|
package/dist/index60.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index22.cjs"),q=require("./index173.cjs"),A=require("./index180.cjs"),R=require("./index217.cjs"),b=require("./index153.cjs"),f=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index22.cjs"),q=require("./index173.cjs"),A=require("./index180.cjs"),R=require("./index217.cjs"),b=require("./index153.cjs"),f=require("./index240.cjs"),y=require("./index206.cjs"),C=require("./index156.cjs"),x=require("./index241.cjs"),m=require("./index32.cjs"),w=require("./index36.cjs");async function T(s,r){const{blockNumber:a,blockTag:u,key:d,name:n,gatewayUrls:v,strict:g}=r,{chain:t}=s,h=(()=>{if(r.universalResolverAddress)return r.universalResolverAddress;if(!t)throw new Error("client chain not configured. universalResolverAddress is required.");return R.getChainContractAddress({blockNumber:a,chain:t,contract:"ensUniversalResolver"})})(),c=t==null?void 0:t.ensTlds;if(c&&!c.some(e=>n.endsWith(e)))return null;try{const e={address:h,abi:o.universalResolverResolveAbi,functionName:"resolve",args:[b.toHex(x.packetToBytes(n)),A.encodeFunctionData({abi:o.textResolverAbi,functionName:"text",args:[C.namehash(n),d]}),v??[y.localBatchGatewayUrl]],blockNumber:a,blockTag:u},i=await m.getAction(s,w.readContract,"readContract")(e);if(i[0]==="0x")return null;const l=q.decodeFunctionResult({abi:o.textResolverAbi,functionName:"text",data:i[0]});return l===""?null:l}catch(e){if(g)throw e;if(f.isNullUniversalResolverError(e,"resolve"))return null;throw e}}exports.getEnsText=T;
|
package/dist/index60.js
CHANGED
|
@@ -3,10 +3,10 @@ import { decodeFunctionResult as A } from "./index173.js";
|
|
|
3
3
|
import { encodeFunctionData as R } from "./index180.js";
|
|
4
4
|
import { getChainContractAddress as h } from "./index217.js";
|
|
5
5
|
import { toHex as b } from "./index153.js";
|
|
6
|
-
import { isNullUniversalResolverError as g } from "./
|
|
6
|
+
import { isNullUniversalResolverError as g } from "./index240.js";
|
|
7
7
|
import { localBatchGatewayUrl as w } from "./index206.js";
|
|
8
8
|
import { namehash as x } from "./index156.js";
|
|
9
|
-
import { packetToBytes as C } from "./
|
|
9
|
+
import { packetToBytes as C } from "./index241.js";
|
|
10
10
|
import { getAction as y } from "./index32.js";
|
|
11
11
|
import { readContract as N } from "./index36.js";
|
|
12
12
|
async function j(n, t) {
|
package/dist/index61.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const X=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const X=require("./index243.cjs"),Y=require("./index48.cjs"),z=require("./index22.cjs"),Z=require("./index244.cjs"),j=require("./index121.cjs"),A=require("./index41.cjs"),R=require("./index142.cjs"),L=require("./index130.cjs"),ee=require("./index173.cjs"),$=require("./index177.cjs"),te=require("./index180.cjs"),ae=require("./index217.cjs"),G=require("./index153.cjs"),re=require("./index245.cjs"),oe=require("./index246.cjs"),ce=require("./index187.cjs"),ne=require("./index52.cjs"),se=require("./index247.cjs"),ie=require("./index200.cjs"),M=require("./index248.cjs");async function ue(e,t){var O,P,H,T;const{account:a=e.account,authorizationList:i,batch:r=!!((O=e.batch)!=null&&O.multicall),blockNumber:h,blockTag:C="latest",accessList:k,blobs:v,blockOverrides:f,code:y,data:n,factory:b,factoryData:u,gas:x,gasPrice:w,maxFeePerBlobGas:m,maxFeePerGas:p,maxPriorityFeePerGas:g,nonce:q,to:o,value:I,stateOverride:J,...K}=t,D=a?Y.parseAccount(a):void 0;if(y&&(b||u))throw new A.BaseError("Cannot provide both `code` & `factory`/`factoryData` as parameters.");if(y&&o)throw new A.BaseError("Cannot provide both `code` & `to` as parameters.");const E=y&&n,N=b&&u&&o&&n,S=E||N,Q=E?fe({code:y,data:n}):N?be({data:n,factory:b,factoryData:u,to:o}):n;try{ie.assertRequest(t);const c=(typeof h=="bigint"?G.numberToHex(h):void 0)||C,l=f?X.toRpc(f):void 0,d=se.serializeStateOverride(J),V=(T=(H=(P=e.chain)==null?void 0:P.formatters)==null?void 0:H.transactionRequest)==null?void 0:T.format,F=(V||ce.formatTransactionRequest)({...oe.extract(K,{format:V}),from:D==null?void 0:D.address,accessList:k,authorizationList:i,blobs:v,data:Q,gas:x,gasPrice:w,maxFeePerBlobGas:m,maxFeePerGas:p,maxPriorityFeePerGas:g,nonce:q,to:S?void 0:o,value:I});if(r&&le({request:F})&&!d&&!l)try{return await de(e,{...F,blockNumber:h,blockTag:C})}catch(s){if(!(s instanceof R.ClientChainNotConfiguredError)&&!(s instanceof R.ChainDoesNotSupportContract))throw s}const U=(()=>{const s=[F,c];return d&&l?[...s,d,l]:d?[...s,d]:l?[...s,{},l]:s})(),_=await e.request({method:"eth_call",params:U});return _==="0x"?{data:void 0}:{data:_}}catch(B){const c=W(B),{offchainLookup:l,offchainLookupSignature:d}=await Promise.resolve().then(()=>require("./index204.cjs"));if(e.ccipRead!==!1&&(c==null?void 0:c.slice(0,10))===d&&o)return{data:await l(e,{data:c,to:o})};throw S&&(c==null?void 0:c.slice(0,10))==="0x101bb98d"?new L.CounterfactualDeploymentFailedError({factory:b}):re.getCallError(B,{...t,account:D,chain:e.chain})}}function le({request:e}){const{data:t,to:a,...i}=e;return!(!t||t.startsWith(Z.aggregate3Signature)||!a||Object.values(i).filter(r=>typeof r<"u").length>0)}async function de(e,t){var w;const{batchSize:a=1024,wait:i=0}=typeof((w=e.batch)==null?void 0:w.multicall)=="object"?e.batch.multicall:{},{blockNumber:r,blockTag:h="latest",data:C,multicallAddress:k,to:v}=t;let f=k;if(!f){if(!e.chain)throw new R.ClientChainNotConfiguredError;f=ae.getChainContractAddress({blockNumber:r,chain:e.chain,contract:"multicall3"})}const n=(typeof r=="bigint"?G.numberToHex(r):void 0)||h,{schedule:b}=ne.createBatchScheduler({id:`${e.uid}.${n}`,wait:i,shouldSplitBatch(m){return m.reduce((g,{data:q})=>g+(q.length-2),0)>a*2},fn:async m=>{const p=m.map(o=>({allowFailure:!0,callData:o.data,target:o.to})),g=te.encodeFunctionData({abi:z.multicall3Abi,args:[p],functionName:"aggregate3"}),q=await e.request({method:"eth_call",params:[{data:g,to:f},n]});return ee.decodeFunctionResult({abi:z.multicall3Abi,args:[p],functionName:"aggregate3",data:q||"0x"})}}),[{returnData:u,success:x}]=await b({data:C,to:v});if(!x)throw new L.RawContractError({data:u});return u==="0x"?{data:void 0}:{data:u}}function fe(e){const{code:t,data:a}=e;return $.encodeDeployData({abi:M.parseAbi(["constructor(bytes, bytes)"]),bytecode:j.deploylessCallViaBytecodeBytecode,args:[t,a]})}function be(e){const{data:t,factory:a,factoryData:i,to:r}=e;return $.encodeDeployData({abi:M.parseAbi(["constructor(address, bytes, address, bytes)"]),bytecode:j.deploylessCallViaFactoryBytecode,args:[r,t,a,i]})}function W(e){var a;if(!(e instanceof A.BaseError))return;const t=e.walk();return typeof(t==null?void 0:t.data)=="object"?(a=t.data)==null?void 0:a.data:t.data}exports.call=ue;exports.getRevertErrorData=W;
|
package/dist/index61.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { toRpc as K } from "./
|
|
1
|
+
import { toRpc as K } from "./index243.js";
|
|
2
2
|
import { parseAccount as Q } from "./index48.js";
|
|
3
3
|
import { multicall3Abi as H } from "./index22.js";
|
|
4
|
-
import { aggregate3Signature as U } from "./
|
|
4
|
+
import { aggregate3Signature as U } from "./index244.js";
|
|
5
5
|
import { deploylessCallViaBytecodeBytecode as X, deploylessCallViaFactoryBytecode as Y } from "./index121.js";
|
|
6
6
|
import { BaseError as R } from "./index41.js";
|
|
7
7
|
import { ClientChainNotConfiguredError as L, ChainDoesNotSupportContract as Z } from "./index142.js";
|
|
@@ -11,13 +11,13 @@ import { encodeDeployData as T } from "./index177.js";
|
|
|
11
11
|
import { encodeFunctionData as rt } from "./index180.js";
|
|
12
12
|
import { getChainContractAddress as ot } from "./index217.js";
|
|
13
13
|
import { numberToHex as j } from "./index153.js";
|
|
14
|
-
import { getCallError as ct } from "./
|
|
15
|
-
import { extract as nt } from "./
|
|
14
|
+
import { getCallError as ct } from "./index245.js";
|
|
15
|
+
import { extract as nt } from "./index246.js";
|
|
16
16
|
import { formatTransactionRequest as st } from "./index187.js";
|
|
17
17
|
import { createBatchScheduler as it } from "./index52.js";
|
|
18
|
-
import { serializeStateOverride as lt } from "./
|
|
18
|
+
import { serializeStateOverride as lt } from "./index247.js";
|
|
19
19
|
import { assertRequest as ut } from "./index200.js";
|
|
20
|
-
import { parseAbi as G } from "./
|
|
20
|
+
import { parseAbi as G } from "./index248.js";
|
|
21
21
|
async function zt(t, a) {
|
|
22
22
|
var E, O, P, V;
|
|
23
23
|
const { account: e = t.account, authorizationList: i, batch: r = !!((E = t.batch) != null && E.multicall), blockNumber: p, blockTag: C = "latest", accessList: x, blobs: B, blockOverrides: f, code: b, data: n, factory: m, factoryData: l, gas: F, gasPrice: k, maxFeePerBlobGas: h, maxFeePerGas: y, maxPriorityFeePerGas: g, nonce: w, to: o, value: M, stateOverride: $, ...W } = a, D = e ? Q(e) : void 0;
|
package/dist/index62.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const L=require("./index48.cjs"),R=require("./index153.cjs"),F=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const L=require("./index48.cjs"),R=require("./index153.cjs"),F=require("./index245.cjs"),H=require("./index246.cjs"),T=require("./index187.cjs"),G=require("./index200.cjs");async function N(e,s){var c,o,n;const{account:r=e.account,blockNumber:a,blockTag:b="latest",blobs:l,data:q,gas:d,gasPrice:f,maxFeePerBlobGas:g,maxFeePerGas:x,maxPriorityFeePerGas:h,to:p,value:y,...P}=s,t=r?L.parseAccount(r):void 0;try{G.assertRequest(s);const k=(typeof a=="bigint"?R.numberToHex(a):void 0)||b,i=(n=(o=(c=e.chain)==null?void 0:c.formatters)==null?void 0:o.transactionRequest)==null?void 0:n.format,A=(i||T.formatTransactionRequest)({...H.extract(P,{format:i}),from:t==null?void 0:t.address,blobs:l,data:q,gas:d,gasPrice:f,maxFeePerBlobGas:g,maxFeePerGas:x,maxPriorityFeePerGas:h,to:p,value:y}),m=await e.request({method:"eth_createAccessList",params:[A,k]});return{accessList:m.accessList,gasUsed:BigInt(m.gasUsed)}}catch(u){throw F.getCallError(u,{...s,account:t,chain:e.chain})}}exports.createAccessList=N;
|
package/dist/index62.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { parseAccount as L } from "./index48.js";
|
|
2
2
|
import { numberToHex as A } from "./index153.js";
|
|
3
|
-
import { getCallError as G } from "./
|
|
4
|
-
import { extract as H } from "./
|
|
3
|
+
import { getCallError as G } from "./index245.js";
|
|
4
|
+
import { extract as H } from "./index246.js";
|
|
5
5
|
import { formatTransactionRequest as N } from "./index187.js";
|
|
6
6
|
import { assertRequest as R } from "./index200.js";
|
|
7
7
|
async function E(t, r) {
|
package/dist/index63.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./index249.cjs");async function o(e){const r=c.createFilterRequestScope(e,{method:"eth_newBlockFilter"}),t=await e.request({method:"eth_newBlockFilter"});return{id:t,request:r(t),type:"block"}}exports.createBlockFilter=o;
|
package/dist/index63.js
CHANGED
package/dist/index64.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("./index179.cjs"),u=require("./index153.cjs"),q=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("./index179.cjs"),u=require("./index153.cjs"),q=require("./index249.cjs");async function f(o,{address:d,args:s,event:e,events:p,fromBlock:n,strict:b,toBlock:i}={}){const r=p??(e?[e]:void 0),l=q.createFilterRequestScope(o,{method:"eth_newFilter"});let t=[];r&&(t=[r.flatMap(a=>m.encodeEventTopics({abi:[a],eventName:a.name,args:s}))],e&&(t=t[0]));const c=await o.request({method:"eth_newFilter",params:[{address:d,fromBlock:typeof n=="bigint"?u.numberToHex(n):n,toBlock:typeof i=="bigint"?u.numberToHex(i):i,...t.length?{topics:t}:{}}]});return{abi:r,args:s,eventName:e?e.name:void 0,fromBlock:n,id:c,request:l(c),strict:!!b,toBlock:i,type:"event"}}exports.createEventFilter=f;
|
package/dist/index64.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { encodeEventTopics as b } from "./index179.js";
|
|
2
2
|
import { numberToHex as m } from "./index153.js";
|
|
3
|
-
import { createFilterRequestScope as h } from "./
|
|
3
|
+
import { createFilterRequestScope as h } from "./index249.js";
|
|
4
4
|
async function l(r, { address: p, args: a, event: e, events: c, fromBlock: n, strict: f, toBlock: i } = {}) {
|
|
5
5
|
const o = c ?? (e ? [e] : void 0), u = h(r, {
|
|
6
6
|
method: "eth_newFilter"
|
package/dist/index65.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("./index249.cjs");async function i(e){const n=r.createFilterRequestScope(e,{method:"eth_newPendingTransactionFilter"}),t=await e.request({method:"eth_newPendingTransactionFilter"});return{id:t,request:n(t),type:"transaction"}}exports.createPendingTransactionFilter=i;
|
package/dist/index65.js
CHANGED
package/dist/index67.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const L=require("./index48.cjs"),N=require("./index41.cjs"),_=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const L=require("./index48.cjs"),N=require("./index41.cjs"),_=require("./index250.cjs"),y=require("./index153.cjs"),I=require("./index251.cjs"),V=require("./index246.cjs"),j=require("./index187.cjs"),C=require("./index247.cjs"),M=require("./index200.cjs"),$=require("./index99.cjs"),D=require("./index69.cjs");async function J(r,n){var m,f,q;const{account:d=r.account}=n,e=d?L.parseAccount(d):void 0;try{let w=function(u){const{block:o,request:t,rpcStateOverride:s}=u;return r.request({method:"eth_estimateGas",params:s?[t,o??"latest",s]:o?[t,o]:[t]})};const{accessList:i,authorizationList:a,blobs:G,blobVersionedHashes:z,blockNumber:b,blockTag:H,data:l,gas:O,gasPrice:P,maxFeePerBlobGas:R,maxFeePerGas:T,maxPriorityFeePerGas:k,nonce:A,value:B,stateOverride:E,...c}=await $.prepareTransactionRequest(r,{...n,parameters:(e==null?void 0:e.type)==="local"?void 0:["blobVersionedHashes"]}),h=(typeof b=="bigint"?y.numberToHex(b):void 0)||H,p=C.serializeStateOverride(E),S=await(async()=>{if(c.to)return c.to;if(a&&a.length>0)return await _.recoverAuthorizationAddress({authorization:a[0]}).catch(()=>{throw new N.BaseError("`to` is required. Could not infer from `authorizationList`")})})();M.assertRequest(n);const v=(q=(f=(m=r.chain)==null?void 0:m.formatters)==null?void 0:f.transactionRequest)==null?void 0:q.format,g=(v||j.formatTransactionRequest)({...V.extract(c,{format:v}),from:e==null?void 0:e.address,accessList:i,authorizationList:a,blobs:G,blobVersionedHashes:z,data:l,gas:O,gasPrice:P,maxFeePerBlobGas:R,maxFeePerGas:T,maxPriorityFeePerGas:k,nonce:A,to:S,value:B});let x=BigInt(await w({block:h,request:g,rpcStateOverride:p}));if(a){const u=await D.getBalance(r,{address:g.from}),o=await Promise.all(a.map(async t=>{const{address:s}=t,F=await w({block:h,request:{authorizationList:void 0,data:l,from:e==null?void 0:e.address,to:s,value:y.numberToHex(u)},rpcStateOverride:p}).catch(()=>100000n);return 2n*BigInt(F)}));x+=o.reduce((t,s)=>t+s,0n)}return x}catch(i){throw I.getEstimateGasError(i,{...n,account:e,chain:r.chain})}}exports.estimateGas=J;
|
package/dist/index67.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { parseAccount as N } from "./index48.js";
|
|
2
2
|
import { BaseError as S } from "./index41.js";
|
|
3
|
-
import { recoverAuthorizationAddress as _ } from "./
|
|
3
|
+
import { recoverAuthorizationAddress as _ } from "./index250.js";
|
|
4
4
|
import { numberToHex as G } from "./index153.js";
|
|
5
|
-
import { getEstimateGasError as I } from "./
|
|
6
|
-
import { extract as V } from "./
|
|
5
|
+
import { getEstimateGasError as I } from "./index251.js";
|
|
6
|
+
import { extract as V } from "./index246.js";
|
|
7
7
|
import { formatTransactionRequest as C } from "./index187.js";
|
|
8
|
-
import { serializeStateOverride as j } from "./
|
|
8
|
+
import { serializeStateOverride as j } from "./index247.js";
|
|
9
9
|
import { assertRequest as D } from "./index200.js";
|
|
10
10
|
import { prepareTransactionRequest as J } from "./index99.js";
|
|
11
11
|
import { getBalance as K } from "./index69.js";
|
package/dist/index76.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("./index252.cjs"),d=require("./index32.cjs"),f=require("./index36.cjs");async function g(a,i){const{address:n,factory:r,factoryData:o}=i;try{const[e,t,c,s,u,m,y]=await d.getAction(a,f.readContract,"readContract")({abi:l,address:n,functionName:"eip712Domain",factory:r,factoryData:o});return{domain:{name:t,version:c,chainId:Number(s),verifyingContract:u,salt:m},extensions:y,fields:e}}catch(e){const t=e;throw t.name==="ContractFunctionExecutionError"&&t.cause.name==="ContractFunctionZeroDataError"?new p.Eip712DomainNotFoundError({address:n}):t}}const l=[{inputs:[],name:"eip712Domain",outputs:[{name:"fields",type:"bytes1"},{name:"name",type:"string"},{name:"version",type:"string"},{name:"chainId",type:"uint256"},{name:"verifyingContract",type:"address"},{name:"salt",type:"bytes32"},{name:"extensions",type:"uint256[]"}],stateMutability:"view",type:"function"}];exports.getEip712Domain=g;
|
package/dist/index76.js
CHANGED
package/dist/index77.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index153.cjs"),a=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index153.cjs"),a=require("./index253.cjs");async function y(r,{blockCount:i,blockNumber:e,blockTag:n="latest",rewardPercentiles:s}){const t=typeof e=="bigint"?o.numberToHex(e):void 0,u=await r.request({method:"eth_feeHistory",params:[o.numberToHex(i),t||n,s]},{dedupe:!!t});return a.formatFeeHistory(u)}exports.getFeeHistory=y;
|
package/dist/index77.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { numberToHex as o } from "./index153.js";
|
|
2
|
-
import { formatFeeHistory as f } from "./
|
|
2
|
+
import { formatFeeHistory as f } from "./index253.js";
|
|
3
3
|
async function u(r, { blockCount: i, blockNumber: e, blockTag: n = "latest", rewardPercentiles: s }) {
|
|
4
4
|
const t = typeof e == "bigint" ? o(e) : void 0, a = await r.request({
|
|
5
5
|
method: "eth_feeHistory",
|
package/dist/index82.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index153.cjs"),u=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index153.cjs"),u=require("./index258.cjs");async function i(o,{address:t,blockNumber:e,blockTag:r,storageKeys:n}){const a=r??"latest",c=e!==void 0?s.numberToHex(e):void 0,f=await o.request({method:"eth_getProof",params:[t,n,c||a]});return u.formatProof(f)}exports.getProof=i;
|
package/dist/index82.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { numberToHex as c } from "./index153.js";
|
|
2
|
-
import { formatProof as s } from "./
|
|
2
|
+
import { formatProof as s } from "./index258.js";
|
|
3
3
|
async function d(t, { address: e, blockNumber: o, blockTag: r, storageKeys: n }) {
|
|
4
4
|
const f = r ?? "latest", a = o !== void 0 ? c(o) : void 0, m = await t.request({
|
|
5
5
|
method: "eth_getProof",
|
package/dist/index88.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("./index243.cjs"),B=require("./index48.cjs"),D=require("./index125.cjs"),F=require("./index130.cjs"),C=require("./index146.cjs"),H=require("./index173.cjs"),A=require("./index180.cjs"),U=require("./index157.cjs"),j=require("./index153.cjs"),z=require("./index224.cjs"),I=require("./index254.cjs"),L=require("./index158.cjs"),M=require("./index160.cjs"),P=require("./index187.cjs"),V=require("./index247.cjs"),Z=require("./index200.cjs");async function _(v,x){const{blockNumber:q,blockTag:O="latest",blocks:m,returnFullTransactions:w,traceTransfers:N,validation:R}=x;try{const a=[];for(const t of m){const f=t.blockOverrides?y.toRpc(t.blockOverrides):void 0,r=t.calls.map(c=>{const e=c,o=e.account?B.parseAccount(e.account):void 0,i=e.abi?A.encodeFunctionData(e):e.data,s={...e,data:e.dataSuffix?U.concat([i||"0x",e.dataSuffix]):i,from:e.from??(o==null?void 0:o.address)};return Z.assertRequest(s),P.formatTransactionRequest(s)}),b=t.stateOverrides?V.serializeStateOverride(t.stateOverrides):void 0;a.push({blockOverrides:f,calls:r,stateOverrides:b})}const u=(typeof q=="bigint"?j.numberToHex(q):void 0)||O;return(await v.request({method:"eth_simulateV1",params:[{blockStateCalls:a,returnFullTransactions:w,traceTransfers:N,validation:R},u]})).map((t,f)=>({...L.formatBlock(t),calls:t.calls.map((r,b)=>{var g,k;const{abi:c,args:e,functionName:o,to:i}=m[f].calls[b],s=((g=r.error)==null?void 0:g.data)??r.returnData,E=BigInt(r.gasUsed),h=(k=r.logs)==null?void 0:k.map(n=>M.formatLog(n)),d=r.status==="0x1"?"success":"failure",S=c&&d==="success"&&s!=="0x"?H.decodeFunctionResult({abi:c,data:s,functionName:o}):null,T=(()=>{var p;if(d==="success")return;let n;if(((p=r.error)==null?void 0:p.data)==="0x"?n=new D.AbiDecodingZeroDataError:r.error&&(n=new F.RawContractError(r.error)),!!n)return z.getContractError(n,{abi:c??[],address:i??"0x",args:e,functionName:o??"<unknown>"})})();return{data:s,gasUsed:E,logs:h,status:d,...d==="success"?{result:S}:{error:T}}})}))}catch(a){const l=a,u=I.getNodeError(l,{});throw u instanceof C.UnknownNodeError?l:u}}exports.simulateBlocks=_;
|
package/dist/index88.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { toRpc as S } from "./
|
|
1
|
+
import { toRpc as S } from "./index243.js";
|
|
2
2
|
import { parseAccount as y } from "./index48.js";
|
|
3
3
|
import { AbiDecodingZeroDataError as B } from "./index125.js";
|
|
4
4
|
import { RawContractError as C } from "./index130.js";
|
|
@@ -8,11 +8,11 @@ import { encodeFunctionData as U } from "./index180.js";
|
|
|
8
8
|
import { concat as A } from "./index157.js";
|
|
9
9
|
import { numberToHex as z } from "./index153.js";
|
|
10
10
|
import { getContractError as I } from "./index224.js";
|
|
11
|
-
import { getNodeError as L } from "./
|
|
11
|
+
import { getNodeError as L } from "./index254.js";
|
|
12
12
|
import { formatBlock as V } from "./index158.js";
|
|
13
13
|
import { formatLog as Z } from "./index160.js";
|
|
14
14
|
import { formatTransactionRequest as _ } from "./index187.js";
|
|
15
|
-
import { serializeStateOverride as j } from "./
|
|
15
|
+
import { serializeStateOverride as j } from "./index247.js";
|
|
16
16
|
import { assertRequest as G } from "./index200.js";
|
|
17
17
|
async function ir(v, w) {
|
|
18
18
|
const { blockNumber: p, blockTag: N = "latest", blocks: b, returnFullTransactions: O, traceTransfers: h, validation: E } = w;
|
package/dist/index89.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const z=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const z=require("./index255.cjs"),a=require("./index256.cjs"),K=require("./index48.cjs"),t=require("./index120.cjs"),Q=require("./index121.cjs"),W=require("./index41.cjs"),X=require("./index180.cjs"),Y=require("./index62.cjs"),Z=require("./index88.cjs"),v=require("./index185.cjs"),$="0x6080604052348015600e575f80fd5b5061016d8061001c5f395ff3fe608060405234801561000f575f80fd5b5060043610610029575f3560e01c8063f8b2cb4f1461002d575b5f80fd5b610047600480360381019061004291906100db565b61005d565b604051610054919061011e565b60405180910390f35b5f8173ffffffffffffffffffffffffffffffffffffffff16319050919050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6100aa82610081565b9050919050565b6100ba816100a0565b81146100c4575f80fd5b50565b5f813590506100d5816100b1565b92915050565b5f602082840312156100f0576100ef61007d565b5b5f6100fd848285016100c7565b91505092915050565b5f819050919050565b61011881610106565b82525050565b5f6020820190506101315f83018461010f565b9291505056fea26469706673582212203b9fe929fe995c7cf9887f0bdba8a36dd78e8b73f149b17d2d9ad7cd09d2dc6264736f6c634300081a0033";async function _(h,r){const{blockNumber:k,blockTag:C,calls:N,stateOverrides:q,traceAssetChanges:f,traceTransfers:T,validation:w}=r,n=r.account?K.parseAccount(r.account):void 0;if(f&&!n)throw new W.BaseError("`account` is required when `traceAssetChanges` is true");const B=n?z.encode(z.from("constructor(bytes, bytes)"),{bytecode:Q.deploylessCallViaBytecodeBytecode,args:[$,a.encodeData(a.from("function getBalance(address)"),[n.address])]}):void 0,c=f?await Promise.all(r.calls.map(async s=>{if(!s.data&&!s.abi)return;const{accessList:e}=await Y.createAccessList(h,{account:n.address,...s,data:s.abi?X.encodeFunctionData(s):s.data});return e.map(({address:o,storageKeys:d})=>d.length>0?o:null)})).then(s=>s.flat().filter(Boolean)):[],i=await Z.simulateBlocks(h,{blockNumber:k,blockTag:C,blocks:[...f?[{calls:[{data:B}],stateOverrides:q},{calls:c.map((s,e)=>({abi:[a.from("function balanceOf(address) returns (uint256)")],functionName:"balanceOf",args:[n.address],to:s,from:t.zeroAddress,nonce:e})),stateOverrides:[{address:t.zeroAddress,nonce:0}]}]:[],{calls:[...N,{}].map(s=>({...s,from:n==null?void 0:n.address})),stateOverrides:q},...f?[{calls:[{data:B}]},{calls:c.map((s,e)=>({abi:[a.from("function balanceOf(address) returns (uint256)")],functionName:"balanceOf",args:[n.address],to:s,from:t.zeroAddress,nonce:e})),stateOverrides:[{address:t.zeroAddress,nonce:0}]},{calls:c.map((s,e)=>({to:s,abi:[a.from("function decimals() returns (uint256)")],functionName:"decimals",from:t.zeroAddress,nonce:e})),stateOverrides:[{address:t.zeroAddress,nonce:0}]},{calls:c.map((s,e)=>({to:s,abi:[a.from("function tokenURI(uint256) returns (string)")],functionName:"tokenURI",args:[0n],from:t.zeroAddress,nonce:e})),stateOverrides:[{address:t.zeroAddress,nonce:0}]},{calls:c.map((s,e)=>({to:s,abi:[a.from("function symbol() returns (string)")],functionName:"symbol",from:t.zeroAddress,nonce:e})),stateOverrides:[{address:t.zeroAddress,nonce:0}]}]:[]],traceTransfers:T,validation:w}),P=f?i[2]:i[0],[l,u,,b,m,g,A,p]=f?i:[],{calls:I,...D}=P,F=I.slice(0,-1)??[],L=(l==null?void 0:l.calls)??[],R=(u==null?void 0:u.calls)??[],U=[...L,...R].map(s=>s.status==="success"?v.hexToBigInt(s.data):null),E=(b==null?void 0:b.calls)??[],H=(m==null?void 0:m.calls)??[],S=[...E,...H].map(s=>s.status==="success"?v.hexToBigInt(s.data):null),j=((g==null?void 0:g.calls)??[]).map(s=>s.status==="success"?s.result:null),x=((p==null?void 0:p.calls)??[]).map(s=>s.status==="success"?s.result:null),M=((A==null?void 0:A.calls)??[]).map(s=>s.status==="success"?s.result:null),y=[];for(const[s,e]of S.entries()){const o=U[s];if(typeof e!="bigint"||typeof o!="bigint")continue;const d=j[s-1],V=x[s-1],G=M[s-1],O=s===0?{address:t.ethAddress,decimals:18,symbol:"ETH"}:{address:c[s-1],decimals:G||d?Number(d??1):void 0,symbol:V??void 0};y.some(J=>J.token.address===O.address)||y.push({token:O,value:{pre:o,post:e,diff:e-o}})}return{assetChanges:y,block:D,results:F}}exports.simulateCalls=_;
|
package/dist/index89.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { encode as K, from as M } from "./
|
|
2
|
-
import { encodeData as Q, from as c } from "./
|
|
1
|
+
import { encode as K, from as M } from "./index255.js";
|
|
2
|
+
import { encodeData as Q, from as c } from "./index256.js";
|
|
3
3
|
import { parseAccount as S } from "./index48.js";
|
|
4
4
|
import { zeroAddress as f, ethAddress as W } from "./index120.js";
|
|
5
5
|
import { deploylessCallViaBytecodeBytecode as X } from "./index121.js";
|
package/dist/index91.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./index226.cjs"),y=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./index226.cjs"),y=require("./index260.cjs");async function f(e,{address:s,message:a,factory:r,factoryData:t,signature:i,...o}){const c=n.hashMessage(a);return y.verifyHash(e,{address:s,factory:r,factoryData:t,hash:c,signature:i,...o})}exports.verifyMessage=f;
|
package/dist/index91.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { hashMessage as h } from "./index226.js";
|
|
2
|
-
import { verifyHash as i } from "./
|
|
2
|
+
import { verifyHash as i } from "./index260.js";
|
|
3
3
|
async function m(r, { address: a, message: o, factory: s, factoryData: t, signature: e, ...f }) {
|
|
4
4
|
const c = h(o);
|
|
5
5
|
return i(r, {
|
package/dist/index92.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./index190.cjs"),h=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./index190.cjs"),h=require("./index260.cjs");async function p(a,e){const{address:t,factory:r,factoryData:s,signature:y,message:o,primaryType:c,types:i,domain:n,...f}=e,d=u.hashTypedData({message:o,primaryType:c,types:i,domain:n});return h.verifyHash(a,{address:t,factory:r,factoryData:s,hash:d,signature:y,...f})}exports.verifyTypedData=p;
|
package/dist/index92.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { hashTypedData as m } from "./index190.js";
|
|
2
|
-
import { verifyHash as d } from "./
|
|
2
|
+
import { verifyHash as d } from "./index260.js";
|
|
3
3
|
async function D(a, t) {
|
|
4
4
|
const { address: r, factory: e, factoryData: o, signature: s, message: y, primaryType: c, types: f, domain: i, ...n } = t, p = m({ message: y, primaryType: c, types: f, domain: i });
|
|
5
5
|
return d(a, {
|
package/dist/index98.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./index226.cjs"),f=require("./index277.cjs"),h=require("./index278.cjs"),M=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./index226.cjs"),f=require("./index277.cjs"),h=require("./index278.cjs"),M=require("./index260.cjs");async function S(a,r){const{address:i,domain:t,message:s,nonce:n,scheme:d,signature:c,time:o=new Date,...g}=r,e=f.parseSiweMessage(s);if(!e.address||!h.validateSiweMessage({address:i,domain:t,message:e,nonce:n,scheme:d,time:o}))return!1;const u=l.hashMessage(s);return M.verifyHash(a,{address:e.address,hash:u,signature:c,...g})}exports.verifySiweMessage=S;
|
package/dist/index98.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { hashMessage as g } from "./index226.js";
|
|
2
2
|
import { parseSiweMessage as l } from "./index277.js";
|
|
3
3
|
import { validateSiweMessage as p } from "./index278.js";
|
|
4
|
-
import { verifyHash as h } from "./
|
|
4
|
+
import { verifyHash as h } from "./index260.js";
|
|
5
5
|
async function S(a, r) {
|
|
6
6
|
const { address: i, domain: t, message: s, nonce: o, scheme: n, signature: d, time: m = /* @__PURE__ */ new Date(), ...f } = r, e = l(s);
|
|
7
7
|
if (!e.address || !p({
|