v0.3.0
[0.3.0] - 2026-01-11
Changed
Optional Change Output (Breaking)
- Change output is now optional: Transactions can be built without a change output, enabling wallet sweep use cases
TransactionPlan.change_indexis nowOption<usize>instead ofusize—Nonewhen no change output is present
Automatic Dust Change Handling
- Dust change is automatically omitted: When change would fall below the dust limit (310 sats P2WPKH / 330 sats P2TR), the change output is removed and the extra sats are counted as miner fees
calculate_change()now returnsResult<Option<u64>, FeeError>:Ok(Some(amount))when change is above dust limitOk(None)when change would be dust (caller should omit the change output)Err(InsufficientFunds)when inputs can't cover outputs + fees
- When a ZELD distribution is provided and change is omitted, the distribution array is automatically adjusted to match the final output count
Removed
Error Codes (Breaking)
FeeError::DustOutputremoved — dust change is now handled gracefully instead of erroringMinerError::MissingChangeOutputremoved — change output is no longer required- TypeScript:
ZeldMinerErrorCode.NO_CHANGE_OUTPUTremoved
Fixed
- Updated homepage URLs to
https://zeldhash.comacross all crates and packages
Migration Guide
Rust:
// Before (0.2.x)
let change_index: usize = plan.change_index;
// After (0.3.0)
match plan.change_index {
Some(idx) => { /* change output at idx */ }
None => { /* no change output (dust or sweep) */ }
}TypeScript:
// Before (0.2.x) — required exactly one change output
outputs: [
{ address: userAddr, amount: 60000, change: false },
{ address: changeAddr, change: true }, // required
]
// After (0.3.0) — change is optional; if provided but dust, it's omitted
outputs: [
{ address: userAddr, amount: 60000, change: false },
// No change output = sweep entire balance minus fees
]