cli: rename --amount to --amt in static

loop static in --amt
loop static withdraw --amt

This is done to make it consistent with other commands and products.

Keep --amount flag as an alias.
This commit is contained in:
Boris Nagaev 2025-10-26 00:41:37 -03:00
parent ab81cebd14
commit ef8b7b7dc2
No known key found for this signature in database
3 changed files with 30 additions and 28 deletions

View file

@ -158,7 +158,8 @@ var withdrawalCommand = &cli.Command{
"the transaction",
},
&cli.Uint64Flag{
Name: "amount",
Name: "amt",
Aliases: []string{"amount"},
Usage: "the number of satoshis that should be " +
"withdrawn from the selected deposits. The " +
"change is sent back to the static address",
@ -211,7 +212,7 @@ func withdraw(ctx context.Context, cmd *cli.Command) error {
All: isAllSelected,
DestAddr: destAddr,
SatPerVbyte: int64(cmd.Uint64("sat_per_vbyte")),
Amount: int64(cmd.Uint64("amount")),
Amount: int64(cmd.Uint64("amt")),
})
if err != nil {
return err
@ -473,7 +474,8 @@ var staticAddressLoopInCommand = &cli.Command{
"parameters after the payment timed out.",
},
&cli.Uint64Flag{
Name: "amount",
Name: "amt",
Aliases: []string{"amount"},
Usage: "the number of satoshis that should be " +
"swapped from the selected deposits. If there" +
"is change it is sent back to the static " +
@ -514,7 +516,7 @@ func staticAddressLoopIn(ctx context.Context, cmd *cli.Command) error {
"allowed")
default:
selectedAmount = int64(cmd.Uint64("amount"))
selectedAmount = int64(cmd.Uint64("amt"))
}
client, cleanup, err := getClient(ctx, cmd)

View file

@ -503,7 +503,7 @@ Withdraw from static address deposits.
\fB--all\fP: withdraws all static address deposits.
.PP
\fB--amount\fP="": the number of satoshis that should be withdrawn from the selected deposits. The change is sent back to the static address (default: 0)
\fB--amt, --amount\fP="": the number of satoshis that should be withdrawn from the selected deposits. The change is sent back to the static address (default: 0)
.PP
\fB--dest_addr\fP="": the optional address that the withdrawn funds should be sent to, if let blank the funds will go to lnd's wallet
@ -532,7 +532,7 @@ Loop in funds from static address deposits.
\fB--all\fP: loop in all static address deposits.
.PP
\fB--amount\fP="": the number of satoshis that should be swapped from the selected deposits. If thereis change it is sent back to the static address. (default: 0)
\fB--amt, --amount\fP="": the number of satoshis that should be swapped from the selected deposits. If thereis change it is sent back to the static address. (default: 0)
.PP
\fB--fast\fP: Usage: complete the swap faster by paying a higher fee, so the change output is available sooner

View file

@ -585,14 +585,14 @@ $ loop [GLOBAL FLAGS] static withdraw [COMMAND FLAGS] [ARGUMENTS...]
The following flags are supported:
| Name | Description | Type | Default value |
|-----------------------|---------------------------------------------------------------------------------------------------------------------------|--------|:-------------:|
| `--utxo="…"` | specify utxos as outpoints(tx:idx) which willbe withdrawn | string | `[]` |
| `--all` | withdraws all static address deposits | bool | `false` |
| `--dest_addr="…"` | the optional address that the withdrawn funds should be sent to, if let blank the funds will go to lnd's wallet | string |
| `--sat_per_vbyte="…"` | (optional) a manual fee expressed in sat/vbyte that should be used when crafting the transaction | uint | `0` |
| `--amount="…"` | the number of satoshis that should be withdrawn from the selected deposits. The change is sent back to the static address | uint | `0` |
| `--help` (`-h`) | show help | bool | `false` |
| Name | Description | Type | Default value |
|--------------------------|---------------------------------------------------------------------------------------------------------------------------|--------|:-------------:|
| `--utxo="…"` | specify utxos as outpoints(tx:idx) which willbe withdrawn | string | `[]` |
| `--all` | withdraws all static address deposits | bool | `false` |
| `--dest_addr="…"` | the optional address that the withdrawn funds should be sent to, if let blank the funds will go to lnd's wallet | string |
| `--sat_per_vbyte="…"` | (optional) a manual fee expressed in sat/vbyte that should be used when crafting the transaction | uint | `0` |
| `--amt="…"` (`--amount`) | the number of satoshis that should be withdrawn from the selected deposits. The change is sent back to the static address | uint | `0` |
| `--help` (`-h`) | show help | bool | `false` |
### `static summary` subcommand (aliases: `s`)
@ -626,18 +626,18 @@ $ loop [GLOBAL FLAGS] static in [COMMAND FLAGS] [amt] [--all | --utxo xxx:xx]
The following flags are supported:
| Name | Description | Type | Default value |
|-------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------|:-------------:|
| `--utxo="…"` | specify the utxos of deposits as outpoints(tx:idx) that should be looped in | string | `[]` |
| `--all` | loop in all static address deposits | bool | `false` |
| `--payment_timeout="…"` | the maximum time in seconds that the server is allowed to take for the swap payment. The client can retry the swap with adjusted parameters after the payment timed out | duration | `0s` |
| `--amount="…"` | the number of satoshis that should be swapped from the selected deposits. If thereis change it is sent back to the static address | uint | `0` |
| `--fast` | Usage: complete the swap faster by paying a higher fee, so the change output is available sooner | bool | `false` |
| `--last_hop="…"` | the pubkey of the last hop to use for this swap | string |
| `--label="…"` | an optional label for this swap,limited to 500 characters. The label may not start with our reserved prefix: [reserved] | string |
| `--route_hints="…"` | route hints that can each be individually used to assist in reaching the invoice's destination | string | `[]` |
| `--private` | generates and passes routehints. Should be used if the connected node is only reachable via private channels | bool | `false` |
| `--force` | Assumes yes during confirmation. Using this option will result in an immediate swap | bool | `false` |
| `--verbose` (`-v`) | show expanded details | bool | `false` |
| `--help` (`-h`) | show help | bool | `false` |
| Name | Description | Type | Default value |
|--------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------|:-------------:|
| `--utxo="…"` | specify the utxos of deposits as outpoints(tx:idx) that should be looped in | string | `[]` |
| `--all` | loop in all static address deposits | bool | `false` |
| `--payment_timeout="…"` | the maximum time in seconds that the server is allowed to take for the swap payment. The client can retry the swap with adjusted parameters after the payment timed out | duration | `0s` |
| `--amt="…"` (`--amount`) | the number of satoshis that should be swapped from the selected deposits. If thereis change it is sent back to the static address | uint | `0` |
| `--fast` | Usage: complete the swap faster by paying a higher fee, so the change output is available sooner | bool | `false` |
| `--last_hop="…"` | the pubkey of the last hop to use for this swap | string |
| `--label="…"` | an optional label for this swap,limited to 500 characters. The label may not start with our reserved prefix: [reserved] | string |
| `--route_hints="…"` | route hints that can each be individually used to assist in reaching the invoice's destination | string | `[]` |
| `--private` | generates and passes routehints. Should be used if the connected node is only reachable via private channels | bool | `false` |
| `--force` | Assumes yes during confirmation. Using this option will result in an immediate swap | bool | `false` |
| `--verbose` (`-v`) | show expanded details | bool | `false` |
| `--help` (`-h`) | show help | bool | `false` |