
Product
Rust Support in Socket Is Now Generally Available
Socket’s Rust and Cargo support is now generally available, providing dependency analysis and supply chain visibility for Rust projects.
@hyperdivision/heimdall-pairing
Advanced tools
Pair a new user (initator) and an existing user (responder) in Heimdall
Pair a new user (initator) and an existing user (responder) in Heimdall
npm install @hyperdivision/heimdall-pairing
const { Initiator, Responder } = require('@hyperdivision/heimdall-pairing')
const i = new Initiator({
keypair,
profile
})
const r = new Responder({
propose (key, profile, profileSignature, done) {
// human validate the profile and propose it on the network
// then reply back with the server key
done(null, serverKey)
})
})
// share the discovery key
r.setDiscoveryKey(i.discoveryKey)
r.on('pin', function (pin) {
// communicate the security ping to i
i.setPin(pin)
})
i.on('server-key', function (serverKey) {
// and you are paired!
// once the network approves you the server will
// start replicating with you if you join the swarm using the above key
})
i.setProfile(profile)Set the profile asynchrously in case you cannot pass one in the constructor
i.on('connected')Emitted when it connects to the other peer before it is verified
i.on('verified')Emitted when the other peer is verified (the pin matched)
i.on('server-key', serverKey)Emitted when the pairing is done and the responder sends the server key
i.on('announcing')Emitted when the initiator starts announcing on the network
i.on('error', err)Emitted when there was an error in the pairing flow
i.discoveryKeyShare this discovery key with the responder (3 words)
i.setPin(pin)Call this when the responder communicates the pin to you
i.destroy(err)Call this to forcefully shutdown the pairing.
r.on('discovery-key', dk)Emitted when the discovery key is set on the responder.
r.on('peer', peer)Emitted when the responder founds a peer on the DHT that could be the initiator.
r.on('connecting', peer)Emitted when the responder tries to connect to peer.
r.on('connected')Emitted when the responder established connection with a potential initiator.
r.on('profile', key, profile, profileSignature)Emitted when a profile is received from the initiator.
r.on('error', error)Emitted when there was an error in the pairing flow.
r.on('server-key', serverKey)Emitted when the responder sends the server key.
r.destroy(err)Call this to forcefully shutdown the pairing.
bool = Responder.validateDiscoveryKey(dk)Static helper to check if a discovery consists of valid words.
MIT
FAQs
Pair a new user (initator) and an existing user (responder) in Heimdall
The npm package @hyperdivision/heimdall-pairing receives a total of 1 weekly downloads. As such, @hyperdivision/heimdall-pairing popularity was classified as not popular.
We found that @hyperdivision/heimdall-pairing demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket’s Rust and Cargo support is now generally available, providing dependency analysis and supply chain visibility for Rust projects.

Security News
Chrome 144 introduces the Temporal API, a modern approach to date and time handling designed to fix long-standing issues with JavaScript’s Date object.

Research
Five coordinated Chrome extensions enable session hijacking and block security controls across enterprise HR and ERP platforms.