Skip to content

docs(bitcoin): improve CLI UX, fix heading structure, reorder Direct API sections#170

Merged
marc0olo merged 2 commits into
mainfrom
docs/bitcoin-ux-improvements
Apr 29, 2026
Merged

docs(bitcoin): improve CLI UX, fix heading structure, reorder Direct API sections#170
marc0olo merged 2 commits into
mainfrom
docs/bitcoin-ux-improvements

Conversation

@marc0olo
Copy link
Copy Markdown
Member

Summary

CLI copy-paste UX

The ### Interact with ckBTC using icp-cli section previously had a single monolithic code block with YOUR-PRINCIPAL literals that required manual editing before every command. The section now:

  • Exports MY_PRINCIPAL from the active identity in one setup block (icp identity get-principal) so it never needs to be typed or edited.
  • Splits each operation into its own copy-paste block with $MY_PRINCIPAL interpolated via double-quote shell expansion.
  • The transfer command includes export RECIPIENT="<paste-recipient-principal>" at the top of the same block, keeping it a single copy-paste operation while making the placeholder explicit.

Direct Bitcoin API section reordering

Previous order mixed monitoring utilities in with core read operations and placed ### Blockchain info immediately after ### Available endpoints, before the developer's first instinct (get_balance, get_utxos). New order groups sections by purpose:

Before After
Bitcoin API canister IDs Bitcoin API canister IDs
Available endpoints Available endpoints
Blockchain info Read Bitcoin balance
Read Bitcoin balance Read UTXOs
Read UTXOs Get fee percentiles
Get fee percentiles Blockchain info
Developer workflow Developer workflow
(UTXO selection as h4) UTXO selection (h3)
Common mistakes Common mistakes
Cycle costs Cycle costs

Blockchain info is a monitoring/diagnostics call — it belongs after the core transaction-building reads, not before them.

Developer workflow heading structure

#### UTXO selection was the only h4 in the entire file, sitting as a lone child under ### Developer workflow. This:

  • Created a structurally awkward section (a heading with a single subheading implies the parent section exists only to contain one thing).
  • Buried the UTXO selection anchor below the fold of the workflow section.

The fix promotes #### UTXO selection to ### UTXO selection as a sibling of ### Developer workflow. The ### Developer workflow section now closes with the working-example links (which cover the full flow, not just UTXO selection), and step 3 in the numbered list links directly to #utxo-selection for readers who want to jump there.

Em-dash cleanup

The previous PR (#169) introduced several em-dashes in new prose. All instances outside code blocks are replaced with colons, semicolons, or parentheses per the project's banned-terms rule.

Sync recommendation

Informed by dfinity/examples — no source changes, documentation improvements only.

…API sections

Split the monolithic icp-cli block in the ckBTC section into individual
copy-paste commands, deriving MY_PRINCIPAL automatically from the active
identity instead of requiring manual substitution of a placeholder.

Promoted UTXO selection from a lone h4 to a sibling h3, moved the
working-example links to close out the Developer workflow section, and
reordered Direct Bitcoin API sections so read operations (balance, UTXOs,
fee percentiles, blockchain info) are grouped before the workflow and UTXO
selection content. Fixed all em-dashes introduced in the previous PR.
@marc0olo
Copy link
Copy Markdown
Member Author

Feedback addressed:

  • Fixed icp identity get-principalicp identity principal (the correct icp-cli command per .sources/icp-cli/docs/guides/managing-identities.md)

@marc0olo marc0olo merged commit e8f4e51 into main Apr 29, 2026
1 check passed
@marc0olo marc0olo deleted the docs/bitcoin-ux-improvements branch April 29, 2026 19:39
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