loop/staticaddr/address/interface.go

21 lines
532 B
Go
Raw Permalink Normal View History

2024-03-07 17:27:13 +01:00
package address
2023-11-09 19:07:48 +01:00
import (
"context"
"github.com/lightninglabs/loop/staticaddr/script"
2023-11-09 19:07:48 +01:00
)
2024-03-07 17:27:13 +01:00
// Store is the database interface that is used to store and retrieve
2023-11-09 19:07:48 +01:00
// static addresses.
2024-03-07 17:27:13 +01:00
type Store interface {
2023-11-09 19:07:48 +01:00
// CreateStaticAddress inserts a new static address with its parameters
// into the store.
CreateStaticAddress(ctx context.Context,
addrParams *script.Parameters) error
2023-11-09 19:07:48 +01:00
// GetAllStaticAddresses retrieves all static addresses from the store.
GetAllStaticAddresses(ctx context.Context) ([]*script.Parameters,
2024-03-07 17:27:13 +01:00
error)
2023-11-09 19:07:48 +01:00
}