datanode

package
v0.76.8 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2024 License: MIT Imports: 14 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrAssetNotFound = errors.New("asset not found")

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.Client
}

DataNode stores state for a Vega Data node.

func New added in v0.76.8

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

New returns a new node.

func (*DataNode) ERC20AssetWithAddress added in v0.76.8

func (n *DataNode) ERC20AssetWithAddress(ctx context.Context, address string) (*vega.AssetDetails, *vega.ERC20, error)

func (*DataNode) GeneralAccountBalance added in v0.76.8

func (n *DataNode) GeneralAccountBalance(ctx context.Context, partyID, assetID string) (*big.Int, error)

func (*DataNode) GetAllMarketsWithState added in v0.76.8

func (n *DataNode) GetAllMarketsWithState(ctx context.Context, states []vega.Market_State) ([]*vega.Market, error)

func (*DataNode) GetCurrentEpoch

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

func (*DataNode) GetCurrentReferralProgram added in v0.73.9

func (n *DataNode) GetCurrentReferralProgram(ctx context.Context) (*v2.ReferralProgram, error)

func (*DataNode) GetCurrentVolumeDiscountProgram added in v0.73.9

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

func (*DataNode) GetGovernanceData added in v0.73.9

func (*DataNode) GetPartyTotalStake

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

func (*DataNode) LastNetworkHistorySegment

func (n *DataNode) LastNetworkHistorySegment(ctx context.Context) (*dataapipb.HistorySegment, error)

func (*DataNode) ListAccounts added in v0.76.8

func (n *DataNode) ListAccounts(ctx context.Context, partyID string, accountType vega.AccountType, assetID *string) ([]AccountFunds, error)

func (*DataNode) ListAssets

func (n *DataNode) ListAssets(ctx context.Context) (map[string]*vega.AssetDetails, error)

func (*DataNode) ListCoreSnapshots

func (n *DataNode) ListCoreSnapshots(ctx context.Context) ([]vegaeventspb.CoreSnapshotData, error)

func (*DataNode) ListDelegations

ListDelegations returns delegations for the given party.

func (*DataNode) ListMarkets

func (n *DataNode) ListMarkets(ctx context.Context) ([]*vega.Market, error)

func (*DataNode) ListNetworkParameters

func (n *DataNode) ListNetworkParameters(ctx context.Context) (*types.NetworkParams, error)

func (*DataNode) ListProtocolUpgradeProposals

func (n *DataNode) ListProtocolUpgradeProposals(ctx context.Context) ([]vegaeventspb.ProtocolUpgradeEvent, error)

func (*DataNode) ListReferralSetReferees added in v0.73.9

func (n *DataNode) ListReferralSetReferees(ctx context.Context) (map[string]v2.ReferralSetReferee, error)

func (*DataNode) ListReferralSets added in v0.73.9

func (n *DataNode) ListReferralSets(ctx context.Context) (map[string]*v2.ReferralSet, error)

func (*DataNode) ListVotes added in v0.73.9

Jump to

Keyboard shortcuts

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