https://github.com/dozyio/js-libp2p-blind-rendezvous
Blind Rendezvous Points with JS libp2p
https://github.com/dozyio/js-libp2p-blind-rendezvous
dht libp2p rendezvous
Last synced: 21 days ago
JSON representation
Blind Rendezvous Points with JS libp2p
- Host: GitHub
- URL: https://github.com/dozyio/js-libp2p-blind-rendezvous
- Owner: dozyio
- Created: 2026-04-18T11:25:54.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2026-04-19T10:59:51.000Z (3 months ago)
- Last Synced: 2026-06-26T07:06:38.971Z (25 days ago)
- Topics: dht, libp2p, rendezvous
- Language: TypeScript
- Homepage:
- Size: 74.2 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# @dozyio/libp2p-blind-rendezvous
Epoch-based blind rendezvous for js-libp2p.
This package derives blinded rendezvous CIDs from:
- shared `secret`
- `namespace`
- epoch index
It then publishes provider records for active epochs via content routing.
## Install
```console
npm i @dozyio/libp2p-blind-rendezvous
```
## Usage
```ts
import { createLibp2p } from 'libp2p'
import { kadDHT } from '@libp2p/kad-dht'
import { blindRendezvous } from '@dozyio/libp2p-blind-rendezvous'
import type { BlindRendezvousPointInit } from '@dozyio/libp2p-blind-rendezvous'
async function loadPairedPointConfig (): Promise {
// Out of scope for this package (pairing/secret exchange)
return {
secret: crypto.getRandomValues(new Uint8Array(32)),
namespace: 'dozyio/prod/chat'
}
}
const pairedPoint = await loadPairedPointConfig()
const node = await createLibp2p({
services: {
dht: kadDHT(),
blindRendezvous: blindRendezvous({
addressChangeDebounceMs: 30 * 1000
})
}
})
await node.start()
await node.services.blindRendezvous.upsertPoint('paired-device', pairedPoint, {
publish: true
})
for await (const candidate of node.services.blindRendezvous.findPointProviders('paired-device')) {
console.log('found blind rendezvous candidate', candidate)
}
```
## Defaults
- `epochLengthMs`: `15m`
- `clockSkewMs`: `3m`
- `derivationDomain`: `libp2p-blind-rendezvous/v1`
- `publishIntervalMs`: equal to `epochLengthMs`
- `pollIntervalMs`: `30s`
- `publishJitterMs`: `30s..90s`
- `logPrefix`: `libp2p:blind-rendezvous`
- `startingEpochMs`: `0` (Unix epoch timestamp)
## Notes
- On start, the service publishes provider records for configured points.
- A single service instance can manage multiple rendezvous points via `upsertPoint/removePoint`.
- It republishes periodically and also debounced on `self:peer:update`.
- Use `startingEpochMs` when you want epochs anchored to pairing time (or another custom timestamp).
- Provider discovery results are only rendezvous candidates; authentication/authorization of discovered peers is required and intentionally out of scope for this package.