Skip to content

chore: sync CLI languages with Rust CLI changes#766

Merged
erdemyerebasmaz merged 1 commit intomainfrom
claude/sync-cli
Mar 26, 2026
Merged

chore: sync CLI languages with Rust CLI changes#766
erdemyerebasmaz merged 1 commit intomainfrom
claude/sync-cli

Conversation

@erdemyerebasmaz
Copy link
Copy Markdown
Collaborator

Automated sync of language CLIs from Rust CLI changes.

Source commit: 33c2c86
Workflow run: View logs
Approved from: dry-run #23616423353

Language status:

  • ✅ C#
  • ✅ Dart
  • ❌ Go (patch failed to apply)
  • ⏭️ Kotlin (no changes needed)
  • ✅ Python
  • ✅ React Native
  • ⏭️ Swift (no changes needed)
  • ✅ TypeScript
Sync findings

C#

Divergences

  • Missing webhooks subcommand group (register, unregister, list) — present in Rust CLI (command/webhooks.rs), absent in C# CLI
  • buy-bitcoin command only supported Moonpay provider with --locked-amount-sat flag; Rust CLI supports both Moonpay and CashApp via --provider and --amount-sat flags
  • C# help output and tab-completion missing webhooks subcommand group
  • C# README missing webhooks in available commands list

Applied

  • Created Webhooks.cs with register, unregister, and list subcommand handlers matching Rust webhooks.rs
  • Updated Program.cs to dispatch webhooks subcommands, add webhook command names to tab-completion
  • Updated Commands.cs HandleBuyBitcoin to support --provider flag (moonpay/cashapp/cash_app/cash-app) and --amount-sat flag, matching Rust BuyBitcoin behavior
  • Updated Commands.cs buy-bitcoin description from "Buy Bitcoin via MoonPay" to "Buy Bitcoin using an external provider"
  • Updated Commands.cs PrintHelp to include webhooks subcommand group
  • Updated README.md to include webhooks in available commands

Skipped

  • None

Dart

Divergences

  • Contacts commands (add, update, delete, list) were stubbed with "Not yet supported" but the Flutter SDK has full contact APIs available
  • Webhooks command group (register, unregister, list) was entirely missing from the Dart CLI despite the Flutter SDK exposing the full webhook API
  • Buy-bitcoin command only supported MoonPay provider; Rust CLI also supports CashApp provider via BuyBitcoinRequest::CashApp
  • Passkey resolvePasskeySeed used stub Nostr operations (print "not yet supported") instead of calling the SDK's Passkey, NostrRelayConfig, passkey.listLabels(), passkey.storeLabel(), and passkey.getWallet() APIs which are available in the Flutter SDK
  • PasskeyConfig was missing the rpid field, which was parsed from CLI args but never passed through

Applied

  • Implemented all four contacts commands (add, update, delete, list) using SDK APIs in contacts.dart
  • Removed "not yet supported in Flutter" note from contacts help text in contacts.dart
  • Created new webhooks.dart with register, unregister, and list commands matching Rust CLI's webhooks.rs
  • Added webhooks dispatch, tab completion, and help text to cli.dart
  • Updated buy-bitcoin command to support both MoonPay and CashApp providers with --provider flag in commands.dart
  • Rewrote passkey.dart to use SDK Passkey class with NostrRelayConfig for proper Nostr label store/list/select and getWallet() for seed derivation
  • Added rpid field to PasskeyConfig class and passed it through from bin/breez_cli.dart
  • Added webhooks <subcommand> to README commands list

Skipped

  • YubiKey and FIDO2 passkey providers: These require platform-specific hardware access (USB HID for YubiKey OTP challenge-response, CTAP2/HID for FIDO2 hmac-secret). No mature Dart packages exist for YubiKey OTP slot challenge-response or CTAP2 hmac-secret extension. The file provider is fully implemented as a portable reference. Candidates evaluated: fido2_client (pub.dev) only supports mobile platform channels, not desktop CLI; no Dart equivalent of yubico-manager or ctap-hid-fido2 crates exists.

Go

Divergences

  • Missing webhooks command group (register, unregister, list) in Go CLI
  • buy-bitcoin missing --provider flag and CashApp support; flag named --amount instead of --amount-sat
  • set-user-settings flag mismatch: Rust uses -p/--private, Go used --spark-private-mode
  • fetch-conversion-limits used --token flag instead of positional token_identifier; missing -f short flag for --from-bitcoin
  • lnurl-withdraw missing -t short flag for --timeout

Applied

  • Created webhooks.go with register/unregister/list commands matching Rust webhooks.rs
  • Updated main.go to dispatch webhooks subcommand and add webhook completion entries
  • Updated commands.go PrintHelp to show webhooks subcommand group
  • Updated commands.go handleBuyBitcoin to support --provider flag (moonpay/cashapp), renamed --amount to --amount-sat, added CashApp variant
  • Updated commands.go handleSetUserSettings flag from --spark-private-mode to -p/--private
  • Updated commands.go handleFetchConversionLimits to use positional token_identifier and added -f short flag
  • Updated commands.go handleLnurlWithdraw to add -t short flag for --timeout
  • Updated serialization.go to include WebhookEventType and BuyBitcoinRequest variant prefixes
  • Updated README.md to list webhooks commands in Available Commands section

Python

Divergences

  • receive command missing --new-address flag for bitcoin address method (Rust has it since new_address field on BitcoinAddress variant)
  • buy-bitcoin command only supported MoonPay; Rust CLI added CashApp provider with --provider flag and renamed --locked-amount-sat to --amount-sat
  • webhooks subcommand group (register, unregister, list) entirely missing from Python CLI

Applied

  • Added --new-address flag to receive command parser and handler in commands.py
  • Updated buy-bitcoin to support --provider (moonpay/cashapp), --amount-sat, using BuyBitcoinRequest.CASH_APP / BuyBitcoinRequest.MOONPAY variants in commands.py
  • Created webhooks.py with register, unregister, and list subcommands matching Rust command/webhooks.rs
  • Integrated webhooks dispatch in main.py (import, REPL command routing, help output, tab completion)
  • Added webhooks to Available Commands in README.md

Skipped

  • Nothing skipped; all divergences were addressed

React Native

Divergences

  • Webhooks subcommand group (register, unregister, list) missing entirely from React Native CLI
  • buy-bitcoin command only supported MoonPay; Rust CLI supports both MoonPay and CashApp via --provider flag
  • list-payments --tx-type flag was parsed but the value was discarded (txType always set to undefined)
  • App.tsx event listener missing NewDeposits and LightningAddressChanged event types

Applied

  • Created src/webhooks.ts with register, unregister, list handlers matching Rust CLI webhooks.rs
  • Added webhooks command to registry, COMMAND_NAMES, and handler delegation in src/commands.ts
  • Added --provider flag and CashApp support to buy-bitcoin handler in src/commands.ts
  • Fixed list-payments --tx-type to parse TokenTransactionType values (transfer, mint, burn) in src/commands.ts
  • Added NewDeposits and LightningAddressChanged event handling in src/App.tsx
  • Updated README.md with webhooks and buy-bitcoin provider documentation

Skipped

  • Contacts subcommand remains stubbed — contacts API (addContact, listContacts, etc.) is not available in the React Native SDK
  • YubiKey and FIDO2 passkey providers remain stubbed — require platform-specific hardware access (USB HID, NFC) not available in React Native; file-based provider is fully implemented

TypeScript

Divergences

  • receive command missing --new-address flag for bitcoin payment method (Rust passes new_address to BitcoinAddress variant)
  • buy-bitcoin command missing --provider option and CashApp support; used old --locked-amount-sat instead of --amount-sat; BuyBitcoinRequest should use tagged union with type: 'moonpay' or type: 'cashApp'
  • webhooks subcommand group entirely missing (register, unregister, list) — Rust has full webhook management via WebhookCommand
  • README missing webhooks in Available Commands section

Applied

  • Added --new-address flag to receive command and pass newAddress in bitcoin payment method (commands.js)
  • Updated buy-bitcoin command with --provider option (default: moonpay), --amount-sat flag, and CashApp support using tagged union (commands.js)
  • Created webhooks.js with register, unregister, and list subcommands matching Rust webhooks.rs
  • Added webhooks import, command names, and registration in commands.js
  • Added webhooks to Available Commands section in README.md

Skipped

  • (none)

Warning

Some patches failed to apply. The target files may have changed since the sync ran.
Failed languages: golang
Consider re-running the sync for these languages.

@erdemyerebasmaz erdemyerebasmaz added the CLI Breez SDK CLI label Mar 26, 2026
@erdemyerebasmaz erdemyerebasmaz merged commit 0e435ec into main Mar 26, 2026
24 checks passed
@erdemyerebasmaz erdemyerebasmaz deleted the claude/sync-cli branch March 26, 2026 23:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLI Breez SDK CLI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant