Documentation ¶
Index ¶
- func NewChainService(logger *logger.Logger, chainsProvider chains.Provider, ...) interfaces.ChainService
- func NewCommitteeService(chainsProvider chains.Provider, networkProvider peering.NetworkProvider, ...) interfaces.CommitteeService
- func NewEVMService(chainService interfaces.ChainService, networkProvider peering.NetworkProvider, ...) interfaces.EVMService
- func NewMetricsService(chainProvider chains.Provider, ...) interfaces.MetricsService
- func NewNodeService(chainRecordRegistryProvider registry.ChainRecordRegistryProvider, ...) interfaces.NodeService
- func NewOffLedgerService(chainService interfaces.ChainService, networkProvider peering.NetworkProvider, ...) interfaces.OffLedgerService
- func NewRegistryService(chainsProvider chains.Provider, ...) interfaces.RegistryService
- func NewUserService(userManager *users.UserManager) interfaces.UserService
- func NewVMService(chainsProvider chains.Provider, ...) interfaces.VMService
- func ShouldBeProcessed(ch chain.ChainCore, req isc.OffLedgerRequest) error
- type ChainService
- func (c *ChainService) ActivateChain(chainID isc.ChainID) error
- func (c *ChainService) DeactivateChain(chainID isc.ChainID) error
- func (c *ChainService) GetAllChainIDs() ([]isc.ChainID, error)
- func (c *ChainService) GetChainByID(chainID isc.ChainID) chainpkg.Chain
- func (c *ChainService) GetChainInfoByChainID(chainID isc.ChainID) (*dto.ChainInfo, error)
- func (c *ChainService) GetContracts(chainID isc.ChainID) (dto.ContractsMap, error)
- func (c *ChainService) GetEVMChainID(chainID isc.ChainID) (uint16, error)
- func (c *ChainService) GetState(chainID isc.ChainID, stateKey []byte) (state []byte, err error)
- func (c *ChainService) HasChain(chainID isc.ChainID) bool
- func (c *ChainService) SetChainRecord(chainRecord *registry.ChainRecord) error
- func (c *ChainService) WaitForRequestProcessed(ctx context.Context, chainID isc.ChainID, requestID isc.RequestID, ...) (*isc.Receipt, *isc.VMError, error)
- type CommitteeService
- type DKGService
- type EVMService
- func (e *EVMService) GetRequestID(chainID isc.ChainID, hash string) (isc.RequestID, error)
- func (e *EVMService) HandleJSONRPC(chainID isc.ChainID, request *http.Request, response *echo.Response) error
- func (e *EVMService) HandleWebsocket(chainID isc.ChainID, request *http.Request, response *echo.Response) error
- type MetricsService
- func (c *MetricsService) GetChainConsensusPipeMetrics(chainID isc.ChainID) *models.ConsensusPipeMetrics
- func (c *MetricsService) GetChainConsensusWorkflowMetrics(chainID isc.ChainID) *models.ConsensusWorkflowMetrics
- func (c *MetricsService) GetChainMessageMetrics(chainID isc.ChainID) *dto.ChainMessageMetrics
- func (c *MetricsService) GetNodeMessageMetrics() *dto.NodeMessageMetrics
- type NodeService
- func (n *NodeService) AddAccessNode(chainID isc.ChainID, peerPubKeyOrName string) error
- func (n *NodeService) DeleteAccessNode(chainID isc.ChainID, peerPubKeyOrName string) error
- func (n *NodeService) SetNodeOwnerCertificate(publicKey *cryptolib.PublicKey, ownerAddress iotago.Address) ([]byte, error)
- func (n *NodeService) ShutdownNode()
- type OffLedgerService
- type PeeringService
- func (p *PeeringService) DistrustPeer(name string) (*dto.PeeringNodeIdentity, error)
- func (p *PeeringService) GetIdentity() *dto.PeeringNodeIdentity
- func (p *PeeringService) GetRegisteredPeers() []*dto.PeeringNodeStatus
- func (p *PeeringService) GetTrustedPeers() ([]*dto.PeeringNodeIdentity, error)
- func (p *PeeringService) IsPeerTrusted(publicKey *cryptolib.PublicKey) error
- func (p *PeeringService) TrustPeer(name string, publicKey *cryptolib.PublicKey, peeringURL string) (*dto.PeeringNodeIdentity, error)
- type RegistryService
- type UserService
- func (u *UserService) AddUser(username, password string, permissions []string) error
- func (u *UserService) DeleteUser(username string) error
- func (u *UserService) GetUser(username string) (*models.User, error)
- func (u *UserService) GetUsers() []*models.User
- func (u *UserService) UpdateUserPassword(username, password string) error
- func (u *UserService) UpdateUserPermissions(username string, permissions []string) error
- type VMService
- func (v *VMService) CallView(chainState state.State, chain chainpkg.Chain, ...) (dict.Dict, error)
- func (v *VMService) CallViewByChainID(chainID isc.ChainID, contractName, functionName isc.Hname, params dict.Dict) (dict.Dict, error)
- func (v *VMService) GetReceipt(chainID isc.ChainID, requestID isc.RequestID) (*isc.Receipt, *isc.VMError, error)
- func (v *VMService) ParseReceipt(chain chainpkg.Chain, receipt *blocklog.RequestReceipt) (*isc.Receipt, *isc.VMError, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewChainService ¶
func NewChainService(logger *logger.Logger, chainsProvider chains.Provider, chainMetricsProvider *metrics.ChainMetricsProvider, chainRecordRegistryProvider registry.ChainRecordRegistryProvider, vmService interfaces.VMService) interfaces.ChainService
func NewCommitteeService ¶
func NewCommitteeService(chainsProvider chains.Provider, networkProvider peering.NetworkProvider, dkShareRegistryProvider registry.DKShareRegistryProvider) interfaces.CommitteeService
func NewEVMService ¶
func NewEVMService( chainService interfaces.ChainService, networkProvider peering.NetworkProvider, pub *publisher.Publisher, metrics *metrics.ChainMetricsProvider, log *logger.Logger, ) interfaces.EVMService
func NewMetricsService ¶
func NewMetricsService(chainProvider chains.Provider, chainMetricsProvider *metrics.ChainMetricsProvider) interfaces.MetricsService
func NewNodeService ¶
func NewNodeService(chainRecordRegistryProvider registry.ChainRecordRegistryProvider, nodeOwnerAddresses []string, nodeIdentityProvider registry.NodeIdentityProvider, shutdownHandler *shutdown.ShutdownHandler, trustedNetworkManager peering.TrustedNetworkManager) interfaces.NodeService
func NewOffLedgerService ¶
func NewOffLedgerService(chainService interfaces.ChainService, networkProvider peering.NetworkProvider, requestCacheTTL time.Duration) interfaces.OffLedgerService
func NewRegistryService ¶
func NewRegistryService(chainsProvider chains.Provider, chainRecordRegistryProvider registry.ChainRecordRegistryProvider) interfaces.RegistryService
func NewUserService ¶
func NewUserService(userManager *users.UserManager) interfaces.UserService
func NewVMService ¶
func NewVMService(chainsProvider chains.Provider, chainRecordRegistryProvider registry.ChainRecordRegistryProvider) interfaces.VMService
func ShouldBeProcessed ¶
func ShouldBeProcessed(ch chain.ChainCore, req isc.OffLedgerRequest) error
implemented this way so we can re-use the same state, and avoid the overhead of calling views
Types ¶
type ChainService ¶
type ChainService struct {
// contains filtered or unexported fields
}
func (*ChainService) ActivateChain ¶
func (c *ChainService) ActivateChain(chainID isc.ChainID) error
func (*ChainService) DeactivateChain ¶
func (c *ChainService) DeactivateChain(chainID isc.ChainID) error
func (*ChainService) GetAllChainIDs ¶
func (c *ChainService) GetAllChainIDs() ([]isc.ChainID, error)
func (*ChainService) GetChainByID ¶
func (c *ChainService) GetChainByID(chainID isc.ChainID) chainpkg.Chain
func (*ChainService) GetChainInfoByChainID ¶
func (*ChainService) GetContracts ¶
func (c *ChainService) GetContracts(chainID isc.ChainID) (dto.ContractsMap, error)
func (*ChainService) GetEVMChainID ¶
func (c *ChainService) GetEVMChainID(chainID isc.ChainID) (uint16, error)
func (*ChainService) SetChainRecord ¶
func (c *ChainService) SetChainRecord(chainRecord *registry.ChainRecord) error
type CommitteeService ¶
type CommitteeService struct {
// contains filtered or unexported fields
}
func (*CommitteeService) GetCommitteeInfo ¶
func (c *CommitteeService) GetCommitteeInfo(chainID isc.ChainID) (*dto.ChainNodeInfo, error)
func (*CommitteeService) GetPublicKey ¶
func (c *CommitteeService) GetPublicKey() *cryptolib.PublicKey
type DKGService ¶
type DKGService struct {
// contains filtered or unexported fields
}
func NewDKGService ¶
func NewDKGService(dkShareRegistryProvider registry.DKShareRegistryProvider, dkgNodeProvider dkg.NodeProvider, trustedNetworkManager peering.TrustedNetworkManager) *DKGService
func (*DKGService) GenerateDistributedKey ¶
func (d *DKGService) GenerateDistributedKey(peerPubKeysOrNames []string, threshold uint16, timeout time.Duration) (*models.DKSharesInfo, error)
func (*DKGService) GetShares ¶
func (d *DKGService) GetShares(sharedAddress iotago.Address) (*models.DKSharesInfo, error)
type EVMService ¶
type EVMService struct {
// contains filtered or unexported fields
}
func (*EVMService) GetRequestID ¶
func (*EVMService) HandleJSONRPC ¶
func (*EVMService) HandleWebsocket ¶
type MetricsService ¶
type MetricsService struct {
// contains filtered or unexported fields
}
func (*MetricsService) GetChainConsensusPipeMetrics ¶
func (c *MetricsService) GetChainConsensusPipeMetrics(chainID isc.ChainID) *models.ConsensusPipeMetrics
func (*MetricsService) GetChainConsensusWorkflowMetrics ¶
func (c *MetricsService) GetChainConsensusWorkflowMetrics(chainID isc.ChainID) *models.ConsensusWorkflowMetrics
func (*MetricsService) GetChainMessageMetrics ¶
func (c *MetricsService) GetChainMessageMetrics(chainID isc.ChainID) *dto.ChainMessageMetrics
func (*MetricsService) GetNodeMessageMetrics ¶
func (c *MetricsService) GetNodeMessageMetrics() *dto.NodeMessageMetrics
type NodeService ¶
type NodeService struct {
// contains filtered or unexported fields
}
func (*NodeService) AddAccessNode ¶
func (n *NodeService) AddAccessNode(chainID isc.ChainID, peerPubKeyOrName string) error
func (*NodeService) DeleteAccessNode ¶
func (n *NodeService) DeleteAccessNode(chainID isc.ChainID, peerPubKeyOrName string) error
func (*NodeService) SetNodeOwnerCertificate ¶
func (*NodeService) ShutdownNode ¶
func (n *NodeService) ShutdownNode()
type OffLedgerService ¶
type OffLedgerService struct {
// contains filtered or unexported fields
}
func (*OffLedgerService) EnqueueOffLedgerRequest ¶
func (c *OffLedgerService) EnqueueOffLedgerRequest(chainID isc.ChainID, binaryRequest []byte) error
func (*OffLedgerService) ParseRequest ¶
func (c *OffLedgerService) ParseRequest(binaryRequest []byte) (isc.OffLedgerRequest, error)
type PeeringService ¶
type PeeringService struct {
// contains filtered or unexported fields
}
func NewPeeringService ¶
func NewPeeringService(chainsProvider chains.Provider, networkProvider peering.NetworkProvider, trustedNetworkManager peering.TrustedNetworkManager) *PeeringService
func (*PeeringService) DistrustPeer ¶
func (p *PeeringService) DistrustPeer(name string) (*dto.PeeringNodeIdentity, error)
func (*PeeringService) GetIdentity ¶
func (p *PeeringService) GetIdentity() *dto.PeeringNodeIdentity
func (*PeeringService) GetRegisteredPeers ¶
func (p *PeeringService) GetRegisteredPeers() []*dto.PeeringNodeStatus
func (*PeeringService) GetTrustedPeers ¶
func (p *PeeringService) GetTrustedPeers() ([]*dto.PeeringNodeIdentity, error)
func (*PeeringService) IsPeerTrusted ¶
func (p *PeeringService) IsPeerTrusted(publicKey *cryptolib.PublicKey) error
func (*PeeringService) TrustPeer ¶
func (p *PeeringService) TrustPeer(name string, publicKey *cryptolib.PublicKey, peeringURL string) (*dto.PeeringNodeIdentity, error)
type RegistryService ¶
type RegistryService struct {
// contains filtered or unexported fields
}
func (*RegistryService) GetChainRecordByChainID ¶
func (c *RegistryService) GetChainRecordByChainID(chainID isc.ChainID) (*registry.ChainRecord, error)
type UserService ¶
type UserService struct {
// contains filtered or unexported fields
}
func (*UserService) AddUser ¶
func (u *UserService) AddUser(username, password string, permissions []string) error
func (*UserService) DeleteUser ¶
func (u *UserService) DeleteUser(username string) error
func (*UserService) GetUsers ¶
func (u *UserService) GetUsers() []*models.User
func (*UserService) UpdateUserPassword ¶
func (u *UserService) UpdateUserPassword(username, password string) error
func (*UserService) UpdateUserPermissions ¶
func (u *UserService) UpdateUserPermissions(username string, permissions []string) error
type VMService ¶
type VMService struct {
// contains filtered or unexported fields
}
func (*VMService) CallViewByChainID ¶
func (*VMService) GetReceipt ¶
Click to show internal directories.
Click to hide internal directories.