An Ara Network node that runs a rewardable decentralized content distribution node.
Important reminder: All Ara development is still in flux.
$ npm install --save ara-reward-dcdn
$ ard start -i <userDID>
$ ard download -d <contentDID> -i <userDID>
$ ard seed -d <contentDID> -i <userDID>
See CLI docs
See API docs
index.js
is an ANN-compliant interface and does not give direct access to the DCDN class. For access to the DCDN class, use require('ara-reward-dcdn/dcdn')
.
Example download:
const DCDN = require('ara-reward-dcdn/dcdn')
const dcdn = new DCDN({
password: 'password',
userId: '0a98c8305035dcbb1e8fa0826965200269e232e45ac572d26a45db9581986e67'
})
dcdn.join({
did: '1b23c8305035dcbb1e8fa0826965200269e232e45ac572d26a45db95819abcd1',
download: true,
upload: false,
metaOnly: false,
price: 1,
maxPeers: 10,
jobId: 'ac23c8305035dcbb1e8fa0826965200269e232e45ac572d26a45db95819aef24'
})
ara-runtime-configuration is a dependency of ara-network and will read from the nearest .ararc
. Install ara-runtime-configuration separately to specify default values not present in an .ararc
.
LGPL-3.0