Skip to content
Merged
Show file tree
Hide file tree
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
41 changes: 15 additions & 26 deletions example-crates/example_wallet_rpc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,43 +3,32 @@
```
$ cargo run --bin example_wallet_rpc -- --help

example_wallet_rpc 0.1.0
Bitcoind RPC example using `bdk_wallet::Wallet`

USAGE:
example_wallet_rpc [OPTIONS] <DESCRIPTOR> [CHANGE_DESCRIPTOR]
Usage: example_wallet_rpc [OPTIONS] <DESCRIPTOR> <CHANGE_DESCRIPTOR>

ARGS:
<DESCRIPTOR> Wallet descriptor [env: DESCRIPTOR=]
<CHANGE_DESCRIPTOR> Wallet change descriptor [env: CHANGE_DESCRIPTOR=]
Arguments:
<DESCRIPTOR> Wallet descriptor [env: DESCRIPTOR=]
<CHANGE_DESCRIPTOR> Wallet change descriptor [env: CHANGE_DESCRIPTOR=]

OPTIONS:
--db-path <DB_PATH>
Where to store wallet data [env: BDK_DB_PATH=] [default: .bdk_wallet_rpc_example.db]
Options:
--start-height <START_HEIGHT> Earliest block height to start sync from [env: START_HEIGHT=] [default: 0]

-h, --help
Print help information
--network <NETWORK> Bitcoin network to connect to [env: BITCOIN_NETWORK=] [default: regtest]

--network <NETWORK>
Bitcoin network to connect to [env: BITCOIN_NETWORK=] [default: testnet]
--db-path <DB_PATH> Where to store wallet data [env: BDK_DB_PATH=] [default: .bdk_wallet_rpc_example.db]

--rpc-cookie <RPC_COOKIE>
RPC auth cookie file [env: RPC_COOKIE=]
--url <URL> RPC URL [env: RPC_URL=] [default: 127.0.0.1:18443]

--rpc-pass <RPC_PASS>
RPC auth password [env: RPC_PASS=]
--rpc-cookie <RPC_COOKIE> RPC auth cookie file [env: RPC_COOKIE=]

--rpc-user <RPC_USER>
RPC auth username [env: RPC_USER=]
--rpc-user <RPC_USER> RPC auth username [env: RPC_USER=]

--start-height <START_HEIGHT>
Earliest block height to start sync from [env: START_HEIGHT=] [default: 481824]
--rpc-pass <RPC_PASS> RPC auth password [env: RPC_PASS=]

--url <URL>
RPC URL [env: RPC_URL=] [default: 127.0.0.1:8332]

-V, --version
Print version information
-h, --help Print help

-V, --version Print version

```

6 changes: 3 additions & 3 deletions example-crates/example_wallet_rpc/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ pub struct Args {
#[clap(env = "CHANGE_DESCRIPTOR")]
pub change_descriptor: String,
/// Earliest block height to start sync from
#[clap(env = "START_HEIGHT", long, default_value = "481824")]
#[clap(env = "START_HEIGHT", long, default_value = "0")]
pub start_height: u32,
/// Bitcoin network to connect to
#[clap(env = "BITCOIN_NETWORK", long, default_value = "testnet")]
#[clap(env = "BITCOIN_NETWORK", long, default_value = "regtest")]
pub network: Network,
/// Where to store wallet data
#[clap(
Expand All @@ -41,7 +41,7 @@ pub struct Args {
pub db_path: PathBuf,

/// RPC URL
#[clap(env = "RPC_URL", long, default_value = "127.0.0.1:8332")]
#[clap(env = "RPC_URL", long, default_value = "127.0.0.1:18443")]
pub url: String,
/// RPC auth cookie file
#[clap(env = "RPC_COOKIE", long)]
Expand Down
Loading