Skip to content

feat: output descriptors in contract params#271

Open
Kukks wants to merge 7 commits intonextfrom
hd-wallet-support-v2
Open

feat: output descriptors in contract params#271
Kukks wants to merge 7 commits intonextfrom
hd-wallet-support-v2

Conversation

@Kukks
Copy link
Copy Markdown
Contributor

@Kukks Kukks commented Jan 30, 2026

Summary

  • Add SeedIdentity class for HD wallet derivation from mnemonic/seed phrases
  • Implement BIP86 (Taproot) derivation paths with mainnet/testnet support
  • Add HD wallet methods: deriveSigningDescriptor, isOurs, signWithDescriptor, signMessageWithDescriptor
  • Add ReadonlySeedIdentity for watch-only wallets with HD support
  • Export SigningRequest interface for batched transaction signing

Test plan

  • Unit tests for SeedIdentity creation (fromMnemonic, fromSeed)
  • Unit tests for HD derivation and signing methods
  • Unit tests for ReadonlySeedIdentity
  • Verify backwards compatibility with existing Identity interface

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Jan 30, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review (1)
  • next-version

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch hd-wallet-support-v2

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Kukks
Copy link
Copy Markdown
Contributor Author

Kukks commented Jan 31, 2026

Closing in favor of PR #272 (descriptor-contract-params) which contains only the descriptor-related changes. The SeedIdentity HD wallet changes will be submitted in a separate PR.

@Kukks Kukks closed this Jan 31, 2026
@Kukks Kukks reopened this Jan 31, 2026
@Kukks Kukks force-pushed the hd-wallet-support-v2 branch from 6a96dd1 to 5a42a1c Compare January 31, 2026 11:30
@Kukks Kukks changed the title feat(identity): add HD wallet support for SeedIdentity feat: output descriptors in contract params Jan 31, 2026
@Kukks Kukks changed the base branch from next to hd-wallet-support January 31, 2026 11:30
@Kukks Kukks force-pushed the hd-wallet-support-v2 branch 2 times, most recently from 66d7a7a to c4fb803 Compare January 31, 2026 11:39
@Kukks Kukks closed this Jan 31, 2026
@Kukks Kukks reopened this Jan 31, 2026
@Kukks Kukks force-pushed the hd-wallet-support-v2 branch from 423e577 to cf5ab59 Compare January 31, 2026 11:57
@Kukks Kukks changed the base branch from hd-wallet-support to next January 31, 2026 12:08
Kukks added 6 commits March 2, 2026 20:12
… isOurs, signWithDescriptor, signMessageWithDescriptor)
… of Uint8Array

- Change DefaultContractParams.pubKey and serverPubKey from Uint8Array to string (descriptor format)
- Add walletDescriptor to PathContext interface (with walletPubKey deprecated)
- Update resolveRole() in helpers to check walletDescriptor first, extracting raw pubkeys for comparison
- deserializeParams() now normalizes hex pubkeys to descriptors via normalizeToDescriptor()
- serializeParams() stores descriptors directly (no hex encoding)
- createScript() extracts pubkey bytes from descriptors before passing to DefaultVtxo.Script
- Update all test helpers and tests to use valid secp256k1 x-only public keys with descriptor format
- Add new test file for descriptor-specific serialize/deserialize/round-trip tests
- Preserve DelegateContractHandler and VHTLC tests unchanged
@Kukks Kukks force-pushed the hd-wallet-support-v2 branch from b029904 to 832797f Compare March 2, 2026 20:38
…itcoin-descriptors library

Use defaultFactory.expand() from @kukks/bitcoin-descriptors instead of
hand-rolled regex patterns for extractPubKey and parseHDDescriptor.
Updated tests to use real descriptors generated from the test mnemonic.
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