项目作者: GuillaumeCz

项目描述 :
Simple Distributed Public Key Infrastructure built with Ethereum and IPFS
高级语言: JavaScript
项目地址: git://github.com/GuillaumeCz/dpki-Ethereum.git
创建时间: 2018-07-21T13:02:42Z
项目社区:https://github.com/GuillaumeCz/dpki-Ethereum

开源协议:

下载


A Distributed Public key Infrastructure…

… with Ethereum and IPFS

No general purpose…
Just for learning and have fun… !
alt text

How to ?

Setup

  1. # Clone and cd to the repo
  2. git clone https://github.com/guillaumecz/dpki-Ethereum.git
  3. cd dpki-Ethereum
  4. # Install npm dependencies
  5. npm install -g truffle
  6. npm install
  7. # Start a daemon (ipfs & ganache)
  8. npm run daemons
  9. # Migrate contracts to network
  10. truffle migrate

Use

./cli/dpki -h —> Get help

There are two types of actions :

IPFS
  • ./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
    Ethereum
  • ./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.
Trust system (on dev)
  • ./cli/dpki trust-him <name>: Trust the user

Tests

  • npm run test: nodeJs tests
  • npm run all-tests: nodeJs and Solidity tests

site