Documentation ¶
Index ¶
- func CallContract(client *rpc.Client, contractID, payLoad string, height int64) (map[string]interface{}, error)
- func GenerateKey(shard uint) (*common.Address, *ecdsa.PrivateKey, error)
- func GenerateSubTx(from *ecdsa.PrivateKey, to common.Address, amount *big.Int, price *big.Int, ...) (*types.Transaction, error)
- func GenerateTx(from *ecdsa.PrivateKey, to common.Address, amount *big.Int, price *big.Int, ...) (*types.Transaction, error)
- func GetAccountNonce(client *rpc.Client, account common.Address, hexHash string, height int64) (uint64, error)
- func GetAccountTxCount(client *rpc.Client, account common.Address, hexHash string, height int64) (uint64, error)
- func GetGenerateKeyPairCmd(name string) (cmds *cobra.Command)
- func GetInfo(client *rpc.Client) (api.GetMinerInfo, error)
- func GetNetworkID(client *rpc.Client) (string, error)
- func GetTransactionByHash(client *rpc.Client, hash string) (map[string]interface{}, error)
- func Height(client *rpc.Client) (int64, error)
- func SendTx(client *rpc.Client, tx *types.Transaction) (bool, error)
- type Config
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CallContract ¶
func CallContract(client *rpc.Client, contractID, payLoad string, height int64) (map[string]interface{}, error)
CallContract call contract
func GenerateKey ¶
GenerateKey generate key by shard
func GenerateSubTx ¶
func GenerateSubTx(from *ecdsa.PrivateKey, to common.Address, amount *big.Int, price *big.Int, gasLimit uint64, nonce uint64, payload []byte, largestPackHeight int64) (*types.Transaction, error)
GenerateTx generate a transaction based on the address type of to
func GenerateTx ¶
func GenerateTx(from *ecdsa.PrivateKey, to common.Address, amount *big.Int, price *big.Int, gasLimit uint64, nonce uint64, payload []byte) (*types.Transaction, error)
GenerateTx generate a transaction based on the address type of to
func GetAccountNonce ¶
func GetAccountNonce(client *rpc.Client, account common.Address, hexHash string, height int64) (uint64, error)
GetAccountNonce get account nonce by account
func GetAccountTxCount ¶
func GetAccountTxCount(client *rpc.Client, account common.Address, hexHash string, height int64) (uint64, error)
GetAccountNonce get account nonce by account
func GetGenerateKeyPairCmd ¶
GetGenerateKeyPairCmd represents the generateKeyPair command
func GetNetworkID ¶
GetNetworkID get network ID
func GetTransactionByHash ¶
Types ¶
type Config ¶
type Config struct { //Config is the Configuration of log LogConfig comm.LogConfig `json:"log"` // basic config for Node BasicConfig node.BasicConfig `json:"basic"` // The configuration of p2p network P2PConfig p2p.Config `json:"p2p"` // HttpServer config for http server HTTPServer node.HTTPServer `json:"httpServer"` // The configuration of websocket rpc service WSServerConfig node.WSServerConfig `json:"wsserver"` // The configuration of ipc rpc service Ipcconfig node.IpcConfig `json:"ipcconfig"` // metrics config info MetricsConfig *metrics.Config `json:"metrics"` // genesis config info GenesisConfig core.GenesisInfo `json:"genesis"` }
Config is the Configuration of node
Click to show internal directories.
Click to hide internal directories.