Documentation ¶
Index ¶
- type AccountSate
- type ApplicationLog
- type Asset
- type AssetState
- type Balance
- type Block
- type BlockFee
- type Claim
- type Client
- func (client *Client) ApplicationLog(txid string) (*ApplicationLog, error)
- func (client *Client) GetAccountState(account string) (state *AccountSate, err error)
- func (client *Client) GetAssetState(asset string) (state *AssetState, err error)
- func (client *Client) GetBalance(address string, asset string) (utxos []*UTXO, err error)
- func (client *Client) GetBestBlockHash() (hash string, err error)
- func (client *Client) GetBlock(hash string) (block *Block, err error)
- func (client *Client) GetBlockByIndex(index int64) (block *Block, err error)
- func (client *Client) GetBlockCount() (count int64, err error)
- func (client *Client) GetClaim(address string) (unclaimed *Unclaimed, err error)
- func (client *Client) GetConnectionCount() (count int, err error)
- func (client *Client) GetPeers() (data interface{}, err error)
- func (client *Client) GetRawTransaction(txid string) (trans *Transaction, err error)
- func (client *Client) GetTxOut(txid string, n uint) (vout *Vout, err error)
- func (client *Client) Nep5BalanceOf(scriptHash string, address string) (uint64, error)
- func (client *Client) Nep5Decimals(scriptHash string) (uint64, error)
- func (client *Client) Nep5Symbol(scriptHash string) (string, error)
- func (client *Client) Nep5Transfer(scriptHash string, from, to string, amount uint64) (*Nep5Result, error)
- func (client *Client) SendRawTransaction(data []byte) (status bool, err error)
- type L10NString
- type Nep5Result
- type Notification
- type Script
- type State
- type Transaction
- type TxAttr
- type UTXO
- type Unclaimed
- type Value
- type ValueN
- type Vin
- type Vout
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountSate ¶
type AccountSate struct { Version int `json:"version"` ScriptHash string `json:"script_hash"` Frozen bool `json:"frozen"` Votes interface{} `json:"votes"` Balances []Asset `json:"balances"` }
AccountSate neo account state
type ApplicationLog ¶
type ApplicationLog struct { ID string `json:"txid"` State string `json:"vmstate"` GasConsumed string `json:"gas_consumed"` Notifications []*Notification `json:"notifications"` }
ApplicationLog .
type AssetState ¶
type AssetState struct { Version int `json:"version"` ID string `json:"id"` Type string `json:"type"` Name []L10NString `json:"name"` Amount string `json:"amount"` Available string `json:"available"` Precision float64 `json:"precision"` Owner string `json:"owner"` Admin string `json:"admin"` Issuer string `json:"issuer"` Expiration float64 `json:"expiration"` Frozen bool `json:"frozen"` }
AssetState neo asset state
type Block ¶
type Block struct { Confirmations int64 `json:"Confirmations"` Hash string `json:"Hash"` Index int64 `json:"Index"` Merkleroot string `json:"Merkleroot"` NextBlockHash string `json:"Nextblockhash"` NextConsensus string `json:"Nextconsensus"` Nonce string `json:"Nonce"` PreviousBlockHash string `json:"Previousblockhash"` Size int64 `json:"Size"` Time int64 `json:"Time"` Version int64 `json:"Version"` Script Script `json:"Script"` Transactions []Transaction `json:"Tx"` }
Block .
type Client ¶
Client neo jsonrpc 2.0 client
func (*Client) ApplicationLog ¶
func (client *Client) ApplicationLog(txid string) (*ApplicationLog, error)
ApplicationLog get application log
func (*Client) GetAccountState ¶
func (client *Client) GetAccountState(account string) (state *AccountSate, err error)
GetAccountState get account state using jsonrpc :http://docs.neo.org/zh-cn/node/api/getaccountstate.html
func (*Client) GetAssetState ¶
func (client *Client) GetAssetState(asset string) (state *AssetState, err error)
GetAssetState get asset state using jsonrpc :http://docs.neo.org/zh-cn/node/api/getassetstate.html
func (*Client) GetBalance ¶
GetBalance extend rpc method get address's utxos
func (*Client) GetBestBlockHash ¶
GetBestBlockHash get neo last block hash http://docs.neo.org/zh-cn/node/api/getbestblockhash.html
func (*Client) GetBlock ¶
GetBlock get neo block info http://docs.neo.org/zh-cn/node/api/getblock.html
func (*Client) GetBlockByIndex ¶
GetBlockByIndex get neo block info http://docs.neo.org/zh-cn/node/api/getblock2.html
func (*Client) GetBlockCount ¶
GetBlockCount get neo count info http://docs.neo.org/zh-cn/node/api/getblockcount.html
func (*Client) GetConnectionCount ¶
GetConnectionCount get node's connection count http://docs.neo.org/zh-cn/node/api/getconnectioncount.html
func (*Client) GetRawTransaction ¶
func (client *Client) GetRawTransaction(txid string) (trans *Transaction, err error)
GetRawTransaction get transaction with txid http://docs.neo.org/zh-cn/node/api/getrawtransaction.html
func (*Client) GetTxOut ¶
GetTxOut get tx vout http://docs.neo.org/zh-cn/node/api/gettxout.html
func (*Client) Nep5BalanceOf ¶
Nep5BalanceOf get nep5 balance of special address
func (*Client) Nep5Decimals ¶
Nep5Decimals get nep5 deciamls
func (*Client) Nep5Symbol ¶
Nep5Symbol .
func (*Client) Nep5Transfer ¶
func (client *Client) Nep5Transfer(scriptHash string, from, to string, amount uint64) (*Nep5Result, error)
Nep5Transfer .
func (*Client) SendRawTransaction ¶
SendRawTransaction send raw transaction with jsonrpc api:http://docs.neo.org/zh-cn/node/api/sendrawtransaction.html
type L10NString ¶
L10NString localization string
type Nep5Result ¶
type Nep5Result struct { State string `json:"state"` GasConsumed string `json:"gas_consumed"` Script string `json:"script"` Stack []*Value `json:"stack"` }
Nep5Result .
type Notification ¶
Notification .
type Script ¶
type Script struct { Invocation string `json:"Invocation"` Verification string `json:"Verification"` }
Script .
type State ¶
type State struct { Type string `json:"type"` Value interface{} `json:"value,omitempty"` }
State .
type Transaction ¶
type Transaction struct { ID string `json:"Txid"` Size int64 `json:"Size"` Type string `json:"Type"` Version int64 `json:"Version"` Attributes []interface{} `json:"Attributes"` // Script interface{} `json:"Script"` Gas string `json:"Gas"` Claims []Claim `json:"Claims"` Vin []Vin `json:"Vin"` Vout []Vout `json:"Vout"` SysFee string `json:"Sys_fee"` NetFee string `json:"Net_fee"` Scripts []Script `json:"Scripts"` Nonce int64 `json:"Nonce"` }
Transaction .
type UTXO ¶
type UTXO struct { TransactionID string `json:"txid"` Vout Vout `json:"vout"` CreateTime string `json:"createTime"` SpentTime string `json:"spentTime"` Block int64 `json:"block"` SpentBlock int64 `json:"spentBlock"` Gas string `json:"gas"` // contains filtered or unexported fields }
UTXO .