Documentation ¶
Index ¶
- Constants
- func Call(address string, method string, id interface{}, params []interface{}) ([]byte, error)
- func GetAllowance(params []interface{}) map[string]interface{}
- func GetBalance(params []interface{}) map[string]interface{}
- func GetBestBlockHash(params []interface{}) map[string]interface{}
- func GetBlock(params []interface{}) map[string]interface{}
- func GetBlockCount(params []interface{}) map[string]interface{}
- func GetBlockHash(params []interface{}) map[string]interface{}
- func GetBlockHeightByTxHash(params []interface{}) map[string]interface{}
- func GetBlockTxsByHeight(params []interface{}) map[string]interface{}
- func GetConnectionCount(params []interface{}) map[string]interface{}
- func GetContractState(params []interface{}) map[string]interface{}
- func GetGasPrice(params []interface{}) map[string]interface{}
- func GetGenerateBlockTime(params []interface{}) map[string]interface{}
- func GetMemPoolTxCount(params []interface{}) map[string]interface{}
- func GetMemPoolTxState(params []interface{}) map[string]interface{}
- func GetMerkleProof(params []interface{}) map[string]interface{}
- func GetNeighbor(params []interface{}) map[string]interface{}
- func GetNodeState(params []interface{}) map[string]interface{}
- func GetNodeVersion(params []interface{}) map[string]interface{}
- func GetRawMemPool(params []interface{}) map[string]interface{}
- func GetRawTransaction(params []interface{}) map[string]interface{}
- func GetSmartCodeEvent(params []interface{}) map[string]interface{}
- func GetStorage(params []interface{}) map[string]interface{}
- func GetUnboundOng(params []interface{}) map[string]interface{}
- func Handle(w http.ResponseWriter, r *http.Request)
- func HandleFunc(pattern string, handler func([]interface{}) map[string]interface{})
- func SendRawTransaction(params []interface{}) map[string]interface{}
- func SetDebugInfo(params []interface{}) map[string]interface{}
- func SetDefaultFunc(def func(http.ResponseWriter, *http.Request))
- func StartConsensus(params []interface{}) map[string]interface{}
- func StopConsensus(params []interface{}) map[string]interface{}
- type ServeMux
Constants ¶
View Source
const (
RANDBYTELEN = 4
)
Variables ¶
This section is empty.
Functions ¶
func GetAllowance ¶
func GetAllowance(params []interface{}) map[string]interface{}
func GetBalance ¶
func GetBalance(params []interface{}) map[string]interface{}
func GetBestBlockHash ¶
func GetBestBlockHash(params []interface{}) map[string]interface{}
func GetBlock ¶
func GetBlock(params []interface{}) map[string]interface{}
Input JSON string examples for getblock method as following:
{"jsonrpc": "2.0", "method": "getblock", "params": [1], "id": 0} {"jsonrpc": "2.0", "method": "getblock", "params": ["aabbcc.."], "id": 0}
func GetBlockCount ¶
func GetBlockCount(params []interface{}) map[string]interface{}
func GetBlockHash ¶
func GetBlockHash(params []interface{}) map[string]interface{}
A JSON example for getblockhash method as following:
{"jsonrpc": "2.0", "method": "getblockhash", "params": [1], "id": 0}
func GetBlockHeightByTxHash ¶
func GetBlockHeightByTxHash(params []interface{}) map[string]interface{}
func GetBlockTxsByHeight ¶
func GetBlockTxsByHeight(params []interface{}) map[string]interface{}
func GetConnectionCount ¶
func GetConnectionCount(params []interface{}) map[string]interface{}
func GetContractState ¶
func GetContractState(params []interface{}) map[string]interface{}
func GetGasPrice ¶
func GetGasPrice(params []interface{}) map[string]interface{}
func GetGenerateBlockTime ¶
func GetGenerateBlockTime(params []interface{}) map[string]interface{}
func GetMemPoolTxCount ¶
func GetMemPoolTxCount(params []interface{}) map[string]interface{}
func GetMemPoolTxState ¶
func GetMemPoolTxState(params []interface{}) map[string]interface{}
func GetMerkleProof ¶
func GetMerkleProof(params []interface{}) map[string]interface{}
func GetNeighbor ¶
func GetNeighbor(params []interface{}) map[string]interface{}
func GetNodeState ¶
func GetNodeState(params []interface{}) map[string]interface{}
func GetNodeVersion ¶
func GetNodeVersion(params []interface{}) map[string]interface{}
func GetRawMemPool ¶
func GetRawMemPool(params []interface{}) map[string]interface{}
func GetRawTransaction ¶
func GetRawTransaction(params []interface{}) map[string]interface{}
A JSON example for getrawtransaction method as following:
{"jsonrpc": "2.0", "method": "getrawtransaction", "params": ["transactioin hash in hex"], "id": 0}
func GetSmartCodeEvent ¶
func GetSmartCodeEvent(params []interface{}) map[string]interface{}
func GetStorage ¶
func GetStorage(params []interface{}) map[string]interface{}
{"jsonrpc": "2.0", "method": "getstorage", "params": ["code hash", "key"], "id": 0}
func GetUnboundOng ¶ added in v0.9.2
func GetUnboundOng(params []interface{}) map[string]interface{}
func Handle ¶
func Handle(w http.ResponseWriter, r *http.Request)
this is the function that should be called in order to answer an rpc call should be registered like "http.HandleFunc("/", httpjsonrpc.Handle)"
func HandleFunc ¶
a function to register functions to be called for specific rpc calls
func SendRawTransaction ¶
func SendRawTransaction(params []interface{}) map[string]interface{}
A JSON example for sendrawtransaction method as following:
{"jsonrpc": "2.0", "method": "sendrawtransaction", "params": ["raw transactioin in hex"], "id": 0}
func SetDebugInfo ¶
func SetDebugInfo(params []interface{}) map[string]interface{}
func SetDefaultFunc ¶
func SetDefaultFunc(def func(http.ResponseWriter, *http.Request))
a function to be called if the request is not a HTTP JSON RPC call
func StartConsensus ¶
func StartConsensus(params []interface{}) map[string]interface{}
func StopConsensus ¶
func StopConsensus(params []interface{}) map[string]interface{}
Types ¶
Click to show internal directories.
Click to hide internal directories.