services

package
v1.5.3-alpha.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 19, 2025 License: Apache-2.0 Imports: 44 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotInCommittee = errors.New("this node is not in the committee for the chain")

Functions

func NewChainService

func NewChainService(
	logger *logger.Logger,
	chainsProvider chains.Provider,
	chainMetricsProvider *metrics.ChainMetricsProvider,
	chainRecordRegistryProvider registry.ChainRecordRegistryProvider,
) interfaces.ChainService

func NewCommitteeService

func NewCommitteeService(chainsProvider chains.Provider, networkProvider peering.NetworkProvider, dkShareRegistryProvider registry.DKShareRegistryProvider) interfaces.CommitteeService

func NewEVMService

func NewEVMService(
	chainsProvider chains.Provider,
	chainService interfaces.ChainService,
	networkProvider peering.NetworkProvider,
	pub *publisher.Publisher,
	indexDbPath string,
	metrics *metrics.ChainMetricsProvider,
	jsonrpcParams *jsonrpc.Parameters,
	log *logger.Logger,
) interfaces.EVMService

func NewMetricsService

func NewMetricsService(chainProvider chains.Provider, chainMetricsProvider *metrics.ChainMetricsProvider) interfaces.MetricsService

func NewNodeService

func NewNodeService(
	chainRecordRegistryProvider registry.ChainRecordRegistryProvider,
	nodeIdentityProvider registry.NodeIdentityProvider,
	chainsProvider chains.Provider,
	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

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, error)

func (*ChainService) GetChainInfoByChainID

func (c *ChainService) GetChainInfoByChainID(chainID isc.ChainID, blockIndexOrTrieRoot string) (*dto.ChainInfo, error)

func (*ChainService) GetContracts

func (c *ChainService) GetContracts(chainID isc.ChainID, blockIndexOrTrieRoot string) (dto.ContractsMap, error)

func (*ChainService) GetEVMChainID

func (c *ChainService) GetEVMChainID(chainID isc.ChainID, blockIndexOrTrieRoot string) (uint16, error)

func (*ChainService) GetState

func (c *ChainService) GetState(chainID isc.ChainID, stateKey []byte) (state []byte, err error)

func (*ChainService) HasChain

func (c *ChainService) HasChain(chainID isc.ChainID) bool

func (*ChainService) SetChainRecord

func (c *ChainService) SetChainRecord(chainRecord *registry.ChainRecord) error

func (*ChainService) WaitForRequestProcessed

func (c *ChainService) WaitForRequestProcessed(ctx context.Context, chainID isc.ChainID, requestID isc.RequestID, waitForL1Confirmation bool, timeout time.Duration) (*isc.Receipt, 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) HandleJSONRPC

func (e *EVMService) HandleJSONRPC(chainID isc.ChainID, request *http.Request, response *echo.Response) error

func (*EVMService) HandleWebsocket

func (e *EVMService) HandleWebsocket(ctx context.Context, chainID isc.ChainID, echoCtx echo.Context) error

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) GetMaxChainConfirmedStateLag

func (c *MetricsService) GetMaxChainConfirmedStateLag() uint32

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) NodeOwnerCertificate

func (n *NodeService) NodeOwnerCertificate() []byte

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) GetUser

func (u *UserService) GetUser(username string) (*models.User, 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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL