commands

package
v0.6.5 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2019 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrDataFileExists returned when data file already exists
	ErrDataFileExists = errors.New("private data file already exists")
)
View Source
var (
	// ErrExchangeKeyFileExists error returned when exchange key file is already exists (to not overwrite it)
	ErrExchangeKeyFileExists = errors.New("exchange key file already exists")
)

Functions

This section is empty.

Types

type AcceptCommand

type AcceptCommand struct {
	cmdutils.QuorumPrivateTxIOCommand
	PassportAddress  flag.EthereumAddress         `long:"passportaddr" required:"true" description:"Ethereum address of passport contract"`
	ExchangeIndex    flag.ExchangeIndex           `long:"exchidx"      required:"true" description:"private data exchange index"`
	PassportOwnerKey flag.ECDSAPrivateKeyFromFile `long:"ownerkey"     required:"true" description:"passport owner private key filename"`
	BackendURL       string                       `long:"backendurl"   required:"true" description:"Ethereum backend URL"`
	IPFSURL          string                       `long:"ipfsurl"                      description:"IPFS node URL" default:"https://ipfs.infura.io:5001"`
	Verbosity        int                          `long:"verbosity"                    description:"log verbosity (0-9)" default:"2"`
	VModule          string                       `long:"vmodule"                      description:"log verbosity pattern"`
}

AcceptCommand handles accept command

func (*AcceptCommand) Execute

func (c *AcceptCommand) Execute(args []string) error

Execute implements flags.Commander interface

type DisputeCommand

type DisputeCommand struct {
	cmdutils.QuorumPrivateTxIOCommand
	PassportAddress  flag.EthereumAddress         `long:"passportaddr" required:"true" description:"Ethereum address of passport contract"`
	ExchangeIndex    flag.ExchangeIndex           `long:"exchidx"      required:"true" description:"private data exchange index"`
	ExchangeKey      flag.ExchangeKeyFromFile     `long:"exchangekey"  required:"true" description:"exchange key filename"`
	DataRequesterKey flag.ECDSAPrivateKeyFromFile `long:"requesterkey" required:"true" description:"data requester private key filename"`
	BackendURL       string                       `long:"backendurl"   required:"true" description:"Ethereum backend URL"`
	Verbosity        int                          `long:"verbosity"                    description:"log verbosity (0-9)" default:"2"`
	VModule          string                       `long:"vmodule"                      description:"log verbosity pattern"`
}

DisputeCommand handles dispute command

func (*DisputeCommand) Execute

func (c *DisputeCommand) Execute(args []string) error

Execute implements flags.Commander interface

type ExchangeCommand

type ExchangeCommand struct {
	Version func()         `short:"v" long:"version" description:"Print the version of tool and exit"`
	Propose ProposeCommand `command:"propose"        description:"Propose private data exchange"`
	Status  StatusCommand  `command:"status"         description:"Get the status of private data exchange"`
	Accept  AcceptCommand  `command:"accept"         description:"Accept private data exchange"`
	Finish  FinishCommand  `command:"finish"         description:"Finish private data exchange"`
	Timeout TimeoutCommand `command:"timeout"        description:"Close private data exchange after proposal timeout"`
	Dispute DisputeCommand `command:"dispute"        description:"Open private data exchange dispute"`
	Read    ReadCommand    `command:"read"           description:"Reads private data after private data exchange accepted"`
}

ExchangeCommand is a root command used to parse command line arguments

var Exchange ExchangeCommand

Exchange is a prepared command to be used in command line arguments parsing

type FinishCommand

type FinishCommand struct {
	cmdutils.QuorumPrivateTxIOCommand
	PassportAddress flag.EthereumAddress         `long:"passportaddr" required:"true" description:"Ethereum address of passport contract"`
	ExchangeIndex   flag.ExchangeIndex           `long:"exchidx"      required:"true" description:"private data exchange index"`
	EthereumKey     flag.ECDSAPrivateKeyFromFile `long:"requesterkey" required:"true" description:"data requester (or passport owner, when expired) private key filename"`
	BackendURL      string                       `long:"backendurl"   required:"true" description:"Ethereum backend URL"`
	Verbosity       int                          `long:"verbosity"                    description:"log verbosity (0-9)" default:"2"`
	VModule         string                       `long:"vmodule"                      description:"log verbosity pattern"`
}

FinishCommand handles finish command

func (*FinishCommand) Execute

func (c *FinishCommand) Execute(args []string) error

Execute implements flags.Commander interface

type ProposeCommand

type ProposeCommand struct {
	cmdutils.QuorumPrivateTxIOCommand
	PassportAddress  flag.EthereumAddress         `long:"passportaddr"     required:"true" description:"Ethereum address of passport contract"`
	FactProvider     flag.EthereumAddress         `long:"factprovideraddr" required:"true" description:"Ethereum address of fact provider"`
	FactKey          flag.FactKey                 `long:"fkey"             required:"true" description:"the key of the fact (max. 32 bytes)"`
	DataRequesterKey flag.ECDSAPrivateKeyFromFile `long:"requesterkey"     required:"true" description:"data requester private key filename"`
	StakedValue      flag.EthereumWei             `long:"stake"            required:"true" description:"amount of ethers to stake (in wei)"`
	ExchangeKeyFile  string                       `long:"exchangekey"      required:"true" description:"file name where to save the exchange key (output)"`
	BackendURL       string                       `long:"backendurl"       required:"true" description:"Ethereum backend URL"`
	Verbosity        int                          `long:"verbosity"                        description:"log verbosity (0-9)" default:"2"`
	VModule          string                       `long:"vmodule"                          description:"log verbosity pattern"`
}

ProposeCommand handles propose command

func (*ProposeCommand) Execute

func (c *ProposeCommand) Execute(args []string) error

Execute implements flags.Commander interface

type ReadCommand

type ReadCommand struct {
	PassportAddress flag.EthereumAddress     `long:"passportaddr" required:"true" description:"Ethereum address of passport contract"`
	ExchangeIndex   flag.ExchangeIndex       `long:"exchidx"      required:"true" description:"private data exchange index"`
	ExchangeKey     flag.ExchangeKeyFromFile `long:"exchangekey"  required:"true" description:"exchange key filename"`
	DataFile        string                   `long:"datafile"     required:"true" description:"file name where to save the private data (output)"`
	BackendURL      string                   `long:"backendurl"   required:"true" description:"Ethereum backend URL"`
	IPFSURL         string                   `long:"ipfsurl"                      description:"IPFS node URL" default:"https://ipfs.infura.io:5001"`
	Verbosity       int                      `long:"verbosity"                    description:"log verbosity (0-9)" default:"2"`
	VModule         string                   `long:"vmodule"                      description:"log verbosity pattern"`
}

ReadCommand handles `read` command

func (*ReadCommand) Execute

func (c *ReadCommand) Execute(args []string) error

Execute implements flags.Commander interface

type StatusCommand

type StatusCommand struct {
	PassportAddress flag.EthereumAddress `long:"passportaddr" required:"true" description:"Ethereum address of passport contract"`
	ExchangeIndex   flag.ExchangeIndex   `long:"exchidx"      required:"true" description:"private data exchange index"`
	BackendURL      string               `long:"backendurl"   required:"true" description:"Ethereum backend URL"`
	Verbosity       int                  `long:"verbosity"                    description:"log verbosity (0-9)" default:"2"`
	VModule         string               `long:"vmodule"                      description:"log verbosity pattern"`
}

StatusCommand handles status command

func (*StatusCommand) Execute

func (c *StatusCommand) Execute(args []string) error

Execute implements flags.Commander interface

type TimeoutCommand

type TimeoutCommand struct {
	cmdutils.QuorumPrivateTxIOCommand
	PassportAddress  flag.EthereumAddress         `long:"passportaddr" required:"true" description:"Ethereum address of passport contract"`
	ExchangeIndex    flag.ExchangeIndex           `long:"exchidx"      required:"true" description:"private data exchange index"`
	DataRequesterKey flag.ECDSAPrivateKeyFromFile `long:"requesterkey" required:"true" description:"data requester private key filename"`
	BackendURL       string                       `long:"backendurl"   required:"true" description:"Ethereum backend URL"`
	Verbosity        int                          `long:"verbosity"                    description:"log verbosity (0-9)" default:"2"`
	VModule          string                       `long:"vmodule"                      description:"log verbosity pattern"`
}

TimeoutCommand handles timeout command

func (*TimeoutCommand) Execute

func (c *TimeoutCommand) Execute(args []string) error

Execute implements flags.Commander interface

Jump to

Keyboard shortcuts

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