access

package
v1.3.4 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 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)
}

Invoker represents something that can retrieve accounts at any given height, and execute scripts to retrieve values from the Flow Virtual Machine.

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) ExecuteScriptAtBlockHeight

ExecuteScriptAtBlockHeight implements the ExecuteScriptAtBlockHeight endpoint from the Flow Access API. See https://docs.onflow.org/access-api/#executescriptatblockheight

func (*Server) ExecuteScriptAtBlockID

ExecuteScriptAtBlockID implements the ExecuteScriptAtBlockID endpoint from the Flow Access API. See https://docs.onflow.org/access-api/#executescriptatblockid

func (*Server) ExecuteScriptAtLatestBlock

ExecuteScriptAtLatestBlock implements the ExecuteScriptAtLatestBlock endpoint from the Flow Access API. See https://docs.onflow.org/access-api/#executescriptatlatestblock

func (*Server) GetAccount

GetAccount implements the GetAccount endpoint from the Flow Access API. See https://docs.onflow.org/access-api/#getaccount

func (*Server) GetAccountAtBlockHeight

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

GetAccountAtBlockHeight implements the GetAccountAtBlockHeight endpoint from the Flow Access API. See https://docs.onflow.org/access-api/#getaccountatblockheight

func (*Server) GetAccountAtLatestBlock

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

GetAccountAtLatestBlock implements the GetAccountAtLatestBlock endpoint from the Flow Access API. See https://docs.onflow.org/access-api/#getaccountatlatestblock

func (*Server) GetBlockByHeight

GetBlockByHeight implements the GetBlockByHeight endpoint from the Flow Access API. See https://docs.onflow.org/access-api/#getblockbyheight

func (*Server) GetBlockByID

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

GetBlockByID implements the GetBlockByID endpoint from the Flow Access API. See https://docs.onflow.org/access-api/#getblockbyid

func (*Server) GetBlockHeaderByHeight

GetBlockHeaderByHeight implements the GetBlockHeaderByHeight endpoint from the Flow Access API. See https://docs.onflow.org/access-api/#getblockheaderbyheight

func (*Server) GetBlockHeaderByID

GetBlockHeaderByID implements the GetBlockHeaderByID endpoint from the Flow Access API. See https://docs.onflow.org/access-api/#getblockheaderbyid

func (*Server) GetCollectionByID

GetCollectionByID implements the GetCollectionByID endpoint from the Flow Access API. See https://docs.onflow.org/access-api/#getcollectionbyid

func (*Server) GetEventsForBlockIDs

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

GetEventsForBlockIDs implements the GetEventsForBlockIDs endpoint from the Flow Access API. See https://docs.onflow.org/access-api/#geteventsforblockids

func (*Server) GetEventsForHeightRange

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

GetEventsForHeightRange implements the GetEventsForHeightRange endpoint from the Flow Access API. See https://docs.onflow.org/access-api/#geteventsforheightrange

func (*Server) GetExecutionResultForBlockID added in v1.3.0

GetExecutionResultForBlockID is not implemented. See https://docs.onflow.org/access-api/#getexecutionresultforblockid

func (*Server) GetLatestBlock

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

GetLatestBlock implements the GetLatestBlock endpoint from the Flow Access API. See https://docs.onflow.org/access-api/#getlatestblock

func (*Server) GetLatestBlockHeader

GetLatestBlockHeader implements the GetLatestBlockHeader endpoint from the Flow Access API. See https://docs.onflow.org/access-api/#getlatestblockheader

func (*Server) GetNetworkParameters

GetNetworkParameters implements the GetNetworkParameters endpoint from the Flow Access API. See https://docs.onflow.org/access-api/#getnetworkparameters

func (*Server) GetTransaction

GetTransaction implements the GetTransaction endpoint from the Flow Access API. See https://docs.onflow.org/access-api/#gettransaction

func (*Server) GetTransactionResult

GetTransactionResult implements the GetTransactionResult endpoint from the Flow Access API. See https://docs.onflow.org/access-api/#gettransactionresult

func (*Server) Ping

Ping implements the Ping endpoint from the Flow Access API. See https://docs.onflow.org/access-api/#ping

func (*Server) SendTransaction

SendTransaction is not implemented. See https://docs.onflow.org/access-api/#sendtransaction

Jump to

Keyboard shortcuts

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