Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddressesRepo ¶
type AddressesRepo interface {
FindByStringAddresses(ctx context.Context, addresses iter.Seq[string]) ([]*database.Address, error)
}
AddressesRepo is an interface for addresses repository.
type Broadcaster ¶
type Broadcaster interface {
Broadcast(ctx context.Context, tx *trx.Transaction) (*chainmodels.TXInfo, error)
}
Broadcaster is an interface for broadcasting transactions.
type OperationsRepo ¶
type OperationsRepo interface {
SaveAll(ctx context.Context, opRows iter.Seq[*database.Operation]) error
}
OperationsRepo is an interface for operations repository.
type OutputsRepo ¶
type OutputsRepo interface {
FindByOutpoints(ctx context.Context, outpoints iter.Seq[bsv.Outpoint]) ([]*database.TrackedOutput, error)
}
OutputsRepo is an interface for outputs repository.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service for recording transactions
func NewService ¶
func NewService( logger zerolog.Logger, addressesRepo AddressesRepo, outputsRepo OutputsRepo, operationsRepo OperationsRepo, broadcaster Broadcaster, ) *Service
NewService creates a new service for transactions
func (*Service) RecordPaymailTransaction ¶
func (s *Service) RecordPaymailTransaction(ctx context.Context, tx *trx.Transaction, senderPaymail, receiverPaymail string) error
RecordPaymailTransaction will validate, broadcast and save paymail transaction
func (*Service) RecordTransactionOutline ¶
func (s *Service) RecordTransactionOutline(ctx context.Context, userID string, outline *outlines.Transaction) error
RecordTransactionOutline will validate, broadcast and save a transaction outline
Click to show internal directories.
Click to hide internal directories.