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: 0

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