Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Chains denotes all valid chains Chains = map[string]*Config{ "eth": { ID: Ethereum, Name: "mainnet", Type: EVM, Test: false, }, "ropsten": { ID: Ropsten, Name: "ropsten", Type: EVM, Test: true, }, "rinkeby": { ID: Rinkeby, Name: "rinkeby", Type: EVM, Test: true, }, "kovan": { ID: Kovan, Name: "kovan", Type: EVM, Test: true, }, "localhost": { ID: LocalHost, Name: "localhost", Type: EVM, Test: true, }, } )
View Source
var ( // ErrChain is thrown on an unsupported chain ErrChain = errors.New("invalid chain") )
Functions ¶
This section is empty.
Types ¶
type Chain ¶
type Chain interface { // Open the chain Open() error // Close the chain Close() error // Run the on chain protocol Run(chan node.Peer) error // Join the provider network Join([]byte, []byte) error // Peers queries the provider network for a list of peers Peers() ([]node.Peer, error) }
Chain defines the interface for a generic chain
type Config ¶
type Config struct { ID ID // chain id Name string // canonical name Type Type // underlying runtime Test bool // true if testnet }
Config represents a set of chain parameters
Click to show internal directories.
Click to hide internal directories.