tx

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

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

func NewHandler

func NewHandler(storage Storage) *Handler

func (*Handler) GetTxByHashHandler

func (h *Handler) GetTxByHashHandler(
	_ *metadata.Metadata,
	params []any,
) (any, *spec.BaseJSONError)

func (*Handler) GetTxHandler

func (h *Handler) GetTxHandler(
	_ *metadata.Metadata,
	params []any,
) (any, *spec.BaseJSONError)

type Storage

type Storage interface {
	// GetTx returns specified tx from permanent storage
	GetTx(uint64, uint32) (*types.TxResult, error)

	// GetTxByHash fetches the tx using the transaction hash
	GetTxByHash(txHash string) (*types.TxResult, error)
}

Jump to

Keyboard shortcuts

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