Documentation ¶
Index ¶
- Constants
- Variables
- type Backend
- type Resolver
- func (self *Resolver) ContentHashToUrl(chash common.Hash) (uri string, err error)
- func (self *Resolver) CreateContracts(addr common.Address) (err error)
- func (self *Resolver) KeyToContentHash(khash common.Hash) (chash common.Hash, err error)
- func (self *Resolver) KeyToUrl(key common.Hash) (uri string, hash common.Hash, err error)
- func (self *Resolver) Register(address common.Address, codehash, dochash common.Hash, url string) (txh string, err error)
- func (self *Resolver) RegisterContentHash(address common.Address, codehash, dochash common.Hash) (txh string, err error)
- func (self *Resolver) RegisterUrl(address common.Address, hash common.Hash, url string) (txh string, err error)
- func (self *Resolver) SetOwner(address common.Address) (txh string, err error)
Constants ¶
const ( ContractCodeURLhint = "" /* 412-byte string literal not displayed */ ContractCodeHashReg = "" /* 330-byte string literal not displayed */ )
Variables ¶
var UrlHintContractAddress, HashRegContractAddress string
// contract addresses will be hardcoded after they're created
Functions ¶
This section is empty.
Types ¶
type Resolver ¶
type Resolver struct {
// contains filtered or unexported fields
}
func (*Resolver) ContentHashToUrl ¶
retrieves the url-hint for the content hash - if we use content addressed storage, this step is no longer necessary
func (*Resolver) CreateContracts ¶
for testing and play temporarily ideally the HashReg and UrlHint contracts should be in the genesis block if we got build-in support for natspec/contract info there should be only one of these officially endorsed addresses as constants TODO: could get around this with namereg, check
func (*Resolver) KeyToContentHash ¶
resolution is costless non-transactional implemented as direct retrieval from db
func (*Resolver) RegisterContentHash ¶
func (self *Resolver) RegisterContentHash(address common.Address, codehash, dochash common.Hash) (txh string, err error)
registers some content hash to a key/code hash e.g., the contract Info combined Json Doc's ContentHash to CodeHash of a contract or hash of a domain kept
func (*Resolver) RegisterUrl ¶
func (self *Resolver) RegisterUrl(address common.Address, hash common.Hash, url string) (txh string, err error)
registers a url to a content hash so that the content can be fetched address is used as sender for the transaction and will be the owner of a new registry entry on first time use FIXME: silently doing nothing if sender is not the owner note that with content addressed storage, this step is no longer necessary it could be purely