Skip to content

Add CLI Tools for Identifying Incoming UTXOs and Rescanning#858

Draft
aszepieniec wants to merge 1 commit intomasterfrom
asz/rescan
Draft

Add CLI Tools for Identifying Incoming UTXOs and Rescanning#858
aszepieniec wants to merge 1 commit intomasterfrom
asz/rescan

Conversation

@aszepieniec
Copy link
Contributor

This PR over from PR #783, which is closed without merging and left intact for referential purposes. (I may have screwed something up during the rebase and if so I want to see what the original solution looked like.)

So far this branch contains a single commit, which is the squashed and rebased-on-top-of-master branch for PR #783, which may be summarized below.

Adds two new CLI commands:

 1. `neptune-cli index-of <address>` computes the derivation address from the given address.
 2. `neptune-cli rescan --block 1337 --address <address>` rescans block 1337 for incoming UTXOs.

Going forward I will synthesize the two apparently complementary approaches to rescanning using a unified command interface.

Adds two new CLI commands:

 1. `neptune-cli index-of <address>` computes the derivation address from the
    given address.
 2. `neptune-cli rescan --block 1337 --address <address>` rescans block 1337 for
    incoming UTXOs.

This commit is a squash of four commits, following a rebase on top of master
(currently, 957e2e2) of branch
`asz/better-incoming-utxo-tracking` which was the object of PR #783 [1].

[1]: #783

---

feat(CLI): `index-of`: Get the derivation index of the given address

Add a CLI command to neptune-cli for obtaining the derivation index from a given
address. Usage:

 > neptune-cli index-of <full-address>

Example output:

```
key type: Generation
index: 97
```

---

feat(CLI): Allow abbreviated addresses in `index-of`

---

feat(CLI/RPC): Add command for re-scanning a particular block

Add a CLI command, along with an RPC function and application support, for
re-scanning a particular block (identified by `BlockSelector`) for UTXOs bound
a given address. The wallet database will be appraised of any new UTXOs found,
and `incoming_randomness.dat` will get new entries for them.

Usage:

 > neptune-cli rescan --block 1337 --address <address>

Also!: deprecate `GenerationReceivingAddress::to_bech32m_abbreviated`. Reason:
we already have `ReceivingAddress::to_display_bech32m_abbreviated`, which works
for both `GenerationReceivingAddress` and `SymmetricKey` and it disagrees with
this method.

---

docs: Avoid HTML tags in CLI command docs
@aszepieniec aszepieniec marked this pull request as draft February 16, 2026 12:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant