Documentation ¶
Index ¶
- Variables
- func GetMarketIDFilter(mID string) func(Event) bool
- func GetPartyAndMarketFilter(mID, pID string) func(Event) bool
- func GetPartyIDFilter(pID string) func(Event) bool
- type Acc
- type Asset
- type Auction
- type Base
- type BeginBlock
- type Checkpoint
- type DelegationBalance
- type Deposit
- type DistressedOrders
- func (d DistressedOrders) IsMarket(marketID string) bool
- func (d DistressedOrders) IsParty(partyID string) bool
- func (d DistressedOrders) MarketID() string
- func (d DistressedOrders) Parties() []string
- func (d DistressedOrders) Proto() eventspb.DistressedOrders
- func (d DistressedOrders) StreamMarketMessage() *eventspb.BusEvent
- func (d DistressedOrders) StreamMessage() *eventspb.BusEvent
- type ERC20MultiSigSigner
- type ERC20MultiSigSignerAdded
- type ERC20MultiSigSignerRemoved
- type ERC20MultiSigThresholdSet
- type EndBlock
- type EpochEvent
- type EthereumKeyRotation
- type Event
- type ExpiredOrders
- func (d ExpiredOrders) CompositeCount() uint64
- func (d ExpiredOrders) IsMarket(marketID string) bool
- func (d ExpiredOrders) MarketID() string
- func (d ExpiredOrders) OrderIDs() []string
- func (d ExpiredOrders) Proto() eventspb.ExpiredOrders
- func (d ExpiredOrders) StreamMarketMessage() *eventspb.BusEvent
- func (d ExpiredOrders) StreamMessage() *eventspb.BusEvent
- type FeesTransfer
- type KeyRotation
- type LedgerMovements
- type LiquidityProvision
- func (p LiquidityProvision) IsParty(id string) bool
- func (p LiquidityProvision) LiquidityProvision() *proto.LiquidityProvision
- func (p LiquidityProvision) MarketID() string
- func (p LiquidityProvision) PartyID() string
- func (p LiquidityProvision) Proto() *proto.LiquidityProvision
- func (p LiquidityProvision) StreamMessage() *eventspb.BusEvent
- type LossSoc
- func (l LossSoc) Amount() *num.Int
- func (l LossSoc) IsParty(id string) bool
- func (l LossSoc) MarketID() string
- func (l LossSoc) Negative() bool
- func (l LossSoc) PartyID() string
- func (l LossSoc) Proto() eventspb.LossSocialization
- func (l LossSoc) StreamMessage() *eventspb.BusEvent
- func (l LossSoc) Timestamp() int64
- type LossSocialization
- type Margin
- type MarginLevels
- func (m MarginLevels) Asset() string
- func (m MarginLevels) IsParty(id string) bool
- func (m MarginLevels) MarginLevels() proto.MarginLevels
- func (m MarginLevels) MarketID() string
- func (m MarginLevels) PartyID() string
- func (m MarginLevels) Proto() proto.MarginLevels
- func (m MarginLevels) StreamMessage() *eventspb.BusEvent
- type MarketCreated
- func (m MarketCreated) Market() proto.Market
- func (m MarketCreated) MarketEvent() string
- func (m MarketCreated) MarketID() string
- func (m MarketCreated) MarketProto() eventspb.MarketEvent
- func (m MarketCreated) Proto() proto.Market
- func (m MarketCreated) StreamMarketMessage() *eventspb.BusEvent
- func (m MarketCreated) StreamMessage() *eventspb.BusEvent
- type MarketData
- type MarketPosition
- type MarketTick
- func (m MarketTick) MarketEvent() string
- func (m MarketTick) MarketID() string
- func (m MarketTick) MarketProto() eventspb.MarketEvent
- func (m MarketTick) Proto() eventspb.MarketTick
- func (m MarketTick) StreamMarketMessage() *eventspb.BusEvent
- func (m MarketTick) StreamMessage() *eventspb.BusEvent
- func (m MarketTick) Time() time.Time
- type MarketUpdated
- func (m MarketUpdated) Market() proto.Market
- func (m MarketUpdated) MarketEvent() string
- func (m MarketUpdated) MarketID() string
- func (m MarketUpdated) MarketProto() eventspb.MarketEvent
- func (m MarketUpdated) Proto() proto.Market
- func (m MarketUpdated) StreamMarketMessage() *eventspb.BusEvent
- func (m MarketUpdated) StreamMessage() *eventspb.BusEvent
- type NetworkLimits
- type NetworkParameter
- type NodeSignature
- type OracleData
- type OracleSpec
- type Order
- type Party
- type PosRes
- func (p PosRes) Closed() int
- func (p PosRes) Distressed() int
- func (p PosRes) MarkPrice() *num.Uint
- func (p PosRes) MarketEvent() string
- func (p PosRes) MarketID() string
- func (p PosRes) MarketProto() eventspb.MarketEvent
- func (p PosRes) Proto() eventspb.PositionResolution
- func (p PosRes) StreamMarketMessage() *eventspb.BusEvent
- func (p PosRes) StreamMessage() *eventspb.BusEvent
- type PositionState
- func (s PositionState) IsParty(id string) bool
- func (s PositionState) MarketID() string
- func (s PositionState) PartyID() string
- func (s PositionState) PotentialBuys() int64
- func (s PositionState) PotentialSells() int64
- func (s PositionState) Proto() eventspb.PositionStateEvent
- func (s PositionState) Size() int64
- func (s PositionState) StreamMessage() *eventspb.BusEvent
- func (s PositionState) VWBuyPrice() *num.Uint
- func (s PositionState) VWSellPrice() *num.Uint
- type Proposal
- type ProtocolUpgradeDataNodeReady
- type ProtocolUpgradeProposalEvent
- type ProtocolUpgradeStarted
- type RewardPayout
- type Risk
- type RiskFactor
- type SettleDistressed
- func (s SettleDistressed) IsParty(id string) bool
- func (s SettleDistressed) Margin() *num.Uint
- func (s SettleDistressed) MarketID() string
- func (s SettleDistressed) PartyID() string
- func (s SettleDistressed) Price() *num.Uint
- func (s SettleDistressed) Proto() eventspb.SettleDistressed
- func (s SettleDistressed) StreamMessage() *eventspb.BusEvent
- func (s SettleDistressed) Timestamp() int64
- type SettleMarket
- func (m SettleMarket) MarketID() string
- func (m SettleMarket) PartyID() string
- func (m SettleMarket) PositionFactor() num.Decimal
- func (m SettleMarket) Proto() *eventspb.SettleMarket
- func (m SettleMarket) SettledPrice() *num.Uint
- func (m SettleMarket) StreamMessage() *eventspb.BusEvent
- func (m SettleMarket) Timestamp() int64
- type SettlePos
- func (s SettlePos) IsParty(id string) bool
- func (s SettlePos) MarketID() string
- func (s SettlePos) PartyID() string
- func (s SettlePos) PositionFactor() num.Decimal
- func (s SettlePos) Price() *num.Uint
- func (s SettlePos) Proto() eventspb.SettlePosition
- func (s SettlePos) StreamMessage() *eventspb.BusEvent
- func (s SettlePos) Timestamp() int64
- func (s SettlePos) Trades() []TradeSettlement
- type SettlePosition
- type SnapshotTakenEvent
- type StakeLinking
- type StateVar
- type Time
- type Trade
- type TradeSettlement
- type TransactionResult
- func NewTransactionResultEventFailure(ctx context.Context, hash, party string, err error, tx interface{}) *TransactionResult
- func NewTransactionResultEventSuccess(ctx context.Context, hash, party string, tx interface{}) *TransactionResult
- func TransactionResultEventFromStream(ctx context.Context, be *eventspb.BusEvent) *TransactionResult
- type Transfer
- type TransferFunds
- func NewOneOffTransferFundsEvent(ctx context.Context, t *types.OneOffTransfer) *TransferFunds
- func NewOneOffTransferFundsEventWithReason(ctx context.Context, t *types.OneOffTransfer, reason string) *TransferFunds
- func NewRecurringTransferFundsEvent(ctx context.Context, t *types.RecurringTransfer) *TransferFunds
- func NewRecurringTransferFundsEventWithReason(ctx context.Context, t *types.RecurringTransfer, reason string) *TransferFunds
- func TransferFundsEventFromStream(ctx context.Context, be *eventspb.BusEvent) *TransferFunds
- type TxErr
- type Type
- type ValidatorRanking
- type ValidatorScore
- type ValidatorUpdate
- func (vu ValidatorUpdate) AvatarURL() string
- func (vu ValidatorUpdate) Country() string
- func (vu ValidatorUpdate) EthereumAddress() string
- func (vu ValidatorUpdate) InfoURL() string
- func (vu ValidatorUpdate) Name() string
- func (vu ValidatorUpdate) NodeID() string
- func (vu ValidatorUpdate) Proto() eventspb.ValidatorUpdate
- func (vu ValidatorUpdate) StreamMessage() *eventspb.BusEvent
- func (vu ValidatorUpdate) TendermintPublicKey() string
- func (vu ValidatorUpdate) ValidatorUpdate() eventspb.ValidatorUpdate
- func (vu ValidatorUpdate) VegaPublicKey() string
- func (vu ValidatorUpdate) VegaPublicKeyIndex() uint32
- type Vote
- func (v Vote) IsParty(id string) bool
- func (v *Vote) PartyID() string
- func (v *Vote) ProposalID() string
- func (v Vote) Proto() proto.Vote
- func (v Vote) StreamMessage() *eventspb.BusEvent
- func (v *Vote) TotalGovernanceTokenBalance() string
- func (v *Vote) TotalGovernanceTokenWeight() string
- func (v *Vote) Value() proto.Vote_Value
- func (v *Vote) Vote() proto.Vote
- type Withdrawal
Constants ¶
This section is empty.
Variables ¶
var ( ErrUnsupportedEvent = errors.New("unknown payload for event") ErrInvalidEventType = errors.New("invalid proto event type") )
Functions ¶
func GetMarketIDFilter ¶
func GetPartyAndMarketFilter ¶
func GetPartyIDFilter ¶
Types ¶
type Acc ¶
type Acc struct { *Base // contains filtered or unexported fields }
func AccountEventFromStream ¶
func (Acc) StreamMessage ¶
type Asset ¶
type Asset struct { *Base // contains filtered or unexported fields }
func AssetEventFromStream ¶
func (Asset) StreamMessage ¶
type Auction ¶
type Auction struct { *Base // contains filtered or unexported fields }
func AuctionEventFromStream ¶
func NewAuctionEvent ¶
func NewAuctionEvent(ctx context.Context, marketID string, leave bool, start, stop int64, triggers ...types.AuctionTrigger) *Auction
NewAuctionEvent creates a new auction event object.
func (Auction) Auction ¶
Auction returns the action performed (either true=leave auction, or false=entering auction).
func (Auction) MarketEvent ¶
MarketEvent - implement market event interface so we can log this event.
func (Auction) Proto ¶
func (a Auction) Proto() eventspb.AuctionEvent
Proto wrap event data in a proto message.
func (Auction) StreamMarketMessage ¶
StreamMarketMessage - allows for this event to be streamed as just a market event containing just market ID and a string akin to a log message.
func (Auction) StreamMessage ¶
StreamMessage returns the BusEvent message for the event stream API.
type Base ¶
type Base struct {
// contains filtered or unexported fields
}
Base common denominator all event-bus events share.
func (Base) CompositeCount ¶ added in v0.68.0
CompositeCount on the base event will default to 1.
func (*Base) SetSequenceID ¶
type BeginBlock ¶ added in v0.56.0
type BeginBlock struct { *Base // contains filtered or unexported fields }
func BeginBlockEventFromStream ¶ added in v0.56.0
func BeginBlockEventFromStream(ctx context.Context, be *eventspb.BusEvent) *BeginBlock
func NewBeginBlock ¶ added in v0.56.0
func NewBeginBlock(ctx context.Context, bb eventspb.BeginBlock) *BeginBlock
NewTime returns a new time Update event.
func (BeginBlock) BeginBlock ¶ added in v0.56.0
func (b BeginBlock) BeginBlock() eventspb.BeginBlock
Time returns the new blocktime.
func (BeginBlock) Proto ¶ added in v0.56.0
func (b BeginBlock) Proto() eventspb.BeginBlock
func (BeginBlock) StreamMessage ¶ added in v0.56.0
func (b BeginBlock) StreamMessage() *eventspb.BusEvent
type Checkpoint ¶
type Checkpoint struct { *Base // contains filtered or unexported fields }
func CheckpointEventFromStream ¶
func CheckpointEventFromStream(ctx context.Context, be *eventspb.BusEvent) *Checkpoint
func NewCheckpointEvent ¶
func NewCheckpointEvent(ctx context.Context, snap *types.CheckpointState) *Checkpoint
func (Checkpoint) Proto ¶
func (e Checkpoint) Proto() eventspb.CheckpointEvent
func (Checkpoint) StreamMessage ¶
func (e Checkpoint) StreamMessage() *eventspb.BusEvent
type DelegationBalance ¶
func DelegationBalanceEventFromStream ¶
func DelegationBalanceEventFromStream(ctx context.Context, be *eventspb.BusEvent) *DelegationBalance
func NewDelegationBalance ¶
func (DelegationBalance) Proto ¶
func (db DelegationBalance) Proto() eventspb.DelegationBalanceEvent
func (DelegationBalance) StreamMessage ¶
func (db DelegationBalance) StreamMessage() *eventspb.BusEvent
type Deposit ¶
type Deposit struct { *Base // contains filtered or unexported fields }
func DepositEventFromStream ¶
func (Deposit) StreamMessage ¶
type DistressedOrders ¶ added in v0.68.0
type DistressedOrders struct { *Base // contains filtered or unexported fields }
DistressedOrders contains the market and parties that needed to have their orders closed in order to maintain their open positions on the market.
func DistressedOrdersEventFromStream ¶ added in v0.68.0
func DistressedOrdersEventFromStream(ctx context.Context, be *eventspb.BusEvent) *DistressedOrders
func NewDistressedOrdersEvent ¶ added in v0.68.0
func NewDistressedOrdersEvent(ctx context.Context, marketID string, parties []string) *DistressedOrders
func (DistressedOrders) IsMarket ¶ added in v0.68.0
func (d DistressedOrders) IsMarket(marketID string) bool
func (DistressedOrders) IsParty ¶ added in v0.68.0
func (d DistressedOrders) IsParty(partyID string) bool
func (DistressedOrders) MarketID ¶ added in v0.68.0
func (d DistressedOrders) MarketID() string
func (DistressedOrders) Parties ¶ added in v0.68.0
func (d DistressedOrders) Parties() []string
func (DistressedOrders) Proto ¶ added in v0.68.0
func (d DistressedOrders) Proto() eventspb.DistressedOrders
func (DistressedOrders) StreamMarketMessage ¶ added in v0.68.0
func (d DistressedOrders) StreamMarketMessage() *eventspb.BusEvent
func (DistressedOrders) StreamMessage ¶ added in v0.68.0
func (d DistressedOrders) StreamMessage() *eventspb.BusEvent
type ERC20MultiSigSigner ¶
type ERC20MultiSigSigner struct { *Base // contains filtered or unexported fields }
func ERC20MultiSigSignerFromStream ¶
func ERC20MultiSigSignerFromStream(ctx context.Context, be *eventspb.BusEvent) *ERC20MultiSigSigner
func NewERC20MultiSigSigner ¶
func NewERC20MultiSigSigner(ctx context.Context, evt types.SignerEvent) *ERC20MultiSigSigner
func (ERC20MultiSigSigner) ERC20MultiSigSigner ¶
func (s ERC20MultiSigSigner) ERC20MultiSigSigner() eventspb.ERC20MultiSigSignerEvent
func (ERC20MultiSigSigner) Proto ¶
func (s ERC20MultiSigSigner) Proto() eventspb.ERC20MultiSigSignerEvent
func (ERC20MultiSigSigner) StreamMessage ¶
func (s ERC20MultiSigSigner) StreamMessage() *eventspb.BusEvent
type ERC20MultiSigSignerAdded ¶
type ERC20MultiSigSignerAdded struct { *Base // contains filtered or unexported fields }
func ERC20MultiSigSignerAddedFromStream ¶
func ERC20MultiSigSignerAddedFromStream(ctx context.Context, be *eventspb.BusEvent) *ERC20MultiSigSignerAdded
func NewERC20MultiSigSignerAdded ¶
func NewERC20MultiSigSignerAdded(ctx context.Context, evt eventspb.ERC20MultiSigSignerAdded) *ERC20MultiSigSignerAdded
func (ERC20MultiSigSignerAdded) ERC20MultiSigSignerAdded ¶
func (s ERC20MultiSigSignerAdded) ERC20MultiSigSignerAdded() eventspb.ERC20MultiSigSignerAdded
func (ERC20MultiSigSignerAdded) Proto ¶
func (s ERC20MultiSigSignerAdded) Proto() eventspb.ERC20MultiSigSignerAdded
func (ERC20MultiSigSignerAdded) StreamMessage ¶
func (s ERC20MultiSigSignerAdded) StreamMessage() *eventspb.BusEvent
type ERC20MultiSigSignerRemoved ¶
type ERC20MultiSigSignerRemoved struct { *Base // contains filtered or unexported fields }
func ERC20MultiSigSignerRemovedFromStream ¶
func ERC20MultiSigSignerRemovedFromStream(ctx context.Context, be *eventspb.BusEvent) *ERC20MultiSigSignerRemoved
func NewERC20MultiSigSignerRemoved ¶
func NewERC20MultiSigSignerRemoved(ctx context.Context, evt eventspb.ERC20MultiSigSignerRemoved) *ERC20MultiSigSignerRemoved
func (ERC20MultiSigSignerRemoved) ERC20MultiSigSignerRemoved ¶
func (s ERC20MultiSigSignerRemoved) ERC20MultiSigSignerRemoved() eventspb.ERC20MultiSigSignerRemoved
func (ERC20MultiSigSignerRemoved) Proto ¶
func (s ERC20MultiSigSignerRemoved) Proto() eventspb.ERC20MultiSigSignerRemoved
func (ERC20MultiSigSignerRemoved) StreamMessage ¶
func (s ERC20MultiSigSignerRemoved) StreamMessage() *eventspb.BusEvent
type ERC20MultiSigThresholdSet ¶
type ERC20MultiSigThresholdSet struct { *Base // contains filtered or unexported fields }
func ERC20MultiSigThresholdSetFromStream ¶
func ERC20MultiSigThresholdSetFromStream(ctx context.Context, be *eventspb.BusEvent) *ERC20MultiSigThresholdSet
func NewERC20MultiSigThresholdSet ¶
func NewERC20MultiSigThresholdSet(ctx context.Context, evt types.SignerThresholdSetEvent) *ERC20MultiSigThresholdSet
func (ERC20MultiSigThresholdSet) ERC20MultiSigThresholdSet ¶
func (s ERC20MultiSigThresholdSet) ERC20MultiSigThresholdSet() eventspb.ERC20MultiSigThresholdSetEvent
func (ERC20MultiSigThresholdSet) Proto ¶
func (s ERC20MultiSigThresholdSet) Proto() eventspb.ERC20MultiSigThresholdSetEvent
func (ERC20MultiSigThresholdSet) StreamMessage ¶
func (s ERC20MultiSigThresholdSet) StreamMessage() *eventspb.BusEvent
type EndBlock ¶ added in v0.56.0
type EndBlock struct { *Base // contains filtered or unexported fields }
func EndBlockEventFromStream ¶ added in v0.56.0
func NewEndBlock ¶ added in v0.56.0
NewTime returns a new time Update event.
func (EndBlock) StreamMessage ¶ added in v0.56.0
type EpochEvent ¶
type EpochEvent struct { *Base // contains filtered or unexported fields }
func EpochEventFromStream ¶
func EpochEventFromStream(ctx context.Context, be *eventspb.BusEvent) *EpochEvent
func NewEpochEvent ¶
func NewEpochEvent(ctx context.Context, e *types.Epoch) *EpochEvent
func (*EpochEvent) Epoch ¶
func (e *EpochEvent) Epoch() *eventspb.EpochEvent
func (EpochEvent) Proto ¶
func (e EpochEvent) Proto() eventspb.EpochEvent
func (EpochEvent) StreamMessage ¶
func (e EpochEvent) StreamMessage() *eventspb.BusEvent
type EthereumKeyRotation ¶
type EthereumKeyRotation struct { *Base NodeID string OldAddr string NewAddr string BlockHeight uint64 }
EthereumKeyRotation ...
func EthereumKeyRotationEventFromStream ¶
func EthereumKeyRotationEventFromStream(ctx context.Context, be *eventspb.BusEvent) *EthereumKeyRotation
func (EthereumKeyRotation) EthereumKeyRotation ¶
func (kr EthereumKeyRotation) EthereumKeyRotation() eventspb.EthereumKeyRotation
func (EthereumKeyRotation) Proto ¶
func (kr EthereumKeyRotation) Proto() eventspb.EthereumKeyRotation
func (EthereumKeyRotation) StreamMessage ¶
func (kr EthereumKeyRotation) StreamMessage() *eventspb.BusEvent
type Event ¶
type Event interface { Type() Type Context() context.Context TraceID() string TxHash() string ChainID() string Sequence() uint64 SetSequenceID(s uint64) BlockNr() int64 StreamMessage() *eventspb.BusEvent // used for events like ExpiredOrders. It is used to increment the sequence ID by the number of records // this event will produce to ensure history tables using time + sequence number to function properly. CompositeCount() uint64 }
Event - the base event interface type, add sequence ID setter here, because the type assertions in broker seem to be a bottleneck. Change its behaviour so as to only set the sequence ID once.
type ExpiredOrders ¶ added in v0.68.0
type ExpiredOrders struct { *Base // contains filtered or unexported fields }
ExpiredOrders contains the market and parties that needed to have their orders closed in order to maintain their open positions on the market.
func ExpiredOrdersEventFromStream ¶ added in v0.68.0
func ExpiredOrdersEventFromStream(ctx context.Context, be *eventspb.BusEvent) *ExpiredOrders
func NewExpiredOrdersEvent ¶ added in v0.68.0
func NewExpiredOrdersEvent(ctx context.Context, marketID string, orders []string) *ExpiredOrders
func (ExpiredOrders) CompositeCount ¶ added in v0.68.0
func (d ExpiredOrders) CompositeCount() uint64
func (ExpiredOrders) IsMarket ¶ added in v0.68.0
func (d ExpiredOrders) IsMarket(marketID string) bool
func (ExpiredOrders) MarketID ¶ added in v0.68.0
func (d ExpiredOrders) MarketID() string
func (ExpiredOrders) OrderIDs ¶ added in v0.68.0
func (d ExpiredOrders) OrderIDs() []string
func (ExpiredOrders) Proto ¶ added in v0.68.0
func (d ExpiredOrders) Proto() eventspb.ExpiredOrders
func (ExpiredOrders) StreamMarketMessage ¶ added in v0.68.0
func (d ExpiredOrders) StreamMarketMessage() *eventspb.BusEvent
func (ExpiredOrders) StreamMessage ¶ added in v0.68.0
func (d ExpiredOrders) StreamMessage() *eventspb.BusEvent
type FeesTransfer ¶
type FeesTransfer interface { // The list of transfers to be made by the collateral Transfers() []*types.Transfer // The total amount of fees to be paid (all cumulated) // per party if all the transfers are to be executed // map is party id -> total amount of fees to be transferred TotalFeesAmountPerParty() map[string]*num.Uint }
FeeTransfer is a transfer initiated after trade occurs.
type KeyRotation ¶
type KeyRotation struct { *Base NodeID string OldPubKey string NewPubKey string BlockHeight uint64 }
KeyRotation ...
func KeyRotationEventFromStream ¶
func KeyRotationEventFromStream(ctx context.Context, be *eventspb.BusEvent) *KeyRotation
func NewVegaKeyRotationEvent ¶
func (KeyRotation) KeyRotation ¶
func (kr KeyRotation) KeyRotation() eventspb.KeyRotation
func (KeyRotation) Proto ¶
func (kr KeyRotation) Proto() eventspb.KeyRotation
func (KeyRotation) StreamMessage ¶
func (kr KeyRotation) StreamMessage() *eventspb.BusEvent
type LedgerMovements ¶ added in v0.56.0
type LedgerMovements struct { *Base // contains filtered or unexported fields }
func NewLedgerMovements ¶ added in v0.56.0
func NewLedgerMovements(ctx context.Context, ledgerMovements []*types.LedgerMovement) *LedgerMovements
NewLedgerMovements returns an event with transfer responses - this is the replacement of the transfer buffer.
func TransferResponseEventFromStream ¶
func TransferResponseEventFromStream(ctx context.Context, be *eventspb.BusEvent) *LedgerMovements
func (*LedgerMovements) IsParty ¶ added in v0.56.0
func (t *LedgerMovements) IsParty(id string) bool
func (*LedgerMovements) LedgerMovements ¶ added in v0.56.0
func (t *LedgerMovements) LedgerMovements() []*ptypes.LedgerMovement
LedgerMovements returns the actual event payload.
func (*LedgerMovements) Proto ¶ added in v0.56.0
func (t *LedgerMovements) Proto() eventspb.LedgerMovements
func (*LedgerMovements) StreamMessage ¶ added in v0.56.0
func (t *LedgerMovements) StreamMessage() *eventspb.BusEvent
type LiquidityProvision ¶
type LiquidityProvision struct { *Base // contains filtered or unexported fields }
func LiquidityProvisionEventFromStream ¶
func LiquidityProvisionEventFromStream(ctx context.Context, be *eventspb.BusEvent) *LiquidityProvision
func NewLiquidityProvisionEvent ¶
func NewLiquidityProvisionEvent(ctx context.Context, p *types.LiquidityProvision) *LiquidityProvision
func (LiquidityProvision) IsParty ¶
func (p LiquidityProvision) IsParty(id string) bool
func (LiquidityProvision) LiquidityProvision ¶
func (p LiquidityProvision) LiquidityProvision() *proto.LiquidityProvision
func (LiquidityProvision) MarketID ¶
func (p LiquidityProvision) MarketID() string
func (LiquidityProvision) PartyID ¶
func (p LiquidityProvision) PartyID() string
func (LiquidityProvision) Proto ¶
func (p LiquidityProvision) Proto() *proto.LiquidityProvision
func (LiquidityProvision) StreamMessage ¶
func (p LiquidityProvision) StreamMessage() *eventspb.BusEvent
type LossSoc ¶
type LossSoc struct { *Base // contains filtered or unexported fields }
func (LossSoc) Proto ¶
func (l LossSoc) Proto() eventspb.LossSocialization
func (LossSoc) StreamMessage ¶
type LossSocialization ¶
LossSocialization ...
type Margin ¶
type Margin interface { MarketPosition Asset() string MarginBalance() *num.Uint GeneralBalance() *num.Uint BondBalance() *num.Uint MarketID() string MarginShortFall() *num.Uint }
Margin is an event with a change to balances after settling e.g. MTM.
type MarginLevels ¶
type MarginLevels struct { *Base // contains filtered or unexported fields }
MarginLevels - the margin levels event.
func MarginLevelsEventFromStream ¶
func MarginLevelsEventFromStream(ctx context.Context, be *eventspb.BusEvent) *MarginLevels
func NewMarginLevelsEvent ¶
func NewMarginLevelsEvent(ctx context.Context, l types.MarginLevels) *MarginLevels
func (MarginLevels) Asset ¶
func (m MarginLevels) Asset() string
func (MarginLevels) IsParty ¶
func (m MarginLevels) IsParty(id string) bool
func (MarginLevels) MarginLevels ¶
func (m MarginLevels) MarginLevels() proto.MarginLevels
func (MarginLevels) MarketID ¶
func (m MarginLevels) MarketID() string
func (MarginLevels) PartyID ¶
func (m MarginLevels) PartyID() string
func (MarginLevels) Proto ¶
func (m MarginLevels) Proto() proto.MarginLevels
func (MarginLevels) StreamMessage ¶
func (m MarginLevels) StreamMessage() *eventspb.BusEvent
type MarketCreated ¶
type MarketCreated struct { *Base // contains filtered or unexported fields }
func MarketCreatedEventFromStream ¶
func MarketCreatedEventFromStream(ctx context.Context, be *eventspb.BusEvent) *MarketCreated
func NewMarketCreatedEvent ¶
func NewMarketCreatedEvent(ctx context.Context, m types.Market) *MarketCreated
func (MarketCreated) Market ¶
func (m MarketCreated) Market() proto.Market
func (MarketCreated) MarketEvent ¶
func (m MarketCreated) MarketEvent() string
MarketEvent -> is needs to be logged as a market event.
func (MarketCreated) MarketID ¶
func (m MarketCreated) MarketID() string
func (MarketCreated) MarketProto ¶
func (m MarketCreated) MarketProto() eventspb.MarketEvent
func (MarketCreated) Proto ¶
func (m MarketCreated) Proto() proto.Market
func (MarketCreated) StreamMarketMessage ¶
func (m MarketCreated) StreamMarketMessage() *eventspb.BusEvent
func (MarketCreated) StreamMessage ¶
func (m MarketCreated) StreamMessage() *eventspb.BusEvent
type MarketData ¶
type MarketData struct { *Base // contains filtered or unexported fields }
func MarketDataEventFromStream ¶
func MarketDataEventFromStream(ctx context.Context, be *eventspb.BusEvent) *MarketData
func NewMarketDataEvent ¶
func NewMarketDataEvent(ctx context.Context, md types.MarketData) *MarketData
func (MarketData) MarketData ¶
func (m MarketData) MarketData() proto.MarketData
func (MarketData) MarketID ¶
func (m MarketData) MarketID() string
func (MarketData) Proto ¶
func (m MarketData) Proto() proto.MarketData
func (MarketData) StreamMessage ¶
func (m MarketData) StreamMessage() *eventspb.BusEvent
type MarketPosition ¶
type MarketPosition interface { Party() string Size() int64 Buy() int64 Sell() int64 Price() *num.Uint VWBuy() *num.Uint VWSell() *num.Uint }
MarketPosition is an event with a change to a position.
type MarketTick ¶
type MarketTick struct { *Base // contains filtered or unexported fields }
func MarketTickEventFromStream ¶
func MarketTickEventFromStream(ctx context.Context, be *eventspb.BusEvent) *MarketTick
func NewMarketTick ¶
func (MarketTick) MarketEvent ¶
func (m MarketTick) MarketEvent() string
func (MarketTick) MarketID ¶
func (m MarketTick) MarketID() string
func (MarketTick) MarketProto ¶
func (m MarketTick) MarketProto() eventspb.MarketEvent
func (MarketTick) Proto ¶
func (m MarketTick) Proto() eventspb.MarketTick
func (MarketTick) StreamMarketMessage ¶
func (m MarketTick) StreamMarketMessage() *eventspb.BusEvent
func (MarketTick) StreamMessage ¶
func (m MarketTick) StreamMessage() *eventspb.BusEvent
func (MarketTick) Time ¶
func (m MarketTick) Time() time.Time
type MarketUpdated ¶
type MarketUpdated struct { *Base // contains filtered or unexported fields }
func MarketUpdatedEventFromStream ¶
func MarketUpdatedEventFromStream(ctx context.Context, be *eventspb.BusEvent) *MarketUpdated
func NewMarketUpdatedEvent ¶
func NewMarketUpdatedEvent(ctx context.Context, m types.Market) *MarketUpdated
func (MarketUpdated) Market ¶
func (m MarketUpdated) Market() proto.Market
func (MarketUpdated) MarketEvent ¶
func (m MarketUpdated) MarketEvent() string
MarketEvent -> is needs to be logged as a market event.
func (MarketUpdated) MarketID ¶
func (m MarketUpdated) MarketID() string
func (MarketUpdated) MarketProto ¶
func (m MarketUpdated) MarketProto() eventspb.MarketEvent
func (MarketUpdated) Proto ¶
func (m MarketUpdated) Proto() proto.Market
func (MarketUpdated) StreamMarketMessage ¶
func (m MarketUpdated) StreamMarketMessage() *eventspb.BusEvent
func (MarketUpdated) StreamMessage ¶
func (m MarketUpdated) StreamMessage() *eventspb.BusEvent
type NetworkLimits ¶
type NetworkLimits struct { *Base // contains filtered or unexported fields }
func NetworkLimitsEventFromStream ¶
func NetworkLimitsEventFromStream(ctx context.Context, be *eventspb.BusEvent) *NetworkLimits
func NewNetworkLimitsEvent ¶
func NewNetworkLimitsEvent(ctx context.Context, limits *proto.NetworkLimits) *NetworkLimits
func (*NetworkLimits) NetworkLimits ¶
func (n *NetworkLimits) NetworkLimits() *proto.NetworkLimits
func (NetworkLimits) Proto ¶
func (n NetworkLimits) Proto() *proto.NetworkLimits
func (NetworkLimits) StreamMessage ¶
func (n NetworkLimits) StreamMessage() *eventspb.BusEvent
type NetworkParameter ¶
type NetworkParameter struct { *Base // contains filtered or unexported fields }
func NetworkParameterEventFromStream ¶
func NetworkParameterEventFromStream(ctx context.Context, be *eventspb.BusEvent) *NetworkParameter
func NewNetworkParameterEvent ¶
func NewNetworkParameterEvent(ctx context.Context, key, value string) *NetworkParameter
func (*NetworkParameter) NetworkParameter ¶
func (n *NetworkParameter) NetworkParameter() proto.NetworkParameter
func (NetworkParameter) Proto ¶
func (n NetworkParameter) Proto() proto.NetworkParameter
func (NetworkParameter) StreamMessage ¶
func (n NetworkParameter) StreamMessage() *eventspb.BusEvent
type NodeSignature ¶
type NodeSignature struct { *Base // contains filtered or unexported fields }
NodeSignature ...
func NewNodeSignatureEvent ¶
func NewNodeSignatureEvent(ctx context.Context, e commandspb.NodeSignature) *NodeSignature
func NodeSignatureEventFromStream ¶
func NodeSignatureEventFromStream(ctx context.Context, be *eventspb.BusEvent) *NodeSignature
func (NodeSignature) NodeSignature ¶
func (n NodeSignature) NodeSignature() commandspb.NodeSignature
func (NodeSignature) Proto ¶
func (n NodeSignature) Proto() commandspb.NodeSignature
func (NodeSignature) StreamMessage ¶
func (n NodeSignature) StreamMessage() *eventspb.BusEvent
type OracleData ¶
type OracleData struct { *Base // contains filtered or unexported fields }
func NewOracleDataEvent ¶
func NewOracleDataEvent(ctx context.Context, spec vegapb.OracleData) *OracleData
func OracleDataEventFromStream ¶
func OracleDataEventFromStream(ctx context.Context, be *eventspb.BusEvent) *OracleData
func (*OracleData) OracleData ¶
func (o *OracleData) OracleData() vegapb.OracleData
func (OracleData) Proto ¶
func (o OracleData) Proto() vegapb.OracleData
func (OracleData) StreamMessage ¶
func (o OracleData) StreamMessage() *eventspb.BusEvent
type OracleSpec ¶
type OracleSpec struct { *Base // contains filtered or unexported fields }
func NewOracleSpecEvent ¶
func NewOracleSpecEvent(ctx context.Context, spec vegapb.OracleSpec) *OracleSpec
func OracleSpecEventFromStream ¶
func OracleSpecEventFromStream(ctx context.Context, be *eventspb.BusEvent) *OracleSpec
func (*OracleSpec) OracleSpec ¶
func (o *OracleSpec) OracleSpec() vegapb.OracleSpec
func (OracleSpec) Proto ¶
func (o OracleSpec) Proto() vegapb.OracleSpec
func (OracleSpec) StreamMessage ¶
func (o OracleSpec) StreamMessage() *eventspb.BusEvent
type Order ¶
type Order struct { *Base // contains filtered or unexported fields }
func OrderEventFromStream ¶
func (Order) StreamMessage ¶
type Party ¶
type Party struct { *Base // contains filtered or unexported fields }
func PartyEventFromStream ¶
func (Party) StreamMessage ¶
type PosRes ¶
type PosRes struct { *Base // contains filtered or unexported fields }
func NewPositionResolution ¶
func (PosRes) Distressed ¶
func (PosRes) MarketEvent ¶
MarketEvent implement the MarketEvent interface.
func (PosRes) MarketProto ¶
func (p PosRes) MarketProto() eventspb.MarketEvent
func (PosRes) Proto ¶
func (p PosRes) Proto() eventspb.PositionResolution
func (PosRes) StreamMarketMessage ¶
func (PosRes) StreamMessage ¶
type PositionState ¶
type PositionState struct { *Base // contains filtered or unexported fields }
func NewPositionStateEvent ¶
func NewPositionStateEvent(ctx context.Context, mp MarketPosition, marketID string) *PositionState
func PositionStateEventFromStream ¶
func PositionStateEventFromStream(ctx context.Context, be *eventspb.BusEvent) *PositionState
func (PositionState) IsParty ¶
func (s PositionState) IsParty(id string) bool
func (PositionState) MarketID ¶
func (s PositionState) MarketID() string
func (PositionState) PartyID ¶
func (s PositionState) PartyID() string
func (PositionState) PotentialBuys ¶
func (s PositionState) PotentialBuys() int64
func (PositionState) PotentialSells ¶
func (s PositionState) PotentialSells() int64
func (PositionState) Proto ¶
func (s PositionState) Proto() eventspb.PositionStateEvent
func (PositionState) Size ¶
func (s PositionState) Size() int64
func (PositionState) StreamMessage ¶
func (s PositionState) StreamMessage() *eventspb.BusEvent
func (PositionState) VWBuyPrice ¶
func (s PositionState) VWBuyPrice() *num.Uint
func (PositionState) VWSellPrice ¶
func (s PositionState) VWSellPrice() *num.Uint
type Proposal ¶
type Proposal struct { *Base // contains filtered or unexported fields }
func ProposalEventFromStream ¶
func (*Proposal) ProposalID ¶
ProposalID - for combined subscriber, communal interface.
func (Proposal) StreamMessage ¶
type ProtocolUpgradeDataNodeReady ¶ added in v0.65.0
type ProtocolUpgradeDataNodeReady struct { *Base // contains filtered or unexported fields }
func NewProtocolUpgradeDataNodeReady ¶ added in v0.65.0
func NewProtocolUpgradeDataNodeReady(ctx context.Context, lastBlockHeight int64) *ProtocolUpgradeDataNodeReady
func ProtocolUpgradeDataNodeReadyEventFromStream ¶ added in v0.65.0
func ProtocolUpgradeDataNodeReadyEventFromStream(ctx context.Context, be *eventspb.BusEvent) *ProtocolUpgradeDataNodeReady
func (ProtocolUpgradeDataNodeReady) Proto ¶ added in v0.65.0
func (b ProtocolUpgradeDataNodeReady) Proto() eventspb.ProtocolUpgradeDataNodeReady
func (ProtocolUpgradeDataNodeReady) StreamMessage ¶ added in v0.65.0
func (b ProtocolUpgradeDataNodeReady) StreamMessage() *eventspb.BusEvent
type ProtocolUpgradeProposalEvent ¶
type ProtocolUpgradeProposalEvent struct { *Base UpgradeBlockHeight uint64 VegaReleaseTag string AcceptedBy []string ProposalStatus eventspb.ProtocolUpgradeProposalStatus }
func NewProtocolUpgradeProposalEvent ¶
func NewProtocolUpgradeProposalEvent(ctx context.Context, upgradeBlockHeight uint64, vegaReleaseTag string, acceptedBy []string, status eventspb.ProtocolUpgradeProposalStatus) *ProtocolUpgradeProposalEvent
func ProtocolUpgradeProposalEventFromStream ¶
func ProtocolUpgradeProposalEventFromStream(ctx context.Context, be *eventspb.BusEvent) *ProtocolUpgradeProposalEvent
func (ProtocolUpgradeProposalEvent) Proto ¶
func (pup ProtocolUpgradeProposalEvent) Proto() eventspb.ProtocolUpgradeEvent
func (ProtocolUpgradeProposalEvent) ProtocolUpgradeProposalEvent ¶
func (pup ProtocolUpgradeProposalEvent) ProtocolUpgradeProposalEvent() eventspb.ProtocolUpgradeEvent
func (ProtocolUpgradeProposalEvent) StreamMessage ¶
func (pup ProtocolUpgradeProposalEvent) StreamMessage() *eventspb.BusEvent
type ProtocolUpgradeStarted ¶ added in v0.56.0
type ProtocolUpgradeStarted struct { *Base // contains filtered or unexported fields }
func NewProtocolUpgradeStarted ¶ added in v0.56.0
func NewProtocolUpgradeStarted(ctx context.Context, bb eventspb.ProtocolUpgradeStarted) *ProtocolUpgradeStarted
NewProtocolUpgradeStarted returns a new time Update event.
func ProtocolUpgradeStartedEventFromStream ¶ added in v0.56.0
func ProtocolUpgradeStartedEventFromStream(ctx context.Context, be *eventspb.BusEvent) *ProtocolUpgradeStarted
func (ProtocolUpgradeStarted) Proto ¶ added in v0.56.0
func (b ProtocolUpgradeStarted) Proto() eventspb.ProtocolUpgradeStarted
func (ProtocolUpgradeStarted) ProtocolUpgradeStarted ¶ added in v0.56.0
func (b ProtocolUpgradeStarted) ProtocolUpgradeStarted() eventspb.ProtocolUpgradeStarted
func (ProtocolUpgradeStarted) StreamMessage ¶ added in v0.56.0
func (b ProtocolUpgradeStarted) StreamMessage() *eventspb.BusEvent
type RewardPayout ¶
type RewardPayout struct { *Base Party string EpochSeq string Asset string Market string PercentageOfTotalReward string Amount *num.Uint Timestamp int64 RewardType types.AccountType }
func NewRewardPayout ¶
func RewardPayoutEventFromStream ¶
func RewardPayoutEventFromStream(ctx context.Context, be *eventspb.BusEvent) *RewardPayout
func (RewardPayout) Proto ¶
func (rp RewardPayout) Proto() eventspb.RewardPayoutEvent
func (RewardPayout) RewardPayoutEvent ¶
func (rp RewardPayout) RewardPayoutEvent() eventspb.RewardPayoutEvent
func (RewardPayout) StreamMessage ¶
func (rp RewardPayout) StreamMessage() *eventspb.BusEvent
type Risk ¶
type Risk interface { Margin Amount() *num.Uint Transfer() *types.Transfer // I know, it's included in the Transfer interface, but this is to make it clear that this particular func is masked at this level MarginLevels() *types.MarginLevels }
Risk is an event that summarizes everything and an eventual update to margin account.
type RiskFactor ¶
type RiskFactor struct { *Base // contains filtered or unexported fields }
func NewRiskFactorEvent ¶
func NewRiskFactorEvent(ctx context.Context, r types.RiskFactor) *RiskFactor
func RiskFactorEventFromStream ¶
func RiskFactorEventFromStream(ctx context.Context, be *eventspb.BusEvent) *RiskFactor
func (RiskFactor) MarketID ¶
func (r RiskFactor) MarketID() string
func (RiskFactor) Proto ¶
func (r RiskFactor) Proto() proto.RiskFactor
func (*RiskFactor) RiskFactor ¶
func (r *RiskFactor) RiskFactor() proto.RiskFactor
func (RiskFactor) StreamMessage ¶
func (r RiskFactor) StreamMessage() *eventspb.BusEvent
type SettleDistressed ¶
type SettleDistressed struct { *Base // contains filtered or unexported fields }
func NewSettleDistressed ¶
func SettleDistressedEventFromStream ¶
func SettleDistressedEventFromStream(ctx context.Context, be *eventspb.BusEvent) *SettleDistressed
func (SettleDistressed) IsParty ¶
func (s SettleDistressed) IsParty(id string) bool
func (SettleDistressed) Margin ¶
func (s SettleDistressed) Margin() *num.Uint
func (SettleDistressed) MarketID ¶
func (s SettleDistressed) MarketID() string
func (SettleDistressed) PartyID ¶
func (s SettleDistressed) PartyID() string
func (SettleDistressed) Price ¶
func (s SettleDistressed) Price() *num.Uint
func (SettleDistressed) Proto ¶
func (s SettleDistressed) Proto() eventspb.SettleDistressed
func (SettleDistressed) StreamMessage ¶
func (s SettleDistressed) StreamMessage() *eventspb.BusEvent
func (SettleDistressed) Timestamp ¶
func (s SettleDistressed) Timestamp() int64
type SettleMarket ¶ added in v0.56.0
type SettleMarket struct { *Base // contains filtered or unexported fields }
func NewMarketSettled ¶ added in v0.56.0
func SettleMarketEventFromStream ¶ added in v0.56.0
func SettleMarketEventFromStream(ctx context.Context, be *eventspb.BusEvent) *SettleMarket
func (SettleMarket) MarketID ¶ added in v0.56.0
func (m SettleMarket) MarketID() string
func (SettleMarket) PartyID ¶ added in v0.56.0
func (m SettleMarket) PartyID() string
PartyID will return an empty string as this is only required to satisfy an interface for identifying events that can affect positions in the data-node.
func (SettleMarket) PositionFactor ¶ added in v0.56.0
func (m SettleMarket) PositionFactor() num.Decimal
func (SettleMarket) Proto ¶ added in v0.56.0
func (m SettleMarket) Proto() *eventspb.SettleMarket
func (SettleMarket) SettledPrice ¶ added in v0.56.0
func (m SettleMarket) SettledPrice() *num.Uint
func (SettleMarket) StreamMessage ¶ added in v0.56.0
func (m SettleMarket) StreamMessage() *eventspb.BusEvent
func (SettleMarket) Timestamp ¶ added in v0.56.0
func (m SettleMarket) Timestamp() int64
type SettlePos ¶
type SettlePos struct { *Base // contains filtered or unexported fields }
func NewSettlePositionEvent ¶
func (SettlePos) PositionFactor ¶
func (SettlePos) Proto ¶
func (s SettlePos) Proto() eventspb.SettlePosition
func (SettlePos) StreamMessage ¶
func (SettlePos) Trades ¶
func (s SettlePos) Trades() []TradeSettlement
type SettlePosition ¶
type SettlePosition interface { MarketID() string Trades() []TradeSettlement Margin() (uint64, bool) Party() string Price() uint64 }
SettlePosition is an event that the settlement buffer will propagate through the system used by the plugins (currently only the positions API).
type SnapshotTakenEvent ¶ added in v0.65.0
type SnapshotTakenEvent struct { *Base SnapshotBlockHeight uint64 SnapshotBlockHash string VegaCoreVersion string ProtocolUpgradeBlock bool }
func NewSnapshotEventEvent ¶ added in v0.65.0
func SnapthostTakenEventFromStream ¶ added in v0.65.0
func SnapthostTakenEventFromStream(ctx context.Context, be *eventspb.BusEvent) *SnapshotTakenEvent
func (SnapshotTakenEvent) Proto ¶ added in v0.65.0
func (ste SnapshotTakenEvent) Proto() eventspb.CoreSnapshotData
func (SnapshotTakenEvent) SnapshotTakenEvent ¶ added in v0.65.0
func (ste SnapshotTakenEvent) SnapshotTakenEvent() eventspb.CoreSnapshotData
func (SnapshotTakenEvent) StreamMessage ¶ added in v0.65.0
func (ste SnapshotTakenEvent) StreamMessage() *eventspb.BusEvent
type StakeLinking ¶
type StakeLinking struct { *Base // contains filtered or unexported fields }
func NewStakeLinking ¶
func NewStakeLinking(ctx context.Context, evt types.StakeLinking) *StakeLinking
func StakeLinkingFromStream ¶
func StakeLinkingFromStream(ctx context.Context, be *eventspb.BusEvent) *StakeLinking
func (StakeLinking) Proto ¶
func (s StakeLinking) Proto() eventspb.StakeLinking
func (StakeLinking) StakeLinking ¶
func (s StakeLinking) StakeLinking() eventspb.StakeLinking
func (StakeLinking) StreamMessage ¶
func (s StakeLinking) StreamMessage() *eventspb.BusEvent
type StateVar ¶
StateVar is an event for tracking consensus in floating point state variables.
func NewStateVarEvent ¶
func StateVarEventFromStream ¶
func (StateVar) StreamMessage ¶
type Time ¶
type Time struct { *Base // contains filtered or unexported fields }
Time event indicating a change in block time (ie time update).
func TimeEventFromStream ¶
func (Time) Proto ¶
func (t Time) Proto() eventspb.TimeUpdate
func (Time) StreamMessage ¶
type Trade ¶
type Trade struct { *Base // contains filtered or unexported fields }
func TradeEventFromStream ¶
func (Trade) StreamMessage ¶
type TradeSettlement ¶
TradeSettlement Part of the SettlePosition interface -> traces trades as they happened.
type TransactionResult ¶ added in v0.58.0
type TransactionResult struct { *Base // contains filtered or unexported fields }
func NewTransactionResultEventFailure ¶ added in v0.58.0
func NewTransactionResultEventFailure( ctx context.Context, hash, party string, err error, tx interface{}, ) *TransactionResult
func NewTransactionResultEventSuccess ¶ added in v0.58.0
func NewTransactionResultEventSuccess( ctx context.Context, hash, party string, tx interface{}, ) *TransactionResult
func TransactionResultEventFromStream ¶ added in v0.58.0
func TransactionResultEventFromStream(ctx context.Context, be *eventspb.BusEvent) *TransactionResult
func (TransactionResult) IsParty ¶ added in v0.58.0
func (t TransactionResult) IsParty(id string) bool
func (TransactionResult) Proto ¶ added in v0.58.0
func (t TransactionResult) Proto() eventspb.TransactionResult
func (TransactionResult) StreamMessage ¶ added in v0.58.0
func (t TransactionResult) StreamMessage() *eventspb.BusEvent
type Transfer ¶
type Transfer interface { MarketPosition Transfer() *types.Transfer }
Transfer is an event passed on by settlement engine, contains position and the resulting transfer for the collateral engine to use. We need MarketPosition because we can't loose the long/short status of the open positions.
type TransferFunds ¶
type TransferFunds struct { *Base // contains filtered or unexported fields }
Transfer ...
func NewOneOffTransferFundsEvent ¶
func NewOneOffTransferFundsEvent( ctx context.Context, t *types.OneOffTransfer, ) *TransferFunds
func NewOneOffTransferFundsEventWithReason ¶ added in v0.59.0
func NewOneOffTransferFundsEventWithReason( ctx context.Context, t *types.OneOffTransfer, reason string, ) *TransferFunds
func NewRecurringTransferFundsEvent ¶
func NewRecurringTransferFundsEvent( ctx context.Context, t *types.RecurringTransfer, ) *TransferFunds
func NewRecurringTransferFundsEventWithReason ¶ added in v0.59.0
func NewRecurringTransferFundsEventWithReason( ctx context.Context, t *types.RecurringTransfer, reason string, ) *TransferFunds
func TransferFundsEventFromStream ¶
func TransferFundsEventFromStream(ctx context.Context, be *eventspb.BusEvent) *TransferFunds
func (TransferFunds) PartyID ¶
func (t TransferFunds) PartyID() string
func (TransferFunds) Proto ¶
func (t TransferFunds) Proto() eventspb.Transfer
func (TransferFunds) StreamMessage ¶
func (t TransferFunds) StreamMessage() *eventspb.BusEvent
func (TransferFunds) TransferFunds ¶
func (t TransferFunds) TransferFunds() eventspb.Transfer
type TxErr ¶
type TxErr struct { *Base // contains filtered or unexported fields }
func NewTxErrEvent ¶
func TxErrEventFromStream ¶
func (TxErr) Proto ¶
func (t TxErr) Proto() eventspb.TxErrorEvent
func (TxErr) StreamMessage ¶
type Type ¶
type Type int
const ( // All event type -> used by subscribers to just receive all events, has no actual corresponding event payload. All Type = iota // other event types that DO have corresponding event types. TimeUpdate LedgerMovementsEvent PositionResolution MarketEvent // this event is not used for any specific event, but by subscribers that aggregate all market events (e.g. for logging) OrderEvent LiquidityProvisionEvent AccountEvent PartyEvent TradeEvent MarginLevelsEvent ProposalEvent VoteEvent MarketDataEvent NodeSignatureEvent LossSocializationEvent SettlePositionEvent SettleDistressedEvent MarketCreatedEvent MarketUpdatedEvent AssetEvent MarketTickEvent AuctionEvent WithdrawalEvent DepositEvent RiskFactorEvent NetworkParameterEvent TxErrEvent OracleSpecEvent OracleDataEvent EpochUpdate DelegationBalanceEvent StakeLinkingEvent ValidatorUpdateEvent RewardPayoutEvent CheckpointEvent ValidatorScoreEvent KeyRotationEvent StateVarEvent NetworkLimitsEvent TransferEvent ValidatorRankingEvent ERC20MultiSigThresholdSetEvent ERC20MultiSigSignerEvent ERC20MultiSigSignerAddedEvent ERC20MultiSigSignerRemovedEvent PositionStateEvent EthereumKeyRotationEvent ProtocolUpgradeEvent BeginBlockEvent EndBlockEvent ProtocolUpgradeStartedEvent SettleMarketEvent TransactionResultEvent CoreSnapshotEvent ProtocolUpgradeDataNodeReadyEvent DistressedOrdersClosedEvent ExpiredOrdersEvent )
func ProtoToInternal ¶
func ProtoToInternal(pTypes ...eventspb.BusEventType) ([]Type, error)
ProtoToInternal converts the proto message enum to our internal constants we're not using a map to de-duplicate the event types here, so we can exploit duplicating the same event to control the internal subscriber channel buffer.
func TryFromString ¶
TryFromString tries to parse a raw string into an event type, false indicates that.
func (Type) ToProto ¶
func (t Type) ToProto() eventspb.BusEventType
type ValidatorRanking ¶
type ValidatorRanking struct { *Base NodeID string EpochSeq string StakeScore string PerformanceScore string Ranking string PreviousStatus string Status string TMVotingPower int }
func NewValidatorRanking ¶
func NewValidatorRanking(ctx context.Context, epochSeq, nodeID, stakeScore, performanceScore, ranking, previousStatus, status string, votingPower int) *ValidatorRanking
func ValidatorRankingEventFromStream ¶
func ValidatorRankingEventFromStream(ctx context.Context, be *eventspb.BusEvent) *ValidatorRanking
func (ValidatorRanking) Proto ¶
func (vr ValidatorRanking) Proto() eventspb.ValidatorRankingEvent
func (ValidatorRanking) StreamMessage ¶
func (vr ValidatorRanking) StreamMessage() *eventspb.BusEvent
func (ValidatorRanking) ValidatorRankingEvent ¶
func (vr ValidatorRanking) ValidatorRankingEvent() eventspb.ValidatorRankingEvent
type ValidatorScore ¶
type ValidatorScore struct { *Base NodeID string EpochSeq string ValidatorScore string NormalisedScore string RawValidatorScore string ValidatorPerformance string MultisigScore string ValidatorStatus string }
func NewValidatorScore ¶
func ValidatorScoreEventFromStream ¶
func ValidatorScoreEventFromStream(ctx context.Context, be *eventspb.BusEvent) *ValidatorScore
func (ValidatorScore) Proto ¶
func (vd ValidatorScore) Proto() eventspb.ValidatorScoreEvent
func (ValidatorScore) StreamMessage ¶
func (vd ValidatorScore) StreamMessage() *eventspb.BusEvent
func (ValidatorScore) ValidatorScoreEvent ¶
func (vd ValidatorScore) ValidatorScoreEvent() eventspb.ValidatorScoreEvent
type ValidatorUpdate ¶
type ValidatorUpdate struct { *Base // contains filtered or unexported fields }
ValidatorUpdate ...
func NewValidatorUpdateEvent ¶
func ValidatorUpdateEventFromStream ¶
func ValidatorUpdateEventFromStream(ctx context.Context, be *eventspb.BusEvent) *ValidatorUpdate
func (ValidatorUpdate) AvatarURL ¶
func (vu ValidatorUpdate) AvatarURL() string
AvatarURL return an URL to the validator avatar for UI purpose.
func (ValidatorUpdate) Country ¶
func (vu ValidatorUpdate) Country() string
Country returns country code of node's location.
func (ValidatorUpdate) EthereumAddress ¶
func (vu ValidatorUpdate) EthereumAddress() string
EthereumAddress returns validator's ethereum address.
func (ValidatorUpdate) InfoURL ¶
func (vu ValidatorUpdate) InfoURL() string
InfoURL returns an url with information about validator node.
func (ValidatorUpdate) Name ¶
func (vu ValidatorUpdate) Name() string
Name return the name of the validator.
func (ValidatorUpdate) Proto ¶
func (vu ValidatorUpdate) Proto() eventspb.ValidatorUpdate
func (ValidatorUpdate) StreamMessage ¶
func (vu ValidatorUpdate) StreamMessage() *eventspb.BusEvent
func (ValidatorUpdate) TendermintPublicKey ¶
func (vu ValidatorUpdate) TendermintPublicKey() string
TendermintPublicKey returns Tendermint nodes public key.
func (ValidatorUpdate) ValidatorUpdate ¶
func (vu ValidatorUpdate) ValidatorUpdate() eventspb.ValidatorUpdate
func (ValidatorUpdate) VegaPublicKey ¶
func (vu ValidatorUpdate) VegaPublicKey() string
VegaPublicKey returns validator's vega public key.
func (ValidatorUpdate) VegaPublicKeyIndex ¶
func (vu ValidatorUpdate) VegaPublicKeyIndex() uint32
VegaPublicKey returns validator's vega public key index.
type Vote ¶
type Vote struct { *Base // contains filtered or unexported fields }
func VoteEventFromStream ¶
func (*Vote) ProposalID ¶
ProposalID get the proposal ID, part of the interface for event subscribers.
func (Vote) StreamMessage ¶
func (*Vote) TotalGovernanceTokenBalance ¶
TotalGovernanceTokenBalance returns the total balance of token used for this vote.
func (*Vote) TotalGovernanceTokenWeight ¶
TotalGovernanceTokenWeight returns the total weight of token used for this vote.
func (*Vote) Value ¶
func (v *Vote) Value() proto.Vote_Value
Value - return a Y/N value, makes subscribers easier to implement.
type Withdrawal ¶
type Withdrawal struct { *Base // contains filtered or unexported fields }
func NewWithdrawalEvent ¶
func NewWithdrawalEvent(ctx context.Context, w types.Withdrawal) *Withdrawal
func WithdrawalEventFromStream ¶
func WithdrawalEventFromStream(ctx context.Context, be *eventspb.BusEvent) *Withdrawal
func (Withdrawal) IsParty ¶
func (w Withdrawal) IsParty(id string) bool
func (Withdrawal) PartyID ¶
func (w Withdrawal) PartyID() string
func (Withdrawal) Proto ¶
func (w Withdrawal) Proto() proto.Withdrawal
func (Withdrawal) StreamMessage ¶
func (w Withdrawal) StreamMessage() *eventspb.BusEvent
func (*Withdrawal) Withdrawal ¶
func (w *Withdrawal) Withdrawal() proto.Withdrawal
Source Files ¶
- account.go
- asset.go
- auction.go
- begin_block.go
- bus.go
- checkpoint.go
- delegation.go
- deposit.go
- distressed_orders.go
- end_block.go
- epoch.go
- erc20_multisig_signer_added.go
- erc20_multisig_signer_removed.go
- erc20multisig_signer.go
- erc20multisig_threshold_set.go
- ethereum_key_rotation.go
- events.go
- expired_orders.go
- governance_proposal.go
- key_rotation.go
- ledger_movements.go
- liquidity_provision.go
- loss_socialization.go
- margin_levels.go
- market_data.go
- market_event.go
- market_tick.go
- market_updated_event.go
- network_limits.go
- network_parameter.go
- node_signature.go
- oracle_data.go
- oracle_spec.go
- order.go
- party.go
- position_resolution_event.go
- position_state.go
- protocol_upgrade.go
- protocol_upgrade_data_node_ready.go
- protocol_upgrade_started.go
- reward_payout.go
- risk_factor.go
- settle_distressed.go
- settle_market.go
- settle_position.go
- snapshot.go
- stake_linking.go
- statevar.go
- time.go
- trade.go
- transaction_result.go
- transfer.go
- tx_error.go
- validator_ranking.go
- validator_score.go
- validator_update.go
- vote.go
- withdrawal.go