loop/staticaddr/address/interface.go
0xfandom 8b89f77529 staticaddr: move address.Parameters to script package
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
2026-05-01 15:54:37 +05:30

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)
}