2024-03-07 17:27:13 +01:00
|
|
|
package address
|
2023-11-09 19:07:48 +01:00
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"context"
|
|
|
|
|
|
2026-05-01 15:54:37 +05:30
|
|
|
"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.
|
2026-05-01 15:54:37 +05:30
|
|
|
CreateStaticAddress(ctx context.Context,
|
|
|
|
|
addrParams *script.Parameters) error
|
2023-11-09 19:07:48 +01:00
|
|
|
|
|
|
|
|
// GetAllStaticAddresses retrieves all static addresses from the store.
|
2026-05-01 15:54:37 +05:30
|
|
|
GetAllStaticAddresses(ctx context.Context) ([]*script.Parameters,
|
2024-03-07 17:27:13 +01:00
|
|
|
error)
|
2023-11-09 19:07:48 +01:00
|
|
|
}
|