mirror of
https://github.com/aljazceru/ark.git
synced 2025-12-17 20:24:21 +01:00
* scaffolding wallet * remove wallet db, add loader instead * wip * implement some wallet methods * signing and utxos * renaming * fee estimator * chain source options * config * application service * clark docker-compose * CLI refactor * v0 clark * v0.1 clark * fix SignTapscriptInput (btcwallet) * wallet.Broadcast, send via explora * fix ASP pubkey * Use lnd's btcwallet & Add rpc to get wallet staus * wip * unilateral exit * Fixes on watching for notifications and cli init * handle non-final BIP68 errors * Fixes * Fixes * Fix * a * fix onboard cosigners + revert tree validation * fix covenant e2e tests * fix covenantless e2e tests * fix container naming * fix lint error * update REAME.md * Add env var for wallet password --------- Co-authored-by: altafan <18440657+altafan@users.noreply.github.com>
94 lines
2.2 KiB
Go
94 lines
2.2 KiB
Go
package flags
|
|
|
|
import (
|
|
"github.com/ark-network/ark/common"
|
|
"github.com/urfave/cli/v2"
|
|
)
|
|
|
|
const DATADIR_ENVVAR = "ARK_WALLET_DATADIR"
|
|
|
|
var (
|
|
DatadirFlag = &cli.StringFlag{
|
|
Name: "datadir",
|
|
Usage: "Specify the data directory",
|
|
Required: false,
|
|
Value: common.AppDataDir("ark-cli", false),
|
|
EnvVars: []string{DATADIR_ENVVAR},
|
|
}
|
|
PasswordFlag = cli.StringFlag{
|
|
Name: "password",
|
|
Usage: "password to unlock the wallet",
|
|
Required: false,
|
|
Hidden: true,
|
|
}
|
|
AmountOnboardFlag = cli.Uint64Flag{
|
|
Name: "amount",
|
|
Usage: "amount to onboard in sats",
|
|
}
|
|
TrustedOnboardFlag = cli.BoolFlag{
|
|
Name: "trusted",
|
|
Usage: "trusted onboard",
|
|
}
|
|
ExpiryDetailsFlag = cli.BoolFlag{
|
|
Name: "compute-expiry-details",
|
|
Usage: "compute client-side the VTXOs expiry time",
|
|
Value: false,
|
|
Required: false,
|
|
}
|
|
PrivateKeyFlag = cli.StringFlag{
|
|
Name: "prvkey",
|
|
Usage: "optional, private key to encrypt",
|
|
}
|
|
NetworkFlag = cli.StringFlag{
|
|
Name: "network",
|
|
Usage: "network to use (liquid, testnet, regtest)",
|
|
Value: "liquid",
|
|
}
|
|
UrlFlag = cli.StringFlag{
|
|
Name: "ark-url",
|
|
Usage: "the url of the ASP to connect to",
|
|
Required: true,
|
|
}
|
|
ExplorerFlag = cli.StringFlag{
|
|
Name: "explorer",
|
|
Usage: "the url of the explorer to use",
|
|
}
|
|
ReceiversFlag = cli.StringFlag{
|
|
Name: "receivers",
|
|
Usage: "receivers of the send transaction, JSON encoded: '[{\"to\": \"<...>\", \"amount\": <...>}, ...]'",
|
|
}
|
|
ToFlag = cli.StringFlag{
|
|
Name: "to",
|
|
Usage: "address of the recipient",
|
|
}
|
|
AmountFlag = cli.Uint64Flag{
|
|
Name: "amount",
|
|
Usage: "amount to send in sats",
|
|
}
|
|
EnableExpiryCoinselectFlag = cli.BoolFlag{
|
|
Name: "enable-expiry-coinselect",
|
|
Usage: "select vtxos that are about to expire first",
|
|
Value: false,
|
|
}
|
|
AddressFlag = cli.StringFlag{
|
|
Name: "address",
|
|
Usage: "main chain address receiving the redeeemed VTXO",
|
|
Value: "",
|
|
Required: false,
|
|
}
|
|
|
|
AmountToRedeemFlag = cli.Uint64Flag{
|
|
Name: "amount",
|
|
Usage: "amount to redeem",
|
|
Value: 0,
|
|
Required: false,
|
|
}
|
|
|
|
ForceFlag = cli.BoolFlag{
|
|
Name: "force",
|
|
Usage: "force redemption without collaborate with the Ark service provider",
|
|
Value: false,
|
|
Required: false,
|
|
}
|
|
)
|