Documentation ¶
Index ¶
- Constants
- type API
- func (api *API) AccountNumberAndSequence(address string) (uint64, uint64, error)
- func (api *API) Address(address string) (*AddressResult, error)
- func (api *API) AddressBalance(address string) (sdk.Coins, error)
- func (api *API) AllAccounts() ([]string, error)
- func (api *API) BaseCoin() string
- func (api *API) BroadcastTxCommit(data []byte) (*TxSyncResponse, error)
- func (api *API) BroadcastTxSync(data []byte) (*TxSyncResponse, error)
- func (api *API) ChainID() string
- func (api *API) Close() error
- func (api *API) Coin(denom string) (Coin, error)
- func (api *API) Coins() ([]Coin, error)
- func (api *API) GetFeeCalculationOptions() *tx.FeeCalculationOptions
- func (api *API) GetFeeParams(baseDenom, quoteDenom string) (sdk.Dec, feetypes.Params, error)
- func (api *API) GetLastHeight() int64
- func (api *API) GetParameters() error
- func (api *API) GetSupply(denom string) (sdk.Int, error)
- func (api *API) MultisigTransactionsByID(txID string) (MultisigTransactionInfo, error)
- func (api *API) MultisigTransactionsByWallet(address string) ([]MultisigTransaction, error)
- func (api *API) MultisigWalletByAddress(address string) (MultisigWallet, error)
- func (api *API) MultisigWalletsByOwner(owner string) ([]MultisigWallet, error)
- func (api *API) NFTCollection(creator, denom string) (NFTCollection, error)
- func (api *API) NFTCollections() ([]NFTCollection, error)
- func (api *API) NFTSubToken(tokenID string, subTokenID string) (SubToken, error)
- func (api *API) NFTToken(id string) (NFTToken, error)
- func (api *API) SimulateTx(data []byte) (*TxSimulateResponse, error)
- func (api *API) Transaction(hash string) (*TxResult, error)
- func (api *API) TransactionsByBlock(height uint64) ([]string, error)
- func (api *API) ValidatorDelegations(validator string) ([]Delegation, error)
- func (api *API) ValidatorRedelegations(validator string) ([]Redelegation, error)
- func (api *API) ValidatorUndelegations(validator string) ([]Undelegation, error)
- func (api *API) Validators() ([]Validator, error)
- type AddressResult
- type BondStatus
- type Coin
- type ConnectionOptions
- type Delegation
- type MultisigTransaction
- type MultisigTransactionInfo
- type MultisigWallet
- type NFTCollection
- type NFTToken
- type Redelegation
- type Stake
- type StakeType
- type SubToken
- type TxAttribute
- type TxEvent
- type TxLog
- type TxResult
- type TxSimulateResponse
- type TxSyncResponse
- type Undelegation
- type Validator
Constants ¶
const ( // COIN defines the type for stakes in coin. StakeType_Coin StakeType = validatortypes.StakeType_Coin // NFT defines the type for stakes in NFT. StakeType_NFT StakeType = validatortypes.StakeType_NFT // UNSPECIFIED defines an invalid validator status. BondStatus_Unspecified BondStatus = validatortypes.BondStatus_Unspecified // UNBONDED defines a validator that is not bonded. BondStatus_Unbonded BondStatus = validatortypes.BondStatus_Unbonded // UNBONDING defines a validator that is unbonding. BondStatus_Unbonding BondStatus = validatortypes.BondStatus_Unbonding // BONDED defines a validator that is bonded. BondStatus_Bonded BondStatus = validatortypes.BondStatus_Bonded )
const QuotePair = "usd"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
API struct accumulates all queries to blockchain node and makes broadcast of prepared transaction
func NewAPI ¶
func NewAPI(opts ConnectionOptions) (*API, error)
func (*API) AccountNumberAndSequence ¶
AccountNumberAndSequence requests account number and current sequence (nonce) of specified address.
func (*API) Address ¶
func (api *API) Address(address string) (*AddressResult, error)
Address requests full information about specified address
func (*API) AllAccounts ¶ added in v0.0.8
AllAccounts returns full list of accounts in blockchain
func (*API) BaseCoin ¶
BaseCoin() returns base coin symbol from genesis. Need for correct transaction building
func (*API) BroadcastTxCommit ¶
func (api *API) BroadcastTxCommit(data []byte) (*TxSyncResponse, error)
func (*API) BroadcastTxSync ¶
func (api *API) BroadcastTxSync(data []byte) (*TxSyncResponse, error)
func (*API) GetFeeCalculationOptions ¶ added in v0.0.8
func (api *API) GetFeeCalculationOptions() *tx.FeeCalculationOptions
func (*API) GetFeeParams ¶ added in v0.0.8
GetFeeParams returns all for ccorrect transaction fee calculation
func (*API) GetLastHeight ¶ added in v0.0.8
GetParameters() get blockchain parameters
func (*API) GetParameters ¶
GetParameters() get blockchain parameters
func (*API) MultisigTransactionsByID ¶
func (api *API) MultisigTransactionsByID(txID string) (MultisigTransactionInfo, error)
func (*API) MultisigTransactionsByWallet ¶
func (api *API) MultisigTransactionsByWallet(address string) ([]MultisigTransaction, error)
func (*API) MultisigWalletByAddress ¶
func (api *API) MultisigWalletByAddress(address string) (MultisigWallet, error)
func (*API) MultisigWalletsByOwner ¶
func (api *API) MultisigWalletsByOwner(owner string) ([]MultisigWallet, error)
func (*API) NFTCollection ¶
func (api *API) NFTCollection(creator, denom string) (NFTCollection, error)
Returns NFT IDs from collection
func (*API) NFTCollections ¶
func (api *API) NFTCollections() ([]NFTCollection, error)
Returns all NFT collections (denoms)
func (*API) NFTSubToken ¶ added in v0.0.8
func (*API) SimulateTx ¶ added in v0.0.8
func (api *API) SimulateTx(data []byte) (*TxSimulateResponse, error)
func (*API) TransactionsByBlock ¶
TODO
func (*API) ValidatorDelegations ¶ added in v0.0.8
func (api *API) ValidatorDelegations(validator string) ([]Delegation, error)
func (*API) ValidatorRedelegations ¶ added in v0.0.8
func (api *API) ValidatorRedelegations(validator string) ([]Redelegation, error)
func (*API) ValidatorUndelegations ¶ added in v0.0.8
func (api *API) ValidatorUndelegations(validator string) ([]Undelegation, error)
func (*API) Validators ¶ added in v0.0.8
type AddressResult ¶
AddressResult contains API response fields.
type BondStatus ¶ added in v0.1.0
type BondStatus = validatortypes.BondStatus
type ConnectionOptions ¶
type Delegation ¶ added in v0.0.8
type Delegation = validatortypes.Delegation
type MultisigTransaction ¶
type MultisigTransaction = multisigtypes.Transaction
type MultisigTransactionInfo ¶ added in v0.0.8
type MultisigTransactionInfo struct { Transaction MultisigTransaction Signers []string Completed bool }
type MultisigWallet ¶
type MultisigWallet = multisigtypes.Wallet
type NFTCollection ¶
type NFTCollection = nfttypes.Collection
type Redelegation ¶ added in v0.0.8
type Redelegation = validatortypes.Redelegation
type Stake ¶ added in v0.0.8
type Stake = validatortypes.Stake
type StakeType ¶ added in v0.0.8
type StakeType = validatortypes.StakeType
type TxAttribute ¶
TxAttribute contains API response fields.
type TxEvent ¶
type TxEvent struct { Type string `json:"type"` Attributes []TxAttribute `json:"attributes"` }
TxEvent contains API response fields.
type TxLog ¶
type TxLog struct {
Events []TxEvent `json:"events"`
}
TxLog contains API response fields.
type TxSimulateResponse ¶ added in v0.0.8
type TxSyncResponse ¶
type TxSyncResponse struct { // transaction hash Hash string // error info. Code = 0 mean no error Code uint32 Log string Codespace string Events []tmtypes.Event }
Response of broadcast_tx_sync
type Undelegation ¶ added in v0.0.8
type Undelegation = validatortypes.Undelegation
type Validator ¶ added in v0.0.8
type Validator = validatortypes.Validator