Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
802afcb
staticaddr/deposit: handle loop-in htlc timeout
hieblmi Jul 1, 2026
f230542
staticaddr/deposit: ignore expiry blocks in final states
hieblmi Jul 1, 2026
40e6ddb
staticaddr/deposit: reject duplicate outpoints
hieblmi Jul 1, 2026
b7e39e6
staticaddr/loopin: factor invoice update handling
hieblmi Jul 7, 2026
bd918c2
staticaddr/loopin: handle closed invoice updates
hieblmi Jul 7, 2026
9edce19
staticaddr/deposit: stop removed fsms
hieblmi Jul 1, 2026
73588a0
staticaddr/loopin: preserve selected deposit outpoints
hieblmi Jun 26, 2026
9e2893f
staticaddr/loopin: add lnd txout checker
hieblmi Jun 26, 2026
b9f45f6
staticaddr/deposit: document lock ordering
hieblmi Jul 1, 2026
26aeeab
staticaddr/deposit: factor active deposit notifications
hieblmi Jul 1, 2026
7d16e35
staticaddr/deposit: serialize deposit reconciliation
hieblmi Jul 1, 2026
2497000
staticaddr/deposit: reject invalid transitions
hieblmi Jul 1, 2026
5dff2ea
staticaddr/loopin: default payment timeout duration
hieblmi Jul 1, 2026
a947e5d
staticaddr/deposit: ignore queued expiry in final states
hieblmi Jul 1, 2026
d2d01d8
staticaddr/deposit: guard confirmation height access
hieblmi Jul 1, 2026
2864258
staticaddr/loopin: keep htlc timeout sweep resumable
hieblmi Jul 1, 2026
a3cdf18
staticaddr/loopin: keep htlc monitor resumable
hieblmi Jul 2, 2026
ecea6e0
staticaddr/deposit: canonicalize multi-deposit locks
hieblmi Jul 2, 2026
442143c
staticaddr/loopin: recover deposits by current outpoint
hieblmi Jul 2, 2026
deb2325
staticaddr/loopin: use payment timeout duration helper
hieblmi Jul 2, 2026
8f99834
staticaddr/loopin: check deposits before htlc signing
hieblmi Jul 2, 2026
b5289f0
staticaddr/loopin: scan wallet txouts once
hieblmi Jul 2, 2026
617f3fa
staticaddr/loopin: update payment timeout comment
hieblmi Jul 2, 2026
39438e6
staticaddr/openchannel: fix nolint directive
hieblmi Jul 6, 2026
bbd8021
build: increase lint timeout
hieblmi Jul 6, 2026
090fa56
staticaddr/loopin: order recovered deposits by snapshot
hieblmi Jul 7, 2026
116ed39
staticaddr/deposit: reject duplicate outpoints
hieblmi Jul 1, 2026
9abd78c
staticaddr/deposit: track unconfirmed deposits
hieblmi Jul 1, 2026
f3eae15
staticaddr: expose tracked deposit availability
hieblmi Jun 26, 2026
7690658
staticaddr/loopin: treat unconfirmed deposits as swappable
hieblmi Jul 6, 2026
f105710
staticaddr/loopin: account for autoloop deposit expiry
hieblmi Jul 6, 2026
b70d030
staticaddr: sync active deposits with wallet
hieblmi Jun 26, 2026
7e4031b
staticaddr/loopin: cancel signing for unavailable deposits
hieblmi Jun 26, 2026
8269a97
staticaddr/loopin: wait for risk decisions
hieblmi Jun 26, 2026
e2bd560
staticaddr/loopin: persist risk decisions
hieblmi Jun 26, 2026
56f3370
cmd/loop: warn for low-confirmation static deposits
hieblmi Jun 26, 2026
e6999f3
cmd/loop: update static loop-in replay fixtures
hieblmi Jun 26, 2026
6689e2d
staticaddr/deposit: expose no-lock state helpers
hieblmi Jul 7, 2026
02e4476
build: increase lint timeout
hieblmi Jun 26, 2026
5ddf3b8
recover L402 and static address
hieblmi May 5, 2026
8e466ef
staticaddr: persist multi-address deposits
hieblmi May 6, 2026
0ccd98a
staticaddr: sign deposits with their own address params
hieblmi May 6, 2026
3bf605a
swapserverrpc: add static address input proofs
hieblmi May 6, 2026
53a70cc
staticaddr: send client keys for deposit inputs
hieblmi May 6, 2026
8bf9ae4
staticaddr/loopin: restore deposit address params
hieblmi May 6, 2026
617fabf
staticaddr: use generated change addresses
hieblmi May 6, 2026
e7a5b4b
recovery: restore multi-address static deposits
hieblmi May 7, 2026
b34692b
staticaddr: fund new address with sendcoins
hieblmi May 8, 2026
e312a3c
staticaddr: include address in deposit list
hieblmi May 11, 2026
bcefc9f
build: mark x/term as direct dependency
hieblmi Jul 7, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ run:
go: "1.26"

# timeout for analysis
timeout: 4m
timeout: 8m

linters:
default: all
Expand Down
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,28 @@ To execute a Loop In:
loop in <amt_in_satoshis>
```

### Static Address Recovery
Loop now keeps at most one encrypted immutable recovery backup per paid L402
generation in the active network data directory. A backup is written only after
Loop has both the paid `l402.token` and the concrete static-address parameters
for that generation.

The backup is encrypted with a key derived by the backing `lnd` wallet. It is
therefore only useful with that same `lnd` instance, or with an `lnd` restored
from the same seed/key material. The Loop backup file alone is not enough to
recover static-address access.

Existing static-address users get this backup backfilled on the next startup
with the upgraded client. A fresh install that has no local L402 or
static-address state first checks for an existing recovery backup in the active
network directory. If none is restored, startup materializes the initial
paid-L402/static-address generation and writes its backup.

The follow-up multi-address work is expected to keep this one-backup-per-L402
model and use the deterministic receive/change key-family metadata already
stored in the backup. See [recovery/README.md](./recovery/README.md) for the
full recovery model and the planned multi-address outlook.

### More info

- [Loop FAQs](./docs/faqs.md)
Expand Down
3 changes: 2 additions & 1 deletion cmd/loop/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@ var (
monitorCommand, quoteCommand, listAuthCommand, fetchL402Command,
listSwapsCommand, swapInfoCommand, getLiquidityParamsCommand,
setLiquidityRuleCommand, suggestSwapCommand, setParamsCommand,
getInfoCommand, abandonSwapCommand, reservationsCommands,
getInfoCommand, abandonSwapCommand, recoverCommand,
reservationsCommands,
instantOutCommand, listInstantOutsCommand, stopCommand,
printManCommand, printMarkdownCommand,
}
Expand Down
50 changes: 50 additions & 0 deletions cmd/loop/recover.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
package main

import (
"context"

"github.com/lightninglabs/loop/looprpc"
"github.com/urfave/cli/v3"
)

var recoverCommand = &cli.Command{
Name: "recover",
Usage: "restore static address and L402 state from a local backup file",
Description: "Restores the local static-address state and L402 token " +
"from an encrypted backup file. If --backup_file is omitted, " +
"loopd selects the latest decryptable active-network backup " +
"candidate and fully validates it before restoring state.",
Flags: []cli.Flag{
&cli.StringFlag{
Name: "backup_file",
Usage: "path to an encrypted backup file; if omitted, " +
"loopd selects and validates the latest active-network " +
"backup candidate",
},
},
Action: runRecover,
}

func runRecover(ctx context.Context, cmd *cli.Command) error {
if cmd.NArg() > 0 {
return showCommandHelp(ctx, cmd)
}

client, cleanup, err := getClient(cmd)
if err != nil {
return err
}
defer cleanup()

resp, err := client.Recover(
ctx, &looprpc.RecoverRequest{
BackupFile: cmd.String("backup_file"),
},
)
if err != nil {
return err
}

printRespJSON(resp)
return nil
}
Loading
Loading