Documentation ¶
Index ¶
- type PrivateRegistarAPI
- func (api *PrivateRegistarAPI) Register(sender common.Address, addr common.Address, contentHashHex string) (bool, error)
- func (api *PrivateRegistarAPI) RegisterUrl(sender common.Address, contentHashHex string, url string) (bool, error)
- func (api *PrivateRegistarAPI) SaveInfo(info *compiler.ContractInfo, filename string) (contenthash common.Hash, err error)
- func (api *PrivateRegistarAPI) SetGlobalRegistrar(namereg string, from common.Address) (string, error)
- func (api *PrivateRegistarAPI) SetHashReg(hashreg string, from common.Address) (string, error)
- func (api *PrivateRegistarAPI) SetUrlHint(hashreg string, from common.Address) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PrivateRegistarAPI ¶ added in v1.4.2
type PrivateRegistarAPI struct {
// contains filtered or unexported fields
}
PrivateRegistarAPI offers various functions to access the Ethereum registry.
func NewPrivateRegistarAPI ¶ added in v1.4.2
func NewPrivateRegistarAPI(config *core.ChainConfig, bc *core.BlockChain, chainDb ethdb.Database, txPool *core.TxPool, am *accounts.Manager) *PrivateRegistarAPI
NewPrivateRegistarAPI creates a new PrivateRegistarAPI instance.
func (*PrivateRegistarAPI) Register ¶ added in v1.4.2
func (api *PrivateRegistarAPI) Register(sender common.Address, addr common.Address, contentHashHex string) (bool, error)
Register registers a new content hash in the registry.
func (*PrivateRegistarAPI) RegisterUrl ¶ added in v1.4.2
func (api *PrivateRegistarAPI) RegisterUrl(sender common.Address, contentHashHex string, url string) (bool, error)
RegisterUrl registers a new url in the registry.
func (*PrivateRegistarAPI) SaveInfo ¶ added in v1.4.2
func (api *PrivateRegistarAPI) SaveInfo(info *compiler.ContractInfo, filename string) (contenthash common.Hash, err error)
SaveInfo stores contract information on the local file system.
func (*PrivateRegistarAPI) SetGlobalRegistrar ¶ added in v1.4.2
func (api *PrivateRegistarAPI) SetGlobalRegistrar(namereg string, from common.Address) (string, error)
SetGlobalRegistrar allows clients to set the global registry for the node. This method can be used to deploy a new registry. First zero out the current address by calling the method with namereg = '0x0' and then call this method again with ” as namereg. This will submit a transaction to the network which will deploy a new registry on execution. The TX hash is returned. When called with namereg ” and the current address is not zero the current global is address is returned..
func (*PrivateRegistarAPI) SetHashReg ¶ added in v1.4.2
SetHashReg queries the registry for a hash.
func (*PrivateRegistarAPI) SetUrlHint ¶ added in v1.4.2
SetUrlHint queries the registry for an url.