smodels

package
v0.0.0-...-c77c525 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2023 License: Apache-2.0 Imports: 3 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	Address     string          `json:"address"`
	Balance     decimal.Decimal `json:"balance"`
	Delegated   decimal.Decimal `json:"delegated"`
	Unbonding   decimal.Decimal `json:"unbonding"`
	StakeReward decimal.Decimal `json:"stake_reward"`
}

type AggItem

type AggItem struct {
	Time  dmodels.Time    `db:"time" json:"time"`
	Value decimal.Decimal `db:"value" json:"value"`
}

type Balance

type Balance struct {
	SelfDelegated  decimal.Decimal `json:"self_delegated"`
	OtherDelegated decimal.Decimal `json:"other_delegated"`
	Available      decimal.Decimal `json:"available"`
}

type Block

type Block struct {
	Height          uint64       `json:"height"`
	Hash            string       `json:"hash"`
	TotalTxs        uint64       `json:"total_txs"`
	ChainID         string       `json:"chain_id"`
	Proposer        string       `json:"proposer"`
	ProposerAddress string       `json:"proposer_address"`
	Txs             []TxItem     `json:"txs"`
	CreatedAt       dmodels.Time `json:"created_at"`
}

type BlockItem

type BlockItem struct {
	Height          uint64       `json:"height"`
	Hash            string       `json:"hash"`
	Proposer        string       `json:"proposer"`
	ProposerAddress string       `json:"proposer_address"`
	CreatedAt       dmodels.Time `json:"created_at"`
}

type FeeRange

type FeeRange struct {
	From       decimal.Decimal     `json:"from"`
	To         decimal.Decimal     `json:"to"`
	Validators []FeeRangeValidator `json:"validators"`
}

type FeeRangeValidator

type FeeRangeValidator struct {
	Validator string          `json:"validator"`
	Fee       decimal.Decimal `json:"fee"`
}

type HistoricalState

type HistoricalState struct {
	Current        dmodels.HistoricalState `json:"current"`
	PriceAgg       []AggItem               `json:"price_agg"`
	MarketCapAgg   []AggItem               `json:"market_cap_agg"`
	StakedRatioAgg []AggItem               `json:"staked_ratio"`
}

type Message

type Message struct {
	Type string          `json:"type"`
	Body json.RawMessage `json:"body"`
}

type MetaData

type MetaData struct {
	Height          uint64           `json:"height"`
	LatestValidator string           `json:"latest_validator"`
	LatestProposal  MetaDataProposal `json:"latest_proposal"`
	ValidatorAvgFee decimal.Decimal  `json:"validator_avg_fee"`
	BlockTime       float64          `json:"block_time"`
	CurrentPrice    decimal.Decimal  `json:"current_price"`
}

type MetaDataProposal

type MetaDataProposal struct {
	Name string `json:"name"`
	ID   uint64 `json:"id"`
}

type PaginatableResponse

type PaginatableResponse struct {
	Items interface{} `json:"items"`
	Total uint64      `json:"total"`
}

type Pie

type Pie struct {
	Parts []PiePart       `json:"parts"`
	Total decimal.Decimal `json:"total"`
}

type PiePart

type PiePart struct {
	Label string          `json:"label"`
	Title string          `json:"title"`
	Value decimal.Decimal `json:"value"`
}

type ProposalChartData

type ProposalChartData struct {
	ProposalID        uint64          `json:"proposal_id"`
	VotersTotal       uint64          `json:"voters_total"`
	ValidatorsTotal   uint64          `json:"validators_total"`
	Turnout           decimal.Decimal `json:"turnout"`
	YesPercent        decimal.Decimal `json:"yes_percent"`
	NoPercent         decimal.Decimal `json:"no_percent"`
	NoWithVetoPercent decimal.Decimal `json:"no_with_veto_percent"`
	AbstainPercent    decimal.Decimal `json:"abstain_percent"`
}

type ProposalVote

type ProposalVote struct {
	Title       string `json:"title"`
	IsValidator bool   `json:"is_validator"`
	dmodels.ProposalVote
}

type Tx

type Tx struct {
	Hash      string          `json:"hash"`
	Type      string          `json:"type"`
	Status    bool            `json:"status"`
	Fee       decimal.Decimal `json:"fee"`
	Height    uint64          `json:"height"`
	GasUsed   uint64          `json:"gas_used"`
	GasWanted uint64          `json:"gas_wanted"`
	Memo      string          `json:"memo"`
	CreatedAt dmodels.Time    `json:"created_at"`
	Messages  []Message       `json:"messages"`
}

type TxItem

type TxItem struct {
	Hash      string          `json:"hash"`
	Status    bool            `json:"status"`
	Fee       decimal.Decimal `json:"fee"`
	Height    uint64          `json:"height"`
	Messages  uint64          `json:"messages"`
	CreatedAt dmodels.Time    `json:"created_at"`
}

type Validator

type Validator struct {
	Title           string          `json:"title"`
	Website         string          `json:"website"`
	OperatorAddress string          `json:"operator_address"`
	AccAddress      string          `json:"acc_address"`
	ConsAddress     string          `json:"cons_address"`
	PercentPower    decimal.Decimal `json:"percent_power"`
	Power           decimal.Decimal `json:"power"`
	SelfStake       decimal.Decimal `json:"self_stake"`
	Fee             decimal.Decimal `json:"fee"`
	BlocksProposed  uint64          `json:"blocks_proposed"`
	Delegators      uint64          `json:"delegators"`
	Power24Change   decimal.Decimal `json:"power_24_change"`
	GovernanceVotes uint64          `json:"governance_votes"`
}

type ValidatorBlocksStat

type ValidatorBlocksStat struct {
	Proposed          uint64          `json:"proposed"`
	MissedValidations uint64          `json:"missed_validations"`
	Revenue           decimal.Decimal `json:"revenue"`
}

Jump to

Keyboard shortcuts

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