Documentation
¶
Index ¶
- func Block(w http.ResponseWriter, r *http.Request)
- func CalcBipVolume(height int) *big.Int
- func EstimateCoinBuy(w http.ResponseWriter, r *http.Request)
- func EstimateCoinSell(w http.ResponseWriter, r *http.Request)
- func GetBalance(w http.ResponseWriter, r *http.Request)
- func GetBalanceWatcher(w http.ResponseWriter, r *http.Request)
- func GetBipVolume(w http.ResponseWriter, r *http.Request)
- func GetCandidate(w http.ResponseWriter, r *http.Request)
- func GetCoinInfo(w http.ResponseWriter, r *http.Request)
- func GetStateForRequest(r *http.Request) *state.StateDB
- func GetTransactionCount(w http.ResponseWriter, r *http.Request)
- func GetValidators(w http.ResponseWriter, r *http.Request)
- func NetInfo(w http.ResponseWriter, r *http.Request)
- func RunApi(b *minter.Blockchain, node *node.Node)
- func SendTransaction(w http.ResponseWriter, r *http.Request)
- func SendTransactionAsync(w http.ResponseWriter, r *http.Request)
- func SendTransactionSync(w http.ResponseWriter, r *http.Request)
- func Status(w http.ResponseWriter, r *http.Request)
- func Transaction(w http.ResponseWriter, r *http.Request)
- func Transactions(w http.ResponseWriter, r *http.Request)
- type BalanceRequest
- type BalanceResponse
- type BipVolumeResult
- type BlockResponse
- type BlockTransactionResponse
- type Candidate
- type CoinInfoResponse
- type EstimateCoinBuyResponse
- type EstimateCoinSellResponse
- type Response
- type ResponseDeliverTx
- type ResultTxSearch
- type SendTransactionRequest
- type SendTransactionResponse
- type StatusResponse
- type TransactionCountResponse
- type TransactionResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CalcBipVolume ¶
TODO: change logic should we save amount to state?
func EstimateCoinBuy ¶ added in v0.0.6
func EstimateCoinBuy(w http.ResponseWriter, r *http.Request)
func EstimateCoinSell ¶ added in v0.0.6
func EstimateCoinSell(w http.ResponseWriter, r *http.Request)
func GetBalance ¶
func GetBalance(w http.ResponseWriter, r *http.Request)
func GetBalanceWatcher ¶
func GetBalanceWatcher(w http.ResponseWriter, r *http.Request)
func GetBipVolume ¶
func GetBipVolume(w http.ResponseWriter, r *http.Request)
func GetCandidate ¶
func GetCandidate(w http.ResponseWriter, r *http.Request)
func GetCoinInfo ¶
func GetCoinInfo(w http.ResponseWriter, r *http.Request)
func GetTransactionCount ¶
func GetTransactionCount(w http.ResponseWriter, r *http.Request)
func GetValidators ¶
func GetValidators(w http.ResponseWriter, r *http.Request)
func SendTransaction ¶
func SendTransaction(w http.ResponseWriter, r *http.Request)
func SendTransactionAsync ¶
func SendTransactionAsync(w http.ResponseWriter, r *http.Request)
func SendTransactionSync ¶
func SendTransactionSync(w http.ResponseWriter, r *http.Request)
func Transaction ¶
func Transaction(w http.ResponseWriter, r *http.Request)
func Transactions ¶
func Transactions(w http.ResponseWriter, r *http.Request)
Types ¶
type BalanceRequest ¶
type BalanceRequest struct {
Address types.Address `json:"address"`
Coin types.CoinSymbol `json:"coin"`
}
type BalanceResponse ¶
type BipVolumeResult ¶ added in v0.1.2
type BipVolumeResult struct {
Volume string `json:"volume"`
}
type BlockResponse ¶
type BlockResponse struct {
Hash common.HexBytes `json:"hash"`
Height int64 `json:"height"`
Time time.Time `json:"time"`
NumTxs int64 `json:"num_txs"`
TotalTxs int64 `json:"total_txs"`
Transactions []BlockTransactionResponse `json:"transactions"`
Precommits json.RawMessage `json:"precommits"`
}
type BlockTransactionResponse ¶
type BlockTransactionResponse struct {
Hash string `json:"hash"`
RawTx string `json:"raw_tx"`
From string `json:"from"`
Nonce uint64 `json:"nonce"`
GasPrice *big.Int `json:"gas_price"`
Type byte `json:"type"`
Data transaction.Data `json:"data"`
Payload []byte `json:"payload"`
ServiceData []byte `json:"service_data"`
Gas int64 `json:"gas"`
GasCoin types.CoinSymbol `json:"gas_coin"`
TxResult ResponseDeliverTx `json:"tx_result"`
}
type Candidate ¶
type Candidate struct {
CandidateAddress types.Address `json:"candidate_address"`
TotalStake string `json:"total_stake"`
PubKey string `json:"pub_key"`
Commission uint `json:"commission"`
AccumReward string `json:"accumulated_reward"`
Stakes []state.Stake `json:"stakes"`
CreatedAtBlock uint `json:"created_at_block"`
Status byte `json:"status"`
AbsentTimes uint `json:"absent_times"`
}
type CoinInfoResponse ¶
type EstimateCoinBuyResponse ¶ added in v0.1.2
type EstimateCoinSellResponse ¶ added in v0.1.2
type ResponseDeliverTx ¶
type ResponseDeliverTx struct {
Code uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
Log string `protobuf:"bytes,3,opt,name=log,proto3" json:"log,omitempty"`
Info string `protobuf:"bytes,4,opt,name=info,proto3" json:"info,omitempty"`
GasWanted int64 `protobuf:"varint,5,opt,name=gas_wanted,json=gas_wanted,proto3" json:"gas_wanted,omitempty"`
GasUsed int64 `protobuf:"varint,6,opt,name=gas_used,json=gas_used,proto3" json:"gas_used,omitempty"`
Tags []common.KVPair `protobuf:"bytes,7,rep,name=tags" json:"tags,omitempty"`
}
type ResultTxSearch ¶
type ResultTxSearch struct {
Txs []*core_types.ResultTx `json:"txs"`
TotalCount int `json:"total_count"`
}
type SendTransactionRequest ¶
type SendTransactionRequest struct {
Transaction string `json:"transaction"`
}
type SendTransactionResponse ¶ added in v0.1.2
type SendTransactionResponse struct {
Hash string `json:"hash"`
}
type StatusResponse ¶
type StatusResponse struct {
MinterVersion string `json:"version"`
LatestBlockHash common.HexBytes `json:"latest_block_hash"`
LatestAppHash common.HexBytes `json:"latest_app_hash"`
LatestBlockHeight int64 `json:"latest_block_height"`
LatestBlockTime time.Time `json:"latest_block_time"`
TmStatus json.RawMessage `json:"tm_status"`
}
type TransactionCountResponse ¶
type TransactionCountResponse struct {
Count uint64 `json:"count"`
}
type TransactionResponse ¶
type TransactionResponse struct {
Hash common.HexBytes `json:"hash"`
RawTx string `json:"raw_tx"`
Height int64 `json:"height"`
Index uint32 `json:"index"`
TxResult ResponseDeliverTx `json:"tx_result"`
From string `json:"from"`
Nonce uint64 `json:"nonce"`
GasPrice *big.Int `json:"gas_price"`
GasCoin types.CoinSymbol `json:"gas_coin"`
Type byte `json:"type"`
Data transaction.Data `json:"data"`
Payload []byte `json:"payload"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.