2017-10-23 15:56:29 +00:00
|
|
|
package core
|
|
|
|
|
2017-12-04 18:54:33 +00:00
|
|
|
import "math/big"
|
|
|
|
|
2017-10-23 15:56:29 +00:00
|
|
|
type Blockchain interface {
|
2017-11-06 20:36:12 +00:00
|
|
|
GetBlockByNumber(blockNumber int64) Block
|
2017-11-02 11:41:24 +00:00
|
|
|
SubscribeToBlocks(blocks chan Block)
|
|
|
|
StartListening()
|
2017-11-03 13:54:32 +00:00
|
|
|
StopListening()
|
2017-11-30 22:15:32 +00:00
|
|
|
GetContract(contractHash string) (Contract, error)
|
2017-12-04 18:54:33 +00:00
|
|
|
GetAttribute(contract Contract, attributeName string, blockNumber *big.Int) (interface{}, error)
|
2017-10-23 15:56:29 +00:00
|
|
|
}
|