record

package
v1.0.0-beta.34 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Broadcaster

type Broadcaster interface {
	Broadcast(ctx context.Context, tx *trx.Transaction) error
}

Broadcaster is an interface for broadcasting transactions.

type Repository

type Repository interface {
	SaveTX(ctx context.Context, txTable *database.Transaction, outputs []*database.Output, data []*database.Data) error
	GetOutputs(ctx context.Context, outpoints iter.Seq[bsv.Outpoint]) ([]*database.Output, error)
}

Repository is an interface for saving transactions and outputs to the database.

type Service

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

Service for recording transactions

func NewService

func NewService(logger zerolog.Logger, repo Repository, broadcaster Broadcaster) *Service

NewService creates a new service for transactions

func (*Service) RecordTransactionOutline

func (s *Service) RecordTransactionOutline(ctx context.Context, outline *outlines.Transaction) error

RecordTransactionOutline will validate, broadcast and save a transaction outline

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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