bus

package
v0.0.0-...-c04c664 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Accounts

type Accounts interface {
	DeleteCoin(types.Address, types.CoinSymbol)
	AddBalance(types.Address, types.CoinSymbol, *big.Int)
}

type ActiveCheckpoint

type ActiveCheckpoint interface {
	GetActiveCheckpoint() *types.ActiveCheckpoint
}

type App

type App interface {
	AddTotalSlashed(*big.Int)
}

type Bus

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

func NewBus

func NewBus() *Bus

func (*Bus) Accounts

func (b *Bus) Accounts() Accounts

func (*Bus) ActiveCheckpoint

func (b *Bus) ActiveCheckpoint() ActiveCheckpoint

func (*Bus) App

func (b *Bus) App() App

func (*Bus) Candidates

func (b *Bus) Candidates() Candidates

func (*Bus) Checker

func (b *Bus) Checker() Checker

func (*Bus) Coins

func (b *Bus) Coins() Coins

func (*Bus) Events

func (b *Bus) Events() eventsdb.IEventsDB

func (*Bus) FinalizedCheckpoints

func (b *Bus) FinalizedCheckpoints() FinalizedCheckpoints

func (*Bus) FrozenFunds

func (b *Bus) FrozenFunds() FrozenFunds

func (*Bus) Headers

func (b *Bus) Headers() Headers

func (*Bus) ProcessedDeposits

func (b *Bus) ProcessedDeposits() ProcessedDeposits

func (*Bus) SetAccounts

func (b *Bus) SetAccounts(accounts Accounts)

func (*Bus) SetActiveCheckpoint

func (b *Bus) SetActiveCheckpoint(activeCheckpoint ActiveCheckpoint)

func (*Bus) SetApp

func (b *Bus) SetApp(app App)

func (*Bus) SetCandidates

func (b *Bus) SetCandidates(candidates Candidates)

func (*Bus) SetChecker

func (b *Bus) SetChecker(checker Checker)

func (*Bus) SetCoins

func (b *Bus) SetCoins(coins Coins)

func (*Bus) SetEvents

func (b *Bus) SetEvents(events eventsdb.IEventsDB)

func (*Bus) SetFinalizedCheckpoints

func (b *Bus) SetFinalizedCheckpoints(finalizedCheckpoints FinalizedCheckpoints)

func (*Bus) SetFrozenFunds

func (b *Bus) SetFrozenFunds(frozenfunds FrozenFunds)

func (*Bus) SetHeaders

func (b *Bus) SetHeaders(headers Headers)

func (*Bus) SetProcessedDeposits

func (b *Bus) SetProcessedDeposits(deps ProcessedDeposits)

func (*Bus) SetSignatorySet

func (b *Bus) SetSignatorySet(signatorySet SignatorySet)

func (*Bus) SetUtxos

func (b *Bus) SetUtxos(utxos Utxos)

func (*Bus) SetWithdrawals

func (b *Bus) SetWithdrawals(withdrawals Withdrawals)

func (*Bus) SignatorySet

func (b *Bus) SignatorySet() SignatorySet

func (*Bus) Utxos

func (b *Bus) Utxos() Utxos

func (*Bus) Withdrawals

func (b *Bus) Withdrawals() Withdrawals

type Candidate

type Candidate struct {
	PubKey        types.Pubkey
	RewardAddress types.Address
	OwnerAddress  types.Address
	Commission    uint
	Status        byte
}

type Candidates

type Candidates interface {
	GetStakes(types.Pubkey) []Stake
	Punish(uint64, types.TmAddress) *big.Int
	GetCandidate(types.Pubkey) *Candidate
	SetOffline(types.Pubkey)
	GetCandidateByTendermintAddress(types.TmAddress) *Candidate
}

type Checker

type Checker interface {
	AddCoin(types.CoinSymbol, *big.Int, ...string)
	AddCoinVolume(types.CoinSymbol, *big.Int)
}

type Coin

type Coin struct {
	Symbol types.CoinSymbol
	Volume *big.Int
}

type Coins

type Coins interface {
	GetCoin(types.CoinSymbol) *Coin
	SubCoinVolume(types.CoinSymbol, *big.Int)
}

type Deposit

type Deposit struct {
	MainnetTxid types.Txid
	Coin        types.CoinSymbol
	Amount      *big.Int
	Owner       types.Address
}

type FinalizedCheckpoint

type FinalizedCheckpoint struct {
	Btc [][]byte
	Mnt [][]byte
}

type FinalizedCheckpoints

type FinalizedCheckpoints interface {
	GetFinalizedCheckpoints() *FinalizedCheckpoint
}

type FrozenFunds

type FrozenFunds interface {
	AddFrozenFund(uint64, types.Address, types.Pubkey, types.CoinSymbol, *big.Int)
}

type Headers

type Headers interface {
	GetBtc(hash uint32) *wire.BlockHeader
	GetMnt(hash string) *types.SignedHeader
}

type ProcessedDeposits

type ProcessedDeposits interface {
	GetDeposit(txid types.Txid) *Deposit
}

type SignatorySet

type SignatorySet interface {
	GetSignatorySet() *types.SignatorySet
}

type Stake

type Stake struct {
	Owner    types.Address
	Value    *big.Int
	Coin     types.CoinSymbol
	BipValue *big.Int
}

type Utxo

type Utxo struct {
	Txid   types.Txid
	Vout   uint32
	Amount int64
	Data   []byte
}

type Utxos

type Utxos interface {
	GetUtxo(types.UtxoId) *Utxo
}

type Withdrawals

type Withdrawals interface {
	GetBtcWithdrawals() *[]types.Withdrawal
	GetMntWithdrawals() *[]types.Withdrawal
}

Jump to

Keyboard shortcuts

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