read-fact

command
v0.0.0-...-f1d979d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 28, 2018 License: GPL-3.0 Imports: 21 Imported by: 0

README

read-fact

Utility tool to read facts from passport.

Usage

Usage of ./read-fact:

  -backendurl string
    	backend URL (simulated backend used if empty)
  -factprovideraddr value
    	Ethereum address of fact provider
  -fkey string
    	the key of the fact (max. 32 bytes)
  -ftype string
    	the data type of fact (txdata, string, bytes, address, uint, int, bool, ipfs)
  -ipfsurl string
    	IPFS node address (default "https://ipfs.infura.io:5001")
  -out string
    	save retrieved data to the specified file
  -passportaddr value
    	Ethereum address of passport contract
  -verbosity int
    	log verbosity (0-9) (default 2)
  -vmodule string
    	log verbosity pattern

Examples

  • Retrieve the value of type txdata stored under the key some_key in simulated backend and write it to the file /dev/stdout (outputs to the screen):

    ./read-fact -out /dev/stdout \
      -fkey some_key \
      -ftype txdata
    
  • Retrieve the value of type txdata stored under the key monetha.jpg by the fact provider 0x5b2ae3b3a801469886bb8f5349fc3744caa6348d from passport 0x9CfabB3172DFd5ED740c3b8A327BF573226c5064 in Ropsten block-chain and write it to the file ./fact_image.jpg:

    ./read-fact -out ./fact_image.jpg \
      -passportaddr 0x9CfabB3172DFd5ED740c3b8A327BF573226c5064 \
      -factprovideraddr 0x5b2ae3b3a801469886bb8f5349fc3744caa6348d \
      -fkey monetha.jpg \
      -ftype txdata \
      -backendurl https://ropsten.infura.io
    
  • Retrieve the value of type ipfs stored under the key Monetha_WP.pdf by the fact provider 0x5b2ae3b3a801469886bb8f5349fc3744caa6348d from passport 0x9CfabB3172DFd5ED740c3b8A327BF573226c5064 in Ropsten block-chain and write it to the file ./Monetha_WP.pdf:

    ./read-fact -out ./Monetha_WP.pdf \
      -passportaddr 0x9CfabB3172DFd5ED740c3b8A327BF573226c5064 \
      -factprovideraddr 0x5b2ae3b3a801469886bb8f5349fc3744caa6348d \
      -fkey Monetha_WP.pdf \
      -ftype ipfs \
      -backendurl https://ropsten.infura.io
    

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL