registry

package
v0.0.0-...-97177e4 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2018 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DevKey          = mustKey("476e921a198fd2744f270da0bb80dce2dab24e9105473d9bb19e540fcbd04bb0")
	DevAddr         = crypto.PubkeyToAddress(DevKey.PublicKey)
	DevContractAddr = common.HexToAddress("0x241be96854Fc2f0172dAA660EE7A14410957C15d")
)
View Source
var DefaultConfig = Config{
	Key:          DevKey,
	ContractAddr: DevContractAddr,
}

Functions

func Deploy

func Deploy(url string, config Config) (common.Address, error)

Types

type Client

type Client struct {
	*ethclient.Client
	// contains filtered or unexported fields
}

func NewClient

func NewClient(client *rpc.Client, config Config) (*Client, error)

func (*Client) Close

func (c *Client) Close()

func (*Client) Graph

func (c *Client) Graph(kordID common.Address) (common.Hash, error)

func (*Client) SetGraph

func (c *Client) SetGraph(graph common.Hash, sig []byte) error

func (*Client) SubscribeGraph

func (c *Client) SubscribeGraph(kordID common.Address, updates chan common.Hash) (Subscription, error)

type Config

type Config struct {
	Key          *ecdsa.PrivateKey
	ContractAddr common.Address
}

type Registry

type Registry interface {
	Graph(kordID common.Address) (common.Hash, error)
	SetGraph(graph common.Hash, sig []byte) error
	SubscribeGraph(kordID common.Address, updates chan common.Hash) (Subscription, error)
}

type Subscription

type Subscription interface {
	Close() error
	Err() error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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