@meshsdk/core 1.4.0 → 1.5.0

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
- import { customAlphabet as pe } from "nanoid";
2
- import * as a from "@emurgo/cardano-serialization-lib-nodejs";
1
+ import { customAlphabet as we } from "nanoid";
2
+ import * as i from "@emurgo/cardano-serialization-lib-nodejs";
3
3
  import j from "axios";
4
- import { mnemonicToEntropy as Ce, generateMnemonic as Le } from "bip39";
5
- import { COSEKey as we, COSESign1 as $e, Label as J, Int as Ct, BigNum as Kt, KeyType as qe, AlgorithmId as ye, CBORValue as Ut, HeaderMap as qt, Headers as ze, ProtectedHeaderMap as Je, COSESign1Builder as We } from "@emurgo/cardano-message-signing-nodejs";
6
- const je = ["testnet", "preview", "preprod", "mainnet"], Xe = (s) => je.includes(s), me = {
4
+ import { mnemonicToEntropy as ye, generateMnemonic as qe } from "bip39";
5
+ import { COSEKey as me, COSESign1 as ze, Label as W, Int as wt, BigNum as Ut, KeyType as Je, AlgorithmId as Ee, CBORValue as Nt, HeaderMap as Jt, Headers as We, ProtectedHeaderMap as je, COSESign1Builder as Xe } from "@emurgo/cardano-message-signing-nodejs";
6
+ const Ze = ["testnet", "preview", "preprod", "mainnet"], ts = (s) => Ze.includes(s), Be = {
7
7
  mem: 7e6,
8
8
  steps: 3e9
9
- }, Y = {
9
+ }, G = {
10
10
  epoch: 0,
11
11
  coinsPerUTxOSize: "4310",
12
12
  priceMem: 0.0577,
@@ -27,23 +27,23 @@ const je = ["testnet", "preview", "preprod", "mainnet"], Xe = (s) => je.includes
27
27
  maxTxExSteps: "10000000000",
28
28
  maxBlockExMem: "80000000",
29
29
  maxBlockExSteps: "40000000000"
30
- }, bt = 2147483648, mt = {
31
- V1: a.Language.new_plutus_v1(),
32
- V2: a.Language.new_plutus_v2()
33
- }, N = 56, Ze = {
34
- CERT: a.RedeemerTag.new_cert(),
35
- MINT: a.RedeemerTag.new_mint(),
36
- REWARD: a.RedeemerTag.new_reward(),
37
- SPEND: a.RedeemerTag.new_spend()
38
- }, Et = {
30
+ }, kt = 2147483648, Bt = {
31
+ V1: i.Language.new_plutus_v1(),
32
+ V2: i.Language.new_plutus_v2()
33
+ }, F = 56, es = {
34
+ CERT: i.RedeemerTag.new_cert(),
35
+ MINT: i.RedeemerTag.new_mint(),
36
+ REWARD: i.RedeemerTag.new_reward(),
37
+ SPEND: i.RedeemerTag.new_spend()
38
+ }, xt = {
39
39
  testnet: ["74", "1598400", "1595967616", "432000"],
40
40
  preview: ["0", "0", "1660003200", "86400"],
41
41
  preprod: ["0", "0", "1654041600", "432000"],
42
42
  mainnet: ["208", "4492800", "1596059091", "432000"]
43
- }, zt = {
44
- ALONZO: a.TxBuilderConstants.plutus_alonzo_cost_models(),
45
- BABBAGE: a.TxBuilderConstants.plutus_vasil_cost_models()
46
- }, ts = {
43
+ }, Wt = {
44
+ ALONZO: i.TxBuilderConstants.plutus_alonzo_cost_models(),
45
+ BABBAGE: i.TxBuilderConstants.plutus_vasil_cost_models()
46
+ }, ss = {
47
47
  ALONZO: {
48
48
  V1: "a141005901d59f1a000302590001011a00060bc719026d00011a000249f01903e800011a000249f018201a0025cea81971f70419744d186419744d186419744d186419744d186419744d186419744d18641864186419744d18641a000249f018201a000249f018201a000249f018201a000249f01903e800011a000249f018201a000249f01903e800081a000242201a00067e2318760001011a000249f01903e800081a000249f01a0001b79818f7011a000249f0192710011a0002155e19052e011903e81a000249f01903e8011a000249f018201a000249f018201a000249f0182001011a000249f0011a000249f0041a000194af18f8011a000194af18f8011a0002377c190556011a0002bdea1901f1011a000249f018201a000249f018201a000249f018201a000249f018201a000249f018201a000249f018201a000242201a00067e23187600010119f04c192bd200011a000249f018201a000242201a00067e2318760001011a000242201a00067e2318760001011a0025cea81971f704001a000141bb041a000249f019138800011a000249f018201a000302590001011a000249f018201a000249f018201a000249f018201a000249f018201a000249f018201a000249f018201a000249f018201a00330da70101ff"
49
49
  },
@@ -51,15 +51,44 @@ const je = ["testnet", "preview", "preprod", "mainnet"], Xe = (s) => je.includes
51
51
  V1: "a141005901b69f1a0003236119032c01011903e819023b00011903e8195e7104011903e818201a0001ca761928eb041959d818641959d818641959d818641959d818641959d818641959d81864186418641959d81864194c5118201a0002acfa182019b551041a000363151901ff00011a00015c3518201a000797751936f404021a0002ff941a0006ea7818dc0001011903e8196ff604021a0003bd081a00034ec5183e011a00102e0f19312a011a00032e801901a5011a0002da781903e819cf06011a00013a34182019a8f118201903e818201a00013aac0119e143041903e80a1a00030219189c011a00030219189c011a0003207c1901d9011a000330001901ff0119ccf3182019fd40182019ffd5182019581e18201940b318201a00012adf18201a0002ff941a0006ea7818dc0001011a00010f92192da7000119eabb18201a0002ff941a0006ea7818dc0001011a0002ff941a0006ea7818dc0001011a000c504e197712041a001d6af61a0001425b041a00040c660004001a00014fab18201a0003236119032c010119a0de18201a00033d7618201979f41820197fb8182019a95d1820197df718201995aa18201a009063b91903fd0aff",
52
52
  V2: "a20198af1a0003236119032c01011903e819023b00011903e8195e7104011903e818201a0001ca761928eb041959d818641959d818641959d818641959d818641959d818641959d81864186418641959d81864194c5118201a0002acfa182019b551041a000363151901ff00011a00015c3518201a000797751936f404021a0002ff941a0006ea7818dc0001011903e8196ff604021a0003bd081a00034ec5183e011a00102e0f19312a011a00032e801901a5011a0002da781903e819cf06011a00013a34182019a8f118201903e818201a00013aac0119e143041903e80a1a00030219189c011a00030219189c011a0003207c1901d9011a000330001901ff0119ccf3182019fd40182019ffd5182019581e18201940b318201a00012adf18201a0002ff941a0006ea7818dc0001011a00010f92192da7000119eabb18201a0002ff941a0006ea7818dc0001011a0002ff941a0006ea7818dc0001011a0011b22c1a0005fdde00021a000c504e197712041a001d6af61a0001425b041a00040c660004001a00014fab18201a0003236119032c010119a0de18201a00033d7618201979f41820197fb8182019a95d1820197df718201995aa18201b00000004a817c8001b00000004a817c8001a009063b91903fd0a1b00000004a817c800001b00000004a817c80041005901b69f1a0003236119032c01011903e819023b00011903e8195e7104011903e818201a0001ca761928eb041959d818641959d818641959d818641959d818641959d818641959d81864186418641959d81864194c5118201a0002acfa182019b551041a000363151901ff00011a00015c3518201a000797751936f404021a0002ff941a0006ea7818dc0001011903e8196ff604021a0003bd081a00034ec5183e011a00102e0f19312a011a00032e801901a5011a0002da781903e819cf06011a00013a34182019a8f118201903e818201a00013aac0119e143041903e80a1a00030219189c011a00030219189c011a0003207c1901d9011a000330001901ff0119ccf3182019fd40182019ffd5182019581e18201940b318201a00012adf18201a0002ff941a0006ea7818dc0001011a00010f92192da7000119eabb18201a0002ff941a0006ea7818dc0001011a0002ff941a0006ea7818dc0001011a000c504e197712041a001d6af61a0001425b041a00040c660004001a00014fab18201a0003236119032c010119a0de18201a00033d7618201979f41820197fb8182019a95d1820197df718201995aa18201a009063b91903fd0aff"
53
53
  }
54
- }, Ht = {
55
- [a.NetworkInfo.testnet().network_id()]: "8d18d786e92776c824607fd8e193ec535c79dc61ea2405ddf3b09fe3",
56
- [a.NetworkInfo.mainnet().network_id()]: "f0ff48bbb7bbe9d59a40f1ce90e9e9d0ff5002ec48f232b49ca0fb9a"
57
- }, es = {
54
+ }, Pt = {
55
+ [i.NetworkInfo.testnet().network_id()]: "8d18d786e92776c824607fd8e193ec535c79dc61ea2405ddf3b09fe3",
56
+ [i.NetworkInfo.mainnet().network_id()]: "f0ff48bbb7bbe9d59a40f1ce90e9e9d0ff5002ec48f232b49ca0fb9a"
57
+ }, rs = {
58
58
  mainnet: "wss://ogmios-api.mainnet.dandelion.link",
59
59
  preprod: "wss://ogmios-api.iohk-preprod.dandelion.link",
60
60
  preview: "__TBD_SOON_TM__",
61
61
  testnet: "wss://ogmios-api.testnet.dandelion.link"
62
- }, Jt = [
62
+ }, as = {
63
+ LQ: "da8c30857834c6ae7203935b89278c532b3995245295456f993e1d244c51",
64
+ MIN: "29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c64d494e",
65
+ NTX: "edfd7a1d77bcb8b884c474bdc92a16002d1fb720e454fa6e993444794e5458",
66
+ iBTC: "f66d78b4a3cb3d37afa0ec36461e51ecbde00f26c8f0a68f94b6988069425443",
67
+ iETH: "f66d78b4a3cb3d37afa0ec36461e51ecbde00f26c8f0a68f94b6988069455448",
68
+ iUSD: "f66d78b4a3cb3d37afa0ec36461e51ecbde00f26c8f0a68f94b6988069555344",
69
+ MILK: "8a1cfae21368b8bebbbed9800fec304e95cce39a2a57dc35e2e3ebaa4d494c4b",
70
+ AGIX: "f43a62fdc3965df486de8a0d32fe800963589c41b38946602a0dc53541474958",
71
+ MELD: "6ac8ef33b510ec004fe11585f7c5a9f0c07f0c23428ab4f29c1d7d104d454c44",
72
+ INDY: "533bb94a8850ee3ccbe483106489399112b74c905342cb1792a797a0494e4459",
73
+ CLAY: "38ad9dc3aec6a2f38e220142b9aa6ade63ebe71f65e7cc2b7d8a8535434c4159",
74
+ MCOS: "6f46e1304b16d884c85c62fb0eef35028facdc41aaa0fd319a152ed64d434f53",
75
+ DING: "ce5b9e0f8a88255b65f2e4d065c6e716e9fa9a8a86dfb86423dd1ac044494e47",
76
+ GERO: "10a49b996e2402269af553a8a96fb8eb90d79e9eca79e2b4223057b64745524f",
77
+ NMKR: "5dac8536653edc12f6f5e1045d8164b9f59998d3bdc300fc928434894e4d4b52",
78
+ PAVIA: "884892bcdc360bcef87d6b3f806e7f9cd5ac30d999d49970e7a903ae5041564941",
79
+ HOSKY: "a0028f350aaabe0545fdcb56b039bfb08e4bb4d8c4d7c3c7d481c235484f534b59",
80
+ YUMMI: "078eafce5cd7edafdf63900edef2c1ea759e77f30ca81d6bbdeec92479756d6d69",
81
+ C3: "8e51398904a5d3fc129fbf4f1589701de23c7824d5c90fdb9490e15a434841524c4933",
82
+ GIMBAL: "2b0a04a7b60132b1805b296c7fcb3b217ff14413991bf76f72663c3067696d62616c",
83
+ SUNDAE: "9a9693a9a37912a5097918f97918d15240c92ab729a0b7c4aa144d7753554e444145",
84
+ GREENS: "4623ab311b7d982d8d26fcbe1a9439ca56661aafcdcd8d8a0ef31fd6475245454e53",
85
+ GENS: "dda5fdb1002f7389b33e036b6afee82a8189becb6cba852e8b79b4fb0014df1047454e53",
86
+ SOCIETY: "25f0fc240e91bd95dcdaebd2ba7713fc5168ac77234a3d79449fc20c534f4349455459",
87
+ DJED: "8db269c3ec630e06ae29f74bc39edd1f87c819f1056206e879a1cd61446a65644d6963726f555344",
88
+ SHEN: "8db269c3ec630e06ae29f74bc39edd1f87c819f1056206e879a1cd615368656e4d6963726f555344",
89
+ WMT: "1d7f33bd23d85e1a25d87d86fac4f199c3197a2f7afeb662a0f34e1e776f726c646d6f62696c65746f6b656e",
90
+ COPI: "b6a7467ea1deb012808ef4e87b5ff371e85f7142d7b356a40d9b42a0436f726e75636f70696173205b76696120436861696e506f72742e696f5d"
91
+ }, jt = [
63
92
  "begin",
64
93
  "eternl",
65
94
  "flint",
@@ -67,97 +96,115 @@ const je = ["testnet", "preview", "preprod", "mainnet"], Xe = (s) => je.includes
67
96
  "nufi",
68
97
  "gerowallet",
69
98
  "typhoncip30"
70
- ], ss = (s, e, t = !1, { maxTxSize: i, minFeeA: r, minFeeB: n } = Y) => {
71
- const o = e.filter((u) => Be(u) === !1).sort(Ee), c = a.BigNum.from_str(Ye(i, r, n)), A = t ? a.BigNum.from_str(s).checked_add(c).to_str() : s;
72
- return Bt(o, /* @__PURE__ */ new Map([
99
+ ], is = (s, e, t = "5000000") => {
100
+ const r = i.BigNum.from_str(s.get("lovelace") ?? "0").checked_add(i.BigNum.from_str(t)), a = e.filter((c) => c.output.amount.filter((A) => A.unit !== "lovelace").some((A) => s.has(A.unit))), n = As(a);
101
+ return [
102
+ ...n.less_than(r) ? us(r.clamped_sub(n).to_str(), e.filter((c) => !a.map((A) => A.input.txHash).includes(c.input.txHash))) : [],
103
+ ...a
104
+ ];
105
+ }, nr = (s, e, t = !1, { maxTxSize: r, minFeeA: a, minFeeB: n } = G) => {
106
+ const o = e.filter((h) => xe(h) === !1).sort(Tt), c = i.BigNum.from_str(Re(r, a, n)), A = t ? i.BigNum.from_str(s).checked_add(c).to_str() : s;
107
+ return dt(o, /* @__PURE__ */ new Map([
73
108
  ["lovelace", A]
74
109
  ]));
75
- }, is = (s, e, t = !1, i = Y) => {
76
- const r = e.filter(Be).sort(Ee), n = s.get("lovelace") ?? "0", { maxTxSize: o, minFeeA: c, minFeeB: A } = i, h = a.BigNum.from_str(Ye(o, c, A)), I = t ? a.BigNum.from_str(n).checked_add(h).to_str() : n;
77
- return s.set("lovelace", I), Bt(r, s);
78
- }, rs = (s, e) => Array.from(e, (t) => ({ unit: t[0], quantity: a.BigNum.from_str(t[1]) })).every((t) => s.filter((i) => i.output.amount.find((r) => r.unit === t.unit) !== void 0).reduce((i, r) => {
79
- const n = r.output.amount.reduce((o, c) => o.checked_add(a.BigNum.from_str(t.unit === c.unit ? c.quantity : "0")), a.BigNum.from_str("0"));
80
- return i.checked_add(n);
81
- }, a.BigNum.from_str("0")).less_than(t.quantity) === !1), Ee = (s, e) => {
82
- var r, n;
83
- const t = a.BigNum.from_str(((r = s.output.amount.find((o) => o.unit === "lovelace")) == null ? void 0 : r.quantity) ?? "0");
84
- return a.BigNum.from_str(((n = e.output.amount.find((o) => o.unit === "lovelace")) == null ? void 0 : n.quantity) ?? "0").compare(t);
85
- }, Be = (s) => s.output.amount.length > 1, Bt = (s, e, t = []) => s.length === 0 || rs(t, e) ? t : as(s[0], e) ? Bt(s.slice(1), e, [...t, s[0]]) : Bt(s.slice(1), e, t), as = (s, e) => Array.from(e.keys()).some((t) => s.output.amount.find((i) => i.unit === t) !== void 0), ns = (s, e) => {
86
- const t = cs(e), i = As(s, e);
110
+ }, ns = (s, e, t = !1, r = G) => {
111
+ const a = e.filter(xe).sort(Tt), n = cs(r), o = s.get("lovelace") ?? "0", c = t ? i.BigNum.from_str(o).checked_add(n).to_str() : o;
112
+ return s.set("lovelace", c), dt(a, s);
113
+ }, os = (s, e) => Array.from(e, (t) => ({ unit: t[0], quantity: i.BigNum.from_str(t[1]) })).every((t) => s.filter((r) => r.output.amount.find((a) => a.unit === t.unit) !== void 0).reduce((r, a) => {
114
+ const n = a.output.amount.reduce((o, c) => o.checked_add(i.BigNum.from_str(t.unit === c.unit ? c.quantity : "0")), i.BigNum.from_str("0"));
115
+ return r.checked_add(n);
116
+ }, i.BigNum.from_str("0")).less_than(t.quantity) === !1), Tt = (s, e) => {
117
+ var a, n;
118
+ const t = i.BigNum.from_str(((a = s.output.amount.find((o) => o.unit === "lovelace")) == null ? void 0 : a.quantity) ?? "0");
119
+ return i.BigNum.from_str(((n = e.output.amount.find((o) => o.unit === "lovelace")) == null ? void 0 : n.quantity) ?? "0").compare(t);
120
+ }, cs = (s) => {
121
+ const { maxTxSize: e, minFeeA: t, minFeeB: r } = s;
122
+ return i.BigNum.from_str(Re(e, t, r));
123
+ }, xe = (s) => s.output.amount.length > 1, As = (s) => s.reduce((e, t) => {
124
+ var a;
125
+ const r = ((a = t.output.amount.find((n) => n.unit === "lovelace")) == null ? void 0 : a.quantity) ?? "0";
126
+ return e.checked_add(i.BigNum.from_str(r));
127
+ }, i.BigNum.from_str("0")), us = (s, e) => {
128
+ const t = e.sort(Tt);
129
+ return dt(t, /* @__PURE__ */ new Map([
130
+ ["lovelace", s]
131
+ ]));
132
+ }, dt = (s, e, t = []) => s.length === 0 || os(t, e) ? t : hs(s[0], e) ? dt(s.slice(1), e, [...t, s[0]]) : dt(s.slice(1), e, t), hs = (s, e) => Array.from(e.keys()).some((t) => s.output.amount.find((r) => r.unit === t) !== void 0), ds = (s, e) => {
133
+ const t = ls(e), r = fs(s, e);
87
134
  return {
88
- coseKey: k(t.to_bytes()),
89
- coseSign1: k(i.to_bytes())
135
+ coseKey: b(t.to_bytes()),
136
+ coseSign1: b(r.to_bytes())
90
137
  };
91
- }, ei = (s, e, { key: t, signature: i }) => {
138
+ }, or = (s, e, { key: t, signature: r }) => {
92
139
  var o, c;
93
- const r = we.from_bytes(f(t)), n = $e.from_bytes(f(i));
140
+ const a = me.from_bytes(g(t)), n = ze.from_bytes(g(r));
94
141
  if ((s == null ? void 0 : s.length) > 0) {
95
- const A = k(n.payload() ?? new Uint8Array());
96
- if (S(s) !== A)
142
+ const A = b(n.payload() ?? new Uint8Array());
143
+ if (Q(s) !== A)
97
144
  return !1;
98
145
  }
99
146
  if ((e == null ? void 0 : e.length) > 0) {
100
- const h = (o = n.headers().protected().deserialized_headers().header(J.new_text("address"))) == null ? void 0 : o.as_bytes();
101
- if (h === void 0)
147
+ const u = (o = n.headers().protected().deserialized_headers().header(W.new_text("address"))) == null ? void 0 : o.as_bytes();
148
+ if (u === void 0)
102
149
  throw new Error("Couldn't find a signer address in signature");
103
- const I = (c = r.header(J.new_int(Ct.new_negative(Kt.from_str("2"))))) == null ? void 0 : c.as_bytes();
104
- if (I === void 0)
150
+ const d = (c = a.header(W.new_int(wt.new_negative(Ut.from_str("2"))))) == null ? void 0 : c.as_bytes();
151
+ if (d === void 0)
105
152
  throw new Error("Couldn't find a signer key in signature");
106
- const u = et(k(h)), g = Ns(k(I));
107
- if (os(e, u, g) === !1)
153
+ const h = et(b(u)), f = Vs(b(d));
154
+ if (Is(e, h, f) === !1)
108
155
  throw new Error("Couldn't check signature because of address mismatch");
109
- const C = Fs(k(n.signature())), x = n.signed_data().to_bytes();
110
- return g.verify(x, C);
156
+ const C = Os(b(n.signature())), x = n.signed_data().to_bytes();
157
+ return f.verify(x, C);
111
158
  }
112
159
  return !1;
113
- }, os = (s, e, t) => {
160
+ }, Is = (s, e, t) => {
114
161
  if (s !== e.to_bech32())
115
162
  return !1;
116
163
  try {
117
- return ht(s) === t.hash().to_hex();
164
+ return ut(s) === t.hash().to_hex();
118
165
  } catch {
119
166
  return !1;
120
167
  }
121
- }, cs = (s) => {
122
- const e = we.new(J.from_key_type(qe.OKP));
123
- return e.set_algorithm_id(J.from_algorithm_id(ye.EdDSA)), e.set_header(J.new_int(Ct.new_negative(Kt.from_str("1"))), Ut.new_int(Ct.new_i32(6))), e.set_header(J.new_int(Ct.new_negative(Kt.from_str("2"))), Ut.new_bytes(s.key.to_public().as_bytes())), e;
124
- }, As = (s, e) => {
125
- const t = qt.new(), i = qt.new();
126
- t.set_algorithm_id(J.from_algorithm_id(ye.EdDSA)), t.set_header(J.new_text("address"), Ut.new_bytes(e.address.to_bytes()));
127
- const r = ze.new(Je.new(t), i), n = We.new(r, f(s.payload), !1);
128
- s.externalAAD !== void 0 && n.set_external_aad(f(s.externalAAD));
168
+ }, ls = (s) => {
169
+ const e = me.new(W.from_key_type(Je.OKP));
170
+ return e.set_algorithm_id(W.from_algorithm_id(Ee.EdDSA)), e.set_header(W.new_int(wt.new_negative(Ut.from_str("1"))), Nt.new_int(wt.new_i32(6))), e.set_header(W.new_int(wt.new_negative(Ut.from_str("2"))), Nt.new_bytes(s.key.to_public().as_bytes())), e;
171
+ }, fs = (s, e) => {
172
+ const t = Jt.new(), r = Jt.new();
173
+ t.set_algorithm_id(W.from_algorithm_id(Ee.EdDSA)), t.set_header(W.new_text("address"), Nt.new_bytes(e.address.to_bytes()));
174
+ const a = We.new(je.new(t), r), n = Xe.new(a, g(s.payload), !1);
175
+ s.externalAAD !== void 0 && n.set_external_aad(g(s.externalAAD));
129
176
  const o = n.make_data_to_sign(), c = e.key.sign(o.to_bytes());
130
177
  return n.build(c.to_bytes());
131
178
  };
132
- var Wt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, xe = {}, Q = { exports: {} };
133
- G.notEqual = us;
134
- G.notOk = Is;
135
- G.equal = hs;
136
- G.ok = G;
137
- var Qe = G;
138
- function hs(s, e, t) {
139
- G(s == e, t);
179
+ var Xt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, Qe = {}, S = { exports: {} };
180
+ R.notEqual = _s;
181
+ R.notOk = ps;
182
+ R.equal = gs;
183
+ R.ok = R;
184
+ var Se = R;
185
+ function gs(s, e, t) {
186
+ R(s == e, t);
140
187
  }
141
- function us(s, e, t) {
142
- G(s != e, t);
188
+ function _s(s, e, t) {
189
+ R(s != e, t);
143
190
  }
144
- function Is(s, e) {
145
- G(!s, e);
191
+ function ps(s, e) {
192
+ R(!s, e);
146
193
  }
147
- function G(s, e) {
194
+ function R(s, e) {
148
195
  if (!s)
149
196
  throw new Error(e || "AssertionError");
150
197
  }
151
198
  var P = { exports: {} };
152
- function ds(s) {
199
+ function Cs(s) {
153
200
  throw new Error('Could not dynamically require "' + s + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
154
201
  }
155
- var ls = Pt;
156
- Pt.supported = typeof WebAssembly < "u";
157
- function Pt(s) {
158
- if (!Pt.supported)
202
+ var ws = Mt;
203
+ Mt.supported = typeof WebAssembly < "u";
204
+ function Mt(s) {
205
+ if (!Mt.supported)
159
206
  return null;
160
- var e = s && s.imports, t = gs("AGFzbQEAAAABEANgAn9/AGADf39/AGABfwADBQQAAQICBQUBAQroBwdNBQZtZW1vcnkCAAxibGFrZTJiX2luaXQAAA5ibGFrZTJiX3VwZGF0ZQABDWJsYWtlMmJfZmluYWwAAhBibGFrZTJiX2NvbXByZXNzAAMK00AElgMAIABCADcDACAAQQhqQgA3AwAgAEEQakIANwMAIABBGGpCADcDACAAQSBqQgA3AwAgAEEoakIANwMAIABBMGpCADcDACAAQThqQgA3AwAgAEHAAGpCADcDACAAQcgAakIANwMAIABB0ABqQgA3AwAgAEHYAGpCADcDACAAQeAAakIANwMAIABB6ABqQgA3AwAgAEHwAGpCADcDACAAQfgAakIANwMAIABBgAFqQoiS853/zPmE6gBBACkDAIU3AwAgAEGIAWpCu86qptjQ67O7f0EIKQMAhTcDACAAQZABakKr8NP0r+68tzxBECkDAIU3AwAgAEGYAWpC8e30+KWn/aelf0EYKQMAhTcDACAAQaABakLRhZrv+s+Uh9EAQSApAwCFNwMAIABBqAFqQp/Y+dnCkdqCm39BKCkDAIU3AwAgAEGwAWpC6/qG2r+19sEfQTApAwCFNwMAIABBuAFqQvnC+JuRo7Pw2wBBOCkDAIU3AwAgAEHAAWpCADcDACAAQcgBakIANwMAIABB0AFqQgA3AwALbQEDfyAAQcABaiEDIABByAFqIQQgBCkDAKchBQJAA0AgASACRg0BIAVBgAFGBEAgAyADKQMAIAWtfDcDAEEAIQUgABADCyAAIAVqIAEtAAA6AAAgBUEBaiEFIAFBAWohAQwACwsgBCAFrTcDAAtkAQN/IABBwAFqIQEgAEHIAWohAiABIAEpAwAgAikDAHw3AwAgAEHQAWpCfzcDACACKQMApyEDAkADQCADQYABRg0BIAAgA2pBADoAACADQQFqIQMMAAsLIAIgA603AwAgABADC+U7AiB+CX8gAEGAAWohISAAQYgBaiEiIABBkAFqISMgAEGYAWohJCAAQaABaiElIABBqAFqISYgAEGwAWohJyAAQbgBaiEoICEpAwAhASAiKQMAIQIgIykDACEDICQpAwAhBCAlKQMAIQUgJikDACEGICcpAwAhByAoKQMAIQhCiJLznf/M+YTqACEJQrvOqqbY0Ouzu38hCkKr8NP0r+68tzwhC0Lx7fT4paf9p6V/IQxC0YWa7/rPlIfRACENQp/Y+dnCkdqCm38hDkLr+obav7X2wR8hD0L5wvibkaOz8NsAIRAgACkDACERIABBCGopAwAhEiAAQRBqKQMAIRMgAEEYaikDACEUIABBIGopAwAhFSAAQShqKQMAIRYgAEEwaikDACEXIABBOGopAwAhGCAAQcAAaikDACEZIABByABqKQMAIRogAEHQAGopAwAhGyAAQdgAaikDACEcIABB4ABqKQMAIR0gAEHoAGopAwAhHiAAQfAAaikDACEfIABB+ABqKQMAISAgDSAAQcABaikDAIUhDSAPIABB0AFqKQMAhSEPIAEgBSARfHwhASANIAGFQiCKIQ0gCSANfCEJIAUgCYVCGIohBSABIAUgEnx8IQEgDSABhUIQiiENIAkgDXwhCSAFIAmFQj+KIQUgAiAGIBN8fCECIA4gAoVCIIohDiAKIA58IQogBiAKhUIYiiEGIAIgBiAUfHwhAi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BiAKhUI/iiEGIAMgByAafHwhAyAPIAOFQiCKIQ8gCyAPfCELIAcgC4VCGIohByADIAcgIHx8IQMgDyADhUIQiiEPIAsgD3whCyAHIAuFQj+KIQcgBCAIIB58fCEEIBAgBIVCIIohECAMIBB8IQwgCCAMhUIYiiEIIAQgCCAXfHwhBCAQIASFQhCKIRAgDCAQfCEMIAggDIVCP4ohCCABIAYgEnx8IQEgECABhUIgiiEQIAsgEHwhCyAGIAuFQhiKIQYgASAGIB18fCEBIBAgAYVCEIohECALIBB8IQsgBiALhUI/iiEGIAIgByARfHwhAiANIAKFQiCKIQ0gDCANfCEMIAcgDIVCGIohByACIAcgE3x8IQIgDSAChUIQiiENIAwgDXwhDCAHIAyFQj+KIQcgAyAIIBx8fCEDIA4gA4VCIIohDiAJIA58IQkgCCAJhUIYiiEIIAMgCCAYfHwhAyAOIAOFQhCKIQ4gCSAOfCEJIAggCYVCP4ohCCAEIAUgFnx8IQQgDyAEhUIgiiEPIAogD3whCiAFIAqFQhiKIQUgBCAFIBR8fCEEIA8gBIVCEIohDyAKIA98IQogBSAKhUI/iiEFICEgISkDACABIAmFhTcDACAiICIpAwAgAiAKhYU3AwAgIyAjKQMAIAMgC4WFNwMAICQgJCkDACAEIAyFhTcDACAlICUpAwAgBSANhYU3AwAgJiAmKQMAIAYgDoWFNwMAICcgJykDACAHIA+FhTcDACAoICgpAwAgCCAQhYU3AwAL"), i = null, r = {
207
+ var e = s && s.imports, t = ys("AGFzbQEAAAABEANgAn9/AGADf39/AGABfwADBQQAAQICBQUBAQroBwdNBQZtZW1vcnkCAAxibGFrZTJiX2luaXQAAA5ibGFrZTJiX3VwZGF0ZQABDWJsYWtlMmJfZmluYWwAAhBibGFrZTJiX2NvbXByZXNzAAMK00AElgMAIABCADcDACAAQQhqQgA3AwAgAEEQakIANwMAIABBGGpCADcDACAAQSBqQgA3AwAgAEEoakIANwMAIABBMGpCADcDACAAQThqQgA3AwAgAEHAAGpCADcDACAAQcgAakIANwMAIABB0ABqQgA3AwAgAEHYAGpCADcDACAAQeAAakIANwMAIABB6ABqQgA3AwAgAEHwAGpCADcDACAAQfgAakIANwMAIABBgAFqQoiS853/zPmE6gBBACkDAIU3AwAgAEGIAWpCu86qptjQ67O7f0EIKQMAhTcDACAAQZABakKr8NP0r+68tzxBECkDAIU3AwAgAEGYAWpC8e30+KWn/aelf0EYKQMAhTcDACAAQaABakLRhZrv+s+Uh9EAQSApAwCFNwMAIABBqAFqQp/Y+dnCkdqCm39BKCkDAIU3AwAgAEGwAWpC6/qG2r+19sEfQTApAwCFNwMAIABBuAFqQvnC+JuRo7Pw2wBBOCkDAIU3AwAgAEHAAWpCADcDACAAQcgBakIANwMAIABB0AFqQgA3AwALbQEDfyAAQcABaiEDIABByAFqIQQgBCkDAKchBQJAA0AgASACRg0BIAVBgAFGBEAgAyADKQMAIAWtfDcDAEEAIQUgABADCyAAIAVqIAEtAAA6AAAgBUEBaiEFIAFBAWohAQwACwsgBCAFrTcDAAtkAQN/IABBwAFqIQEgAEHIAWohAiABIAEpAwAgAikDAHw3AwAgAEHQAWpCfzcDACACKQMApyEDAkADQCADQYABRg0BIAAgA2pBADoAACADQQFqIQMMAAsLIAIgA603AwAgABADC+U7AiB+CX8gAEGAAWohISAAQYgBaiEiIABBkAFqISMgAEGYAWohJCAAQaABaiElIABBqAFqISYgAEGwAWohJyAAQbgBaiEoICEpAwAhASAiKQMAIQIgIykDACEDICQpAwAhBCAlKQMAIQUgJikDACEGICcpAwAhByAoKQMAIQhCiJLznf/M+YTqACEJQrvOqqbY0Ouzu38hCkKr8NP0r+68tzwhC0Lx7fT4paf9p6V/IQxC0YWa7/rPlIfRACENQp/Y+dnCkdqCm38hDkLr+obav7X2wR8hD0L5wvibkaOz8NsAIRAgACkDACERIABBCGopAwAhEiAAQRBqKQMAIRMgAEEYaikDACEUIABBIGopAwAhFSAAQShqKQMAIRYgAEEwaikDACEXIABBOGopAwAhGCAAQcAAaikDACEZIABByABqKQMAIRogAEHQAGopAwA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PIASFQiCKIQ8gCiAPfCEKIAUgCoVCGIohBSAEIAUgIHx8IQQgDyAEhUIQiiEPIAogD3whCiAFIAqFQj+KIQUgASAFIB98fCEBIA0gAYVCIIohDSAJIA18IQkgBSAJhUIYiiEFIAEgBSAbfHwhASANIAGFQhCKIQ0gCSANfCEJIAUgCYVCP4ohBSACIAYgFXx8IQIgDiAChUIgiiEOIAogDnwhCiAGIAqFQhiKIQYgAiAGIBl8fCECIA4gAoVCEIohDiAKIA58IQogBiAKhUI/iiEGIAMgByAafHwhAyAPIAOFQiCKIQ8gCyAPfCELIAcgC4VCGIohByADIAcgIHx8IQMgDyADhUIQiiEPIAsgD3whCyAHIAuFQj+KIQcgBCAIIB58fCEEIBAgBIVCIIohECAMIBB8IQwgCCAMhUIYiiEIIAQgCCAXfHwhBCAQIASFQhCKIRAgDCAQfCEMIAggDIVCP4ohCCABIAYgEnx8IQEgECABhUIgiiEQIAsgEHwhCyAGIAuFQhiKIQYgASAGIB18fCEBIBAgAYVCEIohECALIBB8IQsgBiALhUI/iiEGIAIgByARfHwhAiANIAKFQiCKIQ0gDCANfCEMIAcgDIVCGIohByACIAcgE3x8IQIgDSAChUIQiiENIAwgDXwhDCAHIAyFQj+KIQcgAyAIIBx8fCEDIA4gA4VCIIohDiAJIA58IQkgCCAJhUIYiiEIIAMgCCAYfHwhAyAOIAOFQhCKIQ4gCSAOfCEJIAggCYVCP4ohCCAEIAUgFnx8IQQgDyAEhUIgiiEPIAogD3whCiAFIAqFQhiKIQUgBCAFIBR8fCEEIA8gBIVCEIohDyAKIA98IQogBSAKhUI/iiEFICEgISkDACABIAmFhTcDACAiICIpAwAgAiAKhYU3AwAgIyAjKQMAIAMgC4WFNwMAICQgJCkDACAEIAyFhTcDACAlICUpAwAgBSANhYU3AwAgJiAmKQMAIAYgDoWFNwMAICcgJykDACAHIA+FhTcDACAoICgpAwAgCCAQhYU3AwAL"), r = null, a = {
161
208
  buffer: t,
162
209
  memory: null,
163
210
  exports: null,
@@ -165,15 +212,15 @@ function Pt(s) {
165
212
  onload: o
166
213
  };
167
214
  return o(function() {
168
- }), r;
215
+ }), a;
169
216
  function n(A) {
170
- r.exports.memory.grow(Math.ceil(Math.abs(A - r.memory.length) / 65536)), r.memory = new Uint8Array(r.exports.memory.buffer);
217
+ a.exports.memory.grow(Math.ceil(Math.abs(A - a.memory.length) / 65536)), a.memory = new Uint8Array(a.exports.memory.buffer);
171
218
  }
172
219
  function o(A) {
173
- if (r.exports)
220
+ if (a.exports)
174
221
  return A();
175
- if (i) {
176
- i.then(A.bind(null, null)).catch(A);
222
+ if (r) {
223
+ r.then(A.bind(null, null)).catch(A);
177
224
  return;
178
225
  }
179
226
  try {
@@ -181,42 +228,42 @@ function Pt(s) {
181
228
  throw new Error("async");
182
229
  c({ instance: new WebAssembly.Instance(new WebAssembly.Module(t), e) });
183
230
  } catch {
184
- i = WebAssembly.instantiate(t, e).then(c);
231
+ r = WebAssembly.instantiate(t, e).then(c);
185
232
  }
186
233
  o(A);
187
234
  }
188
235
  function c(A) {
189
- r.exports = A.instance.exports, r.memory = r.exports.memory && r.exports.memory.buffer && new Uint8Array(r.exports.memory.buffer);
236
+ a.exports = A.instance.exports, a.memory = a.exports.memory && a.exports.memory.buffer && new Uint8Array(a.exports.memory.buffer);
190
237
  }
191
238
  }
192
- function gs(s) {
193
- return typeof atob == "function" ? new Uint8Array(atob(s).split("").map(fs)) : new (ds("buffer")).Buffer(s, "base64");
239
+ function ys(s) {
240
+ return typeof atob == "function" ? new Uint8Array(atob(s).split("").map(ms)) : new (Cs("buffer")).Buffer(s, "base64");
194
241
  }
195
- function fs(s) {
242
+ function ms(s) {
196
243
  return s.charCodeAt(0);
197
244
  }
198
- var U = Qe, p = ls(), V = 64, wt = [];
245
+ var U = Se, p = ws(), O = 64, yt = [];
199
246
  P.exports = v;
200
- var jt = P.exports.BYTES_MIN = 16, Xt = P.exports.BYTES_MAX = 64;
247
+ var Zt = P.exports.BYTES_MIN = 16, te = P.exports.BYTES_MAX = 64;
201
248
  P.exports.BYTES = 32;
202
- var Zt = P.exports.KEYBYTES_MIN = 16, te = P.exports.KEYBYTES_MAX = 64;
249
+ var ee = P.exports.KEYBYTES_MIN = 16, se = P.exports.KEYBYTES_MAX = 64;
203
250
  P.exports.KEYBYTES = 32;
204
- var ee = P.exports.SALTBYTES = 16, se = P.exports.PERSONALBYTES = 16;
205
- function v(s, e, t, i, r) {
251
+ var re = P.exports.SALTBYTES = 16, ae = P.exports.PERSONALBYTES = 16;
252
+ function v(s, e, t, r, a) {
206
253
  if (!(this instanceof v))
207
- return new v(s, e, t, i, r);
254
+ return new v(s, e, t, r, a);
208
255
  if (!(p && p.exports))
209
256
  throw new Error("WASM not loaded. Wait for Blake2b.ready(cb)");
210
- s || (s = 32), r !== !0 && (U(s >= jt, "digestLength must be at least " + jt + ", was given " + s), U(s <= Xt, "digestLength must be at most " + Xt + ", was given " + s), e != null && U(e.length >= Zt, "key must be at least " + Zt + ", was given " + e.length), e != null && U(e.length <= te, "key must be at least " + te + ", was given " + e.length), t != null && U(t.length === ee, "salt must be exactly " + ee + ", was given " + t.length), i != null && U(i.length === se, "personal must be exactly " + se + ", was given " + i.length)), wt.length || (wt.push(V), V += 216), this.digestLength = s, this.finalized = !1, this.pointer = wt.pop(), p.memory.fill(0, 0, 64), p.memory[0] = this.digestLength, p.memory[1] = e ? e.length : 0, p.memory[2] = 1, p.memory[3] = 1, t && p.memory.set(t, 32), i && p.memory.set(i, 48), this.pointer + 216 > p.memory.length && p.realloc(this.pointer + 216), p.exports.blake2b_init(this.pointer, this.digestLength), e && (this.update(e), p.memory.fill(0, V, V + e.length), p.memory[this.pointer + 200] = 128);
257
+ s || (s = 32), a !== !0 && (U(s >= Zt, "digestLength must be at least " + Zt + ", was given " + s), U(s <= te, "digestLength must be at most " + te + ", was given " + s), e != null && U(e.length >= ee, "key must be at least " + ee + ", was given " + e.length), e != null && U(e.length <= se, "key must be at least " + se + ", was given " + e.length), t != null && U(t.length === re, "salt must be exactly " + re + ", was given " + t.length), r != null && U(r.length === ae, "personal must be exactly " + ae + ", was given " + r.length)), yt.length || (yt.push(O), O += 216), this.digestLength = s, this.finalized = !1, this.pointer = yt.pop(), p.memory.fill(0, 0, 64), p.memory[0] = this.digestLength, p.memory[1] = e ? e.length : 0, p.memory[2] = 1, p.memory[3] = 1, t && p.memory.set(t, 32), r && p.memory.set(r, 48), this.pointer + 216 > p.memory.length && p.realloc(this.pointer + 216), p.exports.blake2b_init(this.pointer, this.digestLength), e && (this.update(e), p.memory.fill(0, O, O + e.length), p.memory[this.pointer + 200] = 128);
211
258
  }
212
259
  v.prototype.update = function(s) {
213
- return U(this.finalized === !1, "Hash instance finalized"), U(s, "input must be TypedArray or Buffer"), V + s.length > p.memory.length && p.realloc(V + s.length), p.memory.set(s, V), p.exports.blake2b_update(this.pointer, V, V + s.length), this;
260
+ return U(this.finalized === !1, "Hash instance finalized"), U(s, "input must be TypedArray or Buffer"), O + s.length > p.memory.length && p.realloc(O + s.length), p.memory.set(s, O), p.exports.blake2b_update(this.pointer, O, O + s.length), this;
214
261
  };
215
262
  v.prototype.digest = function(s) {
216
- if (U(this.finalized === !1, "Hash instance finalized"), this.finalized = !0, wt.push(this.pointer), p.exports.blake2b_final(this.pointer), !s || s === "binary")
263
+ if (U(this.finalized === !1, "Hash instance finalized"), this.finalized = !0, yt.push(this.pointer), p.exports.blake2b_final(this.pointer), !s || s === "binary")
217
264
  return p.memory.slice(this.pointer + 128, this.pointer + 128 + this.digestLength);
218
265
  if (s === "hex")
219
- return ps(p.memory, this.pointer + 128, this.digestLength);
266
+ return Bs(p.memory, this.pointer + 128, this.digestLength);
220
267
  U(s.length >= this.digestLength, "input must be TypedArray or Buffer");
221
268
  for (var e = 0; e < this.digestLength; e++)
222
269
  s[e] = p.memory[this.pointer + 128 + e];
@@ -226,45 +273,45 @@ v.prototype.final = v.prototype.digest;
226
273
  v.WASM = p && p.buffer;
227
274
  v.SUPPORTED = typeof WebAssembly < "u";
228
275
  v.ready = function(s) {
229
- if (s || (s = _s), !p)
276
+ if (s || (s = Es), !p)
230
277
  return s(new Error("WebAssembly not supported"));
231
- var e = new Promise(function(t, i) {
232
- p.onload(function(r) {
233
- r ? i() : t(), s(r);
278
+ var e = new Promise(function(t, r) {
279
+ p.onload(function(a) {
280
+ a ? r() : t(), s(a);
234
281
  });
235
282
  });
236
283
  return e;
237
284
  };
238
285
  v.prototype.ready = v.ready;
239
- function _s() {
286
+ function Es() {
240
287
  }
241
- function ps(s, e, t) {
242
- for (var i = "", r = 0; r < t; r++)
243
- i += Cs(s[e + r]);
244
- return i;
288
+ function Bs(s, e, t) {
289
+ for (var r = "", a = 0; a < t; a++)
290
+ r += xs(s[e + a]);
291
+ return r;
245
292
  }
246
- function Cs(s) {
293
+ function xs(s) {
247
294
  return s < 16 ? "0" + s.toString(16) : s.toString(16);
248
295
  }
249
- var z = Qe, It = P.exports;
296
+ var J = Se, It = P.exports;
250
297
  function gt(s, e, t) {
251
- var i = s[e] + s[t], r = s[e + 1] + s[t + 1];
252
- i >= 4294967296 && r++, s[e] = i, s[e + 1] = r;
298
+ var r = s[e] + s[t], a = s[e + 1] + s[t + 1];
299
+ r >= 4294967296 && a++, s[e] = r, s[e + 1] = a;
253
300
  }
254
- function ie(s, e, t, i) {
255
- var r = s[e] + t;
256
- t < 0 && (r += 4294967296);
257
- var n = s[e + 1] + i;
258
- r >= 4294967296 && n++, s[e] = r, s[e + 1] = n;
301
+ function ie(s, e, t, r) {
302
+ var a = s[e] + t;
303
+ t < 0 && (a += 4294967296);
304
+ var n = s[e + 1] + r;
305
+ a >= 4294967296 && n++, s[e] = a, s[e + 1] = n;
259
306
  }
260
- function Se(s, e) {
307
+ function be(s, e) {
261
308
  return s[e] ^ s[e + 1] << 8 ^ s[e + 2] << 16 ^ s[e + 3] << 24;
262
309
  }
263
- function $(s, e, t, i, r, n) {
264
- var o = At[r], c = At[r + 1], A = At[n], h = At[n + 1];
310
+ function q(s, e, t, r, a, n) {
311
+ var o = At[a], c = At[a + 1], A = At[n], u = At[n + 1];
265
312
  gt(l, s, e), ie(l, s, o, c);
266
- var I = l[i] ^ l[s], u = l[i + 1] ^ l[s + 1];
267
- l[i] = u, l[i + 1] = I, gt(l, t, i), I = l[e] ^ l[t], u = l[e + 1] ^ l[t + 1], l[e] = I >>> 24 ^ u << 8, l[e + 1] = u >>> 24 ^ I << 8, gt(l, s, e), ie(l, s, A, h), I = l[i] ^ l[s], u = l[i + 1] ^ l[s + 1], l[i] = I >>> 16 ^ u << 16, l[i + 1] = u >>> 16 ^ I << 16, gt(l, t, i), I = l[e] ^ l[t], u = l[e + 1] ^ l[t + 1], l[e] = u >>> 31 ^ I << 1, l[e + 1] = I >>> 31 ^ u << 1;
313
+ var d = l[r] ^ l[s], h = l[r + 1] ^ l[s + 1];
314
+ l[r] = h, l[r + 1] = d, gt(l, t, r), d = l[e] ^ l[t], h = l[e + 1] ^ l[t + 1], l[e] = d >>> 24 ^ h << 8, l[e + 1] = h >>> 24 ^ d << 8, gt(l, s, e), ie(l, s, A, u), d = l[r] ^ l[s], h = l[r + 1] ^ l[s + 1], l[r] = d >>> 16 ^ h << 16, l[r + 1] = h >>> 16 ^ d << 16, gt(l, t, r), d = l[e] ^ l[t], h = l[e + 1] ^ l[t + 1], l[e] = h >>> 31 ^ d << 1, l[e + 1] = d >>> 31 ^ h << 1;
268
315
  }
269
316
  var ve = new Uint32Array([
270
317
  4089235720,
@@ -283,7 +330,7 @@ var ve = new Uint32Array([
283
330
  528734635,
284
331
  327033209,
285
332
  1541459225
286
- ]), ws = [
333
+ ]), Qs = [
287
334
  0,
288
335
  1,
289
336
  2,
@@ -476,7 +523,7 @@ var ve = new Uint32Array([
476
523
  7,
477
524
  5,
478
525
  3
479
- ], E = new Uint8Array(ws.map(function(s) {
526
+ ], E = new Uint8Array(Qs.map(function(s) {
480
527
  return s * 2;
481
528
  })), l = new Uint32Array(32), At = new Uint32Array(32);
482
529
  function De(s, e) {
@@ -484,13 +531,13 @@ function De(s, e) {
484
531
  for (t = 0; t < 16; t++)
485
532
  l[t] = s.h[t], l[t + 16] = ve[t];
486
533
  for (l[24] = l[24] ^ s.t, l[25] = l[25] ^ s.t / 4294967296, e && (l[28] = ~l[28], l[29] = ~l[29]), t = 0; t < 32; t++)
487
- At[t] = Se(s.b, 4 * t);
534
+ At[t] = be(s.b, 4 * t);
488
535
  for (t = 0; t < 12; t++)
489
- $(0, 8, 16, 24, E[t * 16 + 0], E[t * 16 + 1]), $(2, 10, 18, 26, E[t * 16 + 2], E[t * 16 + 3]), $(4, 12, 20, 28, E[t * 16 + 4], E[t * 16 + 5]), $(6, 14, 22, 30, E[t * 16 + 6], E[t * 16 + 7]), $(0, 10, 20, 30, E[t * 16 + 8], E[t * 16 + 9]), $(2, 12, 22, 24, E[t * 16 + 10], E[t * 16 + 11]), $(4, 14, 16, 26, E[t * 16 + 12], E[t * 16 + 13]), $(6, 8, 18, 28, E[t * 16 + 14], E[t * 16 + 15]);
536
+ q(0, 8, 16, 24, E[t * 16 + 0], E[t * 16 + 1]), q(2, 10, 18, 26, E[t * 16 + 2], E[t * 16 + 3]), q(4, 12, 20, 28, E[t * 16 + 4], E[t * 16 + 5]), q(6, 14, 22, 30, E[t * 16 + 6], E[t * 16 + 7]), q(0, 10, 20, 30, E[t * 16 + 8], E[t * 16 + 9]), q(2, 12, 22, 24, E[t * 16 + 10], E[t * 16 + 11]), q(4, 14, 16, 26, E[t * 16 + 12], E[t * 16 + 13]), q(6, 8, 18, 28, E[t * 16 + 14], E[t * 16 + 15]);
490
537
  for (t = 0; t < 16; t++)
491
538
  s.h[t] = s.h[t] ^ l[t] ^ l[t + 16];
492
539
  }
493
- var q = new Uint8Array([
540
+ var z = new Uint8Array([
494
541
  0,
495
542
  0,
496
543
  0,
@@ -556,30 +603,30 @@ var q = new Uint8Array([
556
603
  0,
557
604
  0
558
605
  ]);
559
- function rt(s, e, t, i) {
560
- q.fill(0), this.b = new Uint8Array(128), this.h = new Uint32Array(16), this.t = 0, this.c = 0, this.outlen = s, q[0] = s, e && (q[1] = e.length), q[2] = 1, q[3] = 1, t && q.set(t, 32), i && q.set(i, 48);
561
- for (var r = 0; r < 16; r++)
562
- this.h[r] = ve[r] ^ Se(q, r * 4);
563
- e && (be(this, e), this.c = 128);
606
+ function at(s, e, t, r) {
607
+ z.fill(0), this.b = new Uint8Array(128), this.h = new Uint32Array(16), this.t = 0, this.c = 0, this.outlen = s, z[0] = s, e && (z[1] = e.length), z[2] = 1, z[3] = 1, t && z.set(t, 32), r && z.set(r, 48);
608
+ for (var a = 0; a < 16; a++)
609
+ this.h[a] = ve[a] ^ be(z, a * 4);
610
+ e && (ke(this, e), this.c = 128);
564
611
  }
565
- rt.prototype.update = function(s) {
566
- return z(s != null, "input must be Uint8Array or Buffer"), be(this, s), this;
612
+ at.prototype.update = function(s) {
613
+ return J(s != null, "input must be Uint8Array or Buffer"), ke(this, s), this;
567
614
  };
568
- rt.prototype.digest = function(s) {
615
+ at.prototype.digest = function(s) {
569
616
  var e = !s || s === "binary" || s === "hex" ? new Uint8Array(this.outlen) : s;
570
- return z(e.length >= this.outlen, "out must have at least outlen bytes of space"), ys(this, e), s === "hex" ? ms(e) : e;
617
+ return J(e.length >= this.outlen, "out must have at least outlen bytes of space"), Ss(this, e), s === "hex" ? bs(e) : e;
571
618
  };
572
- rt.prototype.final = rt.prototype.digest;
573
- rt.ready = function(s) {
619
+ at.prototype.final = at.prototype.digest;
620
+ at.ready = function(s) {
574
621
  It.ready(function() {
575
622
  s();
576
623
  });
577
624
  };
578
- function be(s, e) {
625
+ function ke(s, e) {
579
626
  for (var t = 0; t < e.length; t++)
580
627
  s.c === 128 && (s.t += s.c, De(s, !1), s.c = 0), s.b[s.c++] = e[t];
581
628
  }
582
- function ys(s, e) {
629
+ function Ss(s, e) {
583
630
  for (s.t += s.c; s.c < 128; )
584
631
  s.b[s.c++] = 0;
585
632
  De(s, !0);
@@ -587,231 +634,231 @@ function ys(s, e) {
587
634
  e[t] = s.h[t >> 2] >> 8 * (t & 3);
588
635
  return e;
589
636
  }
590
- function ms(s) {
637
+ function bs(s) {
591
638
  for (var e = "", t = 0; t < s.length; t++)
592
- e += Es(s[t]);
639
+ e += vs(s[t]);
593
640
  return e;
594
641
  }
595
- function Es(s) {
642
+ function vs(s) {
596
643
  return s < 16 ? "0" + s.toString(16) : s.toString(16);
597
644
  }
598
- var ke = rt;
599
- Q.exports = function(e, t, i, r, n) {
600
- return n !== !0 && (z(e >= re, "outlen must be at least " + re + ", was given " + e), z(e <= ae, "outlen must be at most " + ae + ", was given " + e), t != null && z(t.length >= ne, "key must be at least " + ne + ", was given " + t.length), t != null && z(t.length <= oe, "key must be at most " + oe + ", was given " + t.length), i != null && z(i.length === ce, "salt must be exactly " + ce + ", was given " + i.length), r != null && z(r.length === Ae, "personal must be exactly " + Ae + ", was given " + r.length)), new ke(e, t, i, r);
645
+ var Ke = at;
646
+ S.exports = function(e, t, r, a, n) {
647
+ return n !== !0 && (J(e >= ne, "outlen must be at least " + ne + ", was given " + e), J(e <= oe, "outlen must be at most " + oe + ", was given " + e), t != null && J(t.length >= ce, "key must be at least " + ce + ", was given " + t.length), t != null && J(t.length <= Ae, "key must be at most " + Ae + ", was given " + t.length), r != null && J(r.length === ue, "salt must be exactly " + ue + ", was given " + r.length), a != null && J(a.length === he, "personal must be exactly " + he + ", was given " + a.length)), new Ke(e, t, r, a);
601
648
  };
602
- Q.exports.ready = function(s) {
649
+ S.exports.ready = function(s) {
603
650
  It.ready(function() {
604
651
  s();
605
652
  });
606
653
  };
607
- Q.exports.WASM_SUPPORTED = It.SUPPORTED;
608
- Q.exports.WASM_LOADED = !1;
609
- var re = Q.exports.BYTES_MIN = 16, ae = Q.exports.BYTES_MAX = 64;
610
- Q.exports.BYTES = 32;
611
- var ne = Q.exports.KEYBYTES_MIN = 16, oe = Q.exports.KEYBYTES_MAX = 64;
612
- Q.exports.KEYBYTES = 32;
613
- var ce = Q.exports.SALTBYTES = 16, Ae = Q.exports.PERSONALBYTES = 16;
654
+ S.exports.WASM_SUPPORTED = It.SUPPORTED;
655
+ S.exports.WASM_LOADED = !1;
656
+ var ne = S.exports.BYTES_MIN = 16, oe = S.exports.BYTES_MAX = 64;
657
+ S.exports.BYTES = 32;
658
+ var ce = S.exports.KEYBYTES_MIN = 16, Ae = S.exports.KEYBYTES_MAX = 64;
659
+ S.exports.KEYBYTES = 32;
660
+ var ue = S.exports.SALTBYTES = 16, he = S.exports.PERSONALBYTES = 16;
614
661
  It.ready(function(s) {
615
- s || (Q.exports.WASM_LOADED = !0, ke = It);
662
+ s || (S.exports.WASM_LOADED = !0, Ke = It);
616
663
  });
617
- var at = {};
618
- Object.defineProperty(at, "__esModule", { value: !0 });
619
- at.bech32m = at.bech32 = void 0;
620
- const xt = "qpzry9x8gf2tvdw0s3jn54khce6mua7l", Ke = {};
621
- for (let s = 0; s < xt.length; s++) {
622
- const e = xt.charAt(s);
623
- Ke[e] = s;
664
+ var it = {};
665
+ Object.defineProperty(it, "__esModule", { value: !0 });
666
+ it.bech32m = it.bech32 = void 0;
667
+ const Qt = "qpzry9x8gf2tvdw0s3jn54khce6mua7l", Ue = {};
668
+ for (let s = 0; s < Qt.length; s++) {
669
+ const e = Qt.charAt(s);
670
+ Ue[e] = s;
624
671
  }
625
- function it(s) {
672
+ function rt(s) {
626
673
  const e = s >> 25;
627
674
  return (s & 33554431) << 5 ^ -(e >> 0 & 1) & 996825010 ^ -(e >> 1 & 1) & 642813549 ^ -(e >> 2 & 1) & 513874426 ^ -(e >> 3 & 1) & 1027748829 ^ -(e >> 4 & 1) & 705979059;
628
675
  }
629
- function he(s) {
676
+ function de(s) {
630
677
  let e = 1;
631
678
  for (let t = 0; t < s.length; ++t) {
632
- const i = s.charCodeAt(t);
633
- if (i < 33 || i > 126)
679
+ const r = s.charCodeAt(t);
680
+ if (r < 33 || r > 126)
634
681
  return "Invalid prefix (" + s + ")";
635
- e = it(e) ^ i >> 5;
682
+ e = rt(e) ^ r >> 5;
636
683
  }
637
- e = it(e);
684
+ e = rt(e);
638
685
  for (let t = 0; t < s.length; ++t) {
639
- const i = s.charCodeAt(t);
640
- e = it(e) ^ i & 31;
686
+ const r = s.charCodeAt(t);
687
+ e = rt(e) ^ r & 31;
641
688
  }
642
689
  return e;
643
690
  }
644
- function Tt(s, e, t, i) {
645
- let r = 0, n = 0;
691
+ function Ot(s, e, t, r) {
692
+ let a = 0, n = 0;
646
693
  const o = (1 << t) - 1, c = [];
647
694
  for (let A = 0; A < s.length; ++A)
648
- for (r = r << e | s[A], n += e; n >= t; )
649
- n -= t, c.push(r >> n & o);
650
- if (i)
651
- n > 0 && c.push(r << t - n & o);
695
+ for (a = a << e | s[A], n += e; n >= t; )
696
+ n -= t, c.push(a >> n & o);
697
+ if (r)
698
+ n > 0 && c.push(a << t - n & o);
652
699
  else {
653
700
  if (n >= e)
654
701
  return "Excess padding";
655
- if (r << t - n & o)
702
+ if (a << t - n & o)
656
703
  return "Non-zero padding";
657
704
  }
658
705
  return c;
659
706
  }
660
- function Bs(s) {
661
- return Tt(s, 8, 5, !0);
707
+ function Ds(s) {
708
+ return Ot(s, 8, 5, !0);
662
709
  }
663
- function xs(s) {
664
- const e = Tt(s, 5, 8, !1);
710
+ function ks(s) {
711
+ const e = Ot(s, 5, 8, !1);
665
712
  if (Array.isArray(e))
666
713
  return e;
667
714
  }
668
- function Qs(s) {
669
- const e = Tt(s, 5, 8, !1);
715
+ function Ks(s) {
716
+ const e = Ot(s, 5, 8, !1);
670
717
  if (Array.isArray(e))
671
718
  return e;
672
719
  throw new Error(e);
673
720
  }
674
- function Ue(s) {
721
+ function Ne(s) {
675
722
  let e;
676
723
  s === "bech32" ? e = 1 : e = 734539939;
677
724
  function t(o, c, A) {
678
725
  if (A = A || 90, o.length + 7 + c.length > A)
679
726
  throw new TypeError("Exceeds length limit");
680
727
  o = o.toLowerCase();
681
- let h = he(o);
682
- if (typeof h == "string")
683
- throw new Error(h);
684
- let I = o + "1";
685
- for (let u = 0; u < c.length; ++u) {
686
- const g = c[u];
687
- if (g >> 5 !== 0)
728
+ let u = de(o);
729
+ if (typeof u == "string")
730
+ throw new Error(u);
731
+ let d = o + "1";
732
+ for (let h = 0; h < c.length; ++h) {
733
+ const f = c[h];
734
+ if (f >> 5 !== 0)
688
735
  throw new Error("Non 5-bit word");
689
- h = it(h) ^ g, I += xt.charAt(g);
736
+ u = rt(u) ^ f, d += Qt.charAt(f);
690
737
  }
691
- for (let u = 0; u < 6; ++u)
692
- h = it(h);
693
- h ^= e;
694
- for (let u = 0; u < 6; ++u) {
695
- const g = h >> (5 - u) * 5 & 31;
696
- I += xt.charAt(g);
738
+ for (let h = 0; h < 6; ++h)
739
+ u = rt(u);
740
+ u ^= e;
741
+ for (let h = 0; h < 6; ++h) {
742
+ const f = u >> (5 - h) * 5 & 31;
743
+ d += Qt.charAt(f);
697
744
  }
698
- return I;
745
+ return d;
699
746
  }
700
- function i(o, c) {
747
+ function r(o, c) {
701
748
  if (c = c || 90, o.length < 8)
702
749
  return o + " too short";
703
750
  if (o.length > c)
704
751
  return "Exceeds length limit";
705
- const A = o.toLowerCase(), h = o.toUpperCase();
706
- if (o !== A && o !== h)
752
+ const A = o.toLowerCase(), u = o.toUpperCase();
753
+ if (o !== A && o !== u)
707
754
  return "Mixed-case string " + o;
708
755
  o = A;
709
- const I = o.lastIndexOf("1");
710
- if (I === -1)
756
+ const d = o.lastIndexOf("1");
757
+ if (d === -1)
711
758
  return "No separator character for " + o;
712
- if (I === 0)
759
+ if (d === 0)
713
760
  return "Missing prefix for " + o;
714
- const u = o.slice(0, I), g = o.slice(I + 1);
715
- if (g.length < 6)
761
+ const h = o.slice(0, d), f = o.slice(d + 1);
762
+ if (f.length < 6)
716
763
  return "Data too short";
717
- let C = he(u);
764
+ let C = de(h);
718
765
  if (typeof C == "string")
719
766
  return C;
720
767
  const x = [];
721
- for (let T = 0; T < g.length; ++T) {
722
- const L = g.charAt(T), _ = Ke[L];
768
+ for (let T = 0; T < f.length; ++T) {
769
+ const $ = f.charAt(T), _ = Ue[$];
723
770
  if (_ === void 0)
724
- return "Unknown character " + L;
725
- C = it(C) ^ _, !(T + 6 >= g.length) && x.push(_);
771
+ return "Unknown character " + $;
772
+ C = rt(C) ^ _, !(T + 6 >= f.length) && x.push(_);
726
773
  }
727
- return C !== e ? "Invalid checksum for " + o : { prefix: u, words: x };
774
+ return C !== e ? "Invalid checksum for " + o : { prefix: h, words: x };
728
775
  }
729
- function r(o, c) {
730
- const A = i(o, c);
776
+ function a(o, c) {
777
+ const A = r(o, c);
731
778
  if (typeof A == "object")
732
779
  return A;
733
780
  }
734
781
  function n(o, c) {
735
- const A = i(o, c);
782
+ const A = r(o, c);
736
783
  if (typeof A == "object")
737
784
  return A;
738
785
  throw new Error(A);
739
786
  }
740
787
  return {
741
- decodeUnsafe: r,
788
+ decodeUnsafe: a,
742
789
  decode: n,
743
790
  encode: t,
744
- toWords: Bs,
745
- fromWordsUnsafe: xs,
746
- fromWords: Qs
791
+ toWords: Ds,
792
+ fromWordsUnsafe: ks,
793
+ fromWords: Ks
747
794
  };
748
795
  }
749
- at.bech32 = Ue("bech32");
750
- at.bech32m = Ue("bech32m");
751
- var Ss = Wt && Wt.__importDefault || function(s) {
796
+ it.bech32 = Ne("bech32");
797
+ it.bech32m = Ne("bech32m");
798
+ var Us = Xt && Xt.__importDefault || function(s) {
752
799
  return s && s.__esModule ? s : { default: s };
753
800
  };
754
- Object.defineProperty(xe, "__esModule", { value: !0 });
755
- const vs = Ss(Q.exports), ft = at, kt = "asset";
756
- class ut {
801
+ Object.defineProperty(Qe, "__esModule", { value: !0 });
802
+ const Ns = Us(S.exports), _t = it, Kt = "asset";
803
+ class ht {
757
804
  constructor(e) {
758
805
  this.hashBuf = e;
759
806
  }
760
807
  static fromHash(e) {
761
- return new ut(e);
808
+ return new ht(e);
762
809
  }
763
810
  static fromParts(e, t) {
764
- const i = (0, vs.default)(20).update(new Uint8Array([...e, ...t])).digest("binary");
765
- return ut.fromHash(i);
811
+ const r = (0, Ns.default)(20).update(new Uint8Array([...e, ...t])).digest("binary");
812
+ return ht.fromHash(r);
766
813
  }
767
814
  static fromBech32(e) {
768
- const { prefix: t, words: i } = ft.bech32.decode(e);
769
- if (t !== kt)
815
+ const { prefix: t, words: r } = _t.bech32.decode(e);
816
+ if (t !== Kt)
770
817
  throw new Error("Invalid asset fingerprint");
771
- const r = Buffer.from(ft.bech32.fromWords(i));
772
- return ut.fromHash(r);
818
+ const a = Buffer.from(_t.bech32.fromWords(r));
819
+ return ht.fromHash(a);
773
820
  }
774
821
  fingerprint() {
775
- const e = ft.bech32.toWords(this.hashBuf);
776
- return ft.bech32.encode(kt, e);
822
+ const e = _t.bech32.toWords(this.hashBuf);
823
+ return _t.bech32.encode(Kt, e);
777
824
  }
778
825
  hash() {
779
826
  return Buffer.from(this.hashBuf).toString("hex");
780
827
  }
781
828
  prefix() {
782
- return kt;
829
+ return Kt;
783
830
  }
784
831
  checksum() {
785
832
  return this.fingerprint().slice(-6);
786
833
  }
787
834
  }
788
- var Ds = xe.default = ut;
789
- const bs = Ds, ks = (s, e) => {
790
- const t = Ks(s), i = t.derive(bt + 1852).derive(bt + 1815).derive(bt + e), r = i.derive(0).derive(0).to_raw_key(), n = i.derive(2).derive(0).to_raw_key();
791
- return i.free(), t.free(), { paymentKey: r, stakeKey: n };
792
- }, et = (s) => a.Address.from_bytes(f(s)), Ks = (s) => a.Bip32PrivateKey.from_bytes(f(s)), Us = (s) => a.DataHash.from_bytes(f(s)), F = (s) => a.Ed25519KeyHash.from_bytes(f(s)), Fs = (s) => a.Ed25519Signature.from_bytes(f(s)), St = (s) => a.NativeScript.from_bytes(f(s)), Ns = (s) => a.PublicKey.from_bytes(f(s)), Hs = (s) => a.PlutusData.from_bytes(f(s)), nt = (s, e) => a.PlutusScript.from_bytes_with_version(f(s), mt[e]), Ps = (s) => a.ScriptRef.from_bytes(f(s)), Ts = (s) => a.ScriptHash.from_bytes(f(s)), W = (s) => a.Transaction.from_bytes(f(s)), Fe = (s) => a.TransactionHash.from_bytes(f(s)), ue = (s) => a.TransactionUnspentOutput.from_bytes(f(s)), Ms = (s) => a.TransactionWitnessSet.from_bytes(f(s)), Vs = (s) => a.Value.from_bytes(f(s)), H = (s) => a.Address.from_bech32(s), Mt = (s) => a.BaseAddress.from_address(H(s)), Ne = (s) => a.EnterpriseAddress.from_address(H(s)), He = (s) => a.RewardAddress.from_address(H(s)), k = (s) => Buffer.from(s).toString("hex"), f = (s) => s.length % 2 === 0 && /^[0-9A-F]*$/i.test(s) ? Buffer.from(s, "hex") : Buffer.from(s, "utf-8"), vt = (s) => {
835
+ var Fs = Qe.default = ht;
836
+ const Hs = Fs, Ps = (s, e) => {
837
+ const t = Ts(s), r = t.derive(kt + 1852).derive(kt + 1815).derive(kt + e), a = r.derive(0).derive(0).to_raw_key(), n = r.derive(2).derive(0).to_raw_key();
838
+ return r.free(), t.free(), { paymentKey: a, stakeKey: n };
839
+ }, et = (s) => i.Address.from_bytes(g(s)), Ts = (s) => i.Bip32PrivateKey.from_bytes(g(s)), Ms = (s) => i.DataHash.from_bytes(g(s)), N = (s) => i.Ed25519KeyHash.from_bytes(g(s)), Os = (s) => i.Ed25519Signature.from_bytes(g(s)), bt = (s) => i.NativeScript.from_bytes(g(s)), Vs = (s) => i.PublicKey.from_bytes(g(s)), Fe = (s) => i.PlutusData.from_bytes(g(s)), nt = (s, e) => i.PlutusScript.from_bytes_with_version(g(s), Bt[e]), Ys = (s) => i.ScriptRef.from_bytes(g(s)), Gs = (s) => i.ScriptHash.from_bytes(g(s)), Y = (s) => i.Transaction.from_bytes(g(s)), He = (s) => i.TransactionHash.from_bytes(g(s)), Ie = (s) => i.TransactionUnspentOutput.from_bytes(g(s)), Rs = (s) => i.TransactionWitnessSet.from_bytes(g(s)), Ls = (s) => i.Value.from_bytes(g(s)), H = (s) => i.Address.from_bech32(s), Vt = (s) => i.BaseAddress.from_address(H(s)), Pe = (s) => i.EnterpriseAddress.from_address(H(s)), Te = (s) => i.RewardAddress.from_address(H(s)), b = (s) => Buffer.from(s).toString("hex"), g = (s) => s.length % 2 === 0 && /^[0-9A-F]*$/i.test(s) ? Buffer.from(s, "hex") : Buffer.from(s, "utf-8"), vt = (s) => {
793
840
  const e = (t) => {
794
- const i = new Array();
795
- for (let r = 0; r < t.len(); r += 1)
796
- i.push(vt(t.get(r)));
797
- return i;
841
+ const r = new Array();
842
+ for (let a = 0; a < t.len(); a += 1)
843
+ r.push(vt(t.get(a)));
844
+ return r;
798
845
  };
799
846
  switch (s.kind()) {
800
- case a.NativeScriptKind.ScriptAll: {
847
+ case i.NativeScriptKind.ScriptAll: {
801
848
  const t = s.as_script_all();
802
849
  return {
803
850
  type: "all",
804
851
  scripts: e(t.native_scripts())
805
852
  };
806
853
  }
807
- case a.NativeScriptKind.ScriptAny: {
854
+ case i.NativeScriptKind.ScriptAny: {
808
855
  const t = s.as_script_any();
809
856
  return {
810
857
  type: "any",
811
858
  scripts: e(t.native_scripts())
812
859
  };
813
860
  }
814
- case a.NativeScriptKind.ScriptNOfK: {
861
+ case i.NativeScriptKind.ScriptNOfK: {
815
862
  const t = s.as_script_n_of_k();
816
863
  return {
817
864
  type: "atLeast",
@@ -819,21 +866,21 @@ const bs = Ds, ks = (s, e) => {
819
866
  scripts: e(t.native_scripts())
820
867
  };
821
868
  }
822
- case a.NativeScriptKind.TimelockStart: {
869
+ case i.NativeScriptKind.TimelockStart: {
823
870
  const t = s.as_timelock_start();
824
871
  return {
825
872
  type: "after",
826
873
  slot: t.slot_bignum().to_str()
827
874
  };
828
875
  }
829
- case a.NativeScriptKind.TimelockExpiry: {
876
+ case i.NativeScriptKind.TimelockExpiry: {
830
877
  const t = s.as_timelock_expiry();
831
878
  return {
832
879
  type: "before",
833
880
  slot: t.slot_bignum().to_str()
834
881
  };
835
882
  }
836
- case a.NativeScriptKind.ScriptPubkey: {
883
+ case i.NativeScriptKind.ScriptPubkey: {
837
884
  const t = s.as_script_pubkey();
838
885
  return {
839
886
  type: "sig",
@@ -845,87 +892,119 @@ const bs = Ds, ks = (s, e) => {
845
892
  }
846
893
  }, Dt = (s) => {
847
894
  const e = (t) => {
848
- const i = a.NativeScripts.new();
849
- return t.forEach((r) => {
850
- i.add(Dt(r));
851
- }), i;
895
+ const r = i.NativeScripts.new();
896
+ return t.forEach((a) => {
897
+ r.add(Dt(a));
898
+ }), r;
852
899
  };
853
900
  switch (s.type) {
854
901
  case "all":
855
- return a.NativeScript.new_script_all(a.ScriptAll.new(e(s.scripts)));
902
+ return i.NativeScript.new_script_all(i.ScriptAll.new(e(s.scripts)));
856
903
  case "any":
857
- return a.NativeScript.new_script_any(a.ScriptAny.new(e(s.scripts)));
904
+ return i.NativeScript.new_script_any(i.ScriptAny.new(e(s.scripts)));
858
905
  case "atLeast":
859
- return a.NativeScript.new_script_n_of_k(a.ScriptNOfK.new(s.required, e(s.scripts)));
906
+ return i.NativeScript.new_script_n_of_k(i.ScriptNOfK.new(s.required, e(s.scripts)));
860
907
  case "after":
861
- return a.NativeScript.new_timelock_start(a.TimelockStart.new_timelockstart(a.BigNum.from_str(s.slot)));
908
+ return i.NativeScript.new_timelock_start(i.TimelockStart.new_timelockstart(i.BigNum.from_str(s.slot)));
862
909
  case "before":
863
- return a.NativeScript.new_timelock_expiry(a.TimelockExpiry.new_timelockexpiry(a.BigNum.from_str(s.slot)));
910
+ return i.NativeScript.new_timelock_expiry(i.TimelockExpiry.new_timelockexpiry(i.BigNum.from_str(s.slot)));
864
911
  case "sig":
865
- return a.NativeScript.new_script_pubkey(a.ScriptPubkey.new(F(s.keyHash)));
912
+ return i.NativeScript.new_script_pubkey(i.ScriptPubkey.new(N(s.keyHash)));
913
+ }
914
+ }, mt = (s) => {
915
+ var r, a, n;
916
+ const e = (o) => {
917
+ const c = [];
918
+ for (let A = 0; A < o.len(); A += 1)
919
+ c.push(mt(o.get(A)));
920
+ return c;
921
+ }, t = (o) => {
922
+ const c = /* @__PURE__ */ new Map();
923
+ for (let A = 0; A < o.len(); A += 1) {
924
+ const u = o.keys().get(A), d = o.get(u) ?? i.PlutusData.from_hex(Q("NO_ITEM_FOUND_INSIDE_GOLD_ROOM"));
925
+ c.set(mt(u), mt(d));
926
+ }
927
+ return c;
928
+ };
929
+ switch (s.kind()) {
930
+ case i.PlutusDataKind.Bytes:
931
+ return b(s.as_bytes() ?? new Uint8Array());
932
+ case i.PlutusDataKind.Integer:
933
+ return parseInt(((r = s.as_integer()) == null ? void 0 : r.to_str()) ?? "0", 10);
934
+ case i.PlutusDataKind.List:
935
+ return e(s.as_list() ?? i.PlutusList.new());
936
+ case i.PlutusDataKind.Map:
937
+ return t(s.as_map() ?? i.PlutusMap.new());
938
+ case i.PlutusDataKind.ConstrPlutusData:
939
+ return {
940
+ alternative: parseInt(((a = s.as_constr_plutus_data()) == null ? void 0 : a.alternative().to_str()) ?? "0", 10),
941
+ fields: e(((n = s.as_constr_plutus_data()) == null ? void 0 : n.data()) ?? i.PlutusList.new())
942
+ };
943
+ default:
944
+ throw new Error(`PlutusData Kind: ${s.kind()}, is not supported`);
866
945
  }
867
946
  }, Z = (s) => {
868
947
  const e = (t) => {
869
- const i = a.PlutusList.new();
870
- return t.forEach((r) => {
871
- i.add(Z(r));
872
- }), i;
948
+ const r = i.PlutusList.new();
949
+ return t.forEach((a) => {
950
+ r.add(Z(a));
951
+ }), r;
873
952
  };
874
953
  switch (typeof s) {
875
954
  case "string":
876
- return a.PlutusData.new_bytes(f(s));
955
+ return i.PlutusData.new_bytes(g(s));
877
956
  case "number":
878
- return a.PlutusData.new_integer(a.BigInt.from_str(s.toString()));
957
+ return i.PlutusData.new_integer(i.BigInt.from_str(s.toString()));
879
958
  case "object":
880
959
  if (s instanceof Array) {
881
960
  const t = e(s);
882
- return a.PlutusData.new_list(t);
961
+ return i.PlutusData.new_list(t);
883
962
  } else if (s instanceof Map) {
884
- const t = a.PlutusMap.new();
885
- return s.forEach((i, r) => {
886
- t.insert(Z(r), Z(i));
887
- }), a.PlutusData.new_map(t);
963
+ const t = i.PlutusMap.new();
964
+ return s.forEach((r, a) => {
965
+ t.insert(Z(a), Z(r));
966
+ }), i.PlutusData.new_map(t);
888
967
  } else
889
- return a.PlutusData.new_constr_plutus_data(a.ConstrPlutusData.new(a.BigNum.from_str(s.alternative.toString()), e(s.fields)));
968
+ return i.PlutusData.new_constr_plutus_data(i.ConstrPlutusData.new(i.BigNum.from_str(s.alternative.toString()), e(s.fields)));
890
969
  }
891
- }, Os = (s) => {
892
- const e = a.Relays.new();
970
+ }, $s = (s) => {
971
+ const e = i.Relays.new();
893
972
  throw s.relays.forEach((t) => {
894
- e.add(Ys(t));
973
+ e.add(qs(t));
895
974
  }), new Error("toPoolParams not implemented.");
896
- }, Pe = (s) => {
897
- const e = (t) => Ze[t];
898
- return a.Redeemer.new(e(s.tag), a.BigNum.from_str(s.index.toString()), Z(s.data), a.ExUnits.new(a.BigNum.from_str(s.budget.mem.toString()), a.BigNum.from_str(s.budget.steps.toString())));
899
- }, Ys = (s) => {
975
+ }, Me = (s) => {
976
+ const e = (t) => es[t];
977
+ return i.Redeemer.new(e(s.tag), i.BigNum.from_str(s.index.toString()), Z(s.data), i.ExUnits.new(i.BigNum.from_str(s.budget.mem.toString()), i.BigNum.from_str(s.budget.steps.toString())));
978
+ }, qs = (s) => {
900
979
  switch (s.type) {
901
980
  case "SingleHostAddr": {
902
- const e = s.IPV4 ? a.Ipv4.new(new Uint8Array(s.IPV4.split(".").map((i) => parseInt(i)))) : void 0, t = s.IPV6 ? a.Ipv6.new(f(s.IPV6.replaceAll(":", ""))) : void 0;
903
- return a.Relay.new_single_host_addr(a.SingleHostAddr.new(s.port, e, t));
981
+ const e = s.IPV4 ? i.Ipv4.new(new Uint8Array(s.IPV4.split(".").map((r) => parseInt(r)))) : void 0, t = s.IPV6 ? i.Ipv6.new(g(s.IPV6.replaceAll(":", ""))) : void 0;
982
+ return i.Relay.new_single_host_addr(i.SingleHostAddr.new(s.port, e, t));
904
983
  }
905
984
  case "SingleHostName":
906
- return a.Relay.new_single_host_name(a.SingleHostName.new(s.port, a.DNSRecordAorAAAA.new(s.domainName)));
985
+ return i.Relay.new_single_host_name(i.SingleHostName.new(s.port, i.DNSRecordAorAAAA.new(s.domainName)));
907
986
  case "MultiHostName":
908
- return a.Relay.new_multi_host_name(a.MultiHostName.new(a.DNSRecordSRV.new(s.domainName)));
987
+ return i.Relay.new_multi_host_name(i.MultiHostName.new(i.DNSRecordSRV.new(s.domainName)));
909
988
  }
910
- }, Te = (s) => {
989
+ }, Oe = (s) => {
911
990
  if (s.is_plutus_script()) {
912
991
  const t = s.plutus_script();
913
992
  return {
914
993
  code: t.to_hex(),
915
- version: Object.keys(mt).find((i) => mt[i].to_hex() === t.language_version().to_hex())
994
+ version: Object.keys(Bt).find((r) => Bt[r].to_hex() === t.language_version().to_hex())
916
995
  };
917
996
  }
918
997
  const e = s.native_script();
919
998
  return vt(e);
920
- }, dt = (s) => {
999
+ }, lt = (s) => {
921
1000
  if ("code" in s) {
922
1001
  const e = nt(s.code, s.version);
923
- return a.ScriptRef.new_plutus_script(e);
1002
+ return i.ScriptRef.new_plutus_script(e);
924
1003
  }
925
- return a.ScriptRef.new_native_script(Dt(s));
926
- }, Qt = (s) => {
927
- var r, n, o;
928
- const e = s.output().has_data_hash() ? (r = s.output().data_hash()) == null ? void 0 : r.to_hex() : void 0, t = s.output().has_plutus_data() ? (n = s.output().plutus_data()) == null ? void 0 : n.to_hex() : void 0, i = s.output().has_script_ref() ? (o = s.output().script_ref()) == null ? void 0 : o.to_hex() : void 0;
1004
+ return i.ScriptRef.new_native_script(Dt(s));
1005
+ }, St = (s) => {
1006
+ var a, n, o;
1007
+ const e = s.output().has_data_hash() ? (a = s.output().data_hash()) == null ? void 0 : a.to_hex() : void 0, t = s.output().has_plutus_data() ? (n = s.output().plutus_data()) == null ? void 0 : n.to_hex() : void 0, r = s.output().has_script_ref() ? (o = s.output().script_ref()) == null ? void 0 : o.to_hex() : void 0;
929
1008
  return {
930
1009
  input: {
931
1010
  outputIndex: s.input().index(),
@@ -933,248 +1012,248 @@ const bs = Ds, ks = (s, e) => {
933
1012
  },
934
1013
  output: {
935
1014
  address: s.output().address().to_bech32(),
936
- amount: Me(s.output().amount()),
1015
+ amount: Ve(s.output().amount()),
937
1016
  dataHash: e,
938
1017
  plutusData: t,
939
- scriptRef: i
1018
+ scriptRef: r
940
1019
  }
941
1020
  };
942
- }, O = (s) => {
943
- const e = a.TransactionInput.new(Fe(s.input.txHash), s.input.outputIndex), t = a.TransactionOutput.new(H(s.output.address), yt(s.output.amount));
944
- return s.output.dataHash !== void 0 && t.set_data_hash(Us(s.output.dataHash)), s.output.plutusData !== void 0 && t.set_plutus_data(Hs(s.output.plutusData)), s.output.scriptRef !== void 0 && t.set_script_ref(Ps(s.output.scriptRef)), a.TransactionUnspentOutput.new(e, t);
945
- }, Ie = (s) => {
946
- const e = s.split(".")[1] ?? "0", t = `${parseInt(e, 10)}`, i = "1" + "0".repeat(e.length);
947
- return a.UnitInterval.new(a.BigNum.from_str(t), a.BigNum.from_str(i));
948
- }, S = (s) => s.length % 2 === 0 && /^[0-9A-F]*$/i.test(s) ? s : k(Buffer.from(s, "utf-8")), Vt = (s) => Buffer.from(s, "hex").toString("utf-8"), Me = (s) => {
1021
+ }, V = (s) => {
1022
+ const e = i.TransactionInput.new(He(s.input.txHash), s.input.outputIndex), t = i.TransactionOutput.new(H(s.output.address), Et(s.output.amount));
1023
+ return s.output.dataHash !== void 0 && t.set_data_hash(Ms(s.output.dataHash)), s.output.plutusData !== void 0 && t.set_plutus_data(Fe(s.output.plutusData)), s.output.scriptRef !== void 0 && t.set_script_ref(Ys(s.output.scriptRef)), i.TransactionUnspentOutput.new(e, t);
1024
+ }, le = (s) => {
1025
+ const e = s.split(".")[1] ?? "0", t = `${parseInt(e, 10)}`, r = "1" + "0".repeat(e.length);
1026
+ return i.UnitInterval.new(i.BigNum.from_str(t), i.BigNum.from_str(r));
1027
+ }, Q = (s) => s.length % 2 === 0 && /^[0-9A-F]*$/i.test(s) ? s : b(Buffer.from(s, "utf-8")), Yt = (s) => Buffer.from(s, "hex").toString("utf-8"), Ve = (s) => {
949
1028
  const e = [
950
1029
  { unit: "lovelace", quantity: s.coin().to_str() }
951
1030
  ], t = s.multiasset();
952
1031
  if (t !== void 0) {
953
- const i = t.keys();
954
- for (let r = 0; r < i.len(); r += 1) {
955
- const n = i.get(r), o = t.get(n);
1032
+ const r = t.keys();
1033
+ for (let a = 0; a < r.len(); a += 1) {
1034
+ const n = r.get(a), o = t.get(n);
956
1035
  if (o !== void 0) {
957
1036
  const c = o.keys();
958
1037
  for (let A = 0; A < c.len(); A += 1) {
959
- const h = c.get(A), I = o.get(h) ?? a.BigNum.from_str("0"), u = n.to_hex() + k(h.name());
960
- e.push({ unit: u, quantity: I.to_str() });
1038
+ const u = c.get(A), d = o.get(u) ?? i.BigNum.from_str("0"), h = n.to_hex() + b(u.name());
1039
+ e.push({ unit: h, quantity: d.to_str() });
961
1040
  }
962
1041
  }
963
1042
  }
964
1043
  }
965
1044
  return e;
966
- }, yt = (s) => {
967
- const e = s.find((n) => n.unit === "lovelace"), t = Array.from(new Set(s.filter((n) => n.unit !== "lovelace").map((n) => n.unit.slice(0, N)))), i = a.MultiAsset.new();
1045
+ }, Et = (s) => {
1046
+ const e = s.find((n) => n.unit === "lovelace"), t = Array.from(new Set(s.filter((n) => n.unit !== "lovelace").map((n) => n.unit.slice(0, F)))), r = i.MultiAsset.new();
968
1047
  t.forEach((n) => {
969
- const o = a.Assets.new();
970
- s.filter((c) => c.unit.slice(0, N) === n).forEach((c) => {
971
- o.insert(a.AssetName.new(f(c.unit.slice(N))), a.BigNum.from_str(c.quantity));
972
- }), i.insert(Ts(n), o);
1048
+ const o = i.Assets.new();
1049
+ s.filter((c) => c.unit.slice(0, F) === n).forEach((c) => {
1050
+ o.insert(i.AssetName.new(g(c.unit.slice(F))), i.BigNum.from_str(c.quantity));
1051
+ }), r.insert(Gs(n), o);
973
1052
  });
974
- const r = a.Value.new(a.BigNum.from_str(e ? e.quantity : "0"));
975
- return (s.length > 1 || !e) && r.set_multiasset(i), r;
976
- }, de = (s, e, t) => a.BaseAddress.new(s, a.StakeCredential.from_keyhash(e), a.StakeCredential.from_keyhash(t)), Ve = (s, e = "") => a.Bip32PrivateKey.from_bip39_entropy(f(s), f(S(e))), le = (s) => a.DataCost.new_coins_per_byte(a.BigNum.from_str(s)), Gs = (s) => {
1053
+ const a = i.Value.new(i.BigNum.from_str(e ? e.quantity : "0"));
1054
+ return (s.length > 1 || !e) && a.set_multiasset(r), a;
1055
+ }, fe = (s, e, t) => i.BaseAddress.new(s, i.StakeCredential.from_keyhash(e), i.StakeCredential.from_keyhash(t)), Ye = (s, e = "") => i.Bip32PrivateKey.from_bip39_entropy(g(s), g(Q(e))), ge = (s) => i.DataCost.new_coins_per_byte(i.BigNum.from_str(s)), zs = (s) => {
977
1056
  if (typeof s != "object" || !("input" in s))
978
- return a.DatumSource.new(Z(s));
979
- const e = O(s);
1057
+ return i.DatumSource.new(Z(s));
1058
+ const e = V(s);
980
1059
  if (e.output().has_plutus_data())
981
- return a.DatumSource.new_ref_input(e.input());
1060
+ return i.DatumSource.new_ref_input(e.input());
982
1061
  throw new Error(`No inline datum found in UTxO: ${e.input().transaction_id().to_hex()}`);
983
- }, ge = (s, e) => a.EnterpriseAddress.new(s, a.StakeCredential.from_keyhash(e)), fe = (s, e) => {
1062
+ }, _e = (s, e) => i.EnterpriseAddress.new(s, i.StakeCredential.from_keyhash(e)), pe = (s, e) => {
984
1063
  if (typeof s == "string")
985
- return a.MintWitness.new_native_script(St(s));
1064
+ return i.MintWitness.new_native_script(bt(s));
986
1065
  if (e === void 0)
987
1066
  throw new Error("Minting with plutus requires a redeemer to be defined");
988
1067
  if (e.tag !== "MINT")
989
1068
  throw new Error("Minting redeemer's tag must be defined as 'MINT'");
990
- return a.MintWitness.new_plutus_script(Oe(s), Pe({
1069
+ return i.MintWitness.new_plutus_script(Ge(s), Me({
991
1070
  tag: "MINT",
992
1071
  index: 0,
993
- budget: me,
1072
+ budget: Be,
994
1073
  data: {
995
1074
  alternative: 0,
996
1075
  fields: []
997
1076
  },
998
1077
  ...e
999
1078
  }));
1000
- }, Ft = (s, e) => a.RewardAddress.new(s, a.StakeCredential.from_keyhash(e)), Oe = (s) => {
1079
+ }, Ft = (s, e) => i.RewardAddress.new(s, i.StakeCredential.from_keyhash(e)), Ge = (s) => {
1001
1080
  if ("code" in s)
1002
- return a.PlutusScriptSource.new(nt(s.code, s.version));
1003
- const e = O(s);
1081
+ return i.PlutusScriptSource.new(nt(s.code, s.version));
1082
+ const e = V(s);
1004
1083
  if (e.output().has_script_ref()) {
1005
1084
  const t = e.output().script_ref();
1006
1085
  if (t.is_plutus_script()) {
1007
- const i = Te(t), r = nt(i.code, i.version).hash();
1008
- return a.PlutusScriptSource.new_ref_input_with_lang_ver(r, e.input(), mt[i.version]);
1086
+ const r = Oe(t), a = nt(r.code, r.version).hash();
1087
+ return i.PlutusScriptSource.new_ref_input_with_lang_ver(a, e.input(), Bt[r.version]);
1009
1088
  }
1010
1089
  }
1011
1090
  throw new Error(`No plutus script reference found in UTxO: ${e.input().transaction_id().to_hex()}`);
1012
- }, _t = (s) => {
1013
- const e = a.ScriptPubkey.new(s);
1014
- return a.NativeScript.new_script_pubkey(e);
1015
- }, Rs = (s = Y) => {
1016
- const e = a.TransactionBuilderConfigBuilder.new().coins_per_utxo_byte(a.BigNum.from_str(s.coinsPerUTxOSize)).ex_unit_prices(a.ExUnitPrices.new(Ie(s.priceMem.toString()), Ie(s.priceStep.toString()))).fee_algo(a.LinearFee.new(a.BigNum.from_str(s.minFeeA.toString()), a.BigNum.from_str(s.minFeeB.toString()))).key_deposit(a.BigNum.from_str(s.keyDeposit)).max_tx_size(s.maxTxSize).max_value_size(parseInt(s.maxValSize, 10)).pool_deposit(a.BigNum.from_str(s.poolDeposit)).build();
1017
- return a.TransactionBuilder.new(e);
1018
- }, _e = (s) => {
1019
- const e = a.TxInputsBuilder.new();
1020
- return s.map((t) => t instanceof a.TransactionUnspentOutput ? t : O(t)).forEach((t) => {
1091
+ }, pt = (s) => {
1092
+ const e = i.ScriptPubkey.new(s);
1093
+ return i.NativeScript.new_script_pubkey(e);
1094
+ }, Js = (s = G) => {
1095
+ const e = i.TransactionBuilderConfigBuilder.new().coins_per_utxo_byte(i.BigNum.from_str(s.coinsPerUTxOSize)).ex_unit_prices(i.ExUnitPrices.new(le(s.priceMem.toString()), le(s.priceStep.toString()))).fee_algo(i.LinearFee.new(i.BigNum.from_str(s.minFeeA.toString()), i.BigNum.from_str(s.minFeeB.toString()))).key_deposit(i.BigNum.from_str(s.keyDeposit)).max_tx_size(s.maxTxSize).max_value_size(parseInt(s.maxValSize, 10)).pool_deposit(i.BigNum.from_str(s.poolDeposit)).build();
1096
+ return i.TransactionBuilder.new(e);
1097
+ }, Ce = (s) => {
1098
+ const e = i.TxInputsBuilder.new();
1099
+ return s.map((t) => t instanceof i.TransactionUnspentOutput ? t : V(t)).forEach((t) => {
1021
1100
  e.add_input(t.output().address(), t.input(), t.output().amount());
1022
1101
  }), e;
1023
- }, pt = (s) => {
1102
+ }, Ct = (s) => {
1024
1103
  if (typeof s == "string")
1025
- return a.TransactionOutputBuilder.new().with_address(H(s));
1026
- let e = a.TransactionOutputBuilder.new().with_address(H(s.address));
1104
+ return i.TransactionOutputBuilder.new().with_address(H(s));
1105
+ let e = i.TransactionOutputBuilder.new().with_address(H(s.address));
1027
1106
  if (s.datum) {
1028
- const { value: t, inline: i } = s.datum, r = Z(t);
1029
- e = e.with_data_hash(a.hash_plutus_data(r)), i && (e = e.with_plutus_data(r));
1107
+ const { value: t, inline: r } = s.datum, a = Z(t);
1108
+ e = e.with_data_hash(i.hash_plutus_data(a)), r && (e = e.with_plutus_data(a));
1030
1109
  }
1031
1110
  if (s.script) {
1032
- const t = dt(s.script);
1111
+ const t = lt(s.script);
1033
1112
  e = e.with_script_ref(t);
1034
1113
  }
1035
1114
  return e;
1036
1115
  }, ot = (s) => {
1037
- const e = s.slice(0, N), t = s.includes(".") ? S(s.split(".")[1]) : s.slice(N);
1116
+ const e = s.slice(0, F), t = s.includes(".") ? Q(s.split(".")[1]) : s.slice(F);
1038
1117
  return { policyId: e, assetName: t };
1039
- }, d = (s) => j.isAxiosError(s) ? s.response ? JSON.stringify({
1118
+ }, I = (s) => j.isAxiosError(s) ? s.response ? JSON.stringify({
1040
1119
  data: s.response.data,
1041
1120
  headers: s.response.headers,
1042
1121
  status: s.response.status
1043
- }) : s.request ? JSON.stringify(s.request) : s.message : JSON.stringify(s), si = (s) => {
1122
+ }) : s.request ? JSON.stringify(s.request) : s.message : JSON.stringify(s), cr = (s) => {
1044
1123
  const e = Z(s);
1045
- return a.hash_plutus_data(e).to_hex();
1046
- }, ii = (s, e = Date.now()) => {
1047
- if (Et[s]) {
1048
- const [t, i, r, n] = Et[s];
1049
- return parseInt(a.BigNum.from_str(e.toString()).div_floor(a.BigNum.from_str("1000")).checked_sub(a.BigNum.from_str(r)).div_floor(a.BigNum.from_str(n)).checked_add(a.BigNum.from_str(t)).to_str(), 10);
1124
+ return i.hash_plutus_data(e).to_hex();
1125
+ }, Ar = (s, e = Date.now()) => {
1126
+ if (xt[s]) {
1127
+ const [t, r, a, n] = xt[s];
1128
+ return parseInt(i.BigNum.from_str(e.toString()).div_floor(i.BigNum.from_str("1000")).checked_sub(i.BigNum.from_str(a)).div_floor(i.BigNum.from_str(n)).checked_add(i.BigNum.from_str(t)).to_str(), 10);
1050
1129
  }
1051
1130
  throw new Error(`Couldn't resolve EpochNo for network: ${s}`);
1052
- }, Ls = (s, e) => bs.fromParts(f(s), f(e)).fingerprint(), ri = (s, e) => ts[s][e], ai = (s) => Dt(s).hash().to_hex(), st = (s) => {
1131
+ }, Ws = (s, e) => Hs.fromParts(g(s), g(e)).fingerprint(), ur = (s, e) => ss[s][e], hr = (s) => Dt(s).hash().to_hex(), st = (s) => {
1053
1132
  var e, t;
1054
1133
  try {
1055
- const i = [
1056
- (e = Mt(s)) == null ? void 0 : e.payment_cred().to_keyhash(),
1057
- (t = Ne(s)) == null ? void 0 : t.payment_cred().to_keyhash()
1058
- ].find((r) => r !== void 0);
1059
- if (i !== void 0)
1060
- return i.to_hex();
1134
+ const r = [
1135
+ (e = Vt(s)) == null ? void 0 : e.payment_cred().to_keyhash(),
1136
+ (t = Pe(s)) == null ? void 0 : t.payment_cred().to_keyhash()
1137
+ ].find((a) => a !== void 0);
1138
+ if (r !== void 0)
1139
+ return r.to_hex();
1061
1140
  throw new Error(`Couldn't resolve payment key hash from address: ${s}`);
1062
- } catch (i) {
1063
- throw new Error(`An error occurred during resolvePaymentKeyHash: ${i}.`);
1141
+ } catch (r) {
1142
+ throw new Error(`An error occurred during resolvePaymentKeyHash: ${r}.`);
1064
1143
  }
1065
- }, ni = (s, e = 0) => {
1144
+ }, dr = (s, e = 0) => {
1066
1145
  const t = nt(s.code, s.version);
1067
- return a.EnterpriseAddress.new(e, a.StakeCredential.from_scripthash(t.hash())).to_address().to_bech32();
1068
- }, oi = (s) => {
1146
+ return i.EnterpriseAddress.new(e, i.StakeCredential.from_scripthash(t.hash())).to_address().to_bech32();
1147
+ }, Ir = (s) => {
1069
1148
  try {
1070
- const e = Ne(s), t = e == null ? void 0 : e.payment_cred().to_scripthash();
1149
+ const e = Pe(s), t = e == null ? void 0 : e.payment_cred().to_scripthash();
1071
1150
  if (t !== void 0)
1072
1151
  return t.to_hex();
1073
1152
  throw new Error(`Couldn't resolve script hash from address: ${s}`);
1074
1153
  } catch (e) {
1075
1154
  throw new Error(`An error occurred during resolveScriptHash: ${e}.`);
1076
1155
  }
1077
- }, ci = (s) => a.Ed25519KeyHash.from_hex(s).to_bech32("pool1"), Ai = (s) => {
1078
- const e = Ce(s.join(" ")), t = Ve(e), i = t.to_bech32();
1079
- return t.free(), i;
1080
- }, hi = (s) => dt(s).to_hex(), ui = (s, e = Date.now()) => {
1081
- if (Et[s]) {
1082
- const [t, i, r] = Et[s];
1083
- return a.BigNum.from_str(e.toString()).div_floor(a.BigNum.from_str("1000")).checked_sub(a.BigNum.from_str(r)).checked_add(a.BigNum.from_str(i)).to_str();
1156
+ }, lr = (s) => i.Ed25519KeyHash.from_hex(s).to_bech32("pool1"), fr = (s) => {
1157
+ const e = ye(s.join(" ")), t = Ye(e), r = t.to_bech32();
1158
+ return t.free(), r;
1159
+ }, gr = (s) => lt(s).to_hex(), _r = (s, e = Date.now()) => {
1160
+ if (xt[s]) {
1161
+ const [t, r, a] = xt[s];
1162
+ return i.BigNum.from_str(e.toString()).div_floor(i.BigNum.from_str("1000")).checked_sub(i.BigNum.from_str(a)).checked_add(i.BigNum.from_str(r)).to_str();
1084
1163
  }
1085
1164
  throw new Error(`Couldn't resolve SlotNo for network: ${s}`);
1086
- }, Ot = (s) => {
1165
+ }, Gt = (s) => {
1087
1166
  try {
1088
- const e = H(s), t = Mt(s), i = t == null ? void 0 : t.stake_cred().to_keyhash();
1089
- if (i !== void 0)
1090
- return Ft(e.network_id(), i).to_address().to_bech32();
1167
+ const e = H(s), t = Vt(s), r = t == null ? void 0 : t.stake_cred().to_keyhash();
1168
+ if (r !== void 0)
1169
+ return Ft(e.network_id(), r).to_address().to_bech32();
1091
1170
  throw new Error(`Couldn't resolve reward address from address: ${s}`);
1092
1171
  } catch (e) {
1093
1172
  throw new Error(`An error occurred during resolveRewardAddress: ${e}.`);
1094
1173
  }
1095
- }, ht = (s) => {
1174
+ }, ut = (s) => {
1096
1175
  var e, t;
1097
1176
  try {
1098
- const i = [
1099
- (e = Mt(s)) == null ? void 0 : e.stake_cred().to_keyhash(),
1100
- (t = He(s)) == null ? void 0 : t.payment_cred().to_keyhash()
1101
- ].find((r) => r !== void 0);
1102
- if (i !== void 0)
1103
- return i.to_hex();
1177
+ const r = [
1178
+ (e = Vt(s)) == null ? void 0 : e.stake_cred().to_keyhash(),
1179
+ (t = Te(s)) == null ? void 0 : t.payment_cred().to_keyhash()
1180
+ ].find((a) => a !== void 0);
1181
+ if (r !== void 0)
1182
+ return r.to_hex();
1104
1183
  throw new Error(`Couldn't resolve stake key hash from address: ${s}`);
1105
- } catch (i) {
1106
- throw new Error(`An error occurred during resolveStakeKeyHash: ${i}.`);
1184
+ } catch (r) {
1185
+ throw new Error(`An error occurred during resolveStakeKeyHash: ${r}.`);
1107
1186
  }
1108
- }, Ye = (s, e = Y.minFeeA, t = Y.minFeeB) => (BigInt(e) * BigInt(s) + BigInt(t)).toString(), $s = (s) => {
1109
- const e = W(s).body();
1110
- return a.hash_transaction(e).to_hex();
1111
- }, Ii = (s = "", e = 32) => {
1187
+ }, Re = (s, e = G.minFeeA, t = G.minFeeB) => (BigInt(e) * BigInt(s) + BigInt(t)).toString(), js = (s) => {
1188
+ const e = Y(s).body();
1189
+ return i.hash_transaction(e).to_hex();
1190
+ }, pr = (s = "", e = 32) => {
1112
1191
  if (e <= 0 || e > 2048)
1113
1192
  throw new Error("Length must be bewteen 1 and 2048");
1114
- const i = pe("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789")(e);
1115
- return S(`${s}${i}`);
1116
- }, Ge = (s, e) => {
1193
+ const r = we("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789")(e);
1194
+ return Q(`${s}${r}`);
1195
+ }, Le = (s, e) => {
1117
1196
  const t = s.vkeys();
1118
1197
  if (t !== void 0) {
1119
- const i = /* @__PURE__ */ new Set();
1198
+ const r = /* @__PURE__ */ new Set();
1120
1199
  for (let n = 0; n < t.len(); n += 1)
1121
- i.add(t.get(n).to_hex());
1200
+ r.add(t.get(n).to_hex());
1122
1201
  for (let n = 0; n < e.len(); n += 1)
1123
- i.add(e.get(n).to_hex());
1124
- const r = a.Vkeywitnesses.new();
1125
- return i.forEach((n) => {
1126
- r.add(a.Vkeywitness.from_hex(n));
1127
- }), r;
1202
+ r.add(e.get(n).to_hex());
1203
+ const a = i.Vkeywitnesses.new();
1204
+ return r.forEach((n) => {
1205
+ a.add(i.Vkeywitness.from_hex(n));
1206
+ }), a;
1128
1207
  }
1129
1208
  return e;
1130
- };
1131
- class di {
1209
+ }, Cr = (s) => mt(Fe(s)), wr = (s) => Y(s).to_js_value();
1210
+ class yr {
1132
1211
  _axiosInstance;
1133
1212
  constructor(...e) {
1134
1213
  if (typeof e[0] == "string" && e[0].startsWith("http"))
1135
1214
  this._axiosInstance = j.create({ baseURL: e[0] });
1136
1215
  else {
1137
- const t = e[0], i = t.slice(0, 7);
1216
+ const t = e[0], r = t.slice(0, 7);
1138
1217
  this._axiosInstance = j.create({
1139
- baseURL: `https://cardano-${i}.blockfrost.io/api/v${e[1] ?? 0}`,
1218
+ baseURL: `https://cardano-${r}.blockfrost.io/api/v${e[1] ?? 0}`,
1140
1219
  headers: { project_id: t }
1141
1220
  });
1142
1221
  }
1143
1222
  }
1144
1223
  async fetchAccountInfo(e) {
1145
- const t = e.startsWith("addr") ? Ot(e) : e;
1224
+ const t = e.startsWith("addr") ? Gt(e) : e;
1146
1225
  try {
1147
- const { data: i, status: r } = await this._axiosInstance.get(`accounts/${t}`);
1148
- if (r === 200)
1226
+ const { data: r, status: a } = await this._axiosInstance.get(`accounts/${t}`);
1227
+ if (a === 200)
1149
1228
  return {
1150
- poolId: i.pool_id,
1151
- active: i.active || i.active_epoch !== null,
1152
- balance: i.controlled_amount,
1153
- rewards: i.withdrawable_amount,
1154
- withdrawals: i.withdrawals_sum
1229
+ poolId: r.pool_id,
1230
+ active: r.active || r.active_epoch !== null,
1231
+ balance: r.controlled_amount,
1232
+ rewards: r.withdrawable_amount,
1233
+ withdrawals: r.withdrawals_sum
1155
1234
  };
1156
- throw d(i);
1157
- } catch (i) {
1158
- throw d(i);
1235
+ throw I(r);
1236
+ } catch (r) {
1237
+ throw I(r);
1159
1238
  }
1160
1239
  }
1161
1240
  async fetchAddressUTxOs(e, t) {
1162
- const i = t !== void 0 ? `/${t}` : "", r = `addresses/${e}/utxos` + i, n = async (A = 1, h = []) => {
1163
- const { data: I, status: u } = await this._axiosInstance.get(`${r}?page=${A}`);
1164
- if (u === 200)
1165
- return I.length > 0 ? n(A + 1, [...h, ...await Promise.all(I.map(c))]) : h;
1166
- throw d(I);
1241
+ const r = t !== void 0 ? `/${t}` : "", a = `addresses/${e}/utxos` + r, n = async (A = 1, u = []) => {
1242
+ const { data: d, status: h } = await this._axiosInstance.get(`${a}?page=${A}`);
1243
+ if (h === 200)
1244
+ return d.length > 0 ? n(A + 1, [...u, ...await Promise.all(d.map(c))]) : u;
1245
+ throw I(d);
1167
1246
  }, o = async (A) => {
1168
1247
  if (A) {
1169
- const { data: h, status: I } = await this._axiosInstance.get(`scripts/${A}`);
1170
- if (I === 200) {
1171
- const u = h.type.startsWith("plutus") ? {
1248
+ const { data: u, status: d } = await this._axiosInstance.get(`scripts/${A}`);
1249
+ if (d === 200) {
1250
+ const h = u.type.startsWith("plutus") ? {
1172
1251
  code: await this.fetchPlutusScriptCBOR(A),
1173
- version: h.type.replace("plutus", "")
1252
+ version: u.type.replace("plutus", "")
1174
1253
  } : await this.fetchNativeScriptJSON(A);
1175
- return dt(u).to_hex();
1254
+ return lt(h).to_hex();
1176
1255
  }
1177
- throw d(h);
1256
+ throw I(u);
1178
1257
  }
1179
1258
  }, c = async (A) => ({
1180
1259
  input: {
@@ -1196,11 +1275,11 @@ class di {
1196
1275
  }
1197
1276
  }
1198
1277
  async fetchAssetAddresses(e) {
1199
- const t = async (i = 1, r = []) => {
1200
- const { policyId: n, assetName: o } = ot(e), { data: c, status: A } = await this._axiosInstance.get(`assets/${n}${o}/addresses?page=${i}`);
1278
+ const t = async (r = 1, a = []) => {
1279
+ const { policyId: n, assetName: o } = ot(e), { data: c, status: A } = await this._axiosInstance.get(`assets/${n}${o}/addresses?page=${r}`);
1201
1280
  if (A === 200)
1202
- return c.length > 0 ? t(i + 1, [...r, ...c]) : r;
1203
- throw d(c);
1281
+ return c.length > 0 ? t(r + 1, [...a, ...c]) : a;
1282
+ throw I(c);
1204
1283
  };
1205
1284
  try {
1206
1285
  return await t();
@@ -1210,20 +1289,20 @@ class di {
1210
1289
  }
1211
1290
  async fetchAssetMetadata(e) {
1212
1291
  try {
1213
- const { policyId: t, assetName: i } = ot(e), { data: r, status: n } = await this._axiosInstance.get(`assets/${t}${i}`);
1292
+ const { policyId: t, assetName: r } = ot(e), { data: a, status: n } = await this._axiosInstance.get(`assets/${t}${r}`);
1214
1293
  if (n === 200)
1215
1294
  return {
1216
- ...r.onchain_metadata
1295
+ ...a.onchain_metadata
1217
1296
  };
1218
- throw d(r);
1297
+ throw I(a);
1219
1298
  } catch (t) {
1220
- throw d(t);
1299
+ throw I(t);
1221
1300
  }
1222
1301
  }
1223
1302
  async fetchBlockInfo(e) {
1224
1303
  try {
1225
- const { data: t, status: i } = await this._axiosInstance.get(`blocks/${e}`);
1226
- if (i === 200)
1304
+ const { data: t, status: r } = await this._axiosInstance.get(`blocks/${e}`);
1305
+ if (r === 200)
1227
1306
  return {
1228
1307
  confirmations: t.confirmations,
1229
1308
  epoch: t.epoch,
@@ -1241,25 +1320,41 @@ class di {
1241
1320
  txCount: t.tx_count,
1242
1321
  VRFKey: t.block_vrf
1243
1322
  };
1244
- throw d(t);
1323
+ throw I(t);
1245
1324
  } catch (t) {
1246
- throw d(t);
1325
+ throw I(t);
1326
+ }
1327
+ }
1328
+ async fetchCollectionAssets(e, t = 1) {
1329
+ try {
1330
+ const { data: r, status: a } = await this._axiosInstance.get(`assets/policy/${e}?page=${t}`);
1331
+ if (a === 200)
1332
+ return {
1333
+ assets: r.map((n) => ({
1334
+ unit: n.asset,
1335
+ quantity: n.quantity
1336
+ })),
1337
+ next: r.length === 100 ? t + 1 : null
1338
+ };
1339
+ throw I(r);
1340
+ } catch {
1341
+ return { assets: [], next: null };
1247
1342
  }
1248
1343
  }
1249
1344
  async fetchHandleAddress(e) {
1250
1345
  try {
1251
- const t = S(e.replace("$", "")), { data: i, status: r } = await this._axiosInstance.get(`assets/${Ht[1]}${t}/addresses`);
1252
- if (r === 200)
1253
- return i[0].address;
1254
- throw d(i);
1346
+ const t = Q(e.replace("$", "")), { data: r, status: a } = await this._axiosInstance.get(`assets/${Pt[1]}${t}/addresses`);
1347
+ if (a === 200)
1348
+ return r[0].address;
1349
+ throw I(r);
1255
1350
  } catch (t) {
1256
- throw d(t);
1351
+ throw I(t);
1257
1352
  }
1258
1353
  }
1259
1354
  async fetchProtocolParameters(e = Number.NaN) {
1260
1355
  try {
1261
- const { data: t, status: i } = await this._axiosInstance.get(`epochs/${isNaN(e) ? "latest" : e}/parameters`);
1262
- if (i === 200)
1356
+ const { data: t, status: r } = await this._axiosInstance.get(`epochs/${isNaN(e) ? "latest" : e}/parameters`);
1357
+ if (r === 200)
1263
1358
  return {
1264
1359
  coinsPerUTxOSize: t.coins_per_utxo_word,
1265
1360
  collateralPercent: t.collateral_percent,
@@ -1282,15 +1377,15 @@ class di {
1282
1377
  priceMem: t.price_mem,
1283
1378
  priceStep: t.price_step
1284
1379
  };
1285
- throw d(t);
1380
+ throw I(t);
1286
1381
  } catch (t) {
1287
- throw d(t);
1382
+ throw I(t);
1288
1383
  }
1289
1384
  }
1290
1385
  async fetchTxInfo(e) {
1291
1386
  try {
1292
- const { data: t, status: i } = await this._axiosInstance.get(`txs/${e}`);
1293
- if (i === 200)
1387
+ const { data: t, status: r } = await this._axiosInstance.get(`txs/${e}`);
1388
+ if (r === 200)
1294
1389
  return {
1295
1390
  block: t.block,
1296
1391
  deposit: t.deposit,
@@ -1302,69 +1397,69 @@ class di {
1302
1397
  slot: t.slot.toString(),
1303
1398
  size: t.size
1304
1399
  };
1305
- throw d(t);
1400
+ throw I(t);
1306
1401
  } catch (t) {
1307
- throw d(t);
1402
+ throw I(t);
1308
1403
  }
1309
1404
  }
1310
- onTxConfirmed(e, t, i = 20) {
1311
- let r = 0;
1405
+ onTxConfirmed(e, t, r = 20) {
1406
+ let a = 0;
1312
1407
  const n = setInterval(() => {
1313
- r >= i && clearInterval(n), this.fetchTxInfo(e).then((o) => {
1408
+ a >= r && clearInterval(n), this.fetchTxInfo(e).then((o) => {
1314
1409
  this.fetchBlockInfo(o.block).then((c) => {
1315
1410
  (c == null ? void 0 : c.confirmations) > 0 && (clearInterval(n), t());
1316
1411
  }).catch(() => {
1317
- r += 1;
1412
+ a += 1;
1318
1413
  });
1319
1414
  }).catch(() => {
1320
- r += 1;
1415
+ a += 1;
1321
1416
  });
1322
1417
  }, 5e3);
1323
1418
  }
1324
1419
  async submitTx(e) {
1325
1420
  try {
1326
- const t = { "Content-Type": "application/cbor" }, { data: i, status: r } = await this._axiosInstance.post("tx/submit", f(e), { headers: t });
1327
- if (r === 200)
1328
- return i;
1329
- throw d(i);
1421
+ const t = { "Content-Type": "application/cbor" }, { data: r, status: a } = await this._axiosInstance.post("tx/submit", g(e), { headers: t });
1422
+ if (a === 200)
1423
+ return r;
1424
+ throw I(r);
1330
1425
  } catch (t) {
1331
- throw d(t);
1426
+ throw I(t);
1332
1427
  }
1333
1428
  }
1334
1429
  async fetchPlutusScriptCBOR(e) {
1335
- const { data: t, status: i } = await this._axiosInstance.get(`scripts/${e}/cbor`);
1336
- if (i === 200)
1430
+ const { data: t, status: r } = await this._axiosInstance.get(`scripts/${e}/cbor`);
1431
+ if (r === 200)
1337
1432
  return t.cbor;
1338
- throw d(t);
1433
+ throw I(t);
1339
1434
  }
1340
1435
  async fetchNativeScriptJSON(e) {
1341
- const { data: t, status: i } = await this._axiosInstance.get(`scripts/${e}/json`);
1342
- if (i === 200)
1436
+ const { data: t, status: r } = await this._axiosInstance.get(`scripts/${e}/json`);
1437
+ if (r === 200)
1343
1438
  return t.json;
1344
- throw d(t);
1439
+ throw I(t);
1345
1440
  }
1346
1441
  }
1347
- class li {
1442
+ class mr {
1348
1443
  _axiosInstance;
1349
- constructor(e, t, i) {
1350
- const r = i.host ?? "ipfs.infura.io", n = i.port ?? 5001, o = i.version ?? 0;
1444
+ constructor(e, t, r) {
1445
+ const a = r.host ?? "ipfs.infura.io", n = r.port ?? 5001, o = r.version ?? 0;
1351
1446
  this._axiosInstance = j.create({
1352
- baseURL: `https://${r}:${n}/api/v${o}`,
1447
+ baseURL: `https://${a}:${n}/api/v${o}`,
1353
1448
  auth: { username: e, password: t }
1354
1449
  });
1355
1450
  }
1356
1451
  async uploadContent(e, t = !1) {
1357
1452
  try {
1358
- const i = { "Content-Type": "multipart/form-data" }, { data: r, status: n } = await this._axiosInstance.post(`add?recursive=${t}`, e, { headers: i });
1453
+ const r = { "Content-Type": "multipart/form-data" }, { data: a, status: n } = await this._axiosInstance.post(`add?recursive=${t}`, e, { headers: r });
1359
1454
  if (n === 200)
1360
- return r;
1361
- throw d(r);
1362
- } catch (i) {
1363
- throw d(i);
1455
+ return a;
1456
+ throw I(a);
1457
+ } catch (r) {
1458
+ throw I(r);
1364
1459
  }
1365
1460
  }
1366
1461
  }
1367
- class gi {
1462
+ class Er {
1368
1463
  _axiosInstance;
1369
1464
  constructor(...e) {
1370
1465
  typeof e[0] == "string" && e[0].startsWith("http") ? this._axiosInstance = j.create({ baseURL: e[0] }) : this._axiosInstance = j.create({
@@ -1373,34 +1468,34 @@ class gi {
1373
1468
  }
1374
1469
  async fetchAccountInfo(e) {
1375
1470
  try {
1376
- const t = e.startsWith("addr") ? Ot(e) : e, { data: i, status: r } = await this._axiosInstance.post("account_info", { _stake_addresses: [t] });
1377
- if (r === 200)
1471
+ const t = e.startsWith("addr") ? Gt(e) : e, { data: r, status: a } = await this._axiosInstance.post("account_info", { _stake_addresses: [t] });
1472
+ if (a === 200)
1378
1473
  return {
1379
- poolId: i[0].delegated_pool,
1380
- active: i[0].status === "registered",
1381
- balance: i[0].total_balance.toString(),
1382
- rewards: i[0].rewards_available,
1383
- withdrawals: i[0].withdrawals
1474
+ poolId: r[0].delegated_pool,
1475
+ active: r[0].status === "registered",
1476
+ balance: r[0].total_balance.toString(),
1477
+ rewards: r[0].rewards_available,
1478
+ withdrawals: r[0].withdrawals
1384
1479
  };
1385
- throw d(i);
1480
+ throw I(r);
1386
1481
  } catch (t) {
1387
- throw d(t);
1482
+ throw I(t);
1388
1483
  }
1389
1484
  }
1390
1485
  async fetchAddressUTxOs(e, t) {
1391
- const i = (r) => {
1392
- if (r) {
1393
- const n = r.type.startsWith("plutus") ? {
1394
- code: r.bytes,
1395
- version: r.type.replace("plutus", "")
1396
- } : vt(St(r.bytes));
1397
- return dt(n).to_hex();
1486
+ const r = (a) => {
1487
+ if (a) {
1488
+ const n = a.type.startsWith("plutus") ? {
1489
+ code: a.bytes,
1490
+ version: a.type.replace("plutus", "")
1491
+ } : vt(bt(a.bytes));
1492
+ return lt(n).to_hex();
1398
1493
  }
1399
1494
  };
1400
1495
  try {
1401
- const { data: r, status: n } = await this._axiosInstance.post("address_info", { _addresses: [e] });
1496
+ const { data: a, status: n } = await this._axiosInstance.post("address_info", { _addresses: [e] });
1402
1497
  if (n === 200) {
1403
- const o = r.flatMap((c) => c.utxo_set).map((c) => {
1498
+ const o = a.flatMap((c) => c.utxo_set).map((c) => {
1404
1499
  var A;
1405
1500
  return {
1406
1501
  input: {
@@ -1411,53 +1506,53 @@ class gi {
1411
1506
  address: e,
1412
1507
  amount: [
1413
1508
  { unit: "lovelace", quantity: c.value },
1414
- ...c.asset_list.map((h) => ({
1415
- unit: `${h.policy_id}${h.asset_name}`,
1416
- quantity: `${h.quantity}`
1509
+ ...c.asset_list.map((u) => ({
1510
+ unit: `${u.policy_id}${u.asset_name}`,
1511
+ quantity: `${u.quantity}`
1417
1512
  }))
1418
1513
  ],
1419
1514
  dataHash: c.datum_hash ?? void 0,
1420
1515
  plutusData: ((A = c.inline_datum) == null ? void 0 : A.bytes) ?? void 0,
1421
- scriptRef: i(c.reference_script)
1516
+ scriptRef: r(c.reference_script)
1422
1517
  }
1423
1518
  };
1424
1519
  });
1425
1520
  return t !== void 0 ? o.filter((c) => c.output.amount.find((A) => A.unit === t) !== void 0) : o;
1426
1521
  }
1427
- throw d(r);
1522
+ throw I(a);
1428
1523
  } catch {
1429
1524
  return [];
1430
1525
  }
1431
1526
  }
1432
1527
  async fetchAssetAddresses(e) {
1433
1528
  try {
1434
- const { policyId: t, assetName: i } = ot(e), { data: r, status: n } = await this._axiosInstance.get(`asset_address_list?_asset_policy=${t}&_asset_name=${i}`);
1529
+ const { policyId: t, assetName: r } = ot(e), { data: a, status: n } = await this._axiosInstance.get(`asset_address_list?_asset_policy=${t}&_asset_name=${r}`);
1435
1530
  if (n === 200)
1436
- return r.map((o) => ({
1531
+ return a.map((o) => ({
1437
1532
  address: o.payment_address,
1438
1533
  quantity: o.quantity
1439
1534
  }));
1440
- throw d(r);
1535
+ throw I(a);
1441
1536
  } catch (t) {
1442
- throw d(t);
1537
+ throw I(t);
1443
1538
  }
1444
1539
  }
1445
1540
  async fetchAssetMetadata(e) {
1446
1541
  try {
1447
- const { policyId: t, assetName: i } = ot(e), { data: r, status: n } = await this._axiosInstance.get(`asset_info?_asset_policy=${t}&_asset_name=${i}`);
1542
+ const { policyId: t, assetName: r } = ot(e), { data: a, status: n } = await this._axiosInstance.get(`asset_info?_asset_policy=${t}&_asset_name=${r}`);
1448
1543
  if (n === 200)
1449
1544
  return {
1450
- ...r[0].minting_tx_metadata[721][t][Vt(i)]
1545
+ ...a[0].minting_tx_metadata[721][t][Yt(r)]
1451
1546
  };
1452
- throw d(r);
1547
+ throw I(a);
1453
1548
  } catch (t) {
1454
- throw d(t);
1549
+ throw I(t);
1455
1550
  }
1456
1551
  }
1457
1552
  async fetchBlockInfo(e) {
1458
1553
  try {
1459
- const { data: t, status: i } = await this._axiosInstance.post("block_info", { _block_hashes: [e] });
1460
- if (i === 200)
1554
+ const { data: t, status: r } = await this._axiosInstance.post("block_info", { _block_hashes: [e] });
1555
+ if (r === 200)
1461
1556
  return {
1462
1557
  confirmations: t[0].num_confirmations,
1463
1558
  epoch: t[0].epoch_no,
@@ -1475,25 +1570,41 @@ class gi {
1475
1570
  txCount: t[0].tx_count,
1476
1571
  VRFKey: t[0].vrf_key
1477
1572
  };
1478
- throw d(t);
1573
+ throw I(t);
1479
1574
  } catch (t) {
1480
- throw d(t);
1575
+ throw I(t);
1576
+ }
1577
+ }
1578
+ async fetchCollectionAssets(e, t = 0) {
1579
+ try {
1580
+ const { data: r, status: a } = await this._axiosInstance.get(`asset_policy_info?_asset_policy=${e}&limit=100&offset=${t}`);
1581
+ if (a === 200)
1582
+ return {
1583
+ assets: r.map((n) => ({
1584
+ unit: `${e}${n.asset_name}`,
1585
+ quantity: n.total_supply
1586
+ })),
1587
+ next: r.length === 100 ? t + 100 : null
1588
+ };
1589
+ throw I(r);
1590
+ } catch (r) {
1591
+ throw I(r);
1481
1592
  }
1482
1593
  }
1483
1594
  async fetchHandleAddress(e) {
1484
1595
  try {
1485
- const t = S(e.replace("$", "")), { data: i, status: r } = await this._axiosInstance.get(`asset_address_list?_asset_policy=${Ht[1]}&_asset_name=${t}`);
1486
- if (r === 200)
1487
- return i[0].payment_address;
1488
- throw d(i);
1596
+ const t = Q(e.replace("$", "")), { data: r, status: a } = await this._axiosInstance.get(`asset_address_list?_asset_policy=${Pt[1]}&_asset_name=${t}`);
1597
+ if (a === 200)
1598
+ return r[0].payment_address;
1599
+ throw I(r);
1489
1600
  } catch (t) {
1490
- throw d(t);
1601
+ throw I(t);
1491
1602
  }
1492
1603
  }
1493
1604
  async fetchProtocolParameters(e) {
1494
1605
  try {
1495
- const { data: t, status: i } = await this._axiosInstance.get(`epoch_params?_epoch_no=${e}`);
1496
- if (i === 200)
1606
+ const { data: t, status: r } = await this._axiosInstance.get(`epoch_params?_epoch_no=${e}`);
1607
+ if (r === 200)
1497
1608
  return {
1498
1609
  coinsPerUTxOSize: t[0].coins_per_utxo_size,
1499
1610
  collateralPercent: t[0].collateral_percent,
@@ -1516,104 +1627,104 @@ class gi {
1516
1627
  priceMem: t[0].price_mem,
1517
1628
  priceStep: t[0].price_step
1518
1629
  };
1519
- throw d(t);
1630
+ throw I(t);
1520
1631
  } catch (t) {
1521
- throw d(t);
1632
+ throw I(t);
1522
1633
  }
1523
1634
  }
1524
1635
  async fetchTxInfo(e) {
1525
- var t, i;
1636
+ var t, r;
1526
1637
  try {
1527
- const { data: r, status: n } = await this._axiosInstance.post("tx_info", { _tx_hashes: [e] });
1638
+ const { data: a, status: n } = await this._axiosInstance.post("tx_info", { _tx_hashes: [e] });
1528
1639
  if (n === 200)
1529
1640
  return {
1530
- block: r[0].block_hash,
1531
- deposit: r[0].deposit,
1532
- fees: r[0].fee,
1533
- hash: r[0].tx_hash,
1534
- index: r[0].tx_block_index,
1535
- invalidAfter: ((t = r[0].invalid_after) == null ? void 0 : t.toString()) ?? "",
1536
- invalidBefore: ((i = r[0].invalid_before) == null ? void 0 : i.toString()) ?? "",
1537
- slot: r[0].absolute_slot.toString(),
1538
- size: r[0].tx_size
1641
+ block: a[0].block_hash,
1642
+ deposit: a[0].deposit,
1643
+ fees: a[0].fee,
1644
+ hash: a[0].tx_hash,
1645
+ index: a[0].tx_block_index,
1646
+ invalidAfter: ((t = a[0].invalid_after) == null ? void 0 : t.toString()) ?? "",
1647
+ invalidBefore: ((r = a[0].invalid_before) == null ? void 0 : r.toString()) ?? "",
1648
+ slot: a[0].absolute_slot.toString(),
1649
+ size: a[0].tx_size
1539
1650
  };
1540
- throw d(r);
1541
- } catch (r) {
1542
- throw d(r);
1651
+ throw I(a);
1652
+ } catch (a) {
1653
+ throw I(a);
1543
1654
  }
1544
1655
  }
1545
- onTxConfirmed(e, t, i = 20) {
1546
- let r = 0;
1656
+ onTxConfirmed(e, t, r = 20) {
1657
+ let a = 0;
1547
1658
  const n = setInterval(() => {
1548
- r >= i && clearInterval(n), this.fetchTxInfo(e).then((o) => {
1659
+ a >= r && clearInterval(n), this.fetchTxInfo(e).then((o) => {
1549
1660
  this.fetchBlockInfo(o.block).then((c) => {
1550
1661
  (c == null ? void 0 : c.confirmations) > 0 && (clearInterval(n), t());
1551
1662
  }).catch(() => {
1552
- r += 1;
1663
+ a += 1;
1553
1664
  });
1554
1665
  }).catch(() => {
1555
- r += 1;
1666
+ a += 1;
1556
1667
  });
1557
1668
  }, 5e3);
1558
1669
  }
1559
1670
  async submitTx(e) {
1560
1671
  try {
1561
- const t = { "Content-Type": "application/cbor" }, { data: i, status: r } = await this._axiosInstance.post("submittx", f(e), { headers: t });
1562
- if (r === 202)
1563
- return i;
1564
- throw d(i);
1672
+ const t = { "Content-Type": "application/cbor" }, { data: r, status: a } = await this._axiosInstance.post("submittx", g(e), { headers: t });
1673
+ if (a === 202)
1674
+ return r;
1675
+ throw I(r);
1565
1676
  } catch (t) {
1566
- throw d(t);
1677
+ throw I(t);
1567
1678
  }
1568
1679
  }
1569
1680
  }
1570
- class fi {
1681
+ class Br {
1571
1682
  _baseUrl;
1572
1683
  constructor(...e) {
1573
- this._baseUrl = Xe(e[0]) ? es[e[0]] : e[0];
1684
+ this._baseUrl = ts(e[0]) ? rs[e[0]] : e[0];
1574
1685
  }
1575
1686
  async evaluateTx(e) {
1576
1687
  const t = await this.open();
1577
1688
  return this.send(t, "EvaluateTx", {
1578
1689
  evaluate: e
1579
- }), new Promise((i, r) => {
1690
+ }), new Promise((r, a) => {
1580
1691
  t.addEventListener("message", (n) => {
1581
1692
  try {
1582
1693
  const { result: o } = JSON.parse(n.data);
1583
- o.EvaluationResult ? i(Object.keys(o.EvaluationResult).map((c) => ({
1694
+ o.EvaluationResult ? r(Object.keys(o.EvaluationResult).map((c) => ({
1584
1695
  index: parseInt(c.split(":")[1], 10),
1585
1696
  tag: c.split(":")[0].toUpperCase(),
1586
1697
  budget: {
1587
1698
  mem: o.EvaluationResult[c].memory,
1588
1699
  steps: o.EvaluationResult[c].steps
1589
1700
  }
1590
- }))) : r(o.EvaluationFailure), t.close();
1701
+ }))) : a(o.EvaluationFailure), t.close();
1591
1702
  } catch (o) {
1592
- r(o);
1703
+ a(o);
1593
1704
  }
1594
1705
  }, { once: !0 });
1595
1706
  });
1596
1707
  }
1597
1708
  async onNextTx(e) {
1598
1709
  const t = await this.open();
1599
- return this.send(t, "AwaitAcquire", {}), t.addEventListener("message", (i) => {
1600
- const { result: r } = JSON.parse(i.data);
1601
- if (r === null)
1710
+ return this.send(t, "AwaitAcquire", {}), t.addEventListener("message", (r) => {
1711
+ const { result: a } = JSON.parse(r.data);
1712
+ if (a === null)
1602
1713
  return this.send(t, "AwaitAcquire", {});
1603
- r.AwaitAcquired === void 0 && e(r), this.send(t, "NextTx", {});
1714
+ a.AwaitAcquired === void 0 && e(a), this.send(t, "NextTx", {});
1604
1715
  }), () => t.close();
1605
1716
  }
1606
1717
  async submitTx(e) {
1607
1718
  const t = await this.open();
1608
1719
  return this.send(t, "SubmitTx", {
1609
1720
  submit: e
1610
- }), new Promise((i, r) => {
1721
+ }), new Promise((r, a) => {
1611
1722
  t.addEventListener("message", (n) => {
1612
1723
  try {
1613
1724
  const { result: o } = JSON.parse(n.data);
1614
- o.SubmitSuccess ? i(o.SubmitSuccess.txId) : r(o.SubmitFail), t.close();
1725
+ o.SubmitSuccess ? r(o.SubmitSuccess.txId) : a(o.SubmitFail), t.close();
1615
1726
  } catch (o) {
1616
- r(o);
1727
+ a(o);
1617
1728
  }
1618
1729
  }, { once: !0 });
1619
1730
  });
@@ -1624,97 +1735,97 @@ class fi {
1624
1735
  e.addEventListener("open", () => t(!0), { once: !0 });
1625
1736
  }), e;
1626
1737
  }
1627
- send(e, t, i) {
1738
+ send(e, t, r) {
1628
1739
  e.send(JSON.stringify({
1629
1740
  version: "1.0",
1630
1741
  type: "jsonwsp/request",
1631
1742
  servicename: "ogmios",
1632
1743
  methodname: t,
1633
- args: i
1744
+ args: r
1634
1745
  }));
1635
1746
  }
1636
1747
  }
1637
- class _i {
1748
+ class xr {
1638
1749
  _axiosInstance;
1639
- constructor(e, t, i, r = 1) {
1750
+ constructor(e, t, r, a = 1) {
1640
1751
  this._axiosInstance = j.create({
1641
- baseURL: `https://cardano-${e}.tangocrypto.com/${t}/v${r}`,
1642
- headers: { "x-api-key": i }
1752
+ baseURL: `https://cardano-${e}.tangocrypto.com/${t}/v${a}`,
1753
+ headers: { "x-api-key": r }
1643
1754
  });
1644
1755
  }
1645
1756
  async evaluateTx(e) {
1646
1757
  try {
1647
- const { data: t, status: i } = await this._axiosInstance.post("transactions/evaluate", { tx: e, utxos: [] });
1648
- if (i === 200)
1649
- return t.redeemers.map((r) => ({
1650
- index: r.index,
1651
- tag: r.purpose.toUpperCase(),
1758
+ const { data: t, status: r } = await this._axiosInstance.post("transactions/evaluate", { tx: e, utxos: [] });
1759
+ if (r === 200)
1760
+ return t.redeemers.map((a) => ({
1761
+ index: a.index,
1762
+ tag: a.purpose.toUpperCase(),
1652
1763
  budget: {
1653
- mem: r.unit_mem,
1654
- steps: r.unit_steps
1764
+ mem: a.unit_mem,
1765
+ steps: a.unit_steps
1655
1766
  }
1656
1767
  }));
1657
- throw d(t);
1768
+ throw I(t);
1658
1769
  } catch (t) {
1659
- throw d(t);
1770
+ throw I(t);
1660
1771
  }
1661
1772
  }
1662
1773
  async fetchAccountInfo(e) {
1663
1774
  try {
1664
- const t = e.startsWith("addr") ? Ot(e) : e, { data: i, status: r } = await this._axiosInstance.get(`wallets/${t}`);
1665
- if (r === 200)
1775
+ const t = e.startsWith("addr") ? Gt(e) : e, { data: r, status: a } = await this._axiosInstance.get(`wallets/${t}`);
1776
+ if (a === 200)
1666
1777
  return {
1667
- poolId: i.pool_id,
1668
- active: i.active,
1669
- balance: i.controlled_total_stake,
1670
- rewards: i.rewards_sum,
1671
- withdrawals: i.withdrawals_sum
1778
+ poolId: r.pool_id,
1779
+ active: r.active,
1780
+ balance: r.controlled_total_stake,
1781
+ rewards: r.rewards_sum,
1782
+ withdrawals: r.withdrawals_sum
1672
1783
  };
1673
- throw d(i);
1784
+ throw I(r);
1674
1785
  } catch (t) {
1675
- throw d(t);
1786
+ throw I(t);
1676
1787
  }
1677
1788
  }
1678
1789
  async fetchAddressUTxOs(e, t) {
1679
- const i = t !== void 0 ? `/assets/${t}` : "", r = `addresses/${e}${i}/utxos?size=50`, n = async (h = "", I = []) => {
1790
+ const r = t !== void 0 ? `/assets/${t}` : "", a = `addresses/${e}${r}/utxos?size=50`, n = async (u = "", d = []) => {
1680
1791
  var C;
1681
- const { data: u, status: g } = await this._axiosInstance.get(`${r}&cursor=${h}`);
1682
- if (g === 200)
1683
- return u.cursor !== null && ((C = u.cursor) == null ? void 0 : C.length) > 0 ? n(u.cursor, [...I, ...u.data.map(A)]) : u.data.map(A);
1684
- throw d(u);
1685
- }, o = (h, I) => {
1686
- const u = [{
1792
+ const { data: h, status: f } = await this._axiosInstance.get(`${a}&cursor=${u}`);
1793
+ if (f === 200)
1794
+ return h.cursor !== null && ((C = h.cursor) == null ? void 0 : C.length) > 0 ? n(h.cursor, [...d, ...h.data.map(A)]) : h.data.map(A);
1795
+ throw I(h);
1796
+ }, o = (u, d) => {
1797
+ const h = [{
1687
1798
  unit: "lovelace",
1688
- quantity: h.toString()
1799
+ quantity: u.toString()
1689
1800
  }];
1690
- return I.forEach((g) => {
1691
- const C = S(g.asset_name);
1692
- u.push({
1693
- unit: `${g.policy_id}${C}`,
1694
- quantity: g.quantity.toString()
1801
+ return d.forEach((f) => {
1802
+ const C = Q(f.asset_name);
1803
+ h.push({
1804
+ unit: `${f.policy_id}${C}`,
1805
+ quantity: f.quantity.toString()
1695
1806
  });
1696
- }), u;
1697
- }, c = (h) => {
1698
- if (h) {
1699
- const I = h.type.startsWith("plutus") ? {
1700
- code: h.code,
1701
- version: h.type.replace("plutus", "")
1702
- } : vt(St(h.json));
1703
- return dt(I).to_hex();
1807
+ }), h;
1808
+ }, c = (u) => {
1809
+ if (u) {
1810
+ const d = u.type.startsWith("plutus") ? {
1811
+ code: u.code,
1812
+ version: u.type.replace("plutus", "")
1813
+ } : vt(bt(u.json));
1814
+ return lt(d).to_hex();
1704
1815
  }
1705
- }, A = (h) => {
1706
- var I;
1816
+ }, A = (u) => {
1817
+ var d;
1707
1818
  return {
1708
1819
  input: {
1709
- outputIndex: h.index,
1710
- txHash: h.hash
1820
+ outputIndex: u.index,
1821
+ txHash: u.hash
1711
1822
  },
1712
1823
  output: {
1713
1824
  address: e,
1714
- amount: o(h.value, h.assets),
1825
+ amount: o(u.value, u.assets),
1715
1826
  dataHash: void 0,
1716
- plutusData: ((I = h.inline_datum) == null ? void 0 : I.value_raw) ?? void 0,
1717
- scriptRef: c(h.reference_script)
1827
+ plutusData: ((d = u.inline_datum) == null ? void 0 : d.value_raw) ?? void 0,
1828
+ scriptRef: c(u.reference_script)
1718
1829
  }
1719
1830
  };
1720
1831
  };
@@ -1725,18 +1836,18 @@ class _i {
1725
1836
  }
1726
1837
  }
1727
1838
  async fetchAssetAddresses(e) {
1728
- const t = (r) => ({
1729
- address: r.address,
1730
- quantity: r.quantity.toString()
1731
- }), i = async (r = "", n = []) => {
1732
- var I;
1733
- const { policyId: o, assetName: c } = ot(e), { data: A, status: h } = await this._axiosInstance.get(`assets/${o}${c}/addresses?size=100&cursor=${r}`);
1734
- if (h === 200)
1735
- return A.cursor !== null && ((I = A.cursor) == null ? void 0 : I.length) > 0 ? i(A.cursor, [...n, ...A.data.map(t)]) : A.data.map(t);
1736
- throw d(A);
1839
+ const t = (a) => ({
1840
+ address: a.address,
1841
+ quantity: a.quantity.toString()
1842
+ }), r = async (a = "", n = []) => {
1843
+ var d;
1844
+ const { policyId: o, assetName: c } = ot(e), { data: A, status: u } = await this._axiosInstance.get(`assets/${o}${c}/addresses?size=100&cursor=${a}`);
1845
+ if (u === 200)
1846
+ return A.cursor !== null && ((d = A.cursor) == null ? void 0 : d.length) > 0 ? r(A.cursor, [...n, ...A.data.map(t)]) : A.data.map(t);
1847
+ throw I(A);
1737
1848
  };
1738
1849
  try {
1739
- return await i();
1850
+ return await r();
1740
1851
  } catch {
1741
1852
  return [];
1742
1853
  }
@@ -1744,20 +1855,20 @@ class _i {
1744
1855
  async fetchAssetMetadata(e) {
1745
1856
  var t;
1746
1857
  try {
1747
- const { policyId: i, assetName: r } = ot(e), { data: n, status: o } = await this._axiosInstance.get(`assets/${i}${r}`);
1858
+ const { policyId: r, assetName: a } = ot(e), { data: n, status: o } = await this._axiosInstance.get(`assets/${r}${a}`);
1748
1859
  if (o === 200)
1749
1860
  return {
1750
- ...(t = n.metadata.find((c) => c.label === 721)) == null ? void 0 : t.json[i][Vt(r)]
1861
+ ...(t = n.metadata.find((c) => c.label === 721)) == null ? void 0 : t.json[r][Yt(a)]
1751
1862
  };
1752
- throw d(n);
1753
- } catch (i) {
1754
- throw d(i);
1863
+ throw I(n);
1864
+ } catch (r) {
1865
+ throw I(r);
1755
1866
  }
1756
1867
  }
1757
1868
  async fetchBlockInfo(e) {
1758
1869
  try {
1759
- const { data: t, status: i } = await this._axiosInstance.get(`blocks/${e}`);
1760
- if (i === 200)
1870
+ const { data: t, status: r } = await this._axiosInstance.get(`blocks/${e}`);
1871
+ if (r === 200)
1761
1872
  return {
1762
1873
  confirmations: t.confirmations,
1763
1874
  epoch: t.epoch_no,
@@ -1775,25 +1886,41 @@ class _i {
1775
1886
  txCount: t.tx_count,
1776
1887
  VRFKey: t.vrf_key
1777
1888
  };
1778
- throw d(t);
1889
+ throw I(t);
1779
1890
  } catch (t) {
1780
- throw d(t);
1891
+ throw I(t);
1892
+ }
1893
+ }
1894
+ async fetchCollectionAssets(e, t = "") {
1895
+ try {
1896
+ const { data: r, status: a } = await this._axiosInstance.get(`policies/${e}/assets?size=100&cursor=${t}`);
1897
+ if (a === 200)
1898
+ return {
1899
+ assets: r.data.map((n) => ({
1900
+ unit: `${n.policy_id}${n.asset_name}`,
1901
+ quantity: n.quantity
1902
+ })),
1903
+ next: r.cursor
1904
+ };
1905
+ throw I(r);
1906
+ } catch {
1907
+ return { assets: [], next: null };
1781
1908
  }
1782
1909
  }
1783
1910
  async fetchHandleAddress(e) {
1784
1911
  try {
1785
- const t = S(e.replace("$", "")), { data: i, status: r } = await this._axiosInstance.get(`assets/${Ht[1]}${t}/addresses`);
1786
- if (r === 200)
1787
- return i.data[0].address;
1788
- throw d(i);
1912
+ const t = Q(e.replace("$", "")), { data: r, status: a } = await this._axiosInstance.get(`assets/${Pt[1]}${t}/addresses`);
1913
+ if (a === 200)
1914
+ return r.data[0].address;
1915
+ throw I(r);
1789
1916
  } catch (t) {
1790
- throw d(t);
1917
+ throw I(t);
1791
1918
  }
1792
1919
  }
1793
1920
  async fetchProtocolParameters(e) {
1794
1921
  try {
1795
- const { data: t, status: i } = await this._axiosInstance.get(`epochs/${e}/parameters`);
1796
- if (i === 200)
1922
+ const { data: t, status: r } = await this._axiosInstance.get(`epochs/${e}/parameters`);
1923
+ if (r === 200)
1797
1924
  return {
1798
1925
  coinsPerUTxOSize: t.coins_per_utxo_size.toString(),
1799
1926
  collateralPercent: t.collateral_percent,
@@ -1816,15 +1943,15 @@ class _i {
1816
1943
  priceMem: t.price_mem,
1817
1944
  priceStep: t.price_step
1818
1945
  };
1819
- throw d(t);
1946
+ throw I(t);
1820
1947
  } catch (t) {
1821
- throw d(t);
1948
+ throw I(t);
1822
1949
  }
1823
1950
  }
1824
1951
  async fetchTxInfo(e) {
1825
1952
  try {
1826
- const { data: t, status: i } = await this._axiosInstance.get(`transactions/${e}`);
1827
- if (i === 200)
1953
+ const { data: t, status: r } = await this._axiosInstance.get(`transactions/${e}`);
1954
+ if (r === 200)
1828
1955
  return {
1829
1956
  block: t.block.hash,
1830
1957
  deposit: t.deposit,
@@ -1836,92 +1963,93 @@ class _i {
1836
1963
  slot: t.block.slot_no.toString(),
1837
1964
  size: t.size
1838
1965
  };
1839
- throw d(t);
1966
+ throw I(t);
1840
1967
  } catch (t) {
1841
- throw d(t);
1968
+ throw I(t);
1842
1969
  }
1843
1970
  }
1844
- onTxConfirmed(e, t, i = 20) {
1845
- let r = 0;
1971
+ onTxConfirmed(e, t, r = 20) {
1972
+ let a = 0;
1846
1973
  const n = setInterval(() => {
1847
- r >= i && clearInterval(n), this.fetchTxInfo(e).then((o) => {
1974
+ a >= r && clearInterval(n), this.fetchTxInfo(e).then((o) => {
1848
1975
  this.fetchBlockInfo(o.block).then((c) => {
1849
1976
  (c == null ? void 0 : c.confirmations) > 0 && (clearInterval(n), t());
1850
1977
  }).catch(() => {
1851
- r += 1;
1978
+ a += 1;
1852
1979
  });
1853
1980
  }).catch(() => {
1854
- r += 1;
1981
+ a += 1;
1855
1982
  });
1856
1983
  }, 5e3);
1857
1984
  }
1858
1985
  async submitTx(e) {
1859
1986
  try {
1860
- const t = { "Content-Type": "application/json" }, { data: i, status: r } = await this._axiosInstance.post("transactions/submit", { tx: e }, { headers: t });
1861
- if (r === 200)
1862
- return i.tx_id;
1863
- throw d(i);
1987
+ const t = { "Content-Type": "application/json" }, { data: r, status: a } = await this._axiosInstance.post("transactions/submit", { tx: e }, { headers: t });
1988
+ if (a === 200)
1989
+ return r.tx_id;
1990
+ throw I(r);
1864
1991
  } catch (t) {
1865
- throw d(t);
1992
+ throw I(t);
1866
1993
  }
1867
1994
  }
1868
1995
  }
1869
- class pi {
1996
+ class Qr {
1870
1997
  static withOneSignature(e) {
1871
- const t = F(st(e));
1872
- return _t(t).to_hex();
1998
+ const t = N(st(e));
1999
+ return pt(t).to_hex();
1873
2000
  }
1874
2001
  static withAtLeastNSignatures(e, t) {
1875
- const i = a.NativeScripts.new();
2002
+ const r = i.NativeScripts.new();
1876
2003
  e.forEach((n) => {
1877
- const o = F(st(n));
1878
- i.add(_t(o));
2004
+ const o = N(st(n));
2005
+ r.add(pt(o));
1879
2006
  });
1880
- const r = a.ScriptNOfK.new(t, i);
1881
- return a.NativeScript.new_script_any(r).to_hex();
2007
+ const a = i.ScriptNOfK.new(t, r);
2008
+ return i.NativeScript.new_script_any(a).to_hex();
1882
2009
  }
1883
2010
  static withAnySignature(e) {
1884
- const t = a.NativeScripts.new();
1885
- e.forEach((r) => {
1886
- const n = F(st(r));
1887
- t.add(_t(n));
2011
+ const t = i.NativeScripts.new();
2012
+ e.forEach((a) => {
2013
+ const n = N(st(a));
2014
+ t.add(pt(n));
1888
2015
  });
1889
- const i = a.ScriptAny.new(t);
1890
- return a.NativeScript.new_script_any(i).to_hex();
2016
+ const r = i.ScriptAny.new(t);
2017
+ return i.NativeScript.new_script_any(r).to_hex();
1891
2018
  }
1892
2019
  static withAllSignatures(e) {
1893
- const t = a.NativeScripts.new();
1894
- e.forEach((r) => {
1895
- const n = F(st(r));
1896
- t.add(_t(n));
2020
+ const t = i.NativeScripts.new();
2021
+ e.forEach((a) => {
2022
+ const n = N(st(a));
2023
+ t.add(pt(n));
1897
2024
  });
1898
- const i = a.ScriptAll.new(t);
1899
- return a.NativeScript.new_script_any(i).to_hex();
2025
+ const r = i.ScriptAll.new(t);
2026
+ return i.NativeScript.new_script_any(r).to_hex();
1900
2027
  }
1901
2028
  static fromNativeScript(e) {
1902
2029
  return Dt(e).to_hex();
1903
2030
  }
1904
2031
  }
1905
- function X(s, e, t, i) {
1906
- var r = arguments.length, n = r < 3 ? e : i === null ? i = Object.getOwnPropertyDescriptor(e, t) : i, o;
2032
+ function X(s, e, t, r) {
2033
+ var a = arguments.length, n = a < 3 ? e : r === null ? r = Object.getOwnPropertyDescriptor(e, t) : r, o;
1907
2034
  if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
1908
- n = Reflect.decorate(s, e, t, i);
2035
+ n = Reflect.decorate(s, e, t, r);
1909
2036
  else
1910
2037
  for (var c = s.length - 1; c >= 0; c--)
1911
- (o = s[c]) && (n = (r < 3 ? o(n) : r > 3 ? o(e, t, n) : o(e, t)) || n);
1912
- return r > 3 && n && Object.defineProperty(e, t, n), n;
2038
+ (o = s[c]) && (n = (a < 3 ? o(n) : a > 3 ? o(e, t, n) : o(e, t)) || n);
2039
+ return a > 3 && n && Object.defineProperty(e, t, n), n;
1913
2040
  }
1914
- const qs = (s) => class extends s {
2041
+ const Xs = (s) => class extends s {
1915
2042
  __visits = [];
1916
2043
  }, tt = () => function(s, e, t) {
1917
- const i = t.value;
1918
- t.value = function(...r) {
1919
- const n = i.call(this, ...r);
2044
+ const r = t.value;
2045
+ t.value = function(...a) {
2046
+ const n = r.call(this, ...a);
1920
2047
  return this.__visits && this.__visits.push(e), n;
1921
2048
  };
1922
2049
  };
1923
- let R = class {
2050
+ let L = class {
1924
2051
  _changeAddress;
2052
+ _txOutputs = /* @__PURE__ */ new Map();
1925
2053
  _recipients = /* @__PURE__ */ new Map();
1926
2054
  _totalBurns = /* @__PURE__ */ new Map();
1927
2055
  _totalMints = /* @__PURE__ */ new Map();
@@ -1934,29 +2062,29 @@ let R = class {
1934
2062
  _txInputsBuilder;
1935
2063
  _txWithdrawals;
1936
2064
  constructor(e = {}) {
1937
- this._era = e.era, this._initiator = e.initiator, this._mintBuilder = a.MintBuilder.new(), this._protocolParameters = e.parameters ?? Y, this._txBuilder = Rs(e.parameters), this._txCertificates = a.Certificates.new(), this._txInputsBuilder = a.TxInputsBuilder.new(), this._txWithdrawals = a.Withdrawals.new();
2065
+ this._era = e.era, this._initiator = e.initiator, this._mintBuilder = i.MintBuilder.new(), this._protocolParameters = e.parameters ?? G, this._txBuilder = Js(e.parameters), this._txCertificates = i.Certificates.new(), this._txInputsBuilder = i.TxInputsBuilder.new(), this._txWithdrawals = i.Withdrawals.new();
1938
2066
  }
1939
2067
  static maskMetadata(e, t = "BABBAGE") {
1940
2068
  var n;
1941
- const i = W(e), r = (n = i.auxiliary_data()) == null ? void 0 : n.metadata();
1942
- if (r !== void 0) {
1943
- const o = a.GeneralTransactionMetadata.new();
1944
- for (let A = 0; A < r.len(); A += 1) {
1945
- const h = r.keys().get(A), I = r.get(h);
1946
- o.insert(h, a.TransactionMetadatum.from_hex("0".repeat(((I == null ? void 0 : I.to_hex()) ?? "").length)));
2069
+ const r = Y(e), a = (n = r.auxiliary_data()) == null ? void 0 : n.metadata();
2070
+ if (a !== void 0) {
2071
+ const o = i.GeneralTransactionMetadata.new();
2072
+ for (let A = 0; A < a.len(); A += 1) {
2073
+ const u = a.keys().get(A), d = a.get(u);
2074
+ o.insert(u, i.TransactionMetadatum.from_hex("0".repeat(((d == null ? void 0 : d.to_hex()) ?? "").length)));
1947
2075
  }
1948
- const c = i.auxiliary_data();
1949
- return c !== void 0 && (c.set_metadata(o), c.set_prefer_alonzo_format(t === "ALONZO")), a.Transaction.new(i.body(), i.witness_set(), c).to_hex();
2076
+ const c = r.auxiliary_data();
2077
+ return c !== void 0 && (c.set_metadata(o), c.set_prefer_alonzo_format(t === "ALONZO")), i.Transaction.new(r.body(), r.witness_set(), c).to_hex();
1950
2078
  }
1951
2079
  return e;
1952
2080
  }
1953
2081
  static readMetadata(e) {
1954
- var i, r;
1955
- return ((r = (i = W(e).auxiliary_data()) == null ? void 0 : i.metadata()) == null ? void 0 : r.to_hex()) ?? "";
2082
+ var r, a;
2083
+ return ((a = (r = Y(e).auxiliary_data()) == null ? void 0 : r.metadata()) == null ? void 0 : a.to_hex()) ?? "";
1956
2084
  }
1957
- static writeMetadata(e, t, i = "BABBAGE") {
1958
- const r = W(e), n = r.auxiliary_data() ?? a.AuxiliaryData.new();
1959
- return n.set_metadata(a.GeneralTransactionMetadata.from_hex(t)), n.set_prefer_alonzo_format(i === "ALONZO"), a.Transaction.new(r.body(), r.witness_set(), n).to_hex();
2085
+ static writeMetadata(e, t, r = "BABBAGE") {
2086
+ const a = Y(e), n = a.auxiliary_data() ?? i.AuxiliaryData.new();
2087
+ return n.set_metadata(i.GeneralTransactionMetadata.from_hex(t)), n.set_prefer_alonzo_format(r === "ALONZO"), i.Transaction.new(a.body(), a.witness_set(), n).to_hex();
1960
2088
  }
1961
2089
  get size() {
1962
2090
  return this._txBuilder.full_size();
@@ -1968,40 +2096,40 @@ let R = class {
1968
2096
  throw new Error(`[Transaction] An error occurred during build: ${e}.`);
1969
2097
  }
1970
2098
  }
1971
- burnAsset(e, t, i) {
1972
- const r = this._totalBurns.has(t.unit) ? a.BigNum.from_str(this._totalBurns.get(t.unit) ?? "0").checked_add(a.BigNum.from_str(t.quantity)).to_str() : t.quantity;
1973
- return this._mintBuilder.add_asset(fe(e, i), a.AssetName.new(f(t.unit.slice(N))), a.Int.new_negative(a.BigNum.from_str(t.quantity))), this._totalBurns.set(t.unit, r), this;
2099
+ burnAsset(e, t, r) {
2100
+ const a = 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;
2101
+ return this._mintBuilder.add_asset(pe(e, r), i.AssetName.new(g(t.unit.slice(F))), i.Int.new_negative(i.BigNum.from_str(t.quantity))), this._totalBurns.set(t.unit, a), this;
1974
2102
  }
1975
2103
  delegateStake(e, t) {
1976
- const i = a.Certificate.new_stake_delegation(a.StakeDelegation.new(a.StakeCredential.from_keyhash(F(ht(e))), a.Ed25519KeyHash.from_bech32(t)));
1977
- return this._txCertificates.add(i), this;
2104
+ const r = i.Certificate.new_stake_delegation(i.StakeDelegation.new(i.StakeCredential.from_keyhash(N(ut(e))), i.Ed25519KeyHash.from_bech32(t)));
2105
+ return this._txCertificates.add(r), this;
1978
2106
  }
1979
2107
  deregisterStake(e) {
1980
- const t = a.Certificate.new_stake_deregistration(a.StakeDeregistration.new(a.StakeCredential.from_keyhash(F(ht(e)))));
2108
+ const t = i.Certificate.new_stake_deregistration(i.StakeDeregistration.new(i.StakeCredential.from_keyhash(N(ut(e)))));
1981
2109
  return this._txCertificates.add(t), this;
1982
2110
  }
1983
- mintAsset(e, t, i) {
1984
- var h, I;
1985
- const r = (u, g) => {
1986
- const C = typeof u == "string" ? St(u).hash().to_hex() : n(u).hash().to_hex(), x = S(g.assetName);
2111
+ mintAsset(e, t, r) {
2112
+ var u, d;
2113
+ const a = (h, f) => {
2114
+ const C = typeof h == "string" ? bt(h).hash().to_hex() : n(h).hash().to_hex(), x = Q(f.assetName);
1987
2115
  return {
1988
2116
  unit: `${C}${x}`,
1989
- quantity: g.assetQuantity
2117
+ quantity: f.assetQuantity
1990
2118
  };
1991
- }, n = (u) => {
1992
- if ("code" in u)
1993
- return nt(u.code, u.version);
1994
- const g = O(u);
1995
- if (g.output().has_script_ref()) {
1996
- const C = g.output().script_ref();
2119
+ }, n = (h) => {
2120
+ if ("code" in h)
2121
+ return nt(h.code, h.version);
2122
+ const f = V(h);
2123
+ if (f.output().has_script_ref()) {
2124
+ const C = f.output().script_ref();
1997
2125
  if (C.is_plutus_script()) {
1998
- const x = Te(C);
2126
+ const x = Oe(C);
1999
2127
  return nt(x.code, x.version);
2000
2128
  }
2001
2129
  }
2002
- throw new Error(`No plutus script reference found in UTxO: ${g.input().transaction_id().to_hex()}`);
2003
- }, o = r(e, t), A = a.BigNum.from_str(((h = this._totalMints.get(o.unit)) == null ? void 0 : h.assetQuantity) ?? "0").checked_add(a.BigNum.from_str(o.quantity));
2004
- return this._mintBuilder.add_asset(fe(e, i), a.AssetName.new(f(S(t.assetName))), a.Int.new(a.BigNum.from_str(o.quantity))), this._recipients.has(t.recipient) ? (I = this._recipients.get(t.recipient)) == null || I.push(o) : this._recipients.set(t.recipient, [o]), this._totalMints.set(o.unit, {
2130
+ throw new Error(`No plutus script reference found in UTxO: ${f.input().transaction_id().to_hex()}`);
2131
+ }, o = a(e, t), A = i.BigNum.from_str(((u = this._totalMints.get(o.unit)) == null ? void 0 : u.assetQuantity) ?? "0").checked_add(i.BigNum.from_str(o.quantity));
2132
+ return this._mintBuilder.add_asset(pe(e, r), i.AssetName.new(g(Q(t.assetName))), i.Int.new(i.BigNum.from_str(o.quantity))), this._recipients.has(t.recipient) ? (d = this._recipients.get(t.recipient)) == null || d.push(o) : this._recipients.set(t.recipient, [o]), this._totalMints.set(o.unit, {
2005
2133
  ...t,
2006
2134
  assetQuantity: A.to_str()
2007
2135
  }), this;
@@ -2009,78 +2137,91 @@ let R = class {
2009
2137
  redeemValue(e) {
2010
2138
  const t = {
2011
2139
  tag: "SPEND",
2012
- budget: me,
2140
+ budget: Be,
2013
2141
  index: this._txInputsBuilder.inputs().len(),
2014
2142
  data: {
2015
2143
  alternative: 0,
2016
2144
  fields: []
2017
2145
  },
2018
2146
  ...e.redeemer
2019
- }, i = O(e.value), r = a.PlutusWitness.new_with_ref(Oe(e.script), Gs(e.datum), Pe(t));
2020
- return this._txInputsBuilder.add_plutus_script_input(r, i.input(), i.output().amount()), this;
2147
+ }, r = V(e.value), a = i.PlutusWitness.new_with_ref(Ge(e.script), zs(e.datum), Me(t));
2148
+ return this._txInputsBuilder.add_plutus_script_input(a, r.input(), r.output().amount()), this;
2021
2149
  }
2022
2150
  registerStake(e) {
2023
- const t = a.Certificate.new_stake_registration(a.StakeRegistration.new(a.StakeCredential.from_keyhash(F(ht(e)))));
2151
+ const t = i.Certificate.new_stake_registration(i.StakeRegistration.new(i.StakeCredential.from_keyhash(N(ut(e)))));
2024
2152
  return this._txCertificates.add(t), this;
2025
2153
  }
2026
2154
  registerPool(e) {
2027
- const t = a.Certificate.new_pool_registration(a.PoolRegistration.new(Os(e)));
2155
+ const t = i.Certificate.new_pool_registration(i.PoolRegistration.new($s(e)));
2028
2156
  return this._txCertificates.add(t), this;
2029
2157
  }
2030
2158
  retirePool(e, t) {
2031
- const i = a.Certificate.new_pool_retirement(a.PoolRetirement.new(a.Ed25519KeyHash.from_bech32(e), t));
2032
- return this._txCertificates.add(i), this;
2159
+ const r = i.Certificate.new_pool_retirement(i.PoolRetirement.new(i.Ed25519KeyHash.from_bech32(e), t));
2160
+ return this._txCertificates.add(r), this;
2033
2161
  }
2034
2162
  sendAssets(e, t) {
2035
- const i = yt(t), r = i.multiasset();
2036
- if (i.is_zero() || r === void 0)
2163
+ const r = Et(t), a = r.multiasset();
2164
+ if (r.is_zero() || a === void 0)
2037
2165
  return this;
2038
- const n = pt(e).next(), o = i.coin().is_zero() ? n.with_asset_and_min_required_coin_by_utxo_cost(r, le(this._protocolParameters.coinsPerUTxOSize)).build() : n.with_coin_and_asset(i.coin(), r).build();
2039
- return this._txBuilder.add_output(o), this;
2166
+ const n = Ct(e).next(), o = r.coin().is_zero() ? n.with_asset_and_min_required_coin_by_utxo_cost(a, ge(this._protocolParameters.coinsPerUTxOSize)).build() : n.with_coin_and_asset(r.coin(), a).build();
2167
+ return t.forEach((c) => {
2168
+ this.setTxOutput(c);
2169
+ }), this._txBuilder.add_output(o), this;
2040
2170
  }
2041
2171
  sendLovelace(e, t) {
2042
- const r = pt(e).next().with_coin(a.BigNum.from_str(t)).build();
2043
- return this._txBuilder.add_output(r), this;
2172
+ const a = Ct(e).next().with_coin(i.BigNum.from_str(t)).build();
2173
+ return this.setTxOutput({
2174
+ unit: "lovelace",
2175
+ quantity: t
2176
+ }), this._txBuilder.add_output(a), this;
2177
+ }
2178
+ sendToken(e, t, r) {
2179
+ return this.sendAssets(e, [{
2180
+ quantity: r,
2181
+ unit: as[t]
2182
+ }]), this;
2044
2183
  }
2045
2184
  sendValue(e, t) {
2046
- const i = yt(t.output.amount), n = pt(e).next().with_value(i).build();
2047
- return this._txBuilder.add_output(n), this;
2185
+ const r = Et(t.output.amount), n = Ct(e).next().with_value(r).build();
2186
+ return t.output.amount.forEach((o) => {
2187
+ this.setTxOutput(o);
2188
+ }), this._txBuilder.add_output(n), this;
2048
2189
  }
2049
2190
  setChangeAddress(e) {
2050
2191
  return this._changeAddress = H(e), this;
2051
2192
  }
2052
2193
  setCollateral(e) {
2053
- const t = _e(e);
2194
+ const t = Ce(e);
2054
2195
  return this._txBuilder.set_collateral(t), this;
2055
2196
  }
2056
2197
  setMetadata(e, t) {
2057
- return this._txBuilder.add_json_metadatum_with_schema(a.BigNum.from_str(e.toString()), JSON.stringify(t), a.MetadataJsonSchema.NoConversions), this;
2198
+ return this._txBuilder.add_json_metadatum_with_schema(i.BigNum.from_str(e.toString()), JSON.stringify(t), i.MetadataJsonSchema.NoConversions), this;
2058
2199
  }
2059
2200
  setRequiredSigners(e) {
2060
- return Array.from(new Set(e.map((i) => i.startsWith("addr") ? st(i) : ht(i)).map((i) => F(i)))).forEach((i) => {
2061
- this._txBuilder.add_required_signer(i);
2201
+ return Array.from(new Set(e.map((r) => r.startsWith("addr") ? st(r) : ut(r)).map((r) => N(r)))).forEach((r) => {
2202
+ this._txBuilder.add_required_signer(r);
2062
2203
  }), this;
2063
2204
  }
2064
2205
  setTimeToStart(e) {
2065
- return this._txBuilder.set_validity_start_interval_bignum(a.BigNum.from_str(e)), this;
2206
+ return this._txBuilder.set_validity_start_interval_bignum(i.BigNum.from_str(e)), this;
2066
2207
  }
2067
2208
  setTimeToExpire(e) {
2068
- return this._txBuilder.set_ttl_bignum(a.BigNum.from_str(e)), this;
2209
+ return this._txBuilder.set_ttl_bignum(i.BigNum.from_str(e)), this;
2069
2210
  }
2070
2211
  setTxInputs(e) {
2071
- return e.map((t) => O(t)).forEach((t) => {
2212
+ return e.map((t) => V(t)).forEach((t) => {
2072
2213
  this._txInputsBuilder.add_input(t.output().address(), t.input(), t.output().amount());
2073
2214
  }), this;
2074
2215
  }
2075
2216
  withdrawRewards(e, t) {
2076
- const i = He(e);
2077
- return i !== void 0 && this._txWithdrawals.insert(i, a.BigNum.from_str(t)), this;
2217
+ const r = Te(e);
2218
+ return r !== void 0 && this._txWithdrawals.insert(r, i.BigNum.from_str(t)), this;
2078
2219
  }
2079
2220
  async addBurnInputsIfNeeded() {
2080
2221
  if (this._initiator && this._totalBurns.size > 0 && this.notVisited("setTxInputs")) {
2081
2222
  const e = await this._initiator.getUsedUTxOs();
2082
- is(this._totalBurns, e.map((i) => Qt(i))).map((i) => O(i)).forEach((i) => {
2083
- this._txInputsBuilder.add_input(i.output().address(), i.input(), i.output().amount());
2223
+ ns(this._totalBurns, e.map((r) => St(r))).map((r) => V(r)).forEach((r) => {
2224
+ this._txInputsBuilder.add_input(r.output().address(), r.input(), r.output().amount());
2084
2225
  });
2085
2226
  }
2086
2227
  }
@@ -2094,75 +2235,66 @@ let R = class {
2094
2235
  async addCollateralIfNeeded() {
2095
2236
  if (this._initiator && this.notVisited("setCollateral")) {
2096
2237
  const e = await this._initiator.getUsedCollateral();
2097
- this._txBuilder.set_collateral(_e(e));
2238
+ this._txBuilder.set_collateral(Ce(e));
2098
2239
  }
2099
2240
  }
2100
2241
  async addRequiredSignersIfNeeded() {
2101
2242
  if (this._initiator && this.notVisited("setRequiredSigners")) {
2102
2243
  const e = await this._initiator.getUsedAddress(), t = st(e.to_bech32());
2103
- this._txBuilder.add_required_signer(F(t));
2244
+ this._txBuilder.add_required_signer(N(t));
2104
2245
  }
2105
2246
  }
2106
2247
  async addTxInputsAsNeeded() {
2107
- if (this._txBuilder.set_inputs(this._txInputsBuilder), (this._mintBuilder.has_native_scripts() || this._mintBuilder.has_plutus_scripts()) && this._txBuilder.set_mint_builder(this._mintBuilder), this._txCertificates.len() > 0 && this._txBuilder.set_certs(this._txCertificates), this._txWithdrawals.len() > 0 && this._txBuilder.set_withdrawals(this._txWithdrawals), this.notVisited("setTxInputs")) {
2108
- const e = !this.notVisited("mintAsset") || !this.notVisited("sendAssets") || !this.notVisited("sendValue"), t = await this.selectLovelaceUTxOs(!1), i = await this.filterAvailableUTxOs(t), r = e ? a.CoinSelectionStrategyCIP2.LargestFirstMultiAsset : a.CoinSelectionStrategyCIP2.LargestFirst;
2109
- this._txBuilder.add_inputs_from(i, r);
2248
+ if (this.notVisited("setTxInputs")) {
2249
+ const e = await this.filterAvailableUTxOs();
2250
+ is(this._txOutputs, e.map((r) => St(r))).map((r) => V(r)).forEach((r) => {
2251
+ this._txInputsBuilder.add_input(r.output().address(), r.input(), r.output().amount());
2252
+ });
2110
2253
  }
2111
- if (this._txBuilder.get_mint_builder() || this.notVisited("redeemValue") === !1) {
2112
- const e = this._era !== void 0 ? zt[this._era] : zt.BABBAGE;
2254
+ if (this._txBuilder.set_inputs(this._txInputsBuilder), (this._mintBuilder.has_native_scripts() || this._mintBuilder.has_plutus_scripts()) && this._txBuilder.set_mint_builder(this._mintBuilder), this._txCertificates.len() > 0 && this._txBuilder.set_certs(this._txCertificates), this._txWithdrawals.len() > 0 && this._txBuilder.set_withdrawals(this._txWithdrawals), this._txBuilder.get_mint_builder() || this.notVisited("redeemValue") === !1) {
2255
+ const e = this._era !== void 0 ? Wt[this._era] : Wt.BABBAGE;
2113
2256
  this._txBuilder.calc_script_data_hash(e);
2114
2257
  }
2115
2258
  }
2116
2259
  async forgeAssetsIfNeeded() {
2117
- const e = (t, i) => {
2118
- const r = t.data.assetName, n = t.data.metadata, o = t.unit.slice(0, N);
2119
- if (i && i[o]) {
2120
- const { [o]: c, ...A } = i, h = {
2121
- [r]: n,
2260
+ const e = (t, r) => {
2261
+ const a = t.data.assetName, n = t.data.metadata, o = t.unit.slice(0, F);
2262
+ if (r && r[o]) {
2263
+ const { [o]: c, ...A } = r, u = {
2264
+ [a]: n,
2122
2265
  ...c
2123
2266
  };
2124
2267
  return {
2125
2268
  [o]: {
2126
- ...h
2269
+ ...u
2127
2270
  },
2128
2271
  ...A
2129
2272
  };
2130
2273
  }
2131
- return i !== void 0 ? {
2274
+ return r !== void 0 ? {
2132
2275
  [o]: {
2133
- [r]: n
2276
+ [a]: n
2134
2277
  },
2135
- ...i
2278
+ ...r
2136
2279
  } : {
2137
- [o]: { [r]: n }
2280
+ [o]: { [a]: n }
2138
2281
  };
2139
2282
  };
2140
2283
  await this.addBurnInputsIfNeeded(), Array.from(this._totalMints, (t) => ({
2141
2284
  unit: t[0],
2142
2285
  data: t[1]
2143
- })).reduce((t, i) => t.set(i.data.label, e(i, t.get(i.data.label))), /* @__PURE__ */ new Map()).forEach((t, i) => {
2144
- this._txBuilder.add_json_metadatum(a.BigNum.from_str(i), JSON.stringify(t));
2286
+ })).reduce((t, r) => t.set(r.data.label, e(r, t.get(r.data.label))), /* @__PURE__ */ new Map()).forEach((t, r) => {
2287
+ this._txBuilder.add_json_metadatum(i.BigNum.from_str(r), JSON.stringify(t));
2145
2288
  }), this.addMintOutputs();
2146
2289
  }
2147
2290
  async filterAvailableUTxOs(e = []) {
2148
- const t = a.TransactionUnspentOutputs.new();
2149
- return this._initiator === void 0 || (await this._initiator.getUsedUTxOs()).filter((r) => e.find((n) => n.input.txHash === r.input().transaction_id().to_hex()) === void 0).forEach((r) => {
2150
- t.add(r);
2151
- }), t;
2152
- }
2153
- async selectLovelaceUTxOs(e) {
2154
- if (this._initiator === void 0 || e === !1)
2155
- return [];
2156
- const t = await this._initiator.getUsedUTxOs(), i = ss("5000000", t.map((n) => Qt(n)));
2157
- return i.map((n) => O(n)).forEach((n) => {
2158
- this._txBuilder.add_input(n.output().address(), n.input(), n.output().amount());
2159
- }), i;
2291
+ return this._initiator === void 0 ? [] : (await this._initiator.getUsedUTxOs()).filter((r) => e.find((a) => a.input.txHash === r.input().transaction_id().to_hex()) === void 0);
2160
2292
  }
2161
2293
  addMintOutputs() {
2162
2294
  this._recipients.forEach((e, t) => {
2163
- const r = yt(e).multiasset();
2164
- if (r !== void 0) {
2165
- const o = pt(t).next().with_asset_and_min_required_coin_by_utxo_cost(r, le(this._protocolParameters.coinsPerUTxOSize)).build();
2295
+ const a = Et(e).multiasset();
2296
+ if (a !== void 0) {
2297
+ const o = Ct(t).next().with_asset_and_min_required_coin_by_utxo_cost(a, ge(this._protocolParameters.coinsPerUTxOSize)).build();
2166
2298
  this._txBuilder.add_output(o);
2167
2299
  }
2168
2300
  });
@@ -2170,31 +2302,35 @@ let R = class {
2170
2302
  notVisited(e) {
2171
2303
  return this.__visits.includes(e) === !1;
2172
2304
  }
2305
+ setTxOutput(e) {
2306
+ const r = i.BigNum.from_str(this._txOutputs.get(e.unit) ?? "0").checked_add(i.BigNum.from_str(e.quantity)).to_str();
2307
+ this._txOutputs.set(e.unit, r);
2308
+ }
2173
2309
  };
2174
2310
  X([
2175
2311
  tt()
2176
- ], R.prototype, "mintAsset", null);
2312
+ ], L.prototype, "mintAsset", null);
2177
2313
  X([
2178
2314
  tt()
2179
- ], R.prototype, "redeemValue", null);
2315
+ ], L.prototype, "redeemValue", null);
2180
2316
  X([
2181
2317
  tt()
2182
- ], R.prototype, "sendAssets", null);
2318
+ ], L.prototype, "sendAssets", null);
2183
2319
  X([
2184
2320
  tt()
2185
- ], R.prototype, "sendValue", null);
2321
+ ], L.prototype, "sendValue", null);
2186
2322
  X([
2187
2323
  tt()
2188
- ], R.prototype, "setCollateral", null);
2324
+ ], L.prototype, "setCollateral", null);
2189
2325
  X([
2190
2326
  tt()
2191
- ], R.prototype, "setRequiredSigners", null);
2327
+ ], L.prototype, "setRequiredSigners", null);
2192
2328
  X([
2193
2329
  tt()
2194
- ], R.prototype, "setTxInputs", null);
2195
- R = X([
2196
- qs
2197
- ], R);
2330
+ ], L.prototype, "setTxInputs", null);
2331
+ L = X([
2332
+ Xs
2333
+ ], L);
2198
2334
  class y {
2199
2335
  _networkId;
2200
2336
  _encryptedSecret;
@@ -2202,8 +2338,8 @@ class y {
2202
2338
  this._networkId = e, this._encryptedSecret = t;
2203
2339
  }
2204
2340
  getAccount(e, t) {
2205
- return this.accountContext(e, t, (i, r) => {
2206
- const n = de(this._networkId, i.to_public().hash(), r.to_public().hash()).to_address().to_bech32(), o = ge(this._networkId, i.to_public().hash()).to_address().to_bech32(), c = Ft(this._networkId, r.to_public().hash()).to_address().to_bech32();
2341
+ return this.accountContext(e, t, (r, a) => {
2342
+ const n = fe(this._networkId, r.to_public().hash(), a.to_public().hash()).to_address().to_bech32(), o = _e(this._networkId, r.to_public().hash()).to_address().to_bech32(), c = Ft(this._networkId, a.to_public().hash()).to_address().to_bech32();
2207
2343
  return {
2208
2344
  baseAddress: n,
2209
2345
  enterpriseAddress: o,
@@ -2211,178 +2347,178 @@ class y {
2211
2347
  };
2212
2348
  });
2213
2349
  }
2214
- signData(e, t, i, r) {
2350
+ signData(e, t, r, a) {
2215
2351
  try {
2216
2352
  return this.accountContext(e, t, (n, o) => {
2217
- const c = { payload: r }, A = {
2218
- address: y.resolveAddress(this._networkId, i, n, o),
2219
- key: i.startsWith("stake") ? o : n
2220
- }, { coseSign1: h, coseKey: I } = ns(c, A);
2221
- return { signature: h, key: I };
2353
+ const c = { payload: a }, A = {
2354
+ address: y.resolveAddress(this._networkId, r, n, o),
2355
+ key: r.startsWith("stake") ? o : n
2356
+ }, { coseSign1: u, coseKey: d } = ds(c, A);
2357
+ return { signature: u, key: d };
2222
2358
  });
2223
2359
  } catch (n) {
2224
2360
  throw new Error(`An error occurred during signData: ${n}.`);
2225
2361
  }
2226
2362
  }
2227
- signTx(e, t, i, r, n) {
2363
+ signTx(e, t, r, a, n) {
2228
2364
  try {
2229
- const o = Fe($s(r));
2365
+ const o = He(js(a));
2230
2366
  return this.accountContext(e, t, (c, A) => {
2231
- const h = a.Vkeywitnesses.new();
2232
- return y.resolveSigners(r, i, c.to_public().hash().to_hex()).forEach((u) => {
2233
- if (u === c.to_public().hash().to_hex())
2234
- h.add(a.make_vkey_witness(o, c));
2235
- else if (u === A.to_public().hash().to_hex())
2236
- h.add(a.make_vkey_witness(o, A));
2367
+ const u = i.Vkeywitnesses.new();
2368
+ return y.resolveSigners(a, r, c.to_public().hash().to_hex()).forEach((h) => {
2369
+ if (h === c.to_public().hash().to_hex())
2370
+ u.add(i.make_vkey_witness(o, c));
2371
+ else if (h === A.to_public().hash().to_hex())
2372
+ u.add(i.make_vkey_witness(o, A));
2237
2373
  else if (n === !1)
2238
- throw new Error(`Missing key witness for: ${u}`);
2239
- }), h;
2374
+ throw new Error(`Missing key witness for: ${h}`);
2375
+ }), u;
2240
2376
  });
2241
2377
  } catch (o) {
2242
2378
  throw new Error(`An error occurred during signTx: ${o}.`);
2243
2379
  }
2244
2380
  }
2245
2381
  static encryptMnemonic(e, t) {
2246
- const i = Ce(e.join(" ")), r = Ve(i), n = k(r.as_bytes());
2247
- return r.free(), y.encrypt(n, t);
2382
+ const r = ye(e.join(" ")), a = Ye(r), n = b(a.as_bytes());
2383
+ return a.free(), y.encrypt(n, t);
2248
2384
  }
2249
2385
  static encryptPrivateKey(e, t) {
2250
- const i = a.Bip32PrivateKey.from_bech32(e), r = k(i.as_bytes());
2251
- return i.free(), y.encrypt(r, t);
2386
+ const r = i.Bip32PrivateKey.from_bech32(e), a = b(r.as_bytes());
2387
+ return r.free(), y.encrypt(a, t);
2252
2388
  }
2253
- static encryptSigningKeys(e, t, i) {
2254
- const r = y.encrypt(e.slice(4), i), n = y.encrypt(t.slice(4), i);
2255
- return [r, n];
2389
+ static encryptSigningKeys(e, t, r) {
2390
+ const a = y.encrypt(e.slice(4), r), n = y.encrypt(t.slice(4), r);
2391
+ return [a, n];
2256
2392
  }
2257
2393
  static generateMnemonic(e = 256) {
2258
- return Le(e).split(" ");
2394
+ return qe(e).split(" ");
2259
2395
  }
2260
- accountContext(e, t, i) {
2261
- const { paymentKey: r, stakeKey: n } = y.resolveKeys(e, t, this._encryptedSecret), o = i(r, n);
2262
- return r.free(), n.free(), o;
2396
+ accountContext(e, t, r) {
2397
+ const { paymentKey: a, stakeKey: n } = y.resolveKeys(e, t, this._encryptedSecret), o = r(a, n);
2398
+ return a.free(), n.free(), o;
2263
2399
  }
2264
2400
  static decrypt(e, t) {
2265
2401
  try {
2266
- return a.decrypt_with_password(S(t), e);
2402
+ return i.decrypt_with_password(Q(t), e);
2267
2403
  } catch {
2268
2404
  throw new Error("The password is incorrect.");
2269
2405
  }
2270
2406
  }
2271
2407
  static encrypt(e, t) {
2272
- const i = pe("0123456789abcdef"), r = i(64), n = i(24);
2273
- return a.encrypt_with_password(S(t), r, n, e);
2408
+ const r = we("0123456789abcdef"), a = r(64), n = r(24);
2409
+ return i.encrypt_with_password(Q(t), a, n, e);
2274
2410
  }
2275
- static resolveAddress(e, t, i, r) {
2411
+ static resolveAddress(e, t, r, a) {
2276
2412
  const n = [
2277
- de(e, i.to_public().hash(), r.to_public().hash()),
2278
- ge(e, i.to_public().hash()),
2279
- Ft(e, r.to_public().hash())
2413
+ fe(e, r.to_public().hash(), a.to_public().hash()),
2414
+ _e(e, r.to_public().hash()),
2415
+ Ft(e, a.to_public().hash())
2280
2416
  ].find((o) => o.to_address().to_bech32() === t);
2281
2417
  if (n !== void 0)
2282
2418
  return n.to_address();
2283
2419
  throw new Error(`Address: ${t} doesn't belong to this account.`);
2284
2420
  }
2285
- static resolveKeys(e, t, i) {
2286
- if (typeof i == "string") {
2287
- const o = y.decrypt(i, t);
2288
- return ks(o, e);
2421
+ static resolveKeys(e, t, r) {
2422
+ if (typeof r == "string") {
2423
+ const o = y.decrypt(r, t);
2424
+ return Ps(o, e);
2289
2425
  }
2290
- const r = y.decrypt(i[0], t), n = y.decrypt(i[1], t);
2426
+ const a = y.decrypt(r[0], t), n = y.decrypt(r[1], t);
2291
2427
  return {
2292
- paymentKey: a.PrivateKey.from_hex(r),
2293
- stakeKey: a.PrivateKey.from_hex(n)
2428
+ paymentKey: i.PrivateKey.from_hex(a),
2429
+ stakeKey: i.PrivateKey.from_hex(n)
2294
2430
  };
2295
2431
  }
2296
- static resolveSigners(e, t, i) {
2297
- const r = (c) => {
2432
+ static resolveSigners(e, t, r) {
2433
+ const a = (c) => {
2298
2434
  const A = (_, B = [], m = 0) => {
2299
- var lt, ct, Yt, Gt, Rt;
2435
+ var ft, ct, Rt, Lt, $t;
2300
2436
  if (_ === void 0 || m >= _.len())
2301
2437
  return B;
2302
- const D = _.get(m), b = new Array();
2438
+ const D = _.get(m), k = new Array();
2303
2439
  switch (D.kind()) {
2304
- case a.CertificateKind.StakeDeregistration: {
2305
- const w = (lt = D.as_stake_deregistration()) == null ? void 0 : lt.stake_credential(), M = (w == null ? void 0 : w.kind()) === a.StakeCredKind.Key ? w.to_keyhash() : void 0;
2306
- M && b.push(M.to_hex());
2440
+ case i.CertificateKind.StakeDeregistration: {
2441
+ const w = (ft = D.as_stake_deregistration()) == null ? void 0 : ft.stake_credential(), M = (w == null ? void 0 : w.kind()) === i.StakeCredKind.Key ? w.to_keyhash() : void 0;
2442
+ M && k.push(M.to_hex());
2307
2443
  break;
2308
2444
  }
2309
- case a.CertificateKind.StakeDelegation: {
2310
- const w = (ct = D.as_stake_delegation()) == null ? void 0 : ct.stake_credential(), M = (w == null ? void 0 : w.kind()) === a.StakeCredKind.Key ? w.to_keyhash() : void 0;
2311
- M && b.push(M.to_hex());
2445
+ case i.CertificateKind.StakeDelegation: {
2446
+ const w = (ct = D.as_stake_delegation()) == null ? void 0 : ct.stake_credential(), M = (w == null ? void 0 : w.kind()) === i.StakeCredKind.Key ? w.to_keyhash() : void 0;
2447
+ M && k.push(M.to_hex());
2312
2448
  break;
2313
2449
  }
2314
- case a.CertificateKind.PoolRegistration: {
2315
- const w = (Yt = D.as_pool_registration()) == null ? void 0 : Yt.pool_params().pool_owners();
2316
- b.push(...I(w));
2450
+ case i.CertificateKind.PoolRegistration: {
2451
+ const w = (Rt = D.as_pool_registration()) == null ? void 0 : Rt.pool_params().pool_owners();
2452
+ k.push(...d(w));
2317
2453
  break;
2318
2454
  }
2319
- case a.CertificateKind.PoolRetirement: {
2320
- const w = (Gt = D.as_pool_retirement()) == null ? void 0 : Gt.pool_keyhash();
2321
- w && b.push(w.to_hex());
2455
+ case i.CertificateKind.PoolRetirement: {
2456
+ const w = (Lt = D.as_pool_retirement()) == null ? void 0 : Lt.pool_keyhash();
2457
+ w && k.push(w.to_hex());
2322
2458
  break;
2323
2459
  }
2324
- case a.CertificateKind.MoveInstantaneousRewardsCert: {
2325
- const w = (Rt = D.as_move_instantaneous_rewards_cert()) == null ? void 0 : Rt.move_instantaneous_reward().as_to_stake_creds();
2460
+ case i.CertificateKind.MoveInstantaneousRewardsCert: {
2461
+ const w = ($t = D.as_move_instantaneous_rewards_cert()) == null ? void 0 : $t.move_instantaneous_reward().as_to_stake_creds();
2326
2462
  if (w)
2327
2463
  for (let M = 0; M < w.len(); M += 1) {
2328
- const Lt = w.keys().get(M), $t = Lt.kind() === a.StakeCredKind.Key ? Lt.to_keyhash() : void 0;
2329
- $t && b.push($t.to_hex());
2464
+ const qt = w.keys().get(M), zt = qt.kind() === i.StakeCredKind.Key ? qt.to_keyhash() : void 0;
2465
+ zt && k.push(zt.to_hex());
2330
2466
  }
2331
2467
  break;
2332
2468
  }
2333
2469
  }
2334
- return A(_, [...B, ...b], m + 1);
2335
- }, h = (_, B = [], m = 0) => {
2470
+ return A(_, [...B, ...k], m + 1);
2471
+ }, u = (_, B = [], m = 0) => {
2336
2472
  if (_ === void 0 || m >= _.len())
2337
2473
  return B;
2338
- const D = _.get(m).index(), b = _.get(m).transaction_id(), lt = t.find((ct) => ct.input.outputIndex === D && ct.input.txHash === b.to_hex()) !== void 0 ? i : "OUR_PRINCESS_IS_IN_ANOTHER_CASTLE";
2339
- return h(_, [...B, lt], m + 1);
2340
- }, I = (_, B = [], m = 0) => _ === void 0 || m >= _.len() ? B : I(_, [...B, _.get(m).to_hex()], m + 1), u = (_, B = [], m = 0) => {
2474
+ const D = _.get(m).index(), k = _.get(m).transaction_id(), ft = t.find((ct) => ct.input.outputIndex === D && ct.input.txHash === k.to_hex()) !== void 0 ? r : "OUR_PRINCESS_IS_IN_ANOTHER_CASTLE";
2475
+ return u(_, [...B, ft], m + 1);
2476
+ }, d = (_, B = [], m = 0) => _ === void 0 || m >= _.len() ? B : d(_, [...B, _.get(m).to_hex()], m + 1), h = (_, B = [], m = 0) => {
2341
2477
  if (_ === void 0 || m >= _.len())
2342
2478
  return B;
2343
- const D = _.keys().get(m).payment_cred(), b = D.kind() === a.StakeCredKind.Key ? D.to_keyhash() : void 0;
2344
- return u(_, b ? [...B, b.to_hex()] : B, m + 1);
2345
- }, g = c.certs(), C = c.collateral(), x = c.inputs(), T = c.required_signers(), L = c.withdrawals();
2479
+ const D = _.keys().get(m).payment_cred(), k = D.kind() === i.StakeCredKind.Key ? D.to_keyhash() : void 0;
2480
+ return h(_, k ? [...B, k.to_hex()] : B, m + 1);
2481
+ }, f = c.certs(), C = c.collateral(), x = c.inputs(), T = c.required_signers(), $ = c.withdrawals();
2346
2482
  return [
2347
- ...A(g),
2348
- ...h(C),
2349
- ...h(x),
2350
- ...I(T),
2351
- ...u(L)
2483
+ ...A(f),
2484
+ ...u(C),
2485
+ ...u(x),
2486
+ ...d(T),
2487
+ ...h($)
2352
2488
  ];
2353
2489
  }, n = (c) => {
2354
- const A = (I, u = []) => {
2355
- var g, C, x, T;
2356
- if (I)
2357
- for (let L = 0; L < I.len(); L += 1) {
2358
- const _ = I.get(L);
2490
+ const A = (d, h = []) => {
2491
+ var f, C, x, T;
2492
+ if (d)
2493
+ for (let $ = 0; $ < d.len(); $ += 1) {
2494
+ const _ = d.get($);
2359
2495
  switch (_.kind()) {
2360
- case a.NativeScriptKind.ScriptPubkey: {
2361
- const B = (g = _.as_script_pubkey()) == null ? void 0 : g.addr_keyhash().to_hex();
2362
- return B ? [...u, B] : u;
2496
+ case i.NativeScriptKind.ScriptPubkey: {
2497
+ const B = (f = _.as_script_pubkey()) == null ? void 0 : f.addr_keyhash().to_hex();
2498
+ return B ? [...h, B] : h;
2363
2499
  }
2364
- case a.NativeScriptKind.ScriptAll:
2365
- return A((C = _.as_script_all()) == null ? void 0 : C.native_scripts(), u);
2366
- case a.NativeScriptKind.ScriptAny:
2367
- return A((x = _.as_script_any()) == null ? void 0 : x.native_scripts(), u);
2368
- case a.NativeScriptKind.ScriptNOfK:
2369
- return A((T = _.as_script_n_of_k()) == null ? void 0 : T.native_scripts(), u);
2500
+ case i.NativeScriptKind.ScriptAll:
2501
+ return A((C = _.as_script_all()) == null ? void 0 : C.native_scripts(), h);
2502
+ case i.NativeScriptKind.ScriptAny:
2503
+ return A((x = _.as_script_any()) == null ? void 0 : x.native_scripts(), h);
2504
+ case i.NativeScriptKind.ScriptNOfK:
2505
+ return A((T = _.as_script_n_of_k()) == null ? void 0 : T.native_scripts(), h);
2370
2506
  }
2371
2507
  }
2372
- return u;
2373
- }, h = c.native_scripts();
2508
+ return h;
2509
+ }, u = c.native_scripts();
2374
2510
  return [
2375
- ...A(h)
2511
+ ...A(u)
2376
2512
  ];
2377
- }, o = W(e);
2513
+ }, o = Y(e);
2378
2514
  return /* @__PURE__ */ new Set([
2379
- ...r(o.body()),
2515
+ ...a(o.body()),
2380
2516
  ...n(o.witness_set())
2381
2517
  ]);
2382
2518
  }
2383
2519
  }
2384
2520
  const K = "MARI0TIME";
2385
- class wi {
2521
+ class br {
2386
2522
  _fetcher;
2387
2523
  _submitter;
2388
2524
  _wallet;
@@ -2408,26 +2544,26 @@ class wi {
2408
2544
  const t = this._wallet.getAccount(e, K);
2409
2545
  return H(t.enterpriseAddress);
2410
2546
  }
2411
- getUsedCollateral(e = Y.maxCollateralInputs) {
2547
+ getUsedCollateral(e = G.maxCollateralInputs) {
2412
2548
  throw new Error("getUsedCollateral not implemented.");
2413
2549
  }
2414
2550
  async getUsedUTxOs(e = 0) {
2415
2551
  const t = this._wallet.getAccount(e, K);
2416
- return (await this._fetcher.fetchAddressUTxOs(t.enterpriseAddress)).map((r) => O(r));
2552
+ return (await this._fetcher.fetchAddressUTxOs(t.enterpriseAddress)).map((a) => V(a));
2417
2553
  }
2418
- signData(e, t, i = 0) {
2554
+ signData(e, t, r = 0) {
2419
2555
  try {
2420
- return this._wallet.signData(i, K, e, t);
2421
- } catch (r) {
2422
- throw new Error(`[AppWallet] An error occurred during signData: ${r}.`);
2556
+ return this._wallet.signData(r, K, e, t);
2557
+ } catch (a) {
2558
+ throw new Error(`[AppWallet] An error occurred during signData: ${a}.`);
2423
2559
  }
2424
2560
  }
2425
- async signTx(e, t = !1, i = 0) {
2561
+ async signTx(e, t = !1, r = 0) {
2426
2562
  try {
2427
- const r = this._wallet.getAccount(i, K), n = await this._fetcher.fetchAddressUTxOs(r.enterpriseAddress), o = this._wallet.signTx(i, K, n, e, t), c = W(e), A = c.witness_set(), h = Ge(A, o);
2428
- return A.set_vkeys(h), a.Transaction.new(c.body(), A, c.auxiliary_data()).to_hex();
2429
- } catch (r) {
2430
- throw new Error(`[AppWallet] An error occurred during signTx: ${r}.`);
2563
+ const a = this._wallet.getAccount(r, K), n = await this._fetcher.fetchAddressUTxOs(a.enterpriseAddress), o = this._wallet.signTx(r, K, n, e, t), c = Y(e), A = c.witness_set(), u = Le(A, o);
2564
+ return A.set_vkeys(u), i.Transaction.new(c.body(), A, c.auxiliary_data()).to_hex();
2565
+ } catch (a) {
2566
+ throw new Error(`[AppWallet] An error occurred during signTx: ${a}.`);
2431
2567
  }
2432
2568
  }
2433
2569
  submitTx(e) {
@@ -2437,13 +2573,13 @@ class wi {
2437
2573
  return y.generateMnemonic(e);
2438
2574
  }
2439
2575
  }
2440
- class Nt {
2576
+ class Ht {
2441
2577
  _walletInstance;
2442
2578
  constructor(e) {
2443
2579
  this._walletInstance = e;
2444
2580
  }
2445
2581
  static getInstalledWallets() {
2446
- return window.cardano === void 0 ? [] : Jt.filter((e) => window.cardano[e] !== void 0).map((e) => ({
2582
+ return window.cardano === void 0 ? [] : jt.filter((e) => window.cardano[e] !== void 0).map((e) => ({
2447
2583
  name: window.cardano[e].name,
2448
2584
  icon: window.cardano[e].icon,
2449
2585
  version: window.cardano[e].apiVersion
@@ -2451,9 +2587,9 @@ class Nt {
2451
2587
  }
2452
2588
  static async enable(e) {
2453
2589
  try {
2454
- const t = await Nt.resolveInstance(e);
2590
+ const t = await Ht.resolveInstance(e);
2455
2591
  if (t !== void 0)
2456
- return new Nt(t);
2592
+ return new Ht(t);
2457
2593
  throw new Error(`Couldn't create an instance of wallet: ${e}`);
2458
2594
  } catch (t) {
2459
2595
  throw new Error(`[BrowserWallet] An error occurred during enable: ${t}.`);
@@ -2461,14 +2597,14 @@ class Nt {
2461
2597
  }
2462
2598
  async getBalance() {
2463
2599
  const e = await this._walletInstance.getBalance();
2464
- return Me(Vs(e));
2600
+ return Ve(Ls(e));
2465
2601
  }
2466
2602
  async getChangeAddress() {
2467
2603
  const e = await this._walletInstance.getChangeAddress();
2468
2604
  return et(e).to_bech32();
2469
2605
  }
2470
- async getCollateral(e = Y.maxCollateralInputs) {
2471
- return (await this.getUsedCollateral(e)).map((i) => Qt(i));
2606
+ async getCollateral(e = G.maxCollateralInputs) {
2607
+ return (await this.getUsedCollateral(e)).map((r) => St(r));
2472
2608
  }
2473
2609
  getNetworkId() {
2474
2610
  return this._walletInstance.getNetworkId();
@@ -2483,18 +2619,18 @@ class Nt {
2483
2619
  return (await this._walletInstance.getUsedAddresses()).map((t) => et(t).to_bech32());
2484
2620
  }
2485
2621
  async getUtxos() {
2486
- return (await this.getUsedUTxOs()).map((t) => Qt(t));
2622
+ return (await this.getUsedUTxOs()).map((t) => St(t));
2487
2623
  }
2488
2624
  signData(e, t) {
2489
- const i = H(e).to_hex();
2490
- return this._walletInstance.signData(i, S(t));
2625
+ const r = H(e).to_hex();
2626
+ return this._walletInstance.signData(r, Q(t));
2491
2627
  }
2492
2628
  async signTx(e, t = !1) {
2493
2629
  try {
2494
- const i = W(e), r = i.witness_set(), n = await this._walletInstance.signTx(e, t), o = Ms(n).vkeys() ?? a.Vkeywitnesses.new(), c = Ge(r, o);
2495
- return r.set_vkeys(c), k(a.Transaction.new(i.body(), r, i.auxiliary_data()).to_bytes());
2496
- } catch (i) {
2497
- throw new Error(`[BrowserWallet] An error occurred during signTx: ${JSON.stringify(i)}.`);
2630
+ const r = Y(e), a = r.witness_set(), n = await this._walletInstance.signTx(e, t), o = Rs(n).vkeys() ?? i.Vkeywitnesses.new(), c = Le(a, o);
2631
+ return a.set_vkeys(c), b(i.Transaction.new(r.body(), a, r.auxiliary_data()).to_bytes());
2632
+ } catch (r) {
2633
+ throw new Error(`[BrowserWallet] An error occurred during signTx: ${JSON.stringify(r)}.`);
2498
2634
  }
2499
2635
  }
2500
2636
  submitTx(e) {
@@ -2504,47 +2640,47 @@ class Nt {
2504
2640
  const e = await this._walletInstance.getUsedAddresses();
2505
2641
  return et(e[0]);
2506
2642
  }
2507
- async getUsedCollateral(e = Y.maxCollateralInputs) {
2508
- return (await this._walletInstance.experimental.getCollateral() ?? []).map((i) => ue(i)).slice(0, e);
2643
+ async getUsedCollateral(e = G.maxCollateralInputs) {
2644
+ return (await this._walletInstance.experimental.getCollateral() ?? []).map((r) => Ie(r)).slice(0, e);
2509
2645
  }
2510
2646
  async getUsedUTxOs() {
2511
- return (await this._walletInstance.getUtxos() ?? []).map((t) => ue(t));
2647
+ return (await this._walletInstance.getUtxos() ?? []).map((t) => Ie(t));
2512
2648
  }
2513
2649
  async getAssets() {
2514
2650
  return (await this.getBalance()).filter((t) => t.unit !== "lovelace").map((t) => {
2515
- const i = t.unit.slice(0, N), r = t.unit.slice(N), n = Ls(i, r);
2651
+ const r = t.unit.slice(0, F), a = t.unit.slice(F), n = Ws(r, a);
2516
2652
  return {
2517
2653
  unit: t.unit,
2518
- policyId: i,
2519
- assetName: Vt(r),
2654
+ policyId: r,
2655
+ assetName: Yt(a),
2520
2656
  fingerprint: n,
2521
2657
  quantity: t.quantity
2522
2658
  };
2523
2659
  });
2524
2660
  }
2525
2661
  async getLovelace() {
2526
- const t = (await this.getBalance()).find((i) => i.unit === "lovelace");
2662
+ const t = (await this.getBalance()).find((r) => r.unit === "lovelace");
2527
2663
  return t !== void 0 ? t.quantity : "0";
2528
2664
  }
2529
2665
  async getPolicyIdAssets(e) {
2530
- return (await this.getAssets()).filter((i) => i.policyId === e);
2666
+ return (await this.getAssets()).filter((r) => r.policyId === e);
2531
2667
  }
2532
2668
  async getPolicyIds() {
2533
2669
  const e = await this.getBalance();
2534
- return Array.from(new Set(e.map((t) => t.unit.slice(0, N)))).filter((t) => t !== "lovelace");
2670
+ return Array.from(new Set(e.map((t) => t.unit.slice(0, F)))).filter((t) => t !== "lovelace");
2535
2671
  }
2536
2672
  static resolveInstance(e) {
2537
2673
  if (window.cardano === void 0)
2538
2674
  return;
2539
- const t = Jt.map((i) => window.cardano[i]).filter((i) => i !== void 0).find((i) => i.name.toLowerCase() === e.toLowerCase());
2675
+ const t = jt.map((r) => window.cardano[r]).filter((r) => r !== void 0).find((r) => r.name.toLowerCase() === e.toLowerCase());
2540
2676
  return t == null ? void 0 : t.enable();
2541
2677
  }
2542
2678
  }
2543
- const Re = "http://localhost:4000/", zs = "http://localhost:5000/", Js = `${Re}access`, Ws = `${Re}transaction/signtx`;
2544
- class yi {
2679
+ const $e = "http://localhost:4000/", Zs = "http://localhost:5000/", tr = `${$e}access`, er = `${$e}transaction/signtx`;
2680
+ class vr {
2545
2681
  static getAxiosInstance() {
2546
2682
  return j.create({
2547
- baseURL: zs,
2683
+ baseURL: Zs,
2548
2684
  withCredentials: !0
2549
2685
  });
2550
2686
  }
@@ -2554,18 +2690,18 @@ class yi {
2554
2690
  static async openMinaFrontend(e) {
2555
2691
  const t = this.getAppId();
2556
2692
  e.includes("?") ? e = `${e}&appId=${t}` : e = `${e}?appId=${t}`;
2557
- const i = "left=100,top=100,width=540,height=540", r = window.open(e, "meshWindow", i);
2558
- return r || console.error("the window did not open", r), await (async () => new Promise((n) => {
2693
+ const r = "left=100,top=100,width=540,height=540", a = window.open(e, "meshWindow", r);
2694
+ return a || console.error("the window did not open", a), await (async () => new Promise((n) => {
2559
2695
  window.addEventListener("message", async (o) => {
2560
2696
  o.data.target == "minaWallet" && n(o.data);
2561
2697
  });
2562
2698
  }))();
2563
2699
  }
2564
2700
  static async get(e, t = {}) {
2565
- const i = this.getAppId();
2701
+ const r = this.getAppId();
2566
2702
  t = {
2567
2703
  ...t,
2568
- appId: i
2704
+ appId: r
2569
2705
  };
2570
2706
  try {
2571
2707
  return (await this.getAxiosInstance().get(e, {
@@ -2577,7 +2713,7 @@ class yi {
2577
2713
  }
2578
2714
  }
2579
2715
  static async enable() {
2580
- return await this.get("wallet/getuserwalletsmeta") === void 0 ? await this.openMinaFrontend(Js) : !0;
2716
+ return await this.get("wallet/getuserwalletsmeta") === void 0 ? await this.openMinaFrontend(tr) : !0;
2581
2717
  }
2582
2718
  static async getChangeAddress(e = void 0, t = void 0) {
2583
2719
  return await this.get("wallet/getchangeaddress", {
@@ -2592,13 +2728,13 @@ class yi {
2592
2728
  });
2593
2729
  }
2594
2730
  static async signTx(e, t = !1) {
2595
- const i = await this.get("wallet/getuserwalletsmeta");
2596
- if (console.log("userWalletsMeta", i), i) {
2597
- const r = await this.openMinaFrontend(`${Ws}?unsignedTx=${e}&partialSign=${t}`);
2598
- if (r instanceof a.Vkeywitnesses) {
2599
- const n = W(e), o = n.witness_set();
2600
- o.set_vkeys(r);
2601
- const c = a.Transaction.new(n.body(), o, n.auxiliary_data()).to_hex();
2731
+ const r = await this.get("wallet/getuserwalletsmeta");
2732
+ if (console.log("userWalletsMeta", r), r) {
2733
+ const a = await this.openMinaFrontend(`${er}?unsignedTx=${e}&partialSign=${t}`);
2734
+ if (a instanceof i.Vkeywitnesses) {
2735
+ const n = Y(e), o = n.witness_set();
2736
+ o.set_vkeys(a);
2737
+ const c = i.Transaction.new(n.body(), o, n.auxiliary_data()).to_hex();
2602
2738
  return console.log("signedTx", c), c;
2603
2739
  }
2604
2740
  } else
@@ -2606,36 +2742,39 @@ class yi {
2606
2742
  }
2607
2743
  }
2608
2744
  export {
2609
- wi as AppWallet,
2610
- di as BlockfrostProvider,
2611
- Nt as BrowserWallet,
2745
+ br as AppWallet,
2746
+ yr as BlockfrostProvider,
2747
+ Ht as BrowserWallet,
2612
2748
  y as EmbeddedWallet,
2613
- pi as ForgeScript,
2614
- li as InfuraProvider,
2615
- gi as KoiosProvider,
2616
- yi as MinaWallet,
2617
- fi as OgmiosProvider,
2618
- _i as TangoProvider,
2619
- R as Transaction,
2620
- ei as checkSignature,
2621
- Ii as generateNonce,
2622
- Xe as isNetwork,
2623
- ss as largestFirst,
2624
- is as largestFirstMultiAsset,
2625
- si as resolveDataHash,
2626
- ii as resolveEpochNo,
2627
- Ls as resolveFingerprint,
2628
- ri as resolveLanguageView,
2629
- ai as resolveNativeScriptHash,
2749
+ Qr as ForgeScript,
2750
+ mr as InfuraProvider,
2751
+ Er as KoiosProvider,
2752
+ vr as MinaWallet,
2753
+ Br as OgmiosProvider,
2754
+ xr as TangoProvider,
2755
+ L as Transaction,
2756
+ or as checkSignature,
2757
+ pr as generateNonce,
2758
+ ts as isNetwork,
2759
+ is as keepRelevant,
2760
+ nr as largestFirst,
2761
+ ns as largestFirstMultiAsset,
2762
+ Cr as readPlutusData,
2763
+ wr as readTransaction,
2764
+ cr as resolveDataHash,
2765
+ Ar as resolveEpochNo,
2766
+ Ws as resolveFingerprint,
2767
+ ur as resolveLanguageView,
2768
+ hr as resolveNativeScriptHash,
2630
2769
  st as resolvePaymentKeyHash,
2631
- ni as resolvePlutusScriptAddress,
2632
- oi as resolvePlutusScriptHash,
2633
- ci as resolvePoolId,
2634
- Ai as resolvePrivateKey,
2635
- Ot as resolveRewardAddress,
2636
- hi as resolveScriptRef,
2637
- ui as resolveSlotNo,
2638
- ht as resolveStakeKeyHash,
2639
- Ye as resolveTxFees,
2640
- $s as resolveTxHash
2770
+ dr as resolvePlutusScriptAddress,
2771
+ Ir as resolvePlutusScriptHash,
2772
+ lr as resolvePoolId,
2773
+ fr as resolvePrivateKey,
2774
+ Gt as resolveRewardAddress,
2775
+ gr as resolveScriptRef,
2776
+ _r as resolveSlotNo,
2777
+ ut as resolveStakeKeyHash,
2778
+ Re as resolveTxFees,
2779
+ js as resolveTxHash
2641
2780
  };