kad-contentdeprecated

content addressable storage plugin for kad

Usage no npm install needed!

<script type="module">
  import kadContent from 'https://cdn.skypack.dev/kad-content';
</script>

README

Kad Content

Build Status Coverage Status NPM

Content addressable storage plugin for Kad.

Install

npm install kad-content --save

Usage

Set the text encoding for values and a hash function for deriving a key to enforce for items stored in the DHT.

const crypto = require('crypto');
const kad = require('kad');
const cas = require('kad-content');
const node = kad(options);

node.plugin(cas({ keyAlgorithm: 'rmd160', valueEncoding: 'base64' }));
node.listen(8080);

License

Kad Content - Content addressable storage plugin for Kad
Copyright (C) 2017 Gordon Hall

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program. If not, see http://www.gnu.org/licenses/.