From 9ffad3c8c9234242219a71172c1e8a0c3ae76992 Mon Sep 17 00:00:00 2001 From: bochaco Date: Thu, 25 Jan 2024 16:30:28 -0300 Subject: [PATCH] docs(readme): add instructions of out-of-band transaction signing --- README.md | 39 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 37 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7a331e529c..c7d9cd942c 100644 --- a/README.md +++ b/README.md @@ -96,10 +96,45 @@ killall safenode || true && RUST_LOG=safenode,safe cargo run --bin testnet -- -- `cargo run --release --bin safe -- wallet address` - Send tokens to an address, this will output a Transfer hex string that you must send to the recipient out-of-band - `cargo run --release --bin safe -- wallet send [amount] [address]` + `cargo run --release --bin safe -- wallet send
` - Receive tokens from a Transfer hex string - `cargo run --release --bin safe -- wallet receive [transfer]` + `cargo run --release --bin safe -- wallet receive ` + +### Out of band transaction signing + +Steps on the online device/computer: +1. Create a watch-only wallet using the hex-encoded public key: + `cargo run --release --bin safe -- wowallet create ` + +2. Deposit a cash-note, owned by the public key used above when creating, into the watch-only wallet: + `cargo run --release --bin safe -- wowallet deposit --cash-note ` + +3. Build an unsigned transaction: + `cargo run --release --bin safe -- wowallet transaction ` + +4. Copy the built unsigned Tx generated by the above command, and send it out-of-band to the desired device where the hot-wallet can be loaded. + +Steps on the offline device/computer: + +5. If you still don't have a hot-wallet created, which owns the cash-notes used to build the unsigned transaction, create it with the corresponding secret key: + `cargo run --release --bin safe -- wallet create ` + +6. Use the hot-wallet to sign the built transaction: + `cargo run --release --bin safe -- wallet sign ` + +7. Copy the signed Tx generated by the above command, and send it out-of-band back to the online device. + +Steps on the online device/computer: + +8. Broadcast the signed transaction to the network using the watch-only wallet: + `cargo run --release --bin safe -- wowallet broadcast ` + +9. Deposit the change cash-note to the watch-only wallet: + `cargo run --release --bin safe -- wowallet deposit ` + +10. Send/share the output cash-note generated by the above command at step #8 to/with the recipient. + ## Auditing