types

package
v0.66.0 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2023 License: MIT Imports: 24 Imported by: 1

Documentation

Index

Constants

View Source
const (
	SignerPubKeyPrepend = 0x00
	ETHAddressPrepend   = 0x01
)
View Source
const (
	SimpleRiskModelType rmType = iota
	LogNormalRiskModelType
)
View Source
const (
	SnapshotFormatUnspecified     = snapshot.Format_FORMAT_UNSPECIFIED
	SnapshotFormatProto           = snapshot.Format_FORMAT_PROTO
	SnapshotFormatProtoCompressed = snapshot.Format_FORMAT_PROTO_COMPRESSED
	SnapshotFormatJSON            = snapshot.Format_FORMAT_JSON
)
View Source
const (
	StakeLinkingTypeUnspecified StakeLinkingType = eventspb.StakeLinking_TYPE_UNSPECIFIED
	StakeLinkingTypeDeposited                    = eventspb.StakeLinking_TYPE_LINK
	StakeLinkingTypeRemoved                      = eventspb.StakeLinking_TYPE_UNLINK
)
View Source
const (
	StakeLinkingStatusUnspecified StakeLinkingStatus = eventspb.StakeLinking_STATUS_UNSPECIFIED
	StakeLinkingStatusPending                        = eventspb.StakeLinking_STATUS_PENDING
	StakeLinkingStatusAccepted                       = eventspb.StakeLinking_STATUS_ACCEPTED
	StakeLinkingStatusRejected                       = eventspb.StakeLinking_STATUS_REJECTED
)
View Source
const (
	NetworkParty = "network"
)

some constants we're relying on in multiple places. Declare them here to avoid things like settlement importing collateral etc...

Variables

View Source
var (
	ErrMissingERC20ContractAddress     = errors.New("missing erc20 contract address")
	ErrMissingBuiltinAssetField        = errors.New("missing builtin asset field")
	ErrInvalidAssetNameEmpty           = errors.New("invalid asset, name must not be empty")
	ErrInvalidAssetSymbolEmpty         = errors.New("invalid asset, symbol must not be empty")
	ErrInvalidAssetDecimalPlacesZero   = errors.New("invalid asset, decimal places must not be zero")
	ErrInvalidAssetQuantumZero         = errors.New("invalid asset, quantum must not be zero")
	ErrLifetimeLimitMustBePositive     = errors.New("lifetime limit must be positive")
	ErrWithdrawThresholdMustBePositive = errors.New("withdraw threshold must be positive")
)
View Source
var (
	ErrMissingTransferKind           = errors.New("missing transfer kind")
	ErrCannotTransferZeroFunds       = errors.New("cannot transfer zero funds")
	ErrInvalidFromAccount            = errors.New("invalid from account")
	ErrInvalidToAccount              = errors.New("invalid to account")
	ErrUnsupportedFromAccountType    = errors.New("unsupported from account type")
	ErrUnsupportedToAccountType      = errors.New("unsupported to account type")
	ErrEndEpochIsZero                = errors.New("end epoch is zero")
	ErrStartEpochIsZero              = errors.New("start epoch is zero")
	ErrInvalidFactor                 = errors.New("invalid factor")
	ErrStartEpochAfterEndEpoch       = errors.New("start epoch after end epoch")
	ErrInvalidToForRewardAccountType = errors.New("to party is invalid for reward account type")
)
View Source
var (
	ErrCheckpointStateInvalid  = errors.New("state contained in the snapshot is invalid")
	ErrCheckpointHashIncorrect = errors.New("the hash and snapshot data do not match")
	ErrCheckpointHasNoState    = errors.New("there is no state set on the checkpoint")
)
View Source
var (
	ErrMissingNetworkID                                   = errors.New("missing network ID in Ethereum config")
	ErrMissingChainID                                     = errors.New("missing chain ID in Ethereum config")
	ErrMissingCollateralBridgeAddress                     = errors.New("missing collateral bridge contract address in Ethereum config")
	ErrMissingMultiSigControlAddress                      = errors.New("missing multisig control contract address in Ethereum config")
	ErrUnsupportedCollateralBridgeDeploymentBlockHeight   = errors.New("setting collateral bridge contract deployment block height in Ethereum config is not supported")
	ErrAtLeastOneOfStakingOrVestingBridgeAddressMustBeSet = errors.New("at least one of the stacking bridge or token vesting contract addresses must be specified")
	ErrConfirmationsMustBeHigherThan0                     = errors.New("confirmation must be > 0 in Ethereum config")
)
View Source
var (
	ErrInvalidLifetimeLimit     = errors.New("invalid lifetime limit")
	ErrInvalidWithdrawThreshold = errors.New("invalid withdraw threshold")
	ErrAssetIDIsRequired        = errors.New("asset ID is required")
	ErrChangesAreRequired       = errors.New("changes are required")
	ErrSourceIsRequired         = errors.New("source is required")
)
View Source
var (
	ErrNilTradableInstrument = errors.New("nil tradable instrument")
	ErrNilInstrument         = errors.New("nil instrument")
	ErrNilProduct            = errors.New("nil product")
	ErrUnknownAsset          = errors.New("unknown asset")
)
View Source
var (
	ErrInvalidMarketID                             = OrderErrorInvalidMarketID
	ErrInvalidOrderID                              = OrderErrorInvalidOrderID
	ErrOrderOutOfSequence                          = OrderErrorOutOfSequence
	ErrInvalidRemainingSize                        = OrderErrorInvalidRemainingSize
	ErrOrderRemovalFailure                         = OrderErrorRemovalFailure
	ErrInvalidExpirationDatetime                   = OrderErrorInvalidExpirationDatetime
	ErrEditNotAllowed                              = OrderErrorEditNotAllowed
	ErrOrderAmendFailure                           = OrderErrorAmendFailure
	ErrOrderNotFound                               = OrderErrorNotFound
	ErrInvalidPartyID                              = OrderErrorInvalidParty
	ErrInvalidSize                                 = OrderErrorInvalidSize
	ErrInvalidPersistence                          = OrderErrorInvalidPersistance
	ErrInvalidType                                 = OrderErrorInvalidType
	ErrInvalidTimeInForce                          = OrderErrorInvalidTimeInForce
	ErrPeggedOrderMustBeLimitOrder                 = OrderErrorMustBeLimitOrder
	ErrPeggedOrderMustBeGTTOrGTC                   = OrderErrorMustBeGTTOrGTC
	ErrPeggedOrderWithoutReferencePrice            = OrderErrorWithoutReferencePrice
	ErrPeggedOrderBuyCannotReferenceBestAskPrice   = OrderErrorBuyCannotReferenceBestAskPrice
	ErrPeggedOrderOffsetMustBeGreaterOrEqualToZero = OrderErrorOffsetMustBeGreaterOrEqualToZero
	ErrPeggedOrderSellCannotReferenceBestBidPrice  = OrderErrorSellCannotReferenceBestBidPrice
	ErrPeggedOrderOffsetMustBeGreaterThanZero      = OrderErrorOffsetMustBeGreaterThanZero
	ErrTooManyPeggedOrders                         = OrderErrorTooManyPeggedOrders
)
View Source
var (
	ErrSnapshotHashMismatch         = errors.New("snapshot hashes do not match")
	ErrSnapshotMetaMismatch         = errors.New("snapshot metadata does not match")
	ErrUnknownSnapshotNamespace     = errors.New("unknown snapshot namespace")
	ErrNoPrefixFound                = errors.New("no prefix in chunk keys")
	ErrInconsistentNamespaceKeys    = errors.New("chunk contains several namespace keys")
	ErrChunkHashMismatch            = errors.New("loaded chunk hash does not match metadata")
	ErrChunkOutOfRange              = errors.New("chunk number out of range")
	ErrUnknownSnapshot              = errors.New("no shapshot to reject")
	ErrMissingChunks                = errors.New("missing previous chunks")
	ErrSnapshotRetryLimit           = errors.New("could not load snapshot, retry limit reached")
	ErrSnapshotKeyDoesNotExist      = errors.New("unknown key for snapshot")
	ErrInvalidSnapshotNamespace     = errors.New("invalid snapshot namespace")
	ErrUnknownSnapshotType          = errors.New("snapshot data type not known")
	ErrUnknownSnapshotChunkHeight   = errors.New("no snapshot or chunk found for given height")
	ErrInvalidSnapshotFormat        = errors.New("invalid snapshot format")
	ErrSnapshotFormatMismatch       = errors.New("snapshot formats do not match")
	ErrUnexpectedKey                = errors.New("snapshot namespace has unknown/unexpected key(s)")
	ErrNodeHashMismatch             = errors.New("hash of a node does not match the hash from the snapshot meta")
	ErrNoSnapshot                   = errors.New("no snapshot found")
	ErrMissingSnapshotVersion       = errors.New("unknown snapshot version")
	ErrInvalidSnapshotStorageMethod = errors.New("invalid snapshot storage method")
	ErrMissingAppstateNode          = errors.New("appstate missing from tree")
	ErrMissingPayload               = errors.New("payload missing from exported tree")
)
View Source
var ErrInvalidCommitmentAmount = errors.New("invalid commitment amount")
View Source
var ErrMultipleSameKeyNamesInFilterList = errors.New("multiple keys with same name found in filter list")

ErrMultipleSameKeyNamesInFilterList is returned when filters with same key names exists inside a single list.

Functions

func CheckEthereumConfig

func CheckEthereumConfig(cfgProto *proto.EthereumConfig) error

CheckEthereumConfig verifies the proto.EthereumConfig is valid.

func CheckUntypedEthereumConfig

func CheckUntypedEthereumConfig(v interface{}) error

CheckUntypedEthereumConfig verifies the `v` parameter is a proto.EthereumConfig struct and check if it's valid.

func DataSourceSpecPropertyKeyIsEmpty added in v0.62.0

func DataSourceSpecPropertyKeyIsEmpty(key *DataSourceSpecPropertyKey) bool

func GetNodeKey

func GetNodeKey(ns SnapshotNamespace, k string) string

GetNodeKey is a utility function, we don't want this mess scattered throughout the code.

func KeyFromPayload

func KeyFromPayload(p isPayload) string

KeyFromPayload is useful in snapshot engine, used by the Payload type, too.

func SignersIntoProto added in v0.61.0

func SignersIntoProto(s []*Signer) []*datapb.Signer

SignersIntoProto returns a list of signers after checking the list length.

func SignersToStringList added in v0.61.0

func SignersToStringList(s []*Signer) []string

Types

type Account

type Account struct {
	ID       string
	Owner    string
	Balance  *num.Uint
	Asset    string
	MarketID string
	Type     AccountType
}

func AccountFromProto

func AccountFromProto(a *proto.Account) *Account

func (*Account) Clone

func (a *Account) Clone() *Account

func (*Account) IntoProto

func (a *Account) IntoProto() *proto.Account

func (Account) String

func (a Account) String() string

func (Account) ToDetails added in v0.56.0

func (a Account) ToDetails() *AccountDetails

type AccountDetails added in v0.56.0

type AccountDetails struct {
	Owner    string
	AssetID  string
	MarketID string
	Type     AccountType
}

func (*AccountDetails) ID added in v0.56.0

func (ad *AccountDetails) ID() string

func (*AccountDetails) IntoProto added in v0.56.0

func (ad *AccountDetails) IntoProto() *proto.AccountDetails

type AccountType

type AccountType = proto.AccountType
const (
	// Default value.
	AccountTypeUnspecified AccountType = proto.AccountType_ACCOUNT_TYPE_UNSPECIFIED
	// Insurance pool accounts contain insurance pool funds for a market.
	AccountTypeInsurance AccountType = proto.AccountType_ACCOUNT_TYPE_INSURANCE
	// Settlement accounts exist only during settlement or mark-to-market.
	AccountTypeSettlement AccountType = proto.AccountType_ACCOUNT_TYPE_SETTLEMENT
	// Margin accounts contain margin funds for a party and each party will
	// have multiple margin accounts, one for each market they have traded in
	//
	// Margin account funds will alter as margin requirements on positions change.
	AccountTypeMargin AccountType = proto.AccountType_ACCOUNT_TYPE_MARGIN
	// General accounts contains general funds for a party. A party will
	// have multiple general accounts, one for each asset they want
	// to trade with
	//
	// General accounts are where funds are initially deposited or withdrawn from,
	// it is also the account where funds are taken to fulfil fees and initial margin requirements.
	AccountTypeGeneral AccountType = proto.AccountType_ACCOUNT_TYPE_GENERAL
	// Infrastructure accounts contain fees earned by providing infrastructure on Vega.
	AccountTypeFeesInfrastructure AccountType = proto.AccountType_ACCOUNT_TYPE_FEES_INFRASTRUCTURE
	// Liquidity accounts contain fees earned by providing liquidity on Vega markets.
	AccountTypeFeesLiquidity AccountType = proto.AccountType_ACCOUNT_TYPE_FEES_LIQUIDITY
	// This account is created to hold fees earned by placing orders that sit on the book
	// and are then matched with an incoming order to create a trade - These fees reward parties
	// who provide the best priced liquidity that actually allows trading to take place.
	AccountTypeFeesMaker AccountType = proto.AccountType_ACCOUNT_TYPE_FEES_MAKER
	// This account is created to maintain liquidity providers funds commitments.
	AccountTypeBond AccountType = proto.AccountType_ACCOUNT_TYPE_BOND
	// External account represents an external source (deposit/withdrawal).
	AccountTypeExternal AccountType = proto.AccountType_ACCOUNT_TYPE_EXTERNAL
	// Global reward accounts contain rewards per asset.
	AccountTypeGlobalReward AccountType = proto.AccountType_ACCOUNT_TYPE_GLOBAL_REWARD
	// Global account to hold pending transfers.
	AccountTypePendingTransfers AccountType = proto.AccountType_ACCOUNT_TYPE_PENDING_TRANSFERS
	// Asset account for paid taker fees.
	AccountTypeMakerPaidFeeReward AccountType = proto.AccountType_ACCOUNT_TYPE_REWARD_MAKER_PAID_FEES
	// Asset account for received maker fees.
	AccountTypeMakerReceivedFeeReward AccountType = proto.AccountType_ACCOUNT_TYPE_REWARD_MAKER_RECEIVED_FEES
	// Asset account for received LP fees.
	AccountTypeLPFeeReward AccountType = proto.AccountType_ACCOUNT_TYPE_REWARD_LP_RECEIVED_FEES
	// Asset account for market proposers.
	AccountTypeMarketProposerReward AccountType = proto.AccountType_ACCOUNT_TYPE_REWARD_MARKET_PROPOSERS
)

type Accounts

type Accounts []*Account

func (Accounts) IntoProto

func (a Accounts) IntoProto() []*proto.Account

type ActiveAssets

type ActiveAssets struct {
	Assets []*Asset
}

func ActiveAssetsFromProto

func ActiveAssetsFromProto(aa *snapshot.ActiveAssets) *ActiveAssets

func (ActiveAssets) IntoProto

func (a ActiveAssets) IntoProto() *snapshot.ActiveAssets

type AnnounceNode

type AnnounceNode = commandspb.AnnounceNode

type AppState

type AppState struct {
	Height  uint64
	Block   string
	Time    int64
	ChainID string
}

func AppStateFromProto

func AppStateFromProto(as *snapshot.AppState) *AppState

func (AppState) IntoProto

func (a AppState) IntoProto() *snapshot.AppState

type Asset

type Asset struct {
	// Internal identifier of the asset
	ID string
	// Name of the asset (e.g: Great British Pound)
	Details *AssetDetails
	// Status of the asset
	Status AssetStatus
}

func AssetFromProto

func AssetFromProto(p *proto.Asset) (*Asset, error)

func (Asset) DeepClone

func (a Asset) DeepClone() *Asset

func (Asset) IntoProto

func (a Asset) IntoProto() *proto.Asset

type AssetAction

type AssetAction struct {
	ID                      string
	State                   uint32
	Asset                   string
	BlockNumber             uint64
	TxIndex                 uint64
	Hash                    string
	BuiltinD                *BuiltinAssetDeposit
	Erc20D                  *ERC20Deposit
	Erc20AL                 *ERC20AssetList
	ERC20AssetLimitsUpdated *ERC20AssetLimitsUpdated
	BridgeStopped           bool
	BridgeResume            bool
}

func AssetActionFromProto

func AssetActionFromProto(a *snapshot.AssetAction) *AssetAction

func (*AssetAction) IntoProto

func (aa *AssetAction) IntoProto() *snapshot.AssetAction

type AssetDetails

type AssetDetails struct {
	Name     string
	Symbol   string
	Decimals uint64
	Quantum  num.Decimal
	//	*AssetDetailsBuiltinAsset
	//	*AssetDetailsErc20
	Source isAssetDetails
}

func AssetDetailsFromProto

func AssetDetailsFromProto(p *proto.AssetDetails) (*AssetDetails, error)

func (AssetDetails) DeepClone

func (a AssetDetails) DeepClone() *AssetDetails

func (AssetDetails) GetERC20

func (a AssetDetails) GetERC20() *ERC20

func (AssetDetails) IntoProto

func (a AssetDetails) IntoProto() *proto.AssetDetails

func (AssetDetails) String

func (a AssetDetails) String() string

func (AssetDetails) Validate

func (a AssetDetails) Validate() (ProposalError, error)

type AssetDetailsBuiltinAsset

type AssetDetailsBuiltinAsset struct {
	BuiltinAsset *BuiltinAsset
}

func (AssetDetailsBuiltinAsset) DeepClone

func (a AssetDetailsBuiltinAsset) DeepClone() isAssetDetails

func (AssetDetailsBuiltinAsset) IntoProto

func (AssetDetailsBuiltinAsset) String

func (a AssetDetailsBuiltinAsset) String() string

func (AssetDetailsBuiltinAsset) Validate

type AssetDetailsErc20

type AssetDetailsErc20 struct {
	ERC20 *ERC20
}

func AssetDetailsERC20FromProto

func AssetDetailsERC20FromProto(p *proto.AssetDetails_Erc20) (*AssetDetailsErc20, error)

func (AssetDetailsErc20) DeepClone

func (a AssetDetailsErc20) DeepClone() isAssetDetails

func (AssetDetailsErc20) IntoProto

func (AssetDetailsErc20) String

func (a AssetDetailsErc20) String() string

func (AssetDetailsErc20) Validate

func (a AssetDetailsErc20) Validate() (ProposalError, error)

type AssetDetailsUpdate

type AssetDetailsUpdate struct {
	Quantum num.Decimal
	//	*AssetDetailsUpdateERC20
	Source isAssetDetailsUpdate
}

func AssetDetailsUpdateFromProto

func AssetDetailsUpdateFromProto(p *vegapb.AssetDetailsUpdate) (*AssetDetailsUpdate, error)

func (AssetDetailsUpdate) DeepClone

func (a AssetDetailsUpdate) DeepClone() *AssetDetailsUpdate

func (AssetDetailsUpdate) IntoProto

func (AssetDetailsUpdate) String

func (a AssetDetailsUpdate) String() string

func (AssetDetailsUpdate) Validate

func (a AssetDetailsUpdate) Validate() (ProposalError, error)

type AssetDetailsUpdateERC20

type AssetDetailsUpdateERC20 struct {
	ERC20Update *ERC20Update
}

func (AssetDetailsUpdateERC20) DeepClone

func (a AssetDetailsUpdateERC20) DeepClone() isAssetDetailsUpdate

func (AssetDetailsUpdateERC20) IntoProto

func (AssetDetailsUpdateERC20) String

func (a AssetDetailsUpdateERC20) String() string

func (AssetDetailsUpdateERC20) Validate

type AssetStatus

type AssetStatus = proto.Asset_Status
const (
	// Default value, always invalid.
	AssetStatusUnspecified AssetStatus = proto.Asset_STATUS_UNSPECIFIED
	// Asset is proposed and under vote.
	AssetStatusProposed AssetStatus = proto.Asset_STATUS_PROPOSED
	// Asset has been rejected from governance.
	AssetStatusRejected AssetStatus = proto.Asset_STATUS_REJECTED
	// Asset is pending listing from the bridge.
	AssetStatusPendingListing AssetStatus = proto.Asset_STATUS_PENDING_LISTING
	// Asset is fully usable in the network.
	AssetStatusEnabled AssetStatus = proto.Asset_STATUS_ENABLED
)

type AuctionDuration

type AuctionDuration struct {
	Duration int64
	Volume   uint64
}

func AuctionDurationFromProto

func AuctionDurationFromProto(ad *proto.AuctionDuration) *AuctionDuration

func (AuctionDuration) DeepClone

func (a AuctionDuration) DeepClone() *AuctionDuration

func (AuctionDuration) IntoProto

func (a AuctionDuration) IntoProto() *proto.AuctionDuration

func (AuctionDuration) String

func (a AuctionDuration) String() string

type AuctionState

type AuctionState struct {
	Mode               MarketTradingMode
	DefaultMode        MarketTradingMode
	Trigger            AuctionTrigger
	Begin              time.Time
	End                *AuctionDuration
	Start              bool
	Stop               bool
	Extension          AuctionTrigger
	ExtensionEventSent bool
}

func AuctionStateFromProto

func AuctionStateFromProto(as *snapshot.AuctionState) *AuctionState

func (AuctionState) IntoProto

func (a AuctionState) IntoProto() *snapshot.AuctionState

type AuctionTrigger

type AuctionTrigger = proto.AuctionTrigger
const (
	// Default value for AuctionTrigger, no auction triggered.
	AuctionTriggerUnspecified AuctionTrigger = proto.AuctionTrigger_AUCTION_TRIGGER_UNSPECIFIED
	// Batch auction.
	AuctionTriggerBatch AuctionTrigger = proto.AuctionTrigger_AUCTION_TRIGGER_BATCH
	// Opening auction.
	AuctionTriggerOpening AuctionTrigger = proto.AuctionTrigger_AUCTION_TRIGGER_OPENING
	// Price monitoring trigger.
	AuctionTriggerPrice AuctionTrigger = proto.AuctionTrigger_AUCTION_TRIGGER_PRICE
	// Liquidity monitoring trigger.
	AuctionTriggerLiquidity AuctionTrigger = proto.AuctionTrigger_AUCTION_TRIGGER_LIQUIDITY
)

type BDeposit

type BDeposit struct {
	ID      string
	Deposit *Deposit
}

func BDepositFromProto

func BDepositFromProto(d *snapshot.Deposit) *BDeposit

func (BDeposit) IntoProto

func (b BDeposit) IntoProto() *snapshot.Deposit

type BankingAssetActions

type BankingAssetActions struct {
	AssetAction []*AssetAction
}

func BankingAssetActionsFromProto

func BankingAssetActionsFromProto(aa *snapshot.BankingAssetActions) *BankingAssetActions

func (*BankingAssetActions) IntoProto

type BankingBridgeState

type BankingBridgeState struct {
	Active      bool
	BlockHeight uint64
	LogIndex    uint64
}

type BankingDeposits

type BankingDeposits struct {
	Deposit []*BDeposit
}

func BankingDepositsFromProto

func BankingDepositsFromProto(bd *snapshot.BankingDeposits) *BankingDeposits

func (BankingDeposits) IntoProto

func (b BankingDeposits) IntoProto() *snapshot.BankingDeposits

type BankingSeen

type BankingSeen struct {
	Refs []string
}

func BankingSeenFromProto

func BankingSeenFromProto(bs *snapshot.BankingSeen) *BankingSeen

func (BankingSeen) IntoProto

func (b BankingSeen) IntoProto() *snapshot.BankingSeen

type BankingWithdrawals

type BankingWithdrawals struct {
	Withdrawals []*RWithdrawal
}

func BankingWithdrawalsFromProto

func BankingWithdrawalsFromProto(bw *snapshot.BankingWithdrawals) *BankingWithdrawals

func (BankingWithdrawals) IntoProto

type BannedParty

type BannedParty struct {
	Party string
	Until int64
}

func BannedPartyFromProto

func BannedPartyFromProto(ban *snapshot.BannedParty) *BannedParty

func (*BannedParty) IntoProto

func (b *BannedParty) IntoProto() *snapshot.BannedParty

type Block

type Block struct {
	Height int64
}

func NewBlockFromProto

func NewBlockFromProto(bp *checkpoint.Block) *Block

func (Block) IntoProto

func (b Block) IntoProto() *checkpoint.Block

type BlockRejectStats

type BlockRejectStats struct {
	Total    uint64
	Rejected uint64
}

func BlockRejectStatsFromProto

func BlockRejectStatsFromProto(rejects *snapshot.BlockRejectStats) *BlockRejectStats

func (*BlockRejectStats) IntoProto

func (brs *BlockRejectStats) IntoProto() *snapshot.BlockRejectStats

type BuiltinAsset

type BuiltinAsset struct {
	MaxFaucetAmountMint *num.Uint
}

BuiltinAsset is a Vega internal asset.

func (BuiltinAsset) String

func (a BuiltinAsset) String() string

type BuiltinAssetDeposit

type BuiltinAssetDeposit struct {
	// A Vega network internal asset identifier
	VegaAssetID string
	// A Vega party identifier (pub-key)
	PartyID string
	// The amount to be deposited
	Amount *num.Uint
}

func NewBuiltinAssetDepositFromProto

func NewBuiltinAssetDepositFromProto(p *vegapb.BuiltinAssetDeposit) (*BuiltinAssetDeposit, error)

func (BuiltinAssetDeposit) GetVegaAssetID

func (b BuiltinAssetDeposit) GetVegaAssetID() string

func (BuiltinAssetDeposit) IntoProto

func (BuiltinAssetDeposit) String

func (b BuiltinAssetDeposit) String() string

type BuiltinAssetEvent

type BuiltinAssetEvent struct {
	// Types that are valid to be assigned to Action:
	//	*BuiltinAssetEvent_Deposit
	//	*BuiltinAssetEvent_Withdrawal
	Action builtinAssetEventAction
}

func NewBuiltinAssetEventFromProto

func NewBuiltinAssetEventFromProto(p *vegapb.BuiltinAssetEvent) (*BuiltinAssetEvent, error)

func (BuiltinAssetEvent) IntoProto

func (BuiltinAssetEvent) String

func (c BuiltinAssetEvent) String() string

type BuiltinAssetEventDeposit

type BuiltinAssetEventDeposit struct {
	Deposit *BuiltinAssetDeposit
}

func (BuiltinAssetEventDeposit) IntoProto

func (BuiltinAssetEventDeposit) String

func (b BuiltinAssetEventDeposit) String() string

type BuiltinAssetEventWithdrawal

type BuiltinAssetEventWithdrawal struct {
	Withdrawal *BuiltinAssetWithdrawal
}

func (BuiltinAssetEventWithdrawal) IntoProto

func (BuiltinAssetEventWithdrawal) String

type BuiltinAssetWithdrawal

type BuiltinAssetWithdrawal struct {
	// A Vega network internal asset identifier
	VegaAssetID string
	// A Vega network party identifier (pub-key)
	PartyID string
	// The amount to be withdrawn
	Amount *num.Uint
}

func (BuiltinAssetWithdrawal) GetVegaAssetID

func (b BuiltinAssetWithdrawal) GetVegaAssetID() string

func (BuiltinAssetWithdrawal) IntoProto

func (BuiltinAssetWithdrawal) String

func (b BuiltinAssetWithdrawal) String() string

type CPState

type CPState struct {
	NextCp int64
}

func CheckpointFromProto

func CheckpointFromProto(c *snapshot.Checkpoint) *CPState

func (CPState) IntoProto

func (c CPState) IntoProto() *snapshot.Checkpoint

type CancelTransferFunds

type CancelTransferFunds struct {
	Party      string
	TransferID string
}

func NewCancelTransferFromProto

func NewCancelTransferFromProto(party string, p *commandspb.CancelTransfer) *CancelTransferFunds

type Candle

type Candle = proto.Candle

type ChainEvent

type ChainEvent = commandspb.ChainEvent

type ChainEventBuiltin added in v0.55.0

type ChainEventBuiltin struct {
	Builtin *BuiltinAssetEvent
}

func NewChainEventBuiltinFromProto

func NewChainEventBuiltinFromProto(p *commandspb.ChainEvent_Builtin) (*ChainEventBuiltin, error)

func (ChainEventBuiltin) IntoProto added in v0.55.0

func (ChainEventBuiltin) String added in v0.55.0

func (c ChainEventBuiltin) String() string

type ChainEventERC20

type ChainEventERC20 struct {
	ERC20 *ERC20Event
}

func NewChainEventERC20FromProto

func NewChainEventERC20FromProto(p *commandspb.ChainEvent_Erc20) (*ChainEventERC20, error)

func (ChainEventERC20) IntoProto

func (ChainEventERC20) String

func (c ChainEventERC20) String() string

type Checkpoint

type Checkpoint struct {
	Governance            []byte
	Assets                []byte
	Collateral            []byte
	NetworkParameters     []byte
	Delegation            []byte
	Epoch                 []byte
	Block                 []byte
	Rewards               []byte
	Validators            []byte
	Banking               []byte
	Staking               []byte
	MultisigControl       []byte
	MarketActivityTracker []byte
}

func NewCheckpointFromProto

func NewCheckpointFromProto(pc *checkpoint.Checkpoint) *Checkpoint

func (Checkpoint) Get

func (c Checkpoint) Get(name CheckpointName) []byte

Get as the name suggests gets the data by checkpoint name.

func (Checkpoint) GetBlockHeight

func (c Checkpoint) GetBlockHeight() (int64, error)

func (Checkpoint) HashBytes

func (c Checkpoint) HashBytes() bytes.Buffer

HashBytes returns the data contained in the checkpoint as a []byte for hashing the order in which the data is added to the slice matters.

func (Checkpoint) IntoProto

func (c Checkpoint) IntoProto() *checkpoint.Checkpoint

func (*Checkpoint) Set

func (c *Checkpoint) Set(name CheckpointName, val []byte)

Set set a specific checkpoint value using the name the engine returns.

func (*Checkpoint) SetBlockHeight

func (c *Checkpoint) SetBlockHeight(height int64) error

type CheckpointName

type CheckpointName string
const (
	GovernanceCheckpoint            CheckpointName = "governance"
	AssetsCheckpoint                CheckpointName = "assets"
	CollateralCheckpoint            CheckpointName = "collateral"
	NetParamsCheckpoint             CheckpointName = "netparams"
	DelegationCheckpoint            CheckpointName = "delegation"
	EpochCheckpoint                 CheckpointName = "epoch"
	BlockCheckpoint                 CheckpointName = "block" // pseudo-checkpoint, really...
	MarketActivityTrackerCheckpoint CheckpointName = "marketActivity"
	PendingRewardsCheckpoint        CheckpointName = "rewards"
	BankingCheckpoint               CheckpointName = "banking"
	ValidatorsCheckpoint            CheckpointName = "validators"
	StakingCheckpoint               CheckpointName = "staking"
	MultisigControlCheckpoint       CheckpointName = "multisigControl"
)

type CheckpointState

type CheckpointState struct {
	State []byte
	Hash  []byte
}

func NewCheckpointStateFromProto

func NewCheckpointStateFromProto(ps *checkpoint.CheckpointState) *CheckpointState

func (CheckpointState) GetBlockHeight

func (s CheckpointState) GetBlockHeight() (int64, error)

func (CheckpointState) GetCheckpoint

func (s CheckpointState) GetCheckpoint() (*Checkpoint, error)

func (CheckpointState) IntoProto

func (*CheckpointState) SetCheckpoint

func (s *CheckpointState) SetCheckpoint(cp *Checkpoint) error

func (*CheckpointState) SetState

func (s *CheckpointState) SetState(state []byte) error

func (CheckpointState) Validate

func (s CheckpointState) Validate() error

Validate checks the hash, returns nil if valid.

type Chunk

type Chunk struct {
	Data   []*Payload
	Nr, Of int64
}

func ChunkFromProto

func ChunkFromProto(c *snapshot.Chunk) *Chunk

func (Chunk) IntoProto

func (c Chunk) IntoProto() *snapshot.Chunk

type CollateralAccounts

type CollateralAccounts struct {
	Accounts []*Account
}

func CollateralAccountsFromProto

func CollateralAccountsFromProto(ca *snapshot.CollateralAccounts) *CollateralAccounts

func (CollateralAccounts) IntoProto

type CollateralAssets

type CollateralAssets struct {
	Assets []*Asset
}

func CollateralAssetsFromProto

func CollateralAssetsFromProto(ca *snapshot.CollateralAssets) *CollateralAssets

func (CollateralAssets) IntoProto

type CurrentPrice

type CurrentPrice struct {
	Price  *num.Uint
	Volume uint64
}

func CurrentPriceFromProto

func CurrentPriceFromProto(scp *snapshot.CurrentPrice) *CurrentPrice

func (CurrentPrice) IntoProto

func (cp CurrentPrice) IntoProto() *snapshot.CurrentPrice

type DataSignerType added in v0.61.0

type DataSignerType int
const (
	DataSignerTypeUnspecified DataSignerType = iota
	DataSignerTypePubKey
	DataSignerTypeEthAddress
)

type DataSourceDefinition added in v0.62.0

type DataSourceDefinition struct {
	SourceType dataSourceType
}

func DataSourceDefinitionFromProto added in v0.62.0

func DataSourceDefinitionFromProto(protoConfig *vegapb.DataSourceDefinition) *DataSourceDefinition

/ DataSourceDefinitionFromProto tries to build the DataSourceDfiniition object from the given proto object.

func NewDataSourceDefinition added in v0.62.0

func NewDataSourceDefinition(tp int) *DataSourceDefinition

NewDataSourceDefinition creates a new empty DataSourceDefinition object.

func (DataSourceDefinition) DeepClone added in v0.62.0

DeepClone returns a clone of the DataSourceDefinition object.

func (DataSourceDefinition) GetDataSourceSpecConfiguration added in v0.62.0

func (s DataSourceDefinition) GetDataSourceSpecConfiguration() *vegapb.DataSourceSpecConfiguration

GetDataSourceSpecConfiguration returns the base object - DataSourceSpecConfiguration from the DataSourceDefinition.

func (DataSourceDefinition) GetFilters added in v0.62.0

func (s DataSourceDefinition) GetFilters() []*DataSourceSpecFilter

/ GetFilters tries to get the filters from the DataSourceDefinition if they exist.

func (DataSourceDefinition) GetSigners added in v0.62.0

func (s DataSourceDefinition) GetSigners() []*Signer

/ GetSigners tries to get the signers from the DataSourceDefinition if they exist.

func (DataSourceDefinition) IntoProto added in v0.62.0

/ IntoProto returns the proto object from DataSourceDefinition that is - vegapb.DataSourceDefinition that may have external or internal SourceType. Returns the whole proto object.

func (*DataSourceDefinition) SetFilterDecimals added in v0.65.0

func (s *DataSourceDefinition) SetFilterDecimals(d uint64) *DataSourceDefinition

func (*DataSourceDefinition) SetOracleConfig added in v0.62.0

SetOracleConfig sets a given oracle config in the receiver. This method does not care about object previous contents.

func (DataSourceDefinition) String added in v0.62.0

func (s DataSourceDefinition) String() string

/ String returns the data source definition content as a string.

func (DataSourceDefinition) ToDataSourceSpec added in v0.62.0

func (s DataSourceDefinition) ToDataSourceSpec() *DataSourceSpec

func (*DataSourceDefinition) ToExternalDataSourceSpec added in v0.62.0

func (s *DataSourceDefinition) ToExternalDataSourceSpec() *ExternalDataSourceSpec

func (*DataSourceDefinition) UpdateFilters added in v0.62.0

func (s *DataSourceDefinition) UpdateFilters(filters []*DataSourceSpecFilter) error

/ UpdateFilters updates the DataSourceDefinition Filters.

type DataSourceDefinitionExternal added in v0.62.0

type DataSourceDefinitionExternal struct {
	SourceType dataSourceType
}

func DataSourceDefinitionExternalFromProto added in v0.62.0

func DataSourceDefinitionExternalFromProto(protoConfig *vegapb.DataSourceDefinitionExternal) *DataSourceDefinitionExternal

/ DataSourceDefinitionExternalFromProto tries to build the DataSourceDefinitionExternal object from the given proto object..

func (*DataSourceDefinitionExternal) DeepClone added in v0.62.0

func (e *DataSourceDefinitionExternal) DeepClone() dataSourceType

func (*DataSourceDefinitionExternal) IntoProto added in v0.62.0

/ IntoProto tries to return the base proto object from DataSourceDefinitionExternal.

func (*DataSourceDefinitionExternal) String added in v0.62.0

type DataSourceDefinitionExternalOracle added in v0.62.0

type DataSourceDefinitionExternalOracle struct {
	Oracle *DataSourceSpecConfiguration
}

This is the base data source.

func DataSourceDefinitionExternalOracleFromProto added in v0.62.0

func DataSourceDefinitionExternalOracleFromProto(protoConfig *vegapb.DataSourceDefinitionExternal_Oracle) *DataSourceDefinitionExternalOracle

DataSourceDefinitionExternalOracleFromProto tries to build the DataSourceDefinitionExternalOracle object from the given proto object.

func (*DataSourceDefinitionExternalOracle) DeepClone added in v0.62.0

func (e *DataSourceDefinitionExternalOracle) DeepClone() dataSourceType

func (*DataSourceDefinitionExternalOracle) IntoProto added in v0.62.0

/ IntoProto tries to build the proto object from DataSourceDefinitionExternalOracle.

func (*DataSourceDefinitionExternalOracle) String added in v0.62.0

type DataSourceDefinitionExternalx added in v0.62.0

type DataSourceDefinitionExternalx struct {
	External *DataSourceDefinitionExternal
}

func (*DataSourceDefinitionExternalx) DeepClone added in v0.62.0

func (s *DataSourceDefinitionExternalx) DeepClone() dataSourceType

func (*DataSourceDefinitionExternalx) IntoProto added in v0.62.0

IntoProto returns the proto object from DataSourceDefinitionInternalx This method is not called from anywhere.

func (*DataSourceDefinitionExternalx) String added in v0.62.0

String returns the DataSourceDefinitionExternalx content as a string.

type DataSourceDefinitionInternal added in v0.62.0

type DataSourceDefinitionInternal struct {
	SourceType dataSourceType
}

func DataSourceDefinitionInternalFromProto added in v0.62.0

func DataSourceDefinitionInternalFromProto(protoConfig *vegapb.DataSourceDefinitionInternal) *DataSourceDefinitionInternal

// DataSourceDefinitionInternalFromProto tries to build the DataSourceDefinitionInternal object from the given proto configuration.

func (*DataSourceDefinitionInternal) DeepClone added in v0.62.0

func (i *DataSourceDefinitionInternal) DeepClone() dataSourceType

func (*DataSourceDefinitionInternal) IntoProto added in v0.62.0

func (i *DataSourceDefinitionInternal) IntoProto() interface{}

func (*DataSourceDefinitionInternal) String added in v0.62.0

type DataSourceDefinitionInternalTime added in v0.62.0

type DataSourceDefinitionInternalTime struct {
	Time *DataSourceSpecConfigurationTime
}

func DataSourceDefinitionInternalTimeFromProto added in v0.62.0

func DataSourceDefinitionInternalTimeFromProto(protoConfig *vegapb.DataSourceDefinitionInternal_Time) *DataSourceDefinitionInternalTime

func (*DataSourceDefinitionInternalTime) DeepClone added in v0.62.0

func (i *DataSourceDefinitionInternalTime) DeepClone() dataSourceType

func (*DataSourceDefinitionInternalTime) IntoProto added in v0.62.0

func (*DataSourceDefinitionInternalTime) String added in v0.62.0

type DataSourceDefinitionInternalx added in v0.62.0

type DataSourceDefinitionInternalx struct {
	Internal *DataSourceDefinitionInternal
}

func (*DataSourceDefinitionInternalx) DeepClone added in v0.62.0

func (s *DataSourceDefinitionInternalx) DeepClone() dataSourceType

DeepClone returns a clone of the DataSourceDefinitionInternalx object.

func (*DataSourceDefinitionInternalx) IntoProto added in v0.62.0

IntoProto returns the proto object from DataSourceDefinitionInternalx. This method is not called from anywhere.

func (*DataSourceDefinitionInternalx) String added in v0.62.0

String returns the DataSourceDefinitionInternalx content as a string.

type DataSourceSpec added in v0.61.0

type DataSourceSpec struct {
	ID        string
	CreatedAt int64
	UpdatedAt int64
	Data      *DataSourceDefinition
	Status    DataSourceSpecStatus
}

func DataSourceSpecFromProto added in v0.61.0

func DataSourceSpecFromProto(specProto *vegapb.DataSourceSpec) *DataSourceSpec

func (*DataSourceSpec) IntoProto added in v0.61.0

func (s *DataSourceSpec) IntoProto() *vegapb.DataSourceSpec

func (*DataSourceSpec) String added in v0.61.0

func (s *DataSourceSpec) String() string

func (*DataSourceSpec) ToExternalDataSourceSpec added in v0.61.0

func (s *DataSourceSpec) ToExternalDataSourceSpec() *ExternalDataSourceSpec

/ ToExternalDataSourceSpec wraps the DataSourceSpec receiver into ExternalDataSourceSpec. Used for aligning with required types in the code.

type DataSourceSpecBindingForFuture added in v0.61.0

type DataSourceSpecBindingForFuture struct {
	SettlementDataProperty     string
	TradingTerminationProperty string
}

func DataSourceSpecBindingForFutureFromProto added in v0.61.0

func DataSourceSpecBindingForFutureFromProto(o *vegapb.DataSourceSpecToFutureBinding) *DataSourceSpecBindingForFuture

func (DataSourceSpecBindingForFuture) DeepClone added in v0.61.0

func (DataSourceSpecBindingForFuture) IntoProto added in v0.61.0

func (DataSourceSpecBindingForFuture) String added in v0.61.0

type DataSourceSpecCondition added in v0.61.0

type DataSourceSpecCondition struct {
	Operator DataSourceSpecConditionOperator
	Value    string
}

DataSourceSpecCondition mirrors datapb.Condition type.

func DataSourceSpecConditionFromProto added in v0.61.0

func DataSourceSpecConditionFromProto(protoCondition *datapb.Condition) *DataSourceSpecCondition

func DataSourceSpecConditionsFromProto added in v0.61.0

func DataSourceSpecConditionsFromProto(protoConditions []*datapb.Condition) []*DataSourceSpecCondition

func DeepCloneDataSourceSpecConditions added in v0.61.0

func DeepCloneDataSourceSpecConditions(conditions []*DataSourceSpecCondition) []*DataSourceSpecCondition

func (*DataSourceSpecCondition) DeepClone added in v0.61.0

func (c *DataSourceSpecCondition) DeepClone() dataSourceType

func (DataSourceSpecCondition) IntoProto added in v0.61.0

func (c DataSourceSpecCondition) IntoProto() *datapb.Condition

func (DataSourceSpecCondition) String added in v0.61.0

func (c DataSourceSpecCondition) String() string

type DataSourceSpecConditionOperator added in v0.61.0

type DataSourceSpecConditionOperator = datapb.Condition_Operator

type DataSourceSpecConditions added in v0.61.0

type DataSourceSpecConditions []*DataSourceSpecCondition

func (DataSourceSpecConditions) IntoProto added in v0.61.0

func (sc DataSourceSpecConditions) IntoProto() []*datapb.Condition

func (DataSourceSpecConditions) String added in v0.61.0

func (sc DataSourceSpecConditions) String() string

type DataSourceSpecConfiguration added in v0.61.0

type DataSourceSpecConfiguration struct {
	Signers []*Signer
	Filters []*DataSourceSpecFilter
}

DataSourceSpecConfiguration is used only by Oracles without a type wrapper at the moment.

func DataSourceSpecConfigurationFromProto added in v0.61.0

func DataSourceSpecConfigurationFromProto(protoConfig *vegapb.DataSourceSpecConfiguration) *DataSourceSpecConfiguration

DataSourceSpecConfigurationFromProto tries to build the DataSourceSpecConfiguration object from the given proto object.

func (*DataSourceSpecConfiguration) DeepClone added in v0.61.0

func (s *DataSourceSpecConfiguration) DeepClone() dataSourceType

func (*DataSourceSpecConfiguration) IntoProto added in v0.61.0

/ IntoProto tries to build the proto object from DataSourceSpecConfiguration.

func (DataSourceSpecConfiguration) String added in v0.61.0

/ String returns the content of DataSourceSpecConfiguration as a string.

type DataSourceSpecConfigurationTime added in v0.62.0

type DataSourceSpecConfigurationTime struct {
	Conditions []*DataSourceSpecCondition
}

DataSourceSpecConfigurationTime is used internally.

func DataSourceSpecConfigurationTimeFromProto added in v0.62.0

func DataSourceSpecConfigurationTimeFromProto(protoConfig *vegapb.DataSourceSpecConfigurationTime) *DataSourceSpecConfigurationTime

func (DataSourceSpecConfigurationTime) DeepClone added in v0.62.0

func (s DataSourceSpecConfigurationTime) DeepClone() dataSourceType

func (DataSourceSpecConfigurationTime) IntoProto added in v0.62.0

func (DataSourceSpecConfigurationTime) String added in v0.62.0

/ String returns the content of DataSourceSpecConfigurationTime as a string.

type DataSourceSpecFilter added in v0.61.0

type DataSourceSpecFilter struct {
	Key        *DataSourceSpecPropertyKey
	Conditions []*DataSourceSpecCondition
}

func DataSourceSpecFilterFromProto added in v0.61.0

func DataSourceSpecFilterFromProto(protoFilter *datapb.Filter) *DataSourceSpecFilter

func DataSourceSpecFiltersFromProto added in v0.61.0

func DataSourceSpecFiltersFromProto(protoFilters []*datapb.Filter) []*DataSourceSpecFilter

func DeepCloneDataSourceSpecFilters added in v0.61.0

func DeepCloneDataSourceSpecFilters(filters []*DataSourceSpecFilter) []*DataSourceSpecFilter

func (*DataSourceSpecFilter) DeepClone added in v0.61.0

DeepClone clones the filter receiver taking into account if its fields are empty.

func (*DataSourceSpecFilter) IntoProto added in v0.61.0

func (f *DataSourceSpecFilter) IntoProto() *datapb.Filter

IntoProto return proto version of the filter receiver taking into account if its fields are empty.

func (DataSourceSpecFilter) String added in v0.61.0

func (f DataSourceSpecFilter) String() string

type DataSourceSpecFilters added in v0.61.0

type DataSourceSpecFilters []*DataSourceSpecFilter

func (DataSourceSpecFilters) IntoProto added in v0.61.0

func (df DataSourceSpecFilters) IntoProto() []*datapb.Filter

func (DataSourceSpecFilters) String added in v0.61.0

func (df DataSourceSpecFilters) String() string

type DataSourceSpecPropertyKey added in v0.61.0

type DataSourceSpecPropertyKey struct {
	Name                string
	Type                DataSourceSpecPropertyKeyType
	NumberDecimalPlaces *uint64
}

func DataSourceSpecPropertyKeyFromProto added in v0.61.0

func DataSourceSpecPropertyKeyFromProto(protoKey *datapb.PropertyKey) *DataSourceSpecPropertyKey

func (*DataSourceSpecPropertyKey) DeepClone added in v0.61.0

func (DataSourceSpecPropertyKey) IntoProto added in v0.61.0

func (DataSourceSpecPropertyKey) String added in v0.61.0

func (k DataSourceSpecPropertyKey) String() string

type DataSourceSpecPropertyKeyType added in v0.61.0

type DataSourceSpecPropertyKeyType = datapb.PropertyKey_Type

type DataSourceSpecSigners added in v0.61.0

type DataSourceSpecSigners []*Signer

func (DataSourceSpecSigners) String added in v0.61.0

func (s DataSourceSpecSigners) String() string

type DataSourceSpecStatus added in v0.61.0

type DataSourceSpecStatus = vegapb.DataSourceSpec_Status

type DataSourceSpecToFutureBinding added in v0.61.0

type DataSourceSpecToFutureBinding struct{}

type Delegate

type Delegate struct {
	NodeID string
	Amount *num.Uint
}

func (Delegate) IntoProto

func (d Delegate) IntoProto() *commandspb.DelegateSubmission

func (Delegate) String

func (d Delegate) String() string

type DelegateCP

type DelegateCP struct {
	Active  []*DelegationEntry
	Pending []*DelegationEntry
	Auto    []string
}

func NewDelegationCPFromProto

func NewDelegationCPFromProto(sd *checkpoint.Delegate) *DelegateCP

func (DelegateCP) IntoProto

func (d DelegateCP) IntoProto() *checkpoint.Delegate

type Delegation

type Delegation struct {
	Party    string
	NodeID   string
	Amount   *num.Uint
	EpochSeq string
}

func DelegationFromProto

func DelegationFromProto(d *vega.Delegation) *Delegation

func (Delegation) IntoProto

func (d Delegation) IntoProto() *vega.Delegation

type DelegationActive

type DelegationActive struct {
	Delegations []*Delegation
}

func DelegationActiveFromProto

func DelegationActiveFromProto(da *snapshot.DelegationActive) *DelegationActive

func (DelegationActive) IntoProto

type DelegationAuto

type DelegationAuto struct {
	Parties []string
}

func DelegationAutoFromProto

func DelegationAutoFromProto(da *snapshot.DelegationAuto) *DelegationAuto

func (DelegationAuto) IntoProto

func (d DelegationAuto) IntoProto() *snapshot.DelegationAuto

type DelegationEntry

type DelegationEntry struct {
	Party      string
	Node       string
	Amount     *num.Uint
	Undelegate bool
	EpochSeq   uint64
}

func NewDelegationEntryFromProto

func NewDelegationEntryFromProto(de *checkpoint.DelegateEntry) *DelegationEntry

func (DelegationEntry) IntoProto

func (d DelegationEntry) IntoProto() *checkpoint.DelegateEntry

type DelegationPending

type DelegationPending struct {
	Delegations  []*Delegation
	Undelegation []*Delegation
}

func DelegationPendingFromProto

func DelegationPendingFromProto(dp *snapshot.DelegationPending) *DelegationPending

func (DelegationPending) IntoProto

type Deposit

type Deposit struct {
	// ID Unique identifier for the deposit
	ID string
	// Status of the deposit
	Status DepositStatus
	// Party identifier of the user initiating the deposit
	PartyID string
	// Asset The Vega asset targeted by this deposit
	Asset string
	// Amount The amount to be deposited
	Amount *num.Uint
	// TxHash The hash of the transaction from the foreign chain
	TxHash string
	// Timestamp for when the Vega account was updated with the deposit
	CreditDate int64
	// Timestamp for when the deposit was created on the Vega network
	CreationDate int64
}

Deposit represent a deposit on to the Vega network.

func DepositFromProto

func DepositFromProto(d *vegapb.Deposit) *Deposit

func (*Deposit) IntoProto

func (d *Deposit) IntoProto() *vegapb.Deposit

func (*Deposit) String

func (d *Deposit) String() string

type DepositStatus

type DepositStatus = vegapb.Deposit_Status
const (
	// DepositStatusUnspecified Default value, always invalid.
	DepositStatusUnspecified DepositStatus = 0
	// DepositStatusOpen The deposit is being processed by the network.
	DepositStatusOpen DepositStatus = 1
	// DepositStatusCancelled The deposit has been cancelled by the network.
	DepositStatusCancelled DepositStatus = 2
	// DepositStatusFinalized The deposit has been finalised and accounts have been updated.
	DepositStatusFinalized DepositStatus = 3
)

type ERC20

type ERC20 struct {
	ContractAddress   string
	LifetimeLimit     *num.Uint
	WithdrawThreshold *num.Uint
}

An ERC20 token based asset, living on the ethereum network.

func (ERC20) DeepClone

func (e ERC20) DeepClone() *ERC20

func (ERC20) String

func (e ERC20) String() string

type ERC20AssetDelist

type ERC20AssetDelist struct {
	// The Vega network internal identifier of the asset
	VegaAssetID string
}

func NewERC20AssetDelistFromProto

func NewERC20AssetDelistFromProto(p *vegapb.ERC20AssetDelist) *ERC20AssetDelist

func (ERC20AssetDelist) IntoProto

func (e ERC20AssetDelist) IntoProto() *vegapb.ERC20AssetDelist

func (ERC20AssetDelist) String

func (e ERC20AssetDelist) String() string

type ERC20AssetLimitsUpdated

type ERC20AssetLimitsUpdated struct {
	VegaAssetID           string
	SourceEthereumAddress string
	LifetimeLimits        *num.Uint
	WithdrawThreshold     *num.Uint
}

func (ERC20AssetLimitsUpdated) GetVegaAssetID

func (e ERC20AssetLimitsUpdated) GetVegaAssetID() string

func (ERC20AssetLimitsUpdated) IntoProto

func (ERC20AssetLimitsUpdated) String

func (e ERC20AssetLimitsUpdated) String() string

type ERC20AssetList

type ERC20AssetList struct {
	// The Vega network internal identifier of the asset
	VegaAssetID string
	// ethereum address of the asset
	AssetSource string
}

func NewERC20AssetListFromProto

func NewERC20AssetListFromProto(p *vegapb.ERC20AssetList) *ERC20AssetList

func (ERC20AssetList) GetVegaAssetID

func (e ERC20AssetList) GetVegaAssetID() string

func (ERC20AssetList) IntoProto

func (e ERC20AssetList) IntoProto() *vegapb.ERC20AssetList

func (ERC20AssetList) String

func (e ERC20AssetList) String() string

type ERC20Deposit

type ERC20Deposit struct {
	// The vega network internal identifier of the asset
	VegaAssetID string
	// The Ethereum wallet that initiated the deposit
	SourceEthereumAddress string
	// The Vega party identifier (pub-key) which is the target of the deposit
	TargetPartyID string
	// The amount to be deposited
	Amount *num.Uint
}

func NewERC20DepositFromProto

func NewERC20DepositFromProto(p *vegapb.ERC20Deposit) (*ERC20Deposit, error)

func (ERC20Deposit) GetVegaAssetID

func (e ERC20Deposit) GetVegaAssetID() string

func (ERC20Deposit) IntoProto

func (e ERC20Deposit) IntoProto() *vegapb.ERC20Deposit

func (ERC20Deposit) String

func (e ERC20Deposit) String() string

type ERC20Event

type ERC20Event struct {
	// Index of the transaction
	Index uint64
	// The block in which the transaction was added
	Block uint64
	// The action
	//
	// Types that are valid to be assigned to Action:
	//	*ERC20EventAssetList
	//	*ERC20EventAssetDelist
	//	*ERC20EventDeposit
	//	*ERC20EventWithdrawal
	//	*ERC20EventAssetLimitsUpdated
	//	*ERC20BridgeStopped
	//	*ERC20BridgeRemoved
	Action erc20EventAction
}

func NewERC20Event

func NewERC20Event(p *vegapb.ERC20Event) (*ERC20Event, error)

func (ERC20Event) IntoProto

func (e ERC20Event) IntoProto() *vegapb.ERC20Event

func (ERC20Event) String

func (e ERC20Event) String() string

type ERC20EventAssetDelist

type ERC20EventAssetDelist struct {
	AssetDelist *ERC20AssetDelist
}

func (ERC20EventAssetDelist) IntoProto

func (ERC20EventAssetDelist) String

func (e ERC20EventAssetDelist) String() string

type ERC20EventAssetLimitsUpdated

type ERC20EventAssetLimitsUpdated struct {
	AssetLimitsUpdated *ERC20AssetLimitsUpdated
}

func (ERC20EventAssetLimitsUpdated) IntoProto

func (ERC20EventAssetLimitsUpdated) String

type ERC20EventAssetList

type ERC20EventAssetList struct {
	AssetList *ERC20AssetList
}

func (ERC20EventAssetList) IntoProto

func (ERC20EventAssetList) String

func (e ERC20EventAssetList) String() string

type ERC20EventBridgeResumed

type ERC20EventBridgeResumed struct {
	BridgeResumed bool
}

func (ERC20EventBridgeResumed) IntoProto

func (ERC20EventBridgeResumed) String

func (e ERC20EventBridgeResumed) String() string

type ERC20EventBridgeStopped

type ERC20EventBridgeStopped struct {
	BridgeStopped bool
}

func (ERC20EventBridgeStopped) IntoProto

func (ERC20EventBridgeStopped) String

func (e ERC20EventBridgeStopped) String() string

type ERC20EventDeposit

type ERC20EventDeposit struct {
	Deposit *ERC20Deposit
}

func NewERC20EventDeposit

func NewERC20EventDeposit(p *vegapb.ERC20Event_Deposit) (*ERC20EventDeposit, error)

func (ERC20EventDeposit) IntoProto

func (ERC20EventDeposit) String

func (e ERC20EventDeposit) String() string

type ERC20EventWithdrawal

type ERC20EventWithdrawal struct {
	Withdrawal *ERC20Withdrawal
}

func (ERC20EventWithdrawal) IntoProto

func (ERC20EventWithdrawal) String

func (e ERC20EventWithdrawal) String() string

type ERC20Update

type ERC20Update struct {
	LifetimeLimit     *num.Uint
	WithdrawThreshold *num.Uint
}

func (ERC20Update) DeepClone

func (e ERC20Update) DeepClone() *ERC20Update

func (ERC20Update) String

func (e ERC20Update) String() string

type ERC20Withdrawal

type ERC20Withdrawal struct {
	// The Vega network internal identifier of the asset
	VegaAssetID string
	// The target Ethereum wallet address
	TargetEthereumAddress string
	// The reference nonce used for the transaction
	ReferenceNonce string
}

func NewERC20WithdrawalFromProto

func NewERC20WithdrawalFromProto(p *vegapb.ERC20Withdrawal) *ERC20Withdrawal

func (ERC20Withdrawal) GetVegaAssetID

func (e ERC20Withdrawal) GetVegaAssetID() string

func (ERC20Withdrawal) IntoProto

func (e ERC20Withdrawal) IntoProto() *vegapb.ERC20Withdrawal

func (ERC20Withdrawal) String

func (e ERC20Withdrawal) String() string

type ETHAddress added in v0.61.0

type ETHAddress struct {
	Address string
}

ETHAddress.

func (ETHAddress) DeepClone added in v0.61.0

func (e ETHAddress) DeepClone() *ETHAddress

func (ETHAddress) IntoProto added in v0.61.0

func (e ETHAddress) IntoProto() *datapb.ETHAddress

func (ETHAddress) String added in v0.61.0

func (e ETHAddress) String() string

type Epoch

type Epoch struct {
	// Unique identifier that increases by one each epoch
	Seq uint64
	// What time did this epoch start
	StartTime time.Time
	// What time should this epoch end
	ExpireTime time.Time
	// What time did it actually end
	EndTime time.Time
	// What action took place
	Action proto.EpochAction
}

func NewEpochFromProto

func NewEpochFromProto(p *eventspb.EpochEvent) *Epoch

func (Epoch) IntoProto

func (e Epoch) IntoProto() *eventspb.EpochEvent

func (Epoch) String

func (e Epoch) String() string

type EpochState

type EpochState struct {
	Seq                  uint64
	StartTime            time.Time
	ExpireTime           time.Time
	ReadyToStartNewEpoch bool
	ReadyToEndEpoch      bool
}

func EpochFromProto

func EpochFromProto(e *snapshot.EpochState) *EpochState

func (*EpochState) IntoProto

func (e *EpochState) IntoProto() *snapshot.EpochState

type EquityShare

type EquityShare struct {
	Mvp                 num.Decimal
	PMvp                num.Decimal
	R                   num.Decimal
	OpeningAuctionEnded bool
	Lps                 []*EquityShareLP
}

func EquityShareFromProto

func EquityShareFromProto(es *snapshot.EquityShare) *EquityShare

func (EquityShare) IntoProto

func (e EquityShare) IntoProto() *snapshot.EquityShare

type EquityShareLP

type EquityShareLP struct {
	ID     string
	Stake  num.Decimal
	Share  num.Decimal
	Avg    num.Decimal
	VStake num.Decimal
}

func EquityShareLPFromProto

func EquityShareLPFromProto(esl *snapshot.EquityShareLP) *EquityShareLP

func (EquityShareLP) IntoProto

func (e EquityShareLP) IntoProto() *snapshot.EquityShareLP

type Erc20WithdrawExt

type Erc20WithdrawExt struct {
	ReceiverAddress string
}

func Erc20WithdrawExtFromProto

func Erc20WithdrawExtFromProto(erc20 *vegapb.Erc20WithdrawExt) *Erc20WithdrawExt

func (*Erc20WithdrawExt) IntoProto

func (x *Erc20WithdrawExt) IntoProto() *vegapb.Erc20WithdrawExt

func (*Erc20WithdrawExt) String

func (x *Erc20WithdrawExt) String() string

type EthereumConfig

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

func EthereumConfigFromProto

func EthereumConfigFromProto(cfgProto *proto.EthereumConfig) (*EthereumConfig, error)

func EthereumConfigFromUntypedProto

func EthereumConfigFromUntypedProto(v interface{}) (*EthereumConfig, error)

func (*EthereumConfig) ChainID

func (c *EthereumConfig) ChainID() string

func (*EthereumConfig) CollateralBridge

func (c *EthereumConfig) CollateralBridge() EthereumContract

func (*EthereumConfig) Confirmations

func (c *EthereumConfig) Confirmations() uint64

func (*EthereumConfig) MultiSigControl

func (c *EthereumConfig) MultiSigControl() EthereumContract

func (*EthereumConfig) NetworkID

func (c *EthereumConfig) NetworkID() string

func (*EthereumConfig) StakingBridge

func (c *EthereumConfig) StakingBridge() EthereumContract

func (*EthereumConfig) StakingBridgeAddresses

func (c *EthereumConfig) StakingBridgeAddresses() []ethcmn.Address

StakingBridgeAddresses returns the registered staking bridge addresses. It might return the staking bridge, or the token vesting, or both contract address. The vesting contract can also be used to get information needed by the staking engine.

func (*EthereumConfig) VestingBridge

func (c *EthereumConfig) VestingBridge() EthereumContract

type EthereumContract

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

func (EthereumContract) Address

func (c EthereumContract) Address() ethcmn.Address

func (EthereumContract) DeploymentBlockHeight

func (c EthereumContract) DeploymentBlockHeight() uint64

func (EthereumContract) HasAddress

func (c EthereumContract) HasAddress() bool

func (EthereumContract) HexAddress

func (c EthereumContract) HexAddress() string

type ExecMarket

type ExecMarket struct {
	Market                     *Market
	PriceMonitor               *PriceMonitor
	AuctionState               *AuctionState
	PeggedOrders               *PeggedOrdersState
	ExpiringOrders             []*Order
	LastBestBid                *num.Uint
	LastBestAsk                *num.Uint
	LastMidBid                 *num.Uint
	LastMidAsk                 *num.Uint
	LastMarketValueProxy       num.Decimal
	LastEquityShareDistributed int64
	EquityShare                *EquityShare
	CurrentMarkPrice           *num.Uint
	LastTradedPrice            *num.Uint
	ShortRiskFactor            num.Decimal
	LongRiskFactor             num.Decimal
	RiskFactorConsensusReached bool
	FeeSplitter                *FeeSplitter
	SettlementData             *num.Numeric
	NextMTM                    int64
}

func ExecMarketFromProto

func ExecMarketFromProto(em *snapshot.Market) *ExecMarket

func (ExecMarket) IntoProto

func (e ExecMarket) IntoProto() *snapshot.Market

type ExecutionMarkets

type ExecutionMarkets struct {
	Markets []*ExecMarket
}

func ExecutionMarketsFromProto

func ExecutionMarketsFromProto(em *snapshot.ExecutionMarkets) *ExecutionMarkets

func (ExecutionMarkets) IntoProto

type ExternalDataSourceSpec added in v0.61.0

type ExternalDataSourceSpec struct {
	Spec *DataSourceSpec
}

func ExternalDataSourceSpecFromProto added in v0.61.0

func ExternalDataSourceSpecFromProto(specProto *vegapb.ExternalDataSourceSpec) *ExternalDataSourceSpec

func (*ExternalDataSourceSpec) IntoProto added in v0.61.0

func (*ExternalDataSourceSpec) String added in v0.61.0

func (s *ExternalDataSourceSpec) String() string

type ExternalDataSourceSpecConfiguration added in v0.61.0

type ExternalDataSourceSpecConfiguration struct {
	DataSourceSpec *DataSourceSpecConfiguration
}

type Fee

type Fee struct {
	MakerFee          *num.Uint
	InfrastructureFee *num.Uint
	LiquidityFee      *num.Uint
}

func NewFee

func NewFee() *Fee

NewFee returns a new fee object, with all fields initialised.

func (Fee) Clone

func (f Fee) Clone() *Fee

func (Fee) IntoProto

func (f Fee) IntoProto() *proto.Fee

func (*Fee) String

func (f *Fee) String() string

type FeeFactors

type FeeFactors struct {
	MakerFee          num.Decimal
	InfrastructureFee num.Decimal
	LiquidityFee      num.Decimal
}

func FeeFactorsFromProto

func FeeFactorsFromProto(f *proto.FeeFactors) *FeeFactors

func (FeeFactors) DeepClone

func (f FeeFactors) DeepClone() *FeeFactors

func (FeeFactors) IntoProto

func (f FeeFactors) IntoProto() *proto.FeeFactors

func (FeeFactors) String

func (f FeeFactors) String() string

type FeeSplitter

type FeeSplitter struct {
	TimeWindowStart time.Time
	TradeValue      *num.Uint
	Avg             num.Decimal
	Window          uint64
}

func FeeSplitterFromProto

func FeeSplitterFromProto(fs *snapshot.FeeSplitter) *FeeSplitter

func (FeeSplitter) IntoProto

func (f FeeSplitter) IntoProto() *snapshot.FeeSplitter

type Fees

type Fees struct {
	Factors *FeeFactors
}

func FeesFromProto

func FeesFromProto(f *proto.Fees) *Fees

func (Fees) DeepClone

func (f Fees) DeepClone() *Fees

func (Fees) IntoProto

func (f Fees) IntoProto() *proto.Fees

func (Fees) String

func (f Fees) String() string

type FinancialAmount

type FinancialAmount struct {
	Asset  string
	Amount *num.Uint
}

func FinancialAmountFromProto

func FinancialAmountFromProto(p *proto.FinancialAmount) (*FinancialAmount, error)

func (*FinancialAmount) Clone

func (f *FinancialAmount) Clone() *FinancialAmount

func (*FinancialAmount) IntoProto

func (f *FinancialAmount) IntoProto() *proto.FinancialAmount

func (FinancialAmount) String

func (f FinancialAmount) String() string

type Future

type Future struct {
	SettlementAsset                     string
	QuoteName                           string
	DataSourceSpecForSettlementData     *DataSourceSpec
	DataSourceSpecForTradingTermination *DataSourceSpec
	DataSourceSpecBinding               *DataSourceSpecBindingForFuture
}

func FutureFromProto

func FutureFromProto(f *proto.Future) *Future

func (Future) IntoProto

func (f Future) IntoProto() *proto.Future

func (Future) String

func (f Future) String() string

type FutureProduct

type FutureProduct struct {
	SettlementAsset                     string
	QuoteName                           string
	DataSourceSpecForSettlementData     DataSourceDefinition
	DataSourceSpecForTradingTermination DataSourceDefinition
	DataSourceSpecBinding               *DataSourceSpecBindingForFuture
}

func (FutureProduct) Asset

func (f FutureProduct) Asset() string

func (FutureProduct) DeepClone

func (f FutureProduct) DeepClone() *FutureProduct

func (FutureProduct) IntoProto

func (f FutureProduct) IntoProto() *vegapb.FutureProduct

func (FutureProduct) String

func (f FutureProduct) String() string

type GovernanceActive

type GovernanceActive struct {
	Proposals []*ProposalData
}

func GovernanceActiveFromProto

func GovernanceActiveFromProto(ga *snapshot.GovernanceActive) *GovernanceActive

func (GovernanceActive) IntoProto

type GovernanceData

type GovernanceData = vegapb.GovernanceData

type GovernanceEnacted

type GovernanceEnacted struct {
	Proposals []*ProposalData
}

func GovernanceEnactedFromProto

func GovernanceEnactedFromProto(ge *snapshot.GovernanceEnacted) *GovernanceEnacted

func (GovernanceEnacted) IntoProto

type GovernanceNode

type GovernanceNode struct {
	Proposals []*Proposal
}

func GovernanceNodeFromProto

func GovernanceNodeFromProto(ge *snapshot.GovernanceNode) *GovernanceNode

func (GovernanceNode) IntoProto

func (g GovernanceNode) IntoProto() *snapshot.GovernanceNode

type Instrument

type Instrument struct {
	ID       string
	Code     string
	Name     string
	Metadata *InstrumentMetadata
	// Types that are valid to be assigned to Product:
	//	*InstrumentFuture
	Product iProto
}

func InstrumentFromProto

func InstrumentFromProto(i *proto.Instrument) *Instrument

func (Instrument) DeepClone

func (i Instrument) DeepClone() *Instrument

func (Instrument) GetFuture

func (i Instrument) GetFuture() *Future

func (Instrument) IntoProto

func (i Instrument) IntoProto() *proto.Instrument

func (Instrument) String

func (i Instrument) String() string

type InstrumentConfiguration

type InstrumentConfiguration struct {
	Name string
	Code string
	// *InstrumentConfigurationFuture
	Product instrumentConfigurationProduct
}

func (InstrumentConfiguration) DeepClone

func (InstrumentConfiguration) IntoProto

func (InstrumentConfiguration) String

func (i InstrumentConfiguration) String() string

type InstrumentConfigurationFuture

type InstrumentConfigurationFuture struct {
	Future *FutureProduct
}

func (InstrumentConfigurationFuture) Asset

func (InstrumentConfigurationFuture) DeepClone

func (i InstrumentConfigurationFuture) DeepClone() instrumentConfigurationProduct

func (InstrumentConfigurationFuture) IntoProto

func (InstrumentConfigurationFuture) String

type InstrumentFuture

type InstrumentFuture struct {
	Future *Future
}

func InstrumentFutureFromProto

func InstrumentFutureFromProto(f *proto.Instrument_Future) *InstrumentFuture

func (InstrumentFuture) IntoProto

func (i InstrumentFuture) IntoProto() *proto.Instrument_Future

func (InstrumentFuture) String

func (i InstrumentFuture) String() string

type InstrumentMetadata

type InstrumentMetadata struct {
	Tags []string
}

func InstrumentMetadataFromProto

func InstrumentMetadataFromProto(m *proto.InstrumentMetadata) *InstrumentMetadata

func (InstrumentMetadata) DeepClone

func (i InstrumentMetadata) DeepClone() *InstrumentMetadata

func (InstrumentMetadata) IntoProto

func (InstrumentMetadata) String

func (i InstrumentMetadata) String() string

type Interval

type Interval = proto.Interval

type KeyDecimalPair

type KeyDecimalPair struct {
	Key int64
	Val num.Decimal
}

func KeyDecimalPairFromProto

func KeyDecimalPairFromProto(dm *snapshot.DecimalMap) *KeyDecimalPair

func (KeyDecimalPair) IntoProto

func (d KeyDecimalPair) IntoProto() *snapshot.DecimalMap

type LedgerEntries

type LedgerEntries []*LedgerEntry

func (LedgerEntries) IntoProto

func (a LedgerEntries) IntoProto() []*proto.LedgerEntry

type LedgerEntry

type LedgerEntry struct {
	FromAccount *AccountDetails
	ToAccount   *AccountDetails
	Amount      *num.Uint
	Type        TransferType
	Timestamp   int64
}

func (*LedgerEntry) IntoProto

func (l *LedgerEntry) IntoProto() *proto.LedgerEntry

type LedgerMovement added in v0.56.0

type LedgerMovement struct {
	Entries  []*LedgerEntry
	Balances []*PostTransferBalance
}

func (*LedgerMovement) IntoProto added in v0.56.0

func (t *LedgerMovement) IntoProto() *proto.LedgerMovement

type LedgerMovements added in v0.56.0

type LedgerMovements []*LedgerMovement

func (LedgerMovements) IntoProto added in v0.56.0

func (a LedgerMovements) IntoProto() []*proto.LedgerMovement

type LimitState

type LimitState struct {
	BlockCount               uint32
	CanProposeMarket         bool
	CanProposeAsset          bool
	GenesisLoaded            bool
	ProposeMarketEnabled     bool
	ProposeAssetEnabled      bool
	ProposeMarketEnabledFrom time.Time
	ProposeAssetEnabledFrom  time.Time
}

func LimitFromProto

func LimitFromProto(l *snapshot.LimitState) *LimitState

func (*LimitState) IntoProto

func (l *LimitState) IntoProto() *snapshot.LimitState

type LiquidityMonitoringParameters

type LiquidityMonitoringParameters struct {
	// Specifies parameters related to target stake calculation
	TargetStakeParameters *TargetStakeParameters
	// Specifies the triggering ratio for entering liquidity auction
	TriggeringRatio num.Decimal
	// Specifies by how many seconds an auction should be extended if leaving the auction were to trigger a liquidity auction
	AuctionExtension int64
}

func (LiquidityMonitoringParameters) DeepClone

func (LiquidityMonitoringParameters) IntoProto

func (LiquidityMonitoringParameters) String

type LiquidityOrder

type LiquidityOrder struct {
	// The pegged reference point for the order
	Reference PeggedReference
	// The relative proportion of the commitment to be allocated at a price level
	Proportion uint32
	// The offset/amount of units away for the order
	Offset *num.Uint
}

func LiquidityOrderFromProto

func LiquidityOrderFromProto(p *proto.LiquidityOrder) (*LiquidityOrder, error)

func (LiquidityOrder) DeepClone

func (l LiquidityOrder) DeepClone() *LiquidityOrder

func (LiquidityOrder) IntoProto

func (l LiquidityOrder) IntoProto() *proto.LiquidityOrder

func (LiquidityOrder) String

func (l LiquidityOrder) String() string

type LiquidityOrderReference

type LiquidityOrderReference struct {
	// Unique identifier of the pegged order generated by the core to fulfil this liquidity order
	OrderID string
	// The liquidity order from the original submission
	LiquidityOrder *LiquidityOrder
}

func (LiquidityOrderReference) IntoProto

func (LiquidityOrderReference) String

func (l LiquidityOrderReference) String() string

type LiquidityOrderReferences

type LiquidityOrderReferences []*LiquidityOrderReference

func (LiquidityOrderReferences) String

func (ls LiquidityOrderReferences) String() string

type LiquidityOrders

type LiquidityOrders []*LiquidityOrder

func (LiquidityOrders) String

func (ls LiquidityOrders) String() string

type LiquidityProviderFeeShare

type LiquidityProviderFeeShare = proto.LiquidityProviderFeeShare

type LiquidityProviderFeeShares

type LiquidityProviderFeeShares []*LiquidityProviderFeeShare

func (LiquidityProviderFeeShares) String

func (ls LiquidityProviderFeeShares) String() string

type LiquidityProvision

type LiquidityProvision struct {
	// Unique identifier
	ID string
	// Unique party identifier for the creator of the provision
	Party string
	// Timestamp for when the order was created at, in nanoseconds since the epoch
	// - See [`VegaTimeResponse`](#api.VegaTimeResponse).`timestamp`
	CreatedAt int64
	// Timestamp for when the order was updated at, in nanoseconds since the epoch
	// - See [`VegaTimeResponse`](#api.VegaTimeResponse).`timestamp`
	UpdatedAt int64
	// Market identifier for the order, required field
	MarketID string
	// Specified as a unitless number that represents the amount of settlement asset of the market
	CommitmentAmount *num.Uint
	// Nominated liquidity fee factor, which is an input to the calculation of taker fees on the market, as per seeting fees and rewarding liquidity providers
	Fee num.Decimal
	// A set of liquidity sell orders to meet the liquidity provision obligation
	Sells []*LiquidityOrderReference
	// A set of liquidity buy orders to meet the liquidity provision obligation
	Buys []*LiquidityOrderReference
	// Version of this liquidity provision order
	Version uint64
	// Status of this liquidity provision order
	Status LiquidityProvisionStatus
	// A reference shared between this liquidity provision and all it's orders
	Reference string
}

func LiquidityProvisionFromProto

func LiquidityProvisionFromProto(p *proto.LiquidityProvision) (*LiquidityProvision, error)

func (LiquidityProvision) IntoProto

func (LiquidityProvision) String

func (l LiquidityProvision) String() string

type LiquidityProvisionAmendment

type LiquidityProvisionAmendment struct {
	// Market identifier for the order, required field
	MarketID string
	// Specified as a unitless number that represents the amount of settlement asset of the market
	CommitmentAmount *num.Uint
	// Nominated liquidity fee factor, which is an input to the calculation of taker fees on the market, as per setting fees and rewarding liquidity providers
	Fee num.Decimal
	// A set of liquidity sell orders to meet the liquidity provision obligation
	Sells []*LiquidityOrder
	// A set of liquidity buy orders to meet the liquidity provision obligation
	Buys []*LiquidityOrder
	// A reference to be added to every order created out of this liquidityProvisionAmendment
	Reference string
}

func (LiquidityProvisionAmendment) ContainsOrders

func (a LiquidityProvisionAmendment) ContainsOrders() bool

func (LiquidityProvisionAmendment) GetMarketID added in v0.55.0

func (a LiquidityProvisionAmendment) GetMarketID() string

func (LiquidityProvisionAmendment) IntoProto

func (LiquidityProvisionAmendment) String

type LiquidityProvisionCancellation

type LiquidityProvisionCancellation struct {
	// Market identifier for the order, required field
	MarketID string
}

func (LiquidityProvisionCancellation) GetMarketID added in v0.55.0

func (l LiquidityProvisionCancellation) GetMarketID() string

func (LiquidityProvisionCancellation) IntoProto

func (LiquidityProvisionCancellation) String

type LiquidityProvisionStatus

type LiquidityProvisionStatus = proto.LiquidityProvision_Status
const (
	// LiquidityProvisionUnspecified The default value.
	LiquidityProvisionUnspecified LiquidityProvisionStatus = proto.LiquidityProvision_STATUS_UNSPECIFIED
	// LiquidityProvisionStatusActive The liquidity provision is active.
	LiquidityProvisionStatusActive LiquidityProvisionStatus = proto.LiquidityProvision_STATUS_ACTIVE
	// LiquidityProvisionStatusStopped The liquidity provision was stopped by the network.
	LiquidityProvisionStatusStopped LiquidityProvisionStatus = proto.LiquidityProvision_STATUS_STOPPED
	// LiquidityProvisionStatusCancelled The liquidity provision was cancelled by the liquidity provider.
	LiquidityProvisionStatusCancelled LiquidityProvisionStatus = proto.LiquidityProvision_STATUS_CANCELLED
	// LiquidityProvisionStatusRejected The liquidity provision was invalid and got rejected.
	LiquidityProvisionStatusRejected LiquidityProvisionStatus = proto.LiquidityProvision_STATUS_REJECTED
	// LiquidityProvisionStatusUndeployed The liquidity provision is valid and accepted by network, but orders aren't deployed.
	LiquidityProvisionStatusUndeployed LiquidityProvisionStatus = proto.LiquidityProvision_STATUS_UNDEPLOYED
	// LiquidityProvisionStatusPending The liquidity provision is valid and accepted by network
	// but have never been deployed. I when it's possible to deploy them for the first time
	// margin check fails, then they will be cancelled without any penalties.
	LiquidityProvisionStatusPending LiquidityProvisionStatus = proto.LiquidityProvision_STATUS_PENDING
)

type LiquidityProvisionSubmission

type LiquidityProvisionSubmission struct {
	// Market identifier for the order, required field
	MarketID string
	// Specified as a unitless number that represents the amount of settlement asset of the market
	CommitmentAmount *num.Uint
	// Nominated liquidity fee factor, which is an input to the calculation of taker fees on the market, as per setting fees and rewarding liquidity providers
	Fee num.Decimal
	// A set of liquidity sell orders to meet the liquidity provision obligation
	Sells []*LiquidityOrder
	// A set of liquidity buy orders to meet the liquidity provision obligation
	Buys []*LiquidityOrder
	// A reference to be added to every order created out of this liquidityProvisionSubmission
	Reference string
}

func (LiquidityProvisionSubmission) IntoProto

func (LiquidityProvisionSubmission) String

type LogNormalModelParams

type LogNormalModelParams struct {
	Mu    num.Decimal
	R     num.Decimal
	Sigma num.Decimal
}

func (LogNormalModelParams) DeepClone

func (LogNormalModelParams) IntoProto

func (LogNormalModelParams) String

func (l LogNormalModelParams) String() string

type LogNormalRiskModel

type LogNormalRiskModel struct {
	RiskAversionParameter num.Decimal
	Tau                   num.Decimal
	Params                *LogNormalModelParams
}

func (LogNormalRiskModel) DeepClone

func (l LogNormalRiskModel) DeepClone() *LogNormalRiskModel

func (LogNormalRiskModel) IntoProto

func (LogNormalRiskModel) String

func (l LogNormalRiskModel) String() string

type MarginCalculator

type MarginCalculator struct {
	ScalingFactors *ScalingFactors
}

func MarginCalculatorFromProto

func MarginCalculatorFromProto(p *proto.MarginCalculator) *MarginCalculator

func (MarginCalculator) DeepClone

func (m MarginCalculator) DeepClone() *MarginCalculator

func (MarginCalculator) IntoProto

func (m MarginCalculator) IntoProto() *proto.MarginCalculator

func (MarginCalculator) String

func (m MarginCalculator) String() string

type MarginLevels

type MarginLevels struct {
	MaintenanceMargin      *num.Uint
	SearchLevel            *num.Uint
	InitialMargin          *num.Uint
	CollateralReleaseLevel *num.Uint
	Party                  string
	MarketID               string
	Asset                  string
	Timestamp              int64
}

func (MarginLevels) IntoProto

func (m MarginLevels) IntoProto() *proto.MarginLevels

func (MarginLevels) String

func (m MarginLevels) String() string

type Market

type Market struct {
	ID                            string
	TradableInstrument            *TradableInstrument
	DecimalPlaces                 uint64
	PositionDecimalPlaces         int64
	Fees                          *Fees
	OpeningAuction                *AuctionDuration
	PriceMonitoringSettings       *PriceMonitoringSettings
	LiquidityMonitoringParameters *LiquidityMonitoringParameters
	LPPriceRange                  num.Decimal

	TradingMode      MarketTradingMode
	State            MarketState
	MarketTimestamps *MarketTimestamps
	// contains filtered or unexported fields
}

func MarketFromProto

func MarketFromProto(mkt *proto.Market) (*Market, error)

func (Market) DeepClone

func (m Market) DeepClone() *Market

func (*Market) GetAsset

func (m *Market) GetAsset() (string, error)

func (Market) GetID

func (m Market) GetID() string

func (Market) IntoProto

func (m Market) IntoProto() *proto.Market

func (*Market) SetAsset

func (m *Market) SetAsset(a string)

func (Market) String

func (m Market) String() string

type MarketContributionScore

type MarketContributionScore struct {
	Asset  string
	Market string
	Metric proto.DispatchMetric
	Score  num.Decimal
}

type MarketCounters added in v0.63.0

type MarketCounters struct {
	PeggedOrderCounter  uint64
	LPShapeCount        uint64
	PositionCount       uint64
	OrderbookLevelCount uint64
}

type MarketData

type MarketData struct {
	MarkPrice                 *num.Uint
	LastTradedPrice           *num.Uint
	BestBidPrice              *num.Uint
	BestBidVolume             uint64
	BestOfferPrice            *num.Uint
	BestOfferVolume           uint64
	BestStaticBidPrice        *num.Uint
	BestStaticBidVolume       uint64
	BestStaticOfferPrice      *num.Uint
	BestStaticOfferVolume     uint64
	MidPrice                  *num.Uint
	StaticMidPrice            *num.Uint
	Market                    string
	Timestamp                 int64
	OpenInterest              uint64
	AuctionEnd                int64
	AuctionStart              int64
	IndicativePrice           *num.Uint
	IndicativeVolume          uint64
	MarketTradingMode         MarketTradingMode
	MarketState               MarketState
	Trigger                   AuctionTrigger
	ExtensionTrigger          AuctionTrigger
	TargetStake               string
	SuppliedStake             string
	PriceMonitoringBounds     []*PriceMonitoringBounds
	MarketValueProxy          string
	LiquidityProviderFeeShare []*LiquidityProviderFeeShare
	NextMTM                   int64
}

func (MarketData) DeepClone

func (m MarketData) DeepClone() *MarketData

func (MarketData) IntoProto

func (m MarketData) IntoProto() *proto.MarketData

func (MarketData) String

func (m MarketData) String() string

type MarketDepth

type MarketDepth = proto.MarketDepth

type MarketDepthUpdate

type MarketDepthUpdate = proto.MarketDepthUpdate

type MarketPosition

type MarketPosition struct {
	PartyID         string
	Size, Buy, Sell int64
	Price           *num.Uint
	VwBuy, VwSell   *num.Uint
}

func MarketPositionFromProto

func MarketPositionFromProto(p *snapshot.Position) *MarketPosition

func (MarketPosition) IntoProto

func (p MarketPosition) IntoProto() *snapshot.Position

type MarketPositions

type MarketPositions struct {
	MarketID  string
	Positions []*MarketPosition
}

func MarketPositionsFromProto

func MarketPositionsFromProto(mp *snapshot.MarketPositions) *MarketPositions

func (MarketPositions) IntoProto

func (m MarketPositions) IntoProto() *snapshot.MarketPositions

type MarketState

type MarketState = proto.Market_State
const (
	// Default value, invalid.
	MarketStateUnspecified MarketState = proto.Market_STATE_UNSPECIFIED
	// The Governance proposal valid and accepted.
	MarketStateProposed MarketState = proto.Market_STATE_PROPOSED
	// Outcome of governance votes is to reject the market.
	MarketStateRejected MarketState = proto.Market_STATE_REJECTED
	// Governance vote passes/wins.
	MarketStatePending MarketState = proto.Market_STATE_PENDING
	// Market triggers cancellation condition or governance
	// votes to close before market becomes Active.
	MarketStateCancelled MarketState = proto.Market_STATE_CANCELLED
	// Enactment date reached and usual auction exit checks pass.
	MarketStateActive MarketState = proto.Market_STATE_ACTIVE
	// Price monitoring or liquidity monitoring trigger.
	MarketStateSuspended MarketState = proto.Market_STATE_SUSPENDED
	// Governance vote (to close).
	MarketStateClosed MarketState = proto.Market_STATE_CLOSED
	// Defined by the product (i.e. from a product parameter,
	// specified in market definition, giving close date/time).
	MarketStateTradingTerminated MarketState = proto.Market_STATE_TRADING_TERMINATED
	// Settlement triggered and completed as defined by product.
	MarketStateSettled MarketState = proto.Market_STATE_SETTLED
)

type MarketTimestamps

type MarketTimestamps struct {
	Proposed int64
	Pending  int64
	Open     int64
	Close    int64
}

func MarketTimestampsFromProto

func MarketTimestampsFromProto(p *proto.MarketTimestamps) *MarketTimestamps

func (MarketTimestamps) DeepClone

func (m MarketTimestamps) DeepClone() *MarketTimestamps

func (MarketTimestamps) IntoProto

func (m MarketTimestamps) IntoProto() *proto.MarketTimestamps

func (MarketTimestamps) String

func (m MarketTimestamps) String() string

type MarketTradingMode

type MarketTradingMode = proto.Market_TradingMode
const (
	// Default value, this is invalid.
	MarketTradingModeUnspecified MarketTradingMode = proto.Market_TRADING_MODE_UNSPECIFIED
	// Normal trading.
	MarketTradingModeContinuous MarketTradingMode = proto.Market_TRADING_MODE_CONTINUOUS
	// Auction trading (FBA).
	MarketTradingModeBatchAuction MarketTradingMode = proto.Market_TRADING_MODE_BATCH_AUCTION
	// Opening auction.
	MarketTradingModeOpeningAuction MarketTradingMode = proto.Market_TRADING_MODE_OPENING_AUCTION
	// Auction triggered by monitoring.
	MarketTradingModeMonitoringAuction MarketTradingMode = proto.Market_TRADING_MODE_MONITORING_AUCTION
	// No trading allowed.
	MarketTradingModeNoTrading MarketTradingMode = proto.Market_TRADING_MODE_NO_TRADING
)

type MatchingBook

type MatchingBook struct {
	MarketID        string
	Buy             []*Order
	Sell            []*Order
	LastTradedPrice *num.Uint
	Auction         bool
	BatchID         uint64
}

func MatchingBookFromProto

func MatchingBookFromProto(mb *snapshot.MatchingBook) *MatchingBook

func (MatchingBook) IntoProto

func (m MatchingBook) IntoProto() *snapshot.MatchingBook

type Metadata

type Metadata struct {
	Version     int64       // the version of the AVL tree
	NodeHashes  []*NodeHash // he nodes of the AVL tree ordered such that it can be imported with identical shape
	ChunkHashes []string
}

func MetadataFromProto

func MetadataFromProto(m *snapshot.Metadata) (*Metadata, error)

func (Metadata) IntoProto

func (m Metadata) IntoProto() *snapshot.Metadata

type MetadataList

type MetadataList []string

func (MetadataList) String

func (m MetadataList) String() string

type NetParams

type NetParams struct {
	Params []*NetworkParameter
}

func NetParamsFromProto

func NetParamsFromProto(np *snapshot.NetParams) *NetParams

func (NetParams) IntoProto

func (n NetParams) IntoProto() *snapshot.NetParams

type NetworkParameter

type NetworkParameter struct {
	Key, Value string
}

func NetworkParameterFromProto

func NetworkParameterFromProto(p *proto.NetworkParameter) *NetworkParameter

func (NetworkParameter) DeepClone

func (n NetworkParameter) DeepClone() *NetworkParameter

func (NetworkParameter) IntoProto

func (n NetworkParameter) IntoProto() *proto.NetworkParameter

func (NetworkParameter) String

func (n NetworkParameter) String() string

type NewAsset

type NewAsset struct {
	Changes *AssetDetails
}

func (NewAsset) DeepClone

func (n NewAsset) DeepClone() *NewAsset

func (*NewAsset) GetChanges

func (n *NewAsset) GetChanges() *AssetDetails

func (NewAsset) IntoProto

func (n NewAsset) IntoProto() *vegapb.NewAsset

func (NewAsset) String

func (n NewAsset) String() string

func (*NewAsset) Validate

func (n *NewAsset) Validate() (ProposalError, error)

type NewFreeform

type NewFreeform struct{}

func (NewFreeform) DeepClone

func (n NewFreeform) DeepClone() *NewFreeform

func (NewFreeform) IntoProto

func (n NewFreeform) IntoProto() *vegapb.NewFreeform

func (NewFreeform) String

func (n NewFreeform) String() string

type NewMarket

type NewMarket struct {
	Changes *NewMarketConfiguration
}

func (NewMarket) DeepClone

func (n NewMarket) DeepClone() *NewMarket

func (NewMarket) IntoProto

func (n NewMarket) IntoProto() *vegapb.NewMarket

func (NewMarket) String

func (n NewMarket) String() string

type NewMarketConfiguration

type NewMarketConfiguration struct {
	Instrument                    *InstrumentConfiguration
	DecimalPlaces                 uint64
	PositionDecimalPlaces         int64
	Metadata                      []string
	PriceMonitoringParameters     *PriceMonitoringParameters
	LiquidityMonitoringParameters *LiquidityMonitoringParameters
	RiskParameters                newRiskParams
	LpPriceRange                  num.Decimal
}

func (NewMarketConfiguration) DeepClone

func (NewMarketConfiguration) IntoProto

func (NewMarketConfiguration) String

func (n NewMarketConfiguration) String() string

type NewMarketConfigurationLogNormal

type NewMarketConfigurationLogNormal struct {
	LogNormal *LogNormalRiskModel
}

func (NewMarketConfigurationLogNormal) DeepClone

func (n NewMarketConfigurationLogNormal) DeepClone() newRiskParams

func (NewMarketConfigurationLogNormal) IntoProto

func (NewMarketConfigurationLogNormal) String

type NewMarketConfigurationSimple

type NewMarketConfigurationSimple struct {
	Simple *SimpleModelParams
}

func (NewMarketConfigurationSimple) DeepClone

func (n NewMarketConfigurationSimple) DeepClone() newRiskParams

func (NewMarketConfigurationSimple) IntoProto

func (NewMarketConfigurationSimple) String

type NodeHash

type NodeHash struct {
	Key     string // the node's key eg. epoch.all
	Hash    string // the hash of the noes value
	IsLeaf  bool   // whether or not the node contains a payload
	Height  int32  // the height of the node in the tree
	Version int64  // the version of that node i.e how many times its value has changed
}

NodeHash contains the data for a node in the IAVL, without its value, but the values hash instead.

func NodeHashFromProto

func NodeHashFromProto(nh *snapshot.NodeHash) (*NodeHash, error)

func (NodeHash) IntoProto

func (n NodeHash) IntoProto() *snapshot.NodeHash

type NodeSignature

type NodeSignature = commandspb.NodeSignature

type NodeSignatureKind

type NodeSignatureKind = commandspb.NodeSignatureKind
const (
	// NodeSignatureKindUnspecified represents an unspecified or missing value from the input.
	NodeSignatureKindUnspecified NodeSignatureKind = commandspb.NodeSignatureKind_NODE_SIGNATURE_KIND_UNSPECIFIED
	// NodeSignatureKindAssetNew represents a signature for a new asset allow-listing.
	NodeSignatureKindAssetNew NodeSignatureKind = commandspb.NodeSignatureKind_NODE_SIGNATURE_KIND_ASSET_NEW
	// NodeSignatureKindAssetUpdate represents a signature for an asset update allow-listing.
	NodeSignatureKindAssetUpdate NodeSignatureKind = commandspb.NodeSignatureKind_NODE_SIGNATURE_KIND_ASSET_UPDATE
	// Represents a signature for an asset withdrawal.
	NodeSignatureKindAssetWithdrawal            NodeSignatureKind = commandspb.NodeSignatureKind_NODE_SIGNATURE_KIND_ASSET_WITHDRAWAL
	NodeSignatureKindERC20MultiSigSignerAdded   NodeSignatureKind = commandspb.NodeSignatureKind_NODE_SIGNATURE_KIND_ERC20_MULTISIG_SIGNER_ADDED
	NodeSignatureKindERC20MultiSigSignerRemoved NodeSignatureKind = commandspb.NodeSignatureKind_NODE_SIGNATURE_KIND_ERC20_MULTISIG_SIGNER_REMOVED
)

type NodeVote

type NodeVote = commandspb.NodeVote

type NodeVoteType added in v0.66.0

type NodeVoteType = proto.NodeVote_Type
const (
	NodeVoteTypeUnspecified             NodeVoteType = proto.NodeVote_TYPE_UNSPECIFIED
	NodeVoteTypeStakeDeposited          NodeVoteType = proto.NodeVote_TYPE_STAKE_DEPOSITED
	NodeVoteTypeStakeRemoved            NodeVoteType = proto.NodeVote_TYPE_STAKE_REMOVED
	NodeVoteTypeFundsDeposited          NodeVoteType = proto.NodeVote_TYPE_FUNDS_DEPOSITED
	NodeVoteTypeSignerAdded             NodeVoteType = proto.NodeVote_TYPE_SIGNER_ADDED
	NodeVoteTypeSignerRemoved           NodeVoteType = proto.NodeVote_TYPE_SIGNER_REMOVED
	NodeVoteTypeBridgeStopped           NodeVoteType = proto.NodeVote_TYPE_BRIDGE_STOPPED
	NodeVoteTypeBridgeResumed           NodeVoteType = proto.NodeVote_TYPE_BRIDGE_RESUMED
	NodeVoteTypeAssetListed             NodeVoteType = proto.NodeVote_TYPE_ASSET_LISTED
	NodeVoteTypeAssetLimitsUpdated      NodeVoteType = proto.NodeVote_TYPE_LIMITS_UPDATED
	NodeVoteTypeStakeTotalSupply        NodeVoteType = proto.NodeVote_TYPE_STAKE_TOTAL_SUPPLY
	NodeVoteTypeSignerThresholdSet      NodeVoteType = proto.NodeVote_TYPE_SIGNER_THRESHOLD_SET
	NodeVoteTypeGovernanceValidateAsset NodeVoteType = proto.NodeVote_TYPE_GOVERNANCE_VALIDATE_ASSET
)

type Notary

type Notary struct {
	Sigs []*NotarySigs
}

func NotaryFromProto

func NotaryFromProto(n *snapshot.Notary) *Notary

func (Notary) IntoProto

func (n Notary) IntoProto() *snapshot.Notary

type NotarySigs

type NotarySigs struct {
	ID   string
	Kind int32
	Node string
	Sig  string
}

func NotarySigFromProto

func NotarySigFromProto(sk *snapshot.NotarySigs) *NotarySigs

func (NotarySigs) IntoProto

func (sk NotarySigs) IntoProto() *snapshot.NotarySigs

type OneOffTransfer

type OneOffTransfer struct {
	*TransferBase
	DeliverOn *time.Time
}

func OneOffTransferFromEvent

func OneOffTransferFromEvent(p *eventspb.Transfer) *OneOffTransfer

func (*OneOffTransfer) IntoEvent

func (o *OneOffTransfer) IntoEvent(reason *string) *eventspb.Transfer

func (*OneOffTransfer) IsValid

func (o *OneOffTransfer) IsValid() error

type OracleDataSubmission

type OracleDataSubmission = commandspb.OracleDataSubmission

type OracleSpec

type OracleSpec struct {
	ExternalDataSourceSpec *ExternalDataSourceSpec
}

func OracleSpecFromProto

func OracleSpecFromProto(specProto *vegapb.OracleSpec) *OracleSpec

type OracleSpecBindingForFuture

type OracleSpecBindingForFuture = DataSourceSpecBindingForFuture

type OracleSpecCondition

type OracleSpecCondition = DataSourceSpecCondition

func OracleSpecConditionsFromProto

func OracleSpecConditionsFromProto(protoCondition []*datapb.Condition) []*OracleSpecCondition

type OracleSpecConditionOperator

type OracleSpecConditionOperator = DataSourceSpecConditionOperator

type OracleSpecConditions

type OracleSpecConditions DataSourceSpecConditions

type OracleSpecConfiguration

type OracleSpecConfiguration struct {
	ExternalDataSourceSpec *ExternalDataSourceSpecConfiguration
}

func OracleSpecConfigurationFromProto

func OracleSpecConfigurationFromProto(protoConfig *vegapb.DataSourceSpecConfiguration) *OracleSpecConfiguration

type OracleSpecFilter

type OracleSpecFilter struct {
	DataSourceSpec *DataSourceSpecFilter
}

func DeepCloneOracleSpecFilters

func DeepCloneOracleSpecFilters(filters []*OracleSpecFilter) []*OracleSpecFilter

func OracleSpecFilterFromProto

func OracleSpecFilterFromProto(protoFilter *datapb.Filter) *OracleSpecFilter

func OracleSpecFiltersFromProto

func OracleSpecFiltersFromProto(protoFilters []*datapb.Filter) []*OracleSpecFilter

type OracleSpecFilters

type OracleSpecFilters []*OracleSpecFilter

type OracleSpecPropertyKey

type OracleSpecPropertyKey = DataSourceSpecPropertyKey

func OracleSpecPropertyKeyFromProto

func OracleSpecPropertyKeyFromProto(protoKey *datapb.PropertyKey) *OracleSpecPropertyKey

type OracleSpecSigners added in v0.61.0

type OracleSpecSigners = DataSourceSpecSigners

type OracleSpecStatus

type OracleSpecStatus = DataSourceSpecStatus

type OracleSpecToFutureBinding added in v0.61.0

type OracleSpecToFutureBinding = DataSourceSpecToFutureBinding

type Order

type Order struct {
	ID                   string
	MarketID             string
	Party                string
	Side                 Side
	Price                *num.Uint
	OriginalPrice        *num.Uint
	Size                 uint64
	Remaining            uint64
	TimeInForce          OrderTimeInForce
	Type                 OrderType
	CreatedAt            int64
	Status               OrderStatus
	ExpiresAt            int64
	Reference            string
	Reason               OrderError
	UpdatedAt            int64
	Version              uint64
	BatchID              uint64
	PeggedOrder          *PeggedOrder
	LiquidityProvisionID string
}

func OrderFromProto

func OrderFromProto(o *proto.Order) (*Order, error)

func (Order) Clone

func (o Order) Clone() *Order

func (*Order) Create

func (o *Order) Create(t time.Time) *Order

Create sets the creation time (CreatedAt) to t and returns the updated order.

func (*Order) HasTraded

func (o *Order) HasTraded() bool

func (*Order) IntoProto

func (o *Order) IntoProto() *proto.Order

func (Order) IntoSubmission

func (o Order) IntoSubmission() *OrderSubmission

func (*Order) IsExpireable

func (o *Order) IsExpireable() bool

func (*Order) IsFinished

func (o *Order) IsFinished() bool

IsFinished returns true if an order is in any state different to ACTIVE and PARKED Basically any order which is never gonna trade anymore.

func (*Order) IsLiquidityOrder

func (o *Order) IsLiquidityOrder() bool

func (*Order) IsPersistent

func (o *Order) IsPersistent() bool

IsPersistent returns true if the order is persistent. A persistent order is a Limit type order that might be matched in the future.

func (Order) String

func (o Order) String() string

func (*Order) Update

func (o *Order) Update(t time.Time) *Order

Update sets the modification time (UpdatedAt) to t and returns the updated order.

type OrderAmendment

type OrderAmendment struct {
	OrderID         string
	MarketID        string
	Price           *num.Uint
	SizeDelta       int64
	ExpiresAt       *int64 // timestamp
	TimeInForce     OrderTimeInForce
	PeggedOffset    *num.Uint
	PeggedReference PeggedReference
}

func NewOrderAmendmentFromProto

func NewOrderAmendmentFromProto(p *commandspb.OrderAmendment) (*OrderAmendment, error)

func (OrderAmendment) GetMarketID

func (o OrderAmendment) GetMarketID() string

func (OrderAmendment) GetOrderID

func (o OrderAmendment) GetOrderID() string

func (OrderAmendment) IntoProto

func (o OrderAmendment) IntoProto() *commandspb.OrderAmendment

func (OrderAmendment) String

func (o OrderAmendment) String() string

func (OrderAmendment) Validate

func (o OrderAmendment) Validate() error

Validate santiy-checks the order amendment as-is, the market will further validate the amendment based on the order it's actually trying to amend.

type OrderCancellation

type OrderCancellation struct {
	OrderID  string
	MarketID string
}

func OrderCancellationFromProto

func OrderCancellationFromProto(p *commandspb.OrderCancellation) *OrderCancellation

func (OrderCancellation) IntoProto

func (OrderCancellation) String

func (o OrderCancellation) String() string

type OrderCancellationConfirmation

type OrderCancellationConfirmation struct {
	Order *Order
}

func (*OrderCancellationConfirmation) IntoProto

type OrderConfirmation

type OrderConfirmation struct {
	Order                 *Order
	Trades                []*Trade
	PassiveOrdersAffected []*Order
}

func (*OrderConfirmation) IntoProto

func (o *OrderConfirmation) IntoProto() *proto.OrderConfirmation

func (OrderConfirmation) TradedValue

func (o OrderConfirmation) TradedValue() *num.Uint

type OrderError

type OrderError = proto.OrderError
const (
	// Default value, no error reported.
	OrderErrorUnspecified OrderError = proto.OrderError_ORDER_ERROR_UNSPECIFIED
	// Order was submitted for a market that does not exist.
	OrderErrorInvalidMarketID OrderError = proto.OrderError_ORDER_ERROR_INVALID_MARKET_ID
	// Order was submitted with an invalid identifier.
	OrderErrorInvalidOrderID OrderError = proto.OrderError_ORDER_ERROR_INVALID_ORDER_ID
	// Order was amended with a sequence number that was not previous version + 1.
	OrderErrorOutOfSequence OrderError = proto.OrderError_ORDER_ERROR_OUT_OF_SEQUENCE
	// Order was amended with an invalid remaining size (e.g. remaining greater than total size).
	OrderErrorInvalidRemainingSize OrderError = proto.OrderError_ORDER_ERROR_INVALID_REMAINING_SIZE
	// Node was unable to get Vega (blockchain) time.
	OrderErrorTimeFailure OrderError = proto.OrderError_ORDER_ERROR_TIME_FAILURE
	// Failed to remove an order from the book.
	OrderErrorRemovalFailure OrderError = proto.OrderError_ORDER_ERROR_REMOVAL_FAILURE
	// An order with `TimeInForce.TIME_IN_FORCE_GTT` was submitted or amended
	// with an expiration that was badly formatted or otherwise invalid.
	OrderErrorInvalidExpirationDatetime OrderError = proto.OrderError_ORDER_ERROR_INVALID_EXPIRATION_DATETIME
	// Order was submitted or amended with an invalid reference field.
	OrderErrorInvalidOrderReference OrderError = proto.OrderError_ORDER_ERROR_INVALID_ORDER_REFERENCE
	// Order amend was submitted for an order field that cannot not be amended (e.g. order identifier).
	OrderErrorEditNotAllowed OrderError = proto.OrderError_ORDER_ERROR_EDIT_NOT_ALLOWED
	// Amend failure because amend details do not match original order.
	OrderErrorAmendFailure OrderError = proto.OrderError_ORDER_ERROR_AMEND_FAILURE
	// Order not found in an order book or store.
	OrderErrorNotFound OrderError = proto.OrderError_ORDER_ERROR_NOT_FOUND
	// Order was submitted with an invalid or missing party identifier.
	OrderErrorInvalidParty OrderError = proto.OrderError_ORDER_ERROR_INVALID_PARTY_ID
	// Order was submitted for a market that has closed.
	OrderErrorMarketClosed OrderError = proto.OrderError_ORDER_ERROR_MARKET_CLOSED
	// Order was submitted, but the party did not have enough collateral to cover the order.
	OrderErrorMarginCheckFailed OrderError = proto.OrderError_ORDER_ERROR_MARGIN_CHECK_FAILED
	// Order was submitted, but the party did not have an account for this asset.
	OrderErrorMissingGeneralAccount OrderError = proto.OrderError_ORDER_ERROR_MISSING_GENERAL_ACCOUNT
	// Unspecified internal error.
	OrderErrorInternalError OrderError = proto.OrderError_ORDER_ERROR_INTERNAL_ERROR
	// Order was submitted with an invalid or missing size (e.g. 0).
	OrderErrorInvalidSize OrderError = proto.OrderError_ORDER_ERROR_INVALID_SIZE
	// Order was submitted with an invalid persistence for its type.
	OrderErrorInvalidPersistance OrderError = proto.OrderError_ORDER_ERROR_INVALID_PERSISTENCE
	// Order was submitted with an invalid type field.
	OrderErrorInvalidType OrderError = proto.OrderError_ORDER_ERROR_INVALID_TYPE
	// Order was stopped as it would have traded with another order submitted from the same party.
	OrderErrorSelfTrading OrderError = proto.OrderError_ORDER_ERROR_SELF_TRADING
	// Order was submitted, but the party did not have enough collateral to cover the fees for the order.
	OrderErrorInsufficientFundsToPayFees OrderError = proto.OrderError_ORDER_ERROR_INSUFFICIENT_FUNDS_TO_PAY_FEES
	// Order was submitted with an incorrect or invalid market type.
	OrderErrorIncorrectMarketType OrderError = proto.OrderError_ORDER_ERROR_INCORRECT_MARKET_TYPE
	// Order was submitted with invalid time in force.
	OrderErrorInvalidTimeInForce OrderError = proto.OrderError_ORDER_ERROR_INVALID_TIME_IN_FORCE
	// A GFN order has got to the market when it is in auction mode.
	OrderErrorCannotSendGFNOrderDuringAnAuction OrderError = proto.OrderError_ORDER_ERROR_CANNOT_SEND_GFN_ORDER_DURING_AN_AUCTION
	// A GFA order has got to the market when it is in continuous trading mode.
	OrderErrorGFAOrderDuringContinuousTrading OrderError = proto.OrderError_ORDER_ERROR_CANNOT_SEND_GFA_ORDER_DURING_CONTINUOUS_TRADING
	// Attempt to amend order to GTT without ExpiryAt.
	OrderErrorCannotAmendToGTTWithoutExpiryAt OrderError = proto.OrderError_ORDER_ERROR_CANNOT_AMEND_TO_GTT_WITHOUT_EXPIRYAT
	// Attempt to amend ExpiryAt to a value before CreatedAt.
	OrderErrorExpiryAtBeforeCreatedAt OrderError = proto.OrderError_ORDER_ERROR_EXPIRYAT_BEFORE_CREATEDAT
	// Attempt to amend to GTC without an ExpiryAt value.
	OrderErrorCannotHaveGTCAndExpiryAt OrderError = proto.OrderError_ORDER_ERROR_CANNOT_HAVE_GTC_AND_EXPIRYAT
	// Amending to FOK or IOC is invalid.
	OrderErrorCannotAmendToFOKOrIOC OrderError = proto.OrderError_ORDER_ERROR_CANNOT_AMEND_TO_FOK_OR_IOC
	// Amending to GFA or GFN is invalid.
	OrderErrorCannotAmendToGFAOrGFN OrderError = proto.OrderError_ORDER_ERROR_CANNOT_AMEND_TO_GFA_OR_GFN
	// Amending from GFA or GFN is invalid.
	OrderErrorCannotAmendFromGFAOrGFN OrderError = proto.OrderError_ORDER_ERROR_CANNOT_AMEND_FROM_GFA_OR_GFN
	// IOC orders are not allowed during auction.
	OrderErrorCannotSendIOCOrderDuringAuction OrderError = proto.OrderError_ORDER_ERROR_CANNOT_SEND_IOC_ORDER_DURING_AUCTION
	// FOK orders are not allowed during auction.
	OrderErrorCannotSendFOKOrderDurinAuction OrderError = proto.OrderError_ORDER_ERROR_CANNOT_SEND_FOK_ORDER_DURING_AUCTION
	// Pegged orders must be LIMIT orders.
	OrderErrorMustBeLimitOrder OrderError = proto.OrderError_ORDER_ERROR_MUST_BE_LIMIT_ORDER
	// Pegged orders can only have TIF GTC or GTT.
	OrderErrorMustBeGTTOrGTC OrderError = proto.OrderError_ORDER_ERROR_MUST_BE_GTT_OR_GTC
	// Pegged order must have a reference price.
	OrderErrorWithoutReferencePrice OrderError = proto.OrderError_ORDER_ERROR_WITHOUT_REFERENCE_PRICE
	// Buy pegged order cannot reference best ask price.
	OrderErrorBuyCannotReferenceBestAskPrice OrderError = proto.OrderError_ORDER_ERROR_BUY_CANNOT_REFERENCE_BEST_ASK_PRICE
	// Pegged order offset must be >= 0.
	OrderErrorOffsetMustBeGreaterOrEqualToZero OrderError = proto.OrderError_ORDER_ERROR_OFFSET_MUST_BE_GREATER_OR_EQUAL_TO_ZERO
	// Sell pegged order cannot reference best bid price.
	OrderErrorSellCannotReferenceBestBidPrice OrderError = proto.OrderError_ORDER_ERROR_SELL_CANNOT_REFERENCE_BEST_BID_PRICE
	// Pegged order offset must be > zero.
	OrderErrorOffsetMustBeGreaterThanZero OrderError = proto.OrderError_ORDER_ERROR_OFFSET_MUST_BE_GREATER_THAN_ZERO
	// The party has an insufficient balance, or does not have
	// a general account to submit the order (no deposits made
	// for the required asset).
	OrderErrorInsufficientAssetBalance OrderError = proto.OrderError_ORDER_ERROR_INSUFFICIENT_ASSET_BALANCE
	// Cannot amend a non pegged orders details.
	OrderErrorCannotAmendPeggedOrderDetailsOnNonPeggedOrder OrderError = proto.OrderError_ORDER_ERROR_CANNOT_AMEND_PEGGED_ORDER_DETAILS_ON_NON_PEGGED_ORDER
	// We are unable to re-price a pegged order because a market price is unavailable.
	OrderErrorUnableToRepricePeggedOrder OrderError = proto.OrderError_ORDER_ERROR_UNABLE_TO_REPRICE_PEGGED_ORDER
	// It is not possible to amend the price of an existing pegged order.
	OrderErrorUnableToAmendPriceOnPeggedOrder OrderError = proto.OrderError_ORDER_ERROR_UNABLE_TO_AMEND_PRICE_ON_PEGGED_ORDER
	// An FOK, IOC, or GFN order was rejected because it resulted in trades outside the price bounds.
	OrderErrorNonPersistentOrderOutOfPriceBounds OrderError = proto.OrderError_ORDER_ERROR_NON_PERSISTENT_ORDER_OUT_OF_PRICE_BOUNDS
	// Unable to submit pegged order, temporarily too many pegged orders across all markets.
	OrderErrorTooManyPeggedOrders OrderError = proto.OrderError_ORDER_ERROR_TOO_MANY_PEGGED_ORDERS
)

func IsOrderError

func IsOrderError(err error) (OrderError, bool)

type OrderStatus

type OrderStatus = proto.Order_Status
const (
	// Default value, always invalid.
	OrderStatusUnspecified OrderStatus = proto.Order_STATUS_UNSPECIFIED
	// Used for active unfilled or partially filled orders.
	OrderStatusActive OrderStatus = proto.Order_STATUS_ACTIVE
	// Used for expired GTT orders.
	OrderStatusExpired OrderStatus = proto.Order_STATUS_EXPIRED
	// Used for orders cancelled by the party that created the order.
	OrderStatusCancelled OrderStatus = proto.Order_STATUS_CANCELLED
	// Used for unfilled FOK or IOC orders, and for orders that were stopped by the network.
	OrderStatusStopped OrderStatus = proto.Order_STATUS_STOPPED
	// Used for closed fully filled orders.
	OrderStatusFilled OrderStatus = proto.Order_STATUS_FILLED
	// Used for orders when not enough collateral was available to fill the margin requirements.
	OrderStatusRejected OrderStatus = proto.Order_STATUS_REJECTED
	// Used for closed partially filled IOC orders.
	OrderStatusPartiallyFilled OrderStatus = proto.Order_STATUS_PARTIALLY_FILLED
	// Order has been removed from the order book and has been parked, this applies to pegged orders only.
	OrderStatusParked OrderStatus = proto.Order_STATUS_PARKED
)

type OrderSubmission

type OrderSubmission struct {
	// Market identifier for the order, required field
	MarketID string
	// Price for the order, the price is an integer, for example `123456` is a correctly
	// formatted price of `1.23456` assuming market configured to 5 decimal places,
	// required field for limit orders, however it is not required for market orders
	Price *num.Uint
	// Size for the order, for example, in a futures market the size equals the number of contracts, cannot be negative
	Size uint64
	// Side for the order, e.g. SIDE_BUY or SIDE_SELL, required field
	Side proto.Side
	// Time in force indicates how long an order will remain active before it is executed or expires, required field
	TimeInForce proto.Order_TimeInForce
	// Timestamp for when the order will expire, in nanoseconds since the epoch,
	ExpiresAt int64
	// Type for the order, required field
	Type proto.Order_Type
	// Reference given for the order, this is typically used to retrieve an order submitted through consensus, currently
	// set internally by the node to return a unique reference identifier for the order submission
	Reference string
	// Used to specify the details for a pegged order
	PeggedOrder *PeggedOrder
}

func NewOrderSubmissionFromProto

func NewOrderSubmissionFromProto(p *commandspb.OrderSubmission) (*OrderSubmission, error)

func (OrderSubmission) IntoOrder

func (o OrderSubmission) IntoOrder(party string) *Order

func (OrderSubmission) IntoProto

func (OrderSubmission) String

func (o OrderSubmission) String() string

type OrderTimeInForce

type OrderTimeInForce = proto.Order_TimeInForce
const (
	// Default value for TimeInForce, can be valid for an amend.
	OrderTimeInForceUnspecified OrderTimeInForce = proto.Order_TIME_IN_FORCE_UNSPECIFIED
	// Good until cancelled.
	OrderTimeInForceGTC OrderTimeInForce = proto.Order_TIME_IN_FORCE_GTC
	// Good until specified time.
	OrderTimeInForceGTT OrderTimeInForce = proto.Order_TIME_IN_FORCE_GTT
	// Immediate or cancel.
	OrderTimeInForceIOC OrderTimeInForce = proto.Order_TIME_IN_FORCE_IOC
	// Fill or kill.
	OrderTimeInForceFOK OrderTimeInForce = proto.Order_TIME_IN_FORCE_FOK
	// Good for auction.
	OrderTimeInForceGFA OrderTimeInForce = proto.Order_TIME_IN_FORCE_GFA
	// Good for normal.
	OrderTimeInForceGFN OrderTimeInForce = proto.Order_TIME_IN_FORCE_GFN
)

type OrderType

type OrderType = proto.Order_Type
const (
	// Default value, always invalid.
	OrderTypeUnspecified OrderType = proto.Order_TYPE_UNSPECIFIED
	// Used for Limit orders.
	OrderTypeLimit OrderType = proto.Order_TYPE_LIMIT
	// Used for Market orders.
	OrderTypeMarket OrderType = proto.Order_TYPE_MARKET
	// Used for orders where the initiating party is the network (with distressed traders).
	OrderTypeNetwork OrderType = proto.Order_TYPE_NETWORK
)

type Orders

type Orders []*Order

func (Orders) IntoProto

func (o Orders) IntoProto() []*proto.Order

type Party

type Party = proto.Party

type PartyContibutionScore

type PartyContibutionScore struct {
	Party string
	Score num.Decimal
}

FeePartyScore represents the fraction the party has in the total fee.

type PartyCount

type PartyCount struct {
	Party string
	Count uint64
}

type PartyProposalVoteCount

type PartyProposalVoteCount struct {
	Party    string
	Proposal string
	Count    uint64
}

func (*PartyProposalVoteCount) IntoProto

type PartySettledPosition added in v0.63.0

type PartySettledPosition struct {
	Party           string
	SettledPosition int64
}

type PartyTokenBalance

type PartyTokenBalance struct {
	Party   string
	Balance *num.Uint
}

func PartyTokenBalanceFromProto

func PartyTokenBalanceFromProto(balance *snapshot.PartyTokenBalance) *PartyTokenBalance

func (*PartyTokenBalance) IntoProto

func (ptc *PartyTokenBalance) IntoProto() *snapshot.PartyTokenBalance

type PastPrice

type PastPrice struct {
	Time                time.Time
	VolumeWeightedPrice num.Decimal
}

func PastPriceFromProto

func PastPriceFromProto(spp *snapshot.PastPrice) *PastPrice

func (PastPrice) IntoProto

func (pp PastPrice) IntoProto() *snapshot.PastPrice

type Payload

type Payload struct {
	Data isPayload
	// contains filtered or unexported fields
}

func PayloadFromProto

func PayloadFromProto(p *snapshot.Payload) *Payload

func (Payload) GetAppState

func (p Payload) GetAppState() *PayloadAppState

func (*Payload) GetTreeKey

func (p *Payload) GetTreeKey() string

func (Payload) IntoProto

func (p Payload) IntoProto() *snapshot.Payload

func (Payload) Key

func (p Payload) Key() string

func (Payload) Namespace

func (p Payload) Namespace() SnapshotNamespace

type PayloadActiveAssets

type PayloadActiveAssets struct {
	ActiveAssets *ActiveAssets
}

func PayloadActiveAssetsFromProto

func PayloadActiveAssetsFromProto(paa *snapshot.Payload_ActiveAssets) *PayloadActiveAssets

func (PayloadActiveAssets) IntoProto

func (*PayloadActiveAssets) Key

func (*PayloadActiveAssets) Key() string

func (*PayloadActiveAssets) Namespace

type PayloadAppState

type PayloadAppState struct {
	AppState *AppState
}

func AppStateFromTree

func AppStateFromTree(tree *iavl.ImmutableTree) (*PayloadAppState, error)

func PayloadAppStateFromProto

func PayloadAppStateFromProto(pas *snapshot.Payload_AppState) *PayloadAppState

func (PayloadAppState) IntoProto

func (p PayloadAppState) IntoProto() *snapshot.Payload_AppState

func (*PayloadAppState) Key

func (*PayloadAppState) Key() string

func (*PayloadAppState) Namespace

func (*PayloadAppState) Namespace() SnapshotNamespace

type PayloadBankingAssetActions

type PayloadBankingAssetActions struct {
	BankingAssetActions *BankingAssetActions
}

func (PayloadBankingAssetActions) IntoProto

func (*PayloadBankingAssetActions) Key

func (*PayloadBankingAssetActions) Namespace

type PayloadBankingBridgeState

type PayloadBankingBridgeState struct {
	BankingBridgeState *BankingBridgeState
}

func (PayloadBankingBridgeState) IntoProto

func (*PayloadBankingBridgeState) Key

func (*PayloadBankingBridgeState) Namespace

type PayloadBankingDeposits

type PayloadBankingDeposits struct {
	BankingDeposits *BankingDeposits
}

func (PayloadBankingDeposits) IntoProto

func (*PayloadBankingDeposits) Key

func (*PayloadBankingDeposits) Namespace

type PayloadBankingRecurringTransfers

type PayloadBankingRecurringTransfers struct {
	BankingRecurringTransfers *checkpointpb.RecurringTransfers
}

func (PayloadBankingRecurringTransfers) IntoProto

func (*PayloadBankingRecurringTransfers) Key

func (*PayloadBankingRecurringTransfers) Namespace

type PayloadBankingScheduledTransfers

type PayloadBankingScheduledTransfers struct {
	BankingScheduledTransfers []*checkpointpb.ScheduledTransferAtTime
}

func (PayloadBankingScheduledTransfers) IntoProto

func (*PayloadBankingScheduledTransfers) Key

func (*PayloadBankingScheduledTransfers) Namespace

type PayloadBankingSeen

type PayloadBankingSeen struct {
	BankingSeen *BankingSeen
}

func PayloadBankingSeenFromProto

func PayloadBankingSeenFromProto(pbs *snapshot.Payload_BankingSeen) *PayloadBankingSeen

func (PayloadBankingSeen) IntoProto

func (*PayloadBankingSeen) Key

func (*PayloadBankingSeen) Key() string

func (*PayloadBankingSeen) Namespace

type PayloadBankingWithdrawals

type PayloadBankingWithdrawals struct {
	BankingWithdrawals *BankingWithdrawals
}

func (PayloadBankingWithdrawals) IntoProto

func (*PayloadBankingWithdrawals) Key

func (*PayloadBankingWithdrawals) Namespace

type PayloadCheckpoint

type PayloadCheckpoint struct {
	Checkpoint *CPState
}

func PayloadCheckpointFromProto

func PayloadCheckpointFromProto(pc *snapshot.Payload_Checkpoint) *PayloadCheckpoint

func (PayloadCheckpoint) IntoProto

func (*PayloadCheckpoint) Key

func (*PayloadCheckpoint) Key() string

func (*PayloadCheckpoint) Namespace

func (*PayloadCheckpoint) Namespace() SnapshotNamespace

type PayloadCollateralAccounts

type PayloadCollateralAccounts struct {
	CollateralAccounts *CollateralAccounts
}

func (PayloadCollateralAccounts) IntoProto

func (*PayloadCollateralAccounts) Key

func (*PayloadCollateralAccounts) Namespace

type PayloadCollateralAssets

type PayloadCollateralAssets struct {
	CollateralAssets *CollateralAssets
}

func (PayloadCollateralAssets) IntoProto

func (*PayloadCollateralAssets) Key

func (*PayloadCollateralAssets) Namespace

type PayloadDelegationActive

type PayloadDelegationActive struct {
	DelegationActive *DelegationActive
}

func (PayloadDelegationActive) IntoProto

func (*PayloadDelegationActive) Key

func (*PayloadDelegationActive) Namespace

type PayloadDelegationAuto

type PayloadDelegationAuto struct {
	DelegationAuto *DelegationAuto
}

func (PayloadDelegationAuto) IntoProto

func (*PayloadDelegationAuto) Key

func (*PayloadDelegationAuto) Namespace

type PayloadDelegationLastReconTime

type PayloadDelegationLastReconTime struct {
	LastReconcilicationTime time.Time
}

func (PayloadDelegationLastReconTime) IntoProto

func (*PayloadDelegationLastReconTime) Key

func (*PayloadDelegationLastReconTime) Namespace

type PayloadDelegationPending

type PayloadDelegationPending struct {
	DelegationPending *DelegationPending
}

func (PayloadDelegationPending) IntoProto

func (*PayloadDelegationPending) Key

func (*PayloadDelegationPending) Namespace

type PayloadERC20MultiSigTopologyPending

type PayloadERC20MultiSigTopologyPending struct {
	Pending *snapshot.ERC20MultiSigTopologyPending
}

func (*PayloadERC20MultiSigTopologyPending) Key

func (*PayloadERC20MultiSigTopologyPending) Namespace

type PayloadERC20MultiSigTopologyVerified

type PayloadERC20MultiSigTopologyVerified struct {
	Verified *snapshot.ERC20MultiSigTopologyVerified
}

func (*PayloadERC20MultiSigTopologyVerified) Key

func (*PayloadERC20MultiSigTopologyVerified) Namespace

type PayloadEpoch

type PayloadEpoch struct {
	EpochState *EpochState
}

func PayloadEpochFromProto

func PayloadEpochFromProto(e *snapshot.Payload_Epoch) *PayloadEpoch

func (PayloadEpoch) IntoProto

func (p PayloadEpoch) IntoProto() *snapshot.Payload_Epoch

func (*PayloadEpoch) Key

func (*PayloadEpoch) Key() string

func (*PayloadEpoch) Namespace

func (*PayloadEpoch) Namespace() SnapshotNamespace

type PayloadEventForwarder

type PayloadEventForwarder struct {
	Keys []string
}

func (*PayloadEventForwarder) IntoProto

func (*PayloadEventForwarder) Key

func (*PayloadEventForwarder) Namespace

type PayloadExecutionMarkets

type PayloadExecutionMarkets struct {
	ExecutionMarkets *ExecutionMarkets
}

func (PayloadExecutionMarkets) IntoProto

func (*PayloadExecutionMarkets) Key

func (*PayloadExecutionMarkets) Namespace

type PayloadFloatingPointConsensus

type PayloadFloatingPointConsensus struct {
	ConsensusData               []*snapshot.NextTimeTrigger
	StateVariablesInternalState []*snapshot.StateVarInternalState
}

func (*PayloadFloatingPointConsensus) IntoProto

func (*PayloadFloatingPointConsensus) Key

func (*PayloadFloatingPointConsensus) Namespace

type PayloadGovernanceActive

type PayloadGovernanceActive struct {
	GovernanceActive *GovernanceActive
}

func (PayloadGovernanceActive) IntoProto

func (*PayloadGovernanceActive) Key

func (*PayloadGovernanceActive) Namespace

type PayloadGovernanceEnacted

type PayloadGovernanceEnacted struct {
	GovernanceEnacted *GovernanceEnacted
}

func (PayloadGovernanceEnacted) IntoProto

func (*PayloadGovernanceEnacted) Key

func (*PayloadGovernanceEnacted) Namespace

type PayloadGovernanceNode

type PayloadGovernanceNode struct {
	GovernanceNode *GovernanceNode
}

func (PayloadGovernanceNode) IntoProto

func (*PayloadGovernanceNode) Key

func (*PayloadGovernanceNode) Namespace

type PayloadLimitState

type PayloadLimitState struct {
	LimitState *LimitState
}

func PayloadLimitStateFromProto

func PayloadLimitStateFromProto(l *snapshot.Payload_LimitState) *PayloadLimitState

func (PayloadLimitState) IntoProto

func (*PayloadLimitState) Key

func (*PayloadLimitState) Key() string

func (*PayloadLimitState) Namespace

func (*PayloadLimitState) Namespace() SnapshotNamespace

type PayloadLiquidityParameters

type PayloadLiquidityParameters struct {
	Parameters *snapshot.LiquidityParameters
}

func (*PayloadLiquidityParameters) Key

func (*PayloadLiquidityParameters) Namespace

type PayloadLiquidityPendingProvisions

type PayloadLiquidityPendingProvisions struct {
	PendingProvisions *snapshot.LiquidityPendingProvisions
}

func (*PayloadLiquidityPendingProvisions) Key

func (*PayloadLiquidityPendingProvisions) Namespace

type PayloadLiquidityProvisions

type PayloadLiquidityProvisions struct {
	Provisions *snapshot.LiquidityProvisions
}

func (*PayloadLiquidityProvisions) Key

func (*PayloadLiquidityProvisions) Namespace

type PayloadLiquidityScores added in v0.65.0

type PayloadLiquidityScores struct {
	LiquidityScores *snapshot.LiquidityScores
}

func PayloadLiquidityScoresFromProto added in v0.65.0

func PayloadLiquidityScoresFromProto(ls *snapshot.Payload_LiquidityScores) *PayloadLiquidityScores

func (*PayloadLiquidityScores) IntoProto added in v0.65.0

func (*PayloadLiquidityScores) Key added in v0.65.0

func (p *PayloadLiquidityScores) Key() string

func (*PayloadLiquidityScores) Namespace added in v0.65.0

type PayloadLiquiditySupplied

type PayloadLiquiditySupplied struct {
	LiquiditySupplied *snapshot.LiquiditySupplied
}

func (*PayloadLiquiditySupplied) IntoProto

func (*PayloadLiquiditySupplied) Key

func (*PayloadLiquiditySupplied) Namespace

type PayloadLiquidityTarget

type PayloadLiquidityTarget struct {
	Target *snapshot.LiquidityTarget
}

func (*PayloadLiquidityTarget) Key

func (p *PayloadLiquidityTarget) Key() string

func (*PayloadLiquidityTarget) Namespace

type PayloadMarketActivityTracker

type PayloadMarketActivityTracker struct {
	MarketActivityData *snapshot.MarketTracker
}

func (*PayloadMarketActivityTracker) IntoProto

func (*PayloadMarketActivityTracker) Key

func (*PayloadMarketActivityTracker) Namespace

type PayloadMarketPositions

type PayloadMarketPositions struct {
	MarketPositions *MarketPositions
}

func (PayloadMarketPositions) IntoProto

func (*PayloadMarketPositions) Key

func (p *PayloadMarketPositions) Key() string

func (*PayloadMarketPositions) Namespace

type PayloadMatchingBook

type PayloadMatchingBook struct {
	MatchingBook *MatchingBook
}

func PayloadMatchingBookFromProto

func PayloadMatchingBookFromProto(pmb *snapshot.Payload_MatchingBook) *PayloadMatchingBook

func (PayloadMatchingBook) IntoProto

func (*PayloadMatchingBook) Key

func (p *PayloadMatchingBook) Key() string

func (*PayloadMatchingBook) Namespace

type PayloadNetParams

type PayloadNetParams struct {
	NetParams *NetParams
}

func (PayloadNetParams) IntoProto

func (*PayloadNetParams) Key

func (*PayloadNetParams) Key() string

func (*PayloadNetParams) Namespace

func (*PayloadNetParams) Namespace() SnapshotNamespace

type PayloadNotary

type PayloadNotary struct {
	Notary *Notary
}

func PayloadNotaryFromProto

func PayloadNotaryFromProto(n *snapshot.Payload_Notary) *PayloadNotary

func (PayloadNotary) IntoProto

func (p PayloadNotary) IntoProto() *snapshot.Payload_Notary

func (*PayloadNotary) Key

func (*PayloadNotary) Key() string

func (*PayloadNotary) Namespace

func (*PayloadNotary) Namespace() SnapshotNamespace

type PayloadPendingAssetUpdates

type PayloadPendingAssetUpdates struct {
	PendingAssetUpdates *PendingAssetUpdates
}

func (PayloadPendingAssetUpdates) IntoProto

func (*PayloadPendingAssetUpdates) Key

func (*PayloadPendingAssetUpdates) Namespace

type PayloadPendingAssets

type PayloadPendingAssets struct {
	PendingAssets *PendingAssets
}

func (PayloadPendingAssets) IntoProto

func (*PayloadPendingAssets) Key

func (*PayloadPendingAssets) Namespace

type PayloadProofOfWork

type PayloadProofOfWork struct {
	BlockHeight   []uint64
	BlockHash     []string
	HeightToTx    map[uint64][]string
	HeightToTid   map[uint64][]string
	BannedParties map[string]int64
	ActiveParams  []*snapshot.ProofOfWorkParams
	ActiveStates  []*snapshot.ProofOfWorkState
}

func (*PayloadProofOfWork) IntoProto

func (*PayloadProofOfWork) Key

func (p *PayloadProofOfWork) Key() string

func (*PayloadProofOfWork) Namespace

type PayloadProtocolUpgradeProposals

type PayloadProtocolUpgradeProposals struct {
	Proposals *snapshot.ProtocolUpgradeProposals
}

func (*PayloadProtocolUpgradeProposals) IntoProto

func (*PayloadProtocolUpgradeProposals) Key

func (*PayloadProtocolUpgradeProposals) Namespace

type PayloadRewardsPayout

type PayloadRewardsPayout struct {
	RewardsPendingPayouts *RewardsPendingPayouts
}

func (PayloadRewardsPayout) IntoProto

func (*PayloadRewardsPayout) Key

func (*PayloadRewardsPayout) Namespace

type PayloadSettlement added in v0.63.0

type PayloadSettlement struct {
	SettlementState *SettlementState
}

func PayloadSettlementFromProto added in v0.63.0

func PayloadSettlementFromProto(st *snapshot.Payload_SettlementState) *PayloadSettlement

func (PayloadSettlement) IntoProto added in v0.63.0

func (PayloadSettlement) Key added in v0.63.0

func (p PayloadSettlement) Key() string

func (*PayloadSettlement) Namespace added in v0.63.0

func (*PayloadSettlement) Namespace() SnapshotNamespace

type PayloadSimpleSpamPolicy

type PayloadSimpleSpamPolicy struct {
	SimpleSpamPolicy *SimpleSpamPolicy
}

func (*PayloadSimpleSpamPolicy) IntoProto

func (*PayloadSimpleSpamPolicy) Key

func (*PayloadSimpleSpamPolicy) Namespace

type PayloadStakeVerifierDeposited

type PayloadStakeVerifierDeposited struct {
	StakeVerifierDeposited []*StakeDeposited
}

func (*PayloadStakeVerifierDeposited) IntoProto

func (*PayloadStakeVerifierDeposited) Key

func (*PayloadStakeVerifierDeposited) Namespace

type PayloadStakeVerifierRemoved

type PayloadStakeVerifierRemoved struct {
	StakeVerifierRemoved []*StakeRemoved
}

func (*PayloadStakeVerifierRemoved) IntoProto

func (*PayloadStakeVerifierRemoved) Key

func (*PayloadStakeVerifierRemoved) Namespace

type PayloadStakingAccounts

type PayloadStakingAccounts struct {
	StakingAccounts *StakingAccounts
}

func (PayloadStakingAccounts) IntoProto

func (*PayloadStakingAccounts) Key

func (*PayloadStakingAccounts) Namespace

type PayloadTopology

type PayloadTopology struct {
	Topology *Topology
}

func PayloadTopologyFromProto

func PayloadTopologyFromProto(t *snapshot.Payload_Topology) *PayloadTopology

func (*PayloadTopology) IntoProto

func (p *PayloadTopology) IntoProto() *snapshot.Payload_Topology

func (*PayloadTopology) Key

func (*PayloadTopology) Key() string

func (*PayloadTopology) Namespace

func (*PayloadTopology) Namespace() SnapshotNamespace

type PayloadVoteSpamPolicy

type PayloadVoteSpamPolicy struct {
	VoteSpamPolicy *VoteSpamPolicy
}

func (*PayloadVoteSpamPolicy) IntoProto

func (*PayloadVoteSpamPolicy) Key

func (*PayloadVoteSpamPolicy) Namespace

type PayloadWitness

type PayloadWitness struct {
	Witness *Witness
}

func PayloadWitnessFromProto

func PayloadWitnessFromProto(w *snapshot.Payload_Witness) *PayloadWitness

func (*PayloadWitness) IntoProto

func (p *PayloadWitness) IntoProto() *snapshot.Payload_Witness

func (*PayloadWitness) Key

func (*PayloadWitness) Key() string

func (*PayloadWitness) Namespace

func (*PayloadWitness) Namespace() SnapshotNamespace

type PeggedOrder

type PeggedOrder struct {
	Reference PeggedReference
	Offset    *num.Uint
}

func NewPeggedOrderFromProto

func NewPeggedOrderFromProto(p *proto.PeggedOrder) (*PeggedOrder, error)

func (PeggedOrder) Clone

func (p PeggedOrder) Clone() *PeggedOrder

func (PeggedOrder) IntoProto

func (p PeggedOrder) IntoProto() *proto.PeggedOrder

func (PeggedOrder) String

func (p PeggedOrder) String() string

type PeggedOrdersState

type PeggedOrdersState struct {
	Parked []*Order
}

func PeggedOrdersStateFromProto

func PeggedOrdersStateFromProto(s *snapshot.PeggedOrders) *PeggedOrdersState

func (PeggedOrdersState) IntoProto

func (s PeggedOrdersState) IntoProto() *snapshot.PeggedOrders

type PeggedReference

type PeggedReference = proto.PeggedReference
const (
	// Default value for PeggedReference, no reference given.
	PeggedReferenceUnspecified PeggedReference = proto.PeggedReference_PEGGED_REFERENCE_UNSPECIFIED
	// Mid price reference.
	PeggedReferenceMid PeggedReference = proto.PeggedReference_PEGGED_REFERENCE_MID
	// Best bid price reference.
	PeggedReferenceBestBid PeggedReference = proto.PeggedReference_PEGGED_REFERENCE_BEST_BID
	// Best ask price reference.
	PeggedReferenceBestAsk PeggedReference = proto.PeggedReference_PEGGED_REFERENCE_BEST_ASK
)

type PendingAssetUpdates

type PendingAssetUpdates struct {
	Assets []*Asset
}

func PendingAssetUpdatesFromProto

func PendingAssetUpdatesFromProto(aa *snapshot.PendingAssetUpdates) *PendingAssetUpdates

func (PendingAssetUpdates) IntoProto

type PendingAssets

type PendingAssets struct {
	Assets []*Asset
}

func PendingAssetsFromProto

func PendingAssetsFromProto(aa *snapshot.PendingAssets) *PendingAssets

func (PendingAssets) IntoProto

func (a PendingAssets) IntoProto() *snapshot.PendingAssets

type Position

type Position struct {
	// Market identifier
	MarketID string
	// Party identifier
	PartyID string
	// Open volume for the position, value is signed +ve for long and -ve for short
	OpenVolume int64
	// Realised profit and loss for the position, value is signed +ve for long and -ve for short
	RealisedPnl num.Decimal
	// Unrealised profit and loss for the position, value is signed +ve for long and -ve for short
	UnrealisedPnl num.Decimal
	// Average entry price for the position, the price is an integer, for example `123456` is a correctly
	// formatted price of `1.23456` assuming market configured to 5 decimal places
	AverageEntryPrice *num.Uint
	// Timestamp for the latest time the position was updated
	UpdatedAt int64
}

func (*Position) IntoProto

func (p *Position) IntoProto() *proto.Position

type Positions

type Positions []*Position

func (Positions) IntoProto

func (p Positions) IntoProto() []*proto.Position

type PostRestore

type PostRestore interface {
	StateProvider
	OnStateLoaded(ctx context.Context) error
}

PostRestore is basically a StateProvider which, after the full core state is restored, expects a callback to finalise the state restore Note that the order in which the calls to this OnStateLoaded functions are called is not pre-defined. As such, this method should only be used for engine internals (upkeep, essentially)

type PostTransferBalance added in v0.56.0

type PostTransferBalance struct {
	Account *Account
	Balance *num.Uint
}

func (*PostTransferBalance) IntoProto added in v0.56.0

type PostTransferBalances added in v0.56.0

type PostTransferBalances []*PostTransferBalance

func (PostTransferBalances) IntoProto added in v0.56.0

type PreRestore

type PreRestore interface {
	StateProvider
	OnStateLoadStarts(ctx context.Context) error
}

type PriceBound

type PriceBound struct {
	Active     bool
	UpFactor   num.Decimal
	DownFactor num.Decimal
	Trigger    *PriceMonitoringTrigger
}

func PriceBoundFromProto

func PriceBoundFromProto(pb *snapshot.PriceBound) *PriceBound

func (PriceBound) IntoProto

func (p PriceBound) IntoProto() *snapshot.PriceBound

type PriceLevel

type PriceLevel struct {
	Price          *num.Uint
	NumberOfOrders uint64
	Volume         uint64
}

func (PriceLevel) IntoProto

func (p PriceLevel) IntoProto() *proto.PriceLevel

type PriceLevels

type PriceLevels []*PriceLevel

func (PriceLevels) IntoProto

func (p PriceLevels) IntoProto() []*proto.PriceLevel

type PriceMonitor

type PriceMonitor struct {
	Initialised                 bool
	FPHorizons                  []*KeyDecimalPair
	Now                         time.Time
	Update                      time.Time
	Bounds                      []*PriceBound
	PriceRangeCache             []*PriceRangeCache
	PriceRangeCacheTime         time.Time
	PricesNow                   []*CurrentPrice
	PricesPast                  []*PastPrice
	RefPriceCache               []*KeyDecimalPair
	RefPriceCacheTime           time.Time
	PriceBoundsConsensusReached bool
}

func PriceMonitorFromProto

func PriceMonitorFromProto(pm *snapshot.PriceMonitor) *PriceMonitor

func (PriceMonitor) IntoProto

func (p PriceMonitor) IntoProto() *snapshot.PriceMonitor

type PriceMonitoringBounds

type PriceMonitoringBounds struct {
	MinValidPrice  *num.Uint
	MaxValidPrice  *num.Uint
	Trigger        *PriceMonitoringTrigger
	ReferencePrice num.Decimal
}

func PriceMonitoringBoundsFromProto

func PriceMonitoringBoundsFromProto(pr *proto.PriceMonitoringBounds) (*PriceMonitoringBounds, error)

func (PriceMonitoringBounds) DeepClone

func (PriceMonitoringBounds) IntoProto

func (PriceMonitoringBounds) String

func (p PriceMonitoringBounds) String() string

type PriceMonitoringBoundsList

type PriceMonitoringBoundsList []*PriceMonitoringBounds

func (PriceMonitoringBoundsList) String

func (ls PriceMonitoringBoundsList) String() string

type PriceMonitoringParameters

type PriceMonitoringParameters struct {
	Triggers []*PriceMonitoringTrigger
}

func (PriceMonitoringParameters) DeepClone

func (PriceMonitoringParameters) IntoProto

func (*PriceMonitoringParameters) Reset

func (p *PriceMonitoringParameters) Reset()

func (PriceMonitoringParameters) String

func (p PriceMonitoringParameters) String() string

type PriceMonitoringSettings

type PriceMonitoringSettings struct {
	Parameters *PriceMonitoringParameters
}

func (PriceMonitoringSettings) DeepClone

func (PriceMonitoringSettings) IntoProto

func (PriceMonitoringSettings) String

func (p PriceMonitoringSettings) String() string

type PriceMonitoringTrigger

type PriceMonitoringTrigger struct {
	Horizon          int64
	HorizonDec       num.Decimal
	Probability      num.Decimal
	AuctionExtension int64
}

func (PriceMonitoringTrigger) DeepClone

func (PriceMonitoringTrigger) IntoProto

IntoProto return proto version of the PriceMonitoringTrigger.

func (PriceMonitoringTrigger) String

func (p PriceMonitoringTrigger) String() string

type PriceMonitoringTriggers

type PriceMonitoringTriggers []*PriceMonitoringTrigger

func (PriceMonitoringTriggers) String

func (ts PriceMonitoringTriggers) String() string

type PriceRange

type PriceRange struct {
	Min num.Decimal
	Max num.Decimal
	Ref num.Decimal
}

func PriceRangeFromProto

func PriceRangeFromProto(pr *snapshot.PriceRange) *PriceRange

func (PriceRange) IntoProto

func (p PriceRange) IntoProto() *snapshot.PriceRange

type PriceRangeCache

type PriceRangeCache struct {
	Bound *PriceBound
	Range *PriceRange
}

func PriceRangeCacheFromProto

func PriceRangeCacheFromProto(prc *snapshot.PriceRangeCache) *PriceRangeCache

func (PriceRangeCache) IntoProto

func (p PriceRangeCache) IntoProto() *snapshot.PriceRangeCache

type Proposal

type Proposal struct {
	ID                      string
	Reference               string
	Party                   string
	State                   ProposalState
	Timestamp               int64
	Terms                   *ProposalTerms
	Rationale               *ProposalRationale
	Reason                  ProposalError
	ErrorDetails            string
	RequiredMajority        num.Decimal
	RequiredParticipation   num.Decimal
	RequiredLPMajority      num.Decimal
	RequiredLPParticipation num.Decimal
}

func ProposalFromProto

func ProposalFromProto(pp *vegapb.Proposal) (*Proposal, error)

func (Proposal) DeepClone

func (p Proposal) DeepClone() *Proposal

func (*Proposal) FailUnexpectedly

func (p *Proposal) FailUnexpectedly(details error)

FailUnexpectedly marks the proposal as failed. Calling this method should be reserved to cases where errors are the result of an internal issue, such as bad workflow, or conditions.

func (*Proposal) FailWithErr

func (p *Proposal) FailWithErr(reason ProposalError, details error)

func (Proposal) IntoProto

func (p Proposal) IntoProto() *vegapb.Proposal

func (*Proposal) IsMarketUpdate

func (p *Proposal) IsMarketUpdate() bool

func (*Proposal) MarketUpdate

func (p *Proposal) MarketUpdate() *UpdateMarket

func (*Proposal) Reject

func (p *Proposal) Reject(reason ProposalError)

func (*Proposal) RejectWithErr

func (p *Proposal) RejectWithErr(reason ProposalError, details error)

func (Proposal) String

func (p Proposal) String() string

func (*Proposal) WaitForNodeVote

func (p *Proposal) WaitForNodeVote()

type ProposalData

type ProposalData struct {
	Proposal *Proposal
	Yes      []*Vote
	No       []*Vote
	Invalid  []*Vote
}

func ProposalDataFromProto

func ProposalDataFromProto(pp *snapshot.ProposalData) *ProposalData

func (ProposalData) IntoProto

func (p ProposalData) IntoProto() *snapshot.ProposalData

type ProposalError

type ProposalError = vegapb.ProposalError
const (
	// ProposalErrorUnspecified Default value, always invalid.
	ProposalErrorUnspecified ProposalError = vegapb.ProposalError_PROPOSAL_ERROR_UNSPECIFIED
	// ProposalErrorCloseTimeTooSoon The specified close time is too early base on network parameters.
	ProposalErrorCloseTimeTooSoon ProposalError = vegapb.ProposalError_PROPOSAL_ERROR_CLOSE_TIME_TOO_SOON
	// ProposalErrorCloseTimeTooLate The specified close time is too late based on network parameters.
	ProposalErrorCloseTimeTooLate ProposalError = vegapb.ProposalError_PROPOSAL_ERROR_CLOSE_TIME_TOO_LATE
	// ProposalErrorEnactTimeTooSoon The specified enact time is too early based on network parameters.
	ProposalErrorEnactTimeTooSoon ProposalError = vegapb.ProposalError_PROPOSAL_ERROR_ENACT_TIME_TOO_SOON
	// ProposalErrorEnactTimeTooLate The specified enact time is too late based on network parameters.
	ProposalErrorEnactTimeTooLate ProposalError = vegapb.ProposalError_PROPOSAL_ERROR_ENACT_TIME_TOO_LATE
	// ProposalErrorInsufficientTokens The proposer for this proposal as insufficient tokens.
	ProposalErrorInsufficientTokens ProposalError = vegapb.ProposalError_PROPOSAL_ERROR_INSUFFICIENT_TOKENS
	// ProposalErrorNoProduct The proposal has no product.
	ProposalErrorNoProduct ProposalError = vegapb.ProposalError_PROPOSAL_ERROR_NO_PRODUCT
	// ProposalErrorUnsupportedProduct The specified product is not supported.
	ProposalErrorUnsupportedProduct ProposalError = vegapb.ProposalError_PROPOSAL_ERROR_UNSUPPORTED_PRODUCT
	// ProposalErrorNodeValidationFailed The proposal failed node validation.
	ProposalErrorNodeValidationFailed ProposalError = vegapb.ProposalError_PROPOSAL_ERROR_NODE_VALIDATION_FAILED
	// ProposalErrorMissingBuiltinAssetField A field is missing in a builtin asset source.
	ProposalErrorMissingBuiltinAssetField ProposalError = vegapb.ProposalError_PROPOSAL_ERROR_MISSING_BUILTIN_ASSET_FIELD
	// ProposalErrorMissingErc20ContractAddress The contract address is missing in the ERC20 asset source.
	ProposalErrorMissingErc20ContractAddress ProposalError = vegapb.ProposalError_PROPOSAL_ERROR_MISSING_ERC20_CONTRACT_ADDRESS
	// ProposalErrorInvalidAsset The asset identifier is invalid or does not exist on the Vega network.
	ProposalErrorInvalidAsset ProposalError = vegapb.ProposalError_PROPOSAL_ERROR_INVALID_ASSET
	// ProposalErrorIncompatibleTimestamps Proposal terms timestamps are not compatible (Validation < Closing < Enactment).
	ProposalErrorIncompatibleTimestamps ProposalError = vegapb.ProposalError_PROPOSAL_ERROR_INCOMPATIBLE_TIMESTAMPS
	// ProposalErrorNoRiskParameters No risk parameters were specified.
	ProposalErrorNoRiskParameters ProposalError = vegapb.ProposalError_PROPOSAL_ERROR_NO_RISK_PARAMETERS
	// ProposalErrorNetworkParameterInvalidKey Invalid key in update network parameter proposal.
	ProposalErrorNetworkParameterInvalidKey ProposalError = vegapb.ProposalError_PROPOSAL_ERROR_NETWORK_PARAMETER_INVALID_KEY
	// ProposalErrorNetworkParameterInvalidValue Invalid valid in update network parameter proposal.
	ProposalErrorNetworkParameterInvalidValue ProposalError = vegapb.ProposalError_PROPOSAL_ERROR_NETWORK_PARAMETER_INVALID_VALUE
	// ProposalErrorNetworkParameterValidationFailed Validation failed for network parameter proposal.
	ProposalErrorNetworkParameterValidationFailed ProposalError = vegapb.ProposalError_PROPOSAL_ERROR_NETWORK_PARAMETER_VALIDATION_FAILED
	// ProposalErrorOpeningAuctionDurationTooSmall Opening auction duration is less than the network minimum opening auction time.
	ProposalErrorOpeningAuctionDurationTooSmall ProposalError = vegapb.ProposalError_PROPOSAL_ERROR_OPENING_AUCTION_DURATION_TOO_SMALL
	// ProposalErrorOpeningAuctionDurationTooLarge Opening auction duration is more than the network minimum opening auction time.
	ProposalErrorOpeningAuctionDurationTooLarge ProposalError = vegapb.ProposalError_PROPOSAL_ERROR_OPENING_AUCTION_DURATION_TOO_LARGE
	// ProposalErrorCouldNotInstantiateMarket Market proposal market could not be instantiated during execution.
	ProposalErrorCouldNotInstantiateMarket ProposalError = vegapb.ProposalError_PROPOSAL_ERROR_COULD_NOT_INSTANTIATE_MARKET
	// ProposalErrorInvalidFutureProduct Market proposal market contained invalid product definition.
	ProposalErrorInvalidFutureProduct ProposalError = vegapb.ProposalError_PROPOSAL_ERROR_INVALID_FUTURE_PRODUCT
	// ProposalErrorInvalidRiskParameter Market proposal invalid risk parameter.
	ProposalErrorInvalidRiskParameter ProposalError = vegapb.ProposalError_PROPOSAL_ERROR_INVALID_RISK_PARAMETER
	// ProposalErrorMajorityThresholdNotReached Proposal was declined because vote didn't reach the majority threshold required.
	ProposalErrorMajorityThresholdNotReached ProposalError = vegapb.ProposalError_PROPOSAL_ERROR_MAJORITY_THRESHOLD_NOT_REACHED
	// ProposalErrorParticipationThresholdNotReached Proposal declined because the participation threshold was not reached.
	ProposalErrorParticipationThresholdNotReached ProposalError = vegapb.ProposalError_PROPOSAL_ERROR_PARTICIPATION_THRESHOLD_NOT_REACHED
	// ProposalErrorInvalidAssetDetails Asset proposal invalid asset details.
	ProposalErrorInvalidAssetDetails ProposalError = vegapb.ProposalError_PROPOSAL_ERROR_INVALID_ASSET_DETAILS
	// ProposalErrorUnknownType Proposal is an unknown type.
	ProposalErrorUnknownType ProposalError = vegapb.ProposalError_PROPOSAL_ERROR_UNKNOWN_TYPE
	// ProposalErrorUnknownRiskParameterType Proposal has an unknown risk parameter type.
	ProposalErrorUnknownRiskParameterType ProposalError = vegapb.ProposalError_PROPOSAL_ERROR_UNKNOWN_RISK_PARAMETER_TYPE
	// ProposalErrorInvalidFreeform Validation failed for freeform proposal.
	ProposalErrorInvalidFreeform ProposalError = vegapb.ProposalError_PROPOSAL_ERROR_INVALID_FREEFORM
	// ProposalErrorInsufficientEquityLikeShare The party doesn't have enough equity-like share to propose an update on the market
	// targeted by the proposal.
	ProposalErrorInsufficientEquityLikeShare ProposalError = vegapb.ProposalError_PROPOSAL_ERROR_INSUFFICIENT_EQUITY_LIKE_SHARE
	// ProposalErrorInvalidMarket The market targeted by the proposal does not exist or is not eligible to modification.
	ProposalErrorInvalidMarket ProposalError = vegapb.ProposalError_PROPOSAL_ERROR_INVALID_MARKET
	// ProposalErrorTooManyMarketDecimalPlaces the market uses more decimal places than the settlement asset.
	ProposalErrorTooManyMarketDecimalPlaces ProposalError = vegapb.ProposalError_PROPOSAL_ERROR_TOO_MANY_MARKET_DECIMAL_PLACES
	// ProposalErrorTooManyPriceMonitoringTriggers the market price monitoring setting uses too many triggers.
	ProposalErrorTooManyPriceMonitoringTriggers ProposalError = vegapb.ProposalError_PROPOSAL_ERROR_TOO_MANY_PRICE_MONITORING_TRIGGERS
	// ProposalErrorERC20AddressAlreadyInUse the proposal uses a erc20 address already used by another asset.
	ProposalErrorERC20AddressAlreadyInUse ProposalError = vegapb.ProposalError_PROPOSAL_ERROR_ERC20_ADDRESS_ALREADY_IN_USE
	// ProposalErrorLpPriceRangeNonpositive LP price range is zero or less.
	ProposalErrorLpPriceRangeNonpositive ProposalError = vegapb.ProposalError_PROPOSAL_ERROR_LP_PRICE_RANGE_NONPOSITIVE
	// ProposalErrorLpPriceRangeTooLarge LP price range above 100.
	ProposalErrorLpPriceRangeTooLarge ProposalError = vegapb.ProposalError_PROPOSAL_ERROR_LP_PRICE_RANGE_TOO_LARGE
)

type ProposalRationale

type ProposalRationale struct {
	Description string
	Title       string
}

func ProposalRationaleFromProto

func ProposalRationaleFromProto(p *vegapb.ProposalRationale) *ProposalRationale

type ProposalState

type ProposalState = vegapb.Proposal_State
const (
	// ProposalStateUnspecified Default value, always invalid.
	ProposalStateUnspecified ProposalState = vegapb.Proposal_STATE_UNSPECIFIED
	// ProposalStateFailed Proposal enactment has failed - even though proposal has passed, its execution could not be performed.
	ProposalStateFailed ProposalState = vegapb.Proposal_STATE_FAILED
	// ProposalStateOpen Proposal is open for voting.
	ProposalStateOpen ProposalState = vegapb.Proposal_STATE_OPEN
	// ProposalStatePassed Proposal has gained enough support to be executed.
	ProposalStatePassed ProposalState = vegapb.Proposal_STATE_PASSED
	// ProposalStateRejected Proposal wasn't accepted (proposal terms failed validation due to wrong configuration or failing to meet network requirements).
	ProposalStateRejected ProposalState = vegapb.Proposal_STATE_REJECTED
	// ProposalStateDeclined Proposal didn't get enough votes (either failing to gain required participation or majority level).
	ProposalStateDeclined ProposalState = vegapb.Proposal_STATE_DECLINED
	// ProposalStateEnacted Proposal enacted.
	ProposalStateEnacted ProposalState = vegapb.Proposal_STATE_ENACTED
	// ProposalStateWaitingForNodeVote Waiting for node validation of the proposal.
	ProposalStateWaitingForNodeVote ProposalState = vegapb.Proposal_STATE_WAITING_FOR_NODE_VOTE
)

type ProposalSubmission

type ProposalSubmission struct {
	// Proposal reference
	Reference string
	// Proposal configuration and the actual change that is meant to be executed when proposal is enacted
	Terms *ProposalTerms
	// Rationale behind the proposal change.
	Rationale *ProposalRationale
}

func NewProposalSubmissionFromProto

func NewProposalSubmissionFromProto(p *commandspb.ProposalSubmission) (*ProposalSubmission, error)

func ProposalSubmissionFromProposal

func ProposalSubmissionFromProposal(p *Proposal) *ProposalSubmission

func (ProposalSubmission) IntoProto

type ProposalTerms

type ProposalTerms struct {
	ClosingTimestamp    int64
	EnactmentTimestamp  int64
	ValidationTimestamp int64
	// *ProposalTermsUpdateMarket
	// *ProposalTermsNewMarket
	// *ProposalTermsUpdateNetworkParameter
	// *ProposalTermsNewAsset
	Change proposalTerm
}

func ProposalTermsFromProto

func ProposalTermsFromProto(p *vegapb.ProposalTerms) (*ProposalTerms, error)

func (ProposalTerms) DeepClone

func (p ProposalTerms) DeepClone() *ProposalTerms

func (*ProposalTerms) GetNewAsset

func (p *ProposalTerms) GetNewAsset() *NewAsset

func (*ProposalTerms) GetNewFreeform

func (p *ProposalTerms) GetNewFreeform() *NewFreeform

func (*ProposalTerms) GetNewMarket

func (p *ProposalTerms) GetNewMarket() *NewMarket

func (*ProposalTerms) GetUpdateAsset

func (p *ProposalTerms) GetUpdateAsset() *UpdateAsset

func (*ProposalTerms) GetUpdateMarket

func (p *ProposalTerms) GetUpdateMarket() *UpdateMarket

func (*ProposalTerms) GetUpdateNetworkParameter

func (p *ProposalTerms) GetUpdateNetworkParameter() *UpdateNetworkParameter

func (ProposalTerms) IntoProto

func (p ProposalTerms) IntoProto() *vegapb.ProposalTerms

func (ProposalTerms) String

func (p ProposalTerms) String() string

type ProposalTermsNewAsset

type ProposalTermsNewAsset struct {
	NewAsset *NewAsset
}

func (ProposalTermsNewAsset) DeepClone

func (a ProposalTermsNewAsset) DeepClone() proposalTerm

func (ProposalTermsNewAsset) GetTermType

func (a ProposalTermsNewAsset) GetTermType() ProposalTermsType

func (ProposalTermsNewAsset) IntoProto

func (ProposalTermsNewAsset) String

func (a ProposalTermsNewAsset) String() string

type ProposalTermsNewFreeform

type ProposalTermsNewFreeform struct {
	NewFreeform *NewFreeform
}

func (ProposalTermsNewFreeform) DeepClone

func (f ProposalTermsNewFreeform) DeepClone() proposalTerm

func (ProposalTermsNewFreeform) GetTermType

func (ProposalTermsNewFreeform) IntoProto

func (ProposalTermsNewFreeform) String

func (f ProposalTermsNewFreeform) String() string

type ProposalTermsNewMarket

type ProposalTermsNewMarket struct {
	NewMarket *NewMarket
}

func (ProposalTermsNewMarket) DeepClone

func (a ProposalTermsNewMarket) DeepClone() proposalTerm

func (ProposalTermsNewMarket) GetTermType

func (a ProposalTermsNewMarket) GetTermType() ProposalTermsType

func (ProposalTermsNewMarket) IntoProto

func (ProposalTermsNewMarket) String

func (a ProposalTermsNewMarket) String() string

type ProposalTermsType

type ProposalTermsType int
const (
	ProposalTermsTypeUpdateMarket ProposalTermsType = iota
	ProposalTermsTypeNewMarket
	ProposalTermsTypeUpdateNetworkParameter
	ProposalTermsTypeNewAsset
	ProposalTermsTypeNewFreeform
	ProposalTermsTypeUpdateAsset
)

type ProposalTermsUpdateAsset

type ProposalTermsUpdateAsset struct {
	UpdateAsset *UpdateAsset
}

func (ProposalTermsUpdateAsset) DeepClone

func (a ProposalTermsUpdateAsset) DeepClone() proposalTerm

func (ProposalTermsUpdateAsset) GetTermType

func (ProposalTermsUpdateAsset) IntoProto

func (ProposalTermsUpdateAsset) String

func (a ProposalTermsUpdateAsset) String() string

type ProposalTermsUpdateMarket

type ProposalTermsUpdateMarket struct {
	UpdateMarket *UpdateMarket
}

func (ProposalTermsUpdateMarket) DeepClone

func (a ProposalTermsUpdateMarket) DeepClone() proposalTerm

func (ProposalTermsUpdateMarket) GetTermType

func (ProposalTermsUpdateMarket) IntoProto

func (ProposalTermsUpdateMarket) String

func (a ProposalTermsUpdateMarket) String() string

type ProposalTermsUpdateNetworkParameter

type ProposalTermsUpdateNetworkParameter struct {
	UpdateNetworkParameter *UpdateNetworkParameter
}

func (ProposalTermsUpdateNetworkParameter) DeepClone

func (a ProposalTermsUpdateNetworkParameter) DeepClone() proposalTerm

func (ProposalTermsUpdateNetworkParameter) GetTermType

func (ProposalTermsUpdateNetworkParameter) IntoProto

func (ProposalTermsUpdateNetworkParameter) String

type PubKey added in v0.61.0

type PubKey struct {
	Key string
}

PubKey.

func (PubKey) DeepClone added in v0.61.0

func (p PubKey) DeepClone() *PubKey

func (PubKey) IntoProto added in v0.61.0

func (p PubKey) IntoProto() *datapb.PubKey

func (PubKey) String added in v0.61.0

func (p PubKey) String() string

type RWithdrawal

type RWithdrawal struct {
	Ref        string
	Withdrawal *Withdrawal
}

func RWithdrawalFromProto

func RWithdrawalFromProto(rw *snapshot.Withdrawal) *RWithdrawal

func (RWithdrawal) IntoProto

func (r RWithdrawal) IntoProto() *snapshot.Withdrawal

type RawChunk

type RawChunk struct {
	Nr     uint32
	Data   []byte
	Height uint64
	Format SnapshotFormat
}

type RecurringTransfer

type RecurringTransfer struct {
	*TransferBase
	StartEpoch       uint64
	EndEpoch         *uint64
	Factor           num.Decimal
	DispatchStrategy *vegapb.DispatchStrategy
}

func RecurringTransferFromEvent

func RecurringTransferFromEvent(p *eventspb.Transfer) *RecurringTransfer

func (*RecurringTransfer) IntoEvent

func (r *RecurringTransfer) IntoEvent(reason *string) *eventspb.Transfer

func (*RecurringTransfer) IsValid

func (r *RecurringTransfer) IsValid() error

type ReleaseInfo

type ReleaseInfo struct {
	VegaReleaseTag     string
	UpgradeBlockHeight uint64
}

type Resource

type Resource struct {
	ID         string
	CheckUntil time.Time
	Votes      []string
}

func ResourceFromProto

func ResourceFromProto(r *snapshot.Resource) *Resource

func (*Resource) IntoProto

func (r *Resource) IntoProto() *snapshot.Resource

type RewardsPartyAmount

type RewardsPartyAmount struct {
	Party  string
	Amount *num.Uint
}

type RewardsPayout

type RewardsPayout struct {
	FromAccount  string
	Asset        string
	PartyAmounts []*RewardsPartyAmount
	TotalReward  *num.Uint
	EpochSeq     string
	Timestamp    int64
}

func RewardsPayoutFromProto

func RewardsPayoutFromProto(p *snapshot.RewardsPayout) *RewardsPayout

func (*RewardsPayout) IntoProto

func (rp *RewardsPayout) IntoProto() *snapshot.RewardsPayout

type RewardsPendingPayouts

type RewardsPendingPayouts struct {
	ScheduledRewardsPayout []*ScheduledRewardsPayout
}

func RewardPendingPayoutsFromProto

func RewardPendingPayoutsFromProto(rpps *snapshot.RewardsPendingPayouts) *RewardsPendingPayouts

func (RewardsPendingPayouts) IntoProto

type RiskFactor

type RiskFactor struct {
	Market string
	Short  num.Decimal
	Long   num.Decimal
}

func (RiskFactor) IntoProto

func (r RiskFactor) IntoProto() *proto.RiskFactor

func (RiskFactor) String

func (r RiskFactor) String() string

type ScalingFactors

type ScalingFactors struct {
	SearchLevel       num.Decimal
	InitialMargin     num.Decimal
	CollateralRelease num.Decimal
}

func ScalingFactorsFromProto

func ScalingFactorsFromProto(p *proto.ScalingFactors) *ScalingFactors

func (ScalingFactors) DeepClone

func (s ScalingFactors) DeepClone() *ScalingFactors

func (ScalingFactors) IntoProto

func (s ScalingFactors) IntoProto() *proto.ScalingFactors

func (*ScalingFactors) Reset

func (s *ScalingFactors) Reset()

func (ScalingFactors) String

func (s ScalingFactors) String() string

type ScheduledRewardsPayout

type ScheduledRewardsPayout struct {
	PayoutTime    int64
	RewardsPayout []*RewardsPayout
}

func (ScheduledRewardsPayout) IntoProto

type ScoreData

type ScoreData struct {
	RawValScores      map[string]num.Decimal
	PerformanceScores map[string]num.Decimal
	MultisigScores    map[string]num.Decimal
	ValScores         map[string]num.Decimal
	NormalisedScores  map[string]num.Decimal
	NodeIDSlice       []string
}

type SettlementState added in v0.63.0

type SettlementState struct {
	MarketID                 string
	LastMarkPrice            *num.Uint
	PartyLastSettledPosition []*PartySettledPosition
	Trades                   []*SettlementTrade
}

func SettlementStateFromProto added in v0.63.0

func SettlementStateFromProto(ss *snapshot.SettlementState) *SettlementState

func (SettlementState) IntoProto added in v0.63.0

func (s SettlementState) IntoProto() *snapshot.SettlementState

type SettlementTrade added in v0.63.0

type SettlementTrade struct {
	Price, MarketPrice *num.Uint
	Size, NewSize      int64
	Party              string
}

func SettlementTradeFromProto added in v0.63.0

func SettlementTradeFromProto(t *snapshot.SettlementTrade) *SettlementTrade

func (SettlementTrade) IntoProto added in v0.63.0

func (s SettlementTrade) IntoProto() *snapshot.SettlementTrade

type Side

type Side = proto.Side
const (
	// Default value, always invalid.
	SideUnspecified Side = proto.Side_SIDE_UNSPECIFIED
	// Buy order.
	SideBuy Side = proto.Side_SIDE_BUY
	// Sell order.
	SideSell Side = proto.Side_SIDE_SELL
)

type Signer added in v0.61.0

type Signer struct {
	Signer dataSourceSpec
}

func CreateSignerFromString added in v0.61.0

func CreateSignerFromString(s string, t DataSignerType) *Signer

func DeserializeSigner added in v0.61.0

func DeserializeSigner(content []byte) *Signer

func NewSigner added in v0.61.0

func NewSigner() *Signer

func SignerAsHex added in v0.61.0

func SignerAsHex(signer *Signer) *Signer

SignerAsHex represents the signer as a hex encoded string. We export this function as a standalone option because there are cases when we are not sure what is the signer type we deal with.

func SignerAsString added in v0.61.0

func SignerAsString(signer *Signer) (*Signer, error)

SignerAsString represents the Signer content as a string.

func SignerFromProto added in v0.61.0

func SignerFromProto(s *datapb.Signer) *Signer

func SignersFromProto added in v0.61.0

func SignersFromProto(s []*datapb.Signer) []*Signer

SignersFromProto returns a list of signers after checking the list length.

func (Signer) DeepClone added in v0.61.0

func (s Signer) DeepClone() *Signer

func (Signer) GetSignerETHAddress added in v0.61.0

func (s Signer) GetSignerETHAddress() *ETHAddress

func (Signer) GetSignerPubKey added in v0.61.0

func (s Signer) GetSignerPubKey() *PubKey

func (Signer) GetSignerType added in v0.61.0

func (s Signer) GetSignerType() DataSignerType

func (Signer) IntoProto added in v0.61.0

func (s Signer) IntoProto() *datapb.Signer

func (Signer) IsEmpty added in v0.61.0

func (s Signer) IsEmpty() bool

func (*Signer) Serialize added in v0.61.0

func (s *Signer) Serialize() ([]byte, error)

SerializeSigner deserializes the signer to a byte slice - we use that type top insert it into the database. The deserialization prepends the slice with two bytes as signer type indicator - that is used when the Signer is serialized back.

func (Signer) String added in v0.61.0

func (s Signer) String() string

type SignerETHAddress added in v0.61.0

type SignerETHAddress struct {
	ETHAddress *ETHAddress
}

func DeserializeETHAddress added in v0.61.0

func DeserializeETHAddress(data []byte) SignerETHAddress

func ETHAddressFromProto added in v0.61.0

func ETHAddressFromProto(s *datapb.Signer_EthAddress) *SignerETHAddress

func (SignerETHAddress) AsHex added in v0.61.0

func (s SignerETHAddress) AsHex(prepend bool) dataSourceSpec

func (SignerETHAddress) AsString added in v0.61.0

func (s SignerETHAddress) AsString() (dataSourceSpec, error)

func (SignerETHAddress) DeepClone added in v0.61.0

func (s SignerETHAddress) DeepClone() dataSourceSpec

func (SignerETHAddress) GetSignerType added in v0.61.0

func (s SignerETHAddress) GetSignerType() DataSignerType

func (SignerETHAddress) IntoProto added in v0.61.0

func (s SignerETHAddress) IntoProto() *datapb.Signer_EthAddress

func (SignerETHAddress) IsEmpty added in v0.61.0

func (s SignerETHAddress) IsEmpty() bool

func (SignerETHAddress) Serialize added in v0.61.0

func (s SignerETHAddress) Serialize() []byte

func (SignerETHAddress) String added in v0.61.0

func (s SignerETHAddress) String() string

type SignerEvent

type SignerEvent struct {
	BlockNumber, LogIndex uint64
	TxHash                string

	ID        string
	Address   string
	Nonce     string
	BlockTime int64

	Kind SignerEventKind
}

func SignerEventFromEventProto

func SignerEventFromEventProto(
	event *eventspb.ERC20MultiSigSignerEvent,
) *SignerEvent

func SignerEventFromSignerAddedProto

func SignerEventFromSignerAddedProto(
	s *vgproto.ERC20SignerAdded,
	blockNumber, logIndex uint64,
	txhash, id string,
) (*SignerEvent, error)

func SignerEventFromSignerRemovedProto

func SignerEventFromSignerRemovedProto(
	s *vgproto.ERC20SignerRemoved,
	blockNumber, logIndex uint64,
	txhash, id string,
) (*SignerEvent, error)

func (SignerEvent) Hash

func (s SignerEvent) Hash() string

func (*SignerEvent) IntoProto

func (*SignerEvent) String

func (s *SignerEvent) String() string

type SignerPubKey added in v0.61.0

type SignerPubKey struct {
	PubKey *PubKey
}

func DeserializePubKey added in v0.61.0

func DeserializePubKey(data []byte) SignerPubKey

func PubKeyFromProto added in v0.61.0

func PubKeyFromProto(s *datapb.Signer_PubKey) *SignerPubKey

func (SignerPubKey) AsHex added in v0.61.0

func (s SignerPubKey) AsHex(prepend bool) dataSourceSpec

func (SignerPubKey) AsString added in v0.61.0

func (s SignerPubKey) AsString() (dataSourceSpec, error)

func (SignerPubKey) DeepClone added in v0.61.0

func (s SignerPubKey) DeepClone() dataSourceSpec

func (SignerPubKey) GetSignerType added in v0.61.0

func (s SignerPubKey) GetSignerType() DataSignerType

func (SignerPubKey) IntoProto added in v0.61.0

func (s SignerPubKey) IntoProto() *datapb.Signer_PubKey

func (SignerPubKey) IsEmpty added in v0.61.0

func (s SignerPubKey) IsEmpty() bool

func (SignerPubKey) Serialize added in v0.61.0

func (s SignerPubKey) Serialize() []byte

func (SignerPubKey) String added in v0.61.0

func (s SignerPubKey) String() string

type SignerThresholdSetEvent

type SignerThresholdSetEvent struct {
	BlockNumber, LogIndex uint64
	TxHash                string

	ID        string
	Threshold uint32
	Nonce     string
	BlockTime int64
}

func SignerThresholdSetEventFromProto

func SignerThresholdSetEventFromProto(
	s *vgproto.ERC20ThresholdSet,
	blockNumber, logIndex uint64,
	txhash, id string,
) (*SignerThresholdSetEvent, error)

func (SignerThresholdSetEvent) Hash

func (*SignerThresholdSetEvent) IntoProto

func (*SignerThresholdSetEvent) String

func (s *SignerThresholdSetEvent) String() string

type SimpleModelParams

type SimpleModelParams struct {
	FactorLong           num.Decimal
	FactorShort          num.Decimal
	MaxMoveUp            num.Decimal
	MinMoveDown          num.Decimal
	ProbabilityOfTrading num.Decimal
}

func SimpleModelParamsFromProto

func SimpleModelParamsFromProto(p *proto.SimpleModelParams) *SimpleModelParams

func (SimpleModelParams) DeepClone

func (s SimpleModelParams) DeepClone() *SimpleModelParams

func (SimpleModelParams) IntoProto

func (s SimpleModelParams) IntoProto() *proto.SimpleModelParams

func (SimpleModelParams) String

func (s SimpleModelParams) String() string

type SimpleRiskModel

type SimpleRiskModel struct {
	Params *SimpleModelParams
}

func (SimpleRiskModel) IntoProto

func (s SimpleRiskModel) IntoProto() *proto.SimpleRiskModel

func (SimpleRiskModel) String

func (s SimpleRiskModel) String() string

type SimpleSpamPolicy

type SimpleSpamPolicy struct {
	PolicyName      string
	PartyToCount    []*PartyCount
	BannedParty     []*BannedParty
	CurrentEpochSeq uint64
}

func SimpleSpamPolicyFromProto

func SimpleSpamPolicyFromProto(ssp *snapshot.SimpleSpamPolicy) *SimpleSpamPolicy

func (*SimpleSpamPolicy) IntoProto

func (ssp *SimpleSpamPolicy) IntoProto() *snapshot.SimpleSpamPolicy

type Snapshot

type Snapshot struct {
	Format SnapshotFormat
	Height uint64    // the block-height of the snapshot
	Hash   []byte    // the hash of the snapshot (the root hash of the AVL tree)
	Meta   *Metadata // the AVL tree metadata
	// Metadata []byte     // the above metadata serialised
	Nodes []*Payload // the snapshot payloads in the tree (always leaf nodes)

	// Chunk stuff
	Chunks     uint32
	DataChunks []*Chunk
	ByteChunks [][]byte
	ChunksSeen uint32
	// contains filtered or unexported fields
}

func SnapshotFromTM

func SnapshotFromTM(tms *tmtypes.Snapshot) (*Snapshot, error)

func SnapshotFromTree

func SnapshotFromTree(tree *iavl.ImmutableTree) (*Snapshot, error)

SnapshotFromTree traverses the given avl tree and represents it as a Snapshot.

func (Snapshot) GetMissing

func (s Snapshot) GetMissing() []uint32

func (Snapshot) GetRawChunk

func (s Snapshot) GetRawChunk(idx uint32) (*RawChunk, error)

func (*Snapshot) LoadChunk

func (s *Snapshot) LoadChunk(chunk *RawChunk) error

func (Snapshot) Ready

func (s Snapshot) Ready() bool

func (Snapshot) ToTM

func (s Snapshot) ToTM() (*tmtypes.Snapshot, error)

func (*Snapshot) TreeFromSnapshot

func (s *Snapshot) TreeFromSnapshot(tree *iavl.MutableTree) error

TreeFromSnapshot takes the given snapshot data and creates a avl tree from it.

func (*Snapshot) ValidateMeta

func (s *Snapshot) ValidateMeta(other *Snapshot) error

type SnapshotFormat

type SnapshotFormat = snapshot.Format

func SnapshotFormatFromU32 added in v0.66.0

func SnapshotFormatFromU32(f uint32) (SnapshotFormat, error)

type SnapshotNamespace

type SnapshotNamespace string
const (
	AppSnapshot                    SnapshotNamespace = "app"
	AssetsSnapshot                 SnapshotNamespace = "assets"
	WitnessSnapshot                SnapshotNamespace = "witness" // Must be done before any engine that call RestoreResource
	BankingSnapshot                SnapshotNamespace = "banking"
	CheckpointSnapshot             SnapshotNamespace = "checkpoint"
	CollateralSnapshot             SnapshotNamespace = "collateral"
	NetParamsSnapshot              SnapshotNamespace = "netparams"
	DelegationSnapshot             SnapshotNamespace = "delegation"
	GovernanceSnapshot             SnapshotNamespace = "governance"
	PositionsSnapshot              SnapshotNamespace = "positions"
	MatchingSnapshot               SnapshotNamespace = "matching"
	ExecutionSnapshot              SnapshotNamespace = "execution"
	EpochSnapshot                  SnapshotNamespace = "epoch"
	StakingSnapshot                SnapshotNamespace = "staking"
	IDGenSnapshot                  SnapshotNamespace = "idgenerator"
	RewardSnapshot                 SnapshotNamespace = "rewards"
	SpamSnapshot                   SnapshotNamespace = "spam"
	LimitSnapshot                  SnapshotNamespace = "limits"
	NotarySnapshot                 SnapshotNamespace = "notary"
	StakeVerifierSnapshot          SnapshotNamespace = "stakeverifier"
	EventForwarderSnapshot         SnapshotNamespace = "eventforwarder"
	TopologySnapshot               SnapshotNamespace = "topology"
	LiquiditySnapshot              SnapshotNamespace = "liquidity"
	LiquidityTargetSnapshot        SnapshotNamespace = "liquiditytarget"
	FloatingPointConsensusSnapshot SnapshotNamespace = "floatingpoint"
	MarketActivityTrackerSnapshot  SnapshotNamespace = "marketActivityTracker"
	ERC20MultiSigTopologySnapshot  SnapshotNamespace = "erc20multisigtopology"
	PoWSnapshot                    SnapshotNamespace = "pow"
	ProtocolUpgradeSnapshot        SnapshotNamespace = "protocolUpgradeProposals"
	SettlementSnapshot             SnapshotNamespace = "settlement"

	MaxChunkSize   = 16 * 1000 * 1000 // technically 16 * 1024 * 1024, but you know
	IdealChunkSize = 10 * 1000 * 1000 // aim for 10MB
)

func (SnapshotNamespace) String

func (n SnapshotNamespace) String() string

type StakeDeposited

type StakeDeposited struct {
	BlockNumber, LogIndex uint64
	TxID                  string // hash

	ID              string
	VegaPubKey      string
	EthereumAddress string
	Amount          *num.Uint
	BlockTime       int64
}

func StakeDepositedFromProto

func StakeDepositedFromProto(
	s *vgproto.StakeDeposited,
	blockNumber, logIndex uint64,
	txID, id string,
) (*StakeDeposited, error)

func (*StakeDeposited) IntoStakeLinking

func (s *StakeDeposited) IntoStakeLinking() *StakeLinking

func (StakeDeposited) String

func (s StakeDeposited) String() string

type StakeLinking

type StakeLinking struct {
	ID              string
	Type            StakeLinkingType
	TS              int64
	Party           string
	Amount          *num.Uint
	Status          StakeLinkingStatus
	FinalizedAt     int64
	TxHash          string
	BlockHeight     uint64
	BlockTime       int64
	LogIndex        uint64
	EthereumAddress string
}

func StakeLinkingFromProto

func StakeLinkingFromProto(sl *eventspb.StakeLinking) *StakeLinking

func (StakeLinking) Hash

func (s StakeLinking) Hash() string

func (*StakeLinking) IntoProto

func (s *StakeLinking) IntoProto() *eventspb.StakeLinking

func (*StakeLinking) String

func (s *StakeLinking) String() string

type StakeLinkingStatus

type StakeLinkingStatus = eventspb.StakeLinking_Status

type StakeLinkingType

type StakeLinkingType = eventspb.StakeLinking_Type

type StakeRemoved

type StakeRemoved struct {
	BlockNumber, LogIndex uint64
	TxID                  string // hash

	ID              string
	VegaPubKey      string
	EthereumAddress string
	Amount          *num.Uint
	BlockTime       int64
}

func StakeRemovedFromProto

func StakeRemovedFromProto(
	s *vgproto.StakeRemoved,
	blockNumber, logIndex uint64,
	txID, id string,
) (*StakeRemoved, error)

func (*StakeRemoved) IntoStakeLinking

func (s *StakeRemoved) IntoStakeLinking() *StakeLinking

func (StakeRemoved) String

func (s StakeRemoved) String() string

type StakeScoreParams

type StakeScoreParams struct {
	MinVal                 num.Decimal
	CompLevel              num.Decimal
	OptimalStakeMultiplier num.Decimal
}

type StakeTotalSupply

type StakeTotalSupply struct {
	TokenAddress string
	TotalSupply  *num.Uint
}

func StakeTotalSupplyFromProto

func StakeTotalSupplyFromProto(s *vgproto.StakeTotalSupply) (*StakeTotalSupply, error)

func (*StakeTotalSupply) IntoProto

func (s *StakeTotalSupply) IntoProto() *vgproto.StakeTotalSupply

func (*StakeTotalSupply) String

func (s *StakeTotalSupply) String() string

type StakingAccount

type StakingAccount struct {
	Party   string
	Balance *num.Uint
	Events  []*StakeLinking
}

func StakingAccountFromProto

func StakingAccountFromProto(sa *snapshot.StakingAccount) *StakingAccount

func (StakingAccount) IntoProto

func (s StakingAccount) IntoProto() *snapshot.StakingAccount

type StakingAccounts

type StakingAccounts struct {
	Accounts                []*StakingAccount
	StakingAssetTotalSupply *num.Uint
}

func StakingAccountsFromProto

func StakingAccountsFromProto(sa *snapshot.StakingAccounts) *StakingAccounts

func (StakingAccounts) IntoProto

func (s StakingAccounts) IntoProto() *snapshot.StakingAccounts

type StateProvider

type StateProvider interface {
	Namespace() SnapshotNamespace
	Keys() []string
	// NB: GetState must be threadsafe as it may be called from multiple goroutines concurrently!
	GetState(key string) ([]byte, []StateProvider, error)
	LoadState(ctx context.Context, pl *Payload) ([]StateProvider, error)
	Stopped() bool
}

StateProvider - not a huge fan of this interface being here, but it ensures that the state providers don't have to import the snapshot package

type Stringer

type Stringer interface {
	String() string
}

type Tags

type Tags []string

func (Tags) String

func (t Tags) String() string

type TargetStakeParameters

type TargetStakeParameters struct {
	TimeWindow    int64
	ScalingFactor num.Decimal
}

func (TargetStakeParameters) DeepClone

func (TargetStakeParameters) IntoProto

func (TargetStakeParameters) String

func (t TargetStakeParameters) String() string

type Topology

type Topology struct {
	ValidatorData                  []*snapshot.ValidatorState
	ChainValidators                []string
	PendingPubKeyRotations         []*snapshot.PendingKeyRotation
	PendingEthereumKeyRotations    []*snapshot.PendingEthereumKeyRotation
	UnresolvedEthereumKeyRotations []*snapshot.PendingEthereumKeyRotation
	Signatures                     *snapshot.ToplogySignatures
	ValidatorPerformance           *snapshot.ValidatorPerformance
}

type TradableInstrument

type TradableInstrument struct {
	Instrument       *Instrument
	MarginCalculator *MarginCalculator
	RiskModel        isTRM
	// contains filtered or unexported fields
}

func TradableInstrumentFromProto

func TradableInstrumentFromProto(ti *proto.TradableInstrument) *TradableInstrument

func (TradableInstrument) DeepClone

func (t TradableInstrument) DeepClone() *TradableInstrument

func (TradableInstrument) GetLogNormalRiskModel

func (t TradableInstrument) GetLogNormalRiskModel() *LogNormalRiskModel

func (TradableInstrument) GetSimpleRiskModel

func (t TradableInstrument) GetSimpleRiskModel() *SimpleRiskModel

func (TradableInstrument) IntoProto

func (TradableInstrument) String

func (t TradableInstrument) String() string

type TradableInstrumentLogNormalRiskModel

type TradableInstrumentLogNormalRiskModel struct {
	LogNormalRiskModel *LogNormalRiskModel
}

func (TradableInstrumentLogNormalRiskModel) Equal added in v0.55.0

func (t TradableInstrumentLogNormalRiskModel) Equal(trm isTRM) bool

func (TradableInstrumentLogNormalRiskModel) IntoProto

func (TradableInstrumentLogNormalRiskModel) String

type TradableInstrumentSimpleRiskModel

type TradableInstrumentSimpleRiskModel struct {
	SimpleRiskModel *SimpleRiskModel
}

func (TradableInstrumentSimpleRiskModel) Equal added in v0.55.0

func (t TradableInstrumentSimpleRiskModel) Equal(trm isTRM) bool

Equal returns true if the risk models match.

func (TradableInstrumentSimpleRiskModel) IntoProto

func (TradableInstrumentSimpleRiskModel) String

type Trade

type Trade struct {
	ID                 string
	MarketID           string
	Price              *num.Uint
	MarketPrice        *num.Uint
	Size               uint64
	Buyer              string
	Seller             string
	Aggressor          Side
	BuyOrder           string
	SellOrder          string
	Timestamp          int64
	Type               TradeType
	BuyerFee           *Fee
	SellerFee          *Fee
	BuyerAuctionBatch  uint64
	SellerAuctionBatch uint64
}

func (*Trade) IntoProto

func (t *Trade) IntoProto() *proto.Trade

func (*Trade) SetIDs

func (t *Trade) SetIDs(tradeID string, aggressive, passive *Order)

func (Trade) String

func (t Trade) String() string

type TradeType

type TradeType = proto.Trade_Type
const (
	// Default value, always invalid.
	TradeTypeUnspecified TradeType = proto.Trade_TYPE_UNSPECIFIED
	// Normal trading between two parties.
	TradeTypeDefault TradeType = proto.Trade_TYPE_DEFAULT
	// Trading initiated by the network with another party on the book,
	// which helps to zero-out the positions of one or more distressed parties.
	TradeTypeNetworkCloseOutGood TradeType = proto.Trade_TYPE_NETWORK_CLOSE_OUT_GOOD
	// Trading initiated by the network with another party off the book,
	// with a distressed party in order to zero-out the position of the party.
	TradeTypeNetworkCloseOutBad TradeType = proto.Trade_TYPE_NETWORK_CLOSE_OUT_BAD
)

type Trades

type Trades []*Trade

func (Trades) IntoProto

func (t Trades) IntoProto() []*proto.Trade

type Transfer

type Transfer struct {
	Owner     string
	Amount    *FinancialAmount
	Type      TransferType
	MinAmount *num.Uint
	Market    string
}

func TransferFromProto

func TransferFromProto(p *proto.Transfer) (*Transfer, error)

func (*Transfer) Clone

func (t *Transfer) Clone() *Transfer

func (*Transfer) IntoProto

func (t *Transfer) IntoProto() *proto.Transfer

func (*Transfer) Merge

func (t *Transfer) Merge(oth *Transfer) *Transfer

Merge creates a new Transfer.

func (*Transfer) String

func (t *Transfer) String() string

type TransferBase

type TransferBase struct {
	ID              string
	From            string
	FromAccountType AccountType
	To              string
	ToAccountType   AccountType
	Asset           string
	Amount          *num.Uint
	Reference       string
	Status          TransferStatus
	Timestamp       time.Time
}

func (*TransferBase) IsValid

func (t *TransferBase) IsValid() error

type TransferCommandKind

type TransferCommandKind int
const (
	TransferCommandKindOneOff TransferCommandKind = iota
	TransferCommandKindRecurring
)

type TransferFunds

type TransferFunds struct {
	Kind      TransferCommandKind
	OneOff    *OneOffTransfer
	Recurring *RecurringTransfer
}

Just a wrapper, use the Kind on a switch to access the proper value.

func NewTransferFromProto

func NewTransferFromProto(id, from string, tf *commandspb.Transfer) (*TransferFunds, error)

func (*TransferFunds) IntoEvent

func (t *TransferFunds) IntoEvent(reason *string) *eventspb.Transfer

type TransferRequest

type TransferRequest struct {
	FromAccount []*Account
	ToAccount   []*Account
	Amount      *num.Uint
	MinAmount   *num.Uint
	Asset       string
	// Reference   string
	Type TransferType
}

func (*TransferRequest) IntoProto

func (t *TransferRequest) IntoProto() *proto.TransferRequest

type TransferStatus

type TransferStatus = eventspb.Transfer_Status
const (
	// Default value.
	TransferStatsUnspecified TransferStatus = eventspb.Transfer_STATUS_UNSPECIFIED
	// A pending transfer.
	TransferStatusPending TransferStatus = eventspb.Transfer_STATUS_PENDING
	// A finished transfer.
	TransferStatusDone TransferStatus = eventspb.Transfer_STATUS_DONE
	// A rejected transfer.
	TransferStatusRejected TransferStatus = eventspb.Transfer_STATUS_REJECTED
	// A stopped transfer.
	TransferStatusStopped TransferStatus = eventspb.Transfer_STATUS_STOPPED
	// A cancelled transfer.
	TransferStatusCancelled TransferStatus = eventspb.Transfer_STATUS_CANCELLED
)

type TransferType

type TransferType = proto.TransferType
const (
	// Default value, always invalid.
	TransferTypeUnspecified TransferType = proto.TransferType_TRANSFER_TYPE_UNSPECIFIED
	// Loss.
	TransferTypeLoss TransferType = proto.TransferType_TRANSFER_TYPE_LOSS
	// Win.
	TransferTypeWin TransferType = proto.TransferType_TRANSFER_TYPE_WIN
	// Mark to market loss.
	TransferTypeMTMLoss TransferType = proto.TransferType_TRANSFER_TYPE_MTM_LOSS
	// Mark to market win.
	TransferTypeMTMWin TransferType = proto.TransferType_TRANSFER_TYPE_MTM_WIN
	// Margin too low.
	TransferTypeMarginLow TransferType = proto.TransferType_TRANSFER_TYPE_MARGIN_LOW
	// Margin too high.
	TransferTypeMarginHigh TransferType = proto.TransferType_TRANSFER_TYPE_MARGIN_HIGH
	// Margin was confiscated.
	TransferTypeMarginConfiscated TransferType = proto.TransferType_TRANSFER_TYPE_MARGIN_CONFISCATED
	// Pay maker fee.
	TransferTypeMakerFeePay TransferType = proto.TransferType_TRANSFER_TYPE_MAKER_FEE_PAY
	// Receive maker fee.
	TransferTypeMakerFeeReceive TransferType = proto.TransferType_TRANSFER_TYPE_MAKER_FEE_RECEIVE
	// Pay infrastructure fee.
	TransferTypeInfrastructureFeePay TransferType = proto.TransferType_TRANSFER_TYPE_INFRASTRUCTURE_FEE_PAY
	// Receive infrastructure fee.
	TransferTypeInfrastructureFeeDistribute TransferType = proto.TransferType_TRANSFER_TYPE_INFRASTRUCTURE_FEE_DISTRIBUTE
	// Pay liquidity fee.
	TransferTypeLiquidityFeePay TransferType = proto.TransferType_TRANSFER_TYPE_LIQUIDITY_FEE_PAY
	// Receive liquidity fee.
	TransferTypeLiquidityFeeDistribute TransferType = proto.TransferType_TRANSFER_TYPE_LIQUIDITY_FEE_DISTRIBUTE
	// Bond too low.
	TransferTypeBondLow TransferType = proto.TransferType_TRANSFER_TYPE_BOND_LOW
	// Bond too high.
	TransferTypeBondHigh TransferType = proto.TransferType_TRANSFER_TYPE_BOND_HIGH
	// Actual withdraw from system.
	TransferTypeWithdraw TransferType = proto.TransferType_TRANSFER_TYPE_WITHDRAW
	// Deposit funds.
	TransferTypeDeposit TransferType = proto.TransferType_TRANSFER_TYPE_DEPOSIT
	// Bond slashing.
	TransferTypeBondSlashing TransferType = proto.TransferType_TRANSFER_TYPE_BOND_SLASHING
	// Reward payout.
	TransferTypeRewardPayout             TransferType = proto.TransferType_TRANSFER_TYPE_REWARD_PAYOUT
	TransferTypeTransferFundsSend        TransferType = proto.TransferType_TRANSFER_TYPE_TRANSFER_FUNDS_SEND
	TransferTypeTransferFundsDistribute  TransferType = proto.TransferType_TRANSFER_TYPE_TRANSFER_FUNDS_DISTRIBUTE
	TransferTypeClearAccount             TransferType = proto.TransferType_TRANSFER_TYPE_CLEAR_ACCOUNT
	TransferTypeCheckpointBalanceRestore TransferType = proto.TransferType_TRANSFER_TYPE_CHECKPOINT_BALANCE_RESTORE
)

type Undelegate

type Undelegate struct {
	NodeID string
	Amount *num.Uint
	Method string
}

func (Undelegate) IntoProto

func (Undelegate) String

func (u Undelegate) String() string

type UpdateAsset

type UpdateAsset struct {
	AssetID string
	Changes *AssetDetailsUpdate
}

func (UpdateAsset) DeepClone

func (a UpdateAsset) DeepClone() *UpdateAsset

func (*UpdateAsset) GetChanges

func (a *UpdateAsset) GetChanges() *AssetDetailsUpdate

func (UpdateAsset) IntoProto

func (a UpdateAsset) IntoProto() *vegapb.UpdateAsset

func (UpdateAsset) String

func (a UpdateAsset) String() string

func (UpdateAsset) Validate

func (a UpdateAsset) Validate() (ProposalError, error)

type UpdateFutureProduct

type UpdateFutureProduct struct {
	QuoteName                           string
	DataSourceSpecForSettlementData     DataSourceDefinition
	DataSourceSpecForTradingTermination DataSourceDefinition
	DataSourceSpecBinding               *DataSourceSpecBindingForFuture
}

func (UpdateFutureProduct) DeepClone

func (UpdateFutureProduct) IntoProto

func (UpdateFutureProduct) String

func (f UpdateFutureProduct) String() string

type UpdateInstrumentConfiguration

type UpdateInstrumentConfiguration struct {
	Code string
	// *UpdateInstrumentConfigurationFuture
	Product updateInstrumentConfigurationProduct
}

func (UpdateInstrumentConfiguration) DeepClone

func (UpdateInstrumentConfiguration) IntoProto

func (UpdateInstrumentConfiguration) String

type UpdateInstrumentConfigurationFuture

type UpdateInstrumentConfigurationFuture struct {
	Future *UpdateFutureProduct
}

func (UpdateInstrumentConfigurationFuture) DeepClone

func (i UpdateInstrumentConfigurationFuture) DeepClone() updateInstrumentConfigurationProduct

func (UpdateInstrumentConfigurationFuture) IntoProto

func (UpdateInstrumentConfigurationFuture) String

type UpdateMarket

type UpdateMarket struct {
	MarketID string
	Changes  *UpdateMarketConfiguration
}

func (UpdateMarket) DeepClone

func (n UpdateMarket) DeepClone() *UpdateMarket

func (UpdateMarket) IntoProto

func (n UpdateMarket) IntoProto() *vegapb.UpdateMarket

func (UpdateMarket) String

func (n UpdateMarket) String() string

type UpdateMarketConfiguration

type UpdateMarketConfiguration struct {
	Instrument                    *UpdateInstrumentConfiguration
	Metadata                      []string
	PriceMonitoringParameters     *PriceMonitoringParameters
	LiquidityMonitoringParameters *LiquidityMonitoringParameters
	RiskParameters                updateRiskParams
	LpPriceRange                  num.Decimal
}

func (UpdateMarketConfiguration) DeepClone

func (UpdateMarketConfiguration) IntoProto

func (UpdateMarketConfiguration) String

func (n UpdateMarketConfiguration) String() string

type UpdateMarketConfigurationLogNormal

type UpdateMarketConfigurationLogNormal struct {
	LogNormal *LogNormalRiskModel
}

func (UpdateMarketConfigurationLogNormal) DeepClone

func (n UpdateMarketConfigurationLogNormal) DeepClone() updateRiskParams

func (UpdateMarketConfigurationLogNormal) IntoProto

func (UpdateMarketConfigurationLogNormal) String

type UpdateMarketConfigurationSimple

type UpdateMarketConfigurationSimple struct {
	Simple *SimpleModelParams
}

func (UpdateMarketConfigurationSimple) DeepClone

func (n UpdateMarketConfigurationSimple) DeepClone() updateRiskParams

func (UpdateMarketConfigurationSimple) IntoProto

func (UpdateMarketConfigurationSimple) String

type UpdateNetworkParameter

type UpdateNetworkParameter struct {
	Changes *NetworkParameter
}

func (UpdateNetworkParameter) DeepClone

func (UpdateNetworkParameter) IntoProto

func (UpdateNetworkParameter) String

func (n UpdateNetworkParameter) String() string

type UpgradeStatus

type UpgradeStatus struct {
	AcceptedReleaseInfo *ReleaseInfo
	ReadyToUpgrade      bool
}

type ValidatorData

type ValidatorData struct {
	NodeID            string
	PubKey            string
	StakeByDelegators *num.Uint
	SelfStake         *num.Uint
	Delegators        map[string]*num.Uint
	TmPubKey          string
}

ValidatorData is delegation data for validator.

type ValidatorVotingPower

type ValidatorVotingPower struct {
	TmPubKey    string
	VotingPower int64
}

ValidatorVotingPower is the scaled voting power for the given tm key.

type Vote

type Vote struct {
	// PartyID is the party that casted the vote.
	PartyID string
	// ProposalID is the proposal identifier concerned by the vote.
	ProposalID string
	// Value is the actual position of the vote: yes or no.
	Value VoteValue
	// Timestamp is the date and time (in nanoseconds) at which the vote has
	// been casted.
	Timestamp int64
	// TotalGovernanceTokenBalance is the total number of tokens hold by the
	// party that casted the vote.
	TotalGovernanceTokenBalance *num.Uint
	// TotalGovernanceTokenWeight is the weight of the vote compared to the
	// total number of governance token.
	TotalGovernanceTokenWeight num.Decimal
	// TotalEquityLikeShareWeight is the weight of the vote compared to the
	// total number of equity-like share on the market.
	TotalEquityLikeShareWeight num.Decimal
}

Vote represents a governance vote casted by a party for a given proposal.

func VoteFromProto

func VoteFromProto(v *vegapb.Vote) (*Vote, error)

func (Vote) IntoProto

func (v Vote) IntoProto() *vegapb.Vote

type VoteSpamPolicy

type VoteSpamPolicy struct {
	PartyProposalVoteCount  []*PartyProposalVoteCount
	BannedParty             []*BannedParty
	RecentBlocksRejectStats []*BlockRejectStats
	CurrentBlockIndex       uint64
	LastIncreaseBlock       uint64
	CurrentEpochSeq         uint64
	MinVotingTokensFactor   *num.Uint
}

func VoteSpamPolicyFromProto

func VoteSpamPolicyFromProto(vsp *snapshot.VoteSpamPolicy) *VoteSpamPolicy

func (*VoteSpamPolicy) IntoProto

func (vsp *VoteSpamPolicy) IntoProto() *snapshot.VoteSpamPolicy

type VoteSubmission

type VoteSubmission struct {
	// The ID of the proposal to vote for.
	ProposalID string
	// The actual value of the vote
	Value VoteValue
}

func NewVoteSubmissionFromProto

func NewVoteSubmissionFromProto(p *commandspb.VoteSubmission) *VoteSubmission

func (VoteSubmission) IntoProto

func (v VoteSubmission) IntoProto() *commandspb.VoteSubmission

func (VoteSubmission) String

func (v VoteSubmission) String() string

type VoteValue

type VoteValue = vegapb.Vote_Value
const (
	// VoteValueUnspecified Default value, always invalid.
	VoteValueUnspecified VoteValue = vegapb.Vote_VALUE_UNSPECIFIED
	// VoteValueNo represents a vote against the proposal.
	VoteValueNo VoteValue = vegapb.Vote_VALUE_NO
	// VoteValueYes represents a vote in favour of the proposal.
	VoteValueYes VoteValue = vegapb.Vote_VALUE_YES
)

type WithdrawExt

type WithdrawExt struct {
	Ext isWithdrawExtExt
}

func WithdrawExtFromProto

func WithdrawExtFromProto(extProto *vegapb.WithdrawExt) *WithdrawExt

func (*WithdrawExt) GetErc20

func (x *WithdrawExt) GetErc20() *WithdrawExtErc20

func (*WithdrawExt) IntoProto

func (x *WithdrawExt) IntoProto() *vegapb.WithdrawExt

func (*WithdrawExt) String

func (x *WithdrawExt) String() string

type WithdrawExtErc20

type WithdrawExtErc20 struct {
	Erc20 *Erc20WithdrawExt
}

func WithdrawExtErc20FromProto

func WithdrawExtErc20FromProto(erc20 *vegapb.WithdrawExt_Erc20) *WithdrawExtErc20

func (*WithdrawExtErc20) GetReceiverAddress

func (x *WithdrawExtErc20) GetReceiverAddress() string

func (*WithdrawExtErc20) IntoProto

func (x *WithdrawExtErc20) IntoProto() *vegapb.WithdrawExt_Erc20

func (*WithdrawExtErc20) String

func (x *WithdrawExtErc20) String() string

type WithdrawSubmission

type WithdrawSubmission struct {
	// The amount to be withdrawn
	Amount *num.Uint
	// The asset we want to withdraw
	Asset string
	// Foreign chain specifics
	Ext *WithdrawExt
}

func NewWithdrawSubmissionFromProto

func NewWithdrawSubmissionFromProto(p *commandspb.WithdrawSubmission) (*WithdrawSubmission, error)

func (WithdrawSubmission) IntoProto

func (WithdrawSubmission) String

func (w WithdrawSubmission) String() string

type Withdrawal

type Withdrawal struct {
	// ID Unique identifier for the withdrawal
	ID string
	// PartyID Unique party identifier of the user initiating the withdrawal
	PartyID string
	// Amount The amount to be withdrawn
	Amount *num.Uint
	// Asset The asset we want to withdraw funds from
	Asset string
	// Status The status of the withdrawal
	Status WithdrawalStatus
	// Ref The reference which is used by the foreign chain
	// to refer to this withdrawal
	Ref string
	// TxHash The hash of the foreign chain for this transaction
	TxHash string
	// CreationDate Timestamp for when the network started to process this withdrawal
	CreationDate int64
	// WithdrawalDate Timestamp for when the withdrawal was finalised by the network
	WithdrawalDate int64
	// Ext Foreign chain specifics
	Ext *WithdrawExt
}

func WithdrawalFromProto

func WithdrawalFromProto(w *vegapb.Withdrawal) *Withdrawal

func (*Withdrawal) IntoProto

func (w *Withdrawal) IntoProto() *vegapb.Withdrawal

type WithdrawalStatus

type WithdrawalStatus = vegapb.Withdrawal_Status
const (
	// WithdrawalStatusUnspecified Default value, always invalid.
	WithdrawalStatusUnspecified WithdrawalStatus = 0
	// WithdrawalStatusOpen The withdrawal is open and being processed by the network.
	WithdrawalStatusOpen WithdrawalStatus = 1
	// WithdrawalStatusRejected The withdrawal have been rejected.
	WithdrawalStatusRejected WithdrawalStatus = 2
	// WithdrawalStatusFinalized The withdrawal went through and is fully finalised, the funds are removed from the
	// Vega network and are unlocked on the foreign chain bridge, for example, on the Ethereum network.
	WithdrawalStatusFinalized WithdrawalStatus = 3
)

type Witness

type Witness struct {
	Resources []*Resource
}

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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