@unicitylabs/sphere-sdk 0.17.4 → 0.17.5
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/connect/chunks/{chunk-VRXXF7LA.js → chunk-2YJZKHQ6.js} +2 -2
- package/dist/connect/chunks/{chunk-VRXXF7LA.js.map → chunk-2YJZKHQ6.js.map} +1 -1
- package/dist/connect/chunks/{chunk-H7FIXY5N.js → chunk-JJTCOUXJ.js} +2 -2
- package/dist/connect/chunks/{chunk-DYS3SSRZ.js → chunk-WTG2DWUQ.js} +2 -2
- package/dist/connect/index.cjs +1 -1
- package/dist/connect/index.cjs.map +1 -1
- package/dist/connect/index.js +3 -3
- package/dist/connect/internal/host.js +2 -2
- package/dist/impl/browser/connect/index.cjs +1 -1
- package/dist/impl/browser/connect/index.cjs.map +1 -1
- package/dist/impl/browser/connect/index.js +2 -2
- package/dist/impl/nodejs/index.cjs +3 -2
- package/dist/impl/nodejs/index.cjs.map +1 -1
- package/dist/impl/nodejs/index.js +3 -2
- package/dist/impl/nodejs/index.js.map +1 -1
- package/package.json +1 -1
- /package/dist/connect/chunks/{chunk-H7FIXY5N.js.map → chunk-JJTCOUXJ.js.map} +0 -0
- /package/dist/connect/chunks/{chunk-DYS3SSRZ.js.map → chunk-WTG2DWUQ.js.map} +0 -0
|
@@ -24566,11 +24566,11 @@ function decryptSimple(ciphertext, password) {
|
|
|
24566
24566
|
}
|
|
24567
24567
|
|
|
24568
24568
|
// impl/nodejs/storage/list-wallets.ts
|
|
24569
|
-
var WALLET_FILE = /\.(json|txt)
|
|
24569
|
+
var WALLET_FILE = /\.(json|txt)$/i;
|
|
24570
24570
|
var PLAINTEXT_KEY = /^[0-9a-f]{64}$/i;
|
|
24571
24571
|
var PASSPHRASE_CIPHERTEXT = /^U2FsdGVkX1[0-9A-Za-z+/=]+$/;
|
|
24572
24572
|
function readStoredSecret(filePath, content) {
|
|
24573
|
-
if (
|
|
24573
|
+
if (/\.txt$/i.test(filePath)) {
|
|
24574
24574
|
return validateMnemonic2(content) || PASSPHRASE_CIPHERTEXT.test(content) ? content : null;
|
|
24575
24575
|
}
|
|
24576
24576
|
let record;
|
|
@@ -24582,6 +24582,7 @@ function readStoredSecret(filePath, content) {
|
|
|
24582
24582
|
if (typeof record !== "object" || record === null) return null;
|
|
24583
24583
|
const fields = record;
|
|
24584
24584
|
if (fields.type === "sphere-wallet") return null;
|
|
24585
|
+
if ("masterPrivateKey" in fields || "descriptorPath" in fields || "encrypted" in fields) return null;
|
|
24585
24586
|
for (const key of [STORAGE_KEYS_GLOBAL.MNEMONIC, STORAGE_KEYS_GLOBAL.MASTER_KEY]) {
|
|
24586
24587
|
const value = fields[key];
|
|
24587
24588
|
if (typeof value === "string" && value !== "") return value;
|