mempoolevent

package
v0.103.1 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2023 License: MIT Imports: 3 Imported by: 14

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