common

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: May 28, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const RootNodeHash = "0x0000000000000000000000000000000000000000000000000000000000000000"

RootNodeHash is the 0x0 hash for the root node in the idregistry

Variables

This section is empty.

Functions

func ChildHash

func ChildHash(parentHex string, child string) string

ChildHash calculates the hash of a child node given a parent node

func Keccak256

func Keccak256(bytes []byte) string

func PathHash

func PathHash(path string) (string, error)

PathHash calculates the hash for a path in the registry

func PrintJSON

func PrintJSON(v interface{}) error

PrintJSON print a json object or an array

func PrintJSONObject

func PrintJSONObject(v interface{}) error

PrintJSONObject print a single json object

Types

type EthereumAddress

type EthereumAddress struct {
	// contains filtered or unexported fields
}

EthereumAddress implements the pflag Value interface for flags that require ethereum address

func (*EthereumAddress) Set

func (value *EthereumAddress) Set(address string) error

Set sets the value, returns an error if it is not a valid ethereum address

func (*EthereumAddress) String

func (value *EthereumAddress) String() string

func (*EthereumAddress) Type

func (value *EthereumAddress) Type() string

Type returns the type string for an ethereum address

Jump to

Keyboard shortcuts

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