types

package
v0.77.6 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2024 License: AGPL-3.0 Imports: 30 Imported by: 1

Documentation

Index

Constants

View Source
const (
	AMMCancellationMethodUnspecified AMMCancellationMethod = commandspb.CancelAMM_METHOD_UNSPECIFIED
	AMMCancellationMethodImmediate                         = commandspb.CancelAMM_METHOD_IMMEDIATE
	AMMCancellationMethodReduceOnly                        = commandspb.CancelAMM_METHOD_REDUCE_ONLY
)
View Source
const (
	AMMStatusReasonUnspecified           AMMStatusReason = eventspb.AMM_STATUS_REASON_UNSPECIFIED
	AMMStatusReasonCancelledByParty                      = eventspb.AMM_STATUS_REASON_CANCELLED_BY_PARTY
	AMMStatusReasonCannotFillCommitment                  = eventspb.AMM_STATUS_REASON_CANNOT_FILL_COMMITMENT
	AMMStatusReasonPartyAlreadyOwnsAPool                 = eventspb.AMM_STATUS_REASON_PARTY_ALREADY_OWNS_AMM_FOR_MARKET
	AMMStatusReasonPartyClosedOut                        = eventspb.AMM_STATUS_REASON_PARTY_CLOSED_OUT
	AMMStatusReasonMarketClosed                          = eventspb.AMM_STATUS_REASON_MARKET_CLOSED
	AMMStatusReasonCommitmentTooLow                      = eventspb.AMM_STATUS_REASON_COMMITMENT_TOO_LOW
	AMMStatusReasonCannotRebase                          = eventspb.AMM_STATUS_REASON_CANNOT_REBASE
)
View Source
const (
	AMMPoolStatusUnspecified AMMPoolStatus = eventspb.AMM_STATUS_UNSPECIFIED
	AMMPoolStatusActive                    = eventspb.AMM_STATUS_ACTIVE
	AMMPoolStatusRejected                  = eventspb.AMM_STATUS_REJECTED
	AMMPoolStatusCancelled                 = eventspb.AMM_STATUS_CANCELLED
	AMMPoolStatusStopped                   = eventspb.AMM_STATUS_STOPPED
	AMMPoolStatusReduceOnly                = eventspb.AMM_STATUS_REDUCE_ONLY
)
View Source
const (
	SimpleRiskModelType rmType = iota
	LogNormalRiskModelType
)
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 (
	// Never valid.
	StopOrderExpiryStrategyUnspecified StopOrderExpiryStrategy = vega.StopOrder_EXPIRY_STRATEGY_UNSPECIFIED
	// The stop order should be cancelled if the expiry time is reached.
	StopOrderExpiryStrategyCancels = vega.StopOrder_EXPIRY_STRATEGY_CANCELS
	// The order should be submitted if the expiry time is reached.
	StopOrderExpiryStrategySubmit = vega.StopOrder_EXPIRY_STRATEGY_SUBMIT
)
View Source
const (
	// Never valid.
	StopOrderTriggerDirectionUnspecified StopOrderTriggerDirection = vega.StopOrder_TRIGGER_DIRECTION_UNSPECIFIED
	// The stop order is triggered once the price falls below a certain level.
	StopOrderTriggerDirectionFallsBelow = vega.StopOrder_TRIGGER_DIRECTION_FALLS_BELOW
	// The stop order is triggered once the price rises above a certain level.
	StopOrderTriggerDirectionRisesAbove = vega.StopOrder_TRIGGER_DIRECTION_RISES_ABOVE
)
View Source
const (
	// Never valid.
	StopOrderStatusUnspecified StopOrderStatus = vega.StopOrder_STATUS_UNSPECIFIED
	// Pending to be executed once the trigger is breached.
	StopOrderStatusPending = vega.StopOrder_STATUS_PENDING
	// Cancelled by the user.
	StopOrderStatusCancelled = vega.StopOrder_STATUS_CANCELLED
	// Stopped by the network, e.g: OCO other side has been triggered.
	StopOrderStatusStopped = vega.StopOrder_STATUS_STOPPED
	// Stop order has been triggered and generated an order.
	StopOrderStatusTriggered = vega.StopOrder_STATUS_TRIGGERED
	// Stop order has expired.
	StopOrderStatusExpired = vega.StopOrder_STATUS_EXPIRED
	// Stop order was rejected at submission.
	StopOrderStatusRejected = vega.StopOrder_STATUS_REJECTED
)
View Source
const (
	// Never valid.
	StopOrderSizeOverrideSettingUnspecified StopOrderSizeOverrideSetting = vega.StopOrder_SIZE_OVERRIDE_SETTING_UNSPECIFIED
	// No size override is used.
	StopOrderSizeOverrideSettingNone = vega.StopOrder_SIZE_OVERRIDE_SETTING_NONE
	// Use the position size of the trader to override the order size.
	StopOrderSizeOverrideSettingPosition = vega.StopOrder_SIZE_OVERRIDE_SETTING_POSITION
)
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")
	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")
	ErrInvalidFromDerivedKey         = errors.New("invalid from derived key")
	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")
	ErrBlockIntervalMustBeHigherThan0                     = errors.New("block interval must be > 0 in Ethereum config")
	ErrMissingNetworkName                                 = errors.New("missing network name")
	ErrDuplicateNetworkName                               = errors.New("duplicate network name")
	ErrDuplicateNetworkID                                 = errors.New("duplicate network ID name")
	ErrDuplicateChainID                                   = errors.New("duplicate chain ID name")
	ErrCannotRemoveL2Config                               = errors.New("L2 config cannot be removed")
	ErrCanOnlyAmendedConfirmationsAndBlockInterval        = errors.New("can only amended L2 config confirmations and block interval")
	ErrInvalidBlockLengthDuration                         = errors.New("block-length duration is invalid")
)
View Source
var (
	ErrInvalidCommitmentAmount = errors.New("invalid commitment amount")
	ErrMissingSlippageFactor   = errors.New("slippage factor not specified")
)
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
	ErrPostOnlyOrderWouldTrade                     = OrderErrorPostOnlyOrderWouldTrade
	ErrReduceOnlyOrderWouldNotReducePosition       = OrderErrorReduceOnlyOrderWouldNotReducePosition
	ErrPeggedOrdersNotAllowedInIsolatedMargin      = OrderErrorPeggedOrdersNotAllowedInIsolatedMargin
	ErrOrderNotInTickSize                          = OrderErrorPriceNotInTickSize
)
View Source
var (
	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")
	ErrMissingChunks                = errors.New("missing previous chunks")
	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)")
	ErrInvalidSnapshotStorageMethod = errors.New("invalid snapshot storage method")
)
View Source
var ErrNoTierSet = errors.New("no tier set")

Functions

func CheckActivityStreakBenefitTiers added in v0.73.0

func CheckActivityStreakBenefitTiers(ptiers *proto.ActivityStreakBenefitTiers) error

CheckEthereumConfig verifies the proto.EthereumConfig is valid.

func CheckEVMChainConfig added in v0.76.0

func CheckEVMChainConfig(cfgs *proto.EVMBridgeConfigs) error

CheckEVMChainConfig verifies the proto.EVMChainConfig is valid.

func CheckEthereumConfig

func CheckEthereumConfig(cfgProto *proto.EthereumConfig) error

CheckEthereumConfig verifies the proto.EthereumConfig is valid.

func CheckEthereumL2Configs added in v0.74.0

func CheckEthereumL2Configs(cfgProto *proto.EthereumL2Configs, prev *proto.EthereumL2Configs) error

CheckEthereumConfig verifies the proto.EthereumConfig is valid.

func CheckUntypedActivityStreakBenefitTier added in v0.73.0

func CheckUntypedActivityStreakBenefitTier(v interface{}, _ interface{}) error

func CheckUntypedEVMChainConfig added in v0.76.0

func CheckUntypedEVMChainConfig(v interface{}, _ interface{}) error

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

func CheckUntypedEthereumConfig

func CheckUntypedEthereumConfig(v interface{}, _ interface{}) error

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

func CheckUntypedEthereumL2Configs added in v0.74.0

func CheckUntypedEthereumL2Configs(v interface{}, o interface{}) error

func CheckUntypedVestingBenefitTier added in v0.73.0

func CheckUntypedVestingBenefitTier(v interface{}, _ interface{}) error

func CheckVestingBenefitTiers added in v0.73.0

func CheckVestingBenefitTiers(ptiers *proto.VestingBenefitTiers) error

CheckEthereumConfig verifies the proto.EthereumConfig is valid.

func ErrRefereeNotAllowedToJoinTeam added in v0.74.0

func ErrRefereeNotAllowedToJoinTeam(id TeamID) error

func ErrTeamIsClosed added in v0.74.0

func ErrTeamIsClosed(id TeamID) error

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 IsStoppingOrder added in v0.70.0

func IsStoppingOrder(o OrderError) bool

func KeyFromPayload

func KeyFromPayload(p isPayload) string

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

Types

type AMMBaseCommand added in v0.77.0

type AMMBaseCommand struct {
	MarketID          string
	Party             string
	SlippageTolerance num.Decimal
	ProposedFee       num.Decimal
}

AMMBaseCommand these 3 parameters should be always specified in both the the submit and amend commands.

type AMMCancellationMethod added in v0.77.0

type AMMCancellationMethod = commandspb.CancelAMM_Method

type AMMPoolStatus added in v0.77.0

type AMMPoolStatus = eventspb.AMM_Status

type AMMStatusReason added in v0.77.0

type AMMStatusReason = eventspb.AMM_StatusReason

type Account

type Account struct {
	ID       string
	Owner    string
	Balance  *num.Uint
	Asset    string
	MarketID string // NB: this market may not always refer to a valid market id. instead in the case of transfers it just represents a hash corresponding to a dispatch metric.
	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
	// Per asset network treasury.
	AccountTypeNetworkTreasury AccountType = proto.AccountType_ACCOUNT_TYPE_NETWORK_TREASURY
	// 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
	// Global insurance account for the asset.
	AccountTypeGlobalInsurance AccountType = proto.AccountType_ACCOUNT_TYPE_GLOBAL_INSURANCE

	// 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

	// Margin account for isolated margin mode.
	AccountTypeOrderMargin AccountType = proto.AccountType_ACCOUNT_TYPE_ORDER_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
	// Market account for holding in-flight spot passive orders funds.
	AccountTypeHolding AccountType = proto.AccountType_ACCOUNT_TYPE_HOLDING
	// Market account per LP to receive liquidity fees.
	AccountTypeLPLiquidityFees                AccountType = proto.AccountType_ACCOUNT_TYPE_LP_LIQUIDITY_FEES
	AccountTypeLiquidityFeesBonusDistribution AccountType = proto.AccountType_ACCOUNT_TYPE_LIQUIDITY_FEES_BONUS_DISTRIBUTION
	AccountTypeVestingRewards                 AccountType = proto.AccountType_ACCOUNT_TYPE_VESTING_REWARDS
	AccountTypeVestedRewards                  AccountType = proto.AccountType_ACCOUNT_TYPE_VESTED_REWARDS
	// Reward account for average position metric.
	AccountTypeAveragePositionReward AccountType = proto.AccountType_ACCOUNT_TYPE_REWARD_AVERAGE_POSITION
	// Reward account for relative return metric.
	AccountTypeRelativeReturnReward AccountType = proto.AccountType_ACCOUNT_TYPE_REWARD_RELATIVE_RETURN
	// Reward account for return volatility metric.
	AccountTypeReturnVolatilityReward AccountType = proto.AccountType_ACCOUNT_TYPE_REWARD_RETURN_VOLATILITY
	// Reward account for validator ranking metric.
	AccountTypeValidatorRankingReward AccountType = proto.AccountType_ACCOUNT_TYPE_REWARD_VALIDATOR_RANKING
	// Account for pending fee referral rewards.
	AccountTypePendingFeeReferralReward AccountType = proto.AccountType_ACCOUNT_TYPE_PENDING_FEE_REFERRAL_REWARD
	// Account for realised return rewards.
	AccountTypeRealisedReturnReward = proto.AccountType_ACCOUNT_TYPE_REWARD_REALISED_RETURN
)

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 ActivityStreakBenefitTier added in v0.73.0

type ActivityStreakBenefitTier struct {
	MinimumActivityStreak uint64
	RewardMultiplier      num.Decimal
	VestingMultiplier     num.Decimal
}

type ActivityStreakBenefitTiers added in v0.73.0

type ActivityStreakBenefitTiers struct {
	Tiers []*ActivityStreakBenefitTier
}

func ActivityStreakBenefitTiersFromProto added in v0.73.0

func ActivityStreakBenefitTiersFromProto(ptiers *proto.ActivityStreakBenefitTiers) (*ActivityStreakBenefitTiers, error)

func ActivityStreakBenefitTiersFromUntypedProto added in v0.73.0

func ActivityStreakBenefitTiersFromUntypedProto(v interface{}) (*ActivityStreakBenefitTiers, error)

func (*ActivityStreakBenefitTiers) Clone added in v0.73.0

type AmendAMM added in v0.77.0

type AmendAMM struct {
	AMMBaseCommand
	CommitmentAmount *num.Uint
	Parameters       *ConcentratedLiquidityParameters
}

func NewAmendAMMFromProto added in v0.77.0

func NewAmendAMMFromProto(
	amendAMM *commandspb.AmendAMM,
	party string,
) *AmendAMM

func (AmendAMM) IntoProto added in v0.77.0

func (a AmendAMM) IntoProto() *commandspb.AmendAMM

type AnnounceNode

type AnnounceNode = commandspb.AnnounceNode

type AppState

type AppState struct {
	Height          uint64
	Block           string
	Time            int64
	PrevBlockTime   int64
	ChainID         string
	ProtocolVersion string
	ProtocolUpdgade bool
}

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
	// Details of the asset (e.g: Great British Pound)
	Details *AssetDetails
	// Status of the asset
	Status AssetStatus
}

func AssetFromProto

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

func (Asset) DeepClone

func (a Asset) DeepClone() *Asset

func (Asset) IntoProto

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

type AssetAction

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

func AssetActionFromProto

func AssetActionFromProto(a *checkpointpb.AssetAction) *AssetAction

func (*AssetAction) IntoProto

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

type AssetDetails

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

func AssetDetailsFromProto

func AssetDetailsFromProto(p *vegapb.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() *vegapb.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 *vegapb.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 = vegapb.Asset_Status
const (
	// AssetStatusUnspecified is the default value, always invalid.
	AssetStatusUnspecified AssetStatus = vegapb.Asset_STATUS_UNSPECIFIED
	// AssetStatusProposed states the asset is proposed and under vote.
	AssetStatusProposed AssetStatus = vegapb.Asset_STATUS_PROPOSED
	// AssetStatusRejected states the asset has been rejected from governance.
	AssetStatusRejected AssetStatus = vegapb.Asset_STATUS_REJECTED
	// AssetStatusPendingListing states the asset is pending listing from the bridge.
	AssetStatusPendingListing AssetStatus = vegapb.Asset_STATUS_PENDING_LISTING
	// AssetStatusEnabled states the asset is fully usable in the network.
	AssetStatusEnabled AssetStatus = vegapb.Asset_STATUS_ENABLED
)

type AuctionDuration

type AuctionDuration struct {
	Duration int64
	Volume   uint64
}

func AuctionDurationFromProto

func AuctionDurationFromProto(ad *vegapb.AuctionDuration) *AuctionDuration

func (AuctionDuration) DeepClone

func (a AuctionDuration) DeepClone() *AuctionDuration

func (AuctionDuration) IntoProto

func (a AuctionDuration) IntoProto() *vegapb.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 = vegapb.AuctionTrigger
const (
	// Default value for AuctionTrigger, no auction triggered.
	AuctionTriggerUnspecified AuctionTrigger = vegapb.AuctionTrigger_AUCTION_TRIGGER_UNSPECIFIED
	// Batch auction.
	AuctionTriggerBatch AuctionTrigger = vegapb.AuctionTrigger_AUCTION_TRIGGER_BATCH
	// Opening auction.
	AuctionTriggerOpening AuctionTrigger = vegapb.AuctionTrigger_AUCTION_TRIGGER_OPENING
	// Price monitoring trigger.
	AuctionTriggerPrice AuctionTrigger = vegapb.AuctionTrigger_AUCTION_TRIGGER_PRICE
	// Liquidity monitoring due to unmet target trigger.
	AuctionTriggerLiquidityTargetNotMet AuctionTrigger = vegapb.AuctionTrigger_AUCTION_TRIGGER_LIQUIDITY_TARGET_NOT_MET
	// Governance triggered auction.
	AuctionTriggerGovernanceSuspension AuctionTrigger = vegapb.AuctionTrigger_AUCTION_TRIGGER_GOVERNANCE_SUSPENSION
	// AuctionTriggerUnableToDeployLPOrders legacy liquidity provision supports.
	AuctionTriggerUnableToDeployLPOrders AuctionTrigger = vegapb.AuctionTrigger_AUCTION_TRIGGER_UNABLE_TO_DEPLOY_LP_ORDERS
	// AuctionTriggerLongBlock for market suspension due to a long block.
	AuctionTriggerLongBlock AuctionTrigger = vegapb.AuctionTrigger_AUCTION_TRIGGER_LONG_BLOCK
)

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
	ChainID     string
}

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
	LastSeenPrimaryEthBlock   uint64
	LastSeenSecondaryEthBlock uint64
}

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 BatchProposal added in v0.74.0

type BatchProposal struct {
	ID                 string
	Reference          string
	Party              string
	State              ProposalState
	Timestamp          int64
	ClosingTimestamp   int64
	Proposals          []*Proposal
	Rationale          *ProposalRationale
	Reason             ProposalError
	ErrorDetails       string
	ProposalParameters *ProposalParameters
}

func BatchProposalFromSnapshotProto added in v0.74.0

func BatchProposalFromSnapshotProto(bp *vegapb.Proposal, pps []*vegapb.Proposal) *BatchProposal

func (*BatchProposal) IsRejected added in v0.74.0

func (bp *BatchProposal) IsRejected() bool

func (*BatchProposal) Open added in v0.76.0

func (p *BatchProposal) Open()

func (*BatchProposal) Reject added in v0.76.0

func (p *BatchProposal) Reject(reason ProposalError)

func (*BatchProposal) RejectWithErr added in v0.74.0

func (bp *BatchProposal) RejectWithErr(reason ProposalError, details error)

func (*BatchProposal) SetProposalParams added in v0.74.0

func (bp *BatchProposal) SetProposalParams(params ProposalParameters)

SetProposalParams set specific per proposal parameters and chooses the most aggressive ones.

func (BatchProposal) ToProto added in v0.74.0

func (bp BatchProposal) ToProto() *vegapb.Proposal

func (*BatchProposal) WaitForNodeVote added in v0.76.0

func (p *BatchProposal) WaitForNodeVote()

type BatchProposalChange added in v0.74.0

type BatchProposalChange struct {
	ID             string
	Change         ProposalTerm
	EnactmentTime  int64
	ValidationTime int64
}

type BatchProposalSubmission added in v0.74.0

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

func NewBatchProposalSubmissionFromProto added in v0.74.0

func NewBatchProposalSubmissionFromProto(p *commandspb.BatchProposalSubmission, ids []string) (*BatchProposalSubmission, error)

func (BatchProposalSubmission) IntoProto added in v0.74.0

type BatchProposalTerms added in v0.74.0

type BatchProposalTerms struct {
	ClosingTimestamp int64
	Changes          []BatchProposalChange
}

func BatchProposalTermsSubmissionFromProto added in v0.74.0

func BatchProposalTermsSubmissionFromProto(p *commandspb.BatchProposalSubmissionTerms, ids []string) (*BatchProposalTerms, error)

func (BatchProposalTerms) DeepClone added in v0.74.0

func (p BatchProposalTerms) DeepClone() *BatchProposalTerms

func (BatchProposalTerms) IntoProto added in v0.74.0

func (BatchProposalTerms) IntoSubmissionProto added in v0.74.0

func (BatchProposalTerms) String added in v0.74.0

func (p BatchProposalTerms) String() string

type BenefitTier added in v0.73.0

type BenefitTier struct {
	MinimumEpochs                     *num.Uint
	MinimumRunningNotionalTakerVolume *num.Uint
	ReferralRewardFactor              num.Decimal
	ReferralDiscountFactor            num.Decimal
}

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 CPMarketState added in v0.72.0

type CPMarketState struct {
	ID               string
	Shares           []*ELSShare
	InsuranceBalance *num.Uint
	LastTradeValue   *num.Uint
	LastTradeVolume  *num.Uint
	TTL              time.Time
	Market           *Market     // the full market object - needed in case the market has settled but a successor market is enacted during the successor window.
	State            MarketState // only used during OnTick, indicating the parent is still in opening auction
}

func NewMarketStateFromProto added in v0.72.0

func NewMarketStateFromProto(ms *checkpoint.MarketState) *CPMarketState

func (*CPMarketState) IntoProto added in v0.72.0

func (m *CPMarketState) IntoProto() *checkpoint.MarketState

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 CancelAMM added in v0.77.0

type CancelAMM struct {
	MarketID string
	Party    string
	Method   AMMCancellationMethod
}

func NewCancelAMMFromProto added in v0.77.0

func NewCancelAMMFromProto(
	cancelAMM *commandspb.CancelAMM,
	party string,
) *CancelAMM

func (CancelAMM) IntoProto added in v0.77.0

func (c CancelAMM) IntoProto() *commandspb.CancelAMM

type CancelTransfer added in v0.72.0

type CancelTransfer struct {
	Changes *CancelTransferConfiguration
}

func (CancelTransfer) DeepClone added in v0.72.0

func (c CancelTransfer) DeepClone() *CancelTransfer

func (CancelTransfer) IntoProto added in v0.72.0

func (c CancelTransfer) IntoProto() *vegapb.CancelTransfer

func (CancelTransfer) String added in v0.72.0

func (c CancelTransfer) String() string

type CancelTransferConfiguration added in v0.72.0

type CancelTransferConfiguration struct {
	TransferID string
}

func (CancelTransferConfiguration) String added in v0.72.0

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
	Execution             []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"
	ExecutionCheckpoint             CheckpointName = "execution"
)

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
	NextBalanceSnapshot time.Time
}

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 CompositePriceConfiguration added in v0.74.0

type CompositePriceConfiguration struct {
	DecayWeight                  num.Decimal
	DecayPower                   num.Decimal
	CashAmount                   *num.Uint
	SourceWeights                []num.Decimal
	SourceStalenessTolerance     []time.Duration
	CompositePriceType           CompositePriceType
	DataSources                  []*datasource.Spec
	SpecBindingForCompositePrice []*datasource.SpecBindingForCompositePrice
}

func CompositePriceConfigurationFromProto added in v0.74.0

func CompositePriceConfigurationFromProto(mpc *vegapb.CompositePriceConfiguration) *CompositePriceConfiguration

func (*CompositePriceConfiguration) DeepClone added in v0.74.0

func (*CompositePriceConfiguration) IntoProto added in v0.74.0

func (*CompositePriceConfiguration) String added in v0.74.0

func (mpc *CompositePriceConfiguration) String() string

type CompositePriceSource added in v0.74.0

type CompositePriceSource struct {
	PriceSource string
	Price       *num.Uint
	LastUpdated int64
}

func (*CompositePriceSource) DeepClone added in v0.74.0

func (cps *CompositePriceSource) DeepClone() *CompositePriceSource

type CompositePriceState added in v0.74.0

type CompositePriceState struct {
	PriceSources []*CompositePriceSource
}

func CompositePriceStateFromProto added in v0.74.0

func CompositePriceStateFromProto(cps *vega.CompositePriceState) *CompositePriceState

func (*CompositePriceState) DeepClone added in v0.74.0

func (cps *CompositePriceState) DeepClone() *CompositePriceState

func (*CompositePriceState) IntoProto added in v0.74.0

func (cps *CompositePriceState) IntoProto() *vega.CompositePriceState

type CompositePriceType added in v0.74.0

type CompositePriceType = vegapb.CompositePriceType
const (
	// Default value, this is invalid.
	CompositePriceTypeUnspecified CompositePriceType = vegapb.CompositePriceType_COMPOSITE_PRICE_TYPE_UNSPECIFIED
	// Mark price calculated as the weighted average of underlying mark prices.
	CompositePriceTypeByWeight CompositePriceType = vegapb.CompositePriceType_COMPOSITE_PRICE_TYPE_WEIGHTED
	// Mark price calculated as the median of underlying mark prices.
	CompositePriceTypeByMedian CompositePriceType = vegapb.CompositePriceType_COMPOSITE_PRICE_TYPE_MEDIAN
	// Mark price calculated as the last trade price.
	CompositePriceTypeByLastTrade CompositePriceType = vegapb.CompositePriceType_COMPOSITE_PRICE_TYPE_LAST_TRADE
)

type ConcentratedLiquidityParameters added in v0.77.0

type ConcentratedLiquidityParameters struct {
	Base                 *num.Uint
	LowerBound           *num.Uint
	UpperBound           *num.Uint
	LeverageAtLowerBound *num.Decimal
	LeverageAtUpperBound *num.Decimal
}

func (ConcentratedLiquidityParameters) Clone added in v0.77.0

func (ConcentratedLiquidityParameters) IntoProto added in v0.77.0

func (*ConcentratedLiquidityParameters) ToProtoEvent added in v0.77.0

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 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 = vegapb.Deposit_STATUS_UNSPECIFIED
	// DepositStatusOpen The deposit is being processed by the network.
	DepositStatusOpen DepositStatus = vegapb.Deposit_STATUS_OPEN
	// DepositStatusCancelled The deposit has been cancelled or failed to be verified by the network.
	DepositStatusCancelled DepositStatus = vegapb.Deposit_STATUS_CANCELLED
	// DepositStatusFinalized The deposit has been finalised and accounts have been updated.
	DepositStatusFinalized DepositStatus = vegapb.Deposit_STATUS_FINALIZED
	// DepositStatusDuplicateRejected The deposit was rejected as a duplicate.
	DepositStatusDuplicateRejected DepositStatus = vegapb.Deposit_STATUS_DUPLICATE_REJECTED
)

type ELSShare added in v0.72.0

type ELSShare struct {
	PartyID       string
	Share         num.Decimal
	SuppliedStake num.Decimal
	VStake        num.Decimal
	Avg           num.Decimal
}

func NewELSShareFromProto added in v0.72.0

func NewELSShareFromProto(ELSs *checkpoint.ELSShare) *ELSShare

func (*ELSShare) IntoProto added in v0.72.0

func (e *ELSShare) IntoProto() *checkpoint.ELSShare

type ERC20

type ERC20 struct {
	// Chain ID from which the asset originated from.
	ChainID string

	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
	ChainID string

	// 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 EVMChainConfig added in v0.76.0

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

func (*EVMChainConfig) BlockTime added in v0.76.0

func (c *EVMChainConfig) BlockTime() time.Duration

func (*EVMChainConfig) ChainID added in v0.76.0

func (c *EVMChainConfig) ChainID() string

func (*EVMChainConfig) CollateralBridge added in v0.76.0

func (c *EVMChainConfig) CollateralBridge() EthereumContract

func (*EVMChainConfig) Confirmations added in v0.76.0

func (c *EVMChainConfig) Confirmations() uint64

func (*EVMChainConfig) MultiSigControl added in v0.76.0

func (c *EVMChainConfig) MultiSigControl() EthereumContract

func (*EVMChainConfig) NetworkID added in v0.76.0

func (c *EVMChainConfig) NetworkID() string

type EVMChainConfigs added in v0.76.0

type EVMChainConfigs struct {
	Configs []*EVMChainConfig
}

func EVMChainConfigFromUntypedProto added in v0.76.0

func EVMChainConfigFromUntypedProto(v interface{}) (*EVMChainConfigs, error)

func SecondaryConfigFromProto added in v0.76.0

func SecondaryConfigFromProto(cfgsProto *proto.EVMBridgeConfigs) (*EVMChainConfigs, error)

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 EthBlock added in v0.73.0

type EthBlock struct {
	Height uint64
	Time   uint64
}

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) BlockTime added in v0.77.0

func (c *EthereumConfig) BlockTime() time.Duration

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 EthereumL2Config added in v0.74.0

type EthereumL2Config struct {
	ChainID       string
	NetworkID     string
	Confirmations uint64
	Name          string
	BlockInterval uint64
}

type EthereumL2Configs added in v0.74.0

type EthereumL2Configs struct {
	Configs []EthereumL2Config
}

func EthereumL2ConfigsFromProto added in v0.74.0

func EthereumL2ConfigsFromProto(cfgProto *proto.EthereumL2Configs) (*EthereumL2Configs, error)

func EthereumL2ConfigsFromUntypedProto added in v0.74.0

func EthereumL2ConfigsFromUntypedProto(v interface{}) (*EthereumL2Configs, error)

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
	NextInternalCompositePriceCalc   int64
	Parties                          []string
	Closed                           bool
	IsSucceeded                      bool
	StopOrders                       *snapshot.StopOrders
	ExpiringStopOrders               []*Order
	Product                          *snapshot.Product
	FeesStats                        *eventspb.FeesStats
	PartyMarginFactors               []*snapshot.PartyMarginFactor
	MarkPriceCalculator              *snapshot.CompositePriceCalculator
	InternalCompositePriceCalculator *snapshot.CompositePriceCalculator
	Amm                              *snapshot.AmmState
	MarketLiquidity                  *snapshot.MarketLiquidity
}

func ExecMarketFromProto

func ExecMarketFromProto(em *snapshot.Market) *ExecMarket

func (ExecMarket) IntoProto

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

type ExecSpotMarket added in v0.72.0

type ExecSpotMarket 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
	FeeSplitter                *FeeSplitter
	NextMTM                    int64
	Parties                    []string
	Closed                     bool
	HasTraded                  bool
	StopOrders                 *snapshot.StopOrders
	ExpiringStopOrders         []*Order
	FeesStats                  *eventspb.FeesStats
	MarketLiquidity            *snapshot.MarketLiquidity
}

func ExecSpotMarketFromProto added in v0.72.0

func ExecSpotMarketFromProto(em *snapshot.SpotMarket) *ExecSpotMarket

func (ExecSpotMarket) IntoProto added in v0.72.0

func (e ExecSpotMarket) IntoProto() *snapshot.SpotMarket

type ExecutionMarkets

type ExecutionMarkets struct {
	Markets        []*ExecMarket
	SpotMarkets    []*ExecSpotMarket
	SettledMarkets []*CPMarketState
	Successors     []*Successors
	AllMarketIDs   []string
}

func ExecutionMarketsFromProto

func ExecutionMarketsFromProto(em *snapshot.ExecutionMarkets) *ExecutionMarkets

func (ExecutionMarkets) IntoProto

type ExecutionState added in v0.72.0

type ExecutionState struct {
	Data []*CPMarketState
}

func NewExecutionStateFromProto added in v0.72.0

func NewExecutionStateFromProto(es *checkpoint.ExecutionState) *ExecutionState

func (*ExecutionState) IntoProto added in v0.72.0

func (e *ExecutionState) IntoProto() *checkpoint.ExecutionState

type Fee

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

	MakerFeeVolumeDiscount          *num.Uint
	InfrastructureFeeVolumeDiscount *num.Uint
	LiquidityFeeVolumeDiscount      *num.Uint

	MakerFeeReferrerDiscount          *num.Uint
	InfrastructureFeeReferrerDiscount *num.Uint
	LiquidityFeeReferrerDiscount      *num.Uint
}

func FeeFromProto added in v0.74.0

func FeeFromProto(f *proto.Fee) *Fee

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
	LiquidityFeeSettings *LiquidityFeeSettings
}

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     *datasource.Spec
	DataSourceSpecForTradingTermination *datasource.Spec
	DataSourceSpecBinding               *datasource.SpecBindingForFuture
	Cap                                 *FutureCap
}

func FutureFromProto

func FutureFromProto(f *vegapb.Future) *Future

func (Future) IntoProto

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

func (Future) String

func (f Future) String() string

type FutureCap added in v0.77.0

type FutureCap struct {
	MaxPrice            *num.Uint
	Binary              bool
	FullyCollateralised bool
}

func FutureCapFromProto added in v0.77.0

func FutureCapFromProto(fc *vegapb.FutureCap) (*FutureCap, error)

func (FutureCap) DeepClone added in v0.77.0

func (c FutureCap) DeepClone() *FutureCap

func (FutureCap) IntoProto added in v0.77.0

func (c FutureCap) IntoProto() *vegapb.FutureCap

func (FutureCap) String added in v0.77.0

func (c FutureCap) String() string

type FutureProduct

type FutureProduct struct {
	SettlementAsset                     string
	QuoteName                           string
	DataSourceSpecForSettlementData     dsdefinition.Definition
	DataSourceSpecForTradingTermination dsdefinition.Definition
	DataSourceSpecBinding               *datasource.SpecBindingForFuture
	Cap                                 *FutureCap
}

func (FutureProduct) Assets added in v0.72.0

func (f FutureProduct) Assets() []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 GovernanceBatchActive added in v0.74.0

type GovernanceBatchActive struct {
	BatchProposals []*snapshot.BatchProposalData
}

func GovernanceBatchActiveFromProto added in v0.74.0

func GovernanceBatchActiveFromProto(ga *snapshot.GovernanceBatchActive) *GovernanceBatchActive

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
	ProposalData      []*ProposalData
	BatchProposalData []*snapshot.BatchProposalData
}

func GovernanceNodeFromProto

func GovernanceNodeFromProto(ge *snapshot.GovernanceNode) *GovernanceNode

func (GovernanceNode) IntoProto

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

type GovernanceTransfer added in v0.72.0

type GovernanceTransfer struct {
	ID        string // NB: this is the ID of the proposal
	Reference string
	Config    *NewTransferConfiguration
	Status    TransferStatus
	Timestamp time.Time
}

func GovernanceTransferFromProto added in v0.72.0

func GovernanceTransferFromProto(g *checkpointpb.GovernanceTransfer) *GovernanceTransfer

func (*GovernanceTransfer) IntoEvent added in v0.72.0

func (g *GovernanceTransfer) IntoEvent(amount *num.Uint, reason, gameID *string) *eventspb.Transfer

func (*GovernanceTransfer) IntoProto added in v0.72.0

type HoldingAccountQuantity added in v0.73.0

type HoldingAccountQuantity struct {
	ID          string
	Quantity    *num.Uint
	FeeQuantity *num.Uint
}

type HoldingAccountTracker added in v0.73.0

type HoldingAccountTracker struct {
	MarketID                 string
	HoldingAccountQuantities []*HoldingAccountQuantity
}

type IcebergOrder added in v0.72.0

type IcebergOrder struct {
	ReservedRemaining  uint64
	PeakSize           uint64
	MinimumVisibleSize uint64
}

func NewIcebergOrderFromProto added in v0.72.0

func NewIcebergOrderFromProto(i *proto.IcebergOrder) (*IcebergOrder, error)

func (IcebergOrder) Clone added in v0.72.0

func (i IcebergOrder) Clone() *IcebergOrder

func (IcebergOrder) IntoProto added in v0.72.0

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

func (IcebergOrder) String added in v0.72.0

func (i IcebergOrder) String() string

type Instrument

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

func InstrumentFromProto

func InstrumentFromProto(i *vegapb.Instrument) *Instrument

func (Instrument) DeepClone

func (i Instrument) DeepClone() *Instrument

func (Instrument) GetFuture

func (i Instrument) GetFuture() *Future

func (Instrument) GetPerps added in v0.73.0

func (i Instrument) GetPerps() *Perps

func (Instrument) GetSpot added in v0.72.0

func (i Instrument) GetSpot() *Spot

func (Instrument) IntoProto

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

func (Instrument) String

func (i Instrument) String() string

type InstrumentConfiguration

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

func InstrumentConfigurationFromProto

func InstrumentConfigurationFromProto(
	p *vegapb.InstrumentConfiguration,
) (*InstrumentConfiguration, error)

func (InstrumentConfiguration) DeepClone

func (InstrumentConfiguration) IntoProto

func (InstrumentConfiguration) String

func (i InstrumentConfiguration) String() string

type InstrumentConfigurationFuture

type InstrumentConfigurationFuture struct {
	Future *FutureProduct
}

func (InstrumentConfigurationFuture) Assets added in v0.72.0

func (InstrumentConfigurationFuture) DeepClone

func (i InstrumentConfigurationFuture) DeepClone() instrumentConfigurationProduct

func (InstrumentConfigurationFuture) IntoProto

func (InstrumentConfigurationFuture) String

func (InstrumentConfigurationFuture) Type added in v0.72.0

type InstrumentConfigurationPerps added in v0.73.0

type InstrumentConfigurationPerps struct {
	Perps *PerpsProduct
}

func (InstrumentConfigurationPerps) Assets added in v0.73.0

func (i InstrumentConfigurationPerps) Assets() []string

func (InstrumentConfigurationPerps) DeepClone added in v0.73.0

func (i InstrumentConfigurationPerps) DeepClone() instrumentConfigurationProduct

func (InstrumentConfigurationPerps) IntoProto added in v0.73.0

func (InstrumentConfigurationPerps) String added in v0.73.0

func (InstrumentConfigurationPerps) Type added in v0.73.0

type InstrumentConfigurationSpot added in v0.72.0

type InstrumentConfigurationSpot struct {
	Spot *SpotProduct
}

func (InstrumentConfigurationSpot) Assets added in v0.72.0

func (i InstrumentConfigurationSpot) Assets() []string

func (InstrumentConfigurationSpot) DeepClone added in v0.72.0

func (i InstrumentConfigurationSpot) DeepClone() instrumentConfigurationProduct

func (InstrumentConfigurationSpot) IntoProto added in v0.72.0

func (InstrumentConfigurationSpot) String added in v0.72.0

func (InstrumentConfigurationSpot) Type added in v0.72.0

type InstrumentFuture

type InstrumentFuture struct {
	Future *Future
}

func InstrumentFutureFromProto

func InstrumentFutureFromProto(f *vegapb.Instrument_Future) *InstrumentFuture

func (InstrumentFuture) Cap added in v0.77.0

func (i InstrumentFuture) Cap() *FutureCap

func (InstrumentFuture) IntoProto

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

func (InstrumentFuture) String

func (i InstrumentFuture) String() string

func (InstrumentFuture) Type added in v0.72.0

type InstrumentMetadata

type InstrumentMetadata struct {
	Tags []string
}

func InstrumentMetadataFromProto

func InstrumentMetadataFromProto(m *vegapb.InstrumentMetadata) *InstrumentMetadata

func (InstrumentMetadata) DeepClone

func (i InstrumentMetadata) DeepClone() *InstrumentMetadata

func (InstrumentMetadata) IntoProto

func (InstrumentMetadata) String

func (i InstrumentMetadata) String() string

type InstrumentPerps added in v0.73.0

type InstrumentPerps struct {
	Perps *Perps
}

func InstrumentPerpsFromProto added in v0.73.0

func InstrumentPerpsFromProto(p *vegapb.Instrument_Perpetual) *InstrumentPerps

func (InstrumentPerps) Cap added in v0.77.0

func (_ InstrumentPerps) Cap() *FutureCap

func (InstrumentPerps) IntoProto added in v0.73.0

func (InstrumentPerps) String added in v0.73.0

func (i InstrumentPerps) String() string

func (InstrumentPerps) Type added in v0.73.0

type InstrumentSpot added in v0.72.0

type InstrumentSpot struct {
	Spot *Spot
}

func InstrumentSpotFromProto added in v0.72.0

func InstrumentSpotFromProto(f *vegapb.Instrument_Spot) *InstrumentSpot

func (InstrumentSpot) Cap added in v0.77.0

func (_ InstrumentSpot) Cap() *FutureCap

func (InstrumentSpot) IntoProto added in v0.72.0

func (i InstrumentSpot) IntoProto() *vegapb.Instrument_Spot

func (InstrumentSpot) String added in v0.72.0

func (i InstrumentSpot) String() string

func (InstrumentSpot) Type added in v0.72.0

func (InstrumentSpot) Type() ProductType

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
	FromAccountBalance *num.Uint
	ToAccountBalance   *num.Uint
	TransferID         *string
}

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
	ProposeSpotMarketEnabled  bool
	ProposePerpsMarketEnabled bool
	ProposeAssetEnabled       bool
	CanUseAMMEnabled          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 LiquidationNode added in v0.74.0

type LiquidationNode struct {
	MarketID   string
	NetworkPos int64
	NextStep   time.Time
	Config     *LiquidationStrategy
}

func LiquidationSnapshotFromProto added in v0.74.0

func LiquidationSnapshotFromProto(p *snapshot.Liquidation) (*LiquidationNode, error)

func PayloadLiquidationNodeFromProto added in v0.74.0

func PayloadLiquidationNodeFromProto(p *snapshot.Payload_Liquidation) *LiquidationNode

func (*LiquidationNode) IntoProto added in v0.74.0

func (l *LiquidationNode) IntoProto() *snapshot.Liquidation

func (*LiquidationNode) Key added in v0.74.0

func (l *LiquidationNode) Key() string

func (*LiquidationNode) Namespace added in v0.74.0

func (l *LiquidationNode) Namespace() SnapshotNamespace

type LiquidationStrategy added in v0.74.0

type LiquidationStrategy struct {
	DisposalTimeStep    time.Duration
	DisposalFraction    num.Decimal
	FullDisposalSize    uint64
	MaxFractionConsumed num.Decimal
	DisposalSlippage    num.Decimal // this has to be a pointer for the time being, with the need to default to 0.1
}

func LiquidationStrategyFromProto added in v0.74.0

func LiquidationStrategyFromProto(p *vegapb.LiquidationStrategy) (*LiquidationStrategy, error)

func (*LiquidationStrategy) DeepClone added in v0.74.0

func (l *LiquidationStrategy) DeepClone() *LiquidationStrategy

func (*LiquidationStrategy) EQ added in v0.74.0

func (*LiquidationStrategy) IntoProto added in v0.74.0

type LiquidityFeeMethod added in v0.74.0

type LiquidityFeeMethod = proto.LiquidityFeeSettings_Method

type LiquidityFeeSettings added in v0.74.0

type LiquidityFeeSettings struct {
	Method      LiquidityFeeMethod
	FeeConstant num.Decimal
}

func LiquidityFeeSettingsFromProto added in v0.74.0

func LiquidityFeeSettingsFromProto(l *proto.LiquidityFeeSettings) *LiquidityFeeSettings

func (*LiquidityFeeSettings) DeepClone added in v0.74.0

func (*LiquidityFeeSettings) IntoProto added in v0.74.0

func (LiquidityFeeSettings) String added in v0.74.0

func (l LiquidityFeeSettings) String() string

type LiquidityMonitoringParameters

type LiquidityMonitoringParameters struct {
	// Specifies parameters related to target stake calculation
	TargetStakeParameters *TargetStakeParameters
}

func (LiquidityMonitoringParameters) DeepClone

func (LiquidityMonitoringParameters) IntoProto

func (LiquidityMonitoringParameters) String

type LiquidityProviderFeeShare

type LiquidityProviderFeeShare = vegapb.LiquidityProviderFeeShare

type LiquidityProviderFeeShares

type LiquidityProviderFeeShares []*LiquidityProviderFeeShare

func (LiquidityProviderFeeShares) String

func (ls LiquidityProviderFeeShares) String() string

type LiquidityProviderSLA added in v0.73.0

type LiquidityProviderSLA = vegapb.LiquidityProviderSLA

type LiquidityProviderSLAs added in v0.73.0

type LiquidityProviderSLAs []*LiquidityProviderSLA

func (LiquidityProviderSLAs) String added in v0.73.0

func (ls LiquidityProviderSLAs) 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
	// Version of this liquidity provision
	Version uint64
	// Status of this liquidity provision
	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 reference to be added to every order created out of this liquidityProvisionAmendment
	Reference string
}

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 reference to be added to every order created out of this liquidityProvisionSubmission
	Reference string
}

func (LiquidityProvisionSubmission) IntoProto

func (LiquidityProvisionSubmission) String

type LiquiditySLAParams added in v0.73.0

type LiquiditySLAParams struct {
	PriceRange                  num.Decimal
	CommitmentMinTimeFraction   num.Decimal
	PerformanceHysteresisEpochs uint64
	SlaCompetitionFactor        num.Decimal
}

func LiquiditySLAParamsFromProto added in v0.73.0

func LiquiditySLAParamsFromProto(l *proto.LiquiditySLAParameters) *LiquiditySLAParams

func (LiquiditySLAParams) DeepClone added in v0.73.0

func (l LiquiditySLAParams) DeepClone() *LiquiditySLAParams

func (LiquiditySLAParams) IntoProto added in v0.73.0

func (LiquiditySLAParams) String added in v0.73.0

func (l LiquiditySLAParams) String() 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
	// nil if no override
	RiskFactorOverride *RiskFactorOverride
}

func (LogNormalRiskModel) DeepClone

func (l LogNormalRiskModel) DeepClone() *LogNormalRiskModel

func (LogNormalRiskModel) IntoProto

func (LogNormalRiskModel) String

func (l LogNormalRiskModel) String() string

type LongBlockAuctionDuration added in v0.77.0

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

type LongBlockAuctionDurationTable added in v0.77.0

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

func LongBlockAuctionDurationTableFromProto added in v0.77.0

func LongBlockAuctionDurationTableFromProto(lbadTable *proto.LongBlockAuctionDurationTable) (*LongBlockAuctionDurationTable, error)

func (*LongBlockAuctionDurationTable) GetLongBlockAuctionDurationForBlockDuration added in v0.77.0

func (b *LongBlockAuctionDurationTable) GetLongBlockAuctionDurationForBlockDuration(d time.Duration) *time.Duration

type MarginCalculator

type MarginCalculator struct {
	ScalingFactors      *ScalingFactors
	FullyCollateralised bool
}

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
	OrderMargin            *num.Uint
	Party                  string
	MarketID               string
	Asset                  string
	Timestamp              int64
	MarginMode             MarginMode
	MarginFactor           num.Decimal
}

func (MarginLevels) IntoProto

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

func (MarginLevels) String

func (m MarginLevels) String() string

type MarginMode added in v0.74.0

type MarginMode = proto.MarginMode

type Market

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

	// market liquitity parameters, may not match those in the liquidity engine after a market update
	// since they are only applied at the end of the epoch
	LiquiditySLAParams *LiquiditySLAParams

	TradingMode            MarketTradingMode
	State                  MarketState
	MarketTimestamps       *MarketTimestamps
	ParentMarketID         string
	InsurancePoolFraction  num.Decimal
	LiquidationStrategy    *LiquidationStrategy
	MarkPriceConfiguration *CompositePriceConfiguration
	TickSize               *num.Uint
	EnableTxReordering     bool
}

func MarketFromProto

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

func (Market) DeepClone

func (m Market) DeepClone() *Market

func (*Market) GetAssets added in v0.72.0

func (m *Market) GetAssets() ([]string, error)

func (*Market) GetFuture added in v0.72.0

func (m *Market) GetFuture() *InstrumentFuture

func (Market) GetID

func (m Market) GetID() string

func (*Market) GetPerps added in v0.73.0

func (m *Market) GetPerps() *InstrumentPerps

func (*Market) GetSpot added in v0.72.0

func (m *Market) GetSpot() *InstrumentSpot

func (Market) IntoProto

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

func (Market) MarketType added in v0.73.0

func (m Market) MarketType() MarketType

func (*Market) ProductType added in v0.72.0

func (m *Market) ProductType() ProductType

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 {
	StopOrderCounter    uint64
	PeggedOrderCounter  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
	LiquidityProviderSLA      []*LiquidityProviderSLA

	NextMTM        int64
	MarketGrowth   num.Decimal
	ProductData    *ProductData
	NextNetClose   int64
	MarkPriceType  CompositePriceType
	MarkPriceState *CompositePriceState
}

func (MarketData) DeepClone

func (m MarketData) DeepClone() *MarketData

func (MarketData) IntoProto

func (m MarketData) IntoProto() *vegapb.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
	BuySumProduct, SellSumProduct *num.Uint
	Distressed                    bool
	AverageEntryPrice             *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
	PartieRecords []*snapshot.PartyPositionStats
}

func MarketPositionsFromProto

func MarketPositionsFromProto(mp *snapshot.MarketPositions) *MarketPositions

func (MarketPositions) IntoProto

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

type MarketState

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

type MarketStateUpdateConfiguration added in v0.73.0

type MarketStateUpdateConfiguration struct {
	MarketID        string
	SettlementPrice *num.Uint
	UpdateType      MarketStateUpdateType
}

func (MarketStateUpdateConfiguration) String added in v0.73.0

type MarketStats added in v0.73.0

type MarketStats struct {
	PartiesOpenNotionalVolume map[string]*num.Uint
	PartiesTotalTradeVolume   map[string]*num.Uint
}

type MarketTimestamps

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

func MarketTimestampsFromProto

func MarketTimestampsFromProto(p *vegapb.MarketTimestamps) *MarketTimestamps

func (MarketTimestamps) DeepClone

func (m MarketTimestamps) DeepClone() *MarketTimestamps

func (MarketTimestamps) IntoProto

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

func (MarketTimestamps) String

func (m MarketTimestamps) String() string

type MarketTradingMode

type MarketTradingMode = vegapb.Market_TradingMode
const (
	// Default value, this is invalid.
	MarketTradingModeUnspecified MarketTradingMode = vegapb.Market_TRADING_MODE_UNSPECIFIED
	// Normal trading.
	MarketTradingModeContinuous MarketTradingMode = vegapb.Market_TRADING_MODE_CONTINUOUS
	// Auction trading (FBA).
	MarketTradingModeBatchAuction MarketTradingMode = vegapb.Market_TRADING_MODE_BATCH_AUCTION
	// Opening auction.
	MarketTradingModeOpeningAuction MarketTradingMode = vegapb.Market_TRADING_MODE_OPENING_AUCTION
	// Auction triggered by monitoring.
	MarketTradingModeMonitoringAuction MarketTradingMode = vegapb.Market_TRADING_MODE_MONITORING_AUCTION
	// No trading allowed.
	MarketTradingModeNoTrading MarketTradingMode = vegapb.Market_TRADING_MODE_NO_TRADING
	// Special auction mode for market suspended via governance.
	MarketTradingModeSuspendedViaGovernance MarketTradingMode = vegapb.Market_TRADING_MODE_SUSPENDED_VIA_GOVERNANCE
	// Long block auction.
	MarketTradingModelLongBlockAuction MarketTradingMode = vegapb.Market_TRADING_MODE_LONG_BLOCK_AUCTION
)

type MarketType added in v0.73.0

type MarketType uint32
const (
	MarketTypeUnspecified MarketType = iota
	MarketTypeFuture
	MarketTypeSpot
	MarketTypePerp
)

type MatchingBook

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

func MatchingBookFromProto

func MatchingBookFromProto(mb *snapshot.MatchingBook) *MatchingBook

func (MatchingBook) IntoProto

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

type Membership added in v0.73.0

type Membership struct {
	PartyID        PartyID
	JoinedAt       time.Time
	StartedAtEpoch uint64
}

type Metadata

type Metadata struct {
	Version         int64       // the version of the AVL tree
	NodeHashes      []*NodeHash // the nodes of the AVL tree ordered such that it can be imported with identical shape
	ChunkHashes     []string    // the hashes of each chunk so that we can verify they are complete when sent over state-sync
	ProtocolVersion string      // the version of the protocol that generated this snapshot
	ProtocolUpgrade bool        // whether or not this snapshot was taken for the purpose of a protocol upgrade
}

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) ClearSuccessor added in v0.72.3

func (n *NewMarket) ClearSuccessor()

func (NewMarket) DeepClone

func (n NewMarket) DeepClone() *NewMarket

func (NewMarket) IntoProto

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

func (NewMarket) ParentMarketID added in v0.72.0

func (n NewMarket) ParentMarketID() (string, bool)

func (NewMarket) String

func (n NewMarket) String() string

func (NewMarket) Successor added in v0.72.0

func (n NewMarket) Successor() *SuccessorConfig

type NewMarketConfiguration

type NewMarketConfiguration struct {
	Instrument                    *InstrumentConfiguration
	DecimalPlaces                 uint64
	PositionDecimalPlaces         int64
	Metadata                      []string
	PriceMonitoringParameters     *PriceMonitoringParameters
	LiquidityMonitoringParameters *LiquidityMonitoringParameters
	LiquiditySLAParameters        *LiquiditySLAParams
	LiquidityFeeSettings          *LiquidityFeeSettings

	RiskParameters          newRiskParams
	LinearSlippageFactor    num.Decimal
	QuadraticSlippageFactor num.Decimal
	Successor               *SuccessorConfig
	// New market risk model parameters
	//
	// Types that are valid to be assigned to RiskParameters:
	//	*NewMarketConfigurationSimple
	//	*NewMarketConfigurationLogNormal
	// RiskParameters isNewMarketConfiguration_RiskParameters
	// Trading mode for the new market
	//
	// Types that are valid to be assigned to TradingMode:
	//	*NewMarketConfiguration_Continuous
	//	*NewMarketConfiguration_Discrete
	// TradingMode          isNewMarketConfiguration_TradingMode `protobuf_oneof:"trading_mode"`
	LiquidationStrategy    *LiquidationStrategy
	MarkPriceConfiguration *CompositePriceConfiguration
	TickSize               *num.Uint
	EnableTxReordering     bool
}

func (NewMarketConfiguration) DeepClone

func (NewMarketConfiguration) GetFuture added in v0.72.0

func (NewMarketConfiguration) GetPerps added in v0.73.0

func (NewMarketConfiguration) GetSpot added in v0.72.0

func (NewMarketConfiguration) IntoProto

func (NewMarketConfiguration) ProductType added in v0.72.0

func (n NewMarketConfiguration) ProductType() ProductType

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 NewSpotMarket added in v0.72.0

type NewSpotMarket struct {
	Changes *NewSpotMarketConfiguration
}

func (NewSpotMarket) DeepClone added in v0.72.0

func (n NewSpotMarket) DeepClone() *NewSpotMarket

func (NewSpotMarket) IntoProto added in v0.72.0

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

func (NewSpotMarket) String added in v0.72.0

func (n NewSpotMarket) String() string

type NewSpotMarketConfiguration added in v0.72.0

type NewSpotMarketConfiguration struct {
	Instrument                *InstrumentConfiguration
	PriceDecimalPlaces        uint64
	SizeDecimalPlaces         int64
	Metadata                  []string
	PriceMonitoringParameters *PriceMonitoringParameters
	TargetStakeParameters     *TargetStakeParameters
	RiskParameters            newRiskParams
	SLAParams                 *LiquiditySLAParams
	LiquidityFeeSettings      *LiquidityFeeSettings
	TickSize                  *num.Uint
	EnableTxReordering        bool
}

func NewSpotMarketConfigurationFromProto added in v0.72.0

func NewSpotMarketConfigurationFromProto(p *vegapb.NewSpotMarketConfiguration) (*NewSpotMarketConfiguration, error)

func (NewSpotMarketConfiguration) DeepClone added in v0.72.0

func (NewSpotMarketConfiguration) IntoProto added in v0.72.0

func (NewSpotMarketConfiguration) String added in v0.72.0

type NewSpotMarketConfigurationLogNormal added in v0.72.0

type NewSpotMarketConfigurationLogNormal struct {
	LogNormal *LogNormalRiskModel
}

func NewSpotMarketConfigurationLogNormalFromProto added in v0.72.0

func NewSpotMarketConfigurationLogNormalFromProto(p *vegapb.NewSpotMarketConfiguration_LogNormal) *NewSpotMarketConfigurationLogNormal

func (NewSpotMarketConfigurationLogNormal) DeepClone added in v0.72.0

func (n NewSpotMarketConfigurationLogNormal) DeepClone() newRiskParams

func (NewSpotMarketConfigurationLogNormal) IntoProto added in v0.72.0

func (NewSpotMarketConfigurationLogNormal) String added in v0.72.0

type NewSpotMarketConfigurationSimple added in v0.72.0

type NewSpotMarketConfigurationSimple struct {
	Simple *SimpleModelParams
}

func NewSpotMarketConfigurationSimpleFromProto added in v0.72.0

func NewSpotMarketConfigurationSimpleFromProto(p *vegapb.NewSpotMarketConfiguration_Simple) *NewSpotMarketConfigurationSimple

func (NewSpotMarketConfigurationSimple) DeepClone added in v0.72.0

func (n NewSpotMarketConfigurationSimple) DeepClone() newRiskParams

func (NewSpotMarketConfigurationSimple) IntoProto added in v0.72.0

func (NewSpotMarketConfigurationSimple) String added in v0.72.0

type NewTransfer added in v0.72.0

type NewTransfer struct {
	Changes *NewTransferConfiguration
}

func (NewTransfer) DeepClone added in v0.72.0

func (n NewTransfer) DeepClone() *NewTransfer

func (NewTransfer) IntoProto added in v0.72.0

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

func (NewTransfer) String added in v0.72.0

func (n NewTransfer) String() string

type NewTransferConfiguration added in v0.72.0

type NewTransferConfiguration struct {
	SourceType              AccountType
	DestinationType         AccountType
	Asset                   string
	Source                  string
	Destination             string
	TransferType            vega.GovernanceTransferType
	MaxAmount               *num.Uint
	FractionOfBalance       num.Decimal
	Kind                    TransferKind
	OneOffTransferConfig    *vega.OneOffTransfer
	RecurringTransferConfig *vega.RecurringTransfer
}

func NewTransferConfigurationFromProto added in v0.72.0

func NewTransferConfigurationFromProto(p *vegapb.NewTransferConfiguration) (*NewTransferConfiguration, error)

func (NewTransferConfiguration) DeepClone added in v0.72.0

func (NewTransferConfiguration) IntoProto added in v0.72.0

func (NewTransferConfiguration) String added in v0.72.0

func (n NewTransferConfiguration) String() 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
	NodeVoteTypeEthereumContractCallResult NodeVoteType = proto.NodeVote_TYPE_ETHEREUM_CONTRACT_CALL_RESULT
	NodeVoteTypeEthereumHeartbeat          NodeVoteType = proto.NodeVote_TYPE_ETHEREUM_HEARTBEAT
)

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
	Pending bool
}

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 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
	PostOnly      bool
	ReduceOnly    bool

	IcebergOrder     *IcebergOrder
	GeneratedOffbook bool
	// contains filtered or unexported fields
}

func OrderFromProto

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

func (*Order) ApplyOrderAmendment added in v0.73.0

func (o *Order) ApplyOrderAmendment(amendment *OrderAmendment, updatedAtNano int64, priceFactor num.Decimal) (order *Order, err error)

ApplyOrderAmendment assumes the amendment have been validated before.

func (*Order) ClearUpExtraRemaining added in v0.70.0

func (o *Order) ClearUpExtraRemaining()

func (Order) Clone

func (o Order) Clone() *Order

func (*Order) Create

func (o *Order) Create(t int64) *Order

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

func (*Order) HasTraded

func (o *Order) HasTraded() bool

func (*Order) IcebergNeedsRefresh added in v0.72.0

func (o *Order) IcebergNeedsRefresh() bool

IcebergNeedsRefresh returns whether the given iceberg order's visible peak has dropped below the minimum visible size, and there is hidden volume available to restore it.

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) 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) ReduceOnlyAdjustRemaining added in v0.70.0

func (o *Order) ReduceOnlyAdjustRemaining(extraSize uint64)

func (*Order) SetIcebergPeaks added in v0.72.0

func (o *Order) SetIcebergPeaks()

SetIcebergPeaks will restore the given iceberg orders visible size with some of its hidden volume.

func (Order) String

func (o Order) String() string

func (*Order) TrueRemaining added in v0.72.0

func (o *Order) TrueRemaining() uint64

TrueRemaining is the full remaining size of an order. If this is an iceberg order it will return the visible peak + the hidden volume.

func (*Order) Update

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

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

func (*Order) ValidatePeggedOrder added in v0.73.0

func (order *Order) ValidatePeggedOrder() OrderError

type OrderAmendment

type OrderAmendment struct {
	OrderID         string
	MarketID        string
	Price           *num.Uint
	SizeDelta       int64
	Size            *uint64
	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
	OrderErrorPostOnlyOrderWouldTrade                OrderError = proto.OrderError_ORDER_ERROR_POST_ONLY_ORDER_WOULD_TRADE
	OrderErrorReduceOnlyOrderWouldNotReducePosition  OrderError = proto.OrderError_ORDER_ERROR_REDUCE_ONLY_ORDER_WOULD_NOT_REDUCE_POSITION
	OrderErrorIsolatedMarginCheckFailed              OrderError = proto.OrderError_ORDER_ERROR_ISOLATED_MARGIN_CHECK_FAILED
	OrderErrorPeggedOrdersNotAllowedInIsolatedMargin OrderError = proto.OrderError_ORDER_ERROR_PEGGED_ORDERS_NOT_ALLOWED_IN_ISOLATED_MARGIN_MODE
	OrderErrorPriceNotInTickSize                     OrderError = proto.OrderError_ORDER_ERROR_PRICE_NOT_IN_TICK_SIZE
	OrderErrorPriceLTEMaxPrice                       OrderError = proto.OrderError_ORDER_ERROR_PRICE_MUST_BE_LESS_THAN_OR_EQUAL_TO_MAX_PRICE
)

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
	PostOnly     bool
	ReduceOnly   bool
	IcebergOrder *IcebergOrder
}

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 PaidLiquidityFeesStats added in v0.73.0

type PaidLiquidityFeesStats struct {
	TotalFeesPaid    *num.Uint
	FeesPaidPerParty map[string]*num.Uint
}

func NewLiquidityFeeStats added in v0.73.0

func NewLiquidityFeeStats() *PaidLiquidityFeesStats

func NewPaidLiquidityFeesStatsFromProto added in v0.73.0

func NewPaidLiquidityFeesStatsFromProto(fsp *eventspb.PaidLiquidityFeesStats) *PaidLiquidityFeesStats

func (*PaidLiquidityFeesStats) RegisterTotalFeesAmountPerParty added in v0.73.0

func (f *PaidLiquidityFeesStats) RegisterTotalFeesAmountPerParty(totalFeesAmountPerParty map[string]*num.Uint)

func (*PaidLiquidityFeesStats) ToProto added in v0.73.0

func (f *PaidLiquidityFeesStats) ToProto(marketID, asset string, epochSeq uint64) *eventspb.PaidLiquidityFeesStats

type Party

type Party struct {
	Id string
}

func (Party) IntoProto added in v0.73.0

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

type PartyContributionScore added in v0.73.0

type PartyContributionScore struct {
	Party          string
	Score          num.Decimal
	StakingBalance *num.Uint
	OpenVolume     *num.Uint
	TotalFeesPaid  *num.Uint
	IsEligible     bool
	RankingIndex   int64
}

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

type PartyCount

type PartyCount struct {
	Party string
	Count uint64
}

type PartyID added in v0.73.0

type PartyID string

func (PartyID) String added in v0.73.0

func (p PartyID) String() string

type PartyProfile added in v0.74.0

type PartyProfile struct {
	PartyID     PartyID
	Alias       string
	Metadata    map[string]string
	DerivedKeys map[string]struct{}
}

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) IntoProto

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

func (Payload) Key

func (p Payload) Key() string

func (Payload) Namespace

func (p Payload) Namespace() SnapshotNamespace

func (Payload) TreeKey added in v0.73.0

func (p Payload) TreeKey() string

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 PayloadActivityStreak added in v0.73.0

type PayloadActivityStreak struct {
	ActivityStreak *snapshotpb.ActivityStreak
}

func PayloadActivityStreakFromProto added in v0.73.0

func PayloadActivityStreakFromProto(vestingPayload *snapshotpb.Payload_ActivityStreak) *PayloadActivityStreak

func (*PayloadActivityStreak) IntoProto added in v0.73.0

func (*PayloadActivityStreak) Key added in v0.73.0

func (p *PayloadActivityStreak) Key() string

func (*PayloadActivityStreak) Namespace added in v0.73.0

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 PayloadBankingDeposits

type PayloadBankingDeposits struct {
	BankingDeposits *BankingDeposits
}

func (PayloadBankingDeposits) IntoProto

func (*PayloadBankingDeposits) Key

func (*PayloadBankingDeposits) Namespace

type PayloadBankingEVMBridgeStates added in v0.76.0

type PayloadBankingEVMBridgeStates struct {
	BankingBridgeStates []*checkpointpb.BridgeState
}

func PayloadBankingEVMBridgeStatesFromProto added in v0.76.0

func PayloadBankingEVMBridgeStatesFromProto(pbbs *snapshot.Payload_BankingEvmBridgeStates) *PayloadBankingEVMBridgeStates

func (PayloadBankingEVMBridgeStates) IntoProto added in v0.76.0

func (*PayloadBankingEVMBridgeStates) Key added in v0.76.0

func (*PayloadBankingEVMBridgeStates) Namespace added in v0.76.0

type PayloadBankingPrimaryBridgeState added in v0.76.0

type PayloadBankingPrimaryBridgeState struct {
	BankingBridgeState *BankingBridgeState
}

func PayloadBankingPrimaryBridgeStateFromProto added in v0.76.0

func PayloadBankingPrimaryBridgeStateFromProto(pbbs *snapshot.Payload_BankingPrimaryBridgeState) *PayloadBankingPrimaryBridgeState

func (PayloadBankingPrimaryBridgeState) IntoProto added in v0.76.0

func (*PayloadBankingPrimaryBridgeState) Key added in v0.76.0

func (*PayloadBankingPrimaryBridgeState) Namespace added in v0.76.0

type PayloadBankingRecurringGovernanceTransfers added in v0.72.0

type PayloadBankingRecurringGovernanceTransfers struct {
	BankingRecurringGovernanceTransfers []*checkpointpb.GovernanceTransfer
}

func (PayloadBankingRecurringGovernanceTransfers) IntoProto added in v0.72.0

func (*PayloadBankingRecurringGovernanceTransfers) Key added in v0.72.0

func (*PayloadBankingRecurringGovernanceTransfers) Namespace added in v0.72.0

type PayloadBankingRecurringTransfers

type PayloadBankingRecurringTransfers struct {
	BankingRecurringTransfers *checkpointpb.RecurringTransfers
	NextMetricUpdate          time.Time
}

func (PayloadBankingRecurringTransfers) IntoProto

func (*PayloadBankingRecurringTransfers) Key

func (*PayloadBankingRecurringTransfers) Namespace

type PayloadBankingScheduledGovernanceTransfers added in v0.72.0

type PayloadBankingScheduledGovernanceTransfers struct {
	BankingScheduledGovernanceTransfers []*checkpointpb.ScheduledGovernanceTransferAtTime
}

func (PayloadBankingScheduledGovernanceTransfers) IntoProto added in v0.72.0

func (*PayloadBankingScheduledGovernanceTransfers) Key added in v0.72.0

func (*PayloadBankingScheduledGovernanceTransfers) Namespace added in v0.72.0

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 PayloadBankingTransferFeeDiscounts added in v0.74.0

type PayloadBankingTransferFeeDiscounts struct {
	BankingTransferFeeDiscounts *snapshot.BankingTransferFeeDiscounts
}

func PayloadBankingTransferFeeDiscountsFromProto added in v0.74.0

func PayloadBankingTransferFeeDiscountsFromProto(pbd *snapshot.Payload_BankingTransferFeeDiscounts) *PayloadBankingTransferFeeDiscounts

func (PayloadBankingTransferFeeDiscounts) IntoProto added in v0.74.0

func (*PayloadBankingTransferFeeDiscounts) Key added in v0.74.0

func (*PayloadBankingTransferFeeDiscounts) Namespace added in v0.74.0

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 PayloadEVMFwdHeartbeats added in v0.77.0

type PayloadEVMFwdHeartbeats struct {
	EVMFwdHeartbeats *snapshot.EVMFwdHeartbeats
}

func PayloadEVMFwdHeartbeatsFromProto added in v0.77.0

func PayloadEVMFwdHeartbeatsFromProto(pl *snapshot.Payload_EvmFwdHeartbeats) *PayloadEVMFwdHeartbeats

func (*PayloadEVMFwdHeartbeats) IntoProto added in v0.77.0

func (*PayloadEVMFwdHeartbeats) Key added in v0.77.0

func (*PayloadEVMFwdHeartbeats) Namespace added in v0.77.0

type PayloadEVMMultisigTopologies added in v0.76.0

type PayloadEVMMultisigTopologies struct {
	Topologies []*snapshot.EVMMultisigTopology
}

func PayloadEVMMultisigTopologiesFromProto added in v0.76.0

func PayloadEVMMultisigTopologiesFromProto(
	s *snapshot.Payload_EvmMultisigTopologies,
) *PayloadEVMMultisigTopologies

func (*PayloadEVMMultisigTopologies) Key added in v0.76.0

func (*PayloadEVMMultisigTopologies) Namespace added in v0.76.0

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 PayloadEthContractCallEvent added in v0.73.0

type PayloadEthContractCallEvent struct {
	EthContractCallEvent []*ethcall.ContractCallEvent
}

func PayloadEthContractCallEventFromProto added in v0.73.0

func PayloadEthContractCallEventFromProto(svd *snapshot.Payload_EthContractCallResults) *PayloadEthContractCallEvent

func (*PayloadEthContractCallEvent) IntoProto added in v0.73.0

func (*PayloadEthContractCallEvent) Key added in v0.73.0

func (*PayloadEthContractCallEvent) Namespace added in v0.73.0

type PayloadEthOracleLastBlock added in v0.73.0

type PayloadEthOracleLastBlock struct {
	EthOracleLastBlock *EthBlock
}

func PayloadEthOracleVerifierLastBlockFromProto added in v0.73.0

func PayloadEthOracleVerifierLastBlockFromProto(svd *snapshot.Payload_EthOracleVerifierLastBlock) *PayloadEthOracleLastBlock

func (*PayloadEthOracleLastBlock) IntoProto added in v0.73.0

func (*PayloadEthOracleLastBlock) Key added in v0.73.0

func (*PayloadEthOracleLastBlock) Namespace added in v0.73.0

type PayloadEthVerifierMisc added in v0.74.9

type PayloadEthVerifierMisc struct {
	Misc *snapshot.EthOracleVerifierMisc
}

func PayloadEthOracleVerifierMisc added in v0.74.9

func PayloadEthOracleVerifierMisc(sp *snapshot.Payload_EthOracleVerifierMisc) *PayloadEthVerifierMisc

func (*PayloadEthVerifierMisc) IntoProto added in v0.74.9

func (*PayloadEthVerifierMisc) Key added in v0.74.9

func (*PayloadEthVerifierMisc) Namespace added in v0.74.9

type PayloadEventForwarder

type PayloadEventForwarder struct {
	// keys are deprecated, to be removed after 74
	Keys []string
	// Buckets are used with the new upgrade
	Buckets []*snapshot.EventForwarderBucket
}

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 PayloadGovernanceBatchActive added in v0.74.0

type PayloadGovernanceBatchActive struct {
	GovernanceBatchActive *GovernanceBatchActive
}

func PayloadGovernanceBatchActiveFromProto added in v0.74.0

func PayloadGovernanceBatchActiveFromProto(ga *snapshot.Payload_GovernanceBatchActive) *PayloadGovernanceBatchActive

func (PayloadGovernanceBatchActive) IntoProto added in v0.74.0

func (*PayloadGovernanceBatchActive) Key added in v0.74.0

func (*PayloadGovernanceBatchActive) Namespace added in v0.74.0

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 PayloadHoldingAccountTracker added in v0.73.0

type PayloadHoldingAccountTracker struct {
	HoldingAccountTracker *HoldingAccountTracker
}

func PayloadHoldingAccountTrackerFromProto added in v0.73.0

func PayloadHoldingAccountTrackerFromProto(pmb *snapshot.Payload_HoldingAccountTracker) *PayloadHoldingAccountTracker

func (PayloadHoldingAccountTracker) IntoProto added in v0.73.0

func (*PayloadHoldingAccountTracker) Key added in v0.73.0

func (*PayloadHoldingAccountTracker) Namespace added in v0.73.0

type PayloadL2EthOracles added in v0.74.0

type PayloadL2EthOracles struct {
	L2EthOracles *snapshot.L2EthOracles
}

func PayloadL2EthOraclesFromProto added in v0.74.0

func PayloadL2EthOraclesFromProto(sp *snapshot.Payload_L2EthOracles) *PayloadL2EthOracles

func (*PayloadL2EthOracles) IntoProto added in v0.74.0

func (*PayloadL2EthOracles) Key added in v0.74.0

func (*PayloadL2EthOracles) Key() string

func (*PayloadL2EthOracles) Namespace added in v0.74.0

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 PayloadLiquidityV2Parameters added in v0.73.0

type PayloadLiquidityV2Parameters struct {
	Parameters *snapshot.LiquidityV2Parameters
}

func PayloadLiquidityV2ParamsFromProto added in v0.73.0

func PayloadLiquidityV2ParamsFromProto(s *snapshot.Payload_LiquidityV2Parameters) *PayloadLiquidityV2Parameters

func (*PayloadLiquidityV2Parameters) Key added in v0.73.0

func (*PayloadLiquidityV2Parameters) Namespace added in v0.73.0

type PayloadLiquidityV2PendingProvisions added in v0.73.0

type PayloadLiquidityV2PendingProvisions struct {
	PendingProvisions *snapshot.LiquidityV2PendingProvisions
}

func (*PayloadLiquidityV2PendingProvisions) Key added in v0.73.0

func (*PayloadLiquidityV2PendingProvisions) Namespace added in v0.73.0

type PayloadLiquidityV2Performances added in v0.73.0

type PayloadLiquidityV2Performances struct {
	Performances *snapshot.LiquidityV2Performances
}

func PayloadLiquidityV2PerformancesFromProto added in v0.73.0

func PayloadLiquidityV2PerformancesFromProto(s *snapshot.Payload_LiquidityV2Performances) *PayloadLiquidityV2Performances

func (*PayloadLiquidityV2Performances) Key added in v0.73.0

func (*PayloadLiquidityV2Performances) Namespace added in v0.73.0

type PayloadLiquidityV2Provisions added in v0.73.0

type PayloadLiquidityV2Provisions struct {
	Provisions *snapshot.LiquidityV2Provisions
}

func PayloadLiquidityV2ProvisionsFromProto added in v0.73.0

func PayloadLiquidityV2ProvisionsFromProto(s *snapshot.Payload_LiquidityV2Provisions) *PayloadLiquidityV2Provisions

func (*PayloadLiquidityV2Provisions) Key added in v0.73.0

func (*PayloadLiquidityV2Provisions) Namespace added in v0.73.0

type PayloadLiquidityV2Scores added in v0.73.0

type PayloadLiquidityV2Scores struct {
	Scores *snapshot.LiquidityV2Scores
}

func PayloadLiquidityV2ScoresFromProto added in v0.73.0

func PayloadLiquidityV2ScoresFromProto(s *snapshot.Payload_LiquidityV2Scores) *PayloadLiquidityV2Scores

func (*PayloadLiquidityV2Scores) Key added in v0.73.0

func (*PayloadLiquidityV2Scores) Namespace added in v0.73.0

type PayloadLiquidityV2Supplied added in v0.73.0

type PayloadLiquidityV2Supplied struct {
	Supplied *snapshot.LiquidityV2Supplied
}

func PayloadLiquidityV2SuppliedFromProto added in v0.73.0

func PayloadLiquidityV2SuppliedFromProto(s *snapshot.Payload_LiquidityV2Supplied) *PayloadLiquidityV2Supplied

func (*PayloadLiquidityV2Supplied) Key added in v0.73.0

func (*PayloadLiquidityV2Supplied) Namespace added in v0.73.0

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 PayloadPaidLiquidityV2FeeStats added in v0.73.0

type PayloadPaidLiquidityV2FeeStats struct {
	Stats *snapshot.LiquidityV2PaidFeesStats
}

func PayloadLiquidityV2PaidFeesStatsFromProto added in v0.73.0

func PayloadLiquidityV2PaidFeesStatsFromProto(s *snapshot.Payload_LiquidityV2PaidFeesStats) *PayloadPaidLiquidityV2FeeStats

func (*PayloadPaidLiquidityV2FeeStats) Key added in v0.73.0

func (*PayloadPaidLiquidityV2FeeStats) Namespace added in v0.73.0

type PayloadParties added in v0.74.0

type PayloadParties struct {
	Profiles []*snapshotpb.PartyProfile
}

func PayloadPartiesFromProto added in v0.74.0

func PayloadPartiesFromProto(payload *snapshotpb.Payload_Parties) *PayloadParties

func (*PayloadParties) IntoProto added in v0.74.0

func (p *PayloadParties) IntoProto() *snapshotpb.Payload_Parties

func (*PayloadParties) Key added in v0.74.0

func (p *PayloadParties) Key() string

func (*PayloadParties) Namespace added in v0.74.0

func (*PayloadParties) 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
	HeightToNonceRef map[uint64][]*snapshot.NonceRef
	ActiveParams     []*snapshot.ProofOfWorkParams
	ActiveStates     []*snapshot.ProofOfWorkState
	LastPruningBlock uint64
}

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 PayloadReferralProgramState added in v0.73.0

type PayloadReferralProgramState struct {
	FactorByReferee    []*snapshotpb.FactorByReferee
	CurrentProgram     *vegapb.ReferralProgram
	NewProgram         *vegapb.ReferralProgram
	LastProgramVersion uint64
	ProgramHasEnded    bool
	Sets               []*snapshotpb.ReferralSet
}

func PayloadReferralProgramStateFromProto added in v0.73.0

func PayloadReferralProgramStateFromProto(payload *snapshotpb.Payload_ReferralProgram) *PayloadReferralProgramState

func (*PayloadReferralProgramState) IntoProto added in v0.73.0

func (*PayloadReferralProgramState) Key added in v0.73.0

func (*PayloadReferralProgramState) Namespace added in v0.73.0

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 PayloadSpotLiquidityTarget added in v0.72.0

type PayloadSpotLiquidityTarget struct {
	Target *snapshot.SpotLiquidityTarget
}

func PayloadSpotLiquidityTargetFromProto added in v0.72.0

func PayloadSpotLiquidityTargetFromProto(s *snapshot.Payload_SpotLiquidityTarget) *PayloadSpotLiquidityTarget

func (*PayloadSpotLiquidityTarget) Key added in v0.72.0

func (*PayloadSpotLiquidityTarget) Namespace added in v0.72.0

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
	PendingStakeTotalSupply *StakeTotalSupply
}

func (PayloadStakingAccounts) IntoProto

func (*PayloadStakingAccounts) Key

func (*PayloadStakingAccounts) Namespace

type PayloadTeamSwitches added in v0.73.0

type PayloadTeamSwitches struct {
	TeamSwitches []*snapshotpb.TeamSwitch
}

func PayloadTeamSwitchesFromProto added in v0.73.0

func PayloadTeamSwitchesFromProto(teamsPayload *snapshotpb.Payload_TeamSwitches) *PayloadTeamSwitches

func (*PayloadTeamSwitches) IntoProto added in v0.73.0

func (*PayloadTeamSwitches) Key added in v0.73.0

func (p *PayloadTeamSwitches) Key() string

func (*PayloadTeamSwitches) Namespace added in v0.73.0

type PayloadTeams added in v0.73.0

type PayloadTeams struct {
	Teams []*snapshotpb.Team
}

func PayloadTeamsFromProto added in v0.73.0

func PayloadTeamsFromProto(teamsPayload *snapshotpb.Payload_Teams) *PayloadTeams

func (*PayloadTeams) IntoProto added in v0.73.0

func (p *PayloadTeams) IntoProto() *snapshotpb.Payload_Teams

func (*PayloadTeams) Key added in v0.73.0

func (p *PayloadTeams) Key() string

func (*PayloadTeams) Namespace added in v0.73.0

func (*PayloadTeams) Namespace() SnapshotNamespace

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 PayloadTxCache added in v0.77.0

type PayloadTxCache struct {
	TxCache *snapshot.TxCache
}

func PayloadTxCacheFromProto added in v0.77.0

func PayloadTxCacheFromProto(txCachePayload *snapshot.Payload_TxCache) *PayloadTxCache

func (*PayloadTxCache) IntoProto added in v0.77.0

func (p *PayloadTxCache) IntoProto() *snapshot.Payload_TxCache

func (*PayloadTxCache) Key added in v0.77.0

func (p *PayloadTxCache) Key() string

func (*PayloadTxCache) Namespace added in v0.77.0

func (*PayloadTxCache) Namespace() SnapshotNamespace

type PayloadVesting added in v0.73.0

type PayloadVesting struct {
	Vesting *snapshotpb.Vesting
}

func PayloadVestingFromProto added in v0.73.0

func PayloadVestingFromProto(vestingPayload *snapshotpb.Payload_Vesting) *PayloadVesting

func (*PayloadVesting) IntoProto added in v0.73.0

func (p *PayloadVesting) IntoProto() *snapshotpb.Payload_Vesting

func (*PayloadVesting) Key added in v0.73.0

func (p *PayloadVesting) Key() string

func (*PayloadVesting) Namespace added in v0.73.0

func (*PayloadVesting) Namespace() SnapshotNamespace

type PayloadVolumeDiscountProgram added in v0.73.0

type PayloadVolumeDiscountProgram struct {
	VolumeDiscountProgram *snapshot.VolumeDiscountProgram
}

func PayloadVolumeDiscountProgramFromProto added in v0.73.0

func PayloadVolumeDiscountProgramFromProto(t *snapshot.Payload_VolumeDiscountProgram) *PayloadVolumeDiscountProgram

func (*PayloadVolumeDiscountProgram) IntoProto added in v0.73.0

func (*PayloadVolumeDiscountProgram) Key added in v0.73.0

func (*PayloadVolumeDiscountProgram) Namespace added in v0.73.0

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 PerpetualData added in v0.73.0

type PerpetualData struct {
	FundingRate                    string
	FundingPayment                 string
	InternalTWAP                   string
	ExternalTWAP                   string
	SeqNum                         uint64
	StartTime                      int64
	InternalCompositePrice         *num.Uint
	NextInternalCompositePriceCalc int64
	InternalCompositePriceType     CompositePriceType
	UnderlyingIndexPrice           *num.Uint
	InternalCompositePriceState    *CompositePriceState
}

func (PerpetualData) IntoProto added in v0.73.0

func (p PerpetualData) IntoProto() *vegapb.ProductData

type Perps added in v0.73.0

type Perps struct {
	SettlementAsset string
	QuoteName       string

	MarginFundingFactor num.Decimal
	InterestRate        num.Decimal
	ClampLowerBound     num.Decimal
	ClampUpperBound     num.Decimal

	// funding payment modifiers
	FundingRateScalingFactor *num.Decimal
	FundingRateLowerBound    *num.Decimal
	FundingRateUpperBound    *num.Decimal

	DataSourceSpecForSettlementData     *datasource.Spec
	DataSourceSpecForSettlementSchedule *datasource.Spec
	DataSourceSpecBinding               *datasource.SpecBindingForPerps

	InternalCompositePriceConfig *CompositePriceConfiguration
}

func PerpsFromProto added in v0.73.0

func PerpsFromProto(p *vegapb.Perpetual) *Perps

func (Perps) IntoProto added in v0.73.0

func (p Perps) IntoProto() *vegapb.Perpetual

func (Perps) String added in v0.73.0

func (p Perps) String() string

type PerpsProduct added in v0.73.0

type PerpsProduct struct {
	SettlementAsset string
	QuoteName       string

	MarginFundingFactor num.Decimal
	InterestRate        num.Decimal
	ClampLowerBound     num.Decimal
	ClampUpperBound     num.Decimal

	FundingRateScalingFactor *num.Decimal
	FundingRateLowerBound    *num.Decimal
	FundingRateUpperBound    *num.Decimal

	DataSourceSpecForSettlementData     dsdefinition.Definition
	DataSourceSpecForSettlementSchedule dsdefinition.Definition
	DataSourceSpecBinding               *datasource.SpecBindingForPerps

	InternalCompositePriceConfig *CompositePriceConfiguration
}

func (PerpsProduct) Assets added in v0.73.0

func (p PerpsProduct) Assets() []string

func (PerpsProduct) DeepClone added in v0.73.0

func (p PerpsProduct) DeepClone() *PerpsProduct

func (PerpsProduct) IntoProto added in v0.73.0

func (p PerpsProduct) IntoProto() *vegapb.PerpetualProduct

func (PerpsProduct) String added in v0.73.0

func (p PerpsProduct) String() string

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
	AMMVolume          uint64
	AMMVolumeEstimated 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
	Active         bool
}

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 {
	BoundIndex int
	Bound      *PriceBound
	Range      *PriceRange
}

func PriceRangeCacheFromProto

func PriceRangeCacheFromProto(prc *snapshot.PriceRangeCache) *PriceRangeCache

func (PriceRangeCache) IntoProto

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

type ProductData added in v0.73.0

type ProductData struct {
	Data iProductData
}

type ProductType added in v0.72.0

type ProductType int32
const (
	ProductTypeFuture ProductType = iota
	ProductTypeSpot
	ProductTypePerps
	ProductTypeUnspecified // used on updates, if the product is not set
)

type Proposal

type Proposal struct {
	ID                      string
	BatchID                 *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) Decline added in v0.74.0

func (p *Proposal) Decline(reason ProposalError)

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) IsDeclined added in v0.74.0

func (p Proposal) IsDeclined() bool

func (Proposal) IsEnacted added in v0.74.0

func (p Proposal) IsEnacted() bool

func (Proposal) IsFailed added in v0.74.0

func (p Proposal) IsFailed() bool

func (Proposal) IsMarketStateUpdate added in v0.73.0

func (p Proposal) IsMarketStateUpdate() bool

func (Proposal) IsMarketUpdate

func (p Proposal) IsMarketUpdate() bool

func (Proposal) IsNewMarket added in v0.72.0

func (p Proposal) IsNewMarket() bool

func (Proposal) IsOpen added in v0.74.0

func (p Proposal) IsOpen() bool

func (Proposal) IsPassed added in v0.74.0

func (p Proposal) IsPassed() bool

func (Proposal) IsReferralProgramUpdate added in v0.73.0

func (p Proposal) IsReferralProgramUpdate() bool

func (Proposal) IsRejected added in v0.74.0

func (p Proposal) IsRejected() bool

func (Proposal) IsSpotMarketUpdate added in v0.72.0

func (p Proposal) IsSpotMarketUpdate() bool

func (*Proposal) IsSuccessorMarket added in v0.72.0

func (p *Proposal) IsSuccessorMarket() bool

func (Proposal) IsVolumeDiscountProgramUpdate added in v0.73.0

func (p Proposal) IsVolumeDiscountProgramUpdate() bool

func (Proposal) MarketUpdate

func (p Proposal) MarketUpdate() *UpdateMarket

func (Proposal) NewMarket added in v0.72.0

func (p Proposal) NewMarket() *NewMarket

func (*Proposal) Open added in v0.76.0

func (p *Proposal) Open()

func (*Proposal) Reject

func (p *Proposal) Reject(reason ProposalError)

func (*Proposal) RejectWithErr

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

func (Proposal) SpotMarketUpdate added in v0.72.0

func (p Proposal) SpotMarketUpdate() *UpdateSpotMarket

func (Proposal) String

func (p Proposal) String() string

func (Proposal) UpdateMarketState added in v0.73.0

func (p Proposal) UpdateMarketState() *UpdateMarketState

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
	// ProposalErrorLinearSlippageOutOfRange linear slippage factor is negative or too large.
	ProposalErrorLinearSlippageOutOfRange ProposalError = vegapb.ProposalError_PROPOSAL_ERROR_LINEAR_SLIPPAGE_FACTOR_OUT_OF_RANGE
	// ProposalErrorSquaredSlippageOutOfRange squared slippage factor is negative or too large.
	ProposalErrorQuadraticSlippageOutOfRange ProposalError = vegapb.ProposalError_PROPOSAL_ERROR_QUADRATIC_SLIPPAGE_FACTOR_OUT_OF_RANGE
	// ProporsalErrorInvalidGovernanceTransfer governance transfer invalid.
	ProporsalErrorInvalidGovernanceTransfer ProposalError = vegapb.ProposalError_PROPOSAL_ERROR_GOVERNANCE_TRANSFER_PROPOSAL_INVALID
	// ProporsalErrorFailedGovernanceTransfer governance transfer failed.
	ProporsalErrorFailedGovernanceTransfer ProposalError = vegapb.ProposalError_PROPOSAL_ERROR_GOVERNANCE_TRANSFER_PROPOSAL_FAILED
	// ProporsalErrorFailedGovernanceTransferCancel governance transfer cancellation is invalid.
	ProporsalErrorFailedGovernanceTransferCancel ProposalError = vegapb.ProposalError_PROPOSAL_ERROR_GOVERNANCE_CANCEL_TRANSFER_PROPOSAL_INVALID
	// ProposalErrorInvalidFreeform Validation failed for spot proposal.
	ProposalErrorInvalidSpot ProposalError = vegapb.ProposalError_PROPOSAL_ERROR_INVALID_SPOT
	// ProposalErrorSpotNotEnabled is returned when spots are not enabled.
	ProposalErrorSpotNotEnabled ProposalError = vegapb.ProposalError_PROPOSAL_ERROR_SPOT_PRODUCT_DISABLED
	// ProposalErrorInvalidSuccessorMarket indicates the successor market parameters were invalid.
	ProposalErrorInvalidSuccessorMarket ProposalError = vegapb.ProposalError_PROPOSAL_ERROR_INVALID_SUCCESSOR_MARKET
	// ProposalErrorInvalidStateUpdate indicates that a market state update has failed.
	ProposalErrorInvalidStateUpdate ProposalError = vegapb.ProposalError_PROPOSAL_ERROR_INVALID_MARKET_STATE_UPDATE
	// ProposalErrorInvalidSLAParams indicates that liquidity provision SLA params are invalid.
	ProposalErrorMissingSLAParams ProposalError = vegapb.ProposalError_PROPOSAL_ERROR_MISSING_SLA_PARAMS
	// ProposalErrorMissingSLAParams indicates that mandatory SLA params for a new or update spot market is missing.
	ProposalErrorInvalidSLAParams ProposalError = vegapb.ProposalError_PROPOSAL_ERROR_INVALID_SLA_PARAMS
	// ProposalErrorInvalidPerpsProduct Market proposal market contained invalid product definition.
	ProposalErrorInvalidPerpsProduct ProposalError = vegapb.ProposalError_PROPOSAL_ERROR_INVALID_PERPETUAL_PRODUCT
	// ProposalErrorInvalidReferralProgram is returned when the referral program proposal is not valid.
	ProposalErrorInvalidReferralProgram ProposalError = vegapb.ProposalError_PROPOSAL_ERROR_INVALID_REFERRAL_PROGRAM
	// ProposalErrorInvalidVolumeDiscountProgram is returned when the volume discount program proposal is not valid.
	ProposalErrorInvalidVolumeDiscountProgram ProposalError = vegapb.ProposalError_PROPOSAL_ERROR_INVALID_VOLUME_DISCOUNT_PROGRAM
	// ProposalErrorProposalInBatchRejected is returned when one or more proposals in the batch are rejected.
	ProposalErrorProposalInBatchRejected ProposalError = vegapb.ProposalError_PROPOSAL_ERROR_PROPOSAL_IN_BATCH_REJECTED
	// ProposalErrorProposalInBatchDeclined is returned when one or more proposals in the batch are rejected.
	ProposalErrorProposalInBatchDeclined ProposalError = vegapb.ProposalError_PROPOSAL_ERROR_PROPOSAL_IN_BATCH_DECLINED
	// ProposalErrorInvalidSizeDecimalPlaces is returned in spot market when the proposed position decimal places is > base asset decimal places.
	ProposalErrorInvalidSizeDecimalPlaces = vegapb.ProposalError_PROPOSAL_ERROR_INVALID_SIZE_DECIMAL_PLACES
)

type ProposalParameters added in v0.74.0

type ProposalParameters struct {
	MinClose                time.Duration
	MaxClose                time.Duration
	MinEnact                time.Duration
	MaxEnact                time.Duration
	RequiredParticipation   num.Decimal
	RequiredMajority        num.Decimal
	MinProposerBalance      *num.Uint
	MinVoterBalance         *num.Uint
	RequiredParticipationLP num.Decimal
	RequiredMajorityLP      num.Decimal
	MinEquityLikeShare      num.Decimal
}

ProposalParameters stores proposal specific parameters.

func ProposalParametersFromProto added in v0.74.0

func ProposalParametersFromProto(pp *vegapb.ProposalParameters) *ProposalParameters

func (*ProposalParameters) Clone added in v0.74.0

func (*ProposalParameters) ToProto added in v0.74.0

type ProposalRationale

type ProposalRationale struct {
	Description string
	Title       string
}

func ProposalRationaleFromProto

func ProposalRationaleFromProto(p *vegapb.ProposalRationale) *ProposalRationale

func (ProposalRationale) ToProto added in v0.74.0

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 ProposalTerm added in v0.74.0

type ProposalTerm interface {
	DeepClone() ProposalTerm
	GetTermType() ProposalTermsType
	String() string
	// contains filtered or unexported methods
}

type ProposalTerms

type ProposalTerms struct {
	ClosingTimestamp    int64
	EnactmentTimestamp  int64
	ValidationTimestamp int64
	Change              ProposalTerm
}

func ProposalTermsFromProto

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

func (ProposalTerms) DeepClone

func (p ProposalTerms) DeepClone() *ProposalTerms

func (*ProposalTerms) GetCancelTransfer added in v0.72.0

func (p *ProposalTerms) GetCancelTransfer() *CancelTransfer

func (*ProposalTerms) GetMarketStateUpdate added in v0.73.0

func (p *ProposalTerms) GetMarketStateUpdate() *UpdateMarketState

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) GetNewSpotMarket added in v0.72.0

func (p *ProposalTerms) GetNewSpotMarket() *NewSpotMarket

func (*ProposalTerms) GetNewTransfer added in v0.72.0

func (p *ProposalTerms) GetNewTransfer() *NewTransfer

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) GetUpdateReferralProgram added in v0.73.0

func (p *ProposalTerms) GetUpdateReferralProgram() *UpdateReferralProgram

func (*ProposalTerms) GetUpdateSpotMarket added in v0.72.0

func (p *ProposalTerms) GetUpdateSpotMarket() *UpdateSpotMarket

func (*ProposalTerms) GetUpdateVolumeDiscountProgram added in v0.73.0

func (p *ProposalTerms) GetUpdateVolumeDiscountProgram() *UpdateVolumeDiscountProgram

func (ProposalTerms) IntoProto

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

func (*ProposalTerms) IsMarketStateUpdate added in v0.74.0

func (p *ProposalTerms) IsMarketStateUpdate() bool

func (*ProposalTerms) IsMarketUpdate added in v0.74.0

func (p *ProposalTerms) IsMarketUpdate() bool

func (*ProposalTerms) IsNewMarket added in v0.74.0

func (p *ProposalTerms) IsNewMarket() bool

func (*ProposalTerms) IsReferralProgramUpdate added in v0.74.0

func (p *ProposalTerms) IsReferralProgramUpdate() bool

func (*ProposalTerms) IsSpotMarketUpdate added in v0.74.0

func (p *ProposalTerms) IsSpotMarketUpdate() bool

func (*ProposalTerms) IsSuccessorMarket added in v0.74.0

func (p *ProposalTerms) IsSuccessorMarket() bool

func (*ProposalTerms) IsVolumeDiscountProgramUpdate added in v0.74.0

func (p *ProposalTerms) IsVolumeDiscountProgramUpdate() bool

func (*ProposalTerms) MarketUpdate added in v0.74.0

func (p *ProposalTerms) MarketUpdate() *UpdateMarket

func (*ProposalTerms) NewMarket added in v0.74.0

func (p *ProposalTerms) NewMarket() *NewMarket

func (*ProposalTerms) SpotMarketUpdate added in v0.74.0

func (p *ProposalTerms) SpotMarketUpdate() *UpdateSpotMarket

func (ProposalTerms) String

func (p ProposalTerms) String() string

func (*ProposalTerms) UpdateMarketState added in v0.74.0

func (p *ProposalTerms) UpdateMarketState() *UpdateMarketState

type ProposalTermsCancelTransfer added in v0.72.0

type ProposalTermsCancelTransfer struct {
	CancelTransfer *CancelTransfer
}

func NewCancelGovernanceTransferFromProto added in v0.72.0

func NewCancelGovernanceTransferFromProto(cancelTransferProto *vegapb.CancelTransfer) (*ProposalTermsCancelTransfer, error)

func (ProposalTermsCancelTransfer) DeepClone added in v0.72.0

func (ProposalTermsCancelTransfer) GetTermType added in v0.72.0

func (ProposalTermsCancelTransfer) String added in v0.72.0

type ProposalTermsNewAsset

type ProposalTermsNewAsset struct {
	NewAsset *NewAsset
}

func NewNewAssetFromProto

func NewNewAssetFromProto(p *vegapb.NewAsset) (*ProposalTermsNewAsset, error)

func (ProposalTermsNewAsset) DeepClone

func (a ProposalTermsNewAsset) DeepClone() ProposalTerm

func (ProposalTermsNewAsset) GetTermType

func (a ProposalTermsNewAsset) GetTermType() ProposalTermsType

func (ProposalTermsNewAsset) IntoProto

func (a ProposalTermsNewAsset) IntoProto() *vegapb.NewAsset

func (ProposalTermsNewAsset) String

func (a ProposalTermsNewAsset) String() string

type ProposalTermsNewFreeform

type ProposalTermsNewFreeform struct {
	NewFreeform *NewFreeform
}

func NewNewFreeformFromProto

func NewNewFreeformFromProto(_ *vegapb.NewFreeform) *ProposalTermsNewFreeform

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 NewNewMarketFromProto

func NewNewMarketFromProto(newMarketProto *vegapb.NewMarket) (*ProposalTermsNewMarket, error)

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 ProposalTermsNewSpotMarket added in v0.72.0

type ProposalTermsNewSpotMarket struct {
	NewSpotMarket *NewSpotMarket
}

func NewNewSpotMarketFromProto added in v0.72.0

func NewNewSpotMarketFromProto(newSpotMarketProto *vegapb.NewSpotMarket) (*ProposalTermsNewSpotMarket, error)

func (ProposalTermsNewSpotMarket) DeepClone added in v0.72.0

func (ProposalTermsNewSpotMarket) GetTermType added in v0.72.0

func (ProposalTermsNewSpotMarket) String added in v0.72.0

type ProposalTermsNewTransfer added in v0.72.0

type ProposalTermsNewTransfer struct {
	NewTransfer *NewTransfer
}

func NewNewTransferFromProto added in v0.72.0

func NewNewTransferFromProto(newTransferProto *vegapb.NewTransfer) (*ProposalTermsNewTransfer, error)

func (ProposalTermsNewTransfer) DeepClone added in v0.72.0

func (a ProposalTermsNewTransfer) DeepClone() ProposalTerm

func (ProposalTermsNewTransfer) GetTermType added in v0.72.0

func (ProposalTermsNewTransfer) String added in v0.72.0

func (a ProposalTermsNewTransfer) String() string

type ProposalTermsType

type ProposalTermsType int
const (
	ProposalTermsTypeUpdateMarket ProposalTermsType = iota
	ProposalTermsTypeNewMarket
	ProposalTermsTypeUpdateNetworkParameter
	ProposalTermsTypeNewAsset
	ProposalTermsTypeNewFreeform
	ProposalTermsTypeUpdateAsset
	ProposalTermsTypeNewTransfer
	ProposalTermsTypeNewSpotMarket
	ProposalTermsTypeUpdateSpotMarket
	ProposalTermsTypeCancelTransfer
	ProposalTermsTypeUpdateMarketState
	ProposalTermsTypeUpdateReferralProgram
	ProposalTermsTypeUpdateVolumeDiscountProgram
)

type ProposalTermsUpdateAsset

type ProposalTermsUpdateAsset struct {
	UpdateAsset *UpdateAsset
}

func NewUpdateAssetFromProto

func NewUpdateAssetFromProto(updateAssetProto *vegapb.UpdateAsset) (*ProposalTermsUpdateAsset, error)

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 UpdateMarketFromProto

func UpdateMarketFromProto(updateMarketProto *vegapb.UpdateMarket) (*ProposalTermsUpdateMarket, error)

func (ProposalTermsUpdateMarket) DeepClone

func (ProposalTermsUpdateMarket) GetTermType

func (ProposalTermsUpdateMarket) String

func (a ProposalTermsUpdateMarket) String() string

type ProposalTermsUpdateMarketState added in v0.73.0

type ProposalTermsUpdateMarketState struct {
	UpdateMarketState *UpdateMarketState
}

func NewTerminateMarketFromProto added in v0.73.0

func NewTerminateMarketFromProto(updateMarketStateProto *vegapb.UpdateMarketState) (*ProposalTermsUpdateMarketState, error)

func (ProposalTermsUpdateMarketState) DeepClone added in v0.73.0

func (ProposalTermsUpdateMarketState) GetTermType added in v0.73.0

func (ProposalTermsUpdateMarketState) String added in v0.73.0

type ProposalTermsUpdateNetworkParameter

type ProposalTermsUpdateNetworkParameter struct {
	UpdateNetworkParameter *UpdateNetworkParameter
}

func NewUpdateNetworkParameterFromProto

func NewUpdateNetworkParameterFromProto(
	updateNetworkParamProto *vegapb.UpdateNetworkParameter,
) *ProposalTermsUpdateNetworkParameter

func (ProposalTermsUpdateNetworkParameter) DeepClone

func (ProposalTermsUpdateNetworkParameter) GetTermType

func (ProposalTermsUpdateNetworkParameter) IntoProto

func (ProposalTermsUpdateNetworkParameter) String

type ProposalTermsUpdateReferralProgram added in v0.73.0

type ProposalTermsUpdateReferralProgram struct {
	UpdateReferralProgram *UpdateReferralProgram
}

func NewUpdateReferralProgramProposalFromProto added in v0.73.0

func NewUpdateReferralProgramProposalFromProto(
	updateReferralProgramProto *vegapb.UpdateReferralProgram,
) (*ProposalTermsUpdateReferralProgram, error)

func (ProposalTermsUpdateReferralProgram) DeepClone added in v0.73.0

func (ProposalTermsUpdateReferralProgram) GetTermType added in v0.73.0

func (ProposalTermsUpdateReferralProgram) String added in v0.73.0

type ProposalTermsUpdateSpotMarket added in v0.72.0

type ProposalTermsUpdateSpotMarket struct {
	BatchProposalID    string
	EnactmentTimestamp int64
	UpdateSpotMarket   *UpdateSpotMarket
}

func UpdateSpotMarketFromProto added in v0.72.0

func UpdateSpotMarketFromProto(updateSpotMarketProto *vegapb.UpdateSpotMarket) (*ProposalTermsUpdateSpotMarket, error)

func (ProposalTermsUpdateSpotMarket) DeepClone added in v0.72.0

func (ProposalTermsUpdateSpotMarket) GetTermType added in v0.72.0

func (ProposalTermsUpdateSpotMarket) IntoProto added in v0.72.0

func (ProposalTermsUpdateSpotMarket) String added in v0.72.0

type ProposalTermsUpdateVolumeDiscountProgram added in v0.73.0

type ProposalTermsUpdateVolumeDiscountProgram struct {
	UpdateVolumeDiscountProgram *UpdateVolumeDiscountProgram
}

func NewUpdateVolumeDiscountProgramProposalFromProto added in v0.73.0

func NewUpdateVolumeDiscountProgramProposalFromProto(
	updateVolumeDiscountProgramProto *vegapb.UpdateVolumeDiscountProgram,
) (*ProposalTermsUpdateVolumeDiscountProgram, error)

func (ProposalTermsUpdateVolumeDiscountProgram) DeepClone added in v0.73.0

func (ProposalTermsUpdateVolumeDiscountProgram) GetTermType added in v0.73.0

func (ProposalTermsUpdateVolumeDiscountProgram) String added in v0.73.0

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, gameID *string) *eventspb.Transfer

func (*RecurringTransfer) IsValid

func (r *RecurringTransfer) IsValid() error

type RefereeStats added in v0.73.0

type RefereeStats struct {
	DiscountFactor num.Decimal
	TakerVolume    *num.Uint
}

type ReferralProgram added in v0.73.0

type ReferralProgram struct {
	ID                    string
	Version               uint64
	EndOfProgramTimestamp time.Time
	WindowLength          uint64
	BenefitTiers          []*BenefitTier
	StakingTiers          []*StakingTier
}

func NewReferralProgramFromProto added in v0.73.0

func NewReferralProgramFromProto(c *vegapb.ReferralProgram) *ReferralProgram

func (ReferralProgram) IntoProto added in v0.73.0

func (c ReferralProgram) IntoProto() *vegapb.ReferralProgram

func (ReferralProgram) String added in v0.73.0

func (c ReferralProgram) String() string

type ReferralProgramChanges added in v0.73.0

type ReferralProgramChanges struct {
	EndOfProgramTimestamp time.Time
	WindowLength          uint64
	BenefitTiers          []*BenefitTier
	StakingTiers          []*StakingTier
}

func NewReferralProgramChangesFromProto added in v0.73.0

func NewReferralProgramChangesFromProto(c *vegapb.ReferralProgramChanges) *ReferralProgramChanges

func (ReferralProgramChanges) DeepClone added in v0.73.0

func (ReferralProgramChanges) IntoProto added in v0.73.0

func (ReferralProgramChanges) String added in v0.73.0

func (c ReferralProgramChanges) String() string

type ReferralSet added in v0.73.0

type ReferralSet struct {
	ID ReferralSetID

	CreatedAt time.Time
	UpdatedAt time.Time

	Referrer *Membership
	Referees []*Membership

	CurrentRewardFactor            num.Decimal
	CurrentRewardsMultiplier       num.Decimal
	CurrentRewardsFactorMultiplier num.Decimal
}

type ReferralSetID added in v0.73.0

type ReferralSetID string

type ReferralSetStats added in v0.73.0

type ReferralSetStats struct {
	AtEpoch                  uint64
	SetID                    ReferralSetID
	WasEligible              bool
	ReferralSetRunningVolume *num.Uint
	ReferrerTakerVolume      *num.Uint
	RefereesStats            map[PartyID]*RefereeStats
	RewardFactor             num.Decimal
	RewardsMultiplier        num.Decimal
	RewardsFactorMultiplier  num.Decimal
}

type ReferrerReward added in v0.73.0

type ReferrerReward struct {
	MakerFeeReferrerReward          *num.Uint
	InfrastructureFeeReferrerReward *num.Uint
	LiquidityFeeReferrerReward      *num.Uint
}

func NewReferrerReward added in v0.73.0

func NewReferrerReward() *ReferrerReward

func (ReferrerReward) Clone added in v0.73.0

func (rf ReferrerReward) Clone() *ReferrerReward

func (*ReferrerReward) String added in v0.73.0

func (rf *ReferrerReward) String() string

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 RiskFactorOverride added in v0.77.0

type RiskFactorOverride struct {
	Short num.Decimal
	Long  num.Decimal
}

type SLANetworkParams added in v0.73.0

type SLANetworkParams struct {
	BondPenaltyFactor               num.Decimal
	EarlyExitPenalty                num.Decimal
	MaxLiquidityFee                 num.Decimal
	NonPerformanceBondPenaltyMax    num.Decimal
	NonPerformanceBondPenaltySlope  num.Decimal
	StakeToCCYVolume                num.Decimal
	ProvidersFeeCalculationTimeStep time.Duration
}

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
)

func OtherSide added in v0.77.0

func OtherSide(s Side) Side

type SignerEvent

type SignerEvent struct {
	BlockNumber, LogIndex uint64
	TxHash                string

	ID        string
	Address   string
	Nonce     string
	BlockTime int64
	ChainID   string

	Kind SignerEventKind
}

func SignerEventFromEventProto

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

func SignerEventFromSignerAddedProto

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

func SignerEventFromSignerRemovedProto

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

func (SignerEvent) Hash

func (s SignerEvent) Hash() string

func (*SignerEvent) IntoProto

func (*SignerEvent) String

func (s *SignerEvent) String() string

type SignerThresholdSetEvent

type SignerThresholdSetEvent struct {
	BlockNumber, LogIndex uint64
	TxHash                string

	ID        string
	Threshold uint32
	Nonce     string
	BlockTime int64
	ChainID   string
}

func SignerThresholdSetEventFromProto

func SignerThresholdSetEventFromProto(
	s *vgproto.ERC20ThresholdSet,
	blockNumber, logIndex uint64,
	txhash, id, chainID 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
	CurrentEpochSeq uint64
}

func SimpleSpamPolicyFromProto

func SimpleSpamPolicyFromProto(ssp *snapshot.SimpleSpamPolicy) *SimpleSpamPolicy

func (*SimpleSpamPolicy) IntoProto

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

type Snapshot

type Snapshot struct {
	// Fields from the snapshot offering.
	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
	Chunks uint32

	Nodes      []*Payload // the snapshot payloads in the tree (always leaf nodes)
	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) LoadChunk

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

func (*Snapshot) MissingChunks added in v0.73.0

func (s *Snapshot) MissingChunks() []uint32

func (*Snapshot) RawChunkByIndex added in v0.73.0

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

func (*Snapshot) Ready

func (s *Snapshot) Ready() bool

func (*Snapshot) ToTM

func (s *Snapshot) ToTM() (*tmtypes.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"
	RewardSnapshot                 SnapshotNamespace = "rewards"
	SpamSnapshot                   SnapshotNamespace = "spam"
	LimitSnapshot                  SnapshotNamespace = "limits"
	NotarySnapshot                 SnapshotNamespace = "notary"
	StakeVerifierSnapshot          SnapshotNamespace = "stakeverifier"
	EventForwarderSnapshot         SnapshotNamespace = "eventforwarder"
	TopologySnapshot               SnapshotNamespace = "topology"
	LiquiditySnapshot              SnapshotNamespace = "liquidity"
	LiquidityV2Snapshot            SnapshotNamespace = "liquidityV2"
	LiquidityTargetSnapshot        SnapshotNamespace = "liquiditytarget"
	FloatingPointConsensusSnapshot SnapshotNamespace = "floatingpoint"
	MarketActivityTrackerSnapshot  SnapshotNamespace = "marketActivityTracker"
	ERC20MultiSigTopologySnapshot  SnapshotNamespace = "erc20multisigtopology"
	EVMMultiSigTopologiesSnapshot  SnapshotNamespace = "evmmultisigtopologies"
	PoWSnapshot                    SnapshotNamespace = "pow"
	ProtocolUpgradeSnapshot        SnapshotNamespace = "protocolUpgradeProposals"
	SettlementSnapshot             SnapshotNamespace = "settlement"
	HoldingAccountTrackerSnapshot  SnapshotNamespace = "holdingAccountTracker"
	EthereumOracleVerifierSnapshot SnapshotNamespace = "ethereumoracleverifier"
	L2EthereumOraclesSnapshot      SnapshotNamespace = "l2EthereumOracles"
	TeamsSnapshot                  SnapshotNamespace = "teams"
	PartiesSnapshot                SnapshotNamespace = "parties"
	VestingSnapshot                SnapshotNamespace = "vesting"
	ReferralProgramSnapshot        SnapshotNamespace = "referralProgram"
	ActivityStreakSnapshot         SnapshotNamespace = "activitystreak"
	VolumeDiscountProgramSnapshot  SnapshotNamespace = "volumeDiscountProgram"
	LiquidationSnapshot            SnapshotNamespace = "liquidation"
	TxCacheSnapshot                SnapshotNamespace = "txCache"
	EVMHeartbeatSnapshot           SnapshotNamespace = "evmheartbeat"

	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 Spot added in v0.72.0

type Spot struct {
	Name       string
	BaseAsset  string
	QuoteAsset string
}

func SpotFromProto added in v0.72.0

func SpotFromProto(s *vegapb.Spot) *Spot

func (Spot) IntoProto added in v0.72.0

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

func (Spot) String added in v0.72.0

func (s Spot) String() string

type SpotProduct added in v0.72.0

type SpotProduct struct {
	Name       string
	BaseAsset  string
	QuoteAsset string
}

func (SpotProduct) Assets added in v0.72.0

func (f SpotProduct) Assets() []string

func (SpotProduct) DeepClone added in v0.72.0

func (f SpotProduct) DeepClone() *SpotProduct

func (SpotProduct) IntoProto added in v0.72.0

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

func (SpotProduct) String added in v0.72.0

func (f SpotProduct) 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 StakingTier added in v0.73.0

type StakingTier struct {
	MinimumStakedTokens      *num.Uint
	ReferralRewardMultiplier num.Decimal
}

type StateProvider

type StateProvider interface {
	Namespace() SnapshotNamespace
	Keys() []string
	// GetState must be thread-safe 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 StopOrder added in v0.72.0

type StopOrder struct {
	ID                  string
	Party               string
	Market              string
	OrderSubmission     *OrderSubmission
	OrderID             string
	OCOLinkID           string
	Expiry              *StopOrderExpiry
	Trigger             *StopOrderTrigger
	Status              StopOrderStatus
	CreatedAt           time.Time
	UpdatedAt           time.Time
	RejectionReason     *StopOrderRejectionReason
	SizeOverrideSetting StopOrderSizeOverrideSetting
	SizeOverrideValue   *StopOrderSizeOverrideValue
}

func NewStopOrderFromProto added in v0.72.0

func NewStopOrderFromProto(p *eventspb.StopOrderEvent) *StopOrder

func (*StopOrder) String added in v0.72.0

func (s *StopOrder) String() string

func (*StopOrder) ToProtoEvent added in v0.72.0

func (s *StopOrder) ToProtoEvent() *eventspb.StopOrderEvent

type StopOrderExpiry added in v0.72.0

type StopOrderExpiry struct {
	ExpiresAt      *time.Time
	ExpiryStrategy *StopOrderExpiryStrategy
}

func (*StopOrderExpiry) Expires added in v0.72.0

func (s *StopOrderExpiry) Expires() bool

func (StopOrderExpiry) String added in v0.72.0

func (s StopOrderExpiry) String() string

type StopOrderExpiryStrategy added in v0.72.0

type StopOrderExpiryStrategy = vega.StopOrder_ExpiryStrategy

type StopOrderRejectionReason added in v0.73.0

type StopOrderRejectionReason = vega.StopOrder_RejectionReason

type StopOrderSetup added in v0.72.0

type StopOrderSetup struct {
	OrderSubmission     *OrderSubmission
	Expiry              *StopOrderExpiry
	Trigger             *StopOrderTrigger
	SizeOverrideSetting StopOrderSizeOverrideSetting
	SizeOverrideValue   *StopOrderSizeOverrideValue
}

func StopOrderSetupFromProto added in v0.72.0

func StopOrderSetupFromProto(
	psetup *commandspb.StopOrderSetup,
	direction StopOrderTriggerDirection,
) (*StopOrderSetup, error)

func (StopOrderSetup) String added in v0.72.0

func (s StopOrderSetup) String() string

type StopOrderSizeOverrideSetting added in v0.74.0

type StopOrderSizeOverrideSetting = vega.StopOrder_SizeOverrideSetting

type StopOrderSizeOverrideValue added in v0.74.0

type StopOrderSizeOverrideValue struct {
	PercentageSize num.Decimal
}

type StopOrderStatus added in v0.72.0

type StopOrderStatus = vega.StopOrder_Status

type StopOrderTrigger added in v0.72.0

type StopOrderTrigger struct {
	Direction StopOrderTriggerDirection
	// contains filtered or unexported fields
}

func NewPriceStopOrderTrigger added in v0.72.0

func NewPriceStopOrderTrigger(
	direction StopOrderTriggerDirection,
	price *num.Uint,
) *StopOrderTrigger

func NewTrailingStopOrderTrigger added in v0.72.0

func NewTrailingStopOrderTrigger(
	direction StopOrderTriggerDirection,
	trailingPercentOffset num.Decimal,
) *StopOrderTrigger

func (*StopOrderTrigger) IsPrice added in v0.72.0

func (s *StopOrderTrigger) IsPrice() bool

func (*StopOrderTrigger) IsTrailingPercentOffset added in v0.74.0

func (s *StopOrderTrigger) IsTrailingPercentOffset() bool

func (*StopOrderTrigger) Price added in v0.72.0

func (s *StopOrderTrigger) Price() *num.Uint

func (StopOrderTrigger) String added in v0.72.0

func (s StopOrderTrigger) String() string

func (*StopOrderTrigger) TrailingPercentOffset added in v0.72.0

func (s *StopOrderTrigger) TrailingPercentOffset() num.Decimal

type StopOrderTriggerDirection added in v0.72.0

type StopOrderTriggerDirection = vega.StopOrder_TriggerDirection

type StopOrdersCancellation added in v0.72.0

type StopOrdersCancellation struct {
	MarketID string
	OrderID  string
}

func NewStopOrderCancellationFromProto added in v0.72.0

func NewStopOrderCancellationFromProto(
	soc *commandspb.StopOrdersCancellation,
) *StopOrdersCancellation

func (StopOrdersCancellation) String added in v0.72.0

func (s StopOrdersCancellation) String() string

type StopOrdersSubmission added in v0.72.0

type StopOrdersSubmission struct {
	RisesAbove *StopOrderSetup
	FallsBelow *StopOrderSetup
}

func NewStopOrderSubmissionFromProto added in v0.72.0

func NewStopOrderSubmissionFromProto(psubmission *commandspb.StopOrdersSubmission) (*StopOrdersSubmission, error)

func (*StopOrdersSubmission) IntoStopOrders added in v0.72.0

func (s *StopOrdersSubmission) IntoStopOrders(
	party, fallsBelowID, risesAboveID string,
	now time.Time,
) (fallsBelow, risesAbove *StopOrder)

func (StopOrdersSubmission) String added in v0.72.0

func (s StopOrdersSubmission) String() string

type SubmitAMM added in v0.77.0

type SubmitAMM struct {
	AMMBaseCommand
	CommitmentAmount *num.Uint
	Parameters       *ConcentratedLiquidityParameters
}

func NewSubmitAMMFromProto added in v0.77.0

func NewSubmitAMMFromProto(
	submitAMM *commandspb.SubmitAMM,
	party string,
) *SubmitAMM

func (SubmitAMM) IntoProto added in v0.77.0

func (s SubmitAMM) IntoProto() *commandspb.SubmitAMM

type SuccessorConfig added in v0.72.0

type SuccessorConfig struct {
	ParentID              string
	InsurancePoolFraction num.Decimal
}

func SuccessorConfigFromProto added in v0.72.0

func SuccessorConfigFromProto(p *vegapb.SuccessorConfiguration) (*SuccessorConfig, error)

func (*SuccessorConfig) IntoProto added in v0.72.0

type Successors added in v0.72.0

type Successors struct {
	ParentMarket     string
	SuccessorMarkets []string
}

func SuccessorsFromProto added in v0.72.0

func SuccessorsFromProto(s *snapshot.Successors) *Successors

func (Successors) IntoProto added in v0.72.0

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

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 Team added in v0.73.0

type Team struct {
	ID TeamID

	Referrer *Membership
	Referees []*Membership

	Name      string
	TeamURL   string
	AvatarURL string
	CreatedAt time.Time

	Closed    bool
	AllowList []PartyID
}

func (*Team) EnsureCanJoin added in v0.74.0

func (t *Team) EnsureCanJoin(party PartyID) error

func (*Team) RemoveReferee added in v0.73.0

func (t *Team) RemoveReferee(refereeToRemove PartyID)

type TeamID added in v0.73.0

type TeamID string

func NewTeamID added in v0.73.0

func NewTeamID() TeamID

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 *vegapb.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 TradeFromProto added in v0.74.0

func TradeFromProto(t *proto.Trade) *Trade

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
	TransferID *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
	FromDerivedKey  *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, gameID *string) *eventspb.Transfer

type TransferKind added in v0.72.0

type TransferKind int
const (
	TransferKindOneOff TransferKind = iota
	TransferKindRecurring
)

type TransferRequest

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

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
	TransferTypeSuccessorInsuranceFraction TransferType = proto.TransferType_TRANSFER_TYPE_SUCCESSOR_INSURANCE_FRACTION
	TransferTypeSpot                       TransferType = proto.TransferType_TRANSFER_TYPE_SPOT
	TransferTypeHoldingAccount             TransferType = proto.TransferType_TRANSFER_TYPE_HOLDING_LOCK
	TransferTypeReleaseHoldingAccount      TransferType = proto.TransferType_TRANSFER_TYPE_HOLDING_RELEASE
	// Liquidity fees.
	TransferTypeLiquidityFeeAllocate          TransferType = proto.TransferType_TRANSFER_TYPE_LIQUIDITY_FEE_ALLOCATE
	TransferTypeLiquidityFeeNetDistribute     TransferType = proto.TransferType_TRANSFER_TYPE_LIQUIDITY_FEE_NET_DISTRIBUTE
	TransferTypeSLAPenaltyBondApply           TransferType = proto.TransferType_TRANSFER_TYPE_SLA_PENALTY_BOND_APPLY
	TransferTypeSLAPenaltyLpFeeApply          TransferType = proto.TransferType_TRANSFER_TYPE_SLA_PENALTY_LP_FEE_APPLY
	TransferTypeLiquidityFeeUnpaidCollect     TransferType = proto.TransferType_TRANSFER_TYPE_LIQUIDITY_FEE_UNPAID_COLLECT
	TransferTypeSlaPerformanceBonusDistribute TransferType = proto.TransferType_TRANSFER_TYPE_SLA_PERFORMANCE_BONUS_DISTRIBUTE
	// perps funding.
	TransferTypePerpFundingLoss TransferType = proto.TransferType_TRANSFER_TYPE_PERPETUALS_FUNDING_LOSS
	TransferTypePerpFundingWin  TransferType = proto.TransferType_TRANSFER_TYPE_PERPETUALS_FUNDING_WIN
	TransferTypeRewardsVested   TransferType = proto.TransferType_TRANSFER_TYPE_REWARDS_VESTED

	TransferTypeFeeReferrerRewardPay        TransferType = proto.TransferType_TRANSFER_TYPE_FEE_REFERRER_REWARD_PAY
	TransferTypeFeeReferrerRewardDistribute TransferType = proto.TransferType_TRANSFER_TYPE_FEE_REFERRER_REWARD_DISTRIBUTE

	TransferTypeOrderMarginLow    TransferType = proto.TransferType_TRANSFER_TYPE_ORDER_MARGIN_LOW
	TransferTypeOrderMarginHigh   TransferType = proto.TransferType_TRANSFER_TYPE_ORDER_MARGIN_HIGH
	TransferTypeIsolatedMarginLow TransferType = proto.TransferType_TRANSFER_TYPE_ISOLATED_MARGIN_LOW
	// AMM account juggling.
	TransferTypeAMMLow     TransferType = proto.TransferType_TRANSFER_TYPE_AMM_LOW
	TransferTypeAMMHigh    TransferType = proto.TransferType_TRANSFER_TYPE_AMM_HIGH
	TransferTypeAMMRelease TransferType = proto.TransferType_TRANSFER_TYPE_AMM_RELEASE
)

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     dsdefinition.Definition
	DataSourceSpecForTradingTermination dsdefinition.Definition
	DataSourceSpecBinding               *datasource.SpecBindingForFuture
}

func (UpdateFutureProduct) DeepClone

func (UpdateFutureProduct) IntoProto

func (UpdateFutureProduct) String

func (f UpdateFutureProduct) String() string

type UpdateInstrumentConfiguration

type UpdateInstrumentConfiguration struct {
	Code string
	Name string
	// *UpdateInstrumentConfigurationFuture
	// *UpdateInstrumentConfigurationPerps
	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 UpdateInstrumentConfigurationPerps added in v0.73.0

type UpdateInstrumentConfigurationPerps struct {
	Perps *UpdatePerpsProduct
}

func (UpdateInstrumentConfigurationPerps) DeepClone added in v0.73.0

func (i UpdateInstrumentConfigurationPerps) DeepClone() updateInstrumentConfigurationProduct

func (UpdateInstrumentConfigurationPerps) IntoProto added in v0.73.0

func (UpdateInstrumentConfigurationPerps) String added in v0.73.0

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
	LiquiditySLAParameters        *LiquiditySLAParams
	RiskParameters                updateRiskParams
	LinearSlippageFactor          num.Decimal
	QuadraticSlippageFactor       num.Decimal
	LiquidityFeeSettings          *LiquidityFeeSettings
	LiquidationStrategy           *LiquidationStrategy
	MarkPriceConfiguration        *CompositePriceConfiguration
	TickSize                      *num.Uint
	EnableTxReordering            bool
}

func (UpdateMarketConfiguration) DeepClone

func (UpdateMarketConfiguration) GetFuture added in v0.74.0

func (UpdateMarketConfiguration) GetPerps added in v0.74.0

func (UpdateMarketConfiguration) GetProductType added in v0.74.0

func (n UpdateMarketConfiguration) GetProductType() ProductType

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 UpdateMarketState added in v0.73.0

type UpdateMarketState struct {
	Changes *MarketStateUpdateConfiguration
}

func (UpdateMarketState) DeepClone added in v0.73.0

func (c UpdateMarketState) DeepClone() *UpdateMarketState

func (UpdateMarketState) IntoProto added in v0.73.0

func (UpdateMarketState) String added in v0.73.0

func (c UpdateMarketState) String() string

type UpdateNetworkParameter

type UpdateNetworkParameter struct {
	Changes *NetworkParameter
}

func (UpdateNetworkParameter) DeepClone

func (UpdateNetworkParameter) IntoProto

func (UpdateNetworkParameter) String

func (n UpdateNetworkParameter) String() string

type UpdatePerpsProduct added in v0.73.0

type UpdatePerpsProduct struct {
	QuoteName string

	MarginFundingFactor num.Decimal
	InterestRate        num.Decimal
	ClampLowerBound     num.Decimal
	ClampUpperBound     num.Decimal

	FundingRateScalingFactor *num.Decimal
	FundingRateLowerBound    *num.Decimal
	FundingRateUpperBound    *num.Decimal

	DataSourceSpecForSettlementData     dsdefinition.Definition
	DataSourceSpecForSettlementSchedule dsdefinition.Definition
	DataSourceSpecBinding               *datasource.SpecBindingForPerps
	InternalCompositePrice              *CompositePriceConfiguration
}

func (UpdatePerpsProduct) DeepClone added in v0.73.0

func (p UpdatePerpsProduct) DeepClone() *UpdatePerpsProduct

func (UpdatePerpsProduct) IntoProto added in v0.73.0

func (UpdatePerpsProduct) String added in v0.73.0

func (p UpdatePerpsProduct) String() string

type UpdateReferralProgram added in v0.73.0

type UpdateReferralProgram struct {
	Changes *ReferralProgramChanges
}

func NewUpdateReferralProgramFromProto added in v0.73.0

func NewUpdateReferralProgramFromProto(p *vegapb.UpdateReferralProgram) *UpdateReferralProgram

func (UpdateReferralProgram) DeepClone added in v0.73.0

func (UpdateReferralProgram) IntoProto added in v0.73.0

func (UpdateReferralProgram) String added in v0.73.0

func (p UpdateReferralProgram) String() string

type UpdateSpotMarket added in v0.72.0

type UpdateSpotMarket struct {
	MarketID string
	Changes  *UpdateSpotMarketConfiguration
}

func (UpdateSpotMarket) DeepClone added in v0.72.0

func (n UpdateSpotMarket) DeepClone() *UpdateSpotMarket

func (UpdateSpotMarket) IntoProto added in v0.72.0

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

func (UpdateSpotMarket) String added in v0.72.0

func (n UpdateSpotMarket) String() string

type UpdateSpotMarketConfiguration added in v0.72.0

type UpdateSpotMarketConfiguration struct {
	Metadata                  []string
	PriceMonitoringParameters *PriceMonitoringParameters
	TargetStakeParameters     *TargetStakeParameters
	RiskParameters            updateRiskParams
	SLAParams                 *LiquiditySLAParams
	TickSize                  *num.Uint
	Instrument                *InstrumentConfiguration
	LiquidityFeeSettings      *LiquidityFeeSettings
	EnableTxReordering        bool
}

func UpdateSpotMarketConfigurationFromProto added in v0.72.0

func UpdateSpotMarketConfigurationFromProto(p *vegapb.UpdateSpotMarketConfiguration) (*UpdateSpotMarketConfiguration, error)

func (UpdateSpotMarketConfiguration) DeepClone added in v0.72.0

func (UpdateSpotMarketConfiguration) IntoProto added in v0.72.0

func (UpdateSpotMarketConfiguration) String added in v0.72.0

type UpdateSpotMarketConfigurationLogNormal added in v0.72.0

type UpdateSpotMarketConfigurationLogNormal struct {
	LogNormal *LogNormalRiskModel
}

func (UpdateSpotMarketConfigurationLogNormal) DeepClone added in v0.72.0

func (n UpdateSpotMarketConfigurationLogNormal) DeepClone() updateRiskParams

func (UpdateSpotMarketConfigurationLogNormal) IntoProto added in v0.72.0

func (UpdateSpotMarketConfigurationLogNormal) String added in v0.72.0

type UpdateSpotMarketConfigurationSimple added in v0.72.0

type UpdateSpotMarketConfigurationSimple struct {
	Simple *SimpleModelParams
}

func UpdateSpotMarketConfigurationSimpleFromProto added in v0.72.0

func UpdateSpotMarketConfigurationSimpleFromProto(p *vegapb.UpdateSpotMarketConfiguration_Simple) *UpdateSpotMarketConfigurationSimple

func (UpdateSpotMarketConfigurationSimple) DeepClone added in v0.72.0

func (n UpdateSpotMarketConfigurationSimple) DeepClone() updateRiskParams

func (UpdateSpotMarketConfigurationSimple) IntoProto added in v0.72.0

func (UpdateSpotMarketConfigurationSimple) String added in v0.72.0

type UpdateVolumeDiscountProgram added in v0.73.0

type UpdateVolumeDiscountProgram struct {
	Changes *VolumeDiscountProgramChanges
}

func NewUpdateVolumeDiscountProgramFromProto added in v0.73.0

func NewUpdateVolumeDiscountProgramFromProto(p *vegapb.UpdateVolumeDiscountProgram) *UpdateVolumeDiscountProgram

func (UpdateVolumeDiscountProgram) DeepClone added in v0.73.0

func (UpdateVolumeDiscountProgram) IntoProto added in v0.73.0

func (UpdateVolumeDiscountProgram) String added in v0.73.0

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 VestingBenefitTier added in v0.73.0

type VestingBenefitTier struct {
	MinimumQuantumBalance *num.Uint
	RewardMultiplier      num.Decimal
}

type VestingBenefitTiers added in v0.73.0

type VestingBenefitTiers struct {
	Tiers []*VestingBenefitTier
}

func VestingBenefitTiersFromProto added in v0.73.0

func VestingBenefitTiersFromProto(ptiers *proto.VestingBenefitTiers) (*VestingBenefitTiers, error)

func VestingBenefitTiersFromUntypedProto added in v0.73.0

func VestingBenefitTiersFromUntypedProto(v interface{}) (*VestingBenefitTiers, error)

func (*VestingBenefitTiers) Clone added in v0.73.0

type VolumeBenefitTier added in v0.73.0

type VolumeBenefitTier struct {
	MinimumRunningNotionalTakerVolume *num.Uint
	VolumeDiscountFactor              num.Decimal
}

type VolumeDiscountProgram added in v0.73.0

type VolumeDiscountProgram struct {
	ID                    string
	Version               uint64
	EndOfProgramTimestamp time.Time
	WindowLength          uint64
	VolumeBenefitTiers    []*VolumeBenefitTier
}

func NewVolumeDiscountProgramFromProto added in v0.73.0

func NewVolumeDiscountProgramFromProto(v *vegapb.VolumeDiscountProgram) *VolumeDiscountProgram

func (VolumeDiscountProgram) DeepClone added in v0.73.0

func (VolumeDiscountProgram) IntoProto added in v0.73.0

func (VolumeDiscountProgram) String added in v0.73.0

func (c VolumeDiscountProgram) String() string

type VolumeDiscountProgramChanges added in v0.73.0

type VolumeDiscountProgramChanges struct {
	ID                    string
	Version               uint64
	EndOfProgramTimestamp time.Time
	WindowLength          uint64
	VolumeBenefitTiers    []*VolumeBenefitTier
}

func NewVolumeDiscountProgramChangesFromProto added in v0.73.0

func NewVolumeDiscountProgramChangesFromProto(v *vegapb.VolumeDiscountProgramChanges) *VolumeDiscountProgramChanges

func (VolumeDiscountProgramChanges) DeepClone added in v0.73.0

func (VolumeDiscountProgramChanges) IntoProto added in v0.73.0

func (VolumeDiscountProgramChanges) String added in v0.73.0

type VolumeDiscountStats added in v0.73.0

type VolumeDiscountStats struct {
	DiscountFactor num.Decimal
}

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
	PerMarketEquityLikeShareWeight map[string]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
	RecentBlocksRejectStats []*BlockRejectStats
	CurrentBlockIndex       uint64
	LastIncreaseBlock       uint64
	CurrentEpochSeq         uint64
}

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