@gardenfi/core 0.2.0-beta.74 → 0.2.0-beta.75
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 +16 -15
- package/dist/index10.cjs +1 -1
- package/dist/index10.js +42 -31
- package/dist/index100.cjs +1 -1
- package/dist/index100.js +18 -32
- package/dist/index101.cjs +1 -1
- package/dist/index101.js +6 -366
- package/dist/index102.cjs +1 -1
- package/dist/index102.js +33 -21
- package/dist/index103.cjs +1 -1
- package/dist/index103.js +2 -56
- package/dist/index104.cjs +1 -1
- package/dist/index104.js +38 -3
- package/dist/index105.cjs +1 -1
- package/dist/index105.js +25 -45
- package/dist/index106.cjs +1 -1
- package/dist/index106.js +7 -26
- package/dist/index107.cjs +1 -1
- package/dist/index107.js +5 -2
- package/dist/index108.cjs +1 -1
- package/dist/index108.js +11 -2
- package/dist/index109.cjs +1 -1
- package/dist/index109.js +2 -62
- package/dist/index11.cjs +1 -1
- package/dist/index11.js +2 -2
- package/dist/index110.cjs +1 -1
- package/dist/index110.js +55 -32
- package/dist/index111.cjs +1 -1
- package/dist/index111.js +2 -5
- package/dist/index112.cjs +1 -1
- package/dist/index112.js +40 -2
- package/dist/index113.cjs +1 -1
- package/dist/index113.js +38 -53
- package/dist/index114.cjs +1 -1
- package/dist/index114.js +18 -2
- package/dist/index115.cjs +1 -1
- package/dist/index115.js +101 -32
- package/dist/index116.cjs +1 -1
- package/dist/index116.js +17 -39
- package/dist/index117.cjs +1 -1
- package/dist/index117.js +224 -16
- package/dist/index118.cjs +1 -1
- package/dist/index118.js +4 -109
- package/dist/index119.cjs +1 -1
- package/dist/index119.js +155 -18
- package/dist/index120.cjs +1 -1
- package/dist/index120.js +2 -226
- package/dist/index121.cjs +1 -1
- package/dist/index121.js +73 -4
- package/dist/index122.cjs +1 -1
- package/dist/index122.js +55 -151
- package/dist/index123.cjs +1 -1
- package/dist/index123.js +35 -2
- package/dist/index124.cjs +1 -1
- package/dist/index124.js +5 -73
- package/dist/index125.cjs +1 -1
- package/dist/index125.js +2 -2
- package/dist/index126.cjs +1 -1
- package/dist/index126.js +8 -8
- package/dist/index127.cjs +1 -1
- package/dist/index127.js +1 -1
- package/dist/index130.cjs +1 -1
- package/dist/index130.js +2 -19
- package/dist/index131.cjs +1 -1
- package/dist/index131.js +356 -2
- package/dist/index132.cjs +1 -1
- package/dist/index132.js +206 -323
- package/dist/index133.cjs +1 -1
- package/dist/index133.js +37 -208
- package/dist/index134.cjs +1 -1
- package/dist/index134.js +59 -65
- package/dist/index135.cjs +1 -1
- package/dist/index135.js +10 -60
- package/dist/index136.cjs +1 -1
- package/dist/index136.js +45 -12
- package/dist/index137.cjs +1 -1
- package/dist/index137.js +56 -38
- package/dist/index138.cjs +1 -1
- package/dist/index138.js +19 -63
- package/dist/index14.cjs +1 -1
- package/dist/index14.js +9 -4
- package/dist/index141.cjs +1 -1
- package/dist/index141.js +3 -3
- package/dist/index145.cjs +1 -1
- package/dist/index145.js +1 -1
- package/dist/index148.cjs +1 -1
- package/dist/index148.js +1 -1
- package/dist/index15.cjs +1 -1
- package/dist/index15.js +32 -2
- package/dist/index16.cjs +1 -1
- package/dist/index16.js +10 -17
- package/dist/index17.cjs +1 -1
- package/dist/index17.js +18 -12
- package/dist/index18.cjs +1 -1
- package/dist/index18.js +15 -16
- package/dist/index19.cjs +1 -1
- package/dist/index19.js +39 -16
- package/dist/index20.cjs +1 -1
- package/dist/index20.js +25 -52
- package/dist/index21.cjs +1 -1
- package/dist/index21.js +2 -9
- package/dist/index22.cjs +1 -1
- package/dist/index22.js +138 -9
- package/dist/index23.cjs +1 -1
- package/dist/index23.js +2 -138
- package/dist/index24.cjs +1 -1
- package/dist/index24.js +9 -2
- package/dist/index25.cjs +1 -1
- package/dist/index25.js +7 -11
- package/dist/index26.cjs +3 -1
- package/dist/index26.js +27 -36
- package/dist/index27.cjs +1 -1
- package/dist/index27.js +17 -44
- package/dist/index28.cjs +2 -1
- package/dist/index28.js +24 -27
- package/dist/index29.cjs +1 -1
- package/dist/index29.js +40 -14
- package/dist/index30.cjs +1 -1
- package/dist/index30.js +197 -22
- package/dist/index31.cjs +1 -1
- package/dist/index31.js +2 -26
- package/dist/index32.cjs +1 -1
- package/dist/index32.js +2 -55
- package/dist/index33.cjs +1 -1
- package/dist/index33.js +2 -28
- package/dist/index34.cjs +1 -3
- package/dist/index34.js +11 -26
- package/dist/index35.cjs +1 -1
- package/dist/index35.js +39 -17
- package/dist/index36.cjs +1 -2
- package/dist/index36.js +40 -23
- package/dist/index37.cjs +1 -1
- package/dist/index37.js +26 -39
- package/dist/index38.cjs +1 -1
- package/dist/index38.js +15 -199
- package/dist/index39.cjs +1 -1
- package/dist/index39.js +24 -2
- package/dist/index40.cjs +1 -1
- package/dist/index40.js +26 -2
- package/dist/index41.cjs +1 -1
- package/dist/index41.js +55 -2
- package/dist/index42.cjs +1 -1
- package/dist/index42.js +27 -12
- package/dist/index43.cjs +1 -1
- package/dist/index43.js +174 -11
- package/dist/index44.cjs +1 -1
- package/dist/index44.js +2 -4
- package/dist/index45.cjs +1 -1
- package/dist/index45.js +34 -45
- package/dist/index46.cjs +1 -1
- package/dist/index46.js +9 -43
- package/dist/index47.cjs +1 -1
- package/dist/index47.js +10 -169
- package/dist/index48.cjs +1 -1
- package/dist/index48.js +11 -12
- package/dist/index49.cjs +1 -1
- package/dist/index49.js +3 -4
- package/dist/index5.cjs +1 -1
- package/dist/index5.js +48 -59
- package/dist/index50.cjs +1 -1
- package/dist/index50.js +45 -16
- package/dist/index51.cjs +1 -1
- package/dist/index51.js +40 -9
- package/dist/index52.cjs +1 -1
- package/dist/index52.js +167 -170
- package/dist/index53.cjs +1 -1
- package/dist/index53.js +12 -21
- package/dist/index54.cjs +1 -1
- package/dist/index54.js +5 -2
- package/dist/index55.cjs +1 -1
- package/dist/index55.js +17 -35
- package/dist/index56.cjs +1 -1
- package/dist/index56.js +11 -8
- package/dist/index57.cjs +1 -1
- package/dist/index57.js +19 -34
- package/dist/index58.cjs +1 -1
- package/dist/index58.js +31 -55
- package/dist/index59.cjs +1 -2
- package/dist/index59.js +2 -60
- package/dist/index60.cjs +6 -1
- package/dist/index60.js +949 -6
- package/dist/index61.cjs +1 -1
- package/dist/index61.js +2 -128
- package/dist/index62.cjs +1 -2
- package/dist/index62.js +61 -42
- package/dist/index63.cjs +1 -1
- package/dist/index63.js +33 -9
- package/dist/index64.cjs +1 -1
- package/dist/index64.js +86 -10
- package/dist/index65.cjs +1 -1
- package/dist/index65.js +55 -11
- package/dist/index66.cjs +2 -1
- package/dist/index66.js +59 -13
- package/dist/index67.cjs +1 -1
- package/dist/index67.js +3 -6
- package/dist/index68.cjs +1 -1
- package/dist/index68.js +33 -16
- package/dist/index69.cjs +1 -1
- package/dist/index69.js +126 -77
- package/dist/index70.cjs +2 -1
- package/dist/index70.js +42 -14
- package/dist/index71.cjs +1 -1
- package/dist/index71.js +8 -18
- package/dist/index72.cjs +1 -1
- package/dist/index72.js +9 -5
- package/dist/index73.cjs +1 -1
- package/dist/index73.js +11 -21
- package/dist/index74.cjs +1 -1
- package/dist/index74.js +13 -13
- package/dist/index75.cjs +1 -1
- package/dist/index75.js +7 -2
- package/dist/index76.cjs +1 -1
- package/dist/index76.js +18 -2
- package/dist/index77.cjs +1 -2
- package/dist/index77.js +76 -32
- package/dist/index78.cjs +1 -1
- package/dist/index78.js +14 -5
- package/dist/index79.cjs +1 -1
- package/dist/index79.js +18 -19
- package/dist/index8.cjs +1 -1
- package/dist/index8.js +5 -6
- package/dist/index80.cjs +1 -1
- package/dist/index80.js +19 -29
- package/dist/index81.cjs +1 -1
- package/dist/index81.js +14 -2
- package/dist/index82.cjs +1 -6
- package/dist/index82.js +9 -949
- package/dist/index83.cjs +1 -1
- package/dist/index83.js +2 -2
- package/dist/index84.cjs +1 -1
- package/dist/index84.js +2 -62
- package/dist/index85.cjs +2 -1
- package/dist/index85.js +34 -32
- package/dist/index86.cjs +1 -1
- package/dist/index86.js +5 -86
- package/dist/index87.cjs +1 -1
- package/dist/index87.js +19 -12
- package/dist/index88.cjs +1 -1
- package/dist/index88.js +34 -6
- package/dist/index89.cjs +1 -1
- package/dist/index89.js +365 -111
- package/dist/index90.cjs +1 -1
- package/dist/index90.js +21 -7
- package/dist/index91.cjs +1 -1
- package/dist/index91.js +55 -32
- package/dist/index92.cjs +1 -1
- package/dist/index92.js +3 -2
- package/dist/index93.cjs +1 -1
- package/dist/index93.js +45 -34
- package/dist/index94.cjs +1 -1
- package/dist/index94.js +26 -29
- package/dist/index95.cjs +1 -1
- package/dist/index95.js +2 -21
- package/dist/index96.cjs +1 -1
- package/dist/index96.js +2 -7
- package/dist/index97.cjs +1 -1
- package/dist/index97.js +13 -5
- package/dist/index98.cjs +1 -1
- package/dist/index98.js +6 -10
- package/dist/index99.cjs +1 -1
- package/dist/index99.js +111 -18
- package/dist/src/index.d.ts +1 -1
- package/dist/src/lib/evm/relay/evmRelay.d.ts +1 -1
- package/dist/src/lib/evm/relay/evmRelay.types.d.ts +1 -1
- package/dist/src/lib/utils.d.ts +2 -0
- package/package.json +1 -1
package/dist/index20.js
CHANGED
|
@@ -1,55 +1,28 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
},
|
|
21
|
-
contracts: {
|
|
22
|
-
...a.contracts,
|
|
23
|
-
disputeGameFactory: {
|
|
24
|
-
[e]: {
|
|
25
|
-
address: "0xd6E6dBf4F7EA0ac412fD8b65ED297e64BB7a06E1"
|
|
1
|
+
var u = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
2
|
+
function f(e) {
|
|
3
|
+
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
4
|
+
}
|
|
5
|
+
function l(e) {
|
|
6
|
+
if (e.__esModule) return e;
|
|
7
|
+
var r = e.default;
|
|
8
|
+
if (typeof r == "function") {
|
|
9
|
+
var t = function o() {
|
|
10
|
+
return this instanceof o ? Reflect.construct(r, arguments, this.constructor) : r.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
t.prototype = r.prototype;
|
|
13
|
+
} else t = {};
|
|
14
|
+
return Object.defineProperty(t, "__esModule", { value: !0 }), Object.keys(e).forEach(function(o) {
|
|
15
|
+
var n = Object.getOwnPropertyDescriptor(e, o);
|
|
16
|
+
Object.defineProperty(t, o, n.get ? n : {
|
|
17
|
+
enumerable: !0,
|
|
18
|
+
get: function() {
|
|
19
|
+
return e[o];
|
|
26
20
|
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
address: "0x84457ca9D0163FbC4bbfe4Dfbb20ba46e48DF254"
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
portal: {
|
|
34
|
-
[e]: {
|
|
35
|
-
address: "0x49f53e41452c74589e85ca1677426ba426459e85",
|
|
36
|
-
blockCreated: 4446677
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
|
-
l1StandardBridge: {
|
|
40
|
-
[e]: {
|
|
41
|
-
address: "0xfd0Bf71F60660E2f608ed56e1659C450eB113120",
|
|
42
|
-
blockCreated: 4446677
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
multicall3: {
|
|
46
|
-
address: "0xca11bde05977b3631167028862be2a173976ca11",
|
|
47
|
-
blockCreated: 1059647
|
|
48
|
-
}
|
|
49
|
-
},
|
|
50
|
-
testnet: !0,
|
|
51
|
-
sourceId: e
|
|
52
|
-
});
|
|
21
|
+
});
|
|
22
|
+
}), t;
|
|
23
|
+
}
|
|
53
24
|
export {
|
|
54
|
-
|
|
25
|
+
u as commonjsGlobal,
|
|
26
|
+
l as getAugmentedNamespace,
|
|
27
|
+
f as getDefaultExportFromCjs
|
|
55
28
|
};
|
package/dist/index21.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e={};exports.__exports=e;
|
package/dist/index21.js
CHANGED
package/dist/index22.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(
|
|
1
|
+
"use strict";var v=Object.defineProperty;var k=(r,o,f)=>o in r?v(r,o,{enumerable:!0,configurable:!0,writable:!0,value:f}):r[o]=f;var a=(r,o,f)=>k(r,typeof o!="symbol"?o+"":o,f);const c=require("./index23.cjs");require("./index26.cjs");require("./index27.cjs");const b=require("./index28.cjs"),P=require("./index29.cjs");require("./index30.cjs");const K=require("./index31.cjs"),x=require("./index32.cjs"),g=require("./index33.cjs");Object.defineProperty(c.__exports,"__esModule",{value:!0});c.__exports.ECPairFactory=c.__exports.networks=void 0;const p=K.__exports;c.__exports.networks=p;const n=x.__exports,E=b.browserExports,_=P.wif,B=g.__exports,y=n.typeforce.maybe(n.typeforce.compile({compressed:n.maybe(n.Boolean),network:n.maybe(n.Network)})),D=r=>r.length===32?r:r.slice(1,33);function F(r){(0,B.testEcc)(r);function o(s){return r.isPoint(s)}function f(s,e){if(n.typeforce(n.Buffer256bit,s),!r.isPrivate(s))throw new TypeError("Private key not in range [1, n)");return n.typeforce(y,e),new d(s,void 0,e)}function h(s,e){return n.typeforce(r.isPoint,s),n.typeforce(y,e),new d(void 0,s,e)}function l(s,e){const t=_.decode(s),i=t.version;if(n.Array(e)){if(e=e.filter(u=>i===u.wif).pop(),!e)throw new Error("Unknown network version")}else if(e=e||p.bitcoin,i!==e.wif)throw new Error("Invalid network version");return f(t.privateKey,{compressed:t.compressed,network:e})}function m(s){n.typeforce(y,s),s===void 0&&(s={});const e=s.rng||E;let t;do t=e(32),n.typeforce(n.Buffer256bit,t);while(!r.isPrivate(t));return f(t,s)}class d{constructor(e,t,i){a(this,"__D");a(this,"__Q");a(this,"compressed");a(this,"network");a(this,"lowR");this.__D=e,this.__Q=t,this.lowR=!1,i===void 0&&(i={}),this.compressed=i.compressed===void 0?!0:i.compressed,this.network=i.network||p.bitcoin,t!==void 0&&(this.__Q=Buffer.from(r.pointCompress(t,this.compressed)))}get privateKey(){return this.__D}get publicKey(){if(!this.__Q){const e=r.pointFromScalar(this.__D,this.compressed);this.__Q=Buffer.from(e)}return this.__Q}toWIF(){if(!this.__D)throw new Error("Missing private key");return _.encode(this.network.wif,this.__D,this.compressed)}tweak(e){return this.privateKey?this.tweakFromPrivateKey(e):this.tweakFromPublicKey(e)}sign(e,t){if(!this.__D)throw new Error("Missing private key");if(t===void 0&&(t=this.lowR),t===!1)return Buffer.from(r.sign(e,this.__D));{let i=r.sign(e,this.__D);const u=Buffer.alloc(32,0);let w=0;for(;i[0]>127;)w++,u.writeUIntLE(w,0,6),i=r.sign(e,this.__D,u);return Buffer.from(i)}}signSchnorr(e){if(!this.privateKey)throw new Error("Missing private key");if(!r.signSchnorr)throw new Error("signSchnorr not supported by ecc library");return Buffer.from(r.signSchnorr(e,this.privateKey))}verify(e,t){return r.verify(e,this.publicKey,t)}verifySchnorr(e,t){if(!r.verifySchnorr)throw new Error("verifySchnorr not supported by ecc library");return r.verifySchnorr(e,this.publicKey.subarray(1,33),t)}tweakFromPublicKey(e){const t=D(this.publicKey),i=r.xOnlyPointAddTweak(t,e);if(!i||i.xOnlyPubkey===null)throw new Error("Cannot tweak public key!");const u=Buffer.from([i.parity===0?2:3]);return h(Buffer.concat([u,i.xOnlyPubkey]),{network:this.network,compressed:this.compressed})}tweakFromPrivateKey(e){const i=this.publicKey[0]===3||this.publicKey[0]===4&&(this.publicKey[64]&1)===1?r.privateNegate(this.privateKey):this.privateKey,u=r.privateAdd(i,e);if(!u)throw new Error("Invalid tweaked private key!");return f(Buffer.from(u),{network:this.network,compressed:this.compressed})}}return{isPoint:o,fromPrivateKey:f,fromPublicKey:h,fromWIF:l,makeRandom:m}}c.__exports.ECPairFactory=F;module.exports=c.__exports;
|
package/dist/index22.js
CHANGED
|
@@ -1,11 +1,140 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
};
|
|
1
|
+
var v = Object.defineProperty;
|
|
2
|
+
var k = (e, n, f) => n in e ? v(e, n, { enumerable: !0, configurable: !0, writable: !0, value: f }) : e[n] = f;
|
|
3
|
+
var y = (e, n, f) => k(e, typeof n != "symbol" ? n + "" : n, f);
|
|
4
|
+
import { __exports as p } from "./index23.js";
|
|
5
|
+
import "./index26.js";
|
|
6
|
+
import "./index27.js";
|
|
7
|
+
import { b } from "./index28.js";
|
|
8
|
+
import { w as P } from "./index29.js";
|
|
9
|
+
import "./index30.js";
|
|
10
|
+
import { __exports as K } from "./index31.js";
|
|
11
|
+
import { __exports as g } from "./index32.js";
|
|
12
|
+
import { __exports as E } from "./index33.js";
|
|
13
|
+
Object.defineProperty(p, "__esModule", { value: !0 });
|
|
14
|
+
p.ECPairFactory = p.networks = void 0;
|
|
15
|
+
const c = K;
|
|
16
|
+
p.networks = c;
|
|
17
|
+
const s = g, x = b, m = P, B = E, u = s.typeforce.maybe(
|
|
18
|
+
s.typeforce.compile({
|
|
19
|
+
compressed: s.maybe(s.Boolean),
|
|
20
|
+
network: s.maybe(s.Network)
|
|
21
|
+
})
|
|
22
|
+
), D = (e) => e.length === 32 ? e : e.slice(1, 33);
|
|
23
|
+
function F(e) {
|
|
24
|
+
(0, B.testEcc)(e);
|
|
25
|
+
function n(o) {
|
|
26
|
+
return e.isPoint(o);
|
|
27
|
+
}
|
|
28
|
+
function f(o, r) {
|
|
29
|
+
if (s.typeforce(s.Buffer256bit, o), !e.isPrivate(o))
|
|
30
|
+
throw new TypeError("Private key not in range [1, n)");
|
|
31
|
+
return s.typeforce(u, r), new d(o, void 0, r);
|
|
32
|
+
}
|
|
33
|
+
function h(o, r) {
|
|
34
|
+
return s.typeforce(e.isPoint, o), s.typeforce(u, r), new d(void 0, o, r);
|
|
35
|
+
}
|
|
36
|
+
function l(o, r) {
|
|
37
|
+
const t = m.decode(o), i = t.version;
|
|
38
|
+
if (s.Array(r)) {
|
|
39
|
+
if (r = r.filter((a) => i === a.wif).pop(), !r) throw new Error("Unknown network version");
|
|
40
|
+
} else if (r = r || c.bitcoin, i !== r.wif) throw new Error("Invalid network version");
|
|
41
|
+
return f(t.privateKey, {
|
|
42
|
+
compressed: t.compressed,
|
|
43
|
+
network: r
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
function _(o) {
|
|
47
|
+
s.typeforce(u, o), o === void 0 && (o = {});
|
|
48
|
+
const r = o.rng || x;
|
|
49
|
+
let t;
|
|
50
|
+
do
|
|
51
|
+
t = r(32), s.typeforce(s.Buffer256bit, t);
|
|
52
|
+
while (!e.isPrivate(t));
|
|
53
|
+
return f(t, o);
|
|
54
|
+
}
|
|
55
|
+
class d {
|
|
56
|
+
constructor(r, t, i) {
|
|
57
|
+
y(this, "__D");
|
|
58
|
+
y(this, "__Q");
|
|
59
|
+
y(this, "compressed");
|
|
60
|
+
y(this, "network");
|
|
61
|
+
y(this, "lowR");
|
|
62
|
+
this.__D = r, this.__Q = t, this.lowR = !1, i === void 0 && (i = {}), this.compressed = i.compressed === void 0 ? !0 : i.compressed, this.network = i.network || c.bitcoin, t !== void 0 && (this.__Q = Buffer.from(e.pointCompress(t, this.compressed)));
|
|
63
|
+
}
|
|
64
|
+
get privateKey() {
|
|
65
|
+
return this.__D;
|
|
66
|
+
}
|
|
67
|
+
get publicKey() {
|
|
68
|
+
if (!this.__Q) {
|
|
69
|
+
const r = e.pointFromScalar(this.__D, this.compressed);
|
|
70
|
+
this.__Q = Buffer.from(r);
|
|
71
|
+
}
|
|
72
|
+
return this.__Q;
|
|
73
|
+
}
|
|
74
|
+
toWIF() {
|
|
75
|
+
if (!this.__D) throw new Error("Missing private key");
|
|
76
|
+
return m.encode(this.network.wif, this.__D, this.compressed);
|
|
77
|
+
}
|
|
78
|
+
tweak(r) {
|
|
79
|
+
return this.privateKey ? this.tweakFromPrivateKey(r) : this.tweakFromPublicKey(r);
|
|
80
|
+
}
|
|
81
|
+
sign(r, t) {
|
|
82
|
+
if (!this.__D) throw new Error("Missing private key");
|
|
83
|
+
if (t === void 0 && (t = this.lowR), t === !1)
|
|
84
|
+
return Buffer.from(e.sign(r, this.__D));
|
|
85
|
+
{
|
|
86
|
+
let i = e.sign(r, this.__D);
|
|
87
|
+
const a = Buffer.alloc(32, 0);
|
|
88
|
+
let w = 0;
|
|
89
|
+
for (; i[0] > 127; )
|
|
90
|
+
w++, a.writeUIntLE(w, 0, 6), i = e.sign(r, this.__D, a);
|
|
91
|
+
return Buffer.from(i);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
signSchnorr(r) {
|
|
95
|
+
if (!this.privateKey) throw new Error("Missing private key");
|
|
96
|
+
if (!e.signSchnorr)
|
|
97
|
+
throw new Error("signSchnorr not supported by ecc library");
|
|
98
|
+
return Buffer.from(e.signSchnorr(r, this.privateKey));
|
|
99
|
+
}
|
|
100
|
+
verify(r, t) {
|
|
101
|
+
return e.verify(r, this.publicKey, t);
|
|
102
|
+
}
|
|
103
|
+
verifySchnorr(r, t) {
|
|
104
|
+
if (!e.verifySchnorr)
|
|
105
|
+
throw new Error("verifySchnorr not supported by ecc library");
|
|
106
|
+
return e.verifySchnorr(r, this.publicKey.subarray(1, 33), t);
|
|
107
|
+
}
|
|
108
|
+
tweakFromPublicKey(r) {
|
|
109
|
+
const t = D(this.publicKey), i = e.xOnlyPointAddTweak(t, r);
|
|
110
|
+
if (!i || i.xOnlyPubkey === null)
|
|
111
|
+
throw new Error("Cannot tweak public key!");
|
|
112
|
+
const a = Buffer.from([
|
|
113
|
+
i.parity === 0 ? 2 : 3
|
|
114
|
+
]);
|
|
115
|
+
return h(
|
|
116
|
+
Buffer.concat([a, i.xOnlyPubkey]),
|
|
117
|
+
{ network: this.network, compressed: this.compressed }
|
|
118
|
+
);
|
|
119
|
+
}
|
|
120
|
+
tweakFromPrivateKey(r) {
|
|
121
|
+
const i = this.publicKey[0] === 3 || this.publicKey[0] === 4 && (this.publicKey[64] & 1) === 1 ? e.privateNegate(this.privateKey) : this.privateKey, a = e.privateAdd(i, r);
|
|
122
|
+
if (!a) throw new Error("Invalid tweaked private key!");
|
|
123
|
+
return f(Buffer.from(a), {
|
|
124
|
+
network: this.network,
|
|
125
|
+
compressed: this.compressed
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
return {
|
|
130
|
+
isPoint: n,
|
|
131
|
+
fromPrivateKey: f,
|
|
132
|
+
fromPublicKey: h,
|
|
133
|
+
fromWIF: l,
|
|
134
|
+
makeRandom: _
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
p.ECPairFactory = F;
|
|
9
138
|
export {
|
|
10
|
-
|
|
139
|
+
p as default
|
|
11
140
|
};
|
package/dist/index23.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e={};exports.__exports=e;
|
package/dist/index23.js
CHANGED
|
@@ -1,140 +1,4 @@
|
|
|
1
|
-
var
|
|
2
|
-
var k = (e, n, f) => n in e ? v(e, n, { enumerable: !0, configurable: !0, writable: !0, value: f }) : e[n] = f;
|
|
3
|
-
var y = (e, n, f) => k(e, typeof n != "symbol" ? n + "" : n, f);
|
|
4
|
-
import { __exports as p } from "./index24.js";
|
|
5
|
-
import "./index34.js";
|
|
6
|
-
import "./index35.js";
|
|
7
|
-
import { b } from "./index36.js";
|
|
8
|
-
import { w as P } from "./index37.js";
|
|
9
|
-
import "./index38.js";
|
|
10
|
-
import { __exports as K } from "./index39.js";
|
|
11
|
-
import { __exports as g } from "./index40.js";
|
|
12
|
-
import { __exports as E } from "./index41.js";
|
|
13
|
-
Object.defineProperty(p, "__esModule", { value: !0 });
|
|
14
|
-
p.ECPairFactory = p.networks = void 0;
|
|
15
|
-
const c = K;
|
|
16
|
-
p.networks = c;
|
|
17
|
-
const s = g, x = b, m = P, B = E, u = s.typeforce.maybe(
|
|
18
|
-
s.typeforce.compile({
|
|
19
|
-
compressed: s.maybe(s.Boolean),
|
|
20
|
-
network: s.maybe(s.Network)
|
|
21
|
-
})
|
|
22
|
-
), D = (e) => e.length === 32 ? e : e.slice(1, 33);
|
|
23
|
-
function F(e) {
|
|
24
|
-
(0, B.testEcc)(e);
|
|
25
|
-
function n(o) {
|
|
26
|
-
return e.isPoint(o);
|
|
27
|
-
}
|
|
28
|
-
function f(o, r) {
|
|
29
|
-
if (s.typeforce(s.Buffer256bit, o), !e.isPrivate(o))
|
|
30
|
-
throw new TypeError("Private key not in range [1, n)");
|
|
31
|
-
return s.typeforce(u, r), new d(o, void 0, r);
|
|
32
|
-
}
|
|
33
|
-
function h(o, r) {
|
|
34
|
-
return s.typeforce(e.isPoint, o), s.typeforce(u, r), new d(void 0, o, r);
|
|
35
|
-
}
|
|
36
|
-
function l(o, r) {
|
|
37
|
-
const t = m.decode(o), i = t.version;
|
|
38
|
-
if (s.Array(r)) {
|
|
39
|
-
if (r = r.filter((a) => i === a.wif).pop(), !r) throw new Error("Unknown network version");
|
|
40
|
-
} else if (r = r || c.bitcoin, i !== r.wif) throw new Error("Invalid network version");
|
|
41
|
-
return f(t.privateKey, {
|
|
42
|
-
compressed: t.compressed,
|
|
43
|
-
network: r
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
function _(o) {
|
|
47
|
-
s.typeforce(u, o), o === void 0 && (o = {});
|
|
48
|
-
const r = o.rng || x;
|
|
49
|
-
let t;
|
|
50
|
-
do
|
|
51
|
-
t = r(32), s.typeforce(s.Buffer256bit, t);
|
|
52
|
-
while (!e.isPrivate(t));
|
|
53
|
-
return f(t, o);
|
|
54
|
-
}
|
|
55
|
-
class d {
|
|
56
|
-
constructor(r, t, i) {
|
|
57
|
-
y(this, "__D");
|
|
58
|
-
y(this, "__Q");
|
|
59
|
-
y(this, "compressed");
|
|
60
|
-
y(this, "network");
|
|
61
|
-
y(this, "lowR");
|
|
62
|
-
this.__D = r, this.__Q = t, this.lowR = !1, i === void 0 && (i = {}), this.compressed = i.compressed === void 0 ? !0 : i.compressed, this.network = i.network || c.bitcoin, t !== void 0 && (this.__Q = Buffer.from(e.pointCompress(t, this.compressed)));
|
|
63
|
-
}
|
|
64
|
-
get privateKey() {
|
|
65
|
-
return this.__D;
|
|
66
|
-
}
|
|
67
|
-
get publicKey() {
|
|
68
|
-
if (!this.__Q) {
|
|
69
|
-
const r = e.pointFromScalar(this.__D, this.compressed);
|
|
70
|
-
this.__Q = Buffer.from(r);
|
|
71
|
-
}
|
|
72
|
-
return this.__Q;
|
|
73
|
-
}
|
|
74
|
-
toWIF() {
|
|
75
|
-
if (!this.__D) throw new Error("Missing private key");
|
|
76
|
-
return m.encode(this.network.wif, this.__D, this.compressed);
|
|
77
|
-
}
|
|
78
|
-
tweak(r) {
|
|
79
|
-
return this.privateKey ? this.tweakFromPrivateKey(r) : this.tweakFromPublicKey(r);
|
|
80
|
-
}
|
|
81
|
-
sign(r, t) {
|
|
82
|
-
if (!this.__D) throw new Error("Missing private key");
|
|
83
|
-
if (t === void 0 && (t = this.lowR), t === !1)
|
|
84
|
-
return Buffer.from(e.sign(r, this.__D));
|
|
85
|
-
{
|
|
86
|
-
let i = e.sign(r, this.__D);
|
|
87
|
-
const a = Buffer.alloc(32, 0);
|
|
88
|
-
let w = 0;
|
|
89
|
-
for (; i[0] > 127; )
|
|
90
|
-
w++, a.writeUIntLE(w, 0, 6), i = e.sign(r, this.__D, a);
|
|
91
|
-
return Buffer.from(i);
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
signSchnorr(r) {
|
|
95
|
-
if (!this.privateKey) throw new Error("Missing private key");
|
|
96
|
-
if (!e.signSchnorr)
|
|
97
|
-
throw new Error("signSchnorr not supported by ecc library");
|
|
98
|
-
return Buffer.from(e.signSchnorr(r, this.privateKey));
|
|
99
|
-
}
|
|
100
|
-
verify(r, t) {
|
|
101
|
-
return e.verify(r, this.publicKey, t);
|
|
102
|
-
}
|
|
103
|
-
verifySchnorr(r, t) {
|
|
104
|
-
if (!e.verifySchnorr)
|
|
105
|
-
throw new Error("verifySchnorr not supported by ecc library");
|
|
106
|
-
return e.verifySchnorr(r, this.publicKey.subarray(1, 33), t);
|
|
107
|
-
}
|
|
108
|
-
tweakFromPublicKey(r) {
|
|
109
|
-
const t = D(this.publicKey), i = e.xOnlyPointAddTweak(t, r);
|
|
110
|
-
if (!i || i.xOnlyPubkey === null)
|
|
111
|
-
throw new Error("Cannot tweak public key!");
|
|
112
|
-
const a = Buffer.from([
|
|
113
|
-
i.parity === 0 ? 2 : 3
|
|
114
|
-
]);
|
|
115
|
-
return h(
|
|
116
|
-
Buffer.concat([a, i.xOnlyPubkey]),
|
|
117
|
-
{ network: this.network, compressed: this.compressed }
|
|
118
|
-
);
|
|
119
|
-
}
|
|
120
|
-
tweakFromPrivateKey(r) {
|
|
121
|
-
const i = this.publicKey[0] === 3 || this.publicKey[0] === 4 && (this.publicKey[64] & 1) === 1 ? e.privateNegate(this.privateKey) : this.privateKey, a = e.privateAdd(i, r);
|
|
122
|
-
if (!a) throw new Error("Invalid tweaked private key!");
|
|
123
|
-
return f(Buffer.from(a), {
|
|
124
|
-
network: this.network,
|
|
125
|
-
compressed: this.compressed
|
|
126
|
-
});
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
return {
|
|
130
|
-
isPoint: n,
|
|
131
|
-
fromPrivateKey: f,
|
|
132
|
-
fromPublicKey: h,
|
|
133
|
-
fromWIF: l,
|
|
134
|
-
makeRandom: _
|
|
135
|
-
};
|
|
136
|
-
}
|
|
137
|
-
p.ECPairFactory = F;
|
|
1
|
+
var r = {};
|
|
138
2
|
export {
|
|
139
|
-
|
|
3
|
+
r as __exports
|
|
140
4
|
};
|
package/dist/index24.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function n(e){return{formatters:void 0,fees:void 0,serializers:void 0,...e}}exports.defineChain=n;
|
package/dist/index24.js
CHANGED
package/dist/index25.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 r=require("./index34.cjs"),e=require("./index35.cjs"),t=require("./index36.cjs"),s={contracts:r.contracts,formatters:e.formatters,serializers:t.serializers};exports.chainConfig=s;
|
package/dist/index25.js
CHANGED
|
@@ -1,15 +1,11 @@
|
|
|
1
|
+
import { contracts as r } from "./index34.js";
|
|
2
|
+
import { formatters as o } from "./index35.js";
|
|
3
|
+
import { serializers as t } from "./index36.js";
|
|
1
4
|
const s = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
address: "0x4200000000000000000000000000000000000007"
|
|
6
|
-
},
|
|
7
|
-
l2Erc721Bridge: { address: "0x4200000000000000000000000000000000000014" },
|
|
8
|
-
l2StandardBridge: { address: "0x4200000000000000000000000000000000000010" },
|
|
9
|
-
l2ToL1MessagePasser: {
|
|
10
|
-
address: "0x4200000000000000000000000000000000000016"
|
|
11
|
-
}
|
|
5
|
+
contracts: r,
|
|
6
|
+
formatters: o,
|
|
7
|
+
serializers: t
|
|
12
8
|
};
|
|
13
9
|
export {
|
|
14
|
-
s as
|
|
10
|
+
s as chainConfig
|
|
15
11
|
};
|
package/dist/index26.cjs
CHANGED
|
@@ -1 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";const e=require("./index31.cjs");Object.defineProperty(e.__exports,"__esModule",{value:!0});e.__exports.testnet=e.__exports.bitcoin=void 0;e.__exports.bitcoin={messagePrefix:`Bitcoin Signed Message:
|
|
2
|
+
`,bech32:"bc",bip32:{public:76067358,private:76066276},pubKeyHash:0,scriptHash:5,wif:128};e.__exports.testnet={messagePrefix:`Bitcoin Signed Message:
|
|
3
|
+
`,bech32:"tb",bip32:{public:70617039,private:70615956},pubKeyHash:111,scriptHash:196,wif:239};module.exports=e.__exports;
|
package/dist/index26.js
CHANGED
|
@@ -1,39 +1,30 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
format(e) {
|
|
28
|
-
return {
|
|
29
|
-
l1GasPrice: e.l1GasPrice ? n(e.l1GasPrice) : null,
|
|
30
|
-
l1GasUsed: e.l1GasUsed ? n(e.l1GasUsed) : null,
|
|
31
|
-
l1Fee: e.l1Fee ? n(e.l1Fee) : null,
|
|
32
|
-
l1FeeScalar: e.l1FeeScalar ? Number(e.l1FeeScalar) : null
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
})
|
|
1
|
+
import { __exports as e } from "./index31.js";
|
|
2
|
+
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
3
|
+
e.testnet = e.bitcoin = void 0;
|
|
4
|
+
e.bitcoin = {
|
|
5
|
+
messagePrefix: `Bitcoin Signed Message:
|
|
6
|
+
`,
|
|
7
|
+
bech32: "bc",
|
|
8
|
+
bip32: {
|
|
9
|
+
public: 76067358,
|
|
10
|
+
private: 76066276
|
|
11
|
+
},
|
|
12
|
+
pubKeyHash: 0,
|
|
13
|
+
scriptHash: 5,
|
|
14
|
+
wif: 128
|
|
15
|
+
};
|
|
16
|
+
e.testnet = {
|
|
17
|
+
messagePrefix: `Bitcoin Signed Message:
|
|
18
|
+
`,
|
|
19
|
+
bech32: "tb",
|
|
20
|
+
bip32: {
|
|
21
|
+
public: 70617039,
|
|
22
|
+
private: 70615956
|
|
23
|
+
},
|
|
24
|
+
pubKeyHash: 111,
|
|
25
|
+
scriptHash: 196,
|
|
26
|
+
wif: 239
|
|
36
27
|
};
|
|
37
28
|
export {
|
|
38
|
-
|
|
29
|
+
e as default
|
|
39
30
|
};
|
package/dist/index27.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";const f=require("./index32.cjs"),y=require("./index43.cjs");(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.maybe=e.Boolean=e.Array=e.Buffer256bit=e.Network=e.typeforce=void 0,e.typeforce=y.typeforce_1,e.Network=e.typeforce.compile({messagePrefix:e.typeforce.oneOf(e.typeforce.Buffer,e.typeforce.String),bip32:{public:e.typeforce.UInt32,private:e.typeforce.UInt32},pubKeyHash:e.typeforce.UInt8,scriptHash:e.typeforce.UInt8,wif:e.typeforce.UInt8}),e.Buffer256bit=e.typeforce.BufferN(32),e.Array=e.typeforce.Array,e.Boolean=e.typeforce.Boolean,e.maybe=e.typeforce.maybe})(f.__exports);
|
package/dist/index27.js
CHANGED
|
@@ -1,44 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
c ?? "0x",
|
|
19
|
-
s ? i(s) : "0x",
|
|
20
|
-
n ? i(n) : "0x",
|
|
21
|
-
t ? i(t) : "0x",
|
|
22
|
-
u ? "0x1" : "0x",
|
|
23
|
-
o ?? "0x"
|
|
24
|
-
];
|
|
25
|
-
return p([
|
|
26
|
-
"0x7e",
|
|
27
|
-
x(d)
|
|
28
|
-
]);
|
|
29
|
-
}
|
|
30
|
-
function h(r) {
|
|
31
|
-
return r.type === "deposit" || typeof r.sourceHash < "u";
|
|
32
|
-
}
|
|
33
|
-
function w(r) {
|
|
34
|
-
const { from: e, to: o } = r;
|
|
35
|
-
if (e && !f(e))
|
|
36
|
-
throw new a({ address: e });
|
|
37
|
-
if (o && !f(o))
|
|
38
|
-
throw new a({ address: o });
|
|
39
|
-
}
|
|
40
|
-
export {
|
|
41
|
-
w as assertTransactionDeposit,
|
|
42
|
-
T as serializeTransaction,
|
|
43
|
-
E as serializers
|
|
44
|
-
};
|
|
1
|
+
import { __exports as f } from "./index32.js";
|
|
2
|
+
import { t as y } from "./index43.js";
|
|
3
|
+
(function(e) {
|
|
4
|
+
Object.defineProperty(e, "__esModule", { value: !0 }), e.maybe = e.Boolean = e.Array = e.Buffer256bit = e.Network = e.typeforce = void 0, e.typeforce = y, e.Network = e.typeforce.compile({
|
|
5
|
+
messagePrefix: e.typeforce.oneOf(
|
|
6
|
+
e.typeforce.Buffer,
|
|
7
|
+
e.typeforce.String
|
|
8
|
+
),
|
|
9
|
+
bip32: {
|
|
10
|
+
public: e.typeforce.UInt32,
|
|
11
|
+
private: e.typeforce.UInt32
|
|
12
|
+
},
|
|
13
|
+
pubKeyHash: e.typeforce.UInt8,
|
|
14
|
+
scriptHash: e.typeforce.UInt8,
|
|
15
|
+
wif: e.typeforce.UInt8
|
|
16
|
+
}), e.Buffer256bit = e.typeforce.BufferN(32), e.Array = e.typeforce.Array, e.Boolean = e.typeforce.Boolean, e.maybe = e.typeforce.maybe;
|
|
17
|
+
})(f);
|
package/dist/index28.cjs
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index20.cjs"),s=require("./index44.cjs"),l=require("./index45.cjs");var n=65536,f=4294967295;function m(){throw new Error(`Secure random number generation is not supported by this browser.
|
|
2
|
+
Use Chrome, Firefox or Internet Explorer 11`)}var c=l.safeBufferExports.Buffer,t=a.commonjsGlobal.crypto||a.commonjsGlobal.msCrypto;t&&t.getRandomValues?s.__module.exports=i:s.__module.exports=m;function i(r,u){if(r>f)throw new RangeError("requested too many random bytes");var o=c.allocUnsafe(r);if(r>0)if(r>n)for(var e=0;e<r;e+=n)t.getRandomValues(o.slice(e,e+n));else t.getRandomValues(o);return typeof u=="function"?process.nextTick(function(){u(null,o)}):o}var p=s.__module.exports;exports.browserExports=p;
|