access

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Invoker

type Invoker interface {
	Account(height uint64, address flow.Address) (*flow.Account, error)
	Script(height uint64, script []byte, parameters []cadence.Value) (cadence.Value, error)
}

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server is a simple implementation of the generated AccessAPIServer interface. It uses an index reader interface as the backend to retrieve the desired data. This is generally an on-disk interface, but could be a GRPC-based index as well, in which case there is a double redirection.

func NewServer

func NewServer(index dps.Reader, codec dps.Codec, invoker Invoker) *Server

NewServer creates a new server, using the provided index reader as a backend for data retrieval.

func (*Server) GetAccount

func (*Server) GetAccountAtBlockHeight

func (s *Server) GetAccountAtBlockHeight(_ context.Context, in *access.GetAccountAtBlockHeightRequest) (*access.AccountResponse, error)

func (*Server) GetAccountAtLatestBlock

func (s *Server) GetAccountAtLatestBlock(ctx context.Context, in *access.GetAccountAtLatestBlockRequest) (*access.AccountResponse, error)

func (*Server) GetBlockByHeight

func (*Server) GetBlockByID

func (s *Server) GetBlockByID(ctx context.Context, in *access.GetBlockByIDRequest) (*access.BlockResponse, error)

func (*Server) GetBlockHeaderByID

func (*Server) GetCollectionByID

func (*Server) GetEventsForBlockIDs

func (s *Server) GetEventsForBlockIDs(_ context.Context, in *access.GetEventsForBlockIDsRequest) (*access.EventsResponse, error)

func (*Server) GetEventsForHeightRange

func (s *Server) GetEventsForHeightRange(_ context.Context, in *access.GetEventsForHeightRangeRequest) (*access.EventsResponse, error)

func (*Server) GetExecutionResultForBlockID added in v1.3.0

func (*Server) GetLatestBlock

func (s *Server) GetLatestBlock(ctx context.Context, in *access.GetLatestBlockRequest) (*access.BlockResponse, error)

func (*Server) GetLatestBlockHeader

func (*Server) GetTransaction

func (*Server) Ping

func (*Server) SendTransaction

Jump to

Keyboard shortcuts

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