holepunchto / hyperdht

The DHT powering Hyperswarm
https://docs.holepunch.to
MIT License
323 stars 46 forks source link

Add `sign` option to APIs that require signing #67

Closed kasperisager closed 2 years ago

kasperisager commented 2 years ago

This pull request introduces a new sign option to APIs that require signing, such as node.announce() and node.mutablePut(). If given, this property is expected to be an optionally async function that signs the given buffer.

It still lacks tests and docs as I wanted to get some input on the API first.

kasperisager commented 2 years ago

Closing in favour of #68.