interfaces

package
v0.6.0-alpha.7 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2023 License: Apache-2.0 Imports: 16 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 (
	ErrUnableToGetLatestState = errors.New("unable to get latest state")
	ErrUnableToGetReceipt     = errors.New("unable to get request receipt from block state")
	ErrAlreadyProcessed       = errors.New("request already processed")
	ErrNoBalanceOnAccount     = errors.New("no balance on account")
	ErrInvalidNonce           = errors.New("invalid nonce")
	ErrChainNotFound          = errors.New("chain not found")
	ErrCantDeleteLastUser     = errors.New("you can't delete the last user")
)
View Source
var ErrPeerNotFound = errors.New("couldn't find peer")

Functions

This section is empty.

Types

type APIController

type APIController interface {
	Name() string
	RegisterPublic(publicAPI echoswagger.ApiGroup, mocker Mocker)
	RegisterAdmin(adminAPI echoswagger.ApiGroup, mocker Mocker)
}

type ChainService

type ChainService interface {
	ActivateChain(chainID isc.ChainID) error
	SetChainRecord(chainRecord *registry.ChainRecord) error
	DeactivateChain(chainID isc.ChainID) error
	GetAllChainIDs() ([]isc.ChainID, error)
	HasChain(chainID isc.ChainID) bool
	GetChainByID(chainID isc.ChainID) chain.Chain
	GetChainInfoByChainID(chainID isc.ChainID) (*dto.ChainInfo, error)
	GetContracts(chainID isc.ChainID) (dto.ContractsMap, error)
	GetEVMChainID(chainID isc.ChainID) (uint16, error)
	GetState(chainID isc.ChainID, stateKey []byte) (state []byte, err error)
	WaitForRequestProcessed(ctx context.Context, chainID isc.ChainID, requestID isc.RequestID, timeout time.Duration) (*isc.Receipt, *isc.VMError, error)
}

type CommitteeService

type CommitteeService interface {
	GetCommitteeInfo(chainID isc.ChainID) (*dto.ChainNodeInfo, error)
	GetPublicKey() *cryptolib.PublicKey
}

type EVMService

type EVMService interface {
	HandleJSONRPC(chainID isc.ChainID, request *http.Request, response *echo.Response) error
	HandleWebsocket(chainID isc.ChainID, request *http.Request, response *echo.Response) error
	GetRequestID(chainID isc.ChainID, hash string) (isc.RequestID, error)
}

type MetricsService

type MetricsService interface {
	GetNodeMessageMetrics() *dto.NodeMessageMetrics
	GetChainMessageMetrics(chainID isc.ChainID) *dto.ChainMessageMetrics
	GetChainConsensusPipeMetrics(chainID isc.ChainID) *models.ConsensusPipeMetrics
	GetChainConsensusWorkflowMetrics(chainID isc.ChainID) *models.ConsensusWorkflowMetrics
}

type Mocker

type Mocker interface {
	Get(i interface{}) interface{}
}

type NodeService

type NodeService interface {
	AddAccessNode(chainID isc.ChainID, peer string) error
	DeleteAccessNode(chainID isc.ChainID, peer string) error
	SetNodeOwnerCertificate(publicKey *cryptolib.PublicKey, ownerAddress iotago.Address) ([]byte, error)
	ShutdownNode()
}

type OffLedgerService

type OffLedgerService interface {
	EnqueueOffLedgerRequest(chainID isc.ChainID, request []byte) error
	ParseRequest(payload []byte) (isc.OffLedgerRequest, error)
}

type PeeringService

type PeeringService interface {
	DistrustPeer(name string) (*dto.PeeringNodeIdentity, error)
	GetIdentity() *dto.PeeringNodeIdentity
	GetRegisteredPeers() []*dto.PeeringNodeStatus
	GetTrustedPeers() ([]*dto.PeeringNodeIdentity, error)
	IsPeerTrusted(publicKey *cryptolib.PublicKey) error
	TrustPeer(name string, pubkey *cryptolib.PublicKey, peeringURL string) (*dto.PeeringNodeIdentity, error)
}

type RegistryService

type RegistryService interface {
	GetChainRecordByChainID(chainID isc.ChainID) (*registry.ChainRecord, error)
}

type UserService

type UserService interface {
	AddUser(username string, password string, permissions []string) error
	DeleteUser(username string) error
	GetUser(username string) (*models.User, error)
	GetUsers() []*models.User
	UpdateUserPassword(username string, password string) error
	UpdateUserPermissions(username string, permissions []string) error
}

type VMService

type VMService interface {
	CallView(chainState state.State, chain chain.Chain, contractName isc.Hname, functionName isc.Hname, params dict.Dict) (dict.Dict, error)
	CallViewByChainID(chainID isc.ChainID, contractName isc.Hname, functionName isc.Hname, params dict.Dict) (dict.Dict, error)
	ParseReceipt(chain chain.Chain, receipt *blocklog.RequestReceipt) (*isc.Receipt, *isc.VMError, error)
	GetReceipt(chainID isc.ChainID, requestID isc.RequestID) (ret *isc.Receipt, vmError *isc.VMError, err error)
}

Jump to

Keyboard shortcuts

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