api

package
v1.0.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2024 License: AGPL-3.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WriteCBORError

func WriteCBORError(w http.ResponseWriter, e error, code int, log *slog.Logger)

WriteCBORError replies to the request with the specified error message and HTTP code. It does not otherwise end the request; the caller should ensure no further writes are done to w.

func WriteCBORResponse

func WriteCBORResponse(w http.ResponseWriter, response any, statusCode int, log *slog.Logger)

WriteCBORResponse replies to the request with the given response and HTTP code.

Types

type API

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

func NewAPI

func NewAPI(s *state.State, partitionIdentifier types.PartitionID, gasUnitPrice *big.Int, blockGasLimit uint64, log *slog.Logger) *API

func (*API) Balance

func (a *API) Balance(w http.ResponseWriter, r *http.Request)

func (*API) CallEVM

func (a *API) CallEVM(w http.ResponseWriter, r *http.Request)

func (*API) EstimateGas

func (a *API) EstimateGas(w http.ResponseWriter, r *http.Request)

func (*API) GasPrice

func (a *API) GasPrice(w http.ResponseWriter, _ *http.Request)

GasPrice - returns static gas unit price. When gas price becomes dynamic a new approach is needed

func (*API) Register

func (a *API) Register(r *mux.Router)

func (*API) TransactionCount

func (a *API) TransactionCount(w http.ResponseWriter, r *http.Request)

type EstimateGasResponse

type EstimateGasResponse struct {
	GasUsed uint64
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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