rep

package
v0.5.0-rc13 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Broker

type Broker interface {
	// auth module
	PublishAccount(context.Context, model.Account) error

	// core module
	PublishBlock(context.Context, model.Block) error
	PublishMessage(context.Context, model.Message) error
	PublishTransaction(context.Context, model.Transaction) error
	PublishValidatorPreCommit(context.Context, model.ValidatorPreCommit) error
	PublishValidatorVotingPower(context.Context, model.ValidatorVotingPower) error

	// bank module
	PublishSupply(context.Context, model.Supply) error
	PublishSendMessage(context.Context, model.SendMessage) error
	PublishMultiSendMessage(context.Context, model.MultiSendMessage) error
	PublishAccountBalance(context.Context, model.AccountBalance) error

	// distribution module
	PublishDelegationReward(context.Context, model.DelegationReward) error
	PublishDelegationRewardMessage(context.Context, model.DelegationRewardMessage) error
	PublishDistributionParams(context.Context, model.DistributionParams) error
	PublishValidatorCommission(context.Context, model.ValidatorCommission) error
	PublishSetWithdrawAddressMessage(context.Context, model.SetWithdrawAddressMessage) error
	PublishProposerReward(context.Context, model.ProposerReward) error
	PublishDistributionCommission(context.Context, model.DistributionCommission) error
	PublishDistributionReward(context.Context, model.DistributionReward) error
	PublishWithdrawValidatorCommissionMessage(context.Context, model.WithdrawValidatorCommissionMessage) error

	// staking module
	PublishCommunityPool(context.Context, model.CommunityPool) error
	PublishUnbondingDelegation(context.Context, model.UnbondingDelegation) error
	PublishUnbondingDelegationMessage(context.Context, model.UnbondingDelegationMessage) error
	PublishStakingParams(context.Context, model.StakingParams) error
	PublishDelegation(context.Context, model.Delegation) error
	PublishDisabledDelegation(context.Context, model.Delegation) error
	PublishDelegationMessage(context.Context, model.DelegationMessage) error
	PublishRedelegationMessage(context.Context, model.RedelegationMessage) error
	PublishRedelegation(context.Context, model.Redelegation) error
	PublishStakingPool(context.Context, model.StakingPool) error
	PublishValidator(context.Context, model.Validator) error
	PublishValidatorInfo(context.Context, model.ValidatorInfo) error
	PublishValidatorStatus(context.Context, model.ValidatorStatus) error
	PublishValidatorDescription(context.Context, model.ValidatorDescription) error
	PublishCreateValidatorMessage(context.Context, model.CreateValidatorMessage) error
	PublishEditValidatorMessage(context.Context, model.EditValidatorMessage) error
	PublishCancelUnbondingDelegationMessage(context.Context, model.CancelUnbondingDelegationMessage) error

	// mint module
	PublishMintParams(context.Context, model.MintParams) error
	PublishAnnualProvision(context.Context, model.AnnualProvision) error

	// gov module
	PublishProposal(context.Context, model.Proposal) error
	PublishGovParams(context.Context, model.GovParams) error
	PublishProposalDeposit(context.Context, model.ProposalDeposit) error
	PublishProposalDepositMessage(context.Context, model.ProposalDepositMessage) error
	PublishProposalVoteMessage(context.Context, model.ProposalVoteMessage) error
	PublishProposalTallyResult(context.Context, model.ProposalTallyResult) error
	PublishSubmitProposalMessage(context.Context, model.SubmitProposalMessage) error
	PublishVoteWeightedMessage(context.Context, model.VoteWeightedMessage) error

	// authz module
	PublishGrantMessage(context.Context, model.GrantMessage) error
	PublishAuthzGrant(context.Context, model.AuthzGrant) error
	PublishRevokeMessage(context.Context, model.RevokeMessage) error
	PublishExecMessage(context.Context, model.ExecMessage) error

	// feegrant module
	PublishFeeAllowance(context.Context, model.FeeAllowance) error
	PublishGrantAllowanceMessage(context.Context, model.GrantAllowanceMessage) error
	PublishRevokeAllowanceMessage(context.Context, model.RevokeAllowanceMessage) error

	// slashing module
	PublishSlashingParams(context.Context, model.SlashingParams) error
	PublishUnjailMessage(context.Context, model.UnjailMessage) error
	PublishHandleValidatorSignature(ctx context.Context, msg model.HandleValidatorSignature) error

	// ibc module
	PublishTransferMessage(context.Context, model.TransferMessage) error
	PublishAcknowledgementMessage(context.Context, model.AcknowledgementMessage) error
	PublishReceivePacketMessage(context.Context, model.RecvPacketMessage) error
	PublishDenomTrace(context.Context, model.DenomTrace) error

	// liquidity module
	PublishSwap(context.Context, model.Swap) error
	PublishLiquidityPool(context.Context, model.LiquidityPool) error

	// graph module
	PublishCyberlink(context.Context, model.Cyberlink) error
	PublishCyberlinkMessage(context.Context, model.CyberlinkMessage) error
	PublishParticle(context.Context, model.Particle) error

	// bandwidth module
	PublishBandwidthParams(context.Context, model.BandwidthParams) error

	// dmn module
	PublishDMNParams(context.Context, model.DMNParams) error

	// grid module
	PublishGridParams(context.Context, model.GridParams) error
	PublishRoute(context.Context, model.Route) error
	PublishCreateRouteMessage(context.Context, model.CreateRouteMessage) error
	PublishEditRouteMessage(context.Context, model.EditRouteMessage) error
	PublishEditRouteNameMessage(context.Context, model.EditRouteNameMessage) error
	PublishDeleteRouteMessage(context.Context, model.DeleteRouteMessage) error

	// rank module
	PublishRankParams(context.Context, model.RankParams) error

	// resources module
	PublishInvestmintMessage(context.Context, model.InvestmintMessage) error
}

type GrpcClient

type GrpcClient interface {
	Block(ctx context.Context, height int64) (*cometbftcoretypes.ResultBlock, error)
	Validators(ctx context.Context, height int64) (*cometbftcoretypes.ResultValidators, error)

	Txs(ctx context.Context, height int64, txs cometbfttypes.Txs) ([]*tx.GetTxResponse, error)
}

type Lifecycle

type Lifecycle interface {
	Start(ctx context.Context) error
	Stop(ctx context.Context) error
}

Lifecycle indicates that struct can be run as an application component

type RPCClient

type RPCClient interface {
	WsEnabled() bool

	SubscribeNewBlocks(ctx context.Context) (<-chan cometbftcoretypes.ResultEvent, error)
	Genesis(ctx context.Context) (*cometbfttypes.GenesisDoc, error)
	GetLastBlockHeight(ctx context.Context) (int64, error)
	GetBlockEvents(ctx context.Context, height int64) (begin, end types.BlockerEvents, err error)
}

type Storage

type Storage interface {
	GetBlockByHeight(ctx context.Context, height int64) (*model.Block, error)
	CreateBlock(ctx context.Context, block *model.Block) error
	SetProcessedStatus(ctx context.Context, height int64) error
	SetErrorStatus(ctx context.Context, height int64, msg string) error
	UpdateStatus(ctx context.Context, height int64, status model.Status) error
	GetErrorBlockHeights(ctx context.Context) ([]int64, error)

	InsertErrorMessage(ctx context.Context, message model.Message) error

	Ping(ctx context.Context) error
}

Storage implementation needed for store some tmp data for correct processing

Jump to

Keyboard shortcuts

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