Documentation ¶
Index ¶
- type NodeDomain
- func (nd *NodeDomain) Authorize(nodeRef core.RecordRef, seed []byte, signatureRaw []byte) (pubKey string, roles []core.NodeRole, errS error)
- func (nd *NodeDomain) IsAuthorized(nodeRef core.RecordRef, seed []byte, signatureRaw []byte) (bool, error)
- func (nd *NodeDomain) RegisterNode(publicKey string, numberOfBootstrapNodes int, majorityRule int, roles []string, ...) ([]byte, error)
- func (nd *NodeDomain) RemoveNode(nodeRef core.RecordRef) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NodeDomain ¶
type NodeDomain struct {
foundation.BaseContract
}
NodeDomain holds noderecords
func (*NodeDomain) Authorize ¶
func (nd *NodeDomain) Authorize(nodeRef core.RecordRef, seed []byte, signatureRaw []byte) (pubKey string, roles []core.NodeRole, errS error)
Authorize checks node and returns node info
func (*NodeDomain) IsAuthorized ¶
func (nd *NodeDomain) IsAuthorized(nodeRef core.RecordRef, seed []byte, signatureRaw []byte) (bool, error)
IsAuthorized checks is signature correct
func (*NodeDomain) RegisterNode ¶
func (nd *NodeDomain) RegisterNode(publicKey string, numberOfBootstrapNodes int, majorityRule int, roles []string, ip string) ([]byte, error)
RegisterNode registers node in system
func (*NodeDomain) RemoveNode ¶
func (nd *NodeDomain) RemoveNode(nodeRef core.RecordRef) error
RemoveNode deletes node from registry
Click to show internal directories.
Click to hide internal directories.