No general purpose... Just for learning and have fun... !
# Clone and cd to the repo
git clone https://github.com/guillaumecz/dpki-Ethereum.git
cd dpki-Ethereum
# Install npm dependencies
npm install -g truffle
npm install
# Start a daemon (ipfs & ganache)
npm run daemons
# Migrate contracts to network
truffle migrate
./cli/dpki -h
--> Get help
./cli/dpki ipfs-save <filePath>
: Add a specified file to the ipfs network, returns the newly created ipfs-address./cli/dpki ipfs-cat <ipfs-addr>
: Get the value of file stored at on IPFS
./cli/dpki new <name> <ipfsId>
: Save into Ethereum the association between the given<name>
and<fileOrIpfsId>
. Has an option (-f) to specify if it has to store a file into IPFS before interacting with Ethereum../cli/dpki new -f <name> <filePath>
: Save into Ethereum the association between the given<name>
and<fileOrIpfsId>
. Has an option (-f) to specify if it has to store a file into IPFS before interacting with Ethereum. -./cli/dpki key <name>
: Get the IPFS address of the public key file of the user<name
.
./cli/dpki trust-him <name>
: Trust the user
npm run test
: nodeJs testsnpm run all-tests
: nodeJs and Solidity tests