@meshsdk/core 1.5.11-beta.4 → 1.5.11-beta.6

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
@@ -1,8 +1,8 @@
1
- import { customAlphabet as Ce } from "nanoid";
1
+ import { customAlphabet as Be } from "nanoid";
2
2
  import * as i from "@emurgo/cardano-serialization-lib-nodejs";
3
3
  import G from "axios";
4
- import { mnemonicToEntropy as we, generateMnemonic as ze } from "bip39";
5
- import { COSEKey as Be, COSESign1 as Je, Label as X, Int as wt, BigNum as Kt, KeyType as We, AlgorithmId as Se, CBORValue as Mt, HeaderMap as Xt, Headers as je, ProtectedHeaderMap as Xe, COSESign1Builder as Ze } from "@emurgo/cardano-message-signing-nodejs";
4
+ import { mnemonicToEntropy as Se, generateMnemonic as ze } from "bip39";
5
+ import { COSEKey as Ee, COSESign1 as Je, Label as X, Int as wt, BigNum as Kt, KeyType as We, AlgorithmId as be, CBORValue as Mt, HeaderMap as te, Headers as je, ProtectedHeaderMap as Xe, COSESign1Builder as Ze } from "@emurgo/cardano-message-signing-nodejs";
6
6
  const ts = ["testnet", "preview", "preprod", "mainnet"], es = (r) => ts.includes(r), at = {
7
7
  mem: 7e6,
8
8
  steps: 3e9
@@ -27,10 +27,10 @@ const ts = ["testnet", "preview", "preprod", "mainnet"], es = (r) => ts.includes
27
27
  maxTxExSteps: "10000000000",
28
28
  maxBlockExMem: "80000000",
29
29
  maxBlockExSteps: "40000000000"
30
- }, Pt = 2147483648, R = {
30
+ }, Pt = 2147483648, Y = {
31
31
  V1: i.Language.new_plutus_v1(),
32
32
  V2: i.Language.new_plutus_v2()
33
- }, O = 56, ss = {
33
+ }, V = 56, ss = {
34
34
  CERT: i.RedeemerTag.new_cert(),
35
35
  MINT: i.RedeemerTag.new_mint(),
36
36
  REWARD: i.RedeemerTag.new_reward(),
@@ -40,7 +40,7 @@ const ts = ["testnet", "preview", "preprod", "mainnet"], es = (r) => ts.includes
40
40
  preview: ["183", "15811222", "1682467200", "86400"],
41
41
  preprod: ["65", "26438400", "1682121600", "432000"],
42
42
  mainnet: ["208", "4492800", "1596059091", "432000"]
43
- }, Zt = {
43
+ }, ee = {
44
44
  ALONZO: i.TxBuilderConstants.plutus_alonzo_cost_models(),
45
45
  BABBAGE: (() => {
46
46
  const r = i.Costmdls.new(), e = i.CostModel.new();
@@ -399,7 +399,7 @@ const ts = ["testnet", "preview", "preprod", "mainnet"], es = (r) => ts.includes
399
399
  V1: "a141005901b69f1a0003236119032c01011903e819023b00011903e8195e7104011903e818201a0001ca761928eb041959d818641959d818641959d818641959d818641959d818641959d81864186418641959d81864194c5118201a0002acfa182019b551041a000363151901ff00011a00015c3518201a000797751936f404021a0002ff941a0006ea7818dc0001011903e8196ff604021a0003bd081a00034ec5183e011a00102e0f19312a011a00032e801901a5011a0002da781903e819cf06011a00013a34182019a8f118201903e818201a00013aac0119e143041903e80a1a00030219189c011a00030219189c011a0003207c1901d9011a000330001901ff0119ccf3182019fd40182019ffd5182019581e18201940b318201a00012adf18201a0002ff941a0006ea7818dc0001011a00010f92192da7000119eabb18201a0002ff941a0006ea7818dc0001011a0002ff941a0006ea7818dc0001011a000c504e197712041a001d6af61a0001425b041a00040c660004001a00014fab18201a0003236119032c010119a0de18201a00033d7618201979f41820197fb8182019a95d1820197df718201995aa18201a009063b91903fd0aff",
400
400
  V2: "a20198af1a0003236119032c01011903e819023b00011903e8195e7104011903e818201a0001ca761928eb041959d818641959d818641959d818641959d818641959d818641959d81864186418641959d81864194c5118201a0002acfa182019b551041a000363151901ff00011a00015c3518201a000797751936f404021a0002ff941a0006ea7818dc0001011903e8196ff604021a0003bd081a00034ec5183e011a00102e0f19312a011a00032e801901a5011a0002da781903e819cf06011a00013a34182019a8f118201903e818201a00013aac0119e143041903e80a1a00030219189c011a00030219189c011a0003207c1901d9011a000330001901ff0119ccf3182019fd40182019ffd5182019581e18201940b318201a00012adf18201a0002ff941a0006ea7818dc0001011a00010f92192da7000119eabb18201a0002ff941a0006ea7818dc0001011a0002ff941a0006ea7818dc0001011a0011b22c1a0005fdde00021a000c504e197712041a001d6af61a0001425b041a00040c660004001a00014fab18201a0003236119032c010119a0de18201a00033d7618201979f41820197fb8182019a95d1820197df718201995aa18201b00000004a817c8001b00000004a817c8001a009063b91903fd0a1b00000004a817c800001b00000004a817c80041005901b69f1a0003236119032c01011903e819023b00011903e8195e7104011903e818201a0001ca761928eb041959d818641959d818641959d818641959d818641959d818641959d81864186418641959d81864194c5118201a0002acfa182019b551041a000363151901ff00011a00015c3518201a000797751936f404021a0002ff941a0006ea7818dc0001011903e8196ff604021a0003bd081a00034ec5183e011a00102e0f19312a011a00032e801901a5011a0002da781903e819cf06011a00013a34182019a8f118201903e818201a00013aac0119e143041903e80a1a00030219189c011a00030219189c011a0003207c1901d9011a000330001901ff0119ccf3182019fd40182019ffd5182019581e18201940b318201a00012adf18201a0002ff941a0006ea7818dc0001011a00010f92192da7000119eabb18201a0002ff941a0006ea7818dc0001011a0002ff941a0006ea7818dc0001011a000c504e197712041a001d6af61a0001425b041a00040c660004001a00014fab18201a0003236119032c010119a0de18201a00033d7618201979f41820197fb8182019a95d1820197df718201995aa18201a009063b91903fd0aff"
401
401
  }
402
- }, Vt = {
402
+ }, Rt = {
403
403
  [i.NetworkInfo.testnet().network_id()]: "8d18d786e92776c824607fd8e193ec535c79dc61ea2405ddf3b09fe3",
404
404
  [i.NetworkInfo.mainnet().network_id()]: "f0ff48bbb7bbe9d59a40f1ce90e9e9d0ff5002ec48f232b49ca0fb9a"
405
405
  }, ns = {
@@ -436,7 +436,7 @@ const ts = ["testnet", "preview", "preprod", "mainnet"], es = (r) => ts.includes
436
436
  SHEN: "8db269c3ec630e06ae29f74bc39edd1f87c819f1056206e879a1cd615368656e4d6963726f555344",
437
437
  WMT: "1d7f33bd23d85e1a25d87d86fac4f199c3197a2f7afeb662a0f34e1e776f726c646d6f62696c65746f6b656e",
438
438
  COPI: "b6a7467ea1deb012808ef4e87b5ff371e85f7142d7b356a40d9b42a0436f726e75636f70696173205b76696120436861696e506f72742e696f5d"
439
- }, te = [
439
+ }, se = [
440
440
  "begin",
441
441
  "eternl",
442
442
  "flint",
@@ -454,29 +454,29 @@ const ts = ["testnet", "preview", "preprod", "mainnet"], es = (r) => ts.includes
454
454
  ...n
455
455
  ];
456
456
  }, ur = (r, e, t = !1, { maxTxSize: s, minFeeA: n, minFeeB: a } = k) => {
457
- const o = e.filter((g) => Ee(g) === !1).sort(qt), c = i.BigNum.from_str(Le(s, n, a)), u = t ? i.BigNum.from_str(r).checked_add(c).to_str() : r;
457
+ const o = e.filter((g) => Qe(g) === !1).sort(Yt), c = i.BigNum.from_str(Le(s, n, a)), u = t ? i.BigNum.from_str(r).checked_add(c).to_str() : r;
458
458
  return It(o, /* @__PURE__ */ new Map([
459
459
  ["lovelace", u]
460
460
  ]));
461
461
  }, os = (r, e, t = !1, s = k) => {
462
- const n = e.filter(Ee).sort(qt), a = us(s), o = r.get("lovelace") ?? "0", c = t ? i.BigNum.from_str(o).checked_add(a).to_str() : o;
462
+ const n = e.filter(Qe).sort(Yt), a = us(s), o = r.get("lovelace") ?? "0", c = t ? i.BigNum.from_str(o).checked_add(a).to_str() : o;
463
463
  return r.set("lovelace", c), It(n, r);
464
464
  }, cs = (r, e) => Array.from(e, (t) => ({ unit: t[0], quantity: i.BigNum.from_str(t[1]) })).every((t) => r.filter((s) => s.output.amount.find((n) => n.unit === t.unit) !== void 0).reduce((s, n) => {
465
465
  const a = n.output.amount.reduce((o, c) => o.checked_add(i.BigNum.from_str(t.unit === c.unit ? c.quantity : "0")), i.BigNum.from_str("0"));
466
466
  return s.checked_add(a);
467
- }, i.BigNum.from_str("0")).less_than(t.quantity) === !1), qt = (r, e) => {
467
+ }, i.BigNum.from_str("0")).less_than(t.quantity) === !1), Yt = (r, e) => {
468
468
  var n, a;
469
469
  const t = i.BigNum.from_str(((n = r.output.amount.find((o) => o.unit === "lovelace")) == null ? void 0 : n.quantity) ?? "0");
470
470
  return i.BigNum.from_str(((a = e.output.amount.find((o) => o.unit === "lovelace")) == null ? void 0 : a.quantity) ?? "0").compare(t);
471
471
  }, us = (r) => {
472
472
  const { maxTxSize: e, minFeeA: t, minFeeB: s } = r;
473
473
  return i.BigNum.from_str(Le(e, t, s));
474
- }, Ee = (r) => r.output.amount.length > 1, ds = (r) => r.reduce((e, t) => {
474
+ }, Qe = (r) => r.output.amount.length > 1, ds = (r) => r.reduce((e, t) => {
475
475
  var n;
476
476
  const s = ((n = t.output.amount.find((a) => a.unit === "lovelace")) == null ? void 0 : n.quantity) ?? "0";
477
477
  return e.checked_add(i.BigNum.from_str(s));
478
478
  }, i.BigNum.from_str("0")), hs = (r, e) => {
479
- const t = e.sort(qt);
479
+ const t = e.sort(Yt);
480
480
  return It(t, /* @__PURE__ */ new Map([
481
481
  ["lovelace", r]
482
482
  ]));
@@ -488,7 +488,7 @@ const ts = ["testnet", "preview", "preprod", "mainnet"], es = (r) => ts.includes
488
488
  };
489
489
  }, dr = (r, e, { key: t, signature: s }) => {
490
490
  var o, c;
491
- const n = Be.from_bytes(_(t)), a = Je.from_bytes(_(s));
491
+ const n = Ee.from_bytes(_(t)), a = Je.from_bytes(_(s));
492
492
  if ((r == null ? void 0 : r.length) > 0) {
493
493
  const u = D(a.payload() ?? new Uint8Array());
494
494
  if (Q(r) !== u)
@@ -517,22 +517,22 @@ const ts = ["testnet", "preview", "preprod", "mainnet"], es = (r) => ts.includes
517
517
  return !1;
518
518
  }
519
519
  }, ms = (r) => {
520
- const e = Be.new(X.from_key_type(We.OKP));
521
- return e.set_algorithm_id(X.from_algorithm_id(Se.EdDSA)), e.set_header(X.new_int(wt.new_negative(Kt.from_str("1"))), Mt.new_int(wt.new_i32(6))), e.set_header(X.new_int(wt.new_negative(Kt.from_str("2"))), Mt.new_bytes(r.key.to_public().as_bytes())), e;
520
+ const e = Ee.new(X.from_key_type(We.OKP));
521
+ return e.set_algorithm_id(X.from_algorithm_id(be.EdDSA)), e.set_header(X.new_int(wt.new_negative(Kt.from_str("1"))), Mt.new_int(wt.new_i32(6))), e.set_header(X.new_int(wt.new_negative(Kt.from_str("2"))), Mt.new_bytes(r.key.to_public().as_bytes())), e;
522
522
  }, Is = (r, e) => {
523
- const t = Xt.new(), s = Xt.new();
524
- t.set_algorithm_id(X.from_algorithm_id(Se.EdDSA)), t.set_header(X.new_text("address"), Mt.new_bytes(e.address.to_bytes()));
523
+ const t = te.new(), s = te.new();
524
+ t.set_algorithm_id(X.from_algorithm_id(be.EdDSA)), t.set_header(X.new_text("address"), Mt.new_bytes(e.address.to_bytes()));
525
525
  const n = je.new(Xe.new(t), s), a = Ze.new(n, _(r.payload), !1);
526
526
  r.externalAAD !== void 0 && a.set_external_aad(_(r.externalAAD));
527
527
  const o = a.make_data_to_sign(), c = e.key.sign(o.to_bytes());
528
528
  return a.build(c.to_bytes());
529
529
  };
530
- var ee = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, be = {}, v = { exports: {} };
530
+ var re = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, ve = {}, v = { exports: {} };
531
531
  $.notEqual = fs;
532
532
  $.notOk = _s;
533
533
  $.equal = ps;
534
534
  $.ok = $;
535
- var Qe = $;
535
+ var De = $;
536
536
  function ps(r, e, t) {
537
537
  $(r == e, t);
538
538
  }
@@ -546,14 +546,14 @@ function $(r, e) {
546
546
  if (!r)
547
547
  throw new Error(e || "AssertionError");
548
548
  }
549
- var V = { exports: {} };
549
+ var q = { exports: {} };
550
550
  function ys(r) {
551
551
  throw new Error('Could not dynamically require "' + r + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
552
552
  }
553
- var xs = Rt;
554
- Rt.supported = typeof WebAssembly < "u";
555
- function Rt(r) {
556
- if (!Rt.supported)
553
+ var xs = Lt;
554
+ Lt.supported = typeof WebAssembly < "u";
555
+ function Lt(r) {
556
+ if (!Lt.supported)
557
557
  return null;
558
558
  var e = r && r.imports, t = Cs("AGFzbQEAAAABEANgAn9/AGADf39/AGABfwADBQQAAQICBQUBAQroBwdNBQZtZW1vcnkCAAxibGFrZTJiX2luaXQAAA5ibGFrZTJiX3VwZGF0ZQABDWJsYWtlMmJfZmluYWwAAhBibGFrZTJiX2NvbXByZXNzAAMK00AElgMAIABCADcDACAAQQhqQgA3AwAgAEEQakIANwMAIABBGGpCADcDACAAQSBqQgA3AwAgAEEoakIANwMAIABBMGpCADcDACAAQThqQgA3AwAgAEHAAGpCADcDACAAQcgAakIANwMAIABB0ABqQgA3AwAgAEHYAGpCADcDACAAQeAAakIANwMAIABB6ABqQgA3AwAgAEHwAGpCADcDACAAQfgAakIANwMAIABBgAFqQoiS853/zPmE6gBBACkDAIU3AwAgAEGIAWpCu86qptjQ67O7f0EIKQMAhTcDACAAQZABakKr8NP0r+68tzxBECkDAIU3AwAgAEGYAWpC8e30+KWn/aelf0EYKQMAhTcDACAAQaABakLRhZrv+s+Uh9EAQSApAwCFNwMAIABBqAFqQp/Y+dnCkdqCm39BKCkDAIU3AwAgAEGwAWpC6/qG2r+19sEfQTApAwCFNwMAIABBuAFqQvnC+JuRo7Pw2wBBOCkDAIU3AwAgAEHAAWpCADcDACAAQcgBakIANwMAIABB0AFqQgA3AwALbQEDfyAAQcABaiEDIABByAFqIQQgBCkDAKchBQJAA0AgASACRg0BIAVBgAFGBEAgAyADKQMAIAWtfDcDAEEAIQUgABADCyAAIAVqIAEtAAA6AAAgBUEBaiEFIAFBAWohAQwACwsgBCAFrTcDAAtkAQN/IABBwAFqIQEgAEHIAWohAiABIAEpAwAgAikDAHw3AwAgAEHQAWpCfzcDACACKQMApyEDAkADQCADQYABRg0BIAAgA2pBADoAACADQQFqIQMMAAsLIAIgA603AwAgABADC+U7AiB+CX8gAEGAAWohISAAQYgBaiEiIABBkAFqISMgAEGYAWohJCAAQaABaiElIABBqAF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AYfHwhAyAOIAOFQhCKIQ4gCSAOfCEJIAggCYVCP4ohCCAEIAUgFnx8IQQgDyAEhUIgiiEPIAogD3whCiAFIAqFQhiKIQUgBCAFIBR8fCEEIA8gBIVCEIohDyAKIA98IQogBSAKhUI/iiEFICEgISkDACABIAmFhTcDACAiICIpAwAgAiAKhYU3AwAgIyAjKQMAIAMgC4WFNwMAICQgJCkDACAEIAyFhTcDACAlICUpAwAgBSANhYU3AwAgJiAmKQMAIAYgDoWFNwMAICcgJykDACAHIA+FhTcDACAoICgpAwAgCCAQhYU3AwAL"), s = null, n = {
559
559
  buffer: t,
@@ -593,29 +593,29 @@ function Cs(r) {
593
593
  function ws(r) {
594
594
  return r.charCodeAt(0);
595
595
  }
596
- var M = Qe, y = xs(), Y = 64, Bt = [];
597
- V.exports = T;
598
- var se = V.exports.BYTES_MIN = 16, re = V.exports.BYTES_MAX = 64;
599
- V.exports.BYTES = 32;
600
- var ne = V.exports.KEYBYTES_MIN = 16, ae = V.exports.KEYBYTES_MAX = 64;
601
- V.exports.KEYBYTES = 32;
602
- var ie = V.exports.SALTBYTES = 16, oe = V.exports.PERSONALBYTES = 16;
596
+ var H = De, y = xs(), L = 64, Bt = [];
597
+ q.exports = T;
598
+ var ne = q.exports.BYTES_MIN = 16, ae = q.exports.BYTES_MAX = 64;
599
+ q.exports.BYTES = 32;
600
+ var ie = q.exports.KEYBYTES_MIN = 16, oe = q.exports.KEYBYTES_MAX = 64;
601
+ q.exports.KEYBYTES = 32;
602
+ var ce = q.exports.SALTBYTES = 16, ue = q.exports.PERSONALBYTES = 16;
603
603
  function T(r, e, t, s, n) {
604
604
  if (!(this instanceof T))
605
605
  return new T(r, e, t, s, n);
606
606
  if (!(y && y.exports))
607
607
  throw new Error("WASM not loaded. Wait for Blake2b.ready(cb)");
608
- r || (r = 32), n !== !0 && (M(r >= se, "digestLength must be at least " + se + ", was given " + r), M(r <= re, "digestLength must be at most " + re + ", was given " + r), e != null && M(e.length >= ne, "key must be at least " + ne + ", was given " + e.length), e != null && M(e.length <= ae, "key must be at least " + ae + ", was given " + e.length), t != null && M(t.length === ie, "salt must be exactly " + ie + ", was given " + t.length), s != null && M(s.length === oe, "personal must be exactly " + oe + ", was given " + s.length)), Bt.length || (Bt.push(Y), Y += 216), this.digestLength = r, this.finalized = !1, this.pointer = Bt.pop(), y.memory.fill(0, 0, 64), y.memory[0] = this.digestLength, y.memory[1] = e ? e.length : 0, y.memory[2] = 1, y.memory[3] = 1, t && y.memory.set(t, 32), s && y.memory.set(s, 48), this.pointer + 216 > y.memory.length && y.realloc(this.pointer + 216), y.exports.blake2b_init(this.pointer, this.digestLength), e && (this.update(e), y.memory.fill(0, Y, Y + e.length), y.memory[this.pointer + 200] = 128);
608
+ r || (r = 32), n !== !0 && (H(r >= ne, "digestLength must be at least " + ne + ", was given " + r), H(r <= ae, "digestLength must be at most " + ae + ", was given " + r), e != null && H(e.length >= ie, "key must be at least " + ie + ", was given " + e.length), e != null && H(e.length <= oe, "key must be at least " + oe + ", was given " + e.length), t != null && H(t.length === ce, "salt must be exactly " + ce + ", was given " + t.length), s != null && H(s.length === ue, "personal must be exactly " + ue + ", was given " + s.length)), Bt.length || (Bt.push(L), L += 216), this.digestLength = r, this.finalized = !1, this.pointer = Bt.pop(), y.memory.fill(0, 0, 64), y.memory[0] = this.digestLength, y.memory[1] = e ? e.length : 0, y.memory[2] = 1, y.memory[3] = 1, t && y.memory.set(t, 32), s && y.memory.set(s, 48), this.pointer + 216 > y.memory.length && y.realloc(this.pointer + 216), y.exports.blake2b_init(this.pointer, this.digestLength), e && (this.update(e), y.memory.fill(0, L, L + e.length), y.memory[this.pointer + 200] = 128);
609
609
  }
610
610
  T.prototype.update = function(r) {
611
- return M(this.finalized === !1, "Hash instance finalized"), M(r, "input must be TypedArray or Buffer"), Y + r.length > y.memory.length && y.realloc(Y + r.length), y.memory.set(r, Y), y.exports.blake2b_update(this.pointer, Y, Y + r.length), this;
611
+ return H(this.finalized === !1, "Hash instance finalized"), H(r, "input must be TypedArray or Buffer"), L + r.length > y.memory.length && y.realloc(L + r.length), y.memory.set(r, L), y.exports.blake2b_update(this.pointer, L, L + r.length), this;
612
612
  };
613
613
  T.prototype.digest = function(r) {
614
- if (M(this.finalized === !1, "Hash instance finalized"), this.finalized = !0, Bt.push(this.pointer), y.exports.blake2b_final(this.pointer), !r || r === "binary")
614
+ if (H(this.finalized === !1, "Hash instance finalized"), this.finalized = !0, Bt.push(this.pointer), y.exports.blake2b_final(this.pointer), !r || r === "binary")
615
615
  return y.memory.slice(this.pointer + 128, this.pointer + 128 + this.digestLength);
616
616
  if (r === "hex")
617
617
  return Ss(y.memory, this.pointer + 128, this.digestLength);
618
- M(r.length >= this.digestLength, "input must be TypedArray or Buffer");
618
+ H(r.length >= this.digestLength, "input must be TypedArray or Buffer");
619
619
  for (var e = 0; e < this.digestLength; e++)
620
620
  r[e] = y.memory[this.pointer + 128 + e];
621
621
  return r;
@@ -644,27 +644,27 @@ function Ss(r, e, t) {
644
644
  function Es(r) {
645
645
  return r < 16 ? "0" + r.toString(16) : r.toString(16);
646
646
  }
647
- var j = Qe, pt = V.exports;
647
+ var j = De, pt = q.exports;
648
648
  function _t(r, e, t) {
649
649
  var s = r[e] + r[t], n = r[e + 1] + r[t + 1];
650
650
  s >= 4294967296 && n++, r[e] = s, r[e + 1] = n;
651
651
  }
652
- function ce(r, e, t, s) {
652
+ function de(r, e, t, s) {
653
653
  var n = r[e] + t;
654
654
  t < 0 && (n += 4294967296);
655
655
  var a = r[e + 1] + s;
656
656
  n >= 4294967296 && a++, r[e] = n, r[e + 1] = a;
657
657
  }
658
- function ve(r, e) {
658
+ function ke(r, e) {
659
659
  return r[e] ^ r[e + 1] << 8 ^ r[e + 2] << 16 ^ r[e + 3] << 24;
660
660
  }
661
661
  function J(r, e, t, s, n, a) {
662
662
  var o = gt[n], c = gt[n + 1], u = gt[a], d = gt[a + 1];
663
- _t(I, r, e), ce(I, r, o, c);
663
+ _t(I, r, e), de(I, r, o, c);
664
664
  var l = I[s] ^ I[r], g = I[s + 1] ^ I[r + 1];
665
- I[s] = g, I[s + 1] = l, _t(I, t, s), l = I[e] ^ I[t], g = I[e + 1] ^ I[t + 1], I[e] = l >>> 24 ^ g << 8, I[e + 1] = g >>> 24 ^ l << 8, _t(I, r, e), ce(I, r, u, d), l = I[s] ^ I[r], g = I[s + 1] ^ I[r + 1], I[s] = l >>> 16 ^ g << 16, I[s + 1] = g >>> 16 ^ l << 16, _t(I, t, s), l = I[e] ^ I[t], g = I[e + 1] ^ I[t + 1], I[e] = g >>> 31 ^ l << 1, I[e + 1] = l >>> 31 ^ g << 1;
665
+ I[s] = g, I[s + 1] = l, _t(I, t, s), l = I[e] ^ I[t], g = I[e + 1] ^ I[t + 1], I[e] = l >>> 24 ^ g << 8, I[e + 1] = g >>> 24 ^ l << 8, _t(I, r, e), de(I, r, u, d), l = I[s] ^ I[r], g = I[s + 1] ^ I[r + 1], I[s] = l >>> 16 ^ g << 16, I[s + 1] = g >>> 16 ^ l << 16, _t(I, t, s), l = I[e] ^ I[t], g = I[e + 1] ^ I[t + 1], I[e] = g >>> 31 ^ l << 1, I[e + 1] = l >>> 31 ^ g << 1;
666
666
  }
667
- var De = new Uint32Array([
667
+ var Te = new Uint32Array([
668
668
  4089235720,
669
669
  1779033703,
670
670
  2227873595,
@@ -877,12 +877,12 @@ var De = new Uint32Array([
877
877
  ], b = new Uint8Array(bs.map(function(r) {
878
878
  return r * 2;
879
879
  })), I = new Uint32Array(32), gt = new Uint32Array(32);
880
- function ke(r, e) {
880
+ function Ue(r, e) {
881
881
  var t = 0;
882
882
  for (t = 0; t < 16; t++)
883
- I[t] = r.h[t], I[t + 16] = De[t];
883
+ I[t] = r.h[t], I[t + 16] = Te[t];
884
884
  for (I[24] = I[24] ^ r.t, I[25] = I[25] ^ r.t / 4294967296, e && (I[28] = ~I[28], I[29] = ~I[29]), t = 0; t < 32; t++)
885
- gt[t] = ve(r.b, 4 * t);
885
+ gt[t] = ke(r.b, 4 * t);
886
886
  for (t = 0; t < 12; t++)
887
887
  J(0, 8, 16, 24, b[t * 16 + 0], b[t * 16 + 1]), J(2, 10, 18, 26, b[t * 16 + 2], b[t * 16 + 3]), J(4, 12, 20, 28, b[t * 16 + 4], b[t * 16 + 5]), J(6, 14, 22, 30, b[t * 16 + 6], b[t * 16 + 7]), J(0, 10, 20, 30, b[t * 16 + 8], b[t * 16 + 9]), J(2, 12, 22, 24, b[t * 16 + 10], b[t * 16 + 11]), J(4, 14, 16, 26, b[t * 16 + 12], b[t * 16 + 13]), J(6, 8, 18, 28, b[t * 16 + 14], b[t * 16 + 15]);
888
888
  for (t = 0; t < 16; t++)
@@ -957,11 +957,11 @@ var W = new Uint8Array([
957
957
  function ct(r, e, t, s) {
958
958
  W.fill(0), this.b = new Uint8Array(128), this.h = new Uint32Array(16), this.t = 0, this.c = 0, this.outlen = r, W[0] = r, e && (W[1] = e.length), W[2] = 1, W[3] = 1, t && W.set(t, 32), s && W.set(s, 48);
959
959
  for (var n = 0; n < 16; n++)
960
- this.h[n] = De[n] ^ ve(W, n * 4);
961
- e && (Te(this, e), this.c = 128);
960
+ this.h[n] = Te[n] ^ ke(W, n * 4);
961
+ e && (Pe(this, e), this.c = 128);
962
962
  }
963
963
  ct.prototype.update = function(r) {
964
- return j(r != null, "input must be Uint8Array or Buffer"), Te(this, r), this;
964
+ return j(r != null, "input must be Uint8Array or Buffer"), Pe(this, r), this;
965
965
  };
966
966
  ct.prototype.digest = function(r) {
967
967
  var e = !r || r === "binary" || r === "hex" ? new Uint8Array(this.outlen) : r;
@@ -973,14 +973,14 @@ ct.ready = function(r) {
973
973
  r();
974
974
  });
975
975
  };
976
- function Te(r, e) {
976
+ function Pe(r, e) {
977
977
  for (var t = 0; t < e.length; t++)
978
- r.c === 128 && (r.t += r.c, ke(r, !1), r.c = 0), r.b[r.c++] = e[t];
978
+ r.c === 128 && (r.t += r.c, Ue(r, !1), r.c = 0), r.b[r.c++] = e[t];
979
979
  }
980
980
  function Qs(r, e) {
981
981
  for (r.t += r.c; r.c < 128; )
982
982
  r.b[r.c++] = 0;
983
- ke(r, !0);
983
+ Ue(r, !0);
984
984
  for (var t = 0; t < r.outlen; t++)
985
985
  e[t] = r.h[t >> 2] >> 8 * (t & 3);
986
986
  return e;
@@ -993,9 +993,9 @@ function vs(r) {
993
993
  function Ds(r) {
994
994
  return r < 16 ? "0" + r.toString(16) : r.toString(16);
995
995
  }
996
- var Ue = ct;
996
+ var Ne = ct;
997
997
  v.exports = function(e, t, s, n, a) {
998
- return a !== !0 && (j(e >= ue, "outlen must be at least " + ue + ", was given " + e), j(e <= de, "outlen must be at most " + de + ", was given " + e), t != null && j(t.length >= he, "key must be at least " + he + ", was given " + t.length), t != null && j(t.length <= le, "key must be at most " + le + ", was given " + t.length), s != null && j(s.length === ge, "salt must be exactly " + ge + ", was given " + s.length), n != null && j(n.length === Ae, "personal must be exactly " + Ae + ", was given " + n.length)), new Ue(e, t, s, n);
998
+ return a !== !0 && (j(e >= he, "outlen must be at least " + he + ", was given " + e), j(e <= le, "outlen must be at most " + le + ", was given " + e), t != null && j(t.length >= ge, "key must be at least " + ge + ", was given " + t.length), t != null && j(t.length <= Ae, "key must be at most " + Ae + ", was given " + t.length), s != null && j(s.length === me, "salt must be exactly " + me + ", was given " + s.length), n != null && j(n.length === Ie, "personal must be exactly " + Ie + ", was given " + n.length)), new Ne(e, t, s, n);
999
999
  };
1000
1000
  v.exports.ready = function(r) {
1001
1001
  pt.ready(function() {
@@ -1004,27 +1004,27 @@ v.exports.ready = function(r) {
1004
1004
  };
1005
1005
  v.exports.WASM_SUPPORTED = pt.SUPPORTED;
1006
1006
  v.exports.WASM_LOADED = !1;
1007
- var ue = v.exports.BYTES_MIN = 16, de = v.exports.BYTES_MAX = 64;
1007
+ var he = v.exports.BYTES_MIN = 16, le = v.exports.BYTES_MAX = 64;
1008
1008
  v.exports.BYTES = 32;
1009
- var he = v.exports.KEYBYTES_MIN = 16, le = v.exports.KEYBYTES_MAX = 64;
1009
+ var ge = v.exports.KEYBYTES_MIN = 16, Ae = v.exports.KEYBYTES_MAX = 64;
1010
1010
  v.exports.KEYBYTES = 32;
1011
- var ge = v.exports.SALTBYTES = 16, Ae = v.exports.PERSONALBYTES = 16;
1011
+ var me = v.exports.SALTBYTES = 16, Ie = v.exports.PERSONALBYTES = 16;
1012
1012
  pt.ready(function(r) {
1013
- r || (v.exports.WASM_LOADED = !0, Ue = pt);
1013
+ r || (v.exports.WASM_LOADED = !0, Ne = pt);
1014
1014
  });
1015
1015
  var ut = {};
1016
1016
  Object.defineProperty(ut, "__esModule", { value: !0 });
1017
1017
  ut.bech32m = ut.bech32 = void 0;
1018
- const Qt = "qpzry9x8gf2tvdw0s3jn54khce6mua7l", Pe = {};
1018
+ const Qt = "qpzry9x8gf2tvdw0s3jn54khce6mua7l", Ke = {};
1019
1019
  for (let r = 0; r < Qt.length; r++) {
1020
1020
  const e = Qt.charAt(r);
1021
- Pe[e] = r;
1021
+ Ke[e] = r;
1022
1022
  }
1023
1023
  function ot(r) {
1024
1024
  const e = r >> 25;
1025
1025
  return (r & 33554431) << 5 ^ -(e >> 0 & 1) & 996825010 ^ -(e >> 1 & 1) & 642813549 ^ -(e >> 2 & 1) & 513874426 ^ -(e >> 3 & 1) & 1027748829 ^ -(e >> 4 & 1) & 705979059;
1026
1026
  }
1027
- function me(r) {
1027
+ function pe(r) {
1028
1028
  let e = 1;
1029
1029
  for (let t = 0; t < r.length; ++t) {
1030
1030
  const s = r.charCodeAt(t);
@@ -1039,7 +1039,7 @@ function me(r) {
1039
1039
  }
1040
1040
  return e;
1041
1041
  }
1042
- function Yt(r, e, t, s) {
1042
+ function Gt(r, e, t, s) {
1043
1043
  let n = 0, a = 0;
1044
1044
  const o = (1 << t) - 1, c = [];
1045
1045
  for (let u = 0; u < r.length; ++u)
@@ -1056,27 +1056,27 @@ function Yt(r, e, t, s) {
1056
1056
  return c;
1057
1057
  }
1058
1058
  function ks(r) {
1059
- return Yt(r, 8, 5, !0);
1059
+ return Gt(r, 8, 5, !0);
1060
1060
  }
1061
1061
  function Ts(r) {
1062
- const e = Yt(r, 5, 8, !1);
1062
+ const e = Gt(r, 5, 8, !1);
1063
1063
  if (Array.isArray(e))
1064
1064
  return e;
1065
1065
  }
1066
1066
  function Us(r) {
1067
- const e = Yt(r, 5, 8, !1);
1067
+ const e = Gt(r, 5, 8, !1);
1068
1068
  if (Array.isArray(e))
1069
1069
  return e;
1070
1070
  throw new Error(e);
1071
1071
  }
1072
- function Ne(r) {
1072
+ function Me(r) {
1073
1073
  let e;
1074
1074
  r === "bech32" ? e = 1 : e = 734539939;
1075
1075
  function t(o, c, u) {
1076
1076
  if (u = u || 90, o.length + 7 + c.length > u)
1077
1077
  throw new TypeError("Exceeds length limit");
1078
1078
  o = o.toLowerCase();
1079
- let d = me(o);
1079
+ let d = pe(o);
1080
1080
  if (typeof d == "string")
1081
1081
  throw new Error(d);
1082
1082
  let l = o + "1";
@@ -1112,12 +1112,12 @@ function Ne(r) {
1112
1112
  const g = o.slice(0, l), A = o.slice(l + 1);
1113
1113
  if (A.length < 6)
1114
1114
  return "Data too short";
1115
- let m = me(g);
1115
+ let m = pe(g);
1116
1116
  if (typeof m == "string")
1117
1117
  return m;
1118
1118
  const p = [];
1119
1119
  for (let S = 0; S < A.length; ++S) {
1120
- const E = A.charAt(S), f = Pe[E];
1120
+ const E = A.charAt(S), f = Ke[E];
1121
1121
  if (f === void 0)
1122
1122
  return "Unknown character " + E;
1123
1123
  m = ot(m) ^ f, !(S + 6 >= A.length) && p.push(f);
@@ -1144,12 +1144,12 @@ function Ne(r) {
1144
1144
  fromWords: Us
1145
1145
  };
1146
1146
  }
1147
- ut.bech32 = Ne("bech32");
1148
- ut.bech32m = Ne("bech32m");
1149
- var Ps = ee && ee.__importDefault || function(r) {
1147
+ ut.bech32 = Me("bech32");
1148
+ ut.bech32m = Me("bech32m");
1149
+ var Ps = re && re.__importDefault || function(r) {
1150
1150
  return r && r.__esModule ? r : { default: r };
1151
1151
  };
1152
- Object.defineProperty(be, "__esModule", { value: !0 });
1152
+ Object.defineProperty(ve, "__esModule", { value: !0 });
1153
1153
  const Ns = Ps(v.exports), yt = ut, Nt = "asset";
1154
1154
  class mt {
1155
1155
  constructor(e) {
@@ -1183,11 +1183,11 @@ class mt {
1183
1183
  return this.fingerprint().slice(-6);
1184
1184
  }
1185
1185
  }
1186
- var Ks = be.default = mt;
1186
+ var Ks = ve.default = mt;
1187
1187
  const Ms = Ks, Hs = (r, e) => {
1188
1188
  const t = Fs(r), s = t.derive(Pt + 1852).derive(Pt + 1815).derive(Pt + e), n = s.derive(0).derive(0).to_raw_key(), a = s.derive(2).derive(0).to_raw_key();
1189
1189
  return s.free(), t.free(), { paymentKey: n, stakeKey: a };
1190
- }, nt = (r) => i.Address.from_bytes(_(r)), Fs = (r) => i.Bip32PrivateKey.from_bytes(_(r)), Os = (r) => i.DataHash.from_bytes(_(r)), F = (r) => i.Ed25519KeyHash.from_bytes(_(r)), Vs = (r) => i.Ed25519Signature.from_bytes(_(r)), Dt = (r) => i.NativeScript.from_bytes(_(r)), qs = (r) => i.PublicKey.from_bytes(_(r)), Ke = (r) => i.PlutusData.from_bytes(_(r)), dt = (r, e) => i.PlutusScript.from_bytes_with_version(_(r), R[e]), Rs = (r) => i.ScriptRef.from_bytes(_(r)), Ys = (r) => i.ScriptHash.from_bytes(_(r)), L = (r) => i.Transaction.from_bytes(_(r)), Me = (r) => i.TransactionHash.from_bytes(_(r)), Ie = (r) => i.TransactionUnspentOutput.from_bytes(_(r)), Ls = (r) => i.TransactionWitnessSet.from_bytes(_(r)), Gs = (r) => i.Value.from_bytes(_(r)), K = (r) => i.Address.from_bech32(r), Lt = (r) => i.BaseAddress.from_address(K(r)), He = (r) => i.EnterpriseAddress.from_address(K(r)), Fe = (r) => i.RewardAddress.from_address(K(r)), D = (r) => Buffer.from(r).toString("hex"), _ = (r) => r.length % 2 === 0 && /^[0-9A-F]*$/i.test(r) ? Buffer.from(r, "hex") : Buffer.from(r, "utf-8"), kt = (r) => {
1190
+ }, nt = (r) => i.Address.from_bytes(_(r)), Fs = (r) => i.Bip32PrivateKey.from_bytes(_(r)), Os = (r) => i.DataHash.from_bytes(_(r)), O = (r) => i.Ed25519KeyHash.from_bytes(_(r)), Vs = (r) => i.Ed25519Signature.from_bytes(_(r)), Dt = (r) => i.NativeScript.from_bytes(_(r)), qs = (r) => i.PublicKey.from_bytes(_(r)), He = (r) => i.PlutusData.from_bytes(_(r)), dt = (r, e) => i.PlutusScript.from_bytes_with_version(_(r), Y[e]), Rs = (r) => i.ScriptRef.from_bytes(_(r)), Ys = (r) => i.ScriptHash.from_bytes(_(r)), K = (r) => i.Transaction.from_bytes(_(r)), Fe = (r) => i.TransactionHash.from_bytes(_(r)), fe = (r) => i.TransactionUnspentOutput.from_bytes(_(r)), Ls = (r) => i.TransactionWitnessSet.from_bytes(_(r)), Gs = (r) => i.Value.from_bytes(_(r)), M = (r) => i.Address.from_bech32(r), $t = (r) => i.BaseAddress.from_address(M(r)), Oe = (r) => i.EnterpriseAddress.from_address(M(r)), Ve = (r) => i.RewardAddress.from_address(M(r)), D = (r) => Buffer.from(r).toString("hex"), _ = (r) => r.length % 2 === 0 && /^[0-9A-F]*$/i.test(r) ? Buffer.from(r, "hex") : Buffer.from(r, "utf-8"), kt = (r) => {
1191
1191
  const e = (t) => {
1192
1192
  const s = new Array();
1193
1193
  for (let n = 0; n < t.len(); n += 1)
@@ -1260,7 +1260,7 @@ const Ms = Ks, Hs = (r, e) => {
1260
1260
  case "before":
1261
1261
  return i.NativeScript.new_timelock_expiry(i.TimelockExpiry.new_timelockexpiry(i.BigNum.from_str(r.slot)));
1262
1262
  case "sig":
1263
- return i.NativeScript.new_script_pubkey(i.ScriptPubkey.new(F(r.keyHash)));
1263
+ return i.NativeScript.new_script_pubkey(i.ScriptPubkey.new(O(r.keyHash)));
1264
1264
  }
1265
1265
  }, St = (r) => {
1266
1266
  var s, n, a;
@@ -1323,7 +1323,7 @@ const Ms = Ks, Hs = (r, e) => {
1323
1323
  throw r.relays.forEach((t) => {
1324
1324
  e.add(zs(t));
1325
1325
  }), new Error("toPoolParams not implemented.");
1326
- }, Oe = (r) => {
1326
+ }, Ht = (r) => {
1327
1327
  const e = (t) => ss[t];
1328
1328
  return i.Redeemer.new(e(r.tag), i.BigNum.from_str(r.index.toString()), tt(r.data), i.ExUnits.new(i.BigNum.from_str(r.budget.mem.toString()), i.BigNum.from_str(r.budget.steps.toString())));
1329
1329
  }, zs = (r) => {
@@ -1337,12 +1337,12 @@ const Ms = Ks, Hs = (r, e) => {
1337
1337
  case "MultiHostName":
1338
1338
  return i.Relay.new_multi_host_name(i.MultiHostName.new(i.DNSRecordSRV.new(r.domainName)));
1339
1339
  }
1340
- }, Ve = (r) => {
1340
+ }, qe = (r) => {
1341
1341
  if (r.is_plutus_script()) {
1342
1342
  const t = r.plutus_script();
1343
1343
  return {
1344
1344
  code: t.to_hex(),
1345
- version: Object.keys(R).find((s) => R[s].to_hex() === t.language_version().to_hex())
1345
+ version: Object.keys(Y).find((s) => Y[s].to_hex() === t.language_version().to_hex())
1346
1346
  };
1347
1347
  }
1348
1348
  const e = r.native_script();
@@ -1363,19 +1363,19 @@ const Ms = Ks, Hs = (r, e) => {
1363
1363
  },
1364
1364
  output: {
1365
1365
  address: r.output().address().to_bech32(),
1366
- amount: qe(r.output().amount()),
1366
+ amount: Re(r.output().amount()),
1367
1367
  dataHash: e,
1368
1368
  plutusData: t,
1369
1369
  scriptRef: s
1370
1370
  }
1371
1371
  };
1372
- }, H = (r) => {
1373
- const e = i.TransactionInput.new(Me(r.input.txHash), r.input.outputIndex), t = i.TransactionOutput.new(K(r.output.address), Z(r.output.amount));
1374
- return r.output.dataHash !== void 0 && t.set_data_hash(Os(r.output.dataHash)), r.output.plutusData !== void 0 && t.set_plutus_data(Ke(r.output.plutusData)), r.output.scriptRef !== void 0 && t.set_script_ref(Rs(r.output.scriptRef)), i.TransactionUnspentOutput.new(e, t);
1375
- }, pe = (r) => {
1372
+ }, F = (r) => {
1373
+ const e = i.TransactionInput.new(Fe(r.input.txHash), r.input.outputIndex), t = i.TransactionOutput.new(M(r.output.address), Z(r.output.amount));
1374
+ return r.output.dataHash !== void 0 && t.set_data_hash(Os(r.output.dataHash)), r.output.plutusData !== void 0 && t.set_plutus_data(He(r.output.plutusData)), r.output.scriptRef !== void 0 && t.set_script_ref(Rs(r.output.scriptRef)), i.TransactionUnspentOutput.new(e, t);
1375
+ }, _e = (r) => {
1376
1376
  const e = r.split(".")[1] ?? "0", t = `${parseInt(e, 10)}`, s = "1" + "0".repeat(e.length);
1377
1377
  return i.UnitInterval.new(i.BigNum.from_str(t), i.BigNum.from_str(s));
1378
- }, Q = (r) => r.length % 2 === 0 && /^[0-9A-F]*$/i.test(r) ? r : D(Buffer.from(r, "utf-8")), Gt = (r) => Buffer.from(r, "hex").toString("utf-8"), qe = (r) => {
1378
+ }, Q = (r) => r.length % 2 === 0 && /^[0-9A-F]*$/i.test(r) ? r : D(Buffer.from(r, "utf-8")), zt = (r) => Buffer.from(r, "hex").toString("utf-8"), Re = (r) => {
1379
1379
  const e = [
1380
1380
  { unit: "lovelace", quantity: r.coin().to_str() }
1381
1381
  ], t = r.multiasset();
@@ -1394,30 +1394,30 @@ const Ms = Ks, Hs = (r, e) => {
1394
1394
  }
1395
1395
  return e;
1396
1396
  }, Z = (r) => {
1397
- const e = r.find((a) => a.unit === "lovelace"), t = Array.from(new Set(r.filter((a) => a.unit !== "lovelace").map((a) => a.unit.slice(0, O)))), s = i.MultiAsset.new();
1397
+ const e = r.find((a) => a.unit === "lovelace"), t = Array.from(new Set(r.filter((a) => a.unit !== "lovelace").map((a) => a.unit.slice(0, V)))), s = i.MultiAsset.new();
1398
1398
  t.forEach((a) => {
1399
1399
  const o = i.Assets.new();
1400
- r.filter((c) => c.unit.slice(0, O) === a).forEach((c) => {
1401
- o.insert(i.AssetName.new(_(c.unit.slice(O))), i.BigNum.from_str(c.quantity));
1400
+ r.filter((c) => c.unit.slice(0, V) === a).forEach((c) => {
1401
+ o.insert(i.AssetName.new(_(c.unit.slice(V))), i.BigNum.from_str(c.quantity));
1402
1402
  }), s.insert(Ys(a), o);
1403
1403
  });
1404
1404
  const n = i.Value.new(i.BigNum.from_str(e ? e.quantity : "0"));
1405
1405
  return (r.length > 1 || !e) && n.set_multiasset(s), n;
1406
- }, fe = (r, e, t) => i.BaseAddress.new(r, i.StakeCredential.from_keyhash(e), i.StakeCredential.from_keyhash(t)), Re = (r, e = "") => i.Bip32PrivateKey.from_bip39_entropy(_(r), _(Q(e))), Ht = (r) => i.DataCost.new_coins_per_byte(i.BigNum.from_str(r)), Js = (r) => {
1406
+ }, ye = (r, e, t) => i.BaseAddress.new(r, i.StakeCredential.from_keyhash(e), i.StakeCredential.from_keyhash(t)), Ye = (r, e = "") => i.Bip32PrivateKey.from_bip39_entropy(_(r), _(Q(e))), Ft = (r) => i.DataCost.new_coins_per_byte(i.BigNum.from_str(r)), Js = (r) => {
1407
1407
  if (typeof r != "object" || !("input" in r))
1408
1408
  return i.DatumSource.new(tt(r));
1409
- const e = H(r);
1409
+ const e = F(r);
1410
1410
  if (e.output().has_plutus_data())
1411
1411
  return i.DatumSource.new_ref_input(e.input());
1412
1412
  throw new Error(`No inline datum found in UTxO: ${e.input().transaction_id().to_hex()}`);
1413
- }, _e = (r, e) => i.EnterpriseAddress.new(r, i.StakeCredential.from_keyhash(e)), ye = (r, e) => {
1413
+ }, xe = (r, e) => i.EnterpriseAddress.new(r, i.StakeCredential.from_keyhash(e)), Ce = (r, e) => {
1414
1414
  if (typeof r == "string")
1415
1415
  return i.MintWitness.new_native_script(Dt(r));
1416
1416
  if (e === void 0)
1417
1417
  throw new Error("Minting with plutus requires a redeemer to be defined");
1418
1418
  if (e.tag !== "MINT")
1419
1419
  throw new Error("Minting redeemer's tag must be defined as 'MINT'");
1420
- return i.MintWitness.new_plutus_script(Ye(r), Oe({
1420
+ return i.MintWitness.new_plutus_script(Vt(r), Ht({
1421
1421
  tag: "MINT",
1422
1422
  index: 0,
1423
1423
  budget: at,
@@ -1427,15 +1427,15 @@ const Ms = Ks, Hs = (r, e) => {
1427
1427
  },
1428
1428
  ...e
1429
1429
  }));
1430
- }, Ft = (r, e) => i.RewardAddress.new(r, i.StakeCredential.from_keyhash(e)), Ye = (r) => {
1430
+ }, Ot = (r, e) => i.RewardAddress.new(r, i.StakeCredential.from_keyhash(e)), Vt = (r) => {
1431
1431
  if ("code" in r)
1432
1432
  return i.PlutusScriptSource.new(dt(r.code, r.version));
1433
- const e = H(r);
1433
+ const e = F(r);
1434
1434
  if (e.output().has_script_ref()) {
1435
1435
  const t = e.output().script_ref();
1436
1436
  if (t.is_plutus_script()) {
1437
- const s = Ve(t), n = dt(s.code, s.version).hash();
1438
- return i.PlutusScriptSource.new_ref_input_with_lang_ver(n, e.input(), R[s.version]);
1437
+ const s = qe(t), n = dt(s.code, s.version).hash();
1438
+ return i.PlutusScriptSource.new_ref_input_with_lang_ver(n, e.input(), Y[s.version]);
1439
1439
  }
1440
1440
  }
1441
1441
  throw new Error(`No plutus script reference found in UTxO: ${e.input().transaction_id().to_hex()}`);
@@ -1443,17 +1443,17 @@ const Ms = Ks, Hs = (r, e) => {
1443
1443
  const e = i.ScriptPubkey.new(r);
1444
1444
  return i.NativeScript.new_script_pubkey(e);
1445
1445
  }, Et = (r = k) => {
1446
- const e = i.TransactionBuilderConfigBuilder.new().coins_per_utxo_byte(i.BigNum.from_str(r.coinsPerUTxOSize)).ex_unit_prices(i.ExUnitPrices.new(pe(r.priceMem.toString()), pe(r.priceStep.toString()))).fee_algo(i.LinearFee.new(i.BigNum.from_str(r.minFeeA.toString()), i.BigNum.from_str(r.minFeeB.toString()))).key_deposit(i.BigNum.from_str(r.keyDeposit)).max_tx_size(r.maxTxSize).max_value_size(parseInt(r.maxValSize, 10)).pool_deposit(i.BigNum.from_str(r.poolDeposit)).build();
1446
+ const e = i.TransactionBuilderConfigBuilder.new().coins_per_utxo_byte(i.BigNum.from_str(r.coinsPerUTxOSize)).ex_unit_prices(i.ExUnitPrices.new(_e(r.priceMem.toString()), _e(r.priceStep.toString()))).fee_algo(i.LinearFee.new(i.BigNum.from_str(r.minFeeA.toString()), i.BigNum.from_str(r.minFeeB.toString()))).key_deposit(i.BigNum.from_str(r.keyDeposit)).max_tx_size(r.maxTxSize).max_value_size(parseInt(r.maxValSize, 10)).pool_deposit(i.BigNum.from_str(r.poolDeposit)).build();
1447
1447
  return i.TransactionBuilder.new(e);
1448
- }, xe = (r) => {
1448
+ }, we = (r) => {
1449
1449
  const e = i.TxInputsBuilder.new();
1450
- return r.map((t) => t instanceof i.TransactionUnspentOutput ? t : H(t)).forEach((t) => {
1450
+ return r.map((t) => t instanceof i.TransactionUnspentOutput ? t : F(t)).forEach((t) => {
1451
1451
  e.add_input(t.output().address(), t.input(), t.output().amount());
1452
1452
  }), e;
1453
1453
  }, Ct = (r) => {
1454
1454
  if (typeof r == "string")
1455
- return i.TransactionOutputBuilder.new().with_address(K(r));
1456
- let e = i.TransactionOutputBuilder.new().with_address(K(r.address));
1455
+ return i.TransactionOutputBuilder.new().with_address(M(r));
1456
+ let e = i.TransactionOutputBuilder.new().with_address(M(r.address));
1457
1457
  if (r.datum) {
1458
1458
  const { value: t, inline: s } = r.datum, n = tt(t);
1459
1459
  e = e.with_data_hash(i.hash_plutus_data(n)), s && (e = e.with_plutus_data(n));
@@ -1464,7 +1464,7 @@ const Ms = Ks, Hs = (r, e) => {
1464
1464
  }
1465
1465
  return e;
1466
1466
  }, et = (r) => {
1467
- const e = r.slice(0, O), t = r.includes(".") ? Q(r.split(".")[1]) : r.slice(O);
1467
+ const e = r.slice(0, V), t = r.includes(".") ? Q(r.split(".")[1]) : r.slice(V);
1468
1468
  return { policyId: e, assetName: t };
1469
1469
  }, h = (r) => G.isAxiosError(r) ? r.response ? JSON.stringify({
1470
1470
  data: r.response.data,
@@ -1483,8 +1483,8 @@ const Ms = Ks, Hs = (r, e) => {
1483
1483
  var e, t;
1484
1484
  try {
1485
1485
  const s = [
1486
- (e = Lt(r)) == null ? void 0 : e.payment_cred().to_keyhash(),
1487
- (t = He(r)) == null ? void 0 : t.payment_cred().to_keyhash()
1486
+ (e = $t(r)) == null ? void 0 : e.payment_cred().to_keyhash(),
1487
+ (t = Oe(r)) == null ? void 0 : t.payment_cred().to_keyhash()
1488
1488
  ].find((n) => n !== void 0);
1489
1489
  if (s !== void 0)
1490
1490
  return s.to_hex();
@@ -1497,7 +1497,7 @@ const Ms = Ks, Hs = (r, e) => {
1497
1497
  return i.EnterpriseAddress.new(e, i.StakeCredential.from_scripthash(t.hash())).to_address().to_bech32();
1498
1498
  }, Ir = (r) => {
1499
1499
  try {
1500
- const e = He(r), t = e == null ? void 0 : e.payment_cred().to_scripthash();
1500
+ const e = Oe(r), t = e == null ? void 0 : e.payment_cred().to_scripthash();
1501
1501
  if (t !== void 0)
1502
1502
  return t.to_hex();
1503
1503
  throw new Error(`Couldn't resolve script hash from address: ${r}`);
@@ -1505,7 +1505,7 @@ const Ms = Ks, Hs = (r, e) => {
1505
1505
  throw new Error(`An error occurred during resolveScriptHash: ${e}.`);
1506
1506
  }
1507
1507
  }, pr = (r) => i.Ed25519KeyHash.from_hex(r).to_bech32("pool1"), fr = (r) => {
1508
- const e = we(r.join(" ")), t = Re(e), s = t.to_bech32();
1508
+ const e = Se(r.join(" ")), t = Ye(e), s = t.to_bech32();
1509
1509
  return t.free(), s;
1510
1510
  }, _r = (r) => ht(r).to_hex(), yr = (r, e = Date.now()) => {
1511
1511
  if (bt[r]) {
@@ -1515,9 +1515,9 @@ const Ms = Ks, Hs = (r, e) => {
1515
1515
  throw new Error(`Couldn't resolve SlotNo for network: ${r}`);
1516
1516
  }, Ut = (r) => {
1517
1517
  try {
1518
- const e = K(r), t = Lt(r), s = t == null ? void 0 : t.stake_cred().to_keyhash();
1518
+ const e = M(r), t = $t(r), s = t == null ? void 0 : t.stake_cred().to_keyhash();
1519
1519
  if (s !== void 0)
1520
- return Ft(e.network_id(), s).to_address().to_bech32();
1520
+ return Ot(e.network_id(), s).to_address().to_bech32();
1521
1521
  throw new Error(`Couldn't resolve reward address from address: ${r}`);
1522
1522
  } catch (e) {
1523
1523
  throw new Error(`An error occurred during resolveRewardAddress: ${e}.`);
@@ -1526,8 +1526,8 @@ const Ms = Ks, Hs = (r, e) => {
1526
1526
  var e, t;
1527
1527
  try {
1528
1528
  const s = [
1529
- (e = Lt(r)) == null ? void 0 : e.stake_cred().to_keyhash(),
1530
- (t = Fe(r)) == null ? void 0 : t.payment_cred().to_keyhash()
1529
+ (e = $t(r)) == null ? void 0 : e.stake_cred().to_keyhash(),
1530
+ (t = Ve(r)) == null ? void 0 : t.payment_cred().to_keyhash()
1531
1531
  ].find((n) => n !== void 0);
1532
1532
  if (s !== void 0)
1533
1533
  return s.to_hex();
@@ -1536,12 +1536,12 @@ const Ms = Ks, Hs = (r, e) => {
1536
1536
  throw new Error(`An error occurred during resolveStakeKeyHash: ${s}.`);
1537
1537
  }
1538
1538
  }, Le = (r, e = k.minFeeA, t = k.minFeeB) => (BigInt(e) * BigInt(r) + BigInt(t)).toString(), js = (r) => {
1539
- const e = L(r).body();
1539
+ const e = K(r).body();
1540
1540
  return i.hash_transaction(e).to_hex();
1541
1541
  }, xr = (r = "", e = 32) => {
1542
1542
  if (e <= 0 || e > 2048)
1543
1543
  throw new Error("Length must be bewteen 1 and 2048");
1544
- const s = Ce("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789")(e);
1544
+ const s = Be("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789")(e);
1545
1545
  return Q(`${r}${s}`);
1546
1546
  }, Ge = (r, e) => {
1547
1547
  const t = r.vkeys();
@@ -1557,7 +1557,7 @@ const Ms = Ks, Hs = (r, e) => {
1557
1557
  }), n;
1558
1558
  }
1559
1559
  return e;
1560
- }, Cr = (r) => St(Ke(r)), wr = (r) => L(r).to_js_value();
1560
+ }, Cr = (r) => St(He(r)), wr = (r) => K(r).to_js_value();
1561
1561
  class Br {
1562
1562
  _axiosInstance;
1563
1563
  constructor(...e) {
@@ -1700,7 +1700,7 @@ class Br {
1700
1700
  }
1701
1701
  async fetchHandleAddress(e) {
1702
1702
  try {
1703
- const t = Q(e.replace("$", "")), { data: s, status: n } = await this._axiosInstance.get(`assets/${Vt[1]}${t}/addresses`);
1703
+ const t = Q(e.replace("$", "")), { data: s, status: n } = await this._axiosInstance.get(`assets/${Rt[1]}${t}/addresses`);
1704
1704
  if (n === 200)
1705
1705
  return s[0].address;
1706
1706
  throw h(s);
@@ -1895,7 +1895,7 @@ class Er {
1895
1895
  const { policyId: t, assetName: s } = et(e), { data: n, status: a } = await this._axiosInstance.get(`asset_info?_asset_policy=${t}&_asset_name=${s}`);
1896
1896
  if (a === 200)
1897
1897
  return {
1898
- ...n[0].minting_tx_metadata[721][t][Gt(s)]
1898
+ ...n[0].minting_tx_metadata[721][t][zt(s)]
1899
1899
  };
1900
1900
  throw h(n);
1901
1901
  } catch (t) {
@@ -1948,7 +1948,7 @@ class Er {
1948
1948
  }
1949
1949
  async fetchHandleAddress(e) {
1950
1950
  try {
1951
- const t = Q(e.replace("$", "")), { data: s, status: n } = await this._axiosInstance.get(`asset_address_list?_asset_policy=${Vt[1]}&_asset_name=${t}`);
1951
+ const t = Q(e.replace("$", "")), { data: s, status: n } = await this._axiosInstance.get(`asset_address_list?_asset_policy=${Rt[1]}&_asset_name=${t}`);
1952
1952
  if (n === 200)
1953
1953
  return s[0].payment_address;
1954
1954
  throw h(s);
@@ -2265,7 +2265,7 @@ class Qr {
2265
2265
  const { policyId: s, assetName: n } = et(e), { data: a, status: o } = await this._axiosInstance.get(`assets/${s}${n}`);
2266
2266
  if (o === 200)
2267
2267
  return {
2268
- ...(t = a.metadata.find((c) => c.label === 721)) == null ? void 0 : t.json[s][Gt(n)]
2268
+ ...(t = a.metadata.find((c) => c.label === 721)) == null ? void 0 : t.json[s][zt(n)]
2269
2269
  };
2270
2270
  throw h(a);
2271
2271
  } catch (s) {
@@ -2316,7 +2316,7 @@ class Qr {
2316
2316
  }
2317
2317
  async fetchHandleAddress(e) {
2318
2318
  try {
2319
- const t = Q(e.replace("$", "")), { data: s, status: n } = await this._axiosInstance.get(`assets/${Vt[1]}${t}/addresses`);
2319
+ const t = Q(e.replace("$", "")), { data: s, status: n } = await this._axiosInstance.get(`assets/${Rt[1]}${t}/addresses`);
2320
2320
  if (n === 200)
2321
2321
  return s.data[0].address;
2322
2322
  throw h(s);
@@ -2700,13 +2700,13 @@ class vr {
2700
2700
  }
2701
2701
  class Dr {
2702
2702
  static withOneSignature(e) {
2703
- const t = F(it(e));
2703
+ const t = O(it(e));
2704
2704
  return xt(t).to_hex();
2705
2705
  }
2706
2706
  static withAtLeastNSignatures(e, t) {
2707
2707
  const s = i.NativeScripts.new();
2708
2708
  e.forEach((a) => {
2709
- const o = F(it(a));
2709
+ const o = O(it(a));
2710
2710
  s.add(xt(o));
2711
2711
  });
2712
2712
  const n = i.ScriptNOfK.new(t, s);
@@ -2715,7 +2715,7 @@ class Dr {
2715
2715
  static withAnySignature(e) {
2716
2716
  const t = i.NativeScripts.new();
2717
2717
  e.forEach((n) => {
2718
- const a = F(it(n));
2718
+ const a = O(it(n));
2719
2719
  t.add(xt(a));
2720
2720
  });
2721
2721
  const s = i.ScriptAny.new(t);
@@ -2724,7 +2724,7 @@ class Dr {
2724
2724
  static withAllSignatures(e) {
2725
2725
  const t = i.NativeScripts.new();
2726
2726
  e.forEach((n) => {
2727
- const a = F(it(n));
2727
+ const a = O(it(n));
2728
2728
  t.add(xt(a));
2729
2729
  });
2730
2730
  const s = i.ScriptAll.new(t);
@@ -2769,9 +2769,20 @@ let z = class {
2769
2769
  constructor(e = {}) {
2770
2770
  this._era = e.era, this._initiator = e.initiator, this._mintBuilder = i.MintBuilder.new(), this._protocolParameters = e.parameters ?? k, this._txBuilder = Et(e.parameters), this._txCertificates = i.Certificates.new(), this._txInputsBuilder = i.TxInputsBuilder.new(), this._txWithdrawals = i.Withdrawals.new();
2771
2771
  }
2772
+ static attachMetadata(e, t, s = "BABBAGE") {
2773
+ var o;
2774
+ const n = K(e), a = n.auxiliary_data() ?? i.AuxiliaryData.new();
2775
+ if (a.set_metadata(i.GeneralTransactionMetadata.from_hex(t)), a.set_prefer_alonzo_format(s === "ALONZO"), i.hash_auxiliary_data(a).to_hex() !== ((o = n.body().auxiliary_data_hash()) == null ? void 0 : o.to_hex()))
2776
+ throw new Error("[Transaction] attachMetadata: The metadata hash does not match the auxiliary data hash.");
2777
+ return i.Transaction.new(n.body(), n.witness_set(), a).to_hex();
2778
+ }
2779
+ static deattachMetadata(e) {
2780
+ const t = K(e);
2781
+ return i.Transaction.new(t.body(), t.witness_set(), void 0).to_hex();
2782
+ }
2772
2783
  static maskMetadata(e, t = "BABBAGE") {
2773
2784
  var a;
2774
- const s = L(e), n = (a = s.auxiliary_data()) == null ? void 0 : a.metadata();
2785
+ const s = K(e), n = (a = s.auxiliary_data()) == null ? void 0 : a.metadata();
2775
2786
  if (n !== void 0) {
2776
2787
  const o = i.GeneralTransactionMetadata.new();
2777
2788
  for (let u = 0; u < n.len(); u += 1) {
@@ -2785,10 +2796,10 @@ let z = class {
2785
2796
  }
2786
2797
  static readMetadata(e) {
2787
2798
  var s, n;
2788
- return ((n = (s = L(e).auxiliary_data()) == null ? void 0 : s.metadata()) == null ? void 0 : n.to_hex()) ?? "";
2799
+ return ((n = (s = K(e).auxiliary_data()) == null ? void 0 : s.metadata()) == null ? void 0 : n.to_hex()) ?? "";
2789
2800
  }
2790
2801
  static writeMetadata(e, t, s = "BABBAGE") {
2791
- const n = L(e), a = n.auxiliary_data() ?? i.AuxiliaryData.new();
2802
+ const n = K(e), a = n.auxiliary_data() ?? i.AuxiliaryData.new();
2792
2803
  return a.set_metadata(i.GeneralTransactionMetadata.from_hex(t)), a.set_prefer_alonzo_format(s === "ALONZO"), i.Transaction.new(n.body(), n.witness_set(), a).to_hex();
2793
2804
  }
2794
2805
  get size() {
@@ -2803,14 +2814,14 @@ let z = class {
2803
2814
  }
2804
2815
  burnAsset(e, t, s) {
2805
2816
  const n = this._totalBurns.has(t.unit) ? i.BigNum.from_str(this._totalBurns.get(t.unit) ?? "0").checked_add(i.BigNum.from_str(t.quantity)).to_str() : t.quantity;
2806
- return this._mintBuilder.add_asset(ye(e, s), i.AssetName.new(_(t.unit.slice(O))), i.Int.new_negative(i.BigNum.from_str(t.quantity))), this._totalBurns.set(t.unit, n), this;
2817
+ return this._mintBuilder.add_asset(Ce(e, s), i.AssetName.new(_(t.unit.slice(V))), i.Int.new_negative(i.BigNum.from_str(t.quantity))), this._totalBurns.set(t.unit, n), this;
2807
2818
  }
2808
2819
  delegateStake(e, t) {
2809
- const s = i.Certificate.new_stake_delegation(i.StakeDelegation.new(i.StakeCredential.from_keyhash(F(At(e))), i.Ed25519KeyHash.from_bech32(t)));
2820
+ const s = i.Certificate.new_stake_delegation(i.StakeDelegation.new(i.StakeCredential.from_keyhash(O(At(e))), i.Ed25519KeyHash.from_bech32(t)));
2810
2821
  return this._txCertificates.add(s), this;
2811
2822
  }
2812
2823
  deregisterStake(e) {
2813
- const t = i.Certificate.new_stake_deregistration(i.StakeDeregistration.new(i.StakeCredential.from_keyhash(F(At(e)))));
2824
+ const t = i.Certificate.new_stake_deregistration(i.StakeDeregistration.new(i.StakeCredential.from_keyhash(O(At(e)))));
2814
2825
  return this._txCertificates.add(t), this;
2815
2826
  }
2816
2827
  mintAsset(e, t, s) {
@@ -2824,17 +2835,17 @@ let z = class {
2824
2835
  }, a = (g) => {
2825
2836
  if ("code" in g)
2826
2837
  return dt(g.code, g.version);
2827
- const A = H(g);
2838
+ const A = F(g);
2828
2839
  if (A.output().has_script_ref()) {
2829
2840
  const m = A.output().script_ref();
2830
2841
  if (m.is_plutus_script()) {
2831
- const p = Ve(m);
2842
+ const p = qe(m);
2832
2843
  return dt(p.code, p.version);
2833
2844
  }
2834
2845
  }
2835
- throw new Error(`No plutus script reference found in UTxO: ${A.input().transaction_id().to_hex()}`);
2846
+ throw new Error(`[Transaction] No plutus script reference found in UTxO: ${A.input().transaction_id().to_hex()}`);
2836
2847
  }, o = n(e, t), u = i.BigNum.from_str(((d = this._totalMints.get(o.unit)) == null ? void 0 : d.assetQuantity) ?? "0").checked_add(i.BigNum.from_str(o.quantity));
2837
- return this._mintBuilder.add_asset(ye(e, s), i.AssetName.new(_(Q(t.assetName))), i.Int.new(i.BigNum.from_str(o.quantity))), this._recipients.has(t.recipient) ? (l = this._recipients.get(t.recipient)) == null || l.push(o) : this._recipients.set(t.recipient, [o]), this._totalMints.set(o.unit, {
2848
+ return this._mintBuilder.add_asset(Ce(e, s), i.AssetName.new(_(Q(t.assetName))), i.Int.new(i.BigNum.from_str(o.quantity))), this._recipients.has(t.recipient) ? (l = this._recipients.get(t.recipient)) == null || l.push(o) : this._recipients.set(t.recipient, [o]), this._totalMints.set(o.unit, {
2838
2849
  ...t,
2839
2850
  assetQuantity: u.to_str()
2840
2851
  }), this;
@@ -2849,11 +2860,11 @@ let z = class {
2849
2860
  fields: []
2850
2861
  },
2851
2862
  ...e.redeemer
2852
- }, s = H(e.value), n = i.PlutusWitness.new_with_ref(Ye(e.script), Js(e.datum), Oe(t));
2863
+ }, s = F(e.value), n = e.datum ? i.PlutusWitness.new_with_ref(Vt(e.script), Js(e.datum), Ht(t)) : i.PlutusWitness.new_with_ref_without_datum(Vt(e.script), Ht(t));
2853
2864
  return this._txInputsBuilder.add_plutus_script_input(n, s.input(), s.output().amount()), this;
2854
2865
  }
2855
2866
  registerStake(e) {
2856
- const t = i.Certificate.new_stake_registration(i.StakeRegistration.new(i.StakeCredential.from_keyhash(F(At(e)))));
2867
+ const t = i.Certificate.new_stake_registration(i.StakeRegistration.new(i.StakeCredential.from_keyhash(O(At(e)))));
2857
2868
  return this._txCertificates.add(t), this;
2858
2869
  }
2859
2870
  registerPool(e) {
@@ -2868,7 +2879,7 @@ let z = class {
2868
2879
  const s = Z(t), n = s.multiasset();
2869
2880
  if (s.is_zero() || n === void 0)
2870
2881
  return this;
2871
- const a = Ct(e).next(), o = s.coin().is_zero() ? a.with_asset_and_min_required_coin_by_utxo_cost(n, Ht(this._protocolParameters.coinsPerUTxOSize)).build() : a.with_coin_and_asset(s.coin(), n).build();
2882
+ const a = Ct(e).next(), o = s.coin().is_zero() ? a.with_asset_and_min_required_coin_by_utxo_cost(n, Ft(this._protocolParameters.coinsPerUTxOSize)).build() : a.with_coin_and_asset(s.coin(), n).build();
2872
2883
  return t.forEach((c) => {
2873
2884
  this.setTxOutput(c);
2874
2885
  }), this._txBuilder.add_output(o), this;
@@ -2893,17 +2904,17 @@ let z = class {
2893
2904
  }), this._txBuilder.add_output(a), this;
2894
2905
  }
2895
2906
  setChangeAddress(e) {
2896
- return this._changeAddress = K(e), this;
2907
+ return this._changeAddress = M(e), this;
2897
2908
  }
2898
2909
  setCollateral(e) {
2899
- const t = xe(e);
2910
+ const t = we(e);
2900
2911
  return this._txBuilder.set_collateral(t), this;
2901
2912
  }
2902
2913
  setMetadata(e, t) {
2903
2914
  return this._txBuilder.add_json_metadatum_with_schema(i.BigNum.from_str(e.toString()), JSON.stringify(t), i.MetadataJsonSchema.NoConversions), this;
2904
2915
  }
2905
2916
  setRequiredSigners(e) {
2906
- return Array.from(new Set(e.map((s) => s.startsWith("addr") ? it(s) : At(s)).map((s) => F(s)))).forEach((s) => {
2917
+ return Array.from(new Set(e.map((s) => s.startsWith("addr") ? it(s) : At(s)).map((s) => O(s)))).forEach((s) => {
2907
2918
  this._txBuilder.add_required_signer(s);
2908
2919
  }), this;
2909
2920
  }
@@ -2914,23 +2925,23 @@ let z = class {
2914
2925
  return this._txBuilder.set_ttl_bignum(i.BigNum.from_str(e)), this;
2915
2926
  }
2916
2927
  setTxInputs(e) {
2917
- return e.map((t) => H(t)).forEach((t) => {
2928
+ return e.map((t) => F(t)).forEach((t) => {
2918
2929
  this._txInputsBuilder.add_input(t.output().address(), t.input(), t.output().amount());
2919
2930
  }), this;
2920
2931
  }
2921
2932
  setTxRefInputs(e) {
2922
- return e.map((t) => H(t)).forEach((t) => {
2933
+ return e.map((t) => F(t)).forEach((t) => {
2923
2934
  this._txBuilder.add_reference_input(t.input());
2924
2935
  }), this;
2925
2936
  }
2926
2937
  withdrawRewards(e, t) {
2927
- const s = Fe(e);
2938
+ const s = Ve(e);
2928
2939
  return s !== void 0 && this._txWithdrawals.insert(s, i.BigNum.from_str(t)), this;
2929
2940
  }
2930
2941
  async addBurnInputsIfNeeded() {
2931
2942
  if (this._initiator && this._totalBurns.size > 0 && this.notVisited("setTxInputs")) {
2932
2943
  const e = await this._initiator.getUsedUTxOs();
2933
- os(this._totalBurns, e.map((s) => vt(s))).map((s) => H(s)).forEach((s) => {
2944
+ os(this._totalBurns, e.map((s) => vt(s))).map((s) => F(s)).forEach((s) => {
2934
2945
  this._txInputsBuilder.add_input(s.output().address(), s.input(), s.output().amount());
2935
2946
  });
2936
2947
  }
@@ -2945,30 +2956,30 @@ let z = class {
2945
2956
  async addCollateralIfNeeded() {
2946
2957
  if (this._initiator && this.notVisited("setCollateral")) {
2947
2958
  const e = await this._initiator.getUsedCollateral();
2948
- this._txBuilder.set_collateral(xe(e));
2959
+ this._txBuilder.set_collateral(we(e));
2949
2960
  }
2950
2961
  }
2951
2962
  async addRequiredSignersIfNeeded() {
2952
2963
  if (this._initiator && this.notVisited("setRequiredSigners")) {
2953
2964
  const e = await this._initiator.getUsedAddress(), t = it(e.to_bech32());
2954
- this._txBuilder.add_required_signer(F(t));
2965
+ this._txBuilder.add_required_signer(O(t));
2955
2966
  }
2956
2967
  }
2957
2968
  async addTxInputsAsNeeded() {
2958
2969
  if (this.notVisited("setTxInputs")) {
2959
2970
  const e = await this.filterAvailableUTxOs();
2960
- is(this._txOutputs, e.map((s) => vt(s))).map((s) => H(s)).forEach((s) => {
2971
+ is(this._txOutputs, e.map((s) => vt(s))).map((s) => F(s)).forEach((s) => {
2961
2972
  this._txInputsBuilder.add_input(s.output().address(), s.input(), s.output().amount());
2962
2973
  });
2963
2974
  }
2964
2975
  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) {
2965
- const e = this._era !== void 0 ? Zt[this._era] : Zt.BABBAGE;
2976
+ const e = this._era !== void 0 ? ee[this._era] : ee.BABBAGE;
2966
2977
  this._txBuilder.calc_script_data_hash(e);
2967
2978
  }
2968
2979
  }
2969
2980
  async forgeAssetsIfNeeded() {
2970
2981
  const e = (t, s) => {
2971
- const n = t.data.assetName, a = t.data.metadata, o = t.unit.slice(0, O);
2982
+ const n = t.data.assetName, a = t.data.metadata, o = t.unit.slice(0, V);
2972
2983
  if (t.data.label === "777")
2973
2984
  return a;
2974
2985
  if (s && s[o]) {
@@ -3006,7 +3017,7 @@ let z = class {
3006
3017
  this._recipients.forEach((e, t) => {
3007
3018
  const n = Z(e).multiasset();
3008
3019
  if (n !== void 0) {
3009
- const o = Ct(t).next().with_asset_and_min_required_coin_by_utxo_cost(n, Ht(this._protocolParameters.coinsPerUTxOSize)).build();
3020
+ const o = Ct(t).next().with_asset_and_min_required_coin_by_utxo_cost(n, Ft(this._protocolParameters.coinsPerUTxOSize)).build();
3010
3021
  this._txBuilder.add_output(o);
3011
3022
  }
3012
3023
  });
@@ -3500,7 +3511,7 @@ class er {
3500
3511
  };
3501
3512
  makePlutusScriptSource = (e) => {
3502
3513
  const t = i.ScriptHash.from_hex(e.spendingScriptHash), s = i.TransactionInput.new(i.TransactionHash.from_hex(e.txHash), e.txIndex);
3503
- return i.PlutusScriptSource.new_ref_input_with_lang_ver(t, s, R[e.version]);
3514
+ return i.PlutusScriptSource.new_ref_input_with_lang_ver(t, s, Y[e.version]);
3504
3515
  };
3505
3516
  addAllInputs = (e) => {
3506
3517
  for (let t = 0; t < e.length; t++) {
@@ -3528,7 +3539,7 @@ class er {
3528
3539
  s = i.DatumSource.new_ref_input(d);
3529
3540
  }
3530
3541
  let c;
3531
- a.type == "Inline" ? c = this.makePlutusScriptSource(a.txInInfo) : c = i.PlutusScriptSource.new(i.PlutusScript.from_hex_with_version(a.script.code, R[a.script.version]));
3542
+ a.type == "Inline" ? c = this.makePlutusScriptSource(a.txInInfo) : c = i.PlutusScriptSource.new(i.PlutusScript.from_hex_with_version(a.script.code, Y[a.script.version]));
3532
3543
  const u = i.Redeemer.new(i.RedeemerTag.new_spend(), i.BigNum.from_str("0"), this.castDataToPlutusData(o.data), i.ExUnits.new(i.BigNum.from_str(String(o.exUnits.mem)), i.BigNum.from_str(String(o.exUnits.steps))));
3533
3544
  this.txBuilder.add_plutus_script_input(i.PlutusWitness.new_with_ref(c, s, u), i.TransactionInput.new(i.TransactionHash.from_hex(t.txHash), t.txIndex), Z(t.amount));
3534
3545
  };
@@ -3542,11 +3553,11 @@ class er {
3542
3553
  const a = Z(e), o = a.multiasset();
3543
3554
  if (a.is_zero() && o === void 0)
3544
3555
  throw Error("Invalid output amount");
3545
- let c = i.TransactionOutputBuilder.new().with_address(K(t));
3546
- s && s.type === "Hash" && (c = c.with_data_hash(i.hash_plutus_data(this.castDataToPlutusData(s.data)))), s && s.type === "Inline" && (c = c.with_plutus_data(this.castDataToPlutusData(s.data))), n && (c = c.with_script_ref(i.ScriptRef.new_plutus_script(i.PlutusScript.from_hex_with_version(n.code, R[n.version]))));
3556
+ let c = i.TransactionOutputBuilder.new().with_address(M(t));
3557
+ s && s.type === "Hash" && (c = c.with_data_hash(i.hash_plutus_data(this.castDataToPlutusData(s.data)))), s && s.type === "Inline" && (c = c.with_plutus_data(this.castDataToPlutusData(s.data))), n && (c = c.with_script_ref(i.ScriptRef.new_plutus_script(i.PlutusScript.from_hex_with_version(n.code, Y[n.version]))));
3547
3558
  const u = c.next();
3548
3559
  if (o) {
3549
- const d = a.coin().is_zero() ? u.with_asset_and_min_required_coin_by_utxo_cost(o, Ht(this._protocolParams.coinsPerUTxOSize)).build() : u.with_coin_and_asset(a.coin(), o).build();
3560
+ const d = a.coin().is_zero() ? u.with_asset_and_min_required_coin_by_utxo_cost(o, Ft(this._protocolParams.coinsPerUTxOSize)).build() : u.with_coin_and_asset(a.coin(), o).build();
3550
3561
  this.txBuilder.add_output(d);
3551
3562
  } else {
3552
3563
  const d = u.with_coin(a.coin()).build();
@@ -3598,7 +3609,7 @@ class er {
3598
3609
  this.txBuilder.set_mint_builder(t);
3599
3610
  };
3600
3611
  addPlutusMint = (e, { redeemer: t, policyId: s, scriptSource: n, assetName: a, amount: o }, c) => {
3601
- const u = i.Redeemer.new(i.RedeemerTag.new_mint(), i.BigNum.from_str(String(c)), this.castDataToPlutusData(t.data), i.ExUnits.new(i.BigNum.from_str(String(t.exUnits.mem)), i.BigNum.from_str(String(t.exUnits.steps)))), d = n.type === "Reference Script" ? i.PlutusScriptSource.new_ref_input_with_lang_ver(i.ScriptHash.from_hex(s), i.TransactionInput.new(i.TransactionHash.from_hex(n.txHash), n.txIndex), R[n.version]) : i.PlutusScriptSource.new(i.PlutusScript.from_hex_with_version(n.script.code, R[n.script.version]));
3612
+ const u = i.Redeemer.new(i.RedeemerTag.new_mint(), i.BigNum.from_str(String(c)), this.castDataToPlutusData(t.data), i.ExUnits.new(i.BigNum.from_str(String(t.exUnits.mem)), i.BigNum.from_str(String(t.exUnits.steps)))), d = n.type === "Reference Script" ? i.PlutusScriptSource.new_ref_input_with_lang_ver(i.ScriptHash.from_hex(s), i.TransactionInput.new(i.TransactionHash.from_hex(n.txHash), n.txIndex), Y[n.version]) : i.PlutusScriptSource.new(i.PlutusScript.from_hex_with_version(n.script.code, Y[n.script.version]));
3602
3613
  e.add_asset(i.MintWitness.new_plutus_script(d, u), i.AssetName.new(Buffer.from(a, "hex")), i.Int.new_i32(o));
3603
3614
  };
3604
3615
  addNativeMint = (e, { scriptSource: t, assetName: s, amount: n }) => {
@@ -3725,7 +3736,7 @@ class B {
3725
3736
  }
3726
3737
  getAccount(e, t) {
3727
3738
  return this.accountContext(e, t, (s, n) => {
3728
- const a = fe(this._networkId, s.to_public().hash(), n.to_public().hash()).to_address().to_bech32(), o = _e(this._networkId, s.to_public().hash()).to_address().to_bech32(), c = Ft(this._networkId, n.to_public().hash()).to_address().to_bech32();
3739
+ const a = ye(this._networkId, s.to_public().hash(), n.to_public().hash()).to_address().to_bech32(), o = xe(this._networkId, s.to_public().hash()).to_address().to_bech32(), c = Ot(this._networkId, n.to_public().hash()).to_address().to_bech32();
3729
3740
  return {
3730
3741
  baseAddress: a,
3731
3742
  enterpriseAddress: o,
@@ -3748,7 +3759,7 @@ class B {
3748
3759
  }
3749
3760
  signTx(e, t, s, n, a) {
3750
3761
  try {
3751
- const o = Me(js(n));
3762
+ const o = Fe(js(n));
3752
3763
  return this.accountContext(e, t, (c, u) => {
3753
3764
  const d = i.Vkeywitnesses.new();
3754
3765
  return B.resolveSigners(n, s, c.to_public().hash().to_hex()).forEach((g) => {
@@ -3765,7 +3776,7 @@ class B {
3765
3776
  }
3766
3777
  }
3767
3778
  static encryptMnemonic(e, t) {
3768
- const s = we(e.join(" ")), n = Re(s), a = D(n.as_bytes());
3779
+ const s = Se(e.join(" ")), n = Ye(s), a = D(n.as_bytes());
3769
3780
  return n.free(), B.encrypt(a, t);
3770
3781
  }
3771
3782
  static encryptPrivateKey(e, t) {
@@ -3791,14 +3802,14 @@ class B {
3791
3802
  }
3792
3803
  }
3793
3804
  static encrypt(e, t) {
3794
- const s = Ce("0123456789abcdef"), n = s(64), a = s(24);
3805
+ const s = Be("0123456789abcdef"), n = s(64), a = s(24);
3795
3806
  return i.encrypt_with_password(Q(t), n, a, e);
3796
3807
  }
3797
3808
  static resolveAddress(e, t, s, n) {
3798
3809
  const a = [
3799
- fe(e, s.to_public().hash(), n.to_public().hash()),
3800
- _e(e, s.to_public().hash()),
3801
- Ft(e, n.to_public().hash())
3810
+ ye(e, s.to_public().hash(), n.to_public().hash()),
3811
+ xe(e, s.to_public().hash()),
3812
+ Ot(e, n.to_public().hash())
3802
3813
  ].find((o) => o.to_address().to_bech32() === t);
3803
3814
  if (a !== void 0)
3804
3815
  return a.to_address();
@@ -3818,37 +3829,37 @@ class B {
3818
3829
  static resolveSigners(e, t, s) {
3819
3830
  const n = (c) => {
3820
3831
  const u = (f, x = [], C = 0) => {
3821
- var ft, lt, $t, zt, Jt;
3832
+ var ft, lt, Jt, Wt, jt;
3822
3833
  if (f === void 0 || C >= f.len())
3823
3834
  return x;
3824
3835
  const U = f.get(C), P = new Array();
3825
3836
  switch (U.kind()) {
3826
3837
  case i.CertificateKind.StakeDeregistration: {
3827
- const w = (ft = U.as_stake_deregistration()) == null ? void 0 : ft.stake_credential(), q = (w == null ? void 0 : w.kind()) === i.StakeCredKind.Key ? w.to_keyhash() : void 0;
3828
- q && P.push(q.to_hex());
3838
+ const w = (ft = U.as_stake_deregistration()) == null ? void 0 : ft.stake_credential(), R = (w == null ? void 0 : w.kind()) === i.StakeCredKind.Key ? w.to_keyhash() : void 0;
3839
+ R && P.push(R.to_hex());
3829
3840
  break;
3830
3841
  }
3831
3842
  case i.CertificateKind.StakeDelegation: {
3832
- const w = (lt = U.as_stake_delegation()) == null ? void 0 : lt.stake_credential(), q = (w == null ? void 0 : w.kind()) === i.StakeCredKind.Key ? w.to_keyhash() : void 0;
3833
- q && P.push(q.to_hex());
3843
+ const w = (lt = U.as_stake_delegation()) == null ? void 0 : lt.stake_credential(), R = (w == null ? void 0 : w.kind()) === i.StakeCredKind.Key ? w.to_keyhash() : void 0;
3844
+ R && P.push(R.to_hex());
3834
3845
  break;
3835
3846
  }
3836
3847
  case i.CertificateKind.PoolRegistration: {
3837
- const w = ($t = U.as_pool_registration()) == null ? void 0 : $t.pool_params().pool_owners();
3848
+ const w = (Jt = U.as_pool_registration()) == null ? void 0 : Jt.pool_params().pool_owners();
3838
3849
  P.push(...l(w));
3839
3850
  break;
3840
3851
  }
3841
3852
  case i.CertificateKind.PoolRetirement: {
3842
- const w = (zt = U.as_pool_retirement()) == null ? void 0 : zt.pool_keyhash();
3853
+ const w = (Wt = U.as_pool_retirement()) == null ? void 0 : Wt.pool_keyhash();
3843
3854
  w && P.push(w.to_hex());
3844
3855
  break;
3845
3856
  }
3846
3857
  case i.CertificateKind.MoveInstantaneousRewardsCert: {
3847
- const w = (Jt = U.as_move_instantaneous_rewards_cert()) == null ? void 0 : Jt.move_instantaneous_reward().as_to_stake_creds();
3858
+ const w = (jt = U.as_move_instantaneous_rewards_cert()) == null ? void 0 : jt.move_instantaneous_reward().as_to_stake_creds();
3848
3859
  if (w)
3849
- for (let q = 0; q < w.len(); q += 1) {
3850
- const Wt = w.keys().get(q), jt = Wt.kind() === i.StakeCredKind.Key ? Wt.to_keyhash() : void 0;
3851
- jt && P.push(jt.to_hex());
3860
+ for (let R = 0; R < w.len(); R += 1) {
3861
+ const Xt = w.keys().get(R), Zt = Xt.kind() === i.StakeCredKind.Key ? Xt.to_keyhash() : void 0;
3862
+ Zt && P.push(Zt.to_hex());
3852
3863
  }
3853
3864
  break;
3854
3865
  }
@@ -3896,7 +3907,7 @@ class B {
3896
3907
  return [
3897
3908
  ...u(d)
3898
3909
  ];
3899
- }, o = L(e);
3910
+ }, o = K(e);
3900
3911
  return /* @__PURE__ */ new Set([
3901
3912
  ...n(o.body()),
3902
3913
  ...a(o.witness_set())
@@ -3931,14 +3942,14 @@ class Ur {
3931
3942
  }
3932
3943
  getUsedAddress(e = 0) {
3933
3944
  const t = this._wallet.getAccount(e, N);
3934
- return K(t.enterpriseAddress);
3945
+ return M(t.enterpriseAddress);
3935
3946
  }
3936
3947
  getUsedCollateral(e = k.maxCollateralInputs) {
3937
3948
  throw new Error("getUsedCollateral not implemented.");
3938
3949
  }
3939
3950
  async getUsedUTxOs(e = 0) {
3940
3951
  const t = this._wallet.getAccount(e, N);
3941
- return (await this._fetcher.fetchAddressUTxOs(t.enterpriseAddress)).map((n) => H(n));
3952
+ return (await this._fetcher.fetchAddressUTxOs(t.enterpriseAddress)).map((n) => F(n));
3942
3953
  }
3943
3954
  signData(e, t, s = 0) {
3944
3955
  try {
@@ -3949,7 +3960,7 @@ class Ur {
3949
3960
  }
3950
3961
  async signTx(e, t = !1, s = 0) {
3951
3962
  try {
3952
- const n = this._wallet.getAccount(s, N), a = await this._fetcher.fetchAddressUTxOs(n.enterpriseAddress), o = this._wallet.signTx(s, N, a, e, t), c = L(e), u = c.witness_set(), d = Ge(u, o);
3963
+ const n = this._wallet.getAccount(s, N), a = await this._fetcher.fetchAddressUTxOs(n.enterpriseAddress), o = this._wallet.signTx(s, N, a, e, t), c = K(e), u = c.witness_set(), d = Ge(u, o);
3953
3964
  return u.set_vkeys(d), i.Transaction.new(c.body(), u, c.auxiliary_data()).to_hex();
3954
3965
  } catch (n) {
3955
3966
  throw new Error(`[AppWallet] An error occurred during signTx: ${n}.`);
@@ -3962,13 +3973,13 @@ class Ur {
3962
3973
  return B.generateMnemonic(e);
3963
3974
  }
3964
3975
  }
3965
- class Ot {
3976
+ class qt {
3966
3977
  _walletInstance;
3967
3978
  constructor(e) {
3968
3979
  this._walletInstance = e;
3969
3980
  }
3970
3981
  static getInstalledWallets() {
3971
- return window.cardano === void 0 ? [] : te.filter((e) => window.cardano[e] !== void 0).map((e) => ({
3982
+ return window.cardano === void 0 ? [] : se.filter((e) => window.cardano[e] !== void 0).map((e) => ({
3972
3983
  name: window.cardano[e].name,
3973
3984
  icon: window.cardano[e].icon,
3974
3985
  version: window.cardano[e].apiVersion
@@ -3976,17 +3987,17 @@ class Ot {
3976
3987
  }
3977
3988
  static async enable(e) {
3978
3989
  try {
3979
- const t = await Ot.resolveInstance(e);
3990
+ const t = await qt.resolveInstance(e);
3980
3991
  if (t !== void 0)
3981
- return new Ot(t);
3992
+ return new qt(t);
3982
3993
  throw new Error(`Couldn't create an instance of wallet: ${e}`);
3983
3994
  } catch (t) {
3984
- throw new Error(`[BrowserWallet] An error occurred during enable: ${t}.`);
3995
+ throw new Error(`[BrowserWallet] An error occurred during enable: ${JSON.stringify(t)}.`);
3985
3996
  }
3986
3997
  }
3987
3998
  async getBalance() {
3988
3999
  const e = await this._walletInstance.getBalance();
3989
- return qe(Gs(e));
4000
+ return Re(Gs(e));
3990
4001
  }
3991
4002
  async getChangeAddress() {
3992
4003
  const e = await this._walletInstance.getChangeAddress();
@@ -4011,12 +4022,12 @@ class Ot {
4011
4022
  return (await this.getUsedUTxOs()).map((t) => vt(t));
4012
4023
  }
4013
4024
  signData(e, t) {
4014
- const s = K(e).to_hex();
4025
+ const s = M(e).to_hex();
4015
4026
  return this._walletInstance.signData(s, Q(t));
4016
4027
  }
4017
4028
  async signTx(e, t = !1) {
4018
4029
  try {
4019
- const s = L(e), n = s.witness_set(), a = await this._walletInstance.signTx(e, t), o = Ls(a).vkeys() ?? i.Vkeywitnesses.new(), c = Ge(n, o);
4030
+ const s = K(e), n = s.witness_set(), a = await this._walletInstance.signTx(e, t), o = Ls(a).vkeys() ?? i.Vkeywitnesses.new(), c = Ge(n, o);
4020
4031
  return n.set_vkeys(c), D(i.Transaction.new(s.body(), n, s.auxiliary_data()).to_bytes());
4021
4032
  } catch (s) {
4022
4033
  throw new Error(`[BrowserWallet] An error occurred during signTx: ${JSON.stringify(s)}.`);
@@ -4030,18 +4041,18 @@ class Ot {
4030
4041
  return nt(e[0]);
4031
4042
  }
4032
4043
  async getUsedCollateral(e = k.maxCollateralInputs) {
4033
- return (await this._walletInstance.experimental.getCollateral() ?? []).map((s) => Ie(s)).slice(0, e);
4044
+ return (await this._walletInstance.experimental.getCollateral() ?? []).map((s) => fe(s)).slice(0, e);
4034
4045
  }
4035
4046
  async getUsedUTxOs() {
4036
- return (await this._walletInstance.getUtxos() ?? []).map((t) => Ie(t));
4047
+ return (await this._walletInstance.getUtxos() ?? []).map((t) => fe(t));
4037
4048
  }
4038
4049
  async getAssets() {
4039
4050
  return (await this.getBalance()).filter((t) => t.unit !== "lovelace").map((t) => {
4040
- const s = t.unit.slice(0, O), n = t.unit.slice(O), a = Ws(s, n);
4051
+ const s = t.unit.slice(0, V), n = t.unit.slice(V), a = Ws(s, n);
4041
4052
  return {
4042
4053
  unit: t.unit,
4043
4054
  policyId: s,
4044
- assetName: Gt(n),
4055
+ assetName: zt(n),
4045
4056
  fingerprint: a,
4046
4057
  quantity: t.quantity
4047
4058
  };
@@ -4056,12 +4067,12 @@ class Ot {
4056
4067
  }
4057
4068
  async getPolicyIds() {
4058
4069
  const e = await this.getBalance();
4059
- return Array.from(new Set(e.map((t) => t.unit.slice(0, O)))).filter((t) => t !== "lovelace");
4070
+ return Array.from(new Set(e.map((t) => t.unit.slice(0, V)))).filter((t) => t !== "lovelace");
4060
4071
  }
4061
4072
  static resolveInstance(e) {
4062
4073
  if (window.cardano === void 0)
4063
4074
  return;
4064
- const t = te.map((s) => window.cardano[s]).filter((s) => s !== void 0).find((s) => s.name.toLowerCase() === e.toLowerCase());
4075
+ const t = se.map((s) => window.cardano[s]).filter((s) => s !== void 0).find((s) => s.name.toLowerCase() === e.toLowerCase());
4065
4076
  return t == null ? void 0 : t.enable();
4066
4077
  }
4067
4078
  }
@@ -4121,7 +4132,7 @@ class Pr {
4121
4132
  if (console.log("userWalletsMeta", s), s) {
4122
4133
  const n = await this.openMinaFrontend(`${nr}?unsignedTx=${e}&partialSign=${t}`);
4123
4134
  if (n instanceof i.Vkeywitnesses) {
4124
- const a = L(e), o = a.witness_set();
4135
+ const a = K(e), o = a.witness_set();
4125
4136
  o.set_vkeys(n);
4126
4137
  const c = i.Transaction.new(a.body(), o, a.auxiliary_data()).to_hex();
4127
4138
  return console.log("signedTx", c), c;
@@ -4133,7 +4144,7 @@ class Pr {
4133
4144
  export {
4134
4145
  Ur as AppWallet,
4135
4146
  Br as BlockfrostProvider,
4136
- Ot as BrowserWallet,
4147
+ qt as BrowserWallet,
4137
4148
  B as EmbeddedWallet,
4138
4149
  Dr as ForgeScript,
4139
4150
  Sr as InfuraProvider,