@gardenfi/utils 2.0.6-beta.18 → 2.0.6-beta.19
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/index101.cjs +1 -1
- package/dist/index101.js +8 -12
- package/dist/index102.cjs +1 -1
- package/dist/index102.js +10 -17
- package/dist/index103.cjs +1 -1
- package/dist/index103.js +18 -642
- package/dist/index104.cjs +1 -1
- package/dist/index104.js +10 -170
- package/dist/index105.cjs +1 -1
- package/dist/index105.js +639 -123
- package/dist/index106.cjs +1 -2
- package/dist/index106.js +173 -3
- package/dist/index107.cjs +1 -1
- package/dist/index107.js +17 -37
- package/dist/index108.cjs +2 -1
- package/dist/index108.js +3 -2
- package/dist/index109.cjs +1 -1
- package/dist/index109.js +128 -2
- package/dist/index110.cjs +1 -1
- package/dist/index110.js +34 -33
- package/dist/index111.cjs +1 -1
- package/dist/index111.js +2 -12
- package/dist/index112.cjs +1 -1
- package/dist/index112.js +2 -20
- package/dist/index113.cjs +1 -1
- package/dist/index113.js +37 -8
- package/dist/index116.cjs +1 -1
- package/dist/index116.js +2 -2
- package/dist/index117.cjs +1 -1
- package/dist/index117.js +1 -1
- package/dist/index20.cjs +1 -1
- package/dist/index20.js +1 -1
- package/dist/index21.cjs +1 -1
- package/dist/index21.js +2 -2
- package/dist/index22.cjs +1 -1
- package/dist/index22.js +1 -1
- package/dist/index23.cjs +1 -1
- package/dist/index23.js +3 -3
- package/dist/index32.cjs +1 -1
- package/dist/index32.js +1 -1
- package/dist/index33.cjs +1 -1
- package/dist/index33.js +1 -1
- package/dist/index35.cjs +1 -1
- package/dist/index35.js +1 -1
- package/dist/index36.cjs +1 -1
- package/dist/index36.js +2 -2
- package/dist/index37.cjs +1 -1
- package/dist/index37.js +2 -2
- package/dist/index38.cjs +1 -1
- package/dist/index38.js +1 -1
- package/dist/index39.cjs +1 -1
- package/dist/index39.js +2 -2
- package/dist/index40.cjs +1 -1
- package/dist/index40.js +8 -8
- package/dist/index41.cjs +1 -1
- package/dist/index41.js +1 -1
- package/dist/index42.cjs +1 -1
- package/dist/index42.js +1 -1
- package/dist/index44.cjs +1 -1
- package/dist/index44.js +1 -1
- package/dist/index49.cjs +1 -1
- package/dist/index49.js +1 -1
- package/dist/index60.cjs +1 -1
- package/dist/index60.js +1 -1
- package/dist/index61.cjs +1 -1
- package/dist/index61.js +1 -1
- package/dist/index62.cjs +1 -2
- package/dist/index62.js +110 -57
- package/dist/index63.cjs +1 -1
- package/dist/index63.js +16 -21
- package/dist/index64.cjs +1 -1
- package/dist/index64.js +219 -36
- package/dist/index65.cjs +1 -1
- package/dist/index65.js +40 -34
- package/dist/index66.cjs +1 -1
- package/dist/index66.js +34 -69
- package/dist/index67.cjs +1 -1
- package/dist/index67.js +66 -109
- package/dist/index68.cjs +1 -1
- package/dist/index68.js +2 -2
- package/dist/index70.cjs +1 -1
- package/dist/index70.js +228 -13
- package/dist/index71.cjs +2 -1
- package/dist/index71.js +56 -220
- package/dist/index72.cjs +1 -1
- package/dist/index72.js +18 -228
- package/dist/index73.cjs +1 -1
- package/dist/index73.js +3 -17
- package/dist/index74.cjs +1 -1
- package/dist/index74.js +3 -42
- package/dist/index75.cjs +1 -1
- package/dist/index75.js +8 -4
- package/dist/index76.cjs +1 -1
- package/dist/index76.js +104 -3
- package/dist/index77.cjs +1 -1
- package/dist/index77.js +17 -8
- package/dist/index78.cjs +1 -1
- package/dist/index78.js +8 -104
- package/dist/index79.cjs +1 -1
- package/dist/index79.js +9 -16
- package/dist/index80.cjs +1 -1
- package/dist/index80.js +11 -8
- package/dist/index81.cjs +1 -1
- package/dist/index81.js +13 -10
- package/dist/index82.cjs +1 -1
- package/dist/index82.js +18 -11
- package/dist/index83.cjs +1 -1
- package/dist/index83.js +6 -13
- package/dist/index84.cjs +1 -1
- package/dist/index84.js +42 -6
- package/dist/index85.cjs +1 -1
- package/dist/index85.js +6 -6
- package/dist/index88.cjs +1 -1
- package/dist/index88.js +4 -4
- package/dist/index89.cjs +1 -1
- package/dist/index89.js +1 -1
- package/dist/index91.cjs +1 -1
- package/dist/index91.js +1 -1
- package/dist/index93.cjs +1 -1
- package/dist/index93.js +2 -2
- package/dist/index94.cjs +1 -1
- package/dist/index94.js +1 -1
- package/dist/index98.cjs +1 -1
- package/dist/index98.js +3 -3
- package/dist/index99.cjs +1 -1
- package/dist/index99.js +1 -1
- package/package.json +1 -1
package/dist/index89.js
CHANGED
|
@@ -2,7 +2,7 @@ import { BytesSizeMismatchError as m } from "./index93.js";
|
|
|
2
2
|
import { InvalidAddressError as w } from "./index32.js";
|
|
3
3
|
import { InvalidDomainError as E, InvalidPrimaryTypeError as z, InvalidStructTypeError as D } from "./index99.js";
|
|
4
4
|
import { isAddress as T } from "./index33.js";
|
|
5
|
-
import { size as y } from "./
|
|
5
|
+
import { size as y } from "./index73.js";
|
|
6
6
|
import { numberToHex as x } from "./index24.js";
|
|
7
7
|
import { integerRegex as P, bytesRegex as S } from "./index100.js";
|
|
8
8
|
function j(e) {
|
package/dist/index91.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index71.cjs");class i extends e.BaseError{constructor({chainId:r}){super(typeof r=="number"?`Chain ID "${r}" is invalid.`:"Chain ID is invalid.",{name:"InvalidChainIdError"})}}exports.InvalidChainIdError=i;
|
package/dist/index91.js
CHANGED
package/dist/index93.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("./index73.cjs"),n=require("./index71.cjs");class o extends n.BaseError{constructor({expectedLength:r,givenLength:e,type:t}){super([`ABI encoding array length mismatch for type ${t}.`,`Expected length: ${r}`,`Given length: ${e}`].join(`
|
|
2
2
|
`),{name:"AbiEncodingArrayLengthMismatchError"})}}class a extends n.BaseError{constructor({expectedSize:r,value:e}){super(`Size of bytes "${e}" (bytes${i.size(e)}) does not match expected size (bytes${r}).`,{name:"AbiEncodingBytesSizeMismatchError"})}}class c extends n.BaseError{constructor({expectedLength:r,givenLength:e}){super(["ABI encoding params/values length mismatch.",`Expected length (params): ${r}`,`Given length (values): ${e}`].join(`
|
|
3
3
|
`),{name:"AbiEncodingLengthMismatchError"})}}class d extends n.BaseError{constructor({expectedSize:r,givenSize:e}){super(`Expected bytes${r}, got bytes${e}.`,{name:"BytesSizeMismatchError"})}}class E extends n.BaseError{constructor(r,{docsPath:e}){super([`Type "${r}" is not a valid encoding type.`,"Please provide a valid ABI type."].join(`
|
|
4
4
|
`),{docsPath:e,name:"InvalidAbiEncodingType"})}}class g extends n.BaseError{constructor(r){super([`Value "${r}" is not a valid array.`].join(`
|
package/dist/index93.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { size as i } from "./
|
|
2
|
-
import { BaseError as n } from "./
|
|
1
|
+
import { size as i } from "./index73.js";
|
|
2
|
+
import { BaseError as n } from "./index71.js";
|
|
3
3
|
class c extends n {
|
|
4
4
|
constructor({ expectedLength: e, givenLength: r, type: s }) {
|
|
5
5
|
super([
|
package/dist/index94.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index95.cjs"),t=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index95.cjs"),t=require("./index71.cjs");class i extends t.BaseError{constructor({cause:r,maxFeePerGas:e}={}){super(`The fee cap (\`maxFeePerGas\`${e?` = ${a.formatGwei(e)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:r,name:"FeeCapTooHighError"})}}Object.defineProperty(i,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/});class n extends t.BaseError{constructor({cause:r,maxPriorityFeePerGas:e,maxFeePerGas:o}={}){super([`The provided tip (\`maxPriorityFeePerGas\`${e?` = ${a.formatGwei(e)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${o?` = ${a.formatGwei(o)} gwei`:""}).`].join(`
|
|
2
2
|
`),{cause:r,name:"TipAboveFeeCapError"})}}Object.defineProperty(n,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max priority fee per gas higher than max fee per gas|tip higher than fee cap/});exports.FeeCapTooHighError=i;exports.TipAboveFeeCapError=n;
|
package/dist/index94.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { formatGwei as a } from "./index95.js";
|
|
2
|
-
import { BaseError as o } from "./
|
|
2
|
+
import { BaseError as o } from "./index71.js";
|
|
3
3
|
class n extends o {
|
|
4
4
|
constructor({ cause: r, maxFeePerGas: e } = {}) {
|
|
5
5
|
super(`The fee cap (\`maxFeePerGas\`${e ? ` = ${a(e)} gwei` : ""}) cannot be higher than the maximum allowed value (2^256-1).`, {
|
package/dist/index98.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index118.cjs"),y=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index118.cjs"),y=require("./index113.cjs"),u=require("./index109.cjs"),B=require("./index73.cjs"),h=require("./index36.cjs"),d=require("./index24.cjs");function f(t){const a=t.to??(typeof t.data=="string"?"hex":"bytes"),n=typeof t.data=="string"?h.hexToBytes(t.data):t.data,s=B.size(n);if(!s)throw new y.EmptyBlobError;if(s>o.maxBytesPerTransaction)throw new y.BlobSizeTooLargeError({maxSize:o.maxBytesPerTransaction,size:s});const r=[];let b=!0,i=0;for(;b;){const e=u.createCursor(new Uint8Array(o.bytesPerBlob));let l=0;for(;l<o.fieldElementsPerBlob;){const c=n.slice(i,i+(o.bytesPerFieldElement-1));if(e.pushByte(0),e.pushBytes(c),c.length<31){e.pushByte(128),b=!1;break}l++,i+=31}r.push(e)}return a==="bytes"?r.map(e=>e.bytes):r.map(e=>d.bytesToHex(e.bytes))}exports.toBlobs=f;
|
package/dist/index98.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { maxBytesPerTransaction as y, bytesPerBlob as a, fieldElementsPerBlob as f, bytesPerFieldElement as p } from "./index118.js";
|
|
2
|
-
import { EmptyBlobError as c, BlobSizeTooLargeError as h } from "./
|
|
3
|
-
import { createCursor as B } from "./
|
|
4
|
-
import { size as u } from "./
|
|
2
|
+
import { EmptyBlobError as c, BlobSizeTooLargeError as h } from "./index113.js";
|
|
3
|
+
import { createCursor as B } from "./index109.js";
|
|
4
|
+
import { size as u } from "./index73.js";
|
|
5
5
|
import { hexToBytes as x } from "./index36.js";
|
|
6
6
|
import { bytesToHex as d } from "./index24.js";
|
|
7
7
|
function S(e) {
|
package/dist/index99.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index57.cjs"),e=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index57.cjs"),e=require("./index71.cjs");class i extends e.BaseError{constructor({domain:r}){super(`Invalid domain "${s.stringify(r)}".`,{metaMessages:["Must be a valid EIP-712 domain."]})}}class o extends e.BaseError{constructor({primaryType:r,types:a}){super(`Invalid primary type \`${r}\` must be one of \`${JSON.stringify(Object.keys(a))}\`.`,{docsPath:"/api/glossary/Errors#typeddatainvalidprimarytypeerror",metaMessages:["Check that the primary type is a key in `types`."]})}}class n extends e.BaseError{constructor({type:r}){super(`Struct type "${r}" is invalid.`,{metaMessages:["Struct type must not be a Solidity type."],name:"InvalidStructTypeError"})}}exports.InvalidDomainError=i;exports.InvalidPrimaryTypeError=o;exports.InvalidStructTypeError=n;
|
package/dist/index99.js
CHANGED