Documentation ¶
Overview ¶
Copyright 2020 IOTA Stiftung SPDX-License-Identifier: Apache-2.0
Index ¶
- type ChainRecord
- func (r *ChainRecord) AddAccessNode(pubKey *cryptolib.PublicKey) (modified bool)
- func (r *ChainRecord) ChainID() isc.ChainID
- func (r *ChainRecord) Clone() onchangemap.Item[string, isc.ChainID]
- func (r *ChainRecord) ID() isc.ChainID
- func (r *ChainRecord) MarshalJSON() ([]byte, error)
- func (r *ChainRecord) RemoveAccessNode(pubKey *cryptolib.PublicKey) (modified bool)
- func (r *ChainRecord) UnmarshalJSON(bytes []byte) error
- type ChainRecordModifiedEvent
- type ChainRecordRegistryEvents
- type ChainRecordRegistryImpl
- func (p *ChainRecordRegistryImpl) ActivateChainRecord(chainID isc.ChainID) (*ChainRecord, error)
- func (p *ChainRecordRegistryImpl) AddChainRecord(chainRecord *ChainRecord) error
- func (p *ChainRecordRegistryImpl) ChainRecord(chainID isc.ChainID) (*ChainRecord, error)
- func (p *ChainRecordRegistryImpl) ChainRecords() ([]*ChainRecord, error)
- func (p *ChainRecordRegistryImpl) DeactivateChainRecord(chainID isc.ChainID) (*ChainRecord, error)
- func (p *ChainRecordRegistryImpl) DeleteChainRecord(chainID isc.ChainID) error
- func (p *ChainRecordRegistryImpl) Events() *ChainRecordRegistryEvents
- func (p *ChainRecordRegistryImpl) ForEachActiveChainRecord(consumer func(*ChainRecord) bool) error
- func (p *ChainRecordRegistryImpl) UpdateChainRecord(chainID isc.ChainID, callback func(*ChainRecord) bool) (*ChainRecord, error)
- type ChainRecordRegistryProvider
- type ConsensusStateRegistry
- type DKShareRegistryProvider
- type DKSharesRegistry
- type NodeIdentity
- type NodeIdentityProvider
- type TrustedPeersRegistryImpl
- func (p *TrustedPeersRegistryImpl) DistrustPeer(pubKey *cryptolib.PublicKey) (*peering.TrustedPeer, error)
- func (p *TrustedPeersRegistryImpl) IsTrustedPeer(pubKey *cryptolib.PublicKey) error
- func (p *TrustedPeersRegistryImpl) TrustPeer(name string, pubKey *cryptolib.PublicKey, peeringURL string) (*peering.TrustedPeer, error)
- func (p *TrustedPeersRegistryImpl) TrustedPeers() ([]*peering.TrustedPeer, error)
- func (p *TrustedPeersRegistryImpl) TrustedPeersByPubKeyOrName(pubKeysOrNames []string) ([]*peering.TrustedPeer, error)
- func (p *TrustedPeersRegistryImpl) TrustedPeersListener(callback func([]*peering.TrustedPeer)) context.CancelFunc
- type TrustedPeersRegistryProvider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChainRecord ¶ added in v0.1.0
type ChainRecord struct { Active bool AccessNodes []*cryptolib.PublicKey // contains filtered or unexported fields }
ChainRecord represents chain the node is participating in.
func NewChainRecord ¶ added in v1.0.3
func (*ChainRecord) AddAccessNode ¶ added in v1.0.3
func (r *ChainRecord) AddAccessNode(pubKey *cryptolib.PublicKey) (modified bool)
func (*ChainRecord) ChainID ¶ added in v0.1.0
func (r *ChainRecord) ChainID() isc.ChainID
func (*ChainRecord) Clone ¶ added in v1.0.3
func (r *ChainRecord) Clone() onchangemap.Item[string, isc.ChainID]
func (*ChainRecord) ID ¶ added in v1.0.3
func (r *ChainRecord) ID() isc.ChainID
func (*ChainRecord) MarshalJSON ¶ added in v1.0.3
func (r *ChainRecord) MarshalJSON() ([]byte, error)
func (*ChainRecord) RemoveAccessNode ¶ added in v1.0.3
func (r *ChainRecord) RemoveAccessNode(pubKey *cryptolib.PublicKey) (modified bool)
func (*ChainRecord) UnmarshalJSON ¶ added in v1.0.3
func (r *ChainRecord) UnmarshalJSON(bytes []byte) error
type ChainRecordModifiedEvent ¶ added in v1.0.3
type ChainRecordModifiedEvent struct {
ChainRecord *ChainRecord
}
ChainRecordModifiedEvent contains the updated information of a chain record.
type ChainRecordRegistryEvents ¶ added in v1.0.3
type ChainRecordRegistryEvents struct { // A ChainRecordModified event is triggered, when a chain record was modified. ChainRecordModified *event.Event[*ChainRecordModifiedEvent] }
ChainRecordRegistryEvents contain all events of the ChainRecordRegistry.
type ChainRecordRegistryImpl ¶ added in v1.0.3
type ChainRecordRegistryImpl struct {
// contains filtered or unexported fields
}
func NewChainRecordRegistryImpl ¶ added in v1.0.3
func NewChainRecordRegistryImpl(filePath string) (*ChainRecordRegistryImpl, error)
NewChainRecordRegistryImpl creates new instance of the chain registry implementation.
func (*ChainRecordRegistryImpl) ActivateChainRecord ¶ added in v1.0.3
func (p *ChainRecordRegistryImpl) ActivateChainRecord(chainID isc.ChainID) (*ChainRecord, error)
func (*ChainRecordRegistryImpl) AddChainRecord ¶ added in v1.0.3
func (p *ChainRecordRegistryImpl) AddChainRecord(chainRecord *ChainRecord) error
func (*ChainRecordRegistryImpl) ChainRecord ¶ added in v1.0.3
func (p *ChainRecordRegistryImpl) ChainRecord(chainID isc.ChainID) (*ChainRecord, error)
func (*ChainRecordRegistryImpl) ChainRecords ¶ added in v1.0.3
func (p *ChainRecordRegistryImpl) ChainRecords() ([]*ChainRecord, error)
func (*ChainRecordRegistryImpl) DeactivateChainRecord ¶ added in v1.0.3
func (p *ChainRecordRegistryImpl) DeactivateChainRecord(chainID isc.ChainID) (*ChainRecord, error)
func (*ChainRecordRegistryImpl) DeleteChainRecord ¶ added in v1.0.3
func (p *ChainRecordRegistryImpl) DeleteChainRecord(chainID isc.ChainID) error
func (*ChainRecordRegistryImpl) Events ¶ added in v1.0.3
func (p *ChainRecordRegistryImpl) Events() *ChainRecordRegistryEvents
func (*ChainRecordRegistryImpl) ForEachActiveChainRecord ¶ added in v1.0.3
func (p *ChainRecordRegistryImpl) ForEachActiveChainRecord(consumer func(*ChainRecord) bool) error
func (*ChainRecordRegistryImpl) UpdateChainRecord ¶ added in v1.0.3
func (p *ChainRecordRegistryImpl) UpdateChainRecord(chainID isc.ChainID, callback func(*ChainRecord) bool) (*ChainRecord, error)
UpdateChainRecord modifies a ChainRecord in the Registry.
type ChainRecordRegistryProvider ¶ added in v0.2.0
type ChainRecordRegistryProvider interface { Events() *ChainRecordRegistryEvents ChainRecord(chainID isc.ChainID) (*ChainRecord, error) ChainRecords() ([]*ChainRecord, error) ForEachActiveChainRecord(consumer func(*ChainRecord) bool) error AddChainRecord(chainRecord *ChainRecord) error DeleteChainRecord(chainID isc.ChainID) error UpdateChainRecord(chainID isc.ChainID, f func(*ChainRecord) bool) (*ChainRecord, error) ActivateChainRecord(chainID isc.ChainID) (*ChainRecord, error) DeactivateChainRecord(chainID isc.ChainID) (*ChainRecord, error) }
type ConsensusStateRegistry ¶ added in v1.0.3
type ConsensusStateRegistry struct {
// contains filtered or unexported fields
}
func NewConsensusStateRegistry ¶ added in v1.0.3
func NewConsensusStateRegistry(folderPath string, networkPrefix iotago.NetworkPrefix) (*ConsensusStateRegistry, error)
NewConsensusStateRegistry creates new instance of the consensus state registry implementation.
type DKShareRegistryProvider ¶ added in v0.2.0
type DKShareRegistryProvider interface {}
type DKSharesRegistry ¶ added in v1.0.3
type DKSharesRegistry struct {
// contains filtered or unexported fields
}
func NewDKSharesRegistry ¶ added in v1.0.3
func NewDKSharesRegistry(folderPath string, nodePrivKey *cryptolib.PrivateKey, networkPrefix iotago.NetworkPrefix) (*DKSharesRegistry, error)
NewDKSharesRegistry creates new instance of the DKShare registry implementation.
func (*DKSharesRegistry) LoadDKShare ¶ added in v1.0.3
func (*DKSharesRegistry) SaveDKShare ¶ added in v1.0.3
func (p *DKSharesRegistry) SaveDKShare(dkShare tcrypto.DKShare) error
type NodeIdentity ¶ added in v1.0.3
type NodeIdentity struct {
// contains filtered or unexported fields
}
func NewNodeIdentity ¶ added in v1.0.3
func NewNodeIdentity(nodeIdentity *cryptolib.KeyPair) *NodeIdentity
func (*NodeIdentity) NodeIdentity ¶ added in v1.0.3
func (p *NodeIdentity) NodeIdentity() *cryptolib.KeyPair
func (*NodeIdentity) NodePublicKey ¶ added in v1.0.3
func (p *NodeIdentity) NodePublicKey() *cryptolib.PublicKey
type NodeIdentityProvider ¶ added in v0.1.0
type TrustedPeersRegistryImpl ¶ added in v1.0.3
type TrustedPeersRegistryImpl struct {
// contains filtered or unexported fields
}
func NewTrustedPeersRegistryImpl ¶ added in v1.0.3
func NewTrustedPeersRegistryImpl(filePath string) (*TrustedPeersRegistryImpl, error)
NewTrustedPeersRegistryImpl creates new instance of the trusted peers registry implementation.
func (*TrustedPeersRegistryImpl) DistrustPeer ¶ added in v1.0.3
func (p *TrustedPeersRegistryImpl) DistrustPeer(pubKey *cryptolib.PublicKey) (*peering.TrustedPeer, error)
func (*TrustedPeersRegistryImpl) IsTrustedPeer ¶ added in v1.0.3
func (p *TrustedPeersRegistryImpl) IsTrustedPeer(pubKey *cryptolib.PublicKey) error
func (*TrustedPeersRegistryImpl) TrustPeer ¶ added in v1.0.3
func (p *TrustedPeersRegistryImpl) TrustPeer(name string, pubKey *cryptolib.PublicKey, peeringURL string) (*peering.TrustedPeer, error)
func (*TrustedPeersRegistryImpl) TrustedPeers ¶ added in v1.0.3
func (p *TrustedPeersRegistryImpl) TrustedPeers() ([]*peering.TrustedPeer, error)
func (*TrustedPeersRegistryImpl) TrustedPeersByPubKeyOrName ¶ added in v1.0.3
func (p *TrustedPeersRegistryImpl) TrustedPeersByPubKeyOrName(pubKeysOrNames []string) ([]*peering.TrustedPeer, error)
func (*TrustedPeersRegistryImpl) TrustedPeersListener ¶ added in v1.0.3
func (p *TrustedPeersRegistryImpl) TrustedPeersListener(callback func([]*peering.TrustedPeer)) context.CancelFunc
type TrustedPeersRegistryProvider ¶ added in v1.0.3
type TrustedPeersRegistryProvider interface { IsTrustedPeer(pubKey *cryptolib.PublicKey) error TrustPeer(name string, pubKey *cryptolib.PublicKey, accountURL string) (*peering.TrustedPeer, error) DistrustPeer(pubKey *cryptolib.PublicKey) (*peering.TrustedPeer, error) TrustedPeers() ([]*peering.TrustedPeer, error) TrustedPeersByPubKeyOrName(pubKeysOrNames []string) ([]*peering.TrustedPeer, error) TrustedPeersListener(callback func([]*peering.TrustedPeer)) context.CancelFunc }