ipld-eth-server/pkg/core/blockchain.go
2017-12-22 11:42:35 -06:00

16 lines
475 B
Go

package core
import "math/big"
type Blockchain interface {
GetBlockByNumber(blockNumber int64) Block
LastBlock() *big.Int
Node() Node
SubscribeToBlocks(blocks chan Block)
StartListening()
StopListening()
GetAttributes(contract Contract) (ContractAttributes, error)
GetAttribute(contract Contract, attributeName string, blockNumber *big.Int) (interface{}, error)
GetLogs(contract Contract, startingBlockNumber *big.Int, endingBlockNumber *big.Int) ([]Log, error)
}