Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CLI command to list tBTC deposits (#3545)
We added a CLI command to list the tBTC deposits. The command queries the chain for revealed deposits and outputs their details to stdout. To list all deposits run: ``` keep-client coordinator deposits ``` Following flags can be used with the command: - `--wallet <address>` - filter deposits only for a given wallet - `--hide-swept` - doesn't show deposits that were already swept - `--sort-amount` - sort output by the deposit amount - `--head <number>` - show `<number>` first deposits - `--tail <number>` - show `<number>` last deposits The command requires `ethereum` and `bitcoin` node details to be provided in the config. ### Funding Transaction The command outputs the Bitcoin funding transaction details in a specific format: `<transaction hash>:<output index>` (e.g. `a3d1781b59d5e8680772a8bb7f897c4ff0459d3465d7fa678f80a4f0ec900574:1`). The same format will be required by another CLI command to propose deposits sweep. ## Example Sample execution of the command for Goerli network: ``` ✗ keep-client --config ./configs/forked/config.toml --goerli \ coordinator \ deposits \ --wallet 0x03b74d6893ad46dfdd01b9e0e3b3385f4fce2d1e \ --sort-amount \ --head 5 ``` **Output:** ``` index wallet value (BTC) deposit key funding transaction confirmations swept 0 0x03b74d6893ad46dfdd01b9e0e3b3385f4fce2d1e 0.01000 0x06cdc15cbf3f024d05d164b9fcabfe3a6af7180b20ed2b685cf3a2241426667f c0a91a81b401aae3bc639ef24bc686e1b59b83472a9b571510c34c03cc60414a:0 0 false 1 0x03b74d6893ad46dfdd01b9e0e3b3385f4fce2d1e 0.01000 0xc0612aed21365628908474f634a60124eb4ab3440f133602aaedb06310a6275d 63cb18fdbe4ceb8b0747dbfcb11989605f78cffbe4379b9047124118cfc20aef:0 14212 false 2 0x03b74d6893ad46dfdd01b9e0e3b3385f4fce2d1e 0.01000 0xc77584f754d98abef75223e7dadfc02484c87052670de6038514a9b951e94156 46a9b50dd44f11364d9924bd7995830cd7cd1a772910f22ed7ab507137653c6d:0 14199 false 3 0x03b74d6893ad46dfdd01b9e0e3b3385f4fce2d1e 0.01000 0x89835e76759b3e0f2ca5057c0738d6f792083be4aaf8e064d9733720f9973e0c d07564117859bf7b3ee02bd6659d846d1ea5c4b7c204295ab1270948be615047:0 14052 false 4 0x03b74d6893ad46dfdd01b9e0e3b3385f4fce2d1e 0.01000 0x78cd69a78750f31d49a4693281a97448581361c7e93a9a70ea3a4931199b6c87 8356227b87fb191d61cff2455cd3f8c33ae208c69a7698b5baf1a331db6d4d8f:1 13981 false ```
- Loading branch information