@gardenfi/core 0.2.0-beta.75 → 0.2.0-beta.76
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 +31 -1
- package/dist/index.js +7813 -28
- package/package.json +1 -1
- package/dist/index10.cjs +0 -1
- package/dist/index10.js +0 -112
- package/dist/index100.cjs +0 -1
- package/dist/index100.js +0 -23
- package/dist/index101.cjs +0 -1
- package/dist/index101.js +0 -9
- package/dist/index102.cjs +0 -1
- package/dist/index102.js +0 -35
- package/dist/index103.cjs +0 -1
- package/dist/index103.js +0 -4
- package/dist/index104.cjs +0 -1
- package/dist/index104.js +0 -40
- package/dist/index105.cjs +0 -1
- package/dist/index105.js +0 -31
- package/dist/index106.cjs +0 -1
- package/dist/index106.js +0 -9
- package/dist/index107.cjs +0 -1
- package/dist/index107.js +0 -7
- package/dist/index108.cjs +0 -1
- package/dist/index108.js +0 -13
- package/dist/index109.cjs +0 -1
- package/dist/index109.js +0 -4
- package/dist/index11.cjs +0 -20
- package/dist/index11.js +0 -380
- package/dist/index110.cjs +0 -1
- package/dist/index110.js +0 -60
- package/dist/index111.cjs +0 -1
- package/dist/index111.js +0 -4
- package/dist/index112.cjs +0 -1
- package/dist/index112.js +0 -42
- package/dist/index113.cjs +0 -1
- package/dist/index113.js +0 -45
- package/dist/index114.cjs +0 -1
- package/dist/index114.js +0 -20
- package/dist/index115.cjs +0 -1
- package/dist/index115.js +0 -111
- package/dist/index116.cjs +0 -1
- package/dist/index116.js +0 -23
- package/dist/index117.cjs +0 -1
- package/dist/index117.js +0 -228
- package/dist/index118.cjs +0 -1
- package/dist/index118.js +0 -6
- package/dist/index119.cjs +0 -1
- package/dist/index119.js +0 -160
- package/dist/index12.cjs +0 -1
- package/dist/index12.js +0 -22
- package/dist/index120.cjs +0 -1
- package/dist/index120.js +0 -4
- package/dist/index121.cjs +0 -1
- package/dist/index121.js +0 -75
- package/dist/index122.cjs +0 -1
- package/dist/index122.js +0 -64
- package/dist/index123.cjs +0 -1
- package/dist/index123.js +0 -37
- package/dist/index124.cjs +0 -1
- package/dist/index124.js +0 -7
- package/dist/index125.cjs +0 -1
- package/dist/index125.js +0 -107
- package/dist/index126.cjs +0 -1
- package/dist/index126.js +0 -15
- package/dist/index127.cjs +0 -1
- package/dist/index127.js +0 -35
- package/dist/index128.cjs +0 -1
- package/dist/index128.js +0 -4
- package/dist/index129.cjs +0 -1
- package/dist/index129.js +0 -32
- package/dist/index13.cjs +0 -1
- package/dist/index13.js +0 -396
- package/dist/index130.cjs +0 -1
- package/dist/index130.js +0 -4
- package/dist/index131.cjs +0 -1
- package/dist/index131.js +0 -358
- package/dist/index132.cjs +0 -1
- package/dist/index132.js +0 -241
- package/dist/index133.cjs +0 -1
- package/dist/index133.js +0 -70
- package/dist/index134.cjs +0 -1
- package/dist/index134.js +0 -64
- package/dist/index135.cjs +0 -1
- package/dist/index135.js +0 -14
- package/dist/index136.cjs +0 -1
- package/dist/index136.js +0 -47
- package/dist/index137.cjs +0 -1
- package/dist/index137.js +0 -65
- package/dist/index138.cjs +0 -1
- package/dist/index138.js +0 -21
- package/dist/index139.cjs +0 -1
- package/dist/index139.js +0 -228
- package/dist/index14.cjs +0 -1
- package/dist/index14.js +0 -28
- package/dist/index140.cjs +0 -1
- package/dist/index140.js +0 -5
- package/dist/index141.cjs +0 -1
- package/dist/index141.js +0 -171
- package/dist/index142.cjs +0 -1
- package/dist/index142.js +0 -30
- package/dist/index143.cjs +0 -1
- package/dist/index143.js +0 -23
- package/dist/index144.cjs +0 -1
- package/dist/index144.js +0 -72
- package/dist/index145.cjs +0 -1
- package/dist/index145.js +0 -130
- package/dist/index146.cjs +0 -1
- package/dist/index146.js +0 -9
- package/dist/index147.cjs +0 -1
- package/dist/index147.js +0 -4
- package/dist/index148.cjs +0 -1
- package/dist/index148.js +0 -28
- package/dist/index149.cjs +0 -1
- package/dist/index149.js +0 -4
- package/dist/index15.cjs +0 -1
- package/dist/index15.js +0 -34
- package/dist/index16.cjs +0 -1
- package/dist/index16.js +0 -27
- package/dist/index17.cjs +0 -1
- package/dist/index17.js +0 -33
- package/dist/index18.cjs +0 -1
- package/dist/index18.js +0 -32
- package/dist/index19.cjs +0 -1
- package/dist/index19.js +0 -55
- package/dist/index2.cjs +0 -1
- package/dist/index2.js +0 -412
- package/dist/index20.cjs +0 -1
- package/dist/index20.js +0 -28
- package/dist/index21.cjs +0 -1
- package/dist/index21.js +0 -4
- package/dist/index22.cjs +0 -1
- package/dist/index22.js +0 -140
- package/dist/index23.cjs +0 -1
- package/dist/index23.js +0 -4
- package/dist/index24.cjs +0 -1
- package/dist/index24.js +0 -11
- package/dist/index25.cjs +0 -1
- package/dist/index25.js +0 -11
- package/dist/index26.cjs +0 -3
- package/dist/index26.js +0 -30
- package/dist/index27.cjs +0 -1
- package/dist/index27.js +0 -17
- package/dist/index28.cjs +0 -2
- package/dist/index28.js +0 -27
- package/dist/index29.cjs +0 -1
- package/dist/index29.js +0 -43
- package/dist/index3.cjs +0 -1
- package/dist/index3.js +0 -5
- package/dist/index30.cjs +0 -1
- package/dist/index30.js +0 -201
- package/dist/index31.cjs +0 -1
- package/dist/index31.js +0 -4
- package/dist/index32.cjs +0 -1
- package/dist/index32.js +0 -4
- package/dist/index33.cjs +0 -1
- package/dist/index33.js +0 -4
- package/dist/index34.cjs +0 -1
- package/dist/index34.js +0 -15
- package/dist/index35.cjs +0 -1
- package/dist/index35.js +0 -39
- package/dist/index36.cjs +0 -1
- package/dist/index36.js +0 -44
- package/dist/index37.cjs +0 -1
- package/dist/index37.js +0 -30
- package/dist/index38.cjs +0 -1
- package/dist/index38.js +0 -17
- package/dist/index39.cjs +0 -1
- package/dist/index39.js +0 -26
- package/dist/index4.cjs +0 -1
- package/dist/index4.js +0 -18
- package/dist/index40.cjs +0 -1
- package/dist/index40.js +0 -28
- package/dist/index41.cjs +0 -1
- package/dist/index41.js +0 -57
- package/dist/index42.cjs +0 -1
- package/dist/index42.js +0 -30
- package/dist/index43.cjs +0 -1
- package/dist/index43.js +0 -177
- package/dist/index44.cjs +0 -1
- package/dist/index44.js +0 -4
- package/dist/index45.cjs +0 -1
- package/dist/index45.js +0 -37
- package/dist/index46.cjs +0 -1
- package/dist/index46.js +0 -11
- package/dist/index47.cjs +0 -1
- package/dist/index47.js +0 -15
- package/dist/index48.cjs +0 -1
- package/dist/index48.js +0 -14
- package/dist/index49.cjs +0 -1
- package/dist/index49.js +0 -6
- package/dist/index5.cjs +0 -1
- package/dist/index5.js +0 -99
- package/dist/index50.cjs +0 -1
- package/dist/index50.js +0 -48
- package/dist/index51.cjs +0 -1
- package/dist/index51.js +0 -45
- package/dist/index52.cjs +0 -1
- package/dist/index52.js +0 -174
- package/dist/index53.cjs +0 -1
- package/dist/index53.js +0 -15
- package/dist/index54.cjs +0 -1
- package/dist/index54.js +0 -7
- package/dist/index55.cjs +0 -1
- package/dist/index55.js +0 -19
- package/dist/index56.cjs +0 -1
- package/dist/index56.js +0 -14
- package/dist/index57.cjs +0 -1
- package/dist/index57.js +0 -22
- package/dist/index58.cjs +0 -1
- package/dist/index58.js +0 -34
- package/dist/index59.cjs +0 -1
- package/dist/index59.js +0 -4
- package/dist/index6.cjs +0 -1
- package/dist/index6.js +0 -5
- package/dist/index60.cjs +0 -6
- package/dist/index60.js +0 -949
- package/dist/index61.cjs +0 -1
- package/dist/index61.js +0 -4
- package/dist/index62.cjs +0 -1
- package/dist/index62.js +0 -64
- package/dist/index63.cjs +0 -1
- package/dist/index63.js +0 -35
- package/dist/index64.cjs +0 -1
- package/dist/index64.js +0 -89
- package/dist/index65.cjs +0 -1
- package/dist/index65.js +0 -58
- package/dist/index66.cjs +0 -2
- package/dist/index66.js +0 -62
- package/dist/index67.cjs +0 -1
- package/dist/index67.js +0 -6
- package/dist/index68.cjs +0 -1
- package/dist/index68.js +0 -37
- package/dist/index69.cjs +0 -1
- package/dist/index69.js +0 -130
- package/dist/index7.cjs +0 -1
- package/dist/index7.js +0 -76
- package/dist/index70.cjs +0 -2
- package/dist/index70.js +0 -45
- package/dist/index71.cjs +0 -1
- package/dist/index71.js +0 -11
- package/dist/index72.cjs +0 -1
- package/dist/index72.js +0 -13
- package/dist/index73.cjs +0 -1
- package/dist/index73.js +0 -14
- package/dist/index74.cjs +0 -1
- package/dist/index74.js +0 -16
- package/dist/index75.cjs +0 -1
- package/dist/index75.js +0 -9
- package/dist/index76.cjs +0 -1
- package/dist/index76.js +0 -20
- package/dist/index77.cjs +0 -1
- package/dist/index77.js +0 -81
- package/dist/index78.cjs +0 -1
- package/dist/index78.js +0 -17
- package/dist/index79.cjs +0 -1
- package/dist/index79.js +0 -21
- package/dist/index8.cjs +0 -1
- package/dist/index8.js +0 -61
- package/dist/index80.cjs +0 -1
- package/dist/index80.js +0 -24
- package/dist/index81.cjs +0 -1
- package/dist/index81.js +0 -16
- package/dist/index82.cjs +0 -1
- package/dist/index82.js +0 -9
- package/dist/index83.cjs +0 -1
- package/dist/index83.js +0 -4
- package/dist/index84.cjs +0 -1
- package/dist/index84.js +0 -4
- package/dist/index85.cjs +0 -2
- package/dist/index85.js +0 -37
- package/dist/index86.cjs +0 -1
- package/dist/index86.js +0 -8
- package/dist/index87.cjs +0 -1
- package/dist/index87.js +0 -22
- package/dist/index88.cjs +0 -1
- package/dist/index88.js +0 -37
- package/dist/index89.cjs +0 -1
- package/dist/index89.js +0 -369
- package/dist/index9.cjs +0 -1
- package/dist/index9.js +0 -63
- package/dist/index90.cjs +0 -1
- package/dist/index90.js +0 -23
- package/dist/index91.cjs +0 -1
- package/dist/index91.js +0 -58
- package/dist/index92.cjs +0 -1
- package/dist/index92.js +0 -5
- package/dist/index93.cjs +0 -1
- package/dist/index93.js +0 -51
- package/dist/index94.cjs +0 -1
- package/dist/index94.js +0 -28
- package/dist/index95.cjs +0 -1
- package/dist/index95.js +0 -4
- package/dist/index96.cjs +0 -1
- package/dist/index96.js +0 -4
- package/dist/index97.cjs +0 -1
- package/dist/index97.js +0 -15
- package/dist/index98.cjs +0 -1
- package/dist/index98.js +0 -9
- package/dist/index99.cjs +0 -1
- package/dist/index99.js +0 -115
package/dist/index61.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e={};exports.__exports=e;
|
package/dist/index61.js
DELETED
package/dist/index62.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("./index63.cjs");var i=g.native;function p(r){return r.name||r.toString().match(/function (.*?)\s*\(/)[1]}function s(r){return i.Nil(r)?"":p(r.constructor)}function h(r){return i.Function(r)?"":i.String(r)?JSON.stringify(r):r&&i.Object(r)?"":r}function _(r,t){Error.captureStackTrace&&Error.captureStackTrace(r,t)}function u(r){return i.Function(r)?r.toJSON?r.toJSON():p(r):i.Array(r)?"Array":r&&i.Object(r)?"Object":r!==void 0?r:""}function S(r,t,n){var e=h(t);return"Expected "+u(r)+", got"+(n!==""?" "+n:"")+(e!==""?" "+e:"")}function o(r,t,n){n=n||s(t),this.message=S(r,t,n),_(this,o),this.__type=r,this.__value=t,this.__valueTypeName=n}o.prototype=Object.create(Error.prototype);o.prototype.constructor=o;function E(r,t,n,e,c){var a='" of type ';return t==="key"&&(a='" with key type '),S('property "'+u(n)+a+u(r),e,c)}function f(r,t,n,e,c){r?(c=c||s(e),this.message=E(r,n,t,e,c)):this.message='Unexpected property "'+t+'"',_(this,o),this.__label=n,this.__property=t,this.__type=r,this.__value=e,this.__valueTypeName=c}f.prototype=Object.create(Error.prototype);f.prototype.constructor=o;function y(r,t){return new o(r,{},t)}function T(r,t,n){return r instanceof f?(t=t+"."+r.__property,r=new f(r.__type,t,r.__label,r.__value,r.__valueTypeName)):r instanceof o&&(r=new f(r.__type,t,n,r.__value,r.__valueTypeName)),_(r),r}var O={TfTypeError:o,TfPropertyTypeError:f,tfCustomError:y,tfSubError:T,tfJSON:u,getValueTypeName:s};exports.errors=O;
|
package/dist/index62.js
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { n as E } from "./index63.js";
|
|
2
|
-
var i = E;
|
|
3
|
-
function p(r) {
|
|
4
|
-
return r.name || r.toString().match(/function (.*?)\s*\(/)[1];
|
|
5
|
-
}
|
|
6
|
-
function u(r) {
|
|
7
|
-
return i.Nil(r) ? "" : p(r.constructor);
|
|
8
|
-
}
|
|
9
|
-
function S(r) {
|
|
10
|
-
return i.Function(r) ? "" : i.String(r) ? JSON.stringify(r) : r && i.Object(r) ? "" : r;
|
|
11
|
-
}
|
|
12
|
-
function _(r, t) {
|
|
13
|
-
Error.captureStackTrace && Error.captureStackTrace(r, t);
|
|
14
|
-
}
|
|
15
|
-
function s(r) {
|
|
16
|
-
return i.Function(r) ? r.toJSON ? r.toJSON() : p(r) : i.Array(r) ? "Array" : r && i.Object(r) ? "Object" : r !== void 0 ? r : "";
|
|
17
|
-
}
|
|
18
|
-
function h(r, t, n) {
|
|
19
|
-
var e = S(t);
|
|
20
|
-
return "Expected " + s(r) + ", got" + (n !== "" ? " " + n : "") + (e !== "" ? " " + e : "");
|
|
21
|
-
}
|
|
22
|
-
function o(r, t, n) {
|
|
23
|
-
n = n || u(t), this.message = h(r, t, n), _(this, o), this.__type = r, this.__value = t, this.__valueTypeName = n;
|
|
24
|
-
}
|
|
25
|
-
o.prototype = Object.create(Error.prototype);
|
|
26
|
-
o.prototype.constructor = o;
|
|
27
|
-
function g(r, t, n, e, c) {
|
|
28
|
-
var a = '" of type ';
|
|
29
|
-
return t === "key" && (a = '" with key type '), h('property "' + s(n) + a + s(r), e, c);
|
|
30
|
-
}
|
|
31
|
-
function f(r, t, n, e, c) {
|
|
32
|
-
r ? (c = c || u(e), this.message = g(r, n, t, e, c)) : this.message = 'Unexpected property "' + t + '"', _(this, o), this.__label = n, this.__property = t, this.__type = r, this.__value = e, this.__valueTypeName = c;
|
|
33
|
-
}
|
|
34
|
-
f.prototype = Object.create(Error.prototype);
|
|
35
|
-
f.prototype.constructor = o;
|
|
36
|
-
function y(r, t) {
|
|
37
|
-
return new o(r, {}, t);
|
|
38
|
-
}
|
|
39
|
-
function T(r, t, n) {
|
|
40
|
-
return r instanceof f ? (t = t + "." + r.__property, r = new f(
|
|
41
|
-
r.__type,
|
|
42
|
-
t,
|
|
43
|
-
r.__label,
|
|
44
|
-
r.__value,
|
|
45
|
-
r.__valueTypeName
|
|
46
|
-
)) : r instanceof o && (r = new f(
|
|
47
|
-
r.__type,
|
|
48
|
-
t,
|
|
49
|
-
n,
|
|
50
|
-
r.__value,
|
|
51
|
-
r.__valueTypeName
|
|
52
|
-
)), _(r), r;
|
|
53
|
-
}
|
|
54
|
-
var m = {
|
|
55
|
-
TfTypeError: o,
|
|
56
|
-
TfPropertyTypeError: f,
|
|
57
|
-
tfCustomError: y,
|
|
58
|
-
tfSubError: T,
|
|
59
|
-
tfJSON: s,
|
|
60
|
-
getValueTypeName: u
|
|
61
|
-
};
|
|
62
|
-
export {
|
|
63
|
-
m as e
|
|
64
|
-
};
|
package/dist/index63.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var t={Array:function(n){return n!=null&&n.constructor===Array},Boolean:function(n){return typeof n=="boolean"},Function:function(n){return typeof n=="function"},Nil:function(n){return n==null},Number:function(n){return typeof n=="number"},Object:function(n){return typeof n=="object"},String:function(n){return typeof n=="string"},"":function(){return!0}};t.Null=t.Nil;for(var r in t)t[r].toJSON=(function(n){return n}).bind(null,r);var e=t;exports.native=e;
|
package/dist/index63.js
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
var t = {
|
|
2
|
-
Array: function(n) {
|
|
3
|
-
return n != null && n.constructor === Array;
|
|
4
|
-
},
|
|
5
|
-
Boolean: function(n) {
|
|
6
|
-
return typeof n == "boolean";
|
|
7
|
-
},
|
|
8
|
-
Function: function(n) {
|
|
9
|
-
return typeof n == "function";
|
|
10
|
-
},
|
|
11
|
-
Nil: function(n) {
|
|
12
|
-
return n == null;
|
|
13
|
-
},
|
|
14
|
-
Number: function(n) {
|
|
15
|
-
return typeof n == "number";
|
|
16
|
-
},
|
|
17
|
-
Object: function(n) {
|
|
18
|
-
return typeof n == "object";
|
|
19
|
-
},
|
|
20
|
-
String: function(n) {
|
|
21
|
-
return typeof n == "string";
|
|
22
|
-
},
|
|
23
|
-
"": function() {
|
|
24
|
-
return !0;
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
t.Null = t.Nil;
|
|
28
|
-
for (var r in t)
|
|
29
|
-
t[r].toJSON = (function(n) {
|
|
30
|
-
return n;
|
|
31
|
-
}).bind(null, r);
|
|
32
|
-
var u = t;
|
|
33
|
-
export {
|
|
34
|
-
u as n
|
|
35
|
-
};
|
package/dist/index64.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const J=require("./index63.cjs"),M=require("./index62.cjs");var I,b;function H(){if(b)return I;b=1;var o=J.native,S=M.errors;function N(n){return Buffer.isBuffer(n)}function g(n){return typeof n=="string"&&/^([0-9a-f]{2})+$/i.test(n)}function f(n,e){var r=n.toJSON();function i(t){if(!n(t))return!1;if(t.length===e)return!0;throw S.tfCustomError(r+"(Length: "+e+")",r+"(Length: "+t.length+")")}return i.toJSON=function(){return r},i}var a=f.bind(null,o.Array),h=f.bind(null,N),_=f.bind(null,g),x=f.bind(null,o.String);function d(n,e,r){r=r||o.Number;function i(t,E){return r(t,E)&&t>n&&t<e}return i.toJSON=function(){return`${r.toJSON()} between [${n}, ${e}]`},i}var u=Math.pow(2,53)-1;function y(n){return typeof n=="number"&&isFinite(n)}function U(n){return n<<24>>24===n}function O(n){return n<<16>>16===n}function m(n){return(n|0)===n}function B(n){return typeof n=="number"&&n>=-u&&n<=u&&Math.floor(n)===n}function R(n){return(n&255)===n}function p(n){return(n&65535)===n}function q(n){return n>>>0===n}function A(n){return typeof n=="number"&&n>=0&&n<=u&&Math.floor(n)===n}var c={ArrayN:a,Buffer:N,BufferN:h,Finite:y,Hex:g,HexN:_,Int8:U,Int16:O,Int32:m,Int53:B,Range:d,StringN:x,UInt8:R,UInt16:p,UInt32:q,UInt53:A};for(var s in c)c[s].toJSON=(function(n){return n}).bind(null,s);return I=c,I}exports.__require=H;
|
package/dist/index64.js
DELETED
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import { n as H } from "./index63.js";
|
|
2
|
-
import { e as L } from "./index62.js";
|
|
3
|
-
var I, a;
|
|
4
|
-
function q() {
|
|
5
|
-
if (a) return I;
|
|
6
|
-
a = 1;
|
|
7
|
-
var o = H, h = L;
|
|
8
|
-
function N(n) {
|
|
9
|
-
return Buffer.isBuffer(n);
|
|
10
|
-
}
|
|
11
|
-
function g(n) {
|
|
12
|
-
return typeof n == "string" && /^([0-9a-f]{2})+$/i.test(n);
|
|
13
|
-
}
|
|
14
|
-
function e(n, f) {
|
|
15
|
-
var r = n.toJSON();
|
|
16
|
-
function i(t) {
|
|
17
|
-
if (!n(t)) return !1;
|
|
18
|
-
if (t.length === f) return !0;
|
|
19
|
-
throw h.tfCustomError(r + "(Length: " + f + ")", r + "(Length: " + t.length + ")");
|
|
20
|
-
}
|
|
21
|
-
return i.toJSON = function() {
|
|
22
|
-
return r;
|
|
23
|
-
}, i;
|
|
24
|
-
}
|
|
25
|
-
var x = e.bind(null, o.Array), _ = e.bind(null, N), b = e.bind(null, g), m = e.bind(null, o.String);
|
|
26
|
-
function S(n, f, r) {
|
|
27
|
-
r = r || o.Number;
|
|
28
|
-
function i(t, J) {
|
|
29
|
-
return r(t, J) && t > n && t < f;
|
|
30
|
-
}
|
|
31
|
-
return i.toJSON = function() {
|
|
32
|
-
return `${r.toJSON()} between [${n}, ${f}]`;
|
|
33
|
-
}, i;
|
|
34
|
-
}
|
|
35
|
-
var u = Math.pow(2, 53) - 1;
|
|
36
|
-
function U(n) {
|
|
37
|
-
return typeof n == "number" && isFinite(n);
|
|
38
|
-
}
|
|
39
|
-
function p(n) {
|
|
40
|
-
return n << 24 >> 24 === n;
|
|
41
|
-
}
|
|
42
|
-
function d(n) {
|
|
43
|
-
return n << 16 >> 16 === n;
|
|
44
|
-
}
|
|
45
|
-
function y(n) {
|
|
46
|
-
return (n | 0) === n;
|
|
47
|
-
}
|
|
48
|
-
function B(n) {
|
|
49
|
-
return typeof n == "number" && n >= -u && n <= u && Math.floor(n) === n;
|
|
50
|
-
}
|
|
51
|
-
function O(n) {
|
|
52
|
-
return (n & 255) === n;
|
|
53
|
-
}
|
|
54
|
-
function R(n) {
|
|
55
|
-
return (n & 65535) === n;
|
|
56
|
-
}
|
|
57
|
-
function A(n) {
|
|
58
|
-
return n >>> 0 === n;
|
|
59
|
-
}
|
|
60
|
-
function E(n) {
|
|
61
|
-
return typeof n == "number" && n >= 0 && n <= u && Math.floor(n) === n;
|
|
62
|
-
}
|
|
63
|
-
var c = {
|
|
64
|
-
ArrayN: x,
|
|
65
|
-
Buffer: N,
|
|
66
|
-
BufferN: _,
|
|
67
|
-
Finite: U,
|
|
68
|
-
Hex: g,
|
|
69
|
-
HexN: b,
|
|
70
|
-
Int8: p,
|
|
71
|
-
Int16: d,
|
|
72
|
-
Int32: y,
|
|
73
|
-
Int53: B,
|
|
74
|
-
Range: S,
|
|
75
|
-
StringN: m,
|
|
76
|
-
UInt8: O,
|
|
77
|
-
UInt16: R,
|
|
78
|
-
UInt32: A,
|
|
79
|
-
UInt53: E
|
|
80
|
-
};
|
|
81
|
-
for (var s in c)
|
|
82
|
-
c[s].toJSON = (function(n) {
|
|
83
|
-
return n;
|
|
84
|
-
}).bind(null, s);
|
|
85
|
-
return I = c, I;
|
|
86
|
-
}
|
|
87
|
-
export {
|
|
88
|
-
q as __require
|
|
89
|
-
};
|
package/dist/index65.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index66.cjs"),l=require("./index67.cjs"),u=require("./index68.cjs"),f=require("./index39.cjs"),m=require("./index50.cjs"),h=new TextEncoder;function A(e,n={}){return typeof e=="number"||typeof e=="bigint"?B(e,n):typeof e=="boolean"?x(e,n):l.isHex(e)?c(e,n):T(e,n)}function x(e,n={}){const t=new Uint8Array(1);return t[0]=Number(e),typeof n.size=="number"?(f.assertSize(t,{size:n.size}),u.pad(t,{size:n.size})):t}const i={zero:48,nine:57,A:65,F:70,a:97,f:102};function g(e){if(e>=i.zero&&e<=i.nine)return e-i.zero;if(e>=i.A&&e<=i.F)return e-(i.A-10);if(e>=i.a&&e<=i.f)return e-(i.a-10)}function c(e,n={}){let t=e;n.size&&(f.assertSize(t,{size:n.size}),t=u.pad(t,{dir:"right",size:n.size}));let r=t.slice(2);r.length%2&&(r=`0${r}`);const d=r.length/2,y=new Uint8Array(d);for(let s=0,o=0;s<d;s++){const b=g(r.charCodeAt(o++)),z=g(r.charCodeAt(o++));if(b===void 0||z===void 0)throw new a.BaseError(`Invalid byte sequence ("${r[o-2]}${r[o-1]}" in "${r}").`);y[s]=b*16+z}return y}function B(e,n){const t=m.numberToHex(e,n);return c(t)}function T(e,n={}){const t=h.encode(e);return typeof n.size=="number"?(f.assertSize(t,{size:n.size}),u.pad(t,{dir:"right",size:n.size})):t}exports.boolToBytes=x;exports.hexToBytes=c;exports.numberToBytes=B;exports.stringToBytes=T;exports.toBytes=A;
|
package/dist/index65.js
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { BaseError as g } from "./index66.js";
|
|
2
|
-
import { isHex as x } from "./index67.js";
|
|
3
|
-
import { pad as s } from "./index68.js";
|
|
4
|
-
import { assertSize as u } from "./index39.js";
|
|
5
|
-
import { numberToHex as h } from "./index50.js";
|
|
6
|
-
const A = /* @__PURE__ */ new TextEncoder();
|
|
7
|
-
function F(e, n = {}) {
|
|
8
|
-
return typeof e == "number" || typeof e == "bigint" ? T(e, n) : typeof e == "boolean" ? B(e, n) : x(e) ? y(e, n) : l(e, n);
|
|
9
|
-
}
|
|
10
|
-
function B(e, n = {}) {
|
|
11
|
-
const r = new Uint8Array(1);
|
|
12
|
-
return r[0] = Number(e), typeof n.size == "number" ? (u(r, { size: n.size }), s(r, { size: n.size })) : r;
|
|
13
|
-
}
|
|
14
|
-
const t = {
|
|
15
|
-
zero: 48,
|
|
16
|
-
nine: 57,
|
|
17
|
-
A: 65,
|
|
18
|
-
F: 70,
|
|
19
|
-
a: 97,
|
|
20
|
-
f: 102
|
|
21
|
-
};
|
|
22
|
-
function m(e) {
|
|
23
|
-
if (e >= t.zero && e <= t.nine)
|
|
24
|
-
return e - t.zero;
|
|
25
|
-
if (e >= t.A && e <= t.F)
|
|
26
|
-
return e - (t.A - 10);
|
|
27
|
-
if (e >= t.a && e <= t.f)
|
|
28
|
-
return e - (t.a - 10);
|
|
29
|
-
}
|
|
30
|
-
function y(e, n = {}) {
|
|
31
|
-
let r = e;
|
|
32
|
-
n.size && (u(r, { size: n.size }), r = s(r, { dir: "right", size: n.size }));
|
|
33
|
-
let i = r.slice(2);
|
|
34
|
-
i.length % 2 && (i = `0${i}`);
|
|
35
|
-
const z = i.length / 2, d = new Uint8Array(z);
|
|
36
|
-
for (let f = 0, o = 0; f < z; f++) {
|
|
37
|
-
const b = m(i.charCodeAt(o++)), c = m(i.charCodeAt(o++));
|
|
38
|
-
if (b === void 0 || c === void 0)
|
|
39
|
-
throw new g(`Invalid byte sequence ("${i[o - 2]}${i[o - 1]}" in "${i}").`);
|
|
40
|
-
d[f] = b * 16 + c;
|
|
41
|
-
}
|
|
42
|
-
return d;
|
|
43
|
-
}
|
|
44
|
-
function T(e, n) {
|
|
45
|
-
const r = h(e, n);
|
|
46
|
-
return y(r);
|
|
47
|
-
}
|
|
48
|
-
function l(e, n = {}) {
|
|
49
|
-
const r = A.encode(e);
|
|
50
|
-
return typeof n.size == "number" ? (u(r, { size: n.size }), s(r, { dir: "right", size: n.size })) : r;
|
|
51
|
-
}
|
|
52
|
-
export {
|
|
53
|
-
B as boolToBytes,
|
|
54
|
-
y as hexToBytes,
|
|
55
|
-
T as numberToBytes,
|
|
56
|
-
l as stringToBytes,
|
|
57
|
-
F as toBytes
|
|
58
|
-
};
|
package/dist/index66.cjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./index84.cjs");let i={getDocsUrl:({docsBaseUrl:s,docsPath:t="",docsSlug:e})=>t?`${s??"https://viem.sh"}${t}${e?`#${e}`:""}`:void 0,version:`viem@${l.version}`};class r extends Error{constructor(t,e={}){var o;const u=(()=>{var c;return e.cause instanceof r?e.cause.details:(c=e.cause)!=null&&c.message?e.cause.message:e.details})(),a=e.cause instanceof r&&e.cause.docsPath||e.docsPath,n=(o=i.getDocsUrl)==null?void 0:o.call(i,{...e,docsPath:a}),b=[t||"An error occurred.","",...e.metaMessages?[...e.metaMessages,""]:[],...n?[`Docs: ${n}`]:[],...u?[`Details: ${u}`]:[],...i.version?[`Version: ${i.version}`]:[]].join(`
|
|
2
|
-
`);super(b,e.cause?{cause:e.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),this.details=u,this.docsPath=a,this.metaMessages=e.metaMessages,this.name=e.name??this.name,this.shortMessage=t,this.version=l.version}walk(t){return d(this,t)}}function d(s,t){return t!=null&&t(s)?s:s&&typeof s=="object"&&"cause"in s?d(s.cause,t):t?null:s}exports.BaseError=r;
|
package/dist/index66.js
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { version as l } from "./index84.js";
|
|
2
|
-
let i = {
|
|
3
|
-
getDocsUrl: ({ docsBaseUrl: s, docsPath: t = "", docsSlug: e }) => t ? `${s ?? "https://viem.sh"}${t}${e ? `#${e}` : ""}` : void 0,
|
|
4
|
-
version: `viem@${l}`
|
|
5
|
-
};
|
|
6
|
-
class r extends Error {
|
|
7
|
-
constructor(t, e = {}) {
|
|
8
|
-
var o;
|
|
9
|
-
const u = (() => {
|
|
10
|
-
var c;
|
|
11
|
-
return e.cause instanceof r ? e.cause.details : (c = e.cause) != null && c.message ? e.cause.message : e.details;
|
|
12
|
-
})(), a = e.cause instanceof r && e.cause.docsPath || e.docsPath, n = (o = i.getDocsUrl) == null ? void 0 : o.call(i, { ...e, docsPath: a }), b = [
|
|
13
|
-
t || "An error occurred.",
|
|
14
|
-
"",
|
|
15
|
-
...e.metaMessages ? [...e.metaMessages, ""] : [],
|
|
16
|
-
...n ? [`Docs: ${n}`] : [],
|
|
17
|
-
...u ? [`Details: ${u}`] : [],
|
|
18
|
-
...i.version ? [`Version: ${i.version}`] : []
|
|
19
|
-
].join(`
|
|
20
|
-
`);
|
|
21
|
-
super(b, e.cause ? { cause: e.cause } : void 0), Object.defineProperty(this, "details", {
|
|
22
|
-
enumerable: !0,
|
|
23
|
-
configurable: !0,
|
|
24
|
-
writable: !0,
|
|
25
|
-
value: void 0
|
|
26
|
-
}), Object.defineProperty(this, "docsPath", {
|
|
27
|
-
enumerable: !0,
|
|
28
|
-
configurable: !0,
|
|
29
|
-
writable: !0,
|
|
30
|
-
value: void 0
|
|
31
|
-
}), Object.defineProperty(this, "metaMessages", {
|
|
32
|
-
enumerable: !0,
|
|
33
|
-
configurable: !0,
|
|
34
|
-
writable: !0,
|
|
35
|
-
value: void 0
|
|
36
|
-
}), Object.defineProperty(this, "shortMessage", {
|
|
37
|
-
enumerable: !0,
|
|
38
|
-
configurable: !0,
|
|
39
|
-
writable: !0,
|
|
40
|
-
value: void 0
|
|
41
|
-
}), Object.defineProperty(this, "version", {
|
|
42
|
-
enumerable: !0,
|
|
43
|
-
configurable: !0,
|
|
44
|
-
writable: !0,
|
|
45
|
-
value: void 0
|
|
46
|
-
}), Object.defineProperty(this, "name", {
|
|
47
|
-
enumerable: !0,
|
|
48
|
-
configurable: !0,
|
|
49
|
-
writable: !0,
|
|
50
|
-
value: "BaseError"
|
|
51
|
-
}), this.details = u, this.docsPath = a, this.metaMessages = e.metaMessages, this.name = e.name ?? this.name, this.shortMessage = t, this.version = l;
|
|
52
|
-
}
|
|
53
|
-
walk(t) {
|
|
54
|
-
return d(this, t);
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
function d(s, t) {
|
|
58
|
-
return t != null && t(s) ? s : s && typeof s == "object" && "cause" in s ? d(s.cause, t) : t ? null : s;
|
|
59
|
-
}
|
|
60
|
-
export {
|
|
61
|
-
r as BaseError
|
|
62
|
-
};
|
package/dist/index67.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function r(t,{strict:e=!0}={}){return!t||typeof t!="string"?!1:e?/^0x[0-9a-fA-F]*$/.test(t):t.startsWith("0x")}exports.isHex=r;
|
package/dist/index67.js
DELETED
package/dist/index68.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index97.cjs");function p(e,{dir:n,size:t=32}={}){return typeof e=="string"?o(e,{dir:n,size:t}):l(e,{dir:n,size:t})}function o(e,{dir:n,size:t=32}={}){if(t===null)return e;const r=e.replace("0x","");if(r.length>t*2)throw new i.SizeExceedsPaddingSizeError({size:Math.ceil(r.length/2),targetSize:t,type:"hex"});return`0x${r[n==="right"?"padEnd":"padStart"](t*2,"0")}`}function l(e,{dir:n,size:t=32}={}){if(t===null)return e;if(e.length>t)throw new i.SizeExceedsPaddingSizeError({size:e.length,targetSize:t,type:"bytes"});const r=new Uint8Array(t);for(let a=0;a<t;a++){const d=n==="right";r[d?a:t-a-1]=e[d?a:e.length-a-1]}return r}exports.pad=p;exports.padBytes=l;exports.padHex=o;
|
package/dist/index68.js
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { SizeExceedsPaddingSizeError as d } from "./index97.js";
|
|
2
|
-
function f(n, { dir: r, size: t = 32 } = {}) {
|
|
3
|
-
return typeof n == "string" ? p(n, { dir: r, size: t }) : i(n, { dir: r, size: t });
|
|
4
|
-
}
|
|
5
|
-
function p(n, { dir: r, size: t = 32 } = {}) {
|
|
6
|
-
if (t === null)
|
|
7
|
-
return n;
|
|
8
|
-
const e = n.replace("0x", "");
|
|
9
|
-
if (e.length > t * 2)
|
|
10
|
-
throw new d({
|
|
11
|
-
size: Math.ceil(e.length / 2),
|
|
12
|
-
targetSize: t,
|
|
13
|
-
type: "hex"
|
|
14
|
-
});
|
|
15
|
-
return `0x${e[r === "right" ? "padEnd" : "padStart"](t * 2, "0")}`;
|
|
16
|
-
}
|
|
17
|
-
function i(n, { dir: r, size: t = 32 } = {}) {
|
|
18
|
-
if (t === null)
|
|
19
|
-
return n;
|
|
20
|
-
if (n.length > t)
|
|
21
|
-
throw new d({
|
|
22
|
-
size: n.length,
|
|
23
|
-
targetSize: t,
|
|
24
|
-
type: "bytes"
|
|
25
|
-
});
|
|
26
|
-
const e = new Uint8Array(t);
|
|
27
|
-
for (let a = 0; a < t; a++) {
|
|
28
|
-
const o = r === "right";
|
|
29
|
-
e[o ? a : t - a - 1] = n[o ? a : n.length - a - 1];
|
|
30
|
-
}
|
|
31
|
-
return e;
|
|
32
|
-
}
|
|
33
|
-
export {
|
|
34
|
-
f as pad,
|
|
35
|
-
i as padBytes,
|
|
36
|
-
p as padHex
|
|
37
|
-
};
|
package/dist/index69.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index100.cjs"),e={bytes:new Uint8Array,dataView:new DataView(new ArrayBuffer(0)),position:0,positionReadCount:new Map,recursiveReadCount:0,recursiveReadLimit:Number.POSITIVE_INFINITY,assertReadLimit(){if(this.recursiveReadCount>=this.recursiveReadLimit)throw new o.RecursiveReadLimitExceededError({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(t){if(t<0||t>this.bytes.length-1)throw new o.PositionOutOfBoundsError({length:this.bytes.length,position:t})},decrementPosition(t){if(t<0)throw new o.NegativeOffsetError({offset:t});const i=this.position-t;this.assertPosition(i),this.position=i},getReadCount(t){return this.positionReadCount.get(t||this.position)||0},incrementPosition(t){if(t<0)throw new o.NegativeOffsetError({offset:t});const i=this.position+t;this.assertPosition(i),this.position=i},inspectByte(t){const i=t??this.position;return this.assertPosition(i),this.bytes[i]},inspectBytes(t,i){const s=i??this.position;return this.assertPosition(s+t-1),this.bytes.subarray(s,s+t)},inspectUint8(t){const i=t??this.position;return this.assertPosition(i),this.bytes[i]},inspectUint16(t){const i=t??this.position;return this.assertPosition(i+1),this.dataView.getUint16(i)},inspectUint24(t){const i=t??this.position;return this.assertPosition(i+2),(this.dataView.getUint16(i)<<8)+this.dataView.getUint8(i+2)},inspectUint32(t){const i=t??this.position;return this.assertPosition(i+3),this.dataView.getUint32(i)},pushByte(t){this.assertPosition(this.position),this.bytes[this.position]=t,this.position++},pushBytes(t){this.assertPosition(this.position+t.length-1),this.bytes.set(t,this.position),this.position+=t.length},pushUint8(t){this.assertPosition(this.position),this.bytes[this.position]=t,this.position++},pushUint16(t){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,t),this.position+=2},pushUint24(t){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,t>>8),this.dataView.setUint8(this.position+2,t&255),this.position+=3},pushUint32(t){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,t),this.position+=4},readByte(){this.assertReadLimit(),this._touch();const t=this.inspectByte();return this.position++,t},readBytes(t,i){this.assertReadLimit(),this._touch();const s=this.inspectBytes(t);return this.position+=i??t,s},readUint8(){this.assertReadLimit(),this._touch();const t=this.inspectUint8();return this.position+=1,t},readUint16(){this.assertReadLimit(),this._touch();const t=this.inspectUint16();return this.position+=2,t},readUint24(){this.assertReadLimit(),this._touch();const t=this.inspectUint24();return this.position+=3,t},readUint32(){this.assertReadLimit(),this._touch();const t=this.inspectUint32();return this.position+=4,t},get remaining(){return this.bytes.length-this.position},setPosition(t){const i=this.position;return this.assertPosition(t),this.position=t,()=>this.position=i},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;const t=this.getReadCount();this.positionReadCount.set(this.position,t+1),t>0&&this.recursiveReadCount++}};function n(t,{recursiveReadLimit:i=8192}={}){const s=Object.create(e);return s.bytes=t,s.dataView=new DataView(t.buffer,t.byteOffset,t.byteLength),s.positionReadCount=new Map,s.recursiveReadLimit=i,s}exports.createCursor=n;
|
package/dist/index69.js
DELETED
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
import { RecursiveReadLimitExceededError as e, PositionOutOfBoundsError as n, NegativeOffsetError as o } from "./index100.js";
|
|
2
|
-
const h = {
|
|
3
|
-
bytes: new Uint8Array(),
|
|
4
|
-
dataView: new DataView(new ArrayBuffer(0)),
|
|
5
|
-
position: 0,
|
|
6
|
-
positionReadCount: /* @__PURE__ */ new Map(),
|
|
7
|
-
recursiveReadCount: 0,
|
|
8
|
-
recursiveReadLimit: Number.POSITIVE_INFINITY,
|
|
9
|
-
assertReadLimit() {
|
|
10
|
-
if (this.recursiveReadCount >= this.recursiveReadLimit)
|
|
11
|
-
throw new e({
|
|
12
|
-
count: this.recursiveReadCount + 1,
|
|
13
|
-
limit: this.recursiveReadLimit
|
|
14
|
-
});
|
|
15
|
-
},
|
|
16
|
-
assertPosition(t) {
|
|
17
|
-
if (t < 0 || t > this.bytes.length - 1)
|
|
18
|
-
throw new n({
|
|
19
|
-
length: this.bytes.length,
|
|
20
|
-
position: t
|
|
21
|
-
});
|
|
22
|
-
},
|
|
23
|
-
decrementPosition(t) {
|
|
24
|
-
if (t < 0)
|
|
25
|
-
throw new o({ offset: t });
|
|
26
|
-
const i = this.position - t;
|
|
27
|
-
this.assertPosition(i), this.position = i;
|
|
28
|
-
},
|
|
29
|
-
getReadCount(t) {
|
|
30
|
-
return this.positionReadCount.get(t || this.position) || 0;
|
|
31
|
-
},
|
|
32
|
-
incrementPosition(t) {
|
|
33
|
-
if (t < 0)
|
|
34
|
-
throw new o({ offset: t });
|
|
35
|
-
const i = this.position + t;
|
|
36
|
-
this.assertPosition(i), this.position = i;
|
|
37
|
-
},
|
|
38
|
-
inspectByte(t) {
|
|
39
|
-
const i = t ?? this.position;
|
|
40
|
-
return this.assertPosition(i), this.bytes[i];
|
|
41
|
-
},
|
|
42
|
-
inspectBytes(t, i) {
|
|
43
|
-
const s = i ?? this.position;
|
|
44
|
-
return this.assertPosition(s + t - 1), this.bytes.subarray(s, s + t);
|
|
45
|
-
},
|
|
46
|
-
inspectUint8(t) {
|
|
47
|
-
const i = t ?? this.position;
|
|
48
|
-
return this.assertPosition(i), this.bytes[i];
|
|
49
|
-
},
|
|
50
|
-
inspectUint16(t) {
|
|
51
|
-
const i = t ?? this.position;
|
|
52
|
-
return this.assertPosition(i + 1), this.dataView.getUint16(i);
|
|
53
|
-
},
|
|
54
|
-
inspectUint24(t) {
|
|
55
|
-
const i = t ?? this.position;
|
|
56
|
-
return this.assertPosition(i + 2), (this.dataView.getUint16(i) << 8) + this.dataView.getUint8(i + 2);
|
|
57
|
-
},
|
|
58
|
-
inspectUint32(t) {
|
|
59
|
-
const i = t ?? this.position;
|
|
60
|
-
return this.assertPosition(i + 3), this.dataView.getUint32(i);
|
|
61
|
-
},
|
|
62
|
-
pushByte(t) {
|
|
63
|
-
this.assertPosition(this.position), this.bytes[this.position] = t, this.position++;
|
|
64
|
-
},
|
|
65
|
-
pushBytes(t) {
|
|
66
|
-
this.assertPosition(this.position + t.length - 1), this.bytes.set(t, this.position), this.position += t.length;
|
|
67
|
-
},
|
|
68
|
-
pushUint8(t) {
|
|
69
|
-
this.assertPosition(this.position), this.bytes[this.position] = t, this.position++;
|
|
70
|
-
},
|
|
71
|
-
pushUint16(t) {
|
|
72
|
-
this.assertPosition(this.position + 1), this.dataView.setUint16(this.position, t), this.position += 2;
|
|
73
|
-
},
|
|
74
|
-
pushUint24(t) {
|
|
75
|
-
this.assertPosition(this.position + 2), this.dataView.setUint16(this.position, t >> 8), this.dataView.setUint8(this.position + 2, t & 255), this.position += 3;
|
|
76
|
-
},
|
|
77
|
-
pushUint32(t) {
|
|
78
|
-
this.assertPosition(this.position + 3), this.dataView.setUint32(this.position, t), this.position += 4;
|
|
79
|
-
},
|
|
80
|
-
readByte() {
|
|
81
|
-
this.assertReadLimit(), this._touch();
|
|
82
|
-
const t = this.inspectByte();
|
|
83
|
-
return this.position++, t;
|
|
84
|
-
},
|
|
85
|
-
readBytes(t, i) {
|
|
86
|
-
this.assertReadLimit(), this._touch();
|
|
87
|
-
const s = this.inspectBytes(t);
|
|
88
|
-
return this.position += i ?? t, s;
|
|
89
|
-
},
|
|
90
|
-
readUint8() {
|
|
91
|
-
this.assertReadLimit(), this._touch();
|
|
92
|
-
const t = this.inspectUint8();
|
|
93
|
-
return this.position += 1, t;
|
|
94
|
-
},
|
|
95
|
-
readUint16() {
|
|
96
|
-
this.assertReadLimit(), this._touch();
|
|
97
|
-
const t = this.inspectUint16();
|
|
98
|
-
return this.position += 2, t;
|
|
99
|
-
},
|
|
100
|
-
readUint24() {
|
|
101
|
-
this.assertReadLimit(), this._touch();
|
|
102
|
-
const t = this.inspectUint24();
|
|
103
|
-
return this.position += 3, t;
|
|
104
|
-
},
|
|
105
|
-
readUint32() {
|
|
106
|
-
this.assertReadLimit(), this._touch();
|
|
107
|
-
const t = this.inspectUint32();
|
|
108
|
-
return this.position += 4, t;
|
|
109
|
-
},
|
|
110
|
-
get remaining() {
|
|
111
|
-
return this.bytes.length - this.position;
|
|
112
|
-
},
|
|
113
|
-
setPosition(t) {
|
|
114
|
-
const i = this.position;
|
|
115
|
-
return this.assertPosition(t), this.position = t, () => this.position = i;
|
|
116
|
-
},
|
|
117
|
-
_touch() {
|
|
118
|
-
if (this.recursiveReadLimit === Number.POSITIVE_INFINITY)
|
|
119
|
-
return;
|
|
120
|
-
const t = this.getReadCount();
|
|
121
|
-
this.positionReadCount.set(this.position, t + 1), t > 0 && this.recursiveReadCount++;
|
|
122
|
-
}
|
|
123
|
-
};
|
|
124
|
-
function a(t, { recursiveReadLimit: i = 8192 } = {}) {
|
|
125
|
-
const s = Object.create(h);
|
|
126
|
-
return s.bytes = t, s.dataView = new DataView(t.buffer, t.byteOffset, t.byteLength), s.positionReadCount = /* @__PURE__ */ new Map(), s.recursiveReadLimit = i, s;
|
|
127
|
-
}
|
|
128
|
-
export {
|
|
129
|
-
a as createCursor
|
|
130
|
-
};
|
package/dist/index7.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index3.cjs"),e=require("./index6.cjs"),o=(t,u,d)=>{const r=S(t.source_swap,u),a=S(t.destination_swap,d);if(a===e.SwapStatus.RedeemDetected)return e.OrderStatus.RedeemDetected;if(r===e.SwapStatus.Redeemed)return e.OrderStatus.CounterPartyRedeemed;if(r===e.SwapStatus.RedeemDetected)return e.OrderStatus.CounterPartyRedeemDetected;if(a===e.SwapStatus.Redeemed)return e.OrderStatus.Redeemed;if(r===e.SwapStatus.Refunded)return e.OrderStatus.Refunded;if(r===e.SwapStatus.RefundDetected)return e.OrderStatus.RefundDetected;if(a===e.SwapStatus.Expired)return e.OrderStatus.CounterPartySwapExpired;if(r===e.SwapStatus.Expired)return e.OrderStatus.Expired;if(a===e.SwapStatus.Refunded)return e.OrderStatus.CounterPartyRefunded;if(a===e.SwapStatus.RefundDetected)return e.OrderStatus.CounterPartyRefundDetected;const n=Number(t.create_order.additional_data.deadline);return a===e.SwapStatus.Initiated?e.OrderStatus.CounterPartyInitiated:a===e.SwapStatus.InitiateDetected?e.OrderStatus.CounterPartyInitiateDetected:i(n,12)?e.OrderStatus.DeadLineExceeded:r===e.SwapStatus.Initiated?e.OrderStatus.Initiated:i(n,1)?e.OrderStatus.DeadLineExceeded:r===e.SwapStatus.InitiateDetected?e.OrderStatus.InitiateDetected:e.OrderStatus.Matched},S=(t,u)=>{if(t.redeem_tx_hash)return Number(t.redeem_block_number)?e.SwapStatus.Redeemed:e.SwapStatus.RedeemDetected;if(t.refund_tx_hash)return Number(t.refund_block_number)?e.SwapStatus.Refunded:e.SwapStatus.RefundDetected;if(Number(t.initiate_block_number)){const d=Number(t.initiate_block_number)+t.timelock;if(u>d)return e.SwapStatus.Expired}return t.initiate_tx_hash?Number(t.initiate_block_number)?e.SwapStatus.Initiated:e.SwapStatus.InitiateDetected:e.SwapStatus.Idle},p=(t,u,d)=>{const r=o(t,u,d);return f(r)},f=t=>{switch(t){case e.OrderStatus.Matched:return s.OrderActions.Initiate;case e.OrderStatus.CounterPartyInitiated:case e.OrderStatus.CounterPartyInitiateDetected:case e.OrderStatus.RedeemDetected:return s.OrderActions.Redeem;case e.OrderStatus.Expired:return s.OrderActions.Refund;default:return s.OrderActions.Idle}},i=(t,u=0)=>{const d=Date.now(),r=t*1e3+u*36e5;return d>=r},m=t=>t.filter(u=>{const{source_swap:d,create_order:r}=u,{initiate_tx_hash:a,initiate_block_number:n}=d,{deadline:c}=r.additional_data;return a&&Number(n)?!0:a&&!Number(n)?!i(Number(c),12):a?!0:!i(Number(c),1)});exports.ParseOrderStatus=o;exports.ParseSwapStatus=S;exports.filterDeadlineExpiredOrders=m;exports.isExpired=i;exports.parseAction=p;exports.parseActionFromStatus=f;
|
package/dist/index7.js
DELETED
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import { OrderActions as c } from "./index3.js";
|
|
2
|
-
import { SwapStatus as t, OrderStatus as e } from "./index6.js";
|
|
3
|
-
const m = (r, d, u) => {
|
|
4
|
-
const n = s(
|
|
5
|
-
r.source_swap,
|
|
6
|
-
d
|
|
7
|
-
), i = s(
|
|
8
|
-
r.destination_swap,
|
|
9
|
-
u
|
|
10
|
-
);
|
|
11
|
-
if (i === t.RedeemDetected)
|
|
12
|
-
return e.RedeemDetected;
|
|
13
|
-
if (n === t.Redeemed)
|
|
14
|
-
return e.CounterPartyRedeemed;
|
|
15
|
-
if (n === t.RedeemDetected)
|
|
16
|
-
return e.CounterPartyRedeemDetected;
|
|
17
|
-
if (i === t.Redeemed) return e.Redeemed;
|
|
18
|
-
if (n === t.Refunded) return e.Refunded;
|
|
19
|
-
if (n === t.RefundDetected)
|
|
20
|
-
return e.RefundDetected;
|
|
21
|
-
if (i === t.Expired)
|
|
22
|
-
return e.CounterPartySwapExpired;
|
|
23
|
-
if (n === t.Expired) return e.Expired;
|
|
24
|
-
if (i === t.Refunded)
|
|
25
|
-
return e.CounterPartyRefunded;
|
|
26
|
-
if (i === t.RefundDetected)
|
|
27
|
-
return e.CounterPartyRefundDetected;
|
|
28
|
-
const a = Number(
|
|
29
|
-
r.create_order.additional_data.deadline
|
|
30
|
-
);
|
|
31
|
-
return i === t.Initiated ? e.CounterPartyInitiated : i === t.InitiateDetected ? e.CounterPartyInitiateDetected : o(a, 12) ? e.DeadLineExceeded : n === t.Initiated ? e.Initiated : o(a, 1) ? e.DeadLineExceeded : n === t.InitiateDetected ? e.InitiateDetected : e.Matched;
|
|
32
|
-
}, s = (r, d) => {
|
|
33
|
-
if (r.redeem_tx_hash)
|
|
34
|
-
return Number(r.redeem_block_number) ? t.Redeemed : t.RedeemDetected;
|
|
35
|
-
if (r.refund_tx_hash)
|
|
36
|
-
return Number(r.refund_block_number) ? t.Refunded : t.RefundDetected;
|
|
37
|
-
if (Number(r.initiate_block_number)) {
|
|
38
|
-
const u = Number(r.initiate_block_number) + r.timelock;
|
|
39
|
-
if (d > u) return t.Expired;
|
|
40
|
-
}
|
|
41
|
-
return r.initiate_tx_hash ? Number(r.initiate_block_number) ? t.Initiated : t.InitiateDetected : t.Idle;
|
|
42
|
-
}, D = (r, d, u) => {
|
|
43
|
-
const n = m(
|
|
44
|
-
r,
|
|
45
|
-
d,
|
|
46
|
-
u
|
|
47
|
-
);
|
|
48
|
-
return _(n);
|
|
49
|
-
}, _ = (r) => {
|
|
50
|
-
switch (r) {
|
|
51
|
-
case e.Matched:
|
|
52
|
-
return c.Initiate;
|
|
53
|
-
case e.CounterPartyInitiated:
|
|
54
|
-
case e.CounterPartyInitiateDetected:
|
|
55
|
-
case e.RedeemDetected:
|
|
56
|
-
return c.Redeem;
|
|
57
|
-
case e.Expired:
|
|
58
|
-
return c.Refund;
|
|
59
|
-
default:
|
|
60
|
-
return c.Idle;
|
|
61
|
-
}
|
|
62
|
-
}, o = (r, d = 0) => {
|
|
63
|
-
const u = Date.now(), n = r * 1e3 + d * 36e5;
|
|
64
|
-
return u >= n;
|
|
65
|
-
}, l = (r) => r.filter((d) => {
|
|
66
|
-
const { source_swap: u, create_order: n } = d, { initiate_tx_hash: i, initiate_block_number: a } = u, { deadline: f } = n.additional_data;
|
|
67
|
-
return i && Number(a) ? !0 : i && !Number(a) ? !o(Number(f), 12) : i ? !0 : !o(Number(f), 1);
|
|
68
|
-
});
|
|
69
|
-
export {
|
|
70
|
-
m as ParseOrderStatus,
|
|
71
|
-
s as ParseSwapStatus,
|
|
72
|
-
l as filterDeadlineExpiredOrders,
|
|
73
|
-
o as isExpired,
|
|
74
|
-
D as parseAction,
|
|
75
|
-
_ as parseActionFromStatus
|
|
76
|
-
};
|
package/dist/index70.cjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index66.cjs");function i(n){const r=Object.entries(n).map(([a,e])=>e===void 0||e===!1?null:[a,e]).filter(Boolean),o=r.reduce((a,[e])=>Math.max(a,e.length),0);return r.map(([a,e])=>` ${`${a}:`.padEnd(o+1)} ${e}`).join(`
|
|
2
|
-
`)}class s extends t.BaseError{constructor({v:r}){super(`Invalid \`v\` value "${r}". Expected 27 or 28.`,{name:"InvalidLegacyVError"})}}class c extends t.BaseError{constructor({transaction:r}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",i(r),"}","","To infer the type, either provide:","- a `type` to the Transaction, or","- an EIP-1559 Transaction with `maxFeePerGas`, or","- an EIP-2930 Transaction with `gasPrice` & `accessList`, or","- an EIP-4844 Transaction with `blobs`, `blobVersionedHashes`, `sidecars`, or","- an EIP-7702 Transaction with `authorizationList`, or","- a Legacy Transaction with `gasPrice`"],name:"InvalidSerializableTransactionError"})}}class l extends t.BaseError{constructor({storageKey:r}){super(`Size for storage key "${r}" is invalid. Expected 32 bytes. Got ${Math.floor((r.length-2)/2)} bytes.`,{name:"InvalidStorageKeySizeError"})}}exports.InvalidLegacyVError=s;exports.InvalidSerializableTransactionError=c;exports.InvalidStorageKeySizeError=l;exports.prettyPrint=i;
|