ethereum

package
v0.0.0-...-cda9367 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EthChain

type EthChain struct {
	Config   chains.ChainConfig // The config of this chain
	Streamer Streamer           // The streamer of this chain
	Router   Router             // The router of this chain
}

EthChain streams the Ethereum blockchain and routes tx data packets

func NewEthChain

func NewEthChain(config chains.ChainConfig, streamer Streamer, router Router) EthChain

NewEthChain initializes a new instance of EthChain

func (EthChain) Start

func (ec EthChain) Start() error

Start starts the chain's Streamer and Router

type Router

type Router struct {
	// contains filtered or unexported fields
}

Router packages raw event data as Packets and relays them to the bridge

func NewRouter

func NewRouter(keybase *keybase.Keypair) Router

NewRouter initializes a new instance of Router

func (Router) Route

func (er Router) Route(eventData types.EventData) error

Route packages tx data as a packet and relays it to the bridge

type Streamer

type Streamer struct {
	WebsocketURL string
	// contains filtered or unexported fields
}

Streamer streams the Ethereum blockchain for application events

func NewStreamer

func NewStreamer(websocketURL string) Streamer

NewStreamer initializes a new instance of Streamer

func (Streamer) Start

func (es Streamer) Start(logs chan<- types.EventData, errs chan<- error)

Start initializes filtered subscriptions to each registered application

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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