listener

package
v0.2.13 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2021 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	SendEvent
	Hash    string      `json:"hash,omitempty"`
	From    string      `json:"from,omitempty"`
	Fee     float64     `json:"fee,omitempty"`
	FeeCoin string      `json:"feeCoin,omitempty"`
	Type    EventType   `json:"type,omitempty"`
	Items   []SendEvent `json:"items,omitempty"`
	Error   error       `json:"error,omitempty"`
}

type EventConsumer

type EventConsumer interface {
	Consume(event Event)
}

type EventConsumerFunc

type EventConsumerFunc func(event Event)

func (EventConsumerFunc) Consume

func (f EventConsumerFunc) Consume(event Event)

type EventType

type EventType string
const (
	TypeApprove   EventType = "approve"
	TypeBuy       EventType = "buy"
	TypeSend      EventType = "send"
	TypeMultisend EventType = "multisend"
)

type SendEvent

type SendEvent struct {
	Amount float64 `json:"amount,omitempty"`
	Coin   string  `json:"coin,omitempty"`
	To     string  `json:"to,omitempty"`
	ToCoin string  `json:"toCoin,omitempty"`
}

Jump to

Keyboard shortcuts

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