Documentation ¶
Index ¶
- func NewIsAssetStub(id string, dp uint64) *assets.Asset
- type AssetParty
- type AssetStub
- func (a *AssetStub) ApplyAssetUpdate(_ context.Context, assetID string) error
- func (AssetStub) Enable(_ context.Context, assetID string) error
- func (a *AssetStub) Get(id string) (*assets.Asset, error)
- func (a *AssetStub) Register(id string, decimals uint64)
- func (a *AssetStub) SetPermissive()
- func (a *AssetStub) SetStrict()
- type BridgeViewStub
- func (*BridgeViewStub) FindAssetLimitsUpdated(w *types.ERC20AssetLimitsUpdated, blockNumber, logIndex uint64, ...) error
- func (*BridgeViewStub) FindAssetList(al *types.ERC20AssetList, blockNumber, logIndex uint64) error
- func (*BridgeViewStub) FindBridgeResumed(al *types.ERC20EventBridgeResumed, blockNumber, logIndex uint64) error
- func (*BridgeViewStub) FindBridgeStopped(al *types.ERC20EventBridgeStopped, blockNumber, logIndex uint64) error
- func (*BridgeViewStub) FindDeposit(d *types.ERC20Deposit, blockNumber, logIndex uint64, ethAssetAddress string) error
- type BrokerStub
- func (b *BrokerStub) ClearAllEvents()
- func (b *BrokerStub) ClearOrderByReference(party, ref string) error
- func (b *BrokerStub) ClearTransferResponseEvents()
- func (b *BrokerStub) GetAccountEvents() []events.Acc
- func (b *BrokerStub) GetAccounts() []types.Account
- func (b *BrokerStub) GetActiveOrderDepth(marketID string) (sell []*types.Order, buy []*types.Order)
- func (b *BrokerStub) GetAllEvents() []events.Event
- func (b *BrokerStub) GetAssetNetworkTreasuryAccount(asset string) (types.Account, error)
- func (b *BrokerStub) GetAuctionEvents() []events.Auction
- func (b *BrokerStub) GetBatch(t events.Type) []events.Event
- func (b *BrokerStub) GetBookDepth(market string) (sell map[string]uint64, buy map[string]uint64)
- func (b *BrokerStub) GetByReference(party, ref string) (types.Order, error)
- func (b *BrokerStub) GetDelegationBalance(epochSeq string) []types.Delegation
- func (b *BrokerStub) GetDelegationBalanceEvents(epochSeq string) []events.DelegationBalance
- func (b *BrokerStub) GetFirstByReference(party, ref string) (types.Order, error)
- func (b *BrokerStub) GetImmBatch(t events.Type) []events.Event
- func (b *BrokerStub) GetLPEvents() []events.LiquidityProvision
- func (b *BrokerStub) GetLPSErrors() []events.TxErr
- func (b *BrokerStub) GetLedgerMovements() []events.LedgerMovements
- func (b *BrokerStub) GetMarginByPartyAndMarket(partyID, marketID string) (types.MarginLevels, error)
- func (b *BrokerStub) GetMarket(marketID string) *types.Market
- func (b *BrokerStub) GetMarketInfrastructureFeePoolAccount(asset string) (types.Account, error)
- func (b *BrokerStub) GetMarketInsurancePoolAccount(market string) (types.Account, error)
- func (b *BrokerStub) GetMarketLiquidityFeePoolAccount(market string) (types.Account, error)
- func (b *BrokerStub) GetMarketSettlementAccount(market string) (types.Account, error)
- func (b *BrokerStub) GetOrderEvents() []events.Order
- func (b *BrokerStub) GetOrdersByPartyAndMarket(party, market string) []types.Order
- func (b *BrokerStub) GetPartyBondAccount(party, asset string) (ba types.Account, err error)
- func (b *BrokerStub) GetPartyBondAccountForMarket(party, asset, marketID string) (ba types.Account, err error)
- func (b *BrokerStub) GetPartyGeneralAccount(party, asset string) (ga types.Account, err error)
- func (b *BrokerStub) GetPartyMarginAccount(party, market string) (types.Account, error)
- func (b *BrokerStub) GetRejectedOrderAmendments() []events.TxErr
- func (b *BrokerStub) GetRewardAccountBalance(accountType, asset string) (ga types.Account, err error)
- func (b *BrokerStub) GetRewards(epochSeq string) map[AssetParty]events.RewardPayout
- func (b *BrokerStub) GetTradeEvents() []events.Trade
- func (b *BrokerStub) GetTrades() []types.Trade
- func (b *BrokerStub) GetTxErrors() []events.TxErr
- func (b *BrokerStub) GetValidatorScores(epochSeq string) map[string]events.ValidatorScore
- func (b *BrokerStub) Reset()
- func (b *BrokerStub) ResetType(t events.Type)
- func (b *BrokerStub) Send(e events.Event)
- func (b *BrokerStub) SendBatch(evts []events.Event)
- func (b *BrokerStub) SetStreaming(v bool) bool
- func (b *BrokerStub) Subscribe(sub broker.Subscriber) int
- func (b *BrokerStub) SubscribeBatch(subs ...broker.Subscriber)
- func (b *BrokerStub) Unsubscribe(k int)
- type CommanderStub
- type StakingAccountStub
- func (t *StakingAccountStub) DecrementBalance(party string, amount *num.Uint) error
- func (t *StakingAccountStub) GetAvailableBalance(party string) (*num.Uint, error)
- func (t *StakingAccountStub) GetAvailableBalanceInRange(party string, from, to time.Time) (*num.Uint, error)
- func (t *StakingAccountStub) IncrementBalance(party string, amount *num.Uint) error
- func (t *StakingAccountStub) OnEpochEvent(ctx context.Context, epoch types.Epoch)
- func (t *StakingAccountStub) OnEpochRestore(_ context.Context, _ types.Epoch)
- type StateVarStub
- func (e *StateVarStub) NewEvent(asset, market string, eventType statevar.EventType)
- func (e *StateVarStub) OnFloatingPointUpdatesDurationUpdate(ctx context.Context, updateFrequency time.Duration) error
- func (e *StateVarStub) OnTick(ctx context.Context, t time.Time)
- func (e *StateVarStub) ReadyForTimeTrigger(asset, mktID string)
- func (e *StateVarStub) RegisterStateVariable(asset, market, name string, converter statevar.Converter, ...) error
- func (e *StateVarStub) UnregisterStateVariable(asset, market string)
- type TimeStub
- type TopologyStub
- func (ts *TopologyStub) AddValidator(node string, pubkey string)
- func (ts *TopologyStub) AllNodeIDs() []string
- func (ts *TopologyStub) AllVegaPubKeys() []string
- func (ts *TopologyStub) Get(key string) *validators.ValidatorData
- func (ts *TopologyStub) GetRewardsScores(ctx context.Context, epochSeq string, delegationState []*types.ValidatorData, ...) (*types.ScoreData, *types.ScoreData)
- func (ts *TopologyStub) IsTendermintValidator(pubKey string) bool
- func (ts *TopologyStub) IsValidator() bool
- func (ts *TopologyStub) IsValidatorNodeID(nodeID string) bool
- func (ts *TopologyStub) IsValidatorVegaPubKey(pubKey string) bool
- func (ts *TopologyStub) Len() int
- func (ts *TopologyStub) OnMinDelegationUpdated(_ context.Context, minDelegation num.Decimal) error
- func (*TopologyStub) RecalcValidatorSet(ctx context.Context, epochSeq string, delegationState []*types.ValidatorData, ...)
- func (ts *TopologyStub) SelfNodeID() string
- func (ts *TopologyStub) SelfVegaPubKey() string
- func (ts *TopologyStub) ValidatorPerformanceScore(nodeID string) num.Decimal
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AssetParty ¶
type AssetParty struct {
Asset, Party string
}
type AssetStub ¶
type AssetStub struct {
// contains filtered or unexported fields
}
func NewAssetStub ¶
func NewAssetStub() *AssetStub
func (*AssetStub) ApplyAssetUpdate ¶
func (*AssetStub) SetPermissive ¶
func (a *AssetStub) SetPermissive()
type BridgeViewStub ¶
type BridgeViewStub struct{}
func NewBridgeViewStub ¶
func NewBridgeViewStub() *BridgeViewStub
func (*BridgeViewStub) FindAssetLimitsUpdated ¶
func (*BridgeViewStub) FindAssetLimitsUpdated(w *types.ERC20AssetLimitsUpdated, blockNumber, logIndex uint64, ethAssetAddress string) error
func (*BridgeViewStub) FindAssetList ¶
func (*BridgeViewStub) FindAssetList(al *types.ERC20AssetList, blockNumber, logIndex uint64) error
func (*BridgeViewStub) FindBridgeResumed ¶
func (*BridgeViewStub) FindBridgeResumed(al *types.ERC20EventBridgeResumed, blockNumber, logIndex uint64) error
func (*BridgeViewStub) FindBridgeStopped ¶
func (*BridgeViewStub) FindBridgeStopped(al *types.ERC20EventBridgeStopped, blockNumber, logIndex uint64) error
func (*BridgeViewStub) FindDeposit ¶
func (*BridgeViewStub) FindDeposit(d *types.ERC20Deposit, blockNumber, logIndex uint64, ethAssetAddress string) error
type BrokerStub ¶
type BrokerStub struct {
// contains filtered or unexported fields
}
func NewBrokerStub ¶
func NewBrokerStub() *BrokerStub
func (*BrokerStub) ClearAllEvents ¶
func (b *BrokerStub) ClearAllEvents()
func (*BrokerStub) ClearOrderByReference ¶
func (b *BrokerStub) ClearOrderByReference(party, ref string) error
func (*BrokerStub) ClearTransferResponseEvents ¶
func (b *BrokerStub) ClearTransferResponseEvents()
func (*BrokerStub) GetAccountEvents ¶
func (b *BrokerStub) GetAccountEvents() []events.Acc
func (*BrokerStub) GetAccounts ¶
func (b *BrokerStub) GetAccounts() []types.Account
func (*BrokerStub) GetActiveOrderDepth ¶
func (*BrokerStub) GetAllEvents ¶
func (b *BrokerStub) GetAllEvents() []events.Event
func (*BrokerStub) GetAssetNetworkTreasuryAccount ¶
func (b *BrokerStub) GetAssetNetworkTreasuryAccount(asset string) (types.Account, error)
func (*BrokerStub) GetAuctionEvents ¶
func (b *BrokerStub) GetAuctionEvents() []events.Auction
func (*BrokerStub) GetBookDepth ¶
func (*BrokerStub) GetByReference ¶
func (b *BrokerStub) GetByReference(party, ref string) (types.Order, error)
func (*BrokerStub) GetDelegationBalance ¶
func (b *BrokerStub) GetDelegationBalance(epochSeq string) []types.Delegation
func (*BrokerStub) GetDelegationBalanceEvents ¶
func (b *BrokerStub) GetDelegationBalanceEvents(epochSeq string) []events.DelegationBalance
func (*BrokerStub) GetFirstByReference ¶
func (b *BrokerStub) GetFirstByReference(party, ref string) (types.Order, error)
func (*BrokerStub) GetImmBatch ¶
func (b *BrokerStub) GetImmBatch(t events.Type) []events.Event
func (*BrokerStub) GetLPEvents ¶
func (b *BrokerStub) GetLPEvents() []events.LiquidityProvision
func (*BrokerStub) GetLPSErrors ¶
func (b *BrokerStub) GetLPSErrors() []events.TxErr
func (*BrokerStub) GetLedgerMovements ¶ added in v0.56.0
func (b *BrokerStub) GetLedgerMovements() []events.LedgerMovements
func (*BrokerStub) GetMarginByPartyAndMarket ¶
func (b *BrokerStub) GetMarginByPartyAndMarket(partyID, marketID string) (types.MarginLevels, error)
func (*BrokerStub) GetMarketInfrastructureFeePoolAccount ¶
func (b *BrokerStub) GetMarketInfrastructureFeePoolAccount(asset string) (types.Account, error)
func (*BrokerStub) GetMarketInsurancePoolAccount ¶
func (b *BrokerStub) GetMarketInsurancePoolAccount(market string) (types.Account, error)
func (*BrokerStub) GetMarketLiquidityFeePoolAccount ¶
func (b *BrokerStub) GetMarketLiquidityFeePoolAccount(market string) (types.Account, error)
func (*BrokerStub) GetMarketSettlementAccount ¶
func (b *BrokerStub) GetMarketSettlementAccount(market string) (types.Account, error)
func (*BrokerStub) GetOrderEvents ¶
func (b *BrokerStub) GetOrderEvents() []events.Order
func (*BrokerStub) GetOrdersByPartyAndMarket ¶
func (b *BrokerStub) GetOrdersByPartyAndMarket(party, market string) []types.Order
func (*BrokerStub) GetPartyBondAccount ¶
func (b *BrokerStub) GetPartyBondAccount(party, asset string) (ba types.Account, err error)
func (*BrokerStub) GetPartyBondAccountForMarket ¶
func (b *BrokerStub) GetPartyBondAccountForMarket(party, asset, marketID string) (ba types.Account, err error)
func (*BrokerStub) GetPartyGeneralAccount ¶
func (b *BrokerStub) GetPartyGeneralAccount(party, asset string) (ga types.Account, err error)
GetPartyGeneralAccount returns the latest event WRT the party's general account.
func (*BrokerStub) GetPartyMarginAccount ¶
func (b *BrokerStub) GetPartyMarginAccount(party, market string) (types.Account, error)
func (*BrokerStub) GetRejectedOrderAmendments ¶
func (b *BrokerStub) GetRejectedOrderAmendments() []events.TxErr
func (*BrokerStub) GetRewardAccountBalance ¶
func (b *BrokerStub) GetRewardAccountBalance(accountType, asset string) (ga types.Account, err error)
GetRewardAccountBalance returns the latest event WRT the reward accounts with the given type for the asset.
func (*BrokerStub) GetRewards ¶
func (b *BrokerStub) GetRewards(epochSeq string) map[AssetParty]events.RewardPayout
func (*BrokerStub) GetTradeEvents ¶
func (b *BrokerStub) GetTradeEvents() []events.Trade
func (*BrokerStub) GetTrades ¶
func (b *BrokerStub) GetTrades() []types.Trade
func (*BrokerStub) GetTxErrors ¶
func (b *BrokerStub) GetTxErrors() []events.TxErr
func (*BrokerStub) GetValidatorScores ¶
func (b *BrokerStub) GetValidatorScores(epochSeq string) map[string]events.ValidatorScore
func (*BrokerStub) Reset ¶
func (b *BrokerStub) Reset()
func (*BrokerStub) ResetType ¶
func (b *BrokerStub) ResetType(t events.Type)
func (*BrokerStub) Send ¶
func (b *BrokerStub) Send(e events.Event)
func (*BrokerStub) SendBatch ¶
func (b *BrokerStub) SendBatch(evts []events.Event)
func (*BrokerStub) SetStreaming ¶
func (b *BrokerStub) SetStreaming(v bool) bool
func (*BrokerStub) Subscribe ¶
func (b *BrokerStub) Subscribe(sub broker.Subscriber) int
func (*BrokerStub) SubscribeBatch ¶
func (b *BrokerStub) SubscribeBatch(subs ...broker.Subscriber)
func (*BrokerStub) Unsubscribe ¶
func (b *BrokerStub) Unsubscribe(k int)
type CommanderStub ¶
type CommanderStub struct{}
func NewCommanderStub ¶
func NewCommanderStub() *CommanderStub
func (*CommanderStub) CommandSync ¶
type StakingAccountStub ¶
type StakingAccountStub struct {
// contains filtered or unexported fields
}
func NewStakingAccountStub ¶
func NewStakingAccountStub() *StakingAccountStub
func (*StakingAccountStub) DecrementBalance ¶
func (t *StakingAccountStub) DecrementBalance(party string, amount *num.Uint) error
func (*StakingAccountStub) GetAvailableBalance ¶
func (t *StakingAccountStub) GetAvailableBalance(party string) (*num.Uint, error)
func (*StakingAccountStub) GetAvailableBalanceInRange ¶
func (*StakingAccountStub) IncrementBalance ¶
func (t *StakingAccountStub) IncrementBalance(party string, amount *num.Uint) error
func (*StakingAccountStub) OnEpochEvent ¶
func (t *StakingAccountStub) OnEpochEvent(ctx context.Context, epoch types.Epoch)
func (*StakingAccountStub) OnEpochRestore ¶
func (t *StakingAccountStub) OnEpochRestore(_ context.Context, _ types.Epoch)
type StateVarStub ¶
type StateVarStub struct {
// contains filtered or unexported fields
}
func NewStateVar ¶
func NewStateVar() *StateVarStub
func (*StateVarStub) NewEvent ¶
func (e *StateVarStub) NewEvent(asset, market string, eventType statevar.EventType)
func (*StateVarStub) OnFloatingPointUpdatesDurationUpdate ¶
func (*StateVarStub) ReadyForTimeTrigger ¶
func (e *StateVarStub) ReadyForTimeTrigger(asset, mktID string)
func (*StateVarStub) RegisterStateVariable ¶
func (e *StateVarStub) RegisterStateVariable(asset, market, name string, converter statevar.Converter, startCalculation func(string, statevar.FinaliseCalculation), trigger []statevar.EventType, result func(context.Context, statevar.StateVariableResult) error) error
func (*StateVarStub) UnregisterStateVariable ¶
func (e *StateVarStub) UnregisterStateVariable(asset, market string)
type TimeStub ¶
type TimeStub struct {
// contains filtered or unexported fields
}
func NewTimeStub ¶
func NewTimeStub() *TimeStub
func (*TimeStub) GetTimeNow ¶
func (*TimeStub) NotifyOnTick ¶
type TopologyStub ¶
type TopologyStub struct {
// contains filtered or unexported fields
}
func NewTopologyStub ¶
func NewTopologyStub(nodeID string, broker *BrokerStub) *TopologyStub
func (*TopologyStub) AddValidator ¶
func (ts *TopologyStub) AddValidator(node string, pubkey string)
func (*TopologyStub) AllNodeIDs ¶
func (ts *TopologyStub) AllNodeIDs() []string
func (*TopologyStub) AllVegaPubKeys ¶
func (ts *TopologyStub) AllVegaPubKeys() []string
func (*TopologyStub) Get ¶
func (ts *TopologyStub) Get(key string) *validators.ValidatorData
func (*TopologyStub) GetRewardsScores ¶
func (ts *TopologyStub) GetRewardsScores(ctx context.Context, epochSeq string, delegationState []*types.ValidatorData, stakeScoreParams types.StakeScoreParams) (*types.ScoreData, *types.ScoreData)
func (*TopologyStub) IsTendermintValidator ¶
func (ts *TopologyStub) IsTendermintValidator(pubKey string) bool
func (*TopologyStub) IsValidator ¶
func (ts *TopologyStub) IsValidator() bool
func (*TopologyStub) IsValidatorNodeID ¶
func (ts *TopologyStub) IsValidatorNodeID(nodeID string) bool
func (*TopologyStub) IsValidatorVegaPubKey ¶
func (ts *TopologyStub) IsValidatorVegaPubKey(pubKey string) bool
func (*TopologyStub) Len ¶
func (ts *TopologyStub) Len() int
func (*TopologyStub) OnMinDelegationUpdated ¶
func (*TopologyStub) RecalcValidatorSet ¶
func (*TopologyStub) RecalcValidatorSet(ctx context.Context, epochSeq string, delegationState []*types.ValidatorData, stakeScoreParams types.StakeScoreParams)
func (*TopologyStub) SelfNodeID ¶
func (ts *TopologyStub) SelfNodeID() string
func (*TopologyStub) SelfVegaPubKey ¶
func (ts *TopologyStub) SelfVegaPubKey() string
func (*TopologyStub) ValidatorPerformanceScore ¶
func (ts *TopologyStub) ValidatorPerformanceScore(nodeID string) num.Decimal
Click to show internal directories.
Click to hide internal directories.