@meshsdk/wallet 1.6.13 → 1.7.1
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 +6 -6
- package/dist/index.js +4 -5
- package/package.json +5 -5
package/dist/index.cjs
CHANGED
|
@@ -582,6 +582,7 @@ var AppWallet = class {
|
|
|
582
582
|
|
|
583
583
|
// src/browser/index.ts
|
|
584
584
|
var import_common2 = require("@meshsdk/common");
|
|
585
|
+
var import_core_csl = require("@meshsdk/core-csl");
|
|
585
586
|
var import_core_cst3 = require("@meshsdk/core-cst");
|
|
586
587
|
|
|
587
588
|
// src/browser/metamask.ts
|
|
@@ -991,14 +992,13 @@ var BrowserWallet = class _BrowserWallet {
|
|
|
991
992
|
try {
|
|
992
993
|
if (this._walletInstance.cip95 === void 0) return void 0;
|
|
993
994
|
const dRepKey = await this._walletInstance.cip95.getPubDRepKey();
|
|
994
|
-
const {
|
|
995
|
-
const
|
|
996
|
-
const dRepId =
|
|
995
|
+
const { dRepIDHash } = await _BrowserWallet.dRepKeyToDRepID(dRepKey);
|
|
996
|
+
const csldRepIdKeyHash = import_core_csl.csl.PublicKey.from_hex(dRepKey).hash();
|
|
997
|
+
const dRepId = csldRepIdKeyHash.to_bech32("drep");
|
|
997
998
|
return {
|
|
998
999
|
pubDRepKey: dRepKey,
|
|
999
1000
|
dRepIDHash,
|
|
1000
1001
|
dRepIDBech32: dRepId
|
|
1001
|
-
// todo to check
|
|
1002
1002
|
};
|
|
1003
1003
|
} catch (e) {
|
|
1004
1004
|
console.error(e);
|
|
@@ -1092,7 +1092,7 @@ var BrowserWallet = class _BrowserWallet {
|
|
|
1092
1092
|
|
|
1093
1093
|
// src/mesh/index.ts
|
|
1094
1094
|
var import_common3 = require("@meshsdk/common");
|
|
1095
|
-
var
|
|
1095
|
+
var import_core_csl2 = require("@meshsdk/core-csl");
|
|
1096
1096
|
var import_core_cst4 = require("@meshsdk/core-cst");
|
|
1097
1097
|
var import_transaction = require("@meshsdk/transaction");
|
|
1098
1098
|
var MeshWallet = class {
|
|
@@ -1468,7 +1468,7 @@ var MeshWallet = class {
|
|
|
1468
1468
|
static brew(privateKey = false, strength = 256) {
|
|
1469
1469
|
const mnemonic = EmbeddedWallet.generateMnemonic(strength);
|
|
1470
1470
|
if (privateKey) {
|
|
1471
|
-
return (0,
|
|
1471
|
+
return (0, import_core_csl2.resolvePrivateKey)(mnemonic);
|
|
1472
1472
|
}
|
|
1473
1473
|
return mnemonic;
|
|
1474
1474
|
}
|
package/dist/index.js
CHANGED
|
@@ -576,9 +576,9 @@ import {
|
|
|
576
576
|
POLICY_ID_LENGTH,
|
|
577
577
|
resolveFingerprint
|
|
578
578
|
} from "@meshsdk/common";
|
|
579
|
+
import { csl } from "@meshsdk/core-csl";
|
|
579
580
|
import {
|
|
580
581
|
addressToBech32,
|
|
581
|
-
buildDRepID as buildDRepID2,
|
|
582
582
|
CardanoSDKUtil,
|
|
583
583
|
deserializeAddress,
|
|
584
584
|
deserializeTx as deserializeTx3,
|
|
@@ -1001,14 +1001,13 @@ var BrowserWallet = class _BrowserWallet {
|
|
|
1001
1001
|
try {
|
|
1002
1002
|
if (this._walletInstance.cip95 === void 0) return void 0;
|
|
1003
1003
|
const dRepKey = await this._walletInstance.cip95.getPubDRepKey();
|
|
1004
|
-
const {
|
|
1005
|
-
const
|
|
1006
|
-
const dRepId =
|
|
1004
|
+
const { dRepIDHash } = await _BrowserWallet.dRepKeyToDRepID(dRepKey);
|
|
1005
|
+
const csldRepIdKeyHash = csl.PublicKey.from_hex(dRepKey).hash();
|
|
1006
|
+
const dRepId = csldRepIdKeyHash.to_bech32("drep");
|
|
1007
1007
|
return {
|
|
1008
1008
|
pubDRepKey: dRepKey,
|
|
1009
1009
|
dRepIDHash,
|
|
1010
1010
|
dRepIDBech32: dRepId
|
|
1011
|
-
// todo to check
|
|
1012
1011
|
};
|
|
1013
1012
|
} catch (e) {
|
|
1014
1013
|
console.error(e);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@meshsdk/wallet",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -34,10 +34,10 @@
|
|
|
34
34
|
"typescript": "^5.3.3"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@meshsdk/common": "
|
|
38
|
-
"@meshsdk/core-csl": "
|
|
39
|
-
"@meshsdk/core-cst": "
|
|
40
|
-
"@meshsdk/transaction": "
|
|
37
|
+
"@meshsdk/common": "1.7.1",
|
|
38
|
+
"@meshsdk/core-csl": "1.7.1",
|
|
39
|
+
"@meshsdk/core-cst": "1.7.1",
|
|
40
|
+
"@meshsdk/transaction": "1.7.1",
|
|
41
41
|
"@nufi/dapp-client-cardano": "^0.3.1",
|
|
42
42
|
"@nufi/dapp-client-core": "^0.3.1"
|
|
43
43
|
},
|