Skip to content

Add copyToClipboard to bitcore-cli#4196

Open
kajoseph wants to merge 4 commits into
bitpay:masterfrom
kajoseph:cliCopyToClipboard
Open

Add copyToClipboard to bitcore-cli#4196
kajoseph wants to merge 4 commits into
bitpay:masterfrom
kajoseph:cliCopyToClipboard

Conversation

@kajoseph

@kajoseph kajoseph commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

Description

Copying public keys and invite codes during the TSS wallet setup can be cumbersome since the @clack/prompts cli interface adds formatting for multi-line outputs. This PR adds a copyToClipboard utility function that's implemented in the TSS wallet creation flow.

Changelog

  • Added copyToClipboard utility + integrated into TSS wallet creation flow
  • Fixed a few minor bugs:
    • TSS error handling
    • Bold text resetting
    • Null coalescing if txp.actions doesn't exist
    • Better --help info: removed --list option (which didn't work)

Testing Notes


Checklist

  • I have read CONTRIBUTING.md and verified that this PR follows the guidelines and requirements outlined in it.

@kajoseph kajoseph added the bitcore-cli This pull request modifies the bitcore-cli package label Jul 9, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves the bitcore-cli Threshold Signature (TSS) wallet setup UX by adding a cross-platform copyToClipboard utility and integrating “Copy to clipboard” actions into TSS create/join flows, alongside a handful of CLI robustness tweaks (formatting, error handling, help/options, and proposal/transaction parameter handling).

Changes:

  • Added Utils.copyToClipboard() and integrated “Copy to clipboard” actions into TSS create/join prompts.
  • Adjusted CLI formatting and error logging (bold/dim reset handling; clearer TSS signing error log).
  • Hardened some command flows (tx proposal actions optionality; transaction fee/tag handling; CLI help/usage tweaks) and updated tests accordingly.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
packages/bitcore-cli/test/create.test.ts Updates TSS flow tests to account for the new clipboard option in prompt navigation.
packages/bitcore-cli/src/utils.ts Adds clipboard support and improves ANSI formatting helpers for bold/dim interactions.
packages/bitcore-cli/src/tss.ts Updates TSS signing error logging behavior.
packages/bitcore-cli/src/prompts.ts Adjusts bold rendering in a dimmed prompt context.
packages/bitcore-cli/src/commands/txproposals.ts Makes txp action checks more null-safe (but contains a new optional-chaining .length bug).
packages/bitcore-cli/src/commands/transaction.ts Tightens destination tag validation and adjusts fee/nonce handling.
packages/bitcore-cli/src/commands/join/joinThresholdSig.ts Adds “Copy to clipboard” loop to the join flow for sharing the auth pubkey.
packages/bitcore-cli/src/commands/create/createThresholdSig.ts Adds “Copy to clipboard” loop to the create flow for sharing join codes.
packages/bitcore-cli/src/cli.ts Updates help/usage text and removes non-working --list option in favor of walletName === 'list'.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/bitcore-cli/src/commands/txproposals.ts
Comment thread packages/bitcore-cli/src/commands/join/joinThresholdSig.ts
Comment thread packages/bitcore-cli/src/commands/create/createThresholdSig.ts
Comment thread packages/bitcore-cli/src/tss.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bitcore-cli This pull request modifies the bitcore-cli package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants