Files
ark/asp/internal/core/domain/round_repo.go
Pietralberto Mazza 940214f699 Detect redemptions and mark vtxos has redeemed (#87)
* Update ocean protos & Add blockchain scanner

* Detect redemptions and mark vtxos as redeemed

* Update comment

* Fixes

* Fix watched event type

* Fixes

* Fixes

* Restore watching vtxos at startup

* Update deps
2024-02-08 13:40:28 +01:00

24 lines
818 B
Go

package domain
import "context"
type RoundEventRepository interface {
Save(ctx context.Context, id string, events ...RoundEvent) error
Load(ctx context.Context, id string) (*Round, error)
}
type RoundRepository interface {
AddOrUpdateRound(ctx context.Context, round Round) error
GetCurrentRound(ctx context.Context) (*Round, error)
GetRoundWithId(ctx context.Context, id string) (*Round, error)
GetRoundWithTxid(ctx context.Context, txid string) (*Round, error)
}
type VtxoRepository interface {
AddVtxos(ctx context.Context, vtxos []Vtxo) error
SpendVtxos(ctx context.Context, vtxos []VtxoKey) error
RedeemVtxos(ctx context.Context, vtxos []VtxoKey) ([]Vtxo, error)
GetVtxos(ctx context.Context, vtxos []VtxoKey) ([]Vtxo, error)
GetSpendableVtxos(ctx context.Context, pubkey string) ([]Vtxo, error)
}