@otoplo/wallet-common 0.4.6 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { Address as e, AddressType as t, BNExtended as n, BufferUtils as r, BufferWriter as i, CommonUtils as a, HDPrivateKey as o, Hash as s, Networks as c, Opcode as l, Output as u, OutputSighashType as d, Script as f, ScriptFactory as ee, ScriptOpcode as p, SighashType as m, Transaction as h, TransactionBuilder as g, TxSigner as _, UnitUtils as v } from "libnexa-ts";
1
+ import { Address as e, AddressType as t, BufferUtils as n, BufferWriter as r, CommonUtils as i, HDPrivateKey as a, Hash as o, Networks as s, Opcode as c, Output as l, OutputSighashType as u, Script as d, ScriptFactory as ee, ScriptNum as f, ScriptOpcode as p, SighashType as m, Transaction as h, TransactionBuilder as g, TxSigner as _, UnitUtils as v } from "libnexa-ts";
2
2
  import y from "js-big-decimal";
3
3
  import { ConnectionStatus as te, ElectrumClient as ne, TransportScheme as b } from "@otoplo/electrum-client";
4
4
  import { generateMnemonic as re, mnemonicToSeedSync as ie, validateMnemonic as ae } from "@scure/bip39";
@@ -50,13 +50,13 @@ var S = /* @__PURE__ */ function(e) {
50
50
  }
51
51
  }, E = Object.keys(T);
52
52
  function D() {
53
- return c.defaultNetwork == c.testnet;
53
+ return s.defaultNetwork == s.testnet;
54
54
  }
55
55
  function le(e) {
56
56
  return D() ? e == "508c843a4b98fb25f57cf9ebafb245a5c16468f06519cdd467059a91e7b79d52" : e == "edc7144fe1ba4edd0edf35d7eea90f6cb1dba42314aa85da8207e97c5339c801";
57
57
  }
58
58
  function O(n, r = t.PayToScriptTemplate) {
59
- return e.isValid(n, c.defaultNetwork, r);
59
+ return e.isValid(n, s.defaultNetwork, r);
60
60
  }
61
61
  function ue() {
62
62
  return `https://${D() ? "testnet-" : ""}explorer.nexa.org`;
@@ -76,13 +76,13 @@ function fe(e) {
76
76
  return e.length === 0 ? "" : e.charAt(0).toUpperCase() + e.substring(1);
77
77
  }
78
78
  function j(t) {
79
- return a.isHexa(t) ? r.hexToBuffer(t) : e.fromString(t).data;
79
+ return i.isHexa(t) ? n.hexToBuffer(t) : e.fromString(t).data;
80
80
  }
81
81
  function M(e) {
82
- return a.isHexa(e) ? e : r.bufferToHex(j(e));
82
+ return i.isHexa(e) ? e : n.bufferToHex(j(e));
83
83
  }
84
84
  function pe(n) {
85
- return a.isHexa(n) ? new e(j(n), c.defaultNetwork, t.GroupIdAddress).toString() : n;
85
+ return i.isHexa(n) ? new e(j(n), s.defaultNetwork, t.GroupIdAddress).toString() : n;
86
86
  }
87
87
  function N(e) {
88
88
  return e == null || e === "" ? "" : BigInt(e) <= 0n ? "0" : e.toString();
@@ -598,11 +598,11 @@ var z = class {
598
598
  this.GAP_LIMIT = 20;
599
599
  }
600
600
  init(e) {
601
- this.seed = typeof e == "string" ? ie(e) : e, this.masterKey = o.fromSeed(this.seed).deriveChild(44, !0).deriveChild(29223, !0);
601
+ this.seed = typeof e == "string" ? ie(e) : e, this.reset();
602
602
  }
603
603
  reset() {
604
604
  if (!this.seed) throw Error("KeysManager not initialized");
605
- this.masterKey = o.fromSeed(this.seed).deriveChild(44, !0).deriveChild(29223, !0), this.accountKeys.clear(), this.walletKeys.clear();
605
+ this.masterKey = a.fromSeed(this.seed).deriveChild(44, !0).deriveChild(29223, !0), this.accountKeys.clear(), this.walletKeys.clear();
606
606
  }
607
607
  getAccountKey(e) {
608
608
  let t = this.accountKeys.get(e);
@@ -625,10 +625,10 @@ var z = class {
625
625
  }
626
626
  };
627
627
  // src/utils/asset.ts
628
- function Se(e, t) {
628
+ function B(e, t) {
629
629
  return e && typeof e == "string" ? e.startsWith("http") ? e.replace("http://", "https://") : e.startsWith("ipfs://") ? e : `${new URL(t).origin}${e}` : "";
630
630
  }
631
- function B(e) {
631
+ function Se(e) {
632
632
  return e ? Ce(e) : null;
633
633
  }
634
634
  function Ce(e, t = "https://ipfs.nebula.markets/") {
@@ -753,35 +753,35 @@ var we = class {
753
753
  throw Error(`Unexpected Error: ${e}`);
754
754
  }
755
755
  }
756
- }, W = 274710, Te = "0014461ad25081cb0119d034385ff154c8d3ad6bdd76";
756
+ }, W = 274710;
757
757
  function G() {
758
- return f.empty().add(l.OP_FROMALTSTACK).add(l.OP_DROP).add(l.OP_FROMALTSTACK).add(l.OP_CHECKLOCKTIMEVERIFY).add(l.OP_DROP).add(l.OP_FROMALTSTACK).add(l.OP_CHECKSIGVERIFY);
758
+ return d.empty().add(c.OP_FROMALTSTACK).add(c.OP_DROP).add(c.OP_FROMALTSTACK).add(c.OP_CHECKLOCKTIMEVERIFY).add(c.OP_DROP).add(c.OP_FROMALTSTACK).add(c.OP_CHECKSIGVERIFY);
759
759
  }
760
760
  function K() {
761
761
  let e = G();
762
- return s.sha256ripemd160(e.toBuffer());
762
+ return o.sha256ripemd160(e.toBuffer());
763
763
  }
764
764
  function q(e) {
765
- return f.empty().add(e.toBuffer());
765
+ return d.empty().add(e.toBuffer());
766
766
  }
767
767
  function J(e) {
768
768
  let t = q(e);
769
- return s.sha256ripemd160(t.toBuffer());
769
+ return o.sha256ripemd160(t.toBuffer());
770
770
  }
771
771
  function Y(e) {
772
- return e.map((e) => e <= 16 ? p.smallInt(e) : n.fromNumber(e).toScriptNumBuffer());
772
+ return e.map((e) => e <= 16 ? p.smallInt(e) : f.encode(e));
773
773
  }
774
774
  function X(t, n) {
775
775
  if (n.length !== 2) return;
776
776
  let r = K(), i = J(t), a = Y(n);
777
777
  return e.fromScriptTemplate(r, i, a).toString();
778
778
  }
779
- function Ee(e, t) {
779
+ function Te(e, t) {
780
780
  let n = (t - e) * 2, r = /* @__PURE__ */ new Date();
781
781
  return r.setMinutes(r.getMinutes() + n), r.toLocaleDateString();
782
782
  }
783
783
  // src/services/transaction.ts
784
- var De = class {
784
+ var Ee = class {
785
785
  constructor(e, t, n) {
786
786
  this.MAX_INPUTS_OUTPUTS = 250, this.rostrumService = e, this.keyManager = t, this.walletDb = n;
787
787
  }
@@ -968,7 +968,7 @@ var De = class {
968
968
  }
969
969
  };
970
970
  // src/utils/seed.ts
971
- function Oe(e = 12) {
971
+ function De(e = 12) {
972
972
  return re(x, e === 24 ? 256 : 128);
973
973
  }
974
974
  function Z(e) {
@@ -986,28 +986,28 @@ async function Q(e, t) {
986
986
  length: 256
987
987
  }, !1, ["encrypt", "decrypt"]);
988
988
  }
989
- async function ke(e, t) {
990
- let n = r.utf8ToBuffer(t), i = r.getRandomBuffer(16), a = r.getRandomBuffer(12), o = r.utf8ToBuffer(e), s = await Q(n, i), c = await crypto.subtle.encrypt({
989
+ async function Oe(e, t) {
990
+ let r = n.utf8ToBuffer(t), i = n.getRandomBuffer(16), a = n.getRandomBuffer(12), o = n.utf8ToBuffer(e), s = await Q(r, i), c = await crypto.subtle.encrypt({
991
991
  name: "AES-GCM",
992
992
  iv: new Uint8Array(a)
993
- }, s, new Uint8Array(o)), l = r.concat([
993
+ }, s, new Uint8Array(o)), l = n.concat([
994
994
  i,
995
995
  a,
996
996
  new Uint8Array(c)
997
997
  ]);
998
- return r.bufferToBase64(l);
998
+ return n.bufferToBase64(l);
999
999
  }
1000
- async function Ae(e, t) {
1001
- let n = r.utf8ToBuffer(t), i = r.base64ToBuffer(e), a = i.slice(0, 16), o = i.slice(16, 28), s = i.slice(28), c = await Q(n, a), l = await crypto.subtle.decrypt({
1000
+ async function ke(e, t) {
1001
+ let r = n.utf8ToBuffer(t), i = n.base64ToBuffer(e), a = i.slice(0, 16), o = i.slice(16, 28), s = i.slice(28), c = await Q(r, a), l = await crypto.subtle.decrypt({
1002
1002
  name: "AES-GCM",
1003
1003
  iv: o
1004
1004
  }, c, s);
1005
- return r.bufferToUtf8(new Uint8Array(l));
1005
+ return n.bufferToUtf8(new Uint8Array(l));
1006
1006
  }
1007
- async function je(e, t) {
1007
+ async function Ae(e, t) {
1008
1008
  try {
1009
1009
  if (e) {
1010
- let n = await Ae(e, t);
1010
+ let n = await ke(e, t);
1011
1011
  if (n && Z(n)) return n;
1012
1012
  }
1013
1013
  return !1;
@@ -1016,7 +1016,7 @@ async function je(e, t) {
1016
1016
  }
1017
1017
  }
1018
1018
  // src/services/session.ts
1019
- var Me = class {
1019
+ var je = class {
1020
1020
  constructor(e, t) {
1021
1021
  this.walletDb = e, this.keyManager = t, this.providers = /* @__PURE__ */ new Map(), this.handlers = /* @__PURE__ */ new Map(), this.removeOnClose = !0;
1022
1022
  }
@@ -1152,7 +1152,7 @@ var Me = class {
1152
1152
  address: e.address,
1153
1153
  pubkey: this.keyManager.getKey(t).publicKey.toString(),
1154
1154
  blockchain: "nexa",
1155
- network: c.defaultNetwork.name,
1155
+ network: s.defaultNetwork.name,
1156
1156
  capabilities: {
1157
1157
  addToken: !0,
1158
1158
  sendTransaction: !0,
@@ -1162,7 +1162,7 @@ var Me = class {
1162
1162
  };
1163
1163
  });
1164
1164
  }
1165
- }, Ne = class {
1165
+ }, Me = class {
1166
1166
  constructor(e, t, n) {
1167
1167
  this.rostrumService = e, this.keyManager = t, this.assetService = n;
1168
1168
  }
@@ -1200,18 +1200,18 @@ var Me = class {
1200
1200
  await Promise.all(t);
1201
1201
  }
1202
1202
  async processInput(e, t) {
1203
- let n = e.txDetails.tx.inputs[t], i = await this.rostrumService.getUtxo(r.bufferToHex(n.outpoint));
1203
+ let r = e.txDetails.tx.inputs[t], i = await this.rostrumService.getUtxo(n.bufferToHex(r.outpoint));
1204
1204
  if (i.status == "spent") throw Error("Input UTXO is already spent.");
1205
- if (n.output = new u(i.amount, i.scriptpubkey), n.output.address == e.address) {
1206
- let r = i.token_id_hex || "NEXA";
1205
+ if (r.output = new l(i.amount, i.scriptpubkey), r.output.address == e.address) {
1206
+ let n = i.token_id_hex || "NEXA";
1207
1207
  e.myInputs.set(t, {
1208
1208
  address: e.address,
1209
1209
  nexaAmount: i.amount.toString(),
1210
- assetId: r,
1210
+ assetId: n,
1211
1211
  assetAmount: N(i.group_quantity) || i.amount.toString()
1212
- }), e.involvedAssets.add(r), n.scriptSig.isEmpty() && e.inputsToSign.add(t);
1212
+ }), e.involvedAssets.add(n), r.scriptSig.isEmpty() && e.inputsToSign.add(t);
1213
1213
  }
1214
- n.scriptSig.findPlaceholder() > 0 && e.inputsToSign.add(t);
1214
+ r.scriptSig.findPlaceholder() > 0 && e.inputsToSign.add(t);
1215
1215
  }
1216
1216
  processOutputs(e) {
1217
1217
  for (let t = 0; t < e.txDetails.tx.outputs.length; t++) {
@@ -1232,34 +1232,34 @@ var Me = class {
1232
1232
  let n = e.txDetails.tx.inputs[t], r = this.validateAndGetSubscript(n);
1233
1233
  if (n.scriptSig.isEmpty()) {
1234
1234
  e.allMyOutputsCovered = !0;
1235
- let i = _.sign(e.txDetails.tx, t, m.ALL, r, e.privateKey).toTxFormat(), a = f.empty().add(e.privateKey.publicKey.toBuffer());
1236
- n.scriptSig = ee.buildScriptTemplateIn(void 0, a, f.empty().add(i));
1235
+ let i = _.sign(e.txDetails.tx, t, m.ALL, r, e.privateKey).toTxFormat(), a = d.empty().add(e.privateKey.publicKey.toBuffer());
1236
+ n.scriptSig = ee.buildScriptTemplateIn(void 0, a, d.empty().add(i));
1237
1237
  } else {
1238
1238
  let i = n.scriptSig.findPlaceholder(), a = n.scriptSig.chunks[i].buf.subarray(64), o = m.fromBuffer(a);
1239
1239
  this.processSignatureCoverage(e, o);
1240
1240
  let s = _.sign(e.txDetails.tx, t, o, r, e.privateKey).toTxFormat(a);
1241
- n.scriptSig.replaceChunk(i, f.empty().add(s));
1241
+ n.scriptSig.replaceChunk(i, d.empty().add(s));
1242
1242
  }
1243
1243
  }
1244
1244
  if (!e.allMyOutputsCovered) throw Error("Some of interested outputs are not covered by signatures.");
1245
1245
  }
1246
1246
  validateAndGetSubscript(e) {
1247
1247
  if (e.output.scriptPubKey.isPublicKeyTemplateOut()) {
1248
- if (e.scriptSig.isEmpty() || e.scriptSig.isPublicKeyTemplateIn()) return f.empty().add(l.OP_FROMALTSTACK).add(l.OP_CHECKSIGVERIFY);
1248
+ if (e.scriptSig.isEmpty() || e.scriptSig.isPublicKeyTemplateIn()) return d.empty().add(c.OP_FROMALTSTACK).add(c.OP_CHECKSIGVERIFY);
1249
1249
  throw Error("Invalid input script type.");
1250
1250
  }
1251
1251
  if (e.output.scriptPubKey.isScriptTemplateOut()) {
1252
1252
  if (!e.scriptSig.isScriptTemplateIn()) throw Error("Unsupported input script type.");
1253
- let t = e.output.scriptPubKey.getTemplateHash(), n = e.scriptSig.chunks[0].buf;
1254
- if (r.equals(t, s.sha256ripemd160(n)) || r.equals(t, s.sha256sha256(n))) return f.fromBuffer(n);
1253
+ let t = e.output.scriptPubKey.getTemplateHash(), r = e.scriptSig.chunks[0].buf;
1254
+ if (n.equals(t, o.sha256ripemd160(r)) || n.equals(t, o.sha256sha256(r))) return d.fromBuffer(r);
1255
1255
  throw Error("Invalid input script template.");
1256
1256
  }
1257
1257
  throw Error("Unsupported prevout script type.");
1258
1258
  }
1259
1259
  processSignatureCoverage(e, t) {
1260
1260
  if (!e.allMyOutputsCovered) {
1261
- if (t.outType == d.TWO) e.coveredOutputs.add(t.outData[0]), e.coveredOutputs.add(t.outData[1]), this.checkSignatureCoverage(e);
1262
- else if (t.outType == d.FIRSTN) {
1261
+ if (t.outType == u.TWO) e.coveredOutputs.add(t.outData[0]), e.coveredOutputs.add(t.outData[1]), this.checkSignatureCoverage(e);
1262
+ else if (t.outType == u.FIRSTN) {
1263
1263
  let n = t.outData[0];
1264
1264
  for (let t = 0; t < n; t++) e.coveredOutputs.add(t);
1265
1265
  this.checkSignatureCoverage(e);
@@ -1287,7 +1287,7 @@ var Me = class {
1287
1287
  t !== "NEXA" && (n.asset = await this.assetService.getAssetInfo(t)), n.amount > 0n ? e.txDetails.receive.push(n) : n.amount < 0n && e.txDetails.send.push(n);
1288
1288
  }
1289
1289
  }
1290
- }, $ = 5, Pe = class {
1290
+ }, $ = 5, Ne = class {
1291
1291
  constructor(e, t) {
1292
1292
  this.rostrumService = e, this.keyManager = t;
1293
1293
  }
@@ -1310,30 +1310,30 @@ var Me = class {
1310
1310
  }), t;
1311
1311
  }
1312
1312
  async checkForVaults() {
1313
- let e = /* @__PURE__ */ new Set(), t = r.bufferToHex(K()), n = 0;
1314
- for (let i = 0; n < $; i += $) {
1315
- let a = await Promise.all(Array.from({ length: $ }, (e, n) => {
1313
+ let e = /* @__PURE__ */ new Set(), t = n.bufferToHex(K()), r = 0;
1314
+ for (let i = 0; r < $; i += $) {
1315
+ let a = await Promise.all(Array.from({ length: $ }, (e, r) => {
1316
1316
  let a = this.keyManager.getKey({
1317
1317
  account: S.VAULT,
1318
1318
  type: C.RECEIVE,
1319
- index: i + n
1320
- }), o = r.bufferToHex(J(a.publicKey));
1319
+ index: i + r
1320
+ }), o = n.bufferToHex(J(a.publicKey));
1321
1321
  return this.rostrumService.listTemplateScripts(t, o);
1322
1322
  }));
1323
- for (let t of a) t.length === 0 ? n++ : (n = 0, t.forEach((t) => e.add(t.scriptpubkey)));
1323
+ for (let t of a) t.length === 0 ? r++ : (r = 0, t.forEach((t) => e.add(t.scriptpubkey)));
1324
1324
  }
1325
1325
  return e;
1326
1326
  }
1327
1327
  parseVaultDetails(t) {
1328
- let r = f.fromHex(t), a = new i().writeVarLengthBuf(r.toBuffer()).toBuffer(), o = new e(a).toString(), s = r.getVisibleArgs(), c = n.fromScriptNumBuffer(s.chunks[0].buf).toNumber(), l = p.isSmallIntOp(s.chunks[1].opcodenum) ? p.decodeOP_N(s.chunks[1].opcodenum) : n.fromScriptNumBuffer(s.chunks[1].buf).toNumber(), u = [c, l];
1329
- if (o == X(this.keyManager.getKey({
1328
+ let n = d.fromHex(t), i = new r().writeVarLengthBuf(n.toBuffer()).toBuffer(), a = new e(i).toString(), o = n.getVisibleArgs(), s = Number(f.decode(o.chunks[0].buf)), c = p.isSmallIntOp(o.chunks[1].opcodenum) ? p.decodeOP_N(o.chunks[1].opcodenum) : Number(f.decode(o.chunks[1].buf)), l = [s, c];
1329
+ if (a == X(this.keyManager.getKey({
1330
1330
  account: S.VAULT,
1331
1331
  type: C.RECEIVE,
1332
- index: l
1333
- }).publicKey, u)) return {
1334
- address: o,
1335
- block: c,
1336
- idx: l,
1332
+ index: c
1333
+ }).publicKey, l)) return {
1334
+ address: a,
1335
+ block: s,
1336
+ idx: c,
1337
1337
  statusHash: "",
1338
1338
  balance: {
1339
1339
  confirmed: "0",
@@ -1344,7 +1344,7 @@ var Me = class {
1344
1344
  type: S.VAULT
1345
1345
  };
1346
1346
  }
1347
- }, Fe = class e {
1347
+ }, Pe = class e {
1348
1348
  static {
1349
1349
  this.DEBOUNCE_MS = 2e3;
1350
1350
  }
@@ -1356,7 +1356,7 @@ var Me = class {
1356
1356
  address: r,
1357
1357
  result: n
1358
1358
  });
1359
- }, this.discoveryService = new Pe(this.rostrumService, this.keyManager), this.accounts = /* @__PURE__ */ new Map(), this.accountsAddressToId = /* @__PURE__ */ new Map(), this.receiveAddresses = [], this.changeAddresses = [], this.vaults = /* @__PURE__ */ new Map(), this.pendingUpdates = /* @__PURE__ */ new Map(), this.addressResolvers = /* @__PURE__ */ new Map();
1359
+ }, this.discoveryService = new Ne(this.rostrumService, this.keyManager), this.accounts = /* @__PURE__ */ new Map(), this.accountsAddressToId = /* @__PURE__ */ new Map(), this.receiveAddresses = [], this.changeAddresses = [], this.vaults = /* @__PURE__ */ new Map(), this.pendingUpdates = /* @__PURE__ */ new Map(), this.addressResolvers = /* @__PURE__ */ new Map();
1360
1360
  }
1361
1361
  onUpdate(e) {
1362
1362
  this.updateCallback = e;
@@ -1414,20 +1414,20 @@ var Me = class {
1414
1414
  n,
1415
1415
  r
1416
1416
  ]);
1417
- this.receiveAddresses = this.deriveAddresses(C.RECEIVE, 0, i + z.GAP_LIMIT + 1), this.changeAddresses = this.deriveAddresses(C.CHANGE, 0, a + z.GAP_LIMIT + 1), this.accounts = this.deriveAccounts(0, o < 0 ? 1 : o + 1), this.accounts.forEach((e) => this.accountsAddressToId.set(e.address, e.id)), this.vaults = s, await this.saveAddresses(this.receiveAddresses), await this.saveAddresses(this.changeAddresses), await this.saveAccounts(this.accounts), await this.saveVaults(this.vaults), this.initState(), await this.initialSync();
1417
+ this.receiveAddresses = this.deriveAddresses(C.RECEIVE, 0, i + z.GAP_LIMIT + 1), this.changeAddresses = this.deriveAddresses(C.CHANGE, 0, a + z.GAP_LIMIT + 1), this.accounts = this.deriveAccounts(0, o < 0 ? 1 : o + 1), this.accounts.forEach((e) => this.accountsAddressToId.set(e.address, e.id)), this.vaults = s, await this.saveAddresses(this.receiveAddresses), await this.saveAddresses(this.changeAddresses), await this.saveAccounts(this.accounts), await this.saveVaults(this.vaults), this.initState();
1418
1418
  }
1419
1419
  async loadWallet() {
1420
1420
  this.receiveAddresses = await this.walletDb.getReceiveAddresses(), this.changeAddresses = await this.walletDb.getChangeAddresses();
1421
1421
  let e = await this.walletDb.getAccounts();
1422
1422
  this.accounts = new Map(e.map((e) => [e.id, e])), this.accountsAddressToId = new Map(e.map((e) => [e.address, e.id]));
1423
1423
  let t = await this.walletDb.getVaults();
1424
- this.vaults = new Map(t.map((e) => [e.address, e])), this.initState(), await this.reconnectSync();
1424
+ this.vaults = new Map(t.map((e) => [e.address, e])), this.initState();
1425
1425
  }
1426
1426
  async initialSync() {
1427
- await this.subscribeAddresses(this.getAllAddresses(), !0);
1427
+ return this.subscribeAddresses(this.getAllAddresses(), !0);
1428
1428
  }
1429
1429
  async reconnectSync() {
1430
- await Promise.all([this.sessionManager.reload(this.accounts), this.subscribeAddresses(this.getAllAddresses())]);
1430
+ return Promise.all([this.sessionManager.reload(this.accounts), this.subscribeAddresses(this.getAllAddresses())]);
1431
1431
  }
1432
1432
  initState() {
1433
1433
  let e = this.getMainAddresses();
@@ -1763,7 +1763,7 @@ var Me = class {
1763
1763
  isMainAddress(e) {
1764
1764
  return e.type == S.MAIN;
1765
1765
  }
1766
- }, Ie = class e {
1766
+ }, Fe = class e {
1767
1767
  static {
1768
1768
  this.POLL_INTERVAL_MS = 12e4;
1769
1769
  }
@@ -1844,6 +1844,6 @@ var Me = class {
1844
1844
  }), a;
1845
1845
  }
1846
1846
  };
1847
- export { S as AccountType, we as AssetService, T as CURRENCIES, se as HD_WALLET_ID, z as KeyManager, C as KeySpace, ce as MAX_INT64, Ie as MarketService, xe as RostrumService, Me as SessionManager, w as SessionRequestType, De as TransactionService, Ne as TransactionTransformer, W as VAULT_FIRST_BLOCK, Te as VAULT_SCRIPT_PREFIX, be as WalletCache, ye as WalletDB, Fe as WalletManager, ve as calculateFiatValue, fe as capitalizeFirstLetter, E as currencyCodes, k as currentTimestamp, ke as encryptMnemonic, Ee as estimateDateByFutureBlock, Oe as generateNewMnemonic, X as generateVaultAddress, q as generateVaultConstraint, Y as generateVaultVisibleArgs, j as getAddressBuffer, H as getAssetFileUrl, V as getAssetMetadataUrl, ue as getExplorerUrl, me as getFileMediaType, he as getFileMimeType, J as getVaultConstraintHash, G as getVaultTemplate, K as getVaultTemplateHash, le as isGenesisHashValid, Z as isMnemonicValid, A as isNullOrEmpty, D as isTestnet, O as isValidNexaAddress, L as keyPathToString, B as parseTokenDataUrl, _e as prettifyAmount, ge as sleep, R as stringToKeyPath, P as sumBalance, F as sumTokensBalance, N as tokenAmountToAssetAmount, pe as tokenHexToAddr, M as tokenIdToHex, Se as transformTokenIconUrl, de as truncateStringMiddle, je as validateAndDecryptMnemonic };
1847
+ export { S as AccountType, we as AssetService, T as CURRENCIES, se as HD_WALLET_ID, z as KeyManager, C as KeySpace, ce as MAX_INT64, Fe as MarketService, xe as RostrumService, je as SessionManager, w as SessionRequestType, Ee as TransactionService, Me as TransactionTransformer, W as VAULT_FIRST_BLOCK, be as WalletCache, ye as WalletDB, Pe as WalletManager, ve as calculateFiatValue, fe as capitalizeFirstLetter, E as currencyCodes, k as currentTimestamp, Oe as encryptMnemonic, Te as estimateDateByFutureBlock, De as generateNewMnemonic, X as generateVaultAddress, q as generateVaultConstraint, Y as generateVaultVisibleArgs, j as getAddressBuffer, H as getAssetFileUrl, V as getAssetMetadataUrl, ue as getExplorerUrl, me as getFileMediaType, he as getFileMimeType, J as getVaultConstraintHash, G as getVaultTemplate, K as getVaultTemplateHash, le as isGenesisHashValid, Z as isMnemonicValid, A as isNullOrEmpty, D as isTestnet, O as isValidNexaAddress, L as keyPathToString, Se as parseTokenDataUrl, _e as prettifyAmount, ge as sleep, R as stringToKeyPath, P as sumBalance, F as sumTokensBalance, N as tokenAmountToAssetAmount, pe as tokenHexToAddr, M as tokenIdToHex, B as transformTokenIconUrl, de as truncateStringMiddle, Ae as validateAndDecryptMnemonic };
1848
1848
 
1849
1849
  //# sourceMappingURL=index.js.map