@meshsdk/core 1.5.18 → 1.5.20

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.js CHANGED
@@ -2,7 +2,7 @@ import { customAlphabet as _r } from "nanoid";
2
2
  import * as a from "@emurgo/cardano-serialization-lib-nodejs";
3
3
  import Mt from "axios";
4
4
  import { mnemonicToEntropy as yr, generateMnemonic as Yr } from "bip39";
5
- import { COSEKey as xr, COSESign1 as $r, Label as Pt, Int as fe, BigNum as De, KeyType as zr, AlgorithmId as wr, CBORValue as ke, HeaderMap as Je, Headers as Jr, ProtectedHeaderMap as Wr, COSESign1Builder as jr } from "@emurgo/cardano-message-signing-nodejs";
5
+ import { COSEKey as xr, COSESign1 as $r, Label as Pt, Int as ge, BigNum as De, KeyType as zr, AlgorithmId as wr, CBORValue as ke, HeaderMap as We, Headers as Wr, ProtectedHeaderMap as Jr, COSESign1Builder as jr } from "@emurgo/cardano-message-signing-nodejs";
6
6
  const on = (s) => {
7
7
  const e = [];
8
8
  return s.forEach((t) => {
@@ -41,12 +41,12 @@ const on = (s) => {
41
41
  MINT: a.RedeemerTag.new_mint(),
42
42
  REWARD: a.RedeemerTag.new_reward(),
43
43
  SPEND: a.RedeemerTag.new_spend()
44
- }, pe = {
44
+ }, Ie = {
45
45
  testnet: ["74", "1598400", "1595967616", "432000"],
46
46
  preview: ["183", "15811222", "1682467200", "86400"],
47
47
  preprod: ["65", "26438400", "1682121600", "432000"],
48
48
  mainnet: ["208", "4492800", "1596059091", "432000"]
49
- }, We = {
49
+ }, Je = {
50
50
  ALONZO: a.TxBuilderConstants.plutus_alonzo_cost_models(),
51
51
  BABBAGE: (() => {
52
52
  const s = a.Costmdls.new(), e = a.CostModel.new();
@@ -504,7 +504,7 @@ 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(fe.new_negative(De.from_str("2"))))) == null ? void 0 : l.as_bytes();
507
+ const B = (l = n.header(Pt.new_int(ge.new_negative(De.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
510
  const b = Lt(ut(y)), w = Fs(ut(B));
@@ -524,11 +524,11 @@ const on = (s) => {
524
524
  }
525
525
  }, fs = (s) => {
526
526
  const e = xr.new(Pt.from_key_type(zr.OKP));
527
- return e.set_algorithm_id(Pt.from_algorithm_id(wr.EdDSA)), e.set_header(Pt.new_int(fe.new_negative(De.from_str("1"))), ke.new_int(fe.new_i32(6))), e.set_header(Pt.new_int(fe.new_negative(De.from_str("2"))), ke.new_bytes(s.key.to_public().as_bytes())), e;
527
+ return e.set_algorithm_id(Pt.from_algorithm_id(wr.EdDSA)), e.set_header(Pt.new_int(ge.new_negative(De.from_str("1"))), ke.new_int(ge.new_i32(6))), e.set_header(Pt.new_int(ge.new_negative(De.from_str("2"))), ke.new_bytes(s.key.to_public().as_bytes())), e;
528
528
  }, gs = (s, e) => {
529
- const t = Je.new(), r = Je.new();
529
+ const t = We.new(), r = We.new();
530
530
  t.set_algorithm_id(Pt.from_algorithm_id(wr.EdDSA)), t.set_header(Pt.new_text("address"), ke.new_bytes(e.address.to_bytes()));
531
- const n = Jr.new(Wr.new(t), r), i = jr.new(n, G(s.payload), !1);
531
+ const n = Wr.new(Jr.new(t), r), i = jr.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());
@@ -599,7 +599,7 @@ function ys(s) {
599
599
  function xs(s) {
600
600
  return s.charCodeAt(0);
601
601
  }
602
- var wt = Er, J = _s(), vt = 64, ge = [];
602
+ var wt = Er, W = _s(), vt = 64, me = [];
603
603
  Et.exports = mt;
604
604
  var Xe = Et.exports.BYTES_MIN = 16, Ze = Et.exports.BYTES_MAX = 64;
605
605
  Et.exports.BYTES = 32;
@@ -609,31 +609,31 @@ var rr = Et.exports.SALTBYTES = 16, sr = Et.exports.PERSONALBYTES = 16;
609
609
  function mt(s, e, t, r, n) {
610
610
  if (!(this instanceof mt))
611
611
  return new mt(s, e, t, r, n);
612
- if (!(J && J.exports))
612
+ if (!(W && W.exports))
613
613
  throw new Error("WASM not loaded. Wait for Blake2b.ready(cb)");
614
- s || (s = 32), n !== !0 && (wt(s >= Xe, "digestLength must be at least " + Xe + ", was given " + s), wt(s <= Ze, "digestLength must be at most " + Ze + ", was given " + s), e != null && wt(e.length >= tr, "key must be at least " + tr + ", was given " + e.length), e != null && wt(e.length <= er, "key must be at least " + er + ", was given " + e.length), t != null && wt(t.length === rr, "salt must be exactly " + rr + ", was given " + t.length), r != null && wt(r.length === sr, "personal must be exactly " + sr + ", was given " + r.length)), ge.length || (ge.push(vt), vt += 216), this.digestLength = s, this.finalized = !1, this.pointer = ge.pop(), J.memory.fill(0, 0, 64), J.memory[0] = this.digestLength, J.memory[1] = e ? e.length : 0, J.memory[2] = 1, J.memory[3] = 1, t && J.memory.set(t, 32), r && J.memory.set(r, 48), this.pointer + 216 > J.memory.length && J.realloc(this.pointer + 216), J.exports.blake2b_init(this.pointer, this.digestLength), e && (this.update(e), J.memory.fill(0, vt, vt + e.length), J.memory[this.pointer + 200] = 128);
614
+ s || (s = 32), n !== !0 && (wt(s >= Xe, "digestLength must be at least " + Xe + ", was given " + s), wt(s <= Ze, "digestLength must be at most " + Ze + ", was given " + s), e != null && wt(e.length >= tr, "key must be at least " + tr + ", was given " + e.length), e != null && wt(e.length <= er, "key must be at least " + er + ", was given " + e.length), t != null && wt(t.length === rr, "salt must be exactly " + rr + ", was given " + t.length), r != null && wt(r.length === sr, "personal must be exactly " + sr + ", was given " + r.length)), me.length || (me.push(vt), vt += 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, vt, vt + e.length), W.memory[this.pointer + 200] = 128);
615
615
  }
616
616
  mt.prototype.update = function(s) {
617
- return wt(this.finalized === !1, "Hash instance finalized"), wt(s, "input must be TypedArray or Buffer"), vt + s.length > J.memory.length && J.realloc(vt + s.length), J.memory.set(s, vt), J.exports.blake2b_update(this.pointer, vt, vt + s.length), this;
617
+ return wt(this.finalized === !1, "Hash instance finalized"), wt(s, "input must be TypedArray or Buffer"), vt + s.length > W.memory.length && W.realloc(vt + s.length), W.memory.set(s, vt), W.exports.blake2b_update(this.pointer, vt, vt + s.length), this;
618
618
  };
619
619
  mt.prototype.digest = function(s) {
620
- if (wt(this.finalized === !1, "Hash instance finalized"), this.finalized = !0, ge.push(this.pointer), J.exports.blake2b_final(this.pointer), !s || s === "binary")
621
- return J.memory.slice(this.pointer + 128, this.pointer + 128 + this.digestLength);
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
+ return W.memory.slice(this.pointer + 128, this.pointer + 128 + this.digestLength);
622
622
  if (s === "hex")
623
- return Cs(J.memory, this.pointer + 128, this.digestLength);
623
+ return Cs(W.memory, this.pointer + 128, this.digestLength);
624
624
  wt(s.length >= this.digestLength, "input must be TypedArray or Buffer");
625
625
  for (var e = 0; e < this.digestLength; e++)
626
- s[e] = J.memory[this.pointer + 128 + e];
626
+ s[e] = W.memory[this.pointer + 128 + e];
627
627
  return s;
628
628
  };
629
629
  mt.prototype.final = mt.prototype.digest;
630
- mt.WASM = J && J.buffer;
630
+ mt.WASM = W && W.buffer;
631
631
  mt.SUPPORTED = typeof WebAssembly < "u";
632
632
  mt.ready = function(s) {
633
- if (s || (s = ws), !J)
633
+ if (s || (s = ws), !W)
634
634
  return s(new Error("WebAssembly not supported"));
635
635
  var e = new Promise(function(t, r) {
636
- J.onload(function(n) {
636
+ W.onload(function(n) {
637
637
  n ? r() : t(), s(n);
638
638
  });
639
639
  });
@@ -651,7 +651,7 @@ function Bs(s) {
651
651
  return s < 16 ? "0" + s.toString(16) : s.toString(16);
652
652
  }
653
653
  var Ut = Er, ie = Et.exports;
654
- function ce(s, e, t) {
654
+ function ue(s, e, t) {
655
655
  var r = s[e] + s[t], n = s[e + 1] + s[t + 1];
656
656
  r >= 4294967296 && n++, s[e] = r, s[e + 1] = n;
657
657
  }
@@ -666,9 +666,9 @@ function Sr(s, e) {
666
666
  }
667
667
  function Tt(s, e, t, r, n, i) {
668
668
  var c = ee[n], l = ee[n + 1], p = ee[i], y = ee[i + 1];
669
- ce(H, s, e), nr(H, s, c, l);
669
+ ue(H, s, e), nr(H, s, c, l);
670
670
  var B = H[r] ^ H[s], b = H[r + 1] ^ H[s + 1];
671
- H[r] = b, H[r + 1] = B, ce(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, ce(H, s, e), nr(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, ce(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;
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), nr(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 br = new Uint32Array([
674
674
  4089235720,
@@ -960,21 +960,21 @@ var Nt = new Uint8Array([
960
960
  0,
961
961
  0
962
962
  ]);
963
- function Jt(s, e, t, r) {
963
+ function Wt(s, e, t, r) {
964
964
  Nt.fill(0), this.b = new Uint8Array(128), this.h = new Uint32Array(16), this.t = 0, this.c = 0, this.outlen = s, Nt[0] = s, e && (Nt[1] = e.length), Nt[2] = 1, Nt[3] = 1, t && Nt.set(t, 32), r && Nt.set(r, 48);
965
965
  for (var n = 0; n < 16; n++)
966
966
  this.h[n] = br[n] ^ Sr(Nt, n * 4);
967
967
  e && (Qr(this, e), this.c = 128);
968
968
  }
969
- Jt.prototype.update = function(s) {
969
+ Wt.prototype.update = function(s) {
970
970
  return Ut(s != null, "input must be Uint8Array or Buffer"), Qr(this, s), this;
971
971
  };
972
- Jt.prototype.digest = function(s) {
972
+ Wt.prototype.digest = function(s) {
973
973
  var e = !s || s === "binary" || s === "hex" ? new Uint8Array(this.outlen) : s;
974
974
  return Ut(e.length >= this.outlen, "out must have at least outlen bytes of space"), Ss(this, e), s === "hex" ? bs(e) : e;
975
975
  };
976
- Jt.prototype.final = Jt.prototype.digest;
977
- Jt.ready = function(s) {
976
+ Wt.prototype.final = Wt.prototype.digest;
977
+ Wt.ready = function(s) {
978
978
  ie.ready(function() {
979
979
  s();
980
980
  });
@@ -999,7 +999,7 @@ function bs(s) {
999
999
  function vs(s) {
1000
1000
  return s < 16 ? "0" + s.toString(16) : s.toString(16);
1001
1001
  }
1002
- var Dr = Jt;
1002
+ var Dr = Wt;
1003
1003
  ot.exports = function(e, t, r, n, i) {
1004
1004
  return i !== !0 && (Ut(e >= ir, "outlen must be at least " + ir + ", was given " + e), Ut(e <= ar, "outlen must be at most " + ar + ", was given " + e), t != null && Ut(t.length >= or, "key must be at least " + or + ", was given " + t.length), t != null && Ut(t.length <= cr, "key must be at most " + cr + ", was given " + t.length), r != null && Ut(r.length === ur, "salt must be exactly " + ur + ", was given " + r.length), n != null && Ut(n.length === lr, "personal must be exactly " + lr + ", was given " + n.length)), new Dr(e, t, r, n);
1005
1005
  };
@@ -1018,12 +1018,12 @@ var ur = ot.exports.SALTBYTES = 16, lr = ot.exports.PERSONALBYTES = 16;
1018
1018
  ie.ready(function(s) {
1019
1019
  s || (ot.exports.WASM_LOADED = !0, Dr = ie);
1020
1020
  });
1021
- var Wt = {};
1022
- Object.defineProperty(Wt, "__esModule", { value: !0 });
1023
- Wt.bech32m = Wt.bech32 = void 0;
1024
- const Ie = "qpzry9x8gf2tvdw0s3jn54khce6mua7l", kr = {};
1025
- for (let s = 0; s < Ie.length; s++) {
1026
- const e = Ie.charAt(s);
1021
+ var Jt = {};
1022
+ Object.defineProperty(Jt, "__esModule", { value: !0 });
1023
+ Jt.bech32m = Jt.bech32 = void 0;
1024
+ const _e = "qpzry9x8gf2tvdw0s3jn54khce6mua7l", kr = {};
1025
+ for (let s = 0; s < _e.length; s++) {
1026
+ const e = _e.charAt(s);
1027
1027
  kr[e] = s;
1028
1028
  }
1029
1029
  function $t(s) {
@@ -1090,14 +1090,14 @@ function Tr(s) {
1090
1090
  const w = l[b];
1091
1091
  if (w >> 5 !== 0)
1092
1092
  throw new Error("Non 5-bit word");
1093
- y = $t(y) ^ w, B += Ie.charAt(w);
1093
+ y = $t(y) ^ w, B += _e.charAt(w);
1094
1094
  }
1095
1095
  for (let b = 0; b < 6; ++b)
1096
1096
  y = $t(y);
1097
1097
  y ^= e;
1098
1098
  for (let b = 0; b < 6; ++b) {
1099
1099
  const w = y >> (5 - b) * 5 & 31;
1100
- B += Ie.charAt(w);
1100
+ B += _e.charAt(w);
1101
1101
  }
1102
1102
  return B;
1103
1103
  }
@@ -1150,13 +1150,13 @@ function Tr(s) {
1150
1150
  fromWords: ks
1151
1151
  };
1152
1152
  }
1153
- Wt.bech32 = Tr("bech32");
1154
- Wt.bech32m = Tr("bech32m");
1153
+ Jt.bech32 = Tr("bech32");
1154
+ Jt.bech32m = Tr("bech32m");
1155
1155
  var Ts = Te && Te.__importDefault || function(s) {
1156
1156
  return s && s.__esModule ? s : { default: s };
1157
1157
  };
1158
1158
  Object.defineProperty(Br, "__esModule", { value: !0 });
1159
- const Ns = Ts(ot.exports), ue = Wt, ve = "asset";
1159
+ const Ns = Ts(ot.exports), le = Jt, ve = "asset";
1160
1160
  class se {
1161
1161
  constructor(e) {
1162
1162
  this.hashBuf = e;
@@ -1169,15 +1169,15 @@ class se {
1169
1169
  return se.fromHash(r);
1170
1170
  }
1171
1171
  static fromBech32(e) {
1172
- const { prefix: t, words: r } = ue.bech32.decode(e);
1172
+ const { prefix: t, words: r } = le.bech32.decode(e);
1173
1173
  if (t !== ve)
1174
1174
  throw new Error("Invalid asset fingerprint");
1175
- const n = Buffer.from(ue.bech32.fromWords(r));
1175
+ const n = Buffer.from(le.bech32.fromWords(r));
1176
1176
  return se.fromHash(n);
1177
1177
  }
1178
1178
  fingerprint() {
1179
- const e = ue.bech32.toWords(this.hashBuf);
1180
- return ue.bech32.encode(ve, e);
1179
+ const e = le.bech32.toWords(this.hashBuf);
1180
+ return le.bech32.encode(ve, e);
1181
1181
  }
1182
1182
  hash() {
1183
1183
  return Buffer.from(this.hashBuf).toString("hex");
@@ -1241,11 +1241,11 @@ const Ps = Us, Os = (s, e) => {
1241
1241
  default:
1242
1242
  throw new Error(`Script Kind: ${s.kind()}, is not supported`);
1243
1243
  }
1244
- }, _e = (s) => {
1244
+ }, oe = (s) => {
1245
1245
  const e = (t) => {
1246
1246
  const r = a.NativeScripts.new();
1247
1247
  return t.forEach((n) => {
1248
- r.add(_e(n));
1248
+ r.add(oe(n));
1249
1249
  }), r;
1250
1250
  };
1251
1251
  switch (s.type) {
@@ -1262,18 +1262,18 @@ const Ps = Us, Os = (s, e) => {
1262
1262
  case "sig":
1263
1263
  return a.NativeScript.new_script_pubkey(a.ScriptPubkey.new(Ct(s.keyHash)));
1264
1264
  }
1265
- }, me = (s) => {
1265
+ }, Ae = (s) => {
1266
1266
  var r, n, i;
1267
1267
  const e = (c) => {
1268
1268
  const l = [];
1269
1269
  for (let p = 0; p < c.len(); p += 1)
1270
- l.push(me(c.get(p)));
1270
+ l.push(Ae(c.get(p)));
1271
1271
  return l;
1272
1272
  }, t = (c) => {
1273
1273
  const l = /* @__PURE__ */ new Map();
1274
1274
  for (let p = 0; p < c.len(); p += 1) {
1275
1275
  const y = c.keys().get(p), B = c.get(y) ?? a.PlutusData.from_hex(ht("NO_ITEM_FOUND_INSIDE_GOLD_ROOM"));
1276
- l.set(me(y), me(B));
1276
+ l.set(Ae(y), Ae(B));
1277
1277
  }
1278
1278
  return l;
1279
1279
  };
@@ -1354,7 +1354,7 @@ const Ps = Us, Os = (s, e) => {
1354
1354
  const e = jt(s.code, s.version);
1355
1355
  return a.ScriptRef.new_plutus_script(e);
1356
1356
  }
1357
- return a.ScriptRef.new_native_script(_e(s));
1357
+ return a.ScriptRef.new_native_script(oe(s));
1358
1358
  }, ae = (s) => {
1359
1359
  var n, i, c;
1360
1360
  const e = s.output().has_data_hash() ? (n = s.output().data_hash()) == null ? void 0 : n.to_hex() : void 0, t = s.output().has_plutus_data() ? (i = s.output().plutus_data()) == null ? void 0 : i.to_hex() : void 0, r = s.output().has_script_ref() ? (c = s.output().script_ref()) == null ? void 0 : c.to_hex() : void 0;
@@ -1441,10 +1441,10 @@ const Ps = Us, Os = (s, e) => {
1441
1441
  }
1442
1442
  }
1443
1443
  throw new Error(`No plutus script reference found in UTxO: ${e.input().transaction_id().to_hex()}`);
1444
- }, le = (s) => {
1444
+ }, he = (s) => {
1445
1445
  const e = a.ScriptPubkey.new(s);
1446
1446
  return a.NativeScript.new_script_pubkey(e);
1447
- }, Ae = (s = gt) => {
1447
+ }, pe = (s = gt) => {
1448
1448
  const e = a.TransactionBuilderConfigBuilder.new().coins_per_utxo_byte(a.BigNum.from_str(s.coinsPerUTxOSize)).ex_unit_prices(a.ExUnitPrices.new(gr(s.priceMem.toString()), gr(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
  }, Ir = (s) => {
@@ -1452,7 +1452,7 @@ const Ps = Us, Os = (s, e) => {
1452
1452
  return s.map((t) => t instanceof a.TransactionUnspentOutput ? t : It(t)).forEach((t) => {
1453
1453
  e.add_input(t.output().address(), t.input(), t.output().amount());
1454
1454
  }), e;
1455
- }, he = (s) => {
1455
+ }, de = (s) => {
1456
1456
  if (typeof s == "string")
1457
1457
  return a.TransactionOutputBuilder.new().with_address(yt(s));
1458
1458
  let e = a.TransactionOutputBuilder.new().with_address(yt(s.address));
@@ -1476,12 +1476,15 @@ const Ps = Us, Os = (s, e) => {
1476
1476
  const e = Ot(s);
1477
1477
  return a.hash_plutus_data(e).to_hex();
1478
1478
  }, hn = (s, e = Date.now()) => {
1479
- if (pe[s]) {
1480
- const [t, r, n, i] = pe[s];
1479
+ if (Ie[s]) {
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
- }, Rr = (s, e) => Ps.fromParts(G(s), G(e)).fingerprint(), dn = (s, e) => es[s][e], fn = (s) => _e(s).hash().to_hex(), Yt = (s) => {
1484
+ }, Rr = (s, e) => Ps.fromParts(G(s), G(e)).fingerprint(), dn = (s, e) => es[s][e], fn = (s, e = 0) => {
1485
+ const t = oe(s);
1486
+ return a.EnterpriseAddress.new(e, a.StakeCredential.from_scripthash(t.hash())).to_address().to_bech32();
1487
+ }, gn = (s) => oe(s).hash().to_hex(), Yt = (s) => {
1485
1488
  var e, t;
1486
1489
  try {
1487
1490
  const r = [
@@ -1494,10 +1497,10 @@ const Ps = Us, Os = (s, e) => {
1494
1497
  } catch (r) {
1495
1498
  throw new Error(`An error occurred during resolvePaymentKeyHash: ${r}.`);
1496
1499
  }
1497
- }, gn = (s, e = 0) => {
1500
+ }, mn = (s, e = 0) => {
1498
1501
  const t = jt(s.code, s.version);
1499
1502
  return a.EnterpriseAddress.new(e, a.StakeCredential.from_scripthash(t.hash())).to_address().to_bech32();
1500
- }, mn = (s) => {
1503
+ }, An = (s) => {
1501
1504
  try {
1502
1505
  const e = Pr(s), t = e == null ? void 0 : e.payment_cred().to_scripthash();
1503
1506
  if (t !== void 0)
@@ -1506,12 +1509,12 @@ const Ps = Us, Os = (s, e) => {
1506
1509
  } catch (e) {
1507
1510
  throw new Error(`An error occurred during resolveScriptHash: ${e}.`);
1508
1511
  }
1509
- }, An = (s) => a.Ed25519KeyHash.from_hex(s).to_bech32("pool1"), Ys = (s) => {
1512
+ }, pn = (s) => a.Ed25519KeyHash.from_hex(s).to_bech32("pool1"), Ys = (s) => {
1510
1513
  const e = yr(s.join(" ")), t = Fr(e), r = t.to_bech32();
1511
1514
  return t.free(), r;
1512
- }, pn = (s) => Xt(s).to_hex(), In = (s, e = Date.now()) => {
1513
- if (pe[s]) {
1514
- const [t, r, n] = pe[s];
1515
+ }, In = (s) => Xt(s).to_hex(), _n = (s, e = Date.now()) => {
1516
+ if (Ie[s]) {
1517
+ const [t, r, n] = Ie[s];
1515
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();
1516
1519
  }
1517
1520
  throw new Error(`Couldn't resolve SlotNo for network: ${s}`);
@@ -1540,7 +1543,7 @@ const Ps = Us, Os = (s, e) => {
1540
1543
  }, qr = (s, e = gt.minFeeA, t = gt.minFeeB) => (BigInt(e) * BigInt(s) + BigInt(t)).toString(), $s = (s) => {
1541
1544
  const e = _t(s).body();
1542
1545
  return a.hash_transaction(e).to_hex();
1543
- }, _n = (s = "", e = 32) => {
1546
+ }, yn = (s = "", e = 32) => {
1544
1547
  if (e <= 0 || e > 2048)
1545
1548
  throw new Error("Length must be bewteen 1 and 2048");
1546
1549
  const r = _r("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789")(e);
@@ -1559,8 +1562,8 @@ const Ps = Us, Os = (s, e) => {
1559
1562
  }), n;
1560
1563
  }
1561
1564
  return e;
1562
- }, yn = (s) => me(Nr(s)), xn = (s) => _t(s).to_js_value();
1563
- class wn {
1565
+ }, xn = (s) => Ae(Nr(s)), wn = (s) => _t(s).to_js_value();
1566
+ class Cn {
1564
1567
  _axiosInstance;
1565
1568
  constructor(...e) {
1566
1569
  if (typeof e[0] == "string" && e[0].startsWith("http"))
@@ -1812,7 +1815,7 @@ class wn {
1812
1815
  throw E(t);
1813
1816
  }
1814
1817
  }
1815
- class Cn {
1818
+ class Bn {
1816
1819
  _axiosInstance;
1817
1820
  constructor(e, t, r) {
1818
1821
  const n = r.host ?? "ipfs.infura.io", i = r.port ?? 5001, c = r.version ?? 0;
@@ -1832,7 +1835,7 @@ class Cn {
1832
1835
  }
1833
1836
  }
1834
1837
  }
1835
- class Bn {
1838
+ class En {
1836
1839
  _axiosInstance;
1837
1840
  constructor(...e) {
1838
1841
  if (typeof e[0] == "string" && e[0].startsWith("http"))
@@ -2087,7 +2090,7 @@ class Bn {
2087
2090
  }
2088
2091
  };
2089
2092
  }
2090
- class En {
2093
+ class Sn {
2091
2094
  _baseUrl;
2092
2095
  constructor(...e) {
2093
2096
  this._baseUrl = Zr(e[0]) ? rs[e[0]] : e[0];
@@ -2154,7 +2157,7 @@ class En {
2154
2157
  }));
2155
2158
  }
2156
2159
  }
2157
- class Sn {
2160
+ class bn {
2158
2161
  _axiosInstance;
2159
2162
  _amountsAsStrings = {
2160
2163
  headers: {
@@ -2445,7 +2448,7 @@ class Sn {
2445
2448
  return;
2446
2449
  };
2447
2450
  }
2448
- class bn {
2451
+ class vn {
2449
2452
  _axiosInstance;
2450
2453
  constructor(e = "http://localhost:8080/api/v1") {
2451
2454
  this._axiosInstance = Mt.create({
@@ -2693,16 +2696,16 @@ class bn {
2693
2696
  throw E(t);
2694
2697
  }
2695
2698
  }
2696
- class vn {
2699
+ class Qn {
2697
2700
  static withOneSignature(e) {
2698
2701
  const t = Ct(Yt(e));
2699
- return le(t).to_hex();
2702
+ return he(t).to_hex();
2700
2703
  }
2701
2704
  static withAtLeastNSignatures(e, t) {
2702
2705
  const r = a.NativeScripts.new();
2703
2706
  e.forEach((i) => {
2704
2707
  const c = Ct(Yt(i));
2705
- r.add(le(c));
2708
+ r.add(he(c));
2706
2709
  });
2707
2710
  const n = a.ScriptNOfK.new(t, r);
2708
2711
  return a.NativeScript.new_script_any(n).to_hex();
@@ -2711,7 +2714,7 @@ class vn {
2711
2714
  const t = a.NativeScripts.new();
2712
2715
  e.forEach((n) => {
2713
2716
  const i = Ct(Yt(n));
2714
- t.add(le(i));
2717
+ t.add(he(i));
2715
2718
  });
2716
2719
  const r = a.ScriptAny.new(t);
2717
2720
  return a.NativeScript.new_script_any(r).to_hex();
@@ -2720,13 +2723,13 @@ class vn {
2720
2723
  const t = a.NativeScripts.new();
2721
2724
  e.forEach((n) => {
2722
2725
  const i = Ct(Yt(n));
2723
- t.add(le(i));
2726
+ t.add(he(i));
2724
2727
  });
2725
2728
  const r = a.ScriptAll.new(t);
2726
2729
  return a.NativeScript.new_script_any(r).to_hex();
2727
2730
  }
2728
2731
  static fromNativeScript(e) {
2729
- return _e(e).to_hex();
2732
+ return oe(e).to_hex();
2730
2733
  }
2731
2734
  }
2732
2735
  function Ht(s, e, t, r) {
@@ -2762,7 +2765,7 @@ let Bt = class {
2762
2765
  _txInputsBuilder;
2763
2766
  _txWithdrawals;
2764
2767
  constructor(e = {}) {
2765
- this._era = e.era, this._initiator = e.initiator, this._mintBuilder = a.MintBuilder.new(), this._protocolParameters = e.parameters ?? gt, this._txBuilder = Ae(e.parameters), this._txCertificates = a.Certificates.new(), this._txInputsBuilder = a.TxInputsBuilder.new(), this._txWithdrawals = a.Withdrawals.new();
2768
+ this._era = e.era, this._initiator = e.initiator, this._mintBuilder = a.MintBuilder.new(), this._protocolParameters = e.parameters ?? gt, this._txBuilder = pe(e.parameters), this._txCertificates = a.Certificates.new(), this._txInputsBuilder = a.TxInputsBuilder.new(), this._txWithdrawals = a.Withdrawals.new();
2766
2769
  }
2767
2770
  static attachMetadata(e, t, r = "BABBAGE") {
2768
2771
  var c;
@@ -2874,13 +2877,13 @@ let Bt = class {
2874
2877
  const r = Qt(t), n = r.multiasset();
2875
2878
  if (r.is_zero() || n === void 0)
2876
2879
  return this;
2877
- const i = he(e).next(), c = r.coin().is_zero() ? i.with_asset_and_min_required_coin_by_utxo_cost(n, Ue(this._protocolParameters.coinsPerUTxOSize)).build() : i.with_coin_and_asset(r.coin(), n).build();
2880
+ const i = de(e).next(), c = r.coin().is_zero() ? i.with_asset_and_min_required_coin_by_utxo_cost(n, Ue(this._protocolParameters.coinsPerUTxOSize)).build() : i.with_coin_and_asset(r.coin(), n).build();
2878
2881
  return t.forEach((l) => {
2879
2882
  this.setTxOutput(l);
2880
2883
  }), this._txBuilder.add_output(c), this;
2881
2884
  }
2882
2885
  sendLovelace(e, t) {
2883
- const n = he(e).next().with_coin(a.BigNum.from_str(t)).build();
2886
+ const n = de(e).next().with_coin(a.BigNum.from_str(t)).build();
2884
2887
  return this.setTxOutput({
2885
2888
  unit: "lovelace",
2886
2889
  quantity: t
@@ -2893,7 +2896,7 @@ let Bt = class {
2893
2896
  }]), this;
2894
2897
  }
2895
2898
  sendValue(e, t) {
2896
- const r = Qt(t.output.amount), i = he(e).next().with_value(r).build();
2899
+ const r = Qt(t.output.amount), i = de(e).next().with_value(r).build();
2897
2900
  return t.output.amount.forEach((c) => {
2898
2901
  this.setTxOutput(c);
2899
2902
  }), this._txBuilder.add_output(i), this;
@@ -2968,7 +2971,7 @@ let Bt = class {
2968
2971
  });
2969
2972
  }
2970
2973
  if (this._txBuilder.set_inputs(this._txInputsBuilder), (this._mintBuilder.has_native_scripts() || this._mintBuilder.has_plutus_scripts()) && this._txBuilder.set_mint_builder(this._mintBuilder), this._txCertificates.len() > 0 && this._txBuilder.set_certs(this._txCertificates), this._txWithdrawals.len() > 0 && this._txBuilder.set_withdrawals(this._txWithdrawals), this._txBuilder.get_mint_builder() || this.notVisited("redeemValue") === !1) {
2971
- const e = this._era !== void 0 ? We[this._era] : We.BABBAGE;
2974
+ const e = this._era !== void 0 ? Je[this._era] : Je.BABBAGE;
2972
2975
  this._txBuilder.calc_script_data_hash(e);
2973
2976
  }
2974
2977
  }
@@ -3012,7 +3015,7 @@ let Bt = class {
3012
3015
  this._recipients.forEach((e, t) => {
3013
3016
  const n = Qt(e).multiasset();
3014
3017
  if (n !== void 0) {
3015
- const c = he(t).next().with_asset_and_min_required_coin_by_utxo_cost(n, Ue(this._protocolParameters.coinsPerUTxOSize)).build();
3018
+ const c = de(t).next().with_asset_and_min_required_coin_by_utxo_cost(n, Ue(this._protocolParameters.coinsPerUTxOSize)).build();
3016
3019
  this._txBuilder.add_output(c);
3017
3020
  }
3018
3021
  });
@@ -3049,7 +3052,7 @@ Ht([
3049
3052
  Bt = Ht([
3050
3053
  zs
3051
3054
  ], Bt);
3052
- const Js = (s, e, t) => {
3055
+ const Ws = (s, e, t) => {
3053
3056
  const r = new Map(e);
3054
3057
  r.set("lovelace", String(Number(r.get("lovelace")) + Number(t)));
3055
3058
  const n = /* @__PURE__ */ new Map();
@@ -3079,7 +3082,7 @@ const Js = (s, e, t) => {
3079
3082
  const k = n.get(w);
3080
3083
  if (!k)
3081
3084
  return;
3082
- const N = Ws(k, v);
3085
+ const N = Js(k, v);
3083
3086
  if (Number(N) > 0) {
3084
3087
  i.add(w), U.delete(w);
3085
3088
  for (const T of k.output.amount)
@@ -3140,7 +3143,7 @@ const Js = (s, e, t) => {
3140
3143
  v && b.push(v);
3141
3144
  }
3142
3145
  return b;
3143
- }, Ws = (s, e) => {
3146
+ }, Js = (s, e) => {
3144
3147
  for (const t of s.output.amount)
3145
3148
  if (t.unit == e)
3146
3149
  return t.quantity;
@@ -3151,7 +3154,7 @@ var zt = { exports: {} }, Vr = { exports: {} }, $e = { exports: {} };
3151
3154
  (function(e) {
3152
3155
  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;
3153
3156
  function U(O) {
3154
- var M, z, X, D = S.prototype = { constructor: S, toString: null, valueOf: null }, F = new S(1), q = 20, W = 4, st = -7, ct = 21, Ft = -1e7, At = 1e7, Rt = !1, Zt = 1, kt = 0, xe = {
3157
+ var M, z, X, D = S.prototype = { constructor: S, toString: null, valueOf: null }, F = new S(1), q = 20, J = 4, st = -7, ct = 21, Ft = -1e7, At = 1e7, Rt = !1, Zt = 1, kt = 0, xe = {
3155
3158
  prefix: "",
3156
3159
  groupSize: 3,
3157
3160
  secondaryGroupSize: 0,
@@ -3186,7 +3189,7 @@ var zt = { exports: {} }, Vr = { exports: {} }, $e = { exports: {} };
3186
3189
  (m = _.indexOf(".")) > -1 && (_ = _.replace(".", "")), (x = _.search(/e/i)) > 0 ? (m < 0 && (m = x), m += +_.slice(x + 1), _ = _.substring(0, x)) : m < 0 && (m = _.length);
3187
3190
  } else {
3188
3191
  if (Q(u, 2, qt.length, "Base"), u == 10 && we)
3189
- return A = new S(o), dt(A, q + A.e + 1, W);
3192
+ return A = new S(o), dt(A, q + A.e + 1, J);
3190
3193
  if (_ = String(o), d = typeof o == "number") {
3191
3194
  if (o * 0 != 0)
3192
3195
  return X(A, _, d, u);
@@ -3238,7 +3241,7 @@ var zt = { exports: {} }, Vr = { exports: {} }, $e = { exports: {} };
3238
3241
  var u, h;
3239
3242
  if (o != null)
3240
3243
  if (typeof o == "object") {
3241
- 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), W = 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"))
3244
+ 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"))
3242
3245
  if (h = o[u], h && h.pop)
3243
3246
  Q(h[0], -v, -1, u), Q(h[1], 1, v, u), Ft = h[0], At = h[1];
3244
3247
  else if (Q(h, -v, v, u), h)
@@ -3270,7 +3273,7 @@ var zt = { exports: {} }, Vr = { exports: {} }, $e = { exports: {} };
3270
3273
  throw Error(c + "Object expected: " + o);
3271
3274
  return {
3272
3275
  DECIMAL_PLACES: q,
3273
- ROUNDING_MODE: W,
3276
+ ROUNDING_MODE: J,
3274
3277
  EXPONENTIAL_AT: [st, ct],
3275
3278
  RANGE: [Ft, At],
3276
3279
  CRYPTO: Rt,
@@ -3359,7 +3362,7 @@ var zt = { exports: {} }, Vr = { exports: {} }, $e = { exports: {} };
3359
3362
  return d.reverse();
3360
3363
  }
3361
3364
  return function(h, I, f, m, x) {
3362
- var d, g, _, A, C, P, K, L, Z = h.indexOf("."), et = q, V = W;
3365
+ var d, g, _, A, C, P, K, L, Z = h.indexOf("."), et = q, V = J;
3363
3366
  for (Z >= 0 && (A = kt, kt = 0, h = h.replace(".", ""), L = new S(I), P = L.pow(h.length - Z), kt = A, L.c = u(
3364
3367
  Y(N(P.c), P.e, "0"),
3365
3368
  10,
@@ -3409,7 +3412,7 @@ var zt = { exports: {} }, Vr = { exports: {} }, $e = { exports: {} };
3409
3412
  ;
3410
3413
  }
3411
3414
  return function(I, f, m, x, d) {
3412
- var g, _, A, C, P, K, L, Z, et, V, $, nt, oe, Ee, Se, xt, te, ft = I.s == f.s ? 1 : -1, at = I.c, tt = f.c;
3415
+ var g, _, A, C, P, K, L, Z, et, V, $, nt, ce, Ee, Se, xt, te, ft = I.s == f.s ? 1 : -1, at = I.c, tt = f.c;
3413
3416
  if (!at || !at[0] || !tt || !tt[0])
3414
3417
  return new S(
3415
3418
  !I.s || !f.s || (at ? tt && at[0] == tt[0] : !tt) ? NaN : at && at[0] == 0 || !tt ? ft * 0 : ft / 0
@@ -3419,7 +3422,7 @@ var zt = { exports: {} }, Vr = { exports: {} }, $e = { exports: {} };
3419
3422
  if (tt[A] > (at[A] || 0) && _--, ft < 0)
3420
3423
  et.push(1), C = !0;
3421
3424
  else {
3422
- for (Ee = at.length, xt = tt.length, A = 0, ft += 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), oe = xt, V = at.slice(0, xt), $ = V.length; $ < xt; V[$++] = 0)
3425
+ for (Ee = at.length, xt = tt.length, A = 0, ft += 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)
3423
3426
  ;
3424
3427
  te = tt.slice(), te = [0].concat(te), Se = tt[0], tt[1] >= d / 2 && Se++;
3425
3428
  do {
@@ -3434,8 +3437,8 @@ var zt = { exports: {} }, Vr = { exports: {} }, $e = { exports: {} };
3434
3437
  P++, h(V, xt < $ ? te : tt, $, d), $ = V.length;
3435
3438
  } else
3436
3439
  g === 0 && (P++, V = [0]);
3437
- et[A++] = P, V[0] ? V[$++] = at[oe] || 0 : (V = [at[oe]], $ = 1);
3438
- } while ((oe++ < Ee || V[0] != null) && ft--);
3440
+ et[A++] = P, V[0] ? V[$++] = at[ce] || 0 : (V = [at[ce]], $ = 1);
3441
+ } while ((ce++ < Ee || V[0] != null) && ft--);
3439
3442
  C = V[0] != null, et[0] || et.splice(0, 1);
3440
3443
  }
3441
3444
  if (d == p) {
@@ -3449,7 +3452,7 @@ var zt = { exports: {} }, Vr = { exports: {} }, $e = { exports: {} };
3449
3452
  }();
3450
3453
  function Ce(o, u, h, I) {
3451
3454
  var f, m, x, d, g;
3452
- if (h == null ? h = W : Q(h, 0, 8), !o.c)
3455
+ if (h == null ? h = J : Q(h, 0, 8), !o.c)
3453
3456
  return o.toString();
3454
3457
  if (f = o.c[0], x = o.e, u == null)
3455
3458
  g = N(o.c), g = I == 1 || I == 2 && (x <= st || x >= ct) ? j(g, x) : Y(g, x, "0");
@@ -3551,7 +3554,7 @@ var zt = { exports: {} }, Vr = { exports: {} }, $e = { exports: {} };
3551
3554
  }, D.decimalPlaces = D.dp = function(o, u) {
3552
3555
  var h, I, f, m = this;
3553
3556
  if (o != null)
3554
- return Q(o, 0, v), u == null ? u = W : Q(u, 0, 8), dt(new S(m), o + m.e + 1, u);
3557
+ return Q(o, 0, v), u == null ? u = J : Q(u, 0, 8), dt(new S(m), o + m.e + 1, u);
3555
3558
  if (!(h = m.c))
3556
3559
  return null;
3557
3560
  if (I = ((f = h.length - 1) - k(this.e / y)) * y, f = h[f])
@@ -3559,7 +3562,7 @@ var zt = { exports: {} }, Vr = { exports: {} }, $e = { exports: {} };
3559
3562
  ;
3560
3563
  return I < 0 && (I = 0), I;
3561
3564
  }, D.dividedBy = D.div = function(o, u) {
3562
- return M(this, new S(o, u), q, W);
3565
+ return M(this, new S(o, u), q, J);
3563
3566
  }, D.dividedToIntegerBy = D.idiv = function(o, u) {
3564
3567
  return M(this, new S(o, u), 0, 1);
3565
3568
  }, D.exponentiatedBy = D.pow = function(o, u) {
@@ -3596,10 +3599,10 @@ var zt = { exports: {} }, Vr = { exports: {} }, $e = { exports: {} };
3596
3599
  }
3597
3600
  C = C.times(C), m ? C.c && C.c.length > m && (C.c.length = m) : I && (C = C.mod(u));
3598
3601
  }
3599
- return I ? A : (g && (A = F.div(A)), u ? A.mod(u) : m ? dt(A, kt, W, x) : A);
3602
+ return I ? A : (g && (A = F.div(A)), u ? A.mod(u) : m ? dt(A, kt, J, x) : A);
3600
3603
  }, D.integerValue = function(o) {
3601
3604
  var u = new S(this);
3602
- return o == null ? o = W : Q(o, 0, 8), dt(u, u.e + 1, o);
3605
+ return o == null ? o = J : Q(o, 0, 8), dt(u, u.e + 1, o);
3603
3606
  }, D.isEqualTo = D.eq = function(o, u) {
3604
3607
  return T(this, new S(o, u)) === 0;
3605
3608
  }, D.isFinite = function() {
@@ -3633,7 +3636,7 @@ var zt = { exports: {} }, Vr = { exports: {} }, $e = { exports: {} };
3633
3636
  if (!A || !C)
3634
3637
  return A ? (o.s = -u, o) : new S(C ? x : NaN);
3635
3638
  if (!A[0] || !C[0])
3636
- return C[0] ? (o.s = -u, o) : new S(A[0] ? x : W == 3 ? -0 : 0);
3639
+ return C[0] ? (o.s = -u, o) : new S(A[0] ? x : J == 3 ? -0 : 0);
3637
3640
  }
3638
3641
  if (g = k(g), _ = k(_), A = A.slice(), d = g - _) {
3639
3642
  for ((m = d < 0) ? (d = -d, f = A) : (_ = g, f = C), f.reverse(), u = d; u--; f.push(0))
@@ -3658,7 +3661,7 @@ var zt = { exports: {} }, Vr = { exports: {} }, $e = { exports: {} };
3658
3661
  }
3659
3662
  for (; A[0] == 0; A.splice(0, 1), --_)
3660
3663
  ;
3661
- return A[0] ? Be(o, A, _) : (o.s = W == 3 ? -1 : 1, o.c = [o.e = 0], o);
3664
+ return A[0] ? Be(o, A, _) : (o.s = J == 3 ? -1 : 1, o.c = [o.e = 0], o);
3662
3665
  }, D.modulo = D.mod = function(o, u) {
3663
3666
  var h, I, f = this;
3664
3667
  return o = new S(o, u), !f.c || !o.s || o.c && !o.c[0] ? new S(NaN) : !o.c || f.c && !f.c[0] ? new S(f) : (Zt == 9 ? (I = o.s, o.s = 1, h = M(f, o, 0, 3), o.s = I, h.s *= I) : h = M(f, o, 0, Zt), o = f.minus(h.times(o)), !o.c[0] && Zt == 1 && (o.s = f.s), o);
@@ -3701,7 +3704,7 @@ var zt = { exports: {} }, Vr = { exports: {} }, $e = { exports: {} };
3701
3704
  }, D.precision = D.sd = function(o, u) {
3702
3705
  var h, I, f, m = this;
3703
3706
  if (o != null && o !== !!o)
3704
- return Q(o, 1, v), u == null ? u = W : Q(u, 0, 8), dt(new S(m), o, u);
3707
+ return Q(o, 1, v), u == null ? u = J : Q(u, 0, 8), dt(new S(m), o, u);
3705
3708
  if (!(h = m.c))
3706
3709
  return null;
3707
3710
  if (f = h.length - 1, I = f * y + 1, f = h[f]) {
@@ -3731,7 +3734,7 @@ var zt = { exports: {} }, Vr = { exports: {} }, $e = { exports: {} };
3731
3734
  break;
3732
3735
  }
3733
3736
  }
3734
- return dt(h, h.e + q + 1, W, o);
3737
+ return dt(h, h.e + q + 1, J, o);
3735
3738
  }, D.toExponential = function(o, u) {
3736
3739
  return o != null && (Q(o, 0, v), o++), Ce(this, o, u, 1);
3737
3740
  }, D.toFixed = function(o, u) {
@@ -3763,8 +3766,8 @@ var zt = { exports: {} }, Vr = { exports: {} }, $e = { exports: {} };
3763
3766
  return new S(K);
3764
3767
  for (u = new S(F), _ = h = new S(F), I = g = new S(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 = At, At = 1 / 0, d = new S(P), g.c[0] = 0; A = M(d, u, 0, 1), f = h.plus(A.times(I)), f.comparedTo(o) != 1; )
3765
3768
  h = I, I = f, _ = g.plus(A.times(f = _)), g = f, u = d.minus(A.times(f = u)), d = f;
3766
- 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, W).minus(K).abs().comparedTo(
3767
- M(g, h, m, W).minus(K).abs()
3769
+ 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(
3770
+ M(g, h, m, J).minus(K).abs()
3768
3771
  ) < 1 ? [_, I] : [g, h], At = x, C;
3769
3772
  }, D.toNumber = function() {
3770
3773
  return +St(this);
@@ -3772,7 +3775,7 @@ var zt = { exports: {} }, Vr = { exports: {} }, $e = { exports: {} };
3772
3775
  return o != null && Q(o, 1, v), Ce(this, o, u, 2);
3773
3776
  }, D.toString = function(o) {
3774
3777
  var u, h = this, I = h.s, f = h.e;
3775
- 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 && we ? (h = dt(new S(h), q + f + 1, W), 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;
3778
+ 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 && we ? (h = dt(new S(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;
3776
3779
  }, D.valueOf = D.toJSON = function() {
3777
3780
  return St(this);
3778
3781
  }, D._isBigNumber = !0, O != null && S.set(O), S;
@@ -3792,18 +3795,18 @@ var zt = { exports: {} }, Vr = { exports: {} }, $e = { exports: {} };
3792
3795
  return F.slice(0, D + 1 || 1);
3793
3796
  }
3794
3797
  function T(O, M) {
3795
- var z, X, D = O.c, F = M.c, q = O.s, W = M.s, st = O.e, ct = M.e;
3796
- if (!q || !W)
3798
+ var z, X, D = O.c, F = M.c, q = O.s, J = M.s, st = O.e, ct = M.e;
3799
+ if (!q || !J)
3797
3800
  return null;
3798
3801
  if (z = D && !D[0], X = F && !F[0], z || X)
3799
- return z ? X ? 0 : -W : q;
3800
- if (q != W)
3802
+ return z ? X ? 0 : -J : q;
3803
+ if (q != J)
3801
3804
  return q;
3802
3805
  if (z = q < 0, X = st == ct, !D || !F)
3803
3806
  return X ? 0 : !D ^ z ? 1 : -1;
3804
3807
  if (!X)
3805
3808
  return st > ct ^ z ? 1 : -1;
3806
- for (W = (st = D.length) < (ct = F.length) ? st : ct, q = 0; q < W; q++)
3809
+ for (J = (st = D.length) < (ct = F.length) ? st : ct, q = 0; q < J; q++)
3807
3810
  if (D[q] != F[q])
3808
3811
  return D[q] > F[q] ^ z ? 1 : -1;
3809
3812
  return st == ct ? 0 : st > ct ^ z ? 1 : -1;
@@ -3903,7 +3906,7 @@ var zt = { exports: {} }, Vr = { exports: {} }, $e = { exports: {} };
3903
3906
  });
3904
3907
  })();
3905
3908
  })(Vr);
3906
- var de = null;
3909
+ var fe = null;
3907
3910
  const js = /(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])/, Xs = /(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)/;
3908
3911
  var Zs = function(s) {
3909
3912
  var e = {
@@ -3962,7 +3965,7 @@ var Zs = function(s) {
3962
3965
  if (k = +N, !isFinite(k))
3963
3966
  c("Bad number");
3964
3967
  else
3965
- return de == null && (de = $e.exports), N.length > 15 ? e.storeAsString ? N : e.useNativeBigInt ? BigInt(N) : new de(N) : e.alwaysParseAsBig ? e.useNativeBigInt ? BigInt(k) : new de(k) : k;
3968
+ return fe == null && (fe = $e.exports), N.length > 15 ? e.storeAsString ? N : e.useNativeBigInt ? BigInt(N) : new fe(N) : e.alwaysParseAsBig ? e.useNativeBigInt ? BigInt(k) : new fe(k) : k;
3966
3969
  }, y = function() {
3967
3970
  var k, N, T = "", Q;
3968
3971
  if (r === '"')
@@ -4053,7 +4056,7 @@ zt.exports.parse = Gr();
4053
4056
  zt.exports.stringify = Lr;
4054
4057
  class en {
4055
4058
  txHex = "";
4056
- txBuilder = Ae();
4059
+ txBuilder = pe();
4057
4060
  txEvaluationMultiplier = 1.1;
4058
4061
  _protocolParams = gt;
4059
4062
  txOutput;
@@ -4065,7 +4068,7 @@ class en {
4065
4068
  txInQueueItem;
4066
4069
  collateralQueueItem;
4067
4070
  refScriptTxInQueueItem;
4068
- reset = () => (this.txHex = "", this.txBuilder = Ae(), this.txEvaluationMultiplier = 1.1, this._protocolParams = gt, 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);
4071
+ reset = () => (this.txHex = "", this.txBuilder = pe(), this.txEvaluationMultiplier = 1.1, this._protocolParams = gt, 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);
4069
4072
  emptyTxBuilderBody = () => ({
4070
4073
  inputs: [],
4071
4074
  outputs: [],
@@ -4360,7 +4363,7 @@ class en {
4360
4363
  metadataValue = (e, t) => (this.meshTxBuilderBody.metadata.push({ tag: e, metadata: t }), this);
4361
4364
  protocolParams = (e) => {
4362
4365
  const t = { ...gt, ...e };
4363
- return this._protocolParams = t, this.txBuilder = Ae(t), this;
4366
+ return this._protocolParams = t, this.txBuilder = pe(t), this;
4364
4367
  };
4365
4368
  signingKey = (e) => (this.meshTxBuilderBody.signingKey.push(e), this);
4366
4369
  selectUtxosFrom = (e, t = 5e6) => (this.meshTxBuilderBody.extraInputs = e, this.meshTxBuilderBody.selectionThreshold = t, this);
@@ -4381,7 +4384,7 @@ class en {
4381
4384
  quantity: String(c.amount)
4382
4385
  }, p = Number(i.get(l.unit)) || 0;
4383
4386
  return i.set(l.unit, String(p - Number(l.quantity))), i;
4384
- }, r), Js(e, r, t).forEach((i) => {
4387
+ }, r), Ws(e, r, t).forEach((i) => {
4385
4388
  const c = {
4386
4389
  type: "PubKey",
4387
4390
  txIn: {
@@ -4630,7 +4633,7 @@ class en {
4630
4633
  castRawDataToJsonString = (e) => typeof e == "object" ? zt.exports.stringify(e) : e;
4631
4634
  castDataToPlutusData = ({ type: e, content: t }) => e === "Mesh" ? Ot(t) : e === "CBOR" ? a.PlutusData.from_hex(t) : a.PlutusData.from_json(t, a.PlutusDatumSchema.DetailedSchema);
4632
4635
  }
4633
- class Dn extends en {
4636
+ class kn extends en {
4634
4637
  _fetcher;
4635
4638
  _submitter;
4636
4639
  _evaluator;
@@ -4830,7 +4833,7 @@ class rt {
4830
4833
  const F = (D = j.as_move_instantaneous_rewards_cert()) == null ? void 0 : D.move_instantaneous_reward().as_to_stake_creds();
4831
4834
  if (F)
4832
4835
  for (let q = 0; q < F.len(); q += 1) {
4833
- const W = F.keys().get(q), st = W.kind() === a.StakeCredKind.Key ? W.to_keyhash() : void 0;
4836
+ const J = F.keys().get(q), st = J.kind() === a.StakeCredKind.Key ? J.to_keyhash() : void 0;
4834
4837
  st && Y.push(st.to_hex());
4835
4838
  }
4836
4839
  break;
@@ -4920,6 +4923,8 @@ class Qe {
4920
4923
  throw new Error("getUsedCollateral not implemented.");
4921
4924
  }
4922
4925
  async getUsedUTxOs(e = 0) {
4926
+ if (!this._fetcher)
4927
+ throw new Error("[AppWallet] Fetcher is required to fetch UTxOs. Please provide a fetcher.");
4923
4928
  const t = this._wallet.getAccount(e, pt);
4924
4929
  return (await this._fetcher.fetchAddressUTxOs(t.enterpriseAddress)).map((n) => It(n));
4925
4930
  }
@@ -4932,6 +4937,8 @@ class Qe {
4932
4937
  }
4933
4938
  async signTx(e, t = !1, r = 0) {
4934
4939
  try {
4940
+ if (!this._fetcher)
4941
+ throw new Error("[AppWallet] Fetcher is required to fetch UTxOs. Please provide a fetcher.");
4935
4942
  const n = this._wallet.getAccount(r, pt), i = await this._fetcher.fetchAddressUTxOs(n.enterpriseAddress), c = this._wallet.signTx(r, pt, i, e, t), l = _t(e), p = l.witness_set(), y = Me(p, c);
4936
4943
  return p.set_vkeys(y), a.Transaction.new(l.body(), p, l.auxiliary_data()).to_hex();
4937
4944
  } catch (n) {
@@ -4942,6 +4949,8 @@ class Qe {
4942
4949
  return console.log("unimplemented", e, t), [];
4943
4950
  }
4944
4951
  submitTx(e) {
4952
+ if (!this._submitter)
4953
+ throw new Error("[AppWallet] Submitter is required to submit transactions. Please provide a submitter.");
4945
4954
  return this._submitter.submitTx(e);
4946
4955
  }
4947
4956
  static brew(e = 256) {
@@ -5090,7 +5099,7 @@ class Ke {
5090
5099
  return t == null ? void 0 : t.enable();
5091
5100
  }
5092
5101
  }
5093
- class kn {
5102
+ class Tn {
5094
5103
  _wallet;
5095
5104
  _network;
5096
5105
  constructor(e) {
@@ -5232,20 +5241,20 @@ class kn {
5232
5241
  }
5233
5242
  export {
5234
5243
  Qe as AppWallet,
5235
- wn as BlockfrostProvider,
5244
+ Cn as BlockfrostProvider,
5236
5245
  Ke as BrowserWallet,
5237
5246
  rt as EmbeddedWallet,
5238
- vn as ForgeScript,
5239
- Cn as InfuraProvider,
5240
- Bn as KoiosProvider,
5241
- Sn as MaestroProvider,
5242
- Dn as MeshTxBuilder,
5243
- kn as MeshWallet,
5244
- En as OgmiosProvider,
5247
+ Qn as ForgeScript,
5248
+ Bn as InfuraProvider,
5249
+ En as KoiosProvider,
5250
+ bn as MaestroProvider,
5251
+ kn as MeshTxBuilder,
5252
+ Tn as MeshWallet,
5253
+ Sn as OgmiosProvider,
5245
5254
  Bt as Transaction,
5246
- bn as YaciProvider,
5255
+ vn as YaciProvider,
5247
5256
  un as checkSignature,
5248
- _n as generateNonce,
5257
+ yn as generateNonce,
5249
5258
  Zr as isNetwork,
5250
5259
  ns as keepRelevant,
5251
5260
  cn as largestFirst,
@@ -5253,21 +5262,22 @@ export {
5253
5262
  on as mergeAssets,
5254
5263
  Kt as parseAssetUnit,
5255
5264
  E as parseHttpError,
5256
- yn as readPlutusData,
5257
- xn as readTransaction,
5265
+ xn as readPlutusData,
5266
+ wn as readTransaction,
5258
5267
  ln as resolveDataHash,
5259
5268
  hn as resolveEpochNo,
5260
5269
  Rr as resolveFingerprint,
5261
5270
  dn as resolveLanguageView,
5262
- fn as resolveNativeScriptHash,
5271
+ fn as resolveNativeScriptAddress,
5272
+ gn as resolveNativeScriptHash,
5263
5273
  Yt as resolvePaymentKeyHash,
5264
- gn as resolvePlutusScriptAddress,
5265
- mn as resolvePlutusScriptHash,
5266
- An as resolvePoolId,
5274
+ mn as resolvePlutusScriptAddress,
5275
+ An as resolvePlutusScriptHash,
5276
+ pn as resolvePoolId,
5267
5277
  Ys as resolvePrivateKey,
5268
5278
  ye as resolveRewardAddress,
5269
- pn as resolveScriptRef,
5270
- In as resolveSlotNo,
5279
+ In as resolveScriptRef,
5280
+ _n as resolveSlotNo,
5271
5281
  re as resolveStakeKeyHash,
5272
5282
  qr as resolveTxFees,
5273
5283
  $s as resolveTxHash