datanode

package
v0.73.9 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountFunds

type AccountFunds struct {
	Balance     *big.Int
	PartyId     string
	AccountType vega.AccountType
	AssetId     string
}

type DataNode

type DataNode struct {
	core.CoreClient
}

DataNode stores state for a Vega Data node.

func NewDataNode

func NewDataNode(hosts []string, callTimeout time.Duration, logger *zap.Logger) *DataNode

NewDataNode returns a new node.

func (*DataNode) GetAllMarkets

func (n *DataNode) GetAllMarkets() ([]*vega.Market, error)

func (*DataNode) GetAllNetworkParameters

func (n *DataNode) GetAllNetworkParameters() (map[string]string, error)

func (*DataNode) GetAssets

func (n *DataNode) GetAssets() (map[string]*vega.AssetDetails, error)

func (*DataNode) GetCurrentEpoch

func (n *DataNode) GetCurrentEpoch() (*vega.Epoch, error)

func (*DataNode) GetCurrentReferralProgram added in v0.73.9

func (n *DataNode) GetCurrentReferralProgram() (*dataapipb.ReferralProgram, error)

func (*DataNode) GetCurrentReferralProgramRaw added in v0.73.9

func (n *DataNode) GetCurrentReferralProgramRaw(req *dataapipb.GetCurrentReferralProgramRequest) (response *dataapipb.GetCurrentReferralProgramResponse, err error)

func (*DataNode) GetCurrentVolumeDiscountProgram added in v0.73.9

func (n *DataNode) GetCurrentVolumeDiscountProgram() (*dataapipb.VolumeDiscountProgram, error)

func (*DataNode) GetCurrentVolumeDiscountProgramRaw added in v0.73.9

func (n *DataNode) GetCurrentVolumeDiscountProgramRaw(req *dataapipb.GetCurrentVolumeDiscountProgramRequest) (response *dataapipb.GetCurrentVolumeDiscountProgramResponse, err error)

func (*DataNode) GetEpoch

func (n *DataNode) GetEpoch(req *dataapipb.GetEpochRequest) (response *dataapipb.GetEpochResponse, err error)

func (*DataNode) GetFunds

func (n *DataNode) GetFunds(partyID string, accountType vega.AccountType, assetId *string) ([]AccountFunds, error)

func (*DataNode) GetGovernanceData added in v0.73.9

func (n *DataNode) GetGovernanceData(req *dataapipb.GetGovernanceDataRequest) (response *dataapipb.GetGovernanceDataResponse, err error)

func (*DataNode) GetMarket

func (n *DataNode) GetMarket(req *dataapipb.GetMarketRequest) (response *dataapipb.GetMarketResponse, err error)

// GetMarket returns market data for the specified market.

func (*DataNode) GetMarketById

func (n *DataNode) GetMarketById(marketId string) (*vega.Market, error)

func (*DataNode) GetNetworkParameter

func (n *DataNode) GetNetworkParameter(req *dataapipb.GetNetworkParameterRequest) (response *dataapipb.GetNetworkParameterResponse, err error)

func (*DataNode) GetPartyDelegationToNode

func (n *DataNode) GetPartyDelegationToNode(partyId string, nodeId string) (*big.Int, error)

func (*DataNode) GetPartyTotalStake

func (n *DataNode) GetPartyTotalStake(partyId string) (*big.Int, error)

func (*DataNode) GetReferralSetReferees added in v0.73.9

func (n *DataNode) GetReferralSetReferees() (map[string]v2.ReferralSetReferee, error)

func (*DataNode) GetReferralSets added in v0.73.9

func (n *DataNode) GetReferralSets() (map[string]v2.ReferralSet, error)

func (*DataNode) GetStake

func (n *DataNode) GetStake(req *dataapipb.GetStakeRequest) (response *dataapipb.GetStakeResponse, err error)

GetStake returns stakes for the given party.

func (*DataNode) GetVolumeDiscountStats added in v0.73.9

func (n *DataNode) GetVolumeDiscountStats() ([]*dataapipb.VolumeDiscountStatsEdge, error)

func (*DataNode) GetVolumeDiscountStatsRaw added in v0.73.9

func (n *DataNode) GetVolumeDiscountStatsRaw(req *dataapipb.GetVolumeDiscountStatsRequest) (response *dataapipb.GetVolumeDiscountStatsResponse, err error)

func (*DataNode) LastNetworkHistorySegment

func (dn *DataNode) LastNetworkHistorySegment() (*dataapipb.HistorySegment, error)

func (*DataNode) ListAssets

func (n *DataNode) ListAssets(req *dataapipb.ListAssetsRequest) (response *dataapipb.ListAssetsResponse, err error)

func (*DataNode) ListCoreSnapshots

func (dn *DataNode) ListCoreSnapshots() ([]vegaeventspb.CoreSnapshotData, error)

func (*DataNode) ListDelegations

func (n *DataNode) ListDelegations(req *dataapipb.ListDelegationsRequest) (response *dataapipb.ListDelegationsResponse, err error)

ListDelegations returns delegations for the given party.

func (*DataNode) ListGovernanceData

func (n *DataNode) ListGovernanceData(req *dataapipb.ListGovernanceDataRequest) (response *dataapipb.ListGovernanceDataResponse, err error)

func (*DataNode) ListMarkets

func (n *DataNode) ListMarkets(req *dataapipb.ListMarketsRequest) (response *dataapipb.ListMarketsResponse, err error)

ListMarkets returns all markets.

func (*DataNode) ListNetworkParameters

func (n *DataNode) ListNetworkParameters(req *dataapipb.ListNetworkParametersRequest) (response *dataapipb.ListNetworkParametersResponse, err error)

func (*DataNode) ListProtocolUpgradeProposals

func (dn *DataNode) ListProtocolUpgradeProposals() ([]vegaeventspb.ProtocolUpgradeEvent, error)

func (*DataNode) ListReferralSetReferees added in v0.73.9

func (n *DataNode) ListReferralSetReferees(req *dataapipb.ListReferralSetRefereesRequest) (response *dataapipb.ListReferralSetRefereesResponse, err error)

func (*DataNode) ListReferralSets added in v0.73.9

func (n *DataNode) ListReferralSets(req *dataapipb.ListReferralSetsRequest) (response *dataapipb.ListReferralSetsResponse, err error)

func (*DataNode) ListVotes added in v0.73.9

func (n *DataNode) ListVotes(req *dataapipb.ListVotesRequest) (response *dataapipb.ListVotesResponse, err error)

Jump to

Keyboard shortcuts

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