@gardenfi/utils 3.0.0-beta.2 → 3.0.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1 -1
- package/dist/index.js +35 -36
- package/dist/index102.cjs +1 -1
- package/dist/index102.js +4 -4
- package/dist/index104.cjs +1 -1
- package/dist/index104.js +3 -3
- package/dist/index111.cjs +1 -1
- package/dist/index111.js +2 -2
- package/dist/index112.cjs +1 -1
- package/dist/index112.js +1 -1
- 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/index132.cjs +1 -1
- package/dist/index132.js +5 -5
- package/dist/index138.cjs +1 -1
- package/dist/index138.js +33 -13
- package/dist/index139.cjs +1 -1
- package/dist/index139.js +9 -34
- package/dist/index140.cjs +1 -1
- package/dist/index140.js +60 -55
- package/dist/index141.cjs +1 -1
- package/dist/index141.js +17 -23
- package/dist/index142.cjs +1 -1
- package/dist/index142.js +106 -6
- package/dist/index143.cjs +1 -1
- package/dist/index143.js +78 -18
- package/dist/index144.cjs +1 -1
- package/dist/index144.js +9 -15
- package/dist/index145.cjs +1 -1
- package/dist/index145.js +71 -5
- package/dist/index146.cjs +2 -1
- package/dist/index146.js +3 -14
- package/dist/index147.cjs +1 -1
- package/dist/index147.js +9 -11
- package/dist/index148.cjs +1 -1
- package/dist/index148.js +13 -12
- package/dist/index149.cjs +1 -1
- package/dist/index149.js +4 -11
- package/dist/index150.cjs +1 -1
- package/dist/index150.js +12 -8
- package/dist/index151.cjs +1 -1
- package/dist/index151.js +2 -4
- package/dist/index152.cjs +1 -1
- package/dist/index152.js +32 -17
- package/dist/index153.cjs +1 -1
- package/dist/index153.js +21 -5
- package/dist/index154.cjs +1 -1
- package/dist/index154.js +5 -171
- package/dist/index155.cjs +1 -1
- package/dist/index155.js +5 -103
- package/dist/index156.cjs +1 -1
- package/dist/index156.js +5 -33
- package/dist/index157.cjs +9 -1
- package/dist/index157.js +34 -8
- package/dist/index158.cjs +1 -1
- package/dist/index158.js +3 -61
- package/dist/index159.cjs +1 -1
- package/dist/index159.js +18 -19
- package/dist/index160.cjs +1 -1
- package/dist/index160.js +19 -105
- package/dist/index161.cjs +1 -1
- package/dist/index161.js +27 -70
- package/dist/index162.cjs +1 -1
- package/dist/index162.js +6 -7
- package/dist/index163.cjs +4 -1
- package/dist/index163.js +194 -71
- package/dist/index164.cjs +1 -2
- package/dist/index164.js +28 -3
- package/dist/index165.cjs +1 -1
- package/dist/index165.js +162 -9
- package/dist/index166.cjs +1 -1
- package/dist/index166.js +127 -13
- package/dist/index167.cjs +1 -1
- package/dist/index167.js +27 -4
- package/dist/index168.cjs +1 -1
- package/dist/index168.js +56 -2
- package/dist/index169.cjs +1 -1
- package/dist/index169.js +191 -31
- package/dist/index170.cjs +1 -1
- package/dist/index170.js +4 -22
- package/dist/index171.cjs +1 -1
- package/dist/index171.js +20 -5
- package/dist/index172.cjs +1 -1
- package/dist/index172.js +3 -6
- package/dist/index173.cjs +1 -1
- package/dist/index173.js +16 -5
- package/dist/index174.cjs +1 -9
- package/dist/index174.js +11 -35
- package/dist/index175.cjs +1 -1
- package/dist/index175.js +35 -3
- package/dist/index176.cjs +1 -1
- package/dist/index176.js +3 -19
- package/dist/index177.cjs +1 -1
- package/dist/index177.js +25 -18
- package/dist/index178.cjs +1 -1
- package/dist/index178.js +8 -35
- package/dist/index179.cjs +1 -1
- package/dist/index179.js +23 -6
- package/dist/index180.cjs +1 -4
- package/dist/index180.js +28 -194
- package/dist/index181.cjs +1 -1
- package/dist/index181.js +3 -27
- package/dist/index182.cjs +1 -1
- package/dist/index182.js +6 -161
- package/dist/index183.cjs +1 -1
- package/dist/index183.js +6 -127
- package/dist/index184.cjs +1 -1
- package/dist/index184.js +32 -27
- package/dist/index185.cjs +1 -1
- package/dist/index185.js +5 -192
- package/dist/index186.cjs +1 -1
- package/dist/index186.js +38 -4
- package/dist/index187.cjs +1 -1
- package/dist/index187.js +43 -14
- package/dist/index188.cjs +1 -1
- package/dist/index188.js +33 -3
- package/dist/index189.cjs +1 -1
- package/dist/index189.js +16 -15
- package/dist/index190.cjs +1 -1
- package/dist/index190.js +40 -32
- package/dist/index191.cjs +1 -1
- package/dist/index191.js +105 -3
- package/dist/index192.cjs +1 -1
- package/dist/index192.js +3 -28
- package/dist/index193.cjs +1 -1
- package/dist/index193.js +5 -25
- package/dist/index194.cjs +1 -1
- package/dist/index194.js +3 -28
- package/dist/index195.cjs +1 -1
- package/dist/index195.js +17 -6
- package/dist/index196.cjs +1 -1
- package/dist/index196.js +5 -6
- package/dist/index197.cjs +1 -1
- package/dist/index197.js +8 -32
- package/dist/index198.cjs +1 -1
- package/dist/index198.js +104 -5
- package/dist/index199.cjs +1 -1
- package/dist/index199.js +5 -37
- package/dist/index200.cjs +1 -1
- package/dist/index200.js +6 -49
- package/dist/index201.cjs +1 -1
- package/dist/index201.js +25 -30
- package/dist/index202.cjs +1 -1
- package/dist/index202.js +34 -17
- package/dist/index203.cjs +1 -1
- package/dist/index203.js +13 -42
- package/dist/index204.cjs +1 -1
- package/dist/index204.js +74 -100
- package/dist/index205.cjs +1 -1
- package/dist/index205.js +2 -3
- package/dist/index206.cjs +1 -1
- package/dist/index206.js +17 -4
- package/dist/index207.cjs +1 -1
- package/dist/index207.js +171 -3
- package/dist/index208.cjs +1 -1
- package/dist/index208.js +17 -17
- package/dist/index209.cjs +1 -1
- package/dist/index209.js +10 -8
- package/dist/index210.cjs +1 -1
- package/dist/index210.js +25 -5
- package/dist/index211.cjs +1 -1
- package/dist/index211.js +18 -27
- package/dist/index212.cjs +1 -1
- package/dist/index212.js +15 -78
- package/dist/index213.cjs +1 -1
- package/dist/index213.js +6 -2
- package/dist/index214.cjs +1 -1
- package/dist/index214.js +13 -18
- package/dist/index215.cjs +1 -1
- package/dist/index215.js +10 -17
- package/dist/index216.cjs +1 -1
- package/dist/index216.js +16 -10
- package/dist/index217.cjs +1 -1
- package/dist/index217.js +1 -1
- package/dist/index22.cjs +1 -1
- package/dist/index22.js +8 -8
- package/dist/index220.cjs +2 -1
- package/dist/index220.js +40 -102
- package/dist/index221.cjs +1 -1
- package/dist/index221.js +2 -17
- package/dist/index222.cjs +1 -1
- package/dist/index222.js +5 -214
- package/dist/index223.cjs +1 -1
- package/dist/index223.js +8 -106
- package/dist/index224.cjs +1 -1
- package/dist/index224.js +17 -204
- package/dist/index225.cjs +1 -1
- package/dist/index225.js +8 -42
- package/dist/index226.cjs +1 -1
- package/dist/index226.js +62 -74
- package/dist/index227.cjs +1 -1
- package/dist/index227.js +66 -2
- package/dist/index228.cjs +1 -2
- package/dist/index228.js +187 -40
- package/dist/index229.cjs +1 -1
- package/dist/index229.js +29 -2
- package/dist/index230.cjs +1 -1
- package/dist/index230.js +76 -5
- package/dist/index231.cjs +1 -1
- package/dist/index231.js +39 -9
- package/dist/index232.cjs +1 -1
- package/dist/index232.js +14 -17
- package/dist/index233.cjs +1 -1
- package/dist/index233.js +13 -8
- package/dist/index234.cjs +1 -1
- package/dist/index234.js +11 -66
- package/dist/index235.cjs +1 -1
- package/dist/index235.js +11 -64
- package/dist/index236.cjs +1 -1
- package/dist/index236.js +18 -187
- package/dist/index237.cjs +1 -1
- package/dist/index237.js +106 -26
- package/dist/index238.cjs +1 -1
- package/dist/index238.js +98 -71
- package/dist/index239.cjs +1 -1
- package/dist/index239.js +6 -40
- package/dist/index240.cjs +1 -1
- package/dist/index240.js +7 -17
- package/dist/index241.cjs +1 -1
- package/dist/index241.js +25 -12
- package/dist/index242.cjs +1 -1
- package/dist/index242.js +16 -11
- package/dist/index243.cjs +1 -1
- package/dist/index243.js +212 -10
- package/dist/index244.cjs +1 -1
- package/dist/index244.js +206 -6
- package/dist/index245.cjs +1 -1
- package/dist/index245.js +43 -7
- package/dist/index246.cjs +1 -1
- package/dist/index246.js +74 -22
- package/dist/index247.cjs +1 -1
- package/dist/index247.js +2 -20
- package/dist/index25.cjs +1 -1
- package/dist/index25.js +2 -2
- package/dist/index252.cjs +1 -1
- package/dist/index252.js +68 -657
- package/dist/index253.cjs +1 -1
- package/dist/index253.js +634 -154
- package/dist/index254.cjs +1 -1
- package/dist/index254.js +176 -67
- package/dist/index26.cjs +1 -1
- package/dist/index26.js +4 -4
- package/dist/index28.cjs +1 -1
- package/dist/index28.js +1 -1
- package/dist/index3.cjs +1 -1
- package/dist/index3.js +24 -41
- package/dist/index30.cjs +1 -1
- package/dist/index30.js +6 -6
- package/dist/index35.cjs +1 -1
- package/dist/index35.js +1 -1
- package/dist/index37.cjs +1 -1
- package/dist/index37.js +8 -8
- package/dist/index38.cjs +1 -1
- package/dist/index38.js +1 -1
- package/dist/index39.cjs +1 -1
- package/dist/index39.js +1 -1
- package/dist/index40.cjs +1 -1
- package/dist/index40.js +2 -2
- package/dist/index42.cjs +1 -1
- package/dist/index42.js +2 -2
- package/dist/index43.cjs +1 -1
- package/dist/index43.js +1 -1
- package/dist/index47.cjs +1 -1
- package/dist/index47.js +4 -4
- package/dist/index48.cjs +1 -1
- package/dist/index48.js +3 -3
- package/dist/index49.cjs +1 -1
- package/dist/index49.js +3 -3
- package/dist/index51.cjs +1 -1
- package/dist/index51.js +6 -6
- package/dist/index54.cjs +1 -1
- package/dist/index54.js +1 -1
- package/dist/index58.cjs +1 -1
- package/dist/index58.js +1 -1
- package/dist/index62.cjs +1 -1
- package/dist/index62.js +2 -2
- package/dist/index63.cjs +1 -1
- package/dist/index63.js +2 -2
- package/dist/index65.cjs +1 -1
- package/dist/index65.js +2 -2
- package/dist/index67.cjs +1 -1
- package/dist/index67.js +1 -1
- package/dist/index75.cjs +1 -1
- package/dist/index75.js +4 -4
- package/dist/index78.cjs +1 -1
- package/dist/index78.js +3 -3
- package/dist/index81.cjs +1 -1
- package/dist/index81.js +2 -2
- package/dist/index90.cjs +1 -1
- package/dist/index90.js +1 -1
- package/dist/index93.cjs +1 -1
- package/dist/index93.js +1 -1
- package/dist/index95.cjs +1 -1
- package/dist/index95.js +2 -2
- package/dist/index96.cjs +1 -1
- package/dist/index96.js +1 -1
- package/dist/index97.cjs +1 -1
- package/dist/index97.js +5 -5
- package/dist/src/lib/utils.d.ts +0 -15
- package/package.json +1 -1
package/dist/index48.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { parseAccount as d } from "./index32.js";
|
|
2
2
|
import { maxUint256 as m } from "./index19.js";
|
|
3
|
-
import { InvalidAddressError as i } from "./
|
|
4
|
-
import { FeeCapTooHighError as c, TipAboveFeeCapError as f } from "./
|
|
5
|
-
import { isAddress as a } from "./
|
|
3
|
+
import { InvalidAddressError as i } from "./index150.js";
|
|
4
|
+
import { FeeCapTooHighError as c, TipAboveFeeCapError as f } from "./index163.js";
|
|
5
|
+
import { isAddress as a } from "./index174.js";
|
|
6
6
|
function A(n) {
|
|
7
7
|
const { account: s, maxFeePerGas: r, maxPriorityFeePerGas: o, to: e } = n, t = s ? d(s) : void 0;
|
|
8
8
|
if (t && !a(t.address))
|
package/dist/index49.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./index226.cjs"),c=require("./index227.cjs"),o=require("./index228.cjs");function a(t){const n=c.parseStructs(t),r=[],i=t.length;for(let e=0;e<i;e++){const s=t[e];u.isStructSignature(s)||r.push(o.parseSignature(s,n))}return r}exports.parseAbi=a;
|
package/dist/index49.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { isStructSignature as c } from "./
|
|
2
|
-
import { parseStructs as s } from "./
|
|
3
|
-
import { parseSignature as p } from "./
|
|
1
|
+
import { isStructSignature as c } from "./index226.js";
|
|
2
|
+
import { parseStructs as s } from "./index227.js";
|
|
3
|
+
import { parseSignature as p } from "./index228.js";
|
|
4
4
|
function a(t) {
|
|
5
5
|
const i = s(t), o = [], e = t.length;
|
|
6
6
|
for (let r = 0; r < e; r++) {
|
package/dist/index51.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("./index95.cjs"),v=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("./index95.cjs"),v=require("./index162.cjs"),m=require("./index168.cjs"),p=require("./index178.cjs"),E=require("./index172.cjs"),q=require("./index169.cjs"),h=require("./index148.cjs"),w=require("./index75.cjs"),b="/docs/contract/encodeEventTopics";function S(t){var l;const{abi:i,eventName:u,args:c}=t;let s=i[0];if(u){const e=w.getAbiItem({abi:i,name:u});if(!e)throw new f.AbiEventNotFoundError(u,{docsPath:b});s=e}if(s.type!=="event")throw new f.AbiEventNotFoundError(void 0,{docsPath:b});const y=h.formatAbiItem(s),A=E.toEventSelector(y);let a=[];if(c&&"inputs"in s){const e=(l=s.inputs)==null?void 0:l.filter(r=>"indexed"in r&&r.indexed),n=Array.isArray(c)?c:Object.values(c).length>0?(e==null?void 0:e.map(r=>c[r.name]))??[]:[];n.length>0&&(a=(e==null?void 0:e.map((r,o)=>Array.isArray(n[o])?n[o].map((T,g)=>d({param:r,value:n[o][g]})):typeof n[o]<"u"&&n[o]!==null?d({param:r,value:n[o]}):null))??[])}return[A,...a]}function d({param:t,value:i}){if(t.type==="string"||t.type==="bytes")return p.keccak256(m.toBytes(i));if(t.type==="tuple"||t.type.match(/^(.*)\[(\d+)?\]$/))throw new v.FilterTypeNotSupportedError(t.type);return q.encodeAbiParameters([t],[i])}exports.encodeEventTopics=S;
|
package/dist/index51.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { AbiEventNotFoundError as u } from "./index95.js";
|
|
2
|
-
import { FilterTypeNotSupportedError as b } from "./
|
|
3
|
-
import { toBytes as g } from "./
|
|
4
|
-
import { keccak256 as v } from "./
|
|
5
|
-
import { toEventSelector as h } from "./
|
|
6
|
-
import { encodeAbiParameters as w } from "./
|
|
7
|
-
import { formatAbiItem as E } from "./
|
|
2
|
+
import { FilterTypeNotSupportedError as b } from "./index162.js";
|
|
3
|
+
import { toBytes as g } from "./index168.js";
|
|
4
|
+
import { keccak256 as v } from "./index178.js";
|
|
5
|
+
import { toEventSelector as h } from "./index172.js";
|
|
6
|
+
import { encodeAbiParameters as w } from "./index169.js";
|
|
7
|
+
import { formatAbiItem as E } from "./index148.js";
|
|
8
8
|
import { getAbiItem as N } from "./index75.js";
|
|
9
9
|
const l = "/docs/contract/encodeEventTopics";
|
|
10
10
|
function $(e) {
|
package/dist/index54.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("./index95.cjs"),p=require("./index35.cjs"),e=require("./index37.cjs"),q=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("./index95.cjs"),p=require("./index35.cjs"),e=require("./index37.cjs"),q=require("./index143.cjs"),E=require("./index96.cjs"),w=3;function D(r,{abi:c,address:d,args:R,docsPath:l,functionName:o,sender:b}){const a=r instanceof e.RawContractError?r:r instanceof p.BaseError?r.walk(C=>"data"in C)||r.walk():{},{code:s,data:t,details:n,message:i,shortMessage:u}=a,g=r instanceof f.AbiDecodingZeroDataError?new e.ContractFunctionZeroDataError({functionName:o}):[w,E.InternalRpcError.code].includes(s)&&(t||n||i||u)||s===E.InvalidInputRpcError.code&&n==="execution reverted"&&t?new e.ContractFunctionRevertedError({abi:c,data:typeof t=="object"?t.data:t,functionName:o,message:a instanceof q.RpcRequestError?n:u??i}):r;return new e.ContractFunctionExecutionError(g,{abi:c,args:R,contractAddress:d,docsPath:l,functionName:o,sender:b})}exports.getContractError=D;
|
package/dist/index54.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AbiDecodingZeroDataError as m } from "./index95.js";
|
|
2
2
|
import { BaseError as C } from "./index35.js";
|
|
3
3
|
import { RawContractError as l, ContractFunctionZeroDataError as w, ContractFunctionRevertedError as g, ContractFunctionExecutionError as D } from "./index37.js";
|
|
4
|
-
import { RpcRequestError as I } from "./
|
|
4
|
+
import { RpcRequestError as I } from "./index143.js";
|
|
5
5
|
import { InternalRpcError as v, InvalidInputRpcError as x } from "./index96.js";
|
|
6
6
|
const F = 3;
|
|
7
7
|
function Z(r, { abi: e, address: E, args: d, docsPath: u, functionName: o, sender: f }) {
|
package/dist/index58.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index156.cjs"),e=require("./index35.cjs");class a extends e.BaseError{constructor(){super("`baseFeeMultiplier` must be greater than 1.",{name:"BaseFeeScalarError"})}}class t extends e.BaseError{constructor(){super("Chain does not support EIP-1559 fees.",{name:"Eip1559FeesNotSupportedError"})}}class n extends e.BaseError{constructor({maxPriorityFeePerGas:o}){super(`\`maxFeePerGas\` cannot be less than the \`maxPriorityFeePerGas\` (${s.formatGwei(o)} gwei).`,{name:"MaxFeePerGasTooLowError"})}}exports.BaseFeeScalarError=a;exports.Eip1559FeesNotSupportedError=t;exports.MaxFeePerGasTooLowError=n;
|
package/dist/index58.js
CHANGED
package/dist/index62.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index199.cjs"),s=require("./index216.cjs");async function i(e){const{authorization:r,signature:t}=e;return o.recoverAddress({hash:s.hashAuthorization(r),signature:t??r})}exports.recoverAuthorizationAddress=i;
|
package/dist/index62.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { recoverAddress as i } from "./
|
|
2
|
-
import { hashAuthorization as e } from "./
|
|
1
|
+
import { recoverAddress as i } from "./index199.js";
|
|
2
|
+
import { hashAuthorization as e } from "./index216.js";
|
|
3
3
|
async function a(o) {
|
|
4
4
|
const { authorization: r, signature: t } = o;
|
|
5
5
|
return i({
|
package/dist/index63.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index161.cjs"),i=require("./index163.cjs"),u=require("./index217.cjs");function a(e,{docsPath:o,...r}){const n=(()=>{const t=u.getNodeError(e,r);return t instanceof i.UnknownNodeError?e:t})();return new s.EstimateGasExecutionError(n,{docsPath:o,...r})}exports.getEstimateGasError=a;
|
package/dist/index63.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { EstimateGasExecutionError as i } from "./
|
|
2
|
-
import { UnknownNodeError as m } from "./
|
|
1
|
+
import { EstimateGasExecutionError as i } from "./index161.js";
|
|
2
|
+
import { UnknownNodeError as m } from "./index163.js";
|
|
3
3
|
import { getNodeError as s } from "./index217.js";
|
|
4
4
|
function a(r, { docsPath: e, ...o }) {
|
|
5
5
|
const n = (() => {
|
package/dist/index65.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("./index160.cjs"),r=require("./index149.cjs");function o(e,{size:n}){if(r.size(e)>n)throw new z.SizeOverflowError({givenSize:r.size(e),maxSize:n})}function s(e,n={}){const{signed:u}=n;n.size&&o(e,{size:n.size});const i=BigInt(e);if(!u)return i;const t=(e.length-2)/2,c=(1n<<BigInt(t)*8n-1n)-1n;return i<=c?i:i-BigInt(`0x${"f".padStart(t*2,"f")}`)-1n}function f(e,n={}){return Number(s(e,n))}exports.assertSize=o;exports.hexToBigInt=s;exports.hexToNumber=f;
|
package/dist/index65.js
CHANGED
package/dist/index67.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("./index163.cjs"),i=require("./index81.cjs"),s=require("./index217.cjs");function u(r,{docsPath:o,...e}){const t=(()=>{const n=s.getNodeError(r,e);return n instanceof c.UnknownNodeError?r:n})();return new i.TransactionExecutionError(t,{docsPath:o,...e})}exports.getTransactionError=u;
|
package/dist/index67.js
CHANGED
package/dist/index75.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("./index95.cjs"),g=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("./index95.cjs"),g=require("./index181.cjs"),p=require("./index174.cjs"),m=require("./index172.cjs"),b=require("./index170.cjs");function A(i){const{abi:o,args:n=[],name:t}=i,u=g.isHex(t,{strict:!1}),s=o.filter(e=>u?e.type==="function"?b.toFunctionSelector(e)===t:e.type==="event"?m.toEventSelector(e)===t:!1:"name"in e&&e.name===t);if(s.length===0)return;if(s.length===1)return s[0];let r;for(const e of s){if(!("inputs"in e))continue;if(!n||n.length===0){if(!e.inputs||e.inputs.length===0)return e;continue}if(!e.inputs||e.inputs.length===0||e.inputs.length!==n.length)continue;if(n.every((c,d)=>{const a="inputs"in e&&e.inputs[d];return a?f(c,a):!1})){if(r&&"inputs"in r&&r.inputs){const c=l(e.inputs,r.inputs,n);if(c)throw new y.AbiItemAmbiguityError({abiItem:e,type:c[0]},{abiItem:r,type:c[1]})}r=e}}return r||s[0]}function f(i,o){const n=typeof i,t=o.type;switch(t){case"address":return p.isAddress(i,{strict:!1});case"bool":return n==="boolean";case"function":return n==="string";case"string":return n==="string";default:return t==="tuple"&&"components"in o?Object.values(o.components).every((u,s)=>f(Object.values(i)[s],u)):/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(t)?n==="number"||n==="bigint":/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(t)?n==="string"||i instanceof Uint8Array:/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(t)?Array.isArray(i)&&i.every(u=>f(u,{...o,type:t.replace(/(\[[0-9]{0,}\])$/,"")})):!1}}function l(i,o,n){for(const t in i){const u=i[t],s=o[t];if(u.type==="tuple"&&s.type==="tuple"&&"components"in u&&"components"in s)return l(u.components,s.components,n[t]);const r=[u.type,s.type];if(r.includes("address")&&r.includes("bytes20")?!0:r.includes("address")&&r.includes("string")?p.isAddress(n[t],{strict:!1}):r.includes("address")&&r.includes("bytes")?p.isAddress(n[t],{strict:!1}):!1)return r}}exports.getAbiItem=A;exports.getAmbiguousTypes=l;exports.isArgOfType=f;
|
package/dist/index75.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { AbiItemAmbiguityError as y } from "./index95.js";
|
|
2
|
-
import { isHex as d } from "./
|
|
3
|
-
import { isAddress as f } from "./
|
|
4
|
-
import { toEventSelector as g } from "./
|
|
5
|
-
import { toFunctionSelector as b } from "./
|
|
2
|
+
import { isHex as d } from "./index181.js";
|
|
3
|
+
import { isAddress as f } from "./index174.js";
|
|
4
|
+
import { toEventSelector as g } from "./index172.js";
|
|
5
|
+
import { toFunctionSelector as b } from "./index170.js";
|
|
6
6
|
function x(s) {
|
|
7
7
|
const { abi: o, args: n = [], name: e } = s, u = d(e, { strict: !1 }), i = o.filter((t) => u ? t.type === "function" ? b(t) === e : t.type === "event" ? g(t) === e : !1 : "name" in t && t.name === e);
|
|
8
8
|
if (i.length === 0)
|
package/dist/index78.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const A=require("./index111.cjs"),m=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const A=require("./index111.cjs"),m=require("./index168.cjs"),v=require("./index178.cjs"),g=require("./index172.cjs"),d=require("./index97.cjs");function b(c){const{abi:i,args:a,logs:u,strict:f=!0}=c,r=(()=>{if(c.eventName)return Array.isArray(c.eventName)?c.eventName:[c.eventName]})();return u.map(e=>{var y;const t=i.filter(o=>o.type==="event"&&e.topics[0]===g.toEventSelector(o));if(t.length===0)return null;let s,n;for(const o of t)try{s=d.decodeEventLog({...e,abi:[o],strict:!0}),n=o;break}catch{}if(!s&&!f){n=t[0];try{s=d.decodeEventLog({...e,abi:[n],strict:!1})}catch{const o=(y=n.inputs)==null?void 0:y.some(l=>!("name"in l&&l.name));return{...e,args:o?[]:{},eventName:n.name}}}return!s||!n||r&&!r.includes(s.eventName)||!p({args:s.args,inputs:n.inputs,matchArgs:a})?null:{...s,...e}}).filter(Boolean)}function p(c){const{args:i,inputs:a,matchArgs:u}=c;if(!u)return!0;if(!i)return!1;function f(r,e,t){try{return r.type==="address"?A.isAddressEqual(e,t):r.type==="string"||r.type==="bytes"?v.keccak256(m.toBytes(e))===t:e===t}catch{return!1}}return Array.isArray(i)&&Array.isArray(u)?u.every((r,e)=>{if(r==null)return!0;const t=a[e];return t?(Array.isArray(r)?r:[r]).some(n=>f(t,n,i[e])):!1}):typeof i=="object"&&!Array.isArray(i)&&typeof u=="object"&&!Array.isArray(u)?Object.entries(u).every(([r,e])=>{if(e==null)return!0;const t=a.find(n=>n.name===r);return t?(Array.isArray(e)?e:[e]).some(n=>f(t,n,i[r])):!1}):!1}exports.parseEventLogs=b;
|
package/dist/index78.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isAddressEqual as A } from "./index111.js";
|
|
2
|
-
import { toBytes as d } from "./
|
|
3
|
-
import { keccak256 as p } from "./
|
|
4
|
-
import { toEventSelector as b } from "./
|
|
2
|
+
import { toBytes as d } from "./index168.js";
|
|
3
|
+
import { keccak256 as p } from "./index178.js";
|
|
4
|
+
import { toEventSelector as b } from "./index172.js";
|
|
5
5
|
import { decodeEventLog as l } from "./index97.js";
|
|
6
6
|
function j(f) {
|
|
7
7
|
const { abi: s, args: a, logs: u, strict: c = !0 } = f, e = (() => {
|
package/dist/index81.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("./index155.cjs"),c=require("./index156.cjs"),i=require("./index35.cjs");function d(a){const e=Object.entries(a).map(([t,r])=>r===void 0||r===!1?null:[t,r]).filter(Boolean),o=e.reduce((t,[r])=>Math.max(t,r.length),0);return e.map(([t,r])=>` ${`${t}:`.padEnd(o+1)} ${r}`).join(`
|
|
2
2
|
`)}class y extends i.BaseError{constructor({v:e}){super(`Invalid \`v\` value "${e}". Expected 27 or 28.`,{name:"InvalidLegacyVError"})}}class b extends i.BaseError{constructor({transaction:e}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",d(e),"}","","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 v extends i.BaseError{constructor({storageKey:e}){super(`Size for storage key "${e}" is invalid. Expected 32 bytes. Got ${Math.floor((e.length-2)/2)} bytes.`,{name:"InvalidStorageKeySizeError"})}}class w extends i.BaseError{constructor(e,{account:o,docsPath:t,chain:r,data:n,gas:s,gasPrice:u,maxFeePerGas:l,maxPriorityFeePerGas:f,nonce:p,to:T,value:m}){var E;const h=d({chain:r&&`${r==null?void 0:r.name} (id: ${r==null?void 0:r.id})`,from:o==null?void 0:o.address,to:T,value:typeof m<"u"&&`${g.formatEther(m)} ${((E=r==null?void 0:r.nativeCurrency)==null?void 0:E.symbol)||"ETH"}`,data:n,gas:s,gasPrice:typeof u<"u"&&`${c.formatGwei(u)} gwei`,maxFeePerGas:typeof l<"u"&&`${c.formatGwei(l)} gwei`,maxPriorityFeePerGas:typeof f<"u"&&`${c.formatGwei(f)} gwei`,nonce:p});super(e.shortMessage,{cause:e,docsPath:t,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Request Arguments:",h].filter(Boolean),name:"TransactionExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=e}}class $ extends i.BaseError{constructor({blockHash:e,blockNumber:o,blockTag:t,hash:r,index:n}){let s="Transaction";t&&n!==void 0&&(s=`Transaction at block time "${t}" at index "${n}"`),e&&n!==void 0&&(s=`Transaction at block hash "${e}" at index "${n}"`),o&&n!==void 0&&(s=`Transaction at block number "${o}" at index "${n}"`),r&&(s=`Transaction with hash "${r}"`),super(`${s} could not be found.`,{name:"TransactionNotFoundError"})}}class x extends i.BaseError{constructor({hash:e}){super(`Transaction receipt with hash "${e}" could not be found. The Transaction may not be processed on a block yet.`,{name:"TransactionReceiptNotFoundError"})}}class I extends i.BaseError{constructor({receipt:e}){super(`Transaction with hash "${e.transactionHash}" reverted.`,{metaMessages:['The receipt marked the transaction as "reverted". This could mean that the function on the contract you are trying to call threw an error.'," ","You can attempt to extract the revert reason by:","- calling the `simulateContract` or `simulateCalls` Action with the `abi` and `functionName` of the contract","- using the `call` Action with raw `data`"],name:"TransactionReceiptRevertedError"}),Object.defineProperty(this,"receipt",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.receipt=e}}class P extends i.BaseError{constructor({hash:e}){super(`Timed out while waiting for transaction with hash "${e}" to be confirmed.`,{name:"WaitForTransactionReceiptTimeoutError"})}}exports.InvalidLegacyVError=y;exports.InvalidSerializableTransactionError=b;exports.InvalidStorageKeySizeError=v;exports.TransactionExecutionError=w;exports.TransactionNotFoundError=$;exports.TransactionReceiptNotFoundError=x;exports.TransactionReceiptRevertedError=I;exports.WaitForTransactionReceiptTimeoutError=P;exports.prettyPrint=d;
|
package/dist/index81.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { formatEther as g } from "./
|
|
2
|
-
import { formatGwei as c } from "./
|
|
1
|
+
import { formatEther as g } from "./index155.js";
|
|
2
|
+
import { formatGwei as c } from "./index156.js";
|
|
3
3
|
import { BaseError as i } from "./index35.js";
|
|
4
4
|
function p(a) {
|
|
5
5
|
const e = Object.entries(a).map(([r, t]) => t === void 0 || t === !1 ? null : [r, t]).filter(Boolean), n = e.reduce((r, [t]) => Math.max(r, t.length), 0);
|
package/dist/index90.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./index194.cjs");function f(n,{delay:e=100,retryCount:o=2,shouldRetry:c=()=>!0}={}){return new Promise((s,y)=>{const a=async({count:r=0}={})=>{const w=async({error:t})=>{const i=typeof e=="function"?e({count:r,error:t}):e;i&&await u.wait(i),a({count:r+1})};try{const t=await n();s(t)}catch(t){if(r<o&&await c({count:r,error:t}))return w({error:t});y(t)}};a()})}exports.withRetry=f;
|
package/dist/index90.js
CHANGED
package/dist/index93.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./index194.cjs");function s(o,{emitOnBegin:w,initialWaitTime:t,interval:c}){let l=!0;const a=()=>l=!1;return(async()=>{let e;w&&(e=await o({unpoll:a}));const r=await(t==null?void 0:t(e))??c;await u.wait(r);const n=async()=>{l&&(await o({unpoll:a}),await u.wait(c),n())};n()})(),a}exports.poll=s;
|
package/dist/index93.js
CHANGED
package/dist/index95.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
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("./index148.cjs"),s=require("./index149.cjs"),t=require("./index35.cjs");class u extends t.BaseError{constructor({docsPath:r}){super(["A constructor was not found on the ABI.","Make sure you are using the correct ABI and that the constructor exists on it."].join(`
|
|
2
2
|
`),{docsPath:r,name:"AbiConstructorNotFoundError"})}}class c extends t.BaseError{constructor({docsPath:r}){super(["Constructor arguments were provided (`args`), but a constructor parameters (`inputs`) were not found on the ABI.","Make sure you are using the correct ABI, and that the `inputs` attribute on the constructor exists."].join(`
|
|
3
3
|
`),{docsPath:r,name:"AbiConstructorParamsNotFoundError"})}}class d extends t.BaseError{constructor({data:r,params:e,size:n}){super([`Data size of ${n} bytes is too small for given parameters.`].join(`
|
|
4
4
|
`),{metaMessages:[`Params: (${i.formatAbiParams(e,{includeName:!0})})`,`Data: ${r} (${n} bytes)`],name:"AbiDecodingDataSizeTooSmallError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=r,this.params=e,this.size=n}}class E extends t.BaseError{constructor(){super('Cannot decode zero data ("0x") with ABI parameters.',{name:"AbiDecodingZeroDataError"})}}class b extends t.BaseError{constructor({expectedLength:r,givenLength:e,type:n}){super([`ABI encoding array length mismatch for type ${n}.`,`Expected length: ${r}`,`Given length: ${e}`].join(`
|
package/dist/index95.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { formatAbiItem as i, formatAbiParams as a } from "./
|
|
2
|
-
import { size as u } from "./
|
|
1
|
+
import { formatAbiItem as i, formatAbiParams as a } from "./index148.js";
|
|
2
|
+
import { size as u } from "./index149.js";
|
|
3
3
|
import { BaseError as r } from "./index35.js";
|
|
4
4
|
class m extends r {
|
|
5
5
|
constructor({ docsPath: e }) {
|
package/dist/index96.cjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("./index35.cjs"),k=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("./index35.cjs"),k=require("./index143.cjs"),D=-1;class r extends S.BaseError{constructor(e,{code:o,docsPath:T,metaMessages:N,name:q,shortMessage:C}){super(C,{cause:e,docsPath:T,metaMessages:N||(e==null?void 0:e.metaMessages),name:q||"RpcError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=q||e.name,this.code=e instanceof k.RpcRequestError?e.code:o??D}}class t extends r{constructor(e,o){super(e,o),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=o.data}}class s extends r{constructor(e){super(e,{code:s.code,name:"ParseRpcError",shortMessage:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."})}}Object.defineProperty(s,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32700});class c extends r{constructor(e){super(e,{code:c.code,name:"InvalidRequestRpcError",shortMessage:"JSON is not a valid request object."})}}Object.defineProperty(c,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32600});class n extends r{constructor(e,{method:o}={}){super(e,{code:n.code,name:"MethodNotFoundRpcError",shortMessage:`The method${o?` "${o}"`:""} does not exist / is not available.`})}}Object.defineProperty(n,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32601});class a extends r{constructor(e){super(e,{code:a.code,name:"InvalidParamsRpcError",shortMessage:["Invalid parameters were provided to the RPC method.","Double check you have provided the correct parameters."].join(`
|
|
2
2
|
`)})}}Object.defineProperty(a,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32602});class u extends r{constructor(e){super(e,{code:u.code,name:"InternalRpcError",shortMessage:"An internal error was received."})}}Object.defineProperty(u,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32603});class d extends r{constructor(e){super(e,{code:d.code,name:"InvalidInputRpcError",shortMessage:["Missing or invalid parameters.","Double check you have provided the correct parameters."].join(`
|
|
3
3
|
`)})}}Object.defineProperty(d,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32e3});class i extends r{constructor(e){super(e,{code:i.code,name:"ResourceNotFoundRpcError",shortMessage:"Requested resource not found."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceNotFoundRpcError"})}}Object.defineProperty(i,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32001});class l extends r{constructor(e){super(e,{code:l.code,name:"ResourceUnavailableRpcError",shortMessage:"Requested resource not available."})}}Object.defineProperty(l,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32002});class p extends r{constructor(e){super(e,{code:p.code,name:"TransactionRejectedRpcError",shortMessage:"Transaction creation failed."})}}Object.defineProperty(p,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32003});class b extends r{constructor(e,{method:o}={}){super(e,{code:b.code,name:"MethodNotSupportedRpcError",shortMessage:`Method${o?` "${o}"`:""} is not supported.`})}}Object.defineProperty(b,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32004});class h extends r{constructor(e){super(e,{code:h.code,name:"LimitExceededRpcError",shortMessage:"Request exceeds defined limit."})}}Object.defineProperty(h,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32005});class m extends r{constructor(e){super(e,{code:m.code,name:"JsonRpcVersionUnsupportedError",shortMessage:"Version of JSON-RPC protocol is not supported."})}}Object.defineProperty(m,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32006});class g extends t{constructor(e){super(e,{code:g.code,name:"UserRejectedRequestError",shortMessage:"User rejected the request."})}}Object.defineProperty(g,"code",{enumerable:!0,configurable:!0,writable:!0,value:4001});class f extends t{constructor(e){super(e,{code:f.code,name:"UnauthorizedProviderError",shortMessage:"The requested method and/or account has not been authorized by the user."})}}Object.defineProperty(f,"code",{enumerable:!0,configurable:!0,writable:!0,value:4100});class v extends t{constructor(e,{method:o}={}){super(e,{code:v.code,name:"UnsupportedProviderMethodError",shortMessage:`The Provider does not support the requested method${o?` " ${o}"`:""}.`})}}Object.defineProperty(v,"code",{enumerable:!0,configurable:!0,writable:!0,value:4200});class E extends t{constructor(e){super(e,{code:E.code,name:"ProviderDisconnectedError",shortMessage:"The Provider is disconnected from all chains."})}}Object.defineProperty(E,"code",{enumerable:!0,configurable:!0,writable:!0,value:4900});class R extends t{constructor(e){super(e,{code:R.code,name:"ChainDisconnectedError",shortMessage:"The Provider is not connected to the requested chain."})}}Object.defineProperty(R,"code",{enumerable:!0,configurable:!0,writable:!0,value:4901});class w extends t{constructor(e){super(e,{code:w.code,name:"SwitchChainError",shortMessage:"An error occurred when attempting to switch chain."})}}Object.defineProperty(w,"code",{enumerable:!0,configurable:!0,writable:!0,value:4902});class P extends t{constructor(e){super(e,{code:P.code,name:"UnsupportedNonOptionalCapabilityError",shortMessage:"This Wallet does not support a capability that was not marked as optional."})}}Object.defineProperty(P,"code",{enumerable:!0,configurable:!0,writable:!0,value:5700});class y extends t{constructor(e){super(e,{code:y.code,name:"UnsupportedChainIdError",shortMessage:"This Wallet does not support the requested chain ID."})}}Object.defineProperty(y,"code",{enumerable:!0,configurable:!0,writable:!0,value:5710});class j extends t{constructor(e){super(e,{code:j.code,name:"DuplicateIdError",shortMessage:"There is already a bundle submitted with this ID."})}}Object.defineProperty(j,"code",{enumerable:!0,configurable:!0,writable:!0,value:5720});class M extends t{constructor(e){super(e,{code:M.code,name:"UnknownBundleIdError",shortMessage:"This bundle id is unknown / has not been submitted"})}}Object.defineProperty(M,"code",{enumerable:!0,configurable:!0,writable:!0,value:5730});class O extends t{constructor(e){super(e,{code:O.code,name:"BundleTooLargeError",shortMessage:"The call bundle is too large for the Wallet to process."})}}Object.defineProperty(O,"code",{enumerable:!0,configurable:!0,writable:!0,value:5740});class x extends t{constructor(e){super(e,{code:x.code,name:"AtomicReadyWalletRejectedUpgradeError",shortMessage:"The Wallet can support atomicity after an upgrade, but the user rejected the upgrade."})}}Object.defineProperty(x,"code",{enumerable:!0,configurable:!0,writable:!0,value:5750});class U extends t{constructor(e){super(e,{code:U.code,name:"AtomicityNotSupportedError",shortMessage:"The wallet does not support atomic execution but the request requires it."})}}Object.defineProperty(U,"code",{enumerable:!0,configurable:!0,writable:!0,value:5760});class A extends r{constructor(e){super(e,{name:"UnknownRpcError",shortMessage:"An unknown RPC error occurred."})}}exports.AtomicReadyWalletRejectedUpgradeError=x;exports.AtomicityNotSupportedError=U;exports.BundleTooLargeError=O;exports.ChainDisconnectedError=R;exports.DuplicateIdError=j;exports.InternalRpcError=u;exports.InvalidInputRpcError=d;exports.InvalidParamsRpcError=a;exports.InvalidRequestRpcError=c;exports.JsonRpcVersionUnsupportedError=m;exports.LimitExceededRpcError=h;exports.MethodNotFoundRpcError=n;exports.MethodNotSupportedRpcError=b;exports.ParseRpcError=s;exports.ProviderDisconnectedError=E;exports.ProviderRpcError=t;exports.ResourceNotFoundRpcError=i;exports.ResourceUnavailableRpcError=l;exports.RpcError=r;exports.SwitchChainError=w;exports.TransactionRejectedRpcError=p;exports.UnauthorizedProviderError=f;exports.UnknownBundleIdError=M;exports.UnknownRpcError=A;exports.UnsupportedChainIdError=y;exports.UnsupportedNonOptionalCapabilityError=P;exports.UnsupportedProviderMethodError=v;exports.UserRejectedRequestError=g;
|
package/dist/index96.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseError as C } from "./index35.js";
|
|
2
|
-
import { RpcRequestError as D } from "./
|
|
2
|
+
import { RpcRequestError as D } from "./index143.js";
|
|
3
3
|
const S = -1;
|
|
4
4
|
class r extends C {
|
|
5
5
|
constructor(e, { code: t, docsPath: U, metaMessages: N, name: I, shortMessage: k }) {
|
package/dist/index97.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index95.cjs"),A=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index95.cjs"),A=require("./index171.cjs"),D=require("./index149.cjs"),S=require("./index172.cjs"),b=require("./index165.cjs"),I=require("./index148.cjs"),p="/docs/contract/decodeEventLog";function q(n){const{abi:d,data:i,strict:v,topics:E}=n,m=v??!0,[f,...w]=E;if(!f)throw new a.AbiEventSignatureEmptyTopicsError({docsPath:p});const o=d.find(e=>e.type==="event"&&f===S.toEventSelector(I.formatAbiItem(e)));if(!(o&&"name"in o)||o.type!=="event")throw new a.AbiEventSignatureNotFoundError(f,{docsPath:p});const{name:y,inputs:r}=o,u=r==null?void 0:r.some(e=>!("name"in e&&e.name)),c=u?[]:{},g=r.map((e,t)=>[e,t]).filter(([e])=>"indexed"in e&&e.indexed);for(let e=0;e<g.length;e++){const[t,l]=g[e],h=w[e];if(!h)throw new a.DecodeLogTopicsMismatch({abiItem:o,param:t});c[u?l:t.name||l]=L({param:t,value:h})}const s=r.filter(e=>!("indexed"in e&&e.indexed));if(s.length>0){if(i&&i!=="0x")try{const e=b.decodeAbiParameters(s,i);if(e)if(u)for(let t=0;t<r.length;t++)c[t]=c[t]??e.shift();else for(let t=0;t<s.length;t++)c[s[t].name]=e[t]}catch(e){if(m)throw e instanceof a.AbiDecodingDataSizeTooSmallError||e instanceof A.PositionOutOfBoundsError?new a.DecodeLogDataMismatch({abiItem:o,data:i,params:s,size:D.size(i)}):e}else if(m)throw new a.DecodeLogDataMismatch({abiItem:o,data:"0x",params:s,size:0})}return{eventName:y,args:Object.values(c).length>0?c:void 0}}function L({param:n,value:d}){return n.type==="string"||n.type==="bytes"||n.type==="tuple"||n.type.match(/^(.*)\[(\d+)?\]$/)?d:(b.decodeAbiParameters([n],d)||[])[0]}exports.decodeEventLog=q;
|
package/dist/index97.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { AbiEventSignatureEmptyTopicsError as A, AbiEventSignatureNotFoundError as x, DecodeLogTopicsMismatch as D, AbiDecodingDataSizeTooSmallError as I, DecodeLogDataMismatch as l } from "./index95.js";
|
|
2
|
-
import { PositionOutOfBoundsError as S } from "./
|
|
3
|
-
import { size as T } from "./
|
|
4
|
-
import { toEventSelector as z } from "./
|
|
5
|
-
import { decodeAbiParameters as w } from "./
|
|
6
|
-
import { formatAbiItem as L } from "./
|
|
2
|
+
import { PositionOutOfBoundsError as S } from "./index171.js";
|
|
3
|
+
import { size as T } from "./index149.js";
|
|
4
|
+
import { toEventSelector as z } from "./index172.js";
|
|
5
|
+
import { decodeAbiParameters as w } from "./index165.js";
|
|
6
|
+
import { formatAbiItem as L } from "./index148.js";
|
|
7
7
|
const u = "/docs/contract/decodeEventLog";
|
|
8
8
|
function U(o) {
|
|
9
9
|
const { abi: d, data: i, strict: E, topics: b } = o, m = E ?? !0, [a, ...v] = b;
|
package/dist/src/lib/utils.d.ts
CHANGED
|
@@ -18,21 +18,6 @@ export declare enum Environment {
|
|
|
18
18
|
LOCALNET = "localnet"
|
|
19
19
|
}
|
|
20
20
|
export declare const add0x: (str: string) => `0x${string}`;
|
|
21
|
-
/**
|
|
22
|
-
* Converts a 64-character hex string to 2 u128 values, matching Cairo's conversion logic
|
|
23
|
-
*
|
|
24
|
-
* @param hexString - 64-character hex string (32 bytes)
|
|
25
|
-
* @param endian - Byte order ('big' or 'little'), defaults to 'big'
|
|
26
|
-
* @returns Tuple of 2 u128 values as bigints
|
|
27
|
-
*/
|
|
28
|
-
export declare function hexToU128Array(hexString: string, endian?: 'big' | 'little'): [bigint, bigint];
|
|
29
|
-
/**
|
|
30
|
-
* Converts a 64-character hex string to 4 u32 values, matching Cairo's conversion logic
|
|
31
|
-
*
|
|
32
|
-
* @param hexString - 64-character hex string (32 bytes)
|
|
33
|
-
* @param endian - Byte order ('big' or 'little'), defaults to 'big'
|
|
34
|
-
* @returns Array of 4 u32 values
|
|
35
|
-
*/
|
|
36
21
|
export declare function hexToU32Array(hexString: string, endian?: 'big' | 'little'): number[];
|
|
37
22
|
export declare function trim0x(str: string): string;
|
|
38
23
|
export declare const hasKeys: (obj: any, keys: string[]) => any;
|