responses

package
v1.3.5 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2019 License: MIT Imports: 2 Imported by: 6 modules, 19 packages

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

This section is empty.

Types

type AddressResponse

type AddressResponse struct {
	Jsonrpc string     `json:"jsonrpc"`
	ID      string     `json:"id"`
	Error   *ErrorData `json:"error"`
	Result  Balance    `json:"result"`
}

type Balance

type Balance struct {
	Balance          map[string]string `json:"balance"`
	TransactionCount string            `json:"transaction_count"`
	Address          string            `json:"address"`
}

type BalancesResponse

type BalancesResponse struct {
	Jsonrpc string     `json:"jsonrpc"`
	ID      string     `json:"id"`
	Error   *ErrorData `json:"error"`
	Result  []Balance  `json:"result"`
}

type BlockCandidatesResponse

type BlockCandidatesResponse struct {
	Jsonrpc string     `json:"jsonrpc"`
	ID      string     `json:"id"`
	Error   *ErrorData `json:"error"`
	Result  []struct {
		RewardAddress  string  `json:"reward_address"`
		OwnerAddress   string  `json:"owner_address"`
		TotalStake     string  `json:"total_stake"`
		PubKey         string  `json:"pub_key"`
		Commission     string  `json:"commission"`
		CreatedAtBlock string  `json:"created_at_block"`
		Status         uint8   `json:"status"`
		Stakes         []Stake `json:"stakes"`
	} `json:"result"`
}

type BlockResponse

type BlockResponse struct {
	Jsonrpc string     `json:"jsonrpc"`
	ID      string     `json:"id"`
	Error   *ErrorData `json:"error"`
	Result  struct {
		Hash         string        `json:"hash"`
		Size         string        `json:"size"`
		Height       string        `json:"height"`
		TxCount      string        `json:"num_txs"`
		TotalTx      string        `json:"total_txs"`
		Proposer     string        `json:"proposer"`
		BlockReward  string        `json:"block_reward"`
		Time         time.Time     `json:"time"`
		Transactions []Transaction `json:"transactions"`
		Validators   []Validator   `json:"validators"`
	} `json:"result"`
}

type CandidateResponse

type CandidateResponse struct {
	Jsonrpc string     `json:"jsonrpc"`
	ID      string     `json:"id"`
	Error   *ErrorData `json:"error"`
	Result  struct {
		OwnerAddress     string  `json:"owner_address"`
		RewardAddress    string  `json:"reward_address"`
		CandidateAddress string  `json:"candidate_address"`
		TotalStake       string  `json:"total_stake"`
		PubKey           string  `json:"pub_key"`
		Commission       string  `json:"commission"`
		CreatedAtBlock   string  `json:"created_at_block"`
		Status           uint8   `json:"status"`
		Stakes           []Stake `json:"stakes"`
	} `json:"result"`
}

type CoinInfoResponse

type CoinInfoResponse struct {
	Jsonrpc string     `json:"jsonrpc"`
	ID      string     `json:"id"`
	Error   *ErrorData `json:"error"`
	Result  struct {
		Name           string `json:"name"`
		Symbol         string `json:"symbol"`
		Volume         string `json:"volume"`
		Crr            string `json:"crr"`
		ReserveBalance string `json:"reserve_balance"`
	} `json:"result"`
}

type ErrorData

type ErrorData struct {
	Code     int32     `json:"code"`
	Message  string    `json:"message"`
	Data     *string   `json:"data"`
	TxResult *txResult `json:"tx_result"`
}

type EstimateCoinBuyResponse

type EstimateCoinBuyResponse struct {
	Jsonrpc string     `json:"jsonrpc"`
	ID      string     `json:"id"`
	Error   *ErrorData `json:"error"`
	Result  struct {
		Commission string `json:"commission"`
		WillPay    string `json:"will_pay"`
	} `json:"result"`
}

type EstimateCoinSellAllResponse

type EstimateCoinSellAllResponse struct {
	Jsonrpc string     `json:"jsonrpc"`
	ID      string     `json:"id"`
	Error   *ErrorData `json:"error"`
	Result  struct {
		WillGet string `json:"will_get"`
	} `json:"result"`
}

type EstimateCoinSellResponse

type EstimateCoinSellResponse struct {
	Jsonrpc string     `json:"jsonrpc"`
	ID      string     `json:"id"`
	Error   *ErrorData `json:"error"`
	Result  struct {
		Commission string `json:"commission"`
		WillGet    string `json:"will_get"`
	} `json:"result"`
}

type EstimateTxResponse

type EstimateTxResponse struct {
	Jsonrpc string     `json:"jsonrpc"`
	ID      string     `json:"id"`
	Error   *ErrorData `json:"error"`
	Result  struct {
		Commission string `json:"commission"`
	} `json:"result"`
}

type EventsResponse

type EventsResponse struct {
	Jsonrpc string     `json:"jsonrpc"`
	ID      string     `json:"id"`
	Error   *ErrorData `json:"error"`
	Result  struct {
		Events []event `json:"events"`
	} `json:"result"`
}

type GasResponse

type GasResponse struct {
	Jsonrpc string     `json:"jsonrpc"`
	ID      string     `json:"id"`
	Error   *ErrorData `json:"error"`
	Result  string     `json:"result"`
}

type Response

type Response struct {
	Jsonrpc string     `json:"jsonrpc"`
	ID      string     `json:"id"`
	Error   *ErrorData `json:"error"`
}

type SendTransactionResponse

type SendTransactionResponse struct {
	Jsonrpc string                 `json:"jsonrpc"`
	ID      string                 `json:"id"`
	Error   *ErrorData             `json:"error"`
	Result  *SendTransactionResult `json:"result"`
}

type SendTransactionResult

type SendTransactionResult struct {
	Code int32  `json:"code"`
	Data string `json:"data"`
	Log  string `json:"log"`
	Hash string `json:"hash"`
}

type Stake

type Stake struct {
	Owner    string `json:"owner"`
	Coin     string `json:"coin"`
	Value    string `json:"value"`
	BipValue string `json:"bip_value"`
}

type StatusResponse

type StatusResponse struct {
	Jsonrpc string     `json:"jsonrpc"`
	ID      string     `json:"id"`
	Error   *ErrorData `json:"error"`
	Result  struct {
		Version           string    `json:"version"`
		LatestBlockHash   string    `json:"latest_block_hash"`
		LatestAppHash     string    `json:"latest_app_hash"`
		LatestBlockHeight string    `json:"latest_block_height"`
		LatestBlockTime   time.Time `json:"latest_block_time"`
		TmStatus          struct {
			NodeInfo struct {
				ProtocolVersion struct {
					P2P   string `json:"p2p"`
					Block string `json:"block"`
					App   string `json:"app"`
				} `json:"protocol_version"`
				ID         string `json:"id"`
				ListenAddr string `json:"listen_addr"`
				Network    string `json:"network"`
				Version    string `json:"version"`
				Channels   string `json:"channels"`
				Moniker    string `json:"moniker"`
				Other      struct {
					TxIndex    string `json:"tx_index"`
					RPCAddress string `json:"rpc_address"`
				} `json:"other"`
			} `json:"node_info"`
			SyncInfo struct {
				LatestBlockHash   string    `json:"latest_block_hash"`
				LatestAppHash     string    `json:"latest_app_hash"`
				LatestBlockHeight string    `json:"latest_block_height"`
				LatestBlockTime   time.Time `json:"latest_block_time"`
				CatchingUp        bool      `json:"catching_up"`
			} `json:"sync_info"`
			ValidatorInfo struct {
				Address string `json:"address"`
				PubKey  struct {
					Type  string `json:"type"`
					Value string `json:"value"`
				} `json:"pub_key"`
				VotingPower string `json:"voting_power"`
			} `json:"validator_info"`
		} `json:"tm_status"`
	} `json:"result"`
}

type Transaction

type Transaction struct {
	Hash        string             `json:"hash"`
	Height      string             `json:"height"`
	From        string             `json:"from"`
	Type        uint8              `json:"type"`
	Nonce       string             `json:"nonce"`
	GasPrice    uint32             `json:"gas_price"`
	GasCoin     string             `json:"gas_coin"`
	GasUsed     string             `json:"gas_used"`
	Gas         string             `json:"gas"`
	Payload     string             `json:"payload"`
	ServiceData string             `json:"service_data"`
	RawTx       string             `json:"raw_tx"`
	Log         *string            `json:"log"`
	Data        json.RawMessage    `json:"data"`
	IData       interface{}        `json:"-"`
	Tags        *map[string]string `json:"tags"`
}

type TransactionResponse

type TransactionResponse struct {
	Jsonrpc string      `json:"jsonrpc"`
	ID      string      `json:"id"`
	Error   *ErrorData  `json:"error"`
	Result  Transaction `json:"result"`
}

type TransactionsResponse added in v1.3.0

type TransactionsResponse struct {
	Jsonrpc string        `json:"jsonrpc"`
	ID      string        `json:"id"`
	Error   *ErrorData    `json:"error"`
	Result  []Transaction `json:"result"`
}

type Validator

type Validator struct {
	PubKey      string  `json:"pub_key"`
	Signed      *bool   `json:"signed"`
	VotingPower *string `json:"voting_power"`
}

type ValidatorsResponse

type ValidatorsResponse struct {
	Jsonrpc    string      `json:"jsonrpc"`
	ID         string      `json:"id"`
	Error      *ErrorData  `json:"error"`
	Validators []Validator `json:"result"`
}

Jump to

Keyboard shortcuts

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