Skip to content

fix: remove expiration parameter - #163

Merged
zpv merged 1 commit into
masterfrom
steven/remove-expiration-argument
Mar 17, 2022
Merged

fix: remove expiration parameter#163
zpv merged 1 commit into
masterfrom
steven/remove-expiration-argument

Conversation

@zpv

@zpvzpv commented Mar 17, 2022

Copy link
Copy Markdown
Collaborator

What

Remove expiration parameter from order offer builders

Why

No longer needed. Base refund locktime off of eventMaturityEpoch

@matthewjablackmatthewjablack 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.

LGTM 🎉

@zpv
zpv merged commit 857acc2 into masterMar 17, 2022
matthewjablack added a commit that referenced this pull request Jun 10, 2025
- Add protocol version support (PROTOCOL_VERSION = 1)
- Update serialization format from legacy TLV to modern DLC spec
- Add temporary_contract_id field support
- Implement sibling sub-type format with bigsize identifiers
- Change collection prefixes from u16 to bigsize
- Add TLV stream support with unknown TLV handling
- Add robust type validation and error handling
- Fix cross-package import compatibility (DlcOfferV0 → DlcOffer)
This transforms node-dlc from legacy format to modern DLC
specification standards.
matthewjablack added a commit that referenced this pull request Jun 22, 2025
• Add F64 class in @node-dlc/bufio for IEEE 754 precision handling
• Update HyperbolaPayoutCurvePiece to use F64 for all f64 parameters
• Smart JSON serialization: numbers for safe values, strings for large
• Rename EnumEventDescriptorV0 to EnumEventDescriptor with compat
• Update OptionInfo imports to simplified class names
• Simplify OrderOffer by removing complex funding fields
• Add comprehensive F64 and PayoutCurvePiece precision tests
• Fix fromJSON() zero value parsing with explicit undefined checks
• Add decimal.js dependency and export F64 from bufio
matthewjablack added a commit that referenced this pull request Jun 24, 2025
• Add F64 class in @node-dlc/bufio for IEEE 754 precision handling
• Update HyperbolaPayoutCurvePiece to use F64 for all f64 parameters
• Smart JSON serialization: numbers for safe values, strings for large
• Rename EnumEventDescriptorV0 to EnumEventDescriptor with compat
• Update OptionInfo imports to simplified class names
• Simplify OrderOffer by removing complex funding fields
• Add comprehensive F64 and PayoutCurvePiece precision tests
• Fix fromJSON() zero value parsing with explicit undefined checks
• Add decimal.js dependency and export F64 from bufio
matthewjablack added a commit that referenced this pull request Jun 24, 2025
• Add F64 class in @node-dlc/bufio for IEEE 754 precision handling
• Update HyperbolaPayoutCurvePiece to use F64 for all f64 parameters
• Smart JSON serialization: numbers for safe values, strings for large
• Rename EnumEventDescriptorV0 to EnumEventDescriptor with compat
• Update OptionInfo imports to simplified class names
• Simplify OrderOffer by removing complex funding fields
• Add comprehensive F64 and PayoutCurvePiece precision tests
• Fix fromJSON() zero value parsing with explicit undefined checks
• Add decimal.js dependency and export F64 from bufio
matthewjablack added a commit that referenced this pull request Jun 30, 2025
matthewjablack added a commit that referenced this pull request Jun 30, 2025
- breaking: complete DLC message serialization overhaul
- breaking: removed V0 suffixes from all message classes
- breaking: incompatible with previous versions
- added: full rust-dlc compatibility & protocol version 1
- added: F64 precision class for financial calculations
- enhanced: TypeScript type safety with discriminators
- fixed: Payout calculations & oracle message parsing
matthewjablack added a commit that referenced this pull request Apr 4, 2026
…rsion
Remove the heuristic-based backward compatibility logic that was attempting to
differentiate between old and new DlcOffer formats. The protocol_version field
is now always read as a 4-byte u32 as specified in dlcspecs PR #163.
This simplifies the parsing logic and ensures consistent handling of the
protocol version field across all DlcOffer messages.
matthewjablack added a commit that referenced this pull request Apr 8, 2026
…rsion (#237)
Remove the heuristic-based backward compatibility logic that was attempting to
differentiate between old and new DlcOffer formats. The protocol_version field
is now always read as a 4-byte u32 as specified in dlcspecs PR #163.
This simplifies the parsing logic and ensures consistent handling of the
protocol version field across all DlcOffer messages.
matthewjablack added a commit that referenced this pull request Jun 27, 2026
Re-introduces the heuristic for detecting old-format DlcOffer messages
that lack the protocol_version field (pre-dlcspecs PR #163).
The previous heuristic (removed in #237) incorrectly required
contract_flags === 0, which broke when contract_flags is 0x01
(refund-to-accepter). This version only checks whether the first 4 bytes
are a plausible protocol_version (1-10), matching the Rust
implementation in dlcdevkit.
Sign up for freeto 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

@zpv@matthewjablack