@relay-federation/bridge 0.3.4 → 0.3.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/cli.js CHANGED
@@ -428,7 +428,7 @@ async function cmdStart () {
428
428
  console.log(` Registry: ${registeredPubkeys.size} trusted pubkeys (self + seeds)`)
429
429
 
430
430
  // ── 4b. Beacon address watcher — detect on-chain registrations ──
431
- const { extractOpReturnData, decodePayload, PROTOCOL_PREFIX } = await import('../registry/lib/cbor.js')
431
+ const { extractOpReturnData, decodePayload, PROTOCOL_PREFIX } = await import('@relay-federation/registry/lib/cbor.js')
432
432
  const { Transaction: BsvTx } = await import('@bsv/sdk')
433
433
 
434
434
  // Registry bootstrapped via discoverNewPeers() after server start (no WoC dependency)
@@ -723,9 +723,9 @@ async function cmdStart () {
723
723
  // Fallback: scan chain for peers (legacy mode)
724
724
  console.log('No seed peers configured. Scanning chain for peers...')
725
725
  try {
726
- const { scanRegistry } = await import('../registry/lib/scanner.js')
727
- const { buildPeerList, excludeSelf } = await import('../registry/lib/discovery.js')
728
- const { savePeerCache, loadPeerCache } = await import('../registry/lib/peer-cache.js')
726
+ const { scanRegistry } = await import('@relay-federation/registry/lib/scanner.js')
727
+ const { buildPeerList, excludeSelf } = await import('@relay-federation/registry/lib/discovery.js')
728
+ const { savePeerCache, loadPeerCache } = await import('@relay-federation/registry/lib/peer-cache.js')
729
729
 
730
730
  const cachePath = join(dir, 'cache', 'peers.json')
731
731
  let peers = await loadPeerCache(cachePath)
@@ -158,7 +158,7 @@ export class PeerManager extends EventEmitter {
158
158
  // If cryptographic handshake is available, use it
159
159
  if (opts.handshake && msg.nonce && Array.isArray(msg.versions)) {
160
160
  const isSeed = opts.seedEndpoints && opts.seedEndpoints.has(msg.endpoint)
161
- const result = opts.handshake.handleHello(msg, null) // cryptographic handshake is the security layer — no whitelist gate
161
+ const result = opts.handshake.handleHello(msg, isSeed ? null : opts.registeredPubkeys)
162
162
  if (result.error) {
163
163
  ws.send(JSON.stringify({ type: 'error', error: result.error }))
164
164
  ws.close()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@relay-federation/bridge",
3
- "version": "0.3.4",
3
+ "version": "0.3.5",
4
4
  "description": "Bridge server — WebSocket peering, header sync, tx relay, CLI",
5
5
  "type": "module",
6
6
  "bin": {