@meshsdk/wallet 1.8.14 → 1.9.0-beta.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.cjs CHANGED
@@ -920,7 +920,6 @@ var AppWallet = class {
920
920
 
921
921
  // src/browser/browser-wallet.ts
922
922
  var import_common2 = require("@meshsdk/common");
923
- var import_core_csl = require("@meshsdk/core-csl");
924
923
  var import_core_cst3 = require("@meshsdk/core-cst");
925
924
  var BrowserWallet = class _BrowserWallet {
926
925
  constructor(_walletInstance, _walletName) {
@@ -1294,8 +1293,8 @@ var BrowserWallet = class _BrowserWallet {
1294
1293
  if (this._walletInstance.cip95 === void 0) return void 0;
1295
1294
  const dRepKey = await this._walletInstance.cip95.getPubDRepKey();
1296
1295
  const { dRepIDHash } = await _BrowserWallet.dRepKeyToDRepID(dRepKey);
1297
- const csldRepIdKeyHash = import_core_csl.csl.PublicKey.from_hex(dRepKey).hash();
1298
- const dRepId = csldRepIdKeyHash.to_bech32("drep");
1296
+ const csldRepIdKeyHash = (0, import_core_cst3.blake2b)(28).update(Buffer.from(dRepKey, "hex")).digest("hex");
1297
+ const dRepId = (0, import_core_cst3.hexToBech32)("drep", csldRepIdKeyHash);
1299
1298
  return {
1300
1299
  publicKey: dRepKey,
1301
1300
  publicKeyHash: dRepIDHash,
@@ -1317,8 +1316,8 @@ var BrowserWallet = class _BrowserWallet {
1317
1316
  if (this._walletInstance.cip95 === void 0) return void 0;
1318
1317
  const dRepKey = await this._walletInstance.cip95.getPubDRepKey();
1319
1318
  const { dRepIDHash } = await _BrowserWallet.dRepKeyToDRepID(dRepKey);
1320
- const csldRepIdKeyHash = import_core_csl.csl.PublicKey.from_hex(dRepKey).hash();
1321
- const dRepId = csldRepIdKeyHash.to_bech32("drep");
1319
+ const csldRepIdKeyHash = (0, import_core_cst3.blake2b)(28).update(Buffer.from(dRepKey, "hex")).digest("hex");
1320
+ const dRepId = (0, import_core_cst3.hexToBech32)("drep", csldRepIdKeyHash);
1322
1321
  return {
1323
1322
  pubDRepKey: dRepKey,
1324
1323
  dRepIDHash,
@@ -1576,7 +1575,6 @@ async function handleLogin({
1576
1575
 
1577
1576
  // src/mesh/index.ts
1578
1577
  var import_common4 = require("@meshsdk/common");
1579
- var import_core_csl2 = require("@meshsdk/core-csl");
1580
1578
  var import_core_cst5 = require("@meshsdk/core-cst");
1581
1579
  var import_transaction = require("@meshsdk/transaction");
1582
1580
  var MeshWallet = class {
@@ -2000,7 +1998,7 @@ var MeshWallet = class {
2000
1998
  static brew(privateKey = false, strength = 256) {
2001
1999
  const mnemonic = EmbeddedWallet.generateMnemonic(strength);
2002
2000
  if (privateKey) {
2003
- return (0, import_core_csl2.resolvePrivateKey)(mnemonic);
2001
+ return (0, import_core_cst5.resolvePrivateKey)(mnemonic);
2004
2002
  }
2005
2003
  return mnemonic;
2006
2004
  }
package/dist/index.js CHANGED
@@ -934,9 +934,9 @@ import {
934
934
  POLICY_ID_LENGTH,
935
935
  resolveFingerprint
936
936
  } from "@meshsdk/common";
937
- import { csl } from "@meshsdk/core-csl";
938
937
  import {
939
938
  addressToBech32,
939
+ blake2b,
940
940
  CardanoSDKUtil,
941
941
  deserializeAddress,
942
942
  deserializeTx as deserializeTx3,
@@ -946,6 +946,7 @@ import {
946
946
  Ed25519PublicKeyHex as Ed25519PublicKeyHex2,
947
947
  fromTxUnspentOutput,
948
948
  fromValue,
949
+ hexToBech32,
949
950
  Serialization as Serialization2,
950
951
  toAddress as toAddress2,
951
952
  Transaction as Transaction2,
@@ -1323,8 +1324,8 @@ var BrowserWallet = class _BrowserWallet {
1323
1324
  if (this._walletInstance.cip95 === void 0) return void 0;
1324
1325
  const dRepKey = await this._walletInstance.cip95.getPubDRepKey();
1325
1326
  const { dRepIDHash } = await _BrowserWallet.dRepKeyToDRepID(dRepKey);
1326
- const csldRepIdKeyHash = csl.PublicKey.from_hex(dRepKey).hash();
1327
- const dRepId = csldRepIdKeyHash.to_bech32("drep");
1327
+ const csldRepIdKeyHash = blake2b(28).update(Buffer.from(dRepKey, "hex")).digest("hex");
1328
+ const dRepId = hexToBech32("drep", csldRepIdKeyHash);
1328
1329
  return {
1329
1330
  publicKey: dRepKey,
1330
1331
  publicKeyHash: dRepIDHash,
@@ -1346,8 +1347,8 @@ var BrowserWallet = class _BrowserWallet {
1346
1347
  if (this._walletInstance.cip95 === void 0) return void 0;
1347
1348
  const dRepKey = await this._walletInstance.cip95.getPubDRepKey();
1348
1349
  const { dRepIDHash } = await _BrowserWallet.dRepKeyToDRepID(dRepKey);
1349
- const csldRepIdKeyHash = csl.PublicKey.from_hex(dRepKey).hash();
1350
- const dRepId = csldRepIdKeyHash.to_bech32("drep");
1350
+ const csldRepIdKeyHash = blake2b(28).update(Buffer.from(dRepKey, "hex")).digest("hex");
1351
+ const dRepId = hexToBech32("drep", csldRepIdKeyHash);
1351
1352
  return {
1352
1353
  pubDRepKey: dRepKey,
1353
1354
  dRepIDHash,
@@ -1609,7 +1610,6 @@ import {
1609
1610
  resolveFingerprint as resolveFingerprint2,
1610
1611
  toUTF8
1611
1612
  } from "@meshsdk/common";
1612
- import { resolvePrivateKey } from "@meshsdk/core-csl";
1613
1613
  import {
1614
1614
  Address as Address4,
1615
1615
  buildBaseAddress as buildBaseAddress2,
@@ -1619,6 +1619,7 @@ import {
1619
1619
  Ed25519KeyHashHex as Ed25519KeyHashHex3,
1620
1620
  fromTxUnspentOutput as fromTxUnspentOutput2,
1621
1621
  Hash28ByteBase16 as Hash28ByteBase162,
1622
+ resolvePrivateKey,
1622
1623
  toAddress as toAddress3,
1623
1624
  toTxUnspentOutput as toTxUnspentOutput2
1624
1625
  } from "@meshsdk/core-cst";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meshsdk/wallet",
3
- "version": "1.8.14",
3
+ "version": "1.9.0-beta.0",
4
4
  "description": "Wallets - https://meshjs.dev/apis/wallets",
5
5
  "main": "./dist/index.cjs",
6
6
  "browser": "./dist/index.js",
@@ -35,10 +35,9 @@
35
35
  "typescript": "^5.3.3"
36
36
  },
37
37
  "dependencies": {
38
- "@meshsdk/common": "1.8.14",
39
- "@meshsdk/core-csl": "1.8.14",
40
- "@meshsdk/core-cst": "1.8.14",
41
- "@meshsdk/transaction": "1.8.14",
38
+ "@meshsdk/common": "1.9.0-beta.0",
39
+ "@meshsdk/core-cst": "1.9.0-beta.0",
40
+ "@meshsdk/transaction": "1.9.0-beta.0",
42
41
  "@simplewebauthn/browser": "^13.0.0"
43
42
  },
44
43
  "prettier": "@meshsdk/configs/prettier",