Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( UnitETH = "ETH" UnitWEI = "WEI" // UnitList is array for Unit string // UnitList = []string{"Wei", "Ada", "Babbage", "Shannon", "Szabo", "Finney", "Ether", "Einstein", "Douglas", "Gwei"} UnitList []string // UnitString is for Unit string // UnitString = "Available unit: Wei, Ada, Babbage, Shannon, Szabo, Finney, Ether, Einstein, Douglas, Gwei" UnitString string )
View Source
var DefaultChainID = big.NewInt(1007)
DefaultChainID default chain ID
View Source
var IsDecimalString = regexp.MustCompile(`^[1-9]\d*$|^0$|^0\.\d*$|^[1-9](\d)*\.(\d)*$`).MatchString
Functions ¶
func InitUnit ¶
func InitUnit(bc BlockChain)
Types ¶
type BlockChain ¶
type BlockChain int
const ( UnknownChain BlockChain = iota NewChain Ethereum )
func (BlockChain) Init ¶
func (bc BlockChain) Init()
func (BlockChain) String ¶
func (bc BlockChain) String() string
type CLI ¶
type CLI struct { Name string // contains filtered or unexported fields }
CLI represents a command-line interface. This class is not threadsafe.
func (*CLI) Embeddable ¶
Embeddable returns a CLI that you can embed into your own Go programs. This is not thread-safe.
func (*CLI) TestCommand ¶
TestCommand test command
type Transaction ¶
type Transaction struct { From common.Address `json:"from"` To common.Address `json:"to"` Value *big.Int `json:"value"` Unit string `json:"unit"` Data []byte `json:"data"` Nonce uint64 `json:"nonce"` GasPrice *big.Int `json:"gasPrice"` GasLimit uint64 `json:"gas"` NetworkID *big.Int `json:"networkID"` Password string `json:"password,omitempty"` }
Transaction for send Transaction
func (Transaction) MarshalJSON ¶
func (t Transaction) MarshalJSON() ([]byte, error)
func (*Transaction) UnmarshalJSON ¶
func (t *Transaction) UnmarshalJSON(input []byte) error
type TxData ¶
type TxData struct { From common.Address `json:"from"` To *common.Address `json:"to"` Value string `json:"value"` Data string `json:"data"` Nonce uint64 `json:"nonce" gencodec:"required"` Price *big.Int `json:"gasPrice" gencodec:"required"` GasLimit uint64 `json:"gas" gencodec:"required"` // Signature values V string `json:"v" gencodec:"required"` R string `json:"r" gencodec:"required"` S string `json:"s" gencodec:"required"` // This is only used when marshaling to JSON. Hash common.Hash `json:"hash" rlp:"-"` ChainID *big.Int `json:"chainID"` Raw string `json:"raw" rlp:"-"` UnsignedRawTx string `json:"UnsignedRawTx" rlp:"-"` UnsignedRawTxHash string `json:"UnsignedRawTxHash" rlp:"-"` PublicKey string `json:"PublicKey" rlp:"-"` }
Click to show internal directories.
Click to hide internal directories.