api

package
v0.4.29 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2022 License: Apache-2.0 Imports: 38 Imported by: 0

Documentation

Overview

Package api implements the Rosetta API for Flow.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	Chain                   *config.Chain
	ConstructionAccessNodes access.Pool
	DataAccessNodes         access.Pool
	Index                   *indexdb.Store
	Indexer                 *state.Indexer
	Offline                 bool
	Port                    uint16
	// contains filtered or unexported fields
}

Server is the Flow Rosetta API server.

func (*Server) AccountBalance

AccountBalance implements the /account/balance endpoint.

func (*Server) AccountCoins

AccountCoins implements the /account/coins endpoint.

func (*Server) Block

Block implements the /block endpoint.

func (*Server) BlockTransaction

BlockTransaction implements the /block/transaction endpoint.

func (*Server) Call

Call implements the /call endpoint.

func (*Server) ConstructionCombine

ConstructionCombine implements the /construction/combine endpoint.

func (*Server) ConstructionDerive

ConstructionDerive implements the /construction/derive endpoint.

func (*Server) ConstructionHash

ConstructionHash implements the /construction/hash endpoint.

func (*Server) ConstructionMetadata

ConstructionMetadata implements the /construction/metadata endpoint.

func (*Server) ConstructionParse

ConstructionParse implements the /construction/parse endpoint.

func (*Server) ConstructionPayloads

ConstructionPayloads implements the /construction/payloads endpoint.

func (*Server) ConstructionPreprocess

ConstructionPreprocess implements the /construction/preprocess endpoint.

func (*Server) ConstructionSubmit

ConstructionSubmit implements the /construction/submit endpoint.

func (*Server) Mempool

Mempool implements the /mempool endpoint.

func (*Server) MempoolTransaction

MempoolTransaction implements the /mempool/transaction endpoint.

func (*Server) NetworkList

NetworkList implements the /network/list endpoint.

func (*Server) NetworkOptions

NetworkOptions implements the /network/options endpoint.

func (*Server) NetworkStatus

NetworkStatus implements the /network/status endpoint.

func (*Server) Run

func (s *Server) Run(ctx context.Context)

Run initializes the server and starts serving Rosetta API calls.

type Wrapper

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

Wrapper wraps the Rosetta API handlers so that all requests are automatically traced with any response errors logged.

If the system has encountered any invalid indexed state errors, then the first such error will be returned on all endpoints except for /call and /network/* API calls.

func (Wrapper) AccountCoins

func (Wrapper) Block

func (Wrapper) Call

func (Wrapper) Mempool

func (Wrapper) NetworkList

func (Wrapper) NetworkOptions

func (Wrapper) NetworkStatus

Jump to

Keyboard shortcuts

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