mirror of
https://github.com/aljazceru/ark.git
synced 2025-12-17 12:14:21 +01:00
* broadcast forfeit transaction in case the user is trying the cheat the ASP * fix connector input + --cheat flag in CLI * WIP * cleaning and fixes * add TODO * sweeper.go: mark round swept if vtxo are redeemed * fixes after reviews * revert "--cheat" flag in client * revert redeem.go * optimization * update account.go according to ocean ListUtxos new spec * WaitForSync implementation * ocean-wallet/service.go: remove go rountine while writing to notification channel
29 lines
1.0 KiB
Go
29 lines
1.0 KiB
Go
package domain
|
|
|
|
import (
|
|
"context"
|
|
)
|
|
|
|
type RoundEventRepository interface {
|
|
Save(ctx context.Context, id string, events ...RoundEvent) (*Round, 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)
|
|
GetSweepableRounds(ctx context.Context) ([]Round, error)
|
|
}
|
|
|
|
type VtxoRepository interface {
|
|
AddVtxos(ctx context.Context, vtxos []Vtxo) error
|
|
SpendVtxos(ctx context.Context, vtxos []VtxoKey, txid string) error
|
|
RedeemVtxos(ctx context.Context, vtxos []VtxoKey) ([]Vtxo, error)
|
|
GetVtxos(ctx context.Context, vtxos []VtxoKey) ([]Vtxo, error)
|
|
GetVtxosForRound(ctx context.Context, txid string) ([]Vtxo, error)
|
|
SweepVtxos(ctx context.Context, vtxos []VtxoKey) error
|
|
GetSpendableVtxos(ctx context.Context, pubkey string) ([]Vtxo, error)
|
|
}
|