api

package
v0.0.2-alpha Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2018 License: MIT Imports: 26 Imported by: 1 module, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Block

func Block(w http.ResponseWriter, r *http.Request)

func EstimateCoinExchangeReturn

func EstimateCoinExchangeReturn(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 GetCandidate

func GetCandidate(w http.ResponseWriter, r *http.Request)

func GetCoinInfo

func GetCoinInfo(w http.ResponseWriter, r *http.Request)

func GetStateForRequest

func GetStateForRequest(r *http.Request) *state.StateDB

func GetTransactionCount

func GetTransactionCount(w http.ResponseWriter, r *http.Request)

func RunApi

func RunApi(b *minter.Blockchain)

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 Status

func Status(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 BalanceResponse map[string]string

type CoinInfoResponse

type CoinInfoResponse struct {
	Name           string           `json:"name"`
	Symbol         types.CoinSymbol `json:"symbol"`
	Volume         string           `json:"volume"`
	Crr            uint             `json:"crr"`
	ReserveCoin    types.CoinSymbol `json:"reserve_coin"`
	ReserveBalance string           `json:"reserve_balance"`
	Creator        types.Address    `json:"creator"`
}

type ResTx

type ResTx struct {
	Hash     common.HexBytes        `json:"hash"`
	Height   int64                  `json:"height"`
	Index    uint32                 `json:"index"`
	TxResult abci.ResponseDeliverTx `json:"tx_result"`
	Tx       types.Tx               `json:"tx"`
	Proof    types.TxProof          `json:"proof,omitempty"`
}

type Response

type Response struct {
	Code   uint32      `json:"code"`
	Result interface{} `json:"result,omitempty"`
	Log    string      `json:"log,omitempty"`
}

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=gasWanted,proto3" json:"gas_wanted,omitempty"`
	GasUsed   int64           `protobuf:"varint,6,opt,name=gas_used,json=gasUsed,proto3" json:"gas_used,omitempty"`
	Tags      []common.KVPair `protobuf:"bytes,7,rep,name=tags" json:"tags,omitempty"`
	Fee       common.KI64Pair `protobuf:"bytes,8,opt,name=fee" json:"fee"`
}

type ResultTx

type ResultTx struct {
	Hash     common.HexBytes   `json:"hash"`
	Height   int64             `json:"height"`
	Index    uint32            `json:"index"`
	TxResult ResponseDeliverTx `json:"tx_result"`
	Tx       types.Tx          `json:"tx"`
	Proof    types.TxProof     `json:"proof,omitempty"`
}

type ResultTxSearch

type ResultTxSearch struct {
	Txs        []*ResultTx `json:"txs"`
	TotalCount int         `json:"total_count"`
}

type SendTransactionRequest

type SendTransactionRequest struct {
	Transaction string `json:"transaction"`
}

type StatusResponse

type StatusResponse struct {
	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"`
}

type TransactionCountResponse

type TransactionCountResponse uint64

type TransactionResponse

type TransactionResponse struct {
	Hash     common.HexBytes   `json:"hash"`
	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:"gasPrice"`
	Type     byte              `json:"type"`
	Data     transaction.Data  `json:"data"`
	Payload  []byte            `json:"payload"`
}

Jump to

Keyboard shortcuts

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