@meshsdk/core 1.2.1 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/core.js CHANGED
@@ -1,12 +1,12 @@
1
- import { mnemonicToEntropy as fe, generateMnemonic as Pe } from "bip39";
1
+ import { customAlphabet as Ce } from "nanoid";
2
2
  import * as a from "@emurgo/cardano-serialization-lib-nodejs";
3
- import it from "axios";
4
- import { COSEKey as Me, Label as Z, KeyType as Te, AlgorithmId as _e, Int as St, BigNum as Lt, CBORValue as bt, HeaderMap as qt, Headers as Ve, ProtectedHeaderMap as Ye, COSESign1Builder as Oe } from "@emurgo/cardano-message-signing-nodejs";
5
- import { customAlphabet as Ge } from "nanoid";
6
- const Re = {
3
+ import ot from "axios";
4
+ import { mnemonicToEntropy as pe, generateMnemonic as Le } from "bip39";
5
+ import { COSEKey as we, COSESign1 as $e, Label as J, Int as pt, BigNum as Ut, KeyType as qe, AlgorithmId as ye, CBORValue as kt, HeaderMap as qt, Headers as ze, ProtectedHeaderMap as Je, COSESign1Builder as We } from "@emurgo/cardano-message-signing-nodejs";
6
+ const me = {
7
7
  mem: 7e6,
8
8
  steps: 3e9
9
- }, T = {
9
+ }, Y = {
10
10
  epoch: 0,
11
11
  coinsPerUTxOSize: "4310",
12
12
  priceMem: 0.0577,
@@ -27,23 +27,23 @@ const Re = {
27
27
  maxTxExSteps: "10000000000",
28
28
  maxBlockExMem: "80000000",
29
29
  maxBlockExSteps: "40000000000"
30
- }, Dt = 2147483648, Kt = {
30
+ }, bt = 2147483648, mt = {
31
31
  V1: a.Language.new_plutus_v1(),
32
32
  V2: a.Language.new_plutus_v2()
33
- }, Q = 56, Le = {
33
+ }, N = 56, je = {
34
34
  CERT: a.RedeemerTag.new_cert(),
35
35
  MINT: a.RedeemerTag.new_mint(),
36
36
  REWARD: a.RedeemerTag.new_reward(),
37
37
  SPEND: a.RedeemerTag.new_spend()
38
- }, wt = {
38
+ }, Et = {
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
- }, $t = {
43
+ }, zt = {
44
44
  ALONZO: a.TxBuilderConstants.plutus_alonzo_cost_models(),
45
45
  BABBAGE: a.TxBuilderConstants.plutus_vasil_cost_models()
46
- }, qe = {
46
+ }, Xe = {
47
47
  ALONZO: {
48
48
  V1: "a141005901d59f1a000302590001011a00060bc719026d00011a000249f01903e800011a000249f018201a0025cea81971f70419744d186419744d186419744d186419744d186419744d186419744d18641864186419744d18641a000249f018201a000249f018201a000249f018201a000249f01903e800011a000249f018201a000249f01903e800081a000242201a00067e2318760001011a000249f01903e800081a000249f01a0001b79818f7011a000249f0192710011a0002155e19052e011903e81a000249f01903e8011a000249f018201a000249f018201a000249f0182001011a000249f0011a000249f0041a000194af18f8011a000194af18f8011a0002377c190556011a0002bdea1901f1011a000249f018201a000249f018201a000249f018201a000249f018201a000249f018201a000249f018201a000242201a00067e23187600010119f04c192bd200011a000249f018201a000242201a00067e2318760001011a000242201a00067e2318760001011a0025cea81971f704001a000141bb041a000249f019138800011a000249f018201a000302590001011a000249f018201a000249f018201a000249f018201a000249f018201a000249f018201a000249f018201a000249f018201a00330da70101ff"
49
49
  },
@@ -51,10 +51,10 @@ const Re = {
51
51
  V1: "a141005901b69f1a0003236119032c01011903e819023b00011903e8195e7104011903e818201a0001ca761928eb041959d818641959d818641959d818641959d818641959d818641959d81864186418641959d81864194c5118201a0002acfa182019b551041a000363151901ff00011a00015c3518201a000797751936f404021a0002ff941a0006ea7818dc0001011903e8196ff604021a0003bd081a00034ec5183e011a00102e0f19312a011a00032e801901a5011a0002da781903e819cf06011a00013a34182019a8f118201903e818201a00013aac0119e143041903e80a1a00030219189c011a00030219189c011a0003207c1901d9011a000330001901ff0119ccf3182019fd40182019ffd5182019581e18201940b318201a00012adf18201a0002ff941a0006ea7818dc0001011a00010f92192da7000119eabb18201a0002ff941a0006ea7818dc0001011a0002ff941a0006ea7818dc0001011a000c504e197712041a001d6af61a0001425b041a00040c660004001a00014fab18201a0003236119032c010119a0de18201a00033d7618201979f41820197fb8182019a95d1820197df718201995aa18201a009063b91903fd0aff",
52
52
  V2: "a20198af1a0003236119032c01011903e819023b00011903e8195e7104011903e818201a0001ca761928eb041959d818641959d818641959d818641959d818641959d818641959d81864186418641959d81864194c5118201a0002acfa182019b551041a000363151901ff00011a00015c3518201a000797751936f404021a0002ff941a0006ea7818dc0001011903e8196ff604021a0003bd081a00034ec5183e011a00102e0f19312a011a00032e801901a5011a0002da781903e819cf06011a00013a34182019a8f118201903e818201a00013aac0119e143041903e80a1a00030219189c011a00030219189c011a0003207c1901d9011a000330001901ff0119ccf3182019fd40182019ffd5182019581e18201940b318201a00012adf18201a0002ff941a0006ea7818dc0001011a00010f92192da7000119eabb18201a0002ff941a0006ea7818dc0001011a0002ff941a0006ea7818dc0001011a0011b22c1a0005fdde00021a000c504e197712041a001d6af61a0001425b041a00040c660004001a00014fab18201a0003236119032c010119a0de18201a00033d7618201979f41820197fb8182019a95d1820197df718201995aa18201b00000004a817c8001b00000004a817c8001a009063b91903fd0a1b00000004a817c800001b00000004a817c80041005901b69f1a0003236119032c01011903e819023b00011903e8195e7104011903e818201a0001ca761928eb041959d818641959d818641959d818641959d818641959d818641959d81864186418641959d81864194c5118201a0002acfa182019b551041a000363151901ff00011a00015c3518201a000797751936f404021a0002ff941a0006ea7818dc0001011903e8196ff604021a0003bd081a00034ec5183e011a00102e0f19312a011a00032e801901a5011a0002da781903e819cf06011a00013a34182019a8f118201903e818201a00013aac0119e143041903e80a1a00030219189c011a00030219189c011a0003207c1901d9011a000330001901ff0119ccf3182019fd40182019ffd5182019581e18201940b318201a00012adf18201a0002ff941a0006ea7818dc0001011a00010f92192da7000119eabb18201a0002ff941a0006ea7818dc0001011a0002ff941a0006ea7818dc0001011a000c504e197712041a001d6af61a0001425b041a00040c660004001a00014fab18201a0003236119032c010119a0de18201a00033d7618201979f41820197fb8182019a95d1820197df718201995aa18201a009063b91903fd0aff"
53
53
  }
54
- }, Ft = {
54
+ }, Ht = {
55
55
  [a.NetworkInfo.testnet().network_id()]: "8d18d786e92776c824607fd8e193ec535c79dc61ea2405ddf3b09fe3",
56
56
  [a.NetworkInfo.mainnet().network_id()]: "f0ff48bbb7bbe9d59a40f1ce90e9e9d0ff5002ec48f232b49ca0fb9a"
57
- }, zt = [
57
+ }, Jt = [
58
58
  "begin",
59
59
  "eternl",
60
60
  "flint",
@@ -62,298 +62,97 @@ const Re = {
62
62
  "nufi",
63
63
  "gerowallet",
64
64
  "typhoncip30"
65
- ], nt = (s) => a.Address.from_bytes(f(s)), $e = (s) => a.Bip32PrivateKey.from_bytes(f(s)), ze = (s) => a.DataHash.from_bytes(f(s)), k = (s) => a.Ed25519KeyHash.from_bytes(f(s)), At = (s) => a.NativeScript.from_bytes(f(s)), Je = (s) => a.PlutusData.from_bytes(f(s)), yt = (s, e) => a.PlutusScript.from_bytes_with_version(f(s), Kt[e]), We = (s) => a.ScriptRef.from_bytes(f(s)), je = (s) => a.ScriptHash.from_bytes(f(s)), $ = (s) => a.Transaction.from_bytes(f(s)), Ce = (s) => a.TransactionHash.from_bytes(f(s)), Jt = (s) => a.TransactionUnspentOutput.from_bytes(f(s)), Xe = (s) => a.TransactionWitnessSet.from_bytes(f(s)), Ze = (s) => a.Value.from_bytes(f(s)), F = (s) => a.Address.from_bech32(s), Nt = (s) => a.BaseAddress.from_address(F(s)), pe = (s) => a.EnterpriseAddress.from_address(F(s)), we = (s) => a.RewardAddress.from_address(F(s)), j = (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"), Qt = (s) => {
66
- const e = (t) => {
67
- const r = new Array();
68
- for (let i = 0; i < t.len(); i += 1)
69
- r.push(Qt(t.get(i)));
70
- return r;
71
- };
72
- switch (s.kind()) {
73
- case a.NativeScriptKind.ScriptAll: {
74
- const t = s.as_script_all();
75
- return {
76
- type: "all",
77
- scripts: e(t.native_scripts())
78
- };
79
- }
80
- case a.NativeScriptKind.ScriptAny: {
81
- const t = s.as_script_any();
82
- return {
83
- type: "any",
84
- scripts: e(t.native_scripts())
85
- };
86
- }
87
- case a.NativeScriptKind.ScriptNOfK: {
88
- const t = s.as_script_n_of_k();
89
- return {
90
- type: "atLeast",
91
- required: t.n(),
92
- scripts: e(t.native_scripts())
93
- };
94
- }
95
- case a.NativeScriptKind.TimelockStart: {
96
- const t = s.as_timelock_start();
97
- return {
98
- type: "after",
99
- slot: t.slot_bignum().to_str()
100
- };
101
- }
102
- case a.NativeScriptKind.TimelockExpiry: {
103
- const t = s.as_timelock_expiry();
104
- return {
105
- type: "before",
106
- slot: t.slot_bignum().to_str()
107
- };
108
- }
109
- case a.NativeScriptKind.ScriptPubkey: {
110
- const t = s.as_script_pubkey();
111
- return {
112
- type: "sig",
113
- keyHash: t.addr_keyhash().to_hex()
114
- };
115
- }
116
- default:
117
- throw new Error(`Script Kind: ${s.kind()}, is not supported`);
118
- }
119
- }, xt = (s) => {
120
- const e = (t) => {
121
- const r = a.NativeScripts.new();
122
- return t.forEach((i) => {
123
- r.add(xt(i));
124
- }), r;
125
- };
126
- switch (s.type) {
127
- case "all":
128
- return a.NativeScript.new_script_all(a.ScriptAll.new(e(s.scripts)));
129
- case "any":
130
- return a.NativeScript.new_script_any(a.ScriptAny.new(e(s.scripts)));
131
- case "atLeast":
132
- return a.NativeScript.new_script_n_of_k(a.ScriptNOfK.new(s.required, e(s.scripts)));
133
- case "after":
134
- return a.NativeScript.new_timelock_start(a.TimelockStart.new_timelockstart(a.BigNum.from_str(s.slot)));
135
- case "before":
136
- return a.NativeScript.new_timelock_expiry(a.TimelockExpiry.new_timelockexpiry(a.BigNum.from_str(s.slot)));
137
- case "sig":
138
- return a.NativeScript.new_script_pubkey(a.ScriptPubkey.new(k(s.keyHash)));
139
- }
140
- }, W = (s) => {
141
- const e = (t) => {
142
- const r = a.PlutusList.new();
143
- return t.forEach((i) => {
144
- r.add(W(i));
145
- }), r;
146
- };
147
- switch (typeof s) {
148
- case "string":
149
- return a.PlutusData.new_bytes(f(s));
150
- case "number":
151
- return a.PlutusData.new_integer(a.BigInt.from_str(s.toString()));
152
- case "object":
153
- if (s instanceof Array) {
154
- const t = e(s);
155
- return a.PlutusData.new_list(t);
156
- } else if (s instanceof Map) {
157
- const t = a.PlutusMap.new();
158
- return s.forEach((r, i) => {
159
- t.insert(W(i), W(r));
160
- }), a.PlutusData.new_map(t);
161
- } else
162
- return a.PlutusData.new_constr_plutus_data(a.ConstrPlutusData.new(a.BigNum.from_str(s.alternative.toString()), e(s.fields)));
163
- }
164
- }, ts = (s) => {
165
- const e = a.Relays.new();
166
- throw s.relays.forEach((t) => {
167
- e.add(ss(t));
168
- }), new Error("toPoolParams not implemented.");
169
- }, es = (s) => {
170
- const e = (t) => Le[t];
171
- return a.Redeemer.new(e(s.tag), a.BigNum.from_str(s.index.toString()), W(s.data), a.ExUnits.new(a.BigNum.from_str(s.budget.mem.toString()), a.BigNum.from_str(s.budget.steps.toString())));
172
- }, ss = (s) => {
173
- switch (s.type) {
174
- case "SingleHostAddr": {
175
- 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;
176
- return a.Relay.new_single_host_addr(a.SingleHostAddr.new(s.port, e, t));
177
- }
178
- case "SingleHostName":
179
- return a.Relay.new_single_host_name(a.SingleHostName.new(s.port, a.DNSRecordAorAAAA.new(s.domainName)));
180
- case "MultiHostName":
181
- return a.Relay.new_multi_host_name(a.MultiHostName.new(a.DNSRecordSRV.new(s.domainName)));
182
- }
183
- }, rs = (s) => {
184
- if (s.is_plutus_script()) {
185
- const t = s.plutus_script();
186
- return {
187
- code: t.to_hex(),
188
- version: Object.keys(Kt).find((r) => Kt[r].to_hex() === t.language_version().to_hex())
189
- };
190
- }
191
- const e = s.native_script();
192
- return Qt(e);
193
- }, ht = (s) => {
194
- if ("code" in s) {
195
- const e = yt(s.code, s.version);
196
- return a.ScriptRef.new_plutus_script(e);
197
- }
198
- return a.ScriptRef.new_native_script(xt(s));
199
- }, mt = (s) => {
200
- var i, n, o;
201
- 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;
202
- return {
203
- input: {
204
- outputIndex: s.input().index(),
205
- txHash: s.input().transaction_id().to_hex()
206
- },
207
- output: {
208
- address: s.output().address().to_bech32(),
209
- amount: ye(s.output().amount()),
210
- dataHash: e,
211
- plutusData: t,
212
- scriptRef: r
213
- }
214
- };
215
- }, q = (s) => {
216
- const e = a.TransactionInput.new(Ce(s.input.txHash), s.input.outputIndex), t = a.TransactionOutput.new(F(s.output.address), Ct(s.output.amount));
217
- return s.output.dataHash !== void 0 && t.set_data_hash(ze(s.output.dataHash)), s.output.plutusData !== void 0 && t.set_plutus_data(Je(s.output.plutusData)), s.output.scriptRef !== void 0 && t.set_script_ref(We(s.output.scriptRef)), a.TransactionUnspentOutput.new(e, t);
218
- }, Wt = (s) => {
219
- const e = s.split(".")[1] ?? "0", t = `${parseInt(e, 10)}`, r = "1" + "0".repeat(e.length);
220
- return a.UnitInterval.new(a.BigNum.from_str(t), a.BigNum.from_str(r));
221
- }, S = (s) => s.length % 2 === 0 && /^[0-9A-F]*$/i.test(s) ? s : j(Buffer.from(s, "utf-8")), Ht = (s) => Buffer.from(s, "hex").toString("utf-8"), ye = (s) => {
222
- const e = [
223
- { unit: "lovelace", quantity: s.coin().to_str() }
224
- ], t = s.multiasset();
225
- if (t !== void 0) {
226
- const r = t.keys();
227
- for (let i = 0; i < r.len(); i += 1) {
228
- const n = r.get(i), o = t.get(n);
229
- if (o !== void 0) {
230
- const A = o.keys();
231
- for (let c = 0; c < A.len(); c += 1) {
232
- const I = A.get(c), u = o.get(I) ?? a.BigNum.from_str("0"), h = n.to_hex() + j(I.name());
233
- e.push({ unit: h, quantity: u.to_str() });
234
- }
235
- }
236
- }
237
- }
238
- return e;
239
- }, Ct = (s) => {
240
- 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, Q)))), r = a.MultiAsset.new();
241
- t.forEach((n) => {
242
- const o = a.Assets.new();
243
- s.filter((A) => A.unit.slice(0, Q) === n).forEach((A) => {
244
- o.insert(a.AssetName.new(f(A.unit.slice(Q))), a.BigNum.from_str(A.quantity));
245
- }), r.insert(je(n), o);
246
- });
247
- const i = a.Value.new(a.BigNum.from_str(e ? e.quantity : "0"));
248
- return (s.length > 1 || !e) && i.set_multiasset(r), i;
249
- }, jt = (s, e, t) => a.BaseAddress.new(s, a.StakeCredential.from_keyhash(e), a.StakeCredential.from_keyhash(t)), me = (s, e = "") => a.Bip32PrivateKey.from_bip39_entropy(f(s), f(S(e))), Xt = (s) => a.DataCost.new_coins_per_byte(a.BigNum.from_str(s)), is = (s) => {
250
- if (typeof s != "object" || !("input" in s))
251
- return a.DatumSource.new(W(s));
252
- const e = q(s);
253
- if (e.output().has_plutus_data())
254
- return a.DatumSource.new_ref_input(e.input());
255
- throw new Error(`No inline datum found in UTxO: ${e.input().transaction_id().to_hex()}`);
256
- }, Zt = (s, e) => a.EnterpriseAddress.new(s, a.StakeCredential.from_keyhash(e)), Ut = (s, e) => a.RewardAddress.new(s, a.StakeCredential.from_keyhash(e)), as = (s) => {
257
- if ("code" in s)
258
- return a.PlutusScriptSource.new(yt(s.code, s.version));
259
- const e = q(s);
260
- if (e.output().has_script_ref()) {
261
- const t = e.output().script_ref();
262
- if (t.is_plutus_script()) {
263
- const r = rs(t), i = yt(r.code, r.version).hash();
264
- return a.PlutusScriptSource.new_ref_input(i, e.input());
265
- }
266
- }
267
- throw new Error(`No plutus script reference found in UTxO: ${e.input().transaction_id().to_hex()}`);
268
- }, dt = (s) => {
269
- const e = a.ScriptPubkey.new(s);
270
- return a.NativeScript.new_script_pubkey(e);
271
- }, ns = (s = T) => {
272
- const e = a.TransactionBuilderConfigBuilder.new().coins_per_utxo_byte(a.BigNum.from_str(s.coinsPerUTxOSize)).ex_unit_prices(a.ExUnitPrices.new(Wt(s.priceMem.toString()), Wt(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();
273
- return a.TransactionBuilder.new(e);
274
- }, te = (s) => {
275
- const e = a.TxInputsBuilder.new();
276
- return s.map((t) => t instanceof a.TransactionUnspentOutput ? t : q(t)).forEach((t) => {
277
- e.add_input(t.output().address(), t.input(), t.output().amount());
278
- }), e;
279
- }, lt = (s) => {
280
- if (typeof s == "string")
281
- return a.TransactionOutputBuilder.new().with_address(F(s));
282
- let e = a.TransactionOutputBuilder.new().with_address(F(s.address));
283
- if (s.datum) {
284
- const { value: t, inline: r } = s.datum, i = W(t);
285
- e = e.with_data_hash(a.hash_plutus_data(i)), r && (e = e.with_plutus_data(i));
286
- }
287
- if (s.script) {
288
- const t = ht(s.script);
289
- e = e.with_script_ref(t);
290
- }
291
- return e;
292
- }, l = (s) => it.isAxiosError(s) ? s.response ? JSON.stringify({
293
- data: s.response.data,
294
- headers: s.response.headers,
295
- status: s.response.status
296
- }) : s.request ? JSON.stringify(s.request) : s.message : JSON.stringify(s), os = (s, e, t = !1, { maxTxSize: r, minFeeA: i, minFeeB: n } = T) => {
297
- const o = e.filter((h) => Be(h) === !1).sort(Ee), A = a.BigNum.from_str(Fe(r, i, n)), c = t ? a.BigNum.from_str(s).checked_add(A).to_str() : s;
298
- return Et(o, /* @__PURE__ */ new Map([
65
+ ], Ze = (s, e, t = !1, { maxTxSize: r, minFeeA: i, minFeeB: n } = Y) => {
66
+ const o = e.filter((h) => Be(h) === !1).sort(Ee), A = a.BigNum.from_str(Ye(r, i, n)), c = t ? a.BigNum.from_str(s).checked_add(A).to_str() : s;
67
+ return Bt(o, /* @__PURE__ */ new Map([
299
68
  ["lovelace", c]
300
69
  ]));
301
- }, As = (s, e, t = !1, r = T) => {
302
- const i = e.filter(Be).sort(Ee), n = s.get("lovelace") ?? "0", { maxTxSize: o, minFeeA: A, minFeeB: c } = r, I = a.BigNum.from_str(Fe(o, A, c)), u = t ? a.BigNum.from_str(n).checked_add(I).to_str() : n;
303
- return s.set("lovelace", u), Et(i, s);
304
- }, cs = (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) => {
70
+ }, ts = (s, e, t = !1, r = Y) => {
71
+ const i = e.filter(Be).sort(Ee), n = s.get("lovelace") ?? "0", { maxTxSize: o, minFeeA: A, minFeeB: c } = r, I = a.BigNum.from_str(Ye(o, A, c)), u = t ? a.BigNum.from_str(n).checked_add(I).to_str() : n;
72
+ return s.set("lovelace", u), Bt(i, s);
73
+ }, es = (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) => {
305
74
  const n = i.output.amount.reduce((o, A) => o.checked_add(a.BigNum.from_str(A.quantity)), a.BigNum.from_str("0"));
306
75
  return r.checked_add(n);
307
76
  }, a.BigNum.from_str("0")).less_than(t.quantity) === !1), Ee = (s, e) => {
308
77
  var i, n;
309
78
  const t = a.BigNum.from_str(((i = s.output.amount.find((o) => o.unit === "lovelace")) == null ? void 0 : i.quantity) ?? "0");
310
79
  return a.BigNum.from_str(((n = e.output.amount.find((o) => o.unit === "lovelace")) == null ? void 0 : n.quantity) ?? "0").compare(t);
311
- }, Be = (s) => s.output.amount.length > 1, Et = (s, e, t = []) => s.length === 0 || cs(t, e) ? t : Is(s[0], e) ? Et(s.slice(1), e, [...t, s[0]]) : Et(s.slice(1), e, t), Is = (s, e) => Array.from(e.keys()).some((t) => s.output.amount.find((r) => r.unit === t) !== void 0), hs = (s, e) => {
312
- const t = us(e), r = ds(s, e);
80
+ }, Be = (s) => s.output.amount.length > 1, Bt = (s, e, t = []) => s.length === 0 || es(t, e) ? t : ss(s[0], e) ? Bt(s.slice(1), e, [...t, s[0]]) : Bt(s.slice(1), e, t), ss = (s, e) => Array.from(e.keys()).some((t) => s.output.amount.find((r) => r.unit === t) !== void 0), rs = (s, e) => {
81
+ const t = as(e), r = ns(s, e);
313
82
  return {
314
- coseKey: j(t.to_bytes()),
315
- coseSign1: j(r.to_bytes())
83
+ coseKey: K(t.to_bytes()),
84
+ coseSign1: K(r.to_bytes())
316
85
  };
317
- }, us = (s) => {
318
- const e = Me.new(Z.from_key_type(Te.OKP));
319
- return e.set_algorithm_id(Z.from_algorithm_id(_e.EdDSA)), e.set_header(Z.new_int(St.new_negative(Lt.from_str("1"))), bt.new_int(St.new_i32(6))), e.set_header(Z.new_int(St.new_negative(Lt.from_str("2"))), bt.new_bytes(s.key.to_public().as_bytes())), e;
320
- }, ds = (s, e) => {
86
+ }, Xs = (s, e, { key: t, signature: r }) => {
87
+ var o, A;
88
+ const i = we.from_bytes(f(t)), n = $e.from_bytes(f(r));
89
+ if ((s == null ? void 0 : s.length) > 0) {
90
+ const c = K(n.payload() ?? new Uint8Array());
91
+ if (S(s) !== c)
92
+ return !1;
93
+ }
94
+ if ((e == null ? void 0 : e.length) > 0) {
95
+ const I = (o = n.headers().protected().deserialized_headers().header(J.new_text("address"))) == null ? void 0 : o.as_bytes();
96
+ if (I === void 0)
97
+ throw new Error("Couldn't find a signer address in signature");
98
+ const u = (A = i.header(J.new_int(pt.new_negative(Ut.from_str("2"))))) == null ? void 0 : A.as_bytes();
99
+ if (u === void 0)
100
+ throw new Error("Couldn't find a signer key in signature");
101
+ const h = tt(K(I)), g = Us(K(u));
102
+ if (is(e, h, g) === !1)
103
+ throw new Error("Couldn't check signature because of address mismatch");
104
+ const p = Ks(K(n.signature())), x = n.signed_data().to_bytes();
105
+ return g.verify(x, p);
106
+ }
107
+ return !1;
108
+ }, is = (s, e, t) => {
109
+ if (s !== e.to_bech32())
110
+ return !1;
111
+ try {
112
+ return It(s) === t.hash().to_hex();
113
+ } catch {
114
+ return !1;
115
+ }
116
+ }, as = (s) => {
117
+ const e = we.new(J.from_key_type(qe.OKP));
118
+ return e.set_algorithm_id(J.from_algorithm_id(ye.EdDSA)), e.set_header(J.new_int(pt.new_negative(Ut.from_str("1"))), kt.new_int(pt.new_i32(6))), e.set_header(J.new_int(pt.new_negative(Ut.from_str("2"))), kt.new_bytes(s.key.to_public().as_bytes())), e;
119
+ }, ns = (s, e) => {
321
120
  const t = qt.new(), r = qt.new();
322
- t.set_algorithm_id(Z.from_algorithm_id(_e.EdDSA)), t.set_header(Z.new_text("address"), bt.new_bytes(e.address.to_bytes()));
323
- const i = Ve.new(Ye.new(t), r), n = Oe.new(i, f(s.payload), !1);
121
+ t.set_algorithm_id(J.from_algorithm_id(ye.EdDSA)), t.set_header(J.new_text("address"), kt.new_bytes(e.address.to_bytes()));
122
+ const i = ze.new(Je.new(t), r), n = We.new(i, f(s.payload), !1);
324
123
  s.externalAAD !== void 0 && n.set_external_aad(f(s.externalAAD));
325
124
  const o = n.make_data_to_sign(), A = e.key.sign(o.to_bytes());
326
125
  return n.build(A.to_bytes());
327
126
  };
328
- var ee = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, Qe = {}, x = { exports: {} };
329
- V.notEqual = gs;
330
- V.notOk = fs;
331
- V.equal = ls;
332
- V.ok = V;
333
- var xe = V;
334
- function ls(s, e, t) {
335
- V(s == e, t);
127
+ var Wt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, xe = {}, Q = { exports: {} };
128
+ G.notEqual = As;
129
+ G.notOk = cs;
130
+ G.equal = os;
131
+ G.ok = G;
132
+ var Qe = G;
133
+ function os(s, e, t) {
134
+ G(s == e, t);
336
135
  }
337
- function gs(s, e, t) {
338
- V(s != e, t);
136
+ function As(s, e, t) {
137
+ G(s != e, t);
339
138
  }
340
- function fs(s, e) {
341
- V(!s, e);
139
+ function cs(s, e) {
140
+ G(!s, e);
342
141
  }
343
- function V(s, e) {
142
+ function G(s, e) {
344
143
  if (!s)
345
144
  throw new Error(e || "AssertionError");
346
145
  }
347
- var N = { exports: {} };
348
- function _s(s) {
146
+ var P = { exports: {} };
147
+ function Is(s) {
349
148
  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.');
350
149
  }
351
- var Cs = Pt;
150
+ var hs = Pt;
352
151
  Pt.supported = typeof WebAssembly < "u";
353
152
  function Pt(s) {
354
153
  if (!Pt.supported)
355
154
  return null;
356
- var e = s && s.imports, t = ps("AGFzbQEAAAABEANgAn9/AGADf39/AGABfwADBQQAAQICBQUBAQroBwdNBQZtZW1vcnkCAAxibGFrZTJiX2luaXQAAA5ibGFrZTJiX3VwZGF0ZQABDWJsYWtlMmJfZmluYWwAAhBibGFrZTJiX2NvbXByZXNzAAMK00AElgMAIABCADcDACAAQQhqQgA3AwAgAEEQakIANwMAIABBGGpCADcDACAAQSBqQgA3AwAgAEEoakIANwMAIABBMGpCADcDACAAQThqQgA3AwAgAEHAAGpCADcDACAAQcgAakIANwMAIABB0ABqQgA3AwAgAEHYAGpCADcDACAAQeAAakIANwMAIABB6ABqQgA3AwAgAEHwAGpCADcDACAAQfgAakIANwMAIABBgAFqQoiS853/zPmE6gBBACkDAIU3AwAgAEGIAWpCu86qptjQ67O7f0EIKQMAhTcDACAAQZABakKr8NP0r+68tzxBECkDAIU3AwAgAEGYAWpC8e30+KWn/aelf0EYKQMAhTcDACAAQaABakLRhZrv+s+Uh9EAQSApAwCFNwMAIABBqAFqQp/Y+dnCkdqCm39BKCkDAIU3AwAgAEGwAWpC6/qG2r+19sEfQTApAwCFNwMAIABBuAFqQvnC+JuRo7Pw2wBBOCkDAIU3AwAgAEHAAWpCADcDACAAQcgBakIANwMAIABB0AFqQgA3AwALbQEDfyAAQcABaiEDIABByAFqIQQgBCkDAKchBQJAA0AgASACRg0BIAVBgAFGBEAgAyADKQMAIAWtfDcDAEEAIQUgABADCyAAIAVqIAEtAAA6AAAgBUEBaiEFIAFBAWohAQwACwsgBCAFrTcDAAtkAQN/IABBwAFqIQEgAEHIAWohAiABIAEpAwAgAikDAHw3AwAgAEHQAWpCfzcDACACKQMApyEDAkADQCADQYABRg0BIAAgA2pBADoAACADQQFqIQMMAAsLIAIgA603AwAgABADC+U7AiB+CX8gAEGAAWohISAAQYgBaiEiIABBkAFqISMgAEGYAWohJCAAQaABaiElIABBqAFqISYgAEGwAWohJyAAQbgBaiEoICEpAwAhASAiKQMAIQIgIykDACEDICQpAwAhBCAlKQMAIQUgJikDACEGICcpAwAhByAoKQMAIQhCiJLznf/M+YTqACEJQrvOqqbY0Ouzu38hCkKr8NP0r+68tzwhC0Lx7fT4paf9p6V/IQxC0YWa7/rPlIfRACENQp/Y+dnCkdqCm38hDkLr+obav7X2wR8hD0L5wvibkaOz8NsAIRAgACkDACERIABBCGopAwAhEiAAQRBqKQMAIRMgAEEYaikDACEUIABBIGopAwAhFSAAQShqKQMAIRYgAEEwaikDACEXIABBOGopAwAhGCAAQcAAaikDACEZIABByABqKQMAIRogAEHQAGopAwAhGyAAQdgAaikDACEcIABB4ABqKQMAIR0gAEHoAGopAwAhHiAAQfAAaikDACEfIABB+ABqKQMAISAgDSAAQcABaikDAIUhDSAPIABB0AFqKQMAhS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IIohDSAJIA18IQkgBSAJhUIYiiEFIAEgBSAbfHwhASANIAGFQhCKIQ0gCSANfCEJIAUgCYVCP4ohBSACIAYgFXx8IQIgDiAChUIgiiEOIAogDnwhCiAGIAqFQhiKIQYgAiAGIBl8fCECIA4gAoVCEIohDiAKIA58IQogBiAKhUI/iiEGIAMgByAafHwhAyAPIAOFQiCKIQ8gCyAPfCELIAcgC4VCGIohByADIAcgIHx8IQMgDyADhUIQiiEPIAsgD3whCyAHIAuFQj+KIQcgBCAIIB58fCEEIBAgBIVCIIohECAMIBB8IQwgCCAMhUIYiiEIIAQgCCAXfHwhBCAQIASFQhCKIRAgDCAQfCEMIAggDIVCP4ohCCABIAYgEnx8IQEgECABhUIgiiEQIAsgEHwhCyAGIAuFQhiKIQYgASAGIB18fCEBIBAgAYVCEIohECALIBB8IQsgBiALhUI/iiEGIAIgByARfHwhAiANIAKFQiCKIQ0gDCANfCEMIAcgDIVCGIohByACIAcgE3x8IQIgDSAChUIQiiENIAwgDXwhDCAHIAyFQj+KIQcgAyAIIBx8fCEDIA4gA4VCIIohDiAJIA58IQkgCCAJhUIYiiEIIAMgCCAYfHwhAyAOIAOFQhCKIQ4gCSAOfCEJIAggCYVCP4ohCCAEIAUgFnx8IQQgDyAEhUIgiiEPIAogD3whCiAFIAqFQhiKIQUgBCAFIBR8fCEEIA8gBIVCEIohDyAKIA98IQogBSAKhUI/iiEFICEgISkDACABIAmFhTcDACAiICIpAwAgAiAKhYU3AwAgIyAjKQMAIAMgC4WFNwMAICQgJCkDACAEIAyFhTcDACAlICUpAwAgBSANhYU3AwAgJiAmKQMAIAYgDoWFNwMAICcgJykDACAHIA+FhTcDACAoICgpAwAgCCAQhYU3AwAL"), r = null, i = {
155
+ var e = s && s.imports, t = us("AGFzbQEAAAABEANgAn9/AGADf39/AGABfwADBQQAAQICBQUBAQroBwdNBQZtZW1vcnkCAAxibGFrZTJiX2luaXQAAA5ibGFrZTJiX3VwZGF0ZQABDWJsYWtlMmJfZmluYWwAAhBibGFrZTJiX2NvbXByZXNzAAMK00AElgMAIABCADcDACAAQQhqQgA3AwAgAEEQakIANwMAIABBGGpCADcDACAAQSBqQgA3AwAgAEEoakIANwMAIABBMGpCADcDACAAQThqQgA3AwAgAEHAAGpCADcDACAAQcgAakIANwMAIABB0ABqQgA3AwAgAEHYAGpCADcDACAAQeAAakIANwMAIABB6ABqQgA3AwAgAEHwAGpCADcDACAAQfgAakIANwMAIABBgAFqQoiS853/zPmE6gBBACkDAIU3AwAgAEGIAWpCu86qptjQ67O7f0EIKQMAhTcDACAAQZABakKr8NP0r+68tzxBECkDAIU3AwAgAEGYAWpC8e30+KWn/aelf0EYKQMAhTcDACAAQaABakLRhZrv+s+Uh9EAQSApAwCFNwMAIABBqAFqQp/Y+dnCkdqCm39BKCkDAIU3AwAgAEGwAWpC6/qG2r+19sEfQTApAwCFNwMAIABBuAFqQvnC+JuRo7Pw2wBBOCkDAIU3AwAgAEHAAWpCADcDACAAQcgBakIANwMAIABB0AFqQgA3AwALbQEDfyAAQcABaiEDIABByAFqIQQgBCkDAKchBQJAA0AgASACRg0BIAVBgAFGBEAgAyADKQMAIAWtfDcDAEEAIQUgABADCyAAIAVqIAEtAAA6AAAgBUEBaiEFIAFBAWohAQwACwsgBCAFrTcDAAtkAQN/IABBwAFqIQEgAEHIAWohAiABIAEpAwAgAikDAHw3AwAgAEHQAWpCfzcDACACKQMApyEDAkADQCADQYABRg0BIAAgA2pBADoAACADQQFqIQMMAAsLIAIgA603AwAgABADC+U7AiB+CX8gAEGAAWohISAAQYgBaiEiIABBkAFqISMgAEGYAWohJCAAQaABaiElIABBqAFqISYgAEGwAWohJyAAQbgBaiEoICEpAwAhASAiKQMAIQIgIykDACEDICQpAwAhBCAlKQMAIQUgJikDACEGICcpAwAhByAoKQMAIQhCiJLznf/M+YTqACEJQrvOqqbY0Ouzu38hCkKr8NP0r+68tzwhC0Lx7fT4paf9p6V/IQxC0YWa7/rPlIfRACENQp/Y+dnCkdqCm38hDkL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4WFNwMAICQgJCkDACAEIAyFhTcDACAlICUpAwAgBSANhYU3AwAgJiAmKQMAIAYgDoWFNwMAICcgJykDACAHIA+FhTcDACAoICgpAwAgCCAQhYU3AwAL"), r = null, i = {
357
156
  buffer: t,
358
157
  memory: null,
359
158
  exports: null,
@@ -385,69 +184,69 @@ function Pt(s) {
385
184
  i.exports = c.instance.exports, i.memory = i.exports.memory && i.exports.memory.buffer && new Uint8Array(i.exports.memory.buffer);
386
185
  }
387
186
  }
388
- function ps(s) {
389
- return typeof atob == "function" ? new Uint8Array(atob(s).split("").map(ws)) : new (_s("buffer")).Buffer(s, "base64");
187
+ function us(s) {
188
+ return typeof atob == "function" ? new Uint8Array(atob(s).split("").map(ds)) : new (Is("buffer")).Buffer(s, "base64");
390
189
  }
391
- function ws(s) {
190
+ function ds(s) {
392
191
  return s.charCodeAt(0);
393
192
  }
394
- var U = xe, _ = Cs(), M = 64, pt = [];
395
- N.exports = D;
396
- var se = N.exports.BYTES_MIN = 16, re = N.exports.BYTES_MAX = 64;
397
- N.exports.BYTES = 32;
398
- var ie = N.exports.KEYBYTES_MIN = 16, ae = N.exports.KEYBYTES_MAX = 64;
399
- N.exports.KEYBYTES = 32;
400
- var ne = N.exports.SALTBYTES = 16, oe = N.exports.PERSONALBYTES = 16;
193
+ var k = Qe, C = hs(), V = 64, wt = [];
194
+ P.exports = D;
195
+ var jt = P.exports.BYTES_MIN = 16, Xt = P.exports.BYTES_MAX = 64;
196
+ P.exports.BYTES = 32;
197
+ var Zt = P.exports.KEYBYTES_MIN = 16, te = P.exports.KEYBYTES_MAX = 64;
198
+ P.exports.KEYBYTES = 32;
199
+ var ee = P.exports.SALTBYTES = 16, se = P.exports.PERSONALBYTES = 16;
401
200
  function D(s, e, t, r, i) {
402
201
  if (!(this instanceof D))
403
202
  return new D(s, e, t, r, i);
404
- if (!(_ && _.exports))
203
+ if (!(C && C.exports))
405
204
  throw new Error("WASM not loaded. Wait for Blake2b.ready(cb)");
406
- s || (s = 32), i !== !0 && (U(s >= se, "digestLength must be at least " + se + ", was given " + s), U(s <= re, "digestLength must be at most " + re + ", was given " + s), e != null && U(e.length >= ie, "key must be at least " + ie + ", was given " + e.length), e != null && U(e.length <= ae, "key must be at least " + ae + ", was given " + e.length), t != null && U(t.length === ne, "salt must be exactly " + ne + ", was given " + t.length), r != null && U(r.length === oe, "personal must be exactly " + oe + ", was given " + r.length)), pt.length || (pt.push(M), M += 216), this.digestLength = s, this.finalized = !1, this.pointer = pt.pop(), _.memory.fill(0, 0, 64), _.memory[0] = this.digestLength, _.memory[1] = e ? e.length : 0, _.memory[2] = 1, _.memory[3] = 1, t && _.memory.set(t, 32), r && _.memory.set(r, 48), this.pointer + 216 > _.memory.length && _.realloc(this.pointer + 216), _.exports.blake2b_init(this.pointer, this.digestLength), e && (this.update(e), _.memory.fill(0, M, M + e.length), _.memory[this.pointer + 200] = 128);
205
+ s || (s = 32), i !== !0 && (k(s >= jt, "digestLength must be at least " + jt + ", was given " + s), k(s <= Xt, "digestLength must be at most " + Xt + ", was given " + s), e != null && k(e.length >= Zt, "key must be at least " + Zt + ", was given " + e.length), e != null && k(e.length <= te, "key must be at least " + te + ", was given " + e.length), t != null && k(t.length === ee, "salt must be exactly " + ee + ", was given " + t.length), r != null && k(r.length === se, "personal must be exactly " + se + ", was given " + r.length)), wt.length || (wt.push(V), V += 216), this.digestLength = s, this.finalized = !1, this.pointer = wt.pop(), C.memory.fill(0, 0, 64), C.memory[0] = this.digestLength, C.memory[1] = e ? e.length : 0, C.memory[2] = 1, C.memory[3] = 1, t && C.memory.set(t, 32), r && C.memory.set(r, 48), this.pointer + 216 > C.memory.length && C.realloc(this.pointer + 216), C.exports.blake2b_init(this.pointer, this.digestLength), e && (this.update(e), C.memory.fill(0, V, V + e.length), C.memory[this.pointer + 200] = 128);
407
206
  }
408
207
  D.prototype.update = function(s) {
409
- return U(this.finalized === !1, "Hash instance finalized"), U(s, "input must be TypedArray or Buffer"), M + s.length > _.memory.length && _.realloc(M + s.length), _.memory.set(s, M), _.exports.blake2b_update(this.pointer, M, M + s.length), this;
208
+ return k(this.finalized === !1, "Hash instance finalized"), k(s, "input must be TypedArray or Buffer"), V + s.length > C.memory.length && C.realloc(V + s.length), C.memory.set(s, V), C.exports.blake2b_update(this.pointer, V, V + s.length), this;
410
209
  };
411
210
  D.prototype.digest = function(s) {
412
- if (U(this.finalized === !1, "Hash instance finalized"), this.finalized = !0, pt.push(this.pointer), _.exports.blake2b_final(this.pointer), !s || s === "binary")
413
- return _.memory.slice(this.pointer + 128, this.pointer + 128 + this.digestLength);
211
+ if (k(this.finalized === !1, "Hash instance finalized"), this.finalized = !0, wt.push(this.pointer), C.exports.blake2b_final(this.pointer), !s || s === "binary")
212
+ return C.memory.slice(this.pointer + 128, this.pointer + 128 + this.digestLength);
414
213
  if (s === "hex")
415
- return ms(_.memory, this.pointer + 128, this.digestLength);
416
- U(s.length >= this.digestLength, "input must be TypedArray or Buffer");
214
+ return gs(C.memory, this.pointer + 128, this.digestLength);
215
+ k(s.length >= this.digestLength, "input must be TypedArray or Buffer");
417
216
  for (var e = 0; e < this.digestLength; e++)
418
- s[e] = _.memory[this.pointer + 128 + e];
217
+ s[e] = C.memory[this.pointer + 128 + e];
419
218
  return s;
420
219
  };
421
220
  D.prototype.final = D.prototype.digest;
422
- D.WASM = _ && _.buffer;
221
+ D.WASM = C && C.buffer;
423
222
  D.SUPPORTED = typeof WebAssembly < "u";
424
223
  D.ready = function(s) {
425
- if (s || (s = ys), !_)
224
+ if (s || (s = ls), !C)
426
225
  return s(new Error("WebAssembly not supported"));
427
226
  var e = new Promise(function(t, r) {
428
- _.onload(function(i) {
227
+ C.onload(function(i) {
429
228
  i ? r() : t(), s(i);
430
229
  });
431
230
  });
432
231
  return e;
433
232
  };
434
233
  D.prototype.ready = D.ready;
435
- function ys() {
234
+ function ls() {
436
235
  }
437
- function ms(s, e, t) {
236
+ function gs(s, e, t) {
438
237
  for (var r = "", i = 0; i < t; i++)
439
- r += Es(s[e + i]);
238
+ r += fs(s[e + i]);
440
239
  return r;
441
240
  }
442
- function Es(s) {
241
+ function fs(s) {
443
242
  return s < 16 ? "0" + s.toString(16) : s.toString(16);
444
243
  }
445
- var L = xe, It = N.exports;
244
+ var z = Qe, ut = P.exports;
446
245
  function gt(s, e, t) {
447
246
  var r = s[e] + s[t], i = s[e + 1] + s[t + 1];
448
247
  r >= 4294967296 && i++, s[e] = r, s[e + 1] = i;
449
248
  }
450
- function Ae(s, e, t, r) {
249
+ function re(s, e, t, r) {
451
250
  var i = s[e] + t;
452
251
  t < 0 && (i += 4294967296);
453
252
  var n = s[e + 1] + r;
@@ -456,11 +255,11 @@ function Ae(s, e, t, r) {
456
255
  function Se(s, e) {
457
256
  return s[e] ^ s[e + 1] << 8 ^ s[e + 2] << 16 ^ s[e + 3] << 24;
458
257
  }
459
- function G(s, e, t, r, i, n) {
460
- var o = ot[i], A = ot[i + 1], c = ot[n], I = ot[n + 1];
461
- gt(d, s, e), Ae(d, s, o, A);
258
+ function $(s, e, t, r, i, n) {
259
+ var o = ct[i], A = ct[i + 1], c = ct[n], I = ct[n + 1];
260
+ gt(d, s, e), re(d, s, o, A);
462
261
  var u = d[r] ^ d[s], h = d[r + 1] ^ d[s + 1];
463
- d[r] = h, d[r + 1] = u, gt(d, t, r), u = d[e] ^ d[t], h = d[e + 1] ^ d[t + 1], d[e] = u >>> 24 ^ h << 8, d[e + 1] = h >>> 24 ^ u << 8, gt(d, s, e), Ae(d, s, c, I), u = d[r] ^ d[s], h = d[r + 1] ^ d[s + 1], d[r] = u >>> 16 ^ h << 16, d[r + 1] = h >>> 16 ^ u << 16, gt(d, t, r), u = d[e] ^ d[t], h = d[e + 1] ^ d[t + 1], d[e] = h >>> 31 ^ u << 1, d[e + 1] = u >>> 31 ^ h << 1;
262
+ d[r] = h, d[r + 1] = u, gt(d, t, r), u = d[e] ^ d[t], h = d[e + 1] ^ d[t + 1], d[e] = u >>> 24 ^ h << 8, d[e + 1] = h >>> 24 ^ u << 8, gt(d, s, e), re(d, s, c, I), u = d[r] ^ d[s], h = d[r + 1] ^ d[s + 1], d[r] = u >>> 16 ^ h << 16, d[r + 1] = h >>> 16 ^ u << 16, gt(d, t, r), u = d[e] ^ d[t], h = d[e + 1] ^ d[t + 1], d[e] = h >>> 31 ^ u << 1, d[e + 1] = u >>> 31 ^ h << 1;
464
263
  }
465
264
  var De = new Uint32Array([
466
265
  4089235720,
@@ -479,7 +278,7 @@ var De = new Uint32Array([
479
278
  528734635,
480
279
  327033209,
481
280
  1541459225
482
- ]), Bs = [
281
+ ]), _s = [
483
282
  0,
484
283
  1,
485
284
  2,
@@ -672,21 +471,21 @@ var De = new Uint32Array([
672
471
  7,
673
472
  5,
674
473
  3
675
- ], m = new Uint8Array(Bs.map(function(s) {
474
+ ], E = new Uint8Array(_s.map(function(s) {
676
475
  return s * 2;
677
- })), d = new Uint32Array(32), ot = new Uint32Array(32);
476
+ })), d = new Uint32Array(32), ct = new Uint32Array(32);
678
477
  function ve(s, e) {
679
478
  var t = 0;
680
479
  for (t = 0; t < 16; t++)
681
480
  d[t] = s.h[t], d[t + 16] = De[t];
682
481
  for (d[24] = d[24] ^ s.t, d[25] = d[25] ^ s.t / 4294967296, e && (d[28] = ~d[28], d[29] = ~d[29]), t = 0; t < 32; t++)
683
- ot[t] = Se(s.b, 4 * t);
482
+ ct[t] = Se(s.b, 4 * t);
684
483
  for (t = 0; t < 12; t++)
685
- G(0, 8, 16, 24, m[t * 16 + 0], m[t * 16 + 1]), G(2, 10, 18, 26, m[t * 16 + 2], m[t * 16 + 3]), G(4, 12, 20, 28, m[t * 16 + 4], m[t * 16 + 5]), G(6, 14, 22, 30, m[t * 16 + 6], m[t * 16 + 7]), G(0, 10, 20, 30, m[t * 16 + 8], m[t * 16 + 9]), G(2, 12, 22, 24, m[t * 16 + 10], m[t * 16 + 11]), G(4, 14, 16, 26, m[t * 16 + 12], m[t * 16 + 13]), G(6, 8, 18, 28, m[t * 16 + 14], m[t * 16 + 15]);
484
+ $(0, 8, 16, 24, E[t * 16 + 0], E[t * 16 + 1]), $(2, 10, 18, 26, E[t * 16 + 2], E[t * 16 + 3]), $(4, 12, 20, 28, E[t * 16 + 4], E[t * 16 + 5]), $(6, 14, 22, 30, E[t * 16 + 6], E[t * 16 + 7]), $(0, 10, 20, 30, E[t * 16 + 8], E[t * 16 + 9]), $(2, 12, 22, 24, E[t * 16 + 10], E[t * 16 + 11]), $(4, 14, 16, 26, E[t * 16 + 12], E[t * 16 + 13]), $(6, 8, 18, 28, E[t * 16 + 14], E[t * 16 + 15]);
686
485
  for (t = 0; t < 16; t++)
687
486
  s.h[t] = s.h[t] ^ d[t] ^ d[t + 16];
688
487
  }
689
- var R = new Uint8Array([
488
+ var q = new Uint8Array([
690
489
  0,
691
490
  0,
692
491
  0,
@@ -752,22 +551,22 @@ var R = new Uint8Array([
752
551
  0,
753
552
  0
754
553
  ]);
755
- function st(s, e, t, r) {
756
- R.fill(0), this.b = new Uint8Array(128), this.h = new Uint32Array(16), this.t = 0, this.c = 0, this.outlen = s, R[0] = s, e && (R[1] = e.length), R[2] = 1, R[3] = 1, t && R.set(t, 32), r && R.set(r, 48);
554
+ function rt(s, e, t, r) {
555
+ q.fill(0), this.b = new Uint8Array(128), this.h = new Uint32Array(16), this.t = 0, this.c = 0, this.outlen = s, q[0] = s, e && (q[1] = e.length), q[2] = 1, q[3] = 1, t && q.set(t, 32), r && q.set(r, 48);
757
556
  for (var i = 0; i < 16; i++)
758
- this.h[i] = De[i] ^ Se(R, i * 4);
557
+ this.h[i] = De[i] ^ Se(q, i * 4);
759
558
  e && (be(this, e), this.c = 128);
760
559
  }
761
- st.prototype.update = function(s) {
762
- return L(s != null, "input must be Uint8Array or Buffer"), be(this, s), this;
560
+ rt.prototype.update = function(s) {
561
+ return z(s != null, "input must be Uint8Array or Buffer"), be(this, s), this;
763
562
  };
764
- st.prototype.digest = function(s) {
563
+ rt.prototype.digest = function(s) {
765
564
  var e = !s || s === "binary" || s === "hex" ? new Uint8Array(this.outlen) : s;
766
- return L(e.length >= this.outlen, "out must have at least outlen bytes of space"), Qs(this, e), s === "hex" ? xs(e) : e;
565
+ return z(e.length >= this.outlen, "out must have at least outlen bytes of space"), Cs(this, e), s === "hex" ? ps(e) : e;
767
566
  };
768
- st.prototype.final = st.prototype.digest;
769
- st.ready = function(s) {
770
- It.ready(function() {
567
+ rt.prototype.final = rt.prototype.digest;
568
+ rt.ready = function(s) {
569
+ ut.ready(function() {
771
570
  s();
772
571
  });
773
572
  };
@@ -775,7 +574,7 @@ function be(s, e) {
775
574
  for (var t = 0; t < e.length; t++)
776
575
  s.c === 128 && (s.t += s.c, ve(s, !1), s.c = 0), s.b[s.c++] = e[t];
777
576
  }
778
- function Qs(s, e) {
577
+ function Cs(s, e) {
779
578
  for (s.t += s.c; s.c < 128; )
780
579
  s.b[s.c++] = 0;
781
580
  ve(s, !0);
@@ -783,57 +582,57 @@ function Qs(s, e) {
783
582
  e[t] = s.h[t >> 2] >> 8 * (t & 3);
784
583
  return e;
785
584
  }
786
- function xs(s) {
585
+ function ps(s) {
787
586
  for (var e = "", t = 0; t < s.length; t++)
788
- e += Ss(s[t]);
587
+ e += ws(s[t]);
789
588
  return e;
790
589
  }
791
- function Ss(s) {
590
+ function ws(s) {
792
591
  return s < 16 ? "0" + s.toString(16) : s.toString(16);
793
592
  }
794
- var Ke = st;
795
- x.exports = function(e, t, r, i, n) {
796
- return n !== !0 && (L(e >= ce, "outlen must be at least " + ce + ", was given " + e), L(e <= Ie, "outlen must be at most " + Ie + ", was given " + e), t != null && L(t.length >= he, "key must be at least " + he + ", was given " + t.length), t != null && L(t.length <= ue, "key must be at most " + ue + ", was given " + t.length), r != null && L(r.length === de, "salt must be exactly " + de + ", was given " + r.length), i != null && L(i.length === le, "personal must be exactly " + le + ", was given " + i.length)), new Ke(e, t, r, i);
593
+ var Ke = rt;
594
+ Q.exports = function(e, t, r, i, n) {
595
+ return n !== !0 && (z(e >= ie, "outlen must be at least " + ie + ", was given " + e), z(e <= ae, "outlen must be at most " + ae + ", was given " + e), t != null && z(t.length >= ne, "key must be at least " + ne + ", was given " + t.length), t != null && z(t.length <= oe, "key must be at most " + oe + ", was given " + t.length), r != null && z(r.length === Ae, "salt must be exactly " + Ae + ", was given " + r.length), i != null && z(i.length === ce, "personal must be exactly " + ce + ", was given " + i.length)), new Ke(e, t, r, i);
797
596
  };
798
- x.exports.ready = function(s) {
799
- It.ready(function() {
597
+ Q.exports.ready = function(s) {
598
+ ut.ready(function() {
800
599
  s();
801
600
  });
802
601
  };
803
- x.exports.WASM_SUPPORTED = It.SUPPORTED;
804
- x.exports.WASM_LOADED = !1;
805
- var ce = x.exports.BYTES_MIN = 16, Ie = x.exports.BYTES_MAX = 64;
806
- x.exports.BYTES = 32;
807
- var he = x.exports.KEYBYTES_MIN = 16, ue = x.exports.KEYBYTES_MAX = 64;
808
- x.exports.KEYBYTES = 32;
809
- var de = x.exports.SALTBYTES = 16, le = x.exports.PERSONALBYTES = 16;
810
- It.ready(function(s) {
811
- s || (x.exports.WASM_LOADED = !0, Ke = It);
602
+ Q.exports.WASM_SUPPORTED = ut.SUPPORTED;
603
+ Q.exports.WASM_LOADED = !1;
604
+ var ie = Q.exports.BYTES_MIN = 16, ae = Q.exports.BYTES_MAX = 64;
605
+ Q.exports.BYTES = 32;
606
+ var ne = Q.exports.KEYBYTES_MIN = 16, oe = Q.exports.KEYBYTES_MAX = 64;
607
+ Q.exports.KEYBYTES = 32;
608
+ var Ae = Q.exports.SALTBYTES = 16, ce = Q.exports.PERSONALBYTES = 16;
609
+ ut.ready(function(s) {
610
+ s || (Q.exports.WASM_LOADED = !0, Ke = ut);
812
611
  });
813
- var rt = {};
814
- Object.defineProperty(rt, "__esModule", { value: !0 });
815
- rt.bech32m = rt.bech32 = void 0;
816
- const Bt = "qpzry9x8gf2tvdw0s3jn54khce6mua7l", Ue = {};
817
- for (let s = 0; s < Bt.length; s++) {
818
- const e = Bt.charAt(s);
612
+ var it = {};
613
+ Object.defineProperty(it, "__esModule", { value: !0 });
614
+ it.bech32m = it.bech32 = void 0;
615
+ const xt = "qpzry9x8gf2tvdw0s3jn54khce6mua7l", Ue = {};
616
+ for (let s = 0; s < xt.length; s++) {
617
+ const e = xt.charAt(s);
819
618
  Ue[e] = s;
820
619
  }
821
- function et(s) {
620
+ function st(s) {
822
621
  const e = s >> 25;
823
622
  return (s & 33554431) << 5 ^ -(e >> 0 & 1) & 996825010 ^ -(e >> 1 & 1) & 642813549 ^ -(e >> 2 & 1) & 513874426 ^ -(e >> 3 & 1) & 1027748829 ^ -(e >> 4 & 1) & 705979059;
824
623
  }
825
- function ge(s) {
624
+ function Ie(s) {
826
625
  let e = 1;
827
626
  for (let t = 0; t < s.length; ++t) {
828
627
  const r = s.charCodeAt(t);
829
628
  if (r < 33 || r > 126)
830
629
  return "Invalid prefix (" + s + ")";
831
- e = et(e) ^ r >> 5;
630
+ e = st(e) ^ r >> 5;
832
631
  }
833
- e = et(e);
632
+ e = st(e);
834
633
  for (let t = 0; t < s.length; ++t) {
835
634
  const r = s.charCodeAt(t);
836
- e = et(e) ^ r & 31;
635
+ e = st(e) ^ r & 31;
837
636
  }
838
637
  return e;
839
638
  }
@@ -853,15 +652,15 @@ function Mt(s, e, t, r) {
853
652
  }
854
653
  return A;
855
654
  }
856
- function Ds(s) {
655
+ function ys(s) {
857
656
  return Mt(s, 8, 5, !0);
858
657
  }
859
- function vs(s) {
658
+ function ms(s) {
860
659
  const e = Mt(s, 5, 8, !1);
861
660
  if (Array.isArray(e))
862
661
  return e;
863
662
  }
864
- function bs(s) {
663
+ function Es(s) {
865
664
  const e = Mt(s, 5, 8, !1);
866
665
  if (Array.isArray(e))
867
666
  return e;
@@ -874,22 +673,22 @@ function ke(s) {
874
673
  if (c = c || 90, o.length + 7 + A.length > c)
875
674
  throw new TypeError("Exceeds length limit");
876
675
  o = o.toLowerCase();
877
- let I = ge(o);
676
+ let I = Ie(o);
878
677
  if (typeof I == "string")
879
678
  throw new Error(I);
880
679
  let u = o + "1";
881
680
  for (let h = 0; h < A.length; ++h) {
882
- const C = A[h];
883
- if (C >> 5 !== 0)
681
+ const g = A[h];
682
+ if (g >> 5 !== 0)
884
683
  throw new Error("Non 5-bit word");
885
- I = et(I) ^ C, u += Bt.charAt(C);
684
+ I = st(I) ^ g, u += xt.charAt(g);
886
685
  }
887
686
  for (let h = 0; h < 6; ++h)
888
- I = et(I);
687
+ I = st(I);
889
688
  I ^= e;
890
689
  for (let h = 0; h < 6; ++h) {
891
- const C = I >> (5 - h) * 5 & 31;
892
- u += Bt.charAt(C);
690
+ const g = I >> (5 - h) * 5 & 31;
691
+ u += xt.charAt(g);
893
692
  }
894
693
  return u;
895
694
  }
@@ -907,20 +706,20 @@ function ke(s) {
907
706
  return "No separator character for " + o;
908
707
  if (u === 0)
909
708
  return "Missing prefix for " + o;
910
- const h = o.slice(0, u), C = o.slice(u + 1);
911
- if (C.length < 6)
709
+ const h = o.slice(0, u), g = o.slice(u + 1);
710
+ if (g.length < 6)
912
711
  return "Data too short";
913
- let E = ge(h);
914
- if (typeof E == "string")
915
- return E;
916
- const J = [];
917
- for (let H = 0; H < C.length; ++H) {
918
- const O = C.charAt(H), g = Ue[O];
919
- if (g === void 0)
920
- return "Unknown character " + O;
921
- E = et(E) ^ g, !(H + 6 >= C.length) && J.push(g);
712
+ let p = Ie(h);
713
+ if (typeof p == "string")
714
+ return p;
715
+ const x = [];
716
+ for (let M = 0; M < g.length; ++M) {
717
+ const L = g.charAt(M), _ = Ue[L];
718
+ if (_ === void 0)
719
+ return "Unknown character " + L;
720
+ p = st(p) ^ _, !(M + 6 >= g.length) && x.push(_);
922
721
  }
923
- return E !== e ? "Invalid checksum for " + o : { prefix: h, words: J };
722
+ return p !== e ? "Invalid checksum for " + o : { prefix: h, words: x };
924
723
  }
925
724
  function i(o, A) {
926
725
  const c = r(o, A);
@@ -937,69 +736,320 @@ function ke(s) {
937
736
  decodeUnsafe: i,
938
737
  decode: n,
939
738
  encode: t,
940
- toWords: Ds,
941
- fromWordsUnsafe: vs,
942
- fromWords: bs
739
+ toWords: ys,
740
+ fromWordsUnsafe: ms,
741
+ fromWords: Es
943
742
  };
944
743
  }
945
- rt.bech32 = ke("bech32");
946
- rt.bech32m = ke("bech32m");
947
- var Ks = ee && ee.__importDefault || function(s) {
744
+ it.bech32 = ke("bech32");
745
+ it.bech32m = ke("bech32m");
746
+ var Bs = Wt && Wt.__importDefault || function(s) {
948
747
  return s && s.__esModule ? s : { default: s };
949
748
  };
950
- Object.defineProperty(Qe, "__esModule", { value: !0 });
951
- const Us = Ks(x.exports), ft = rt, vt = "asset";
952
- class ct {
749
+ Object.defineProperty(xe, "__esModule", { value: !0 });
750
+ const xs = Bs(Q.exports), ft = it, Kt = "asset";
751
+ class ht {
953
752
  constructor(e) {
954
753
  this.hashBuf = e;
955
754
  }
956
755
  static fromHash(e) {
957
- return new ct(e);
756
+ return new ht(e);
958
757
  }
959
758
  static fromParts(e, t) {
960
- const r = (0, Us.default)(20).update(new Uint8Array([...e, ...t])).digest("binary");
961
- return ct.fromHash(r);
759
+ const r = (0, xs.default)(20).update(new Uint8Array([...e, ...t])).digest("binary");
760
+ return ht.fromHash(r);
962
761
  }
963
762
  static fromBech32(e) {
964
763
  const { prefix: t, words: r } = ft.bech32.decode(e);
965
- if (t !== vt)
764
+ if (t !== Kt)
966
765
  throw new Error("Invalid asset fingerprint");
967
766
  const i = Buffer.from(ft.bech32.fromWords(r));
968
- return ct.fromHash(i);
767
+ return ht.fromHash(i);
969
768
  }
970
769
  fingerprint() {
971
770
  const e = ft.bech32.toWords(this.hashBuf);
972
- return ft.bech32.encode(vt, e);
771
+ return ft.bech32.encode(Kt, e);
973
772
  }
974
773
  hash() {
975
774
  return Buffer.from(this.hashBuf).toString("hex");
976
775
  }
977
776
  prefix() {
978
- return vt;
777
+ return Kt;
979
778
  }
980
779
  checksum() {
981
780
  return this.fingerprint().slice(-6);
982
781
  }
983
782
  }
984
- var ks = Qe.default = ct;
985
- const Fs = ks, Ns = (s, e) => {
986
- const t = $e(s), r = t.derive(Dt + 1852).derive(Dt + 1815).derive(Dt + e), i = r.derive(0).derive(0).to_raw_key(), n = r.derive(2).derive(0).to_raw_key();
783
+ var Qs = xe.default = ht;
784
+ const Ss = Qs, Ds = (s, e) => {
785
+ const t = vs(s), r = t.derive(bt + 1852).derive(bt + 1815).derive(bt + e), i = r.derive(0).derive(0).to_raw_key(), n = r.derive(2).derive(0).to_raw_key();
987
786
  return r.free(), t.free(), { paymentKey: i, stakeKey: n };
988
- }, qs = (s) => {
989
- const e = W(s);
787
+ }, tt = (s) => a.Address.from_bytes(f(s)), vs = (s) => a.Bip32PrivateKey.from_bytes(f(s)), bs = (s) => a.DataHash.from_bytes(f(s)), F = (s) => a.Ed25519KeyHash.from_bytes(f(s)), Ks = (s) => a.Ed25519Signature.from_bytes(f(s)), St = (s) => a.NativeScript.from_bytes(f(s)), Us = (s) => a.PublicKey.from_bytes(f(s)), ks = (s) => a.PlutusData.from_bytes(f(s)), at = (s, e) => a.PlutusScript.from_bytes_with_version(f(s), mt[e]), Fs = (s) => a.ScriptRef.from_bytes(f(s)), Ns = (s) => a.ScriptHash.from_bytes(f(s)), W = (s) => a.Transaction.from_bytes(f(s)), Fe = (s) => a.TransactionHash.from_bytes(f(s)), he = (s) => a.TransactionUnspentOutput.from_bytes(f(s)), Hs = (s) => a.TransactionWitnessSet.from_bytes(f(s)), Ps = (s) => a.Value.from_bytes(f(s)), H = (s) => a.Address.from_bech32(s), Tt = (s) => a.BaseAddress.from_address(H(s)), Ne = (s) => a.EnterpriseAddress.from_address(H(s)), He = (s) => a.RewardAddress.from_address(H(s)), K = (s) => Buffer.from(s).toString("hex"), f = (s) => s.length % 2 === 0 && /^[0-9A-F]*$/i.test(s) ? Buffer.from(s, "hex") : Buffer.from(s, "utf-8"), Dt = (s) => {
788
+ const e = (t) => {
789
+ const r = new Array();
790
+ for (let i = 0; i < t.len(); i += 1)
791
+ r.push(Dt(t.get(i)));
792
+ return r;
793
+ };
794
+ switch (s.kind()) {
795
+ case a.NativeScriptKind.ScriptAll: {
796
+ const t = s.as_script_all();
797
+ return {
798
+ type: "all",
799
+ scripts: e(t.native_scripts())
800
+ };
801
+ }
802
+ case a.NativeScriptKind.ScriptAny: {
803
+ const t = s.as_script_any();
804
+ return {
805
+ type: "any",
806
+ scripts: e(t.native_scripts())
807
+ };
808
+ }
809
+ case a.NativeScriptKind.ScriptNOfK: {
810
+ const t = s.as_script_n_of_k();
811
+ return {
812
+ type: "atLeast",
813
+ required: t.n(),
814
+ scripts: e(t.native_scripts())
815
+ };
816
+ }
817
+ case a.NativeScriptKind.TimelockStart: {
818
+ const t = s.as_timelock_start();
819
+ return {
820
+ type: "after",
821
+ slot: t.slot_bignum().to_str()
822
+ };
823
+ }
824
+ case a.NativeScriptKind.TimelockExpiry: {
825
+ const t = s.as_timelock_expiry();
826
+ return {
827
+ type: "before",
828
+ slot: t.slot_bignum().to_str()
829
+ };
830
+ }
831
+ case a.NativeScriptKind.ScriptPubkey: {
832
+ const t = s.as_script_pubkey();
833
+ return {
834
+ type: "sig",
835
+ keyHash: t.addr_keyhash().to_hex()
836
+ };
837
+ }
838
+ default:
839
+ throw new Error(`Script Kind: ${s.kind()}, is not supported`);
840
+ }
841
+ }, vt = (s) => {
842
+ const e = (t) => {
843
+ const r = a.NativeScripts.new();
844
+ return t.forEach((i) => {
845
+ r.add(vt(i));
846
+ }), r;
847
+ };
848
+ switch (s.type) {
849
+ case "all":
850
+ return a.NativeScript.new_script_all(a.ScriptAll.new(e(s.scripts)));
851
+ case "any":
852
+ return a.NativeScript.new_script_any(a.ScriptAny.new(e(s.scripts)));
853
+ case "atLeast":
854
+ return a.NativeScript.new_script_n_of_k(a.ScriptNOfK.new(s.required, e(s.scripts)));
855
+ case "after":
856
+ return a.NativeScript.new_timelock_start(a.TimelockStart.new_timelockstart(a.BigNum.from_str(s.slot)));
857
+ case "before":
858
+ return a.NativeScript.new_timelock_expiry(a.TimelockExpiry.new_timelockexpiry(a.BigNum.from_str(s.slot)));
859
+ case "sig":
860
+ return a.NativeScript.new_script_pubkey(a.ScriptPubkey.new(F(s.keyHash)));
861
+ }
862
+ }, X = (s) => {
863
+ const e = (t) => {
864
+ const r = a.PlutusList.new();
865
+ return t.forEach((i) => {
866
+ r.add(X(i));
867
+ }), r;
868
+ };
869
+ switch (typeof s) {
870
+ case "string":
871
+ return a.PlutusData.new_bytes(f(s));
872
+ case "number":
873
+ return a.PlutusData.new_integer(a.BigInt.from_str(s.toString()));
874
+ case "object":
875
+ if (s instanceof Array) {
876
+ const t = e(s);
877
+ return a.PlutusData.new_list(t);
878
+ } else if (s instanceof Map) {
879
+ const t = a.PlutusMap.new();
880
+ return s.forEach((r, i) => {
881
+ t.insert(X(i), X(r));
882
+ }), a.PlutusData.new_map(t);
883
+ } else
884
+ return a.PlutusData.new_constr_plutus_data(a.ConstrPlutusData.new(a.BigNum.from_str(s.alternative.toString()), e(s.fields)));
885
+ }
886
+ }, Ms = (s) => {
887
+ const e = a.Relays.new();
888
+ throw s.relays.forEach((t) => {
889
+ e.add(Ts(t));
890
+ }), new Error("toPoolParams not implemented.");
891
+ }, Pe = (s) => {
892
+ const e = (t) => je[t];
893
+ return a.Redeemer.new(e(s.tag), a.BigNum.from_str(s.index.toString()), X(s.data), a.ExUnits.new(a.BigNum.from_str(s.budget.mem.toString()), a.BigNum.from_str(s.budget.steps.toString())));
894
+ }, Ts = (s) => {
895
+ switch (s.type) {
896
+ case "SingleHostAddr": {
897
+ 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;
898
+ return a.Relay.new_single_host_addr(a.SingleHostAddr.new(s.port, e, t));
899
+ }
900
+ case "SingleHostName":
901
+ return a.Relay.new_single_host_name(a.SingleHostName.new(s.port, a.DNSRecordAorAAAA.new(s.domainName)));
902
+ case "MultiHostName":
903
+ return a.Relay.new_multi_host_name(a.MultiHostName.new(a.DNSRecordSRV.new(s.domainName)));
904
+ }
905
+ }, Me = (s) => {
906
+ if (s.is_plutus_script()) {
907
+ const t = s.plutus_script();
908
+ return {
909
+ code: t.to_hex(),
910
+ version: Object.keys(mt).find((r) => mt[r].to_hex() === t.language_version().to_hex())
911
+ };
912
+ }
913
+ const e = s.native_script();
914
+ return Dt(e);
915
+ }, dt = (s) => {
916
+ if ("code" in s) {
917
+ const e = at(s.code, s.version);
918
+ return a.ScriptRef.new_plutus_script(e);
919
+ }
920
+ return a.ScriptRef.new_native_script(vt(s));
921
+ }, Qt = (s) => {
922
+ var i, n, o;
923
+ 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;
924
+ return {
925
+ input: {
926
+ outputIndex: s.input().index(),
927
+ txHash: s.input().transaction_id().to_hex()
928
+ },
929
+ output: {
930
+ address: s.output().address().to_bech32(),
931
+ amount: Te(s.output().amount()),
932
+ dataHash: e,
933
+ plutusData: t,
934
+ scriptRef: r
935
+ }
936
+ };
937
+ }, O = (s) => {
938
+ const e = a.TransactionInput.new(Fe(s.input.txHash), s.input.outputIndex), t = a.TransactionOutput.new(H(s.output.address), yt(s.output.amount));
939
+ return s.output.dataHash !== void 0 && t.set_data_hash(bs(s.output.dataHash)), s.output.plutusData !== void 0 && t.set_plutus_data(ks(s.output.plutusData)), s.output.scriptRef !== void 0 && t.set_script_ref(Fs(s.output.scriptRef)), a.TransactionUnspentOutput.new(e, t);
940
+ }, ue = (s) => {
941
+ const e = s.split(".")[1] ?? "0", t = `${parseInt(e, 10)}`, r = "1" + "0".repeat(e.length);
942
+ return a.UnitInterval.new(a.BigNum.from_str(t), a.BigNum.from_str(r));
943
+ }, S = (s) => s.length % 2 === 0 && /^[0-9A-F]*$/i.test(s) ? s : K(Buffer.from(s, "utf-8")), Vt = (s) => Buffer.from(s, "hex").toString("utf-8"), Te = (s) => {
944
+ const e = [
945
+ { unit: "lovelace", quantity: s.coin().to_str() }
946
+ ], t = s.multiasset();
947
+ if (t !== void 0) {
948
+ const r = t.keys();
949
+ for (let i = 0; i < r.len(); i += 1) {
950
+ const n = r.get(i), o = t.get(n);
951
+ if (o !== void 0) {
952
+ const A = o.keys();
953
+ for (let c = 0; c < A.len(); c += 1) {
954
+ const I = A.get(c), u = o.get(I) ?? a.BigNum.from_str("0"), h = n.to_hex() + K(I.name());
955
+ e.push({ unit: h, quantity: u.to_str() });
956
+ }
957
+ }
958
+ }
959
+ }
960
+ return e;
961
+ }, yt = (s) => {
962
+ 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();
963
+ t.forEach((n) => {
964
+ const o = a.Assets.new();
965
+ s.filter((A) => A.unit.slice(0, N) === n).forEach((A) => {
966
+ o.insert(a.AssetName.new(f(A.unit.slice(N))), a.BigNum.from_str(A.quantity));
967
+ }), r.insert(Ns(n), o);
968
+ });
969
+ const i = a.Value.new(a.BigNum.from_str(e ? e.quantity : "0"));
970
+ return (s.length > 1 || !e) && i.set_multiasset(r), i;
971
+ }, de = (s, e, t) => a.BaseAddress.new(s, a.StakeCredential.from_keyhash(e), a.StakeCredential.from_keyhash(t)), Ve = (s, e = "") => a.Bip32PrivateKey.from_bip39_entropy(f(s), f(S(e))), le = (s) => a.DataCost.new_coins_per_byte(a.BigNum.from_str(s)), Vs = (s) => {
972
+ if (typeof s != "object" || !("input" in s))
973
+ return a.DatumSource.new(X(s));
974
+ const e = O(s);
975
+ if (e.output().has_plutus_data())
976
+ return a.DatumSource.new_ref_input(e.input());
977
+ throw new Error(`No inline datum found in UTxO: ${e.input().transaction_id().to_hex()}`);
978
+ }, ge = (s, e) => a.EnterpriseAddress.new(s, a.StakeCredential.from_keyhash(e)), fe = (s, e) => {
979
+ if (typeof s == "string")
980
+ return a.MintWitness.new_native_script(St(s));
981
+ if (e === void 0)
982
+ throw new Error("Minting with plutus requires a redeemer to be defined");
983
+ if (e.tag !== "MINT")
984
+ throw new Error("Minting redeemer's tag must be defined as 'MINT'");
985
+ return a.MintWitness.new_plutus_script(Oe(s), Pe({
986
+ tag: "MINT",
987
+ index: 0,
988
+ budget: me,
989
+ data: {
990
+ alternative: 0,
991
+ fields: []
992
+ },
993
+ ...e
994
+ }));
995
+ }, Ft = (s, e) => a.RewardAddress.new(s, a.StakeCredential.from_keyhash(e)), Oe = (s) => {
996
+ if ("code" in s)
997
+ return a.PlutusScriptSource.new(at(s.code, s.version));
998
+ const e = O(s);
999
+ if (e.output().has_script_ref()) {
1000
+ const t = e.output().script_ref();
1001
+ if (t.is_plutus_script()) {
1002
+ const r = Me(t), i = at(r.code, r.version).hash();
1003
+ return a.PlutusScriptSource.new_ref_input_with_lang_ver(i, e.input(), mt[r.version]);
1004
+ }
1005
+ }
1006
+ throw new Error(`No plutus script reference found in UTxO: ${e.input().transaction_id().to_hex()}`);
1007
+ }, _t = (s) => {
1008
+ const e = a.ScriptPubkey.new(s);
1009
+ return a.NativeScript.new_script_pubkey(e);
1010
+ }, Os = (s = Y) => {
1011
+ const e = a.TransactionBuilderConfigBuilder.new().coins_per_utxo_byte(a.BigNum.from_str(s.coinsPerUTxOSize)).ex_unit_prices(a.ExUnitPrices.new(ue(s.priceMem.toString()), ue(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();
1012
+ return a.TransactionBuilder.new(e);
1013
+ }, _e = (s) => {
1014
+ const e = a.TxInputsBuilder.new();
1015
+ return s.map((t) => t instanceof a.TransactionUnspentOutput ? t : O(t)).forEach((t) => {
1016
+ e.add_input(t.output().address(), t.input(), t.output().amount());
1017
+ }), e;
1018
+ }, Ct = (s) => {
1019
+ if (typeof s == "string")
1020
+ return a.TransactionOutputBuilder.new().with_address(H(s));
1021
+ let e = a.TransactionOutputBuilder.new().with_address(H(s.address));
1022
+ if (s.datum) {
1023
+ const { value: t, inline: r } = s.datum, i = X(t);
1024
+ e = e.with_data_hash(a.hash_plutus_data(i)), r && (e = e.with_plutus_data(i));
1025
+ }
1026
+ if (s.script) {
1027
+ const t = dt(s.script);
1028
+ e = e.with_script_ref(t);
1029
+ }
1030
+ return e;
1031
+ }, nt = (s) => {
1032
+ const e = s.slice(0, N), t = s.includes(".") ? S(s.split(".")[1]) : s.slice(N);
1033
+ return { policyId: e, assetName: t };
1034
+ }, l = (s) => ot.isAxiosError(s) ? s.response ? JSON.stringify({
1035
+ data: s.response.data,
1036
+ headers: s.response.headers,
1037
+ status: s.response.status
1038
+ }) : s.request ? JSON.stringify(s.request) : s.message : JSON.stringify(s), Zs = (s) => {
1039
+ const e = X(s);
990
1040
  return a.hash_plutus_data(e).to_hex();
991
- }, $s = (s, e = Date.now()) => {
992
- if (wt[s]) {
993
- const [t, r, i, n] = wt[s];
1041
+ }, tr = (s, e = Date.now()) => {
1042
+ if (Et[s]) {
1043
+ const [t, r, i, n] = Et[s];
994
1044
  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);
995
1045
  }
996
1046
  throw new Error(`Couldn't resolve EpochNo for network: ${s}`);
997
- }, Hs = (s, e) => Fs.fromParts(f(s), f(e)).fingerprint(), zs = (s, e) => qe[s][e], Js = (s) => xt(s).hash().to_hex(), tt = (s) => {
1047
+ }, Ys = (s, e) => Ss.fromParts(f(s), f(e)).fingerprint(), er = (s, e) => Xe[s][e], sr = (s) => vt(s).hash().to_hex(), et = (s) => {
998
1048
  var e, t;
999
1049
  try {
1000
1050
  const r = [
1001
- (e = Nt(s)) == null ? void 0 : e.payment_cred().to_keyhash(),
1002
- (t = pe(s)) == null ? void 0 : t.payment_cred().to_keyhash()
1051
+ (e = Tt(s)) == null ? void 0 : e.payment_cred().to_keyhash(),
1052
+ (t = Ne(s)) == null ? void 0 : t.payment_cred().to_keyhash()
1003
1053
  ].find((i) => i !== void 0);
1004
1054
  if (r !== void 0)
1005
1055
  return r.to_hex();
@@ -1007,42 +1057,42 @@ const Fs = ks, Ns = (s, e) => {
1007
1057
  } catch (r) {
1008
1058
  throw new Error(`An error occurred during resolvePaymentKeyHash: ${r}.`);
1009
1059
  }
1010
- }, Ws = (s, e = 0) => {
1011
- const t = yt(s.code, s.version);
1060
+ }, rr = (s, e = 0) => {
1061
+ const t = at(s.code, s.version);
1012
1062
  return a.EnterpriseAddress.new(e, a.StakeCredential.from_scripthash(t.hash())).to_address().to_bech32();
1013
- }, js = (s) => {
1063
+ }, ir = (s) => {
1014
1064
  try {
1015
- const e = pe(s), t = e == null ? void 0 : e.payment_cred().to_scripthash();
1065
+ const e = Ne(s), t = e == null ? void 0 : e.payment_cred().to_scripthash();
1016
1066
  if (t !== void 0)
1017
1067
  return t.to_hex();
1018
1068
  throw new Error(`Couldn't resolve script hash from address: ${s}`);
1019
1069
  } catch (e) {
1020
1070
  throw new Error(`An error occurred during resolveScriptHash: ${e}.`);
1021
1071
  }
1022
- }, Xs = (s) => a.Ed25519KeyHash.from_hex(s).to_bech32("pool1"), Zs = (s) => {
1023
- const e = fe(s.join(" ")), t = me(e), r = t.to_bech32();
1072
+ }, ar = (s) => a.Ed25519KeyHash.from_hex(s).to_bech32("pool1"), nr = (s) => {
1073
+ const e = pe(s.join(" ")), t = Ve(e), r = t.to_bech32();
1024
1074
  return t.free(), r;
1025
- }, tr = (s) => ht(s).to_hex(), er = (s, e = Date.now()) => {
1026
- if (wt[s]) {
1027
- const [t, r, i] = wt[s];
1075
+ }, or = (s) => dt(s).to_hex(), Ar = (s, e = Date.now()) => {
1076
+ if (Et[s]) {
1077
+ const [t, r, i] = Et[s];
1028
1078
  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();
1029
1079
  }
1030
1080
  throw new Error(`Couldn't resolve SlotNo for network: ${s}`);
1031
- }, Tt = (s) => {
1081
+ }, Ot = (s) => {
1032
1082
  try {
1033
- const e = F(s), t = Nt(s), r = t == null ? void 0 : t.stake_cred().to_keyhash();
1083
+ const e = H(s), t = Tt(s), r = t == null ? void 0 : t.stake_cred().to_keyhash();
1034
1084
  if (r !== void 0)
1035
- return Ut(e.network_id(), r).to_address().to_bech32();
1085
+ return Ft(e.network_id(), r).to_address().to_bech32();
1036
1086
  throw new Error(`Couldn't resolve reward address from address: ${s}`);
1037
1087
  } catch (e) {
1038
1088
  throw new Error(`An error occurred during resolveRewardAddress: ${e}.`);
1039
1089
  }
1040
- }, _t = (s) => {
1090
+ }, It = (s) => {
1041
1091
  var e, t;
1042
1092
  try {
1043
1093
  const r = [
1044
- (e = Nt(s)) == null ? void 0 : e.stake_cred().to_keyhash(),
1045
- (t = we(s)) == null ? void 0 : t.payment_cred().to_keyhash()
1094
+ (e = Tt(s)) == null ? void 0 : e.stake_cred().to_keyhash(),
1095
+ (t = He(s)) == null ? void 0 : t.payment_cred().to_keyhash()
1046
1096
  ].find((i) => i !== void 0);
1047
1097
  if (r !== void 0)
1048
1098
  return r.to_hex();
@@ -1050,21 +1100,40 @@ const Fs = ks, Ns = (s, e) => {
1050
1100
  } catch (r) {
1051
1101
  throw new Error(`An error occurred during resolveStakeKeyHash: ${r}.`);
1052
1102
  }
1053
- }, Fe = (s, e = T.minFeeA, t = T.minFeeB) => (BigInt(e) * BigInt(s) + BigInt(t)).toString(), Ps = (s) => {
1054
- const e = $(s).body();
1103
+ }, Ye = (s, e = Y.minFeeA, t = Y.minFeeB) => (BigInt(e) * BigInt(s) + BigInt(t)).toString(), Gs = (s) => {
1104
+ const e = W(s).body();
1055
1105
  return a.hash_transaction(e).to_hex();
1106
+ }, cr = (s = "", e = 32) => {
1107
+ if (e <= 0 || e > 2048)
1108
+ throw new Error("Length must be bewteen 1 and 2048");
1109
+ const r = Ce("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789")(e);
1110
+ return S(`${s}${r}`);
1111
+ }, Ge = (s, e) => {
1112
+ const t = s.vkeys();
1113
+ if (t !== void 0) {
1114
+ const r = /* @__PURE__ */ new Set();
1115
+ for (let n = 0; n < t.len(); n += 1)
1116
+ r.add(t.get(n).to_hex());
1117
+ for (let n = 0; n < e.len(); n += 1)
1118
+ r.add(e.get(n).to_hex());
1119
+ const i = a.Vkeywitnesses.new();
1120
+ return r.forEach((n) => {
1121
+ i.add(a.Vkeywitness.from_hex(n));
1122
+ }), i;
1123
+ }
1124
+ return e;
1056
1125
  };
1057
- class sr {
1126
+ class Ir {
1058
1127
  _axiosInstance;
1059
1128
  constructor(e, t = 0) {
1060
1129
  const r = e.slice(0, 7);
1061
- this._axiosInstance = it.create({
1130
+ this._axiosInstance = ot.create({
1062
1131
  baseURL: `https://cardano-${r}.blockfrost.io/api/v${t}`,
1063
1132
  headers: { project_id: e }
1064
1133
  });
1065
1134
  }
1066
1135
  async fetchAccountInfo(e) {
1067
- const t = e.startsWith("addr") ? Tt(e) : e;
1136
+ const t = e.startsWith("addr") ? Ot(e) : e;
1068
1137
  try {
1069
1138
  const { data: r, status: i } = await this._axiosInstance.get(`accounts/${t}`);
1070
1139
  if (i === 200)
@@ -1094,7 +1163,7 @@ class sr {
1094
1163
  code: await this.fetchPlutusScriptCBOR(c),
1095
1164
  version: I.type.replace("plutus", "")
1096
1165
  } : await this.fetchNativeScriptJSON(c);
1097
- return ht(h).to_hex();
1166
+ return dt(h).to_hex();
1098
1167
  }
1099
1168
  throw l(I);
1100
1169
  }
@@ -1119,10 +1188,10 @@ class sr {
1119
1188
  }
1120
1189
  async fetchAssetAddresses(e) {
1121
1190
  const t = async (r = 1, i = []) => {
1122
- const { data: n, status: o } = await this._axiosInstance.get(`assets/${e}/addresses?page=${r}`);
1123
- if (o === 200)
1124
- return n.length > 0 ? t(r + 1, [...i, ...n]) : i;
1125
- throw l(n);
1191
+ const { policyId: n, assetName: o } = nt(e), { data: A, status: c } = await this._axiosInstance.get(`assets/${n}${o}/addresses?page=${r}`);
1192
+ if (c === 200)
1193
+ return A.length > 0 ? t(r + 1, [...i, ...A]) : i;
1194
+ throw l(A);
1126
1195
  };
1127
1196
  try {
1128
1197
  return await t();
@@ -1132,19 +1201,19 @@ class sr {
1132
1201
  }
1133
1202
  async fetchAssetMetadata(e) {
1134
1203
  try {
1135
- const { data: t, status: r } = await this._axiosInstance.get(`assets/${e}`);
1136
- if (r === 200)
1204
+ const { policyId: t, assetName: r } = nt(e), { data: i, status: n } = await this._axiosInstance.get(`assets/${t}${r}`);
1205
+ if (n === 200)
1137
1206
  return {
1138
- ...t.onchain_metadata
1207
+ ...i.onchain_metadata
1139
1208
  };
1140
- throw l(t);
1209
+ throw l(i);
1141
1210
  } catch (t) {
1142
1211
  throw l(t);
1143
1212
  }
1144
1213
  }
1145
1214
  async fetchHandleAddress(e) {
1146
1215
  try {
1147
- const t = S(e.replace("$", "")), { data: r, status: i } = await this._axiosInstance.get(`assets/${Ft[1]}${t}/addresses`);
1216
+ const t = S(e.replace("$", "")), { data: r, status: i } = await this._axiosInstance.get(`assets/${Ht[1]}${t}/addresses`);
1148
1217
  if (i === 200)
1149
1218
  return r[0].address;
1150
1219
  throw l(r);
@@ -1206,11 +1275,11 @@ class sr {
1206
1275
  throw l(t);
1207
1276
  }
1208
1277
  }
1209
- class rr {
1278
+ class hr {
1210
1279
  _axiosInstance;
1211
1280
  constructor(e, t, r) {
1212
1281
  const i = r.host ?? "ipfs.infura.io", n = r.port ?? 5001, o = r.version ?? 0;
1213
- this._axiosInstance = it.create({
1282
+ this._axiosInstance = ot.create({
1214
1283
  baseURL: `https://${i}:${n}/api/v${o}`,
1215
1284
  auth: { username: e, password: t }
1216
1285
  });
@@ -1226,16 +1295,16 @@ class rr {
1226
1295
  }
1227
1296
  }
1228
1297
  }
1229
- class ir {
1298
+ class ur {
1230
1299
  _axiosInstance;
1231
1300
  constructor(e, t = 0) {
1232
- this._axiosInstance = it.create({
1301
+ this._axiosInstance = ot.create({
1233
1302
  baseURL: `https://${e}.koios.rest/api/v${t}`
1234
1303
  });
1235
1304
  }
1236
1305
  async fetchAccountInfo(e) {
1237
1306
  try {
1238
- const t = e.startsWith("addr") ? Tt(e) : e, { data: r, status: i } = await this._axiosInstance.post("account_info", { _stake_addresses: [t] });
1307
+ const t = e.startsWith("addr") ? Ot(e) : e, { data: r, status: i } = await this._axiosInstance.post("account_info", { _stake_addresses: [t] });
1239
1308
  if (i === 200)
1240
1309
  return {
1241
1310
  poolId: r[0].delegated_pool,
@@ -1255,8 +1324,8 @@ class ir {
1255
1324
  const n = i.type.startsWith("plutus") ? {
1256
1325
  code: i.bytes,
1257
1326
  version: i.type.replace("plutus", "")
1258
- } : Qt(At(i.bytes));
1259
- return ht(n).to_hex();
1327
+ } : Dt(St(i.bytes));
1328
+ return dt(n).to_hex();
1260
1329
  }
1261
1330
  };
1262
1331
  try {
@@ -1293,7 +1362,7 @@ class ir {
1293
1362
  }
1294
1363
  async fetchAssetAddresses(e) {
1295
1364
  try {
1296
- const t = e.slice(0, Q), r = e.includes(".") ? S(e.split(".")[1]) : e.slice(Q), { data: i, status: n } = await this._axiosInstance.get(`asset_address_list?_asset_policy=${t}&_asset_name=${r}`);
1365
+ const { policyId: t, assetName: r } = nt(e), { data: i, status: n } = await this._axiosInstance.get(`asset_address_list?_asset_policy=${t}&_asset_name=${r}`);
1297
1366
  if (n === 200)
1298
1367
  return i.map((o) => ({
1299
1368
  address: o.payment_address,
@@ -1306,10 +1375,10 @@ class ir {
1306
1375
  }
1307
1376
  async fetchAssetMetadata(e) {
1308
1377
  try {
1309
- const t = e.slice(0, Q), r = e.includes(".") ? S(e.split(".")[1]) : e.slice(Q), { data: i, status: n } = await this._axiosInstance.get(`asset_info?_asset_policy=${t}&_asset_name=${r}`);
1378
+ const { policyId: t, assetName: r } = nt(e), { data: i, status: n } = await this._axiosInstance.get(`asset_info?_asset_policy=${t}&_asset_name=${r}`);
1310
1379
  if (n === 200)
1311
1380
  return {
1312
- ...i[0].minting_tx_metadata[721][t][Ht(r)]
1381
+ ...i[0].minting_tx_metadata[721][t][Vt(r)]
1313
1382
  };
1314
1383
  throw l(i);
1315
1384
  } catch (t) {
@@ -1318,7 +1387,7 @@ class ir {
1318
1387
  }
1319
1388
  async fetchHandleAddress(e) {
1320
1389
  try {
1321
- const t = S(e.replace("$", "")), { data: r, status: i } = await this._axiosInstance.get(`asset_address_list?_asset_policy=${Ft[1]}&_asset_name=${t}`);
1390
+ const t = S(e.replace("$", "")), { data: r, status: i } = await this._axiosInstance.get(`asset_address_list?_asset_policy=${Ht[1]}&_asset_name=${t}`);
1322
1391
  if (i === 200)
1323
1392
  return r[0].payment_address;
1324
1393
  throw l(r);
@@ -1368,17 +1437,17 @@ class ir {
1368
1437
  }
1369
1438
  }
1370
1439
  }
1371
- class ar {
1440
+ class dr {
1372
1441
  _axiosInstance;
1373
1442
  constructor(e, t, r, i = 1) {
1374
- this._axiosInstance = it.create({
1443
+ this._axiosInstance = ot.create({
1375
1444
  baseURL: `https://cardano-${e}.tangocrypto.com/${t}/v${i}`,
1376
1445
  headers: { "x-api-key": r }
1377
1446
  });
1378
1447
  }
1379
1448
  async fetchAccountInfo(e) {
1380
1449
  try {
1381
- const t = e.startsWith("addr") ? Tt(e) : e, { data: r, status: i } = await this._axiosInstance.get(`wallets/${t}`);
1450
+ const t = e.startsWith("addr") ? Ot(e) : e, { data: r, status: i } = await this._axiosInstance.get(`wallets/${t}`);
1382
1451
  if (i === 200)
1383
1452
  return {
1384
1453
  poolId: r.pool_id,
@@ -1394,21 +1463,21 @@ class ar {
1394
1463
  }
1395
1464
  async fetchAddressUTxOs(e, t) {
1396
1465
  const r = t !== void 0 ? `/assets/${t}` : "", i = `addresses/${e}${r}/utxos?size=50`, n = async (I = "", u = []) => {
1397
- var E;
1398
- const { data: h, status: C } = await this._axiosInstance.get(`${i}&cursor=${I}`);
1399
- if (C === 200)
1400
- return h.cursor !== null && ((E = h.cursor) == null ? void 0 : E.length) > 0 ? n(h.cursor, [...u, ...h.data.map(c)]) : h.data.map(c);
1466
+ var p;
1467
+ const { data: h, status: g } = await this._axiosInstance.get(`${i}&cursor=${I}`);
1468
+ if (g === 200)
1469
+ return h.cursor !== null && ((p = h.cursor) == null ? void 0 : p.length) > 0 ? n(h.cursor, [...u, ...h.data.map(c)]) : h.data.map(c);
1401
1470
  throw l(h);
1402
1471
  }, o = (I, u) => {
1403
1472
  const h = [{
1404
1473
  unit: "lovelace",
1405
1474
  quantity: I.toString()
1406
1475
  }];
1407
- return u.forEach((C) => {
1408
- const E = S(C.asset_name);
1476
+ return u.forEach((g) => {
1477
+ const p = S(g.asset_name);
1409
1478
  h.push({
1410
- unit: `${C.policy_id}${E}`,
1411
- quantity: C.quantity.toString()
1479
+ unit: `${g.policy_id}${p}`,
1480
+ quantity: g.quantity.toString()
1412
1481
  });
1413
1482
  }), h;
1414
1483
  }, A = (I) => {
@@ -1416,8 +1485,8 @@ class ar {
1416
1485
  const u = I.type.startsWith("plutus") ? {
1417
1486
  code: I.code,
1418
1487
  version: I.type.replace("plutus", "")
1419
- } : Qt(At(I.json));
1420
- return ht(u).to_hex();
1488
+ } : Dt(St(I.json));
1489
+ return dt(u).to_hex();
1421
1490
  }
1422
1491
  }, c = (I) => {
1423
1492
  var u;
@@ -1446,11 +1515,11 @@ class ar {
1446
1515
  address: i.address,
1447
1516
  quantity: i.quantity.toString()
1448
1517
  }), r = async (i = "", n = []) => {
1449
- var c;
1450
- const { data: o, status: A } = await this._axiosInstance.get(`assets/${e}/addresses?size=100&cursor=${i}`);
1451
- if (A === 200)
1452
- return o.cursor !== null && ((c = o.cursor) == null ? void 0 : c.length) > 0 ? r(o.cursor, [...n, ...o.data.map(t)]) : o.data.map(t);
1453
- throw l(o);
1518
+ var u;
1519
+ const { policyId: o, assetName: A } = nt(e), { data: c, status: I } = await this._axiosInstance.get(`assets/${o}${A}/addresses?size=100&cursor=${i}`);
1520
+ if (I === 200)
1521
+ return c.cursor !== null && ((u = c.cursor) == null ? void 0 : u.length) > 0 ? r(c.cursor, [...n, ...c.data.map(t)]) : c.data.map(t);
1522
+ throw l(c);
1454
1523
  };
1455
1524
  try {
1456
1525
  return await r();
@@ -1461,10 +1530,10 @@ class ar {
1461
1530
  async fetchAssetMetadata(e) {
1462
1531
  var t;
1463
1532
  try {
1464
- const r = e.slice(0, Q), i = e.includes(".") ? S(e.split(".")[1]) : e.slice(Q), { data: n, status: o } = await this._axiosInstance.get(`assets/${e}`);
1533
+ const { policyId: r, assetName: i } = nt(e), { data: n, status: o } = await this._axiosInstance.get(`assets/${r}${i}`);
1465
1534
  if (o === 200)
1466
1535
  return {
1467
- ...(t = n.metadata[0]) == null ? void 0 : t.json[r][Ht(i)]
1536
+ ...(t = n.metadata[0]) == null ? void 0 : t.json[r][Vt(i)]
1468
1537
  };
1469
1538
  throw l(n);
1470
1539
  } catch (r) {
@@ -1473,7 +1542,7 @@ class ar {
1473
1542
  }
1474
1543
  async fetchHandleAddress(e) {
1475
1544
  try {
1476
- const t = S(e.replace("$", "")), { data: r, status: i } = await this._axiosInstance.get(`assets/${Ft[1]}${t}/addresses`);
1545
+ const t = S(e.replace("$", "")), { data: r, status: i } = await this._axiosInstance.get(`assets/${Ht[1]}${t}/addresses`);
1477
1546
  if (i === 200)
1478
1547
  return r.data[0].address;
1479
1548
  throw l(r);
@@ -1523,16 +1592,16 @@ class ar {
1523
1592
  }
1524
1593
  }
1525
1594
  }
1526
- class nr {
1595
+ class lr {
1527
1596
  static withOneSignature(e) {
1528
- const t = k(tt(e));
1529
- return dt(t).to_hex();
1597
+ const t = F(et(e));
1598
+ return _t(t).to_hex();
1530
1599
  }
1531
1600
  static withAtLeastNSignatures(e, t) {
1532
1601
  const r = a.NativeScripts.new();
1533
1602
  e.forEach((n) => {
1534
- const o = k(tt(n));
1535
- r.add(dt(o));
1603
+ const o = F(et(n));
1604
+ r.add(_t(o));
1536
1605
  });
1537
1606
  const i = a.ScriptNOfK.new(t, r);
1538
1607
  return a.NativeScript.new_script_any(i).to_hex();
@@ -1540,8 +1609,8 @@ class nr {
1540
1609
  static withAnySignature(e) {
1541
1610
  const t = a.NativeScripts.new();
1542
1611
  e.forEach((i) => {
1543
- const n = k(tt(i));
1544
- t.add(dt(n));
1612
+ const n = F(et(i));
1613
+ t.add(_t(n));
1545
1614
  });
1546
1615
  const r = a.ScriptAny.new(t);
1547
1616
  return a.NativeScript.new_script_any(r).to_hex();
@@ -1549,17 +1618,17 @@ class nr {
1549
1618
  static withAllSignatures(e) {
1550
1619
  const t = a.NativeScripts.new();
1551
1620
  e.forEach((i) => {
1552
- const n = k(tt(i));
1553
- t.add(dt(n));
1621
+ const n = F(et(i));
1622
+ t.add(_t(n));
1554
1623
  });
1555
1624
  const r = a.ScriptAll.new(t);
1556
1625
  return a.NativeScript.new_script_any(r).to_hex();
1557
1626
  }
1558
1627
  static fromNativeScript(e) {
1559
- return xt(e).to_hex();
1628
+ return vt(e).to_hex();
1560
1629
  }
1561
1630
  }
1562
- function z(s, e, t, r) {
1631
+ function j(s, e, t, r) {
1563
1632
  var i = arguments.length, n = i < 3 ? e : r === null ? r = Object.getOwnPropertyDescriptor(e, t) : r, o;
1564
1633
  if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
1565
1634
  n = Reflect.decorate(s, e, t, r);
@@ -1568,109 +1637,120 @@ function z(s, e, t, r) {
1568
1637
  (o = s[A]) && (n = (i < 3 ? o(n) : i > 3 ? o(e, t, n) : o(e, t)) || n);
1569
1638
  return i > 3 && n && Object.defineProperty(e, t, n), n;
1570
1639
  }
1571
- const Ms = (s) => class extends s {
1640
+ const Rs = (s) => class extends s {
1572
1641
  __visits = [];
1573
- }, X = () => function(s, e, t) {
1642
+ }, Z = () => function(s, e, t) {
1574
1643
  const r = t.value;
1575
1644
  t.value = function(...i) {
1576
1645
  const n = r.call(this, ...i);
1577
1646
  return this.__visits && this.__visits.push(e), n;
1578
1647
  };
1579
1648
  };
1580
- let Y = class {
1649
+ let R = class {
1581
1650
  _changeAddress;
1582
1651
  _recipients = /* @__PURE__ */ new Map();
1583
1652
  _totalBurns = /* @__PURE__ */ new Map();
1584
1653
  _totalMints = /* @__PURE__ */ new Map();
1585
1654
  _era;
1586
1655
  _initiator;
1656
+ _mintBuilder;
1587
1657
  _protocolParameters;
1588
1658
  _txBuilder;
1589
1659
  _txCertificates;
1590
1660
  _txInputsBuilder;
1591
1661
  _txWithdrawals;
1592
1662
  constructor(e = {}) {
1593
- this._era = e.era, this._initiator = e.initiator, this._protocolParameters = e.parameters ?? T, this._txBuilder = ns(e.parameters), this._txCertificates = a.Certificates.new(), this._txInputsBuilder = a.TxInputsBuilder.new(), this._txWithdrawals = a.Withdrawals.new();
1594
- }
1595
- static maskMetadata(e) {
1596
- var i;
1597
- const t = $(e), r = (i = t.auxiliary_data()) == null ? void 0 : i.metadata();
1598
- if (r !== void 0) {
1599
- const n = a.GeneralTransactionMetadata.new();
1600
- for (let A = 0; A < r.len(); A += 1) {
1601
- const c = r.keys().get(A), I = r.get(c);
1602
- n.insert(c, a.TransactionMetadatum.from_hex("0".repeat(((I == null ? void 0 : I.to_hex()) ?? "").length)));
1663
+ this._era = e.era, this._initiator = e.initiator, this._mintBuilder = a.MintBuilder.new(), this._protocolParameters = e.parameters ?? Y, this._txBuilder = Os(e.parameters), this._txCertificates = a.Certificates.new(), this._txInputsBuilder = a.TxInputsBuilder.new(), this._txWithdrawals = a.Withdrawals.new();
1664
+ }
1665
+ static maskMetadata(e, t = "ALONZO") {
1666
+ var n;
1667
+ const r = W(e), i = (n = r.auxiliary_data()) == null ? void 0 : n.metadata();
1668
+ if (i !== void 0) {
1669
+ const o = a.GeneralTransactionMetadata.new();
1670
+ for (let c = 0; c < i.len(); c += 1) {
1671
+ const I = i.keys().get(c), u = i.get(I);
1672
+ o.insert(I, a.TransactionMetadatum.from_hex("0".repeat(((u == null ? void 0 : u.to_hex()) ?? "").length)));
1603
1673
  }
1604
- const o = t.auxiliary_data();
1605
- return o == null || o.set_metadata(n), a.Transaction.new(t.body(), t.witness_set(), o).to_hex();
1674
+ const A = r.auxiliary_data();
1675
+ return A !== void 0 && (A.set_metadata(o), A.set_prefer_alonzo_format(t === "ALONZO")), a.Transaction.new(r.body(), r.witness_set(), A).to_hex();
1606
1676
  }
1607
1677
  return e;
1608
1678
  }
1609
1679
  static readMetadata(e) {
1610
1680
  var r, i;
1611
- return ((i = (r = $(e).auxiliary_data()) == null ? void 0 : r.metadata()) == null ? void 0 : i.to_hex()) ?? "";
1681
+ return ((i = (r = W(e).auxiliary_data()) == null ? void 0 : r.metadata()) == null ? void 0 : i.to_hex()) ?? "";
1612
1682
  }
1613
- static writeMetadata(e, t) {
1614
- const r = $(e), i = r.auxiliary_data() ?? a.AuxiliaryData.new();
1615
- return i.set_metadata(a.GeneralTransactionMetadata.from_hex(t)), a.Transaction.new(r.body(), r.witness_set(), i).to_hex();
1683
+ static writeMetadata(e, t, r = "ALONZO") {
1684
+ const i = W(e), n = i.auxiliary_data() ?? a.AuxiliaryData.new();
1685
+ 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();
1616
1686
  }
1617
1687
  get size() {
1618
1688
  return this._txBuilder.full_size();
1619
1689
  }
1620
1690
  async build() {
1621
1691
  try {
1622
- return this.notVisited("redeemValue") === !1 && (await this.addRequiredSignersIfNeeded(), await this.addCollateralIfNeeded()), await this.forgeAssetsIfNeeded(), await this.addTxInputsAsNeeded(), await this.addChangeAddress(), this._txBuilder.build_tx().to_hex();
1692
+ return (this._mintBuilder.has_plutus_scripts() || this.notVisited("redeemValue") === !1) && (await this.addRequiredSignersIfNeeded(), await this.addCollateralIfNeeded()), await this.forgeAssetsIfNeeded(), await this.addTxInputsAsNeeded(), await this.addChangeAddress(), this._txBuilder.build_tx().to_hex();
1623
1693
  } catch (e) {
1624
1694
  throw new Error(`[Transaction] An error occurred during build: ${e}.`);
1625
1695
  }
1626
1696
  }
1627
- burnAsset(e, t) {
1628
- const r = this._totalBurns.has(t.unit) ? a.BigNum.from_str(this._totalBurns.get(t.unit) ?? "0").checked_add(a.BigNum.from_str(t.quantity)).to_str() : t.quantity;
1629
- return this._txBuilder.add_mint_asset(At(e), a.AssetName.new(f(t.unit.slice(Q))), a.Int.new_negative(a.BigNum.from_str(t.quantity))), this._totalBurns.set(t.unit, r), this;
1697
+ burnAsset(e, t, r) {
1698
+ 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;
1699
+ return this._mintBuilder.add_asset(fe(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;
1630
1700
  }
1631
1701
  delegateStake(e, t) {
1632
- const r = a.Certificate.new_stake_delegation(a.StakeDelegation.new(a.StakeCredential.from_keyhash(k(_t(e))), a.Ed25519KeyHash.from_bech32(t)));
1702
+ const r = a.Certificate.new_stake_delegation(a.StakeDelegation.new(a.StakeCredential.from_keyhash(F(It(e))), a.Ed25519KeyHash.from_bech32(t)));
1633
1703
  return this._txCertificates.add(r), this;
1634
1704
  }
1635
1705
  deregisterStake(e) {
1636
- const t = a.Certificate.new_stake_deregistration(a.StakeDeregistration.new(a.StakeCredential.from_keyhash(k(_t(e)))));
1706
+ const t = a.Certificate.new_stake_deregistration(a.StakeDeregistration.new(a.StakeCredential.from_keyhash(F(It(e)))));
1637
1707
  return this._txCertificates.add(t), this;
1638
1708
  }
1639
- mintAsset(e, t) {
1640
- var A, c;
1641
- const i = ((I, u) => {
1642
- const h = At(I).hash().to_hex(), C = S(u.assetName);
1709
+ mintAsset(e, t, r) {
1710
+ var I, u;
1711
+ const i = (h, g) => {
1712
+ const p = typeof h == "string" ? St(h).hash().to_hex() : n(h).hash().to_hex(), x = S(g.assetName);
1643
1713
  return {
1644
- unit: `${h}${C}`,
1645
- quantity: u.assetQuantity
1714
+ unit: `${p}${x}`,
1715
+ quantity: g.assetQuantity
1646
1716
  };
1647
- })(e, t), o = a.BigNum.from_str(((A = this._totalMints.get(i.unit)) == null ? void 0 : A.assetQuantity) ?? "0").checked_add(a.BigNum.from_str(i.quantity));
1648
- return this._txBuilder.add_mint_asset(At(e), a.AssetName.new(f(S(t.assetName))), a.Int.new(a.BigNum.from_str(i.quantity))), this._recipients.has(t.recipient) ? (c = this._recipients.get(t.recipient)) == null || c.push(i) : this._recipients.set(t.recipient, [i]), this._totalMints.set(i.unit, {
1717
+ }, n = (h) => {
1718
+ if ("code" in h)
1719
+ return at(h.code, h.version);
1720
+ const g = O(h);
1721
+ if (g.output().has_script_ref()) {
1722
+ const p = g.output().script_ref();
1723
+ if (p.is_plutus_script()) {
1724
+ const x = Me(p);
1725
+ return at(x.code, x.version);
1726
+ }
1727
+ }
1728
+ throw new Error(`No plutus script reference found in UTxO: ${g.input().transaction_id().to_hex()}`);
1729
+ }, o = i(e, t), c = a.BigNum.from_str(((I = this._totalMints.get(o.unit)) == null ? void 0 : I.assetQuantity) ?? "0").checked_add(a.BigNum.from_str(o.quantity));
1730
+ return this._mintBuilder.add_asset(fe(e, r), a.AssetName.new(f(S(t.assetName))), a.Int.new(a.BigNum.from_str(o.quantity))), this._recipients.has(t.recipient) ? (u = this._recipients.get(t.recipient)) == null || u.push(o) : this._recipients.set(t.recipient, [o]), this._totalMints.set(o.unit, {
1649
1731
  ...t,
1650
- assetQuantity: o.to_str()
1732
+ assetQuantity: c.to_str()
1651
1733
  }), this;
1652
1734
  }
1653
1735
  redeemValue(e) {
1654
- if ("assetName" in e.value)
1655
- throw new Error("Plutus Minting is not implemented yet...");
1656
1736
  const t = {
1657
1737
  tag: "SPEND",
1658
- budget: Re,
1738
+ budget: me,
1659
1739
  index: this._txInputsBuilder.inputs().len(),
1660
1740
  data: {
1661
1741
  alternative: 0,
1662
1742
  fields: []
1663
1743
  },
1664
1744
  ...e.redeemer
1665
- }, r = q(e.value), i = a.PlutusWitness.new_with_ref(as(e.script), is(e.datum), es(t));
1745
+ }, r = O(e.value), i = a.PlutusWitness.new_with_ref(Oe(e.script), Vs(e.datum), Pe(t));
1666
1746
  return this._txInputsBuilder.add_plutus_script_input(i, r.input(), r.output().amount()), this;
1667
1747
  }
1668
1748
  registerStake(e) {
1669
- const t = a.Certificate.new_stake_registration(a.StakeRegistration.new(a.StakeCredential.from_keyhash(k(_t(e)))));
1749
+ const t = a.Certificate.new_stake_registration(a.StakeRegistration.new(a.StakeCredential.from_keyhash(F(It(e)))));
1670
1750
  return this._txCertificates.add(t), this;
1671
1751
  }
1672
1752
  registerPool(e) {
1673
- const t = a.Certificate.new_pool_registration(a.PoolRegistration.new(ts(e)));
1753
+ const t = a.Certificate.new_pool_registration(a.PoolRegistration.new(Ms(e)));
1674
1754
  return this._txCertificates.add(t), this;
1675
1755
  }
1676
1756
  retirePool(e, t) {
@@ -1678,32 +1758,32 @@ let Y = class {
1678
1758
  return this._txCertificates.add(r), this;
1679
1759
  }
1680
1760
  sendAssets(e, t) {
1681
- const r = Ct(t), i = r.multiasset();
1761
+ const r = yt(t), i = r.multiasset();
1682
1762
  if (r.is_zero() || i === void 0)
1683
1763
  return this;
1684
- const o = lt(e).next().with_asset_and_min_required_coin_by_utxo_cost(i, Xt(this._protocolParameters.coinsPerUTxOSize)).build();
1764
+ const o = Ct(e).next().with_asset_and_min_required_coin_by_utxo_cost(i, le(this._protocolParameters.coinsPerUTxOSize)).build();
1685
1765
  return this._txBuilder.add_output(o), this;
1686
1766
  }
1687
1767
  sendLovelace(e, t) {
1688
- const i = lt(e).next().with_coin(a.BigNum.from_str(t)).build();
1768
+ const i = Ct(e).next().with_coin(a.BigNum.from_str(t)).build();
1689
1769
  return this._txBuilder.add_output(i), this;
1690
1770
  }
1691
1771
  sendValue(e, t) {
1692
- const r = Ct(t.output.amount), n = lt(e).next().with_value(r).build();
1772
+ const r = yt(t.output.amount), n = Ct(e).next().with_value(r).build();
1693
1773
  return this._txBuilder.add_output(n), this;
1694
1774
  }
1695
1775
  setChangeAddress(e) {
1696
- return this._changeAddress = F(e), this;
1776
+ return this._changeAddress = H(e), this;
1697
1777
  }
1698
1778
  setCollateral(e) {
1699
- const t = te(e);
1779
+ const t = _e(e);
1700
1780
  return this._txBuilder.set_collateral(t), this;
1701
1781
  }
1702
1782
  setMetadata(e, t) {
1703
1783
  return this._txBuilder.add_json_metadatum_with_schema(a.BigNum.from_str(e.toString()), JSON.stringify(t), a.MetadataJsonSchema.NoConversions), this;
1704
1784
  }
1705
1785
  setRequiredSigners(e) {
1706
- return Array.from(new Set(e.map((r) => r.startsWith("addr") ? tt(r) : _t(r)).map((r) => k(r)))).forEach((r) => {
1786
+ return Array.from(new Set(e.map((r) => r.startsWith("addr") ? et(r) : It(r)).map((r) => F(r)))).forEach((r) => {
1707
1787
  this._txBuilder.add_required_signer(r);
1708
1788
  }), this;
1709
1789
  }
@@ -1714,18 +1794,18 @@ let Y = class {
1714
1794
  return this._txBuilder.set_ttl_bignum(a.BigNum.from_str(e)), this;
1715
1795
  }
1716
1796
  setTxInputs(e) {
1717
- return e.map((t) => q(t)).forEach((t) => {
1797
+ return e.map((t) => O(t)).forEach((t) => {
1718
1798
  this._txInputsBuilder.add_input(t.output().address(), t.input(), t.output().amount());
1719
1799
  }), this;
1720
1800
  }
1721
1801
  withdrawRewards(e, t) {
1722
- const r = we(e);
1802
+ const r = He(e);
1723
1803
  return r !== void 0 && this._txWithdrawals.insert(r, a.BigNum.from_str(t)), this;
1724
1804
  }
1725
1805
  async addBurnInputsIfNeeded() {
1726
1806
  if (this._initiator && this._totalBurns.size > 0 && this.notVisited("setTxInputs")) {
1727
1807
  const e = await this._initiator.getUsedUTxOs();
1728
- As(this._totalBurns, e.map((r) => mt(r))).map((r) => q(r)).forEach((r) => {
1808
+ ts(this._totalBurns, e.map((r) => Qt(r))).map((r) => O(r)).forEach((r) => {
1729
1809
  this._txInputsBuilder.add_input(r.output().address(), r.input(), r.output().amount());
1730
1810
  });
1731
1811
  }
@@ -1740,28 +1820,28 @@ let Y = class {
1740
1820
  async addCollateralIfNeeded() {
1741
1821
  if (this._initiator && this.notVisited("setCollateral")) {
1742
1822
  const e = await this._initiator.getUsedCollateral();
1743
- this._txBuilder.set_collateral(te(e));
1823
+ this._txBuilder.set_collateral(_e(e));
1744
1824
  }
1745
1825
  }
1746
1826
  async addRequiredSignersIfNeeded() {
1747
1827
  if (this._initiator && this.notVisited("setRequiredSigners")) {
1748
- const e = await this._initiator.getUsedAddress(), t = tt(e.to_bech32());
1749
- this._txBuilder.add_required_signer(k(t));
1828
+ const e = await this._initiator.getUsedAddress(), t = et(e.to_bech32());
1829
+ this._txBuilder.add_required_signer(F(t));
1750
1830
  }
1751
1831
  }
1752
1832
  async addTxInputsAsNeeded() {
1753
- if (this._txBuilder.set_inputs(this._txInputsBuilder), this._txCertificates.len() > 0 && this._txBuilder.set_certs(this._txCertificates), this._txWithdrawals.len() > 0 && this._txBuilder.set_withdrawals(this._txWithdrawals), this.notVisited("setTxInputs")) {
1833
+ 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")) {
1754
1834
  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;
1755
1835
  this._txBuilder.add_inputs_from(r, i);
1756
1836
  }
1757
- if (this.notVisited("redeemValue") === !1) {
1758
- const e = this._era !== void 0 ? $t[this._era] : $t.BABBAGE;
1837
+ if (this._txBuilder.get_mint_builder() || this.notVisited("redeemValue") === !1) {
1838
+ const e = this._era !== void 0 ? zt[this._era] : zt.BABBAGE;
1759
1839
  this._txBuilder.calc_script_data_hash(e);
1760
1840
  }
1761
1841
  }
1762
1842
  async forgeAssetsIfNeeded() {
1763
1843
  const e = (t, r) => {
1764
- const i = t.data.assetName, n = t.data.metadata, o = t.unit.slice(0, Q);
1844
+ const i = t.data.assetName, n = t.data.metadata, o = t.unit.slice(0, N);
1765
1845
  if (r && r[o]) {
1766
1846
  const { [o]: A, ...c } = r, I = {
1767
1847
  [i]: n,
@@ -1799,16 +1879,16 @@ let Y = class {
1799
1879
  async selectLovelaceUTxOs(e) {
1800
1880
  if (this._initiator === void 0 || e === !1)
1801
1881
  return [];
1802
- const t = await this._initiator.getUsedUTxOs(), r = os("5000000", t.map((n) => mt(n)));
1803
- return r.map((n) => q(n)).forEach((n) => {
1882
+ const t = await this._initiator.getUsedUTxOs(), r = Ze("5000000", t.map((n) => Qt(n)));
1883
+ return r.map((n) => O(n)).forEach((n) => {
1804
1884
  this._txBuilder.add_input(n.output().address(), n.input(), n.output().amount());
1805
1885
  }), r;
1806
1886
  }
1807
1887
  addMintOutputs() {
1808
1888
  this._recipients.forEach((e, t) => {
1809
- const i = Ct(e).multiasset();
1889
+ const i = yt(e).multiasset();
1810
1890
  if (i !== void 0) {
1811
- const o = lt(t).next().with_asset_and_min_required_coin_by_utxo_cost(i, Xt(this._protocolParameters.coinsPerUTxOSize)).build();
1891
+ const o = Ct(t).next().with_asset_and_min_required_coin_by_utxo_cost(i, le(this._protocolParameters.coinsPerUTxOSize)).build();
1812
1892
  this._txBuilder.add_output(o);
1813
1893
  }
1814
1894
  });
@@ -1817,46 +1897,31 @@ let Y = class {
1817
1897
  return this.__visits.includes(e) === !1;
1818
1898
  }
1819
1899
  };
1820
- z([
1821
- X()
1822
- ], Y.prototype, "mintAsset", null);
1823
- z([
1824
- X()
1825
- ], Y.prototype, "redeemValue", null);
1826
- z([
1827
- X()
1828
- ], Y.prototype, "sendAssets", null);
1829
- z([
1830
- X()
1831
- ], Y.prototype, "sendValue", null);
1832
- z([
1833
- X()
1834
- ], Y.prototype, "setCollateral", null);
1835
- z([
1836
- X()
1837
- ], Y.prototype, "setRequiredSigners", null);
1838
- z([
1839
- X()
1840
- ], Y.prototype, "setTxInputs", null);
1841
- Y = z([
1842
- Ms
1843
- ], Y);
1844
- const Ne = (s, e) => {
1845
- const t = s.vkeys();
1846
- if (t !== void 0) {
1847
- const r = /* @__PURE__ */ new Set();
1848
- for (let n = 0; n < t.len(); n += 1)
1849
- r.add(t.get(n).to_hex());
1850
- for (let n = 0; n < e.len(); n += 1)
1851
- r.add(e.get(n).to_hex());
1852
- const i = a.Vkeywitnesses.new();
1853
- return r.forEach((n) => {
1854
- i.add(a.Vkeywitness.from_hex(n));
1855
- }), i;
1856
- }
1857
- return e;
1858
- };
1859
- class w {
1900
+ j([
1901
+ Z()
1902
+ ], R.prototype, "mintAsset", null);
1903
+ j([
1904
+ Z()
1905
+ ], R.prototype, "redeemValue", null);
1906
+ j([
1907
+ Z()
1908
+ ], R.prototype, "sendAssets", null);
1909
+ j([
1910
+ Z()
1911
+ ], R.prototype, "sendValue", null);
1912
+ j([
1913
+ Z()
1914
+ ], R.prototype, "setCollateral", null);
1915
+ j([
1916
+ Z()
1917
+ ], R.prototype, "setRequiredSigners", null);
1918
+ j([
1919
+ Z()
1920
+ ], R.prototype, "setTxInputs", null);
1921
+ R = j([
1922
+ Rs
1923
+ ], R);
1924
+ class y {
1860
1925
  _networkId;
1861
1926
  _encryptedSecret;
1862
1927
  constructor(e, t) {
@@ -1864,7 +1929,7 @@ class w {
1864
1929
  }
1865
1930
  getAccount(e, t) {
1866
1931
  return this.accountContext(e, t, (r, i) => {
1867
- const n = jt(this._networkId, r.to_public().hash(), i.to_public().hash()).to_address().to_bech32(), o = Zt(this._networkId, r.to_public().hash()).to_address().to_bech32(), A = Ut(this._networkId, i.to_public().hash()).to_address().to_bech32();
1932
+ const n = de(this._networkId, r.to_public().hash(), i.to_public().hash()).to_address().to_bech32(), o = ge(this._networkId, r.to_public().hash()).to_address().to_bech32(), A = Ft(this._networkId, i.to_public().hash()).to_address().to_bech32();
1868
1933
  return {
1869
1934
  baseAddress: n,
1870
1935
  enterpriseAddress: o,
@@ -1876,9 +1941,9 @@ class w {
1876
1941
  try {
1877
1942
  return this.accountContext(e, t, (n, o) => {
1878
1943
  const A = { payload: i }, c = {
1879
- address: w.resolveAddress(this._networkId, r, n, o),
1944
+ address: y.resolveAddress(this._networkId, r, n, o),
1880
1945
  key: r.startsWith("stake") ? o : n
1881
- }, { coseSign1: I, coseKey: u } = hs(A, c);
1946
+ }, { coseSign1: I, coseKey: u } = rs(A, c);
1882
1947
  return { signature: I, key: u };
1883
1948
  });
1884
1949
  } catch (n) {
@@ -1887,10 +1952,10 @@ class w {
1887
1952
  }
1888
1953
  signTx(e, t, r, i, n) {
1889
1954
  try {
1890
- const o = Ce(Ps(i));
1955
+ const o = Fe(Gs(i));
1891
1956
  return this.accountContext(e, t, (A, c) => {
1892
1957
  const I = a.Vkeywitnesses.new();
1893
- return w.resolveSigners(i, r, A.to_public().hash().to_hex()).forEach((h) => {
1958
+ return y.resolveSigners(i, r, A.to_public().hash().to_hex()).forEach((h) => {
1894
1959
  if (h === A.to_public().hash().to_hex())
1895
1960
  I.add(a.make_vkey_witness(o, A));
1896
1961
  else if (h === c.to_public().hash().to_hex())
@@ -1904,22 +1969,22 @@ class w {
1904
1969
  }
1905
1970
  }
1906
1971
  static encryptMnemonic(e, t) {
1907
- const r = fe(e.join(" ")), i = me(r), n = j(i.as_bytes());
1908
- return i.free(), w.encrypt(n, t);
1972
+ const r = pe(e.join(" ")), i = Ve(r), n = K(i.as_bytes());
1973
+ return i.free(), y.encrypt(n, t);
1909
1974
  }
1910
1975
  static encryptPrivateKey(e, t) {
1911
- const r = a.Bip32PrivateKey.from_bech32(e), i = j(r.as_bytes());
1912
- return r.free(), w.encrypt(i, t);
1976
+ const r = a.Bip32PrivateKey.from_bech32(e), i = K(r.as_bytes());
1977
+ return r.free(), y.encrypt(i, t);
1913
1978
  }
1914
1979
  static encryptSigningKeys(e, t, r) {
1915
- const i = w.encrypt(e.slice(4), r), n = w.encrypt(t.slice(4), r);
1980
+ const i = y.encrypt(e.slice(4), r), n = y.encrypt(t.slice(4), r);
1916
1981
  return [i, n];
1917
1982
  }
1918
1983
  static generateMnemonic(e = 256) {
1919
- return Pe(e).split(" ");
1984
+ return Le(e).split(" ");
1920
1985
  }
1921
1986
  accountContext(e, t, r) {
1922
- const { paymentKey: i, stakeKey: n } = w.resolveKeys(e, t, this._encryptedSecret), o = r(i, n);
1987
+ const { paymentKey: i, stakeKey: n } = y.resolveKeys(e, t, this._encryptedSecret), o = r(i, n);
1923
1988
  return i.free(), n.free(), o;
1924
1989
  }
1925
1990
  static decrypt(e, t) {
@@ -1930,14 +1995,14 @@ class w {
1930
1995
  }
1931
1996
  }
1932
1997
  static encrypt(e, t) {
1933
- const r = Ge("0123456789abcdef"), i = r(64), n = r(24);
1998
+ const r = Ce("0123456789abcdef"), i = r(64), n = r(24);
1934
1999
  return a.encrypt_with_password(S(t), i, n, e);
1935
2000
  }
1936
2001
  static resolveAddress(e, t, r, i) {
1937
2002
  const n = [
1938
- jt(e, r.to_public().hash(), i.to_public().hash()),
1939
- Zt(e, r.to_public().hash()),
1940
- Ut(e, i.to_public().hash())
2003
+ de(e, r.to_public().hash(), i.to_public().hash()),
2004
+ ge(e, r.to_public().hash()),
2005
+ Ft(e, i.to_public().hash())
1941
2006
  ].find((o) => o.to_address().to_bech32() === t);
1942
2007
  if (n !== void 0)
1943
2008
  return n.to_address();
@@ -1945,10 +2010,10 @@ class w {
1945
2010
  }
1946
2011
  static resolveKeys(e, t, r) {
1947
2012
  if (typeof r == "string") {
1948
- const o = w.decrypt(r, t);
1949
- return Ns(o, e);
2013
+ const o = y.decrypt(r, t);
2014
+ return Ds(o, e);
1950
2015
  }
1951
- const i = w.decrypt(r[0], t), n = w.decrypt(r[1], t);
2016
+ const i = y.decrypt(r[0], t), n = y.decrypt(r[1], t);
1952
2017
  return {
1953
2018
  paymentKey: a.PrivateKey.from_hex(i),
1954
2019
  stakeKey: a.PrivateKey.from_hex(n)
@@ -1956,78 +2021,78 @@ class w {
1956
2021
  }
1957
2022
  static resolveSigners(e, t, r) {
1958
2023
  const i = (A) => {
1959
- const c = (g, B = [], y = 0) => {
1960
- var ut, at, Vt, Yt, Ot;
1961
- if (g === void 0 || y >= g.len())
2024
+ const c = (_, B = [], m = 0) => {
2025
+ var lt, At, Yt, Gt, Rt;
2026
+ if (_ === void 0 || m >= _.len())
1962
2027
  return B;
1963
- const v = g.get(y), b = new Array();
2028
+ const v = _.get(m), b = new Array();
1964
2029
  switch (v.kind()) {
1965
2030
  case a.CertificateKind.StakeDeregistration: {
1966
- const p = (ut = v.as_stake_deregistration()) == null ? void 0 : ut.stake_credential(), P = (p == null ? void 0 : p.kind()) === a.StakeCredKind.Key ? p.to_keyhash() : void 0;
1967
- P && b.push(P.to_hex());
2031
+ const w = (lt = v.as_stake_deregistration()) == null ? void 0 : lt.stake_credential(), T = (w == null ? void 0 : w.kind()) === a.StakeCredKind.Key ? w.to_keyhash() : void 0;
2032
+ T && b.push(T.to_hex());
1968
2033
  break;
1969
2034
  }
1970
2035
  case a.CertificateKind.StakeDelegation: {
1971
- const p = (at = v.as_stake_delegation()) == null ? void 0 : at.stake_credential(), P = (p == null ? void 0 : p.kind()) === a.StakeCredKind.Key ? p.to_keyhash() : void 0;
1972
- P && b.push(P.to_hex());
2036
+ const w = (At = v.as_stake_delegation()) == null ? void 0 : At.stake_credential(), T = (w == null ? void 0 : w.kind()) === a.StakeCredKind.Key ? w.to_keyhash() : void 0;
2037
+ T && b.push(T.to_hex());
1973
2038
  break;
1974
2039
  }
1975
2040
  case a.CertificateKind.PoolRegistration: {
1976
- const p = (Vt = v.as_pool_registration()) == null ? void 0 : Vt.pool_params().pool_owners();
1977
- b.push(...u(p));
2041
+ const w = (Yt = v.as_pool_registration()) == null ? void 0 : Yt.pool_params().pool_owners();
2042
+ b.push(...u(w));
1978
2043
  break;
1979
2044
  }
1980
2045
  case a.CertificateKind.PoolRetirement: {
1981
- const p = (Yt = v.as_pool_retirement()) == null ? void 0 : Yt.pool_keyhash();
1982
- p && b.push(p.to_hex());
2046
+ const w = (Gt = v.as_pool_retirement()) == null ? void 0 : Gt.pool_keyhash();
2047
+ w && b.push(w.to_hex());
1983
2048
  break;
1984
2049
  }
1985
2050
  case a.CertificateKind.MoveInstantaneousRewardsCert: {
1986
- const p = (Ot = v.as_move_instantaneous_rewards_cert()) == null ? void 0 : Ot.move_instantaneous_reward().as_to_stake_creds();
1987
- if (p)
1988
- for (let P = 0; P < p.len(); P += 1) {
1989
- const Gt = p.keys().get(P), Rt = Gt.kind() === a.StakeCredKind.Key ? Gt.to_keyhash() : void 0;
1990
- Rt && b.push(Rt.to_hex());
2051
+ const w = (Rt = v.as_move_instantaneous_rewards_cert()) == null ? void 0 : Rt.move_instantaneous_reward().as_to_stake_creds();
2052
+ if (w)
2053
+ for (let T = 0; T < w.len(); T += 1) {
2054
+ const Lt = w.keys().get(T), $t = Lt.kind() === a.StakeCredKind.Key ? Lt.to_keyhash() : void 0;
2055
+ $t && b.push($t.to_hex());
1991
2056
  }
1992
2057
  break;
1993
2058
  }
1994
2059
  }
1995
- return c(g, [...B, ...b], y + 1);
1996
- }, I = (g, B = [], y = 0) => {
1997
- if (g === void 0 || y >= g.len())
2060
+ return c(_, [...B, ...b], m + 1);
2061
+ }, I = (_, B = [], m = 0) => {
2062
+ if (_ === void 0 || m >= _.len())
1998
2063
  return B;
1999
- const v = g.get(y).index(), b = g.get(y).transaction_id(), ut = t.find((at) => at.input.outputIndex === v && at.input.txHash === b.to_hex()) !== void 0 ? r : "OUR_PRINCESS_IS_IN_ANOTHER_CASTLE";
2000
- return I(g, [...B, ut], y + 1);
2001
- }, u = (g, B = [], y = 0) => g === void 0 || y >= g.len() ? B : u(g, [...B, g.get(y).to_hex()], y + 1), h = (g, B = [], y = 0) => {
2002
- if (g === void 0 || y >= g.len())
2064
+ const v = _.get(m).index(), b = _.get(m).transaction_id(), lt = t.find((At) => At.input.outputIndex === v && At.input.txHash === b.to_hex()) !== void 0 ? r : "OUR_PRINCESS_IS_IN_ANOTHER_CASTLE";
2065
+ return I(_, [...B, lt], m + 1);
2066
+ }, u = (_, B = [], m = 0) => _ === void 0 || m >= _.len() ? B : u(_, [...B, _.get(m).to_hex()], m + 1), h = (_, B = [], m = 0) => {
2067
+ if (_ === void 0 || m >= _.len())
2003
2068
  return B;
2004
- const v = g.keys().get(y).payment_cred(), b = v.kind() === a.StakeCredKind.Key ? v.to_keyhash() : void 0;
2005
- return h(g, b ? [...B, b.to_hex()] : B, y + 1);
2006
- }, C = A.certs(), E = A.collateral(), J = A.inputs(), H = A.required_signers(), O = A.withdrawals();
2069
+ const v = _.keys().get(m).payment_cred(), b = v.kind() === a.StakeCredKind.Key ? v.to_keyhash() : void 0;
2070
+ return h(_, b ? [...B, b.to_hex()] : B, m + 1);
2071
+ }, g = A.certs(), p = A.collateral(), x = A.inputs(), M = A.required_signers(), L = A.withdrawals();
2007
2072
  return [
2008
- ...c(C),
2009
- ...I(E),
2010
- ...I(J),
2011
- ...u(H),
2012
- ...h(O)
2073
+ ...c(g),
2074
+ ...I(p),
2075
+ ...I(x),
2076
+ ...u(M),
2077
+ ...h(L)
2013
2078
  ];
2014
2079
  }, n = (A) => {
2015
2080
  const c = (u, h = []) => {
2016
- var C, E, J, H;
2081
+ var g, p, x, M;
2017
2082
  if (u)
2018
- for (let O = 0; O < u.len(); O += 1) {
2019
- const g = u.get(O);
2020
- switch (g.kind()) {
2083
+ for (let L = 0; L < u.len(); L += 1) {
2084
+ const _ = u.get(L);
2085
+ switch (_.kind()) {
2021
2086
  case a.NativeScriptKind.ScriptPubkey: {
2022
- const B = (C = g.as_script_pubkey()) == null ? void 0 : C.addr_keyhash().to_hex();
2087
+ const B = (g = _.as_script_pubkey()) == null ? void 0 : g.addr_keyhash().to_hex();
2023
2088
  return B ? [...h, B] : h;
2024
2089
  }
2025
2090
  case a.NativeScriptKind.ScriptAll:
2026
- return c((E = g.as_script_all()) == null ? void 0 : E.native_scripts(), h);
2091
+ return c((p = _.as_script_all()) == null ? void 0 : p.native_scripts(), h);
2027
2092
  case a.NativeScriptKind.ScriptAny:
2028
- return c((J = g.as_script_any()) == null ? void 0 : J.native_scripts(), h);
2093
+ return c((x = _.as_script_any()) == null ? void 0 : x.native_scripts(), h);
2029
2094
  case a.NativeScriptKind.ScriptNOfK:
2030
- return c((H = g.as_script_n_of_k()) == null ? void 0 : H.native_scripts(), h);
2095
+ return c((M = _.as_script_n_of_k()) == null ? void 0 : M.native_scripts(), h);
2031
2096
  }
2032
2097
  }
2033
2098
  return h;
@@ -2035,57 +2100,57 @@ class w {
2035
2100
  return [
2036
2101
  ...c(I)
2037
2102
  ];
2038
- }, o = $(e);
2103
+ }, o = W(e);
2039
2104
  return /* @__PURE__ */ new Set([
2040
2105
  ...i(o.body()),
2041
2106
  ...n(o.witness_set())
2042
2107
  ]);
2043
2108
  }
2044
2109
  }
2045
- const K = "MARI0TIME";
2046
- class Ar {
2110
+ const U = "MARI0TIME";
2111
+ class fr {
2047
2112
  _fetcher;
2048
2113
  _submitter;
2049
2114
  _wallet;
2050
2115
  constructor(e) {
2051
2116
  switch (this._fetcher = e.fetcher, this._submitter = e.submitter, e.key.type) {
2052
2117
  case "mnemonic":
2053
- this._wallet = new w(e.networkId, w.encryptMnemonic(e.key.words, K));
2118
+ this._wallet = new y(e.networkId, y.encryptMnemonic(e.key.words, U));
2054
2119
  break;
2055
2120
  case "root":
2056
- this._wallet = new w(e.networkId, w.encryptPrivateKey(e.key.bech32, K));
2121
+ this._wallet = new y(e.networkId, y.encryptPrivateKey(e.key.bech32, U));
2057
2122
  break;
2058
2123
  case "cli":
2059
- this._wallet = new w(e.networkId, w.encryptSigningKeys(e.key.payment, e.key.stake ?? "f0".repeat(34), K));
2124
+ this._wallet = new y(e.networkId, y.encryptSigningKeys(e.key.payment, e.key.stake ?? "f0".repeat(34), U));
2060
2125
  }
2061
2126
  }
2062
2127
  getPaymentAddress(e = 0) {
2063
- return this._wallet.getAccount(e, K).enterpriseAddress;
2128
+ return this._wallet.getAccount(e, U).enterpriseAddress;
2064
2129
  }
2065
2130
  getRewardAddress(e = 0) {
2066
- return this._wallet.getAccount(e, K).rewardAddress;
2131
+ return this._wallet.getAccount(e, U).rewardAddress;
2067
2132
  }
2068
2133
  getUsedAddress(e = 0) {
2069
- const t = this._wallet.getAccount(e, K);
2070
- return F(t.enterpriseAddress);
2134
+ const t = this._wallet.getAccount(e, U);
2135
+ return H(t.enterpriseAddress);
2071
2136
  }
2072
- getUsedCollateral(e = T.maxCollateralInputs) {
2137
+ getUsedCollateral(e = Y.maxCollateralInputs) {
2073
2138
  throw new Error("getUsedCollateral not implemented.");
2074
2139
  }
2075
2140
  async getUsedUTxOs(e = 0) {
2076
- const t = this._wallet.getAccount(e, K);
2077
- return (await this._fetcher.fetchAddressUTxOs(t.enterpriseAddress)).map((i) => q(i));
2141
+ const t = this._wallet.getAccount(e, U);
2142
+ return (await this._fetcher.fetchAddressUTxOs(t.enterpriseAddress)).map((i) => O(i));
2078
2143
  }
2079
2144
  signData(e, t, r = 0) {
2080
2145
  try {
2081
- return this._wallet.signData(r, K, e, t);
2146
+ return this._wallet.signData(r, U, e, t);
2082
2147
  } catch (i) {
2083
2148
  throw new Error(`[AppWallet] An error occurred during signData: ${i}.`);
2084
2149
  }
2085
2150
  }
2086
2151
  async signTx(e, t = !1, r = 0) {
2087
2152
  try {
2088
- const i = this._wallet.getAccount(r, K), n = await this._fetcher.fetchAddressUTxOs(i.enterpriseAddress), o = this._wallet.signTx(r, K, n, e, t), A = $(e), c = A.witness_set(), I = Ne(c, o);
2153
+ const i = this._wallet.getAccount(r, U), n = await this._fetcher.fetchAddressUTxOs(i.enterpriseAddress), o = this._wallet.signTx(r, U, n, e, t), A = W(e), c = A.witness_set(), I = Ge(c, o);
2089
2154
  return c.set_vkeys(I), a.Transaction.new(A.body(), c, A.auxiliary_data()).to_hex();
2090
2155
  } catch (i) {
2091
2156
  throw new Error(`[AppWallet] An error occurred during signTx: ${i}.`);
@@ -2095,16 +2160,16 @@ class Ar {
2095
2160
  return this._submitter.submitTx(e);
2096
2161
  }
2097
2162
  static brew(e = 256) {
2098
- return w.generateMnemonic(e);
2163
+ return y.generateMnemonic(e);
2099
2164
  }
2100
2165
  }
2101
- class kt {
2166
+ class Nt {
2102
2167
  _walletInstance;
2103
2168
  constructor(e) {
2104
2169
  this._walletInstance = e;
2105
2170
  }
2106
2171
  static getInstalledWallets() {
2107
- return window.cardano === void 0 ? [] : zt.filter((e) => window.cardano[e] !== void 0).map((e) => ({
2172
+ return window.cardano === void 0 ? [] : Jt.filter((e) => window.cardano[e] !== void 0).map((e) => ({
2108
2173
  name: window.cardano[e].name,
2109
2174
  icon: window.cardano[e].icon,
2110
2175
  version: window.cardano[e].apiVersion
@@ -2112,9 +2177,9 @@ class kt {
2112
2177
  }
2113
2178
  static async enable(e) {
2114
2179
  try {
2115
- const t = await kt.resolveInstance(e);
2180
+ const t = await Nt.resolveInstance(e);
2116
2181
  if (t !== void 0)
2117
- return new kt(t);
2182
+ return new Nt(t);
2118
2183
  throw new Error(`Couldn't create an instance of wallet: ${e}`);
2119
2184
  } catch (t) {
2120
2185
  throw new Error(`[BrowserWallet] An error occurred during enable: ${t}.`);
@@ -2122,38 +2187,38 @@ class kt {
2122
2187
  }
2123
2188
  async getBalance() {
2124
2189
  const e = await this._walletInstance.getBalance();
2125
- return ye(Ze(e));
2190
+ return Te(Ps(e));
2126
2191
  }
2127
2192
  async getChangeAddress() {
2128
2193
  const e = await this._walletInstance.getChangeAddress();
2129
- return nt(e).to_bech32();
2194
+ return tt(e).to_bech32();
2130
2195
  }
2131
- async getCollateral(e = T.maxCollateralInputs) {
2132
- return (await this.getUsedCollateral(e)).map((r) => mt(r));
2196
+ async getCollateral(e = Y.maxCollateralInputs) {
2197
+ return (await this.getUsedCollateral(e)).map((r) => Qt(r));
2133
2198
  }
2134
2199
  getNetworkId() {
2135
2200
  return this._walletInstance.getNetworkId();
2136
2201
  }
2137
2202
  async getRewardAddresses() {
2138
- return (await this._walletInstance.getRewardAddresses()).map((t) => nt(t).to_bech32());
2203
+ return (await this._walletInstance.getRewardAddresses()).map((t) => tt(t).to_bech32());
2139
2204
  }
2140
2205
  async getUnusedAddresses() {
2141
- return (await this._walletInstance.getUnusedAddresses()).map((t) => nt(t).to_bech32());
2206
+ return (await this._walletInstance.getUnusedAddresses()).map((t) => tt(t).to_bech32());
2142
2207
  }
2143
2208
  async getUsedAddresses() {
2144
- return (await this._walletInstance.getUsedAddresses()).map((t) => nt(t).to_bech32());
2209
+ return (await this._walletInstance.getUsedAddresses()).map((t) => tt(t).to_bech32());
2145
2210
  }
2146
2211
  async getUtxos() {
2147
- return (await this.getUsedUTxOs()).map((t) => mt(t));
2212
+ return (await this.getUsedUTxOs()).map((t) => Qt(t));
2148
2213
  }
2149
2214
  signData(e, t) {
2150
- const r = F(e).to_hex();
2215
+ const r = H(e).to_hex();
2151
2216
  return this._walletInstance.signData(r, S(t));
2152
2217
  }
2153
2218
  async signTx(e, t = !1) {
2154
2219
  try {
2155
- const r = $(e), i = r.witness_set(), n = await this._walletInstance.signTx(e, t), o = Xe(n).vkeys() ?? a.Vkeywitnesses.new(), A = Ne(i, o);
2156
- return i.set_vkeys(A), j(a.Transaction.new(r.body(), i, r.auxiliary_data()).to_bytes());
2220
+ const r = W(e), i = r.witness_set(), n = await this._walletInstance.signTx(e, t), o = Hs(n).vkeys() ?? a.Vkeywitnesses.new(), A = Ge(i, o);
2221
+ return i.set_vkeys(A), K(a.Transaction.new(r.body(), i, r.auxiliary_data()).to_bytes());
2157
2222
  } catch (r) {
2158
2223
  throw new Error(`[BrowserWallet] An error occurred during signTx: ${JSON.stringify(r)}.`);
2159
2224
  }
@@ -2163,21 +2228,21 @@ class kt {
2163
2228
  }
2164
2229
  async getUsedAddress() {
2165
2230
  const e = await this._walletInstance.getUsedAddresses();
2166
- return nt(e[0]);
2231
+ return tt(e[0]);
2167
2232
  }
2168
- async getUsedCollateral(e = T.maxCollateralInputs) {
2169
- return (await this._walletInstance.experimental.getCollateral() ?? []).map((r) => Jt(r)).slice(0, e);
2233
+ async getUsedCollateral(e = Y.maxCollateralInputs) {
2234
+ return (await this._walletInstance.experimental.getCollateral() ?? []).map((r) => he(r)).slice(0, e);
2170
2235
  }
2171
2236
  async getUsedUTxOs() {
2172
- return (await this._walletInstance.getUtxos() ?? []).map((t) => Jt(t));
2237
+ return (await this._walletInstance.getUtxos() ?? []).map((t) => he(t));
2173
2238
  }
2174
2239
  async getAssets() {
2175
2240
  return (await this.getBalance()).filter((t) => t.unit !== "lovelace").map((t) => {
2176
- const r = t.unit.slice(0, Q), i = t.unit.slice(Q), n = Hs(r, i);
2241
+ const r = t.unit.slice(0, N), i = t.unit.slice(N), n = Ys(r, i);
2177
2242
  return {
2178
2243
  unit: t.unit,
2179
2244
  policyId: r,
2180
- assetName: Ht(i),
2245
+ assetName: Vt(i),
2181
2246
  fingerprint: n,
2182
2247
  quantity: t.quantity
2183
2248
  };
@@ -2192,20 +2257,20 @@ class kt {
2192
2257
  }
2193
2258
  async getPolicyIds() {
2194
2259
  const e = await this.getBalance();
2195
- return Array.from(new Set(e.map((t) => t.unit.slice(0, Q)))).filter((t) => t !== "lovelace");
2260
+ return Array.from(new Set(e.map((t) => t.unit.slice(0, N)))).filter((t) => t !== "lovelace");
2196
2261
  }
2197
2262
  static resolveInstance(e) {
2198
2263
  if (window.cardano === void 0)
2199
2264
  return;
2200
- const t = zt.map((r) => window.cardano[r]).filter((r) => r !== void 0).find((r) => r.name.toLowerCase() === e.toLowerCase());
2265
+ const t = Jt.map((r) => window.cardano[r]).filter((r) => r !== void 0).find((r) => r.name.toLowerCase() === e.toLowerCase());
2201
2266
  return t == null ? void 0 : t.enable();
2202
2267
  }
2203
2268
  }
2204
- const He = "http://localhost:4000/", Ts = "http://localhost:5000/", Vs = `${He}access`, Ys = `${He}transaction/signtx`;
2205
- class cr {
2269
+ const Re = "http://localhost:4000/", Ls = "http://localhost:5000/", $s = `${Re}access`, qs = `${Re}transaction/signtx`;
2270
+ class _r {
2206
2271
  static getAxiosInstance() {
2207
- return it.create({
2208
- baseURL: Ts,
2272
+ return ot.create({
2273
+ baseURL: Ls,
2209
2274
  withCredentials: !0
2210
2275
  });
2211
2276
  }
@@ -2238,7 +2303,7 @@ class cr {
2238
2303
  }
2239
2304
  }
2240
2305
  static async enable() {
2241
- return await this.get("wallet/getuserwalletsmeta") === void 0 ? await this.openMinaFrontend(Vs) : !0;
2306
+ return await this.get("wallet/getuserwalletsmeta") === void 0 ? await this.openMinaFrontend($s) : !0;
2242
2307
  }
2243
2308
  static async getChangeAddress(e = void 0, t = void 0) {
2244
2309
  return await this.get("wallet/getchangeaddress", {
@@ -2255,9 +2320,9 @@ class cr {
2255
2320
  static async signTx(e, t = !1) {
2256
2321
  const r = await this.get("wallet/getuserwalletsmeta");
2257
2322
  if (console.log("userWalletsMeta", r), r) {
2258
- const i = await this.openMinaFrontend(`${Ys}?unsignedTx=${e}&partialSign=${t}`);
2323
+ const i = await this.openMinaFrontend(`${qs}?unsignedTx=${e}&partialSign=${t}`);
2259
2324
  if (i instanceof a.Vkeywitnesses) {
2260
- const n = $(e), o = n.witness_set();
2325
+ const n = W(e), o = n.witness_set();
2261
2326
  o.set_vkeys(i);
2262
2327
  const A = a.Transaction.new(n.body(), o, n.auxiliary_data()).to_hex();
2263
2328
  return console.log("signedTx", A), A;
@@ -2267,32 +2332,34 @@ class cr {
2267
2332
  }
2268
2333
  }
2269
2334
  export {
2270
- Ar as AppWallet,
2271
- sr as BlockfrostProvider,
2272
- kt as BrowserWallet,
2273
- w as EmbeddedWallet,
2274
- nr as ForgeScript,
2275
- rr as InfuraProvider,
2276
- ir as KoiosProvider,
2277
- cr as MinaWallet,
2278
- ar as TangoProvider,
2279
- Y as Transaction,
2280
- os as largestFirst,
2281
- As as largestFirstMultiAsset,
2282
- qs as resolveDataHash,
2283
- $s as resolveEpochNo,
2284
- Hs as resolveFingerprint,
2285
- zs as resolveLanguageView,
2286
- Js as resolveNativeScriptHash,
2287
- tt as resolvePaymentKeyHash,
2288
- Ws as resolvePlutusScriptAddress,
2289
- js as resolvePlutusScriptHash,
2290
- Xs as resolvePoolId,
2291
- Zs as resolvePrivateKey,
2292
- Tt as resolveRewardAddress,
2293
- tr as resolveScriptRef,
2294
- er as resolveSlotNo,
2295
- _t as resolveStakeKeyHash,
2296
- Fe as resolveTxFees,
2297
- Ps as resolveTxHash
2335
+ fr as AppWallet,
2336
+ Ir as BlockfrostProvider,
2337
+ Nt as BrowserWallet,
2338
+ y as EmbeddedWallet,
2339
+ lr as ForgeScript,
2340
+ hr as InfuraProvider,
2341
+ ur as KoiosProvider,
2342
+ _r as MinaWallet,
2343
+ dr as TangoProvider,
2344
+ R as Transaction,
2345
+ Xs as checkSignature,
2346
+ cr as generateNonce,
2347
+ Ze as largestFirst,
2348
+ ts as largestFirstMultiAsset,
2349
+ Zs as resolveDataHash,
2350
+ tr as resolveEpochNo,
2351
+ Ys as resolveFingerprint,
2352
+ er as resolveLanguageView,
2353
+ sr as resolveNativeScriptHash,
2354
+ et as resolvePaymentKeyHash,
2355
+ rr as resolvePlutusScriptAddress,
2356
+ ir as resolvePlutusScriptHash,
2357
+ ar as resolvePoolId,
2358
+ nr as resolvePrivateKey,
2359
+ Ot as resolveRewardAddress,
2360
+ or as resolveScriptRef,
2361
+ Ar as resolveSlotNo,
2362
+ It as resolveStakeKeyHash,
2363
+ Ye as resolveTxFees,
2364
+ Gs as resolveTxHash
2298
2365
  };