Documentation
¶
Index ¶
- type Service
- func (s *Service) GetMerkleRoots(ctx context.Context, query url.Values) (*models.MerkleRootsBHSResponse, error)
- func (s *Service) HealthcheckBHS(ctx context.Context) error
- func (s *Service) VerifyMerkleRoots(ctx context.Context, merkleRoots []*spv.MerkleRootConfirmationRequestItem) (valid bool, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service for BHS requests.
func NewBHSService ¶
func NewBHSService(logger zerolog.Logger, httpClient *resty.Client, bhsCfg chainmodels.BHSConfig) *Service
NewBHSService creates a new instance of BHS service.
func (*Service) GetMerkleRoots ¶
func (s *Service) GetMerkleRoots(ctx context.Context, query url.Values) (*models.MerkleRootsBHSResponse, error)
GetMerkleRoots returns Merkle Roots from Block Header Service
func (*Service) HealthcheckBHS ¶
HealthcheckBHS checks the health of the Block Headers Service (BHS). It verifies the BHS is reachable and ready to verify merkle roots by providing a known merkle root.
func (*Service) VerifyMerkleRoots ¶
func (s *Service) VerifyMerkleRoots(ctx context.Context, merkleRoots []*spv.MerkleRootConfirmationRequestItem) (valid bool, err error)
VerifyMerkleRoots verifies the merkle roots of the given transactions using BHS request
Click to show internal directories.
Click to hide internal directories.