mirror of
https://github.com/lightninglabs/loop.git
synced 2026-08-13 12:33:03 +02:00
The Parameters struct describes the keys, expiry and pkScript that define the static address script, so its natural home is the script package. Moving it there lets staticutil drop its dependency on the address package and lets callers reuse a single type alongside script.StaticAddress and script.NewStaticAddress. No behavior change. Closes #1056
20 lines
532 B
Go
20 lines
532 B
Go
package address
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/lightninglabs/loop/staticaddr/script"
|
|
)
|
|
|
|
// Store is the database interface that is used to store and retrieve
|
|
// static addresses.
|
|
type Store interface {
|
|
// CreateStaticAddress inserts a new static address with its parameters
|
|
// into the store.
|
|
CreateStaticAddress(ctx context.Context,
|
|
addrParams *script.Parameters) error
|
|
|
|
// GetAllStaticAddresses retrieves all static addresses from the store.
|
|
GetAllStaticAddresses(ctx context.Context) ([]*script.Parameters,
|
|
error)
|
|
}
|