nostr-bray 1.32.0 → 1.34.0
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/bunker-context.d.ts +9 -0
- package/dist/bunker-context.js +16 -1
- package/package.json +2 -2
package/dist/bunker-context.d.ts
CHANGED
|
@@ -45,6 +45,15 @@ export interface BunkerConfig {
|
|
|
45
45
|
}
|
|
46
46
|
/** Parse a bunker:// URI */
|
|
47
47
|
export declare function parseBunkerUri(uri: string): BunkerConfig;
|
|
48
|
+
/** Client name shown on remote-signer approval screens (e.g. Heartwood's OLED). */
|
|
49
|
+
export declare const CLIENT_NAME = "nostr-bray";
|
|
50
|
+
/**
|
|
51
|
+
* Params for the NIP-46 `connect` request:
|
|
52
|
+
* `[remote_pubkey, secret, permissions, metadata]`.
|
|
53
|
+
* The metadata name is self-asserted UX for signer approval screens —
|
|
54
|
+
* not authentication. The connect secret remains the security boundary.
|
|
55
|
+
*/
|
|
56
|
+
export declare function buildConnectParams(config: BunkerConfig): string[];
|
|
48
57
|
/**
|
|
49
58
|
* Resolve the client secret key for a given bunker.
|
|
50
59
|
*
|
package/dist/bunker-context.js
CHANGED
|
@@ -34,6 +34,17 @@ export function parseBunkerUri(uri) {
|
|
|
34
34
|
}
|
|
35
35
|
return { pubkey, relays, connectSecret };
|
|
36
36
|
}
|
|
37
|
+
/** Client name shown on remote-signer approval screens (e.g. Heartwood's OLED). */
|
|
38
|
+
export const CLIENT_NAME = 'nostr-bray';
|
|
39
|
+
/**
|
|
40
|
+
* Params for the NIP-46 `connect` request:
|
|
41
|
+
* `[remote_pubkey, secret, permissions, metadata]`.
|
|
42
|
+
* The metadata name is self-asserted UX for signer approval screens —
|
|
43
|
+
* not authentication. The connect secret remains the security boundary.
|
|
44
|
+
*/
|
|
45
|
+
export function buildConnectParams(config) {
|
|
46
|
+
return [config.pubkey, config.connectSecret ?? '', '', JSON.stringify({ name: CLIENT_NAME })];
|
|
47
|
+
}
|
|
37
48
|
const CLIENT_KEYS_FILE = 'client-keys.json';
|
|
38
49
|
/**
|
|
39
50
|
* Resolve the client secret key for a given bunker.
|
|
@@ -85,7 +96,11 @@ export class BunkerContext {
|
|
|
85
96
|
// Only the `connect` handshake is needed at startup. Ping is
|
|
86
97
|
// redundant (if connect succeeded the signer is alive), and
|
|
87
98
|
// getPublicKey is deferred to first access so startup stays fast.
|
|
88
|
-
|
|
99
|
+
// Sent via sendRequest (not signer.connect()) so params[3] can carry
|
|
100
|
+
// the client-name metadata that signer approval screens display.
|
|
101
|
+
// nostr-tools' connect() is literally sendRequest('connect', [pubkey,
|
|
102
|
+
// secret]) — semantics are otherwise identical.
|
|
103
|
+
await signer.sendRequest('connect', buildConnectParams(config));
|
|
89
104
|
const ctx = new BunkerContext(signer, pool, clientSk);
|
|
90
105
|
// Do NOT use config.pubkey here — that is the bunker's transport
|
|
91
106
|
// key from the URI, not the signing identity. The actual identity
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nostr-bray",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.34.0",
|
|
4
4
|
"mcpName": "dev.forgesworn/bray",
|
|
5
5
|
"description": "Trust-aware Nostr for AI and humans. Three dimensions of trust -- verification, proximity, and access -- woven into every interaction.",
|
|
6
6
|
"type": "module",
|
|
@@ -156,7 +156,7 @@
|
|
|
156
156
|
"dominion-protocol": "^1.0.0",
|
|
157
157
|
"nostr-attestations": "^2.5.4",
|
|
158
158
|
"nostr-tools": "^2.23.3",
|
|
159
|
-
"nostr-veil": "^0.
|
|
159
|
+
"nostr-veil": "^0.30.0",
|
|
160
160
|
"nsec-tree": "^1.4.2",
|
|
161
161
|
"signet-protocol": "^1.1.0",
|
|
162
162
|
"socks-proxy-agent": "^10.0.0",
|