blockchain

package
v0.0.0-...-967d326 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2019 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 Client

type Client interface {
	Sender
	Listener
}

Client is an interface to Ethereum

type Listener

type Listener interface {
	// Notify will add a Notification in the list
	// Every notification will be triggered
	AddNotification(Notification)
}

Listener is an abstract interface for object able to forward a stream of mined transaction

type Notification

type Notification func(Transaction)

A Notification is a function that can be triggered

A notification is typically very quick to execute. If you want to apply complex and long processing for listened transaction. We strongly that you leave those processing to another go-routine.

type Sender

type Sender interface {
	SendTransaction(Transaction) error
}

Sender is an abstract interface for object able to send transaction on a blockchain

It is also required to contain the signature logic

type Transaction

type Transaction interface {
	// General purpose getter, they have a sense
	// whatever the blockchain
	GetTo() string
	GetData() []byte
}

Transaction is a generic interface carried by a blockchain client

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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