Documentation ¶
Index ¶
Constants ¶
View Source
const SignatureKey = "ethereum"
View Source
const WormholeEventType = "wormhole"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Signer ¶
type Signer struct {
// contains filtered or unexported fields
}
Signer signs Ethereum log messages using Ethereum signature.
type WormholeListener ¶
type WormholeListener struct {
// contains filtered or unexported fields
}
WormholeListener listens to particular logs on Ethereum compatible blockchain and converts them into event messages.
func NewWormholeListener ¶
func NewWormholeListener(cfg WormholeListenerConfig) *WormholeListener
NewWormholeListener returns a new instance of the WormholeListener struct.
func (*WormholeListener) Events ¶
func (l *WormholeListener) Events() chan *messages.Event
Events implements the publisher.Listener interface.
type WormholeListenerConfig ¶
type WormholeListenerConfig struct { // Client is an instance of Ethereum RPC client. Client EthClient // Addresses is a list of contracts from which logs will be fetched. Addresses []ethereum.Address // Interval specifies how often listener should check for new logs. Interval time.Duration // BlocksBehind specifies the distance between the newest block on the // blockchain and the newest block from which logs are to be taken. This // parameter can be used to ensure sufficient block confirmations. BlocksBehind int // MaxBlocks specifies how from many blocks logs can be fetched at once. MaxBlocks int // Logger is an instance of a logger. Logger is used mostly to report // recoverable errors. Logger log.Logger }
WormholeListenerConfig contains a configuration options for NewWormholeListener.
Click to show internal directories.
Click to hide internal directories.