@pokapali/node
v0.1.4
Published
Node.js relay and pinner for pokapali networks
Maintainers
Readme
@pokapali/node
npm install @pokapali/nodeNode.js server components for Pokapali: a generic relay
for GossipSub mesh connectivity, a zero-knowledge pinner
for snapshot ingestion and IPNS republishing, and an HTTP
server for health monitoring. Provides the pokapali CLI
for running relay + pinner nodes on a VPS.
Key Exports
startRelay(config)— starts a Helia node with libp2p, client-mode DHT, GossipSub, autoTLS, persistent key/datastore, andFsBlockstorefor persistent block storage. Broadcasts node capabilities onpokapali._node-caps._p2p._pubsubevery 30 secondscreatePinner(config)— subscribes to announce topics, fetches and validates snapshots, maintains a 24-hour history window, republishes IPNS records. State (knownNames,tips,nameToAppId) is persisted tostate.jsonwith dirty-flag debounced writesstartHttpServer(config)— HTTP server withGET /healthzandGET /statusendpointscreateRateLimiter(config)— per-IPNS-name rate limiting for pinner ingestioncreateHistoryTracker()— time-windowed snapshot history with pruning
CLI
npx pokapali \
--relay \
--pin my-app-id \
--port 3001 \
--storage-path /var/lib/pokapali