Files
modules/applications-economy/hyper-p2p-credit-ledger
Raven ScottandCursor c3b112f435 Expand pear-platform, observability, messaging, and network module APIs
Add batch parse, registry, log filtering, stream helpers, routing utilities, handshake management, and related clear/list/count methods across shorter modules.

Co-authored-by: Cursor <[email protected]>
2026-05-21 03:12:42 -04:00
..
2026-05-20 22:56:32 -04:00
2026-05-21 00:07:44 -04:00
2026-05-20 21:57:50 -04:00
2026-05-20 21:57:50 -04:00
2026-05-20 23:36:32 -04:00

hyper-p2p-credit-ledger

Gossip-synchronized credit accounts: open, credit, debit, transfer, and balance queries on a shared Hyperswarm topic.

Category: Applications (economy)

Composes with: hyper-p2p-auction-gossip, hyper-p2p-marketplace-listing

Protocol: credit-ledger/v1

When to use

Soft-currency or reputation balances that should converge across peers without a central server.

When not to use

Strong consistency, double-spend safety, or audit-grade accounting (add consensus or signed operation logs).

Quick start

const { HyperP2PCreditLedger } = require('hyper-p2p-credit-ledger')
const ledger = new HyperP2PCreditLedger({ topic: 'credits-demo' })
await ledger.ready()
ledger.openAccount('alice', 100)
ledger.transfer('alice', 'bob', 25)
console.log(ledger.balance('bob')) // 25
await ledger.close()

Docs

Test

npm install && npm test