Documentation
¶
Overview ¶
Package registry provides a business specific API to the local database.
Index ¶
- Constants
- func GetFeeDestination(scaddr *address.Address) address.Address
- func InitFlags()
- func InitLogger()
- func SaveChainRecord(bd *ChainRecord) error
- type ChainRecord
- func ActivateChainRecord(chainID *coretypes.ChainID) (*ChainRecord, error)
- func DeactivateChainRecord(chainID *coretypes.ChainID) (*ChainRecord, error)
- func GetChainRecord(chainID *coretypes.ChainID) (*ChainRecord, error)
- func GetChainRecords() ([]*ChainRecord, error)
- func UpdateChainRecord(chainID *coretypes.ChainID, f func(*ChainRecord) bool) (*ChainRecord, error)
- type Impl
- func (r *Impl) GetBlob(h hashing.HashValue) ([]byte, bool, error)
- func (r *Impl) GetNodeIdentity() (*key.Pair, error)
- func (r *Impl) GetNodePublicKey() (kyber.Point, error)
- func (r *Impl) HasBlob(h hashing.HashValue) (bool, error)
- func (r *Impl) LoadDKShare(sharedAddress *address.Address) (*tcrypto.DKShare, error)
- func (r *Impl) PutBlob(data []byte, ttl ...time.Duration) (hashing.HashValue, error)
- func (r *Impl) SaveDKShare(dkShare *tcrypto.DKShare) error
- type NodeIdentityProvider
Constants ¶
View Source
const (
// CfgBindAddress defines the config flag of the web API binding address.
CfgRewardAddress = "reward.address"
)
Variables ¶
This section is empty.
Functions ¶
func GetFeeDestination ¶ added in v0.1.0
func InitLogger ¶
func InitLogger()
func SaveChainRecord ¶ added in v0.1.0
func SaveChainRecord(bd *ChainRecord) error
Types ¶
type ChainRecord ¶ added in v0.1.0
type ChainRecord struct { ChainID coretypes.ChainID Color balance.Color // origin tx hash CommitteeNodes []string // "host_addr:port" Active bool }
ChainRecord is a minimum data needed to load a committee for the chain it is up to the node (not smart contract) to check authorizations to create/update this record
func ActivateChainRecord ¶ added in v0.1.0
func ActivateChainRecord(chainID *coretypes.ChainID) (*ChainRecord, error)
func DeactivateChainRecord ¶ added in v0.1.0
func DeactivateChainRecord(chainID *coretypes.ChainID) (*ChainRecord, error)
func GetChainRecord ¶ added in v0.1.0
func GetChainRecord(chainID *coretypes.ChainID) (*ChainRecord, error)
func GetChainRecords ¶ added in v0.1.0
func GetChainRecords() ([]*ChainRecord, error)
func UpdateChainRecord ¶ added in v0.1.0
func UpdateChainRecord(chainID *coretypes.ChainID, f func(*ChainRecord) bool) (*ChainRecord, error)
func (*ChainRecord) String ¶ added in v0.1.0
func (bd *ChainRecord) String() string
type Impl ¶ added in v0.1.0
type Impl struct {
// contains filtered or unexported fields
}
Impl is just a placeholder to implement all interfaces needed by different components. Each of the interfaces are implemented in the corresponding file in this package.
func NewRegistry ¶ added in v0.1.0
func NewRegistry(suite tcrypto.Suite, log *logger.Logger, dbp ...*dbprovider.DBProvider) *Impl
New creates new instance of the registry implementation.
func (*Impl) GetNodeIdentity ¶ added in v0.1.0
GetNodeIdentity implements NodeIdentityProvider.
func (*Impl) GetNodePublicKey ¶ added in v0.1.0
GetNodePublicKey implements NodeIdentityProvider.
func (*Impl) LoadDKShare ¶ added in v0.1.0
LoadDKShare implements dkg.RegistryProvider.
Click to show internal directories.
Click to hide internal directories.