hipr v0.6.1
hipr
A recursive resolver with middleware. Made for HIP-5 protocols.
CLI Usage
First install the hipr CLI
npm i -g hiprThen to install middleware, like hipr-hyperzone and hipr-ipfs, run
hipr install hipr-hyperzone hipr-ipfsThen boot up a server running the middleware with
hipr hipr-hyperzone:hipr-ipfsBy default, hipr will create a server that listens on port 53 and expects Bob wallet to be running a root server on port 9891, but you can override these defaults. For example, if you are running hsd or hnsd, you can use the authoritative server running (by default) on port 5349
hipr hipr-ipfs:hipr-hyperzone :5333 :5349and listen on 127.0.0.1:5333.
Middleware should be :-separated as the first argument. Note that order may matter. In the above example, ipfs zone files will take priority over hyperzones.
Middleware
- _hyperzone for resolving records from Hyperzones
- _ipfs for resolving zone files from IPFS
- _aliasing for trustless SLDs on Handshake
- _eth for resolving from Ethereum via ENS (like
.badassdomains)
API
const { RecursiveServer } = require('hipr')
const server = new RecursiveServer(options)
server.use(':data._:protocol.', async ({ data, protocol }, name, type) => {
const zone = await fetchZone(protocol, data)
return zone.resolve(name, type)
})
server.bind(53)4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago