Documentation ¶
Index ¶
- type GetBalanceResponse
- type GetBlockCountResponse
- type GetBlockResponse
- type GetRawTransactionResponse
- type GetSmartCodeEventResponse
- type GetStorageResponse
- type GetUnboundONGResponse
- type InvokeFunctionStackArg
- type JSONRPCRequest
- type JSONRPCResponse
- type RPCClient
- func (n *RPCClient) GetBalance(ontAddress string) (GetBalanceResponse, error)
- func (n *RPCClient) GetBlockCount() (GetBlockCountResponse, error)
- func (n *RPCClient) GetBlockWithHash(blockHash string) (GetBlockResponse, error)
- func (n *RPCClient) GetBlockWithHeight(blockHeight int) (GetBlockResponse, error)
- func (n *RPCClient) GetRawTransaction(txID string) (GetRawTransactionResponse, error)
- func (n *RPCClient) GetSmartCodeEvent(txHash string) (GetSmartCodeEventResponse, error)
- func (n *RPCClient) GetStorage(scriptHash string, key string) (GetStorageResponse, error)
- func (n *RPCClient) GetUnboundONG(ontAddress string) (GetUnboundONGResponse, error)
- func (n *RPCClient) SendPreExecRawTransaction(rawTransactionHex string) (SendPreExecRawTransactionResponse, error)
- func (n *RPCClient) SendRawTransaction(rawTransactionHex string) (SendRawTransactionResponse, error)
- type RPCInterface
- type SendPreExecRawTransactionResponse
- type SendRawTransactionResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GetBalanceResponse ¶
type GetBalanceResponse struct { JSONRPCResponse Result struct { Ont string `json:"ont"` Ong string `json:"ong"` } `json:"result"` }
type GetBlockCountResponse ¶
type GetBlockCountResponse struct { JSONRPCResponse Result int `json:"result"` }
type GetBlockResponse ¶
type GetBlockResponse struct { JSONRPCResponse Result string `json:"result"` }
type GetRawTransactionResponse ¶
type GetRawTransactionResponse struct { JSONRPCResponse Result string `json:"result"` }
type GetSmartCodeEventResponse ¶
type GetSmartCodeEventResponse struct { JSONRPCResponse Result struct { TxHash string `json:"TxHash"` State int `json:"State"` GasConsumed int `json:"GasConsumed"` Notify []struct { ContractAddress string `json:"ContractAddress"` States []interface{} `json:"States"` } `json:"Notify"` } `json:"result"` }
type GetStorageResponse ¶
type GetStorageResponse struct { JSONRPCResponse Result string `json:"result"` }
type GetUnboundONGResponse ¶
type GetUnboundONGResponse struct { JSONRPCResponse Result string `json:"result"` }
type InvokeFunctionStackArg ¶
type JSONRPCRequest ¶
type JSONRPCRequest struct { Jsonrpc string `json:"jsonrpc"` Method string `json:"method"` Params []interface{} `json:"params"` ID int `json:"id"` }
func NewRequest ¶
func NewRequest(method string, params []interface{}) JSONRPCRequest
type JSONRPCResponse ¶
type RPCClient ¶
func NewRPCClient ¶
func (*RPCClient) GetBalance ¶
func (n *RPCClient) GetBalance(ontAddress string) (GetBalanceResponse, error)
func (*RPCClient) GetBlockCount ¶
func (n *RPCClient) GetBlockCount() (GetBlockCountResponse, error)
func (*RPCClient) GetBlockWithHash ¶
func (n *RPCClient) GetBlockWithHash(blockHash string) (GetBlockResponse, error)
func (*RPCClient) GetBlockWithHeight ¶
func (n *RPCClient) GetBlockWithHeight(blockHeight int) (GetBlockResponse, error)
func (*RPCClient) GetRawTransaction ¶
func (n *RPCClient) GetRawTransaction(txID string) (GetRawTransactionResponse, error)
func (*RPCClient) GetSmartCodeEvent ¶
func (n *RPCClient) GetSmartCodeEvent(txHash string) (GetSmartCodeEventResponse, error)
func (*RPCClient) GetStorage ¶
func (n *RPCClient) GetStorage(scriptHash string, key string) (GetStorageResponse, error)
func (*RPCClient) GetUnboundONG ¶
func (n *RPCClient) GetUnboundONG(ontAddress string) (GetUnboundONGResponse, error)
func (*RPCClient) SendPreExecRawTransaction ¶
func (n *RPCClient) SendPreExecRawTransaction(rawTransactionHex string) (SendPreExecRawTransactionResponse, error)
func (*RPCClient) SendRawTransaction ¶
func (n *RPCClient) SendRawTransaction(rawTransactionHex string) (SendRawTransactionResponse, error)
type RPCInterface ¶
type RPCInterface interface { GetBlockCount() (GetBlockCountResponse, error) GetBalance(ontAddress string) (GetBalanceResponse, error) GetSmartCodeEvent(txHash string) (GetSmartCodeEventResponse, error) SendRawTransaction(rawTransactionHex string) (SendRawTransactionResponse, error) SendPreExecRawTransaction(rawTransactionHex string) (SendPreExecRawTransactionResponse, error) GetUnboundONG(ontAddress string) (GetUnboundONGResponse, error) GetStorage(scriptHash string, key string) (GetStorageResponse, error) GetRawTransaction(txID string) (GetRawTransactionResponse, error) GetBlockWithHash(blockHash string) (GetBlockResponse, error) GetBlockWithHeight(blockHeight int) (GetBlockResponse, error) // contains filtered or unexported methods }
type SendPreExecRawTransactionResponse ¶
type SendPreExecRawTransactionResponse struct { JSONRPCResponse //this is when we send 1 Result struct { State int `json:"State"` Gas int `json:"Gas"` Result string `json:"Result"` } `json:"result"` }
type SendRawTransactionResponse ¶
type SendRawTransactionResponse struct { JSONRPCResponse //this is when we send 0 Result string `json:"result"` }
Click to show internal directories.
Click to hide internal directories.