{"modulePath":"github.com/onflow/flow-archive","version":"v0.31.9-decrease-wait-interval","isLatest":false,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package access\n\n## Types\n\n```go\ntype Server struct {\n\t// contains filtered or unexported fields\n}\n```\nServer 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.\n\n```go\nfunc NewServer(index archive.Reader, invoker accessModel.Invoker) *Server\n```\nNewServer creates a new server, using the provided index reader as a backend for data retrieval.\n\n```go\nfunc (s *Server) ExecuteScriptAtBlockHeight(_ context.Context, in *access.ExecuteScriptAtBlockHeightRequest) (*access.ExecuteScriptResponse, error)\n```\nExecuteScriptAtBlockHeight implements the ExecuteScriptAtBlockHeight endpoint from the Flow Access API. See [https://docs.onflow.org/access-api/#executescriptatblockheight](https://docs.onflow.org/access-api/#executescriptatblockheight)\n\n```go\nfunc (s *Server) ExecuteScriptAtBlockID(ctx context.Context, in *access.ExecuteScriptAtBlockIDRequest) (*access.ExecuteScriptResponse, error)\n```\nExecuteScriptAtBlockID implements the ExecuteScriptAtBlockID endpoint from the Flow Access API. See [https://docs.onflow.org/access-api/#executescriptatblockid](https://docs.onflow.org/access-api/#executescriptatblockid)\n\n```go\nfunc (s *Server) ExecuteScriptAtLatestBlock(ctx context.Context, in *access.ExecuteScriptAtLatestBlockRequest) (*access.ExecuteScriptResponse, error)\n```\nExecuteScriptAtLatestBlock implements the ExecuteScriptAtLatestBlock endpoint from the Flow Access API. See [https://docs.onflow.org/access-api/#executescriptatlatestblock](https://docs.onflow.org/access-api/#executescriptatlatestblock)\n\n```go\nfunc (s *Server) GetAccount(ctx context.Context, in *access.GetAccountRequest) (*access.GetAccountResponse, error)\n```\nGetAccount implements the GetAccount endpoint from the Flow Access API. See [https://docs.onflow.org/access-api/#getaccount](https://docs.onflow.org/access-api/#getaccount)\n\n```go\nfunc (s *Server) GetAccountAtBlockHeight(_ context.Context, in *access.GetAccountAtBlockHeightRequest) (*access.AccountResponse, error)\n```\nGetAccountAtBlockHeight implements the GetAccountAtBlockHeight endpoint from the Flow Access API. See [https://docs.onflow.org/access-api/#getaccountatblockheight](https://docs.onflow.org/access-api/#getaccountatblockheight)\n\n```go\nfunc (s *Server) GetAccountAtLatestBlock(ctx context.Context, in *access.GetAccountAtLatestBlockRequest) (*access.AccountResponse, error)\n```\nGetAccountAtLatestBlock implements the GetAccountAtLatestBlock endpoint from the Flow Access API. See [https://docs.onflow.org/access-api/#getaccountatlatestblock](https://docs.onflow.org/access-api/#getaccountatlatestblock)\n\n```go\nfunc (s *Server) GetBlockByHeight(_ context.Context, in *access.GetBlockByHeightRequest) (*access.BlockResponse, error)\n```\nGetBlockByHeight implements the GetBlockByHeight endpoint from the Flow Access API. See [https://docs.onflow.org/access-api/#getblockbyheight](https://docs.onflow.org/access-api/#getblockbyheight)\n\n```go\nfunc (s *Server) GetBlockByID(ctx context.Context, in *access.GetBlockByIDRequest) (*access.BlockResponse, error)\n```\nGetBlockByID implements the GetBlockByID endpoint from the Flow Access API. See [https://docs.onflow.org/access-api/#getblockbyid](https://docs.onflow.org/access-api/#getblockbyid)\n\n```go\nfunc (s *Server) GetBlockHeaderByHeight(_ context.Context, in *access.GetBlockHeaderByHeightRequest) (*access.BlockHeaderResponse, error)\n```\nGetBlockHeaderByHeight implements the GetBlockHeaderByHeight endpoint from the Flow Access API. See [https://docs.onflow.org/access-api/#getblockheaderbyheight](https://docs.onflow.org/access-api/#getblockheaderbyheight)\n\n```go\nfunc (s *Server) GetBlockHeaderByID(ctx context.Context, in *access.GetBlockHeaderByIDRequest) (*access.BlockHeaderResponse, error)\n```\nGetBlockHeaderByID implements the GetBlockHeaderByID endpoint from the Flow Access API. See [https://docs.onflow.org/access-api/#getblockheaderbyid](https://docs.onflow.org/access-api/#getblockheaderbyid)\n\n```go\nfunc (s *Server) GetCollectionByID(_ context.Context, in *access.GetCollectionByIDRequest) (*access.CollectionResponse, error)\n```\nGetCollectionByID implements the GetCollectionByID endpoint from the Flow Access API. See [https://docs.onflow.org/access-api/#getcollectionbyid](https://docs.onflow.org/access-api/#getcollectionbyid)\n\n```go\nfunc (s *Server) GetEventsForBlockIDs(_ context.Context, in *access.GetEventsForBlockIDsRequest) (*access.EventsResponse, error)\n```\nGetEventsForBlockIDs implements the GetEventsForBlockIDs endpoint from the Flow Access API. See [https://docs.onflow.org/access-api/#geteventsforblockids](https://docs.onflow.org/access-api/#geteventsforblockids)\n\n```go\nfunc (s *Server) GetEventsForHeightRange(_ context.Context, in *access.GetEventsForHeightRangeRequest) (*access.EventsResponse, error)\n```\nGetEventsForHeightRange implements the GetEventsForHeightRange endpoint from the Flow Access API. See [https://docs.onflow.org/access-api/#geteventsforheightrange](https://docs.onflow.org/access-api/#geteventsforheightrange)\n\n```go\nfunc (s *Server) GetExecutionResultForBlockID(_ context.Context, req *access.GetExecutionResultForBlockIDRequest) (*access.ExecutionResultForBlockIDResponse, error)\n```\nGetExecutionResultForBlockID is not implemented. See [https://docs.onflow.org/access-api/#getexecutionresultforblockid](https://docs.onflow.org/access-api/#getexecutionresultforblockid)\n\n```go\nfunc (s *Server) GetLatestBlock(ctx context.Context, in *access.GetLatestBlockRequest) (*access.BlockResponse, error)\n```\nGetLatestBlock implements the GetLatestBlock endpoint from the Flow Access API. See [https://docs.onflow.org/access-api/#getlatestblock](https://docs.onflow.org/access-api/#getlatestblock)\n\n```go\nfunc (s *Server) GetLatestBlockHeader(ctx context.Context, _ *access.GetLatestBlockHeaderRequest) (*access.BlockHeaderResponse, error)\n```\nGetLatestBlockHeader implements the GetLatestBlockHeader endpoint from the Flow Access API. See [https://docs.onflow.org/access-api/#getlatestblockheader](https://docs.onflow.org/access-api/#getlatestblockheader)\n\n```go\nfunc (s *Server) GetLatestProtocolStateSnapshot(ctx context.Context, in *access.GetLatestProtocolStateSnapshotRequest) (*access.ProtocolStateSnapshotResponse, error)\n```\nGetLatestProtocolStateSnapshot is not implemented. See [https://docs.onflow.org/access-api/#getlatestprotocolstatesnapshotrequest](https://docs.onflow.org/access-api/#getlatestprotocolstatesnapshotrequest)\n\n```go\nfunc (s *Server) GetNetworkParameters(_ context.Context, _ *access.GetNetworkParametersRequest) (*access.GetNetworkParametersResponse, error)\n```\nGetNetworkParameters implements the GetNetworkParameters endpoint from the Flow Access API. See [https://docs.onflow.org/access-api/#getnetworkparameters](https://docs.onflow.org/access-api/#getnetworkparameters)\n\n```go\nfunc (s *Server) GetNodeVersionInfo(ctx context.Context, req *access.GetNodeVersionInfoRequest) (*access.GetNodeVersionInfoResponse, error)\n```\n\n```go\nfunc (s *Server) GetTransaction(_ context.Context, in *access.GetTransactionRequest) (*access.TransactionResponse, error)\n```\nGetTransaction implements the GetTransaction endpoint from the Flow Access API. See [https://docs.onflow.org/access-api/#gettransaction](https://docs.onflow.org/access-api/#gettransaction)\n\n```go\nfunc (s *Server) GetTransactionResult(_ context.Context, in *access.GetTransactionRequest) (*access.TransactionResultResponse, error)\n```\nGetTransactionResult implements the GetTransactionResult endpoint from the Flow Access API. See [https://docs.onflow.org/access-api/#gettransactionresult](https://docs.onflow.org/access-api/#gettransactionresult)\n\n```go\nfunc (s *Server) GetTransactionResultByIndex(ctx context.Context, in *access.GetTransactionByIndexRequest) (*access.TransactionResultResponse, error)\n```\nGetTransactionResultByIndex implements the GetTransactionResultByIndex endpoint from the Flow Access API.\n\n```go\nfunc (s *Server) GetTransactionResultsByBlockID(ctx context.Context, in *access.GetTransactionsByBlockIDRequest) (*access.TransactionResultsResponse, error)\n```\nGetTransactionResultsByBlockID implements the GetTransactionResultsByBlockID endpoint from the Flow Access API.\n\n```go\nfunc (s *Server) GetTransactionsByBlockID(ctx context.Context, in *access.GetTransactionsByBlockIDRequest) (*access.TransactionsResponse, error)\n```\nGetTransactionsByBlockID implements the GetTransactionsByBlockID endpoint from the Flow Access API.\n\n```go\nfunc (s *Server) Ping(_ context.Context, _ *access.PingRequest) (*access.PingResponse, error)\n```\nPing implements the Ping endpoint from the Flow Access API. See [https://docs.onflow.org/access-api/#ping](https://docs.onflow.org/access-api/#ping)\n\n```go\nfunc (s *Server) SendTransaction(ctx context.Context, in *access.SendTransactionRequest) (*access.SendTransactionResponse, error)\n```\nSendTransaction is not implemented. See [https://docs.onflow.org/access-api/#sendtransaction](https://docs.onflow.org/access-api/#sendtransaction)\n\n","path":"github.com/onflow/flow-archive/service/access","name":"access","synopsis":"","isRedistributable":true}
