svc

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2023 License: BSD-2-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddressesService

type AddressesService interface {
	GetAddresses(addresses []string, blockHash *string, blockHeight *int32) (types.Addresses, error)
}

type BlocksService

type BlocksService interface {
	GetBlock(ref string) (*types.Block, error)
}

type ControlService

type ControlService interface {
	HasDescriptor(descriptor string) (bool, error)
	ImportAccounts(accounts []config.Account)
}

type ExplorerService

type ExplorerService interface {
	GetFees(targets []int64, mode string) map[string]interface{}
	GetHealth() error
	GetNetwork() *bus.Network
	GetStatus() *bus.ExplorerStatus
}

type Service

type Service struct {
	Bus *bus.Bus
}

func (*Service) GetAddresses

func (s *Service) GetAddresses(addresses []string, blockHash *string, blockHeight *int32) (types.Addresses, error)

func (*Service) GetBlock

func (s *Service) GetBlock(ref string) (*types.Block, error)

GetBlock is a service method to get a Block by a string reference

func (*Service) GetFees

func (s *Service) GetFees(targets []int64, mode string) map[string]interface{}

func (*Service) GetHealth

func (s *Service) GetHealth() error

func (*Service) GetNetwork added in v0.13.0

func (s *Service) GetNetwork() (network *bus.Network)

func (*Service) GetStatus

func (s *Service) GetStatus() *bus.ExplorerStatus

func (*Service) GetTransaction

func (s *Service) GetTransaction(hash string, block *types.Block, bestBlockHeight int32) (*types.Transaction, error)

GetTransaction is a service function to query transaction details by transaction hash.

func (*Service) GetTransactionHex

func (s *Service) GetTransactionHex(hash string) (string, error)

GetTransactionHex is a service function to get hex encoded raw transaction by hash.

func (*Service) HasDescriptor

func (s *Service) HasDescriptor(descriptor string) (bool, error)

func (*Service) ImportAccounts

func (s *Service) ImportAccounts(accounts []config.Account)

func (*Service) SendTransaction

func (s *Service) SendTransaction(tx string) (string, error)

type TransactionsService

type TransactionsService interface {
	GetTransaction(hash string, block *types.Block, bestBlockHeight int32) (*types.Transaction, error)
	GetTransactionHex(hash string) (string, error)
	SendTransaction(tx string) (string, error)
}

Jump to

Keyboard shortcuts

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