responses

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddressResponse

type AddressResponse struct {
	Response
	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 {
	Response
	Result []Balance `json:"result"`
}

type BlockCandidatesResponse

type BlockCandidatesResponse struct {
	Response
	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 {
	Response
	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 {
	Response
	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 {
	Response
	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 {
	Response
	Result struct {
		Commission string `json:"commission"`
		WillPay    string `json:"will_pay"`
	} `json:"result"`
}

type EstimateCoinSellAllResponse

type EstimateCoinSellAllResponse struct {
	Response
	Result struct {
		WillGet string `json:"will_get"`
	} `json:"result"`
}

type EstimateCoinSellResponse

type EstimateCoinSellResponse struct {
	Response
	Result struct {
		Commission string `json:"commission"`
		WillGet    string `json:"will_get"`
	} `json:"result"`
}

type EstimateTxResponse

type EstimateTxResponse struct {
	Response
	Result struct {
		Commission string `json:"commission"`
	} `json:"result"`
}

type EventsResponse

type EventsResponse struct {
	Response
	Result struct {
		Events []event `json:"events"`
	} `json:"result"`
}

type GasResponse

type GasResponse struct {
	Response
	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 {
	Response
	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 {
	Response
	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"`
	From        string             `json:"from"`
	Type        uint8              `json:"type"`
	Nonce       string             `json:"nonce"`
	GasPrice    uint64             `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 {
	Response
	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 {
	Response
	Validators []Validator `json:"result"`
}

Jump to

Keyboard shortcuts

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