handlers

package
v1.7.30 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2024 License: Apache-2.0 Imports: 44 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func URLValueGuard added in v1.3.7

func URLValueGuard(ctx *fasthttp.RequestCtx, logger applogger.Logger, key string) (string, bool)

Types

type AccountInfo

type AccountInfo struct {
	Type                string        `json:"type"`
	Name                string        `json:"name"`
	Address             string        `json:"address"`
	Balance             coin.Coins    `json:"balance"`
	BondedBalance       coin.Coins    `json:"bondedBalance"`
	RedelegatingBalance coin.Coins    `json:"redelegatingBalance"`
	UnbondingBalance    coin.Coins    `json:"unbondingBalance"`
	TotalRewards        coin.DecCoins `json:"totalRewards"`
	Commissions         coin.DecCoins `json:"commissions"`
	TotalBalance        coin.DecCoins `json:"totalBalance"`
}

type AccountMessages

type AccountMessages struct {
	// contains filtered or unexported fields
}

func NewAccountMessages

func NewAccountMessages(logger applogger.Logger, rdbHandle *rdb.Handle) *AccountMessages

func (*AccountMessages) ListByAccount

func (handler *AccountMessages) ListByAccount(ctx *fasthttp.RequestCtx)

type AccountRawEvents added in v1.5.4

type AccountRawEvents struct {
	// contains filtered or unexported fields
}

func NewAccountRawEvents added in v1.5.4

func NewAccountRawEvents(logger applogger.Logger, rdbHandle *rdb.Handle) *AccountRawEvents

func (*AccountRawEvents) ListByAccount added in v1.5.4

func (handler *AccountRawEvents) ListByAccount(ctx *fasthttp.RequestCtx)

type AccountRawTransactions added in v1.5.2

type AccountRawTransactions struct {
	// contains filtered or unexported fields
}

func NewAccountRawTransactions added in v1.5.2

func NewAccountRawTransactions(logger applogger.Logger, rdbHandle *rdb.Handle) *AccountRawTransactions

func (*AccountRawTransactions) ListByAccount added in v1.5.2

func (handler *AccountRawTransactions) ListByAccount(ctx *fasthttp.RequestCtx)

type AccountTransactions

type AccountTransactions struct {
	// contains filtered or unexported fields
}

func NewAccountTransactions

func NewAccountTransactions(logger applogger.Logger, rdbHandle *rdb.Handle) *AccountTransactions

func (*AccountTransactions) ListByAccount

func (handler *AccountTransactions) ListByAccount(ctx *fasthttp.RequestCtx)

type Accounts

type Accounts struct {
	// contains filtered or unexported fields
}

func NewAccounts

func NewAccounts(
	logger applogger.Logger,
	rdbHandle *rdb.Handle,
	cosmosClient cosmosapp.Client,
	validatorAddressPrefix string,
) *Accounts

func (*Accounts) FindBy

func (handler *Accounts) FindBy(ctx *fasthttp.RequestCtx)

func (*Accounts) List

func (handler *Accounts) List(ctx *fasthttp.RequestCtx)

type AddressHook added in v1.3.4

type AddressHook = func(string) (string, error)

type BlockEvents

type BlockEvents struct {
	// contains filtered or unexported fields
}

func NewBlockEvents

func NewBlockEvents(logger applogger.Logger, rdbHandle *rdb.Handle) *BlockEvents

func (*BlockEvents) FindById

func (handler *BlockEvents) FindById(ctx *fasthttp.RequestCtx)

func (*BlockEvents) List

func (handler *BlockEvents) List(ctx *fasthttp.RequestCtx)

type Blocks

type Blocks struct {
	// contains filtered or unexported fields
}

func NewBlocks

func NewBlocks(logger applogger.Logger, rdbHandle *rdb.Handle) *Blocks

func (*Blocks) FindBy

func (handler *Blocks) FindBy(ctx *fasthttp.RequestCtx)

func (*Blocks) List

func (handler *Blocks) List(ctx *fasthttp.RequestCtx)

func (*Blocks) ListAccountByHeight added in v1.5.7

func (handler *Blocks) ListAccountByHeight(ctx *fasthttp.RequestCtx)

func (*Blocks) ListBlockRawEventsByHeight added in v1.5.2

func (handler *Blocks) ListBlockRawEventsByHeight(ctx *fasthttp.RequestCtx)

func (*Blocks) ListCommitmentsByConsensusNodeAddress

func (handler *Blocks) ListCommitmentsByConsensusNodeAddress(ctx *fasthttp.RequestCtx)

func (*Blocks) ListCommitmentsByHeight

func (handler *Blocks) ListCommitmentsByHeight(ctx *fasthttp.RequestCtx)

func (*Blocks) ListEventsByHeight

func (handler *Blocks) ListEventsByHeight(ctx *fasthttp.RequestCtx)

func (*Blocks) ListRawTransactionsByHeight added in v1.5.2

func (handler *Blocks) ListRawTransactionsByHeight(ctx *fasthttp.RequestCtx)

func (*Blocks) ListTransactionsByHeight

func (handler *Blocks) ListTransactionsByHeight(ctx *fasthttp.RequestCtx)

type BridgeActivityResponseRow

type BridgeActivityResponseRow struct {
	bridge_activitiy_view.BridgeActivityReadRow

	DisplayAmount     string  `json:"displayAmount"`
	MaybeDisplayDenom *string `json:"displayDenom"`
}

type BridgeChainConfig added in v1.3.4

type BridgeChainConfig struct {
	Name       string                `yaml:"name" mapstructure:"name"`
	Currencies []BridgeChainCurrency `yaml:"currencies" mapstructure:"currencies"`
}

type BridgeChainCurrency added in v1.3.4

type BridgeChainCurrency struct {
	MinimalCoinDenom string `yaml:"minimal_coin_denom" mapstructure:"minimal_coin_denom"`
	CoinDecimals     uint64 `yaml:"coin_decimals" mapstructure:"coin_decimals"`
	DisplayCoinDenom string `yaml:"display_coin_denom" mapstructure:"display_coin_denom"`
}

type BridgeNetworkConfig added in v1.3.4

type BridgeNetworkConfig struct {
	ChainName string `yaml:"chain_name" mapstructure:"chain_name"`
	// Chain network unique abbreviation, used in URL query params
	Abbreviation     NetworkAbbreviation `yaml:"abbreviation" mapstructure:"abbreviation"`
	MaybeAddressHook *AddressHook
}

type Bridges

type Bridges struct {
	// contains filtered or unexported fields
}

func NewBridges

func NewBridges(
	logger applogger.Logger,
	rdbHandle *rdb.Handle,
	cosmosAddressPrefix string,
	config BridgesConfig,
) *Bridges

func (*Bridges) FindByTransactionHash

func (handler *Bridges) FindByTransactionHash(ctx *fasthttp.RequestCtx)

func (*Bridges) ListActivities

func (handler *Bridges) ListActivities(ctx *fasthttp.RequestCtx)

func (*Bridges) ListActivitiesByNetwork

func (handler *Bridges) ListActivitiesByNetwork(ctx *fasthttp.RequestCtx)

type BridgesConfig added in v1.3.4

type BridgesConfig struct {
	Networks []BridgeNetworkConfig `yaml:"networks" mapstructure:"networks"`
	Chains   []BridgeChainConfig   `yaml:"chains" mapstructure:"chains"`
}

type HealthHandler added in v1.7.6

type HealthHandler struct {
	// contains filtered or unexported fields
}

func NewHealthHandler added in v1.7.6

func NewHealthHandler(logger applogger.Logger, rdbHandle *rdb.Handle) *HealthHandler

func (*HealthHandler) HealthCheck added in v1.7.6

func (handler *HealthHandler) HealthCheck(ctx *fasthttp.RequestCtx)

type IBCChannel

type IBCChannel struct {
	// contains filtered or unexported fields
}

func NewIBCChannel

func NewIBCChannel(logger applogger.Logger, rdbHandle *rdb.Handle) *IBCChannel

func (*IBCChannel) FindChannelById

func (handler *IBCChannel) FindChannelById(ctx *fasthttp.RequestCtx)

func (*IBCChannel) ListAllDenomHashMapping

func (handler *IBCChannel) ListAllDenomHashMapping(ctx *fasthttp.RequestCtx)

func (*IBCChannel) ListChannels

func (handler *IBCChannel) ListChannels(ctx *fasthttp.RequestCtx)

type IBCChannelMessage

type IBCChannelMessage struct {
	// contains filtered or unexported fields
}

func NewIBCChannelMessage

func NewIBCChannelMessage(logger applogger.Logger, rdbHandle *rdb.Handle) *IBCChannelMessage

func (*IBCChannelMessage) ListByChannelID

func (handler *IBCChannelMessage) ListByChannelID(ctx *fasthttp.RequestCtx)

type NFTs

type NFTs struct {
	// contains filtered or unexported fields
}

func NewNFTs

func NewNFTs(
	logger applogger.Logger, rdbHandle *rdb.Handle,
) *NFTs

func (*NFTs) FindDenomById

func (handler *NFTs) FindDenomById(ctx *fasthttp.RequestCtx)

func (*NFTs) FindDenomByName

func (handler *NFTs) FindDenomByName(ctx *fasthttp.RequestCtx)

func (*NFTs) FindTokenById

func (handler *NFTs) FindTokenById(ctx *fasthttp.RequestCtx)

func (*NFTs) ListDenoms

func (handler *NFTs) ListDenoms(ctx *fasthttp.RequestCtx)

func (*NFTs) ListDrops

func (handler *NFTs) ListDrops(ctx *fasthttp.RequestCtx)

func (*NFTs) ListMessages

func (handler *NFTs) ListMessages(ctx *fasthttp.RequestCtx)

func (*NFTs) ListMessagesByDenom

func (handler *NFTs) ListMessagesByDenom(ctx *fasthttp.RequestCtx)

func (*NFTs) ListMessagesByToken

func (handler *NFTs) ListMessagesByToken(ctx *fasthttp.RequestCtx)

func (*NFTs) ListTokens

func (handler *NFTs) ListTokens(ctx *fasthttp.RequestCtx)

func (*NFTs) ListTokensByAccount

func (handler *NFTs) ListTokensByAccount(ctx *fasthttp.RequestCtx)

func (*NFTs) ListTokensByDenomId

func (handler *NFTs) ListTokensByDenomId(ctx *fasthttp.RequestCtx)

func (*NFTs) ListTokensByDrop

func (handler *NFTs) ListTokensByDrop(ctx *fasthttp.RequestCtx)

func (*NFTs) ListTransfersByToken

func (handler *NFTs) ListTransfersByToken(ctx *fasthttp.RequestCtx)

type NetworkAbbreviation added in v1.3.4

type NetworkAbbreviation = string

type ProposalDetails

type ProposalDetails struct {
	*proposal_view.ProposalWithMonikerRow

	RequiredVotingPower string                   `json:"requiredVotingPower"`
	TotalVotedPower     string                   `json:"totalVotedPower"`
	VotedPowerResult    ProposalVotedPowerResult `json:"votedPowerResult"`
}

type ProposalVotedPowerResult

type ProposalVotedPowerResult struct {
	Yes        string `json:"yes"`
	Abstain    string `json:"abstain"`
	No         string `json:"no"`
	NoWithVeto string `json:"noWithVeto"`
}

type Proposals

type Proposals struct {
	// contains filtered or unexported fields
}

func NewProposals

func NewProposals(logger applogger.Logger, rdbHandle *rdb.Handle, cosmosClient cosmosapp.Client) *Proposals

func (*Proposals) FindById

func (handler *Proposals) FindById(ctx *fasthttp.RequestCtx)

func (*Proposals) List

func (handler *Proposals) List(ctx *fasthttp.RequestCtx)

func (*Proposals) ListDepositorsById

func (handler *Proposals) ListDepositorsById(ctx *fasthttp.RequestCtx)

func (*Proposals) ListVotesById

func (handler *Proposals) ListVotesById(ctx *fasthttp.RequestCtx)

type RawTransactions added in v1.5.8

type RawTransactions struct {
	// contains filtered or unexported fields
}

func NewRawTransactions added in v1.5.8

func NewRawTransactions(logger applogger.Logger, rdbHandle *rdb.Handle) *RawTransactions

func (*RawTransactions) FindByHash added in v1.5.8

func (handler *RawTransactions) FindByHash(ctx *fasthttp.RequestCtx)
type Search struct {
	// contains filtered or unexported fields
}

func NewSearch

func NewSearch(logger applogger.Logger, rdbHandle *rdb.Handle) *Search

func (*Search) Search

func (search *Search) Search(ctx *fasthttp.RequestCtx)

type SearchResults

type SearchResults struct {
	Blocks       []block_view.Block                `json:"blocks"`
	Transactions []transaction_view.TransactionRow `json:"transactions"`
	Validators   []validator_view.ValidatorRow     `json:"validators"`
	Accounts     []string                          `json:"accounts"`
}

type Status

type Status struct {
	BlockCount                  int64         `json:"blockCount"`
	TransactionCount            int64         `json:"transactionCount"`
	TotalDelegated              coin.Coins    `json:"totalDelegated"`
	TotalReward                 coin.DecCoins `json:"totalReward"`
	ValidatorCount              int64         `json:"validatorCount"`
	ActiveValidatorCount        int64         `json:"activeValidatorCount"`
	LatestHeight                int64         `json:"latestHeight"`
	AverageBlockTimeMillisecond string        `json:"averageBlockTimeMillisecond"`
}

type StatusHandler

type StatusHandler struct {
	// contains filtered or unexported fields
}

func NewStatusHandler

func NewStatusHandler(logger applogger.Logger, cosmosAppClient cosmosapp.Client, rdbHandle *rdb.Handle) *StatusHandler

func (*StatusHandler) GetStatus

func (handler *StatusHandler) GetStatus(ctx *fasthttp.RequestCtx)

type Transactions

type Transactions struct {
	// contains filtered or unexported fields
}

func NewTransactions

func NewTransactions(logger applogger.Logger, rdbHandle *rdb.Handle) *Transactions

func (*Transactions) FindByHash

func (handler *Transactions) FindByHash(ctx *fasthttp.RequestCtx)

func (*Transactions) List

func (handler *Transactions) List(ctx *fasthttp.RequestCtx)

type ValidatorDetails

type ValidatorDetails struct {
	*validator_view.ValidatorRow

	Tokens         string `json:"tokens"`
	SelfDelegation string `json:"selfDelegation"`
}

type Validators

type Validators struct {
	// contains filtered or unexported fields
}

func NewValidators

func NewValidators(
	logger applogger.Logger,
	validatorAddressPrefix string,
	consNodeAddressPrefix string,
	maxActiveBlocksPeriodLimit int64,
	cosmosAppClient cosmosapp.Client,
	tendermintClient tendermint.Client,
	rdbHandle *rdb.Handle,
) *Validators

func (*Validators) FindBy

func (handler *Validators) FindBy(ctx *fasthttp.RequestCtx)

func (*Validators) List

func (handler *Validators) List(ctx *fasthttp.RequestCtx)

func (*Validators) ListActive

func (handler *Validators) ListActive(ctx *fasthttp.RequestCtx)

func (*Validators) ListActivities

func (handler *Validators) ListActivities(ctx *fasthttp.RequestCtx)

Jump to

Keyboard shortcuts

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