Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func HTTPNotificationHandler ¶
func HTTPNotificationHandler(h NotificationHandler, f string) fasthttp.RequestHandler
func IsAllowlisted ¶ added in v1.0.0
func New ¶
func New(listen string, path string, handler NotificationHandler) *server
Types ¶
type AddressData ¶
type AddressData struct { Network string `json:"network"` Address string `json:"address"` BalanceChange decimal.Decimal `json:"balance_change"` AmountSent decimal.Decimal `json:"amount_sent"` AmountReceived decimal.Decimal `json:"amount_received"` TxId string `json:"txid"` Confirmations int `json:"confirmations"` IsGreen bool `json:"is_green"` }
type Notification ¶
type Notification struct { Id string `json:"notification_id"` DeliveryAttempt int `json:"delivery_attempt"` CreatedAt int `json:"created_at"` Type string `json:"type"` RawData json.RawMessage `json:"data"` }
func ParseNotification ¶
func ParseNotification(jsonstr []byte) (*Notification, error)
func (*Notification) AddressData ¶
func (n *Notification) AddressData() (*AddressData, error)
type NotificationHandler ¶
type NotificationHandler func(*Notification) bool
Click to show internal directories.
Click to hide internal directories.