@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
|
@@ -24524,11 +24524,11 @@ function decryptSimple(ciphertext, password) {
|
|
|
24524
24524
|
}
|
|
24525
24525
|
|
|
24526
24526
|
// impl/nodejs/storage/list-wallets.ts
|
|
24527
|
-
var WALLET_FILE = /\.(json|txt)
|
|
24527
|
+
var WALLET_FILE = /\.(json|txt)$/i;
|
|
24528
24528
|
var PLAINTEXT_KEY = /^[0-9a-f]{64}$/i;
|
|
24529
24529
|
var PASSPHRASE_CIPHERTEXT = /^U2FsdGVkX1[0-9A-Za-z+/=]+$/;
|
|
24530
24530
|
function readStoredSecret(filePath, content) {
|
|
24531
|
-
if (
|
|
24531
|
+
if (/\.txt$/i.test(filePath)) {
|
|
24532
24532
|
return validateMnemonic2(content) || PASSPHRASE_CIPHERTEXT.test(content) ? content : null;
|
|
24533
24533
|
}
|
|
24534
24534
|
let record;
|
|
@@ -24540,6 +24540,7 @@ function readStoredSecret(filePath, content) {
|
|
|
24540
24540
|
if (typeof record !== "object" || record === null) return null;
|
|
24541
24541
|
const fields = record;
|
|
24542
24542
|
if (fields.type === "sphere-wallet") return null;
|
|
24543
|
+
if ("masterPrivateKey" in fields || "descriptorPath" in fields || "encrypted" in fields) return null;
|
|
24543
24544
|
for (const key of [STORAGE_KEYS_GLOBAL.MNEMONIC, STORAGE_KEYS_GLOBAL.MASTER_KEY]) {
|
|
24544
24545
|
const value = fields[key];
|
|
24545
24546
|
if (typeof value === "string" && value !== "") return value;
|