Documentation ¶
Index ¶
- type ErrorResponse
- type GetAccountStateBalance
- type GetAccountStateResponse
- type GetAccountStateResult
- type GetBlockCountResponse
- type GetBlockResponse
- type GetBlockResult
- type GetContractStateResponse
- type GetContractStateResult
- type GetRawTransactionResponse
- type GetRawTransactionResult
- type GetUnspentsResponse
- type InvokeFunctionStackArg
- type InvokeFunctionStackResult
- type InvokeScriptResponse
- type JSONRPCRequest
- type JSONRPCResponse
- type NEORPCClient
- func (n *NEORPCClient) GetAccountState(address string) GetAccountStateResponse
- func (n *NEORPCClient) GetBlock(blockHash string) GetBlockResponse
- func (n *NEORPCClient) GetBlockByIndex(index int) GetBlockResponse
- func (n *NEORPCClient) GetBlockCount() GetBlockCountResponse
- func (n *NEORPCClient) GetContractState(scripthash string) GetContractStateResponse
- func (n *NEORPCClient) GetRawTransaction(txID string) GetRawTransactionResponse
- func (n *NEORPCClient) GetTokenBalance(tokenHash string, neoAddress string) TokenBalanceResponse
- func (n *NEORPCClient) GetUnspents(adddress string) GetUnspentsResponse
- func (n *NEORPCClient) InvokeScript(scriptInHex string) InvokeScriptResponse
- func (n *NEORPCClient) SendRawTransaction(rawTransactionInHex string) SendRawTransactionResponse
- type NEORPCInterface
- type SendRawTransactionResponse
- type TokenBalanceResponse
- type TokenBalanceResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ErrorResponse ¶
type GetAccountStateBalance ¶
type GetAccountStateResponse ¶
type GetAccountStateResponse struct { JSONRPCResponse *ErrorResponse //optional Result GetAccountStateResult `json:"result"` }
type GetAccountStateResult ¶
type GetAccountStateResult struct { Version int `json:"version"` ScriptHash string `json:"script_hash"` Frozen bool `json:"frozen"` Votes []interface{} `json:"votes"` Balances []GetAccountStateBalance `json:"balances"` }
type GetBlockCountResponse ¶
type GetBlockCountResponse struct { JSONRPCResponse *ErrorResponse //optional Result int `json:"result"` }
type GetBlockResponse ¶
type GetBlockResponse struct { JSONRPCResponse *ErrorResponse //optional Result GetBlockResult `json:"result"` }
type GetBlockResult ¶
type GetBlockResult struct { Hash string `json:"hash"` Size int `json:"size"` Version int `json:"version"` Previousblockhash string `json:"previousblockhash"` Merkleroot string `json:"merkleroot"` Time int `json:"time"` Index int `json:"index"` Nonce string `json:"nonce"` Nextconsensus string `json:"nextconsensus"` Script struct { Invocation string `json:"invocation"` Verification string `json:"verification"` } `json:"script"` Tx []struct { Txid string `json:"txid"` Size int `json:"size"` Type string `json:"type"` Version int `json:"version"` Attributes []interface{} `json:"attributes"` Vin []interface{} `json:"vin"` Vout []interface{} `json:"vout"` Claims []interface{} `json:"claims"` SysFee string `json:"sys_fee"` NetFee string `json:"net_fee"` Scripts []interface{} `json:"scripts"` Nonce int64 `json:"nonce,omitempty"` Script string `json:"script,omitempty"` Gas string `json:"gas,omitempty"` } `json:"tx"` Confirmations int `json:"confirmations"` Nextblockhash string `json:"nextblockhash"` }
type GetContractStateResponse ¶
type GetContractStateResponse struct { JSONRPCResponse *ErrorResponse //optional Result GetContractStateResult `json:"result"` }
type GetContractStateResult ¶
type GetContractStateResult struct { Version int `json:"version"` Hash string `json:"hash"` Script string `json:"script"` Parameters []string `json:"parameters"` Returntype string `json:"returntype"` Name string `json:"name"` CodeVersion string `json:"code_version"` Author string `json:"author"` Email string `json:"email"` Description string `json:"description"` Properties struct { Storage bool `json:"storage"` DynamicInvoke bool `json:"dynamic_invoke"` } `json:"properties"` }
type GetRawTransactionResponse ¶
type GetRawTransactionResponse struct { JSONRPCResponse *ErrorResponse //optional Result GetRawTransactionResult `json:"result"` }
type GetRawTransactionResult ¶
type GetRawTransactionResult struct { Txid string `json:"txid"` Size int `json:"size"` Type string `json:"type"` Version int `json:"version"` Attributes []struct { Usage string `json:"usage"` Data string `json:"data"` } `json:"attributes"` Vin []struct { Txid string `json:"txid"` Vout int `json:"vout"` } `json:"vin"` Vout []struct { N int `json:"n"` Asset string `json:"asset"` Value string `json:"value"` Address string `json:"address"` } `json:"vout"` Claims []struct { Txid string `json:"txid"` Vout int `json:"vout"` } `json:"claims"` SysFee string `json:"sys_fee"` NetFee string `json:"net_fee"` Scripts []struct { Invocation string `json:"invocation"` Verification string `json:"verification"` } `json:"scripts"` Script string `json:"script"` Gas string `json:"gas"` Blockhash string `json:"blockhash"` Confirmations int `json:"confirmations"` Blocktime int `json:"blocktime"` }
type GetUnspentsResponse ¶
type GetUnspentsResponse struct { Jsonrpc string `json:"jsonrpc"` ID int `json:"id"` Result struct { Balance []struct { Unspent []struct { Txid string `json:"txid"` N int `json:"n"` Value int `json:"value"` } `json:"unspent"` AssetHash string `json:"asset_hash"` Asset string `json:"asset"` AssetSymbol string `json:"asset_symbol"` Amount int `json:"amount"` } `json:"balance"` Address string `json:"address"` } `json:"result"` }
type InvokeFunctionStackArg ¶
func NewInvokeFunctionStackByteArray ¶
func NewInvokeFunctionStackByteArray(value string) InvokeFunctionStackArg
type InvokeScriptResponse ¶
type InvokeScriptResponse struct { JSONRPCResponse *ErrorResponse Result struct { Script string `json:"script"` State string `json:"state"` GasConsumed string `json:"gas_consumed"` Stack []struct { Type string `json:"type"` Value string `json:"value"` } `json:"stack"` } `json:"result"` }
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 NEORPCClient ¶
func NewClient ¶
func NewClient(endpoint string) *NEORPCClient
func (*NEORPCClient) GetAccountState ¶
func (n *NEORPCClient) GetAccountState(address string) GetAccountStateResponse
func (*NEORPCClient) GetBlock ¶
func (n *NEORPCClient) GetBlock(blockHash string) GetBlockResponse
func (*NEORPCClient) GetBlockByIndex ¶
func (n *NEORPCClient) GetBlockByIndex(index int) GetBlockResponse
func (*NEORPCClient) GetBlockCount ¶
func (n *NEORPCClient) GetBlockCount() GetBlockCountResponse
func (*NEORPCClient) GetContractState ¶
func (n *NEORPCClient) GetContractState(scripthash string) GetContractStateResponse
func (*NEORPCClient) GetRawTransaction ¶
func (n *NEORPCClient) GetRawTransaction(txID string) GetRawTransactionResponse
func (*NEORPCClient) GetTokenBalance ¶
func (n *NEORPCClient) GetTokenBalance(tokenHash string, neoAddress string) TokenBalanceResponse
func (*NEORPCClient) GetUnspents ¶
func (n *NEORPCClient) GetUnspents(adddress string) GetUnspentsResponse
func (*NEORPCClient) InvokeScript ¶
func (n *NEORPCClient) InvokeScript(scriptInHex string) InvokeScriptResponse
func (*NEORPCClient) SendRawTransaction ¶
func (n *NEORPCClient) SendRawTransaction(rawTransactionInHex string) SendRawTransactionResponse
type NEORPCInterface ¶
type NEORPCInterface interface { GetContractState(scripthash string) GetContractStateResponse SendRawTransaction(rawTransactionInHex string) SendRawTransactionResponse GetRawTransaction(txID string) GetRawTransactionResponse GetBlockCount() GetBlockCountResponse GetBlock(blockHash string) GetBlockResponse GetBlockByIndex(index int) GetBlockResponse GetAccountState(address string) GetAccountStateResponse InvokeScript(scriptInHex string) InvokeScriptResponse GetTokenBalance(tokenHash string, adddress string) TokenBalanceResponse GetUnspents(adddress string) GetUnspentsResponse // contains filtered or unexported methods }
type SendRawTransactionResponse ¶
type SendRawTransactionResponse struct { JSONRPCResponse *ErrorResponse //optional Result bool }
type TokenBalanceResponse ¶
type TokenBalanceResponse struct { JSONRPCResponse *ErrorResponse //optional Result TokenBalanceResult `json:"result"` }
type TokenBalanceResult ¶
type TokenBalanceResult struct { Script string `json:"script"` State string `json:"state"` GasConsumed string `json:"gas_consumed"` Stack []InvokeFunctionStackResult `json:"stack"` Tx string `json:"tx"` }
Click to show internal directories.
Click to hide internal directories.