Looking for a tutorial of grin-wallet CLI - View Wallet function (rewind_hash and scan rewind_hash) (150 grin bounty)

I will start this little tutorial by sharing operation system infos. i’am running Macos Big Sure 11.1

workstation@MacBook-Pro-de-workstation grin-wallet % uname -a

Darwin MacBook-Pro-de-workstation.local 20.2.0 Darwin Kernel Version 20.2.0: Wed Dec  2 20:39:59 PST 2020; root:xnu-7195.60.75~1/RELEASE_X86_64 x86_64

Here is the steps to BUILD the latest grin-wallet version. thank you @deev for sharing the steps

git clone https://github.com/mimblewimble/grin-wallet.git
cd grin-wallet
cargo build --release

Once completed you will find the executable file in the target/debug/ folder

First Let’s check our balance by running the “info” command like below :point_down:

workstation@MacBook-Pro-de-workstation grin-wallet % grin-wallet info

____ Wallet Summary Info - Account 'default' as of height 1308955 ____

 Confirmed Total                  | 0.731000000 
 Awaiting Confirmation (< 10)     | 0.731000000 
 Awaiting Finalization            | 0.000000000 
 Locked by previous transaction   | 0.000000000 
 -------------------------------- | ------------- 
 Currently Spendable              | 0.000000000 

Command 'info' completed successfully

the rewind_hash cmd will help us get the hash we can share publicly if you want to disclose your balance

grin-wallet rewind_hash
Wallet Rewind Hash
-------------------------------------
73ff74121c34e5e4fae53c1e7d1ef807ad36be63788f6730caff2bb19f0e45e2

in order for others to check your balance they will also need the latest grin-wallet version by using cmd in step 1 and run the command below :point_down:

grin-wallet scan_rewind_hash 73ff74121c34e5e4fae53c1e7d1ef807ad36be63788f6730caff2bb19f0e45e2

View Wallet Outputs - Block Height: 1308955
-----------------------------------------------------------------------------------------------------------------------------------------------
 Output Commitment                                                   MMR Index  Block Height  Locked Until  Coinbase?  # Confirms  Value 
===============================================================================================================================================
 09e2a601ecef1f1d1145c8ba66af77450e7fe7896fa125b080346aff86c1b1e8c6  10056359   1308949       1308949       false      7           0.731000000 
-----------------------------------------------------------------------------------------------------------------------------------------------

you can see that the Confirmed Total found by running the info command = Value found by running scan_rewind_hash (0.731)

10 Likes