Skip to content

feat: Add BIP39 seed builder and DLC message type compliance#115

Merged
bennyhodl merged 4 commits into
masterfrom
seed-and-spec-compliance
Aug 26, 2025
Merged

feat: Add BIP39 seed builder and DLC message type compliance#115
bennyhodl merged 4 commits into
masterfrom
seed-and-spec-compliance

Conversation

@bennyhodl
Copy link
Copy Markdown
Owner

Summary

  • Added BIP39 mnemonic support to the Builder with a new SeedConfig enum
  • Made DLC messages spec-compliant by including type numbers in serialization
  • Extended seed bytes from 32 to 64 bytes to support BIP39 seed format

Changes

Seed Builder Enhancement

  • Introduced SeedConfig enum with three options:
    • Random: Generate a random seed
    • Mnemonic(String, String): Use BIP39 mnemonic with optional passphrase
    • Bytes([u8; 64]): Direct byte input
  • Extended seed size from 32 to 64 bytes throughout the codebase to support BIP39's seed format

DLC Message Type Compliance

  • Added types.rs module with all DLC message type constants
  • Modified impl_dlc_writeable! macro to include type IDs in serialization
  • Each message type now writes its type ID as the first field when serializing
  • Ensures compliance with DLC specification for message format

Comment thread ddk/src/builder.rs Outdated
@bennyhodl bennyhodl force-pushed the seed-and-spec-compliance branch from c9baef6 to 4504635 Compare August 26, 2025 03:39
@bennyhodl bennyhodl merged commit 5b05e25 into master Aug 26, 2025
155 of 174 checks passed
@bennyhodl bennyhodl deleted the seed-and-spec-compliance branch August 26, 2025 13:29
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.

2 participants