Documentation ¶
Index ¶
- func ConvertStructToEvent(data interface{}) (api.Event, error)
- type AccountBalance
- type AccountMultisigData
- type AddressBalance
- type AddressDelegatedBalance
- type AddressResponse
- type AddressesResponse
- type AddressesResponseResult
- type AppStateAccount
- type AppStateCandidate
- type AppStateCandidateStake
- type AppStateFrozenFund
- type AppStateHaltBlock
- type AppStateValidators
- type AppStateWaitlist
- type BlockRequestField
- type BlockResponse
- type BlockResponseEvidence
- type BlockResponseEvidenceEvidence
- type BlockResponseTransaction
- type BlockResponseValidator
- type BuyCoinData
- type CandidateResponse
- type CandidateResponseStake
- type CandidatesRequestCandidateStatus
- type CandidatesResponse
- type Coin
- type CoinInfoResponse
- type ConnectionStatusChannel
- type ConnectionStatusMonitor
- type ConsensusParamsBlock
- type CreateCoinData
- type CreateMultisigData
- type Data
- type DeclareCandidacyData
- type DelegateData
- type EditCandidateData
- type EditCandidatePublicKeyData
- type EditCoinOwnerData
- type EditMultisigData
- type ErrorBody
- type ErrorBodyError
- type EstimateCoinBuyResponse
- type EstimateCoinSellAllResponse
- type EstimateCoinSellResponse
- type EstimateTxCommissionResponse
- type EventItem
- type EventsResponse
- type FrozenResponse
- type FrozenResponseFrozen
- type GatewayruntimeError
- type GenesisResponse
- type GenesisResponseAppState
- type GenesisResponseAppStateCoin
- type GenesisResponseConsensusParams
- type GenesisResponseConsensusParamsEvidence
- type GenesisResponseConsensusParamsValidator
- type HaltsResponse
- type MaxGasPriceResponse
- type MinGasPriceResponse
- type MissedBlocksResponse
- type MultiSendData
- type NetInfoResponse
- type NetInfoResponsePeer
- type NodeInfo
- type NodeInfoOther
- type NodeInfoProtocolVersion
- type PeerConnectionStatus
- type PriceVoteData
- type ProtobufAny
- type RecreateCoinData
- type RedeemCheckData
- type RuntimeStreamError
- type SellAllCoinData
- type SellCoinData
- type SendData
- type SendTransactionRequest
- type SendTransactionResponse
- type SetCandidateOffData
- type SetCandidateOnData
- type SetHaltBlockData
- type StatusResponse
- type SubscribeResponse
- type SubscribeResponseEvent
- type TransactionResponse
- type TransactionsResponse
- type UnbondData
- type UnconfirmedTxsResponse
- type ValidatorsResponse
- type ValidatorsResponseResult
- type WaitListResponse
- type WaitListResponseWait
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertStructToEvent ¶
ConvertStructToEvent returns api.Event
Example ¶
package main import ( "github.com/MinterTeam/minter-go-sdk/v2/api" "github.com/MinterTeam/minter-go-sdk/v2/api/http_client/models" ) func mark(address, publicKey string) {} func doSomething(*api.StakeKickEvent) {} func main() { data := map[string]interface{}{ "type": api.TypeStakeKickEvent, "value": map[string]interface{}{ "address": "Mx", "amount": "1000000000000", "coin": "1", "validator_pub_key": "Mp", }, } event, _ := models.ConvertStructToEvent(data) mark(event.GetAddress(), event.GetValidatorPublicKey()) doSomething(event.(*api.StakeKickEvent)) }
Output:
Types ¶
type AccountBalance ¶
type AccountBalance struct { // coin Coin uint64 `json:"coin,omitempty,string"` // value Value string `json:"value,omitempty"` }
AccountBalance account balance
swagger:model AccountBalance
func (*AccountBalance) MarshalBinary ¶
func (m *AccountBalance) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*AccountBalance) UnmarshalBinary ¶
func (m *AccountBalance) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type AccountMultisigData ¶
type AccountMultisigData struct { // addresses Addresses []string `json:"addresses"` // threshold Threshold uint64 `json:"threshold,omitempty,string"` // weights Weights []uint64 `json:"weights"` }
AccountMultisigData account multisig data
swagger:model AccountMultisigData
func (*AccountMultisigData) MarshalBinary ¶
func (m *AccountMultisigData) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*AccountMultisigData) UnmarshalBinary ¶
func (m *AccountMultisigData) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type AddressBalance ¶
type AddressBalance struct { // bip value BipValue string `json:"bip_value,omitempty"` // coin Coin *Coin `json:"coin,omitempty"` // value Value string `json:"value,omitempty"` }
AddressBalance address balance
swagger:model AddressBalance
func (*AddressBalance) MarshalBinary ¶
func (m *AddressBalance) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*AddressBalance) UnmarshalBinary ¶
func (m *AddressBalance) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type AddressDelegatedBalance ¶
type AddressDelegatedBalance struct { // bip value BipValue string `json:"bip_value,omitempty"` // coin Coin *Coin `json:"coin,omitempty"` // delegate bip value DelegateBipValue string `json:"delegate_bip_value,omitempty"` // value Value string `json:"value,omitempty"` }
AddressDelegatedBalance address delegated balance
swagger:model AddressDelegatedBalance
func (*AddressDelegatedBalance) MarshalBinary ¶
func (m *AddressDelegatedBalance) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*AddressDelegatedBalance) UnmarshalBinary ¶
func (m *AddressDelegatedBalance) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type AddressResponse ¶
type AddressResponse struct { // balance Balance []*AddressBalance `json:"balance"` // bip value BipValue string `json:"bip_value,omitempty"` // delegated Delegated []*AddressDelegatedBalance `json:"delegated"` // total Total []*AddressBalance `json:"total"` // transaction count TransactionCount uint64 `json:"transaction_count,omitempty,string"` }
AddressResponse address response
swagger:model AddressResponse
func (*AddressResponse) MarshalBinary ¶
func (m *AddressResponse) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*AddressResponse) UnmarshalBinary ¶
func (m *AddressResponse) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type AddressesResponse ¶
type AddressesResponse struct { // addresses Addresses map[string]AddressesResponseResult `json:"addresses,omitempty"` }
AddressesResponse addresses response
swagger:model AddressesResponse
func (*AddressesResponse) MarshalBinary ¶
func (m *AddressesResponse) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*AddressesResponse) UnmarshalBinary ¶
func (m *AddressesResponse) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type AddressesResponseResult ¶
type AddressesResponseResult struct { // balance Balance []*AddressBalance `json:"balance"` // bip value BipValue string `json:"bip_value,omitempty"` // Filled in when requesting delegator steaks Delegated []*AddressDelegatedBalance `json:"delegated"` // Sum of balance and delegated by coins. Total []*AddressBalance `json:"total"` // transaction count TransactionCount uint64 `json:"transaction_count,omitempty,string"` }
AddressesResponseResult addresses response result
swagger:model AddressesResponseResult
func (*AddressesResponseResult) MarshalBinary ¶
func (m *AddressesResponseResult) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*AddressesResponseResult) UnmarshalBinary ¶
func (m *AddressesResponseResult) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type AppStateAccount ¶
type AppStateAccount struct { // address Address string `json:"address,omitempty"` // balance Balance []*AccountBalance `json:"balance"` // multisig data MultisigData *AccountMultisigData `json:"multisig_data,omitempty"` // nonce Nonce uint64 `json:"nonce,omitempty,string"` }
AppStateAccount app state account
swagger:model AppStateAccount
func (*AppStateAccount) MarshalBinary ¶
func (m *AppStateAccount) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*AppStateAccount) UnmarshalBinary ¶
func (m *AppStateAccount) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type AppStateCandidate ¶
type AppStateCandidate struct { // commission Commission uint64 `json:"commission,omitempty,string"` // control address ControlAddress string `json:"control_address,omitempty"` // id ID uint64 `json:"id,omitempty,string"` // owner address OwnerAddress string `json:"owner_address,omitempty"` // public key PublicKey string `json:"public_key,omitempty"` // reward address RewardAddress string `json:"reward_address,omitempty"` // stakes Stakes []*AppStateCandidateStake `json:"stakes"` // status Status int64 `json:"status,omitempty,string"` // total bip stake TotalBipStake string `json:"total_bip_stake,omitempty"` // updates Updates []*AppStateCandidateStake `json:"updates"` }
AppStateCandidate app state candidate
swagger:model AppStateCandidate
func (*AppStateCandidate) MarshalBinary ¶
func (m *AppStateCandidate) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*AppStateCandidate) UnmarshalBinary ¶
func (m *AppStateCandidate) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type AppStateCandidateStake ¶
type AppStateCandidateStake struct { // bip value BipValue string `json:"bip_value,omitempty"` // coin Coin uint64 `json:"coin,omitempty,string"` // owner Owner string `json:"owner,omitempty"` // value Value string `json:"value,omitempty"` }
AppStateCandidateStake app state candidate stake
swagger:model AppStateCandidateStake
func (*AppStateCandidateStake) MarshalBinary ¶
func (m *AppStateCandidateStake) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*AppStateCandidateStake) UnmarshalBinary ¶
func (m *AppStateCandidateStake) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type AppStateFrozenFund ¶
type AppStateFrozenFund struct { // address Address string `json:"address,omitempty"` // candidate id CandidateID uint64 `json:"candidate_id,omitempty,string"` // candidate key CandidateKey string `json:"candidate_key,omitempty"` // coin Coin uint64 `json:"coin,omitempty,string"` // height Height uint64 `json:"height,omitempty,string"` // value Value string `json:"value,omitempty"` }
AppStateFrozenFund app state frozen fund
swagger:model AppStateFrozenFund
func (*AppStateFrozenFund) MarshalBinary ¶
func (m *AppStateFrozenFund) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*AppStateFrozenFund) UnmarshalBinary ¶
func (m *AppStateFrozenFund) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type AppStateHaltBlock ¶
type AppStateHaltBlock struct { // candidate key CandidateKey string `json:"candidate_key,omitempty"` // height Height uint64 `json:"height,omitempty,string"` }
AppStateHaltBlock app state halt block
swagger:model AppStateHaltBlock
func (*AppStateHaltBlock) MarshalBinary ¶
func (m *AppStateHaltBlock) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*AppStateHaltBlock) UnmarshalBinary ¶
func (m *AppStateHaltBlock) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type AppStateValidators ¶
type AppStateValidators struct { // absent times AbsentTimes string `json:"absent_times,omitempty"` // accum reward AccumReward string `json:"accum_reward,omitempty"` // public key PublicKey string `json:"public_key,omitempty"` // total bip stake TotalBipStake string `json:"total_bip_stake,omitempty"` }
AppStateValidators app state validators
swagger:model AppStateValidators
func (*AppStateValidators) MarshalBinary ¶
func (m *AppStateValidators) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*AppStateValidators) UnmarshalBinary ¶
func (m *AppStateValidators) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type AppStateWaitlist ¶
type AppStateWaitlist struct { // candidate id CandidateID uint64 `json:"candidate_id,omitempty,string"` // coin Coin uint64 `json:"coin,omitempty,string"` // owner Owner string `json:"owner,omitempty"` // value Value string `json:"value,omitempty"` }
AppStateWaitlist app state waitlist
swagger:model AppStateWaitlist
func (*AppStateWaitlist) MarshalBinary ¶
func (m *AppStateWaitlist) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*AppStateWaitlist) UnmarshalBinary ¶
func (m *AppStateWaitlist) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type BlockRequestField ¶
type BlockRequestField string
BlockRequestField block request field
swagger:model BlockRequestField
const ( // BlockRequestFieldTransactions captures enum value "transactions" BlockRequestFieldTransactions BlockRequestField = "transactions" // BlockRequestFieldMissed captures enum value "missed" BlockRequestFieldMissed BlockRequestField = "missed" // BlockRequestFieldBlockReward captures enum value "block_reward" BlockRequestFieldBlockReward BlockRequestField = "block_reward" // BlockRequestFieldSize captures enum value "size" BlockRequestFieldSize BlockRequestField = "size" // BlockRequestFieldProposer captures enum value "proposer" BlockRequestFieldProposer BlockRequestField = "proposer" // BlockRequestFieldValidators captures enum value "validators" BlockRequestFieldValidators BlockRequestField = "validators" // BlockRequestFieldEvidence captures enum value "evidence" BlockRequestFieldEvidence BlockRequestField = "evidence" )
type BlockResponse ¶
type BlockResponse struct { // block reward BlockReward string `json:"block_reward,omitempty"` // evidence Evidence *BlockResponseEvidence `json:"evidence,omitempty"` // hash Hash string `json:"hash,omitempty"` // height Height uint64 `json:"height,omitempty,string"` // missed Missed []string `json:"missed"` // proposer Proposer string `json:"proposer,omitempty"` // size Size uint64 `json:"size,omitempty,string"` // time Time string `json:"time,omitempty"` // transaction count TransactionCount uint64 `json:"transaction_count,omitempty,string"` // transactions Transactions []*BlockResponseTransaction `json:"transactions"` // validators Validators []*BlockResponseValidator `json:"validators"` }
BlockResponse block response
swagger:model BlockResponse
func (*BlockResponse) MarshalBinary ¶
func (m *BlockResponse) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*BlockResponse) UnmarshalBinary ¶
func (m *BlockResponse) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type BlockResponseEvidence ¶
type BlockResponseEvidence struct {
// evidence
Evidence []interface{} `json:"evidence"`
}
BlockResponseEvidence block response evidence
swagger:model BlockResponseEvidence
func (*BlockResponseEvidence) MarshalBinary ¶
func (m *BlockResponseEvidence) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*BlockResponseEvidence) UnmarshalBinary ¶
func (m *BlockResponseEvidence) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type BlockResponseEvidenceEvidence ¶
type BlockResponseEvidenceEvidence struct { // address Address string `json:"address,omitempty"` // hash Hash string `json:"hash,omitempty"` // height Height uint64 `json:"height,omitempty,string"` // time Time string `json:"time,omitempty"` }
BlockResponseEvidenceEvidence block response evidence evidence
swagger:model BlockResponseEvidenceEvidence
func (*BlockResponseEvidenceEvidence) MarshalBinary ¶
func (m *BlockResponseEvidenceEvidence) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*BlockResponseEvidenceEvidence) UnmarshalBinary ¶
func (m *BlockResponseEvidenceEvidence) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type BlockResponseTransaction ¶
type BlockResponseTransaction struct { // code Code uint64 `json:"code,omitempty,string"` // data Data *ProtobufAny `json:"data,omitempty"` // from From string `json:"from,omitempty"` // gas Gas uint64 `json:"gas,omitempty,string"` // gas coin GasCoin *Coin `json:"gas_coin,omitempty"` // gas price GasPrice uint64 `json:"gas_price,omitempty,string"` // hash Hash string `json:"hash,omitempty"` // log Log string `json:"log,omitempty"` // nonce Nonce uint64 `json:"nonce,omitempty,string"` // payload // Format: byte Payload strfmt.Base64 `json:"payload,omitempty"` // raw tx RawTx string `json:"raw_tx,omitempty"` // service data // Format: byte ServiceData strfmt.Base64 `json:"service_data,omitempty"` // tags Tags map[string]string `json:"tags,omitempty"` // type Type uint64 `json:"type,omitempty,string"` }
BlockResponseTransaction block response transaction
swagger:model BlockResponseTransaction
func (*BlockResponseTransaction) AsTransactionResponse ¶
func (m *BlockResponseTransaction) AsTransactionResponse() (*TransactionResponse, error)
AsTransactionResponse returns TransactionResponse
func (*BlockResponseTransaction) MarshalBinary ¶
func (m *BlockResponseTransaction) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*BlockResponseTransaction) UnmarshalBinary ¶
func (m *BlockResponseTransaction) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type BlockResponseValidator ¶
type BlockResponseValidator struct { // public key PublicKey string `json:"public_key,omitempty"` // signed Signed bool `json:"signed,omitempty"` }
BlockResponseValidator block response validator
swagger:model BlockResponseValidator
func (*BlockResponseValidator) MarshalBinary ¶
func (m *BlockResponseValidator) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*BlockResponseValidator) UnmarshalBinary ¶
func (m *BlockResponseValidator) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type BuyCoinData ¶
type CandidateResponse ¶
type CandidateResponse struct { // commission Commission uint64 `json:"commission,omitempty,string"` // control address ControlAddress string `json:"control_address,omitempty"` // To be completed when requesting candidate steaks MinStake string `json:"min_stake,omitempty"` // owner address OwnerAddress string `json:"owner_address,omitempty"` // public key PublicKey string `json:"public_key,omitempty"` // reward address RewardAddress string `json:"reward_address,omitempty"` // To be completed when requesting candidate steaks Stakes []*CandidateResponseStake `json:"stakes"` // status Status uint64 `json:"status,omitempty,string"` // total stake TotalStake string `json:"total_stake,omitempty"` // To be completed when requesting candidate steaks UniqUsers uint64 `json:"uniq_users,omitempty,string"` // To be completed when requesting candidate steaks UsedSlots uint64 `json:"used_slots,omitempty,string"` }
CandidateResponse candidate response
swagger:model CandidateResponse
func (*CandidateResponse) MarshalBinary ¶
func (m *CandidateResponse) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*CandidateResponse) UnmarshalBinary ¶
func (m *CandidateResponse) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type CandidateResponseStake ¶
type CandidateResponseStake struct { // bip value BipValue string `json:"bip_value,omitempty"` // coin Coin *Coin `json:"coin,omitempty"` // owner Owner string `json:"owner,omitempty"` // value Value string `json:"value,omitempty"` }
CandidateResponseStake candidate response stake
swagger:model CandidateResponseStake
func (*CandidateResponseStake) MarshalBinary ¶
func (m *CandidateResponseStake) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*CandidateResponseStake) UnmarshalBinary ¶
func (m *CandidateResponseStake) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type CandidatesRequestCandidateStatus ¶
type CandidatesRequestCandidateStatus string
CandidatesRequestCandidateStatus candidates request candidate status
swagger:model CandidatesRequestCandidateStatus
const ( // CandidatesRequestCandidateStatusAll captures enum value "all" CandidatesRequestCandidateStatusAll CandidatesRequestCandidateStatus = "all" // CandidatesRequestCandidateStatusOff captures enum value "off" CandidatesRequestCandidateStatusOff CandidatesRequestCandidateStatus = "off" // CandidatesRequestCandidateStatusOn captures enum value "on" CandidatesRequestCandidateStatusOn CandidatesRequestCandidateStatus = "on" )
type CandidatesResponse ¶
type CandidatesResponse struct { // candidates Candidates []*CandidateResponse `json:"candidates"` }
CandidatesResponse candidates response
swagger:model CandidatesResponse
func (*CandidatesResponse) MarshalBinary ¶
func (m *CandidatesResponse) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*CandidatesResponse) UnmarshalBinary ¶
func (m *CandidatesResponse) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type Coin ¶
type Coin struct { // id ID uint64 `json:"id,omitempty,string"` // symbol Symbol string `json:"symbol,omitempty"` }
Coin coin
swagger:model Coin
func (*Coin) MarshalBinary ¶
MarshalBinary interface implementation
func (*Coin) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type CoinInfoResponse ¶
type CoinInfoResponse struct { // crr Crr uint64 `json:"crr,omitempty,string"` // id ID uint64 `json:"id,omitempty,string"` // max supply MaxSupply string `json:"max_supply,omitempty"` // name Name string `json:"name,omitempty"` // owner address OwnerAddress string `json:"owner_address,omitempty"` // reserve balance ReserveBalance string `json:"reserve_balance,omitempty"` // symbol Symbol string `json:"symbol,omitempty"` // volume Volume string `json:"volume,omitempty"` }
CoinInfoResponse coin info response
swagger:model CoinInfoResponse
func (*CoinInfoResponse) MarshalBinary ¶
func (m *CoinInfoResponse) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*CoinInfoResponse) UnmarshalBinary ¶
func (m *CoinInfoResponse) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type ConnectionStatusChannel ¶
type ConnectionStatusChannel struct { // id ID int64 `json:"id,omitempty,string"` // priority Priority int64 `json:"priority,omitempty,string"` // recently sent RecentlySent int64 `json:"recently_sent,omitempty,string"` // send queue capacity SendQueueCapacity int64 `json:"send_queue_capacity,omitempty,string"` // send queue size SendQueueSize int64 `json:"send_queue_size,omitempty,string"` }
ConnectionStatusChannel connection status channel
swagger:model ConnectionStatusChannel
func (*ConnectionStatusChannel) MarshalBinary ¶
func (m *ConnectionStatusChannel) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*ConnectionStatusChannel) UnmarshalBinary ¶
func (m *ConnectionStatusChannel) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type ConnectionStatusMonitor ¶
type ConnectionStatusMonitor struct { // active Active bool `json:"active,omitempty"` // avg rate AvgRate int64 `json:"avg_rate,omitempty,string"` // bytes Bytes int64 `json:"bytes,omitempty,string"` // bytes rem BytesRem int64 `json:"bytes_rem,omitempty,string"` // cur rate CurRate int64 `json:"cur_rate,omitempty,string"` // duration Duration int64 `json:"duration,omitempty,string"` // idle Idle int64 `json:"idle,omitempty,string"` // inst rate InstRate int64 `json:"inst_rate,omitempty,string"` // peak rate PeakRate int64 `json:"peak_rate,omitempty,string"` // progress Progress uint64 `json:"progress,omitempty,string"` // samples Samples int64 `json:"samples,omitempty,string"` // start Start string `json:"start,omitempty"` // time rem TimeRem int64 `json:"time_rem,omitempty,string"` }
ConnectionStatusMonitor connection status monitor
swagger:model ConnectionStatusMonitor
func (*ConnectionStatusMonitor) MarshalBinary ¶
func (m *ConnectionStatusMonitor) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*ConnectionStatusMonitor) UnmarshalBinary ¶
func (m *ConnectionStatusMonitor) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type ConsensusParamsBlock ¶
type ConsensusParamsBlock struct { // max bytes MaxBytes int64 `json:"max_bytes,omitempty,string"` // max gas MaxGas int64 `json:"max_gas,omitempty,string"` // time iota ms TimeIotaMs int64 `json:"time_iota_ms,omitempty,string"` }
ConsensusParamsBlock consensus params block
swagger:model ConsensusParamsBlock
func (*ConsensusParamsBlock) MarshalBinary ¶
func (m *ConsensusParamsBlock) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*ConsensusParamsBlock) UnmarshalBinary ¶
func (m *ConsensusParamsBlock) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type CreateCoinData ¶
type CreateCoinData struct { Name string `json:"name,omitempty"` Symbol string `json:"symbol,omitempty"` InitialAmount string `json:"initial_amount,omitempty"` InitialReserve string `json:"initial_reserve,omitempty"` ConstantReserveRatio uint64 `json:"constant_reserve_ratio,string,omitempty"` MaxSupply string `json:"max_supply,omitempty"` }
type CreateMultisigData ¶
type CreateMultisigData struct { Threshold uint64 `json:"threshold,string,omitempty"` Weights []uint64 `json:"weights,omitempty"` Addresses []string `json:"addresses,omitempty"` }
func (*CreateMultisigData) MarshalJSON ¶
func (d *CreateMultisigData) MarshalJSON() ([]byte, error)
func (*CreateMultisigData) UnmarshalJSON ¶
func (d *CreateMultisigData) UnmarshalJSON(data []byte) error
type Data ¶
type Data interface {
// contains filtered or unexported methods
}
func ConvertToData ¶
func ConvertToData(t uint64, value *ProtobufAny) (Data, error)
ConvertToData returns Transaction Data model
Example ¶
package main import ( "encoding/json" "fmt" "github.com/MinterTeam/minter-go-sdk/v2/api/http_client/models" ) func main() { transactionResponse := models.TransactionResponse{ Type: 18, Data: &models.ProtobufAny{ "threshold": "5", "weights": []string{"1", "2", "3"}, "addresses": []string{"Mx0", "Mx1", "Mx2"}, }, } data, _ := models.ConvertToData(transactionResponse.Type, transactionResponse.Data) editMultisigData := data.(*models.EditMultisigData) fmt.Printf("%T %[1]v\n", editMultisigData.Threshold) fmt.Printf("%T %[1]v\n", editMultisigData.Weights) fmt.Printf("%T %[1]v\n", editMultisigData.Addresses) marshal, _ := json.Marshal(editMultisigData) fmt.Printf("%s", marshal) }
Output: uint64 5 []uint64 [1 2 3] []string [Mx0 Mx1 Mx2] {"weights":["1","2","3"],"threshold":"5","addresses":["Mx0","Mx1","Mx2"]}
type DeclareCandidacyData ¶
type DelegateData ¶
type EditCandidateData ¶
type EditCoinOwnerData ¶
type EditMultisigData ¶
type EditMultisigData CreateMultisigData
func (*EditMultisigData) MarshalJSON ¶
func (d *EditMultisigData) MarshalJSON() ([]byte, error)
func (*EditMultisigData) UnmarshalJSON ¶
func (d *EditMultisigData) UnmarshalJSON(data []byte) error
type ErrorBody ¶
type ErrorBody struct { // error Error *ErrorBodyError `json:"error,omitempty"` }
ErrorBody error body
swagger:model ErrorBody
func (*ErrorBody) MarshalBinary ¶
MarshalBinary interface implementation
func (*ErrorBody) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type ErrorBodyError ¶
type ErrorBodyError struct { // code Code string `json:"code,omitempty"` // data Data map[string]string `json:"data,omitempty"` // message Message string `json:"message,omitempty"` }
ErrorBodyError error body error
swagger:model ErrorBodyError
func (*ErrorBodyError) MarshalBinary ¶
func (m *ErrorBodyError) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*ErrorBodyError) UnmarshalBinary ¶
func (m *ErrorBodyError) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type EstimateCoinBuyResponse ¶
type EstimateCoinBuyResponse struct { // commission Commission string `json:"commission,omitempty"` // will pay WillPay string `json:"will_pay,omitempty"` }
EstimateCoinBuyResponse estimate coin buy response
swagger:model EstimateCoinBuyResponse
func (*EstimateCoinBuyResponse) MarshalBinary ¶
func (m *EstimateCoinBuyResponse) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*EstimateCoinBuyResponse) UnmarshalBinary ¶
func (m *EstimateCoinBuyResponse) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type EstimateCoinSellAllResponse ¶
type EstimateCoinSellAllResponse struct { // will get WillGet string `json:"will_get,omitempty"` }
EstimateCoinSellAllResponse estimate coin sell all response
swagger:model EstimateCoinSellAllResponse
func (*EstimateCoinSellAllResponse) MarshalBinary ¶
func (m *EstimateCoinSellAllResponse) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*EstimateCoinSellAllResponse) UnmarshalBinary ¶
func (m *EstimateCoinSellAllResponse) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type EstimateCoinSellResponse ¶
type EstimateCoinSellResponse struct { // commission Commission string `json:"commission,omitempty"` // will get WillGet string `json:"will_get,omitempty"` }
EstimateCoinSellResponse estimate coin sell response
swagger:model EstimateCoinSellResponse
func (*EstimateCoinSellResponse) MarshalBinary ¶
func (m *EstimateCoinSellResponse) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*EstimateCoinSellResponse) UnmarshalBinary ¶
func (m *EstimateCoinSellResponse) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type EstimateTxCommissionResponse ¶
type EstimateTxCommissionResponse struct { // commission Commission string `json:"commission,omitempty"` }
EstimateTxCommissionResponse estimate tx commission response
swagger:model EstimateTxCommissionResponse
func (*EstimateTxCommissionResponse) MarshalBinary ¶
func (m *EstimateTxCommissionResponse) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*EstimateTxCommissionResponse) UnmarshalBinary ¶
func (m *EstimateTxCommissionResponse) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type EventItem ¶
EventItem is the structure of the EventsResponse view of list items
func NewEventItem ¶
NewEventItem returns an EventItem from the EventsResponse list item
type EventsResponse ¶
type EventsResponse struct {
// events
Events []interface{} `json:"events"`
}
EventsResponse events response
swagger:model EventsResponse
func (*EventsResponse) MarshalBinary ¶
func (m *EventsResponse) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*EventsResponse) UnmarshalBinary ¶
func (m *EventsResponse) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type FrozenResponse ¶
type FrozenResponse struct { // frozen Frozen []*FrozenResponseFrozen `json:"frozen"` }
FrozenResponse frozen response
swagger:model FrozenResponse
func (*FrozenResponse) MarshalBinary ¶
func (m *FrozenResponse) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*FrozenResponse) UnmarshalBinary ¶
func (m *FrozenResponse) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type FrozenResponseFrozen ¶
type FrozenResponseFrozen struct { // address Address string `json:"address,omitempty"` // candidate key CandidateKey string `json:"candidate_key,omitempty"` // coin Coin *Coin `json:"coin,omitempty"` // height Height uint64 `json:"height,omitempty,string"` // value Value string `json:"value,omitempty"` }
FrozenResponseFrozen frozen response frozen
swagger:model FrozenResponseFrozen
func (*FrozenResponseFrozen) MarshalBinary ¶
func (m *FrozenResponseFrozen) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*FrozenResponseFrozen) UnmarshalBinary ¶
func (m *FrozenResponseFrozen) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type GatewayruntimeError ¶
type GatewayruntimeError struct { // code Code int32 `json:"code,omitempty"` // details Details []*ProtobufAny `json:"details"` // error Error string `json:"error,omitempty"` // message Message string `json:"message,omitempty"` }
GatewayruntimeError gatewayruntime error
swagger:model gatewayruntimeError
func (*GatewayruntimeError) MarshalBinary ¶
func (m *GatewayruntimeError) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*GatewayruntimeError) UnmarshalBinary ¶
func (m *GatewayruntimeError) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type GenesisResponse ¶
type GenesisResponse struct { // app hash AppHash string `json:"app_hash,omitempty"` // app state AppState *GenesisResponseAppState `json:"app_state,omitempty"` // chain id ChainID string `json:"chain_id,omitempty"` // consensus params ConsensusParams *GenesisResponseConsensusParams `json:"consensus_params,omitempty"` // genesis time GenesisTime string `json:"genesis_time,omitempty"` }
GenesisResponse genesis response
swagger:model GenesisResponse
func (*GenesisResponse) MarshalBinary ¶
func (m *GenesisResponse) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*GenesisResponse) UnmarshalBinary ¶
func (m *GenesisResponse) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type GenesisResponseAppState ¶
type GenesisResponseAppState struct { // accounts Accounts []*AppStateAccount `json:"accounts"` // candidates Candidates []*AppStateCandidate `json:"candidates"` // coins Coins []*GenesisResponseAppStateCoin `json:"coins"` // frozen funds FrozenFunds []*AppStateFrozenFund `json:"frozen_funds"` // halt blocks HaltBlocks []*AppStateHaltBlock `json:"halt_blocks"` // max gas MaxGas uint64 `json:"max_gas,omitempty,string"` // note Note string `json:"note,omitempty"` // start height StartHeight uint64 `json:"start_height,omitempty,string"` // total slashed TotalSlashed string `json:"total_slashed,omitempty"` // used checks UsedChecks []string `json:"used_checks"` // validators Validators []*AppStateValidators `json:"validators"` // waitlist Waitlist []*AppStateWaitlist `json:"waitlist"` }
GenesisResponseAppState genesis response app state
swagger:model GenesisResponseAppState
func (*GenesisResponseAppState) MarshalBinary ¶
func (m *GenesisResponseAppState) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*GenesisResponseAppState) UnmarshalBinary ¶
func (m *GenesisResponseAppState) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type GenesisResponseAppStateCoin ¶
type GenesisResponseAppStateCoin struct { // crr Crr uint64 `json:"crr,omitempty,string"` // id ID uint64 `json:"id,omitempty,string"` // max supply MaxSupply string `json:"max_supply,omitempty"` // name Name string `json:"name,omitempty"` // owner address OwnerAddress string `json:"owner_address,omitempty"` // reserve Reserve string `json:"reserve,omitempty"` // symbol Symbol string `json:"symbol,omitempty"` // version Version uint64 `json:"version,omitempty,string"` // volume Volume string `json:"volume,omitempty"` }
GenesisResponseAppStateCoin genesis response app state coin
swagger:model GenesisResponseAppStateCoin
func (*GenesisResponseAppStateCoin) MarshalBinary ¶
func (m *GenesisResponseAppStateCoin) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*GenesisResponseAppStateCoin) UnmarshalBinary ¶
func (m *GenesisResponseAppStateCoin) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type GenesisResponseConsensusParams ¶
type GenesisResponseConsensusParams struct { // block Block *ConsensusParamsBlock `json:"block,omitempty"` // evidence Evidence *GenesisResponseConsensusParamsEvidence `json:"evidence,omitempty"` // validator Validator *GenesisResponseConsensusParamsValidator `json:"validator,omitempty"` }
GenesisResponseConsensusParams genesis response consensus params
swagger:model GenesisResponseConsensusParams
func (*GenesisResponseConsensusParams) MarshalBinary ¶
func (m *GenesisResponseConsensusParams) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*GenesisResponseConsensusParams) UnmarshalBinary ¶
func (m *GenesisResponseConsensusParams) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type GenesisResponseConsensusParamsEvidence ¶
type GenesisResponseConsensusParamsEvidence struct { // max age duration MaxAgeDuration int64 `json:"max_age_duration,omitempty,string"` // max age num blocks MaxAgeNumBlocks int64 `json:"max_age_num_blocks,omitempty,string"` }
GenesisResponseConsensusParamsEvidence genesis response consensus params evidence
swagger:model GenesisResponseConsensusParamsEvidence
func (*GenesisResponseConsensusParamsEvidence) MarshalBinary ¶
func (m *GenesisResponseConsensusParamsEvidence) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*GenesisResponseConsensusParamsEvidence) UnmarshalBinary ¶
func (m *GenesisResponseConsensusParamsEvidence) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type GenesisResponseConsensusParamsValidator ¶
type GenesisResponseConsensusParamsValidator struct { // pub key types PubKeyTypes []string `json:"pub_key_types"` }
GenesisResponseConsensusParamsValidator genesis response consensus params validator
swagger:model GenesisResponseConsensusParamsValidator
func (*GenesisResponseConsensusParamsValidator) MarshalBinary ¶
func (m *GenesisResponseConsensusParamsValidator) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*GenesisResponseConsensusParamsValidator) UnmarshalBinary ¶
func (m *GenesisResponseConsensusParamsValidator) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type HaltsResponse ¶
type HaltsResponse struct { // public keys PublicKeys []string `json:"public_keys"` }
HaltsResponse halts response
swagger:model HaltsResponse
func (*HaltsResponse) MarshalBinary ¶
func (m *HaltsResponse) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*HaltsResponse) UnmarshalBinary ¶
func (m *HaltsResponse) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type MaxGasPriceResponse ¶
type MaxGasPriceResponse struct { // max gas price MaxGasPrice uint64 `json:"max_gas_price,omitempty,string"` }
MaxGasPriceResponse max gas price response
swagger:model MaxGasPriceResponse
func (*MaxGasPriceResponse) MarshalBinary ¶
func (m *MaxGasPriceResponse) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*MaxGasPriceResponse) UnmarshalBinary ¶
func (m *MaxGasPriceResponse) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type MinGasPriceResponse ¶
type MinGasPriceResponse struct { // min gas price MinGasPrice uint64 `json:"min_gas_price,omitempty,string"` }
MinGasPriceResponse min gas price response
swagger:model MinGasPriceResponse
func (*MinGasPriceResponse) MarshalBinary ¶
func (m *MinGasPriceResponse) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*MinGasPriceResponse) UnmarshalBinary ¶
func (m *MinGasPriceResponse) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type MissedBlocksResponse ¶
type MissedBlocksResponse struct { // missed blocks MissedBlocks string `json:"missed_blocks,omitempty"` // missed blocks count MissedBlocksCount int64 `json:"missed_blocks_count,omitempty,string"` }
MissedBlocksResponse missed blocks response
swagger:model MissedBlocksResponse
func (*MissedBlocksResponse) MarshalBinary ¶
func (m *MissedBlocksResponse) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*MissedBlocksResponse) UnmarshalBinary ¶
func (m *MissedBlocksResponse) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type MultiSendData ¶
type MultiSendData struct {
List []*SendData `json:"list,omitempty"`
}
type NetInfoResponse ¶
type NetInfoResponse struct { // count peers CountPeers int64 `json:"count_peers,omitempty,string"` // listeners Listeners []string `json:"listeners"` // listening Listening bool `json:"listening,omitempty"` // peers Peers []*NetInfoResponsePeer `json:"peers"` }
NetInfoResponse net info response
swagger:model NetInfoResponse
func (*NetInfoResponse) MarshalBinary ¶
func (m *NetInfoResponse) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*NetInfoResponse) UnmarshalBinary ¶
func (m *NetInfoResponse) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type NetInfoResponsePeer ¶
type NetInfoResponsePeer struct { // connection status ConnectionStatus *PeerConnectionStatus `json:"connection_status,omitempty"` // is outbound IsOutbound bool `json:"is_outbound,omitempty"` // Unknown while client is in fast_syncing mode LatestBlockHeight uint64 `json:"latest_block_height,omitempty"` // node info NodeInfo *NodeInfo `json:"node_info,omitempty"` // remote ip RemoteIP string `json:"remote_ip,omitempty"` }
NetInfoResponsePeer net info response peer
swagger:model NetInfoResponsePeer
func (*NetInfoResponsePeer) MarshalBinary ¶
func (m *NetInfoResponsePeer) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*NetInfoResponsePeer) UnmarshalBinary ¶
func (m *NetInfoResponsePeer) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type NodeInfo ¶
type NodeInfo struct { // channels Channels string `json:"channels,omitempty"` // id ID string `json:"id,omitempty"` // listen addr ListenAddr string `json:"listen_addr,omitempty"` // moniker Moniker string `json:"moniker,omitempty"` // network Network string `json:"network,omitempty"` // other Other *NodeInfoOther `json:"other,omitempty"` // protocol version ProtocolVersion *NodeInfoProtocolVersion `json:"protocol_version,omitempty"` // version Version string `json:"version,omitempty"` }
NodeInfo node info
swagger:model NodeInfo
func (*NodeInfo) MarshalBinary ¶
MarshalBinary interface implementation
func (*NodeInfo) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type NodeInfoOther ¶
type NodeInfoOther struct { // rpc address RPCAddress string `json:"rpc_address,omitempty"` // tx index TxIndex string `json:"tx_index,omitempty"` }
NodeInfoOther node info other
swagger:model NodeInfoOther
func (*NodeInfoOther) MarshalBinary ¶
func (m *NodeInfoOther) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*NodeInfoOther) UnmarshalBinary ¶
func (m *NodeInfoOther) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type NodeInfoProtocolVersion ¶
type NodeInfoProtocolVersion struct { // app App uint64 `json:"app,omitempty,string"` // block Block uint64 `json:"block,omitempty,string"` // p2p P2p uint64 `json:"p2p,omitempty,string"` }
NodeInfoProtocolVersion node info protocol version
swagger:model NodeInfoProtocolVersion
func (*NodeInfoProtocolVersion) MarshalBinary ¶
func (m *NodeInfoProtocolVersion) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*NodeInfoProtocolVersion) UnmarshalBinary ¶
func (m *NodeInfoProtocolVersion) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type PeerConnectionStatus ¶
type PeerConnectionStatus struct { // recv monitor RecvMonitor *ConnectionStatusMonitor `json:"RecvMonitor,omitempty"` // send monitor SendMonitor *ConnectionStatusMonitor `json:"SendMonitor,omitempty"` // channels Channels []*ConnectionStatusChannel `json:"channels"` // duration Duration uint64 `json:"duration,omitempty,string"` }
PeerConnectionStatus peer connection status
swagger:model PeerConnectionStatus
func (*PeerConnectionStatus) MarshalBinary ¶
func (m *PeerConnectionStatus) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*PeerConnectionStatus) UnmarshalBinary ¶
func (m *PeerConnectionStatus) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type PriceVoteData ¶
type PriceVoteData struct {
Price string `json:"price,omitempty"`
}
type ProtobufAny ¶
type ProtobufAny map[string]interface{}
swagger:model protobufAny
func (*ProtobufAny) MarshalBinary ¶
func (m *ProtobufAny) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*ProtobufAny) UnmarshalBinary ¶
func (m *ProtobufAny) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
func (*ProtobufAny) UnmarshalTo ¶
func (m *ProtobufAny) UnmarshalTo(i interface{}) error
type RecreateCoinData ¶
type RecreateCoinData struct { Name string `json:"name,omitempty"` Symbol string `json:"symbol,omitempty"` InitialAmount string `json:"initial_amount,omitempty"` InitialReserve string `json:"initial_reserve,omitempty"` ConstantReserveRatio uint64 `json:"constant_reserve_ratio,string,omitempty"` MaxSupply string `json:"max_supply,omitempty"` }
type RedeemCheckData ¶
type RuntimeStreamError ¶
type RuntimeStreamError struct { // details Details []*ProtobufAny `json:"details"` // grpc code GrpcCode int32 `json:"grpc_code,omitempty"` // http code HTTPCode int32 `json:"http_code,omitempty"` // http status HTTPStatus string `json:"http_status,omitempty"` // message Message string `json:"message,omitempty"` }
RuntimeStreamError runtime stream error
swagger:model runtimeStreamError
func (*RuntimeStreamError) MarshalBinary ¶
func (m *RuntimeStreamError) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*RuntimeStreamError) UnmarshalBinary ¶
func (m *RuntimeStreamError) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type SellAllCoinData ¶
type SellCoinData ¶
type SendTransactionRequest ¶
type SendTransactionRequest struct { // tx Tx string `json:"tx,omitempty"` }
SendTransactionRequest send transaction request
swagger:model SendTransactionRequest
func (*SendTransactionRequest) MarshalBinary ¶
func (m *SendTransactionRequest) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*SendTransactionRequest) UnmarshalBinary ¶
func (m *SendTransactionRequest) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type SendTransactionResponse ¶
type SendTransactionResponse struct { // code Code uint64 `json:"code,omitempty,string"` // hash Hash string `json:"hash,omitempty"` // log Log string `json:"log,omitempty"` }
SendTransactionResponse send transaction response
swagger:model SendTransactionResponse
func (*SendTransactionResponse) MarshalBinary ¶
func (m *SendTransactionResponse) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*SendTransactionResponse) UnmarshalBinary ¶
func (m *SendTransactionResponse) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type SetCandidateOffData ¶
type SetCandidateOffData struct {
PubKey string `json:"pub_key,omitempty"`
}
type SetCandidateOnData ¶
type SetCandidateOnData struct {
PubKey string `json:"pub_key,omitempty"`
}
type SetHaltBlockData ¶
type StatusResponse ¶
type StatusResponse struct { // catching up CatchingUp bool `json:"catching_up,omitempty"` // keep last states KeepLastStates uint64 `json:"keep_last_states,omitempty,string"` // latest app hash LatestAppHash string `json:"latest_app_hash,omitempty"` // latest block hash LatestBlockHash string `json:"latest_block_hash,omitempty"` // latest block height LatestBlockHeight uint64 `json:"latest_block_height,omitempty,string"` // latest block time LatestBlockTime string `json:"latest_block_time,omitempty"` // network Network string `json:"network,omitempty"` // node id NodeID string `json:"node_id,omitempty"` // public key PublicKey string `json:"public_key,omitempty"` // total slashed TotalSlashed string `json:"total_slashed,omitempty"` // version Version string `json:"version,omitempty"` }
StatusResponse status response
swagger:model StatusResponse
func (*StatusResponse) MarshalBinary ¶
func (m *StatusResponse) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*StatusResponse) UnmarshalBinary ¶
func (m *StatusResponse) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type SubscribeResponse ¶
type SubscribeResponse struct { // data Data interface{} `json:"data,omitempty"` // events Events []*SubscribeResponseEvent `json:"events"` // query Query string `json:"query,omitempty"` }
SubscribeResponse subscribe response
swagger:model SubscribeResponse
func (*SubscribeResponse) MarshalBinary ¶
func (m *SubscribeResponse) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*SubscribeResponse) UnmarshalBinary ¶
func (m *SubscribeResponse) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type SubscribeResponseEvent ¶
type SubscribeResponseEvent struct { // events Events []string `json:"events"` // key Key string `json:"key,omitempty"` }
SubscribeResponseEvent subscribe response event
swagger:model SubscribeResponseEvent
func (*SubscribeResponseEvent) MarshalBinary ¶
func (m *SubscribeResponseEvent) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*SubscribeResponseEvent) UnmarshalBinary ¶
func (m *SubscribeResponseEvent) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type TransactionResponse ¶
type TransactionResponse struct { // code Code uint64 `json:"code,omitempty,string"` // data Data *ProtobufAny `json:"data,omitempty"` // from From string `json:"from,omitempty"` // gas Gas uint64 `json:"gas,omitempty,string"` // gas coin GasCoin *Coin `json:"gas_coin,omitempty"` // gas price GasPrice uint64 `json:"gas_price,omitempty,string"` // hash Hash string `json:"hash,omitempty"` // height Height uint64 `json:"height,omitempty,string"` // index Index uint64 `json:"index,omitempty,string"` // log Log string `json:"log,omitempty"` // nonce Nonce uint64 `json:"nonce,omitempty,string"` // payload // Format: byte Payload strfmt.Base64 `json:"payload,omitempty"` // raw tx RawTx string `json:"raw_tx,omitempty"` // tags Tags map[string]string `json:"tags,omitempty"` // type Type uint64 `json:"type,omitempty,string"` }
TransactionResponse transaction response
swagger:model TransactionResponse
func (*TransactionResponse) MarshalBinary ¶
func (m *TransactionResponse) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*TransactionResponse) UnmarshalBinary ¶
func (m *TransactionResponse) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type TransactionsResponse ¶
type TransactionsResponse struct { // transactions Transactions []*TransactionResponse `json:"transactions"` }
TransactionsResponse transactions response
swagger:model TransactionsResponse
func (*TransactionsResponse) MarshalBinary ¶
func (m *TransactionsResponse) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*TransactionsResponse) UnmarshalBinary ¶
func (m *TransactionsResponse) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type UnbondData ¶
type UnconfirmedTxsResponse ¶
type UnconfirmedTxsResponse struct { // total bytes TotalBytes uint64 `json:"total_bytes,omitempty,string"` // total transactions TotalTransactions uint64 `json:"total_transactions,omitempty,string"` // transaction count TransactionCount uint64 `json:"transaction_count,omitempty,string"` // transactions Transactions []string `json:"transactions"` }
UnconfirmedTxsResponse unconfirmed txs response
swagger:model UnconfirmedTxsResponse
func (*UnconfirmedTxsResponse) MarshalBinary ¶
func (m *UnconfirmedTxsResponse) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*UnconfirmedTxsResponse) UnmarshalBinary ¶
func (m *UnconfirmedTxsResponse) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type ValidatorsResponse ¶
type ValidatorsResponse struct { // validators Validators []*ValidatorsResponseResult `json:"validators"` }
ValidatorsResponse validators response
swagger:model ValidatorsResponse
func (*ValidatorsResponse) MarshalBinary ¶
func (m *ValidatorsResponse) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*ValidatorsResponse) UnmarshalBinary ¶
func (m *ValidatorsResponse) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type ValidatorsResponseResult ¶
type ValidatorsResponseResult struct { // public key PublicKey string `json:"public_key,omitempty"` // voting power VotingPower uint64 `json:"voting_power,omitempty,string"` }
ValidatorsResponseResult validators response result
swagger:model ValidatorsResponseResult
func (*ValidatorsResponseResult) MarshalBinary ¶
func (m *ValidatorsResponseResult) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*ValidatorsResponseResult) UnmarshalBinary ¶
func (m *ValidatorsResponseResult) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type WaitListResponse ¶
type WaitListResponse struct { // list List []*WaitListResponseWait `json:"list"` }
WaitListResponse wait list response
swagger:model WaitListResponse
func (*WaitListResponse) MarshalBinary ¶
func (m *WaitListResponse) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*WaitListResponse) UnmarshalBinary ¶
func (m *WaitListResponse) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type WaitListResponseWait ¶
type WaitListResponseWait struct { // coin Coin *Coin `json:"coin,omitempty"` // public key PublicKey string `json:"public_key,omitempty"` // value Value string `json:"value,omitempty"` }
WaitListResponseWait wait list response wait
swagger:model WaitListResponseWait
func (*WaitListResponseWait) MarshalBinary ¶
func (m *WaitListResponseWait) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*WaitListResponseWait) UnmarshalBinary ¶
func (m *WaitListResponseWait) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
Source Files ¶
- account_balance.go
- account_multisig_data.go
- address_balance.go
- address_delegated_balance.go
- address_response.go
- addresses_response.go
- addresses_response_result.go
- app_state_account.go
- app_state_candidate.go
- app_state_candidate_stake.go
- app_state_frozen_fund.go
- app_state_halt_block.go
- app_state_validators.go
- app_state_waitlist.go
- block_request_field.go
- block_response.go
- block_response_evidence.go
- block_response_evidence_evidence.go
- block_response_transaction.go
- block_response_transaction_helper.go
- block_response_validator.go
- candidate_response.go
- candidate_response_stake.go
- candidates_request_candidate_status.go
- candidates_response.go
- coin.go
- coin_info_response.go
- connection_status_channel.go
- connection_status_monitor.go
- consensus_params_block.go
- error_body.go
- error_body_error.go
- estimate_coin_buy_response.go
- estimate_coin_sell_all_response.go
- estimate_coin_sell_response.go
- estimate_tx_commission_response.go
- events_response.go
- events_response_event_helper.go
- frozen_response.go
- frozen_response_frozen.go
- gatewayruntime_error.go
- genesis_response.go
- genesis_response_app_state.go
- genesis_response_app_state_coin.go
- genesis_response_consensus_params.go
- genesis_response_consensus_params_evidence.go
- genesis_response_consensus_params_validator.go
- halts_response.go
- max_gas_price_response.go
- min_gas_price_response.go
- missed_blocks_response.go
- net_info_response.go
- net_info_response_peer.go
- node_info.go
- node_info_other.go
- node_info_protocol_version.go
- peer_connection_status.go
- protobuf_any_edited.go
- runtime_stream_error.go
- send_transaction_request.go
- send_transaction_response.go
- status_response.go
- subscribe_response.go
- subscribe_response_event.go
- transaction_response.go
- transaction_response_data.go
- transactions_response.go
- unconfirmed_txs_response.go
- validators_response.go
- validators_response_result.go
- wait_list_response.go
- wait_list_response_wait.go