fix: hyperbee-chat runnable sample, hyperswarm doc table, ignore *-storage

- hyperbee-chat: repair Corestore/core init (was literal \n); use Hyperswarm update event
- hyperswarm.md: fix status() return column; clarify server emits connection/update events
- .gitignore: test-projects/**/*-storage/ for local corestore data

Made-with: Cursor
This commit is contained in:
Hermes Agent
2026-04-20 03:20:37 -04:00
parent 633f68bcac
commit e64a1c9383
3 changed files with 7 additions and 11 deletions
+2 -9
View File
@@ -14,14 +14,7 @@ console.log(`Mode: ${mode}, storage: ${storage}`)
async function main() {
const corestore = new Corestore(storage)
// Deterministic core key using seed-derived keypair (same public key every run)
const sodium = require('sodium-native')
const seed = crypto.createHash('sha256').update('test-bee').digest()
const publicKey = Buffer.alloc(32)
const secretKey = Buffer.alloc(64)
sodium.crypto_sign_seed_keypair(publicKey, secretKey, seed)
const keyPair = { publicKey, secretKey }
const core = corestore.get(publicKey, { keyPair })
const core = corestore.get('test-bee')
console.log('Core instance created')
await core.ready()
@@ -59,7 +52,7 @@ async function main() {
corestore.replicate(conn)
})
swarm.on('updated', () => {
swarm.on('update', () => {
console.log(`Swarm connections: ${swarm.connections.size}`)
})