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.
Files changed (2) hide show
  1. package/dist/config.js +8 -4
  2. 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
- const bunkerUri = process.env.BUNKER_URI ?? process.env.BUNKER_URI_FILE
40
- ? (process.env.BUNKER_URI_FILE ? readSecretFile(process.env.BUNKER_URI_FILE) : process.env.BUNKER_URI)
41
- : undefined;
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nostr-bray",
3
- "version": "1.16.0",
3
+ "version": "1.16.1",
4
4
  "description": "MCP server giving AI agents sovereign Nostr identities — key derivation, personas, attestations, duress detection, zaps",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",