nostr-bray 1.16.0 → 1.16.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/config.js +8 -4
- package/package.json +1 -1
package/dist/config.js
CHANGED
|
@@ -36,9 +36,13 @@ export function loadConfig() {
|
|
|
36
36
|
const keyFilePath = process.env.NOSTR_SECRET_KEY_FILE;
|
|
37
37
|
const keyEnvVar = process.env.NOSTR_SECRET_KEY;
|
|
38
38
|
let secretKey;
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
let bunkerUri;
|
|
40
|
+
if (process.env.BUNKER_URI_FILE) {
|
|
41
|
+
bunkerUri = readSecretFile(process.env.BUNKER_URI_FILE);
|
|
42
|
+
}
|
|
43
|
+
else if (process.env.BUNKER_URI) {
|
|
44
|
+
bunkerUri = process.env.BUNKER_URI;
|
|
45
|
+
}
|
|
42
46
|
if (keyFilePath) {
|
|
43
47
|
secretKey = readSecretFile(keyFilePath);
|
|
44
48
|
}
|
|
@@ -52,7 +56,7 @@ export function loadConfig() {
|
|
|
52
56
|
else {
|
|
53
57
|
throw new Error('No secret key provided: set NOSTR_SECRET_KEY, NOSTR_SECRET_KEY_FILE, or BUNKER_URI');
|
|
54
58
|
}
|
|
55
|
-
const secretFormat = detectKeyFormat(secretKey);
|
|
59
|
+
const secretFormat = secretKey ? detectKeyFormat(secretKey) : 'nsec';
|
|
56
60
|
// --- NWC URI ---
|
|
57
61
|
const nwcFilePath = process.env.NWC_URI_FILE;
|
|
58
62
|
let nwcUri;
|
package/package.json
CHANGED