client

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2022 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAccountClient added in v0.1.2

func NewAccountClient(conn *grpc.ClientConn, workerLiveAddress string) *accountClient

func NewBlockClient

func NewBlockClient(conn *grpc.ClientConn) *blockClient

func NewChainClient

func NewChainClient(conn *grpc.ClientConn) *chainClient

func NewEventClient added in v0.1.2

func NewEventClient(conn *grpc.ClientConn) *eventClient

func NewStakingClient added in v0.1.2

func NewStakingClient(conn *grpc.ClientConn) *stakingClient

func NewValidatorClient added in v0.5.0

func NewValidatorClient(conn *grpc.ClientConn, workerLiveAddress string) *validatorClient

func NewValidatorPerformanceClient added in v0.1.2

func NewValidatorPerformanceClient(conn *grpc.ClientConn, workerLiveAddress string) *validatorPerformanceClient

Types

type APIValidator added in v0.12.0

type APIValidator struct {
	StashAccount string `json:"stash_account"`
	Balance      string `json:"balance"`
}

type APIValidatorPerformance added in v0.12.0

type APIValidatorPerformance struct {
	StashAccount string `json:"stash_account"`
	Online       bool   `json:"online"`
}

type AccountClient added in v0.1.2

type AccountClient interface {
	GetIdentity(string) (*accountpb.GetIdentityResponse, error)
	GetByHeight(string, int64) (*accountpb.GetByHeightResponse, error)
}

type AccountIdentity added in v0.12.0

type AccountIdentity struct {
	Deposit     *big.Int `json:"deposit"`
	DisplayName string   `json:"display_name"`
	LegalName   string   `json:"legal_name"`
	WebName     string   `json:"web_name"`
	RiotName    string   `json:"riot_name"`
	EmailName   string   `json:"email_name"`
	TwitterName string   `json:"twitter_name"`
	Image       string   `json:"image"`
}

type AccountView added in v0.12.0

type AccountView struct {
	// Nonce passed
	Nonce int64 `json:"nonce"`
	// Free balance of account
	Free string `json:"free"`
	// Reserved balance of account
	Reserved string `json:"reserved"`
	// MiscFrozen balance of account
	MiscFrozen string `json:"misc_frozen"`
	// FeeFrozen balance of account
	FeeFrozen string `json:"fee_frozen"`
}

type BlockClient

type BlockClient interface {
	GetByHeight(int64) (*blockpb.GetByHeightResponse, error)
}

type ChainClient

type ChainClient interface {
	//Queries
	GetHead() (*chainpb.GetHeadResponse, error)
	GeStatus() (*chainpb.GetStatusResponse, error)
	GeMetaByHeight(int64) (*chainpb.GetMetaByHeightResponse, error)
}

type Client

type Client struct {
	Chain       ChainClient // still used in proxy
	Account     AccountClient
	Block       BlockClient
	Transaction TransactionClient
	Event       EventClient
	// contains filtered or unexported fields
}

func New

func New(connStr, workerLiveAddress string) (*Client, error)

func (*Client) Close

func (c *Client) Close() error

type EventClient added in v0.1.2

type EventClient interface {
	GetByHeight(int64) (*eventpb.GetByHeightResponse, error)
}

type StakingClient added in v0.1.2

type StakingClient interface {
	GetByHeight(int64) (*stakingpb.GetByHeightResponse, error)
}

type TransactionClient

type TransactionClient interface {
	GetByHeight(int64) (*transactionpb.GetByHeightResponse, error)
}

func NewTransactionClient

func NewTransactionClient(conn *grpc.ClientConn) TransactionClient

type ValidatorClient added in v0.5.0

type ValidatorClient interface {
	GetByHeight(int64) (*validatorpb.GetAllByHeightResponse, error)
}

type ValidatorPerformanceClient added in v0.1.2

type ValidatorPerformanceClient interface {
	GetByHeight(int64) (*validatorperformancepb.GetByHeightResponse, error)
}

Jump to

Keyboard shortcuts

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