@gardenfi/utils 2.0.6-beta.1 → 2.0.6-beta.10
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/index104.cjs +1 -1
- package/dist/index104.js +2 -2
- package/dist/index115.cjs +1 -1
- package/dist/index115.js +1 -1
- 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/index42.cjs +1 -1
- package/dist/index42.js +3 -3
- package/dist/index53.cjs +1 -1
- package/dist/index53.js +1 -1
- package/dist/index54.cjs +1 -1
- package/dist/index54.js +2 -2
- package/dist/index55.cjs +1 -1
- package/dist/index55.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 +5 -5
- package/dist/index58.cjs +1 -1
- package/dist/index58.js +2 -2
- package/dist/index6.cjs +1 -1
- package/dist/index6.js +12 -17
- package/dist/index61.cjs +1 -1
- package/dist/index61.js +1 -1
- package/dist/index66.cjs +1 -1
- package/dist/index66.js +1 -1
- package/dist/index83.cjs +1 -1
- package/dist/index83.js +3 -191
- package/dist/index84.cjs +1 -1
- package/dist/index84.js +8 -18
- package/dist/index85.cjs +1 -1
- package/dist/index85.js +191 -3
- package/dist/index86.cjs +1 -1
- package/dist/index86.js +18 -8
- package/dist/index87.cjs +1 -1
- package/dist/index87.js +10 -111
- package/dist/index88.cjs +1 -1
- package/dist/index88.js +18 -15
- package/dist/index89.cjs +1 -1
- package/dist/index89.js +7 -222
- package/dist/index90.cjs +1 -1
- package/dist/index90.js +110 -40
- package/dist/index91.cjs +1 -1
- package/dist/index91.js +15 -103
- package/dist/index92.cjs +1 -1
- package/dist/index92.js +222 -16
- package/dist/index93.cjs +1 -1
- package/dist/index93.js +38 -74
- package/dist/index94.cjs +1 -1
- package/dist/index94.js +104 -18
- package/dist/index95.cjs +1 -1
- package/dist/index95.js +17 -8
- package/dist/index96.cjs +1 -1
- package/dist/index96.js +76 -10
- package/dist/index97.cjs +1 -1
- package/dist/index97.js +17 -10
- package/dist/index98.cjs +1 -1
- package/dist/index98.js +11 -18
- package/dist/index99.cjs +1 -1
- package/dist/index99.js +2 -2
- package/package.json +2 -2
package/dist/index97.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index50.cjs"),d=require("./index30.cjs"),l=require("./index51.cjs");function a(e){if(!e||e.length===0)return[];const n=[];for(let t=0;t<e.length;t++){const{address:i,storageKeys:r}=e[t];for(let s=0;s<r.length;s++)if(r[s].length-2!==64)throw new d.InvalidStorageKeySizeError({storageKey:r[s]});if(!l.isAddress(i,{strict:!1}))throw new o.InvalidAddressError({address:i});n.push([i,r])}return n}exports.serializeAccessList=a;
|
package/dist/index97.js
CHANGED
|
@@ -1,14 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
1
|
+
import { InvalidAddressError as s } from "./index50.js";
|
|
2
|
+
import { InvalidStorageKeySizeError as l } from "./index30.js";
|
|
3
|
+
import { isAddress as f } from "./index51.js";
|
|
4
|
+
function a(r) {
|
|
5
|
+
if (!r || r.length === 0)
|
|
6
|
+
return [];
|
|
7
|
+
const n = [];
|
|
8
|
+
for (let o = 0; o < r.length; o++) {
|
|
9
|
+
const { address: i, storageKeys: e } = r[o];
|
|
10
|
+
for (let t = 0; t < e.length; t++)
|
|
11
|
+
if (e[t].length - 2 !== 64)
|
|
12
|
+
throw new l({ storageKey: e[t] });
|
|
13
|
+
if (!f(i, { strict: !1 }))
|
|
14
|
+
throw new s({ address: i });
|
|
15
|
+
n.push([i, e]);
|
|
10
16
|
}
|
|
17
|
+
return n;
|
|
11
18
|
}
|
|
12
19
|
export {
|
|
13
|
-
|
|
20
|
+
a as serializeAccessList
|
|
14
21
|
};
|
package/dist/index98.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index63.cjs");class i extends t.BaseError{constructor({offset:r,position:s,size:e}){super(`Slice ${s==="start"?"starting":"ending"} at offset "${r}" is out-of-bounds (size: ${e}).`,{name:"SliceOffsetOutOfBoundsError"})}}class d extends t.BaseError{constructor({size:r,targetSize:s,type:e}){super(`${e.charAt(0).toUpperCase()}${e.slice(1).toLowerCase()} size (${r}) exceeds padding size (${s}).`,{name:"SizeExceedsPaddingSizeError"})}}exports.SizeExceedsPaddingSizeError=d;exports.SliceOffsetOutOfBoundsError=i;
|
package/dist/index98.js
CHANGED
|
@@ -1,22 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
return !1;
|
|
7
|
-
if (t != null && t.length) {
|
|
8
|
-
if (!(i.length === 0 || /^\//.test(i)))
|
|
9
|
-
return !1;
|
|
10
|
-
} else if (/^\/\//.test(i))
|
|
11
|
-
return !1;
|
|
12
|
-
if (!/^[a-z][a-z0-9\+\-\.]*$/.test(f.toLowerCase()))
|
|
13
|
-
return !1;
|
|
14
|
-
let n = "";
|
|
15
|
-
return n += `${f}:`, t != null && t.length && (n += `//${t}`), n += i, r != null && r.length && (n += `?${r}`), l != null && l.length && (n += `#${l}`), n;
|
|
1
|
+
import { BaseError as o } from "./index63.js";
|
|
2
|
+
class d extends o {
|
|
3
|
+
constructor({ offset: r, position: s, size: e }) {
|
|
4
|
+
super(`Slice ${s === "start" ? "starting" : "ending"} at offset "${r}" is out-of-bounds (size: ${e}).`, { name: "SliceOffsetOutOfBoundsError" });
|
|
5
|
+
}
|
|
16
6
|
}
|
|
17
|
-
|
|
18
|
-
|
|
7
|
+
class n extends o {
|
|
8
|
+
constructor({ size: r, targetSize: s, type: e }) {
|
|
9
|
+
super(`${e.charAt(0).toUpperCase()}${e.slice(1).toLowerCase()} size (${r}) exceeds padding size (${s}).`, { name: "SizeExceedsPaddingSizeError" });
|
|
10
|
+
}
|
|
19
11
|
}
|
|
20
12
|
export {
|
|
21
|
-
|
|
13
|
+
n as SizeExceedsPaddingSizeError,
|
|
14
|
+
d as SliceOffsetOutOfBoundsError
|
|
22
15
|
};
|
package/dist/index99.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index98.cjs"),O=require("./index83.cjs"),n=require("./index66.cjs");function p(i,e,s,{strict:f}={}){return O.isHex(i,{strict:!1})?l(i,e,s,{strict:f}):u(i,e,s,{strict:f})}function r(i,e){if(typeof e=="number"&&e>0&&e>n.size(i)-1)throw new t.SliceOffsetOutOfBoundsError({offset:e,position:"start",size:n.size(i)})}function c(i,e,s){if(typeof e=="number"&&typeof s=="number"&&n.size(i)!==s-e)throw new t.SliceOffsetOutOfBoundsError({offset:s,position:"end",size:n.size(i)})}function u(i,e,s,{strict:f}={}){r(i,e);const o=i.slice(e,s);return f&&c(o,e,s),o}function l(i,e,s,{strict:f}={}){r(i,e);const o=`0x${i.replace("0x","").slice((e??0)*2,(s??i.length)*2)}`;return f&&c(o,e,s),o}exports.slice=p;exports.sliceBytes=u;exports.sliceHex=l;
|
package/dist/index99.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { SliceOffsetOutOfBoundsError as t } from "./
|
|
2
|
-
import { isHex as p } from "./
|
|
1
|
+
import { SliceOffsetOutOfBoundsError as t } from "./index98.js";
|
|
2
|
+
import { isHex as p } from "./index83.js";
|
|
3
3
|
import { size as r } from "./index66.js";
|
|
4
4
|
function w(e, f, i, { strict: o } = {}) {
|
|
5
5
|
return p(e, { strict: !1 }) ? u(e, f, i, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gardenfi/utils",
|
|
3
|
-
"version": "2.0.6-beta.
|
|
3
|
+
"version": "2.0.6-beta.10",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "vite build",
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
},
|
|
36
36
|
"sideEffects": false,
|
|
37
37
|
"dependencies": {
|
|
38
|
+
"@peculiar/webcrypto": "^1.5.0",
|
|
38
39
|
"@simplewebauthn/browser": "^13.1.0",
|
|
39
|
-
"crypto-browserify": "^3.12.1",
|
|
40
40
|
"jwt-decode": "^4.0.0",
|
|
41
41
|
"viem": "^2.21.23"
|
|
42
42
|
}
|