experimental

package
v0.48.0 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2026 License: AGPL-3.0 Imports: 16 Imported by: 0

README

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAccountTransactions

func GetAccountTransactions(r *common.Request, backend extended.API, link commonmodels.LinkGenerator) (interface{}, error)

GetAccountTransactions returns a paginated list of transactions for the given account address.

Types

type AccountTransactionFilter

type AccountTransactionFilter struct {
	Roles []string `json:"roles,omitempty"`
}

type AccountTransactionResponse

type AccountTransactionResponse struct {
	BlockHeight      string                          `json:"block_height"`
	BlockTimestamp   string                          `json:"timestamp"`
	TransactionID    string                          `json:"transaction_id"`
	TransactionIndex string                          `json:"transaction_index"`
	Roles            []string                        `json:"roles,omitempty"`
	Transaction      *commonmodels.Transaction       `json:"transaction,omitempty"`
	Result           *commonmodels.TransactionResult `json:"result,omitempty"`
}

AccountTransactionResponse is a single transaction entry in the response.

type AccountTransactionsResponse

type AccountTransactionsResponse struct {
	Transactions []AccountTransactionResponse `json:"transactions"`
	NextCursor   string                       `json:"next_cursor,omitempty"`
}

AccountTransactionsResponse is the JSON response for the GetAccountTransactions endpoint.

type ApiHandlerFunc

type ApiHandlerFunc func(r *common.Request, backend extended.API, link models.LinkGenerator) (interface{}, error)

ApiHandlerFunc is the handler function signature for experimental API endpoints. It uses extended.API as the backend instead of access.API.

type Handler

type Handler struct {
	*common.HttpHandler
	// contains filtered or unexported fields
}

Handler wraps an ApiHandlerFunc with common HTTP handling (error handling, JSON responses).

func NewHandler

func NewHandler(
	logger zerolog.Logger,
	backend extended.API,
	handlerFunc ApiHandlerFunc,
	linkGenerator models.LinkGenerator,
	chain flow.Chain,
	maxRequestSize int64,
	maxResponseSize int64,
) *Handler

NewHandler creates a new experimental Handler.

func (*Handler) ServeHTTP

func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP handles the request: verify, decorate, execute handler, write JSON response.

Directories

Path Synopsis
* Flow Experimental API * * Experimental API endpoints for the Flow Access Node.
* Flow Experimental API * * Experimental API endpoints for the Flow Access Node.

Jump to

Keyboard shortcuts

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