node package manager
Easy sharing. Manage teams and permissions with one click. Create a free org »

storj-telemetry-reporter

Telemetry Reporter

Build Status License

Handles reporting anonymous usage statistics from a farmer identity on the Storj network.

Usage

npm install storj-telemetry-reporter
const {KeyPair} = require('storj');
const TelemetryReporter = require('storj-telemetry-reporter');
const keypair = new KeyPair();
const reporter = new TelemetryReporter('https://status.storj.io', keypair);
 
let report = {
  storageAllocated: 21474836480,
  storageUsed: 5368709120,
  contactNodeId: keypair.getNodeID(),
  paymentAddress: '1BjHLq2rWNoDne6jHZ3FHavUNK2UvRmjYZ'
};
 
reporter.send(report, (err, result) => {
  if (err) {
    return console.error(err.message);
  }
 
  console.info('telemetry report sent and accepted');
});