Skip to content

Commit df63978

Browse files
committed
add decode example in readme
1 parent cc6846c commit df63978

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

contrib/stacks-cli/README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,11 @@ A CLI for building and signing Stacks transactions and interacting with Clarity
1212
* `generate-sk`: Generate a new Stacks private key.
1313
* `addresses`: Derive Stacks and Bitcoin addresses from a private key.
1414
* **Decoding Helpers:**
15-
* `decode-tx`, `decode-block`, `decode-header`, etc. - Decode raw, hex-encoded data structures.
15+
* `decode-tx`: Decode a hex-encoded transaction.
16+
* `decode-header`: Decode a hex-encoded block header.
17+
* `decode-block`: Decode a hex-encoded block.
18+
* `decode-microblock`: Decode a hex-encoded microblock.
19+
* `decode-microblocks`: Decode a hex-encoded stream of microblocks.
1620

1721
### Build & Run
1822

@@ -45,6 +49,9 @@ cargo run -p stacks-cli -- token-transfer <SENDER_PRIVATE_KEY> <FEE_RATE> <NONCE
4549

4650
# Generate a new key and associated addresses
4751
cargo run -p stacks-cli -- generate-sk
52+
53+
# Decode a hex-encoded transaction from a string or stdin
54+
cargo run -p stacks-cli -- decode-tx <HEX_ENCODED_TRANSACTION>
4855
```
4956

5057
See `--help` on each subcommand for complete options (e.g., `cargo run -p stacks-cli -- publish -h`).

0 commit comments

Comments
 (0)