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

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,12 +1,12 @@
1
1
  import { customAlphabet as Be } from "nanoid";
2
- import * as i from "@emurgo/cardano-serialization-lib-nodejs";
3
- import G from "axios";
2
+ import * as n from "@emurgo/cardano-serialization-lib-nodejs";
3
+ import tt from "axios";
4
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
- const ts = ["testnet", "preview", "preprod", "mainnet"], es = (r) => ts.includes(r), at = {
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 Ht, HeaderMap as te, Headers as je, ProtectedHeaderMap as Xe, COSESign1Builder as Ze } from "@emurgo/cardano-message-signing-nodejs";
6
+ const ts = ["testnet", "preview", "preprod", "mainnet"], es = (r) => ts.includes(r), nt = {
7
7
  mem: 7e6,
8
8
  steps: 3e9
9
- }, k = {
9
+ }, T = {
10
10
  epoch: 0,
11
11
  coinsPerUTxOSize: "4310",
12
12
  priceMem: 0.0577,
@@ -28,22 +28,22 @@ const ts = ["testnet", "preview", "preprod", "mainnet"], es = (r) => ts.includes
28
28
  maxBlockExMem: "80000000",
29
29
  maxBlockExSteps: "40000000000"
30
30
  }, Pt = 2147483648, Y = {
31
- V1: i.Language.new_plutus_v1(),
32
- V2: i.Language.new_plutus_v2()
33
- }, V = 56, ss = {
34
- CERT: i.RedeemerTag.new_cert(),
35
- MINT: i.RedeemerTag.new_mint(),
36
- REWARD: i.RedeemerTag.new_reward(),
37
- SPEND: i.RedeemerTag.new_spend()
31
+ V1: n.Language.new_plutus_v1(),
32
+ V2: n.Language.new_plutus_v2()
33
+ }, R = 56, ss = {
34
+ CERT: n.RedeemerTag.new_cert(),
35
+ MINT: n.RedeemerTag.new_mint(),
36
+ REWARD: n.RedeemerTag.new_reward(),
37
+ SPEND: n.RedeemerTag.new_spend()
38
38
  }, bt = {
39
39
  testnet: ["74", "1598400", "1595967616", "432000"],
40
40
  preview: ["183", "15811222", "1682467200", "86400"],
41
41
  preprod: ["65", "26438400", "1682121600", "432000"],
42
42
  mainnet: ["208", "4492800", "1596059091", "432000"]
43
43
  }, ee = {
44
- ALONZO: i.TxBuilderConstants.plutus_alonzo_cost_models(),
44
+ ALONZO: n.TxBuilderConstants.plutus_alonzo_cost_models(),
45
45
  BABBAGE: (() => {
46
- const r = i.Costmdls.new(), e = i.CostModel.new();
46
+ const r = n.Costmdls.new(), e = n.CostModel.new();
47
47
  Object.values({
48
48
  "addInteger-cpu-arguments-intercept": 205665,
49
49
  "addInteger-cpu-arguments-slope": 812,
@@ -211,8 +211,8 @@ const ts = ["testnet", "preview", "preprod", "mainnet"], es = (r) => ts.includes
211
211
  "verifyEd25519Signature-cpu-arguments-intercept": 57996947,
212
212
  "verifyEd25519Signature-cpu-arguments-slope": 18975,
213
213
  "verifyEd25519Signature-memory-arguments": 10
214
- }).forEach((s, n) => e.set(n, i.Int.new_i32(s)));
215
- const t = i.CostModel.new();
214
+ }).forEach((s, a) => e.set(a, n.Int.new_i32(s)));
215
+ const t = n.CostModel.new();
216
216
  return Object.values({
217
217
  "addInteger-cpu-arguments-intercept": 205665,
218
218
  "addInteger-cpu-arguments-slope": 812,
@@ -389,7 +389,7 @@ const ts = ["testnet", "preview", "preprod", "mainnet"], es = (r) => ts.includes
389
389
  "verifySchnorrSecp256k1Signature-cpu-arguments-intercept": 38887044,
390
390
  "verifySchnorrSecp256k1Signature-cpu-arguments-slope": 32947,
391
391
  "verifySchnorrSecp256k1Signature-memory-arguments": 10
392
- }).forEach((s, n) => t.set(n, i.Int.new_i32(s))), r.insert(i.Language.new_plutus_v1(), e), r.insert(i.Language.new_plutus_v2(), t), r;
392
+ }).forEach((s, a) => t.set(a, n.Int.new_i32(s))), r.insert(n.Language.new_plutus_v1(), e), r.insert(n.Language.new_plutus_v2(), t), r;
393
393
  })()
394
394
  }, rs = {
395
395
  ALONZO: {
@@ -399,15 +399,15 @@ const ts = ["testnet", "preview", "preprod", "mainnet"], es = (r) => ts.includes
399
399
  V1: "a141005901b69f1a0003236119032c01011903e819023b00011903e8195e7104011903e818201a0001ca761928eb041959d818641959d818641959d818641959d818641959d818641959d81864186418641959d81864194c5118201a0002acfa182019b551041a000363151901ff00011a00015c3518201a000797751936f404021a0002ff941a0006ea7818dc0001011903e8196ff604021a0003bd081a00034ec5183e011a00102e0f19312a011a00032e801901a5011a0002da781903e819cf06011a00013a34182019a8f118201903e818201a00013aac0119e143041903e80a1a00030219189c011a00030219189c011a0003207c1901d9011a000330001901ff0119ccf3182019fd40182019ffd5182019581e18201940b318201a00012adf18201a0002ff941a0006ea7818dc0001011a00010f92192da7000119eabb18201a0002ff941a0006ea7818dc0001011a0002ff941a0006ea7818dc0001011a000c504e197712041a001d6af61a0001425b041a00040c660004001a00014fab18201a0003236119032c010119a0de18201a00033d7618201979f41820197fb8182019a95d1820197df718201995aa18201a009063b91903fd0aff",
400
400
  V2: "a20198af1a0003236119032c01011903e819023b00011903e8195e7104011903e818201a0001ca761928eb041959d818641959d818641959d818641959d818641959d818641959d81864186418641959d81864194c5118201a0002acfa182019b551041a000363151901ff00011a00015c3518201a000797751936f404021a0002ff941a0006ea7818dc0001011903e8196ff604021a0003bd081a00034ec5183e011a00102e0f19312a011a00032e801901a5011a0002da781903e819cf06011a00013a34182019a8f118201903e818201a00013aac0119e143041903e80a1a00030219189c011a00030219189c011a0003207c1901d9011a000330001901ff0119ccf3182019fd40182019ffd5182019581e18201940b318201a00012adf18201a0002ff941a0006ea7818dc0001011a00010f92192da7000119eabb18201a0002ff941a0006ea7818dc0001011a0002ff941a0006ea7818dc0001011a0011b22c1a0005fdde00021a000c504e197712041a001d6af61a0001425b041a00040c660004001a00014fab18201a0003236119032c010119a0de18201a00033d7618201979f41820197fb8182019a95d1820197df718201995aa18201b00000004a817c8001b00000004a817c8001a009063b91903fd0a1b00000004a817c800001b00000004a817c80041005901b69f1a0003236119032c01011903e819023b00011903e8195e7104011903e818201a0001ca761928eb041959d818641959d818641959d818641959d818641959d818641959d81864186418641959d81864194c5118201a0002acfa182019b551041a000363151901ff00011a00015c3518201a000797751936f404021a0002ff941a0006ea7818dc0001011903e8196ff604021a0003bd081a00034ec5183e011a00102e0f19312a011a00032e801901a5011a0002da781903e819cf06011a00013a34182019a8f118201903e818201a00013aac0119e143041903e80a1a00030219189c011a00030219189c011a0003207c1901d9011a000330001901ff0119ccf3182019fd40182019ffd5182019581e18201940b318201a00012adf18201a0002ff941a0006ea7818dc0001011a00010f92192da7000119eabb18201a0002ff941a0006ea7818dc0001011a0002ff941a0006ea7818dc0001011a000c504e197712041a001d6af61a0001425b041a00040c660004001a00014fab18201a0003236119032c010119a0de18201a00033d7618201979f41820197fb8182019a95d1820197df718201995aa18201a009063b91903fd0aff"
401
401
  }
402
- }, Rt = {
403
- [i.NetworkInfo.testnet().network_id()]: "8d18d786e92776c824607fd8e193ec535c79dc61ea2405ddf3b09fe3",
404
- [i.NetworkInfo.mainnet().network_id()]: "f0ff48bbb7bbe9d59a40f1ce90e9e9d0ff5002ec48f232b49ca0fb9a"
405
- }, ns = {
402
+ }, qt = {
403
+ [n.NetworkInfo.testnet().network_id()]: "8d18d786e92776c824607fd8e193ec535c79dc61ea2405ddf3b09fe3",
404
+ [n.NetworkInfo.mainnet().network_id()]: "f0ff48bbb7bbe9d59a40f1ce90e9e9d0ff5002ec48f232b49ca0fb9a"
405
+ }, as = {
406
406
  mainnet: "wss://ogmios-api.mainnet.dandelion.link",
407
407
  preprod: "wss://ogmios-api.iohk-preprod.dandelion.link",
408
408
  preview: "__TBD_SOON_TM__",
409
409
  testnet: "wss://ogmios-api.testnet.dandelion.link"
410
- }, as = {
410
+ }, ns = {
411
411
  LQ: "da8c30857834c6ae7203935b89278c532b3995245295456f993e1d244c51",
412
412
  MIN: "29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c64d494e",
413
413
  NTX: "edfd7a1d77bcb8b884c474bdc92a16002d1fb720e454fa6e993444794e5458",
@@ -448,86 +448,86 @@ const ts = ["testnet", "preview", "preprod", "mainnet"], es = (r) => ts.includes
448
448
  "vespr",
449
449
  "yoroi"
450
450
  ], is = (r, e, t = "5000000") => {
451
- const s = i.BigNum.from_str(r.get("lovelace") ?? "0").checked_add(i.BigNum.from_str(t)), n = e.filter((c) => c.output.amount.filter((u) => u.unit !== "lovelace").some((u) => r.has(u.unit))), a = ds(n);
451
+ const s = n.BigNum.from_str(r.get("lovelace") ?? "0").checked_add(n.BigNum.from_str(t)), a = e.filter((c) => c.output.amount.filter((u) => u.unit !== "lovelace").some((u) => r.has(u.unit))), i = ds(a);
452
452
  return [
453
- ...a.less_than(s) ? hs(s.clamped_sub(a).to_str(), e.filter((c) => !n.some((u) => u.input.txHash === c.input.txHash && u.input.outputIndex === c.input.outputIndex))) : [],
454
- ...n
453
+ ...i.less_than(s) ? hs(s.clamped_sub(i).to_str(), e.filter((c) => !a.some((u) => u.input.txHash === c.input.txHash && u.input.outputIndex === c.input.outputIndex))) : [],
454
+ ...a
455
455
  ];
456
- }, ur = (r, e, t = !1, { maxTxSize: s, minFeeA: n, minFeeB: a } = k) => {
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;
456
+ }, nr = (r, e, t = !1, { maxTxSize: s, minFeeA: a, minFeeB: i } = T) => {
457
+ const o = e.filter((m) => Qe(m) === !1).sort(Yt), c = n.BigNum.from_str(Ge(s, a, i)), u = t ? n.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
- }, os = (r, e, t = !1, s = k) => {
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
- return r.set("lovelace", c), It(n, r);
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
- 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
- return s.checked_add(a);
467
- }, i.BigNum.from_str("0")).less_than(t.quantity) === !1), Yt = (r, e) => {
468
- var n, a;
469
- const t = i.BigNum.from_str(((n = r.output.amount.find((o) => o.unit === "lovelace")) == null ? void 0 : n.quantity) ?? "0");
470
- return i.BigNum.from_str(((a = e.output.amount.find((o) => o.unit === "lovelace")) == null ? void 0 : a.quantity) ?? "0").compare(t);
461
+ }, os = (r, e, t = !1, s = T) => {
462
+ const a = e.filter(Qe).sort(Yt), i = us(s), o = r.get("lovelace") ?? "0", c = t ? n.BigNum.from_str(o).checked_add(i).to_str() : o;
463
+ return r.set("lovelace", c), It(a, r);
464
+ }, cs = (r, e) => Array.from(e, (t) => ({ unit: t[0], quantity: n.BigNum.from_str(t[1]) })).every((t) => r.filter((s) => s.output.amount.find((a) => a.unit === t.unit) !== void 0).reduce((s, a) => {
465
+ const i = a.output.amount.reduce((o, c) => o.checked_add(n.BigNum.from_str(t.unit === c.unit ? c.quantity : "0")), n.BigNum.from_str("0"));
466
+ return s.checked_add(i);
467
+ }, n.BigNum.from_str("0")).less_than(t.quantity) === !1), Yt = (r, e) => {
468
+ var a, i;
469
+ const t = n.BigNum.from_str(((a = r.output.amount.find((o) => o.unit === "lovelace")) == null ? void 0 : a.quantity) ?? "0");
470
+ return n.BigNum.from_str(((i = e.output.amount.find((o) => o.unit === "lovelace")) == null ? void 0 : i.quantity) ?? "0").compare(t);
471
471
  }, us = (r) => {
472
472
  const { maxTxSize: e, minFeeA: t, minFeeB: s } = r;
473
- return i.BigNum.from_str(Le(e, t, s));
473
+ return n.BigNum.from_str(Ge(e, t, s));
474
474
  }, Qe = (r) => r.output.amount.length > 1, ds = (r) => r.reduce((e, t) => {
475
- var n;
476
- const s = ((n = t.output.amount.find((a) => a.unit === "lovelace")) == null ? void 0 : n.quantity) ?? "0";
477
- return e.checked_add(i.BigNum.from_str(s));
478
- }, i.BigNum.from_str("0")), hs = (r, e) => {
475
+ var a;
476
+ const s = ((a = t.output.amount.find((i) => i.unit === "lovelace")) == null ? void 0 : a.quantity) ?? "0";
477
+ return e.checked_add(n.BigNum.from_str(s));
478
+ }, n.BigNum.from_str("0")), hs = (r, e) => {
479
479
  const t = e.sort(Yt);
480
480
  return It(t, /* @__PURE__ */ new Map([
481
481
  ["lovelace", r]
482
482
  ]));
483
- }, It = (r, e, t = []) => r.length === 0 || cs(t, e) ? t : ls(r[0], e) ? It(r.slice(1), e, [...t, r[0]]) : It(r.slice(1), e, t), ls = (r, e) => Array.from(e.keys()).some((t) => r.output.amount.find((s) => s.unit === t) !== void 0), gs = (r, e) => {
484
- const t = ms(e), s = Is(r, e);
483
+ }, It = (r, e, t = []) => r.length === 0 || cs(t, e) ? t : ls(r[0], e) ? It(r.slice(1), e, [...t, r[0]]) : It(r.slice(1), e, t), ls = (r, e) => Array.from(e.keys()).some((t) => r.output.amount.find((s) => s.unit === t) !== void 0), ms = (r, e) => {
484
+ const t = As(e), s = Is(r, e);
485
485
  return {
486
- coseKey: D(t.to_bytes()),
487
- coseSign1: D(s.to_bytes())
486
+ coseKey: k(t.to_bytes()),
487
+ coseSign1: k(s.to_bytes())
488
488
  };
489
- }, dr = (r, e, { key: t, signature: s }) => {
489
+ }, ir = (r, e, { key: t, signature: s }) => {
490
490
  var o, c;
491
- const n = Ee.from_bytes(_(t)), a = Je.from_bytes(_(s));
491
+ const a = Ee.from_bytes(_(t)), i = Je.from_bytes(_(s));
492
492
  if ((r == null ? void 0 : r.length) > 0) {
493
- const u = D(a.payload() ?? new Uint8Array());
494
- if (Q(r) !== u)
493
+ const u = k(i.payload() ?? new Uint8Array());
494
+ if (b(r) !== u)
495
495
  return !1;
496
496
  }
497
497
  if ((e == null ? void 0 : e.length) > 0) {
498
- const d = (o = a.headers().protected().deserialized_headers().header(X.new_text("address"))) == null ? void 0 : o.as_bytes();
498
+ const d = (o = i.headers().protected().deserialized_headers().header(X.new_text("address"))) == null ? void 0 : o.as_bytes();
499
499
  if (d === void 0)
500
500
  throw new Error("Couldn't find a signer address in signature");
501
- const l = (c = n.header(X.new_int(wt.new_negative(Kt.from_str("2"))))) == null ? void 0 : c.as_bytes();
501
+ const l = (c = a.header(X.new_int(wt.new_negative(Kt.from_str("2"))))) == null ? void 0 : c.as_bytes();
502
502
  if (l === void 0)
503
503
  throw new Error("Couldn't find a signer key in signature");
504
- const g = nt(D(d)), A = qs(D(l));
505
- if (As(e, g, A) === !1)
504
+ const m = at(k(d)), g = Vs(k(l));
505
+ if (gs(e, m, g) === !1)
506
506
  throw new Error("Couldn't check signature because of address mismatch");
507
- const m = Vs(D(a.signature())), p = a.signed_data().to_bytes();
508
- return A.verify(p, m);
507
+ const A = Rs(k(i.signature())), I = i.signed_data().to_bytes();
508
+ return g.verify(I, A);
509
509
  }
510
510
  return !1;
511
- }, As = (r, e, t) => {
511
+ }, gs = (r, e, t) => {
512
512
  if (r !== e.to_bech32())
513
513
  return !1;
514
514
  try {
515
- return At(r) === t.hash().to_hex();
515
+ return gt(r) === t.hash().to_hex();
516
516
  } catch {
517
517
  return !1;
518
518
  }
519
- }, ms = (r) => {
519
+ }, As = (r) => {
520
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;
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"))), Ht.new_int(wt.new_i32(6))), e.set_header(X.new_int(wt.new_negative(Kt.from_str("2"))), Ht.new_bytes(r.key.to_public().as_bytes())), e;
522
522
  }, Is = (r, e) => {
523
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
- const n = je.new(Xe.new(t), s), a = Ze.new(n, _(r.payload), !1);
526
- r.externalAAD !== void 0 && a.set_external_aad(_(r.externalAAD));
527
- const o = a.make_data_to_sign(), c = e.key.sign(o.to_bytes());
528
- return a.build(c.to_bytes());
524
+ t.set_algorithm_id(X.from_algorithm_id(be.EdDSA)), t.set_header(X.new_text("address"), Ht.new_bytes(e.address.to_bytes()));
525
+ const a = je.new(Xe.new(t), s), i = Ze.new(a, _(r.payload), !1);
526
+ r.externalAAD !== void 0 && i.set_external_aad(_(r.externalAAD));
527
+ const o = i.make_data_to_sign(), c = e.key.sign(o.to_bytes());
528
+ return i.build(c.to_bytes());
529
529
  };
530
- var re = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, ve = {}, v = { exports: {} };
530
+ var re = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, ve = {}, Q = { exports: {} };
531
531
  $.notEqual = fs;
532
532
  $.notOk = _s;
533
533
  $.equal = ps;
@@ -546,7 +546,7 @@ function $(r, e) {
546
546
  if (!r)
547
547
  throw new Error(e || "AssertionError");
548
548
  }
549
- var q = { exports: {} };
549
+ var V = { 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
  }
@@ -555,20 +555,20 @@ Lt.supported = typeof WebAssembly < "u";
555
555
  function Lt(r) {
556
556
  if (!Lt.supported)
557
557
  return null;
558
- var e = r && r.imports, t = Cs("AGFzbQEAAAABEANgAn9/AGADf39/AGABfwADBQQAAQICBQUBAQroBwdNBQZtZW1vcnkCAAxibGFrZTJiX2luaXQAAA5ibGFrZTJiX3VwZGF0ZQABDWJsYWtlMmJfZmluYWwAAhBibGFrZTJiX2NvbXByZXNzAAMK00AElgMAIABCADcDACAAQQhqQgA3AwAgAEEQakIANwMAIABBGGpCADcDACAAQSBqQgA3AwAgAEEoakIANwMAIABBMGpCADcDACAAQThqQgA3AwAgAEHAAGpCADcDACAAQcgAakIANwMAIABB0ABqQgA3AwAgAEHYAGpCADcDACAAQeAAakIANwMAIABB6ABqQgA3AwAgAEHwAGpCADcDACAAQfgAakIANwMAIABBgAFqQoiS853/zPmE6gBBACkDAIU3AwAgAEGIAWpCu86qptjQ67O7f0EIKQMAhTcDACAAQZABakKr8NP0r+68tzxBECkDAIU3AwAgAEGYAWpC8e30+KWn/aelf0EYKQMAhTcDACAAQaABakLRhZrv+s+Uh9EAQSApAwCFNwMAIABBqAFqQp/Y+dnCkdqCm39BKCkDAIU3AwAgAEGwAWpC6/qG2r+19sEfQTApAwCFNwMAIABBuAFqQvnC+JuRo7Pw2wBBOCkDAIU3AwAgAEHAAWpCADcDACAAQcgBakIANwMAIABB0AFqQgA3AwALbQEDfyAAQcABaiEDIABByAFqIQQgBCkDAKchBQJAA0AgASACRg0BIAVBgAFGBEAgAyADKQMAIAWtfDcDAEEAIQUgABADCyAAIAVqIAEtAAA6AAAgBUEBaiEFIAFBAWohAQwACwsgBCAFrTcDAAtkAQN/IABBwAFqIQEgAEHIAWohAiABIAEpAwAgAikDAHw3AwAgAEHQAWpCfzcDACACKQMApyEDAkADQCADQYABRg0BIAAgA2pBADoAACADQQFqIQMMAAsLIA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gDXwhDCAHIAyFQj+KIQcgAyAIIBx8fCEDIA4gA4VCIIohDiAJIA58IQkgCCAJhUIYiiEIIAMgCCAYfHwhAyAOIAOFQhCKIQ4gCSAOfCEJIAggCYVCP4ohCCAEIAUgFnx8IQQgDyAEhUIgiiEPIAogD3whCiAFIAqFQhiKIQUgBCAFIBR8fCEEIA8gBIVCEIohDyAKIA98IQogBSAKhUI/iiEFICEgISkDACABIAmFhTcDACAiICIpAwAgAiAKhYU3AwAgIyAjKQMAIAMgC4WFNwMAICQgJCkDACAEIAyFhTcDACAlICUpAwAgBSANhYU3AwAgJiAmKQMAIAYgDoWFNwMAICcgJykDACAHIA+FhTcDACAoICgpAwAgCCAQhYU3AwAL"), s = null, n = {
558
+ var e = r && r.imports, t = Cs("AGFzbQEAAAABEANgAn9/AGADf39/AGABfwADBQQAAQICBQUBAQroBwdNBQZtZW1vcnkCAAxibGFrZTJiX2luaXQAAA5ibGFrZTJiX3VwZGF0ZQABDWJsYWtlMmJfZmluYWwAAhBibGFrZTJiX2NvbXByZXNzAAMK00AElgMAIABCADcDACAAQQhqQgA3AwAgAEEQakIANwMAIABBGGpCADcDACAAQSBqQgA3AwAgAEEoakIANwMAIABBMGpCADcDACAAQThqQgA3AwAgAEHAAGpCADcDACAAQcgAakIANwMAIABB0ABqQgA3AwAgAEHYAGpCADcDACAAQeAAakIANwMAIABB6ABqQgA3AwAgAEHwAGpCADcDACAAQfgAakIANwMAIABBgAFqQoiS853/zPmE6gBBACkDAIU3AwAgAEGIAWpCu86qptjQ67O7f0EIKQMAhTcDACAAQZABakKr8NP0r+68tzxBECkDAIU3AwAgAEGYAWpC8e30+KWn/aelf0EYKQMAhTcDACAAQaABakLRhZrv+s+Uh9EAQSApAwCFNwMAIABBqAFqQp/Y+dnCkdqCm39BKCkDAIU3AwAgAEGwAWpC6/qG2r+19sEfQTApAwCFNwMAIABBuAFqQvnC+JuRo7Pw2wBBOCkDAIU3AwAgAEHAAWpCADcDACAAQcgBakIANwMAIAB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gBCAIIB58fCEEIBAgBIVCIIohECAMIBB8IQwgCCAMhUIYiiEIIAQgCCAXfHwhBCAQIASFQhCKIRAgDCAQfCEMIAggDIVCP4ohCCABIAYgEnx8IQEgECABhUIgiiEQIAsgEHwhCyAGIAuFQhiKIQYgASAGIB18fCEBIBAgAYVCEIohECALIBB8IQsgBiALhUI/iiEGIAIgByARfHwhAiANIAKFQiCKIQ0gDCANfCEMIAcgDIVCGIohByACIAcgE3x8IQIgDSAChUIQiiENIAwgDXwhDCAHIAyFQj+KIQcgAyAIIBx8fCEDIA4gA4VCIIohDiAJIA58IQkgCCAJhUIYiiEIIAMgCCAYfHwhAyAOIAOFQhCKIQ4gCSAOfCEJIAggCYVCP4ohCCAEIAUgFnx8IQQgDyAEhUIgiiEPIAogD3whCiAFIAqFQhiKIQUgBCAFIBR8fCEEIA8gBIVCEIohDyAKIA98IQogBSAKhUI/iiEFICEgISkDACABIAmFhTcDACAiICIpAwAgAiAKhYU3AwAgIyAjKQMAIAMgC4WFNwMAICQgJCkDACAEIAyFhTcDACAlICUpAwAgBSANhYU3AwAgJiAmKQMAIAYgDoWFNwMAICcgJykDACAHIA+FhTcDACAoICgpAwAgCCAQhYU3AwAL"), s = null, a = {
559
559
  buffer: t,
560
560
  memory: null,
561
561
  exports: null,
562
- realloc: a,
562
+ realloc: i,
563
563
  onload: o
564
564
  };
565
565
  return o(function() {
566
- }), n;
567
- function a(u) {
568
- n.exports.memory.grow(Math.ceil(Math.abs(u - n.memory.length) / 65536)), n.memory = new Uint8Array(n.exports.memory.buffer);
566
+ }), a;
567
+ function i(u) {
568
+ a.exports.memory.grow(Math.ceil(Math.abs(u - a.memory.length) / 65536)), a.memory = new Uint8Array(a.exports.memory.buffer);
569
569
  }
570
570
  function o(u) {
571
- if (n.exports)
571
+ if (a.exports)
572
572
  return u();
573
573
  if (s) {
574
574
  s.then(u.bind(null, null)).catch(u);
@@ -584,7 +584,7 @@ function Lt(r) {
584
584
  o(u);
585
585
  }
586
586
  function c(u) {
587
- n.exports = u.instance.exports, n.memory = n.exports.memory && n.exports.memory.buffer && new Uint8Array(n.exports.memory.buffer);
587
+ a.exports = u.instance.exports, a.memory = a.exports.memory && a.exports.memory.buffer && new Uint8Array(a.exports.memory.buffer);
588
588
  }
589
589
  }
590
590
  function Cs(r) {
@@ -594,23 +594,23 @@ function ws(r) {
594
594
  return r.charCodeAt(0);
595
595
  }
596
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
- function T(r, e, t, s, n) {
604
- if (!(this instanceof T))
605
- return new T(r, e, t, s, n);
597
+ V.exports = U;
598
+ var ae = V.exports.BYTES_MIN = 16, ne = V.exports.BYTES_MAX = 64;
599
+ V.exports.BYTES = 32;
600
+ var ie = V.exports.KEYBYTES_MIN = 16, oe = V.exports.KEYBYTES_MAX = 64;
601
+ V.exports.KEYBYTES = 32;
602
+ var ce = V.exports.SALTBYTES = 16, ue = V.exports.PERSONALBYTES = 16;
603
+ function U(r, e, t, s, a) {
604
+ if (!(this instanceof U))
605
+ return new U(r, e, t, s, a);
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 && (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);
608
+ r || (r = 32), a !== !0 && (H(r >= ae, "digestLength must be at least " + ae + ", was given " + r), H(r <= ne, "digestLength must be at most " + ne + ", 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
- T.prototype.update = function(r) {
610
+ U.prototype.update = function(r) {
611
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
- T.prototype.digest = function(r) {
613
+ U.prototype.digest = function(r) {
614
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")
@@ -620,49 +620,49 @@ T.prototype.digest = function(r) {
620
620
  r[e] = y.memory[this.pointer + 128 + e];
621
621
  return r;
622
622
  };
623
- T.prototype.final = T.prototype.digest;
624
- T.WASM = y && y.buffer;
625
- T.SUPPORTED = typeof WebAssembly < "u";
626
- T.ready = function(r) {
623
+ U.prototype.final = U.prototype.digest;
624
+ U.WASM = y && y.buffer;
625
+ U.SUPPORTED = typeof WebAssembly < "u";
626
+ U.ready = function(r) {
627
627
  if (r || (r = Bs), !y)
628
628
  return r(new Error("WebAssembly not supported"));
629
629
  var e = new Promise(function(t, s) {
630
- y.onload(function(n) {
631
- n ? s() : t(), r(n);
630
+ y.onload(function(a) {
631
+ a ? s() : t(), r(a);
632
632
  });
633
633
  });
634
634
  return e;
635
635
  };
636
- T.prototype.ready = T.ready;
636
+ U.prototype.ready = U.ready;
637
637
  function Bs() {
638
638
  }
639
639
  function Ss(r, e, t) {
640
- for (var s = "", n = 0; n < t; n++)
641
- s += Es(r[e + n]);
640
+ for (var s = "", a = 0; a < t; a++)
641
+ s += Es(r[e + a]);
642
642
  return s;
643
643
  }
644
644
  function Es(r) {
645
645
  return r < 16 ? "0" + r.toString(16) : r.toString(16);
646
646
  }
647
- var j = De, pt = q.exports;
647
+ var j = De, pt = V.exports;
648
648
  function _t(r, e, t) {
649
- var s = r[e] + r[t], n = r[e + 1] + r[t + 1];
650
- s >= 4294967296 && n++, r[e] = s, r[e + 1] = n;
649
+ var s = r[e] + r[t], a = r[e + 1] + r[t + 1];
650
+ s >= 4294967296 && a++, r[e] = s, r[e + 1] = a;
651
651
  }
652
652
  function de(r, e, t, s) {
653
- var n = r[e] + t;
654
- t < 0 && (n += 4294967296);
655
- var a = r[e + 1] + s;
656
- n >= 4294967296 && a++, r[e] = n, r[e + 1] = a;
653
+ var a = r[e] + t;
654
+ t < 0 && (a += 4294967296);
655
+ var i = r[e + 1] + s;
656
+ a >= 4294967296 && i++, r[e] = a, r[e + 1] = i;
657
657
  }
658
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
- function J(r, e, t, s, n, a) {
662
- var o = gt[n], c = gt[n + 1], u = gt[a], d = gt[a + 1];
663
- _t(I, r, e), de(I, r, o, c);
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), 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;
661
+ function J(r, e, t, s, a, i) {
662
+ var o = mt[a], c = mt[a + 1], u = mt[i], d = mt[i + 1];
663
+ _t(p, r, e), de(p, r, o, c);
664
+ var l = p[s] ^ p[r], m = p[s + 1] ^ p[r + 1];
665
+ p[s] = m, p[s + 1] = l, _t(p, t, s), l = p[e] ^ p[t], m = p[e + 1] ^ p[t + 1], p[e] = l >>> 24 ^ m << 8, p[e + 1] = m >>> 24 ^ l << 8, _t(p, r, e), de(p, r, u, d), l = p[s] ^ p[r], m = p[s + 1] ^ p[r + 1], p[s] = l >>> 16 ^ m << 16, p[s + 1] = m >>> 16 ^ l << 16, _t(p, t, s), l = p[e] ^ p[t], m = p[e + 1] ^ p[t + 1], p[e] = m >>> 31 ^ l << 1, p[e + 1] = l >>> 31 ^ m << 1;
666
666
  }
667
667
  var Te = new Uint32Array([
668
668
  4089235720,
@@ -874,19 +874,19 @@ var Te = new Uint32Array([
874
874
  7,
875
875
  5,
876
876
  3
877
- ], b = new Uint8Array(bs.map(function(r) {
877
+ ], E = new Uint8Array(bs.map(function(r) {
878
878
  return r * 2;
879
- })), I = new Uint32Array(32), gt = new Uint32Array(32);
879
+ })), p = new Uint32Array(32), mt = new Uint32Array(32);
880
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] = Te[t];
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] = ke(r.b, 4 * t);
883
+ p[t] = r.h[t], p[t + 16] = Te[t];
884
+ for (p[24] = p[24] ^ r.t, p[25] = p[25] ^ r.t / 4294967296, e && (p[28] = ~p[28], p[29] = ~p[29]), t = 0; t < 32; t++)
885
+ mt[t] = ke(r.b, 4 * t);
886
886
  for (t = 0; t < 12; t++)
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]);
887
+ J(0, 8, 16, 24, E[t * 16 + 0], E[t * 16 + 1]), J(2, 10, 18, 26, E[t * 16 + 2], E[t * 16 + 3]), J(4, 12, 20, 28, E[t * 16 + 4], E[t * 16 + 5]), J(6, 14, 22, 30, E[t * 16 + 6], E[t * 16 + 7]), J(0, 10, 20, 30, E[t * 16 + 8], E[t * 16 + 9]), J(2, 12, 22, 24, E[t * 16 + 10], E[t * 16 + 11]), J(4, 14, 16, 26, E[t * 16 + 12], E[t * 16 + 13]), J(6, 8, 18, 28, E[t * 16 + 14], E[t * 16 + 15]);
888
888
  for (t = 0; t < 16; t++)
889
- r.h[t] = r.h[t] ^ I[t] ^ I[t + 16];
889
+ r.h[t] = r.h[t] ^ p[t] ^ p[t + 16];
890
890
  }
891
891
  var W = new Uint8Array([
892
892
  0,
@@ -956,8 +956,8 @@ var W = new Uint8Array([
956
956
  ]);
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
- for (var n = 0; n < 16; n++)
960
- this.h[n] = Te[n] ^ ke(W, n * 4);
959
+ for (var a = 0; a < 16; a++)
960
+ this.h[a] = Te[a] ^ ke(W, a * 4);
961
961
  e && (Pe(this, e), this.c = 128);
962
962
  }
963
963
  ct.prototype.update = function(r) {
@@ -994,23 +994,23 @@ function Ds(r) {
994
994
  return r < 16 ? "0" + r.toString(16) : r.toString(16);
995
995
  }
996
996
  var Ne = ct;
997
- v.exports = function(e, t, s, n, a) {
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);
997
+ Q.exports = function(e, t, s, a, i) {
998
+ return i !== !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 >= me, "key must be at least " + me + ", was given " + t.length), t != null && j(t.length <= ge, "key must be at most " + ge + ", was given " + t.length), s != null && j(s.length === Ae, "salt must be exactly " + Ae + ", was given " + s.length), a != null && j(a.length === Ie, "personal must be exactly " + Ie + ", was given " + a.length)), new Ne(e, t, s, a);
999
999
  };
1000
- v.exports.ready = function(r) {
1000
+ Q.exports.ready = function(r) {
1001
1001
  pt.ready(function() {
1002
1002
  r();
1003
1003
  });
1004
1004
  };
1005
- v.exports.WASM_SUPPORTED = pt.SUPPORTED;
1006
- v.exports.WASM_LOADED = !1;
1007
- var he = v.exports.BYTES_MIN = 16, le = v.exports.BYTES_MAX = 64;
1008
- v.exports.BYTES = 32;
1009
- var ge = v.exports.KEYBYTES_MIN = 16, Ae = v.exports.KEYBYTES_MAX = 64;
1010
- v.exports.KEYBYTES = 32;
1011
- var me = v.exports.SALTBYTES = 16, Ie = v.exports.PERSONALBYTES = 16;
1005
+ Q.exports.WASM_SUPPORTED = pt.SUPPORTED;
1006
+ Q.exports.WASM_LOADED = !1;
1007
+ var he = Q.exports.BYTES_MIN = 16, le = Q.exports.BYTES_MAX = 64;
1008
+ Q.exports.BYTES = 32;
1009
+ var me = Q.exports.KEYBYTES_MIN = 16, ge = Q.exports.KEYBYTES_MAX = 64;
1010
+ Q.exports.KEYBYTES = 32;
1011
+ var Ae = Q.exports.SALTBYTES = 16, Ie = Q.exports.PERSONALBYTES = 16;
1012
1012
  pt.ready(function(r) {
1013
- r || (v.exports.WASM_LOADED = !0, Ne = pt);
1013
+ r || (Q.exports.WASM_LOADED = !0, Ne = pt);
1014
1014
  });
1015
1015
  var ut = {};
1016
1016
  Object.defineProperty(ut, "__esModule", { value: !0 });
@@ -1040,17 +1040,17 @@ function pe(r) {
1040
1040
  return e;
1041
1041
  }
1042
1042
  function Gt(r, e, t, s) {
1043
- let n = 0, a = 0;
1043
+ let a = 0, i = 0;
1044
1044
  const o = (1 << t) - 1, c = [];
1045
1045
  for (let u = 0; u < r.length; ++u)
1046
- for (n = n << e | r[u], a += e; a >= t; )
1047
- a -= t, c.push(n >> a & o);
1046
+ for (a = a << e | r[u], i += e; i >= t; )
1047
+ i -= t, c.push(a >> i & o);
1048
1048
  if (s)
1049
- a > 0 && c.push(n << t - a & o);
1049
+ i > 0 && c.push(a << t - i & o);
1050
1050
  else {
1051
- if (a >= e)
1051
+ if (i >= e)
1052
1052
  return "Excess padding";
1053
- if (n << t - a & o)
1053
+ if (a << t - i & o)
1054
1054
  return "Non-zero padding";
1055
1055
  }
1056
1056
  return c;
@@ -1069,7 +1069,7 @@ function Us(r) {
1069
1069
  return e;
1070
1070
  throw new Error(e);
1071
1071
  }
1072
- function Me(r) {
1072
+ function He(r) {
1073
1073
  let e;
1074
1074
  r === "bech32" ? e = 1 : e = 734539939;
1075
1075
  function t(o, c, u) {
@@ -1080,18 +1080,18 @@ function Me(r) {
1080
1080
  if (typeof d == "string")
1081
1081
  throw new Error(d);
1082
1082
  let l = o + "1";
1083
- for (let g = 0; g < c.length; ++g) {
1084
- const A = c[g];
1085
- if (A >> 5 !== 0)
1083
+ for (let m = 0; m < c.length; ++m) {
1084
+ const g = c[m];
1085
+ if (g >> 5 !== 0)
1086
1086
  throw new Error("Non 5-bit word");
1087
- d = ot(d) ^ A, l += Qt.charAt(A);
1087
+ d = ot(d) ^ g, l += Qt.charAt(g);
1088
1088
  }
1089
- for (let g = 0; g < 6; ++g)
1089
+ for (let m = 0; m < 6; ++m)
1090
1090
  d = ot(d);
1091
1091
  d ^= e;
1092
- for (let g = 0; g < 6; ++g) {
1093
- const A = d >> (5 - g) * 5 & 31;
1094
- l += Qt.charAt(A);
1092
+ for (let m = 0; m < 6; ++m) {
1093
+ const g = d >> (5 - m) * 5 & 31;
1094
+ l += Qt.charAt(g);
1095
1095
  }
1096
1096
  return l;
1097
1097
  }
@@ -1109,65 +1109,65 @@ function Me(r) {
1109
1109
  return "No separator character for " + o;
1110
1110
  if (l === 0)
1111
1111
  return "Missing prefix for " + o;
1112
- const g = o.slice(0, l), A = o.slice(l + 1);
1113
- if (A.length < 6)
1112
+ const m = o.slice(0, l), g = o.slice(l + 1);
1113
+ if (g.length < 6)
1114
1114
  return "Data too short";
1115
- let m = pe(g);
1116
- if (typeof m == "string")
1117
- return m;
1118
- const p = [];
1119
- for (let S = 0; S < A.length; ++S) {
1120
- const E = A.charAt(S), f = Ke[E];
1115
+ let A = pe(m);
1116
+ if (typeof A == "string")
1117
+ return A;
1118
+ const I = [];
1119
+ for (let x = 0; x < g.length; ++x) {
1120
+ const v = g.charAt(x), f = Ke[v];
1121
1121
  if (f === void 0)
1122
- return "Unknown character " + E;
1123
- m = ot(m) ^ f, !(S + 6 >= A.length) && p.push(f);
1122
+ return "Unknown character " + v;
1123
+ A = ot(A) ^ f, !(x + 6 >= g.length) && I.push(f);
1124
1124
  }
1125
- return m !== e ? "Invalid checksum for " + o : { prefix: g, words: p };
1125
+ return A !== e ? "Invalid checksum for " + o : { prefix: m, words: I };
1126
1126
  }
1127
- function n(o, c) {
1127
+ function a(o, c) {
1128
1128
  const u = s(o, c);
1129
1129
  if (typeof u == "object")
1130
1130
  return u;
1131
1131
  }
1132
- function a(o, c) {
1132
+ function i(o, c) {
1133
1133
  const u = s(o, c);
1134
1134
  if (typeof u == "object")
1135
1135
  return u;
1136
1136
  throw new Error(u);
1137
1137
  }
1138
1138
  return {
1139
- decodeUnsafe: n,
1140
- decode: a,
1139
+ decodeUnsafe: a,
1140
+ decode: i,
1141
1141
  encode: t,
1142
1142
  toWords: ks,
1143
1143
  fromWordsUnsafe: Ts,
1144
1144
  fromWords: Us
1145
1145
  };
1146
1146
  }
1147
- ut.bech32 = Me("bech32");
1148
- ut.bech32m = Me("bech32m");
1147
+ ut.bech32 = He("bech32");
1148
+ ut.bech32m = He("bech32m");
1149
1149
  var Ps = re && re.__importDefault || function(r) {
1150
1150
  return r && r.__esModule ? r : { default: r };
1151
1151
  };
1152
1152
  Object.defineProperty(ve, "__esModule", { value: !0 });
1153
- const Ns = Ps(v.exports), yt = ut, Nt = "asset";
1154
- class mt {
1153
+ const Ns = Ps(Q.exports), yt = ut, Nt = "asset";
1154
+ class At {
1155
1155
  constructor(e) {
1156
1156
  this.hashBuf = e;
1157
1157
  }
1158
1158
  static fromHash(e) {
1159
- return new mt(e);
1159
+ return new At(e);
1160
1160
  }
1161
1161
  static fromParts(e, t) {
1162
1162
  const s = (0, Ns.default)(20).update(new Uint8Array([...e, ...t])).digest("binary");
1163
- return mt.fromHash(s);
1163
+ return At.fromHash(s);
1164
1164
  }
1165
1165
  static fromBech32(e) {
1166
1166
  const { prefix: t, words: s } = yt.bech32.decode(e);
1167
1167
  if (t !== Nt)
1168
1168
  throw new Error("Invalid asset fingerprint");
1169
- const n = Buffer.from(yt.bech32.fromWords(s));
1170
- return mt.fromHash(n);
1169
+ const a = Buffer.from(yt.bech32.fromWords(s));
1170
+ return At.fromHash(a);
1171
1171
  }
1172
1172
  fingerprint() {
1173
1173
  const e = yt.bech32.toWords(this.hashBuf);
@@ -1183,33 +1183,33 @@ class mt {
1183
1183
  return this.fingerprint().slice(-6);
1184
1184
  }
1185
1185
  }
1186
- var Ks = ve.default = mt;
1187
- const Ms = Ks, Hs = (r, e) => {
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
- 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)), 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) => {
1186
+ var Ks = ve.default = At;
1187
+ const Hs = Ks, Ms = (r, e) => {
1188
+ const t = Fs(r), s = t.derive(Pt + 1852).derive(Pt + 1815).derive(Pt + e), a = s.derive(0).derive(0).to_raw_key(), i = s.derive(2).derive(0).to_raw_key();
1189
+ return s.free(), t.free(), { paymentKey: a, stakeKey: i };
1190
+ }, at = (r) => n.Address.from_bytes(_(r)), Fs = (r) => n.Bip32PrivateKey.from_bytes(_(r)), Os = (r) => n.DataHash.from_bytes(_(r)), F = (r) => n.Ed25519KeyHash.from_bytes(_(r)), Rs = (r) => n.Ed25519Signature.from_bytes(_(r)), Dt = (r) => n.NativeScript.from_bytes(_(r)), Vs = (r) => n.PublicKey.from_bytes(_(r)), Me = (r) => n.PlutusData.from_bytes(_(r)), dt = (r, e) => n.PlutusScript.from_bytes_with_version(_(r), Y[e]), qs = (r) => n.ScriptRef.from_bytes(_(r)), Ys = (r) => n.ScriptHash.from_bytes(_(r)), O = (r) => n.Transaction.from_bytes(_(r)), Fe = (r) => n.TransactionHash.from_bytes(_(r)), fe = (r) => n.TransactionUnspentOutput.from_bytes(_(r)), Ls = (r) => n.TransactionWitnessSet.from_bytes(_(r)), Gs = (r) => n.Value.from_bytes(_(r)), K = (r) => n.Address.from_bech32(r), $t = (r) => n.BaseAddress.from_address(K(r)), Oe = (r) => n.EnterpriseAddress.from_address(K(r)), Re = (r) => n.RewardAddress.from_address(K(r)), k = (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
- for (let n = 0; n < t.len(); n += 1)
1194
- s.push(kt(t.get(n)));
1193
+ for (let a = 0; a < t.len(); a += 1)
1194
+ s.push(kt(t.get(a)));
1195
1195
  return s;
1196
1196
  };
1197
1197
  switch (r.kind()) {
1198
- case i.NativeScriptKind.ScriptAll: {
1198
+ case n.NativeScriptKind.ScriptAll: {
1199
1199
  const t = r.as_script_all();
1200
1200
  return {
1201
1201
  type: "all",
1202
1202
  scripts: e(t.native_scripts())
1203
1203
  };
1204
1204
  }
1205
- case i.NativeScriptKind.ScriptAny: {
1205
+ case n.NativeScriptKind.ScriptAny: {
1206
1206
  const t = r.as_script_any();
1207
1207
  return {
1208
1208
  type: "any",
1209
1209
  scripts: e(t.native_scripts())
1210
1210
  };
1211
1211
  }
1212
- case i.NativeScriptKind.ScriptNOfK: {
1212
+ case n.NativeScriptKind.ScriptNOfK: {
1213
1213
  const t = r.as_script_n_of_k();
1214
1214
  return {
1215
1215
  type: "atLeast",
@@ -1217,53 +1217,47 @@ const Ms = Ks, Hs = (r, e) => {
1217
1217
  scripts: e(t.native_scripts())
1218
1218
  };
1219
1219
  }
1220
- case i.NativeScriptKind.TimelockStart: {
1221
- const t = r.as_timelock_start();
1220
+ case n.NativeScriptKind.TimelockStart:
1222
1221
  return {
1223
1222
  type: "after",
1224
- slot: t.slot_bignum().to_str()
1223
+ slot: r.as_timelock_start().slot_bignum().to_str()
1225
1224
  };
1226
- }
1227
- case i.NativeScriptKind.TimelockExpiry: {
1228
- const t = r.as_timelock_expiry();
1225
+ case n.NativeScriptKind.TimelockExpiry:
1229
1226
  return {
1230
1227
  type: "before",
1231
- slot: t.slot_bignum().to_str()
1228
+ slot: r.as_timelock_expiry().slot_bignum().to_str()
1232
1229
  };
1233
- }
1234
- case i.NativeScriptKind.ScriptPubkey: {
1235
- const t = r.as_script_pubkey();
1230
+ case n.NativeScriptKind.ScriptPubkey:
1236
1231
  return {
1237
1232
  type: "sig",
1238
- keyHash: t.addr_keyhash().to_hex()
1233
+ keyHash: r.as_script_pubkey().addr_keyhash().to_hex()
1239
1234
  };
1240
- }
1241
1235
  default:
1242
1236
  throw new Error(`Script Kind: ${r.kind()}, is not supported`);
1243
1237
  }
1244
1238
  }, Tt = (r) => {
1245
1239
  const e = (t) => {
1246
- const s = i.NativeScripts.new();
1247
- return t.forEach((n) => {
1248
- s.add(Tt(n));
1240
+ const s = n.NativeScripts.new();
1241
+ return t.forEach((a) => {
1242
+ s.add(Tt(a));
1249
1243
  }), s;
1250
1244
  };
1251
1245
  switch (r.type) {
1252
1246
  case "all":
1253
- return i.NativeScript.new_script_all(i.ScriptAll.new(e(r.scripts)));
1247
+ return n.NativeScript.new_script_all(n.ScriptAll.new(e(r.scripts)));
1254
1248
  case "any":
1255
- return i.NativeScript.new_script_any(i.ScriptAny.new(e(r.scripts)));
1249
+ return n.NativeScript.new_script_any(n.ScriptAny.new(e(r.scripts)));
1256
1250
  case "atLeast":
1257
- return i.NativeScript.new_script_n_of_k(i.ScriptNOfK.new(r.required, e(r.scripts)));
1251
+ return n.NativeScript.new_script_n_of_k(n.ScriptNOfK.new(r.required, e(r.scripts)));
1258
1252
  case "after":
1259
- return i.NativeScript.new_timelock_start(i.TimelockStart.new_timelockstart(i.BigNum.from_str(r.slot)));
1253
+ return n.NativeScript.new_timelock_start(n.TimelockStart.new_timelockstart(n.BigNum.from_str(r.slot)));
1260
1254
  case "before":
1261
- return i.NativeScript.new_timelock_expiry(i.TimelockExpiry.new_timelockexpiry(i.BigNum.from_str(r.slot)));
1255
+ return n.NativeScript.new_timelock_expiry(n.TimelockExpiry.new_timelockexpiry(n.BigNum.from_str(r.slot)));
1262
1256
  case "sig":
1263
- return i.NativeScript.new_script_pubkey(i.ScriptPubkey.new(O(r.keyHash)));
1257
+ return n.NativeScript.new_script_pubkey(n.ScriptPubkey.new(F(r.keyHash)));
1264
1258
  }
1265
1259
  }, St = (r) => {
1266
- var s, n, a;
1260
+ var s, a, i;
1267
1261
  const e = (o) => {
1268
1262
  const c = [];
1269
1263
  for (let u = 0; u < o.len(); u += 1)
@@ -1272,70 +1266,70 @@ const Ms = Ks, Hs = (r, e) => {
1272
1266
  }, t = (o) => {
1273
1267
  const c = /* @__PURE__ */ new Map();
1274
1268
  for (let u = 0; u < o.len(); u += 1) {
1275
- const d = o.keys().get(u), l = o.get(d) ?? i.PlutusData.from_hex(Q("NO_ITEM_FOUND_INSIDE_GOLD_ROOM"));
1269
+ const d = o.keys().get(u), l = o.get(d) ?? n.PlutusData.from_hex(b("NO_ITEM_FOUND_INSIDE_GOLD_ROOM"));
1276
1270
  c.set(St(d), St(l));
1277
1271
  }
1278
1272
  return c;
1279
1273
  };
1280
1274
  switch (r.kind()) {
1281
- case i.PlutusDataKind.Bytes:
1282
- return D(r.as_bytes() ?? new Uint8Array());
1283
- case i.PlutusDataKind.Integer:
1275
+ case n.PlutusDataKind.Bytes:
1276
+ return k(r.as_bytes() ?? new Uint8Array());
1277
+ case n.PlutusDataKind.Integer:
1284
1278
  return parseInt(((s = r.as_integer()) == null ? void 0 : s.to_str()) ?? "0", 10);
1285
- case i.PlutusDataKind.List:
1286
- return e(r.as_list() ?? i.PlutusList.new());
1287
- case i.PlutusDataKind.Map:
1288
- return t(r.as_map() ?? i.PlutusMap.new());
1289
- case i.PlutusDataKind.ConstrPlutusData:
1279
+ case n.PlutusDataKind.List:
1280
+ return e(r.as_list() ?? n.PlutusList.new());
1281
+ case n.PlutusDataKind.Map:
1282
+ return t(r.as_map() ?? n.PlutusMap.new());
1283
+ case n.PlutusDataKind.ConstrPlutusData:
1290
1284
  return {
1291
- alternative: parseInt(((n = r.as_constr_plutus_data()) == null ? void 0 : n.alternative().to_str()) ?? "0", 10),
1292
- fields: e(((a = r.as_constr_plutus_data()) == null ? void 0 : a.data()) ?? i.PlutusList.new())
1285
+ alternative: parseInt(((a = r.as_constr_plutus_data()) == null ? void 0 : a.alternative().to_str()) ?? "0", 10),
1286
+ fields: e(((i = r.as_constr_plutus_data()) == null ? void 0 : i.data()) ?? n.PlutusList.new())
1293
1287
  };
1294
1288
  default:
1295
1289
  throw new Error(`PlutusData Kind: ${r.kind()}, is not supported`);
1296
1290
  }
1297
- }, tt = (r) => {
1291
+ }, Z = (r) => {
1298
1292
  const e = (t) => {
1299
- const s = i.PlutusList.new();
1300
- return t.forEach((n) => {
1301
- s.add(tt(n));
1293
+ const s = n.PlutusList.new();
1294
+ return t.forEach((a) => {
1295
+ s.add(Z(a));
1302
1296
  }), s;
1303
1297
  };
1304
1298
  switch (typeof r) {
1305
1299
  case "string":
1306
- return i.PlutusData.new_bytes(_(r));
1300
+ return n.PlutusData.new_bytes(_(r));
1307
1301
  case "number":
1308
- return i.PlutusData.new_integer(i.BigInt.from_str(r.toString()));
1302
+ return n.PlutusData.new_integer(n.BigInt.from_str(r.toString()));
1309
1303
  case "object":
1310
1304
  if (r instanceof Array) {
1311
1305
  const t = e(r);
1312
- return i.PlutusData.new_list(t);
1306
+ return n.PlutusData.new_list(t);
1313
1307
  } else if (r instanceof Map) {
1314
- const t = i.PlutusMap.new();
1315
- return r.forEach((s, n) => {
1316
- t.insert(tt(n), tt(s));
1317
- }), i.PlutusData.new_map(t);
1308
+ const t = n.PlutusMap.new();
1309
+ return r.forEach((s, a) => {
1310
+ t.insert(Z(a), Z(s));
1311
+ }), n.PlutusData.new_map(t);
1318
1312
  } else
1319
- return i.PlutusData.new_constr_plutus_data(i.ConstrPlutusData.new(i.BigNum.from_str(r.alternative.toString()), e(r.fields)));
1313
+ return n.PlutusData.new_constr_plutus_data(n.ConstrPlutusData.new(n.BigNum.from_str(r.alternative.toString()), e(r.fields)));
1320
1314
  }
1321
1315
  }, $s = (r) => {
1322
- const e = i.Relays.new();
1316
+ const e = n.Relays.new();
1323
1317
  throw r.relays.forEach((t) => {
1324
- e.add(zs(t));
1318
+ e.add(Ve(t));
1325
1319
  }), new Error("toPoolParams not implemented.");
1326
- }, Ht = (r) => {
1320
+ }, Mt = (r) => {
1327
1321
  const e = (t) => ss[t];
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
- }, zs = (r) => {
1322
+ return n.Redeemer.new(e(r.tag), n.BigNum.from_str(r.index.toString()), Z(r.data), n.ExUnits.new(n.BigNum.from_str(r.budget.mem.toString()), n.BigNum.from_str(r.budget.steps.toString())));
1323
+ }, Ve = (r) => {
1330
1324
  switch (r.type) {
1331
1325
  case "SingleHostAddr": {
1332
- const e = r.IPV4 ? i.Ipv4.new(new Uint8Array(r.IPV4.split(".").map((s) => parseInt(s)))) : void 0, t = r.IPV6 ? i.Ipv6.new(_(r.IPV6.replaceAll(":", ""))) : void 0;
1333
- return i.Relay.new_single_host_addr(i.SingleHostAddr.new(r.port, e, t));
1326
+ const e = r.IPV4 ? n.Ipv4.new(new Uint8Array(r.IPV4.split(".").map((s) => parseInt(s)))) : void 0, t = r.IPV6 ? n.Ipv6.new(_(r.IPV6.replaceAll(":", ""))) : void 0;
1327
+ return n.Relay.new_single_host_addr(n.SingleHostAddr.new(r.port, e, t));
1334
1328
  }
1335
1329
  case "SingleHostName":
1336
- return i.Relay.new_single_host_name(i.SingleHostName.new(r.port, i.DNSRecordAorAAAA.new(r.domainName)));
1330
+ return n.Relay.new_single_host_name(n.SingleHostName.new(r.port, n.DNSRecordAorAAAA.new(r.domainName)));
1337
1331
  case "MultiHostName":
1338
- return i.Relay.new_multi_host_name(i.MultiHostName.new(i.DNSRecordSRV.new(r.domainName)));
1332
+ return n.Relay.new_multi_host_name(n.MultiHostName.new(n.DNSRecordSRV.new(r.domainName)));
1339
1333
  }
1340
1334
  }, qe = (r) => {
1341
1335
  if (r.is_plutus_script()) {
@@ -1350,12 +1344,12 @@ const Ms = Ks, Hs = (r, e) => {
1350
1344
  }, ht = (r) => {
1351
1345
  if ("code" in r) {
1352
1346
  const e = dt(r.code, r.version);
1353
- return i.ScriptRef.new_plutus_script(e);
1347
+ return n.ScriptRef.new_plutus_script(e);
1354
1348
  }
1355
- return i.ScriptRef.new_native_script(Tt(r));
1349
+ return n.ScriptRef.new_native_script(Tt(r));
1356
1350
  }, vt = (r) => {
1357
- var n, a, o;
1358
- const e = r.output().has_data_hash() ? (n = r.output().data_hash()) == null ? void 0 : n.to_hex() : void 0, t = r.output().has_plutus_data() ? (a = r.output().plutus_data()) == null ? void 0 : a.to_hex() : void 0, s = r.output().has_script_ref() ? (o = r.output().script_ref()) == null ? void 0 : o.to_hex() : void 0;
1351
+ var a, i, o;
1352
+ const e = r.output().has_data_hash() ? (a = r.output().data_hash()) == null ? void 0 : a.to_hex() : void 0, t = r.output().has_plutus_data() ? (i = r.output().plutus_data()) == null ? void 0 : i.to_hex() : void 0, s = r.output().has_script_ref() ? (o = r.output().script_ref()) == null ? void 0 : o.to_hex() : void 0;
1359
1353
  return {
1360
1354
  input: {
1361
1355
  outputIndex: r.input().index(),
@@ -1363,100 +1357,100 @@ const Ms = Ks, Hs = (r, e) => {
1363
1357
  },
1364
1358
  output: {
1365
1359
  address: r.output().address().to_bech32(),
1366
- amount: Re(r.output().amount()),
1360
+ amount: Ye(r.output().amount()),
1367
1361
  dataHash: e,
1368
1362
  plutusData: t,
1369
1363
  scriptRef: s
1370
1364
  }
1371
1365
  };
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);
1366
+ }, M = (r) => {
1367
+ const e = n.TransactionInput.new(Fe(r.input.txHash), r.input.outputIndex), t = n.TransactionOutput.new(K(r.output.address), G(r.output.amount));
1368
+ return r.output.dataHash !== void 0 && t.set_data_hash(Os(r.output.dataHash)), r.output.plutusData !== void 0 && t.set_plutus_data(Me(r.output.plutusData)), r.output.scriptRef !== void 0 && t.set_script_ref(qs(r.output.scriptRef)), n.TransactionUnspentOutput.new(e, t);
1375
1369
  }, _e = (r) => {
1376
1370
  const e = r.split(".")[1] ?? "0", t = `${parseInt(e, 10)}`, s = "1" + "0".repeat(e.length);
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")), zt = (r) => Buffer.from(r, "hex").toString("utf-8"), Re = (r) => {
1371
+ return n.UnitInterval.new(n.BigNum.from_str(t), n.BigNum.from_str(s));
1372
+ }, b = (r) => r.length % 2 === 0 && /^[0-9A-F]*$/i.test(r) ? r : k(Buffer.from(r, "utf-8")), zt = (r) => Buffer.from(r, "hex").toString("utf-8"), Ye = (r) => {
1379
1373
  const e = [
1380
1374
  { unit: "lovelace", quantity: r.coin().to_str() }
1381
1375
  ], t = r.multiasset();
1382
1376
  if (t !== void 0) {
1383
1377
  const s = t.keys();
1384
- for (let n = 0; n < s.len(); n += 1) {
1385
- const a = s.get(n), o = t.get(a);
1378
+ for (let a = 0; a < s.len(); a += 1) {
1379
+ const i = s.get(a), o = t.get(i);
1386
1380
  if (o !== void 0) {
1387
1381
  const c = o.keys();
1388
1382
  for (let u = 0; u < c.len(); u += 1) {
1389
- const d = c.get(u), l = o.get(d) ?? i.BigNum.from_str("0"), g = a.to_hex() + D(d.name());
1390
- e.push({ unit: g, quantity: l.to_str() });
1383
+ const d = c.get(u), l = o.get(d) ?? n.BigNum.from_str("0"), m = i.to_hex() + k(d.name());
1384
+ e.push({ unit: m, quantity: l.to_str() });
1391
1385
  }
1392
1386
  }
1393
1387
  }
1394
1388
  }
1395
1389
  return e;
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, V)))), s = i.MultiAsset.new();
1398
- t.forEach((a) => {
1399
- const o = i.Assets.new();
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
- }), s.insert(Ys(a), o);
1390
+ }, G = (r) => {
1391
+ const e = r.find((i) => i.unit === "lovelace"), t = Array.from(new Set(r.filter((i) => i.unit !== "lovelace").map((i) => i.unit.slice(0, R)))), s = n.MultiAsset.new();
1392
+ t.forEach((i) => {
1393
+ const o = n.Assets.new();
1394
+ r.filter((c) => c.unit.slice(0, R) === i).forEach((c) => {
1395
+ o.insert(n.AssetName.new(_(c.unit.slice(R))), n.BigNum.from_str(c.quantity));
1396
+ }), s.insert(Ys(i), o);
1403
1397
  });
1404
- const n = i.Value.new(i.BigNum.from_str(e ? e.quantity : "0"));
1405
- return (r.length > 1 || !e) && n.set_multiasset(s), n;
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) => {
1398
+ const a = n.Value.new(n.BigNum.from_str(e ? e.quantity : "0"));
1399
+ return (r.length > 1 || !e) && a.set_multiasset(s), a;
1400
+ }, ye = (r, e, t) => n.BaseAddress.new(r, n.StakeCredential.from_keyhash(e), n.StakeCredential.from_keyhash(t)), Le = (r, e = "") => n.Bip32PrivateKey.from_bip39_entropy(_(r), _(b(e))), Ft = (r) => n.DataCost.new_coins_per_byte(n.BigNum.from_str(r)), zs = (r) => {
1407
1401
  if (typeof r != "object" || !("input" in r))
1408
- return i.DatumSource.new(tt(r));
1409
- const e = F(r);
1402
+ return n.DatumSource.new(Z(r));
1403
+ const e = M(r);
1410
1404
  if (e.output().has_plutus_data())
1411
- return i.DatumSource.new_ref_input(e.input());
1405
+ return n.DatumSource.new_ref_input(e.input());
1412
1406
  throw new Error(`No inline datum found in UTxO: ${e.input().transaction_id().to_hex()}`);
1413
- }, xe = (r, e) => i.EnterpriseAddress.new(r, i.StakeCredential.from_keyhash(e)), Ce = (r, e) => {
1407
+ }, xe = (r, e) => n.EnterpriseAddress.new(r, n.StakeCredential.from_keyhash(e)), Ce = (r, e) => {
1414
1408
  if (typeof r == "string")
1415
- return i.MintWitness.new_native_script(Dt(r));
1409
+ return n.MintWitness.new_native_script(Dt(r));
1416
1410
  if (e === void 0)
1417
1411
  throw new Error("Minting with plutus requires a redeemer to be defined");
1418
1412
  if (e.tag !== "MINT")
1419
1413
  throw new Error("Minting redeemer's tag must be defined as 'MINT'");
1420
- return i.MintWitness.new_plutus_script(Vt(r), Ht({
1414
+ return n.MintWitness.new_plutus_script(Rt(r), Mt({
1421
1415
  tag: "MINT",
1422
1416
  index: 0,
1423
- budget: at,
1417
+ budget: nt,
1424
1418
  data: {
1425
1419
  alternative: 0,
1426
1420
  fields: []
1427
1421
  },
1428
1422
  ...e
1429
1423
  }));
1430
- }, Ot = (r, e) => i.RewardAddress.new(r, i.StakeCredential.from_keyhash(e)), Vt = (r) => {
1424
+ }, Ot = (r, e) => n.RewardAddress.new(r, n.StakeCredential.from_keyhash(e)), Rt = (r) => {
1431
1425
  if ("code" in r)
1432
- return i.PlutusScriptSource.new(dt(r.code, r.version));
1433
- const e = F(r);
1426
+ return n.PlutusScriptSource.new(dt(r.code, r.version));
1427
+ const e = M(r);
1434
1428
  if (e.output().has_script_ref()) {
1435
1429
  const t = e.output().script_ref();
1436
1430
  if (t.is_plutus_script()) {
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]);
1431
+ const s = qe(t), a = dt(s.code, s.version).hash();
1432
+ return n.PlutusScriptSource.new_ref_input_with_lang_ver(a, e.input(), Y[s.version]);
1439
1433
  }
1440
1434
  }
1441
1435
  throw new Error(`No plutus script reference found in UTxO: ${e.input().transaction_id().to_hex()}`);
1442
1436
  }, xt = (r) => {
1443
- const e = i.ScriptPubkey.new(r);
1444
- return i.NativeScript.new_script_pubkey(e);
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(_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
- return i.TransactionBuilder.new(e);
1437
+ const e = n.ScriptPubkey.new(r);
1438
+ return n.NativeScript.new_script_pubkey(e);
1439
+ }, Et = (r = T) => {
1440
+ const e = n.TransactionBuilderConfigBuilder.new().coins_per_utxo_byte(n.BigNum.from_str(r.coinsPerUTxOSize)).ex_unit_prices(n.ExUnitPrices.new(_e(r.priceMem.toString()), _e(r.priceStep.toString()))).fee_algo(n.LinearFee.new(n.BigNum.from_str(r.minFeeA.toString()), n.BigNum.from_str(r.minFeeB.toString()))).key_deposit(n.BigNum.from_str(r.keyDeposit)).max_tx_size(r.maxTxSize).max_value_size(parseInt(r.maxValSize, 10)).pool_deposit(n.BigNum.from_str(r.poolDeposit)).build();
1441
+ return n.TransactionBuilder.new(e);
1448
1442
  }, we = (r) => {
1449
- const e = i.TxInputsBuilder.new();
1450
- return r.map((t) => t instanceof i.TransactionUnspentOutput ? t : F(t)).forEach((t) => {
1443
+ const e = n.TxInputsBuilder.new();
1444
+ return r.map((t) => t instanceof n.TransactionUnspentOutput ? t : M(t)).forEach((t) => {
1451
1445
  e.add_input(t.output().address(), t.input(), t.output().amount());
1452
1446
  }), e;
1453
1447
  }, Ct = (r) => {
1454
1448
  if (typeof r == "string")
1455
- return i.TransactionOutputBuilder.new().with_address(M(r));
1456
- let e = i.TransactionOutputBuilder.new().with_address(M(r.address));
1449
+ return n.TransactionOutputBuilder.new().with_address(K(r));
1450
+ let e = n.TransactionOutputBuilder.new().with_address(K(r.address));
1457
1451
  if (r.datum) {
1458
- const { value: t, inline: s } = r.datum, n = tt(t);
1459
- e = e.with_data_hash(i.hash_plutus_data(n)), s && (e = e.with_plutus_data(n));
1452
+ const { value: t, inline: s } = r.datum, a = Z(t);
1453
+ e = e.with_data_hash(n.hash_plutus_data(a)), s && (e = e.with_plutus_data(a));
1460
1454
  }
1461
1455
  if (r.script) {
1462
1456
  const t = ht(r.script);
@@ -1464,38 +1458,38 @@ const Ms = Ks, Hs = (r, e) => {
1464
1458
  }
1465
1459
  return e;
1466
1460
  }, et = (r) => {
1467
- const e = r.slice(0, V), t = r.includes(".") ? Q(r.split(".")[1]) : r.slice(V);
1461
+ const e = r.slice(0, R), t = r.includes(".") ? b(r.split(".")[1]) : r.slice(R);
1468
1462
  return { policyId: e, assetName: t };
1469
- }, h = (r) => G.isAxiosError(r) ? r.response ? JSON.stringify({
1463
+ }, h = (r) => tt.isAxiosError(r) ? r.response ? JSON.stringify({
1470
1464
  data: r.response.data,
1471
1465
  headers: r.response.headers,
1472
1466
  status: r.response.status
1473
- }) : r.request ? JSON.stringify(r.request) : r.message : JSON.stringify(r), hr = (r) => {
1474
- const e = tt(r);
1475
- return i.hash_plutus_data(e).to_hex();
1476
- }, lr = (r, e = Date.now()) => {
1467
+ }) : r.request ? JSON.stringify(r.request) : r.message : JSON.stringify(r), or = (r) => {
1468
+ const e = Z(r);
1469
+ return n.hash_plutus_data(e).to_hex();
1470
+ }, cr = (r, e = Date.now()) => {
1477
1471
  if (bt[r]) {
1478
- const [t, s, n, a] = bt[r];
1479
- return parseInt(i.BigNum.from_str(e.toString()).div_floor(i.BigNum.from_str("1000")).checked_sub(i.BigNum.from_str(n)).div_floor(i.BigNum.from_str(a)).checked_add(i.BigNum.from_str(t)).to_str(), 10);
1472
+ const [t, s, a, i] = bt[r];
1473
+ return parseInt(n.BigNum.from_str(e.toString()).div_floor(n.BigNum.from_str("1000")).checked_sub(n.BigNum.from_str(a)).div_floor(n.BigNum.from_str(i)).checked_add(n.BigNum.from_str(t)).to_str(), 10);
1480
1474
  }
1481
1475
  throw new Error(`Couldn't resolve EpochNo for network: ${r}`);
1482
- }, Ws = (r, e) => Ms.fromParts(_(r), _(e)).fingerprint(), gr = (r, e) => rs[r][e], Ar = (r) => Tt(r).hash().to_hex(), it = (r) => {
1476
+ }, Js = (r, e) => Hs.fromParts(_(r), _(e)).fingerprint(), ur = (r, e) => rs[r][e], dr = (r) => Tt(r).hash().to_hex(), it = (r) => {
1483
1477
  var e, t;
1484
1478
  try {
1485
1479
  const s = [
1486
1480
  (e = $t(r)) == null ? void 0 : e.payment_cred().to_keyhash(),
1487
1481
  (t = Oe(r)) == null ? void 0 : t.payment_cred().to_keyhash()
1488
- ].find((n) => n !== void 0);
1482
+ ].find((a) => a !== void 0);
1489
1483
  if (s !== void 0)
1490
1484
  return s.to_hex();
1491
1485
  throw new Error(`Couldn't resolve payment key hash from address: ${r}`);
1492
1486
  } catch (s) {
1493
1487
  throw new Error(`An error occurred during resolvePaymentKeyHash: ${s}.`);
1494
1488
  }
1495
- }, mr = (r, e = 0) => {
1489
+ }, hr = (r, e = 0) => {
1496
1490
  const t = dt(r.code, r.version);
1497
- return i.EnterpriseAddress.new(e, i.StakeCredential.from_scripthash(t.hash())).to_address().to_bech32();
1498
- }, Ir = (r) => {
1491
+ return n.EnterpriseAddress.new(e, n.StakeCredential.from_scripthash(t.hash())).to_address().to_bech32();
1492
+ }, lr = (r) => {
1499
1493
  try {
1500
1494
  const e = Oe(r), t = e == null ? void 0 : e.payment_cred().to_scripthash();
1501
1495
  if (t !== void 0)
@@ -1504,68 +1498,68 @@ const Ms = Ks, Hs = (r, e) => {
1504
1498
  } catch (e) {
1505
1499
  throw new Error(`An error occurred during resolveScriptHash: ${e}.`);
1506
1500
  }
1507
- }, pr = (r) => i.Ed25519KeyHash.from_hex(r).to_bech32("pool1"), fr = (r) => {
1508
- const e = Se(r.join(" ")), t = Ye(e), s = t.to_bech32();
1501
+ }, mr = (r) => n.Ed25519KeyHash.from_hex(r).to_bech32("pool1"), gr = (r) => {
1502
+ const e = Se(r.join(" ")), t = Le(e), s = t.to_bech32();
1509
1503
  return t.free(), s;
1510
- }, _r = (r) => ht(r).to_hex(), yr = (r, e = Date.now()) => {
1504
+ }, Ar = (r) => ht(r).to_hex(), Ir = (r, e = Date.now()) => {
1511
1505
  if (bt[r]) {
1512
- const [t, s, n] = bt[r];
1513
- return i.BigNum.from_str(e.toString()).div_floor(i.BigNum.from_str("1000")).checked_sub(i.BigNum.from_str(n)).checked_add(i.BigNum.from_str(s)).to_str();
1506
+ const [t, s, a] = bt[r];
1507
+ return n.BigNum.from_str(e.toString()).div_floor(n.BigNum.from_str("1000")).checked_sub(n.BigNum.from_str(a)).checked_add(n.BigNum.from_str(s)).to_str();
1514
1508
  }
1515
1509
  throw new Error(`Couldn't resolve SlotNo for network: ${r}`);
1516
1510
  }, Ut = (r) => {
1517
1511
  try {
1518
- const e = M(r), t = $t(r), s = t == null ? void 0 : t.stake_cred().to_keyhash();
1512
+ const e = K(r), t = $t(r), s = t == null ? void 0 : t.stake_cred().to_keyhash();
1519
1513
  if (s !== void 0)
1520
1514
  return Ot(e.network_id(), s).to_address().to_bech32();
1521
1515
  throw new Error(`Couldn't resolve reward address from address: ${r}`);
1522
1516
  } catch (e) {
1523
1517
  throw new Error(`An error occurred during resolveRewardAddress: ${e}.`);
1524
1518
  }
1525
- }, At = (r) => {
1519
+ }, gt = (r) => {
1526
1520
  var e, t;
1527
1521
  try {
1528
1522
  const s = [
1529
1523
  (e = $t(r)) == null ? void 0 : e.stake_cred().to_keyhash(),
1530
- (t = Ve(r)) == null ? void 0 : t.payment_cred().to_keyhash()
1531
- ].find((n) => n !== void 0);
1524
+ (t = Re(r)) == null ? void 0 : t.payment_cred().to_keyhash()
1525
+ ].find((a) => a !== void 0);
1532
1526
  if (s !== void 0)
1533
1527
  return s.to_hex();
1534
1528
  throw new Error(`Couldn't resolve stake key hash from address: ${r}`);
1535
1529
  } catch (s) {
1536
1530
  throw new Error(`An error occurred during resolveStakeKeyHash: ${s}.`);
1537
1531
  }
1538
- }, Le = (r, e = k.minFeeA, t = k.minFeeB) => (BigInt(e) * BigInt(r) + BigInt(t)).toString(), js = (r) => {
1539
- const e = K(r).body();
1540
- return i.hash_transaction(e).to_hex();
1541
- }, xr = (r = "", e = 32) => {
1532
+ }, Ge = (r, e = T.minFeeA, t = T.minFeeB) => (BigInt(e) * BigInt(r) + BigInt(t)).toString(), Ws = (r) => {
1533
+ const e = O(r).body();
1534
+ return n.hash_transaction(e).to_hex();
1535
+ }, pr = (r = "", e = 32) => {
1542
1536
  if (e <= 0 || e > 2048)
1543
1537
  throw new Error("Length must be bewteen 1 and 2048");
1544
1538
  const s = Be("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789")(e);
1545
- return Q(`${r}${s}`);
1546
- }, Ge = (r, e) => {
1539
+ return b(`${r}${s}`);
1540
+ }, $e = (r, e) => {
1547
1541
  const t = r.vkeys();
1548
1542
  if (t !== void 0) {
1549
1543
  const s = /* @__PURE__ */ new Set();
1550
- for (let a = 0; a < t.len(); a += 1)
1551
- s.add(t.get(a).to_hex());
1552
- for (let a = 0; a < e.len(); a += 1)
1553
- s.add(e.get(a).to_hex());
1554
- const n = i.Vkeywitnesses.new();
1555
- return s.forEach((a) => {
1556
- n.add(i.Vkeywitness.from_hex(a));
1557
- }), n;
1544
+ for (let i = 0; i < t.len(); i += 1)
1545
+ s.add(t.get(i).to_hex());
1546
+ for (let i = 0; i < e.len(); i += 1)
1547
+ s.add(e.get(i).to_hex());
1548
+ const a = n.Vkeywitnesses.new();
1549
+ return s.forEach((i) => {
1550
+ a.add(n.Vkeywitness.from_hex(i));
1551
+ }), a;
1558
1552
  }
1559
1553
  return e;
1560
- }, Cr = (r) => St(He(r)), wr = (r) => K(r).to_js_value();
1561
- class Br {
1554
+ }, fr = (r) => St(Me(r)), _r = (r) => O(r).to_js_value();
1555
+ class yr {
1562
1556
  _axiosInstance;
1563
1557
  constructor(...e) {
1564
1558
  if (typeof e[0] == "string" && e[0].startsWith("http"))
1565
- this._axiosInstance = G.create({ baseURL: e[0] });
1559
+ this._axiosInstance = tt.create({ baseURL: e[0] });
1566
1560
  else {
1567
1561
  const t = e[0], s = t.slice(0, 7);
1568
- this._axiosInstance = G.create({
1562
+ this._axiosInstance = tt.create({
1569
1563
  baseURL: `https://cardano-${s}.blockfrost.io/api/v${e[1] ?? 0}`,
1570
1564
  headers: { project_id: t }
1571
1565
  });
@@ -1574,8 +1568,8 @@ class Br {
1574
1568
  async fetchAccountInfo(e) {
1575
1569
  const t = e.startsWith("addr") ? Ut(e) : e;
1576
1570
  try {
1577
- const { data: s, status: n } = await this._axiosInstance.get(`accounts/${t}`);
1578
- if (n === 200)
1571
+ const { data: s, status: a } = await this._axiosInstance.get(`accounts/${t}`);
1572
+ if (a === 200)
1579
1573
  return {
1580
1574
  poolId: s.pool_id,
1581
1575
  active: s.active || s.active_epoch !== null,
@@ -1592,11 +1586,11 @@ class Br {
1592
1586
  if (e) {
1593
1587
  const { data: t, status: s } = await this._axiosInstance.get(`scripts/${e}`);
1594
1588
  if (s === 200) {
1595
- const n = t.type.startsWith("plutus") ? {
1589
+ const a = t.type.startsWith("plutus") ? {
1596
1590
  code: await this.fetchPlutusScriptCBOR(e),
1597
1591
  version: t.type.replace("plutus", "")
1598
1592
  } : await this.fetchNativeScriptJSON(e);
1599
- return ht(n).to_hex();
1593
+ return ht(a).to_hex();
1600
1594
  }
1601
1595
  throw h(t);
1602
1596
  }
@@ -1616,26 +1610,26 @@ class Br {
1616
1610
  }
1617
1611
  });
1618
1612
  async fetchAddressUTxOs(e, t) {
1619
- const s = t !== void 0 ? `/${t}` : "", n = `addresses/${e}/utxos` + s, a = async (o = 1, c = []) => {
1620
- const { data: u, status: d } = await this._axiosInstance.get(`${n}?page=${o}`);
1613
+ const s = t !== void 0 ? `/${t}` : "", a = `addresses/${e}/utxos` + s, i = async (o = 1, c = []) => {
1614
+ const { data: u, status: d } = await this._axiosInstance.get(`${a}?page=${o}`);
1621
1615
  if (d === 200)
1622
- return u.length > 0 ? a(o + 1, [
1616
+ return u.length > 0 ? i(o + 1, [
1623
1617
  ...c,
1624
1618
  ...await Promise.all(u.map((l) => this.toUTxO(l, l.tx_hash)))
1625
1619
  ]) : c;
1626
1620
  throw h(u);
1627
1621
  };
1628
1622
  try {
1629
- return await a();
1623
+ return await i();
1630
1624
  } catch {
1631
1625
  return [];
1632
1626
  }
1633
1627
  }
1634
1628
  async fetchAssetAddresses(e) {
1635
- const t = async (s = 1, n = []) => {
1636
- const { policyId: a, assetName: o } = et(e), { data: c, status: u } = await this._axiosInstance.get(`assets/${a}${o}/addresses?page=${s}`);
1629
+ const t = async (s = 1, a = []) => {
1630
+ const { policyId: i, assetName: o } = et(e), { data: c, status: u } = await this._axiosInstance.get(`assets/${i}${o}/addresses?page=${s}`);
1637
1631
  if (u === 200)
1638
- return c.length > 0 ? t(s + 1, [...n, ...c]) : n;
1632
+ return c.length > 0 ? t(s + 1, [...a, ...c]) : a;
1639
1633
  throw h(c);
1640
1634
  };
1641
1635
  try {
@@ -1646,12 +1640,12 @@ class Br {
1646
1640
  }
1647
1641
  async fetchAssetMetadata(e) {
1648
1642
  try {
1649
- const { policyId: t, assetName: s } = et(e), { data: n, status: a } = await this._axiosInstance.get(`assets/${t}${s}`);
1650
- if (a === 200)
1643
+ const { policyId: t, assetName: s } = et(e), { data: a, status: i } = await this._axiosInstance.get(`assets/${t}${s}`);
1644
+ if (i === 200)
1651
1645
  return {
1652
- ...n.onchain_metadata
1646
+ ...a.onchain_metadata
1653
1647
  };
1654
- throw h(n);
1648
+ throw h(a);
1655
1649
  } catch (t) {
1656
1650
  throw h(t);
1657
1651
  }
@@ -1684,12 +1678,12 @@ class Br {
1684
1678
  }
1685
1679
  async fetchCollectionAssets(e, t = 1) {
1686
1680
  try {
1687
- const { data: s, status: n } = await this._axiosInstance.get(`assets/policy/${e}?page=${t}`);
1688
- if (n === 200)
1681
+ const { data: s, status: a } = await this._axiosInstance.get(`assets/policy/${e}?page=${t}`);
1682
+ if (a === 200)
1689
1683
  return {
1690
- assets: s.map((a) => ({
1691
- unit: a.asset,
1692
- quantity: a.quantity
1684
+ assets: s.map((i) => ({
1685
+ unit: i.asset,
1686
+ quantity: i.quantity
1693
1687
  })),
1694
1688
  next: s.length === 100 ? t + 1 : null
1695
1689
  };
@@ -1700,8 +1694,8 @@ class Br {
1700
1694
  }
1701
1695
  async fetchHandleAddress(e) {
1702
1696
  try {
1703
- const t = Q(e.replace("$", "")), { data: s, status: n } = await this._axiosInstance.get(`assets/${Rt[1]}${t}/addresses`);
1704
- if (n === 200)
1697
+ const t = b(e.replace("$", "")), { data: s, status: a } = await this._axiosInstance.get(`assets/${qt[1]}${t}/addresses`);
1698
+ if (a === 200)
1705
1699
  return s[0].address;
1706
1700
  throw h(s);
1707
1701
  } catch (t) {
@@ -1763,10 +1757,10 @@ class Br {
1763
1757
  try {
1764
1758
  const { data: t, status: s } = await this._axiosInstance.get(`txs/${e}/utxos`);
1765
1759
  if (s === 200) {
1766
- const n = t.outputs, a = [];
1767
- return n.forEach((c) => {
1768
- a.push(this.toUTxO(c, e));
1769
- }), await Promise.all(a);
1760
+ const a = t.outputs, i = [];
1761
+ return a.forEach((c) => {
1762
+ i.push(this.toUTxO(c, e));
1763
+ }), await Promise.all(i);
1770
1764
  }
1771
1765
  throw h(t);
1772
1766
  } catch (t) {
@@ -1774,23 +1768,23 @@ class Br {
1774
1768
  }
1775
1769
  }
1776
1770
  onTxConfirmed(e, t, s = 100) {
1777
- let n = 0;
1778
- const a = setInterval(() => {
1779
- n >= s && clearInterval(a), this.fetchTxInfo(e).then((o) => {
1771
+ let a = 0;
1772
+ const i = setInterval(() => {
1773
+ a >= s && clearInterval(i), this.fetchTxInfo(e).then((o) => {
1780
1774
  this.fetchBlockInfo(o.block).then((c) => {
1781
- (c == null ? void 0 : c.confirmations) > 0 && (clearInterval(a), t());
1775
+ (c == null ? void 0 : c.confirmations) > 0 && (clearInterval(i), t());
1782
1776
  }).catch(() => {
1783
- n += 1;
1777
+ a += 1;
1784
1778
  });
1785
1779
  }).catch(() => {
1786
- n += 1;
1780
+ a += 1;
1787
1781
  });
1788
1782
  }, 5e3);
1789
1783
  }
1790
1784
  async submitTx(e) {
1791
1785
  try {
1792
- const t = { "Content-Type": "application/cbor" }, { data: s, status: n } = await this._axiosInstance.post("tx/submit", _(e), { headers: t });
1793
- if (n === 200)
1786
+ const t = { "Content-Type": "application/cbor" }, { data: s, status: a } = await this._axiosInstance.post("tx/submit", _(e), { headers: t });
1787
+ if (a === 200)
1794
1788
  return s;
1795
1789
  throw h(s);
1796
1790
  } catch (t) {
@@ -1810,35 +1804,35 @@ class Br {
1810
1804
  throw h(t);
1811
1805
  }
1812
1806
  }
1813
- class Sr {
1807
+ class xr {
1814
1808
  _axiosInstance;
1815
1809
  constructor(e, t, s) {
1816
- const n = s.host ?? "ipfs.infura.io", a = s.port ?? 5001, o = s.version ?? 0;
1817
- this._axiosInstance = G.create({
1818
- baseURL: `https://${n}:${a}/api/v${o}`,
1810
+ const a = s.host ?? "ipfs.infura.io", i = s.port ?? 5001, o = s.version ?? 0;
1811
+ this._axiosInstance = tt.create({
1812
+ baseURL: `https://${a}:${i}/api/v${o}`,
1819
1813
  auth: { username: e, password: t }
1820
1814
  });
1821
1815
  }
1822
1816
  async uploadContent(e, t = !1) {
1823
1817
  try {
1824
- const s = { "Content-Type": "multipart/form-data" }, { data: n, status: a } = await this._axiosInstance.post(`add?recursive=${t}`, e, { headers: s });
1825
- if (a === 200)
1826
- return n;
1827
- throw h(n);
1818
+ const s = { "Content-Type": "multipart/form-data" }, { data: a, status: i } = await this._axiosInstance.post(`add?recursive=${t}`, e, { headers: s });
1819
+ if (i === 200)
1820
+ return a;
1821
+ throw h(a);
1828
1822
  } catch (s) {
1829
1823
  throw h(s);
1830
1824
  }
1831
1825
  }
1832
1826
  }
1833
- class Er {
1827
+ class Cr {
1834
1828
  _axiosInstance;
1835
1829
  constructor(...e) {
1836
- typeof e[0] == "string" && e[0].startsWith("http") ? this._axiosInstance = G.create({
1830
+ typeof e[0] == "string" && e[0].startsWith("http") ? this._axiosInstance = tt.create({
1837
1831
  baseURL: e[0],
1838
1832
  headers: {
1839
1833
  Authorization: `Bearer ${e[1]}`
1840
1834
  }
1841
- }) : this._axiosInstance = G.create({
1835
+ }) : this._axiosInstance = tt.create({
1842
1836
  baseURL: `https://${e[0]}.koios.rest/api/v${e[2] ?? 0}`,
1843
1837
  headers: {
1844
1838
  Authorization: `Bearer ${e[1]}`
@@ -1847,10 +1841,10 @@ class Er {
1847
1841
  }
1848
1842
  async fetchAccountInfo(e) {
1849
1843
  try {
1850
- const t = e.startsWith("addr") ? Ut(e) : e, { data: s, status: n } = await this._axiosInstance.post("account_info", {
1844
+ const t = e.startsWith("addr") ? Ut(e) : e, { data: s, status: a } = await this._axiosInstance.post("account_info", {
1851
1845
  _stake_addresses: [t]
1852
1846
  });
1853
- if (n === 200)
1847
+ if (a === 200)
1854
1848
  return {
1855
1849
  poolId: s[0].delegated_pool,
1856
1850
  active: s[0].status === "registered",
@@ -1865,12 +1859,12 @@ class Er {
1865
1859
  }
1866
1860
  async fetchAddressUTxOs(e, t) {
1867
1861
  try {
1868
- const { data: s, status: n } = await this._axiosInstance.post("address_info", {
1862
+ const { data: s, status: a } = await this._axiosInstance.post("address_info", {
1869
1863
  _addresses: [e]
1870
1864
  });
1871
- if (n === 200) {
1872
- const a = s.flatMap((o) => o.utxo_set).map((o) => this.toUTxO(o, e));
1873
- return t !== void 0 ? a.filter((o) => o.output.amount.find((c) => c.unit === t) !== void 0) : a;
1865
+ if (a === 200) {
1866
+ const i = s.flatMap((o) => o.utxo_set).map((o) => this.toUTxO(o, e));
1867
+ return t !== void 0 ? i.filter((o) => o.output.amount.find((c) => c.unit === t) !== void 0) : i;
1874
1868
  }
1875
1869
  throw h(s);
1876
1870
  } catch {
@@ -1879,25 +1873,25 @@ class Er {
1879
1873
  }
1880
1874
  async fetchAssetAddresses(e) {
1881
1875
  try {
1882
- const { policyId: t, assetName: s } = et(e), { data: n, status: a } = await this._axiosInstance.get(`asset_address_list?_asset_policy=${t}&_asset_name=${s}`);
1883
- if (a === 200)
1884
- return n.map((o) => ({
1876
+ const { policyId: t, assetName: s } = et(e), { data: a, status: i } = await this._axiosInstance.get(`asset_address_list?_asset_policy=${t}&_asset_name=${s}`);
1877
+ if (i === 200)
1878
+ return a.map((o) => ({
1885
1879
  address: o.payment_address,
1886
1880
  quantity: o.quantity
1887
1881
  }));
1888
- throw h(n);
1882
+ throw h(a);
1889
1883
  } catch (t) {
1890
1884
  throw h(t);
1891
1885
  }
1892
1886
  }
1893
1887
  async fetchAssetMetadata(e) {
1894
1888
  try {
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
- if (a === 200)
1889
+ const { policyId: t, assetName: s } = et(e), { data: a, status: i } = await this._axiosInstance.get(`asset_info?_asset_policy=${t}&_asset_name=${s}`);
1890
+ if (i === 200)
1897
1891
  return {
1898
- ...n[0].minting_tx_metadata[721][t][zt(s)]
1892
+ ...a[0].minting_tx_metadata[721][t][zt(s)]
1899
1893
  };
1900
- throw h(n);
1894
+ throw h(a);
1901
1895
  } catch (t) {
1902
1896
  throw h(t);
1903
1897
  }
@@ -1932,12 +1926,12 @@ class Er {
1932
1926
  }
1933
1927
  async fetchCollectionAssets(e, t = 0) {
1934
1928
  try {
1935
- const { data: s, status: n } = await this._axiosInstance.get(`asset_policy_info?_asset_policy=${e}&limit=100&offset=${t}`);
1936
- if (n === 200)
1929
+ const { data: s, status: a } = await this._axiosInstance.get(`asset_policy_info?_asset_policy=${e}&limit=100&offset=${t}`);
1930
+ if (a === 200)
1937
1931
  return {
1938
- assets: s.map((a) => ({
1939
- unit: `${e}${a.asset_name}`,
1940
- quantity: a.total_supply
1932
+ assets: s.map((i) => ({
1933
+ unit: `${e}${i.asset_name}`,
1934
+ quantity: i.total_supply
1941
1935
  })),
1942
1936
  next: s.length === 100 ? t + 100 : null
1943
1937
  };
@@ -1948,8 +1942,8 @@ class Er {
1948
1942
  }
1949
1943
  async fetchHandleAddress(e) {
1950
1944
  try {
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
- if (n === 200)
1945
+ const t = b(e.replace("$", "")), { data: s, status: a } = await this._axiosInstance.get(`asset_address_list?_asset_policy=${qt[1]}&_asset_name=${t}`);
1946
+ if (a === 200)
1953
1947
  return s[0].payment_address;
1954
1948
  throw h(s);
1955
1949
  } catch (t) {
@@ -1990,24 +1984,24 @@ class Er {
1990
1984
  async fetchTxInfo(e) {
1991
1985
  var t, s;
1992
1986
  try {
1993
- const { data: n, status: a } = await this._axiosInstance.post("tx_info", {
1987
+ const { data: a, status: i } = await this._axiosInstance.post("tx_info", {
1994
1988
  _tx_hashes: [e]
1995
1989
  });
1996
- if (a === 200)
1990
+ if (i === 200)
1997
1991
  return {
1998
- block: n[0].block_hash,
1999
- deposit: n[0].deposit,
2000
- fees: n[0].fee,
2001
- hash: n[0].tx_hash,
2002
- index: n[0].tx_block_index,
2003
- invalidAfter: ((t = n[0].invalid_after) == null ? void 0 : t.toString()) ?? "",
2004
- invalidBefore: ((s = n[0].invalid_before) == null ? void 0 : s.toString()) ?? "",
2005
- slot: n[0].absolute_slot.toString(),
2006
- size: n[0].tx_size
1992
+ block: a[0].block_hash,
1993
+ deposit: a[0].deposit,
1994
+ fees: a[0].fee,
1995
+ hash: a[0].tx_hash,
1996
+ index: a[0].tx_block_index,
1997
+ invalidAfter: ((t = a[0].invalid_after) == null ? void 0 : t.toString()) ?? "",
1998
+ invalidBefore: ((s = a[0].invalid_before) == null ? void 0 : s.toString()) ?? "",
1999
+ slot: a[0].absolute_slot.toString(),
2000
+ size: a[0].tx_size
2007
2001
  };
2008
- throw h(n);
2009
- } catch (n) {
2010
- throw h(n);
2002
+ throw h(a);
2003
+ } catch (a) {
2004
+ throw h(a);
2011
2005
  }
2012
2006
  }
2013
2007
  async fetchUTxOs(e) {
@@ -2017,30 +2011,30 @@ class Er {
2017
2011
  _tx_hashes: [e]
2018
2012
  });
2019
2013
  if (s === 200)
2020
- return console.log(t[0]), t[0].outputs.map((a) => this.toUTxO(a, a.payment_addr.bech32));
2014
+ return console.log(t[0]), t[0].outputs.map((i) => this.toUTxO(i, i.payment_addr.bech32));
2021
2015
  throw h(t);
2022
2016
  } catch (t) {
2023
2017
  throw h(t);
2024
2018
  }
2025
2019
  }
2026
2020
  onTxConfirmed(e, t, s = 100) {
2027
- let n = 0;
2028
- const a = setInterval(() => {
2029
- n >= s && clearInterval(a), this.fetchTxInfo(e).then((o) => {
2021
+ let a = 0;
2022
+ const i = setInterval(() => {
2023
+ a >= s && clearInterval(i), this.fetchTxInfo(e).then((o) => {
2030
2024
  this.fetchBlockInfo(o.block).then((c) => {
2031
- (c == null ? void 0 : c.confirmations) > 0 && (clearInterval(a), t());
2025
+ (c == null ? void 0 : c.confirmations) > 0 && (clearInterval(i), t());
2032
2026
  }).catch(() => {
2033
- n += 1;
2027
+ a += 1;
2034
2028
  });
2035
2029
  }).catch(() => {
2036
- n += 1;
2030
+ a += 1;
2037
2031
  });
2038
2032
  }, 5e3);
2039
2033
  }
2040
2034
  async submitTx(e) {
2041
2035
  try {
2042
- const t = { "Content-Type": "application/cbor" }, { data: s, status: n } = await this._axiosInstance.post("submittx", _(e), { headers: t });
2043
- if (n === 202)
2036
+ const t = { "Content-Type": "application/cbor" }, { data: s, status: a } = await this._axiosInstance.post("submittx", _(e), { headers: t });
2037
+ if (a === 202)
2044
2038
  return s;
2045
2039
  throw h(s);
2046
2040
  } catch (t) {
@@ -2048,7 +2042,7 @@ class Er {
2048
2042
  }
2049
2043
  }
2050
2044
  toUTxO(e, t) {
2051
- var s, n;
2045
+ var s, a;
2052
2046
  return {
2053
2047
  input: {
2054
2048
  outputIndex: e.tx_index,
@@ -2058,15 +2052,15 @@ class Er {
2058
2052
  address: t,
2059
2053
  amount: [
2060
2054
  { unit: "lovelace", quantity: e.value },
2061
- ...e.asset_list.map((a) => ({
2062
- unit: `${a.policy_id}${a.asset_name}`,
2063
- quantity: `${a.quantity}`
2055
+ ...e.asset_list.map((i) => ({
2056
+ unit: `${i.policy_id}${i.asset_name}`,
2057
+ quantity: `${i.quantity}`
2064
2058
  }))
2065
2059
  ],
2066
2060
  dataHash: e.datum_hash ?? void 0,
2067
2061
  plutusData: ((s = e.inline_datum) == null ? void 0 : s.bytes) ?? void 0,
2068
2062
  scriptRef: this.resolveScriptRef(e.reference_script),
2069
- scriptHash: ((n = e.reference_script) == null ? void 0 : n.hash) ?? void 0
2063
+ scriptHash: ((a = e.reference_script) == null ? void 0 : a.hash) ?? void 0
2070
2064
  }
2071
2065
  };
2072
2066
  }
@@ -2080,19 +2074,19 @@ class Er {
2080
2074
  }
2081
2075
  };
2082
2076
  }
2083
- class br {
2077
+ class wr {
2084
2078
  _baseUrl;
2085
2079
  constructor(...e) {
2086
- this._baseUrl = es(e[0]) ? ns[e[0]] : e[0];
2080
+ this._baseUrl = es(e[0]) ? as[e[0]] : e[0];
2087
2081
  }
2088
2082
  async evaluateTx(e) {
2089
2083
  const t = await this.open();
2090
2084
  return this.send(t, "EvaluateTx", {
2091
2085
  evaluate: e
2092
- }), new Promise((s, n) => {
2093
- t.addEventListener("message", (a) => {
2086
+ }), new Promise((s, a) => {
2087
+ t.addEventListener("message", (i) => {
2094
2088
  try {
2095
- const { result: o } = JSON.parse(a.data);
2089
+ const { result: o } = JSON.parse(i.data);
2096
2090
  o.EvaluationResult ? s(Object.keys(o.EvaluationResult).map((c) => ({
2097
2091
  index: parseInt(c.split(":")[1], 10),
2098
2092
  tag: c.split(":")[0].toUpperCase(),
@@ -2100,9 +2094,9 @@ class br {
2100
2094
  mem: o.EvaluationResult[c].memory,
2101
2095
  steps: o.EvaluationResult[c].steps
2102
2096
  }
2103
- }))) : n(o.EvaluationFailure), t.close();
2097
+ }))) : a(o.EvaluationFailure), t.close();
2104
2098
  } catch (o) {
2105
- n(o);
2099
+ a(o);
2106
2100
  }
2107
2101
  }, { once: !0 });
2108
2102
  });
@@ -2110,23 +2104,23 @@ class br {
2110
2104
  async onNextTx(e) {
2111
2105
  const t = await this.open();
2112
2106
  return this.send(t, "AwaitAcquire", {}), t.addEventListener("message", (s) => {
2113
- const { result: n } = JSON.parse(s.data);
2114
- if (n === null)
2107
+ const { result: a } = JSON.parse(s.data);
2108
+ if (a === null)
2115
2109
  return this.send(t, "AwaitAcquire", {});
2116
- n.AwaitAcquired === void 0 && e(n), this.send(t, "NextTx", {});
2110
+ a.AwaitAcquired === void 0 && e(a), this.send(t, "NextTx", {});
2117
2111
  }), () => t.close();
2118
2112
  }
2119
2113
  async submitTx(e) {
2120
2114
  const t = await this.open();
2121
2115
  return this.send(t, "SubmitTx", {
2122
2116
  submit: e
2123
- }), new Promise((s, n) => {
2124
- t.addEventListener("message", (a) => {
2117
+ }), new Promise((s, a) => {
2118
+ t.addEventListener("message", (i) => {
2125
2119
  try {
2126
- const { result: o } = JSON.parse(a.data);
2127
- o.SubmitSuccess ? s(o.SubmitSuccess.txId) : n(o.SubmitFail), t.close();
2120
+ const { result: o } = JSON.parse(i.data);
2121
+ o.SubmitSuccess ? s(o.SubmitSuccess.txId) : a(o.SubmitFail), t.close();
2128
2122
  } catch (o) {
2129
- n(o);
2123
+ a(o);
2130
2124
  }
2131
2125
  }, { once: !0 });
2132
2126
  });
@@ -2147,11 +2141,11 @@ class br {
2147
2141
  }));
2148
2142
  }
2149
2143
  }
2150
- class Qr {
2144
+ class Br {
2151
2145
  _axiosInstance;
2152
- constructor(e, t, s, n = 1) {
2153
- this._axiosInstance = G.create({
2154
- baseURL: `https://cardano-${e}.tangocrypto.com/${t}/v${n}`,
2146
+ constructor(e, t, s, a = 1) {
2147
+ this._axiosInstance = tt.create({
2148
+ baseURL: `https://cardano-${e}.tangocrypto.com/${t}/v${a}`,
2155
2149
  headers: { "x-api-key": s }
2156
2150
  });
2157
2151
  }
@@ -2159,12 +2153,12 @@ class Qr {
2159
2153
  try {
2160
2154
  const { data: t, status: s } = await this._axiosInstance.post("transactions/evaluate", { tx: e, utxos: [] });
2161
2155
  if (s === 200)
2162
- return t.redeemers.map((n) => ({
2163
- index: n.index,
2164
- tag: n.purpose.toUpperCase(),
2156
+ return t.redeemers.map((a) => ({
2157
+ index: a.index,
2158
+ tag: a.purpose.toUpperCase(),
2165
2159
  budget: {
2166
- mem: n.unit_mem,
2167
- steps: n.unit_steps
2160
+ mem: a.unit_mem,
2161
+ steps: a.unit_steps
2168
2162
  }
2169
2163
  }));
2170
2164
  throw h(t);
@@ -2174,8 +2168,8 @@ class Qr {
2174
2168
  }
2175
2169
  async fetchAccountInfo(e) {
2176
2170
  try {
2177
- const t = e.startsWith("addr") ? Ut(e) : e, { data: s, status: n } = await this._axiosInstance.get(`wallets/${t}`);
2178
- if (n === 200)
2171
+ const t = e.startsWith("addr") ? Ut(e) : e, { data: s, status: a } = await this._axiosInstance.get(`wallets/${t}`);
2172
+ if (a === 200)
2179
2173
  return {
2180
2174
  poolId: s.pool_id,
2181
2175
  active: s.active,
@@ -2189,26 +2183,26 @@ class Qr {
2189
2183
  }
2190
2184
  }
2191
2185
  async fetchAddressUTxOs(e, t) {
2192
- const s = t !== void 0 ? `/assets/${t}` : "", n = `addresses/${e}${s}/utxos?size=50`, a = async (d = "", l = []) => {
2193
- var m;
2194
- const { data: g, status: A } = await this._axiosInstance.get(`${n}&cursor=${d}`);
2195
- if (A === 200)
2196
- return g.cursor !== null && ((m = g.cursor) == null ? void 0 : m.length) > 0 ? a(g.cursor, [...l, ...g.data.map(u)]) : g.data.map(u);
2197
- throw h(g);
2186
+ const s = t !== void 0 ? `/assets/${t}` : "", a = `addresses/${e}${s}/utxos?size=50`, i = async (d = "", l = []) => {
2187
+ var A;
2188
+ const { data: m, status: g } = await this._axiosInstance.get(`${a}&cursor=${d}`);
2189
+ if (g === 200)
2190
+ return m.cursor !== null && ((A = m.cursor) == null ? void 0 : A.length) > 0 ? i(m.cursor, [...l, ...m.data.map(u)]) : m.data.map(u);
2191
+ throw h(m);
2198
2192
  }, o = (d, l) => {
2199
- const g = [
2193
+ const m = [
2200
2194
  {
2201
2195
  unit: "lovelace",
2202
2196
  quantity: d.toString()
2203
2197
  }
2204
2198
  ];
2205
- return l.forEach((A) => {
2206
- const m = Q(A.asset_name);
2207
- g.push({
2208
- unit: `${A.policy_id}${m}`,
2209
- quantity: A.quantity.toString()
2199
+ return l.forEach((g) => {
2200
+ const A = b(g.asset_name);
2201
+ m.push({
2202
+ unit: `${g.policy_id}${A}`,
2203
+ quantity: g.quantity.toString()
2210
2204
  });
2211
- }), g;
2205
+ }), m;
2212
2206
  }, c = (d) => {
2213
2207
  if (d) {
2214
2208
  const l = d.type.startsWith("plutus") ? {
@@ -2234,21 +2228,21 @@ class Qr {
2234
2228
  };
2235
2229
  };
2236
2230
  try {
2237
- return await a();
2231
+ return await i();
2238
2232
  } catch {
2239
2233
  return [];
2240
2234
  }
2241
2235
  }
2242
2236
  async fetchAssetAddresses(e) {
2243
- const t = (n) => ({
2244
- address: n.address,
2245
- quantity: n.quantity.toString()
2246
- }), s = async (n = "", a = []) => {
2237
+ const t = (a) => ({
2238
+ address: a.address,
2239
+ quantity: a.quantity.toString()
2240
+ }), s = async (a = "", i = []) => {
2247
2241
  var l;
2248
- const { policyId: o, assetName: c } = et(e), { data: u, status: d } = await this._axiosInstance.get(`assets/${o}${c}/addresses?size=100&cursor=${n}`);
2242
+ const { policyId: o, assetName: c } = et(e), { data: u, status: d } = await this._axiosInstance.get(`assets/${o}${c}/addresses?size=100&cursor=${a}`);
2249
2243
  if (d === 200)
2250
2244
  return u.cursor !== null && ((l = u.cursor) == null ? void 0 : l.length) > 0 ? s(u.cursor, [
2251
- ...a,
2245
+ ...i,
2252
2246
  ...u.data.map(t)
2253
2247
  ]) : u.data.map(t);
2254
2248
  throw h(u);
@@ -2262,12 +2256,12 @@ class Qr {
2262
2256
  async fetchAssetMetadata(e) {
2263
2257
  var t;
2264
2258
  try {
2265
- const { policyId: s, assetName: n } = et(e), { data: a, status: o } = await this._axiosInstance.get(`assets/${s}${n}`);
2259
+ const { policyId: s, assetName: a } = et(e), { data: i, status: o } = await this._axiosInstance.get(`assets/${s}${a}`);
2266
2260
  if (o === 200)
2267
2261
  return {
2268
- ...(t = a.metadata.find((c) => c.label === 721)) == null ? void 0 : t.json[s][zt(n)]
2262
+ ...(t = i.metadata.find((c) => c.label === 721)) == null ? void 0 : t.json[s][zt(a)]
2269
2263
  };
2270
- throw h(a);
2264
+ throw h(i);
2271
2265
  } catch (s) {
2272
2266
  throw h(s);
2273
2267
  }
@@ -2300,12 +2294,12 @@ class Qr {
2300
2294
  }
2301
2295
  async fetchCollectionAssets(e, t = "") {
2302
2296
  try {
2303
- const { data: s, status: n } = await this._axiosInstance.get(`policies/${e}/assets?size=100&cursor=${t}`);
2304
- if (n === 200)
2297
+ const { data: s, status: a } = await this._axiosInstance.get(`policies/${e}/assets?size=100&cursor=${t}`);
2298
+ if (a === 200)
2305
2299
  return {
2306
- assets: s.data.map((a) => ({
2307
- unit: `${a.policy_id}${a.asset_name}`,
2308
- quantity: a.quantity
2300
+ assets: s.data.map((i) => ({
2301
+ unit: `${i.policy_id}${i.asset_name}`,
2302
+ quantity: i.quantity
2309
2303
  })),
2310
2304
  next: s.cursor
2311
2305
  };
@@ -2316,8 +2310,8 @@ class Qr {
2316
2310
  }
2317
2311
  async fetchHandleAddress(e) {
2318
2312
  try {
2319
- const t = Q(e.replace("$", "")), { data: s, status: n } = await this._axiosInstance.get(`assets/${Rt[1]}${t}/addresses`);
2320
- if (n === 200)
2313
+ const t = b(e.replace("$", "")), { data: s, status: a } = await this._axiosInstance.get(`assets/${qt[1]}${t}/addresses`);
2314
+ if (a === 200)
2321
2315
  return s.data[0].address;
2322
2316
  throw h(s);
2323
2317
  } catch (t) {
@@ -2377,29 +2371,29 @@ class Qr {
2377
2371
  }
2378
2372
  async fetchUTxOs(e) {
2379
2373
  try {
2380
- return [];
2374
+ return console.log(e), [];
2381
2375
  } catch (t) {
2382
2376
  throw h(t);
2383
2377
  }
2384
2378
  }
2385
2379
  onTxConfirmed(e, t, s = 100) {
2386
- let n = 0;
2387
- const a = setInterval(() => {
2388
- n >= s && clearInterval(a), this.fetchTxInfo(e).then((o) => {
2380
+ let a = 0;
2381
+ const i = setInterval(() => {
2382
+ a >= s && clearInterval(i), this.fetchTxInfo(e).then((o) => {
2389
2383
  this.fetchBlockInfo(o.block).then((c) => {
2390
- (c == null ? void 0 : c.confirmations) > 0 && (clearInterval(a), t());
2384
+ (c == null ? void 0 : c.confirmations) > 0 && (clearInterval(i), t());
2391
2385
  }).catch(() => {
2392
- n += 1;
2386
+ a += 1;
2393
2387
  });
2394
2388
  }).catch(() => {
2395
- n += 1;
2389
+ a += 1;
2396
2390
  });
2397
2391
  }, 5e3);
2398
2392
  }
2399
2393
  async submitTx(e) {
2400
2394
  try {
2401
- const t = { "Content-Type": "application/json" }, { data: s, status: n } = await this._axiosInstance.post("transactions/submit", { tx: e }, { headers: t });
2402
- if (n === 200)
2395
+ const t = { "Content-Type": "application/json" }, { data: s, status: a } = await this._axiosInstance.post("transactions/submit", { tx: e }, { headers: t });
2396
+ if (a === 200)
2403
2397
  return s.tx_id;
2404
2398
  throw h(s);
2405
2399
  } catch (t) {
@@ -2407,7 +2401,7 @@ class Qr {
2407
2401
  }
2408
2402
  }
2409
2403
  }
2410
- class vr {
2404
+ class Sr {
2411
2405
  _axiosInstance;
2412
2406
  _amountsAsStrings = {
2413
2407
  headers: {
@@ -2416,7 +2410,7 @@ class vr {
2416
2410
  };
2417
2411
  submitUrl;
2418
2412
  constructor({ network: e, apiKey: t, turboSubmit: s = !1 }) {
2419
- this._axiosInstance = G.create({
2413
+ this._axiosInstance = tt.create({
2420
2414
  baseURL: `https://${e}.gomaestro-api.org/v1`,
2421
2415
  headers: { "api-key": t }
2422
2416
  }), this.submitUrl = s ? "txmanager/turbosubmit" : "txmanager";
@@ -2425,14 +2419,14 @@ class vr {
2425
2419
  try {
2426
2420
  const { data: t, status: s } = await this._axiosInstance.post("transactions/evaluate", { cbor: e });
2427
2421
  if (s === 200) {
2428
- const n = {
2422
+ const a = {
2429
2423
  spend: "SPEND",
2430
2424
  mint: "MINT",
2431
2425
  cert: "CERT",
2432
2426
  wdrl: "REWARD"
2433
2427
  };
2434
2428
  return t.map((o) => {
2435
- const c = o.ex_units, u = o.redeemer_index, d = n[o.redeemer_tag];
2429
+ const c = o.ex_units, u = o.redeemer_index, d = a[o.redeemer_tag];
2436
2430
  return { budget: c, index: u, tag: d };
2437
2431
  });
2438
2432
  }
@@ -2444,15 +2438,15 @@ class vr {
2444
2438
  async fetchAccountInfo(e) {
2445
2439
  const t = e.startsWith("addr") ? Ut(e) : e;
2446
2440
  try {
2447
- const { data: s, status: n } = await this._axiosInstance.get(`accounts/${t}`, this._amountsAsStrings);
2448
- if (n === 200) {
2449
- const a = s.data;
2441
+ const { data: s, status: a } = await this._axiosInstance.get(`accounts/${t}`, this._amountsAsStrings);
2442
+ if (a === 200) {
2443
+ const i = s.data;
2450
2444
  return {
2451
- poolId: a.delegated_pool,
2452
- active: a.registered,
2453
- balance: a.total_balance,
2454
- rewards: a.rewards_available,
2455
- withdrawals: a.total_withdrawn
2445
+ poolId: i.delegated_pool,
2446
+ active: i.registered,
2447
+ balance: i.total_balance,
2448
+ rewards: i.rewards_available,
2449
+ withdrawals: i.total_withdrawn
2456
2450
  };
2457
2451
  }
2458
2452
  throw h(s);
@@ -2461,49 +2455,49 @@ class vr {
2461
2455
  }
2462
2456
  }
2463
2457
  async fetchAddressUTxOs(e, t) {
2464
- const s = (() => e.startsWith("addr_vkh") || e.startsWith("addr_shared_vkh") ? `addresses/cred/${e}` : `addresses/${e}`)(), n = t ? `&asset=${t}` : "", a = async (o = null, c = []) => {
2465
- const u = o === null ? "" : `&cursor=${o}`, { data: d, status: l } = await this._axiosInstance.get(`${s}/utxos?count=100${n}${u}`, this._amountsAsStrings);
2458
+ const s = (() => e.startsWith("addr_vkh") || e.startsWith("addr_shared_vkh") ? `addresses/cred/${e}` : `addresses/${e}`)(), a = t ? `&asset=${t}` : "", i = async (o = null, c = []) => {
2459
+ const u = o === null ? "" : `&cursor=${o}`, { data: d, status: l } = await this._axiosInstance.get(`${s}/utxos?count=100${a}${u}`, this._amountsAsStrings);
2466
2460
  if (l === 200) {
2467
- const A = d.data.map(this.toUTxO), m = [...c, ...A], p = d.next_cursor;
2468
- return p == null ? m : a(p, m);
2461
+ const g = d.data.map(this.toUTxO), A = [...c, ...g], I = d.next_cursor;
2462
+ return I == null ? A : i(I, A);
2469
2463
  }
2470
2464
  throw h(d);
2471
2465
  };
2472
2466
  try {
2473
- return await a();
2467
+ return await i();
2474
2468
  } catch {
2475
2469
  return [];
2476
2470
  }
2477
2471
  }
2478
2472
  async fetchAssetAddresses(e) {
2479
- const { policyId: t, assetName: s } = et(e), n = async (a = null, o = []) => {
2480
- const c = a === null ? "" : `&cursor=${a}`, { data: u, status: d } = await this._axiosInstance.get(`assets/${t}${s}/addresses?count=100${c}`, this._amountsAsStrings);
2473
+ const { policyId: t, assetName: s } = et(e), a = async (i = null, o = []) => {
2474
+ const c = i === null ? "" : `&cursor=${i}`, { data: u, status: d } = await this._axiosInstance.get(`assets/${t}${s}/addresses?count=100${c}`, this._amountsAsStrings);
2481
2475
  if (d === 200) {
2482
- const g = u.data.map((p) => ({ address: p.address, quantity: p.amount })), A = u.next_cursor, m = [
2476
+ const m = u.data.map((I) => ({ address: I.address, quantity: I.amount })), g = u.next_cursor, A = [
2483
2477
  ...o,
2484
- ...g
2478
+ ...m
2485
2479
  ];
2486
- return A == null ? m : n(A, m);
2480
+ return g == null ? A : a(g, A);
2487
2481
  }
2488
2482
  throw h(u);
2489
2483
  };
2490
2484
  try {
2491
- return await n();
2485
+ return await a();
2492
2486
  } catch {
2493
2487
  return [];
2494
2488
  }
2495
2489
  }
2496
2490
  async fetchAssetMetadata(e) {
2497
2491
  try {
2498
- const { policyId: t, assetName: s } = et(e), { data: n, status: a } = await this._axiosInstance.get(`assets/${t}${s}`);
2499
- if (a === 200) {
2500
- const o = n.data;
2492
+ const { policyId: t, assetName: s } = et(e), { data: a, status: i } = await this._axiosInstance.get(`assets/${t}${s}`);
2493
+ if (i === 200) {
2494
+ const o = a.data;
2501
2495
  return {
2502
2496
  ...o.asset_standards.cip25_metadata,
2503
2497
  ...o.asset_standards.cip68_metadata
2504
2498
  };
2505
2499
  }
2506
- throw h(n);
2500
+ throw h(a);
2507
2501
  } catch (t) {
2508
2502
  throw h(t);
2509
2503
  }
@@ -2511,25 +2505,25 @@ class vr {
2511
2505
  async fetchBlockInfo(e) {
2512
2506
  var t;
2513
2507
  try {
2514
- const { data: s, status: n } = await this._axiosInstance.get(`blocks/${e}`, this._amountsAsStrings);
2515
- if (n === 200) {
2516
- const a = s.data;
2508
+ const { data: s, status: a } = await this._axiosInstance.get(`blocks/${e}`, this._amountsAsStrings);
2509
+ if (a === 200) {
2510
+ const i = s.data;
2517
2511
  return {
2518
- confirmations: a.confirmations,
2519
- epoch: a.epoch,
2520
- epochSlot: a.epoch_slot.toString(),
2521
- fees: a.total_fees,
2522
- hash: a.hash,
2523
- nextBlock: a.next_block ?? "",
2524
- operationalCertificate: (t = a.operational_certificate) == null ? void 0 : t.hot_vkey,
2525
- output: a.total_output_lovelace ?? "0",
2526
- previousBlock: a.previous_block,
2527
- size: a.size,
2528
- slot: a.absolute_slot.toString(),
2529
- slotLeader: a.block_producer ?? "",
2530
- time: Date.parse(a.timestamp) / 1e3,
2531
- txCount: a.tx_hashes.length,
2532
- VRFKey: i.VRFVKey.from_hex(a.vrf_key).to_bech32("vrf_vk")
2512
+ confirmations: i.confirmations,
2513
+ epoch: i.epoch,
2514
+ epochSlot: i.epoch_slot.toString(),
2515
+ fees: i.total_fees,
2516
+ hash: i.hash,
2517
+ nextBlock: i.next_block ?? "",
2518
+ operationalCertificate: (t = i.operational_certificate) == null ? void 0 : t.hot_vkey,
2519
+ output: i.total_output_lovelace ?? "0",
2520
+ previousBlock: i.previous_block,
2521
+ size: i.size,
2522
+ slot: i.absolute_slot.toString(),
2523
+ slotLeader: i.block_producer ?? "",
2524
+ time: Date.parse(i.timestamp) / 1e3,
2525
+ txCount: i.tx_hashes.length,
2526
+ VRFKey: n.VRFVKey.from_hex(i.vrf_key).to_bech32("vrf_vk")
2533
2527
  };
2534
2528
  }
2535
2529
  throw h(s);
@@ -2539,8 +2533,8 @@ class vr {
2539
2533
  }
2540
2534
  async fetchCollectionAssets(e, t) {
2541
2535
  try {
2542
- const { data: s, status: n } = await this._axiosInstance.get(`policy/${e}/assets?count=100${t ? `&cursor=${t}` : ""}`);
2543
- if (n === 200)
2536
+ const { data: s, status: a } = await this._axiosInstance.get(`policy/${e}/assets?count=100${t ? `&cursor=${t}` : ""}`);
2537
+ if (a === 200)
2544
2538
  return {
2545
2539
  assets: s.data.map((o) => ({
2546
2540
  unit: e + o.asset_name,
@@ -2555,8 +2549,8 @@ class vr {
2555
2549
  }
2556
2550
  async fetchHandleAddress(e) {
2557
2551
  try {
2558
- const t = e.charAt(0) === "$" ? e.substring(1) : e, { data: s, status: n } = await this._axiosInstance.get(`ecosystem/adahandle/${t}`);
2559
- if (n === 200)
2552
+ const t = e.charAt(0) === "$" ? e.substring(1) : e, { data: s, status: a } = await this._axiosInstance.get(`ecosystem/adahandle/${t}`);
2553
+ if (a === 200)
2560
2554
  return s.data;
2561
2555
  throw h(s);
2562
2556
  } catch (t) {
@@ -2567,38 +2561,38 @@ class vr {
2567
2561
  if (!isNaN(e))
2568
2562
  throw new Error("Maestro only supports fetching Protocol parameters of the latest completed epoch.");
2569
2563
  const t = (s) => {
2570
- const n = s.indexOf("/");
2571
- return parseInt(s.slice(0, n)) / parseInt(s.slice(n + 1));
2564
+ const a = s.indexOf("/");
2565
+ return parseInt(s.slice(0, a)) / parseInt(s.slice(a + 1));
2572
2566
  };
2573
2567
  try {
2574
- const { data: s, status: n } = await this._axiosInstance.get("protocol-params");
2575
- if (n === 200) {
2576
- const a = s.data;
2568
+ const { data: s, status: a } = await this._axiosInstance.get("protocol-params");
2569
+ if (a === 200) {
2570
+ const i = s.data;
2577
2571
  try {
2578
2572
  const { data: o, status: c } = await this._axiosInstance.get("epochs/current");
2579
2573
  if (c === 200) {
2580
2574
  const u = o.data;
2581
2575
  return {
2582
- coinsPerUTxOSize: a.coins_per_utxo_byte.toString(),
2583
- collateralPercent: parseInt(a.collateral_percentage),
2576
+ coinsPerUTxOSize: i.coins_per_utxo_byte.toString(),
2577
+ collateralPercent: parseInt(i.collateral_percentage),
2584
2578
  decentralisation: 0,
2585
2579
  epoch: parseInt(u.epoch_no),
2586
- keyDeposit: a.stake_key_deposit.toString(),
2587
- maxBlockExMem: a.max_execution_units_per_block.memory.toString(),
2588
- maxBlockExSteps: a.max_execution_units_per_block.steps.toString(),
2589
- maxBlockHeaderSize: parseInt(a.max_block_header_size),
2590
- maxBlockSize: parseInt(a.max_block_body_size),
2591
- maxCollateralInputs: parseInt(a.max_collateral_inputs),
2592
- maxTxExMem: a.max_execution_units_per_transaction.memory.toString(),
2593
- maxTxExSteps: a.max_execution_units_per_transaction.steps.toString(),
2594
- maxTxSize: parseInt(a.max_tx_size),
2595
- maxValSize: a.max_value_size.toString(),
2596
- minFeeA: a.min_fee_coefficient,
2597
- minFeeB: a.min_fee_constant,
2598
- minPoolCost: a.min_pool_cost.toString(),
2599
- poolDeposit: a.pool_deposit.toString(),
2600
- priceMem: t(a.prices.memory),
2601
- priceStep: t(a.prices.steps)
2580
+ keyDeposit: i.stake_key_deposit.toString(),
2581
+ maxBlockExMem: i.max_execution_units_per_block.memory.toString(),
2582
+ maxBlockExSteps: i.max_execution_units_per_block.steps.toString(),
2583
+ maxBlockHeaderSize: parseInt(i.max_block_header_size),
2584
+ maxBlockSize: parseInt(i.max_block_body_size),
2585
+ maxCollateralInputs: parseInt(i.max_collateral_inputs),
2586
+ maxTxExMem: i.max_execution_units_per_transaction.memory.toString(),
2587
+ maxTxExSteps: i.max_execution_units_per_transaction.steps.toString(),
2588
+ maxTxSize: parseInt(i.max_tx_size),
2589
+ maxValSize: i.max_value_size.toString(),
2590
+ minFeeA: i.min_fee_coefficient,
2591
+ minFeeB: i.min_fee_constant,
2592
+ minPoolCost: i.min_pool_cost.toString(),
2593
+ poolDeposit: i.pool_deposit.toString(),
2594
+ priceMem: t(i.prices.memory),
2595
+ priceStep: t(i.prices.steps)
2602
2596
  };
2603
2597
  }
2604
2598
  throw h(o);
@@ -2615,17 +2609,17 @@ class vr {
2615
2609
  try {
2616
2610
  const { data: t, status: s } = await this._axiosInstance.get(`transactions/${e}`);
2617
2611
  if (s === 200) {
2618
- const n = t.data;
2612
+ const a = t.data;
2619
2613
  return {
2620
- block: n.block_hash,
2621
- deposit: n.deposit.toString(),
2622
- fees: n.fee.toString(),
2623
- hash: n.tx_hash,
2624
- index: n.block_tx_index,
2625
- invalidAfter: n.invalid_hereafter ?? "",
2626
- invalidBefore: n.invalid_before ?? "",
2627
- slot: n.block_absolute_slot.toString(),
2628
- size: n.size - 1
2614
+ block: a.block_hash,
2615
+ deposit: a.deposit.toString(),
2616
+ fees: a.fee.toString(),
2617
+ hash: a.tx_hash,
2618
+ index: a.block_tx_index,
2619
+ invalidAfter: a.invalid_hereafter ?? "",
2620
+ invalidBefore: a.invalid_before ?? "",
2621
+ slot: a.block_absolute_slot.toString(),
2622
+ size: a.size - 1
2629
2623
  };
2630
2624
  }
2631
2625
  throw h(t);
@@ -2644,23 +2638,23 @@ class vr {
2644
2638
  }
2645
2639
  }
2646
2640
  onTxConfirmed(e, t, s = 100) {
2647
- let n = 0;
2648
- const a = setInterval(() => {
2649
- n >= s && clearInterval(a), this.fetchTxInfo(e).then((o) => {
2641
+ let a = 0;
2642
+ const i = setInterval(() => {
2643
+ a >= s && clearInterval(i), this.fetchTxInfo(e).then((o) => {
2650
2644
  this.fetchBlockInfo(o.block).then((c) => {
2651
- (c == null ? void 0 : c.confirmations) > 0 && (clearInterval(a), t());
2645
+ (c == null ? void 0 : c.confirmations) > 0 && (clearInterval(i), t());
2652
2646
  }).catch(() => {
2653
- n += 1;
2647
+ a += 1;
2654
2648
  });
2655
2649
  }).catch(() => {
2656
- n += 1;
2650
+ a += 1;
2657
2651
  });
2658
2652
  }, 5e3);
2659
2653
  }
2660
2654
  async submitTx(e) {
2661
2655
  try {
2662
- const t = { "Content-Type": "application/cbor" }, { data: s, status: n } = await this._axiosInstance.post(this.submitUrl, _(e), { headers: t });
2663
- if (n === 202)
2656
+ const t = { "Content-Type": "application/cbor" }, { data: s, status: a } = await this._axiosInstance.post(this.submitUrl, _(e), { headers: t });
2657
+ if (a === 202)
2664
2658
  return s;
2665
2659
  throw h(s);
2666
2660
  } catch (t) {
@@ -2668,7 +2662,7 @@ class vr {
2668
2662
  }
2669
2663
  }
2670
2664
  toUTxO = (e) => {
2671
- var t, s, n;
2665
+ var t, s, a;
2672
2666
  return {
2673
2667
  input: {
2674
2668
  outputIndex: e.index,
@@ -2676,14 +2670,14 @@ class vr {
2676
2670
  },
2677
2671
  output: {
2678
2672
  address: e.address,
2679
- amount: e.assets.map((a) => ({
2680
- unit: a.unit,
2681
- quantity: a.amount
2673
+ amount: e.assets.map((i) => ({
2674
+ unit: i.unit,
2675
+ quantity: i.amount
2682
2676
  })),
2683
2677
  dataHash: (t = e.datum) == null ? void 0 : t.hash,
2684
2678
  plutusData: (s = e.datum) == null ? void 0 : s.bytes,
2685
2679
  scriptRef: this.resolveScript(e),
2686
- scriptHash: (n = e.reference_script) == null ? void 0 : n.hash
2680
+ scriptHash: (a = e.reference_script) == null ? void 0 : a.hash
2687
2681
  }
2688
2682
  };
2689
2683
  };
@@ -2698,58 +2692,58 @@ class vr {
2698
2692
  return;
2699
2693
  };
2700
2694
  }
2701
- class Dr {
2695
+ class Er {
2702
2696
  static withOneSignature(e) {
2703
- const t = O(it(e));
2697
+ const t = F(it(e));
2704
2698
  return xt(t).to_hex();
2705
2699
  }
2706
2700
  static withAtLeastNSignatures(e, t) {
2707
- const s = i.NativeScripts.new();
2708
- e.forEach((a) => {
2709
- const o = O(it(a));
2701
+ const s = n.NativeScripts.new();
2702
+ e.forEach((i) => {
2703
+ const o = F(it(i));
2710
2704
  s.add(xt(o));
2711
2705
  });
2712
- const n = i.ScriptNOfK.new(t, s);
2713
- return i.NativeScript.new_script_any(n).to_hex();
2706
+ const a = n.ScriptNOfK.new(t, s);
2707
+ return n.NativeScript.new_script_any(a).to_hex();
2714
2708
  }
2715
2709
  static withAnySignature(e) {
2716
- const t = i.NativeScripts.new();
2717
- e.forEach((n) => {
2718
- const a = O(it(n));
2719
- t.add(xt(a));
2710
+ const t = n.NativeScripts.new();
2711
+ e.forEach((a) => {
2712
+ const i = F(it(a));
2713
+ t.add(xt(i));
2720
2714
  });
2721
- const s = i.ScriptAny.new(t);
2722
- return i.NativeScript.new_script_any(s).to_hex();
2715
+ const s = n.ScriptAny.new(t);
2716
+ return n.NativeScript.new_script_any(s).to_hex();
2723
2717
  }
2724
2718
  static withAllSignatures(e) {
2725
- const t = i.NativeScripts.new();
2726
- e.forEach((n) => {
2727
- const a = O(it(n));
2728
- t.add(xt(a));
2719
+ const t = n.NativeScripts.new();
2720
+ e.forEach((a) => {
2721
+ const i = F(it(a));
2722
+ t.add(xt(i));
2729
2723
  });
2730
- const s = i.ScriptAll.new(t);
2731
- return i.NativeScript.new_script_any(s).to_hex();
2724
+ const s = n.ScriptAll.new(t);
2725
+ return n.NativeScript.new_script_any(s).to_hex();
2732
2726
  }
2733
2727
  static fromNativeScript(e) {
2734
2728
  return Tt(e).to_hex();
2735
2729
  }
2736
2730
  }
2737
2731
  function st(r, e, t, s) {
2738
- var n = arguments.length, a = n < 3 ? e : s === null ? s = Object.getOwnPropertyDescriptor(e, t) : s, o;
2732
+ var a = arguments.length, i = a < 3 ? e : s === null ? s = Object.getOwnPropertyDescriptor(e, t) : s, o;
2739
2733
  if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
2740
- a = Reflect.decorate(r, e, t, s);
2734
+ i = Reflect.decorate(r, e, t, s);
2741
2735
  else
2742
2736
  for (var c = r.length - 1; c >= 0; c--)
2743
- (o = r[c]) && (a = (n < 3 ? o(a) : n > 3 ? o(e, t, a) : o(e, t)) || a);
2744
- return n > 3 && a && Object.defineProperty(e, t, a), a;
2737
+ (o = r[c]) && (i = (a < 3 ? o(i) : a > 3 ? o(e, t, i) : o(e, t)) || i);
2738
+ return a > 3 && i && Object.defineProperty(e, t, i), i;
2745
2739
  }
2746
- const Xs = (r) => class extends r {
2740
+ const js = (r) => class extends r {
2747
2741
  __visits = [];
2748
2742
  }, rt = () => function(r, e, t) {
2749
2743
  const s = t.value;
2750
- t.value = function(...n) {
2751
- const a = s.call(this, ...n);
2752
- return this.__visits && this.__visits.push(e), a;
2744
+ t.value = function(...a) {
2745
+ const i = s.call(this, ...a);
2746
+ return this.__visits && this.__visits.push(e), i;
2753
2747
  };
2754
2748
  };
2755
2749
  let z = class {
@@ -2767,40 +2761,40 @@ let z = class {
2767
2761
  _txInputsBuilder;
2768
2762
  _txWithdrawals;
2769
2763
  constructor(e = {}) {
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();
2764
+ this._era = e.era, this._initiator = e.initiator, this._mintBuilder = n.MintBuilder.new(), this._protocolParameters = e.parameters ?? T, this._txBuilder = Et(e.parameters), this._txCertificates = n.Certificates.new(), this._txInputsBuilder = n.TxInputsBuilder.new(), this._txWithdrawals = n.Withdrawals.new();
2771
2765
  }
2772
2766
  static attachMetadata(e, t, s = "BABBAGE") {
2773
2767
  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()))
2768
+ const a = O(e), i = a.auxiliary_data() ?? n.AuxiliaryData.new();
2769
+ if (i.set_metadata(n.GeneralTransactionMetadata.from_hex(t)), i.set_prefer_alonzo_format(s === "ALONZO"), n.hash_auxiliary_data(i).to_hex() !== ((o = a.body().auxiliary_data_hash()) == null ? void 0 : o.to_hex()))
2776
2770
  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();
2771
+ return n.Transaction.new(a.body(), a.witness_set(), i).to_hex();
2778
2772
  }
2779
2773
  static deattachMetadata(e) {
2780
- const t = K(e);
2781
- return i.Transaction.new(t.body(), t.witness_set(), void 0).to_hex();
2774
+ const t = O(e);
2775
+ return n.Transaction.new(t.body(), t.witness_set(), void 0).to_hex();
2782
2776
  }
2783
2777
  static maskMetadata(e, t = "BABBAGE") {
2784
- var a;
2785
- const s = K(e), n = (a = s.auxiliary_data()) == null ? void 0 : a.metadata();
2786
- if (n !== void 0) {
2787
- const o = i.GeneralTransactionMetadata.new();
2788
- for (let u = 0; u < n.len(); u += 1) {
2789
- const d = n.keys().get(u), l = n.get(d);
2790
- o.insert(d, i.TransactionMetadatum.from_hex("0".repeat(((l == null ? void 0 : l.to_hex()) ?? "").length)));
2778
+ var i;
2779
+ const s = O(e), a = (i = s.auxiliary_data()) == null ? void 0 : i.metadata();
2780
+ if (a !== void 0) {
2781
+ const o = n.GeneralTransactionMetadata.new();
2782
+ for (let u = 0; u < a.len(); u += 1) {
2783
+ const d = a.keys().get(u), l = a.get(d);
2784
+ o.insert(d, n.TransactionMetadatum.from_hex("0".repeat(((l == null ? void 0 : l.to_hex()) ?? "").length)));
2791
2785
  }
2792
2786
  const c = s.auxiliary_data();
2793
- return c !== void 0 && (c.set_metadata(o), c.set_prefer_alonzo_format(t === "ALONZO")), i.Transaction.new(s.body(), s.witness_set(), c).to_hex();
2787
+ return c !== void 0 && (c.set_metadata(o), c.set_prefer_alonzo_format(t === "ALONZO")), n.Transaction.new(s.body(), s.witness_set(), c).to_hex();
2794
2788
  }
2795
2789
  return e;
2796
2790
  }
2797
2791
  static readMetadata(e) {
2798
- var s, n;
2799
- return ((n = (s = K(e).auxiliary_data()) == null ? void 0 : s.metadata()) == null ? void 0 : n.to_hex()) ?? "";
2792
+ var s, a;
2793
+ return ((a = (s = O(e).auxiliary_data()) == null ? void 0 : s.metadata()) == null ? void 0 : a.to_hex()) ?? "";
2800
2794
  }
2801
2795
  static writeMetadata(e, t, s = "BABBAGE") {
2802
- const n = K(e), a = n.auxiliary_data() ?? i.AuxiliaryData.new();
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();
2796
+ const a = O(e), i = a.auxiliary_data() ?? n.AuxiliaryData.new();
2797
+ return i.set_metadata(n.GeneralTransactionMetadata.from_hex(t)), i.set_prefer_alonzo_format(s === "ALONZO"), n.Transaction.new(a.body(), a.witness_set(), i).to_hex();
2804
2798
  }
2805
2799
  get size() {
2806
2800
  return this._txBuilder.full_size();
@@ -2813,39 +2807,39 @@ let z = class {
2813
2807
  }
2814
2808
  }
2815
2809
  burnAsset(e, t, s) {
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;
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;
2810
+ const a = this._totalBurns.has(t.unit) ? n.BigNum.from_str(this._totalBurns.get(t.unit) ?? "0").checked_add(n.BigNum.from_str(t.quantity)).to_str() : t.quantity;
2811
+ return this._mintBuilder.add_asset(Ce(e, s), n.AssetName.new(_(t.unit.slice(R))), n.Int.new_negative(n.BigNum.from_str(t.quantity))), this._totalBurns.set(t.unit, a), this;
2818
2812
  }
2819
2813
  delegateStake(e, t) {
2820
- const s = i.Certificate.new_stake_delegation(i.StakeDelegation.new(i.StakeCredential.from_keyhash(O(At(e))), i.Ed25519KeyHash.from_bech32(t)));
2814
+ const s = n.Certificate.new_stake_delegation(n.StakeDelegation.new(n.StakeCredential.from_keyhash(F(gt(e))), n.Ed25519KeyHash.from_bech32(t)));
2821
2815
  return this._txCertificates.add(s), this;
2822
2816
  }
2823
2817
  deregisterStake(e) {
2824
- const t = i.Certificate.new_stake_deregistration(i.StakeDeregistration.new(i.StakeCredential.from_keyhash(O(At(e)))));
2818
+ const t = n.Certificate.new_stake_deregistration(n.StakeDeregistration.new(n.StakeCredential.from_keyhash(F(gt(e)))));
2825
2819
  return this._txCertificates.add(t), this;
2826
2820
  }
2827
2821
  mintAsset(e, t, s) {
2828
2822
  var d, l;
2829
- const n = (g, A) => {
2830
- const m = typeof g == "string" ? Dt(g).hash().to_hex() : a(g).hash().to_hex(), p = Q(A.assetName);
2823
+ const a = (m, g) => {
2824
+ const A = typeof m == "string" ? Dt(m).hash().to_hex() : i(m).hash().to_hex(), I = b(g.assetName);
2831
2825
  return {
2832
- unit: `${m}${p}`,
2833
- quantity: A.assetQuantity
2826
+ unit: `${A}${I}`,
2827
+ quantity: g.assetQuantity
2834
2828
  };
2835
- }, a = (g) => {
2836
- if ("code" in g)
2837
- return dt(g.code, g.version);
2838
- const A = F(g);
2839
- if (A.output().has_script_ref()) {
2840
- const m = A.output().script_ref();
2841
- if (m.is_plutus_script()) {
2842
- const p = qe(m);
2843
- return dt(p.code, p.version);
2829
+ }, i = (m) => {
2830
+ if ("code" in m)
2831
+ return dt(m.code, m.version);
2832
+ const g = M(m);
2833
+ if (g.output().has_script_ref()) {
2834
+ const A = g.output().script_ref();
2835
+ if (A.is_plutus_script()) {
2836
+ const I = qe(A);
2837
+ return dt(I.code, I.version);
2844
2838
  }
2845
2839
  }
2846
- throw new Error(`[Transaction] No plutus script reference found in UTxO: ${A.input().transaction_id().to_hex()}`);
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));
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, {
2840
+ throw new Error(`[Transaction] No plutus script reference found in UTxO: ${g.input().transaction_id().to_hex()}`);
2841
+ }, o = a(e, t), u = n.BigNum.from_str(((d = this._totalMints.get(o.unit)) == null ? void 0 : d.assetQuantity) ?? "0").checked_add(n.BigNum.from_str(o.quantity));
2842
+ return this._mintBuilder.add_asset(Ce(e, s), n.AssetName.new(_(b(t.assetName))), n.Int.new(n.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, {
2849
2843
  ...t,
2850
2844
  assetQuantity: u.to_str()
2851
2845
  }), this;
@@ -2853,95 +2847,95 @@ let z = class {
2853
2847
  redeemValue(e) {
2854
2848
  const t = {
2855
2849
  tag: "SPEND",
2856
- budget: at,
2850
+ budget: nt,
2857
2851
  index: this._txInputsBuilder.inputs().len(),
2858
2852
  data: {
2859
2853
  alternative: 0,
2860
2854
  fields: []
2861
2855
  },
2862
2856
  ...e.redeemer
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));
2864
- return this._txInputsBuilder.add_plutus_script_input(n, s.input(), s.output().amount()), this;
2857
+ }, s = M(e.value), a = e.datum ? n.PlutusWitness.new_with_ref(Rt(e.script), zs(e.datum), Mt(t)) : n.PlutusWitness.new_with_ref_without_datum(Rt(e.script), Mt(t));
2858
+ return this._txInputsBuilder.add_plutus_script_input(a, s.input(), s.output().amount()), this;
2865
2859
  }
2866
2860
  registerStake(e) {
2867
- const t = i.Certificate.new_stake_registration(i.StakeRegistration.new(i.StakeCredential.from_keyhash(O(At(e)))));
2861
+ const t = n.Certificate.new_stake_registration(n.StakeRegistration.new(n.StakeCredential.from_keyhash(F(gt(e)))));
2868
2862
  return this._txCertificates.add(t), this;
2869
2863
  }
2870
2864
  registerPool(e) {
2871
- const t = i.Certificate.new_pool_registration(i.PoolRegistration.new($s(e)));
2865
+ const t = n.Certificate.new_pool_registration(n.PoolRegistration.new($s(e)));
2872
2866
  return this._txCertificates.add(t), this;
2873
2867
  }
2874
2868
  retirePool(e, t) {
2875
- const s = i.Certificate.new_pool_retirement(i.PoolRetirement.new(i.Ed25519KeyHash.from_bech32(e), t));
2869
+ const s = n.Certificate.new_pool_retirement(n.PoolRetirement.new(n.Ed25519KeyHash.from_bech32(e), t));
2876
2870
  return this._txCertificates.add(s), this;
2877
2871
  }
2878
2872
  sendAssets(e, t) {
2879
- const s = Z(t), n = s.multiasset();
2880
- if (s.is_zero() || n === void 0)
2873
+ const s = G(t), a = s.multiasset();
2874
+ if (s.is_zero() || a === void 0)
2881
2875
  return this;
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();
2876
+ const i = Ct(e).next(), o = s.coin().is_zero() ? i.with_asset_and_min_required_coin_by_utxo_cost(a, Ft(this._protocolParameters.coinsPerUTxOSize)).build() : i.with_coin_and_asset(s.coin(), a).build();
2883
2877
  return t.forEach((c) => {
2884
2878
  this.setTxOutput(c);
2885
2879
  }), this._txBuilder.add_output(o), this;
2886
2880
  }
2887
2881
  sendLovelace(e, t) {
2888
- const n = Ct(e).next().with_coin(i.BigNum.from_str(t)).build();
2882
+ const a = Ct(e).next().with_coin(n.BigNum.from_str(t)).build();
2889
2883
  return this.setTxOutput({
2890
2884
  unit: "lovelace",
2891
2885
  quantity: t
2892
- }), this._txBuilder.add_output(n), this;
2886
+ }), this._txBuilder.add_output(a), this;
2893
2887
  }
2894
2888
  sendToken(e, t, s) {
2895
2889
  return this.sendAssets(e, [{
2896
2890
  quantity: s,
2897
- unit: as[t]
2891
+ unit: ns[t]
2898
2892
  }]), this;
2899
2893
  }
2900
2894
  sendValue(e, t) {
2901
- const s = Z(t.output.amount), a = Ct(e).next().with_value(s).build();
2895
+ const s = G(t.output.amount), i = Ct(e).next().with_value(s).build();
2902
2896
  return t.output.amount.forEach((o) => {
2903
2897
  this.setTxOutput(o);
2904
- }), this._txBuilder.add_output(a), this;
2898
+ }), this._txBuilder.add_output(i), this;
2905
2899
  }
2906
2900
  setChangeAddress(e) {
2907
- return this._changeAddress = M(e), this;
2901
+ return this._changeAddress = K(e), this;
2908
2902
  }
2909
2903
  setCollateral(e) {
2910
2904
  const t = we(e);
2911
2905
  return this._txBuilder.set_collateral(t), this;
2912
2906
  }
2913
2907
  setMetadata(e, t) {
2914
- return this._txBuilder.add_json_metadatum_with_schema(i.BigNum.from_str(e.toString()), JSON.stringify(t), i.MetadataJsonSchema.NoConversions), this;
2908
+ return this._txBuilder.add_json_metadatum_with_schema(n.BigNum.from_str(e.toString()), JSON.stringify(t), n.MetadataJsonSchema.NoConversions), this;
2915
2909
  }
2916
2910
  setRequiredSigners(e) {
2917
- return Array.from(new Set(e.map((s) => s.startsWith("addr") ? it(s) : At(s)).map((s) => O(s)))).forEach((s) => {
2911
+ return Array.from(new Set(e.map((s) => s.startsWith("addr") ? it(s) : gt(s)).map((s) => F(s)))).forEach((s) => {
2918
2912
  this._txBuilder.add_required_signer(s);
2919
2913
  }), this;
2920
2914
  }
2921
2915
  setTimeToStart(e) {
2922
- return this._txBuilder.set_validity_start_interval_bignum(i.BigNum.from_str(e)), this;
2916
+ return this._txBuilder.set_validity_start_interval_bignum(n.BigNum.from_str(e)), this;
2923
2917
  }
2924
2918
  setTimeToExpire(e) {
2925
- return this._txBuilder.set_ttl_bignum(i.BigNum.from_str(e)), this;
2919
+ return this._txBuilder.set_ttl_bignum(n.BigNum.from_str(e)), this;
2926
2920
  }
2927
2921
  setTxInputs(e) {
2928
- return e.map((t) => F(t)).forEach((t) => {
2922
+ return e.map((t) => M(t)).forEach((t) => {
2929
2923
  this._txInputsBuilder.add_input(t.output().address(), t.input(), t.output().amount());
2930
2924
  }), this;
2931
2925
  }
2932
2926
  setTxRefInputs(e) {
2933
- return e.map((t) => F(t)).forEach((t) => {
2927
+ return e.map((t) => M(t)).forEach((t) => {
2934
2928
  this._txBuilder.add_reference_input(t.input());
2935
2929
  }), this;
2936
2930
  }
2937
2931
  withdrawRewards(e, t) {
2938
- const s = Ve(e);
2939
- return s !== void 0 && this._txWithdrawals.insert(s, i.BigNum.from_str(t)), this;
2932
+ const s = Re(e);
2933
+ return s !== void 0 && this._txWithdrawals.insert(s, n.BigNum.from_str(t)), this;
2940
2934
  }
2941
2935
  async addBurnInputsIfNeeded() {
2942
2936
  if (this._initiator && this._totalBurns.size > 0 && this.notVisited("setTxInputs")) {
2943
2937
  const e = await this._initiator.getUsedUTxOs();
2944
- os(this._totalBurns, e.map((s) => vt(s))).map((s) => F(s)).forEach((s) => {
2938
+ os(this._totalBurns, e.map((s) => vt(s))).map((s) => M(s)).forEach((s) => {
2945
2939
  this._txInputsBuilder.add_input(s.output().address(), s.input(), s.output().amount());
2946
2940
  });
2947
2941
  }
@@ -2962,13 +2956,13 @@ let z = class {
2962
2956
  async addRequiredSignersIfNeeded() {
2963
2957
  if (this._initiator && this.notVisited("setRequiredSigners")) {
2964
2958
  const e = await this._initiator.getUsedAddress(), t = it(e.to_bech32());
2965
- this._txBuilder.add_required_signer(O(t));
2959
+ this._txBuilder.add_required_signer(F(t));
2966
2960
  }
2967
2961
  }
2968
2962
  async addTxInputsAsNeeded() {
2969
2963
  if (this.notVisited("setTxInputs")) {
2970
2964
  const e = await this.filterAvailableUTxOs();
2971
- is(this._txOutputs, e.map((s) => vt(s))).map((s) => F(s)).forEach((s) => {
2965
+ is(this._txOutputs, e.map((s) => vt(s))).map((s) => M(s)).forEach((s) => {
2972
2966
  this._txInputsBuilder.add_input(s.output().address(), s.input(), s.output().amount());
2973
2967
  });
2974
2968
  }
@@ -2979,12 +2973,12 @@ let z = class {
2979
2973
  }
2980
2974
  async forgeAssetsIfNeeded() {
2981
2975
  const e = (t, s) => {
2982
- const n = t.data.assetName, a = t.data.metadata, o = t.unit.slice(0, V);
2976
+ const a = t.data.assetName, i = t.data.metadata, o = t.unit.slice(0, R);
2983
2977
  if (t.data.label === "777")
2984
- return a;
2978
+ return i;
2985
2979
  if (s && s[o]) {
2986
2980
  const { [o]: c, ...u } = s, d = {
2987
- [n]: a,
2981
+ [a]: i,
2988
2982
  ...c
2989
2983
  };
2990
2984
  return {
@@ -2996,28 +2990,28 @@ let z = class {
2996
2990
  }
2997
2991
  return s !== void 0 ? {
2998
2992
  [o]: {
2999
- [n]: a
2993
+ [a]: i
3000
2994
  },
3001
2995
  ...s
3002
2996
  } : {
3003
- [o]: { [n]: a }
2997
+ [o]: { [a]: i }
3004
2998
  };
3005
2999
  };
3006
3000
  await this.addBurnInputsIfNeeded(), Array.from(this._totalMints, (t) => ({
3007
3001
  unit: t[0],
3008
3002
  data: t[1]
3009
3003
  })).reduce((t, s) => t.set(s.data.label, e(s, t.get(s.data.label))), /* @__PURE__ */ new Map()).forEach((t, s) => {
3010
- this._txBuilder.add_json_metadatum(i.BigNum.from_str(s), JSON.stringify(t));
3004
+ this._txBuilder.add_json_metadatum(n.BigNum.from_str(s), JSON.stringify(t));
3011
3005
  }), this.addMintOutputs();
3012
3006
  }
3013
3007
  async filterAvailableUTxOs(e = []) {
3014
- return this._initiator === void 0 ? [] : (await this._initiator.getUsedUTxOs()).filter((s) => e.find((n) => n.input.txHash === s.input().transaction_id().to_hex()) === void 0);
3008
+ return this._initiator === void 0 ? [] : (await this._initiator.getUsedUTxOs()).filter((s) => e.find((a) => a.input.txHash === s.input().transaction_id().to_hex()) === void 0);
3015
3009
  }
3016
3010
  addMintOutputs() {
3017
3011
  this._recipients.forEach((e, t) => {
3018
- const n = Z(e).multiasset();
3019
- if (n !== void 0) {
3020
- const o = Ct(t).next().with_asset_and_min_required_coin_by_utxo_cost(n, Ft(this._protocolParameters.coinsPerUTxOSize)).build();
3012
+ const a = G(e).multiasset();
3013
+ if (a !== void 0) {
3014
+ const o = Ct(t).next().with_asset_and_min_required_coin_by_utxo_cost(a, Ft(this._protocolParameters.coinsPerUTxOSize)).build();
3021
3015
  this._txBuilder.add_output(o);
3022
3016
  }
3023
3017
  });
@@ -3026,7 +3020,7 @@ let z = class {
3026
3020
  return this.__visits.includes(e) === !1;
3027
3021
  }
3028
3022
  setTxOutput(e) {
3029
- const s = i.BigNum.from_str(this._txOutputs.get(e.unit) ?? "0").checked_add(i.BigNum.from_str(e.quantity)).to_str();
3023
+ const s = n.BigNum.from_str(this._txOutputs.get(e.unit) ?? "0").checked_add(n.BigNum.from_str(e.quantity)).to_str();
3030
3024
  this._txOutputs.set(e.unit, s);
3031
3025
  }
3032
3026
  };
@@ -3052,110 +3046,110 @@ st([
3052
3046
  rt()
3053
3047
  ], z.prototype, "setTxInputs", null);
3054
3048
  z = st([
3055
- Xs
3049
+ js
3056
3050
  ], z);
3057
- const Zs = (r, e, t) => {
3051
+ const Xs = (r, e, t) => {
3058
3052
  const s = new Map(e);
3059
3053
  s.set("lovelace", String(Number(s.get("lovelace")) + Number(t)));
3060
- const n = /* @__PURE__ */ new Map();
3061
- for (let A = 0; A < r.length; A++)
3062
- n.set(A, r[A]);
3063
- const a = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Set(), c = /* @__PURE__ */ new Set(), u = /* @__PURE__ */ new Set(), d = /* @__PURE__ */ new Set();
3064
- for (let A = 0; A < r.length; A++)
3065
- switch (r[A].output.amount.length) {
3054
+ const a = /* @__PURE__ */ new Map();
3055
+ for (let g = 0; g < r.length; g++)
3056
+ a.set(g, r[g]);
3057
+ const i = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Set(), c = /* @__PURE__ */ new Set(), u = /* @__PURE__ */ new Set(), d = /* @__PURE__ */ new Set();
3058
+ for (let g = 0; g < r.length; g++)
3059
+ switch (r[g].output.amount.length) {
3066
3060
  case 1: {
3067
- o.add(A);
3061
+ o.add(g);
3068
3062
  break;
3069
3063
  }
3070
3064
  case 2: {
3071
- c.add(A);
3065
+ c.add(g);
3072
3066
  break;
3073
3067
  }
3074
3068
  case 3: {
3075
- u.add(A);
3069
+ u.add(g);
3076
3070
  break;
3077
3071
  }
3078
3072
  default: {
3079
- d.add(A);
3073
+ d.add(g);
3080
3074
  break;
3081
3075
  }
3082
3076
  }
3083
- const l = (A, m, p) => {
3084
- const S = n.get(A);
3085
- if (!S)
3077
+ const l = (g, A, I) => {
3078
+ const x = a.get(g);
3079
+ if (!x)
3086
3080
  return;
3087
- const E = tr(S, m);
3088
- if (Number(E) > 0) {
3089
- a.add(A), p.delete(A);
3090
- for (const f of S.output.amount)
3081
+ const v = Zs(x, A);
3082
+ if (Number(v) > 0) {
3083
+ i.add(g), I.delete(g);
3084
+ for (const f of x.output.amount)
3091
3085
  s.set(f.unit, String(Number(s.get(f.unit)) - Number(f.quantity)));
3092
3086
  }
3093
3087
  };
3094
- for (const A of s.keys())
3095
- if (A != "lovelace") {
3096
- for (const m of c) {
3097
- const p = s.get(A);
3098
- if (!p || Number(p) <= 0)
3088
+ for (const g of s.keys())
3089
+ if (g != "lovelace") {
3090
+ for (const A of c) {
3091
+ const I = s.get(g);
3092
+ if (!I || Number(I) <= 0)
3099
3093
  break;
3100
- l(m, A, c);
3094
+ l(A, g, c);
3101
3095
  }
3102
- for (const m of u) {
3103
- const p = s.get(A);
3104
- if (!p || Number(p) <= 0)
3096
+ for (const A of u) {
3097
+ const I = s.get(g);
3098
+ if (!I || Number(I) <= 0)
3105
3099
  break;
3106
- l(m, A, u);
3100
+ l(A, g, u);
3107
3101
  }
3108
- for (const m of d) {
3109
- const p = s.get(A);
3110
- if (!p || Number(p) <= 0)
3102
+ for (const A of d) {
3103
+ const I = s.get(g);
3104
+ if (!I || Number(I) <= 0)
3111
3105
  break;
3112
- l(m, A, d);
3106
+ l(A, g, d);
3113
3107
  }
3114
3108
  }
3115
- for (const A of o) {
3116
- const m = s.get("lovelace");
3117
- if (!m || Number(m) <= 0)
3109
+ for (const g of o) {
3110
+ const A = s.get("lovelace");
3111
+ if (!A || Number(A) <= 0)
3118
3112
  break;
3119
- l(A, "lovelace", o);
3113
+ l(g, "lovelace", o);
3120
3114
  }
3121
- for (const A of c) {
3122
- const m = s.get("lovelace");
3123
- if (!m || Number(m) <= 0)
3115
+ for (const g of c) {
3116
+ const A = s.get("lovelace");
3117
+ if (!A || Number(A) <= 0)
3124
3118
  break;
3125
- l(A, "lovelace", c);
3119
+ l(g, "lovelace", c);
3126
3120
  }
3127
- for (const A of u) {
3128
- const m = s.get("lovelace");
3129
- if (!m || Number(m) <= 0)
3121
+ for (const g of u) {
3122
+ const A = s.get("lovelace");
3123
+ if (!A || Number(A) <= 0)
3130
3124
  break;
3131
- l(A, "lovelace", u);
3125
+ l(g, "lovelace", u);
3132
3126
  }
3133
- for (const A of d) {
3134
- const m = s.get("lovelace");
3135
- if (!m || Number(m) <= 0)
3127
+ for (const g of d) {
3128
+ const A = s.get("lovelace");
3129
+ if (!A || Number(A) <= 0)
3136
3130
  break;
3137
- l(A, "lovelace", d);
3131
+ l(g, "lovelace", d);
3138
3132
  }
3139
- for (const A of s.keys())
3140
- if (Number(s.get(A)) > 0)
3133
+ for (const g of s.keys())
3134
+ if (Number(s.get(g)) > 0)
3141
3135
  return [];
3142
- const g = [];
3143
- for (const A of a) {
3144
- const m = n.get(A);
3145
- m && g.push(m);
3136
+ const m = [];
3137
+ for (const g of i) {
3138
+ const A = a.get(g);
3139
+ A && m.push(A);
3146
3140
  }
3147
- return g;
3148
- }, tr = (r, e) => {
3141
+ return m;
3142
+ }, Zs = (r, e) => {
3149
3143
  for (const t of r.output.amount)
3150
3144
  if (t.unit == e)
3151
3145
  return t.quantity;
3152
3146
  return "0";
3153
3147
  };
3154
- class er {
3148
+ class tr {
3155
3149
  txHex = "";
3156
3150
  txBuilder = Et();
3157
3151
  txEvaluationMultiplier = 1.1;
3158
- _protocolParams = k;
3152
+ _protocolParams = T;
3159
3153
  txOutput;
3160
3154
  addingScriptInput = !1;
3161
3155
  addingPlutusMint = !1;
@@ -3165,7 +3159,7 @@ class er {
3165
3159
  txInQueueItem;
3166
3160
  collateralQueueItem;
3167
3161
  refScriptTxInQueueItem;
3168
- reset = () => (this.txHex = "", this.txBuilder = Et(), this.txEvaluationMultiplier = 1.1, this._protocolParams = k, 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);
3162
+ reset = () => (this.txHex = "", this.txBuilder = Et(), this.txEvaluationMultiplier = 1.1, this._protocolParams = T, 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);
3169
3163
  emptyTxBuilderBody = () => ({
3170
3164
  inputs: [],
3171
3165
  outputs: [],
@@ -3178,6 +3172,7 @@ class er {
3178
3172
  changeAddress: "",
3179
3173
  metadata: [],
3180
3174
  validityRange: {},
3175
+ certificates: [],
3181
3176
  signingKey: []
3182
3177
  });
3183
3178
  constructor() {
@@ -3189,7 +3184,7 @@ class er {
3189
3184
  return e.length > 0 && this.addAllSigningKeys(e), this.txHex;
3190
3185
  };
3191
3186
  serializeTxBody = (e) => {
3192
- const { inputs: t, outputs: s, extraInputs: n, selectionThreshold: a, collaterals: o, referenceInputs: c, mints: u, changeAddress: d, validityRange: l, requiredSignatures: g, metadata: A } = e;
3187
+ const { inputs: t, outputs: s, extraInputs: a, selectionThreshold: i, collaterals: o, referenceInputs: c, mints: u, changeAddress: d, certificates: l, validityRange: m, requiredSignatures: g, metadata: A } = e;
3193
3188
  if (this.isHydra ? this.protocolParams({
3194
3189
  minFeeA: 0,
3195
3190
  minFeeB: 0,
@@ -3197,27 +3192,27 @@ class er {
3197
3192
  priceStep: 0,
3198
3193
  collateralPercent: 0,
3199
3194
  coinsPerUTxOSize: "0"
3200
- }) : this.protocolParams({}), n.length > 0 && this.addUtxosFrom(n, String(a)), this.meshTxBuilderBody.mints.sort((m, p) => m.policyId.localeCompare(p.policyId)), this.meshTxBuilderBody.inputs.sort((m, p) => m.txIn.txHash === p.txIn.txHash ? m.txIn.txIndex - p.txIn.txIndex : m.txIn.txHash.localeCompare(p.txIn.txHash)), this.addAllInputs(t), this.addAllOutputs(s), this.addAllCollaterals(o), this.addAllReferenceInputs(c), this.addAllMints(u), this.addValidityRange(l), this.addAllRequiredSignatures(g), this.addAllMetadata(A), this.addCostModels(), d) {
3201
- const m = this.meshTxBuilderBody.collaterals.map((E) => {
3202
- var f, x;
3203
- return ((x = (f = E.txIn.amount) == null ? void 0 : f.find((C) => C.unit === "lovelace")) == null ? void 0 : x.quantity) || "0";
3204
- }).reduce((E, f) => E + parseInt(f), 0), p = Math.ceil(this._protocolParams.collateralPercent * Number(Number(this.txBuilder.min_fee().checked_add(i.BigNum.from_str("10000")).to_js_value())) / 100);
3205
- let S = !1;
3206
- if (m - p > 0) {
3207
- const E = i.TransactionOutput.new(i.Address.from_bech32(d), i.Value.new(i.BigNum.from_str(String(p))));
3208
- m - p > Number(i.min_ada_for_output(E, i.DataCost.new_coins_per_byte(i.BigNum.from_str(this._protocolParams.coinsPerUTxOSize))).to_js_value()) && (this.txBuilder.set_collateral_return(i.TransactionOutput.new(i.Address.from_bech32(d), i.Value.new(i.BigNum.from_str(String(m))))), this.txBuilder.set_total_collateral(i.BigNum.from_str(String(m))), S = !0);
3195
+ }) : this.protocolParams({}), a.length > 0 && this.addUtxosFrom(a, String(i)), this.removeDuplicateInputs(), this.meshTxBuilderBody.mints.sort((I, x) => I.policyId.localeCompare(x.policyId)), this.meshTxBuilderBody.inputs.sort((I, x) => I.txIn.txHash === x.txIn.txHash ? I.txIn.txIndex - x.txIn.txIndex : I.txIn.txHash.localeCompare(x.txIn.txHash)), this.addAllInputs(t), this.addAllOutputs(s), this.addAllCollaterals(o), this.addAllReferenceInputs(c), this.addAllMints(u), this.addAllCertificates(l), this.addValidityRange(m), this.addAllRequiredSignatures(g), this.addAllMetadata(A), this.addCostModels(), d) {
3196
+ const I = this.meshTxBuilderBody.collaterals.map((f) => {
3197
+ var C, w;
3198
+ return ((w = (C = f.txIn.amount) == null ? void 0 : C.find((D) => D.unit === "lovelace")) == null ? void 0 : w.quantity) || "0";
3199
+ }).reduce((f, C) => f + parseInt(C), 0), x = Math.ceil(this._protocolParams.collateralPercent * Number(Number(this.txBuilder.min_fee().checked_add(n.BigNum.from_str("10000")).to_js_value())) / 100);
3200
+ let v = !1;
3201
+ if (I - x > 0) {
3202
+ const f = n.TransactionOutput.new(n.Address.from_bech32(d), n.Value.new(n.BigNum.from_str(String(x))));
3203
+ I - x > Number(n.min_ada_for_output(f, n.DataCost.new_coins_per_byte(n.BigNum.from_str(this._protocolParams.coinsPerUTxOSize))).to_js_value()) && (this.txBuilder.set_collateral_return(n.TransactionOutput.new(n.Address.from_bech32(d), n.Value.new(n.BigNum.from_str(String(I))))), this.txBuilder.set_total_collateral(n.BigNum.from_str(String(I))), v = !0);
3209
3204
  }
3210
- this.addChange(d), S && this.addCollateralReturn(d);
3205
+ this.addChange(d), v && this.addCollateralReturn(d);
3211
3206
  }
3212
3207
  return this.buildTx(), this;
3213
3208
  };
3214
- txIn = (e, t, s, n) => (this.txInQueueItem && this.queueInput(), this.addingScriptInput ? this.txInQueueItem = {
3209
+ txIn = (e, t, s, a) => (this.txInQueueItem && this.queueInput(), this.addingScriptInput ? this.txInQueueItem = {
3215
3210
  type: "Script",
3216
3211
  txIn: {
3217
3212
  txHash: e,
3218
3213
  txIndex: t,
3219
3214
  amount: s,
3220
- address: n
3215
+ address: a
3221
3216
  },
3222
3217
  scriptTxIn: {}
3223
3218
  } : this.txInQueueItem = {
@@ -3226,7 +3221,7 @@ class er {
3226
3221
  txHash: e,
3227
3222
  txIndex: t,
3228
3223
  amount: s,
3229
- address: n
3224
+ address: a
3230
3225
  }
3231
3226
  }, this.addingScriptInput = !1, this);
3232
3227
  txInScript = (e, t = "V2") => {
@@ -3274,22 +3269,22 @@ class er {
3274
3269
  txIndex: t
3275
3270
  }), this;
3276
3271
  };
3277
- txInRedeemerValue = (e, t = { ...at }, s = "Mesh") => {
3272
+ txInRedeemerValue = (e, t = { ...nt }, s = "Mesh") => {
3278
3273
  if (!this.txInQueueItem)
3279
3274
  throw Error("Undefined input");
3280
3275
  if (this.txInQueueItem.type === "PubKey")
3281
3276
  throw Error("Spending tx in reference redeemer attempted to be called a non script input");
3282
- let n = e;
3277
+ let a = e;
3283
3278
  return s === "Mesh" ? (this.txInQueueItem.scriptTxIn.redeemer = {
3284
3279
  data: {
3285
3280
  type: s,
3286
3281
  content: e
3287
3282
  },
3288
3283
  exUnits: t
3289
- }, this) : (s === "JSON" && (n = this.castRawDataToJsonString(e)), this.txInQueueItem.scriptTxIn.redeemer = {
3284
+ }, this) : (s === "JSON" && (a = this.castRawDataToJsonString(e)), this.txInQueueItem.scriptTxIn.redeemer = {
3290
3285
  data: {
3291
3286
  type: s,
3292
- content: n
3287
+ content: a
3293
3288
  },
3294
3289
  exUnits: t
3295
3290
  }, this);
@@ -3342,7 +3337,7 @@ class er {
3342
3337
  };
3343
3338
  txOutReferenceScript = (e, t = "V2") => (this.txOutput && (this.txOutput.referenceScript = { code: e, version: t }), this);
3344
3339
  spendingPlutusScriptV2 = () => (this.addingScriptInput = !0, this);
3345
- spendingTxInReference = (e, t, s, n = "V2") => {
3340
+ spendingTxInReference = (e, t, s, a = "V2") => {
3346
3341
  if (!this.txInQueueItem)
3347
3342
  throw Error("Undefined input");
3348
3343
  if (this.txInQueueItem.type === "PubKey")
@@ -3353,12 +3348,12 @@ class er {
3353
3348
  txHash: e,
3354
3349
  txIndex: t,
3355
3350
  spendingScriptHash: s,
3356
- version: n
3351
+ version: a
3357
3352
  }
3358
3353
  }, this;
3359
3354
  };
3360
3355
  spendingReferenceTxInInlineDatumPresent = () => (this.txInInlineDatumPresent(), this);
3361
- spendingReferenceTxInRedeemerValue = (e, t = { ...at }) => (this.txInRedeemerValue(e, t), this);
3356
+ spendingReferenceTxInRedeemerValue = (e, t = { ...nt }) => (this.txInRedeemerValue(e, t), this);
3362
3357
  readOnlyTxInReference = (e, t) => (this.meshTxBuilderBody.referenceInputs.push({ txHash: e, txIndex: t }), this);
3363
3358
  mintPlutusScriptV2 = () => (this.addingPlutusMint = !0, this);
3364
3359
  mint = (e, t, s) => (this.mintItem && this.queueMint(), this.mintItem = {
@@ -3393,7 +3388,7 @@ class er {
3393
3388
  version: s
3394
3389
  }, this;
3395
3390
  };
3396
- mintReferenceTxInRedeemerValue = (e, t = { ...at }, s = "Mesh") => {
3391
+ mintReferenceTxInRedeemerValue = (e, t = { ...nt }, s = "Mesh") => {
3397
3392
  if (!this.mintItem)
3398
3393
  throw Error("Undefined mint");
3399
3394
  if (this.mintItem.type == "Native")
@@ -3401,85 +3396,107 @@ class er {
3401
3396
  if (this.mintItem.type == "Plutus") {
3402
3397
  if (!this.mintItem.policyId)
3403
3398
  throw Error("PolicyId information missing from mint asset");
3404
- let n = e;
3399
+ let a = e;
3405
3400
  if (s === "Mesh")
3406
3401
  return this.mintItem.redeemer = {
3407
3402
  data: {
3408
3403
  type: s,
3409
- content: n
3404
+ content: a
3410
3405
  },
3411
3406
  exUnits: t
3412
3407
  }, this;
3413
- s === "JSON" && (n = this.castRawDataToJsonString(e)), this.mintItem.redeemer = {
3408
+ s === "JSON" && (a = this.castRawDataToJsonString(e)), this.mintItem.redeemer = {
3414
3409
  data: {
3415
3410
  type: s,
3416
- content: n
3411
+ content: a
3417
3412
  },
3418
3413
  exUnits: t
3419
3414
  };
3420
3415
  }
3421
3416
  return this;
3422
3417
  };
3423
- mintRedeemerValue = (e, t = { ...at }, s = "Mesh") => (this.mintReferenceTxInRedeemerValue(e, t, s), this);
3418
+ mintRedeemerValue = (e, t = { ...nt }, s = "Mesh") => (this.mintReferenceTxInRedeemerValue(e, t, s), this);
3424
3419
  requiredSignerHash = (e) => (this.meshTxBuilderBody.requiredSignatures.push(e), this);
3425
- txInCollateral = (e, t, s, n) => (this.collateralQueueItem && this.meshTxBuilderBody.collaterals.push(this.collateralQueueItem), this.collateralQueueItem = {
3420
+ txInCollateral = (e, t, s, a) => (this.collateralQueueItem && this.meshTxBuilderBody.collaterals.push(this.collateralQueueItem), this.collateralQueueItem = {
3426
3421
  type: "PubKey",
3427
3422
  txIn: {
3428
3423
  txHash: e,
3429
3424
  txIndex: t,
3430
3425
  amount: s,
3431
- address: n
3426
+ address: a
3432
3427
  }
3433
3428
  }, this);
3429
+ registerPoolCertificate = (e) => (this.meshTxBuilderBody.certificates.push({
3430
+ type: "RegisterPool",
3431
+ poolParams: e
3432
+ }), this);
3433
+ registerStakeCertificate = (e) => (this.meshTxBuilderBody.certificates.push({
3434
+ type: "RegisterStake",
3435
+ stakeKeyHash: e
3436
+ }), this);
3437
+ delegateStakeCertificate = (e, t) => (this.meshTxBuilderBody.certificates.push({
3438
+ type: "DelegateStake",
3439
+ stakeKeyHash: e,
3440
+ poolId: t
3441
+ }), this);
3442
+ deregisterStakeCertificate = (e) => (this.meshTxBuilderBody.certificates.push({
3443
+ type: "DeregisterStake",
3444
+ stakeKeyHash: e
3445
+ }), this);
3446
+ retirePoolCertificate = (e, t) => (this.meshTxBuilderBody.certificates.push({
3447
+ type: "RetirePool",
3448
+ poolId: e,
3449
+ epoch: t
3450
+ }), this);
3434
3451
  changeAddress = (e) => (this.meshTxBuilderBody.changeAddress = e, this);
3435
3452
  invalidBefore = (e) => (this.meshTxBuilderBody.validityRange.invalidBefore = e, this);
3436
3453
  invalidHereafter = (e) => (this.meshTxBuilderBody.validityRange.invalidHereafter = e, this);
3437
3454
  metadataValue = (e, t) => (this.meshTxBuilderBody.metadata.push({ tag: e, metadata: t }), this);
3438
3455
  protocolParams = (e) => {
3439
- const t = { ...k, ...e };
3456
+ const t = { ...T, ...e };
3440
3457
  return this._protocolParams = t, this.txBuilder = Et(t), this;
3441
3458
  };
3442
3459
  signingKey = (e) => (this.meshTxBuilderBody.signingKey.push(e), this);
3443
3460
  selectUtxosFrom = (e, t = 5e6) => (this.meshTxBuilderBody.extraInputs = e, this.meshTxBuilderBody.selectionThreshold = t, this);
3444
3461
  addUtxosFrom = (e, t) => {
3445
- const s = this.meshTxBuilderBody.outputs.reduce((a, o) => (o.amount.forEach((u) => {
3446
- const { unit: d, quantity: l } = u, g = Number(a.get(d)) || 0;
3447
- a.set(d, String(g + Number(l)));
3448
- }), a), /* @__PURE__ */ new Map());
3449
- this.meshTxBuilderBody.inputs.reduce((a, o) => {
3462
+ const s = this.meshTxBuilderBody.outputs.reduce((i, o) => (o.amount.forEach((u) => {
3463
+ const { unit: d, quantity: l } = u, m = Number(i.get(d)) || 0;
3464
+ i.set(d, String(m + Number(l)));
3465
+ }), i), /* @__PURE__ */ new Map());
3466
+ this.meshTxBuilderBody.inputs.reduce((i, o) => {
3450
3467
  const c = o.txIn.amount;
3451
3468
  return c == null || c.forEach((u) => {
3452
- const { unit: d, quantity: l } = u, g = Number(a.get(d)) || 0;
3453
- a.set(d, String(g - Number(l)));
3454
- }), a;
3455
- }, s), this.meshTxBuilderBody.mints.reduce((a, o) => {
3469
+ const { unit: d, quantity: l } = u, m = Number(i.get(d)) || 0;
3470
+ i.set(d, String(m - Number(l)));
3471
+ }), i;
3472
+ }, s), this.meshTxBuilderBody.mints.reduce((i, o) => {
3456
3473
  const c = {
3457
3474
  unit: o.policyId + o.assetName,
3458
3475
  quantity: String(o.amount)
3459
- }, u = Number(a.get(c.unit)) || 0;
3460
- return a.set(c.unit, String(u - Number(c.quantity))), a;
3461
- }, s), Zs(e, s, t).forEach((a) => {
3476
+ }, u = Number(i.get(c.unit)) || 0;
3477
+ return i.set(c.unit, String(u - Number(c.quantity))), i;
3478
+ }, s), Xs(e, s, t).forEach((i) => {
3462
3479
  this.addTxIn({
3463
3480
  type: "PubKey",
3464
3481
  txIn: {
3465
- txHash: a.input.txHash,
3466
- txIndex: a.input.outputIndex,
3467
- amount: a.output.amount,
3468
- address: a.output.address
3482
+ txHash: i.input.txHash,
3483
+ txIndex: i.input.outputIndex,
3484
+ amount: i.output.amount,
3485
+ address: i.output.address
3469
3486
  }
3470
3487
  });
3471
3488
  });
3472
3489
  };
3473
3490
  addAllSigningKeys = (e) => {
3474
3491
  if (e.length > 0) {
3475
- const t = i.Vkeywitnesses.new(), s = i.Transaction.from_hex(this.txHex), n = s.body();
3492
+ const t = n.Vkeywitnesses.new(), s = n.Transaction.from_hex(this.txHex), a = s.body();
3476
3493
  e.forEach((c) => {
3477
- const u = c.slice(0, 4) === "5820" ? c.slice(4) : c, d = i.PrivateKey.from_hex(u), l = i.make_vkey_witness(i.hash_transaction(n), d);
3494
+ const u = c.slice(0, 4) === "5820" ? c.slice(4) : c, d = n.PrivateKey.from_hex(u), l = n.make_vkey_witness(n.hash_transaction(a), d);
3478
3495
  t.add(l);
3479
3496
  });
3480
- const a = s.witness_set();
3481
- a.set_vkeys(t);
3482
- const o = i.Transaction.new(n, a, s.auxiliary_data());
3497
+ const i = s.witness_set();
3498
+ i.set_vkeys(t);
3499
+ const o = n.Transaction.new(a, i, s.auxiliary_data());
3483
3500
  this.txHex = o.to_hex();
3484
3501
  }
3485
3502
  };
@@ -3510,8 +3527,15 @@ class er {
3510
3527
  this.meshTxBuilderBody.mints.push(this.mintItem), this.mintItem = void 0;
3511
3528
  };
3512
3529
  makePlutusScriptSource = (e) => {
3513
- const t = i.ScriptHash.from_hex(e.spendingScriptHash), s = i.TransactionInput.new(i.TransactionHash.from_hex(e.txHash), e.txIndex);
3514
- return i.PlutusScriptSource.new_ref_input_with_lang_ver(t, s, Y[e.version]);
3530
+ const t = n.ScriptHash.from_hex(e.spendingScriptHash), s = n.TransactionInput.new(n.TransactionHash.from_hex(e.txHash), e.txIndex);
3531
+ return n.PlutusScriptSource.new_ref_input_with_lang_ver(t, s, Y[e.version]);
3532
+ };
3533
+ removeDuplicateInputs = () => {
3534
+ const e = this.meshTxBuilderBody.inputs, t = (a) => `${a.txHash}#${a.txIndex}`, s = [];
3535
+ for (let a = 0; a < e.length; a++) {
3536
+ const i = t(e[a].txIn);
3537
+ s.includes(i) ? (e.splice(a, 1), a--) : s.push(i);
3538
+ }
3515
3539
  };
3516
3540
  addAllInputs = (e) => {
3517
3541
  for (let t = 0; t < e.length; t++) {
@@ -3527,21 +3551,21 @@ class er {
3527
3551
  }
3528
3552
  };
3529
3553
  addTxIn = (e) => {
3530
- this.txBuilder.add_input(i.Address.from_bech32(e.txIn.address), i.TransactionInput.new(i.TransactionHash.from_hex(e.txIn.txHash), e.txIn.txIndex), Z(e.txIn.amount));
3554
+ this.txBuilder.add_input(n.Address.from_bech32(e.txIn.address), n.TransactionInput.new(n.TransactionHash.from_hex(e.txIn.txHash), e.txIn.txIndex), G(e.txIn.amount));
3531
3555
  };
3532
3556
  addScriptTxIn = ({ scriptTxIn: e, txIn: t }) => {
3533
3557
  let s;
3534
- const { datumSource: n, scriptSource: a, redeemer: o } = e;
3535
- if (n.type === "Provided")
3536
- s = i.DatumSource.new(this.castDataToPlutusData(n.data));
3558
+ const { datumSource: a, scriptSource: i, redeemer: o } = e;
3559
+ if (a.type === "Provided")
3560
+ s = n.DatumSource.new(this.castDataToPlutusData(a.data));
3537
3561
  else {
3538
- const d = i.TransactionInput.new(i.TransactionHash.from_hex(n.txHash), n.txIndex);
3539
- s = i.DatumSource.new_ref_input(d);
3562
+ const d = n.TransactionInput.new(n.TransactionHash.from_hex(a.txHash), a.txIndex);
3563
+ s = n.DatumSource.new_ref_input(d);
3540
3564
  }
3541
3565
  let c;
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]));
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))));
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));
3566
+ i.type == "Inline" ? c = this.makePlutusScriptSource(i.txInInfo) : c = n.PlutusScriptSource.new(n.PlutusScript.from_hex_with_version(i.script.code, Y[i.script.version]));
3567
+ const u = n.Redeemer.new(n.RedeemerTag.new_spend(), n.BigNum.from_str("0"), this.castDataToPlutusData(o.data), n.ExUnits.new(n.BigNum.from_str(String(o.exUnits.mem)), n.BigNum.from_str(String(o.exUnits.steps))));
3568
+ this.txBuilder.add_plutus_script_input(n.PlutusWitness.new_with_ref(c, s, u), n.TransactionInput.new(n.TransactionHash.from_hex(t.txHash), t.txIndex), G(t.amount));
3545
3569
  };
3546
3570
  addAllOutputs = (e) => {
3547
3571
  for (let t = 0; t < e.length; t++) {
@@ -3549,38 +3573,38 @@ class er {
3549
3573
  this.addOutput(s);
3550
3574
  }
3551
3575
  };
3552
- addOutput = ({ amount: e, address: t, datum: s, referenceScript: n }) => {
3553
- const a = Z(e), o = a.multiasset();
3554
- if (a.is_zero() && o === void 0)
3576
+ addOutput = ({ amount: e, address: t, datum: s, referenceScript: a }) => {
3577
+ const i = G(e), o = i.multiasset();
3578
+ if (i.is_zero() && o === void 0)
3555
3579
  throw Error("Invalid output amount");
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]))));
3580
+ let c = n.TransactionOutputBuilder.new().with_address(K(t));
3581
+ s && s.type === "Hash" && (c = c.with_data_hash(n.hash_plutus_data(this.castDataToPlutusData(s.data)))), s && s.type === "Inline" && (c = c.with_plutus_data(this.castDataToPlutusData(s.data))), a && (c = c.with_script_ref(n.ScriptRef.new_plutus_script(n.PlutusScript.from_hex_with_version(a.code, Y[a.version]))));
3558
3582
  const u = c.next();
3559
3583
  if (o) {
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();
3584
+ const d = i.coin().is_zero() ? u.with_asset_and_min_required_coin_by_utxo_cost(o, Ft(this._protocolParams.coinsPerUTxOSize)).build() : u.with_coin_and_asset(i.coin(), o).build();
3561
3585
  this.txBuilder.add_output(d);
3562
3586
  } else {
3563
- const d = u.with_coin(a.coin()).build();
3587
+ const d = u.with_coin(i.coin()).build();
3564
3588
  this.txBuilder.add_output(d);
3565
3589
  }
3566
3590
  };
3567
3591
  addAllCollaterals = (e) => {
3568
- const t = i.TxInputsBuilder.new();
3592
+ const t = n.TxInputsBuilder.new();
3569
3593
  for (let s = 0; s < e.length; s++) {
3570
- const n = e[s];
3571
- this.addCollateral(t, n);
3594
+ const a = e[s];
3595
+ this.addCollateral(t, a);
3572
3596
  }
3573
3597
  this.txBuilder.set_collateral(t);
3574
3598
  };
3575
3599
  addCollateral = (e, t) => {
3576
- e.add_input(i.Address.from_bech32(t.txIn.address), i.TransactionInput.new(i.TransactionHash.from_hex(t.txIn.txHash), t.txIn.txIndex), Z(t.txIn.amount));
3600
+ e.add_input(n.Address.from_bech32(t.txIn.address), n.TransactionInput.new(n.TransactionHash.from_hex(t.txIn.txHash), t.txIn.txIndex), G(t.txIn.amount));
3577
3601
  };
3578
3602
  addCollateralReturn = (e) => {
3579
3603
  var s;
3580
3604
  const t = (s = this.txBuilder.get_fee_if_set()) == null ? void 0 : s.to_js_value();
3581
3605
  if (t) {
3582
- const n = Math.ceil(this._protocolParams.collateralPercent * Number(t) / 100);
3583
- this.txBuilder.set_total_collateral_and_return(i.BigNum.from_str(String(n)), i.Address.from_bech32(e));
3606
+ const a = Math.ceil(this._protocolParams.collateralPercent * Number(t) / 100);
3607
+ this.txBuilder.set_total_collateral_and_return(n.BigNum.from_str(String(a)), n.Address.from_bech32(e));
3584
3608
  }
3585
3609
  };
3586
3610
  addAllReferenceInputs = (e) => {
@@ -3589,92 +3613,133 @@ class er {
3589
3613
  });
3590
3614
  };
3591
3615
  addReferenceInput = ({ txHash: e, txIndex: t }) => {
3592
- const s = i.TransactionInput.new(i.TransactionHash.from_hex(e), t);
3616
+ const s = n.TransactionInput.new(n.TransactionHash.from_hex(e), t);
3593
3617
  this.txBuilder.add_reference_input(s);
3594
3618
  };
3595
3619
  addAllMints = (e) => {
3596
- const t = i.MintBuilder.new();
3620
+ const t = n.MintBuilder.new();
3597
3621
  let s = 0;
3598
- for (let n = 0; n < e.length; n++) {
3599
- const a = e[n];
3600
- if (!a.scriptSource)
3622
+ for (let a = 0; a < e.length; a++) {
3623
+ const i = e[a];
3624
+ if (!i.scriptSource)
3601
3625
  throw Error("Mint script is expected to be provided");
3602
- if (a.type === "Plutus") {
3603
- if (!a.redeemer)
3626
+ if (i.type === "Plutus") {
3627
+ if (!i.redeemer)
3604
3628
  throw Error("Missing mint redeemer information");
3605
- this.addPlutusMint(t, a, s), s++;
3629
+ this.addPlutusMint(t, i, s), s++;
3606
3630
  } else
3607
- a.type === "Native" && this.addNativeMint(t, a);
3631
+ i.type === "Native" && this.addNativeMint(t, i);
3608
3632
  }
3609
3633
  this.txBuilder.set_mint_builder(t);
3610
3634
  };
3611
- addPlutusMint = (e, { redeemer: t, policyId: s, scriptSource: n, assetName: a, amount: o }, c) => {
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]));
3613
- e.add_asset(i.MintWitness.new_plutus_script(d, u), i.AssetName.new(Buffer.from(a, "hex")), i.Int.new_i32(o));
3635
+ addPlutusMint = (e, { redeemer: t, policyId: s, scriptSource: a, assetName: i, amount: o }, c) => {
3636
+ const u = n.Redeemer.new(n.RedeemerTag.new_mint(), n.BigNum.from_str(String(c)), this.castDataToPlutusData(t.data), n.ExUnits.new(n.BigNum.from_str(String(t.exUnits.mem)), n.BigNum.from_str(String(t.exUnits.steps)))), d = a.type === "Reference Script" ? n.PlutusScriptSource.new_ref_input_with_lang_ver(n.ScriptHash.from_hex(s), n.TransactionInput.new(n.TransactionHash.from_hex(a.txHash), a.txIndex), Y[a.version]) : n.PlutusScriptSource.new(n.PlutusScript.from_hex_with_version(a.script.code, Y[a.script.version]));
3637
+ e.add_asset(n.MintWitness.new_plutus_script(d, u), n.AssetName.new(Buffer.from(i, "hex")), n.Int.new(n.BigNum.from_str(o)));
3614
3638
  };
3615
- addNativeMint = (e, { scriptSource: t, assetName: s, amount: n }) => {
3639
+ addNativeMint = (e, { scriptSource: t, assetName: s, amount: a }) => {
3616
3640
  if (t.type === "Reference Script")
3617
3641
  throw Error("Native mint cannot have reference script");
3618
- e.add_asset(i.MintWitness.new_native_script(i.NativeScript.from_hex(t.script.code)), i.AssetName.new(Buffer.from(s, "hex")), i.Int.new_i32(n));
3642
+ e.add_asset(n.MintWitness.new_native_script(n.NativeScript.from_hex(t.script.code)), n.AssetName.new(Buffer.from(s, "hex")), n.Int.new(n.BigNum.from_str(a)));
3643
+ };
3644
+ decimalToFraction(e) {
3645
+ const t = 10 ** e.toString().split(".")[1].length;
3646
+ return [e * t, t];
3647
+ }
3648
+ toPoolParams = (e) => {
3649
+ const t = this.decimalToFraction(e.margin), s = n.Relays.new();
3650
+ e.relays.forEach((o) => {
3651
+ s.add(Ve(o));
3652
+ });
3653
+ const a = n.RewardAddress.from_address(n.Address.from_bech32(e.rewardAddress));
3654
+ if (a === void 0)
3655
+ throw new Error("Reward address is invalid");
3656
+ const i = n.Ed25519KeyHashes.new();
3657
+ return e.owners.forEach((o) => {
3658
+ i.add(n.Ed25519KeyHash.from_hex(o));
3659
+ }), n.PoolParams.new(n.Ed25519KeyHash.from_hex(e.operator), n.VRFKeyHash.from_hex(e.VRFKeyHash), n.BigNum.from_str(e.pledge), n.BigNum.from_str(e.cost), n.UnitInterval.new(n.BigNum.from_str(t[0].toString()), n.BigNum.from_str(t[1].toString())), a, i, s, e.metadata ? n.PoolMetadata.from_json(JSON.stringify(e.metadata)) : void 0);
3660
+ };
3661
+ addCertificate = (e, t) => {
3662
+ switch (t.type) {
3663
+ case "RegisterPool":
3664
+ e.add(n.Certificate.new_pool_registration(n.PoolRegistration.new(this.toPoolParams(t.poolParams))));
3665
+ break;
3666
+ case "RegisterStake":
3667
+ e.add(n.Certificate.new_stake_registration(n.StakeRegistration.new(n.StakeCredential.from_keyhash(n.Ed25519KeyHash.from_hex(t.stakeKeyHash)))));
3668
+ break;
3669
+ case "DelegateStake":
3670
+ e.add(n.Certificate.new_stake_delegation(n.StakeDelegation.new(n.StakeCredential.from_keyhash(n.Ed25519KeyHash.from_hex(t.stakeKeyHash)), t.poolId.startsWith("pool") ? n.Ed25519KeyHash.from_bech32(t.poolId) : n.Ed25519KeyHash.from_hex(t.poolId))));
3671
+ break;
3672
+ case "DeregisterStake":
3673
+ e.add(n.Certificate.new_stake_deregistration(n.StakeDeregistration.new(n.StakeCredential.from_keyhash(n.Ed25519KeyHash.from_hex(t.stakeKeyHash)))));
3674
+ break;
3675
+ case "RetirePool":
3676
+ e.add(n.Certificate.new_pool_retirement(n.PoolRetirement.new(t.poolId.startsWith("pool") ? n.Ed25519KeyHash.from_bech32(t.poolId) : n.Ed25519KeyHash.from_hex(t.poolId), t.epoch)));
3677
+ }
3619
3678
  };
3620
3679
  queueAllLastItem = () => {
3621
3680
  this.txOutput && (this.meshTxBuilderBody.outputs.push(this.txOutput), this.txOutput = void 0), this.txInQueueItem && this.queueInput(), this.collateralQueueItem && (this.meshTxBuilderBody.collaterals.push(this.collateralQueueItem), this.collateralQueueItem = void 0), this.mintItem && this.queueMint();
3622
3681
  };
3682
+ addAllCertificates = (e) => {
3683
+ const t = n.Certificates.new();
3684
+ e.forEach((s) => {
3685
+ this.addCertificate(t, s);
3686
+ }), this.txBuilder.set_certs(t);
3687
+ };
3623
3688
  addCostModels = () => {
3624
- this.txBuilder.calc_script_data_hash(i.TxBuilderConstants.plutus_vasil_cost_models());
3689
+ this.txBuilder.calc_script_data_hash(n.TxBuilderConstants.plutus_vasil_cost_models());
3625
3690
  };
3626
3691
  addChange = (e) => {
3627
- this.txBuilder.add_change_if_needed(i.Address.from_bech32(e));
3692
+ this.txBuilder.add_change_if_needed(n.Address.from_bech32(e));
3628
3693
  };
3629
3694
  addValidityRange = ({ invalidBefore: e, invalidHereafter: t }) => {
3630
- e && this.txBuilder.set_validity_start_interval_bignum(i.BigNum.from_str(e.toString())), t && this.txBuilder.set_ttl_bignum(i.BigNum.from_str(t.toString()));
3695
+ e && this.txBuilder.set_validity_start_interval_bignum(n.BigNum.from_str(e.toString())), t && this.txBuilder.set_ttl_bignum(n.BigNum.from_str(t.toString()));
3631
3696
  };
3632
3697
  addAllRequiredSignatures = (e) => {
3633
3698
  e.forEach((t) => {
3634
- this.txBuilder.add_required_signer(i.Ed25519KeyHash.from_hex(t));
3699
+ this.txBuilder.add_required_signer(n.Ed25519KeyHash.from_hex(t));
3635
3700
  });
3636
3701
  };
3637
3702
  addAllMetadata = (e) => {
3638
3703
  e.forEach(({ tag: t, metadata: s }) => {
3639
- this.txBuilder.add_json_metadatum(i.BigNum.from_str(t), JSON.stringify(s));
3704
+ this.txBuilder.add_json_metadatum(n.BigNum.from_str(t), JSON.stringify(s));
3640
3705
  });
3641
3706
  };
3642
3707
  updateRedeemer = (e, t) => {
3643
3708
  t.forEach((s) => {
3644
3709
  switch (s.tag) {
3645
3710
  case "SPEND": {
3646
- const n = e.inputs[s.index];
3647
- n.type == "Script" && n.scriptTxIn.redeemer && (n.scriptTxIn.redeemer.exUnits.mem = Math.floor(s.budget.mem * this.txEvaluationMultiplier), n.scriptTxIn.redeemer.exUnits.steps = Math.floor(s.budget.steps * this.txEvaluationMultiplier));
3711
+ const a = e.inputs[s.index];
3712
+ a.type == "Script" && a.scriptTxIn.redeemer && (a.scriptTxIn.redeemer.exUnits.mem = Math.floor(s.budget.mem * this.txEvaluationMultiplier), a.scriptTxIn.redeemer.exUnits.steps = Math.floor(s.budget.steps * this.txEvaluationMultiplier));
3648
3713
  break;
3649
3714
  }
3650
3715
  case "MINT": {
3651
- const n = e.mints[s.index];
3652
- n.type == "Plutus" && n.redeemer && (n.redeemer.exUnits.mem = Math.floor(s.budget.mem * this.txEvaluationMultiplier), n.redeemer.exUnits.steps = Math.floor(s.budget.steps * this.txEvaluationMultiplier));
3716
+ const a = e.mints[s.index];
3717
+ a.type == "Plutus" && a.redeemer && (a.redeemer.exUnits.mem = Math.floor(s.budget.mem * this.txEvaluationMultiplier), a.redeemer.exUnits.steps = Math.floor(s.budget.steps * this.txEvaluationMultiplier));
3653
3718
  break;
3654
3719
  }
3655
3720
  }
3656
3721
  });
3657
3722
  };
3658
3723
  castRawDataToJsonString = (e) => typeof e == "object" ? JSON.stringify(e) : e;
3659
- castDataToPlutusData = ({ type: e, content: t }) => e === "Mesh" ? tt(t) : e === "CBOR" ? i.PlutusData.from_hex(t) : i.PlutusData.from_json(t, i.PlutusDatumSchema.DetailedSchema);
3724
+ castDataToPlutusData = ({ type: e, content: t }) => e === "Mesh" ? Z(t) : e === "CBOR" ? n.PlutusData.from_hex(t) : n.PlutusData.from_json(t, n.PlutusDatumSchema.DetailedSchema);
3660
3725
  }
3661
- class Tr extends er {
3726
+ class Qr extends tr {
3662
3727
  _fetcher;
3663
3728
  _submitter;
3664
3729
  _evaluator;
3665
3730
  queriedTxHashes = /* @__PURE__ */ new Set();
3666
3731
  queriedUTxOs = {};
3667
- constructor({ fetcher: e, submitter: t, evaluator: s, isHydra: n = !1 }) {
3668
- super(), e && (this._fetcher = e), t && (this._submitter = t), s && (this._evaluator = s), n && (this.isHydra = !0);
3732
+ constructor({ fetcher: e, submitter: t, evaluator: s, isHydra: a = !1 }) {
3733
+ super(), e && (this._fetcher = e), t && (this._submitter = t), s && (this._evaluator = s), a && (this.isHydra = !0);
3669
3734
  }
3670
3735
  complete = async (e) => {
3671
3736
  e ? this.meshTxBuilderBody = e : this.queueAllLastItem();
3672
- const { inputs: t, collaterals: s } = this.meshTxBuilderBody, n = [...t, ...s].filter((a) => !this.isInputComplete(a));
3673
- if (console.log("Incomplete UTxO", n), await this.queryAllTxInfo(n), console.log("Incomplete UTxO", n), n.forEach((a) => {
3674
- this.completeTxInformation(a);
3737
+ const { inputs: t, collaterals: s } = this.meshTxBuilderBody, a = [...t, ...s].filter((i) => !this.isInputComplete(i));
3738
+ if (console.log("Incomplete UTxO", a), await this.queryAllTxInfo(a), console.log("Incomplete UTxO", a), a.forEach((i) => {
3739
+ this.completeTxInformation(i);
3675
3740
  }), this.completeSync(e), this._evaluator) {
3676
- const a = await this._evaluator.evaluateTx(this.txHex);
3677
- this.updateRedeemer(this.meshTxBuilderBody, a), this.completeSync(e);
3741
+ const i = await this._evaluator.evaluateTx(this.txHex);
3742
+ this.updateRedeemer(this.meshTxBuilderBody, i), this.completeSync(e);
3678
3743
  }
3679
3744
  return this;
3680
3745
  };
@@ -3692,29 +3757,29 @@ class Tr extends er {
3692
3757
  const t = [];
3693
3758
  if (e.length > 0 && !this._fetcher)
3694
3759
  throw Error("Transaction information is incomplete while no fetcher instance is provided");
3695
- for (let n = 0; n < e.length; n++) {
3696
- const a = e[n];
3697
- this.isInputInfoComplete(a) || t.push(this.getUTxOInfo(a.txIn.txHash)), a.type === "Script" && ((s = a.scriptTxIn.scriptSource) == null ? void 0 : s.type) === "Inline" && !this.isRefScriptInfoComplete(a) && t.push(this.getUTxOInfo(a.scriptTxIn.scriptSource.txInInfo.txHash));
3760
+ for (let a = 0; a < e.length; a++) {
3761
+ const i = e[a];
3762
+ this.isInputInfoComplete(i) || t.push(this.getUTxOInfo(i.txIn.txHash)), i.type === "Script" && ((s = i.scriptTxIn.scriptSource) == null ? void 0 : s.type) === "Inline" && !this.isRefScriptInfoComplete(i) && t.push(this.getUTxOInfo(i.scriptTxIn.scriptSource.txInInfo.txHash));
3698
3763
  }
3699
3764
  return Promise.all(t);
3700
3765
  };
3701
3766
  completeTxInformation = (e) => {
3702
3767
  var t;
3703
3768
  if (!this.isInputInfoComplete(e)) {
3704
- const s = this.queriedUTxOs[e.txIn.txHash], n = s == null ? void 0 : s.find((c) => c.input.outputIndex === e.txIn.txIndex), a = n == null ? void 0 : n.output.amount, o = n == null ? void 0 : n.output.address;
3705
- if (!a || a.length === 0)
3769
+ const s = this.queriedUTxOs[e.txIn.txHash], a = s == null ? void 0 : s.find((c) => c.input.outputIndex === e.txIn.txIndex), i = a == null ? void 0 : a.output.amount, o = a == null ? void 0 : a.output.address;
3770
+ if (!i || i.length === 0)
3706
3771
  throw Error(`Couldn't find value information for ${e.txIn.txHash}#${e.txIn.txIndex}`);
3707
- if (e.txIn.amount = a, e.type === "PubKey") {
3772
+ if (e.txIn.amount = i, e.type === "PubKey") {
3708
3773
  if (!o || o === "")
3709
3774
  throw Error(`Couldn't find address information for ${e.txIn.txHash}#${e.txIn.txIndex}`);
3710
3775
  e.txIn.address = o;
3711
3776
  }
3712
3777
  }
3713
3778
  if (e.type === "Script" && ((t = e.scriptTxIn.scriptSource) == null ? void 0 : t.type) == "Inline" && !this.isRefScriptInfoComplete(e)) {
3714
- const s = e.scriptTxIn.scriptSource.txInInfo, a = this.queriedUTxOs[s.txHash].find((o) => o.input.outputIndex === s.txIndex);
3715
- if (!a)
3779
+ const s = e.scriptTxIn.scriptSource.txInInfo, i = this.queriedUTxOs[s.txHash].find((o) => o.input.outputIndex === s.txIndex);
3780
+ if (!i)
3716
3781
  throw Error(`Couldn't find script reference utxo for ${s.txHash}#${s.txIndex}`);
3717
- s.spendingScriptHash = a == null ? void 0 : a.output.scriptHash;
3782
+ s.spendingScriptHash = i == null ? void 0 : i.output.scriptHash;
3718
3783
  }
3719
3784
  };
3720
3785
  isInputComplete = (e) => e.type === "PubKey" ? this.isInputInfoComplete(e) : e.type === "Script" ? this.isInputInfoComplete(e) && this.isRefScriptInfoComplete(e) : !0;
@@ -3728,47 +3793,47 @@ class Tr extends er {
3728
3793
  return !((t == null ? void 0 : t.type) === "Inline" && !((s = t.txInInfo) != null && s.spendingScriptHash));
3729
3794
  };
3730
3795
  }
3731
- class B {
3796
+ class S {
3732
3797
  _networkId;
3733
3798
  _encryptedSecret;
3734
3799
  constructor(e, t) {
3735
3800
  this._networkId = e, this._encryptedSecret = t;
3736
3801
  }
3737
3802
  getAccount(e, t) {
3738
- return this.accountContext(e, t, (s, n) => {
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();
3803
+ return this.accountContext(e, t, (s, a) => {
3804
+ const i = ye(this._networkId, s.to_public().hash(), a.to_public().hash()).to_address().to_bech32(), o = xe(this._networkId, s.to_public().hash()).to_address().to_bech32(), c = Ot(this._networkId, a.to_public().hash()).to_address().to_bech32();
3740
3805
  return {
3741
- baseAddress: a,
3806
+ baseAddress: i,
3742
3807
  enterpriseAddress: o,
3743
3808
  rewardAddress: c
3744
3809
  };
3745
3810
  });
3746
3811
  }
3747
- signData(e, t, s, n) {
3812
+ signData(e, t, s, a) {
3748
3813
  try {
3749
- return this.accountContext(e, t, (a, o) => {
3750
- const c = { payload: n }, u = {
3751
- address: B.resolveAddress(this._networkId, s, a, o),
3752
- key: s.startsWith("stake") ? o : a
3753
- }, { coseSign1: d, coseKey: l } = gs(c, u);
3814
+ return this.accountContext(e, t, (i, o) => {
3815
+ const c = { payload: a }, u = {
3816
+ address: S.resolveAddress(this._networkId, s, i, o),
3817
+ key: s.startsWith("stake") ? o : i
3818
+ }, { coseSign1: d, coseKey: l } = ms(c, u);
3754
3819
  return { signature: d, key: l };
3755
3820
  });
3756
- } catch (a) {
3757
- throw new Error(`An error occurred during signData: ${a}.`);
3821
+ } catch (i) {
3822
+ throw new Error(`An error occurred during signData: ${i}.`);
3758
3823
  }
3759
3824
  }
3760
- signTx(e, t, s, n, a) {
3825
+ signTx(e, t, s, a, i) {
3761
3826
  try {
3762
- const o = Fe(js(n));
3827
+ const o = Fe(Ws(a));
3763
3828
  return this.accountContext(e, t, (c, u) => {
3764
- const d = i.Vkeywitnesses.new();
3765
- return B.resolveSigners(n, s, c.to_public().hash().to_hex()).forEach((g) => {
3766
- if (g === c.to_public().hash().to_hex())
3767
- d.add(i.make_vkey_witness(o, c));
3768
- else if (g === u.to_public().hash().to_hex())
3769
- d.add(i.make_vkey_witness(o, u));
3770
- else if (a === !1)
3771
- throw new Error(`Missing key witness for: ${g}`);
3829
+ const d = n.Vkeywitnesses.new();
3830
+ return S.resolveSigners(a, s, c.to_public().hash().to_hex()).forEach((m) => {
3831
+ if (m === c.to_public().hash().to_hex())
3832
+ d.add(n.make_vkey_witness(o, c));
3833
+ else if (m === u.to_public().hash().to_hex())
3834
+ d.add(n.make_vkey_witness(o, u));
3835
+ else if (i === !1)
3836
+ throw new Error(`Missing key witness for: ${m}`);
3772
3837
  }), d;
3773
3838
  });
3774
3839
  } catch (o) {
@@ -3776,159 +3841,159 @@ class B {
3776
3841
  }
3777
3842
  }
3778
3843
  static encryptMnemonic(e, t) {
3779
- const s = Se(e.join(" ")), n = Ye(s), a = D(n.as_bytes());
3780
- return n.free(), B.encrypt(a, t);
3844
+ const s = Se(e.join(" ")), a = Le(s), i = k(a.as_bytes());
3845
+ return a.free(), S.encrypt(i, t);
3781
3846
  }
3782
3847
  static encryptPrivateKey(e, t) {
3783
- const s = i.Bip32PrivateKey.from_bech32(e), n = D(s.as_bytes());
3784
- return s.free(), B.encrypt(n, t);
3848
+ const s = n.Bip32PrivateKey.from_bech32(e), a = k(s.as_bytes());
3849
+ return s.free(), S.encrypt(a, t);
3785
3850
  }
3786
3851
  static encryptSigningKeys(e, t, s) {
3787
- const n = B.encrypt(e.slice(4), s), a = B.encrypt(t.slice(4), s);
3788
- return [n, a];
3852
+ const a = S.encrypt(e.slice(4), s), i = S.encrypt(t.slice(4), s);
3853
+ return [a, i];
3789
3854
  }
3790
3855
  static generateMnemonic(e = 256) {
3791
3856
  return ze(e).split(" ");
3792
3857
  }
3793
3858
  accountContext(e, t, s) {
3794
- const { paymentKey: n, stakeKey: a } = B.resolveKeys(e, t, this._encryptedSecret), o = s(n, a);
3795
- return n.free(), a.free(), o;
3859
+ const { paymentKey: a, stakeKey: i } = S.resolveKeys(e, t, this._encryptedSecret), o = s(a, i);
3860
+ return a.free(), i.free(), o;
3796
3861
  }
3797
3862
  static decrypt(e, t) {
3798
3863
  try {
3799
- return i.decrypt_with_password(Q(t), e);
3864
+ return n.decrypt_with_password(b(t), e);
3800
3865
  } catch {
3801
3866
  throw new Error("The password is incorrect.");
3802
3867
  }
3803
3868
  }
3804
3869
  static encrypt(e, t) {
3805
- const s = Be("0123456789abcdef"), n = s(64), a = s(24);
3806
- return i.encrypt_with_password(Q(t), n, a, e);
3870
+ const s = Be("0123456789abcdef"), a = s(64), i = s(24);
3871
+ return n.encrypt_with_password(b(t), a, i, e);
3807
3872
  }
3808
- static resolveAddress(e, t, s, n) {
3809
- const a = [
3810
- ye(e, s.to_public().hash(), n.to_public().hash()),
3873
+ static resolveAddress(e, t, s, a) {
3874
+ const i = [
3875
+ ye(e, s.to_public().hash(), a.to_public().hash()),
3811
3876
  xe(e, s.to_public().hash()),
3812
- Ot(e, n.to_public().hash())
3877
+ Ot(e, a.to_public().hash())
3813
3878
  ].find((o) => o.to_address().to_bech32() === t);
3814
- if (a !== void 0)
3815
- return a.to_address();
3879
+ if (i !== void 0)
3880
+ return i.to_address();
3816
3881
  throw new Error(`Address: ${t} doesn't belong to this account.`);
3817
3882
  }
3818
3883
  static resolveKeys(e, t, s) {
3819
3884
  if (typeof s == "string") {
3820
- const o = B.decrypt(s, t);
3821
- return Hs(o, e);
3885
+ const o = S.decrypt(s, t);
3886
+ return Ms(o, e);
3822
3887
  }
3823
- const n = B.decrypt(s[0], t), a = B.decrypt(s[1], t);
3888
+ const a = S.decrypt(s[0], t), i = S.decrypt(s[1], t);
3824
3889
  return {
3825
- paymentKey: i.PrivateKey.from_hex(n),
3826
- stakeKey: i.PrivateKey.from_hex(a)
3890
+ paymentKey: n.PrivateKey.from_hex(a),
3891
+ stakeKey: n.PrivateKey.from_hex(i)
3827
3892
  };
3828
3893
  }
3829
3894
  static resolveSigners(e, t, s) {
3830
- const n = (c) => {
3831
- const u = (f, x = [], C = 0) => {
3895
+ const a = (c) => {
3896
+ const u = (f, C = [], w = 0) => {
3832
3897
  var ft, lt, Jt, Wt, jt;
3833
- if (f === void 0 || C >= f.len())
3834
- return x;
3835
- const U = f.get(C), P = new Array();
3836
- switch (U.kind()) {
3837
- case i.CertificateKind.StakeDeregistration: {
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());
3898
+ if (f === void 0 || w >= f.len())
3899
+ return C;
3900
+ const D = f.get(w), P = new Array();
3901
+ switch (D.kind()) {
3902
+ case n.CertificateKind.StakeDeregistration: {
3903
+ const B = (ft = D.as_stake_deregistration()) == null ? void 0 : ft.stake_credential(), q = (B == null ? void 0 : B.kind()) === n.StakeCredKind.Key ? B.to_keyhash() : void 0;
3904
+ q && P.push(q.to_hex());
3840
3905
  break;
3841
3906
  }
3842
- case i.CertificateKind.StakeDelegation: {
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());
3907
+ case n.CertificateKind.StakeDelegation: {
3908
+ const B = (lt = D.as_stake_delegation()) == null ? void 0 : lt.stake_credential(), q = (B == null ? void 0 : B.kind()) === n.StakeCredKind.Key ? B.to_keyhash() : void 0;
3909
+ q && P.push(q.to_hex());
3845
3910
  break;
3846
3911
  }
3847
- case i.CertificateKind.PoolRegistration: {
3848
- const w = (Jt = U.as_pool_registration()) == null ? void 0 : Jt.pool_params().pool_owners();
3849
- P.push(...l(w));
3912
+ case n.CertificateKind.PoolRegistration: {
3913
+ const B = (Jt = D.as_pool_registration()) == null ? void 0 : Jt.pool_params().pool_owners();
3914
+ P.push(...l(B));
3850
3915
  break;
3851
3916
  }
3852
- case i.CertificateKind.PoolRetirement: {
3853
- const w = (Wt = U.as_pool_retirement()) == null ? void 0 : Wt.pool_keyhash();
3854
- w && P.push(w.to_hex());
3917
+ case n.CertificateKind.PoolRetirement: {
3918
+ const B = (Wt = D.as_pool_retirement()) == null ? void 0 : Wt.pool_keyhash();
3919
+ B && P.push(B.to_hex());
3855
3920
  break;
3856
3921
  }
3857
- case i.CertificateKind.MoveInstantaneousRewardsCert: {
3858
- const w = (jt = U.as_move_instantaneous_rewards_cert()) == null ? void 0 : jt.move_instantaneous_reward().as_to_stake_creds();
3859
- if (w)
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;
3922
+ case n.CertificateKind.MoveInstantaneousRewardsCert: {
3923
+ const B = (jt = D.as_move_instantaneous_rewards_cert()) == null ? void 0 : jt.move_instantaneous_reward().as_to_stake_creds();
3924
+ if (B)
3925
+ for (let q = 0; q < B.len(); q += 1) {
3926
+ const Xt = B.keys().get(q), Zt = Xt.kind() === n.StakeCredKind.Key ? Xt.to_keyhash() : void 0;
3862
3927
  Zt && P.push(Zt.to_hex());
3863
3928
  }
3864
3929
  break;
3865
3930
  }
3866
3931
  }
3867
- return u(f, [...x, ...P], C + 1);
3868
- }, d = (f, x = [], C = 0) => {
3869
- if (f === void 0 || C >= f.len())
3870
- return x;
3871
- const U = f.get(C).index(), P = f.get(C).transaction_id(), ft = t.find((lt) => lt.input.outputIndex === U && lt.input.txHash === P.to_hex()) !== void 0 ? s : "OUR_PRINCESS_IS_IN_ANOTHER_CASTLE";
3872
- return d(f, [...x, ft], C + 1);
3873
- }, l = (f, x = [], C = 0) => f === void 0 || C >= f.len() ? x : l(f, [...x, f.get(C).to_hex()], C + 1), g = (f, x = [], C = 0) => {
3874
- if (f === void 0 || C >= f.len())
3875
- return x;
3876
- const U = f.keys().get(C).payment_cred(), P = U.kind() === i.StakeCredKind.Key ? U.to_keyhash() : void 0;
3877
- return g(f, P ? [...x, P.to_hex()] : x, C + 1);
3878
- }, A = c.certs(), m = c.collateral(), p = c.inputs(), S = c.required_signers(), E = c.withdrawals();
3932
+ return u(f, [...C, ...P], w + 1);
3933
+ }, d = (f, C = [], w = 0) => {
3934
+ if (f === void 0 || w >= f.len())
3935
+ return C;
3936
+ const D = f.get(w).index(), P = f.get(w).transaction_id(), ft = t.find((lt) => lt.input.outputIndex === D && lt.input.txHash === P.to_hex()) !== void 0 ? s : "OUR_PRINCESS_IS_IN_ANOTHER_CASTLE";
3937
+ return d(f, [...C, ft], w + 1);
3938
+ }, l = (f, C = [], w = 0) => f === void 0 || w >= f.len() ? C : l(f, [...C, f.get(w).to_hex()], w + 1), m = (f, C = [], w = 0) => {
3939
+ if (f === void 0 || w >= f.len())
3940
+ return C;
3941
+ const D = f.keys().get(w).payment_cred(), P = D.kind() === n.StakeCredKind.Key ? D.to_keyhash() : void 0;
3942
+ return m(f, P ? [...C, P.to_hex()] : C, w + 1);
3943
+ }, g = c.certs(), A = c.collateral(), I = c.inputs(), x = c.required_signers(), v = c.withdrawals();
3879
3944
  return [
3880
- ...u(A),
3881
- ...d(m),
3882
- ...d(p),
3883
- ...l(S),
3884
- ...g(E)
3945
+ ...u(g),
3946
+ ...d(A),
3947
+ ...d(I),
3948
+ ...l(x),
3949
+ ...m(v)
3885
3950
  ];
3886
- }, a = (c) => {
3887
- const u = (l, g = []) => {
3888
- var A, m, p, S;
3951
+ }, i = (c) => {
3952
+ const u = (l, m = []) => {
3953
+ var g, A, I, x;
3889
3954
  if (l)
3890
- for (let E = 0; E < l.len(); E += 1) {
3891
- const f = l.get(E);
3955
+ for (let v = 0; v < l.len(); v += 1) {
3956
+ const f = l.get(v);
3892
3957
  switch (f.kind()) {
3893
- case i.NativeScriptKind.ScriptPubkey: {
3894
- const x = (A = f.as_script_pubkey()) == null ? void 0 : A.addr_keyhash().to_hex();
3895
- return x ? [...g, x] : g;
3958
+ case n.NativeScriptKind.ScriptPubkey: {
3959
+ const C = (g = f.as_script_pubkey()) == null ? void 0 : g.addr_keyhash().to_hex();
3960
+ return C ? [...m, C] : m;
3896
3961
  }
3897
- case i.NativeScriptKind.ScriptAll:
3898
- return u((m = f.as_script_all()) == null ? void 0 : m.native_scripts(), g);
3899
- case i.NativeScriptKind.ScriptAny:
3900
- return u((p = f.as_script_any()) == null ? void 0 : p.native_scripts(), g);
3901
- case i.NativeScriptKind.ScriptNOfK:
3902
- return u((S = f.as_script_n_of_k()) == null ? void 0 : S.native_scripts(), g);
3962
+ case n.NativeScriptKind.ScriptAll:
3963
+ return u((A = f.as_script_all()) == null ? void 0 : A.native_scripts(), m);
3964
+ case n.NativeScriptKind.ScriptAny:
3965
+ return u((I = f.as_script_any()) == null ? void 0 : I.native_scripts(), m);
3966
+ case n.NativeScriptKind.ScriptNOfK:
3967
+ return u((x = f.as_script_n_of_k()) == null ? void 0 : x.native_scripts(), m);
3903
3968
  }
3904
3969
  }
3905
- return g;
3970
+ return m;
3906
3971
  }, d = c.native_scripts();
3907
3972
  return [
3908
3973
  ...u(d)
3909
3974
  ];
3910
- }, o = K(e);
3975
+ }, o = O(e);
3911
3976
  return /* @__PURE__ */ new Set([
3912
- ...n(o.body()),
3913
- ...a(o.witness_set())
3977
+ ...a(o.body()),
3978
+ ...i(o.witness_set())
3914
3979
  ]);
3915
3980
  }
3916
3981
  }
3917
3982
  const N = "MARI0TIME";
3918
- class Ur {
3983
+ class vr {
3919
3984
  _fetcher;
3920
3985
  _submitter;
3921
3986
  _wallet;
3922
3987
  constructor(e) {
3923
3988
  switch (this._fetcher = e.fetcher, this._submitter = e.submitter, e.key.type) {
3924
3989
  case "mnemonic":
3925
- this._wallet = new B(e.networkId, B.encryptMnemonic(e.key.words, N));
3990
+ this._wallet = new S(e.networkId, S.encryptMnemonic(e.key.words, N));
3926
3991
  break;
3927
3992
  case "root":
3928
- this._wallet = new B(e.networkId, B.encryptPrivateKey(e.key.bech32, N));
3993
+ this._wallet = new S(e.networkId, S.encryptPrivateKey(e.key.bech32, N));
3929
3994
  break;
3930
3995
  case "cli":
3931
- this._wallet = new B(e.networkId, B.encryptSigningKeys(e.key.payment, e.key.stake ?? "f0".repeat(34), N));
3996
+ this._wallet = new S(e.networkId, S.encryptSigningKeys(e.key.payment, e.key.stake ?? "f0".repeat(34), N));
3932
3997
  }
3933
3998
  }
3934
3999
  getBaseAddress(e = 0) {
@@ -3942,38 +4007,38 @@ class Ur {
3942
4007
  }
3943
4008
  getUsedAddress(e = 0) {
3944
4009
  const t = this._wallet.getAccount(e, N);
3945
- return M(t.enterpriseAddress);
4010
+ return K(t.enterpriseAddress);
3946
4011
  }
3947
- getUsedCollateral(e = k.maxCollateralInputs) {
4012
+ getUsedCollateral(e = T.maxCollateralInputs) {
3948
4013
  throw new Error("getUsedCollateral not implemented.");
3949
4014
  }
3950
4015
  async getUsedUTxOs(e = 0) {
3951
4016
  const t = this._wallet.getAccount(e, N);
3952
- return (await this._fetcher.fetchAddressUTxOs(t.enterpriseAddress)).map((n) => F(n));
4017
+ return (await this._fetcher.fetchAddressUTxOs(t.enterpriseAddress)).map((a) => M(a));
3953
4018
  }
3954
4019
  signData(e, t, s = 0) {
3955
4020
  try {
3956
4021
  return this._wallet.signData(s, N, e, t);
3957
- } catch (n) {
3958
- throw new Error(`[AppWallet] An error occurred during signData: ${n}.`);
4022
+ } catch (a) {
4023
+ throw new Error(`[AppWallet] An error occurred during signData: ${a}.`);
3959
4024
  }
3960
4025
  }
3961
4026
  async signTx(e, t = !1, s = 0) {
3962
4027
  try {
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);
3964
- return u.set_vkeys(d), i.Transaction.new(c.body(), u, c.auxiliary_data()).to_hex();
3965
- } catch (n) {
3966
- throw new Error(`[AppWallet] An error occurred during signTx: ${n}.`);
4028
+ const a = this._wallet.getAccount(s, N), i = await this._fetcher.fetchAddressUTxOs(a.enterpriseAddress), o = this._wallet.signTx(s, N, i, e, t), c = O(e), u = c.witness_set(), d = $e(u, o);
4029
+ return u.set_vkeys(d), n.Transaction.new(c.body(), u, c.auxiliary_data()).to_hex();
4030
+ } catch (a) {
4031
+ throw new Error(`[AppWallet] An error occurred during signTx: ${a}.`);
3967
4032
  }
3968
4033
  }
3969
4034
  submitTx(e) {
3970
4035
  return this._submitter.submitTx(e);
3971
4036
  }
3972
4037
  static brew(e = 256) {
3973
- return B.generateMnemonic(e);
4038
+ return S.generateMnemonic(e);
3974
4039
  }
3975
4040
  }
3976
- class qt {
4041
+ class Vt {
3977
4042
  _walletInstance;
3978
4043
  constructor(e) {
3979
4044
  this._walletInstance = e;
@@ -3987,9 +4052,9 @@ class qt {
3987
4052
  }
3988
4053
  static async enable(e) {
3989
4054
  try {
3990
- const t = await qt.resolveInstance(e);
4055
+ const t = await Vt.resolveInstance(e);
3991
4056
  if (t !== void 0)
3992
- return new qt(t);
4057
+ return new Vt(t);
3993
4058
  throw new Error(`Couldn't create an instance of wallet: ${e}`);
3994
4059
  } catch (t) {
3995
4060
  throw new Error(`[BrowserWallet] An error occurred during enable: ${JSON.stringify(t)}.`);
@@ -3997,38 +4062,38 @@ class qt {
3997
4062
  }
3998
4063
  async getBalance() {
3999
4064
  const e = await this._walletInstance.getBalance();
4000
- return Re(Gs(e));
4065
+ return Ye(Gs(e));
4001
4066
  }
4002
4067
  async getChangeAddress() {
4003
4068
  const e = await this._walletInstance.getChangeAddress();
4004
- return nt(e).to_bech32();
4069
+ return at(e).to_bech32();
4005
4070
  }
4006
- async getCollateral(e = k.maxCollateralInputs) {
4071
+ async getCollateral(e = T.maxCollateralInputs) {
4007
4072
  return (await this.getUsedCollateral(e)).map((s) => vt(s));
4008
4073
  }
4009
4074
  getNetworkId() {
4010
4075
  return this._walletInstance.getNetworkId();
4011
4076
  }
4012
4077
  async getRewardAddresses() {
4013
- return (await this._walletInstance.getRewardAddresses()).map((t) => nt(t).to_bech32());
4078
+ return (await this._walletInstance.getRewardAddresses()).map((t) => at(t).to_bech32());
4014
4079
  }
4015
4080
  async getUnusedAddresses() {
4016
- return (await this._walletInstance.getUnusedAddresses()).map((t) => nt(t).to_bech32());
4081
+ return (await this._walletInstance.getUnusedAddresses()).map((t) => at(t).to_bech32());
4017
4082
  }
4018
4083
  async getUsedAddresses() {
4019
- return (await this._walletInstance.getUsedAddresses()).map((t) => nt(t).to_bech32());
4084
+ return (await this._walletInstance.getUsedAddresses()).map((t) => at(t).to_bech32());
4020
4085
  }
4021
- async getUtxos() {
4022
- return (await this.getUsedUTxOs()).map((t) => vt(t));
4086
+ async getUtxos(e = void 0) {
4087
+ return (await this.getUsedUTxOs(e)).map((s) => vt(s));
4023
4088
  }
4024
4089
  signData(e, t) {
4025
- const s = M(e).to_hex();
4026
- return this._walletInstance.signData(s, Q(t));
4090
+ const s = K(e).to_hex();
4091
+ return this._walletInstance.signData(s, b(t));
4027
4092
  }
4028
4093
  async signTx(e, t = !1) {
4029
4094
  try {
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);
4031
- return n.set_vkeys(c), D(i.Transaction.new(s.body(), n, s.auxiliary_data()).to_bytes());
4095
+ const s = O(e), a = s.witness_set(), i = await this._walletInstance.signTx(e, t), o = Ls(i).vkeys() ?? n.Vkeywitnesses.new(), c = $e(a, o);
4096
+ return a.set_vkeys(c), k(n.Transaction.new(s.body(), a, s.auxiliary_data()).to_bytes());
4032
4097
  } catch (s) {
4033
4098
  throw new Error(`[BrowserWallet] An error occurred during signTx: ${JSON.stringify(s)}.`);
4034
4099
  }
@@ -4038,22 +4103,23 @@ class qt {
4038
4103
  }
4039
4104
  async getUsedAddress() {
4040
4105
  const e = await this._walletInstance.getUsedAddresses();
4041
- return nt(e[0]);
4106
+ return at(e[0]);
4042
4107
  }
4043
- async getUsedCollateral(e = k.maxCollateralInputs) {
4108
+ async getUsedCollateral(e = T.maxCollateralInputs) {
4044
4109
  return (await this._walletInstance.experimental.getCollateral() ?? []).map((s) => fe(s)).slice(0, e);
4045
4110
  }
4046
- async getUsedUTxOs() {
4047
- return (await this._walletInstance.getUtxos() ?? []).map((t) => fe(t));
4111
+ async getUsedUTxOs(e = void 0) {
4112
+ const t = e ? G(e).to_hex() : void 0;
4113
+ return (await this._walletInstance.getUtxos(t) ?? []).map((a) => fe(a));
4048
4114
  }
4049
4115
  async getAssets() {
4050
4116
  return (await this.getBalance()).filter((t) => t.unit !== "lovelace").map((t) => {
4051
- const s = t.unit.slice(0, V), n = t.unit.slice(V), a = Ws(s, n);
4117
+ const s = t.unit.slice(0, R), a = t.unit.slice(R), i = Js(s, a);
4052
4118
  return {
4053
4119
  unit: t.unit,
4054
4120
  policyId: s,
4055
- assetName: zt(n),
4056
- fingerprint: a,
4121
+ assetName: zt(a),
4122
+ fingerprint: i,
4057
4123
  quantity: t.quantity
4058
4124
  };
4059
4125
  });
@@ -4067,7 +4133,7 @@ class qt {
4067
4133
  }
4068
4134
  async getPolicyIds() {
4069
4135
  const e = await this.getBalance();
4070
- return Array.from(new Set(e.map((t) => t.unit.slice(0, V)))).filter((t) => t !== "lovelace");
4136
+ return Array.from(new Set(e.map((t) => t.unit.slice(0, R)))).filter((t) => t !== "lovelace");
4071
4137
  }
4072
4138
  static resolveInstance(e) {
4073
4139
  if (window.cardano === void 0)
@@ -4076,109 +4142,43 @@ class qt {
4076
4142
  return t == null ? void 0 : t.enable();
4077
4143
  }
4078
4144
  }
4079
- const $e = "http://localhost:4000/", sr = "http://localhost:5000/", rr = `${$e}access`, nr = `${$e}transaction/signtx`;
4080
- class Pr {
4081
- static getAxiosInstance() {
4082
- return G.create({
4083
- baseURL: sr,
4084
- withCredentials: !0
4085
- });
4086
- }
4087
- static getAppId() {
4088
- return window.location.hostname;
4089
- }
4090
- static async openMinaFrontend(e) {
4091
- const t = this.getAppId();
4092
- e.includes("?") ? e = `${e}&appId=${t}` : e = `${e}?appId=${t}`;
4093
- const s = "left=100,top=100,width=540,height=540", n = window.open(e, "meshWindow", s);
4094
- return n || console.error("the window did not open", n), await (async () => new Promise((a) => {
4095
- window.addEventListener("message", async (o) => {
4096
- o.data.target == "minaWallet" && a(o.data);
4097
- });
4098
- }))();
4099
- }
4100
- static async get(e, t = {}) {
4101
- const s = this.getAppId();
4102
- t = {
4103
- ...t,
4104
- appId: s
4105
- };
4106
- try {
4107
- return (await this.getAxiosInstance().get(e, {
4108
- params: t
4109
- })).data;
4110
- } catch {
4111
- console.error("Not logged in");
4112
- return;
4113
- }
4114
- }
4115
- static async enable() {
4116
- return await this.get("wallet/getuserwalletsmeta") === void 0 ? await this.openMinaFrontend(rr) : !0;
4117
- }
4118
- static async getChangeAddress(e = void 0, t = void 0) {
4119
- return await this.get("wallet/getchangeaddress", {
4120
- walletId: e,
4121
- accountIndex: t
4122
- });
4123
- }
4124
- static async getUtxos(e = void 0, t = void 0) {
4125
- return await this.get("wallet/getutxo", {
4126
- walletId: e,
4127
- accountIndex: t
4128
- });
4129
- }
4130
- static async signTx(e, t = !1) {
4131
- const s = await this.get("wallet/getuserwalletsmeta");
4132
- if (console.log("userWalletsMeta", s), s) {
4133
- const n = await this.openMinaFrontend(`${nr}?unsignedTx=${e}&partialSign=${t}`);
4134
- if (n instanceof i.Vkeywitnesses) {
4135
- const a = K(e), o = a.witness_set();
4136
- o.set_vkeys(n);
4137
- const c = i.Transaction.new(a.body(), o, a.auxiliary_data()).to_hex();
4138
- return console.log("signedTx", c), c;
4139
- }
4140
- } else
4141
- return;
4142
- }
4143
- }
4144
4145
  export {
4145
- Ur as AppWallet,
4146
- Br as BlockfrostProvider,
4147
- qt as BrowserWallet,
4148
- B as EmbeddedWallet,
4149
- Dr as ForgeScript,
4150
- Sr as InfuraProvider,
4151
- Er as KoiosProvider,
4152
- vr as MaestroProvider,
4153
- Tr as MeshTxBuilder,
4154
- Pr as MinaWallet,
4155
- br as OgmiosProvider,
4156
- Qr as TangoProvider,
4146
+ vr as AppWallet,
4147
+ yr as BlockfrostProvider,
4148
+ Vt as BrowserWallet,
4149
+ S as EmbeddedWallet,
4150
+ Er as ForgeScript,
4151
+ xr as InfuraProvider,
4152
+ Cr as KoiosProvider,
4153
+ Sr as MaestroProvider,
4154
+ Qr as MeshTxBuilder,
4155
+ wr as OgmiosProvider,
4156
+ Br as TangoProvider,
4157
4157
  z as Transaction,
4158
- dr as checkSignature,
4159
- xr as generateNonce,
4158
+ ir as checkSignature,
4159
+ pr as generateNonce,
4160
4160
  es as isNetwork,
4161
4161
  is as keepRelevant,
4162
- ur as largestFirst,
4162
+ nr as largestFirst,
4163
4163
  os as largestFirstMultiAsset,
4164
4164
  et as parseAssetUnit,
4165
4165
  h as parseHttpError,
4166
- Cr as readPlutusData,
4167
- wr as readTransaction,
4168
- hr as resolveDataHash,
4169
- lr as resolveEpochNo,
4170
- Ws as resolveFingerprint,
4171
- gr as resolveLanguageView,
4172
- Ar as resolveNativeScriptHash,
4166
+ fr as readPlutusData,
4167
+ _r as readTransaction,
4168
+ or as resolveDataHash,
4169
+ cr as resolveEpochNo,
4170
+ Js as resolveFingerprint,
4171
+ ur as resolveLanguageView,
4172
+ dr as resolveNativeScriptHash,
4173
4173
  it as resolvePaymentKeyHash,
4174
- mr as resolvePlutusScriptAddress,
4175
- Ir as resolvePlutusScriptHash,
4176
- pr as resolvePoolId,
4177
- fr as resolvePrivateKey,
4174
+ hr as resolvePlutusScriptAddress,
4175
+ lr as resolvePlutusScriptHash,
4176
+ mr as resolvePoolId,
4177
+ gr as resolvePrivateKey,
4178
4178
  Ut as resolveRewardAddress,
4179
- _r as resolveScriptRef,
4180
- yr as resolveSlotNo,
4181
- At as resolveStakeKeyHash,
4182
- Le as resolveTxFees,
4183
- js as resolveTxHash
4179
+ Ar as resolveScriptRef,
4180
+ Ir as resolveSlotNo,
4181
+ gt as resolveStakeKeyHash,
4182
+ Ge as resolveTxFees,
4183
+ Ws as resolveTxHash
4184
4184
  };