Skip to content
Merged
Changes from all commits
Commits
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
63 changes: 25 additions & 38 deletions cmd/loop/staticaddr.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ var listUnspentCommand = cli.Command{
ShortName: "l",
Usage: "List unspent static address outputs.",
Description: `
List all unspent static address outputs.
List all unspent static address outputs.
`,
Flags: []cli.Flag{
cli.IntFlag{
Expand Down Expand Up @@ -134,8 +134,8 @@ var withdrawalCommand = cli.Command{
ShortName: "w",
Usage: "Withdraw from static address deposits.",
Description: `
Withdraws from all or selected static address deposits by sweeping them
back to our lnd wallet.
Withdraws from all or selected static address deposits by sweeping them
to the internal wallet or an external address.
`,
Flags: []cli.Flag{
cli.StringSliceFlag{
Expand Down Expand Up @@ -226,8 +226,9 @@ func withdraw(ctx *cli.Context) error {
}

var listDepositsCommand = cli.Command{
Name: "listdeposits",
Usage: "Display a summary of static address related information.",
Name: "listdeposits",
Usage: "Displays static address deposits. A filter can be applied to " +
"only show deposits in a specific state.",
Description: `
`,
Flags: []cli.Flag{
Expand All @@ -247,39 +248,6 @@ var listDepositsCommand = cli.Command{
Action: listDeposits,
}

var listStaticAddressSwapsCommand = cli.Command{
Name: "listswaps",
Usage: "Display a summary of static address related information.",
Description: `
`,
Action: listStaticAddressSwaps,
}

var summaryCommand = cli.Command{
Name: "summary",
ShortName: "s",
Usage: "Display a summary of static address related information.",
Description: `
Displays various static address related information like deposits,
withdrawals and statistics. The information can be filtered by state.
`,
Flags: []cli.Flag{
cli.StringFlag{
Name: "filter",
Usage: "specify a filter to only display deposits in " +
"the specified state. Leaving out the filter " +
"returns all deposits.\nThe state can be one " +
"of the following: \n" +
"deposited\nwithdrawing\nwithdrawn\n" +
"looping_in\nlooped_in\n" +
"publish_expired_deposit\n" +
"sweep_htlc_timeout\nhtlc_timeout_swept\n" +
"wait_for_expiry_sweep\nexpired\nfailed\n.",
},
},
Action: summary,
}

func listDeposits(ctx *cli.Context) error {
ctxb := context.Background()
if ctx.NArg() > 0 {
Expand Down Expand Up @@ -345,6 +313,14 @@ func listDeposits(ctx *cli.Context) error {
return nil
}

var listStaticAddressSwapsCommand = cli.Command{
Name: "listswaps",
Usage: "Shows a list of finalized static address swaps.",
Description: `
`,
Action: listStaticAddressSwaps,
}

func listStaticAddressSwaps(ctx *cli.Context) error {
ctxb := context.Background()
if ctx.NArg() > 0 {
Expand All @@ -369,6 +345,17 @@ func listStaticAddressSwaps(ctx *cli.Context) error {
return nil
}

var summaryCommand = cli.Command{
Name: "summary",
ShortName: "s",
Usage: "Display a summary of static address related information.",
Description: `
Displays various static address related information about deposits,
withdrawals and swaps.
`,
Action: summary,
}

func summary(ctx *cli.Context) error {
ctxb := context.Background()
if ctx.NArg() > 0 {
Expand Down