Documentation ¶
Index ¶
- func NewAccountAPIService(baseService BaseService, accountRepo interfaces.AccountRepository, ...) server.AccountAPIServicer
- func NewBlockAPIService(accountRepo interfaces.AccountRepository, baseService BaseService, ...) server.BlockAPIServicer
- func NewConstructionAPIService(accountRepo interfaces.AccountRepository, baseService BaseService, ...) (server.ConstructionAPIServicer, error)
- func NewMempoolAPIService() server.MempoolAPIServicer
- func NewNetworkAPIService(baseService BaseService, ...) server.NetworkAPIServicer
- type AccountAPIService
- type BaseService
- func (b *BaseService) FindBetween(ctx context.Context, start int64, end int64) ([]*types.Transaction, *rTypes.Error)
- func (b *BaseService) FindByHashInBlock(ctx context.Context, identifier string, consensusStart int64, ...) (*types.Transaction, *rTypes.Error)
- func (b *BaseService) FindByIdentifier(ctx context.Context, index int64, hash string) (*types.Block, *rTypes.Error)
- func (b *BaseService) IsOnline() bool
- func (b *BaseService) RetrieveBlock(ctx context.Context, bIdentifier *rTypes.PartialBlockIdentifier) (*types.Block, *rTypes.Error)
- func (b *BaseService) RetrieveGenesis(ctx context.Context) (*types.Block, *rTypes.Error)
- func (b *BaseService) RetrieveLatest(ctx context.Context) (*types.Block, *rTypes.Error)
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 ¶
func (a *AccountAPIService) AccountBalance( ctx context.Context, request *rTypes.AccountBalanceRequest, ) (*rTypes.AccountBalanceResponse, *rTypes.Error)
AccountBalance implements the /account/balance endpoint.
func (*AccountAPIService) AccountCoins ¶
func (a *AccountAPIService) AccountCoins( _ context.Context, _ *rTypes.AccountCoinsRequest, ) (*rTypes.AccountCoinsResponse, *rTypes.Error)
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 (*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