41 lines
931 B
Markdown
41 lines
931 B
Markdown
# hyper-p2p-auction-gossip
|
|
|
|
Distributed auction room over Hyperswarm gossip: open auctions, place bids, close with winner.
|
|
|
|
**Category:** Applications (economy)
|
|
|
|
**Composes with:** `hyper-p2p-decentralized-oracle`, `hyper-p2p-credit-ledger`
|
|
|
|
**Protocol:** `auction-gossip/v1`
|
|
|
|
## When to use
|
|
|
|
P2P marketplaces that need bid visibility across peers on a shared topic.
|
|
|
|
## When not to use
|
|
|
|
Centralized auction houses or single-node simulations without `topic`.
|
|
|
|
## Quick start
|
|
|
|
```js
|
|
const { HyperP2PAuctionGossip } = require('hyper-p2p-auction-gossip')
|
|
const auction = new HyperP2PAuctionGossip({ topic: 'my-auction-topic' })
|
|
await auction.ready()
|
|
auction.openAuction('lot-1', { item: 'vintage-bike' })
|
|
auction.placeBid('lot-1', 42)
|
|
await auction.close()
|
|
```
|
|
|
|
## Docs
|
|
|
|
- [docs/api.md](docs/api.md)
|
|
- [docs/architecture.md](docs/architecture.md)
|
|
- [examples/basic.js](examples/basic.js)
|
|
|
|
## Test
|
|
|
|
```bash
|
|
npm install && npm test
|
|
```
|