services

package
v0.0.0-...-d47debc Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: Apache-2.0 Imports: 24 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAccountAPIService

func NewAccountAPIService(
	baseService BaseService,
	accountRepo interfaces.AccountRepository,
	systemShard int64,
	systemRealm int64,
) server.AccountAPIServicer

NewAccountAPIService creates a new instance of a AccountAPIService.

func NewBlockAPIService

func NewBlockAPIService(
	accountRepo interfaces.AccountRepository,
	baseService BaseService,
	entityCacheConfig config.Cache,
	maxTransactionsInBlock int,
	serverContext context.Context,
) server.BlockAPIServicer

NewBlockAPIService creates a new instance of a blockAPIService.

func NewConstructionAPIService

func NewConstructionAPIService(
	accountRepo interfaces.AccountRepository,
	baseService BaseService,
	config *config.Config,
	transactionConstructor construction.TransactionConstructor,
) (server.ConstructionAPIServicer, error)

NewConstructionAPIService creates a new instance of a constructionAPIService.

func NewMempoolAPIService

func NewMempoolAPIService() server.MempoolAPIServicer

NewMempoolAPIService creates a new instance of a mempoolAPIService

func NewNetworkAPIService

func NewNetworkAPIService(
	baseService BaseService,
	addressBookEntryRepo interfaces.AddressBookEntryRepository,
	network *rTypes.NetworkIdentifier,
	version *rTypes.Version,
) server.NetworkAPIServicer

NewNetworkAPIService creates a networkAPIService instance.

Types

type AccountAPIService

type AccountAPIService struct {
	BaseService
	// contains filtered or unexported fields
}

AccountAPIService implements the server.AccountAPIServicer interface.

func (*AccountAPIService) AccountBalance

AccountBalance implements the /account/balance endpoint.

func (*AccountAPIService) AccountCoins

type BaseService

type BaseService struct {
	// contains filtered or unexported fields
}

BaseService - Struct implementing common functionalities used by more than 1 service

func NewOfflineBaseService

func NewOfflineBaseService() BaseService

NewOfflineBaseService - Service containing common functions that are shared between other services, for offline mode

func NewOnlineBaseService

func NewOnlineBaseService(
	blockRepo interfaces.BlockRepository,
	transactionRepo interfaces.TransactionRepository,
) BaseService

NewOnlineBaseService - Service containing common functions that are shared between other services, for online mode

func (*BaseService) FindBetween

func (b *BaseService) FindBetween(ctx context.Context, start int64, end int64) ([]*types.Transaction, *rTypes.Error)

func (*BaseService) FindByHashInBlock

func (b *BaseService) FindByHashInBlock(
	ctx context.Context,
	identifier string,
	consensusStart int64,
	consensusEnd int64,
) (*types.Transaction, *rTypes.Error)

func (*BaseService) FindByIdentifier

func (b *BaseService) FindByIdentifier(ctx context.Context, index int64, hash string) (*types.Block, *rTypes.Error)

func (*BaseService) IsOnline

func (b *BaseService) IsOnline() bool

func (*BaseService) RetrieveBlock

func (b *BaseService) RetrieveBlock(ctx context.Context, bIdentifier *rTypes.PartialBlockIdentifier) (
	*types.Block,
	*rTypes.Error,
)

RetrieveBlock - Retrieves Block by a given PartialBlockIdentifier

func (*BaseService) RetrieveGenesis

func (b *BaseService) RetrieveGenesis(ctx context.Context) (*types.Block, *rTypes.Error)

func (*BaseService) RetrieveLatest

func (b *BaseService) RetrieveLatest(ctx context.Context) (*types.Block, *rTypes.Error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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