mempoolevent

package
v0.106.2 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2024 License: MIT Imports: 3 Imported by: 11

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	Type Type
	Tx   *transaction.Transaction
	Data any
}

Event represents one of mempool events: transaction was added or removed from the mempool.

type Type

type Type byte

Type represents mempool event type.

const (
	// TransactionAdded marks transaction addition mempool event.
	TransactionAdded Type = 0x01
	// TransactionRemoved marks transaction removal mempool event.
	TransactionRemoved Type = 0x02
)

func GetEventTypeFromString

func GetEventTypeFromString(s string) (Type, error)

GetEventTypeFromString converts the input string into the Type if it's possible.

func (Type) MarshalJSON

func (e Type) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface.

func (Type) String

func (e Type) String() string

String is a Stringer implementation.

func (*Type) UnmarshalJSON

func (e *Type) UnmarshalJSON(b []byte) error

UnmarshalJSON implements the json.Unmarshaler interface.

Jump to

Keyboard shortcuts

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