jsonrpc

package
v1.17.0 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2024 License: LGPL-3.0 Imports: 16 Imported by: 6

Documentation

Overview

Package jsonrpc privides a function to start json rpc server

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAllowance added in v1.14.1

func GetAllowance(params []interface{}) map[string]interface{}

get allowance

func GetAllowanceV2 added in v1.14.1

func GetAllowanceV2(params []interface{}) map[string]interface{}

get allowance

func GetBalance added in v1.14.1

func GetBalance(params []interface{}) map[string]interface{}

get balance of address

func GetBalanceV2 added in v1.14.1

func GetBalanceV2(params []interface{}) map[string]interface{}

get balance of address

func GetBestBlockHash added in v1.14.1

func GetBestBlockHash(params []interface{}) map[string]interface{}

get best block hash

func GetBlock added in v1.14.1

func GetBlock(params []interface{}) map[string]interface{}

get block by height or hash 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 added in v1.14.1

func GetBlockCount(params []interface{}) map[string]interface{}

get block height

func GetBlockHash added in v1.14.1

func GetBlockHash(params []interface{}) map[string]interface{}

get block hash A JSON example for getblockhash method as following:

{"jsonrpc": "2.0", "method": "getblockhash", "params": [1], "id": 0}

func GetBlockHeightByTxHash added in v1.14.1

func GetBlockHeightByTxHash(params []interface{}) map[string]interface{}

get block height by transaction hash

func GetBlockTxsByHeight added in v1.14.1

func GetBlockTxsByHeight(params []interface{}) map[string]interface{}

get block transactions by height

func GetConnectionCount added in v1.14.1

func GetConnectionCount(params []interface{}) map[string]interface{}

get node connection count

func GetContractState added in v1.14.1

func GetContractState(params []interface{}) map[string]interface{}

get contract state

func GetCrossChainMsg added in v1.14.1

func GetCrossChainMsg(params []interface{}) map[string]interface{}

get cross chain message by height

func GetCrossStatesLeafHashes added in v1.14.4

func GetCrossStatesLeafHashes(params []interface{}) map[string]interface{}

func GetCrossStatesProof added in v1.14.1

func GetCrossStatesProof(params []interface{}) map[string]interface{}

get cross chain state proof

func GetGasPrice added in v1.14.1

func GetGasPrice(params []interface{}) map[string]interface{}

get gas price in block

func GetGrantOng added in v1.14.1

func GetGrantOng(params []interface{}) map[string]interface{}

get grant ong of address

func GetMemPoolTxCount added in v1.14.1

func GetMemPoolTxCount(params []interface{}) map[string]interface{}

get memory pool transaction count

func GetMemPoolTxHashList added in v1.14.1

func GetMemPoolTxHashList(params []interface{}) map[string]interface{}

get memory pool transaction hash

func GetMemPoolTxState added in v1.14.1

func GetMemPoolTxState(params []interface{}) map[string]interface{}

get memory pool transaction state

func GetMerkleProof added in v1.14.1

func GetMerkleProof(params []interface{}) map[string]interface{}

get merkle proof by transaction hash

func GetNetworkId added in v1.14.1

func GetNetworkId(params []interface{}) map[string]interface{}

get networkid

func GetNodeVersion added in v1.14.1

func GetNodeVersion(params []interface{}) map[string]interface{}

get node version

func GetOep4Balance added in v1.14.1

func GetOep4Balance(params []interface{}) map[string]interface{}

get balance of address

func GetRawTransaction added in v1.14.1

func GetRawTransaction(params []interface{}) map[string]interface{}

get raw transaction in raw or json A JSON example for getrawtransaction method as following:

{"jsonrpc": "2.0", "method": "getrawtransaction", "params": ["transactioin hash in hex"], "id": 0}

func GetSmartCodeEvent added in v1.14.1

func GetSmartCodeEvent(params []interface{}) map[string]interface{}

get smartconstract event

func GetStorage added in v1.14.1

func GetStorage(params []interface{}) map[string]interface{}

get storage from contract

{"jsonrpc": "2.0", "method": "getstorage", "params": ["code hash", "key"], "id": 0}

func GetSyncStatus added in v1.14.1

func GetSyncStatus(params []interface{}) map[string]interface{}

get node connection most height

func GetUnboundOng added in v1.14.1

func GetUnboundOng(params []interface{}) map[string]interface{}

get unbound ong of address

func SendRawTransaction added in v1.14.1

func SendRawTransaction(params []interface{}) map[string]interface{}

send raw transaction A JSON example for sendrawtransaction method as following:

{"jsonrpc": "2.0", "method": "sendrawtransaction", "params": ["raw transactioin in hex"], "id": 0}

func StartRPCServer

func StartRPCServer() error

Types

This section is empty.

Jump to

Keyboard shortcuts

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