models

package
v2.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2020 License: MIT Imports: 8 Imported by: 4

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertStructToEvent

func ConvertStructToEvent(data interface{}) (api.Event, error)

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

func (*AccountBalance) Validate

func (m *AccountBalance) Validate(formats strfmt.Registry) error

Validate validates this account balance

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

func (*AccountMultisigData) Validate

func (m *AccountMultisigData) Validate(formats strfmt.Registry) error

Validate validates this account multisig data

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

func (*AddressBalance) Validate

func (m *AddressBalance) Validate(formats strfmt.Registry) error

Validate validates this address balance

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

func (*AddressDelegatedBalance) Validate

func (m *AddressDelegatedBalance) Validate(formats strfmt.Registry) error

Validate validates this address delegated balance

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

func (*AddressResponse) Validate

func (m *AddressResponse) Validate(formats strfmt.Registry) error

Validate validates this address response

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

func (*AddressesResponse) Validate

func (m *AddressesResponse) Validate(formats strfmt.Registry) error

Validate validates this addresses response

type AddressesResponseResult

type AddressesResponseResult struct {

	// balance
	Balance []*AddressBalance `json:"balance"`

	// bip value
	BipValue string `json:"bip_value,omitempty"`

	// Filled in when request delegated
	Delegated []*AddressDelegatedBalance `json:"delegated"`

	// Sum of balance and delegated by coins. Filled in when request delegated
	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

func (*AddressesResponseResult) Validate

func (m *AddressesResponseResult) Validate(formats strfmt.Registry) error

Validate validates this addresses response result

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

func (*AppStateAccount) Validate

func (m *AppStateAccount) Validate(formats strfmt.Registry) error

Validate validates this app state account

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

func (*AppStateCandidate) Validate

func (m *AppStateCandidate) Validate(formats strfmt.Registry) error

Validate validates this app state candidate

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

func (*AppStateCandidateStake) Validate

func (m *AppStateCandidateStake) Validate(formats strfmt.Registry) error

Validate validates this app state candidate stake

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

func (*AppStateFrozenFund) Validate

func (m *AppStateFrozenFund) Validate(formats strfmt.Registry) error

Validate validates this app state frozen fund

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

func (*AppStateHaltBlock) Validate

func (m *AppStateHaltBlock) Validate(formats strfmt.Registry) error

Validate validates this app state halt block

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

func (*AppStateValidators) Validate

func (m *AppStateValidators) Validate(formats strfmt.Registry) error

Validate validates this app state validators

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

func (*AppStateWaitlist) Validate

func (m *AppStateWaitlist) Validate(formats strfmt.Registry) error

Validate validates this app state waitlist

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"
)

func (BlockRequestField) Validate

func (m BlockRequestField) Validate(formats strfmt.Registry) error

Validate validates this block request field

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

func (*BlockResponse) Validate

func (m *BlockResponse) Validate(formats strfmt.Registry) error

Validate validates this block response

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

func (*BlockResponseEvidence) Validate

func (m *BlockResponseEvidence) Validate(formats strfmt.Registry) error

Validate validates this block response evidence

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

func (*BlockResponseEvidenceEvidence) Validate

func (m *BlockResponseEvidenceEvidence) Validate(formats strfmt.Registry) error

Validate validates this block response evidence evidence

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

func (*BlockResponseTransaction) Validate

func (m *BlockResponseTransaction) Validate(formats strfmt.Registry) error

Validate validates this block response transaction

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

func (*BlockResponseValidator) Validate

func (m *BlockResponseValidator) Validate(formats strfmt.Registry) error

Validate validates this block response validator

type BuyCoinData

type BuyCoinData struct {
	CoinToBuy          *Coin  `json:"coin_to_buy,omitempty"`
	ValueToBuy         string `json:"value_to_buy,omitempty"`
	CoinToSell         *Coin  `json:"coin_to_sell,omitempty"`
	MaximumValueToSell string `json:"maximum_value_to_sell,omitempty"`
}

type CandidateResponse

type CandidateResponse struct {

	// Commission (from 0 to 100) from rewards which delegators will pay to validator
	Commission uint64 `json:"commission,omitempty,string"`

	// Address that allows one to start the candidate by sending the SetCandidateOnline transaction or stop it by sending the SetCandidateOffline transaction.
	ControlAddress string `json:"control_address,omitempty"`

	// Smallest steak size. Note: filled in when request includes_stakes
	MinStake string `json:"min_stake,omitempty"`

	// Address that allows one to start the candidate by sending the SetCandidateOnline transaction or stop it by sending the SetCandidateOffline transaction. It also enables the owner to edit the node by sending EditCandidate.
	OwnerAddress string `json:"owner_address,omitempty"`

	// Public key of a candidate
	PublicKey string `json:"public_key,omitempty"`

	// Address where validator’s rewards go to.
	RewardAddress string `json:"reward_address,omitempty"`

	// List of stakes. Note: filled in when request includes_stakes
	Stakes []*CandidateResponseStake `json:"stakes"`

	// Candidate status. Available values: offline = 1, online = 2
	Status uint64 `json:"status,omitempty,string"`

	// Total stake of a candidate
	TotalStake string `json:"total_stake,omitempty"`

	// Number of unique wallets in steaks. Note: filled in when request includes_stakes
	UniqUsers uint64 `json:"uniq_users,omitempty,string"`

	// Number of occupied steak slots. Note: filled in when request includes_stakes
	UsedSlots uint64 `json:"used_slots,omitempty,string"`

	// Is a validator at the current height
	Validator bool `json:"validator,omitempty"`
}

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

func (*CandidateResponse) Validate

func (m *CandidateResponse) Validate(formats strfmt.Registry) error

Validate validates this candidate response

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

func (*CandidateResponseStake) Validate

func (m *CandidateResponseStake) Validate(formats strfmt.Registry) error

Validate validates this candidate response stake

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"
)

func (CandidatesRequestCandidateStatus) Validate

Validate validates this candidates request candidate status

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

func (*CandidatesResponse) Validate

func (m *CandidatesResponse) Validate(formats strfmt.Registry) error

Validate validates this candidates response

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

func (m *Coin) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*Coin) UnmarshalBinary

func (m *Coin) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Coin) Validate

func (m *Coin) Validate(formats strfmt.Registry) error

Validate validates this coin

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

func (*CoinInfoResponse) Validate

func (m *CoinInfoResponse) Validate(formats strfmt.Registry) error

Validate validates this coin info response

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

func (*ConnectionStatusChannel) Validate

func (m *ConnectionStatusChannel) Validate(formats strfmt.Registry) error

Validate validates this connection status channel

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

func (*ConnectionStatusMonitor) Validate

func (m *ConnectionStatusMonitor) Validate(formats strfmt.Registry) error

Validate validates this connection status monitor

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

func (*ConsensusParamsBlock) Validate

func (m *ConsensusParamsBlock) Validate(formats strfmt.Registry) error

Validate validates this consensus params block

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   intsAsStrings `json:"weights,omitempty"`
	Addresses []string      `json:"addresses,omitempty"`
}

type Data

type Data interface {
	// contains filtered or unexported methods
}

type DeclareCandidacyData

type DeclareCandidacyData struct {
	Address    string `json:"address,omitempty"`
	PubKey     string `json:"pub_key,omitempty"`
	Commission uint64 `json:"commission,string,omitempty"`
	Coin       *Coin  `json:"coin,omitempty"`
	Stake      string `json:"stake,omitempty"`
}

type DelegateData

type DelegateData struct {
	PubKey string `json:"pub_key,omitempty"`
	Coin   *Coin  `json:"coin,omitempty"`
	Value  string `json:"value,omitempty"`
}

type EditCandidateData

type EditCandidateData struct {
	PubKey         string `json:"pub_key,omitempty"`
	RewardAddress  string `json:"reward_address,omitempty"`
	OwnerAddress   string `json:"owner_address,omitempty"`
	ControlAddress string `json:"control_address,omitempty"`
}

type EditCandidatePublicKeyData

type EditCandidatePublicKeyData struct {
	PubKey    string `json:"pub_key,omitempty"`
	NewPubKey string `json:"new_pub_key,omitempty"`
}

type EditCoinOwnerData

type EditCoinOwnerData struct {
	Symbol   string `json:"symbol,omitempty"`
	NewOwner string `json:"new_owner,omitempty"`
}

type EditMultisigData

type EditMultisigData CreateMultisigData

type ErrorBody

type ErrorBody struct {

	// error
	Error *ErrorBodyError `json:"error,omitempty"`
}

ErrorBody error body

swagger:model ErrorBody

func (*ErrorBody) MarshalBinary

func (m *ErrorBody) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*ErrorBody) UnmarshalBinary

func (m *ErrorBody) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*ErrorBody) Validate

func (m *ErrorBody) Validate(formats strfmt.Registry) error

Validate validates this error body

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

func (*ErrorBodyError) Validate

func (m *ErrorBodyError) Validate(formats strfmt.Registry) error

Validate validates this error body error

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

func (*EstimateCoinBuyResponse) Validate

func (m *EstimateCoinBuyResponse) Validate(formats strfmt.Registry) error

Validate validates this estimate coin buy response

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

func (*EstimateCoinSellAllResponse) Validate

func (m *EstimateCoinSellAllResponse) Validate(formats strfmt.Registry) error

Validate validates this estimate coin sell all response

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

func (*EstimateCoinSellResponse) Validate

func (m *EstimateCoinSellResponse) Validate(formats strfmt.Registry) error

Validate validates this estimate coin sell response

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

func (*EstimateTxCommissionResponse) Validate

func (m *EstimateTxCommissionResponse) Validate(formats strfmt.Registry) error

Validate validates this estimate tx commission response

type EventItem

type EventItem struct {
	Type  string
	Value map[string]string
}

EventItem is the structure of the EventsResponse view of list items

func NewEventItem

func NewEventItem(i interface{}) (*EventItem, error)

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

func (*EventsResponse) Validate

func (m *EventsResponse) Validate(formats strfmt.Registry) error

Validate validates this events response

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

func (*FrozenResponse) Validate

func (m *FrozenResponse) Validate(formats strfmt.Registry) error

Validate validates this frozen response

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

func (*FrozenResponseFrozen) Validate

func (m *FrozenResponseFrozen) Validate(formats strfmt.Registry) error

Validate validates this frozen response frozen

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

func (*GatewayruntimeError) Validate

func (m *GatewayruntimeError) Validate(formats strfmt.Registry) error

Validate validates this gatewayruntime error

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

func (*GenesisResponse) Validate

func (m *GenesisResponse) Validate(formats strfmt.Registry) error

Validate validates this genesis response

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

func (*GenesisResponseAppState) Validate

func (m *GenesisResponseAppState) Validate(formats strfmt.Registry) error

Validate validates this genesis response app state

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

func (*GenesisResponseAppStateCoin) Validate

func (m *GenesisResponseAppStateCoin) Validate(formats strfmt.Registry) error

Validate validates this genesis response app state coin

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

func (*GenesisResponseConsensusParams) Validate

func (m *GenesisResponseConsensusParams) Validate(formats strfmt.Registry) error

Validate validates this genesis response consensus params

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

func (*GenesisResponseConsensusParamsEvidence) Validate

Validate validates this genesis response consensus params evidence

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

func (*GenesisResponseConsensusParamsValidator) Validate

Validate validates this genesis response consensus params validator

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

func (*HaltsResponse) Validate

func (m *HaltsResponse) Validate(formats strfmt.Registry) error

Validate validates this halts response

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

func (*MaxGasPriceResponse) Validate

func (m *MaxGasPriceResponse) Validate(formats strfmt.Registry) error

Validate validates this max gas price response

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

func (*MinGasPriceResponse) Validate

func (m *MinGasPriceResponse) Validate(formats strfmt.Registry) error

Validate validates this min gas price response

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

func (*MissedBlocksResponse) Validate

func (m *MissedBlocksResponse) Validate(formats strfmt.Registry) error

Validate validates this missed blocks response

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

func (*NetInfoResponse) Validate

func (m *NetInfoResponse) Validate(formats strfmt.Registry) error

Validate validates this net info response

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

func (*NetInfoResponsePeer) Validate

func (m *NetInfoResponsePeer) Validate(formats strfmt.Registry) error

Validate validates this net info response peer

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

func (m *NodeInfo) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*NodeInfo) UnmarshalBinary

func (m *NodeInfo) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*NodeInfo) Validate

func (m *NodeInfo) Validate(formats strfmt.Registry) error

Validate validates this node info

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

func (*NodeInfoOther) Validate

func (m *NodeInfoOther) Validate(formats strfmt.Registry) error

Validate validates this node info other

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

func (*NodeInfoProtocolVersion) Validate

func (m *NodeInfoProtocolVersion) Validate(formats strfmt.Registry) error

Validate validates this node info protocol version

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

func (*PeerConnectionStatus) Validate

func (m *PeerConnectionStatus) Validate(formats strfmt.Registry) error

Validate validates this peer connection status

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) UnmarshalNew added in v2.1.0

func (m *ProtobufAny) UnmarshalNew() (Data, error)
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{
			"@type":     "type.googleapis.com/api_pb.EditMultisigData",
			"threshold": "5",
			"weights":   []string{"1", "2", "3"},
			"addresses": []string{"Mx0", "Mx1", "Mx2"},
		},
	}
	data, _ := transactionResponse.Data.UnmarshalNew()
	editMultisigData := data.(*models.EditMultisigData)

	fmt.Printf("%T %[1]v\n", editMultisigData.Threshold)
	fmt.Printf("%T %[1]v\n", []uint64(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]
{"threshold":"5","weights":["1","2","3"],"addresses":["Mx0","Mx1","Mx2"]}

func (*ProtobufAny) UnmarshalTo

func (m *ProtobufAny) UnmarshalTo(i Data) error

func (*ProtobufAny) Validate

func (m *ProtobufAny) Validate(formats strfmt.Registry) error

Validate validates this protobuf any

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 RedeemCheckData struct {
	RawCheck string `json:"raw_check,omitempty"`
	Proof    string `json:"proof,omitempty"`
}

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

func (*RuntimeStreamError) Validate

func (m *RuntimeStreamError) Validate(formats strfmt.Registry) error

Validate validates this runtime stream error

type SellAllCoinData

type SellAllCoinData struct {
	CoinToSell        *Coin  `json:"coin_to_sell,omitempty"`
	CoinToBuy         *Coin  `json:"coin_to_buy,omitempty"`
	MinimumValueToBuy string `json:"minimum_value_to_buy,omitempty"`
}

type SellCoinData

type SellCoinData struct {
	CoinToSell        *Coin  `json:"coin_to_sell"`
	ValueToSell       string `json:"value_to_sell"`
	CoinToBuy         *Coin  `json:"coin_to_buy"`
	MinimumValueToBuy string `json:"minimum_value_to_buy"`
}

type SendData

type SendData struct {
	Coin  *Coin  `json:"coin"`
	To    string `json:"to"`
	Value string `json:"value"`
}

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

func (*SendTransactionRequest) Validate

func (m *SendTransactionRequest) Validate(formats strfmt.Registry) error

Validate validates this send transaction request

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

func (*SendTransactionResponse) Validate

func (m *SendTransactionResponse) Validate(formats strfmt.Registry) error

Validate validates this send transaction response

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 SetHaltBlockData struct {
	PubKey string `json:"pub_key,omitempty"`
	Height uint64 `json:"height,string,omitempty"`
}

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

func (*StatusResponse) Validate

func (m *StatusResponse) Validate(formats strfmt.Registry) error

Validate validates this status response

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

func (*SubscribeResponse) Validate

func (m *SubscribeResponse) Validate(formats strfmt.Registry) error

Validate validates this subscribe response

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

func (*SubscribeResponseEvent) Validate

func (m *SubscribeResponseEvent) Validate(formats strfmt.Registry) error

Validate validates this subscribe response event

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

func (*TransactionResponse) Validate

func (m *TransactionResponse) Validate(formats strfmt.Registry) error

Validate validates this transaction response

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

func (*TransactionsResponse) Validate

func (m *TransactionsResponse) Validate(formats strfmt.Registry) error

Validate validates this transactions response

type UnbondData

type UnbondData struct {
	PubKey string `json:"pub_key,omitempty"`
	Coin   *Coin  `json:"coin,omitempty"`
	Value  string `json:"value,omitempty"`
}

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

func (*UnconfirmedTxsResponse) Validate

func (m *UnconfirmedTxsResponse) Validate(formats strfmt.Registry) error

Validate validates this unconfirmed txs response

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

func (*ValidatorsResponse) Validate

func (m *ValidatorsResponse) Validate(formats strfmt.Registry) error

Validate validates this validators response

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

func (*ValidatorsResponseResult) Validate

func (m *ValidatorsResponseResult) Validate(formats strfmt.Registry) error

Validate validates this validators response result

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

func (*WaitListResponse) Validate

func (m *WaitListResponse) Validate(formats strfmt.Registry) error

Validate validates this wait list response

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

func (*WaitListResponseWait) Validate

func (m *WaitListResponseWait) Validate(formats strfmt.Registry) error

Validate validates this wait list response wait

Source Files

Jump to

Keyboard shortcuts

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