Documentation ¶
Index ¶
- Constants
- Variables
- func CheckEthereumConfig(cfgProto *proto.EthereumConfig) error
- func CheckUntypedEthereumConfig(v interface{}) error
- func DataSourceSpecPropertyKeyIsEmpty(key *DataSourceSpecPropertyKey) bool
- func GetNodeKey(ns SnapshotNamespace, k string) string
- func KeyFromPayload(p isPayload) string
- func SignersIntoProto(s []*Signer) []*datapb.Signer
- func SignersToStringList(s []*Signer) []string
- func SpecID(signers []*Signer, filters []*datapb.Filter) string
- type Account
- type AccountDetails
- type AccountType
- type Accounts
- type ActiveAssets
- type AnnounceNode
- type AppState
- type Asset
- type AssetAction
- type AssetDetails
- type AssetDetailsBuiltinAsset
- type AssetDetailsErc20
- type AssetDetailsUpdate
- type AssetDetailsUpdateERC20
- type AssetStatus
- type AuctionDuration
- type AuctionState
- type AuctionTrigger
- type BDeposit
- type BankingAssetActions
- type BankingBridgeState
- type BankingDeposits
- type BankingSeen
- type BankingWithdrawals
- type BannedParty
- type Block
- type BlockRejectStats
- type BuiltinAsset
- type BuiltinAssetDeposit
- type BuiltinAssetEvent
- type BuiltinAssetEventDeposit
- type BuiltinAssetEventWithdrawal
- type BuiltinAssetWithdrawal
- type CPState
- type CancelTransferFunds
- type Candle
- type ChainEvent
- type ChainEventBuiltin
- type ChainEventERC20
- type Checkpoint
- func (c Checkpoint) Get(name CheckpointName) []byte
- func (c Checkpoint) GetBlockHeight() (int64, error)
- func (c Checkpoint) HashBytes() []byte
- func (c Checkpoint) IntoProto() *checkpoint.Checkpoint
- func (c *Checkpoint) Set(name CheckpointName, val []byte)
- func (c *Checkpoint) SetBlockHeight(height int64) error
- type CheckpointName
- type CheckpointState
- func (s CheckpointState) GetBlockHeight() (int64, error)
- func (s CheckpointState) GetCheckpoint() (*Checkpoint, error)
- func (s CheckpointState) IntoProto() *checkpoint.CheckpointState
- func (s *CheckpointState) SetCheckpoint(cp *Checkpoint) error
- func (s *CheckpointState) SetState(state []byte) error
- func (s CheckpointState) Validate() error
- type Chunk
- type CollateralAccounts
- type CollateralAssets
- type CurrentPrice
- type DataSignerType
- type DataSourceDefinition
- func (s DataSourceDefinition) DeepClone() DataSourceDefinition
- func (s DataSourceDefinition) GetDataSourceSpecConfiguration() *vegapb.DataSourceSpecConfiguration
- func (s DataSourceDefinition) GetFilters() []*DataSourceSpecFilter
- func (s DataSourceDefinition) GetSigners() []*Signer
- func (s DataSourceDefinition) IntoProto() *vegapb.DataSourceDefinition
- func (s *DataSourceDefinition) SetOracleConfig(oc *DataSourceSpecConfiguration) *DataSourceDefinition
- func (s DataSourceDefinition) String() string
- func (s DataSourceDefinition) ToDataSourceSpec() *DataSourceSpec
- func (s *DataSourceDefinition) ToExternalDataSourceSpec() *ExternalDataSourceSpec
- func (s *DataSourceDefinition) UpdateFilters(filters []*DataSourceSpecFilter)
- type DataSourceDefinitionExternal
- type DataSourceDefinitionExternalOracle
- type DataSourceDefinitionExternalx
- type DataSourceDefinitionInternal
- type DataSourceDefinitionInternalTime
- type DataSourceDefinitionInternalx
- type DataSourceSpec
- type DataSourceSpecBindingForFuture
- type DataSourceSpecCondition
- func DataSourceSpecConditionFromProto(protoCondition *datapb.Condition) *DataSourceSpecCondition
- func DataSourceSpecConditionsFromProto(protoConditions []*datapb.Condition) []*DataSourceSpecCondition
- func DeepCloneDataSourceSpecConditions(conditions []*DataSourceSpecCondition) []*DataSourceSpecCondition
- type DataSourceSpecConditionOperator
- type DataSourceSpecConditions
- type DataSourceSpecConfiguration
- type DataSourceSpecConfigurationTime
- type DataSourceSpecFilter
- type DataSourceSpecFilters
- type DataSourceSpecPropertyKey
- type DataSourceSpecPropertyKeyType
- type DataSourceSpecSigners
- type DataSourceSpecStatus
- type DataSourceSpecToFutureBinding
- type Delegate
- type DelegateCP
- type Delegation
- type DelegationActive
- type DelegationAuto
- type DelegationEntry
- type DelegationPending
- type Deposit
- type DepositStatus
- type ERC20
- type ERC20AssetDelist
- type ERC20AssetLimitsUpdated
- type ERC20AssetList
- type ERC20Deposit
- type ERC20Event
- type ERC20EventAssetDelist
- type ERC20EventAssetLimitsUpdated
- type ERC20EventAssetList
- type ERC20EventBridgeResumed
- type ERC20EventBridgeStopped
- type ERC20EventDeposit
- type ERC20EventWithdrawal
- type ERC20Update
- type ERC20Withdrawal
- type ETHAddress
- type Epoch
- type EpochState
- type EquityShare
- type EquityShareLP
- type Erc20WithdrawExt
- type EthereumConfig
- func (c *EthereumConfig) ChainID() string
- func (c *EthereumConfig) CollateralBridge() EthereumContract
- func (c *EthereumConfig) Confirmations() uint64
- func (c *EthereumConfig) MultiSigControl() EthereumContract
- func (c *EthereumConfig) NetworkID() string
- func (c *EthereumConfig) StakingBridge() EthereumContract
- func (c *EthereumConfig) StakingBridgeAddresses() []ethcmn.Address
- func (c *EthereumConfig) VestingBridge() EthereumContract
- type EthereumContract
- type ExecMarket
- type ExecutionMarkets
- type ExternalDataSourceSpec
- type ExternalDataSourceSpecConfiguration
- type Fee
- type FeeFactors
- type FeeSplitter
- type Fees
- type FinancialAmount
- type Future
- type FutureProduct
- type GovernanceActive
- type GovernanceData
- type GovernanceEnacted
- type GovernanceNode
- type Instrument
- type InstrumentConfiguration
- type InstrumentConfigurationFuture
- type InstrumentFuture
- type InstrumentMetadata
- type Interval
- type KeyDecimalPair
- type LedgerEntries
- type LedgerEntry
- type LedgerMovement
- type LedgerMovements
- type LimitState
- type LiquidityMonitoringParameters
- type LiquidityOrder
- type LiquidityOrderReference
- type LiquidityOrderReferences
- type LiquidityOrders
- type LiquidityProviderFeeShare
- type LiquidityProviderFeeShares
- type LiquidityProvision
- type LiquidityProvisionAmendment
- type LiquidityProvisionCancellation
- type LiquidityProvisionStatus
- type LiquidityProvisionSubmission
- type LogNormalModelParams
- type LogNormalRiskModel
- type MarginCalculator
- type MarginLevels
- type Market
- type MarketContributionScore
- type MarketData
- type MarketDepth
- type MarketDepthUpdate
- type MarketPosition
- type MarketPositions
- type MarketState
- type MarketTimestamps
- type MarketTradingMode
- type MatchingBook
- type Metadata
- type MetadataList
- type NetParams
- type NetworkParameter
- type NewAsset
- type NewFreeform
- type NewMarket
- type NewMarketConfiguration
- type NewMarketConfigurationLogNormal
- type NewMarketConfigurationSimple
- type NodeHash
- type NodeSignature
- type NodeSignatureKind
- type NodeVote
- type Notary
- type NotarySigs
- type OneOffTransfer
- type OracleDataSubmission
- type OracleSpec
- type OracleSpecBindingForFuture
- type OracleSpecCondition
- type OracleSpecConditionOperator
- type OracleSpecConditions
- type OracleSpecConfiguration
- type OracleSpecFilter
- type OracleSpecFilters
- type OracleSpecPropertyKey
- type OracleSpecSigners
- type OracleSpecStatus
- type OracleSpecToFutureBinding
- type Order
- func (o Order) Clone() *Order
- func (o *Order) Create(t time.Time) *Order
- func (o *Order) HasTraded() bool
- func (o *Order) IntoProto() *proto.Order
- func (o Order) IntoSubmission() *OrderSubmission
- func (o *Order) IsExpireable() bool
- func (o *Order) IsFinished() bool
- func (o *Order) IsLiquidityOrder() bool
- func (o *Order) IsPersistent() bool
- func (o Order) String() string
- func (o *Order) Update(t time.Time) *Order
- type OrderAmendment
- type OrderCancellation
- type OrderCancellationConfirmation
- type OrderConfirmation
- type OrderError
- type OrderStatus
- type OrderSubmission
- type OrderTimeInForce
- type OrderType
- type Orders
- type Party
- type PartyContibutionScore
- type PartyCount
- type PartyProposalVoteCount
- type PartyTokenBalance
- type PastPrice
- type Payload
- type PayloadActiveAssets
- type PayloadAppState
- type PayloadBankingAssetActions
- type PayloadBankingBridgeState
- type PayloadBankingDeposits
- type PayloadBankingRecurringTransfers
- type PayloadBankingScheduledTransfers
- type PayloadBankingSeen
- type PayloadBankingWithdrawals
- type PayloadCheckpoint
- type PayloadCollateralAccounts
- type PayloadCollateralAssets
- type PayloadDelegationActive
- type PayloadDelegationAuto
- type PayloadDelegationLastReconTime
- type PayloadDelegationPending
- type PayloadERC20MultiSigTopologyPending
- type PayloadERC20MultiSigTopologyVerified
- type PayloadEpoch
- type PayloadEventForwarder
- type PayloadExecutionMarkets
- type PayloadFloatingPointConsensus
- type PayloadGovernanceActive
- type PayloadGovernanceEnacted
- type PayloadGovernanceNode
- type PayloadLimitState
- type PayloadLiquidityParameters
- type PayloadLiquidityPendingProvisions
- type PayloadLiquidityProvisions
- type PayloadLiquiditySupplied
- type PayloadLiquidityTarget
- type PayloadMarketActivityTracker
- type PayloadMarketPositions
- type PayloadMatchingBook
- type PayloadNetParams
- type PayloadNotary
- type PayloadPendingAssetUpdates
- type PayloadPendingAssets
- type PayloadProofOfWork
- type PayloadProtocolUpgradeProposals
- type PayloadRewardsPayout
- type PayloadSimpleSpamPolicy
- type PayloadStakeVerifierDeposited
- type PayloadStakeVerifierRemoved
- type PayloadStakingAccounts
- type PayloadTopology
- type PayloadVoteSpamPolicy
- type PayloadWitness
- type PeggedOrder
- type PeggedOrdersState
- type PeggedReference
- type PendingAssetUpdates
- type PendingAssets
- type Position
- type Positions
- type PostRestore
- type PostTransferBalance
- type PostTransferBalances
- type PreRestore
- type PriceBound
- type PriceLevel
- type PriceLevels
- type PriceMonitor
- type PriceMonitoringBounds
- type PriceMonitoringBoundsList
- type PriceMonitoringParameters
- type PriceMonitoringSettings
- type PriceMonitoringTrigger
- type PriceMonitoringTriggers
- type PriceRange
- type PriceRangeCache
- type Proposal
- func (p Proposal) DeepClone() *Proposal
- func (p *Proposal) FailUnexpectedly(details error)
- func (p *Proposal) FailWithErr(reason ProposalError, details error)
- func (p Proposal) IntoProto() *vegapb.Proposal
- func (p *Proposal) IsMarketUpdate() bool
- func (p *Proposal) MarketUpdate() *UpdateMarket
- func (p *Proposal) Reject(reason ProposalError)
- func (p *Proposal) RejectWithErr(reason ProposalError, details error)
- func (p Proposal) String() string
- func (p *Proposal) WaitForNodeVote()
- type ProposalData
- type ProposalError
- type ProposalRationale
- type ProposalState
- type ProposalSubmission
- type ProposalTerms
- func (p ProposalTerms) DeepClone() *ProposalTerms
- func (p *ProposalTerms) GetNewAsset() *NewAsset
- func (p *ProposalTerms) GetNewFreeform() *NewFreeform
- func (p *ProposalTerms) GetNewMarket() *NewMarket
- func (p *ProposalTerms) GetUpdateAsset() *UpdateAsset
- func (p *ProposalTerms) GetUpdateMarket() *UpdateMarket
- func (p *ProposalTerms) GetUpdateNetworkParameter() *UpdateNetworkParameter
- func (p ProposalTerms) IntoProto() *vegapb.ProposalTerms
- func (p ProposalTerms) String() string
- type ProposalTermsNewAsset
- type ProposalTermsNewFreeform
- type ProposalTermsNewMarket
- type ProposalTermsType
- type ProposalTermsUpdateAsset
- type ProposalTermsUpdateMarket
- type ProposalTermsUpdateNetworkParameter
- func (a ProposalTermsUpdateNetworkParameter) DeepClone() proposalTerm
- func (a ProposalTermsUpdateNetworkParameter) GetTermType() ProposalTermsType
- func (a ProposalTermsUpdateNetworkParameter) IntoProto() *vegapb.ProposalTerms_UpdateNetworkParameter
- func (a ProposalTermsUpdateNetworkParameter) String() string
- type PubKey
- type RWithdrawal
- type RawChunk
- type RecurringTransfer
- type ReleaseInfo
- type Resource
- type RewardsPartyAmount
- type RewardsPayout
- type RewardsPendingPayouts
- type RiskFactor
- type ScalingFactors
- type ScheduledRewardsPayout
- type ScoreData
- type Side
- type Signer
- func CreateSignerFromString(s string, t DataSignerType) *Signer
- func DeserializeSigner(content []byte) *Signer
- func NewSigner() *Signer
- func SignerAsHex(signer *Signer) *Signer
- func SignerAsString(signer *Signer) (*Signer, error)
- func SignerFromProto(s *datapb.Signer) *Signer
- func SignersFromProto(s []*datapb.Signer) []*Signer
- func (s Signer) DeepClone() *Signer
- func (s Signer) GetSignerETHAddress() *ETHAddress
- func (s Signer) GetSignerPubKey() *PubKey
- func (s Signer) GetSignerType() DataSignerType
- func (s Signer) IntoProto() *datapb.Signer
- func (s Signer) IsEmpty() bool
- func (s *Signer) Serialize() ([]byte, error)
- func (s Signer) String() string
- type SignerETHAddress
- func (s SignerETHAddress) AsHex(prepend bool) dataSourceSpec
- func (s SignerETHAddress) AsString() (dataSourceSpec, error)
- func (s SignerETHAddress) DeepClone() dataSourceSpec
- func (s SignerETHAddress) GetSignerType() DataSignerType
- func (s SignerETHAddress) IntoProto() *datapb.Signer_EthAddress
- func (s SignerETHAddress) IsEmpty() bool
- func (s SignerETHAddress) Serialize() []byte
- func (s SignerETHAddress) String() string
- type SignerEvent
- func SignerEventFromEventProto(event *eventspb.ERC20MultiSigSignerEvent) *SignerEvent
- func SignerEventFromSignerAddedProto(s *vgproto.ERC20SignerAdded, blockNumber, logIndex uint64, txhash, id string) (*SignerEvent, error)
- func SignerEventFromSignerRemovedProto(s *vgproto.ERC20SignerRemoved, blockNumber, logIndex uint64, txhash, id string) (*SignerEvent, error)
- type SignerEventKind
- type SignerPubKey
- func (s SignerPubKey) AsHex(prepend bool) dataSourceSpec
- func (s SignerPubKey) AsString() (dataSourceSpec, error)
- func (s SignerPubKey) DeepClone() dataSourceSpec
- func (s SignerPubKey) GetSignerType() DataSignerType
- func (s SignerPubKey) IntoProto() *datapb.Signer_PubKey
- func (s SignerPubKey) IsEmpty() bool
- func (s SignerPubKey) Serialize() []byte
- func (s SignerPubKey) String() string
- type SignerThresholdSetEvent
- type SimpleModelParams
- type SimpleRiskModel
- type SimpleSpamPolicy
- type Snapshot
- func (s Snapshot) GetMissing() []uint32
- func (s Snapshot) GetRawChunk(idx uint32) (*RawChunk, error)
- func (s *Snapshot) LoadChunk(chunk *RawChunk) error
- func (s Snapshot) Ready() bool
- func (s Snapshot) ToTM() (*tmtypes.Snapshot, error)
- func (s *Snapshot) TreeFromSnapshot(tree *iavl.MutableTree) error
- func (s *Snapshot) ValidateMeta(other *Snapshot) error
- type SnapshotFormat
- type SnapshotNamespace
- type StakeDeposited
- type StakeLinking
- type StakeLinkingStatus
- type StakeLinkingType
- type StakeRemoved
- type StakeScoreParams
- type StakeTotalSupply
- type StakingAccount
- type StakingAccounts
- type StateProvider
- type Stringer
- type Tags
- type TargetStakeParameters
- type Topology
- type TradableInstrument
- func (t TradableInstrument) DeepClone() *TradableInstrument
- func (t TradableInstrument) GetLogNormalRiskModel() *LogNormalRiskModel
- func (t TradableInstrument) GetSimpleRiskModel() *SimpleRiskModel
- func (t TradableInstrument) IntoProto() *proto.TradableInstrument
- func (t TradableInstrument) String() string
- type TradableInstrumentLogNormalRiskModel
- type TradableInstrumentSimpleRiskModel
- type Trade
- type TradeType
- type Trades
- type Transfer
- type TransferBase
- type TransferCommandKind
- type TransferFunds
- type TransferRequest
- type TransferStatus
- type TransferType
- type Undelegate
- type UpdateAsset
- type UpdateFutureProduct
- type UpdateInstrumentConfiguration
- type UpdateInstrumentConfigurationFuture
- type UpdateMarket
- type UpdateMarketConfiguration
- type UpdateMarketConfigurationLogNormal
- type UpdateMarketConfigurationSimple
- type UpdateNetworkParameter
- type UpgradeStatus
- type ValidatorData
- type ValidatorVotingPower
- type Vote
- type VoteSpamPolicy
- type VoteSubmission
- type VoteValue
- type WithdrawExt
- type WithdrawExtErc20
- type WithdrawSubmission
- type Withdrawal
- type WithdrawalStatus
- type Witness
Constants ¶
const ( SignerPubKeyPrepend = 0x00 ETHAddressPrepend = 0x01 )
const ( SimpleRiskModelType rmType = iota LogNormalRiskModelType )
const ( SnapshotFormatUnspecified = snapshot.Format_FORMAT_UNSPECIFIED SnapshotFormatProto = snapshot.Format_FORMAT_PROTO SnapshotFormatProtoCompressed = snapshot.Format_FORMAT_PROTO_COMPRESSED SnapshotFormatJSON = snapshot.Format_FORMAT_JSON )
const ( StakeLinkingTypeUnspecified StakeLinkingType = eventspb.StakeLinking_TYPE_UNSPECIFIED StakeLinkingTypeDeposited = eventspb.StakeLinking_TYPE_LINK StakeLinkingTypeRemoved = eventspb.StakeLinking_TYPE_UNLINK )
const ( StakeLinkingStatusUnspecified StakeLinkingStatus = eventspb.StakeLinking_STATUS_UNSPECIFIED StakeLinkingStatusPending = eventspb.StakeLinking_STATUS_PENDING StakeLinkingStatusAccepted = eventspb.StakeLinking_STATUS_ACCEPTED StakeLinkingStatusRejected = eventspb.StakeLinking_STATUS_REJECTED )
const (
NetworkParty = "network"
)
some constants we're relying on in multiple places. Declare them here to avoid things like settlement importing collateral etc...
Variables ¶
var ( ErrMissingERC20ContractAddress = errors.New("missing erc20 contract address") ErrMissingBuiltinAssetField = errors.New("missing builtin asset field") ErrInvalidAssetNameEmpty = errors.New("invalid asset, name must not be empty") ErrInvalidAssetSymbolEmpty = errors.New("invalid asset, symbol must not be empty") ErrInvalidAssetDecimalPlacesZero = errors.New("invalid asset, decimal places must not be zero") ErrInvalidAssetQuantumZero = errors.New("invalid asset, quantum must not be zero") ErrLifetimeLimitMustBePositive = errors.New("lifetime limit must be positive") ErrWithdrawThresholdMustBePositive = errors.New("withdraw threshold must be positive") )
var ( ErrMissingTransferKind = errors.New("missing transfer kind") ErrCannotTransferZeroFunds = errors.New("cannot transfer zero funds") ErrInvalidFromAccount = errors.New("invalid from account") ErrInvalidToAccount = errors.New("invalid to account") ErrUnsupportedFromAccountType = errors.New("unsupported from account type") ErrUnsupportedToAccountType = errors.New("unsupported to account type") ErrEndEpochIsZero = errors.New("end epoch is zero") ErrStartEpochIsZero = errors.New("start epoch is zero") ErrInvalidFactor = errors.New("invalid factor") ErrStartEpochAfterEndEpoch = errors.New("start epoch after end epoch") ErrInvalidToForRewardAccountType = errors.New("to party is invalid for reward account type") )
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") )
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") )
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") )
var ( ErrNilTradableInstrument = errors.New("nil tradable instrument") ErrNilInstrument = errors.New("nil instrument") ErrNilProduct = errors.New("nil product") ErrUnknownAsset = errors.New("unknown asset") )
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 )
var ( ErrSnapshotHashMismatch = errors.New("snapshot hashes do not match") ErrSnapshotMetaMismatch = errors.New("snapshot metadata does not match") ErrUnknownSnapshotNamespace = errors.New("unknown snapshot namespace") ErrNoPrefixFound = errors.New("no prefix in chunk keys") ErrInconsistentNamespaceKeys = errors.New("chunk contains several namespace keys") ErrChunkHashMismatch = errors.New("loaded chunk hash does not match metadata") ErrChunkOutOfRange = errors.New("chunk number out of range") ErrUnknownSnapshot = errors.New("no shapshot to reject") ErrMissingChunks = errors.New("missing previous chunks") ErrSnapshotRetryLimit = errors.New("could not load snapshot, retry limit reached") ErrSnapshotKeyDoesNotExist = errors.New("unknown key for snapshot") ErrInvalidSnapshotNamespace = errors.New("invalid snapshot namespace") ErrUnknownSnapshotType = errors.New("snapshot data type not known") ErrUnknownSnapshotChunkHeight = errors.New("no snapshot or chunk found for given height") ErrInvalidSnapshotFormat = errors.New("invalid snapshot format") ErrSnapshotFormatMismatch = errors.New("snapshot formats do not match") ErrUnexpectedKey = errors.New("snapshot namespace has unknown/unexpected key(s)") ErrNodeHashMismatch = errors.New("hash of a node does not match the hash from the snapshot meta") ErrNoSnapshot = errors.New("no snapshot found") ErrMissingSnapshotVersion = errors.New("unknown snapshot version") ErrInvalidSnapshotStorageMethod = errors.New("invalid snapshot storage method") ErrMissingAppstateNode = errors.New("appstate missing from tree") ErrMissingPayload = errors.New("payload missing from exported tree") )
var ErrInvalidCommitmentAmount = errors.New("invalid commitment amount")
Functions ¶
func CheckEthereumConfig ¶
func CheckEthereumConfig(cfgProto *proto.EthereumConfig) error
CheckEthereumConfig verifies the proto.EthereumConfig is valid.
func CheckUntypedEthereumConfig ¶
func CheckUntypedEthereumConfig(v interface{}) error
CheckUntypedEthereumConfig verifies the `v` parameter is a proto.EthereumConfig struct and check if it's valid.
func DataSourceSpecPropertyKeyIsEmpty ¶ added in v0.62.0
func DataSourceSpecPropertyKeyIsEmpty(key *DataSourceSpecPropertyKey) bool
func GetNodeKey ¶
func GetNodeKey(ns SnapshotNamespace, k string) string
GetNodeKey is a utility function, we don't want this mess scattered throughout the code.
func KeyFromPayload ¶
func KeyFromPayload(p isPayload) string
KeyFromPayload is useful in snapshot engine, used by the Payload type, too.
func SignersIntoProto ¶ added in v0.61.0
SignersIntoProto returns a list of signers after checking the list length.
func SignersToStringList ¶ added in v0.61.0
Types ¶
type Account ¶
type Account struct { ID string Owner string Balance *num.Uint Asset string MarketID string Type AccountType }
func AccountFromProto ¶
func (Account) ToDetails ¶ added in v0.56.0
func (a Account) ToDetails() *AccountDetails
type AccountDetails ¶ added in v0.56.0
type AccountDetails struct { Owner string AssetID string MarketID string Type AccountType }
func (*AccountDetails) ID ¶ added in v0.56.0
func (ad *AccountDetails) ID() string
func (*AccountDetails) IntoProto ¶ added in v0.56.0
func (ad *AccountDetails) IntoProto() *proto.AccountDetails
type AccountType ¶
type AccountType = proto.AccountType
const ( // Default value. AccountTypeUnspecified AccountType = proto.AccountType_ACCOUNT_TYPE_UNSPECIFIED // Insurance pool accounts contain insurance pool funds for a market. AccountTypeInsurance AccountType = proto.AccountType_ACCOUNT_TYPE_INSURANCE // Settlement accounts exist only during settlement or mark-to-market. AccountTypeSettlement AccountType = proto.AccountType_ACCOUNT_TYPE_SETTLEMENT // Margin accounts contain margin funds for a party and each party will // have multiple margin accounts, one for each market they have traded in // // Margin account funds will alter as margin requirements on positions change. AccountTypeMargin AccountType = proto.AccountType_ACCOUNT_TYPE_MARGIN // General accounts contains general funds for a party. A party will // have multiple general accounts, one for each asset they want // to trade with // // General accounts are where funds are initially deposited or withdrawn from, // it is also the account where funds are taken to fulfil fees and initial margin requirements. AccountTypeGeneral AccountType = proto.AccountType_ACCOUNT_TYPE_GENERAL // Infrastructure accounts contain fees earned by providing infrastructure on Vega. AccountTypeFeesInfrastructure AccountType = proto.AccountType_ACCOUNT_TYPE_FEES_INFRASTRUCTURE // Liquidity accounts contain fees earned by providing liquidity on Vega markets. AccountTypeFeesLiquidity AccountType = proto.AccountType_ACCOUNT_TYPE_FEES_LIQUIDITY // This account is created to hold fees earned by placing orders that sit on the book // and are then matched with an incoming order to create a trade - These fees reward parties // who provide the best priced liquidity that actually allows trading to take place. AccountTypeFeesMaker AccountType = proto.AccountType_ACCOUNT_TYPE_FEES_MAKER // This account is created to maintain liquidity providers funds commitments. AccountTypeBond AccountType = proto.AccountType_ACCOUNT_TYPE_BOND // External account represents an external source (deposit/withdrawal). AccountTypeExternal AccountType = proto.AccountType_ACCOUNT_TYPE_EXTERNAL // Global reward accounts contain rewards per asset. AccountTypeGlobalReward AccountType = proto.AccountType_ACCOUNT_TYPE_GLOBAL_REWARD // Global account to hold pending transfers. AccountTypePendingTransfers AccountType = proto.AccountType_ACCOUNT_TYPE_PENDING_TRANSFERS // Asset account for paid taker fees. AccountTypeMakerPaidFeeReward AccountType = proto.AccountType_ACCOUNT_TYPE_REWARD_MAKER_PAID_FEES // Asset account for received maker fees. AccountTypeMakerReceivedFeeReward AccountType = proto.AccountType_ACCOUNT_TYPE_REWARD_MAKER_RECEIVED_FEES // Asset account for received LP fees. AccountTypeLPFeeReward AccountType = proto.AccountType_ACCOUNT_TYPE_REWARD_LP_RECEIVED_FEES // Asset account for market proposers. AccountTypeMarketProposerReward AccountType = proto.AccountType_ACCOUNT_TYPE_REWARD_MARKET_PROPOSERS )
type ActiveAssets ¶
type ActiveAssets struct {
Assets []*Asset
}
func ActiveAssetsFromProto ¶
func ActiveAssetsFromProto(aa *snapshot.ActiveAssets) *ActiveAssets
func (ActiveAssets) IntoProto ¶
func (a ActiveAssets) IntoProto() *snapshot.ActiveAssets
type AnnounceNode ¶
type AnnounceNode = commandspb.AnnounceNode
type AppState ¶
func AppStateFromProto ¶
type Asset ¶
type Asset struct { // Internal identifier of the asset ID string // Name of the asset (e.g: Great British Pound) Details *AssetDetails // Status of the asset Status AssetStatus }
type AssetAction ¶
type AssetAction struct { ID string State uint32 Asset string BlockNumber uint64 TxIndex uint64 Hash string BuiltinD *BuiltinAssetDeposit Erc20D *ERC20Deposit Erc20AL *ERC20AssetList ERC20AssetLimitsUpdated *ERC20AssetLimitsUpdated BridgeStopped bool BridgeResume bool }
func AssetActionFromProto ¶
func AssetActionFromProto(a *snapshot.AssetAction) *AssetAction
func (*AssetAction) IntoProto ¶
func (aa *AssetAction) IntoProto() *snapshot.AssetAction
type AssetDetails ¶
type AssetDetails struct { Name string Symbol string Decimals uint64 Quantum num.Decimal // *AssetDetailsBuiltinAsset // *AssetDetailsErc20 Source isAssetDetails }
func AssetDetailsFromProto ¶
func AssetDetailsFromProto(p *proto.AssetDetails) (*AssetDetails, error)
func (AssetDetails) DeepClone ¶
func (a AssetDetails) DeepClone() *AssetDetails
func (AssetDetails) GetERC20 ¶
func (a AssetDetails) GetERC20() *ERC20
func (AssetDetails) IntoProto ¶
func (a AssetDetails) IntoProto() *proto.AssetDetails
func (AssetDetails) String ¶
func (a AssetDetails) String() string
func (AssetDetails) Validate ¶
func (a AssetDetails) Validate() (ProposalError, error)
type AssetDetailsBuiltinAsset ¶
type AssetDetailsBuiltinAsset struct {
BuiltinAsset *BuiltinAsset
}
func AssetDetailsBuiltinFromProto ¶
func AssetDetailsBuiltinFromProto(p *proto.AssetDetails_BuiltinAsset) *AssetDetailsBuiltinAsset
func (AssetDetailsBuiltinAsset) DeepClone ¶
func (a AssetDetailsBuiltinAsset) DeepClone() isAssetDetails
func (AssetDetailsBuiltinAsset) IntoProto ¶
func (a AssetDetailsBuiltinAsset) IntoProto() *proto.AssetDetails_BuiltinAsset
func (AssetDetailsBuiltinAsset) String ¶
func (a AssetDetailsBuiltinAsset) String() string
func (AssetDetailsBuiltinAsset) Validate ¶
func (a AssetDetailsBuiltinAsset) Validate() (ProposalError, error)
type AssetDetailsErc20 ¶
type AssetDetailsErc20 struct {
ERC20 *ERC20
}
func AssetDetailsERC20FromProto ¶
func AssetDetailsERC20FromProto(p *proto.AssetDetails_Erc20) (*AssetDetailsErc20, error)
func (AssetDetailsErc20) DeepClone ¶
func (a AssetDetailsErc20) DeepClone() isAssetDetails
func (AssetDetailsErc20) IntoProto ¶
func (a AssetDetailsErc20) IntoProto() *proto.AssetDetails_Erc20
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 (a AssetDetailsUpdate) IntoProto() *vegapb.AssetDetailsUpdate
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 AssetDetailsUpdateERC20FromProto ¶
func AssetDetailsUpdateERC20FromProto(p *vegapb.AssetDetailsUpdate_Erc20) (*AssetDetailsUpdateERC20, error)
func (AssetDetailsUpdateERC20) DeepClone ¶
func (a AssetDetailsUpdateERC20) DeepClone() isAssetDetailsUpdate
func (AssetDetailsUpdateERC20) IntoProto ¶
func (a AssetDetailsUpdateERC20) IntoProto() *vegapb.AssetDetailsUpdate_Erc20
func (AssetDetailsUpdateERC20) String ¶
func (a AssetDetailsUpdateERC20) String() string
func (AssetDetailsUpdateERC20) Validate ¶
func (a AssetDetailsUpdateERC20) Validate() (ProposalError, error)
type AssetStatus ¶
type AssetStatus = proto.Asset_Status
const ( // Default value, always invalid. AssetStatusUnspecified AssetStatus = proto.Asset_STATUS_UNSPECIFIED // Asset is proposed and under vote. AssetStatusProposed AssetStatus = proto.Asset_STATUS_PROPOSED // Asset has been rejected from governance. AssetStatusRejected AssetStatus = proto.Asset_STATUS_REJECTED // Asset is pending listing from the bridge. AssetStatusPendingListing AssetStatus = proto.Asset_STATUS_PENDING_LISTING // Asset is fully usable in the network. AssetStatusEnabled AssetStatus = proto.Asset_STATUS_ENABLED )
type AuctionDuration ¶
func AuctionDurationFromProto ¶
func AuctionDurationFromProto(ad *proto.AuctionDuration) *AuctionDuration
func (AuctionDuration) DeepClone ¶
func (a AuctionDuration) DeepClone() *AuctionDuration
func (AuctionDuration) IntoProto ¶
func (a AuctionDuration) IntoProto() *proto.AuctionDuration
func (AuctionDuration) String ¶
func (a AuctionDuration) String() string
type AuctionState ¶
type AuctionState struct { Mode MarketTradingMode DefaultMode MarketTradingMode Trigger AuctionTrigger Begin time.Time End *AuctionDuration Start bool Stop bool Extension AuctionTrigger ExtensionEventSent bool }
func AuctionStateFromProto ¶
func AuctionStateFromProto(as *snapshot.AuctionState) *AuctionState
func (AuctionState) IntoProto ¶
func (a AuctionState) IntoProto() *snapshot.AuctionState
type AuctionTrigger ¶
type AuctionTrigger = proto.AuctionTrigger
const ( // Default value for AuctionTrigger, no auction triggered. AuctionTriggerUnspecified AuctionTrigger = proto.AuctionTrigger_AUCTION_TRIGGER_UNSPECIFIED // Batch auction. AuctionTriggerBatch AuctionTrigger = proto.AuctionTrigger_AUCTION_TRIGGER_BATCH // Opening auction. AuctionTriggerOpening AuctionTrigger = proto.AuctionTrigger_AUCTION_TRIGGER_OPENING // Price monitoring trigger. AuctionTriggerPrice AuctionTrigger = proto.AuctionTrigger_AUCTION_TRIGGER_PRICE // Liquidity monitoring trigger. AuctionTriggerLiquidity AuctionTrigger = proto.AuctionTrigger_AUCTION_TRIGGER_LIQUIDITY )
type BDeposit ¶
func BDepositFromProto ¶
type BankingAssetActions ¶
type BankingAssetActions struct {
AssetAction []*AssetAction
}
func BankingAssetActionsFromProto ¶
func BankingAssetActionsFromProto(aa *snapshot.BankingAssetActions) *BankingAssetActions
func (*BankingAssetActions) IntoProto ¶
func (a *BankingAssetActions) IntoProto() *snapshot.BankingAssetActions
type BankingBridgeState ¶
type BankingDeposits ¶
type BankingDeposits struct {
Deposit []*BDeposit
}
func BankingDepositsFromProto ¶
func BankingDepositsFromProto(bd *snapshot.BankingDeposits) *BankingDeposits
func (BankingDeposits) IntoProto ¶
func (b BankingDeposits) IntoProto() *snapshot.BankingDeposits
type BankingSeen ¶
type BankingSeen struct {
Refs []string
}
func BankingSeenFromProto ¶
func BankingSeenFromProto(bs *snapshot.BankingSeen) *BankingSeen
func (BankingSeen) IntoProto ¶
func (b BankingSeen) IntoProto() *snapshot.BankingSeen
type BankingWithdrawals ¶
type BankingWithdrawals struct {
Withdrawals []*RWithdrawal
}
func BankingWithdrawalsFromProto ¶
func BankingWithdrawalsFromProto(bw *snapshot.BankingWithdrawals) *BankingWithdrawals
func (BankingWithdrawals) IntoProto ¶
func (b BankingWithdrawals) IntoProto() *snapshot.BankingWithdrawals
type BannedParty ¶
func BannedPartyFromProto ¶
func BannedPartyFromProto(ban *snapshot.BannedParty) *BannedParty
func (*BannedParty) IntoProto ¶
func (b *BannedParty) IntoProto() *snapshot.BannedParty
type Block ¶
type Block struct {
Height int64
}
func NewBlockFromProto ¶
func NewBlockFromProto(bp *checkpoint.Block) *Block
func (Block) IntoProto ¶
func (b Block) IntoProto() *checkpoint.Block
type BlockRejectStats ¶
func BlockRejectStatsFromProto ¶
func BlockRejectStatsFromProto(rejects *snapshot.BlockRejectStats) *BlockRejectStats
func (*BlockRejectStats) IntoProto ¶
func (brs *BlockRejectStats) IntoProto() *snapshot.BlockRejectStats
type BuiltinAsset ¶
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 (b BuiltinAssetDeposit) IntoProto() *vegapb.BuiltinAssetDeposit
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 (c BuiltinAssetEvent) IntoProto() *vegapb.BuiltinAssetEvent
func (BuiltinAssetEvent) String ¶
func (c BuiltinAssetEvent) String() string
type BuiltinAssetEventDeposit ¶
type BuiltinAssetEventDeposit struct {
Deposit *BuiltinAssetDeposit
}
func NewBuiltinAssetEventDeposit ¶
func NewBuiltinAssetEventDeposit(p *vegapb.BuiltinAssetEvent_Deposit) (*BuiltinAssetEventDeposit, error)
func (BuiltinAssetEventDeposit) IntoProto ¶
func (b BuiltinAssetEventDeposit) IntoProto() *vegapb.BuiltinAssetEvent_Deposit
func (BuiltinAssetEventDeposit) String ¶
func (b BuiltinAssetEventDeposit) String() string
type BuiltinAssetEventWithdrawal ¶
type BuiltinAssetEventWithdrawal struct {
Withdrawal *BuiltinAssetWithdrawal
}
func NewBuiltinAssetEventWithdrawal ¶
func NewBuiltinAssetEventWithdrawal(p *vegapb.BuiltinAssetEvent_Withdrawal) (*BuiltinAssetEventWithdrawal, error)
func (BuiltinAssetEventWithdrawal) IntoProto ¶
func (b BuiltinAssetEventWithdrawal) IntoProto() *vegapb.BuiltinAssetEvent_Withdrawal
func (BuiltinAssetEventWithdrawal) String ¶
func (b BuiltinAssetEventWithdrawal) String() 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 NewBuiltinAssetWithdrawalFromProto ¶
func NewBuiltinAssetWithdrawalFromProto(p *vegapb.BuiltinAssetWithdrawal) (*BuiltinAssetWithdrawal, error)
func (BuiltinAssetWithdrawal) GetVegaAssetID ¶
func (b BuiltinAssetWithdrawal) GetVegaAssetID() string
func (BuiltinAssetWithdrawal) IntoProto ¶
func (b BuiltinAssetWithdrawal) IntoProto() *vegapb.BuiltinAssetWithdrawal
func (BuiltinAssetWithdrawal) String ¶
func (b BuiltinAssetWithdrawal) String() string
type CPState ¶
type CPState struct {
NextCp int64
}
func CheckpointFromProto ¶
func CheckpointFromProto(c *snapshot.Checkpoint) *CPState
func (CPState) IntoProto ¶
func (c CPState) IntoProto() *snapshot.Checkpoint
type CancelTransferFunds ¶
func NewCancelTransferFromProto ¶
func NewCancelTransferFromProto(party string, p *commandspb.CancelTransfer) *CancelTransferFunds
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 (c ChainEventBuiltin) IntoProto() *commandspb.ChainEvent_Builtin
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 (c ChainEventERC20) IntoProto() *commandspb.ChainEvent_Erc20
func (ChainEventERC20) String ¶
func (c ChainEventERC20) String() string
type Checkpoint ¶
type Checkpoint struct { Governance []byte Assets []byte Collateral []byte NetworkParameters []byte Delegation []byte Epoch []byte Block []byte Rewards []byte Validators []byte Banking []byte Staking []byte MultisigControl []byte MarketActivityTracker []byte }
func NewCheckpointFromProto ¶
func NewCheckpointFromProto(pc *checkpoint.Checkpoint) *Checkpoint
func (Checkpoint) Get ¶
func (c Checkpoint) Get(name CheckpointName) []byte
Get as the name suggests gets the data by checkpoint name.
func (Checkpoint) GetBlockHeight ¶
func (c Checkpoint) GetBlockHeight() (int64, error)
func (Checkpoint) HashBytes ¶
func (c Checkpoint) HashBytes() []byte
HashBytes returns the data contained in the checkpoint as a []byte for hashing the order in which the data is added to the slice matters.
func (Checkpoint) IntoProto ¶
func (c Checkpoint) IntoProto() *checkpoint.Checkpoint
func (*Checkpoint) Set ¶
func (c *Checkpoint) Set(name CheckpointName, val []byte)
Set set a specific checkpoint value using the name the engine returns.
func (*Checkpoint) SetBlockHeight ¶
func (c *Checkpoint) SetBlockHeight(height int64) error
type CheckpointName ¶
type CheckpointName string
const ( GovernanceCheckpoint CheckpointName = "governance" AssetsCheckpoint CheckpointName = "assets" CollateralCheckpoint CheckpointName = "collateral" NetParamsCheckpoint CheckpointName = "netparams" DelegationCheckpoint CheckpointName = "delegation" EpochCheckpoint CheckpointName = "epoch" BlockCheckpoint CheckpointName = "block" // pseudo-checkpoint, really... MarketActivityTrackerCheckpoint CheckpointName = "marketActivity" PendingRewardsCheckpoint CheckpointName = "rewards" BankingCheckpoint CheckpointName = "banking" ValidatorsCheckpoint CheckpointName = "validators" StakingCheckpoint CheckpointName = "staking" MultisigControlCheckpoint CheckpointName = "multisigControl" )
type CheckpointState ¶
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 (s CheckpointState) IntoProto() *checkpoint.CheckpointState
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 ¶
func ChunkFromProto ¶
type CollateralAccounts ¶
type CollateralAccounts struct {
Accounts []*Account
}
func CollateralAccountsFromProto ¶
func CollateralAccountsFromProto(ca *snapshot.CollateralAccounts) *CollateralAccounts
func (CollateralAccounts) IntoProto ¶
func (c CollateralAccounts) IntoProto() *snapshot.CollateralAccounts
type CollateralAssets ¶
type CollateralAssets struct {
Assets []*Asset
}
func CollateralAssetsFromProto ¶
func CollateralAssetsFromProto(ca *snapshot.CollateralAssets) *CollateralAssets
func (CollateralAssets) IntoProto ¶
func (c CollateralAssets) IntoProto() *snapshot.CollateralAssets
type CurrentPrice ¶
func CurrentPriceFromProto ¶
func CurrentPriceFromProto(scp *snapshot.CurrentPrice) *CurrentPrice
func (CurrentPrice) IntoProto ¶
func (cp CurrentPrice) IntoProto() *snapshot.CurrentPrice
type DataSignerType ¶ added in v0.61.0
type DataSignerType int
const ( DataSignerTypeUnspecified DataSignerType = iota DataSignerTypePubKey DataSignerTypeEthAddress )
type DataSourceDefinition ¶ added in v0.62.0
type DataSourceDefinition struct {
SourceType dataSourceType
}
func DataSourceDefinitionFromProto ¶ added in v0.62.0
func DataSourceDefinitionFromProto(protoConfig *vegapb.DataSourceDefinition) *DataSourceDefinition
/ DataSourceDefinitionFromProto tries to build the DataSourceDfiniition object from the given proto object.
func NewDataSourceDefinition ¶ added in v0.62.0
func NewDataSourceDefinition(tp int) *DataSourceDefinition
NewDataSourceDefinition creates a new empty DataSourceDefinition object.
func (DataSourceDefinition) DeepClone ¶ added in v0.62.0
func (s DataSourceDefinition) DeepClone() DataSourceDefinition
DeepClone returns a clone of the DataSourceDefinition object.
func (DataSourceDefinition) GetDataSourceSpecConfiguration ¶ added in v0.62.0
func (s DataSourceDefinition) GetDataSourceSpecConfiguration() *vegapb.DataSourceSpecConfiguration
GetDataSourceSpecConfiguration returns the base object - DataSourceSpecConfiguration from the DataSourceDefinition.
func (DataSourceDefinition) GetFilters ¶ added in v0.62.0
func (s DataSourceDefinition) GetFilters() []*DataSourceSpecFilter
/ GetFilters tries to get the filters from the DataSourceDefinition if they exist.
func (DataSourceDefinition) GetSigners ¶ added in v0.62.0
func (s DataSourceDefinition) GetSigners() []*Signer
/ GetSigners tries to get the signers from the DataSourceDefinition if they exist.
func (DataSourceDefinition) IntoProto ¶ added in v0.62.0
func (s DataSourceDefinition) IntoProto() *vegapb.DataSourceDefinition
/ IntoProto returns the proto object from DataSourceDefinition that is - vegapb.DataSourceDefinition that may have external or internal SourceType. Returns the whole proto object.
func (*DataSourceDefinition) SetOracleConfig ¶ added in v0.62.0
func (s *DataSourceDefinition) SetOracleConfig(oc *DataSourceSpecConfiguration) *DataSourceDefinition
SetOracleConfig sets a given oracle config in the receiver. This method does not care about object previous contents.
func (DataSourceDefinition) String ¶ added in v0.62.0
func (s DataSourceDefinition) String() string
/ String returns the data source definition content as a string.
func (DataSourceDefinition) ToDataSourceSpec ¶ added in v0.62.0
func (s DataSourceDefinition) ToDataSourceSpec() *DataSourceSpec
func (*DataSourceDefinition) ToExternalDataSourceSpec ¶ added in v0.62.0
func (s *DataSourceDefinition) ToExternalDataSourceSpec() *ExternalDataSourceSpec
func (*DataSourceDefinition) UpdateFilters ¶ added in v0.62.0
func (s *DataSourceDefinition) UpdateFilters(filters []*DataSourceSpecFilter)
/ UpdateFilters updates the DataSourceDefinition Filters.
type DataSourceDefinitionExternal ¶ added in v0.62.0
type DataSourceDefinitionExternal struct {
SourceType dataSourceType
}
func DataSourceDefinitionExternalFromProto ¶ added in v0.62.0
func DataSourceDefinitionExternalFromProto(protoConfig *vegapb.DataSourceDefinitionExternal) *DataSourceDefinitionExternal
/ DataSourceDefinitionExternalFromProto tries to build the DataSourceDefinitionExternal object from the given proto object..
func (*DataSourceDefinitionExternal) DeepClone ¶ added in v0.62.0
func (e *DataSourceDefinitionExternal) DeepClone() dataSourceType
func (*DataSourceDefinitionExternal) IntoProto ¶ added in v0.62.0
func (e *DataSourceDefinitionExternal) IntoProto() *vegapb.DataSourceDefinitionExternal
/ IntoProto tries to return the base proto object from DataSourceDefinitionExternal.
func (*DataSourceDefinitionExternal) String ¶ added in v0.62.0
func (e *DataSourceDefinitionExternal) String() string
type DataSourceDefinitionExternalOracle ¶ added in v0.62.0
type DataSourceDefinitionExternalOracle struct {
Oracle *DataSourceSpecConfiguration
}
This is the base data source.
func DataSourceDefinitionExternalOracleFromProto ¶ added in v0.62.0
func DataSourceDefinitionExternalOracleFromProto(protoConfig *vegapb.DataSourceDefinitionExternal_Oracle) *DataSourceDefinitionExternalOracle
DataSourceDefinitionExternalOracleFromProto tries to build the DataSourceDefinitionExternalOracle object from the given proto object.
func (*DataSourceDefinitionExternalOracle) DeepClone ¶ added in v0.62.0
func (e *DataSourceDefinitionExternalOracle) DeepClone() dataSourceType
func (*DataSourceDefinitionExternalOracle) IntoProto ¶ added in v0.62.0
func (e *DataSourceDefinitionExternalOracle) IntoProto() *vegapb.DataSourceDefinitionExternal_Oracle
/ IntoProto tries to build the proto object from DataSourceDefinitionExternalOracle.
func (*DataSourceDefinitionExternalOracle) String ¶ added in v0.62.0
func (e *DataSourceDefinitionExternalOracle) String() string
type DataSourceDefinitionExternalx ¶ added in v0.62.0
type DataSourceDefinitionExternalx struct {
External *DataSourceDefinitionExternal
}
func (*DataSourceDefinitionExternalx) DeepClone ¶ added in v0.62.0
func (s *DataSourceDefinitionExternalx) DeepClone() dataSourceType
func (*DataSourceDefinitionExternalx) IntoProto ¶ added in v0.62.0
func (s *DataSourceDefinitionExternalx) IntoProto() *vegapb.DataSourceDefinition_External
IntoProto returns the proto object from DataSourceDefinitionInternalx This method is not called from anywhere.
func (*DataSourceDefinitionExternalx) String ¶ added in v0.62.0
func (s *DataSourceDefinitionExternalx) String() string
String returns the DataSourceDefinitionExternalx content as a string.
func (*DataSourceDefinitionExternalx) ToDataSourceSpec ¶ added in v0.62.0
func (s *DataSourceDefinitionExternalx) ToDataSourceSpec() *DataSourceSpec
type DataSourceDefinitionInternal ¶ added in v0.62.0
type DataSourceDefinitionInternal struct {
SourceType dataSourceType
}
func DataSourceDefinitionInternalFromProto ¶ added in v0.62.0
func DataSourceDefinitionInternalFromProto(protoConfig *vegapb.DataSourceDefinitionInternal) *DataSourceDefinitionInternal
// DataSourceDefinitionInternalFromProto tries to build the DataSourceDefinitionInternal object from the given proto configuration.
func (*DataSourceDefinitionInternal) DeepClone ¶ added in v0.62.0
func (i *DataSourceDefinitionInternal) DeepClone() dataSourceType
func (*DataSourceDefinitionInternal) IntoProto ¶ added in v0.62.0
func (i *DataSourceDefinitionInternal) IntoProto() interface{}
func (*DataSourceDefinitionInternal) String ¶ added in v0.62.0
func (i *DataSourceDefinitionInternal) String() string
type DataSourceDefinitionInternalTime ¶ added in v0.62.0
type DataSourceDefinitionInternalTime struct {
Time *DataSourceSpecConfigurationTime
}
func DataSourceDefinitionInternalTimeFromProto ¶ added in v0.62.0
func DataSourceDefinitionInternalTimeFromProto(protoConfig *vegapb.DataSourceDefinitionInternal_Time) *DataSourceDefinitionInternalTime
func (*DataSourceDefinitionInternalTime) DeepClone ¶ added in v0.62.0
func (i *DataSourceDefinitionInternalTime) DeepClone() dataSourceType
func (*DataSourceDefinitionInternalTime) IntoProto ¶ added in v0.62.0
func (i *DataSourceDefinitionInternalTime) IntoProto() *vegapb.DataSourceDefinitionInternal_Time
func (*DataSourceDefinitionInternalTime) String ¶ added in v0.62.0
func (i *DataSourceDefinitionInternalTime) String() string
type DataSourceDefinitionInternalx ¶ added in v0.62.0
type DataSourceDefinitionInternalx struct {
Internal *DataSourceDefinitionInternal
}
func (*DataSourceDefinitionInternalx) DeepClone ¶ added in v0.62.0
func (s *DataSourceDefinitionInternalx) DeepClone() dataSourceType
DeepClone returns a clone of the DataSourceDefinitionInternalx object.
func (*DataSourceDefinitionInternalx) IntoProto ¶ added in v0.62.0
func (s *DataSourceDefinitionInternalx) IntoProto() *vegapb.DataSourceDefinition_Internal
IntoProto returns the proto object from DataSourceDefinitionInternalx. This method is not called from anywhere.
func (*DataSourceDefinitionInternalx) String ¶ added in v0.62.0
func (s *DataSourceDefinitionInternalx) String() string
String returns the DataSourceDefinitionInternalx content as a string.
func (*DataSourceDefinitionInternalx) ToDataSourceSpec ¶ added in v0.62.0
func (s *DataSourceDefinitionInternalx) ToDataSourceSpec() *DataSourceSpec
type DataSourceSpec ¶ added in v0.61.0
type DataSourceSpec struct { ID string CreatedAt int64 UpdatedAt int64 Data *DataSourceDefinition Status DataSourceSpecStatus }
func DataSourceSpecFromProto ¶ added in v0.61.0
func DataSourceSpecFromProto(specProto *vegapb.DataSourceSpec) *DataSourceSpec
func (*DataSourceSpec) IntoProto ¶ added in v0.61.0
func (s *DataSourceSpec) IntoProto() *vegapb.DataSourceSpec
func (*DataSourceSpec) String ¶ added in v0.61.0
func (s *DataSourceSpec) String() string
func (*DataSourceSpec) ToExternalDataSourceSpec ¶ added in v0.61.0
func (s *DataSourceSpec) ToExternalDataSourceSpec() *ExternalDataSourceSpec
/ ToExternalDataSourceSpec wraps the DataSourceSpec receiver into ExternalDataSourceSpec. Used for aligning with required types in the code.
type DataSourceSpecBindingForFuture ¶ added in v0.61.0
type DataSourceSpecBindingForFuture struct { SettlementDataProperty string TradingTerminationProperty string }
func DataSourceSpecBindingForFutureFromProto ¶ added in v0.61.0
func DataSourceSpecBindingForFutureFromProto(o *vegapb.DataSourceSpecToFutureBinding) *DataSourceSpecBindingForFuture
func OracleSpecBindingForFutureFromProto ¶
func OracleSpecBindingForFutureFromProto(o *vegapb.DataSourceSpecToFutureBinding) *DataSourceSpecBindingForFuture
func (DataSourceSpecBindingForFuture) DeepClone ¶ added in v0.61.0
func (b DataSourceSpecBindingForFuture) DeepClone() *DataSourceSpecBindingForFuture
func (DataSourceSpecBindingForFuture) IntoProto ¶ added in v0.61.0
func (b DataSourceSpecBindingForFuture) IntoProto() *vegapb.DataSourceSpecToFutureBinding
func (DataSourceSpecBindingForFuture) String ¶ added in v0.61.0
func (b DataSourceSpecBindingForFuture) String() string
type DataSourceSpecCondition ¶ added in v0.61.0
type DataSourceSpecCondition struct { Operator DataSourceSpecConditionOperator Value string }
DataSourceSpecCondition mirrors datapb.Condition type.
func DataSourceSpecConditionFromProto ¶ added in v0.61.0
func DataSourceSpecConditionFromProto(protoCondition *datapb.Condition) *DataSourceSpecCondition
func DataSourceSpecConditionsFromProto ¶ added in v0.61.0
func DataSourceSpecConditionsFromProto(protoConditions []*datapb.Condition) []*DataSourceSpecCondition
func DeepCloneDataSourceSpecConditions ¶ added in v0.61.0
func DeepCloneDataSourceSpecConditions(conditions []*DataSourceSpecCondition) []*DataSourceSpecCondition
func (*DataSourceSpecCondition) DeepClone ¶ added in v0.61.0
func (c *DataSourceSpecCondition) DeepClone() dataSourceType
func (DataSourceSpecCondition) IntoProto ¶ added in v0.61.0
func (c DataSourceSpecCondition) IntoProto() *datapb.Condition
func (DataSourceSpecCondition) String ¶ added in v0.61.0
func (c DataSourceSpecCondition) String() string
type DataSourceSpecConditionOperator ¶ added in v0.61.0
type DataSourceSpecConditionOperator = datapb.Condition_Operator
type DataSourceSpecConditions ¶ added in v0.61.0
type DataSourceSpecConditions []*DataSourceSpecCondition
func (DataSourceSpecConditions) IntoProto ¶ added in v0.61.0
func (sc DataSourceSpecConditions) IntoProto() []*datapb.Condition
func (DataSourceSpecConditions) String ¶ added in v0.61.0
func (sc DataSourceSpecConditions) String() string
type DataSourceSpecConfiguration ¶ added in v0.61.0
type DataSourceSpecConfiguration struct { Signers []*Signer Filters []*DataSourceSpecFilter }
DataSourceSpecConfiguration is used only by Oracles without a type wrapper at the moment.
func DataSourceSpecConfigurationFromProto ¶ added in v0.61.0
func DataSourceSpecConfigurationFromProto(protoConfig *vegapb.DataSourceSpecConfiguration) *DataSourceSpecConfiguration
DataSourceSpecConfigurationFromProto tries to build the DataSourceSpecConfiguration object from the given proto object.
func (*DataSourceSpecConfiguration) DeepClone ¶ added in v0.61.0
func (s *DataSourceSpecConfiguration) DeepClone() dataSourceType
func (*DataSourceSpecConfiguration) IntoProto ¶ added in v0.61.0
func (s *DataSourceSpecConfiguration) IntoProto() *vegapb.DataSourceSpecConfiguration
/ IntoProto tries to build the proto object from DataSourceSpecConfiguration.
func (DataSourceSpecConfiguration) String ¶ added in v0.61.0
func (s DataSourceSpecConfiguration) String() string
/ String returns the content of DataSourceSpecConfiguration as a string.
type DataSourceSpecConfigurationTime ¶ added in v0.62.0
type DataSourceSpecConfigurationTime struct {
Conditions []*DataSourceSpecCondition
}
DataSourceSpecConfigurationTime is used internally.
func DataSourceSpecConfigurationTimeFromProto ¶ added in v0.62.0
func DataSourceSpecConfigurationTimeFromProto(protoConfig *vegapb.DataSourceSpecConfigurationTime) *DataSourceSpecConfigurationTime
func (DataSourceSpecConfigurationTime) DeepClone ¶ added in v0.62.0
func (s DataSourceSpecConfigurationTime) DeepClone() dataSourceType
func (DataSourceSpecConfigurationTime) IntoProto ¶ added in v0.62.0
func (s DataSourceSpecConfigurationTime) IntoProto() *vegapb.DataSourceSpecConfigurationTime
func (DataSourceSpecConfigurationTime) String ¶ added in v0.62.0
func (s DataSourceSpecConfigurationTime) String() string
/ String returns the content of DataSourceSpecConfigurationTime as a string.
type DataSourceSpecFilter ¶ added in v0.61.0
type DataSourceSpecFilter struct { Key *DataSourceSpecPropertyKey Conditions []*DataSourceSpecCondition }
func DataSourceSpecFilterFromProto ¶ added in v0.61.0
func DataSourceSpecFilterFromProto(protoFilter *datapb.Filter) *DataSourceSpecFilter
func DataSourceSpecFiltersFromProto ¶ added in v0.61.0
func DataSourceSpecFiltersFromProto(protoFilters []*datapb.Filter) []*DataSourceSpecFilter
func DeepCloneDataSourceSpecFilters ¶ added in v0.61.0
func DeepCloneDataSourceSpecFilters(filters []*DataSourceSpecFilter) []*DataSourceSpecFilter
func (*DataSourceSpecFilter) DeepClone ¶ added in v0.61.0
func (f *DataSourceSpecFilter) DeepClone() *DataSourceSpecFilter
DeepClone clones the filter receiver taking into account if its fields are empty.
func (*DataSourceSpecFilter) IntoProto ¶ added in v0.61.0
func (f *DataSourceSpecFilter) IntoProto() *datapb.Filter
IntoProto return proto version of the filter receiver taking into account if its fields are empty.
func (DataSourceSpecFilter) String ¶ added in v0.61.0
func (f DataSourceSpecFilter) String() string
type DataSourceSpecFilters ¶ added in v0.61.0
type DataSourceSpecFilters []*DataSourceSpecFilter
func (DataSourceSpecFilters) IntoProto ¶ added in v0.61.0
func (df DataSourceSpecFilters) IntoProto() []*datapb.Filter
func (DataSourceSpecFilters) String ¶ added in v0.61.0
func (df DataSourceSpecFilters) String() string
type DataSourceSpecPropertyKey ¶ added in v0.61.0
type DataSourceSpecPropertyKey struct { Name string Type DataSourceSpecPropertyKeyType }
func DataSourceSpecPropertyKeyFromProto ¶ added in v0.61.0
func DataSourceSpecPropertyKeyFromProto(protoKey *datapb.PropertyKey) *DataSourceSpecPropertyKey
func (*DataSourceSpecPropertyKey) DeepClone ¶ added in v0.61.0
func (k *DataSourceSpecPropertyKey) DeepClone() *DataSourceSpecPropertyKey
func (DataSourceSpecPropertyKey) IntoProto ¶ added in v0.61.0
func (k DataSourceSpecPropertyKey) IntoProto() *datapb.PropertyKey
func (DataSourceSpecPropertyKey) String ¶ added in v0.61.0
func (k DataSourceSpecPropertyKey) String() string
type DataSourceSpecPropertyKeyType ¶ added in v0.61.0
type DataSourceSpecPropertyKeyType = datapb.PropertyKey_Type
type DataSourceSpecSigners ¶ added in v0.61.0
type DataSourceSpecSigners []*Signer
func (DataSourceSpecSigners) String ¶ added in v0.61.0
func (s DataSourceSpecSigners) String() string
type DataSourceSpecStatus ¶ added in v0.61.0
type DataSourceSpecStatus = vegapb.DataSourceSpec_Status
type DataSourceSpecToFutureBinding ¶ added in v0.61.0
type DataSourceSpecToFutureBinding struct{}
type Delegate ¶
func (Delegate) IntoProto ¶
func (d Delegate) IntoProto() *commandspb.DelegateSubmission
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 ¶
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 ¶
func (d DelegationActive) IntoProto() *snapshot.DelegationActive
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 ¶
func (d DelegationPending) IntoProto() *snapshot.DelegationPending
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 ¶
type DepositStatus ¶
type DepositStatus = vegapb.Deposit_Status
const ( // DepositStatusUnspecified Default value, always invalid. DepositStatusUnspecified DepositStatus = 0 // DepositStatusOpen The deposit is being processed by the network. DepositStatusOpen DepositStatus = 1 // DepositStatusCancelled The deposit has been cancelled by the network. DepositStatusCancelled DepositStatus = 2 // DepositStatusFinalized The deposit has been finalised and accounts have been updated. DepositStatusFinalized DepositStatus = 3 )
type 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 NewERC20AssetLimitsUpdatedFromProto ¶
func NewERC20AssetLimitsUpdatedFromProto(p *vegapb.ERC20AssetLimitsUpdated) *ERC20AssetLimitsUpdated
func (ERC20AssetLimitsUpdated) GetVegaAssetID ¶
func (e ERC20AssetLimitsUpdated) GetVegaAssetID() string
func (ERC20AssetLimitsUpdated) IntoProto ¶
func (e ERC20AssetLimitsUpdated) IntoProto() *vegapb.ERC20AssetLimitsUpdated
func (ERC20AssetLimitsUpdated) String ¶
func (e ERC20AssetLimitsUpdated) String() string
type ERC20AssetList ¶
type ERC20AssetList struct { // The Vega network internal identifier of the asset VegaAssetID string // ethereum address of the asset AssetSource string }
func NewERC20AssetListFromProto ¶
func NewERC20AssetListFromProto(p *vegapb.ERC20AssetList) *ERC20AssetList
func (ERC20AssetList) GetVegaAssetID ¶
func (e ERC20AssetList) GetVegaAssetID() string
func (ERC20AssetList) IntoProto ¶
func (e ERC20AssetList) IntoProto() *vegapb.ERC20AssetList
func (ERC20AssetList) String ¶
func (e ERC20AssetList) String() string
type ERC20Deposit ¶
type ERC20Deposit struct { // The vega network internal identifier of the asset VegaAssetID string // The Ethereum wallet that initiated the deposit SourceEthereumAddress string // The Vega party identifier (pub-key) which is the target of the deposit TargetPartyID string // The amount to be deposited Amount *num.Uint }
func NewERC20DepositFromProto ¶
func NewERC20DepositFromProto(p *vegapb.ERC20Deposit) (*ERC20Deposit, error)
func (ERC20Deposit) GetVegaAssetID ¶
func (e ERC20Deposit) GetVegaAssetID() string
func (ERC20Deposit) IntoProto ¶
func (e ERC20Deposit) IntoProto() *vegapb.ERC20Deposit
func (ERC20Deposit) String ¶
func (e ERC20Deposit) String() string
type ERC20Event ¶
type ERC20Event struct { // Index of the transaction Index uint64 // The block in which the transaction was added Block uint64 // The action // // Types that are valid to be assigned to Action: // *ERC20EventAssetList // *ERC20EventAssetDelist // *ERC20EventDeposit // *ERC20EventWithdrawal // *ERC20EventAssetLimitsUpdated // *ERC20BridgeStopped // *ERC20BridgeRemoved Action erc20EventAction }
func NewERC20Event ¶
func NewERC20Event(p *vegapb.ERC20Event) (*ERC20Event, error)
func (ERC20Event) IntoProto ¶
func (e ERC20Event) IntoProto() *vegapb.ERC20Event
func (ERC20Event) String ¶
func (e ERC20Event) String() string
type ERC20EventAssetDelist ¶
type ERC20EventAssetDelist struct {
AssetDelist *ERC20AssetDelist
}
func NewERC20EventAssetDelist ¶
func NewERC20EventAssetDelist(p *vegapb.ERC20Event_AssetDelist) *ERC20EventAssetDelist
func (ERC20EventAssetDelist) IntoProto ¶
func (e ERC20EventAssetDelist) IntoProto() *vegapb.ERC20Event_AssetDelist
func (ERC20EventAssetDelist) String ¶
func (e ERC20EventAssetDelist) String() string
type ERC20EventAssetLimitsUpdated ¶
type ERC20EventAssetLimitsUpdated struct {
AssetLimitsUpdated *ERC20AssetLimitsUpdated
}
func NewERC20EventAssetLimitsUpdated ¶
func NewERC20EventAssetLimitsUpdated(p *vegapb.ERC20Event_AssetLimitsUpdated) *ERC20EventAssetLimitsUpdated
func (ERC20EventAssetLimitsUpdated) IntoProto ¶
func (e ERC20EventAssetLimitsUpdated) IntoProto() *vegapb.ERC20Event_AssetLimitsUpdated
func (ERC20EventAssetLimitsUpdated) String ¶
func (e ERC20EventAssetLimitsUpdated) String() string
type ERC20EventAssetList ¶
type ERC20EventAssetList struct {
AssetList *ERC20AssetList
}
func NewERC20EventAssetList ¶
func NewERC20EventAssetList(p *vegapb.ERC20Event_AssetList) *ERC20EventAssetList
func (ERC20EventAssetList) IntoProto ¶
func (e ERC20EventAssetList) IntoProto() *vegapb.ERC20Event_AssetList
func (ERC20EventAssetList) String ¶
func (e ERC20EventAssetList) String() string
type ERC20EventBridgeResumed ¶
type ERC20EventBridgeResumed struct {
BridgeResumed bool
}
func NewERC20EventBridgeResumed ¶
func NewERC20EventBridgeResumed(p *vegapb.ERC20Event_BridgeResumed) *ERC20EventBridgeResumed
func (ERC20EventBridgeResumed) IntoProto ¶
func (e ERC20EventBridgeResumed) IntoProto() *vegapb.ERC20Event_BridgeResumed
func (ERC20EventBridgeResumed) String ¶
func (e ERC20EventBridgeResumed) String() string
type ERC20EventBridgeStopped ¶
type ERC20EventBridgeStopped struct {
BridgeStopped bool
}
func NewERC20EventBridgeStopped ¶
func NewERC20EventBridgeStopped(p *vegapb.ERC20Event_BridgeStopped) *ERC20EventBridgeStopped
func (ERC20EventBridgeStopped) IntoProto ¶
func (e ERC20EventBridgeStopped) IntoProto() *vegapb.ERC20Event_BridgeStopped
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 (e ERC20EventDeposit) IntoProto() *vegapb.ERC20Event_Deposit
func (ERC20EventDeposit) String ¶
func (e ERC20EventDeposit) String() string
type ERC20EventWithdrawal ¶
type ERC20EventWithdrawal struct {
Withdrawal *ERC20Withdrawal
}
func NewERC20EventWithdrawal ¶
func NewERC20EventWithdrawal(p *vegapb.ERC20Event_Withdrawal) *ERC20EventWithdrawal
func (ERC20EventWithdrawal) IntoProto ¶
func (e ERC20EventWithdrawal) IntoProto() *vegapb.ERC20Event_Withdrawal
func (ERC20EventWithdrawal) String ¶
func (e ERC20EventWithdrawal) String() string
type ERC20Update ¶
func (ERC20Update) DeepClone ¶
func (e ERC20Update) DeepClone() *ERC20Update
func (ERC20Update) String ¶
func (e ERC20Update) String() string
type ERC20Withdrawal ¶
type ERC20Withdrawal struct { // The Vega network internal identifier of the asset VegaAssetID string // The target Ethereum wallet address TargetEthereumAddress string // The reference nonce used for the transaction ReferenceNonce string }
func NewERC20WithdrawalFromProto ¶
func NewERC20WithdrawalFromProto(p *vegapb.ERC20Withdrawal) *ERC20Withdrawal
func (ERC20Withdrawal) GetVegaAssetID ¶
func (e ERC20Withdrawal) GetVegaAssetID() string
func (ERC20Withdrawal) IntoProto ¶
func (e ERC20Withdrawal) IntoProto() *vegapb.ERC20Withdrawal
func (ERC20Withdrawal) String ¶
func (e ERC20Withdrawal) String() string
type ETHAddress ¶ added in v0.61.0
type ETHAddress struct {
Address string
}
ETHAddress.
func (ETHAddress) DeepClone ¶ added in v0.61.0
func (e ETHAddress) DeepClone() *ETHAddress
func (ETHAddress) IntoProto ¶ added in v0.61.0
func (e ETHAddress) IntoProto() *datapb.ETHAddress
func (ETHAddress) String ¶ added in v0.61.0
func (e ETHAddress) String() string
type Epoch ¶
type Epoch struct { // Unique identifier that increases by one each epoch Seq uint64 // What time did this epoch start StartTime time.Time // What time should this epoch end ExpireTime time.Time // What time did it actually end EndTime time.Time // What action took place Action proto.EpochAction }
func NewEpochFromProto ¶
func NewEpochFromProto(p *eventspb.EpochEvent) *Epoch
func (Epoch) IntoProto ¶
func (e Epoch) IntoProto() *eventspb.EpochEvent
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 {}
func EquityShareFromProto ¶
func EquityShareFromProto(es *snapshot.EquityShare) *EquityShare
func (EquityShare) IntoProto ¶
func (e EquityShare) IntoProto() *snapshot.EquityShare
type EquityShareLP ¶
type EquityShareLP struct {}
func EquityShareLPFromProto ¶
func EquityShareLPFromProto(esl *snapshot.EquityShareLP) *EquityShareLP
func (EquityShareLP) IntoProto ¶
func (e EquityShareLP) IntoProto() *snapshot.EquityShareLP
type Erc20WithdrawExt ¶
type Erc20WithdrawExt struct {
ReceiverAddress string
}
func Erc20WithdrawExtFromProto ¶
func Erc20WithdrawExtFromProto(erc20 *vegapb.Erc20WithdrawExt) *Erc20WithdrawExt
func (*Erc20WithdrawExt) IntoProto ¶
func (x *Erc20WithdrawExt) IntoProto() *vegapb.Erc20WithdrawExt
func (*Erc20WithdrawExt) String ¶
func (x *Erc20WithdrawExt) String() string
type EthereumConfig ¶
type EthereumConfig struct {
// contains filtered or unexported fields
}
func EthereumConfigFromProto ¶
func EthereumConfigFromProto(cfgProto *proto.EthereumConfig) (*EthereumConfig, error)
func EthereumConfigFromUntypedProto ¶
func EthereumConfigFromUntypedProto(v interface{}) (*EthereumConfig, error)
func (*EthereumConfig) ChainID ¶
func (c *EthereumConfig) ChainID() string
func (*EthereumConfig) CollateralBridge ¶
func (c *EthereumConfig) CollateralBridge() EthereumContract
func (*EthereumConfig) Confirmations ¶
func (c *EthereumConfig) Confirmations() uint64
func (*EthereumConfig) MultiSigControl ¶
func (c *EthereumConfig) MultiSigControl() EthereumContract
func (*EthereumConfig) NetworkID ¶
func (c *EthereumConfig) NetworkID() string
func (*EthereumConfig) StakingBridge ¶
func (c *EthereumConfig) StakingBridge() EthereumContract
func (*EthereumConfig) StakingBridgeAddresses ¶
func (c *EthereumConfig) StakingBridgeAddresses() []ethcmn.Address
StakingBridgeAddresses returns the registered staking bridge addresses. It might return the staking bridge, or the token vesting, or both contract address. The vesting contract can also be used to get information needed by the staking engine.
func (*EthereumConfig) VestingBridge ¶
func (c *EthereumConfig) VestingBridge() EthereumContract
type EthereumContract ¶
type EthereumContract struct {
// contains filtered or unexported fields
}
func (EthereumContract) Address ¶
func (c EthereumContract) Address() ethcmn.Address
func (EthereumContract) DeploymentBlockHeight ¶
func (c EthereumContract) DeploymentBlockHeight() uint64
func (EthereumContract) HasAddress ¶
func (c EthereumContract) HasAddress() bool
func (EthereumContract) HexAddress ¶
func (c EthereumContract) HexAddress() string
type ExecMarket ¶
type ExecMarket struct { Market *Market PriceMonitor *PriceMonitor AuctionState *AuctionState PeggedOrders *PeggedOrdersState ExpiringOrders []*Order LastBestBid *num.Uint LastBestAsk *num.Uint LastMidBid *num.Uint LastMidAsk *num.Uint LastMarketValueProxy num.Decimal CurrentMarkPrice *num.Uint ShortRiskFactor num.Decimal LongRiskFactor num.Decimal RiskFactorConsensusReached bool FeeSplitter *FeeSplitter SettlementData *num.Uint }
func ExecMarketFromProto ¶
func ExecMarketFromProto(em *snapshot.Market) *ExecMarket
func (ExecMarket) IntoProto ¶
func (e ExecMarket) IntoProto() *snapshot.Market
type ExecutionMarkets ¶
type ExecutionMarkets struct {
Markets []*ExecMarket
}
func ExecutionMarketsFromProto ¶
func ExecutionMarketsFromProto(em *snapshot.ExecutionMarkets) *ExecutionMarkets
func (ExecutionMarkets) IntoProto ¶
func (e ExecutionMarkets) IntoProto() *snapshot.ExecutionMarkets
type ExternalDataSourceSpec ¶ added in v0.61.0
type ExternalDataSourceSpec struct {
Spec *DataSourceSpec
}
func ExternalDataSourceSpecFromProto ¶ added in v0.61.0
func ExternalDataSourceSpecFromProto(specProto *vegapb.ExternalDataSourceSpec) *ExternalDataSourceSpec
func (*ExternalDataSourceSpec) IntoProto ¶ added in v0.61.0
func (s *ExternalDataSourceSpec) IntoProto() *vegapb.ExternalDataSourceSpec
func (*ExternalDataSourceSpec) String ¶ added in v0.61.0
func (s *ExternalDataSourceSpec) String() string
type ExternalDataSourceSpecConfiguration ¶ added in v0.61.0
type ExternalDataSourceSpecConfiguration struct {
DataSourceSpec *DataSourceSpecConfiguration
}
type 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 FinancialAmount ¶
func FinancialAmountFromProto ¶
func FinancialAmountFromProto(p *proto.FinancialAmount) (*FinancialAmount, error)
func (*FinancialAmount) Clone ¶
func (f *FinancialAmount) Clone() *FinancialAmount
func (*FinancialAmount) IntoProto ¶
func (f *FinancialAmount) IntoProto() *proto.FinancialAmount
func (FinancialAmount) String ¶
func (f FinancialAmount) String() string
type Future ¶
type Future struct { SettlementAsset string QuoteName string DataSourceSpecForSettlementData *DataSourceSpec DataSourceSpecForTradingTermination *DataSourceSpec DataSourceSpecBinding *DataSourceSpecBindingForFuture SettlementDataDecimals uint32 }
func FutureFromProto ¶
type FutureProduct ¶
type FutureProduct struct { SettlementAsset string QuoteName string DataSourceSpecForSettlementData DataSourceDefinition DataSourceSpecForTradingTermination DataSourceDefinition DataSourceSpecBinding *DataSourceSpecBindingForFuture SettlementDataDecimalPlaces uint32 }
func (FutureProduct) Asset ¶
func (f FutureProduct) Asset() string
func (FutureProduct) DeepClone ¶
func (f FutureProduct) DeepClone() *FutureProduct
func (FutureProduct) IntoProto ¶
func (f FutureProduct) IntoProto() *vegapb.FutureProduct
func (FutureProduct) String ¶
func (f FutureProduct) String() string
type GovernanceActive ¶
type GovernanceActive struct {
Proposals []*ProposalData
}
func GovernanceActiveFromProto ¶
func GovernanceActiveFromProto(ga *snapshot.GovernanceActive) *GovernanceActive
func (GovernanceActive) IntoProto ¶
func (g GovernanceActive) IntoProto() *snapshot.GovernanceActive
type GovernanceData ¶
type GovernanceData = vegapb.GovernanceData
type GovernanceEnacted ¶
type GovernanceEnacted struct {
Proposals []*ProposalData
}
func GovernanceEnactedFromProto ¶
func GovernanceEnactedFromProto(ge *snapshot.GovernanceEnacted) *GovernanceEnacted
func (GovernanceEnacted) IntoProto ¶
func (g GovernanceEnacted) IntoProto() *snapshot.GovernanceEnacted
type GovernanceNode ¶
type GovernanceNode struct {
Proposals []*Proposal
}
func GovernanceNodeFromProto ¶
func GovernanceNodeFromProto(ge *snapshot.GovernanceNode) *GovernanceNode
func (GovernanceNode) IntoProto ¶
func (g GovernanceNode) IntoProto() *snapshot.GovernanceNode
type Instrument ¶
type Instrument struct { ID string Code string Name string Metadata *InstrumentMetadata // Types that are valid to be assigned to Product: // *InstrumentFuture Product iProto }
func InstrumentFromProto ¶
func InstrumentFromProto(i *proto.Instrument) *Instrument
func (Instrument) DeepClone ¶
func (i Instrument) DeepClone() *Instrument
func (Instrument) GetFuture ¶
func (i Instrument) GetFuture() *Future
func (Instrument) IntoProto ¶
func (i Instrument) IntoProto() *proto.Instrument
func (Instrument) String ¶
func (i Instrument) String() string
type InstrumentConfiguration ¶
type InstrumentConfiguration struct { Name string Code string // *InstrumentConfigurationFuture Product instrumentConfigurationProduct }
func InstrumentConfigurationFromProto ¶
func InstrumentConfigurationFromProto( p *vegapb.InstrumentConfiguration, ) *InstrumentConfiguration
func (InstrumentConfiguration) DeepClone ¶
func (i InstrumentConfiguration) DeepClone() *InstrumentConfiguration
func (InstrumentConfiguration) IntoProto ¶
func (i InstrumentConfiguration) IntoProto() *vegapb.InstrumentConfiguration
func (InstrumentConfiguration) String ¶
func (i InstrumentConfiguration) String() string
type InstrumentConfigurationFuture ¶
type InstrumentConfigurationFuture struct {
Future *FutureProduct
}
func (InstrumentConfigurationFuture) Asset ¶
func (i InstrumentConfigurationFuture) Asset() string
func (InstrumentConfigurationFuture) DeepClone ¶
func (i InstrumentConfigurationFuture) DeepClone() instrumentConfigurationProduct
func (InstrumentConfigurationFuture) IntoProto ¶
func (i InstrumentConfigurationFuture) IntoProto() *vegapb.InstrumentConfiguration_Future
func (InstrumentConfigurationFuture) String ¶
func (i InstrumentConfigurationFuture) String() string
type InstrumentFuture ¶
type InstrumentFuture struct {
Future *Future
}
func InstrumentFutureFromProto ¶
func InstrumentFutureFromProto(f *proto.Instrument_Future) *InstrumentFuture
func (InstrumentFuture) IntoProto ¶
func (i InstrumentFuture) IntoProto() *proto.Instrument_Future
func (InstrumentFuture) String ¶
func (i InstrumentFuture) String() string
type InstrumentMetadata ¶
type InstrumentMetadata struct {
Tags []string
}
func InstrumentMetadataFromProto ¶
func InstrumentMetadataFromProto(m *proto.InstrumentMetadata) *InstrumentMetadata
func (InstrumentMetadata) DeepClone ¶
func (i InstrumentMetadata) DeepClone() *InstrumentMetadata
func (InstrumentMetadata) IntoProto ¶
func (i InstrumentMetadata) IntoProto() *proto.InstrumentMetadata
func (InstrumentMetadata) String ¶
func (i InstrumentMetadata) String() string
type KeyDecimalPair ¶
func KeyDecimalPairFromProto ¶
func KeyDecimalPairFromProto(dm *snapshot.DecimalMap) *KeyDecimalPair
func (KeyDecimalPair) IntoProto ¶
func (d KeyDecimalPair) IntoProto() *snapshot.DecimalMap
type LedgerEntries ¶
type LedgerEntries []*LedgerEntry
func (LedgerEntries) IntoProto ¶
func (a LedgerEntries) IntoProto() []*proto.LedgerEntry
type LedgerEntry ¶
type LedgerEntry struct { FromAccount *AccountDetails ToAccount *AccountDetails Amount *num.Uint Type TransferType Timestamp int64 }
func (*LedgerEntry) IntoProto ¶
func (l *LedgerEntry) IntoProto() *proto.LedgerEntry
type LedgerMovement ¶ added in v0.56.0
type LedgerMovement struct { Entries []*LedgerEntry Balances []*PostTransferBalance }
func (*LedgerMovement) IntoProto ¶ added in v0.56.0
func (t *LedgerMovement) IntoProto() *proto.LedgerMovement
type LedgerMovements ¶ added in v0.56.0
type LedgerMovements []*LedgerMovement
func (LedgerMovements) IntoProto ¶ added in v0.56.0
func (a LedgerMovements) IntoProto() []*proto.LedgerMovement
type LimitState ¶
type LimitState struct { BlockCount uint32 CanProposeMarket bool CanProposeAsset bool GenesisLoaded bool ProposeMarketEnabled bool ProposeAssetEnabled bool ProposeMarketEnabledFrom time.Time ProposeAssetEnabledFrom time.Time }
func LimitFromProto ¶
func LimitFromProto(l *snapshot.LimitState) *LimitState
func (*LimitState) IntoProto ¶
func (l *LimitState) IntoProto() *snapshot.LimitState
type LiquidityMonitoringParameters ¶
type LiquidityMonitoringParameters struct { // Specifies parameters related to target stake calculation TargetStakeParameters *TargetStakeParameters // Specifies the triggering ratio for entering liquidity auction TriggeringRatio num.Decimal // Specifies by how many seconds an auction should be extended if leaving the auction were to trigger a liquidity auction AuctionExtension int64 }
func LiquidityMonitoringParametersFromProto ¶
func LiquidityMonitoringParametersFromProto(p *proto.LiquidityMonitoringParameters) *LiquidityMonitoringParameters
func (LiquidityMonitoringParameters) DeepClone ¶
func (l LiquidityMonitoringParameters) DeepClone() *LiquidityMonitoringParameters
func (LiquidityMonitoringParameters) IntoProto ¶
func (l LiquidityMonitoringParameters) IntoProto() *proto.LiquidityMonitoringParameters
func (LiquidityMonitoringParameters) String ¶
func (l LiquidityMonitoringParameters) String() string
type LiquidityOrder ¶
type LiquidityOrder struct { // The pegged reference point for the order Reference PeggedReference // The relative proportion of the commitment to be allocated at a price level Proportion uint32 // The offset/amount of units away for the order Offset *num.Uint }
func LiquidityOrderFromProto ¶
func LiquidityOrderFromProto(p *proto.LiquidityOrder) (*LiquidityOrder, error)
func (LiquidityOrder) DeepClone ¶
func (l LiquidityOrder) DeepClone() *LiquidityOrder
func (LiquidityOrder) IntoProto ¶
func (l LiquidityOrder) IntoProto() *proto.LiquidityOrder
func (LiquidityOrder) String ¶
func (l LiquidityOrder) String() string
type LiquidityOrderReference ¶
type LiquidityOrderReference struct { // Unique identifier of the pegged order generated by the core to fulfil this liquidity order OrderID string // The liquidity order from the original submission LiquidityOrder *LiquidityOrder }
func LiquidityOrderReferenceFromProto ¶
func LiquidityOrderReferenceFromProto(p *proto.LiquidityOrderReference) (*LiquidityOrderReference, error)
func (LiquidityOrderReference) IntoProto ¶
func (l LiquidityOrderReference) IntoProto() *proto.LiquidityOrderReference
func (LiquidityOrderReference) String ¶
func (l LiquidityOrderReference) String() string
type LiquidityOrderReferences ¶
type LiquidityOrderReferences []*LiquidityOrderReference
func (LiquidityOrderReferences) String ¶
func (ls LiquidityOrderReferences) String() string
type LiquidityOrders ¶
type LiquidityOrders []*LiquidityOrder
func (LiquidityOrders) String ¶
func (ls LiquidityOrders) String() string
type LiquidityProviderFeeShare ¶
type LiquidityProviderFeeShare = proto.LiquidityProviderFeeShare
type LiquidityProviderFeeShares ¶
type LiquidityProviderFeeShares []*LiquidityProviderFeeShare
func (LiquidityProviderFeeShares) String ¶
func (ls LiquidityProviderFeeShares) String() string
type LiquidityProvision ¶
type LiquidityProvision struct { // Unique identifier ID string // Unique party identifier for the creator of the provision Party string // Timestamp for when the order was created at, in nanoseconds since the epoch // - See [`VegaTimeResponse`](#api.VegaTimeResponse).`timestamp` CreatedAt int64 // Timestamp for when the order was updated at, in nanoseconds since the epoch // - See [`VegaTimeResponse`](#api.VegaTimeResponse).`timestamp` UpdatedAt int64 // Market identifier for the order, required field MarketID string // Specified as a unitless number that represents the amount of settlement asset of the market CommitmentAmount *num.Uint // Nominated liquidity fee factor, which is an input to the calculation of taker fees on the market, as per seeting fees and rewarding liquidity providers Fee num.Decimal // A set of liquidity sell orders to meet the liquidity provision obligation Sells []*LiquidityOrderReference // A set of liquidity buy orders to meet the liquidity provision obligation Buys []*LiquidityOrderReference // Version of this liquidity provision order Version uint64 // Status of this liquidity provision order Status LiquidityProvisionStatus // A reference shared between this liquidity provision and all it's orders Reference string }
func LiquidityProvisionFromProto ¶
func LiquidityProvisionFromProto(p *proto.LiquidityProvision) (*LiquidityProvision, error)
func (LiquidityProvision) IntoProto ¶
func (l LiquidityProvision) IntoProto() *proto.LiquidityProvision
func (LiquidityProvision) String ¶
func (l LiquidityProvision) String() string
type LiquidityProvisionAmendment ¶
type LiquidityProvisionAmendment struct { // Market identifier for the order, required field MarketID string // Specified as a unitless number that represents the amount of settlement asset of the market CommitmentAmount *num.Uint // Nominated liquidity fee factor, which is an input to the calculation of taker fees on the market, as per setting fees and rewarding liquidity providers Fee num.Decimal // A set of liquidity sell orders to meet the liquidity provision obligation Sells []*LiquidityOrder // A set of liquidity buy orders to meet the liquidity provision obligation Buys []*LiquidityOrder // A reference to be added to every order created out of this liquidityProvisionAmendment Reference string }
func LiquidityProvisionAmendmentFromProto ¶
func LiquidityProvisionAmendmentFromProto(p *commandspb.LiquidityProvisionAmendment) (*LiquidityProvisionAmendment, error)
func (LiquidityProvisionAmendment) ContainsOrders ¶
func (a LiquidityProvisionAmendment) ContainsOrders() bool
func (LiquidityProvisionAmendment) GetMarketID ¶ added in v0.55.0
func (a LiquidityProvisionAmendment) GetMarketID() string
func (LiquidityProvisionAmendment) IntoProto ¶
func (a LiquidityProvisionAmendment) IntoProto() *commandspb.LiquidityProvisionAmendment
func (LiquidityProvisionAmendment) String ¶
func (a LiquidityProvisionAmendment) String() string
type LiquidityProvisionCancellation ¶
type LiquidityProvisionCancellation struct { // Market identifier for the order, required field MarketID string }
func LiquidityProvisionCancellationFromProto ¶
func LiquidityProvisionCancellationFromProto(p *commandspb.LiquidityProvisionCancellation) (*LiquidityProvisionCancellation, error)
func (LiquidityProvisionCancellation) GetMarketID ¶ added in v0.55.0
func (l LiquidityProvisionCancellation) GetMarketID() string
func (LiquidityProvisionCancellation) IntoProto ¶
func (l LiquidityProvisionCancellation) IntoProto() *commandspb.LiquidityProvisionCancellation
func (LiquidityProvisionCancellation) String ¶
func (l LiquidityProvisionCancellation) String() string
type LiquidityProvisionStatus ¶
type LiquidityProvisionStatus = proto.LiquidityProvision_Status
const ( // LiquidityProvisionUnspecified The default value. LiquidityProvisionUnspecified LiquidityProvisionStatus = proto.LiquidityProvision_STATUS_UNSPECIFIED // LiquidityProvisionStatusActive The liquidity provision is active. LiquidityProvisionStatusActive LiquidityProvisionStatus = proto.LiquidityProvision_STATUS_ACTIVE // LiquidityProvisionStatusStopped The liquidity provision was stopped by the network. LiquidityProvisionStatusStopped LiquidityProvisionStatus = proto.LiquidityProvision_STATUS_STOPPED // LiquidityProvisionStatusCancelled The liquidity provision was cancelled by the liquidity provider. LiquidityProvisionStatusCancelled LiquidityProvisionStatus = proto.LiquidityProvision_STATUS_CANCELLED // LiquidityProvisionStatusRejected The liquidity provision was invalid and got rejected. LiquidityProvisionStatusRejected LiquidityProvisionStatus = proto.LiquidityProvision_STATUS_REJECTED // LiquidityProvisionStatusUndeployed The liquidity provision is valid and accepted by network, but orders aren't deployed. LiquidityProvisionStatusUndeployed LiquidityProvisionStatus = proto.LiquidityProvision_STATUS_UNDEPLOYED // LiquidityProvisionStatusPending The liquidity provision is valid and accepted by network // but have never been deployed. I when it's possible to deploy them for the first time // margin check fails, then they will be cancelled without any penalties. LiquidityProvisionStatusPending LiquidityProvisionStatus = proto.LiquidityProvision_STATUS_PENDING )
type LiquidityProvisionSubmission ¶
type LiquidityProvisionSubmission struct { // Market identifier for the order, required field MarketID string // Specified as a unitless number that represents the amount of settlement asset of the market CommitmentAmount *num.Uint // Nominated liquidity fee factor, which is an input to the calculation of taker fees on the market, as per setting fees and rewarding liquidity providers Fee num.Decimal // A set of liquidity sell orders to meet the liquidity provision obligation Sells []*LiquidityOrder // A set of liquidity buy orders to meet the liquidity provision obligation Buys []*LiquidityOrder // A reference to be added to every order created out of this liquidityProvisionSubmission Reference string }
func LiquidityProvisionSubmissionFromProto ¶
func LiquidityProvisionSubmissionFromProto(p *commandspb.LiquidityProvisionSubmission) (*LiquidityProvisionSubmission, error)
func (LiquidityProvisionSubmission) IntoProto ¶
func (l LiquidityProvisionSubmission) IntoProto() *commandspb.LiquidityProvisionSubmission
func (LiquidityProvisionSubmission) String ¶
func (l LiquidityProvisionSubmission) String() string
type LogNormalModelParams ¶
func LogNormalParamsFromProto ¶
func LogNormalParamsFromProto(p *proto.LogNormalModelParams) *LogNormalModelParams
func (LogNormalModelParams) DeepClone ¶
func (l LogNormalModelParams) DeepClone() *LogNormalModelParams
func (LogNormalModelParams) IntoProto ¶
func (l LogNormalModelParams) IntoProto() *proto.LogNormalModelParams
func (LogNormalModelParams) String ¶
func (l LogNormalModelParams) String() string
type LogNormalRiskModel ¶
type LogNormalRiskModel struct { RiskAversionParameter num.Decimal Tau num.Decimal Params *LogNormalModelParams }
func (LogNormalRiskModel) DeepClone ¶
func (l LogNormalRiskModel) DeepClone() *LogNormalRiskModel
func (LogNormalRiskModel) IntoProto ¶
func (l LogNormalRiskModel) IntoProto() *proto.LogNormalRiskModel
func (LogNormalRiskModel) String ¶
func (l LogNormalRiskModel) String() string
type MarginCalculator ¶
type MarginCalculator struct {
ScalingFactors *ScalingFactors
}
func MarginCalculatorFromProto ¶
func MarginCalculatorFromProto(p *proto.MarginCalculator) *MarginCalculator
func (MarginCalculator) DeepClone ¶
func (m MarginCalculator) DeepClone() *MarginCalculator
func (MarginCalculator) IntoProto ¶
func (m MarginCalculator) IntoProto() *proto.MarginCalculator
func (MarginCalculator) String ¶
func (m MarginCalculator) String() string
type MarginLevels ¶
type MarginLevels struct { MaintenanceMargin *num.Uint SearchLevel *num.Uint InitialMargin *num.Uint CollateralReleaseLevel *num.Uint Party string MarketID string Asset string Timestamp int64 }
func (MarginLevels) IntoProto ¶
func (m MarginLevels) IntoProto() *proto.MarginLevels
func (MarginLevels) String ¶
func (m MarginLevels) String() string
type Market ¶
type Market struct { ID string TradableInstrument *TradableInstrument DecimalPlaces uint64 PositionDecimalPlaces int64 Fees *Fees OpeningAuction *AuctionDuration PriceMonitoringSettings *PriceMonitoringSettings LiquidityMonitoringParameters *LiquidityMonitoringParameters TradingMode MarketTradingMode State MarketState MarketTimestamps *MarketTimestamps // contains filtered or unexported fields }
func MarketFromProto ¶
type MarketContributionScore ¶
type MarketData ¶
type MarketData struct { MarkPrice *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 }
func (MarketData) DeepClone ¶
func (m MarketData) DeepClone() *MarketData
func (MarketData) IntoProto ¶
func (m MarketData) IntoProto() *proto.MarketData
func (MarketData) String ¶
func (m MarketData) String() string
type MarketDepth ¶
type MarketDepth = proto.MarketDepth
type MarketDepthUpdate ¶
type MarketDepthUpdate = proto.MarketDepthUpdate
type MarketPosition ¶
type MarketPosition struct { PartyID string Size, Buy, Sell int64 Price *num.Uint VwBuy, VwSell *num.Uint }
func MarketPositionFromProto ¶
func MarketPositionFromProto(p *snapshot.Position) *MarketPosition
func (MarketPosition) IntoProto ¶
func (p MarketPosition) IntoProto() *snapshot.Position
type MarketPositions ¶
type MarketPositions struct { MarketID string Positions []*MarketPosition }
func MarketPositionsFromProto ¶
func MarketPositionsFromProto(mp *snapshot.MarketPositions) *MarketPositions
func (MarketPositions) IntoProto ¶
func (m MarketPositions) IntoProto() *snapshot.MarketPositions
type MarketState ¶
type MarketState = proto.Market_State
const ( // Default value, invalid. MarketStateUnspecified MarketState = proto.Market_STATE_UNSPECIFIED // The Governance proposal valid and accepted. MarketStateProposed MarketState = proto.Market_STATE_PROPOSED // Outcome of governance votes is to reject the market. MarketStateRejected MarketState = proto.Market_STATE_REJECTED // Governance vote passes/wins. MarketStatePending MarketState = proto.Market_STATE_PENDING // Market triggers cancellation condition or governance // votes to close before market becomes Active. MarketStateCancelled MarketState = proto.Market_STATE_CANCELLED // Enactment date reached and usual auction exit checks pass. MarketStateActive MarketState = proto.Market_STATE_ACTIVE // Price monitoring or liquidity monitoring trigger. MarketStateSuspended MarketState = proto.Market_STATE_SUSPENDED // Governance vote (to close). MarketStateClosed MarketState = proto.Market_STATE_CLOSED // Defined by the product (i.e. from a product parameter, // specified in market definition, giving close date/time). MarketStateTradingTerminated MarketState = proto.Market_STATE_TRADING_TERMINATED // Settlement triggered and completed as defined by product. MarketStateSettled MarketState = proto.Market_STATE_SETTLED )
type MarketTimestamps ¶
func MarketTimestampsFromProto ¶
func MarketTimestampsFromProto(p *proto.MarketTimestamps) *MarketTimestamps
func (MarketTimestamps) DeepClone ¶
func (m MarketTimestamps) DeepClone() *MarketTimestamps
func (MarketTimestamps) IntoProto ¶
func (m MarketTimestamps) IntoProto() *proto.MarketTimestamps
func (MarketTimestamps) String ¶
func (m MarketTimestamps) String() string
type MarketTradingMode ¶
type MarketTradingMode = proto.Market_TradingMode
const ( // Default value, this is invalid. MarketTradingModeUnspecified MarketTradingMode = proto.Market_TRADING_MODE_UNSPECIFIED // Normal trading. MarketTradingModeContinuous MarketTradingMode = proto.Market_TRADING_MODE_CONTINUOUS // Auction trading (FBA). MarketTradingModeBatchAuction MarketTradingMode = proto.Market_TRADING_MODE_BATCH_AUCTION // Opening auction. MarketTradingModeOpeningAuction MarketTradingMode = proto.Market_TRADING_MODE_OPENING_AUCTION // Auction triggered by monitoring. MarketTradingModeMonitoringAuction MarketTradingMode = proto.Market_TRADING_MODE_MONITORING_AUCTION // No trading allowed. MarketTradingModeNoTrading MarketTradingMode = proto.Market_TRADING_MODE_NO_TRADING )
type MatchingBook ¶
type MatchingBook struct { MarketID string Buy []*Order Sell []*Order LastTradedPrice *num.Uint Auction bool BatchID uint64 }
func MatchingBookFromProto ¶
func MatchingBookFromProto(mb *snapshot.MatchingBook) *MatchingBook
func (MatchingBook) IntoProto ¶
func (m MatchingBook) IntoProto() *snapshot.MatchingBook
type Metadata ¶
type MetadataList ¶
type MetadataList []string
func (MetadataList) String ¶
func (m MetadataList) String() string
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) GetChanges ¶
func (n *NewAsset) GetChanges() *AssetDetails
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
}
type NewMarketConfiguration ¶
type NewMarketConfiguration struct { Instrument *InstrumentConfiguration DecimalPlaces uint64 PositionDecimalPlaces int64 Metadata []string PriceMonitoringParameters *PriceMonitoringParameters LiquidityMonitoringParameters *LiquidityMonitoringParameters RiskParameters newRiskParams }
func NewMarketConfigurationFromProto ¶
func NewMarketConfigurationFromProto(p *vegapb.NewMarketConfiguration) *NewMarketConfiguration
func (NewMarketConfiguration) DeepClone ¶
func (n NewMarketConfiguration) DeepClone() *NewMarketConfiguration
func (NewMarketConfiguration) IntoProto ¶
func (n NewMarketConfiguration) IntoProto() *vegapb.NewMarketConfiguration
func (NewMarketConfiguration) String ¶
func (n NewMarketConfiguration) String() string
type NewMarketConfigurationLogNormal ¶
type NewMarketConfigurationLogNormal struct {
LogNormal *LogNormalRiskModel
}
func NewMarketConfigurationLogNormalFromProto ¶
func NewMarketConfigurationLogNormalFromProto(p *vegapb.NewMarketConfiguration_LogNormal) *NewMarketConfigurationLogNormal
func (NewMarketConfigurationLogNormal) DeepClone ¶
func (n NewMarketConfigurationLogNormal) DeepClone() newRiskParams
func (NewMarketConfigurationLogNormal) IntoProto ¶
func (n NewMarketConfigurationLogNormal) IntoProto() *vegapb.NewMarketConfiguration_LogNormal
func (NewMarketConfigurationLogNormal) String ¶
func (n NewMarketConfigurationLogNormal) String() string
type NewMarketConfigurationSimple ¶
type NewMarketConfigurationSimple struct {
Simple *SimpleModelParams
}
func NewMarketConfigurationSimpleFromProto ¶
func NewMarketConfigurationSimpleFromProto(p *vegapb.NewMarketConfiguration_Simple) *NewMarketConfigurationSimple
func (NewMarketConfigurationSimple) DeepClone ¶
func (n NewMarketConfigurationSimple) DeepClone() newRiskParams
func (NewMarketConfigurationSimple) IntoProto ¶
func (n NewMarketConfigurationSimple) IntoProto() *vegapb.NewMarketConfiguration_Simple
func (NewMarketConfigurationSimple) String ¶
func (n NewMarketConfigurationSimple) 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.
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 NotarySigs ¶
func NotarySigFromProto ¶
func NotarySigFromProto(sk *snapshot.NotarySigs) *NotarySigs
func (NotarySigs) IntoProto ¶
func (sk NotarySigs) IntoProto() *snapshot.NotarySigs
type OneOffTransfer ¶
type OneOffTransfer struct { *TransferBase DeliverOn *time.Time }
func OneOffTransferFromEvent ¶
func OneOffTransferFromEvent(p *eventspb.Transfer) *OneOffTransfer
func (*OneOffTransfer) IntoEvent ¶
func (o *OneOffTransfer) IntoEvent(reason *string) *eventspb.Transfer
func (*OneOffTransfer) IsValid ¶
func (o *OneOffTransfer) IsValid() error
type OracleDataSubmission ¶
type OracleDataSubmission = commandspb.OracleDataSubmission
type OracleSpec ¶
type OracleSpec struct {
ExternalDataSourceSpec *ExternalDataSourceSpec
}
func OracleSpecFromProto ¶
func OracleSpecFromProto(specProto *vegapb.OracleSpec) *OracleSpec
type OracleSpecBindingForFuture ¶
type OracleSpecBindingForFuture = DataSourceSpecBindingForFuture
type OracleSpecCondition ¶
type OracleSpecCondition = DataSourceSpecCondition
func OracleSpecConditionsFromProto ¶
func OracleSpecConditionsFromProto(protoCondition []*datapb.Condition) []*OracleSpecCondition
type OracleSpecConditionOperator ¶
type OracleSpecConditionOperator = DataSourceSpecConditionOperator
type OracleSpecConditions ¶
type OracleSpecConditions DataSourceSpecConditions
type OracleSpecConfiguration ¶
type OracleSpecConfiguration struct {
ExternalDataSourceSpec *ExternalDataSourceSpecConfiguration
}
func OracleSpecConfigurationFromProto ¶
func OracleSpecConfigurationFromProto(protoConfig *vegapb.DataSourceSpecConfiguration) *OracleSpecConfiguration
type OracleSpecFilter ¶
type OracleSpecFilter struct {
DataSourceSpec *DataSourceSpecFilter
}
func DeepCloneOracleSpecFilters ¶
func DeepCloneOracleSpecFilters(filters []*OracleSpecFilter) []*OracleSpecFilter
func OracleSpecFilterFromProto ¶
func OracleSpecFilterFromProto(protoFilter *datapb.Filter) *OracleSpecFilter
func OracleSpecFiltersFromProto ¶
func OracleSpecFiltersFromProto(protoFilters []*datapb.Filter) []*OracleSpecFilter
type OracleSpecFilters ¶
type OracleSpecFilters []*OracleSpecFilter
type OracleSpecPropertyKey ¶
type OracleSpecPropertyKey = DataSourceSpecPropertyKey
func OracleSpecPropertyKeyFromProto ¶
func OracleSpecPropertyKeyFromProto(protoKey *datapb.PropertyKey) *OracleSpecPropertyKey
type OracleSpecSigners ¶ added in v0.61.0
type OracleSpecSigners = DataSourceSpecSigners
type OracleSpecStatus ¶
type OracleSpecStatus = DataSourceSpecStatus
type OracleSpecToFutureBinding ¶ added in v0.61.0
type OracleSpecToFutureBinding = DataSourceSpecToFutureBinding
type Order ¶
type Order struct { ID string MarketID string Party string Side Side Price *num.Uint OriginalPrice *num.Uint Size uint64 Remaining uint64 TimeInForce OrderTimeInForce Type OrderType CreatedAt int64 Status OrderStatus ExpiresAt int64 Reference string Reason OrderError UpdatedAt int64 Version uint64 BatchID uint64 PeggedOrder *PeggedOrder LiquidityProvisionID string }
func (*Order) Create ¶
Create sets the creation time (CreatedAt) to t and returns the updated order.
func (Order) IntoSubmission ¶
func (o Order) IntoSubmission() *OrderSubmission
func (*Order) IsExpireable ¶
func (*Order) IsFinished ¶
IsFinished returns true if an order is in any state different to ACTIVE and PARKED Basically any order which is never gonna trade anymore.
func (*Order) IsLiquidityOrder ¶
func (*Order) IsPersistent ¶
IsPersistent returns true if the order is persistent. A persistent order is a Limit type order that might be matched in the future.
type OrderAmendment ¶
type OrderAmendment struct { OrderID string MarketID string Price *num.Uint SizeDelta int64 ExpiresAt *int64 // timestamp TimeInForce OrderTimeInForce PeggedOffset *num.Uint PeggedReference PeggedReference }
func NewOrderAmendmentFromProto ¶
func NewOrderAmendmentFromProto(p *commandspb.OrderAmendment) (*OrderAmendment, error)
func (OrderAmendment) GetMarketID ¶
func (o OrderAmendment) GetMarketID() string
func (OrderAmendment) GetOrderID ¶
func (o OrderAmendment) GetOrderID() string
func (OrderAmendment) IntoProto ¶
func (o OrderAmendment) IntoProto() *commandspb.OrderAmendment
func (OrderAmendment) String ¶
func (o OrderAmendment) String() string
func (OrderAmendment) Validate ¶
func (o OrderAmendment) Validate() error
Validate santiy-checks the order amendment as-is, the market will further validate the amendment based on the order it's actually trying to amend.
type OrderCancellation ¶
func OrderCancellationFromProto ¶
func OrderCancellationFromProto(p *commandspb.OrderCancellation) *OrderCancellation
func (OrderCancellation) IntoProto ¶
func (o OrderCancellation) IntoProto() *commandspb.OrderCancellation
func (OrderCancellation) String ¶
func (o OrderCancellation) String() string
type OrderCancellationConfirmation ¶
type OrderCancellationConfirmation struct {
Order *Order
}
func (*OrderCancellationConfirmation) IntoProto ¶
func (o *OrderCancellationConfirmation) IntoProto() *proto.OrderCancellationConfirmation
type OrderConfirmation ¶
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 )
func IsOrderError ¶
func IsOrderError(err error) (OrderError, bool)
type OrderStatus ¶
type OrderStatus = proto.Order_Status
const ( // Default value, always invalid. OrderStatusUnspecified OrderStatus = proto.Order_STATUS_UNSPECIFIED // Used for active unfilled or partially filled orders. OrderStatusActive OrderStatus = proto.Order_STATUS_ACTIVE // Used for expired GTT orders. OrderStatusExpired OrderStatus = proto.Order_STATUS_EXPIRED // Used for orders cancelled by the party that created the order. OrderStatusCancelled OrderStatus = proto.Order_STATUS_CANCELLED // Used for unfilled FOK or IOC orders, and for orders that were stopped by the network. OrderStatusStopped OrderStatus = proto.Order_STATUS_STOPPED // Used for closed fully filled orders. OrderStatusFilled OrderStatus = proto.Order_STATUS_FILLED // Used for orders when not enough collateral was available to fill the margin requirements. OrderStatusRejected OrderStatus = proto.Order_STATUS_REJECTED // Used for closed partially filled IOC orders. OrderStatusPartiallyFilled OrderStatus = proto.Order_STATUS_PARTIALLY_FILLED // Order has been removed from the order book and has been parked, this applies to pegged orders only. OrderStatusParked OrderStatus = proto.Order_STATUS_PARKED )
type OrderSubmission ¶
type OrderSubmission struct { // Market identifier for the order, required field MarketID string // Price for the order, the price is an integer, for example `123456` is a correctly // formatted price of `1.23456` assuming market configured to 5 decimal places, // required field for limit orders, however it is not required for market orders Price *num.Uint // Size for the order, for example, in a futures market the size equals the number of contracts, cannot be negative Size uint64 // Side for the order, e.g. SIDE_BUY or SIDE_SELL, required field Side proto.Side // Time in force indicates how long an order will remain active before it is executed or expires, required field TimeInForce proto.Order_TimeInForce // Timestamp for when the order will expire, in nanoseconds since the epoch, ExpiresAt int64 // Type for the order, required field Type proto.Order_Type // Reference given for the order, this is typically used to retrieve an order submitted through consensus, currently // set internally by the node to return a unique reference identifier for the order submission Reference string // Used to specify the details for a pegged order PeggedOrder *PeggedOrder }
func NewOrderSubmissionFromProto ¶
func NewOrderSubmissionFromProto(p *commandspb.OrderSubmission) (*OrderSubmission, error)
func (OrderSubmission) IntoOrder ¶
func (o OrderSubmission) IntoOrder(party string) *Order
func (OrderSubmission) IntoProto ¶
func (o OrderSubmission) IntoProto() *commandspb.OrderSubmission
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 PartyContibutionScore ¶
FeePartyScore represents the fraction the party has in the total fee.
type PartyCount ¶
func PartyCountFromProto ¶
func PartyCountFromProto(pc *snapshot.SpamPartyTransactionCount) *PartyCount
type PartyProposalVoteCount ¶
func PartyProposalVoteCountFromProto ¶
func PartyProposalVoteCountFromProto(ppvc *snapshot.PartyProposalVoteCount) *PartyProposalVoteCount
func (*PartyProposalVoteCount) IntoProto ¶
func (p *PartyProposalVoteCount) IntoProto() *snapshot.PartyProposalVoteCount
type PartyTokenBalance ¶
func PartyTokenBalanceFromProto ¶
func PartyTokenBalanceFromProto(balance *snapshot.PartyTokenBalance) *PartyTokenBalance
func (*PartyTokenBalance) IntoProto ¶
func (ptc *PartyTokenBalance) IntoProto() *snapshot.PartyTokenBalance
type PastPrice ¶
func PastPriceFromProto ¶
type Payload ¶
type Payload struct { Data isPayload // contains filtered or unexported fields }
func PayloadFromProto ¶
func (Payload) GetAppState ¶
func (p Payload) GetAppState() *PayloadAppState
func (*Payload) GetTreeKey ¶
func (Payload) Namespace ¶
func (p Payload) Namespace() SnapshotNamespace
type PayloadActiveAssets ¶
type PayloadActiveAssets struct {
ActiveAssets *ActiveAssets
}
func PayloadActiveAssetsFromProto ¶
func PayloadActiveAssetsFromProto(paa *snapshot.Payload_ActiveAssets) *PayloadActiveAssets
func (PayloadActiveAssets) IntoProto ¶
func (p PayloadActiveAssets) IntoProto() *snapshot.Payload_ActiveAssets
func (*PayloadActiveAssets) Key ¶
func (*PayloadActiveAssets) Key() string
func (*PayloadActiveAssets) Namespace ¶
func (*PayloadActiveAssets) Namespace() SnapshotNamespace
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 PayloadBankingAssetActionsFromProto ¶
func PayloadBankingAssetActionsFromProto(pbs *snapshot.Payload_BankingAssetActions) *PayloadBankingAssetActions
func (PayloadBankingAssetActions) IntoProto ¶
func (p PayloadBankingAssetActions) IntoProto() *snapshot.Payload_BankingAssetActions
func (*PayloadBankingAssetActions) Key ¶
func (*PayloadBankingAssetActions) Key() string
func (*PayloadBankingAssetActions) Namespace ¶
func (*PayloadBankingAssetActions) Namespace() SnapshotNamespace
type PayloadBankingBridgeState ¶
type PayloadBankingBridgeState struct {
BankingBridgeState *BankingBridgeState
}
func PayloadBankingBridgeStateFromProto ¶
func PayloadBankingBridgeStateFromProto(pbbs *snapshot.Payload_BankingBridgeState) *PayloadBankingBridgeState
func (PayloadBankingBridgeState) IntoProto ¶
func (p PayloadBankingBridgeState) IntoProto() *snapshot.Payload_BankingBridgeState
func (*PayloadBankingBridgeState) Key ¶
func (*PayloadBankingBridgeState) Key() string
func (*PayloadBankingBridgeState) Namespace ¶
func (*PayloadBankingBridgeState) Namespace() SnapshotNamespace
type PayloadBankingDeposits ¶
type PayloadBankingDeposits struct {
BankingDeposits *BankingDeposits
}
func PayloadBankingDepositsFromProto ¶
func PayloadBankingDepositsFromProto(pbd *snapshot.Payload_BankingDeposits) *PayloadBankingDeposits
func (PayloadBankingDeposits) IntoProto ¶
func (p PayloadBankingDeposits) IntoProto() *snapshot.Payload_BankingDeposits
func (*PayloadBankingDeposits) Key ¶
func (*PayloadBankingDeposits) Key() string
func (*PayloadBankingDeposits) Namespace ¶
func (*PayloadBankingDeposits) Namespace() SnapshotNamespace
type PayloadBankingRecurringTransfers ¶
type PayloadBankingRecurringTransfers struct {
BankingRecurringTransfers *checkpointpb.RecurringTransfers
}
func PayloadBankingRecurringTransfersFromProto ¶
func PayloadBankingRecurringTransfersFromProto(pbd *snapshot.Payload_BankingRecurringTransfers) *PayloadBankingRecurringTransfers
func (PayloadBankingRecurringTransfers) IntoProto ¶
func (p PayloadBankingRecurringTransfers) IntoProto() *snapshot.Payload_BankingRecurringTransfers
func (*PayloadBankingRecurringTransfers) Key ¶
func (*PayloadBankingRecurringTransfers) Key() string
func (*PayloadBankingRecurringTransfers) Namespace ¶
func (*PayloadBankingRecurringTransfers) Namespace() SnapshotNamespace
type PayloadBankingScheduledTransfers ¶
type PayloadBankingScheduledTransfers struct {
BankingScheduledTransfers []*checkpointpb.ScheduledTransferAtTime
}
func PayloadBankingScheduledTransfersFromProto ¶
func PayloadBankingScheduledTransfersFromProto(pbd *snapshot.Payload_BankingScheduledTransfers) *PayloadBankingScheduledTransfers
func (PayloadBankingScheduledTransfers) IntoProto ¶
func (p PayloadBankingScheduledTransfers) IntoProto() *snapshot.Payload_BankingScheduledTransfers
func (*PayloadBankingScheduledTransfers) Key ¶
func (*PayloadBankingScheduledTransfers) Key() string
func (*PayloadBankingScheduledTransfers) Namespace ¶
func (*PayloadBankingScheduledTransfers) Namespace() SnapshotNamespace
type PayloadBankingSeen ¶
type PayloadBankingSeen struct {
BankingSeen *BankingSeen
}
func PayloadBankingSeenFromProto ¶
func PayloadBankingSeenFromProto(pbs *snapshot.Payload_BankingSeen) *PayloadBankingSeen
func (PayloadBankingSeen) IntoProto ¶
func (p PayloadBankingSeen) IntoProto() *snapshot.Payload_BankingSeen
func (*PayloadBankingSeen) Key ¶
func (*PayloadBankingSeen) Key() string
func (*PayloadBankingSeen) Namespace ¶
func (*PayloadBankingSeen) Namespace() SnapshotNamespace
type PayloadBankingWithdrawals ¶
type PayloadBankingWithdrawals struct {
BankingWithdrawals *BankingWithdrawals
}
func PayloadBankingWithdrawalsFromProto ¶
func PayloadBankingWithdrawalsFromProto(pbw *snapshot.Payload_BankingWithdrawals) *PayloadBankingWithdrawals
func (PayloadBankingWithdrawals) IntoProto ¶
func (p PayloadBankingWithdrawals) IntoProto() *snapshot.Payload_BankingWithdrawals
func (*PayloadBankingWithdrawals) Key ¶
func (*PayloadBankingWithdrawals) Key() string
func (*PayloadBankingWithdrawals) Namespace ¶
func (*PayloadBankingWithdrawals) Namespace() SnapshotNamespace
type PayloadCheckpoint ¶
type PayloadCheckpoint struct {
Checkpoint *CPState
}
func PayloadCheckpointFromProto ¶
func PayloadCheckpointFromProto(pc *snapshot.Payload_Checkpoint) *PayloadCheckpoint
func (PayloadCheckpoint) IntoProto ¶
func (p PayloadCheckpoint) IntoProto() *snapshot.Payload_Checkpoint
func (*PayloadCheckpoint) Key ¶
func (*PayloadCheckpoint) Key() string
func (*PayloadCheckpoint) Namespace ¶
func (*PayloadCheckpoint) Namespace() SnapshotNamespace
type PayloadCollateralAccounts ¶
type PayloadCollateralAccounts struct {
CollateralAccounts *CollateralAccounts
}
func PayloadCollateralAccountsFromProto ¶
func PayloadCollateralAccountsFromProto(pca *snapshot.Payload_CollateralAccounts) *PayloadCollateralAccounts
func (PayloadCollateralAccounts) IntoProto ¶
func (p PayloadCollateralAccounts) IntoProto() *snapshot.Payload_CollateralAccounts
func (*PayloadCollateralAccounts) Key ¶
func (*PayloadCollateralAccounts) Key() string
func (*PayloadCollateralAccounts) Namespace ¶
func (*PayloadCollateralAccounts) Namespace() SnapshotNamespace
type PayloadCollateralAssets ¶
type PayloadCollateralAssets struct {
CollateralAssets *CollateralAssets
}
func PayloadCollateralAssetsFromProto ¶
func PayloadCollateralAssetsFromProto(pca *snapshot.Payload_CollateralAssets) *PayloadCollateralAssets
func (PayloadCollateralAssets) IntoProto ¶
func (p PayloadCollateralAssets) IntoProto() *snapshot.Payload_CollateralAssets
func (*PayloadCollateralAssets) Key ¶
func (*PayloadCollateralAssets) Key() string
func (*PayloadCollateralAssets) Namespace ¶
func (*PayloadCollateralAssets) Namespace() SnapshotNamespace
type PayloadDelegationActive ¶
type PayloadDelegationActive struct {
DelegationActive *DelegationActive
}
func PayloadDelegationActiveFromProto ¶
func PayloadDelegationActiveFromProto(da *snapshot.Payload_DelegationActive) *PayloadDelegationActive
func (PayloadDelegationActive) IntoProto ¶
func (p PayloadDelegationActive) IntoProto() *snapshot.Payload_DelegationActive
func (*PayloadDelegationActive) Key ¶
func (*PayloadDelegationActive) Key() string
func (*PayloadDelegationActive) Namespace ¶
func (*PayloadDelegationActive) Namespace() SnapshotNamespace
type PayloadDelegationAuto ¶
type PayloadDelegationAuto struct {
DelegationAuto *DelegationAuto
}
func PayloadDelegationAutoFromProto ¶
func PayloadDelegationAutoFromProto(da *snapshot.Payload_DelegationAuto) *PayloadDelegationAuto
func (PayloadDelegationAuto) IntoProto ¶
func (p PayloadDelegationAuto) IntoProto() *snapshot.Payload_DelegationAuto
func (*PayloadDelegationAuto) Key ¶
func (*PayloadDelegationAuto) Key() string
func (*PayloadDelegationAuto) Namespace ¶
func (*PayloadDelegationAuto) Namespace() SnapshotNamespace
type PayloadDelegationLastReconTime ¶
func PayloadDelegationLastReconTimeFromProto ¶
func PayloadDelegationLastReconTimeFromProto(dl *snapshot.Payload_DelegationLastReconciliationTime) *PayloadDelegationLastReconTime
func (PayloadDelegationLastReconTime) IntoProto ¶
func (p PayloadDelegationLastReconTime) IntoProto() *snapshot.Payload_DelegationLastReconciliationTime
func (*PayloadDelegationLastReconTime) Key ¶
func (*PayloadDelegationLastReconTime) Key() string
func (*PayloadDelegationLastReconTime) Namespace ¶
func (*PayloadDelegationLastReconTime) Namespace() SnapshotNamespace
type PayloadDelegationPending ¶
type PayloadDelegationPending struct {
DelegationPending *DelegationPending
}
func PayloadDelegationPendingFromProto ¶
func PayloadDelegationPendingFromProto(da *snapshot.Payload_DelegationPending) *PayloadDelegationPending
func (PayloadDelegationPending) IntoProto ¶
func (p PayloadDelegationPending) IntoProto() *snapshot.Payload_DelegationPending
func (*PayloadDelegationPending) Key ¶
func (*PayloadDelegationPending) Key() string
func (*PayloadDelegationPending) Namespace ¶
func (*PayloadDelegationPending) Namespace() SnapshotNamespace
type PayloadERC20MultiSigTopologyPending ¶
type PayloadERC20MultiSigTopologyPending struct {
Pending *snapshot.ERC20MultiSigTopologyPending
}
func PayloadERC20MultiSigTopologyPendingFromProto ¶
func PayloadERC20MultiSigTopologyPendingFromProto( s *snapshot.Payload_Erc20MultisigTopologyPending, ) *PayloadERC20MultiSigTopologyPending
func (*PayloadERC20MultiSigTopologyPending) Key ¶
func (p *PayloadERC20MultiSigTopologyPending) Key() string
func (*PayloadERC20MultiSigTopologyPending) Namespace ¶
func (*PayloadERC20MultiSigTopologyPending) Namespace() SnapshotNamespace
type PayloadERC20MultiSigTopologyVerified ¶
type PayloadERC20MultiSigTopologyVerified struct {
Verified *snapshot.ERC20MultiSigTopologyVerified
}
func PayloadERC20MultiSigTopologyVerifiedFromProto ¶
func PayloadERC20MultiSigTopologyVerifiedFromProto( s *snapshot.Payload_Erc20MultisigTopologyVerified, ) *PayloadERC20MultiSigTopologyVerified
func (*PayloadERC20MultiSigTopologyVerified) Key ¶
func (p *PayloadERC20MultiSigTopologyVerified) Key() string
func (*PayloadERC20MultiSigTopologyVerified) Namespace ¶
func (*PayloadERC20MultiSigTopologyVerified) Namespace() SnapshotNamespace
type PayloadEpoch ¶
type PayloadEpoch struct {
EpochState *EpochState
}
func PayloadEpochFromProto ¶
func PayloadEpochFromProto(e *snapshot.Payload_Epoch) *PayloadEpoch
func (PayloadEpoch) IntoProto ¶
func (p PayloadEpoch) IntoProto() *snapshot.Payload_Epoch
func (*PayloadEpoch) Key ¶
func (*PayloadEpoch) Key() string
func (*PayloadEpoch) Namespace ¶
func (*PayloadEpoch) Namespace() SnapshotNamespace
type PayloadEventForwarder ¶
type PayloadEventForwarder struct {
Keys []string
}
func PayloadEventForwarderFromProto ¶
func PayloadEventForwarderFromProto(ef *snapshot.Payload_EventForwarder) *PayloadEventForwarder
func (*PayloadEventForwarder) IntoProto ¶
func (p *PayloadEventForwarder) IntoProto() *snapshot.Payload_EventForwarder
func (*PayloadEventForwarder) Key ¶
func (*PayloadEventForwarder) Key() string
func (*PayloadEventForwarder) Namespace ¶
func (*PayloadEventForwarder) Namespace() SnapshotNamespace
type PayloadExecutionMarkets ¶
type PayloadExecutionMarkets struct {
ExecutionMarkets *ExecutionMarkets
}
func PayloadExecutionMarketsFromProto ¶
func PayloadExecutionMarketsFromProto(pem *snapshot.Payload_ExecutionMarkets) *PayloadExecutionMarkets
func (PayloadExecutionMarkets) IntoProto ¶
func (p PayloadExecutionMarkets) IntoProto() *snapshot.Payload_ExecutionMarkets
func (*PayloadExecutionMarkets) Key ¶
func (*PayloadExecutionMarkets) Key() string
func (*PayloadExecutionMarkets) Namespace ¶
func (*PayloadExecutionMarkets) Namespace() SnapshotNamespace
type PayloadFloatingPointConsensus ¶
type PayloadFloatingPointConsensus struct { ConsensusData []*snapshot.NextTimeTrigger StateVariablesInternalState []*snapshot.StateVarInternalState }
func PayloadFloatingPointConsensusFromProto ¶
func PayloadFloatingPointConsensusFromProto(t *snapshot.Payload_FloatingPointConsensus) *PayloadFloatingPointConsensus
func (*PayloadFloatingPointConsensus) IntoProto ¶
func (p *PayloadFloatingPointConsensus) IntoProto() *snapshot.Payload_FloatingPointConsensus
func (*PayloadFloatingPointConsensus) Key ¶
func (*PayloadFloatingPointConsensus) Key() string
func (*PayloadFloatingPointConsensus) Namespace ¶
func (*PayloadFloatingPointConsensus) Namespace() SnapshotNamespace
type PayloadGovernanceActive ¶
type PayloadGovernanceActive struct {
GovernanceActive *GovernanceActive
}
func PayloadGovernanceActiveFromProto ¶
func PayloadGovernanceActiveFromProto(ga *snapshot.Payload_GovernanceActive) *PayloadGovernanceActive
func (PayloadGovernanceActive) IntoProto ¶
func (p PayloadGovernanceActive) IntoProto() *snapshot.Payload_GovernanceActive
func (*PayloadGovernanceActive) Key ¶
func (*PayloadGovernanceActive) Key() string
func (*PayloadGovernanceActive) Namespace ¶
func (*PayloadGovernanceActive) Namespace() SnapshotNamespace
type PayloadGovernanceEnacted ¶
type PayloadGovernanceEnacted struct {
GovernanceEnacted *GovernanceEnacted
}
func PayloadGovernanceEnactedFromProto ¶
func PayloadGovernanceEnactedFromProto(ga *snapshot.Payload_GovernanceEnacted) *PayloadGovernanceEnacted
func (PayloadGovernanceEnacted) IntoProto ¶
func (p PayloadGovernanceEnacted) IntoProto() *snapshot.Payload_GovernanceEnacted
func (*PayloadGovernanceEnacted) Key ¶
func (*PayloadGovernanceEnacted) Key() string
func (*PayloadGovernanceEnacted) Namespace ¶
func (*PayloadGovernanceEnacted) Namespace() SnapshotNamespace
type PayloadGovernanceNode ¶
type PayloadGovernanceNode struct {
GovernanceNode *GovernanceNode
}
func PayloadGovernanceNodeFromProto ¶
func PayloadGovernanceNodeFromProto(gn *snapshot.Payload_GovernanceNode) *PayloadGovernanceNode
func (PayloadGovernanceNode) IntoProto ¶
func (p PayloadGovernanceNode) IntoProto() *snapshot.Payload_GovernanceNode
func (*PayloadGovernanceNode) Key ¶
func (*PayloadGovernanceNode) Key() string
func (*PayloadGovernanceNode) Namespace ¶
func (*PayloadGovernanceNode) Namespace() SnapshotNamespace
type PayloadLimitState ¶
type PayloadLimitState struct {
LimitState *LimitState
}
func PayloadLimitStateFromProto ¶
func PayloadLimitStateFromProto(l *snapshot.Payload_LimitState) *PayloadLimitState
func (PayloadLimitState) IntoProto ¶
func (p PayloadLimitState) IntoProto() *snapshot.Payload_LimitState
func (*PayloadLimitState) Key ¶
func (*PayloadLimitState) Key() string
func (*PayloadLimitState) Namespace ¶
func (*PayloadLimitState) Namespace() SnapshotNamespace
type PayloadLiquidityParameters ¶
type PayloadLiquidityParameters struct {
Parameters *snapshot.LiquidityParameters
}
func PayloadLiquidityParametersFromProto ¶
func PayloadLiquidityParametersFromProto(s *snapshot.Payload_LiquidityParameters) *PayloadLiquidityParameters
func (*PayloadLiquidityParameters) Key ¶
func (p *PayloadLiquidityParameters) Key() string
func (*PayloadLiquidityParameters) Namespace ¶
func (*PayloadLiquidityParameters) Namespace() SnapshotNamespace
type PayloadLiquidityPendingProvisions ¶
type PayloadLiquidityPendingProvisions struct {
PendingProvisions *snapshot.LiquidityPendingProvisions
}
func PayloadLiquidityPendingProvisionsFromProto ¶
func PayloadLiquidityPendingProvisionsFromProto(s *snapshot.Payload_LiquidityPendingProvisions) *PayloadLiquidityPendingProvisions
func (*PayloadLiquidityPendingProvisions) Key ¶
func (p *PayloadLiquidityPendingProvisions) Key() string
func (*PayloadLiquidityPendingProvisions) Namespace ¶
func (*PayloadLiquidityPendingProvisions) Namespace() SnapshotNamespace
type PayloadLiquidityProvisions ¶
type PayloadLiquidityProvisions struct {
Provisions *snapshot.LiquidityProvisions
}
func PayloadLiquidityProvisionsFromProto ¶
func PayloadLiquidityProvisionsFromProto(s *snapshot.Payload_LiquidityProvisions) *PayloadLiquidityProvisions
func (*PayloadLiquidityProvisions) Key ¶
func (p *PayloadLiquidityProvisions) Key() string
func (*PayloadLiquidityProvisions) Namespace ¶
func (*PayloadLiquidityProvisions) Namespace() SnapshotNamespace
type PayloadLiquiditySupplied ¶
type PayloadLiquiditySupplied struct {
LiquiditySupplied *snapshot.LiquiditySupplied
}
func PayloadLiquiditySuppliedFromProto ¶
func PayloadLiquiditySuppliedFromProto(ls *snapshot.Payload_LiquiditySupplied) *PayloadLiquiditySupplied
func (*PayloadLiquiditySupplied) IntoProto ¶
func (p *PayloadLiquiditySupplied) IntoProto() *snapshot.Payload_LiquiditySupplied
func (*PayloadLiquiditySupplied) Key ¶
func (p *PayloadLiquiditySupplied) Key() string
func (*PayloadLiquiditySupplied) Namespace ¶
func (*PayloadLiquiditySupplied) Namespace() SnapshotNamespace
type PayloadLiquidityTarget ¶
type PayloadLiquidityTarget struct {
Target *snapshot.LiquidityTarget
}
func PayloadLiquidityTargetFromProto ¶
func PayloadLiquidityTargetFromProto(s *snapshot.Payload_LiquidityTarget) *PayloadLiquidityTarget
func (*PayloadLiquidityTarget) Key ¶
func (p *PayloadLiquidityTarget) Key() string
func (*PayloadLiquidityTarget) Namespace ¶
func (*PayloadLiquidityTarget) Namespace() SnapshotNamespace
type PayloadMarketActivityTracker ¶
type PayloadMarketActivityTracker struct {
MarketActivityData *snapshot.MarketTracker
}
func PayloadMarketActivityTrackerFromProto ¶
func PayloadMarketActivityTrackerFromProto(t *snapshot.Payload_MarketTracker) *PayloadMarketActivityTracker
func (*PayloadMarketActivityTracker) IntoProto ¶
func (p *PayloadMarketActivityTracker) IntoProto() *snapshot.Payload_MarketTracker
func (*PayloadMarketActivityTracker) Key ¶
func (*PayloadMarketActivityTracker) Key() string
func (*PayloadMarketActivityTracker) Namespace ¶
func (*PayloadMarketActivityTracker) Namespace() SnapshotNamespace
type PayloadMarketPositions ¶
type PayloadMarketPositions struct {
MarketPositions *MarketPositions
}
func PayloadMarketPositionsFromProto ¶
func PayloadMarketPositionsFromProto(mp *snapshot.Payload_MarketPositions) *PayloadMarketPositions
func (PayloadMarketPositions) IntoProto ¶
func (p PayloadMarketPositions) IntoProto() *snapshot.Payload_MarketPositions
func (*PayloadMarketPositions) Key ¶
func (p *PayloadMarketPositions) Key() string
func (*PayloadMarketPositions) Namespace ¶
func (*PayloadMarketPositions) Namespace() SnapshotNamespace
type PayloadMatchingBook ¶
type PayloadMatchingBook struct {
MatchingBook *MatchingBook
}
func PayloadMatchingBookFromProto ¶
func PayloadMatchingBookFromProto(pmb *snapshot.Payload_MatchingBook) *PayloadMatchingBook
func (PayloadMatchingBook) IntoProto ¶
func (p PayloadMatchingBook) IntoProto() *snapshot.Payload_MatchingBook
func (*PayloadMatchingBook) Key ¶
func (p *PayloadMatchingBook) Key() string
func (*PayloadMatchingBook) Namespace ¶
func (*PayloadMatchingBook) Namespace() SnapshotNamespace
type PayloadNetParams ¶
type PayloadNetParams struct {
NetParams *NetParams
}
func PayloadNetParamsFromProto ¶
func PayloadNetParamsFromProto(pnp *snapshot.Payload_NetworkParameters) *PayloadNetParams
func (PayloadNetParams) IntoProto ¶
func (p PayloadNetParams) IntoProto() *snapshot.Payload_NetworkParameters
func (*PayloadNetParams) Key ¶
func (*PayloadNetParams) Key() string
func (*PayloadNetParams) Namespace ¶
func (*PayloadNetParams) Namespace() SnapshotNamespace
type PayloadNotary ¶
type PayloadNotary struct {
Notary *Notary
}
func PayloadNotaryFromProto ¶
func PayloadNotaryFromProto(n *snapshot.Payload_Notary) *PayloadNotary
func (PayloadNotary) IntoProto ¶
func (p PayloadNotary) IntoProto() *snapshot.Payload_Notary
func (*PayloadNotary) Key ¶
func (*PayloadNotary) Key() string
func (*PayloadNotary) Namespace ¶
func (*PayloadNotary) Namespace() SnapshotNamespace
type PayloadPendingAssetUpdates ¶
type PayloadPendingAssetUpdates struct {
PendingAssetUpdates *PendingAssetUpdates
}
func PayloadPendingAssetUpdatesFromProto ¶
func PayloadPendingAssetUpdatesFromProto(ppa *snapshot.Payload_PendingAssetUpdates) *PayloadPendingAssetUpdates
func (PayloadPendingAssetUpdates) IntoProto ¶
func (p PayloadPendingAssetUpdates) IntoProto() *snapshot.Payload_PendingAssetUpdates
func (*PayloadPendingAssetUpdates) Key ¶
func (*PayloadPendingAssetUpdates) Key() string
func (*PayloadPendingAssetUpdates) Namespace ¶
func (*PayloadPendingAssetUpdates) Namespace() SnapshotNamespace
type PayloadPendingAssets ¶
type PayloadPendingAssets struct {
PendingAssets *PendingAssets
}
func PayloadPendingAssetsFromProto ¶
func PayloadPendingAssetsFromProto(ppa *snapshot.Payload_PendingAssets) *PayloadPendingAssets
func (PayloadPendingAssets) IntoProto ¶
func (p PayloadPendingAssets) IntoProto() *snapshot.Payload_PendingAssets
func (*PayloadPendingAssets) Key ¶
func (*PayloadPendingAssets) Key() string
func (*PayloadPendingAssets) Namespace ¶
func (*PayloadPendingAssets) Namespace() SnapshotNamespace
type PayloadProofOfWork ¶
type PayloadProofOfWork struct { BlockHeight []uint64 BlockHash []string HeightToTx map[uint64][]string HeightToTid map[uint64][]string BannedParties map[string]uint64 ActiveParams []*snapshot.ProofOfWorkParams }
func PayloadProofOfWorkFromProto ¶
func PayloadProofOfWorkFromProto(s *snapshot.Payload_ProofOfWork) *PayloadProofOfWork
func (*PayloadProofOfWork) IntoProto ¶
func (p *PayloadProofOfWork) IntoProto() *snapshot.Payload_ProofOfWork
func (*PayloadProofOfWork) Key ¶
func (p *PayloadProofOfWork) Key() string
func (*PayloadProofOfWork) Namespace ¶
func (*PayloadProofOfWork) Namespace() SnapshotNamespace
type PayloadProtocolUpgradeProposals ¶
type PayloadProtocolUpgradeProposals struct {
Proposals *snapshot.ProtocolUpgradeProposals
}
func PayloadProtocolUpgradeProposalFromProto ¶
func PayloadProtocolUpgradeProposalFromProto(pup *snapshot.Payload_ProtocolUpgradeProposals) *PayloadProtocolUpgradeProposals
func (*PayloadProtocolUpgradeProposals) IntoProto ¶
func (p *PayloadProtocolUpgradeProposals) IntoProto() *snapshot.Payload_ProtocolUpgradeProposals
func (*PayloadProtocolUpgradeProposals) Key ¶
func (p *PayloadProtocolUpgradeProposals) Key() string
func (*PayloadProtocolUpgradeProposals) Namespace ¶
func (*PayloadProtocolUpgradeProposals) Namespace() SnapshotNamespace
type PayloadRewardsPayout ¶
type PayloadRewardsPayout struct {
RewardsPendingPayouts *RewardsPendingPayouts
}
func PayloadRewardPayoutFromProto ¶
func PayloadRewardPayoutFromProto(rpp *snapshot.Payload_RewardsPendingPayouts) *PayloadRewardsPayout
func (PayloadRewardsPayout) IntoProto ¶
func (p PayloadRewardsPayout) IntoProto() *snapshot.Payload_RewardsPendingPayouts
func (*PayloadRewardsPayout) Key ¶
func (*PayloadRewardsPayout) Key() string
func (*PayloadRewardsPayout) Namespace ¶
func (*PayloadRewardsPayout) Namespace() SnapshotNamespace
type PayloadSimpleSpamPolicy ¶
type PayloadSimpleSpamPolicy struct {
SimpleSpamPolicy *SimpleSpamPolicy
}
func PayloadSimpleSpamPolicyFromProto ¶
func PayloadSimpleSpamPolicyFromProto(ssp *snapshot.Payload_SimpleSpamPolicy) *PayloadSimpleSpamPolicy
func (*PayloadSimpleSpamPolicy) IntoProto ¶
func (p *PayloadSimpleSpamPolicy) IntoProto() *snapshot.Payload_SimpleSpamPolicy
func (*PayloadSimpleSpamPolicy) Key ¶
func (p *PayloadSimpleSpamPolicy) Key() string
func (*PayloadSimpleSpamPolicy) Namespace ¶
func (*PayloadSimpleSpamPolicy) Namespace() SnapshotNamespace
type PayloadStakeVerifierDeposited ¶
type PayloadStakeVerifierDeposited struct {
StakeVerifierDeposited []*StakeDeposited
}
func PayloadStakeVerifierDepositedFromProto ¶
func PayloadStakeVerifierDepositedFromProto(svd *snapshot.Payload_StakeVerifierDeposited) *PayloadStakeVerifierDeposited
func (*PayloadStakeVerifierDeposited) IntoProto ¶
func (p *PayloadStakeVerifierDeposited) IntoProto() *snapshot.Payload_StakeVerifierDeposited
func (*PayloadStakeVerifierDeposited) Key ¶
func (*PayloadStakeVerifierDeposited) Key() string
func (*PayloadStakeVerifierDeposited) Namespace ¶
func (*PayloadStakeVerifierDeposited) Namespace() SnapshotNamespace
type PayloadStakeVerifierRemoved ¶
type PayloadStakeVerifierRemoved struct {
StakeVerifierRemoved []*StakeRemoved
}
func PayloadStakeVerifierRemovedFromProto ¶
func PayloadStakeVerifierRemovedFromProto(svd *snapshot.Payload_StakeVerifierRemoved) *PayloadStakeVerifierRemoved
func (*PayloadStakeVerifierRemoved) IntoProto ¶
func (p *PayloadStakeVerifierRemoved) IntoProto() *snapshot.Payload_StakeVerifierRemoved
func (*PayloadStakeVerifierRemoved) Key ¶
func (*PayloadStakeVerifierRemoved) Key() string
func (*PayloadStakeVerifierRemoved) Namespace ¶
func (*PayloadStakeVerifierRemoved) Namespace() SnapshotNamespace
type PayloadStakingAccounts ¶
type PayloadStakingAccounts struct {
StakingAccounts *StakingAccounts
}
func PayloadStakingAccountsFromProto ¶
func PayloadStakingAccountsFromProto(sa *snapshot.Payload_StakingAccounts) *PayloadStakingAccounts
func (PayloadStakingAccounts) IntoProto ¶
func (p PayloadStakingAccounts) IntoProto() *snapshot.Payload_StakingAccounts
func (*PayloadStakingAccounts) Key ¶
func (*PayloadStakingAccounts) Key() string
func (*PayloadStakingAccounts) Namespace ¶
func (*PayloadStakingAccounts) 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 PayloadVoteSpamPolicy ¶
type PayloadVoteSpamPolicy struct {
VoteSpamPolicy *VoteSpamPolicy
}
func PayloadVoteSpamPolicyFromProto ¶
func PayloadVoteSpamPolicyFromProto(vsp *snapshot.Payload_VoteSpamPolicy) *PayloadVoteSpamPolicy
func (*PayloadVoteSpamPolicy) IntoProto ¶
func (p *PayloadVoteSpamPolicy) IntoProto() *snapshot.Payload_VoteSpamPolicy
func (*PayloadVoteSpamPolicy) Key ¶
func (*PayloadVoteSpamPolicy) Key() string
func (*PayloadVoteSpamPolicy) Namespace ¶
func (*PayloadVoteSpamPolicy) Namespace() SnapshotNamespace
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 ¶
func (a PendingAssetUpdates) IntoProto() *snapshot.PendingAssetUpdates
type PendingAssets ¶
type PendingAssets struct {
Assets []*Asset
}
func PendingAssetsFromProto ¶
func PendingAssetsFromProto(aa *snapshot.PendingAssets) *PendingAssets
func (PendingAssets) IntoProto ¶
func (a PendingAssets) IntoProto() *snapshot.PendingAssets
type Position ¶
type Position struct { // Market identifier MarketID string // Party identifier PartyID string // Open volume for the position, value is signed +ve for long and -ve for short OpenVolume int64 // Realised profit and loss for the position, value is signed +ve for long and -ve for short RealisedPnl num.Decimal // Unrealised profit and loss for the position, value is signed +ve for long and -ve for short UnrealisedPnl num.Decimal // Average entry price for the position, the price is an integer, for example `123456` is a correctly // formatted price of `1.23456` assuming market configured to 5 decimal places AverageEntryPrice *num.Uint // Timestamp for the latest time the position was updated UpdatedAt int64 }
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
func (*PostTransferBalance) IntoProto ¶ added in v0.56.0
func (t *PostTransferBalance) IntoProto() *proto.PostTransferBalance
type PostTransferBalances ¶ added in v0.56.0
type PostTransferBalances []*PostTransferBalance
func (PostTransferBalances) IntoProto ¶ added in v0.56.0
func (a PostTransferBalances) IntoProto() []*proto.PostTransferBalance
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 ¶
func (PriceLevel) IntoProto ¶
func (p PriceLevel) IntoProto() *proto.PriceLevel
type PriceLevels ¶
type PriceLevels []*PriceLevel
func (PriceLevels) IntoProto ¶
func (p PriceLevels) IntoProto() []*proto.PriceLevel
type PriceMonitor ¶
type PriceMonitor struct { Initialised bool FPHorizons []*KeyDecimalPair Now time.Time Update time.Time Bounds []*PriceBound PriceRangeCache []*PriceRangeCache PriceRangeCacheTime time.Time PricesNow []*CurrentPrice PricesPast []*PastPrice RefPriceCache []*KeyDecimalPair RefPriceCacheTime time.Time PriceBoundsConsensusReached bool }
func PriceMonitorFromProto ¶
func PriceMonitorFromProto(pm *snapshot.PriceMonitor) *PriceMonitor
func (PriceMonitor) IntoProto ¶
func (p PriceMonitor) IntoProto() *snapshot.PriceMonitor
type PriceMonitoringBounds ¶
type PriceMonitoringBounds struct { MinValidPrice *num.Uint MaxValidPrice *num.Uint Trigger *PriceMonitoringTrigger ReferencePrice num.Decimal }
func PriceMonitoringBoundsFromProto ¶
func PriceMonitoringBoundsFromProto(pr *proto.PriceMonitoringBounds) (*PriceMonitoringBounds, error)
func (PriceMonitoringBounds) DeepClone ¶
func (p PriceMonitoringBounds) DeepClone() *PriceMonitoringBounds
func (PriceMonitoringBounds) IntoProto ¶
func (p PriceMonitoringBounds) IntoProto() *proto.PriceMonitoringBounds
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 PriceMonitoringParametersFromProto ¶
func PriceMonitoringParametersFromProto(p *proto.PriceMonitoringParameters) *PriceMonitoringParameters
func (PriceMonitoringParameters) DeepClone ¶
func (p PriceMonitoringParameters) DeepClone() *PriceMonitoringParameters
func (PriceMonitoringParameters) IntoProto ¶
func (p PriceMonitoringParameters) IntoProto() *proto.PriceMonitoringParameters
func (*PriceMonitoringParameters) Reset ¶
func (p *PriceMonitoringParameters) Reset()
func (PriceMonitoringParameters) String ¶
func (p PriceMonitoringParameters) String() string
type PriceMonitoringSettings ¶
type PriceMonitoringSettings struct {
Parameters *PriceMonitoringParameters
}
func PriceMonitoringSettingsFromProto ¶
func PriceMonitoringSettingsFromProto(pr *proto.PriceMonitoringSettings) *PriceMonitoringSettings
func (PriceMonitoringSettings) DeepClone ¶
func (p PriceMonitoringSettings) DeepClone() *PriceMonitoringSettings
func (PriceMonitoringSettings) IntoProto ¶
func (p PriceMonitoringSettings) IntoProto() *proto.PriceMonitoringSettings
func (PriceMonitoringSettings) String ¶
func (p PriceMonitoringSettings) String() string
type PriceMonitoringTrigger ¶
type PriceMonitoringTrigger struct { Horizon int64 HorizonDec num.Decimal Probability num.Decimal AuctionExtension int64 }
func PriceMonitoringTriggerFromProto ¶
func PriceMonitoringTriggerFromProto(p *proto.PriceMonitoringTrigger) *PriceMonitoringTrigger
func (PriceMonitoringTrigger) DeepClone ¶
func (p PriceMonitoringTrigger) DeepClone() *PriceMonitoringTrigger
func (PriceMonitoringTrigger) IntoProto ¶
func (p PriceMonitoringTrigger) IntoProto() *proto.PriceMonitoringTrigger
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 ¶
func PriceRangeFromProto ¶
func PriceRangeFromProto(pr *snapshot.PriceRange) *PriceRange
func (PriceRange) IntoProto ¶
func (p PriceRange) IntoProto() *snapshot.PriceRange
type PriceRangeCache ¶
type PriceRangeCache struct { Bound *PriceBound Range *PriceRange }
func PriceRangeCacheFromProto ¶
func PriceRangeCacheFromProto(prc *snapshot.PriceRangeCache) *PriceRangeCache
func (PriceRangeCache) IntoProto ¶
func (p PriceRangeCache) IntoProto() *snapshot.PriceRangeCache
type Proposal ¶
type Proposal struct { ID string Reference string Party string State ProposalState Timestamp int64 Terms *ProposalTerms Rationale *ProposalRationale Reason ProposalError ErrorDetails string RequiredMajority num.Decimal RequiredParticipation num.Decimal RequiredLPMajority num.Decimal RequiredLPParticipation num.Decimal }
func (*Proposal) FailUnexpectedly ¶
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) IsMarketUpdate ¶
func (*Proposal) MarketUpdate ¶
func (p *Proposal) MarketUpdate() *UpdateMarket
func (*Proposal) Reject ¶
func (p *Proposal) Reject(reason ProposalError)
func (*Proposal) RejectWithErr ¶
func (p *Proposal) RejectWithErr(reason ProposalError, details error)
func (*Proposal) WaitForNodeVote ¶
func (p *Proposal) WaitForNodeVote()
type ProposalData ¶
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 // 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 )
type ProposalRationale ¶
func ProposalRationaleFromProto ¶
func ProposalRationaleFromProto(p *vegapb.ProposalRationale) *ProposalRationale
type ProposalState ¶
type ProposalState = vegapb.Proposal_State
const ( // ProposalStateUnspecified Default value, always invalid. ProposalStateUnspecified ProposalState = vegapb.Proposal_STATE_UNSPECIFIED // ProposalStateFailed Proposal enactment has failed - even though proposal has passed, its execution could not be performed. ProposalStateFailed ProposalState = vegapb.Proposal_STATE_FAILED // ProposalStateOpen Proposal is open for voting. ProposalStateOpen ProposalState = vegapb.Proposal_STATE_OPEN // ProposalStatePassed Proposal has gained enough support to be executed. ProposalStatePassed ProposalState = vegapb.Proposal_STATE_PASSED // ProposalStateRejected Proposal wasn't accepted (proposal terms failed validation due to wrong configuration or failing to meet network requirements). ProposalStateRejected ProposalState = vegapb.Proposal_STATE_REJECTED // ProposalStateDeclined Proposal didn't get enough votes (either failing to gain required participation or majority level). ProposalStateDeclined ProposalState = vegapb.Proposal_STATE_DECLINED // ProposalStateEnacted Proposal enacted. ProposalStateEnacted ProposalState = vegapb.Proposal_STATE_ENACTED // ProposalStateWaitingForNodeVote Waiting for node validation of the proposal. ProposalStateWaitingForNodeVote ProposalState = vegapb.Proposal_STATE_WAITING_FOR_NODE_VOTE )
type ProposalSubmission ¶
type ProposalSubmission struct { // Proposal reference Reference string // Proposal configuration and the actual change that is meant to be executed when proposal is enacted Terms *ProposalTerms // Rationale behind the proposal change. Rationale *ProposalRationale }
func NewProposalSubmissionFromProto ¶
func NewProposalSubmissionFromProto(p *commandspb.ProposalSubmission) (*ProposalSubmission, error)
func ProposalSubmissionFromProposal ¶
func ProposalSubmissionFromProposal(p *Proposal) *ProposalSubmission
func (ProposalSubmission) IntoProto ¶
func (p ProposalSubmission) IntoProto() *commandspb.ProposalSubmission
type ProposalTerms ¶
type ProposalTerms struct { ClosingTimestamp int64 EnactmentTimestamp int64 ValidationTimestamp int64 // *ProposalTermsUpdateMarket // *ProposalTermsNewMarket // *ProposalTermsUpdateNetworkParameter // *ProposalTermsNewAsset Change proposalTerm }
func ProposalTermsFromProto ¶
func ProposalTermsFromProto(p *vegapb.ProposalTerms) (*ProposalTerms, error)
func (ProposalTerms) DeepClone ¶
func (p ProposalTerms) DeepClone() *ProposalTerms
func (*ProposalTerms) GetNewAsset ¶
func (p *ProposalTerms) GetNewAsset() *NewAsset
func (*ProposalTerms) GetNewFreeform ¶
func (p *ProposalTerms) GetNewFreeform() *NewFreeform
func (*ProposalTerms) GetNewMarket ¶
func (p *ProposalTerms) GetNewMarket() *NewMarket
func (*ProposalTerms) GetUpdateAsset ¶
func (p *ProposalTerms) GetUpdateAsset() *UpdateAsset
func (*ProposalTerms) GetUpdateMarket ¶
func (p *ProposalTerms) GetUpdateMarket() *UpdateMarket
func (*ProposalTerms) GetUpdateNetworkParameter ¶
func (p *ProposalTerms) GetUpdateNetworkParameter() *UpdateNetworkParameter
func (ProposalTerms) IntoProto ¶
func (p ProposalTerms) IntoProto() *vegapb.ProposalTerms
func (ProposalTerms) String ¶
func (p ProposalTerms) String() string
type ProposalTermsNewAsset ¶
type ProposalTermsNewAsset struct {
NewAsset *NewAsset
}
func NewNewAssetFromProto ¶
func NewNewAssetFromProto(p *vegapb.ProposalTerms_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.ProposalTerms_NewAsset
func (ProposalTermsNewAsset) String ¶
func (a ProposalTermsNewAsset) String() string
type ProposalTermsNewFreeform ¶
type ProposalTermsNewFreeform struct {
NewFreeform *NewFreeform
}
func NewNewFreeformFromProto ¶
func NewNewFreeformFromProto(_ *vegapb.ProposalTerms_NewFreeform) *ProposalTermsNewFreeform
func (ProposalTermsNewFreeform) DeepClone ¶
func (f ProposalTermsNewFreeform) DeepClone() proposalTerm
func (ProposalTermsNewFreeform) GetTermType ¶
func (f ProposalTermsNewFreeform) GetTermType() ProposalTermsType
func (ProposalTermsNewFreeform) IntoProto ¶
func (f ProposalTermsNewFreeform) IntoProto() *vegapb.ProposalTerms_NewFreeform
func (ProposalTermsNewFreeform) String ¶
func (f ProposalTermsNewFreeform) String() string
type ProposalTermsNewMarket ¶
type ProposalTermsNewMarket struct {
NewMarket *NewMarket
}
func NewNewMarketFromProto ¶
func NewNewMarketFromProto(p *vegapb.ProposalTerms_NewMarket) (*ProposalTermsNewMarket, error)
func (ProposalTermsNewMarket) DeepClone ¶
func (a ProposalTermsNewMarket) DeepClone() proposalTerm
func (ProposalTermsNewMarket) GetTermType ¶
func (a ProposalTermsNewMarket) GetTermType() ProposalTermsType
func (ProposalTermsNewMarket) IntoProto ¶
func (a ProposalTermsNewMarket) IntoProto() *vegapb.ProposalTerms_NewMarket
func (ProposalTermsNewMarket) String ¶
func (a ProposalTermsNewMarket) String() string
type ProposalTermsType ¶
type ProposalTermsType int
const ( ProposalTermsTypeUpdateMarket ProposalTermsType = iota ProposalTermsTypeNewMarket ProposalTermsTypeUpdateNetworkParameter ProposalTermsTypeNewAsset ProposalTermsTypeNewFreeform ProposalTermsTypeUpdateAsset )
type ProposalTermsUpdateAsset ¶
type ProposalTermsUpdateAsset struct {
UpdateAsset *UpdateAsset
}
func NewUpdateAssetFromProto ¶
func NewUpdateAssetFromProto(p *vegapb.ProposalTerms_UpdateAsset) (*ProposalTermsUpdateAsset, error)
func (ProposalTermsUpdateAsset) DeepClone ¶
func (a ProposalTermsUpdateAsset) DeepClone() proposalTerm
func (ProposalTermsUpdateAsset) GetTermType ¶
func (a ProposalTermsUpdateAsset) GetTermType() ProposalTermsType
func (ProposalTermsUpdateAsset) IntoProto ¶
func (a ProposalTermsUpdateAsset) IntoProto() *vegapb.ProposalTerms_UpdateAsset
func (ProposalTermsUpdateAsset) String ¶
func (a ProposalTermsUpdateAsset) String() string
type ProposalTermsUpdateMarket ¶
type ProposalTermsUpdateMarket struct {
UpdateMarket *UpdateMarket
}
func UpdateMarketFromProto ¶
func UpdateMarketFromProto(p *vegapb.ProposalTerms_UpdateMarket) *ProposalTermsUpdateMarket
func (ProposalTermsUpdateMarket) DeepClone ¶
func (a ProposalTermsUpdateMarket) DeepClone() proposalTerm
func (ProposalTermsUpdateMarket) GetTermType ¶
func (a ProposalTermsUpdateMarket) GetTermType() ProposalTermsType
func (ProposalTermsUpdateMarket) IntoProto ¶
func (a ProposalTermsUpdateMarket) IntoProto() *vegapb.ProposalTerms_UpdateMarket
func (ProposalTermsUpdateMarket) String ¶
func (a ProposalTermsUpdateMarket) String() string
type ProposalTermsUpdateNetworkParameter ¶
type ProposalTermsUpdateNetworkParameter struct {
UpdateNetworkParameter *UpdateNetworkParameter
}
func NewUpdateNetworkParameterFromProto ¶
func NewUpdateNetworkParameterFromProto( p *vegapb.ProposalTerms_UpdateNetworkParameter, ) *ProposalTermsUpdateNetworkParameter
func (ProposalTermsUpdateNetworkParameter) DeepClone ¶
func (a ProposalTermsUpdateNetworkParameter) DeepClone() proposalTerm
func (ProposalTermsUpdateNetworkParameter) GetTermType ¶
func (a ProposalTermsUpdateNetworkParameter) GetTermType() ProposalTermsType
func (ProposalTermsUpdateNetworkParameter) IntoProto ¶
func (a ProposalTermsUpdateNetworkParameter) IntoProto() *vegapb.ProposalTerms_UpdateNetworkParameter
func (ProposalTermsUpdateNetworkParameter) String ¶
func (a ProposalTermsUpdateNetworkParameter) String() string
type RWithdrawal ¶
type RWithdrawal struct { Ref string Withdrawal *Withdrawal }
func RWithdrawalFromProto ¶
func RWithdrawalFromProto(rw *snapshot.Withdrawal) *RWithdrawal
func (RWithdrawal) IntoProto ¶
func (r RWithdrawal) IntoProto() *snapshot.Withdrawal
type RecurringTransfer ¶
type RecurringTransfer struct { *TransferBase StartEpoch uint64 EndEpoch *uint64 Factor num.Decimal DispatchStrategy *vegapb.DispatchStrategy }
func RecurringTransferFromEvent ¶
func RecurringTransferFromEvent(p *eventspb.Transfer) *RecurringTransfer
func (*RecurringTransfer) IntoEvent ¶
func (r *RecurringTransfer) IntoEvent(reason *string) *eventspb.Transfer
func (*RecurringTransfer) IsValid ¶
func (r *RecurringTransfer) IsValid() error
type ReleaseInfo ¶
type Resource ¶
func ResourceFromProto ¶
type RewardsPartyAmount ¶
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 ¶
func (rpp RewardsPendingPayouts) IntoProto() *snapshot.RewardsPendingPayouts
type RiskFactor ¶
func (RiskFactor) IntoProto ¶
func (r RiskFactor) IntoProto() *proto.RiskFactor
func (RiskFactor) String ¶
func (r RiskFactor) String() string
type ScalingFactors ¶
type ScalingFactors struct { SearchLevel num.Decimal InitialMargin num.Decimal CollateralRelease num.Decimal }
func ScalingFactorsFromProto ¶
func ScalingFactorsFromProto(p *proto.ScalingFactors) *ScalingFactors
func (ScalingFactors) DeepClone ¶
func (s ScalingFactors) DeepClone() *ScalingFactors
func (ScalingFactors) IntoProto ¶
func (s ScalingFactors) IntoProto() *proto.ScalingFactors
func (*ScalingFactors) Reset ¶
func (s *ScalingFactors) Reset()
func (ScalingFactors) String ¶
func (s ScalingFactors) String() string
type ScheduledRewardsPayout ¶
type ScheduledRewardsPayout struct { PayoutTime int64 RewardsPayout []*RewardsPayout }
func ScheduledRewardsPayoutFromProto ¶
func ScheduledRewardsPayoutFromProto(srp *snapshot.ScheduledRewardsPayout) *ScheduledRewardsPayout
func (ScheduledRewardsPayout) IntoProto ¶
func (srp ScheduledRewardsPayout) IntoProto() *snapshot.ScheduledRewardsPayout
type Side ¶
const ( // Default value, always invalid. SideUnspecified Side = proto.Side_SIDE_UNSPECIFIED // Buy order. SideBuy Side = proto.Side_SIDE_BUY // Sell order. SideSell Side = proto.Side_SIDE_SELL )
type Signer ¶ added in v0.61.0
type Signer struct {
Signer dataSourceSpec
}
func CreateSignerFromString ¶ added in v0.61.0
func CreateSignerFromString(s string, t DataSignerType) *Signer
func DeserializeSigner ¶ added in v0.61.0
func SignerAsHex ¶ added in v0.61.0
SignerAsHex represents the signer as a hex encoded string. We export this function as a standalone option because there are cases when we are not sure what is the signer type we deal with.
func SignerAsString ¶ added in v0.61.0
SignerAsString represents the Signer content as a string.
func SignerFromProto ¶ added in v0.61.0
func SignersFromProto ¶ added in v0.61.0
SignersFromProto returns a list of signers after checking the list length.
func (Signer) GetSignerETHAddress ¶ added in v0.61.0
func (s Signer) GetSignerETHAddress() *ETHAddress
func (Signer) GetSignerPubKey ¶ added in v0.61.0
func (Signer) GetSignerType ¶ added in v0.61.0
func (s Signer) GetSignerType() DataSignerType
type SignerETHAddress ¶ added in v0.61.0
type SignerETHAddress struct {
ETHAddress *ETHAddress
}
func DeserializeETHAddress ¶ added in v0.61.0
func DeserializeETHAddress(data []byte) SignerETHAddress
func ETHAddressFromProto ¶ added in v0.61.0
func ETHAddressFromProto(s *datapb.Signer_EthAddress) *SignerETHAddress
func (SignerETHAddress) AsHex ¶ added in v0.61.0
func (s SignerETHAddress) AsHex(prepend bool) dataSourceSpec
func (SignerETHAddress) AsString ¶ added in v0.61.0
func (s SignerETHAddress) AsString() (dataSourceSpec, error)
func (SignerETHAddress) DeepClone ¶ added in v0.61.0
func (s SignerETHAddress) DeepClone() dataSourceSpec
func (SignerETHAddress) GetSignerType ¶ added in v0.61.0
func (s SignerETHAddress) GetSignerType() DataSignerType
func (SignerETHAddress) IntoProto ¶ added in v0.61.0
func (s SignerETHAddress) IntoProto() *datapb.Signer_EthAddress
func (SignerETHAddress) IsEmpty ¶ added in v0.61.0
func (s SignerETHAddress) IsEmpty() bool
func (SignerETHAddress) Serialize ¶ added in v0.61.0
func (s SignerETHAddress) Serialize() []byte
func (SignerETHAddress) String ¶ added in v0.61.0
func (s SignerETHAddress) String() string
type SignerEvent ¶
type SignerEvent struct {
BlockNumber, LogIndex uint64
TxHash string
ID string
Address string
Nonce string
BlockTime int64
Kind SignerEventKind
}
func SignerEventFromEventProto ¶
func SignerEventFromEventProto( event *eventspb.ERC20MultiSigSignerEvent, ) *SignerEvent
func SignerEventFromSignerAddedProto ¶
func SignerEventFromSignerAddedProto( s *vgproto.ERC20SignerAdded, blockNumber, logIndex uint64, txhash, id string, ) (*SignerEvent, error)
func SignerEventFromSignerRemovedProto ¶
func SignerEventFromSignerRemovedProto( s *vgproto.ERC20SignerRemoved, blockNumber, logIndex uint64, txhash, id string, ) (*SignerEvent, error)
func (SignerEvent) Hash ¶
func (s SignerEvent) Hash() string
func (*SignerEvent) IntoProto ¶
func (s *SignerEvent) IntoProto() *eventspb.ERC20MultiSigSignerEvent
func (*SignerEvent) String ¶
func (s *SignerEvent) String() string
type SignerEventKind ¶
type SignerEventKind = eventspb.ERC20MultiSigSignerEvent_Type
const ( SignerEventKindAdded SignerEventKind = eventspb.ERC20MultiSigSignerEvent_TYPE_ADDED SignerEventKindRemoved = eventspb.ERC20MultiSigSignerEvent_TYPE_REMOVED )
type SignerPubKey ¶ added in v0.61.0
type SignerPubKey struct {
PubKey *PubKey
}
func DeserializePubKey ¶ added in v0.61.0
func DeserializePubKey(data []byte) SignerPubKey
func PubKeyFromProto ¶ added in v0.61.0
func PubKeyFromProto(s *datapb.Signer_PubKey) *SignerPubKey
func (SignerPubKey) AsHex ¶ added in v0.61.0
func (s SignerPubKey) AsHex(prepend bool) dataSourceSpec
func (SignerPubKey) AsString ¶ added in v0.61.0
func (s SignerPubKey) AsString() (dataSourceSpec, error)
func (SignerPubKey) DeepClone ¶ added in v0.61.0
func (s SignerPubKey) DeepClone() dataSourceSpec
func (SignerPubKey) GetSignerType ¶ added in v0.61.0
func (s SignerPubKey) GetSignerType() DataSignerType
func (SignerPubKey) IntoProto ¶ added in v0.61.0
func (s SignerPubKey) IntoProto() *datapb.Signer_PubKey
func (SignerPubKey) IsEmpty ¶ added in v0.61.0
func (s SignerPubKey) IsEmpty() bool
func (SignerPubKey) Serialize ¶ added in v0.61.0
func (s SignerPubKey) Serialize() []byte
func (SignerPubKey) String ¶ added in v0.61.0
func (s SignerPubKey) String() string
type SignerThresholdSetEvent ¶
type SignerThresholdSetEvent struct {
BlockNumber, LogIndex uint64
TxHash string
ID string
Threshold uint32
Nonce string
BlockTime int64
}
func SignerThresholdSetEventFromEventProto ¶
func SignerThresholdSetEventFromEventProto( event *eventspb.ERC20MultiSigThresholdSetEvent, ) *SignerThresholdSetEvent
func SignerThresholdSetEventFromProto ¶
func SignerThresholdSetEventFromProto( s *vgproto.ERC20ThresholdSet, blockNumber, logIndex uint64, txhash, id string, ) (*SignerThresholdSetEvent, error)
func (SignerThresholdSetEvent) Hash ¶
func (s SignerThresholdSetEvent) Hash() string
func (*SignerThresholdSetEvent) IntoProto ¶
func (s *SignerThresholdSetEvent) IntoProto() *eventspb.ERC20MultiSigThresholdSetEvent
func (*SignerThresholdSetEvent) String ¶
func (s *SignerThresholdSetEvent) String() string
type SimpleModelParams ¶
type SimpleModelParams struct { FactorLong num.Decimal FactorShort num.Decimal MaxMoveUp num.Decimal MinMoveDown num.Decimal ProbabilityOfTrading num.Decimal }
func SimpleModelParamsFromProto ¶
func SimpleModelParamsFromProto(p *proto.SimpleModelParams) *SimpleModelParams
func (SimpleModelParams) DeepClone ¶
func (s SimpleModelParams) DeepClone() *SimpleModelParams
func (SimpleModelParams) IntoProto ¶
func (s SimpleModelParams) IntoProto() *proto.SimpleModelParams
func (SimpleModelParams) String ¶
func (s SimpleModelParams) String() string
type SimpleRiskModel ¶
type SimpleRiskModel struct {
Params *SimpleModelParams
}
func (SimpleRiskModel) IntoProto ¶
func (s SimpleRiskModel) IntoProto() *proto.SimpleRiskModel
func (SimpleRiskModel) String ¶
func (s SimpleRiskModel) String() string
type SimpleSpamPolicy ¶
type SimpleSpamPolicy struct { PolicyName string PartyToCount []*PartyCount BannedParty []*BannedParty CurrentEpochSeq uint64 }
func SimpleSpamPolicyFromProto ¶
func SimpleSpamPolicyFromProto(ssp *snapshot.SimpleSpamPolicy) *SimpleSpamPolicy
func (*SimpleSpamPolicy) IntoProto ¶
func (ssp *SimpleSpamPolicy) IntoProto() *snapshot.SimpleSpamPolicy
type Snapshot ¶
type Snapshot struct { Format SnapshotFormat Height uint64 // the block-height of the snapshot Hash []byte // the hash of the snapshot (the root hash of the AVL tree) Meta *Metadata // the AVL tree metadata // Metadata []byte // the above metadata serialised Nodes []*Payload // the snapshot payloads in the tree (always leaf nodes) // Chunk stuff Chunks uint32 DataChunks []*Chunk ByteChunks [][]byte ChunksSeen uint32 // contains filtered or unexported fields }
func SnapshotFromTree ¶
func SnapshotFromTree(tree *iavl.ImmutableTree) (*Snapshot, error)
SnapshotFromTree traverses the given avl tree and represents it as a Snapshot.
func (Snapshot) GetMissing ¶
func (*Snapshot) TreeFromSnapshot ¶
func (s *Snapshot) TreeFromSnapshot(tree *iavl.MutableTree) error
TreeFromSnapshot takes the given snapshot data and creates a avl tree from it.
func (*Snapshot) ValidateMeta ¶
type SnapshotFormat ¶
func SnapshotFromatFromU32 ¶
func SnapshotFromatFromU32(f uint32) (SnapshotFormat, error)
type SnapshotNamespace ¶
type SnapshotNamespace string
const ( AppSnapshot SnapshotNamespace = "app" AssetsSnapshot SnapshotNamespace = "assets" WitnessSnapshot SnapshotNamespace = "witness" // Must be done before any engine that call RestoreResource BankingSnapshot SnapshotNamespace = "banking" CheckpointSnapshot SnapshotNamespace = "checkpoint" CollateralSnapshot SnapshotNamespace = "collateral" NetParamsSnapshot SnapshotNamespace = "netparams" DelegationSnapshot SnapshotNamespace = "delegation" GovernanceSnapshot SnapshotNamespace = "governance" PositionsSnapshot SnapshotNamespace = "positions" MatchingSnapshot SnapshotNamespace = "matching" ExecutionSnapshot SnapshotNamespace = "execution" EpochSnapshot SnapshotNamespace = "epoch" StakingSnapshot SnapshotNamespace = "staking" IDGenSnapshot SnapshotNamespace = "idgenerator" RewardSnapshot SnapshotNamespace = "rewards" SpamSnapshot SnapshotNamespace = "spam" LimitSnapshot SnapshotNamespace = "limits" NotarySnapshot SnapshotNamespace = "notary" StakeVerifierSnapshot SnapshotNamespace = "stakeverifier" EventForwarderSnapshot SnapshotNamespace = "eventforwarder" TopologySnapshot SnapshotNamespace = "topology" LiquiditySnapshot SnapshotNamespace = "liquidity" LiquidityTargetSnapshot SnapshotNamespace = "liquiditytarget" FloatingPointConsensusSnapshot SnapshotNamespace = "floatingpoint" MarketActivityTrackerSnapshot SnapshotNamespace = "marketActivityTracker" ERC20MultiSigTopologySnapshot SnapshotNamespace = "erc20multisigtopology" PoWSnapshot SnapshotNamespace = "pow" ProtocolUpgradeSnapshot SnapshotNamespace = "protocolUpgradeProposals" MaxChunkSize = 16 * 1000 * 1000 // technically 16 * 1024 * 1024, but you know IdealChunkSize = 10 * 1000 * 1000 // aim for 10MB )
func (SnapshotNamespace) String ¶
func (n SnapshotNamespace) String() string
type StakeDeposited ¶
type StakeDeposited struct {
BlockNumber, LogIndex uint64
TxID string // hash
ID string
VegaPubKey string
EthereumAddress string
Amount *num.Uint
BlockTime int64
}
func StakeDepositedFromProto ¶
func StakeDepositedFromProto( s *vgproto.StakeDeposited, blockNumber, logIndex uint64, txID, id string, ) (*StakeDeposited, error)
func (*StakeDeposited) IntoStakeLinking ¶
func (s *StakeDeposited) IntoStakeLinking() *StakeLinking
func (StakeDeposited) String ¶
func (s StakeDeposited) String() string
type StakeLinking ¶
type StakeLinking struct { ID string Type StakeLinkingType TS int64 Party string Amount *num.Uint Status StakeLinkingStatus FinalizedAt int64 TxHash string BlockHeight uint64 BlockTime int64 LogIndex uint64 EthereumAddress string }
func StakeLinkingFromProto ¶
func StakeLinkingFromProto(sl *eventspb.StakeLinking) *StakeLinking
func (StakeLinking) Hash ¶
func (s StakeLinking) Hash() string
func (*StakeLinking) IntoProto ¶
func (s *StakeLinking) IntoProto() *eventspb.StakeLinking
func (*StakeLinking) String ¶
func (s *StakeLinking) String() string
type StakeLinkingStatus ¶
type StakeLinkingStatus = eventspb.StakeLinking_Status
type StakeLinkingType ¶
type StakeLinkingType = eventspb.StakeLinking_Type
type StakeRemoved ¶
type StakeRemoved struct {
BlockNumber, LogIndex uint64
TxID string // hash
ID string
VegaPubKey string
EthereumAddress string
Amount *num.Uint
BlockTime int64
}
func StakeRemovedFromProto ¶
func StakeRemovedFromProto( s *vgproto.StakeRemoved, blockNumber, logIndex uint64, txID, id string, ) (*StakeRemoved, error)
func (*StakeRemoved) IntoStakeLinking ¶
func (s *StakeRemoved) IntoStakeLinking() *StakeLinking
func (StakeRemoved) String ¶
func (s StakeRemoved) String() string
type StakeScoreParams ¶
type StakeTotalSupply ¶
func StakeTotalSupplyFromProto ¶
func StakeTotalSupplyFromProto(s *vgproto.StakeTotalSupply) (*StakeTotalSupply, error)
func (*StakeTotalSupply) IntoProto ¶
func (s *StakeTotalSupply) IntoProto() *vgproto.StakeTotalSupply
func (*StakeTotalSupply) String ¶
func (s *StakeTotalSupply) String() string
type StakingAccount ¶
type StakingAccount struct { Party string Balance *num.Uint Events []*StakeLinking }
func StakingAccountFromProto ¶
func StakingAccountFromProto(sa *snapshot.StakingAccount) *StakingAccount
func (StakingAccount) IntoProto ¶
func (s StakingAccount) IntoProto() *snapshot.StakingAccount
type StakingAccounts ¶
type StakingAccounts struct { Accounts []*StakingAccount StakingAssetTotalSupply *num.Uint }
func StakingAccountsFromProto ¶
func StakingAccountsFromProto(sa *snapshot.StakingAccounts) *StakingAccounts
func (StakingAccounts) IntoProto ¶
func (s StakingAccounts) IntoProto() *snapshot.StakingAccounts
type StateProvider ¶
type StateProvider interface { Namespace() SnapshotNamespace Keys() []string // NB: GetState must be threadsafe as it may be called from multiple goroutines concurrently! GetState(key string) ([]byte, []StateProvider, error) LoadState(ctx context.Context, pl *Payload) ([]StateProvider, error) Stopped() bool }
StateProvider - not a huge fan of this interface being here, but it ensures that the state providers don't have to import the snapshot package
type TargetStakeParameters ¶
func TargetStakeParametersFromProto ¶
func TargetStakeParametersFromProto(p *proto.TargetStakeParameters) *TargetStakeParameters
func (TargetStakeParameters) DeepClone ¶
func (t TargetStakeParameters) DeepClone() *TargetStakeParameters
func (TargetStakeParameters) IntoProto ¶
func (t TargetStakeParameters) IntoProto() *proto.TargetStakeParameters
func (TargetStakeParameters) String ¶
func (t TargetStakeParameters) String() string
type Topology ¶
type Topology struct { ValidatorData []*snapshot.ValidatorState ChainValidators []string PendingPubKeyRotations []*snapshot.PendingKeyRotation PendingEthereumKeyRotations []*snapshot.PendingEthereumKeyRotation UnresolvedEthereumKeyRotations []*snapshot.PendingEthereumKeyRotation Signatures *snapshot.ToplogySignatures ValidatorPerformance *snapshot.ValidatorPerformance }
type TradableInstrument ¶
type TradableInstrument struct { Instrument *Instrument MarginCalculator *MarginCalculator RiskModel isTRM // contains filtered or unexported fields }
func TradableInstrumentFromProto ¶
func TradableInstrumentFromProto(ti *proto.TradableInstrument) *TradableInstrument
func (TradableInstrument) DeepClone ¶
func (t TradableInstrument) DeepClone() *TradableInstrument
func (TradableInstrument) GetLogNormalRiskModel ¶
func (t TradableInstrument) GetLogNormalRiskModel() *LogNormalRiskModel
func (TradableInstrument) GetSimpleRiskModel ¶
func (t TradableInstrument) GetSimpleRiskModel() *SimpleRiskModel
func (TradableInstrument) IntoProto ¶
func (t TradableInstrument) IntoProto() *proto.TradableInstrument
func (TradableInstrument) String ¶
func (t TradableInstrument) String() string
type TradableInstrumentLogNormalRiskModel ¶
type TradableInstrumentLogNormalRiskModel struct {
LogNormalRiskModel *LogNormalRiskModel
}
func TradableInstrumentLogNormalFromProto ¶
func TradableInstrumentLogNormalFromProto(p *proto.TradableInstrument_LogNormalRiskModel) *TradableInstrumentLogNormalRiskModel
func (TradableInstrumentLogNormalRiskModel) Equal ¶ added in v0.55.0
func (t TradableInstrumentLogNormalRiskModel) Equal(trm isTRM) bool
func (TradableInstrumentLogNormalRiskModel) IntoProto ¶
func (t TradableInstrumentLogNormalRiskModel) IntoProto() *proto.TradableInstrument_LogNormalRiskModel
func (TradableInstrumentLogNormalRiskModel) String ¶
func (t TradableInstrumentLogNormalRiskModel) String() string
type TradableInstrumentSimpleRiskModel ¶
type TradableInstrumentSimpleRiskModel struct {
SimpleRiskModel *SimpleRiskModel
}
func TradableInstrumentSimpleFromProto ¶
func TradableInstrumentSimpleFromProto(p *proto.TradableInstrument_SimpleRiskModel) *TradableInstrumentSimpleRiskModel
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 (t TradableInstrumentSimpleRiskModel) IntoProto() *proto.TradableInstrument_SimpleRiskModel
func (TradableInstrumentSimpleRiskModel) String ¶
func (t TradableInstrumentSimpleRiskModel) String() string
type Trade ¶
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 Transfer ¶
type Transfer struct { Owner string Amount *FinancialAmount Type TransferType MinAmount *num.Uint Market string }
type TransferBase ¶
type TransferBase struct { ID string From string FromAccountType AccountType To string ToAccountType AccountType Asset string Amount *num.Uint Reference string Status TransferStatus Timestamp time.Time }
func (*TransferBase) IsValid ¶
func (t *TransferBase) IsValid() error
type TransferCommandKind ¶
type TransferCommandKind int
const ( TransferCommandKindOneOff TransferCommandKind = iota TransferCommandKindRecurring )
type TransferFunds ¶
type TransferFunds struct { Kind TransferCommandKind OneOff *OneOffTransfer Recurring *RecurringTransfer }
Just a wrapper, use the Kind on a switch to access the proper value.
func NewTransferFromProto ¶
func NewTransferFromProto(id, from string, tf *commandspb.Transfer) (*TransferFunds, error)
type TransferRequest ¶
type TransferRequest struct { FromAccount []*Account ToAccount []*Account Amount *num.Uint MinAmount *num.Uint Asset string // Reference string Type TransferType }
func (*TransferRequest) IntoProto ¶
func (t *TransferRequest) IntoProto() *proto.TransferRequest
type TransferStatus ¶
type TransferStatus = eventspb.Transfer_Status
const ( // Default value. TransferStatsUnspecified TransferStatus = eventspb.Transfer_STATUS_UNSPECIFIED // A pending transfer. TransferStatusPending TransferStatus = eventspb.Transfer_STATUS_PENDING // A finished transfer. TransferStatusDone TransferStatus = eventspb.Transfer_STATUS_DONE // A rejected transfer. TransferStatusRejected TransferStatus = eventspb.Transfer_STATUS_REJECTED // A stopped transfer. TransferStatusStopped TransferStatus = eventspb.Transfer_STATUS_STOPPED // A cancelled transfer. TransferStatusCancelled TransferStatus = eventspb.Transfer_STATUS_CANCELLED )
type TransferType ¶
type TransferType = proto.TransferType
const ( // Default value, always invalid. TransferTypeUnspecified TransferType = proto.TransferType_TRANSFER_TYPE_UNSPECIFIED // Loss. TransferTypeLoss TransferType = proto.TransferType_TRANSFER_TYPE_LOSS // Win. TransferTypeWin TransferType = proto.TransferType_TRANSFER_TYPE_WIN // Close. TransferTypeClose TransferType = proto.TransferType_TRANSFER_TYPE_CLOSE // 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 // Lock amount for withdraw. TransferTypeWithdrawLock TransferType = proto.TransferType_TRANSFER_TYPE_WITHDRAW_LOCK // 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 // Stake reward. TransferTypeRewardPayout TransferType = proto.TransferType_TRANSFER_TYPE_STAKE_REWARD TransferTypeTransferFundsSend TransferType = proto.TransferType_TRANSFER_TYPE_TRANSFER_FUNDS_SEND TransferTypeTransferFundsDistribute TransferType = proto.TransferType_TRANSFER_TYPE_TRANSFER_FUNDS_DISTRIBUTE TransferTypeClearAccount TransferType = proto.TransferType_TRANSFER_TYPE_CLEAR_ACCOUNT TransferTypeCheckpointBalanceRestore TransferType = proto.TransferType_TRANSFER_TYPE_CHECKPOINT_BALANCE_RESTORE )
type Undelegate ¶
func (Undelegate) IntoProto ¶
func (u Undelegate) IntoProto() *commandspb.UndelegateSubmission
func (Undelegate) String ¶
func (u Undelegate) String() string
type UpdateAsset ¶
type UpdateAsset struct { AssetID string Changes *AssetDetailsUpdate }
func (UpdateAsset) DeepClone ¶
func (a UpdateAsset) DeepClone() *UpdateAsset
func (*UpdateAsset) GetChanges ¶
func (a *UpdateAsset) GetChanges() *AssetDetailsUpdate
func (UpdateAsset) IntoProto ¶
func (a UpdateAsset) IntoProto() *vegapb.UpdateAsset
func (UpdateAsset) String ¶
func (a UpdateAsset) String() string
func (UpdateAsset) Validate ¶
func (a UpdateAsset) Validate() (ProposalError, error)
type UpdateFutureProduct ¶
type UpdateFutureProduct struct { QuoteName string DataSourceSpecForSettlementData DataSourceDefinition DataSourceSpecForTradingTermination DataSourceDefinition DataSourceSpecBinding *DataSourceSpecBindingForFuture SettlementDataDecimals uint32 }
func (UpdateFutureProduct) DeepClone ¶
func (f UpdateFutureProduct) DeepClone() *UpdateFutureProduct
func (UpdateFutureProduct) IntoProto ¶
func (f UpdateFutureProduct) IntoProto() *vegapb.UpdateFutureProduct
func (UpdateFutureProduct) String ¶
func (f UpdateFutureProduct) String() string
type UpdateInstrumentConfiguration ¶
type UpdateInstrumentConfiguration struct { Code string // *UpdateInstrumentConfigurationFuture Product updateInstrumentConfigurationProduct }
func UpdateInstrumentConfigurationFromProto ¶
func UpdateInstrumentConfigurationFromProto(p *vegapb.UpdateInstrumentConfiguration) *UpdateInstrumentConfiguration
func (UpdateInstrumentConfiguration) DeepClone ¶
func (i UpdateInstrumentConfiguration) DeepClone() *UpdateInstrumentConfiguration
func (UpdateInstrumentConfiguration) IntoProto ¶
func (i UpdateInstrumentConfiguration) IntoProto() *vegapb.UpdateInstrumentConfiguration
func (UpdateInstrumentConfiguration) String ¶
func (i UpdateInstrumentConfiguration) String() string
type UpdateInstrumentConfigurationFuture ¶
type UpdateInstrumentConfigurationFuture struct {
Future *UpdateFutureProduct
}
func (UpdateInstrumentConfigurationFuture) DeepClone ¶
func (i UpdateInstrumentConfigurationFuture) DeepClone() updateInstrumentConfigurationProduct
func (UpdateInstrumentConfigurationFuture) IntoProto ¶
func (i UpdateInstrumentConfigurationFuture) IntoProto() *vegapb.UpdateInstrumentConfiguration_Future
func (UpdateInstrumentConfigurationFuture) String ¶
func (i UpdateInstrumentConfigurationFuture) String() string
type UpdateMarket ¶
type UpdateMarket struct { MarketID string Changes *UpdateMarketConfiguration }
func (UpdateMarket) DeepClone ¶
func (n UpdateMarket) DeepClone() *UpdateMarket
func (UpdateMarket) IntoProto ¶
func (n UpdateMarket) IntoProto() *vegapb.UpdateMarket
func (UpdateMarket) String ¶
func (n UpdateMarket) String() string
type UpdateMarketConfiguration ¶
type UpdateMarketConfiguration struct { Instrument *UpdateInstrumentConfiguration Metadata []string PriceMonitoringParameters *PriceMonitoringParameters LiquidityMonitoringParameters *LiquidityMonitoringParameters RiskParameters updateRiskParams }
func UpdateMarketConfigurationFromProto ¶
func UpdateMarketConfigurationFromProto(p *vegapb.UpdateMarketConfiguration) *UpdateMarketConfiguration
func (UpdateMarketConfiguration) DeepClone ¶
func (n UpdateMarketConfiguration) DeepClone() *UpdateMarketConfiguration
func (UpdateMarketConfiguration) IntoProto ¶
func (n UpdateMarketConfiguration) IntoProto() *vegapb.UpdateMarketConfiguration
func (UpdateMarketConfiguration) String ¶
func (n UpdateMarketConfiguration) String() string
type UpdateMarketConfigurationLogNormal ¶
type UpdateMarketConfigurationLogNormal struct {
LogNormal *LogNormalRiskModel
}
func UpdateMarketConfigurationLogNormalFromProto ¶
func UpdateMarketConfigurationLogNormalFromProto(p *vegapb.UpdateMarketConfiguration_LogNormal) *UpdateMarketConfigurationLogNormal
func (UpdateMarketConfigurationLogNormal) DeepClone ¶
func (n UpdateMarketConfigurationLogNormal) DeepClone() updateRiskParams
func (UpdateMarketConfigurationLogNormal) IntoProto ¶
func (n UpdateMarketConfigurationLogNormal) IntoProto() *vegapb.UpdateMarketConfiguration_LogNormal
func (UpdateMarketConfigurationLogNormal) String ¶
func (n UpdateMarketConfigurationLogNormal) String() string
type UpdateMarketConfigurationSimple ¶
type UpdateMarketConfigurationSimple struct {
Simple *SimpleModelParams
}
func UpdateMarketConfigurationSimpleFromProto ¶
func UpdateMarketConfigurationSimpleFromProto(p *vegapb.UpdateMarketConfiguration_Simple) *UpdateMarketConfigurationSimple
func (UpdateMarketConfigurationSimple) DeepClone ¶
func (n UpdateMarketConfigurationSimple) DeepClone() updateRiskParams
func (UpdateMarketConfigurationSimple) IntoProto ¶
func (n UpdateMarketConfigurationSimple) IntoProto() *vegapb.UpdateMarketConfiguration_Simple
func (UpdateMarketConfigurationSimple) String ¶
func (n UpdateMarketConfigurationSimple) String() string
type UpdateNetworkParameter ¶
type UpdateNetworkParameter struct {
Changes *NetworkParameter
}
func (UpdateNetworkParameter) DeepClone ¶
func (n UpdateNetworkParameter) DeepClone() *UpdateNetworkParameter
func (UpdateNetworkParameter) IntoProto ¶
func (n UpdateNetworkParameter) IntoProto() *vegapb.UpdateNetworkParameter
func (UpdateNetworkParameter) String ¶
func (n UpdateNetworkParameter) String() string
type UpgradeStatus ¶
type UpgradeStatus struct { AcceptedReleaseInfo *ReleaseInfo ReadyToUpgrade bool }
type ValidatorData ¶
type ValidatorData struct { NodeID string PubKey string StakeByDelegators *num.Uint SelfStake *num.Uint Delegators map[string]*num.Uint TmPubKey string }
ValidatorData is delegation data for validator.
type ValidatorVotingPower ¶
ValidatorVotingPower is the scaled voting power for the given tm key.
type Vote ¶
type Vote struct { // PartyID is the party that casted the vote. PartyID string // ProposalID is the proposal identifier concerned by the vote. ProposalID string // Value is the actual position of the vote: yes or no. Value VoteValue // Timestamp is the date and time (in nanoseconds) at which the vote has // been casted. Timestamp int64 // TotalGovernanceTokenBalance is the total number of tokens hold by the // party that casted the vote. TotalGovernanceTokenBalance *num.Uint // TotalGovernanceTokenWeight is the weight of the vote compared to the // total number of governance token. TotalGovernanceTokenWeight num.Decimal // total number of equity-like share on the market. TotalEquityLikeShareWeight num.Decimal }
Vote represents a governance vote casted by a party for a given proposal.
type VoteSpamPolicy ¶
type VoteSpamPolicy struct { PartyProposalVoteCount []*PartyProposalVoteCount BannedParty []*BannedParty RecentBlocksRejectStats []*BlockRejectStats CurrentBlockIndex uint64 LastIncreaseBlock uint64 CurrentEpochSeq uint64 MinVotingTokensFactor *num.Uint }
func VoteSpamPolicyFromProto ¶
func VoteSpamPolicyFromProto(vsp *snapshot.VoteSpamPolicy) *VoteSpamPolicy
func (*VoteSpamPolicy) IntoProto ¶
func (vsp *VoteSpamPolicy) IntoProto() *snapshot.VoteSpamPolicy
type VoteSubmission ¶
type VoteSubmission struct { // The ID of the proposal to vote for. ProposalID string // The actual value of the vote Value VoteValue }
func NewVoteSubmissionFromProto ¶
func NewVoteSubmissionFromProto(p *commandspb.VoteSubmission) *VoteSubmission
func (VoteSubmission) IntoProto ¶
func (v VoteSubmission) IntoProto() *commandspb.VoteSubmission
func (VoteSubmission) String ¶
func (v VoteSubmission) String() string
type VoteValue ¶
type VoteValue = vegapb.Vote_Value
const ( // VoteValueUnspecified Default value, always invalid. VoteValueUnspecified VoteValue = vegapb.Vote_VALUE_UNSPECIFIED // VoteValueNo represents a vote against the proposal. VoteValueNo VoteValue = vegapb.Vote_VALUE_NO // VoteValueYes represents a vote in favour of the proposal. VoteValueYes VoteValue = vegapb.Vote_VALUE_YES )
type WithdrawExt ¶
type WithdrawExt struct {
Ext isWithdrawExtExt
}
func WithdrawExtFromProto ¶
func WithdrawExtFromProto(extProto *vegapb.WithdrawExt) *WithdrawExt
func (*WithdrawExt) GetErc20 ¶
func (x *WithdrawExt) GetErc20() *WithdrawExtErc20
func (*WithdrawExt) IntoProto ¶
func (x *WithdrawExt) IntoProto() *vegapb.WithdrawExt
func (*WithdrawExt) String ¶
func (x *WithdrawExt) String() string
type WithdrawExtErc20 ¶
type WithdrawExtErc20 struct {
Erc20 *Erc20WithdrawExt
}
func WithdrawExtErc20FromProto ¶
func WithdrawExtErc20FromProto(erc20 *vegapb.WithdrawExt_Erc20) *WithdrawExtErc20
func (*WithdrawExtErc20) GetReceiverAddress ¶
func (x *WithdrawExtErc20) GetReceiverAddress() string
func (*WithdrawExtErc20) IntoProto ¶
func (x *WithdrawExtErc20) IntoProto() *vegapb.WithdrawExt_Erc20
func (*WithdrawExtErc20) String ¶
func (x *WithdrawExtErc20) String() string
type WithdrawSubmission ¶
type WithdrawSubmission struct { // The amount to be withdrawn Amount *num.Uint // The asset we want to withdraw Asset string // Foreign chain specifics Ext *WithdrawExt }
func NewWithdrawSubmissionFromProto ¶
func NewWithdrawSubmissionFromProto(p *commandspb.WithdrawSubmission) (*WithdrawSubmission, error)
func (WithdrawSubmission) IntoProto ¶
func (w WithdrawSubmission) IntoProto() *commandspb.WithdrawSubmission
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 // ExpirationDate The time until when the withdrawal is valid ExpirationDate 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 )
Source Files ¶
- asset.go
- banking.go
- candles.go
- chain_events.go
- checkpoint.go
- collateral.go
- data.go
- data_signer.go
- data_source.go
- data_source_external.go
- data_source_external_oracle.go
- data_source_internal.go
- data_source_internal_tme.go
- data_source_types.go
- delegation.go
- epoch.go
- ethereum.go
- fee_score.go
- fees.go
- governance_new_asset.go
- governance_new_freeform.go
- governance_new_market.go
- governance_proposal.go
- governance_update_asset.go
- governance_update_market.go
- governance_update_network_parameter.go
- governance_vote.go
- liquidity.go
- market.go
- marketdepth.go
- matching.go
- multisig.go
- networkparams.go
- nodes.go
- oracles.go
- orders.go
- plugins.go
- pricemonitoring.go
- processor.go
- protocol_upgrade.go
- risk.go
- scores.go
- snapshot.go
- snapshot_nodes.go
- staking.go
- stringer.go
- system.go
- transfer.go