Manage many renter nodes with the same identity with remote control capabilities! Complete documentation can be found here.
Prerequisites
Installation
Command Line Interface
npm install -g storj-complex
Programmatic
npm install storj-complex --save
Usage
Command Line Interface
storj-complex -c <path/to/config.json>
Programmatic
Set up a renter service and landlord to control it.
var complex = ;var landlord = complex;var renter = complex; // Landlords boss around renters...// Rather they control all renters connected to the same RabbitMQlandlordstart { // Landlord is connected and service listening for RPC commands}; // Renters do what landlords tell them...// Rather they listen for tasks and coordinate to appease their mastersrenterstart { // Renter is connected to the storj network and listening for work}; // Landlords and Renters are ReadableStreams// The pump out newline-terminated JSON strings for logging informationlandlord;renter;
Create a client to issue RPC commands to the landlord:
var complex = ;var client = complex;var contract = /* contract data */ ; // The client mimics storj-lib's RenterInterfaceclient;
Generating an HD Key
Here are the detailed steps for creating an HD key for configuration:
// require necessary libs, get entropy, and create a keyconst HDKey = ;const seed = ;const hdkey = HDKey; // to keep for other future usesconsole; // deriving the key for complex use (detailed in sip32)const complexKey = hdkey; // this will output expected private key used in configsconsole; // for this config value in complexlet options = {};optionsnetworkPrivateExtendedKey = complexKeyprivateExtendedKey; // this is the key used in contracts and contactsconsole;
The above has been simplified into a utility, and can be used via:
const randomBytes = ;const createComplexKeyFromSeed = utils;const complexKey = ;
For more details see SIP32:
License
Storj Complex - Manage many renter nodes with remote control capabilities Copyright (C) 2016 Storj Labs, Inc
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/.