common

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2020 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	QuotaCoinName = "quota"
	TokenDec      = 1000000000000000000
)
View Source
const (
	FlagConfig  = "config"
	FlagCLIHome = "cli-home"

	FlagStartMonitor = "startMonitor"

	FlagEthGateway         = "eth.gateway"
	FlagEthCelrAddress     = "eth.contracts.celrAddress"
	FlagEthDPoSAddress     = "eth.contracts.dposAddress"
	FlagEthSGNAddress      = "eth.contracts.sgnAddress"
	FlagEthLedgerAddress   = "eth.contracts.ledgerAddress"
	FlagEthKeystore        = "eth.keystore"
	FlagEthPassphrase      = "eth.passphrase"
	FlagEthPollInterval    = "eth.pollInterval"
	FlagEthBlockDelay      = "eth.blockDelay"
	FlagEthChainID         = "eth.chainID"
	FlagEthCheckInterval   = "eth.checkInterval"
	FlagEthMinGasPriceGwei = "eth.minGasPriceGwei"
	FlagEthAddGasPriceGwei = "eth.addGasPriceGwei"

	FlagSgnOperator       = "sgn.operator"
	FlagSgnTransactors    = "sgn.transactors"
	FlagSgnPassphrase     = "sgn.passphrase"
	FlagSgnPubKey         = "sgn.pubkey"
	FlagSgnChainID        = "sgn.chainID"
	FlagSgnNodeURI        = "sgn.nodeURI"
	FlagSgnBaseGasPrice   = "sgn.baseGasPrice"
	FlagSgnTimeoutCommit  = "sgn.timeoutCommit"
	FlagSgnKeyringBackend = "sgn.keyringBackend"
	FlagSgnExecuteSlash   = "sgn.executeSlash"

	FlagLogLevel = "log.level"
	FlagLogColor = "log.color"
)

Variables

View Source
var (
	ErrRecordNotFound = errors.New("record not found")
)

err constants for various errors

Functions

func NewCommission added in v0.2.0

func NewCommission(ethClient *mainchain.EthClient, commissionRate *big.Int) (staking.Commission, error)

func RobustQuery added in v0.2.0

func RobustQuery(cliCtx context.CLIContext, route string) ([]byte, error)

func RobustQueryWithData added in v0.2.0

func RobustQueryWithData(cliCtx context.CLIContext, route string, data []byte) ([]byte, error)

func UnmarshalSignedSimplexStateBytes added in v0.2.0

func UnmarshalSignedSimplexStateBytes(input []byte) (*chain.SignedSimplexState, *entity.SimplexPaymentChannel, error)

Types

type ParamChange added in v0.2.0

type ParamChange struct {
	Record   sdk.Int `json:"record"`
	NewValue sdk.Int `json:"newValue"`
}

func NewParamChange added in v0.2.0

func NewParamChange(record, newValue sdk.Int) ParamChange

func (ParamChange) String added in v0.2.0

func (p ParamChange) String() string

implement fmt.Stringer

type Sig

type Sig struct {
	Signer string `json:"signer"`
	Sig    []byte `json:"sig"`
}

func AddSig

func AddSig(sigs []Sig, msg []byte, sig []byte, expectedSigner string) ([]Sig, error)

func NewSig

func NewSig(signer string, sig []byte) Sig

func (Sig) String

func (r Sig) String() string

implement fmt.Stringer

Jump to

Keyboard shortcuts

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