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