loop/staticaddr/address/interface.go
Slyghtning 8006349606
staticaddr/address: activate derived addresses
Create receive and change addresses from locally derived client keys
while reusing the server key and expiry from the legacy seed. Import,
persist, and activate each script before returning it to callers.
2026-08-10 14:18:04 +02:00

31 lines
1.1 KiB
Go

package address
import (
"context"
"github.com/lightninglabs/loop/staticaddr/script"
)
// Parameters aliases the script-level static address parameters for callers
// that interact with the address manager API.
type Parameters = script.Parameters
// 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 *Parameters) error
// GetStaticAddressID retrieves the static address row ID for the
// address script.
GetStaticAddressID(ctx context.Context, pkScript []byte) (int32, error)
// GetAllStaticAddresses retrieves all static addresses from the store.
GetAllStaticAddresses(ctx context.Context) ([]*Parameters, error)
// GetLegacyParameters retrieves the first static address created for the
// L402. This is the immutable legacy/root address that anchors existing
// single-address deposits.
GetLegacyParameters(ctx context.Context) (*Parameters, error)
}