@meshsdk/core 1.5.24-alpha.1 → 1.5.24-alpha.2
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/core.cjs +3 -3
- package/dist/core.js +272 -293
- package/dist/index.d.ts +0 -1
- package/dist/wallet/app.service.d.ts +1 -0
- package/package.json +1 -1
package/dist/core.js
CHANGED
|
@@ -2,7 +2,7 @@ import { customAlphabet as xr } from "nanoid";
|
|
|
2
2
|
import * as a from "@emurgo/cardano-serialization-lib-nodejs";
|
|
3
3
|
import Mt from "axios";
|
|
4
4
|
import { mnemonicToEntropy as wr, generateMnemonic as $r } from "bip39";
|
|
5
|
-
import { COSEKey as Cr, COSESign1 as zr, Label as Pt, Int as ge, BigNum as
|
|
5
|
+
import { COSEKey as Cr, COSESign1 as zr, Label as Pt, Int as ge, BigNum as ke, KeyType as Wr, AlgorithmId as Br, CBORValue as Te, HeaderMap as Je, Headers as Jr, ProtectedHeaderMap as jr, COSESign1Builder as Xr } from "@emurgo/cardano-message-signing-nodejs";
|
|
6
6
|
const on = (s) => {
|
|
7
7
|
const e = [];
|
|
8
8
|
return s.forEach((t) => {
|
|
@@ -12,7 +12,7 @@ const on = (s) => {
|
|
|
12
12
|
}, Zr = ["testnet", "preview", "preprod", "mainnet"], ts = (s) => Zr.includes(s), Yt = {
|
|
13
13
|
mem: 7e6,
|
|
14
14
|
steps: 3e9
|
|
15
|
-
},
|
|
15
|
+
}, At = {
|
|
16
16
|
epoch: 0,
|
|
17
17
|
coinsPerUTxOSize: "4310",
|
|
18
18
|
priceMem: 0.0577,
|
|
@@ -33,7 +33,7 @@ const on = (s) => {
|
|
|
33
33
|
maxTxExSteps: "10000000000",
|
|
34
34
|
maxBlockExMem: "80000000",
|
|
35
35
|
maxBlockExSteps: "40000000000"
|
|
36
|
-
},
|
|
36
|
+
}, ve = 2147483648, vt = {
|
|
37
37
|
V1: a.Language.new_plutus_v1(),
|
|
38
38
|
V2: a.Language.new_plutus_v2()
|
|
39
39
|
}, ht = 56, es = {
|
|
@@ -459,12 +459,12 @@ const on = (s) => {
|
|
|
459
459
|
...i.less_than(r) ? ls(r.clamped_sub(i).to_str(), e.filter((l) => !n.some((p) => p.input.txHash === l.input.txHash && p.input.outputIndex === l.input.outputIndex))) : [],
|
|
460
460
|
...n
|
|
461
461
|
];
|
|
462
|
-
}, cn = (s, e, t = !1, { maxTxSize: r, minFeeA: n, minFeeB: i } =
|
|
463
|
-
const c = e.filter((
|
|
462
|
+
}, cn = (s, e, t = !1, { maxTxSize: r, minFeeA: n, minFeeB: i } = At) => {
|
|
463
|
+
const c = e.filter((b) => Sr(b) === !1).sort(Re), l = a.BigNum.from_str(Vr(r, n, i)), p = t ? a.BigNum.from_str(s).checked_add(l).to_str() : s;
|
|
464
464
|
return ie(c, /* @__PURE__ */ new Map([
|
|
465
465
|
["lovelace", p]
|
|
466
466
|
]));
|
|
467
|
-
}, as = (s, e, t = !1, r =
|
|
467
|
+
}, as = (s, e, t = !1, r = At) => {
|
|
468
468
|
const n = e.filter(Sr).sort(Re), i = cs(r), c = s.get("lovelace") ?? "0", l = t ? a.BigNum.from_str(c).checked_add(i).to_str() : c;
|
|
469
469
|
return s.set("lovelace", l), ie(n, s);
|
|
470
470
|
}, os = (s, e) => Array.from(e, (t) => ({ unit: t[0], quantity: a.BigNum.from_str(t[1]) })).every((t) => s.filter((r) => r.output.amount.find((n) => n.unit === t.unit) !== void 0).reduce((r, n) => {
|
|
@@ -504,11 +504,11 @@ const on = (s) => {
|
|
|
504
504
|
const y = (c = i.headers().protected().deserialized_headers().header(Pt.new_text("address"))) == null ? void 0 : c.as_bytes();
|
|
505
505
|
if (y === void 0)
|
|
506
506
|
throw new Error("Couldn't find a signer address in signature");
|
|
507
|
-
const B = (l = n.header(Pt.new_int(ge.new_negative(
|
|
507
|
+
const B = (l = n.header(Pt.new_int(ge.new_negative(ke.from_str("2"))))) == null ? void 0 : l.as_bytes();
|
|
508
508
|
if (B === void 0)
|
|
509
509
|
throw new Error("Couldn't find a signer key in signature");
|
|
510
|
-
const
|
|
511
|
-
if (fs(e,
|
|
510
|
+
const b = Gt(lt(y)), w = Rs(lt(B));
|
|
511
|
+
if (fs(e, b, w) === !1)
|
|
512
512
|
throw new Error("Couldn't check signature because of address mismatch");
|
|
513
513
|
const v = Fs(lt(i.signature())), U = i.signed_data().to_bytes();
|
|
514
514
|
return w.verify(U, v);
|
|
@@ -524,16 +524,16 @@ const on = (s) => {
|
|
|
524
524
|
}
|
|
525
525
|
}, gs = (s) => {
|
|
526
526
|
const e = Cr.new(Pt.from_key_type(Wr.OKP));
|
|
527
|
-
return e.set_algorithm_id(Pt.from_algorithm_id(Br.EdDSA)), e.set_header(Pt.new_int(ge.new_negative(
|
|
527
|
+
return e.set_algorithm_id(Pt.from_algorithm_id(Br.EdDSA)), e.set_header(Pt.new_int(ge.new_negative(ke.from_str("1"))), Te.new_int(ge.new_i32(6))), e.set_header(Pt.new_int(ge.new_negative(ke.from_str("2"))), Te.new_bytes(s.key.to_public().as_bytes())), e;
|
|
528
528
|
}, ms = (s, e) => {
|
|
529
529
|
const t = Je.new(), r = Je.new();
|
|
530
|
-
t.set_algorithm_id(Pt.from_algorithm_id(Br.EdDSA)), t.set_header(Pt.new_text("address"),
|
|
530
|
+
t.set_algorithm_id(Pt.from_algorithm_id(Br.EdDSA)), t.set_header(Pt.new_text("address"), Te.new_bytes(e.address.to_bytes()));
|
|
531
531
|
const n = Jr.new(jr.new(t), r), i = Xr.new(n, G(s.payload), !1);
|
|
532
532
|
s.externalAAD !== void 0 && i.set_external_aad(G(s.externalAAD));
|
|
533
533
|
const c = i.make_data_to_sign(), l = e.key.sign(c.to_bytes());
|
|
534
534
|
return i.build(l.to_bytes());
|
|
535
535
|
};
|
|
536
|
-
var
|
|
536
|
+
var Ne = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, Er = {}, ot = { exports: {} };
|
|
537
537
|
Dt.notEqual = As;
|
|
538
538
|
Dt.notOk = Is;
|
|
539
539
|
Dt.equal = ps;
|
|
@@ -600,23 +600,23 @@ function ws(s) {
|
|
|
600
600
|
return s.charCodeAt(0);
|
|
601
601
|
}
|
|
602
602
|
var wt = br, W = ys(), Qt = 64, me = [];
|
|
603
|
-
Et.exports =
|
|
603
|
+
Et.exports = It;
|
|
604
604
|
var Ze = Et.exports.BYTES_MIN = 16, tr = Et.exports.BYTES_MAX = 64;
|
|
605
605
|
Et.exports.BYTES = 32;
|
|
606
606
|
var er = Et.exports.KEYBYTES_MIN = 16, rr = Et.exports.KEYBYTES_MAX = 64;
|
|
607
607
|
Et.exports.KEYBYTES = 32;
|
|
608
608
|
var sr = Et.exports.SALTBYTES = 16, nr = Et.exports.PERSONALBYTES = 16;
|
|
609
|
-
function
|
|
610
|
-
if (!(this instanceof
|
|
611
|
-
return new
|
|
609
|
+
function It(s, e, t, r, n) {
|
|
610
|
+
if (!(this instanceof It))
|
|
611
|
+
return new It(s, e, t, r, n);
|
|
612
612
|
if (!(W && W.exports))
|
|
613
613
|
throw new Error("WASM not loaded. Wait for Blake2b.ready(cb)");
|
|
614
614
|
s || (s = 32), n !== !0 && (wt(s >= Ze, "digestLength must be at least " + Ze + ", was given " + s), wt(s <= tr, "digestLength must be at most " + tr + ", was given " + s), e != null && wt(e.length >= er, "key must be at least " + er + ", was given " + e.length), e != null && wt(e.length <= rr, "key must be at least " + rr + ", was given " + e.length), t != null && wt(t.length === sr, "salt must be exactly " + sr + ", was given " + t.length), r != null && wt(r.length === nr, "personal must be exactly " + nr + ", was given " + r.length)), me.length || (me.push(Qt), Qt += 216), this.digestLength = s, this.finalized = !1, this.pointer = me.pop(), W.memory.fill(0, 0, 64), W.memory[0] = this.digestLength, W.memory[1] = e ? e.length : 0, W.memory[2] = 1, W.memory[3] = 1, t && W.memory.set(t, 32), r && W.memory.set(r, 48), this.pointer + 216 > W.memory.length && W.realloc(this.pointer + 216), W.exports.blake2b_init(this.pointer, this.digestLength), e && (this.update(e), W.memory.fill(0, Qt, Qt + e.length), W.memory[this.pointer + 200] = 128);
|
|
615
615
|
}
|
|
616
|
-
|
|
616
|
+
It.prototype.update = function(s) {
|
|
617
617
|
return wt(this.finalized === !1, "Hash instance finalized"), wt(s, "input must be TypedArray or Buffer"), Qt + s.length > W.memory.length && W.realloc(Qt + s.length), W.memory.set(s, Qt), W.exports.blake2b_update(this.pointer, Qt, Qt + s.length), this;
|
|
618
618
|
};
|
|
619
|
-
|
|
619
|
+
It.prototype.digest = function(s) {
|
|
620
620
|
if (wt(this.finalized === !1, "Hash instance finalized"), this.finalized = !0, me.push(this.pointer), W.exports.blake2b_final(this.pointer), !s || s === "binary")
|
|
621
621
|
return W.memory.slice(this.pointer + 128, this.pointer + 128 + this.digestLength);
|
|
622
622
|
if (s === "hex")
|
|
@@ -626,10 +626,10 @@ At.prototype.digest = function(s) {
|
|
|
626
626
|
s[e] = W.memory[this.pointer + 128 + e];
|
|
627
627
|
return s;
|
|
628
628
|
};
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
629
|
+
It.prototype.final = It.prototype.digest;
|
|
630
|
+
It.WASM = W && W.buffer;
|
|
631
|
+
It.SUPPORTED = typeof WebAssembly < "u";
|
|
632
|
+
It.ready = function(s) {
|
|
633
633
|
if (s || (s = Cs), !W)
|
|
634
634
|
return s(new Error("WebAssembly not supported"));
|
|
635
635
|
var e = new Promise(function(t, r) {
|
|
@@ -639,7 +639,7 @@ At.ready = function(s) {
|
|
|
639
639
|
});
|
|
640
640
|
return e;
|
|
641
641
|
};
|
|
642
|
-
|
|
642
|
+
It.prototype.ready = It.ready;
|
|
643
643
|
function Cs() {
|
|
644
644
|
}
|
|
645
645
|
function Bs(s, e, t) {
|
|
@@ -667,8 +667,8 @@ function vr(s, e) {
|
|
|
667
667
|
function Tt(s, e, t, r, n, i) {
|
|
668
668
|
var c = re[n], l = re[n + 1], p = re[i], y = re[i + 1];
|
|
669
669
|
ue(H, s, e), ir(H, s, c, l);
|
|
670
|
-
var B = H[r] ^ H[s],
|
|
671
|
-
H[r] =
|
|
670
|
+
var B = H[r] ^ H[s], b = H[r + 1] ^ H[s + 1];
|
|
671
|
+
H[r] = b, H[r + 1] = B, ue(H, t, r), B = H[e] ^ H[t], b = H[e + 1] ^ H[t + 1], H[e] = B >>> 24 ^ b << 8, H[e + 1] = b >>> 24 ^ B << 8, ue(H, s, e), ir(H, s, p, y), B = H[r] ^ H[s], b = H[r + 1] ^ H[s + 1], H[r] = B >>> 16 ^ b << 16, H[r + 1] = b >>> 16 ^ B << 16, ue(H, t, r), B = H[e] ^ H[t], b = H[e + 1] ^ H[t + 1], H[e] = b >>> 31 ^ B << 1, H[e + 1] = B >>> 31 ^ b << 1;
|
|
672
672
|
}
|
|
673
673
|
var Qr = new Uint32Array([
|
|
674
674
|
4089235720,
|
|
@@ -1086,17 +1086,17 @@ function Ur(s) {
|
|
|
1086
1086
|
if (typeof y == "string")
|
|
1087
1087
|
throw new Error(y);
|
|
1088
1088
|
let B = c + "1";
|
|
1089
|
-
for (let
|
|
1090
|
-
const w = l[
|
|
1089
|
+
for (let b = 0; b < l.length; ++b) {
|
|
1090
|
+
const w = l[b];
|
|
1091
1091
|
if (w >> 5 !== 0)
|
|
1092
1092
|
throw new Error("Non 5-bit word");
|
|
1093
1093
|
y = zt(y) ^ w, B += _e.charAt(w);
|
|
1094
1094
|
}
|
|
1095
|
-
for (let
|
|
1095
|
+
for (let b = 0; b < 6; ++b)
|
|
1096
1096
|
y = zt(y);
|
|
1097
1097
|
y ^= e;
|
|
1098
|
-
for (let
|
|
1099
|
-
const w = y >> (5 -
|
|
1098
|
+
for (let b = 0; b < 6; ++b) {
|
|
1099
|
+
const w = y >> (5 - b) * 5 & 31;
|
|
1100
1100
|
B += _e.charAt(w);
|
|
1101
1101
|
}
|
|
1102
1102
|
return B;
|
|
@@ -1115,10 +1115,10 @@ function Ur(s) {
|
|
|
1115
1115
|
return "No separator character for " + c;
|
|
1116
1116
|
if (B === 0)
|
|
1117
1117
|
return "Missing prefix for " + c;
|
|
1118
|
-
const
|
|
1118
|
+
const b = c.slice(0, B), w = c.slice(B + 1);
|
|
1119
1119
|
if (w.length < 6)
|
|
1120
1120
|
return "Data too short";
|
|
1121
|
-
let v = dr(
|
|
1121
|
+
let v = dr(b);
|
|
1122
1122
|
if (typeof v == "string")
|
|
1123
1123
|
return v;
|
|
1124
1124
|
const U = [];
|
|
@@ -1128,7 +1128,7 @@ function Ur(s) {
|
|
|
1128
1128
|
return "Unknown character " + N;
|
|
1129
1129
|
v = zt(v) ^ T, !(k + 6 >= w.length) && U.push(T);
|
|
1130
1130
|
}
|
|
1131
|
-
return v !== e ? "Invalid checksum for " + c : { prefix:
|
|
1131
|
+
return v !== e ? "Invalid checksum for " + c : { prefix: b, words: U };
|
|
1132
1132
|
}
|
|
1133
1133
|
function n(c, l) {
|
|
1134
1134
|
const p = r(c, l);
|
|
@@ -1152,11 +1152,11 @@ function Ur(s) {
|
|
|
1152
1152
|
}
|
|
1153
1153
|
jt.bech32 = Ur("bech32");
|
|
1154
1154
|
jt.bech32m = Ur("bech32m");
|
|
1155
|
-
var Ns =
|
|
1155
|
+
var Ns = Ne && Ne.__importDefault || function(s) {
|
|
1156
1156
|
return s && s.__esModule ? s : { default: s };
|
|
1157
1157
|
};
|
|
1158
1158
|
Object.defineProperty(Er, "__esModule", { value: !0 });
|
|
1159
|
-
const Us = Ns(ot.exports), le = jt,
|
|
1159
|
+
const Us = Ns(ot.exports), le = jt, Qe = "asset";
|
|
1160
1160
|
class ne {
|
|
1161
1161
|
constructor(e) {
|
|
1162
1162
|
this.hashBuf = e;
|
|
@@ -1170,20 +1170,20 @@ class ne {
|
|
|
1170
1170
|
}
|
|
1171
1171
|
static fromBech32(e) {
|
|
1172
1172
|
const { prefix: t, words: r } = le.bech32.decode(e);
|
|
1173
|
-
if (t !==
|
|
1173
|
+
if (t !== Qe)
|
|
1174
1174
|
throw new Error("Invalid asset fingerprint");
|
|
1175
1175
|
const n = Buffer.from(le.bech32.fromWords(r));
|
|
1176
1176
|
return ne.fromHash(n);
|
|
1177
1177
|
}
|
|
1178
1178
|
fingerprint() {
|
|
1179
1179
|
const e = le.bech32.toWords(this.hashBuf);
|
|
1180
|
-
return le.bech32.encode(
|
|
1180
|
+
return le.bech32.encode(Qe, e);
|
|
1181
1181
|
}
|
|
1182
1182
|
hash() {
|
|
1183
1183
|
return Buffer.from(this.hashBuf).toString("hex");
|
|
1184
1184
|
}
|
|
1185
1185
|
prefix() {
|
|
1186
|
-
return
|
|
1186
|
+
return Qe;
|
|
1187
1187
|
}
|
|
1188
1188
|
checksum() {
|
|
1189
1189
|
return this.fingerprint().slice(-6);
|
|
@@ -1191,9 +1191,9 @@ class ne {
|
|
|
1191
1191
|
}
|
|
1192
1192
|
var Ps = Er.default = ne;
|
|
1193
1193
|
const Os = Ps, Ms = (s, e, t = 0) => {
|
|
1194
|
-
const r = Ks(s), n = r.derive(
|
|
1194
|
+
const r = Ks(s), n = r.derive(ve + 1852).derive(ve + 1815).derive(ve + e), i = n.derive(0).derive(t).to_raw_key(), c = n.derive(2).derive(0).to_raw_key();
|
|
1195
1195
|
return n.free(), r.free(), { paymentKey: i, stakeKey: c };
|
|
1196
|
-
}, Gt = (s) => a.Address.from_bytes(G(s)), Ks = (s) => a.Bip32PrivateKey.from_bytes(G(s)), Hs = (s) => a.DataHash.from_bytes(G(s)), Ct = (s) => a.Ed25519KeyHash.from_bytes(G(s)), Fs = (s) => a.Ed25519Signature.from_bytes(G(s)), Le = (s) => a.NativeScript.from_bytes(G(s)), Rs = (s) => a.PublicKey.from_bytes(G(s)), Pr = (s) => a.PlutusData.from_bytes(G(s)), Xt = (s, e) => a.PlutusScript.from_bytes_with_version(G(s), vt[e]), qs = (s) => a.ScriptRef.from_bytes(G(s)), Vs = (s) => a.ScriptHash.from_bytes(G(s)),
|
|
1196
|
+
}, Gt = (s) => a.Address.from_bytes(G(s)), Ks = (s) => a.Bip32PrivateKey.from_bytes(G(s)), Hs = (s) => a.DataHash.from_bytes(G(s)), Ct = (s) => a.Ed25519KeyHash.from_bytes(G(s)), Fs = (s) => a.Ed25519Signature.from_bytes(G(s)), Le = (s) => a.NativeScript.from_bytes(G(s)), Rs = (s) => a.PublicKey.from_bytes(G(s)), Pr = (s) => a.PlutusData.from_bytes(G(s)), Xt = (s, e) => a.PlutusScript.from_bytes_with_version(G(s), vt[e]), qs = (s) => a.ScriptRef.from_bytes(G(s)), Vs = (s) => a.ScriptHash.from_bytes(G(s)), pt = (s) => a.Transaction.from_bytes(G(s)), Ue = (s) => a.TransactionHash.from_bytes(G(s)), fr = (s) => a.TransactionUnspentOutput.from_bytes(G(s)), gr = (s) => a.TransactionWitnessSet.from_bytes(G(s)), Ls = (s) => a.Value.from_bytes(G(s)), yt = (s) => a.Address.from_bech32(s), Ge = (s) => a.BaseAddress.from_address(yt(s)), Or = (s) => a.EnterpriseAddress.from_address(yt(s)), Mr = (s) => a.RewardAddress.from_address(yt(s)), lt = (s) => Buffer.from(s).toString("hex"), G = (s) => s.length % 2 === 0 && /^[0-9A-F]*$/i.test(s) ? Buffer.from(s, "hex") : Buffer.from(s, "utf-8"), Ye = (s) => {
|
|
1197
1197
|
const e = (t) => {
|
|
1198
1198
|
const r = new Array();
|
|
1199
1199
|
for (let n = 0; n < t.len(); n += 1)
|
|
@@ -1325,7 +1325,7 @@ const Os = Ps, Ms = (s, e, t = 0) => {
|
|
|
1325
1325
|
throw s.relays.forEach((t) => {
|
|
1326
1326
|
e.add(Kr(t));
|
|
1327
1327
|
}), new Error("toPoolParams not implemented.");
|
|
1328
|
-
},
|
|
1328
|
+
}, Pe = (s) => {
|
|
1329
1329
|
const e = (t) => es[t];
|
|
1330
1330
|
return a.Redeemer.new(e(s.tag), a.BigNum.from_str(s.index.toString()), Ot(s.data), a.ExUnits.new(a.BigNum.from_str(s.budget.mem.toString()), a.BigNum.from_str(s.budget.steps.toString())));
|
|
1331
1331
|
}, Kr = (s) => {
|
|
@@ -1372,7 +1372,7 @@ const Os = Ps, Ms = (s, e, t = 0) => {
|
|
|
1372
1372
|
}
|
|
1373
1373
|
};
|
|
1374
1374
|
}, mt = (s) => {
|
|
1375
|
-
const e = a.TransactionInput.new(
|
|
1375
|
+
const e = a.TransactionInput.new(Ue(s.input.txHash), s.input.outputIndex), t = a.TransactionOutput.new(yt(s.output.address), Bt(s.output.amount));
|
|
1376
1376
|
return s.output.dataHash !== void 0 && t.set_data_hash(Hs(s.output.dataHash)), s.output.plutusData !== void 0 && t.set_plutus_data(Pr(s.output.plutusData)), s.output.scriptRef !== void 0 && t.set_script_ref(qs(s.output.scriptRef)), a.TransactionUnspentOutput.new(e, t);
|
|
1377
1377
|
}, mr = (s) => {
|
|
1378
1378
|
const e = s.split(".")[1] ?? "0", t = `${parseInt(e, 10)}`, r = "1" + "0".repeat(e.length);
|
|
@@ -1388,8 +1388,8 @@ const Os = Ps, Ms = (s, e, t = 0) => {
|
|
|
1388
1388
|
if (c !== void 0) {
|
|
1389
1389
|
const l = c.keys();
|
|
1390
1390
|
for (let p = 0; p < l.len(); p += 1) {
|
|
1391
|
-
const y = l.get(p), B = c.get(y) ?? a.BigNum.from_str("0"),
|
|
1392
|
-
e.push({ unit:
|
|
1391
|
+
const y = l.get(p), B = c.get(y) ?? a.BigNum.from_str("0"), b = i.to_hex() + lt(y.name());
|
|
1392
|
+
e.push({ unit: b, quantity: B.to_str() });
|
|
1393
1393
|
}
|
|
1394
1394
|
}
|
|
1395
1395
|
}
|
|
@@ -1405,7 +1405,7 @@ const Os = Ps, Ms = (s, e, t = 0) => {
|
|
|
1405
1405
|
});
|
|
1406
1406
|
const n = a.Value.new(a.BigNum.from_str(e ? e.quantity : "0"));
|
|
1407
1407
|
return (s.length > 1 || !e) && n.set_multiasset(r), n;
|
|
1408
|
-
}, pr = (s, e, t) => a.BaseAddress.new(s, a.StakeCredential.from_keyhash(e), a.StakeCredential.from_keyhash(t)), Rr = (s, e = "") => a.Bip32PrivateKey.from_bip39_entropy(G(s), G(dt(e))),
|
|
1408
|
+
}, pr = (s, e, t) => a.BaseAddress.new(s, a.StakeCredential.from_keyhash(e), a.StakeCredential.from_keyhash(t)), Rr = (s, e = "") => a.Bip32PrivateKey.from_bip39_entropy(G(s), G(dt(e))), Oe = (s) => a.DataCost.new_coins_per_byte(a.BigNum.from_str(s)), Ys = (s) => {
|
|
1409
1409
|
if (typeof s != "object" || !("input" in s))
|
|
1410
1410
|
return a.DatumSource.new(Ot(s));
|
|
1411
1411
|
const e = mt(s);
|
|
@@ -1419,7 +1419,7 @@ const Os = Ps, Ms = (s, e, t = 0) => {
|
|
|
1419
1419
|
throw new Error("Minting with plutus requires a redeemer to be defined");
|
|
1420
1420
|
if (e.tag !== "MINT")
|
|
1421
1421
|
throw new Error("Minting redeemer's tag must be defined as 'MINT'");
|
|
1422
|
-
return a.MintWitness.new_plutus_script(
|
|
1422
|
+
return a.MintWitness.new_plutus_script(Ke(s), Pe({
|
|
1423
1423
|
tag: "MINT",
|
|
1424
1424
|
index: 0,
|
|
1425
1425
|
budget: Yt,
|
|
@@ -1429,7 +1429,7 @@ const Os = Ps, Ms = (s, e, t = 0) => {
|
|
|
1429
1429
|
},
|
|
1430
1430
|
...e
|
|
1431
1431
|
}));
|
|
1432
|
-
},
|
|
1432
|
+
}, Me = (s, e) => a.RewardAddress.new(s, a.StakeCredential.from_keyhash(e)), Ke = (s) => {
|
|
1433
1433
|
if ("code" in s)
|
|
1434
1434
|
return a.PlutusScriptSource.new(Xt(s.code, s.version));
|
|
1435
1435
|
const e = mt(s);
|
|
@@ -1444,7 +1444,7 @@ const Os = Ps, Ms = (s, e, t = 0) => {
|
|
|
1444
1444
|
}, he = (s) => {
|
|
1445
1445
|
const e = a.ScriptPubkey.new(s);
|
|
1446
1446
|
return a.NativeScript.new_script_pubkey(e);
|
|
1447
|
-
}, Ae = (s =
|
|
1447
|
+
}, Ae = (s = At) => {
|
|
1448
1448
|
const e = a.TransactionBuilderConfigBuilder.new().coins_per_utxo_byte(a.BigNum.from_str(s.coinsPerUTxOSize)).ex_unit_prices(a.ExUnitPrices.new(mr(s.priceMem.toString()), mr(s.priceStep.toString()))).fee_algo(a.LinearFee.new(a.BigNum.from_str(s.minFeeA.toString()), a.BigNum.from_str(s.minFeeB.toString()))).key_deposit(a.BigNum.from_str(s.keyDeposit)).max_tx_size(s.maxTxSize).max_value_size(parseInt(s.maxValSize, 10)).pool_deposit(a.BigNum.from_str(s.poolDeposit)).build();
|
|
1449
1449
|
return a.TransactionBuilder.new(e);
|
|
1450
1450
|
}, _r = (s) => {
|
|
@@ -1472,19 +1472,19 @@ const Os = Ps, Ms = (s, e, t = 0) => {
|
|
|
1472
1472
|
data: s.response.data,
|
|
1473
1473
|
headers: s.response.headers,
|
|
1474
1474
|
status: s.response.status
|
|
1475
|
-
}) : s.request ? JSON.stringify(s.request) : s.message : JSON.stringify(s),
|
|
1475
|
+
}) : s.request ? JSON.stringify(s.request) : s.message : JSON.stringify(s), ln = (s) => {
|
|
1476
1476
|
const e = Ot(s);
|
|
1477
1477
|
return a.hash_plutus_data(e).to_hex();
|
|
1478
|
-
},
|
|
1478
|
+
}, hn = (s, e = Date.now()) => {
|
|
1479
1479
|
if (Ie[s]) {
|
|
1480
1480
|
const [t, r, n, i] = Ie[s];
|
|
1481
1481
|
return parseInt(a.BigNum.from_str(e.toString()).div_floor(a.BigNum.from_str("1000")).checked_sub(a.BigNum.from_str(n)).div_floor(a.BigNum.from_str(i)).checked_add(a.BigNum.from_str(t)).to_str(), 10);
|
|
1482
1482
|
}
|
|
1483
1483
|
throw new Error(`Couldn't resolve EpochNo for network: ${s}`);
|
|
1484
|
-
}, qr = (s, e) => Os.fromParts(G(s), G(e)).fingerprint(),
|
|
1484
|
+
}, qr = (s, e) => Os.fromParts(G(s), G(e)).fingerprint(), dn = (s, e) => rs[s][e], fn = (s, e = 0) => {
|
|
1485
1485
|
const t = Vt(s);
|
|
1486
1486
|
return a.EnterpriseAddress.new(e, a.StakeCredential.from_scripthash(t.hash())).to_address().to_bech32();
|
|
1487
|
-
},
|
|
1487
|
+
}, gn = (s) => Vt(s).hash().to_hex(), mn = (s) => Vt(s).to_hex(), $t = (s) => {
|
|
1488
1488
|
var e, t;
|
|
1489
1489
|
try {
|
|
1490
1490
|
const r = [
|
|
@@ -1497,10 +1497,10 @@ const Os = Ps, Ms = (s, e, t = 0) => {
|
|
|
1497
1497
|
} catch (r) {
|
|
1498
1498
|
throw new Error(`An error occurred during resolvePaymentKeyHash: ${r}.`);
|
|
1499
1499
|
}
|
|
1500
|
-
},
|
|
1500
|
+
}, pn = (s, e = 0) => {
|
|
1501
1501
|
const t = Xt(s.code, s.version);
|
|
1502
1502
|
return a.EnterpriseAddress.new(e, a.StakeCredential.from_scripthash(t.hash())).to_address().to_bech32();
|
|
1503
|
-
},
|
|
1503
|
+
}, An = (s) => {
|
|
1504
1504
|
try {
|
|
1505
1505
|
const e = Or(s), t = e == null ? void 0 : e.payment_cred().to_scripthash();
|
|
1506
1506
|
if (t !== void 0)
|
|
@@ -1509,20 +1509,20 @@ const Os = Ps, Ms = (s, e, t = 0) => {
|
|
|
1509
1509
|
} catch (e) {
|
|
1510
1510
|
throw new Error(`An error occurred during resolveScriptHash: ${e}.`);
|
|
1511
1511
|
}
|
|
1512
|
-
},
|
|
1512
|
+
}, In = (s) => a.Ed25519KeyHash.from_hex(s).to_bech32("pool1"), $s = (s) => {
|
|
1513
1513
|
const e = wr(s.join(" ")), t = Rr(e), r = t.to_bech32();
|
|
1514
1514
|
return t.free(), r;
|
|
1515
|
-
},
|
|
1515
|
+
}, _n = (s) => Zt(s).to_hex(), yn = (s, e = Date.now()) => {
|
|
1516
1516
|
if (Ie[s]) {
|
|
1517
1517
|
const [t, r, n] = Ie[s];
|
|
1518
1518
|
return a.BigNum.from_str(e.toString()).div_floor(a.BigNum.from_str("1000")).checked_sub(a.BigNum.from_str(n)).checked_add(a.BigNum.from_str(r)).to_str();
|
|
1519
1519
|
}
|
|
1520
1520
|
throw new Error(`Couldn't resolve SlotNo for network: ${s}`);
|
|
1521
|
-
},
|
|
1521
|
+
}, xe = (s) => {
|
|
1522
1522
|
try {
|
|
1523
1523
|
const e = yt(s), t = Ge(s), r = t == null ? void 0 : t.stake_cred().to_keyhash();
|
|
1524
1524
|
if (r !== void 0)
|
|
1525
|
-
return
|
|
1525
|
+
return Me(e.network_id(), r).to_address().to_bech32();
|
|
1526
1526
|
throw new Error(`Couldn't resolve reward address from address: ${s}`);
|
|
1527
1527
|
} catch (e) {
|
|
1528
1528
|
throw new Error(`An error occurred during resolveRewardAddress: ${e}.`);
|
|
@@ -1540,15 +1540,15 @@ const Os = Ps, Ms = (s, e, t = 0) => {
|
|
|
1540
1540
|
} catch (r) {
|
|
1541
1541
|
throw new Error(`An error occurred during resolveStakeKeyHash: ${r}.`);
|
|
1542
1542
|
}
|
|
1543
|
-
}, Vr = (s, e =
|
|
1544
|
-
const e =
|
|
1543
|
+
}, Vr = (s, e = At.minFeeA, t = At.minFeeB) => (BigInt(e) * BigInt(s) + BigInt(t)).toString(), yr = (s) => {
|
|
1544
|
+
const e = pt(s).body();
|
|
1545
1545
|
return a.hash_transaction(e).to_hex();
|
|
1546
|
-
},
|
|
1546
|
+
}, xn = (s = "", e = 32) => {
|
|
1547
1547
|
if (e <= 0 || e > 2048)
|
|
1548
1548
|
throw new Error("Length must be bewteen 1 and 2048");
|
|
1549
1549
|
const r = xr("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789")(e);
|
|
1550
1550
|
return dt(`${s}${r}`);
|
|
1551
|
-
},
|
|
1551
|
+
}, ye = (s, e) => {
|
|
1552
1552
|
const t = s.vkeys();
|
|
1553
1553
|
if (t !== void 0) {
|
|
1554
1554
|
const r = /* @__PURE__ */ new Set();
|
|
@@ -1562,8 +1562,8 @@ const Os = Ps, Ms = (s, e, t = 0) => {
|
|
|
1562
1562
|
}), n;
|
|
1563
1563
|
}
|
|
1564
1564
|
return e;
|
|
1565
|
-
},
|
|
1566
|
-
class
|
|
1565
|
+
}, wn = (s) => pe(Pr(s)), Cn = (s) => pt(s).to_js_value();
|
|
1566
|
+
class Bn {
|
|
1567
1567
|
_axiosInstance;
|
|
1568
1568
|
constructor(...e) {
|
|
1569
1569
|
if (typeof e[0] == "string" && e[0].startsWith("http"))
|
|
@@ -1577,7 +1577,7 @@ class En {
|
|
|
1577
1577
|
}
|
|
1578
1578
|
}
|
|
1579
1579
|
async fetchAccountInfo(e) {
|
|
1580
|
-
const t = e.startsWith("addr") ?
|
|
1580
|
+
const t = e.startsWith("addr") ? xe(e) : e;
|
|
1581
1581
|
try {
|
|
1582
1582
|
const { data: r, status: n } = await this._axiosInstance.get(`accounts/${t}`);
|
|
1583
1583
|
if (n === 200)
|
|
@@ -1815,7 +1815,7 @@ class En {
|
|
|
1815
1815
|
throw S(t);
|
|
1816
1816
|
}
|
|
1817
1817
|
}
|
|
1818
|
-
class
|
|
1818
|
+
class Sn {
|
|
1819
1819
|
_axiosInstance;
|
|
1820
1820
|
constructor(e, t, r) {
|
|
1821
1821
|
const n = r.host ?? "ipfs.infura.io", i = r.port ?? 5001, c = r.version ?? 0;
|
|
@@ -1835,7 +1835,7 @@ class bn {
|
|
|
1835
1835
|
}
|
|
1836
1836
|
}
|
|
1837
1837
|
}
|
|
1838
|
-
class
|
|
1838
|
+
class En {
|
|
1839
1839
|
_axiosInstance;
|
|
1840
1840
|
constructor(...e) {
|
|
1841
1841
|
if (typeof e[0] == "string" && e[0].startsWith("http"))
|
|
@@ -1858,7 +1858,7 @@ class vn {
|
|
|
1858
1858
|
}
|
|
1859
1859
|
async fetchAccountInfo(e) {
|
|
1860
1860
|
try {
|
|
1861
|
-
const t = e.startsWith("addr") ?
|
|
1861
|
+
const t = e.startsWith("addr") ? xe(e) : e, { data: r, status: n } = await this._axiosInstance.post("account_info", {
|
|
1862
1862
|
_stake_addresses: [t]
|
|
1863
1863
|
});
|
|
1864
1864
|
if (n === 200)
|
|
@@ -2090,7 +2090,7 @@ class vn {
|
|
|
2090
2090
|
}
|
|
2091
2091
|
};
|
|
2092
2092
|
}
|
|
2093
|
-
class
|
|
2093
|
+
class bn {
|
|
2094
2094
|
_baseUrl;
|
|
2095
2095
|
constructor(...e) {
|
|
2096
2096
|
this._baseUrl = ts(e[0]) ? ss[e[0]] : e[0];
|
|
@@ -2157,7 +2157,7 @@ class Qn {
|
|
|
2157
2157
|
}));
|
|
2158
2158
|
}
|
|
2159
2159
|
}
|
|
2160
|
-
class
|
|
2160
|
+
class vn {
|
|
2161
2161
|
_axiosInstance;
|
|
2162
2162
|
_amountsAsStrings = {
|
|
2163
2163
|
headers: {
|
|
@@ -2192,7 +2192,7 @@ class Dn {
|
|
|
2192
2192
|
}
|
|
2193
2193
|
}
|
|
2194
2194
|
async fetchAccountInfo(e) {
|
|
2195
|
-
const t = e.startsWith("addr") ?
|
|
2195
|
+
const t = e.startsWith("addr") ? xe(e) : e;
|
|
2196
2196
|
try {
|
|
2197
2197
|
const { data: r, status: n } = await this._axiosInstance.get(`accounts/${t}`, this._amountsAsStrings);
|
|
2198
2198
|
if (n === 200) {
|
|
@@ -2229,9 +2229,9 @@ class Dn {
|
|
|
2229
2229
|
const { policyId: t, assetName: r } = Kt(e), n = async (i = null, c = []) => {
|
|
2230
2230
|
const l = i === null ? "" : `&cursor=${i}`, { data: p, status: y } = await this._axiosInstance.get(`assets/${t}${r}/addresses?count=100${l}`, this._amountsAsStrings);
|
|
2231
2231
|
if (y === 200) {
|
|
2232
|
-
const
|
|
2232
|
+
const b = p.data.map((U) => ({ address: U.address, quantity: U.amount })), w = p.next_cursor, v = [
|
|
2233
2233
|
...c,
|
|
2234
|
-
...
|
|
2234
|
+
...b
|
|
2235
2235
|
];
|
|
2236
2236
|
return w == null ? v : n(w, v);
|
|
2237
2237
|
}
|
|
@@ -2448,7 +2448,7 @@ class Dn {
|
|
|
2448
2448
|
return;
|
|
2449
2449
|
};
|
|
2450
2450
|
}
|
|
2451
|
-
class
|
|
2451
|
+
class Qn {
|
|
2452
2452
|
_axiosInstance;
|
|
2453
2453
|
constructor(e = "http://localhost:8080/api/v1") {
|
|
2454
2454
|
this._axiosInstance = Mt.create({
|
|
@@ -2456,7 +2456,7 @@ class kn {
|
|
|
2456
2456
|
});
|
|
2457
2457
|
}
|
|
2458
2458
|
async fetchAccountInfo(e) {
|
|
2459
|
-
const t = e.startsWith("addr") ?
|
|
2459
|
+
const t = e.startsWith("addr") ? xe(e) : e;
|
|
2460
2460
|
try {
|
|
2461
2461
|
const { data: r, status: n } = await this._axiosInstance.get(`accounts/${t}`);
|
|
2462
2462
|
if (n === 200)
|
|
@@ -2696,7 +2696,7 @@ class kn {
|
|
|
2696
2696
|
throw S(t);
|
|
2697
2697
|
}
|
|
2698
2698
|
}
|
|
2699
|
-
class
|
|
2699
|
+
class Dn {
|
|
2700
2700
|
static withOneSignature(e) {
|
|
2701
2701
|
const t = Ct($t(e));
|
|
2702
2702
|
return he(t).to_hex();
|
|
@@ -2765,22 +2765,22 @@ let St = class {
|
|
|
2765
2765
|
_txInputsBuilder;
|
|
2766
2766
|
_txWithdrawals;
|
|
2767
2767
|
constructor(e = {}) {
|
|
2768
|
-
this._era = e.era, this._initiator = e.initiator, this._mintBuilder = a.MintBuilder.new(), this._protocolParameters = e.parameters ??
|
|
2768
|
+
this._era = e.era, this._initiator = e.initiator, this._mintBuilder = a.MintBuilder.new(), this._protocolParameters = e.parameters ?? At, this._txBuilder = Ae(e.parameters), this._txCertificates = a.Certificates.new(), this._txInputsBuilder = a.TxInputsBuilder.new(), this._txWithdrawals = a.Withdrawals.new();
|
|
2769
2769
|
}
|
|
2770
2770
|
static attachMetadata(e, t, r = "BABBAGE") {
|
|
2771
2771
|
var c;
|
|
2772
|
-
const n =
|
|
2772
|
+
const n = pt(e), i = n.auxiliary_data() ?? a.AuxiliaryData.new();
|
|
2773
2773
|
if (i.set_metadata(a.GeneralTransactionMetadata.from_hex(t)), i.set_prefer_alonzo_format(r === "ALONZO"), a.hash_auxiliary_data(i).to_hex() !== ((c = n.body().auxiliary_data_hash()) == null ? void 0 : c.to_hex()))
|
|
2774
2774
|
throw new Error("[Transaction] attachMetadata: The metadata hash does not match the auxiliary data hash.");
|
|
2775
2775
|
return a.Transaction.new(n.body(), n.witness_set(), i).to_hex();
|
|
2776
2776
|
}
|
|
2777
2777
|
static deattachMetadata(e) {
|
|
2778
|
-
const t =
|
|
2778
|
+
const t = pt(e);
|
|
2779
2779
|
return a.Transaction.new(t.body(), t.witness_set(), void 0).to_hex();
|
|
2780
2780
|
}
|
|
2781
2781
|
static maskMetadata(e, t = "BABBAGE") {
|
|
2782
2782
|
var i;
|
|
2783
|
-
const r =
|
|
2783
|
+
const r = pt(e), n = (i = r.auxiliary_data()) == null ? void 0 : i.metadata();
|
|
2784
2784
|
if (n !== void 0) {
|
|
2785
2785
|
const c = a.GeneralTransactionMetadata.new();
|
|
2786
2786
|
for (let p = 0; p < n.len(); p += 1) {
|
|
@@ -2794,10 +2794,10 @@ let St = class {
|
|
|
2794
2794
|
}
|
|
2795
2795
|
static readMetadata(e) {
|
|
2796
2796
|
var r, n;
|
|
2797
|
-
return ((n = (r =
|
|
2797
|
+
return ((n = (r = pt(e).auxiliary_data()) == null ? void 0 : r.metadata()) == null ? void 0 : n.to_hex()) ?? "";
|
|
2798
2798
|
}
|
|
2799
2799
|
static writeMetadata(e, t, r = "BABBAGE") {
|
|
2800
|
-
const n =
|
|
2800
|
+
const n = pt(e), i = n.auxiliary_data() ?? a.AuxiliaryData.new();
|
|
2801
2801
|
return i.set_metadata(a.GeneralTransactionMetadata.from_hex(t)), i.set_prefer_alonzo_format(r === "ALONZO"), a.Transaction.new(n.body(), n.witness_set(), i).to_hex();
|
|
2802
2802
|
}
|
|
2803
2803
|
get size() {
|
|
@@ -2824,16 +2824,16 @@ let St = class {
|
|
|
2824
2824
|
}
|
|
2825
2825
|
mintAsset(e, t, r) {
|
|
2826
2826
|
var y, B;
|
|
2827
|
-
const n = (
|
|
2828
|
-
const v = typeof
|
|
2827
|
+
const n = (b, w) => {
|
|
2828
|
+
const v = typeof b == "string" ? Le(b).hash().to_hex() : i(b).hash().to_hex(), U = dt(w.assetName);
|
|
2829
2829
|
return {
|
|
2830
2830
|
unit: `${v}${U}`,
|
|
2831
2831
|
quantity: w.assetQuantity
|
|
2832
2832
|
};
|
|
2833
|
-
}, i = (
|
|
2834
|
-
if ("code" in
|
|
2835
|
-
return Xt(
|
|
2836
|
-
const w = mt(
|
|
2833
|
+
}, i = (b) => {
|
|
2834
|
+
if ("code" in b)
|
|
2835
|
+
return Xt(b.code, b.version);
|
|
2836
|
+
const w = mt(b);
|
|
2837
2837
|
if (w.output().has_script_ref()) {
|
|
2838
2838
|
const v = w.output().script_ref();
|
|
2839
2839
|
if (v.is_plutus_script()) {
|
|
@@ -2858,7 +2858,7 @@ let St = class {
|
|
|
2858
2858
|
fields: []
|
|
2859
2859
|
},
|
|
2860
2860
|
...e.redeemer
|
|
2861
|
-
}, r = mt(e.value), n = e.datum ? a.PlutusWitness.new_with_ref(
|
|
2861
|
+
}, r = mt(e.value), n = e.datum ? a.PlutusWitness.new_with_ref(Ke(e.script), Ys(e.datum), Pe(t)) : a.PlutusWitness.new_with_ref_without_datum(Ke(e.script), Pe(t));
|
|
2862
2862
|
return this._txInputsBuilder.add_plutus_script_input(n, r.input(), r.output().amount()), this;
|
|
2863
2863
|
}
|
|
2864
2864
|
registerStake(e) {
|
|
@@ -2877,7 +2877,7 @@ let St = class {
|
|
|
2877
2877
|
const r = Bt(t), n = r.multiasset();
|
|
2878
2878
|
if (r.is_zero() || n === void 0)
|
|
2879
2879
|
return this;
|
|
2880
|
-
const i = de(e).next(), c = r.coin().is_zero() ? i.with_asset_and_min_required_coin_by_utxo_cost(n,
|
|
2880
|
+
const i = de(e).next(), c = r.coin().is_zero() ? i.with_asset_and_min_required_coin_by_utxo_cost(n, Oe(this._protocolParameters.coinsPerUTxOSize)).build() : i.with_coin_and_asset(r.coin(), n).build();
|
|
2881
2881
|
return t.forEach((l) => {
|
|
2882
2882
|
this.setTxOutput(l);
|
|
2883
2883
|
}), this._txBuilder.add_output(c), this;
|
|
@@ -3021,7 +3021,7 @@ let St = class {
|
|
|
3021
3021
|
this._recipients.forEach((e, t) => {
|
|
3022
3022
|
const n = Bt(e).multiasset();
|
|
3023
3023
|
if (n !== void 0) {
|
|
3024
|
-
const c = de(t).next().with_asset_and_min_required_coin_by_utxo_cost(n,
|
|
3024
|
+
const c = de(t).next().with_asset_and_min_required_coin_by_utxo_cost(n, Oe(this._protocolParameters.coinsPerUTxOSize)).build();
|
|
3025
3025
|
this._txBuilder.add_output(c);
|
|
3026
3026
|
}
|
|
3027
3027
|
});
|
|
@@ -3143,12 +3143,12 @@ const Ws = (s, e, t) => {
|
|
|
3143
3143
|
for (const w of r.keys())
|
|
3144
3144
|
if (Number(r.get(w)) > 0)
|
|
3145
3145
|
return [];
|
|
3146
|
-
const
|
|
3146
|
+
const b = [];
|
|
3147
3147
|
for (const w of i) {
|
|
3148
3148
|
const v = n.get(w);
|
|
3149
|
-
v &&
|
|
3149
|
+
v && b.push(v);
|
|
3150
3150
|
}
|
|
3151
|
-
return
|
|
3151
|
+
return b;
|
|
3152
3152
|
}, Js = (s, e) => {
|
|
3153
3153
|
for (const t of s.output.amount)
|
|
3154
3154
|
if (t.unit == e)
|
|
@@ -3158,9 +3158,9 @@ const Ws = (s, e, t) => {
|
|
|
3158
3158
|
var Wt = { exports: {} }, Lr = { exports: {} }, ze = { exports: {} };
|
|
3159
3159
|
(function(s) {
|
|
3160
3160
|
(function(e) {
|
|
3161
|
-
var t, r = /^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i, n = Math.ceil, i = Math.floor, c = "[BigNumber Error] ", l = c + "Number primitive has more than 15 significant digits: ", p = 1e14, y = 14, B = 9007199254740991,
|
|
3161
|
+
var t, r = /^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i, n = Math.ceil, i = Math.floor, c = "[BigNumber Error] ", l = c + "Number primitive has more than 15 significant digits: ", p = 1e14, y = 14, B = 9007199254740991, b = [1, 10, 100, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11, 1e12, 1e13], w = 1e7, v = 1e9;
|
|
3162
3162
|
function U(O) {
|
|
3163
|
-
var M, z, X, D =
|
|
3163
|
+
var M, z, X, D = E.prototype = { constructor: E, toString: null, valueOf: null }, F = new E(1), q = 20, J = 4, st = -7, ct = 21, Ft = -1e7, _t = 1e7, Rt = !1, te = 1, kt = 0, we = {
|
|
3164
3164
|
prefix: "",
|
|
3165
3165
|
groupSize: 3,
|
|
3166
3166
|
secondaryGroupSize: 0,
|
|
@@ -3169,21 +3169,21 @@ var Wt = { exports: {} }, Lr = { exports: {} }, ze = { exports: {} };
|
|
|
3169
3169
|
fractionGroupSize: 0,
|
|
3170
3170
|
fractionGroupSeparator: "\xA0",
|
|
3171
3171
|
suffix: ""
|
|
3172
|
-
}, qt = "0123456789abcdefghijklmnopqrstuvwxyz",
|
|
3173
|
-
function
|
|
3172
|
+
}, qt = "0123456789abcdefghijklmnopqrstuvwxyz", Ce = !0;
|
|
3173
|
+
function E(o, u) {
|
|
3174
3174
|
var h, I, f, m, x, d, g, _, A = this;
|
|
3175
|
-
if (!(A instanceof
|
|
3176
|
-
return new
|
|
3175
|
+
if (!(A instanceof E))
|
|
3176
|
+
return new E(o, u);
|
|
3177
3177
|
if (u == null) {
|
|
3178
3178
|
if (o && o._isBigNumber === !0) {
|
|
3179
|
-
A.s = o.s, !o.c || o.e >
|
|
3179
|
+
A.s = o.s, !o.c || o.e > _t ? A.c = A.e = null : o.e < Ft ? A.c = [A.e = 0] : (A.e = o.e, A.c = o.c.slice());
|
|
3180
3180
|
return;
|
|
3181
3181
|
}
|
|
3182
3182
|
if ((d = typeof o == "number") && o * 0 == 0) {
|
|
3183
3183
|
if (A.s = 1 / o < 0 ? (o = -o, -1) : 1, o === ~~o) {
|
|
3184
3184
|
for (m = 0, x = o; x >= 10; x /= 10, m++)
|
|
3185
3185
|
;
|
|
3186
|
-
m >
|
|
3186
|
+
m > _t ? A.c = A.e = null : (A.e = m, A.c = [o]);
|
|
3187
3187
|
return;
|
|
3188
3188
|
}
|
|
3189
3189
|
_ = String(o);
|
|
@@ -3194,12 +3194,12 @@ var Wt = { exports: {} }, Lr = { exports: {} }, ze = { exports: {} };
|
|
|
3194
3194
|
}
|
|
3195
3195
|
(m = _.indexOf(".")) > -1 && (_ = _.replace(".", "")), (x = _.search(/e/i)) > 0 ? (m < 0 && (m = x), m += +_.slice(x + 1), _ = _.substring(0, x)) : m < 0 && (m = _.length);
|
|
3196
3196
|
} else {
|
|
3197
|
-
if (Q(u, 2, qt.length, "Base"), u == 10 &&
|
|
3198
|
-
return A = new
|
|
3197
|
+
if (Q(u, 2, qt.length, "Base"), u == 10 && Ce)
|
|
3198
|
+
return A = new E(o), ft(A, q + A.e + 1, J);
|
|
3199
3199
|
if (_ = String(o), d = typeof o == "number") {
|
|
3200
3200
|
if (o * 0 != 0)
|
|
3201
3201
|
return X(A, _, d, u);
|
|
3202
|
-
if (A.s = 1 / o < 0 ? (_ = _.slice(1), -1) : 1,
|
|
3202
|
+
if (A.s = 1 / o < 0 ? (_ = _.slice(1), -1) : 1, E.DEBUG && _.replace(/^0\.0*|\./, "").length > 15)
|
|
3203
3203
|
throw Error(l + o);
|
|
3204
3204
|
} else
|
|
3205
3205
|
A.s = _.charCodeAt(0) === 45 ? (_ = _.slice(1), -1) : 1;
|
|
@@ -3223,9 +3223,9 @@ var Wt = { exports: {} }, Lr = { exports: {} }, ze = { exports: {} };
|
|
|
3223
3223
|
for (g = _.length; _.charCodeAt(--g) === 48; )
|
|
3224
3224
|
;
|
|
3225
3225
|
if (_ = _.slice(x, ++g)) {
|
|
3226
|
-
if (g -= x, d &&
|
|
3226
|
+
if (g -= x, d && E.DEBUG && g > 15 && (o > B || o !== i(o)))
|
|
3227
3227
|
throw Error(l + A.s * o);
|
|
3228
|
-
if ((m = m - x - 1) >
|
|
3228
|
+
if ((m = m - x - 1) > _t)
|
|
3229
3229
|
A.c = A.e = null;
|
|
3230
3230
|
else if (m < Ft)
|
|
3231
3231
|
A.c = [A.e = 0];
|
|
@@ -3243,15 +3243,15 @@ var Wt = { exports: {} }, Lr = { exports: {} }, ze = { exports: {} };
|
|
|
3243
3243
|
} else
|
|
3244
3244
|
A.c = [A.e = 0];
|
|
3245
3245
|
}
|
|
3246
|
-
|
|
3246
|
+
E.clone = U, E.ROUND_UP = 0, E.ROUND_DOWN = 1, E.ROUND_CEIL = 2, E.ROUND_FLOOR = 3, E.ROUND_HALF_UP = 4, E.ROUND_HALF_DOWN = 5, E.ROUND_HALF_EVEN = 6, E.ROUND_HALF_CEIL = 7, E.ROUND_HALF_FLOOR = 8, E.EUCLID = 9, E.config = E.set = function(o) {
|
|
3247
3247
|
var u, h;
|
|
3248
3248
|
if (o != null)
|
|
3249
3249
|
if (typeof o == "object") {
|
|
3250
3250
|
if (o.hasOwnProperty(u = "DECIMAL_PLACES") && (h = o[u], Q(h, 0, v, u), q = h), o.hasOwnProperty(u = "ROUNDING_MODE") && (h = o[u], Q(h, 0, 8, u), J = h), o.hasOwnProperty(u = "EXPONENTIAL_AT") && (h = o[u], h && h.pop ? (Q(h[0], -v, 0, u), Q(h[1], 0, v, u), st = h[0], ct = h[1]) : (Q(h, -v, v, u), st = -(ct = h < 0 ? -h : h))), o.hasOwnProperty(u = "RANGE"))
|
|
3251
3251
|
if (h = o[u], h && h.pop)
|
|
3252
|
-
Q(h[0], -v, -1, u), Q(h[1], 1, v, u), Ft = h[0],
|
|
3252
|
+
Q(h[0], -v, -1, u), Q(h[1], 1, v, u), Ft = h[0], _t = h[1];
|
|
3253
3253
|
else if (Q(h, -v, v, u), h)
|
|
3254
|
-
Ft = -(
|
|
3254
|
+
Ft = -(_t = h < 0 ? -h : h);
|
|
3255
3255
|
else
|
|
3256
3256
|
throw Error(c + u + " cannot be zero: " + h);
|
|
3257
3257
|
if (o.hasOwnProperty(u = "CRYPTO"))
|
|
@@ -3267,12 +3267,12 @@ var Wt = { exports: {} }, Lr = { exports: {} }, ze = { exports: {} };
|
|
|
3267
3267
|
throw Error(c + u + " not true or false: " + h);
|
|
3268
3268
|
if (o.hasOwnProperty(u = "MODULO_MODE") && (h = o[u], Q(h, 0, 9, u), te = h), o.hasOwnProperty(u = "POW_PRECISION") && (h = o[u], Q(h, 0, v, u), kt = h), o.hasOwnProperty(u = "FORMAT"))
|
|
3269
3269
|
if (h = o[u], typeof h == "object")
|
|
3270
|
-
|
|
3270
|
+
we = h;
|
|
3271
3271
|
else
|
|
3272
3272
|
throw Error(c + u + " not an object: " + h);
|
|
3273
3273
|
if (o.hasOwnProperty(u = "ALPHABET"))
|
|
3274
3274
|
if (h = o[u], typeof h == "string" && !/^.?$|[+\-.\s]|(.).*\1/.test(h))
|
|
3275
|
-
|
|
3275
|
+
Ce = h.slice(0, 10) == "0123456789", qt = h;
|
|
3276
3276
|
else
|
|
3277
3277
|
throw Error(c + u + " invalid: " + h);
|
|
3278
3278
|
} else
|
|
@@ -3281,17 +3281,17 @@ var Wt = { exports: {} }, Lr = { exports: {} }, ze = { exports: {} };
|
|
|
3281
3281
|
DECIMAL_PLACES: q,
|
|
3282
3282
|
ROUNDING_MODE: J,
|
|
3283
3283
|
EXPONENTIAL_AT: [st, ct],
|
|
3284
|
-
RANGE: [Ft,
|
|
3284
|
+
RANGE: [Ft, _t],
|
|
3285
3285
|
CRYPTO: Rt,
|
|
3286
3286
|
MODULO_MODE: te,
|
|
3287
3287
|
POW_PRECISION: kt,
|
|
3288
|
-
FORMAT:
|
|
3288
|
+
FORMAT: we,
|
|
3289
3289
|
ALPHABET: qt
|
|
3290
3290
|
};
|
|
3291
|
-
},
|
|
3291
|
+
}, E.isBigNumber = function(o) {
|
|
3292
3292
|
if (!o || o._isBigNumber !== !0)
|
|
3293
3293
|
return !1;
|
|
3294
|
-
if (!
|
|
3294
|
+
if (!E.DEBUG)
|
|
3295
3295
|
return !0;
|
|
3296
3296
|
var u, h, I = o.c, f = o.e, m = o.s;
|
|
3297
3297
|
t:
|
|
@@ -3313,18 +3313,18 @@ var Wt = { exports: {} }, Lr = { exports: {} }, ze = { exports: {} };
|
|
|
3313
3313
|
} else if (I === null && f === null && (m === null || m === 1 || m === -1))
|
|
3314
3314
|
return !0;
|
|
3315
3315
|
throw Error(c + "Invalid BigNumber: " + o);
|
|
3316
|
-
},
|
|
3316
|
+
}, E.maximum = E.max = function() {
|
|
3317
3317
|
return We(arguments, -1);
|
|
3318
|
-
},
|
|
3318
|
+
}, E.minimum = E.min = function() {
|
|
3319
3319
|
return We(arguments, 1);
|
|
3320
|
-
},
|
|
3320
|
+
}, E.random = function() {
|
|
3321
3321
|
var o = 9007199254740992, u = Math.random() * o & 2097151 ? function() {
|
|
3322
3322
|
return i(Math.random() * o);
|
|
3323
3323
|
} : function() {
|
|
3324
3324
|
return (Math.random() * 1073741824 | 0) * 8388608 + (Math.random() * 8388608 | 0);
|
|
3325
3325
|
};
|
|
3326
3326
|
return function(h) {
|
|
3327
|
-
var I, f, m, x, d, g = 0, _ = [], A = new
|
|
3327
|
+
var I, f, m, x, d, g = 0, _ = [], A = new E(F);
|
|
3328
3328
|
if (h == null ? h = q : Q(h, 0, v), x = n(h / y), Rt)
|
|
3329
3329
|
if (crypto.getRandomValues) {
|
|
3330
3330
|
for (I = crypto.getRandomValues(new Uint32Array(x *= 2)); g < x; )
|
|
@@ -3339,7 +3339,7 @@ var Wt = { exports: {} }, Lr = { exports: {} }, ze = { exports: {} };
|
|
|
3339
3339
|
if (!Rt)
|
|
3340
3340
|
for (; g < x; )
|
|
3341
3341
|
d = u(), d < 9e15 && (_[g++] = d % 1e14);
|
|
3342
|
-
for (x = _[--g], h %= y, x && h && (d =
|
|
3342
|
+
for (x = _[--g], h %= y, x && h && (d = b[y - h], _[g] = i(x / d) * d); _[g] === 0; _.pop(), g--)
|
|
3343
3343
|
;
|
|
3344
3344
|
if (g < 0)
|
|
3345
3345
|
_ = [m = 0];
|
|
@@ -3352,8 +3352,8 @@ var Wt = { exports: {} }, Lr = { exports: {} }, ze = { exports: {} };
|
|
|
3352
3352
|
}
|
|
3353
3353
|
return A.e = m, A.c = _, A;
|
|
3354
3354
|
};
|
|
3355
|
-
}(),
|
|
3356
|
-
for (var o = 1, u = arguments, h = new
|
|
3355
|
+
}(), E.sum = function() {
|
|
3356
|
+
for (var o = 1, u = arguments, h = new E(u[0]); o < u.length; )
|
|
3357
3357
|
h = h.plus(u[o++]);
|
|
3358
3358
|
return h;
|
|
3359
3359
|
}, z = function() {
|
|
@@ -3369,7 +3369,7 @@ var Wt = { exports: {} }, Lr = { exports: {} }, ze = { exports: {} };
|
|
|
3369
3369
|
}
|
|
3370
3370
|
return function(h, I, f, m, x) {
|
|
3371
3371
|
var d, g, _, A, C, P, K, L, Z = h.indexOf("."), et = q, V = J;
|
|
3372
|
-
for (Z >= 0 && (A = kt, kt = 0, h = h.replace(".", ""), L = new
|
|
3372
|
+
for (Z >= 0 && (A = kt, kt = 0, h = h.replace(".", ""), L = new E(I), P = L.pow(h.length - Z), kt = A, L.c = u(
|
|
3373
3373
|
Y(N(P.c), P.e, "0"),
|
|
3374
3374
|
10,
|
|
3375
3375
|
f,
|
|
@@ -3418,22 +3418,22 @@ var Wt = { exports: {} }, Lr = { exports: {} }, ze = { exports: {} };
|
|
|
3418
3418
|
;
|
|
3419
3419
|
}
|
|
3420
3420
|
return function(I, f, m, x, d) {
|
|
3421
|
-
var g, _, A, C, P, K, L, Z, et, V, $, nt, ce,
|
|
3421
|
+
var g, _, A, C, P, K, L, Z, et, V, $, nt, ce, Ee, be, xt, ee, gt = I.s == f.s ? 1 : -1, at = I.c, tt = f.c;
|
|
3422
3422
|
if (!at || !at[0] || !tt || !tt[0])
|
|
3423
|
-
return new
|
|
3423
|
+
return new E(
|
|
3424
3424
|
!I.s || !f.s || (at ? tt && at[0] == tt[0] : !tt) ? NaN : at && at[0] == 0 || !tt ? gt * 0 : gt / 0
|
|
3425
3425
|
);
|
|
3426
|
-
for (Z = new
|
|
3426
|
+
for (Z = new E(gt), et = Z.c = [], _ = I.e - f.e, gt = m + _ + 1, d || (d = p, _ = k(I.e / y) - k(f.e / y), gt = gt / y | 0), A = 0; tt[A] == (at[A] || 0); A++)
|
|
3427
3427
|
;
|
|
3428
3428
|
if (tt[A] > (at[A] || 0) && _--, gt < 0)
|
|
3429
3429
|
et.push(1), C = !0;
|
|
3430
3430
|
else {
|
|
3431
|
-
for (
|
|
3431
|
+
for (Ee = at.length, xt = tt.length, A = 0, gt += 2, P = i(d / (tt[0] + 1)), P > 1 && (tt = o(tt, P, d), at = o(at, P, d), xt = tt.length, Ee = at.length), ce = xt, V = at.slice(0, xt), $ = V.length; $ < xt; V[$++] = 0)
|
|
3432
3432
|
;
|
|
3433
|
-
ee = tt.slice(), ee = [0].concat(ee),
|
|
3433
|
+
ee = tt.slice(), ee = [0].concat(ee), be = tt[0], tt[1] >= d / 2 && be++;
|
|
3434
3434
|
do {
|
|
3435
3435
|
if (P = 0, g = u(tt, V, xt, $), g < 0) {
|
|
3436
|
-
if (nt = V[0], xt != $ && (nt = nt * d + (V[1] || 0)), P = i(nt /
|
|
3436
|
+
if (nt = V[0], xt != $ && (nt = nt * d + (V[1] || 0)), P = i(nt / be), P > 1)
|
|
3437
3437
|
for (P >= d && (P = d - 1), K = o(tt, P, d), L = K.length, $ = V.length; u(K, V, L, $) == 1; )
|
|
3438
3438
|
P--, h(K, xt < L ? ee : tt, L, d), L = K.length, g = 1;
|
|
3439
3439
|
else
|
|
@@ -3444,7 +3444,7 @@ var Wt = { exports: {} }, Lr = { exports: {} }, ze = { exports: {} };
|
|
|
3444
3444
|
} else
|
|
3445
3445
|
g === 0 && (P++, V = [0]);
|
|
3446
3446
|
et[A++] = P, V[0] ? V[$++] = at[ce] || 0 : (V = [at[ce]], $ = 1);
|
|
3447
|
-
} while ((ce++ <
|
|
3447
|
+
} while ((ce++ < Ee || V[0] != null) && gt--);
|
|
3448
3448
|
C = V[0] != null, et[0] || et.splice(0, 1);
|
|
3449
3449
|
}
|
|
3450
3450
|
if (d == p) {
|
|
@@ -3456,13 +3456,13 @@ var Wt = { exports: {} }, Lr = { exports: {} }, ze = { exports: {} };
|
|
|
3456
3456
|
return Z;
|
|
3457
3457
|
};
|
|
3458
3458
|
}();
|
|
3459
|
-
function
|
|
3459
|
+
function Be(o, u, h, I) {
|
|
3460
3460
|
var f, m, x, d, g;
|
|
3461
3461
|
if (h == null ? h = J : Q(h, 0, 8), !o.c)
|
|
3462
3462
|
return o.toString();
|
|
3463
3463
|
if (f = o.c[0], x = o.e, u == null)
|
|
3464
3464
|
g = N(o.c), g = I == 1 || I == 2 && (x <= st || x >= ct) ? j(g, x) : Y(g, x, "0");
|
|
3465
|
-
else if (o = ft(new
|
|
3465
|
+
else if (o = ft(new E(o), u, h), m = o.e, g = N(o.c), d = g.length, I == 1 || I == 2 && (u <= m || m <= st)) {
|
|
3466
3466
|
for (; d < u; g += "0", d++)
|
|
3467
3467
|
;
|
|
3468
3468
|
g = j(g, m);
|
|
@@ -3476,16 +3476,16 @@ var Wt = { exports: {} }, Lr = { exports: {} }, ze = { exports: {} };
|
|
|
3476
3476
|
return o.s < 0 && f ? "-" + g : g;
|
|
3477
3477
|
}
|
|
3478
3478
|
function We(o, u) {
|
|
3479
|
-
for (var h, I, f = 1, m = new
|
|
3480
|
-
I = new
|
|
3479
|
+
for (var h, I, f = 1, m = new E(o[0]); f < o.length; f++)
|
|
3480
|
+
I = new E(o[f]), (!I.s || (h = T(m, I)) === u || h === 0 && m.s === u) && (m = I);
|
|
3481
3481
|
return m;
|
|
3482
3482
|
}
|
|
3483
|
-
function
|
|
3483
|
+
function Se(o, u, h) {
|
|
3484
3484
|
for (var I = 1, f = u.length; !u[--f]; u.pop())
|
|
3485
3485
|
;
|
|
3486
3486
|
for (f = u[0]; f >= 10; f /= 10, I++)
|
|
3487
3487
|
;
|
|
3488
|
-
return (h = I + h * y - 1) >
|
|
3488
|
+
return (h = I + h * y - 1) > _t ? o.c = o.e = null : h < Ft ? o.c = [o.e = 0] : (o.e = h, o.c = u), o;
|
|
3489
3489
|
}
|
|
3490
3490
|
X = function() {
|
|
3491
3491
|
var o = /^(-?)0([xbo])(?=\w[\w.]*$)/i, u = /^([^.]+)\.$/, h = /^\.([^.]+)$/, I = /^-?(Infinity|NaN)$/, f = /^\s*\+(?=[\w.])|^\s+|\s+$/g;
|
|
@@ -3497,8 +3497,8 @@ var Wt = { exports: {} }, Lr = { exports: {} }, ze = { exports: {} };
|
|
|
3497
3497
|
if (!d && (A = A.replace(o, function(C, P, K) {
|
|
3498
3498
|
return _ = (K = K.toLowerCase()) == "x" ? 16 : K == "b" ? 2 : 8, !g || g == _ ? P : C;
|
|
3499
3499
|
}), g && (_ = g, A = A.replace(u, "$1").replace(h, "0.$1")), x != A))
|
|
3500
|
-
return new
|
|
3501
|
-
if (
|
|
3500
|
+
return new E(A, _);
|
|
3501
|
+
if (E.DEBUG)
|
|
3502
3502
|
throw Error(c + "Not a" + (g ? " base " + g : "") + " number: " + x);
|
|
3503
3503
|
m.s = null;
|
|
3504
3504
|
}
|
|
@@ -3506,7 +3506,7 @@ var Wt = { exports: {} }, Lr = { exports: {} }, ze = { exports: {} };
|
|
|
3506
3506
|
};
|
|
3507
3507
|
}();
|
|
3508
3508
|
function ft(o, u, h, I) {
|
|
3509
|
-
var f, m, x, d, g, _, A, C = o.c, P =
|
|
3509
|
+
var f, m, x, d, g, _, A, C = o.c, P = b;
|
|
3510
3510
|
if (C) {
|
|
3511
3511
|
t: {
|
|
3512
3512
|
for (f = 1, d = C[0]; d >= 10; d /= 10, f++)
|
|
@@ -3544,7 +3544,7 @@ var Wt = { exports: {} }, Lr = { exports: {} }, ze = { exports: {} };
|
|
|
3544
3544
|
for (m = C.length; C[--m] === 0; C.pop())
|
|
3545
3545
|
;
|
|
3546
3546
|
}
|
|
3547
|
-
o.e >
|
|
3547
|
+
o.e > _t ? o.c = o.e = null : o.e < Ft && (o.c = [o.e = 0]);
|
|
3548
3548
|
}
|
|
3549
3549
|
return o;
|
|
3550
3550
|
}
|
|
@@ -3553,14 +3553,14 @@ var Wt = { exports: {} }, Lr = { exports: {} }, ze = { exports: {} };
|
|
|
3553
3553
|
return h === null ? o.toString() : (u = N(o.c), u = h <= st || h >= ct ? j(u, h) : Y(u, h, "0"), o.s < 0 ? "-" + u : u);
|
|
3554
3554
|
}
|
|
3555
3555
|
return D.absoluteValue = D.abs = function() {
|
|
3556
|
-
var o = new
|
|
3556
|
+
var o = new E(this);
|
|
3557
3557
|
return o.s < 0 && (o.s = 1), o;
|
|
3558
3558
|
}, D.comparedTo = function(o, u) {
|
|
3559
|
-
return T(this, new
|
|
3559
|
+
return T(this, new E(o, u));
|
|
3560
3560
|
}, D.decimalPlaces = D.dp = function(o, u) {
|
|
3561
3561
|
var h, I, f, m = this;
|
|
3562
3562
|
if (o != null)
|
|
3563
|
-
return Q(o, 0, v), u == null ? u = J : Q(u, 0, 8), ft(new
|
|
3563
|
+
return Q(o, 0, v), u == null ? u = J : Q(u, 0, 8), ft(new E(m), o + m.e + 1, u);
|
|
3564
3564
|
if (!(h = m.c))
|
|
3565
3565
|
return null;
|
|
3566
3566
|
if (I = ((f = h.length - 1) - k(this.e / y)) * y, f = h[f])
|
|
@@ -3568,25 +3568,25 @@ var Wt = { exports: {} }, Lr = { exports: {} }, ze = { exports: {} };
|
|
|
3568
3568
|
;
|
|
3569
3569
|
return I < 0 && (I = 0), I;
|
|
3570
3570
|
}, D.dividedBy = D.div = function(o, u) {
|
|
3571
|
-
return M(this, new
|
|
3571
|
+
return M(this, new E(o, u), q, J);
|
|
3572
3572
|
}, D.dividedToIntegerBy = D.idiv = function(o, u) {
|
|
3573
|
-
return M(this, new
|
|
3573
|
+
return M(this, new E(o, u), 0, 1);
|
|
3574
3574
|
}, D.exponentiatedBy = D.pow = function(o, u) {
|
|
3575
3575
|
var h, I, f, m, x, d, g, _, A, C = this;
|
|
3576
|
-
if (o = new
|
|
3576
|
+
if (o = new E(o), o.c && !o.isInteger())
|
|
3577
3577
|
throw Error(c + "Exponent not an integer: " + bt(o));
|
|
3578
|
-
if (u != null && (u = new
|
|
3579
|
-
return A = new
|
|
3578
|
+
if (u != null && (u = new E(u)), d = o.e > 14, !C.c || !C.c[0] || C.c[0] == 1 && !C.e && C.c.length == 1 || !o.c || !o.c[0])
|
|
3579
|
+
return A = new E(Math.pow(+bt(C), d ? o.s * (2 - R(o)) : +bt(o))), u ? A.mod(u) : A;
|
|
3580
3580
|
if (g = o.s < 0, u) {
|
|
3581
3581
|
if (u.c ? !u.c[0] : !u.s)
|
|
3582
|
-
return new
|
|
3582
|
+
return new E(NaN);
|
|
3583
3583
|
I = !g && C.isInteger() && u.isInteger(), I && (C = C.mod(u));
|
|
3584
3584
|
} else {
|
|
3585
3585
|
if (o.e > 9 && (C.e > 0 || C.e < -1 || (C.e == 0 ? C.c[0] > 1 || d && C.c[1] >= 24e7 : C.c[0] < 8e13 || d && C.c[0] <= 9999975e7)))
|
|
3586
|
-
return m = C.s < 0 && R(o) ? -0 : 0, C.e > -1 && (m = 1 / m), new
|
|
3586
|
+
return m = C.s < 0 && R(o) ? -0 : 0, C.e > -1 && (m = 1 / m), new E(g ? 1 / m : m);
|
|
3587
3587
|
kt && (m = n(kt / y + 2));
|
|
3588
3588
|
}
|
|
3589
|
-
for (d ? (h = new
|
|
3589
|
+
for (d ? (h = new E(0.5), g && (o.s = 1), _ = R(o)) : (f = Math.abs(+bt(o)), _ = f % 2), A = new E(F); ; ) {
|
|
3590
3590
|
if (_) {
|
|
3591
3591
|
if (A = A.times(C), !A.c)
|
|
3592
3592
|
break;
|
|
@@ -3607,22 +3607,22 @@ var Wt = { exports: {} }, Lr = { exports: {} }, ze = { exports: {} };
|
|
|
3607
3607
|
}
|
|
3608
3608
|
return I ? A : (g && (A = F.div(A)), u ? A.mod(u) : m ? ft(A, kt, J, x) : A);
|
|
3609
3609
|
}, D.integerValue = function(o) {
|
|
3610
|
-
var u = new
|
|
3610
|
+
var u = new E(this);
|
|
3611
3611
|
return o == null ? o = J : Q(o, 0, 8), ft(u, u.e + 1, o);
|
|
3612
3612
|
}, D.isEqualTo = D.eq = function(o, u) {
|
|
3613
|
-
return T(this, new
|
|
3613
|
+
return T(this, new E(o, u)) === 0;
|
|
3614
3614
|
}, D.isFinite = function() {
|
|
3615
3615
|
return !!this.c;
|
|
3616
3616
|
}, D.isGreaterThan = D.gt = function(o, u) {
|
|
3617
|
-
return T(this, new
|
|
3617
|
+
return T(this, new E(o, u)) > 0;
|
|
3618
3618
|
}, D.isGreaterThanOrEqualTo = D.gte = function(o, u) {
|
|
3619
|
-
return (u = T(this, new
|
|
3619
|
+
return (u = T(this, new E(o, u))) === 1 || u === 0;
|
|
3620
3620
|
}, D.isInteger = function() {
|
|
3621
3621
|
return !!this.c && k(this.e / y) > this.c.length - 2;
|
|
3622
3622
|
}, D.isLessThan = D.lt = function(o, u) {
|
|
3623
|
-
return T(this, new
|
|
3623
|
+
return T(this, new E(o, u)) < 0;
|
|
3624
3624
|
}, D.isLessThanOrEqualTo = D.lte = function(o, u) {
|
|
3625
|
-
return (u = T(this, new
|
|
3625
|
+
return (u = T(this, new E(o, u))) === -1 || u === 0;
|
|
3626
3626
|
}, D.isNaN = function() {
|
|
3627
3627
|
return !this.s;
|
|
3628
3628
|
}, D.isNegative = function() {
|
|
@@ -3633,16 +3633,16 @@ var Wt = { exports: {} }, Lr = { exports: {} }, ze = { exports: {} };
|
|
|
3633
3633
|
return !!this.c && this.c[0] == 0;
|
|
3634
3634
|
}, D.minus = function(o, u) {
|
|
3635
3635
|
var h, I, f, m, x = this, d = x.s;
|
|
3636
|
-
if (o = new
|
|
3637
|
-
return new
|
|
3636
|
+
if (o = new E(o, u), u = o.s, !d || !u)
|
|
3637
|
+
return new E(NaN);
|
|
3638
3638
|
if (d != u)
|
|
3639
3639
|
return o.s = -u, x.plus(o);
|
|
3640
3640
|
var g = x.e / y, _ = o.e / y, A = x.c, C = o.c;
|
|
3641
3641
|
if (!g || !_) {
|
|
3642
3642
|
if (!A || !C)
|
|
3643
|
-
return A ? (o.s = -u, o) : new
|
|
3643
|
+
return A ? (o.s = -u, o) : new E(C ? x : NaN);
|
|
3644
3644
|
if (!A[0] || !C[0])
|
|
3645
|
-
return C[0] ? (o.s = -u, o) : new
|
|
3645
|
+
return C[0] ? (o.s = -u, o) : new E(A[0] ? x : J == 3 ? -0 : 0);
|
|
3646
3646
|
}
|
|
3647
3647
|
if (g = k(g), _ = k(_), A = A.slice(), d = g - _) {
|
|
3648
3648
|
for ((m = d < 0) ? (d = -d, f = A) : (_ = g, f = C), f.reverse(), u = d; u--; f.push(0))
|
|
@@ -3667,12 +3667,12 @@ var Wt = { exports: {} }, Lr = { exports: {} }, ze = { exports: {} };
|
|
|
3667
3667
|
}
|
|
3668
3668
|
for (; A[0] == 0; A.splice(0, 1), --_)
|
|
3669
3669
|
;
|
|
3670
|
-
return A[0] ?
|
|
3670
|
+
return A[0] ? Se(o, A, _) : (o.s = J == 3 ? -1 : 1, o.c = [o.e = 0], o);
|
|
3671
3671
|
}, D.modulo = D.mod = function(o, u) {
|
|
3672
3672
|
var h, I, f = this;
|
|
3673
|
-
return o = new
|
|
3673
|
+
return o = new E(o, u), !f.c || !o.s || o.c && !o.c[0] ? new E(NaN) : !o.c || f.c && !f.c[0] ? new E(f) : (te == 9 ? (I = o.s, o.s = 1, h = M(f, o, 0, 3), o.s = I, h.s *= I) : h = M(f, o, 0, te), o = f.minus(h.times(o)), !o.c[0] && te == 1 && (o.s = f.s), o);
|
|
3674
3674
|
}, D.multipliedBy = D.times = function(o, u) {
|
|
3675
|
-
var h, I, f, m, x, d, g, _, A, C, P, K, L, Z, et, V = this, $ = V.c, nt = (o = new
|
|
3675
|
+
var h, I, f, m, x, d, g, _, A, C, P, K, L, Z, et, V = this, $ = V.c, nt = (o = new E(o, u)).c;
|
|
3676
3676
|
if (!$ || !nt || !$[0] || !nt[0])
|
|
3677
3677
|
return !V.s || !o.s || $ && !$[0] && !nt || nt && !nt[0] && !$ ? o.c = o.e = o.s = null : (o.s *= V.s, !$ || !nt ? o.c = o.e = null : (o.c = [0], o.e = 0)), o;
|
|
3678
3678
|
for (I = k(V.e / y) + k(o.e / y), o.s *= V.s, g = $.length, C = nt.length, g < C && (L = $, $ = nt, nt = L, f = g, g = C, C = f), f = g + C, L = []; f--; L.push(0))
|
|
@@ -3682,22 +3682,22 @@ var Wt = { exports: {} }, Lr = { exports: {} }, ze = { exports: {} };
|
|
|
3682
3682
|
_ = $[--x] % et, A = $[x] / et | 0, d = K * _ + A * P, _ = P * _ + d % et * et + L[m] + h, h = (_ / Z | 0) + (d / et | 0) + K * A, L[m--] = _ % Z;
|
|
3683
3683
|
L[m] = h;
|
|
3684
3684
|
}
|
|
3685
|
-
return h ? ++I : L.splice(0, 1),
|
|
3685
|
+
return h ? ++I : L.splice(0, 1), Se(o, L, I);
|
|
3686
3686
|
}, D.negated = function() {
|
|
3687
|
-
var o = new
|
|
3687
|
+
var o = new E(this);
|
|
3688
3688
|
return o.s = -o.s || null, o;
|
|
3689
3689
|
}, D.plus = function(o, u) {
|
|
3690
3690
|
var h, I = this, f = I.s;
|
|
3691
|
-
if (o = new
|
|
3692
|
-
return new
|
|
3691
|
+
if (o = new E(o, u), u = o.s, !f || !u)
|
|
3692
|
+
return new E(NaN);
|
|
3693
3693
|
if (f != u)
|
|
3694
3694
|
return o.s = -u, I.minus(o);
|
|
3695
3695
|
var m = I.e / y, x = o.e / y, d = I.c, g = o.c;
|
|
3696
3696
|
if (!m || !x) {
|
|
3697
3697
|
if (!d || !g)
|
|
3698
|
-
return new
|
|
3698
|
+
return new E(f / 0);
|
|
3699
3699
|
if (!d[0] || !g[0])
|
|
3700
|
-
return g[0] ? o : new
|
|
3700
|
+
return g[0] ? o : new E(d[0] ? I : f * 0);
|
|
3701
3701
|
}
|
|
3702
3702
|
if (m = k(m), x = k(x), d = d.slice(), f = m - x) {
|
|
3703
3703
|
for (f > 0 ? (x = m, h = g) : (f = -f, h = d), h.reverse(); f--; h.push(0))
|
|
@@ -3706,11 +3706,11 @@ var Wt = { exports: {} }, Lr = { exports: {} }, ze = { exports: {} };
|
|
|
3706
3706
|
}
|
|
3707
3707
|
for (f = d.length, u = g.length, f - u < 0 && (h = g, g = d, d = h, u = f), f = 0; u; )
|
|
3708
3708
|
f = (d[--u] = d[u] + g[u] + f) / p | 0, d[u] = p === d[u] ? 0 : d[u] % p;
|
|
3709
|
-
return f && (d = [f].concat(d), ++x),
|
|
3709
|
+
return f && (d = [f].concat(d), ++x), Se(o, d, x);
|
|
3710
3710
|
}, D.precision = D.sd = function(o, u) {
|
|
3711
3711
|
var h, I, f, m = this;
|
|
3712
3712
|
if (o != null && o !== !!o)
|
|
3713
|
-
return Q(o, 1, v), u == null ? u = J : Q(u, 0, 8), ft(new
|
|
3713
|
+
return Q(o, 1, v), u == null ? u = J : Q(u, 0, 8), ft(new E(m), o, u);
|
|
3714
3714
|
if (!(h = m.c))
|
|
3715
3715
|
return null;
|
|
3716
3716
|
if (f = h.length - 1, I = f * y + 1, f = h[f]) {
|
|
@@ -3723,10 +3723,10 @@ var Wt = { exports: {} }, Lr = { exports: {} }, ze = { exports: {} };
|
|
|
3723
3723
|
}, D.shiftedBy = function(o) {
|
|
3724
3724
|
return Q(o, -B, B), this.times("1e" + o);
|
|
3725
3725
|
}, D.squareRoot = D.sqrt = function() {
|
|
3726
|
-
var o, u, h, I, f, m = this, x = m.c, d = m.s, g = m.e, _ = q + 4, A = new
|
|
3726
|
+
var o, u, h, I, f, m = this, x = m.c, d = m.s, g = m.e, _ = q + 4, A = new E("0.5");
|
|
3727
3727
|
if (d !== 1 || !x || !x[0])
|
|
3728
|
-
return new
|
|
3729
|
-
if (d = Math.sqrt(+bt(m)), d == 0 || d == 1 / 0 ? (u = N(x), (u.length + g) % 2 == 0 && (u += "0"), d = Math.sqrt(+u), g = k((g + 1) / 2) - (g < 0 || g % 2), d == 1 / 0 ? u = "5e" + g : (u = d.toExponential(), u = u.slice(0, u.indexOf("e") + 1) + g), h = new
|
|
3728
|
+
return new E(!d || d < 0 && (!x || x[0]) ? NaN : x ? m : 1 / 0);
|
|
3729
|
+
if (d = Math.sqrt(+bt(m)), d == 0 || d == 1 / 0 ? (u = N(x), (u.length + g) % 2 == 0 && (u += "0"), d = Math.sqrt(+u), g = k((g + 1) / 2) - (g < 0 || g % 2), d == 1 / 0 ? u = "5e" + g : (u = d.toExponential(), u = u.slice(0, u.indexOf("e") + 1) + g), h = new E(u)) : h = new E(d + ""), h.c[0]) {
|
|
3730
3730
|
for (g = h.e, d = g + _, d < 3 && (d = 0); ; )
|
|
3731
3731
|
if (f = h, h = A.times(f.plus(M(m, f, _, 1))), N(f.c).slice(0, d) === (u = N(h.c)).slice(0, d))
|
|
3732
3732
|
if (h.e < g && --d, u = u.slice(d - 3, d + 1), u == "9999" || !I && u == "4999") {
|
|
@@ -3742,13 +3742,13 @@ var Wt = { exports: {} }, Lr = { exports: {} }, ze = { exports: {} };
|
|
|
3742
3742
|
}
|
|
3743
3743
|
return ft(h, h.e + q + 1, J, o);
|
|
3744
3744
|
}, D.toExponential = function(o, u) {
|
|
3745
|
-
return o != null && (Q(o, 0, v), o++),
|
|
3745
|
+
return o != null && (Q(o, 0, v), o++), Be(this, o, u, 1);
|
|
3746
3746
|
}, D.toFixed = function(o, u) {
|
|
3747
|
-
return o != null && (Q(o, 0, v), o = o + this.e + 1),
|
|
3747
|
+
return o != null && (Q(o, 0, v), o = o + this.e + 1), Be(this, o, u);
|
|
3748
3748
|
}, D.toFormat = function(o, u, h) {
|
|
3749
3749
|
var I, f = this;
|
|
3750
3750
|
if (h == null)
|
|
3751
|
-
o != null && u && typeof u == "object" ? (h = u, u = null) : o && typeof o == "object" ? (h = o, o = u = null) : h =
|
|
3751
|
+
o != null && u && typeof u == "object" ? (h = u, u = null) : o && typeof o == "object" ? (h = o, o = u = null) : h = we;
|
|
3752
3752
|
else if (typeof h != "object")
|
|
3753
3753
|
throw Error(c + "Argument not an object: " + h);
|
|
3754
3754
|
if (I = f.toFixed(o, u), f.c) {
|
|
@@ -3766,25 +3766,25 @@ var Wt = { exports: {} }, Lr = { exports: {} }, ze = { exports: {} };
|
|
|
3766
3766
|
return (h.prefix || "") + I + (h.suffix || "");
|
|
3767
3767
|
}, D.toFraction = function(o) {
|
|
3768
3768
|
var u, h, I, f, m, x, d, g, _, A, C, P, K = this, L = K.c;
|
|
3769
|
-
if (o != null && (d = new
|
|
3769
|
+
if (o != null && (d = new E(o), !d.isInteger() && (d.c || d.s !== 1) || d.lt(F)))
|
|
3770
3770
|
throw Error(c + "Argument " + (d.isInteger() ? "out of range: " : "not an integer: ") + bt(d));
|
|
3771
3771
|
if (!L)
|
|
3772
|
-
return new
|
|
3773
|
-
for (u = new
|
|
3772
|
+
return new E(K);
|
|
3773
|
+
for (u = new E(F), _ = h = new E(F), I = g = new E(F), P = N(L), m = u.e = P.length - K.e - 1, u.c[0] = b[(x = m % y) < 0 ? y + x : x], o = !o || d.comparedTo(u) > 0 ? m > 0 ? u : _ : d, x = _t, _t = 1 / 0, d = new E(P), g.c[0] = 0; A = M(d, u, 0, 1), f = h.plus(A.times(I)), f.comparedTo(o) != 1; )
|
|
3774
3774
|
h = I, I = f, _ = g.plus(A.times(f = _)), g = f, u = d.minus(A.times(f = u)), d = f;
|
|
3775
3775
|
return f = M(o.minus(h), I, 0, 1), g = g.plus(f.times(_)), h = h.plus(f.times(I)), g.s = _.s = K.s, m = m * 2, C = M(_, I, m, J).minus(K).abs().comparedTo(
|
|
3776
3776
|
M(g, h, m, J).minus(K).abs()
|
|
3777
|
-
) < 1 ? [_, I] : [g, h],
|
|
3777
|
+
) < 1 ? [_, I] : [g, h], _t = x, C;
|
|
3778
3778
|
}, D.toNumber = function() {
|
|
3779
3779
|
return +bt(this);
|
|
3780
3780
|
}, D.toPrecision = function(o, u) {
|
|
3781
|
-
return o != null && Q(o, 1, v),
|
|
3781
|
+
return o != null && Q(o, 1, v), Be(this, o, u, 2);
|
|
3782
3782
|
}, D.toString = function(o) {
|
|
3783
3783
|
var u, h = this, I = h.s, f = h.e;
|
|
3784
|
-
return f === null ? I ? (u = "Infinity", I < 0 && (u = "-" + u)) : u = "NaN" : (o == null ? u = f <= st || f >= ct ? j(N(h.c), f) : Y(N(h.c), f, "0") : o === 10 &&
|
|
3784
|
+
return f === null ? I ? (u = "Infinity", I < 0 && (u = "-" + u)) : u = "NaN" : (o == null ? u = f <= st || f >= ct ? j(N(h.c), f) : Y(N(h.c), f, "0") : o === 10 && Ce ? (h = ft(new E(h), q + f + 1, J), u = Y(N(h.c), h.e, "0")) : (Q(o, 2, qt.length, "Base"), u = z(Y(N(h.c), f, "0"), 10, o, I, !0)), I < 0 && h.c[0] && (u = "-" + u)), u;
|
|
3785
3785
|
}, D.valueOf = D.toJSON = function() {
|
|
3786
3786
|
return bt(this);
|
|
3787
|
-
}, D._isBigNumber = !0, O != null &&
|
|
3787
|
+
}, D._isBigNumber = !0, O != null && E.set(O), E;
|
|
3788
3788
|
}
|
|
3789
3789
|
function k(O) {
|
|
3790
3790
|
var M = O | 0;
|
|
@@ -3843,7 +3843,7 @@ var Wt = { exports: {} }, Lr = { exports: {} }, ze = { exports: {} };
|
|
|
3843
3843
|
return O;
|
|
3844
3844
|
}
|
|
3845
3845
|
t = U(), t.default = t.BigNumber = t, s.exports ? s.exports = t : (e || (e = typeof self < "u" && self ? self : window), e.BigNumber = t);
|
|
3846
|
-
})(
|
|
3846
|
+
})(Ne);
|
|
3847
3847
|
})(ze);
|
|
3848
3848
|
(function(s) {
|
|
3849
3849
|
var e = ze.exports, t = s.exports;
|
|
@@ -3858,14 +3858,14 @@ var Wt = { exports: {} }, Lr = { exports: {} }, ze = { exports: {} };
|
|
|
3858
3858
|
"\\": "\\\\"
|
|
3859
3859
|
}, l;
|
|
3860
3860
|
function p(B) {
|
|
3861
|
-
return r.lastIndex = 0, r.test(B) ? '"' + B.replace(r, function(
|
|
3862
|
-
var w = c[
|
|
3863
|
-
return typeof w == "string" ? w : "\\u" + ("0000" +
|
|
3861
|
+
return r.lastIndex = 0, r.test(B) ? '"' + B.replace(r, function(b) {
|
|
3862
|
+
var w = c[b];
|
|
3863
|
+
return typeof w == "string" ? w : "\\u" + ("0000" + b.charCodeAt(0).toString(16)).slice(-4);
|
|
3864
3864
|
}) + '"' : '"' + B + '"';
|
|
3865
3865
|
}
|
|
3866
|
-
function y(B,
|
|
3867
|
-
var w, v, U, k, N = n, T, Q =
|
|
3868
|
-
switch (Q && typeof Q == "object" && typeof Q.toJSON == "function" && (Q = Q.toJSON(B)), typeof l == "function" && (Q = l.call(
|
|
3866
|
+
function y(B, b) {
|
|
3867
|
+
var w, v, U, k, N = n, T, Q = b[B], R = Q != null && (Q instanceof e || e.isBigNumber(Q));
|
|
3868
|
+
switch (Q && typeof Q == "object" && typeof Q.toJSON == "function" && (Q = Q.toJSON(B)), typeof l == "function" && (Q = l.call(b, B, Q)), typeof Q) {
|
|
3869
3869
|
case "string":
|
|
3870
3870
|
return R ? Q : p(Q);
|
|
3871
3871
|
case "number":
|
|
@@ -3899,14 +3899,14 @@ var Wt = { exports: {} }, Lr = { exports: {} }, ze = { exports: {} };
|
|
|
3899
3899
|
` + N + "}" : "{" + T.join(",") + "}", n = N, U;
|
|
3900
3900
|
}
|
|
3901
3901
|
}
|
|
3902
|
-
typeof t.stringify != "function" && (t.stringify = function(B,
|
|
3902
|
+
typeof t.stringify != "function" && (t.stringify = function(B, b, w) {
|
|
3903
3903
|
var v;
|
|
3904
3904
|
if (n = "", i = "", typeof w == "number")
|
|
3905
3905
|
for (v = 0; v < w; v += 1)
|
|
3906
3906
|
i += " ";
|
|
3907
3907
|
else
|
|
3908
3908
|
typeof w == "string" && (i = w);
|
|
3909
|
-
if (l =
|
|
3909
|
+
if (l = b, b && typeof b != "function" && (typeof b != "object" || typeof b.length != "number"))
|
|
3910
3910
|
throw new Error("JSON.stringify");
|
|
3911
3911
|
return y("", { "": B });
|
|
3912
3912
|
});
|
|
@@ -3994,7 +3994,7 @@ var Zs = function(s) {
|
|
|
3994
3994
|
}, B = function() {
|
|
3995
3995
|
for (; r && r <= " "; )
|
|
3996
3996
|
l();
|
|
3997
|
-
},
|
|
3997
|
+
}, b = function() {
|
|
3998
3998
|
switch (r) {
|
|
3999
3999
|
case "t":
|
|
4000
4000
|
return l("t"), l("r"), l("u"), l("e"), !0;
|
|
@@ -4040,7 +4040,7 @@ var Zs = function(s) {
|
|
|
4040
4040
|
case "-":
|
|
4041
4041
|
return p();
|
|
4042
4042
|
default:
|
|
4043
|
-
return r >= "0" && r <= "9" ? p() :
|
|
4043
|
+
return r >= "0" && r <= "9" ? p() : b();
|
|
4044
4044
|
}
|
|
4045
4045
|
}, function(k, N) {
|
|
4046
4046
|
var T;
|
|
@@ -4064,7 +4064,7 @@ class en {
|
|
|
4064
4064
|
txHex = "";
|
|
4065
4065
|
txBuilder = Ae();
|
|
4066
4066
|
txEvaluationMultiplier = 1.1;
|
|
4067
|
-
_protocolParams =
|
|
4067
|
+
_protocolParams = At;
|
|
4068
4068
|
txOutput;
|
|
4069
4069
|
addingScriptInput = !1;
|
|
4070
4070
|
addingPlutusMint = !1;
|
|
@@ -4074,7 +4074,7 @@ class en {
|
|
|
4074
4074
|
txInQueueItem;
|
|
4075
4075
|
collateralQueueItem;
|
|
4076
4076
|
refScriptTxInQueueItem;
|
|
4077
|
-
reset = () => (this.txHex = "", this.txBuilder = Ae(), this.txEvaluationMultiplier = 1.1, this._protocolParams =
|
|
4077
|
+
reset = () => (this.txHex = "", this.txBuilder = Ae(), this.txEvaluationMultiplier = 1.1, this._protocolParams = At, this.txOutput = void 0, this.addingScriptInput = !1, this.addingPlutusMint = !1, this.mintItem = void 0, this.txInQueueItem = void 0, this.collateralQueueItem = void 0, this.refScriptTxInQueueItem = void 0, this.meshTxBuilderBody = this.emptyTxBuilderBody(), this);
|
|
4078
4078
|
emptyTxBuilderBody = () => ({
|
|
4079
4079
|
inputs: [],
|
|
4080
4080
|
outputs: [],
|
|
@@ -4099,7 +4099,7 @@ class en {
|
|
|
4099
4099
|
return e.length > 0 && this.addAllSigningKeys(e), this.txHex;
|
|
4100
4100
|
};
|
|
4101
4101
|
serializeTxBody = (e) => {
|
|
4102
|
-
const { inputs: t, outputs: r, extraInputs: n, selectionThreshold: i, collaterals: c, referenceInputs: l, mints: p, changeAddress: y, certificates: B, validityRange:
|
|
4102
|
+
const { inputs: t, outputs: r, extraInputs: n, selectionThreshold: i, collaterals: c, referenceInputs: l, mints: p, changeAddress: y, certificates: B, validityRange: b, requiredSignatures: w, metadata: v } = e;
|
|
4103
4103
|
if (this.isHydra ? this.protocolParams({
|
|
4104
4104
|
minFeeA: 0,
|
|
4105
4105
|
minFeeB: 0,
|
|
@@ -4107,7 +4107,7 @@ class en {
|
|
|
4107
4107
|
priceStep: 0,
|
|
4108
4108
|
collateralPercent: 0,
|
|
4109
4109
|
coinsPerUTxOSize: "0"
|
|
4110
|
-
}) : this.protocolParams({}), n.length > 0 && this.addUtxosFrom(n, String(i)), this.removeDuplicateInputs(), this.meshTxBuilderBody.mints.sort((U, k) => U.policyId.localeCompare(k.policyId)), this.meshTxBuilderBody.inputs.sort((U, k) => U.txIn.txHash === k.txIn.txHash ? U.txIn.txIndex - k.txIn.txIndex : U.txIn.txHash.localeCompare(k.txIn.txHash)), this.addAllInputs(t), this.addAllOutputs(r), this.addAllCollaterals(c), this.addAllReferenceInputs(l), this.addAllMints(p), this.addAllCertificates(B), this.addValidityRange(
|
|
4110
|
+
}) : this.protocolParams({}), n.length > 0 && this.addUtxosFrom(n, String(i)), this.removeDuplicateInputs(), this.meshTxBuilderBody.mints.sort((U, k) => U.policyId.localeCompare(k.policyId)), this.meshTxBuilderBody.inputs.sort((U, k) => U.txIn.txHash === k.txIn.txHash ? U.txIn.txIndex - k.txIn.txIndex : U.txIn.txHash.localeCompare(k.txIn.txHash)), this.addAllInputs(t), this.addAllOutputs(r), this.addAllCollaterals(c), this.addAllReferenceInputs(l), this.addAllMints(p), this.addAllCertificates(B), this.addValidityRange(b), this.addAllRequiredSignatures(w), this.addAllMetadata(v), this.addCostModels(), y) {
|
|
4111
4111
|
const U = this.meshTxBuilderBody.collaterals.map((T) => {
|
|
4112
4112
|
var Q, R;
|
|
4113
4113
|
return ((R = (Q = T.txIn.amount) == null ? void 0 : Q.find((j) => j.unit === "lovelace")) == null ? void 0 : R.quantity) || "0";
|
|
@@ -4387,21 +4387,21 @@ class en {
|
|
|
4387
4387
|
invalidHereafter = (e) => (this.meshTxBuilderBody.validityRange.invalidHereafter = e, this);
|
|
4388
4388
|
metadataValue = (e, t) => (this.meshTxBuilderBody.metadata.push({ tag: e, metadata: t }), this);
|
|
4389
4389
|
protocolParams = (e) => {
|
|
4390
|
-
const t = { ...
|
|
4390
|
+
const t = { ...At, ...e };
|
|
4391
4391
|
return this._protocolParams = t, this.txBuilder = Ae(t), this;
|
|
4392
4392
|
};
|
|
4393
4393
|
signingKey = (e) => (this.meshTxBuilderBody.signingKey.push(e), this);
|
|
4394
4394
|
selectUtxosFrom = (e, t = 5e6) => (this.meshTxBuilderBody.extraInputs = e, this.meshTxBuilderBody.selectionThreshold = t, this);
|
|
4395
4395
|
addUtxosFrom = (e, t) => {
|
|
4396
4396
|
const r = this.meshTxBuilderBody.outputs.reduce((i, c) => (c.amount.forEach((p) => {
|
|
4397
|
-
const { unit: y, quantity: B } = p,
|
|
4398
|
-
i.set(y, String(
|
|
4397
|
+
const { unit: y, quantity: B } = p, b = Number(i.get(y)) || 0;
|
|
4398
|
+
i.set(y, String(b + Number(B)));
|
|
4399
4399
|
}), i), /* @__PURE__ */ new Map());
|
|
4400
4400
|
this.meshTxBuilderBody.inputs.reduce((i, c) => {
|
|
4401
4401
|
const l = c.txIn.amount;
|
|
4402
4402
|
return l == null || l.forEach((p) => {
|
|
4403
|
-
const { unit: y, quantity: B } = p,
|
|
4404
|
-
i.set(y, String(
|
|
4403
|
+
const { unit: y, quantity: B } = p, b = Number(i.get(y)) || 0;
|
|
4404
|
+
i.set(y, String(b - Number(B)));
|
|
4405
4405
|
}), i;
|
|
4406
4406
|
}, r), this.meshTxBuilderBody.mints.reduce((i, c) => {
|
|
4407
4407
|
const l = {
|
|
@@ -4522,7 +4522,7 @@ class en {
|
|
|
4522
4522
|
r && r.type === "Hash" && (l = l.with_data_hash(a.hash_plutus_data(this.castDataToPlutusData(r.data)))), r && r.type === "Inline" && (l = l.with_plutus_data(this.castDataToPlutusData(r.data))), n && (l = l.with_script_ref(a.ScriptRef.new_plutus_script(a.PlutusScript.from_hex_with_version(n.code, vt[n.version]))));
|
|
4523
4523
|
const p = l.next();
|
|
4524
4524
|
if (c) {
|
|
4525
|
-
const y = i.coin().is_zero() ? p.with_asset_and_min_required_coin_by_utxo_cost(c,
|
|
4525
|
+
const y = i.coin().is_zero() ? p.with_asset_and_min_required_coin_by_utxo_cost(c, Oe(this._protocolParams.coinsPerUTxOSize)).build() : p.with_coin_and_asset(i.coin(), c).build();
|
|
4526
4526
|
this.txBuilder.add_output(y);
|
|
4527
4527
|
} else {
|
|
4528
4528
|
const y = p.with_coin(i.coin()).build();
|
|
@@ -4664,7 +4664,7 @@ class en {
|
|
|
4664
4664
|
castRawDataToJsonString = (e) => typeof e == "object" ? Wt.exports.stringify(e) : e;
|
|
4665
4665
|
castDataToPlutusData = ({ type: e, content: t }) => e === "Mesh" ? Ot(t) : e === "CBOR" ? a.PlutusData.from_hex(t) : a.PlutusData.from_json(t, a.PlutusDatumSchema.DetailedSchema);
|
|
4666
4666
|
}
|
|
4667
|
-
class
|
|
4667
|
+
class Tn extends en {
|
|
4668
4668
|
_fetcher;
|
|
4669
4669
|
_submitter;
|
|
4670
4670
|
_evaluator;
|
|
@@ -4742,7 +4742,7 @@ class rt {
|
|
|
4742
4742
|
}
|
|
4743
4743
|
getAccount(e, t, r = 0) {
|
|
4744
4744
|
return this.accountContext(e, r, t, (n, i) => {
|
|
4745
|
-
const c = pr(this._networkId, n.to_public().hash(), i.to_public().hash()).to_address().to_bech32(), l = Ar(this._networkId, n.to_public().hash()).to_address().to_bech32(), p =
|
|
4745
|
+
const c = pr(this._networkId, n.to_public().hash(), i.to_public().hash()).to_address().to_bech32(), l = Ar(this._networkId, n.to_public().hash()).to_address().to_bech32(), p = Me(this._networkId, i.to_public().hash()).to_address().to_bech32();
|
|
4746
4746
|
return {
|
|
4747
4747
|
baseAddress: c,
|
|
4748
4748
|
enterpriseAddress: l,
|
|
@@ -4756,8 +4756,8 @@ class rt {
|
|
|
4756
4756
|
const p = { payload: n }, y = {
|
|
4757
4757
|
address: rt.resolveAddress(this._networkId, r, c, l),
|
|
4758
4758
|
key: r.startsWith("stake") ? l : c
|
|
4759
|
-
}, { coseSign1: B, coseKey:
|
|
4760
|
-
return { signature: B, key:
|
|
4759
|
+
}, { coseSign1: B, coseKey: b } = ds(p, y);
|
|
4760
|
+
return { signature: B, key: b };
|
|
4761
4761
|
});
|
|
4762
4762
|
} catch (c) {
|
|
4763
4763
|
throw new Error(`An error occurred during signData: ${c}.`);
|
|
@@ -4765,7 +4765,7 @@ class rt {
|
|
|
4765
4765
|
}
|
|
4766
4766
|
signTx(e, t, r, n, i, c = 0) {
|
|
4767
4767
|
try {
|
|
4768
|
-
const l =
|
|
4768
|
+
const l = Ue(yr(n));
|
|
4769
4769
|
return this.accountContext(e, c, t, (p, y) => {
|
|
4770
4770
|
const B = a.Vkeywitnesses.new();
|
|
4771
4771
|
return rt.resolveSigners(n, r, p.to_public().hash().to_hex()).forEach((w) => {
|
|
@@ -4782,7 +4782,7 @@ class rt {
|
|
|
4782
4782
|
}
|
|
4783
4783
|
}
|
|
4784
4784
|
addPaymentKey(e, t, r, n, i = 0) {
|
|
4785
|
-
const c =
|
|
4785
|
+
const c = Ue(yr(r));
|
|
4786
4786
|
return this.accountContext(e, i, t, (l, p) => {
|
|
4787
4787
|
n.add(a.make_vkey_witness(c, l));
|
|
4788
4788
|
}), n;
|
|
@@ -4821,7 +4821,7 @@ class rt {
|
|
|
4821
4821
|
const i = [
|
|
4822
4822
|
pr(e, r.to_public().hash(), n.to_public().hash()),
|
|
4823
4823
|
Ar(e, r.to_public().hash()),
|
|
4824
|
-
|
|
4824
|
+
Me(e, n.to_public().hash())
|
|
4825
4825
|
].find((c) => c.to_address().to_bech32() === t);
|
|
4826
4826
|
if (i !== void 0)
|
|
4827
4827
|
return i.to_address();
|
|
@@ -4882,21 +4882,21 @@ class rt {
|
|
|
4882
4882
|
return Q;
|
|
4883
4883
|
const j = T.get(R).index(), Y = T.get(R).transaction_id(), O = t.find((M) => M.input.outputIndex === j && M.input.txHash === Y.to_hex()) !== void 0 ? r : "OUR_PRINCESS_IS_IN_ANOTHER_CASTLE";
|
|
4884
4884
|
return y(T, [...Q, O], R + 1);
|
|
4885
|
-
}, B = (T, Q = [], R = 0) => T === void 0 || R >= T.len() ? Q : B(T, [...Q, T.get(R).to_hex()], R + 1),
|
|
4885
|
+
}, B = (T, Q = [], R = 0) => T === void 0 || R >= T.len() ? Q : B(T, [...Q, T.get(R).to_hex()], R + 1), b = (T, Q = [], R = 0) => {
|
|
4886
4886
|
if (T === void 0 || R >= T.len())
|
|
4887
4887
|
return Q;
|
|
4888
4888
|
const j = T.keys().get(R).payment_cred(), Y = j.kind() === a.StakeCredKind.Key ? j.to_keyhash() : void 0;
|
|
4889
|
-
return
|
|
4889
|
+
return b(T, Y ? [...Q, Y.to_hex()] : Q, R + 1);
|
|
4890
4890
|
}, w = l.certs(), v = l.collateral(), U = l.inputs(), k = l.required_signers(), N = l.withdrawals();
|
|
4891
4891
|
return [
|
|
4892
4892
|
...p(w),
|
|
4893
4893
|
...y(v),
|
|
4894
4894
|
...y(U),
|
|
4895
4895
|
...B(k),
|
|
4896
|
-
...
|
|
4896
|
+
...b(N)
|
|
4897
4897
|
];
|
|
4898
4898
|
}, i = (l) => {
|
|
4899
|
-
const p = (B,
|
|
4899
|
+
const p = (B, b = []) => {
|
|
4900
4900
|
var w, v, U, k;
|
|
4901
4901
|
if (B)
|
|
4902
4902
|
for (let N = 0; N < B.len(); N += 1) {
|
|
@@ -4904,20 +4904,20 @@ class rt {
|
|
|
4904
4904
|
switch (T.kind()) {
|
|
4905
4905
|
case a.NativeScriptKind.ScriptPubkey: {
|
|
4906
4906
|
const Q = (w = T.as_script_pubkey()) == null ? void 0 : w.addr_keyhash().to_hex();
|
|
4907
|
-
return Q ? [...
|
|
4907
|
+
return Q ? [...b, Q] : b;
|
|
4908
4908
|
}
|
|
4909
4909
|
case a.NativeScriptKind.ScriptAll:
|
|
4910
|
-
return p((v = T.as_script_all()) == null ? void 0 : v.native_scripts(),
|
|
4910
|
+
return p((v = T.as_script_all()) == null ? void 0 : v.native_scripts(), b);
|
|
4911
4911
|
case a.NativeScriptKind.ScriptAny:
|
|
4912
|
-
return p((U = T.as_script_any()) == null ? void 0 : U.native_scripts(),
|
|
4912
|
+
return p((U = T.as_script_any()) == null ? void 0 : U.native_scripts(), b);
|
|
4913
4913
|
case a.NativeScriptKind.ScriptNOfK:
|
|
4914
|
-
return p((k = T.as_script_n_of_k()) == null ? void 0 : k.native_scripts(),
|
|
4914
|
+
return p((k = T.as_script_n_of_k()) == null ? void 0 : k.native_scripts(), b);
|
|
4915
4915
|
}
|
|
4916
4916
|
}
|
|
4917
|
-
return
|
|
4917
|
+
return b;
|
|
4918
4918
|
}, y = l.native_scripts();
|
|
4919
4919
|
return [...p(y)];
|
|
4920
|
-
}, c =
|
|
4920
|
+
}, c = pt(e);
|
|
4921
4921
|
return /* @__PURE__ */ new Set([
|
|
4922
4922
|
...n(c.body()),
|
|
4923
4923
|
...i(c.witness_set())
|
|
@@ -4925,7 +4925,7 @@ class rt {
|
|
|
4925
4925
|
}
|
|
4926
4926
|
}
|
|
4927
4927
|
const ut = "MARI0TIME";
|
|
4928
|
-
class
|
|
4928
|
+
class De {
|
|
4929
4929
|
_fetcher;
|
|
4930
4930
|
_submitter;
|
|
4931
4931
|
_wallet;
|
|
@@ -4954,7 +4954,7 @@ class Qe {
|
|
|
4954
4954
|
const r = this._wallet.getAccount(e, ut, t);
|
|
4955
4955
|
return yt(r.enterpriseAddress);
|
|
4956
4956
|
}
|
|
4957
|
-
getUsedCollateral(e =
|
|
4957
|
+
getUsedCollateral(e = At.maxCollateralInputs) {
|
|
4958
4958
|
throw new Error("getUsedCollateral not implemented.");
|
|
4959
4959
|
}
|
|
4960
4960
|
async getUsedUTxOs(e = 0) {
|
|
@@ -4974,15 +4974,18 @@ class Qe {
|
|
|
4974
4974
|
try {
|
|
4975
4975
|
if (!this._fetcher)
|
|
4976
4976
|
throw new Error("[AppWallet] Fetcher is required to fetch UTxOs. Please provide a fetcher.");
|
|
4977
|
-
const i = this._wallet.getAccount(r, ut);
|
|
4978
|
-
|
|
4979
|
-
|
|
4980
|
-
|
|
4981
|
-
|
|
4982
|
-
|
|
4983
|
-
|
|
4984
|
-
|
|
4985
|
-
|
|
4977
|
+
const i = this._wallet.getAccount(r, ut), c = await this._fetcher.fetchAddressUTxOs(i.enterpriseAddress), l = this._wallet.signTx(r, ut, c, e, t, n), p = pt(e), y = p.witness_set(), B = ye(y, l);
|
|
4978
|
+
return y.set_vkeys(B), a.Transaction.new(p.body(), y, p.auxiliary_data()).to_hex();
|
|
4979
|
+
} catch (i) {
|
|
4980
|
+
throw new Error(`[AppWallet] An error occurred during signTx: ${i}.`);
|
|
4981
|
+
}
|
|
4982
|
+
}
|
|
4983
|
+
signTxSync(e, t = !1, r = 0, n = 0) {
|
|
4984
|
+
try {
|
|
4985
|
+
const i = this._wallet.signTx(r, ut, [], e, t, n);
|
|
4986
|
+
this._wallet.addPaymentKey(r, ut, e, i, n);
|
|
4987
|
+
const c = pt(e), l = c.witness_set(), p = ye(l, i);
|
|
4988
|
+
return l.set_vkeys(p), a.Transaction.new(c.body(), l, c.auxiliary_data()).to_hex();
|
|
4986
4989
|
} catch (i) {
|
|
4987
4990
|
throw new Error(`[AppWallet] An error occurred during signTx: ${i}.`);
|
|
4988
4991
|
}
|
|
@@ -5040,7 +5043,7 @@ class He {
|
|
|
5040
5043
|
const e = await this._walletInstance.getChangeAddress();
|
|
5041
5044
|
return Gt(e).to_bech32();
|
|
5042
5045
|
}
|
|
5043
|
-
async getCollateral(e =
|
|
5046
|
+
async getCollateral(e = At.maxCollateralInputs) {
|
|
5044
5047
|
return (await this.getUsedCollateral(e)).map((r) => oe(r));
|
|
5045
5048
|
}
|
|
5046
5049
|
getNetworkId() {
|
|
@@ -5064,7 +5067,7 @@ class He {
|
|
|
5064
5067
|
}
|
|
5065
5068
|
async signTx(e, t = !1) {
|
|
5066
5069
|
try {
|
|
5067
|
-
const r =
|
|
5070
|
+
const r = pt(e), n = r.witness_set(), i = await this._walletInstance.signTx(e, t), c = gr(i).vkeys() ?? a.Vkeywitnesses.new(), l = ye(n, c);
|
|
5068
5071
|
return n.set_vkeys(l), lt(a.Transaction.new(r.body(), n, r.auxiliary_data()).to_bytes());
|
|
5069
5072
|
} catch (r) {
|
|
5070
5073
|
throw new Error(`[BrowserWallet] An error occurred during signTx: ${JSON.stringify(r)}.`);
|
|
@@ -5090,7 +5093,7 @@ class He {
|
|
|
5090
5093
|
throw new Error("Wallet does not support signTxs");
|
|
5091
5094
|
const n = [];
|
|
5092
5095
|
for (let i = 0; i < r.length; i++) {
|
|
5093
|
-
const c =
|
|
5096
|
+
const c = pt(e[i]), l = c.witness_set(), p = gr(r[i]).vkeys() ?? a.Vkeywitnesses.new(), y = ye(l, p);
|
|
5094
5097
|
l.set_vkeys(y);
|
|
5095
5098
|
const B = lt(a.Transaction.new(c.body(), l, c.auxiliary_data()).to_bytes());
|
|
5096
5099
|
n.push(B);
|
|
@@ -5104,7 +5107,7 @@ class He {
|
|
|
5104
5107
|
const e = await this._walletInstance.getUsedAddresses();
|
|
5105
5108
|
return Gt(e[0]);
|
|
5106
5109
|
}
|
|
5107
|
-
async getUsedCollateral(e =
|
|
5110
|
+
async getUsedCollateral(e = At.maxCollateralInputs) {
|
|
5108
5111
|
return (await this._walletInstance.experimental.getCollateral() ?? []).map((r) => fr(r)).slice(0, e);
|
|
5109
5112
|
}
|
|
5110
5113
|
async getUsedUTxOs(e = void 0) {
|
|
@@ -5141,13 +5144,13 @@ class He {
|
|
|
5141
5144
|
return t == null ? void 0 : t.enable();
|
|
5142
5145
|
}
|
|
5143
5146
|
}
|
|
5144
|
-
class
|
|
5147
|
+
class Nn {
|
|
5145
5148
|
_wallet;
|
|
5146
5149
|
_network;
|
|
5147
5150
|
constructor(e) {
|
|
5148
5151
|
switch (this._network = e.networkId, e.key.type) {
|
|
5149
5152
|
case "root":
|
|
5150
|
-
this._wallet = new
|
|
5153
|
+
this._wallet = new De({
|
|
5151
5154
|
networkId: e.networkId,
|
|
5152
5155
|
fetcher: e.fetcher,
|
|
5153
5156
|
submitter: e.submitter,
|
|
@@ -5158,7 +5161,7 @@ class Pn {
|
|
|
5158
5161
|
});
|
|
5159
5162
|
break;
|
|
5160
5163
|
case "cli":
|
|
5161
|
-
this._wallet = new
|
|
5164
|
+
this._wallet = new De({
|
|
5162
5165
|
networkId: e.networkId,
|
|
5163
5166
|
fetcher: e.fetcher,
|
|
5164
5167
|
submitter: e.submitter,
|
|
@@ -5169,7 +5172,7 @@ class Pn {
|
|
|
5169
5172
|
});
|
|
5170
5173
|
break;
|
|
5171
5174
|
case "mnemonic":
|
|
5172
|
-
this._wallet = new
|
|
5175
|
+
this._wallet = new De({
|
|
5173
5176
|
networkId: e.networkId,
|
|
5174
5177
|
fetcher: e.fetcher,
|
|
5175
5178
|
submitter: e.submitter,
|
|
@@ -5282,29 +5285,21 @@ class Pn {
|
|
|
5282
5285
|
}
|
|
5283
5286
|
}
|
|
5284
5287
|
export {
|
|
5285
|
-
|
|
5286
|
-
|
|
5288
|
+
De as AppWallet,
|
|
5289
|
+
Bn as BlockfrostProvider,
|
|
5287
5290
|
He as BrowserWallet,
|
|
5288
5291
|
rt as EmbeddedWallet,
|
|
5289
|
-
|
|
5290
|
-
|
|
5291
|
-
|
|
5292
|
-
|
|
5293
|
-
|
|
5294
|
-
|
|
5295
|
-
|
|
5292
|
+
Dn as ForgeScript,
|
|
5293
|
+
Sn as InfuraProvider,
|
|
5294
|
+
En as KoiosProvider,
|
|
5295
|
+
vn as MaestroProvider,
|
|
5296
|
+
Tn as MeshTxBuilder,
|
|
5297
|
+
Nn as MeshWallet,
|
|
5298
|
+
bn as OgmiosProvider,
|
|
5296
5299
|
St as Transaction,
|
|
5297
|
-
|
|
5300
|
+
Qn as YaciProvider,
|
|
5298
5301
|
un as checkSignature,
|
|
5299
|
-
|
|
5300
|
-
ln as fromLovelace,
|
|
5301
|
-
Ye as fromNativeScript,
|
|
5302
|
-
pe as fromPlutusData,
|
|
5303
|
-
Hr as fromScriptRef,
|
|
5304
|
-
oe as fromTxUnspentOutput,
|
|
5305
|
-
dt as fromUTF8,
|
|
5306
|
-
Fr as fromValue,
|
|
5307
|
-
Cn as generateNonce,
|
|
5302
|
+
xn as generateNonce,
|
|
5308
5303
|
ts as isNetwork,
|
|
5309
5304
|
is as keepRelevant,
|
|
5310
5305
|
cn as largestFirst,
|
|
@@ -5312,40 +5307,24 @@ export {
|
|
|
5312
5307
|
on as mergeAssets,
|
|
5313
5308
|
Kt as parseAssetUnit,
|
|
5314
5309
|
S as parseHttpError,
|
|
5315
|
-
|
|
5316
|
-
|
|
5317
|
-
|
|
5318
|
-
|
|
5310
|
+
wn as readPlutusData,
|
|
5311
|
+
Cn as readTransaction,
|
|
5312
|
+
ln as resolveDataHash,
|
|
5313
|
+
hn as resolveEpochNo,
|
|
5319
5314
|
qr as resolveFingerprint,
|
|
5320
|
-
|
|
5321
|
-
|
|
5322
|
-
|
|
5323
|
-
|
|
5315
|
+
dn as resolveLanguageView,
|
|
5316
|
+
fn as resolveNativeScriptAddress,
|
|
5317
|
+
gn as resolveNativeScriptHash,
|
|
5318
|
+
mn as resolveNativeScriptHex,
|
|
5324
5319
|
$t as resolvePaymentKeyHash,
|
|
5325
|
-
|
|
5326
|
-
|
|
5327
|
-
|
|
5320
|
+
pn as resolvePlutusScriptAddress,
|
|
5321
|
+
An as resolvePlutusScriptHash,
|
|
5322
|
+
In as resolvePoolId,
|
|
5328
5323
|
$s as resolvePrivateKey,
|
|
5329
|
-
|
|
5330
|
-
|
|
5331
|
-
|
|
5324
|
+
xe as resolveRewardAddress,
|
|
5325
|
+
_n as resolveScriptRef,
|
|
5326
|
+
yn as resolveSlotNo,
|
|
5332
5327
|
se as resolveStakeKeyHash,
|
|
5333
5328
|
Vr as resolveTxFees,
|
|
5334
|
-
yr as resolveTxHash
|
|
5335
|
-
yt as toAddress,
|
|
5336
|
-
Ge as toBaseAddress,
|
|
5337
|
-
G as toBytes,
|
|
5338
|
-
Or as toEnterpriseAddress,
|
|
5339
|
-
hn as toLovelace,
|
|
5340
|
-
Vt as toNativeScript,
|
|
5341
|
-
Ot as toPlutusData,
|
|
5342
|
-
Gs as toPoolParams,
|
|
5343
|
-
Ue as toRedeemer,
|
|
5344
|
-
Kr as toRelay,
|
|
5345
|
-
Mr as toRewardAddress,
|
|
5346
|
-
Zt as toScriptRef,
|
|
5347
|
-
mt as toTxUnspentOutput,
|
|
5348
|
-
$e as toUTF8,
|
|
5349
|
-
mr as toUnitInterval,
|
|
5350
|
-
Bt as toValue
|
|
5329
|
+
yr as resolveTxHash
|
|
5351
5330
|
};
|