Repository navigation
Conversation
The wallet wrote "DLC funding <id>", the funding outpoint label, and "DLC close <id>: <outcomes>" inline in its sync, and stateless wallets (Lygos) wrote the same strings on their own. contract::labels now owns the text so every DDK wallet's export reads the same. It returns plain strings with their txid/outpoint, so it needs no bip329 types and compiles without the manager feature. The wallet's sync uses it; the text is unchanged and a test pins it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Item 9 of #225. DDK's wallet sync writes
DLC funding <id>, the funding outpoint label andDLC close <id>: <outcomes>inline, and the Lygos wallet writes the same strings on its own.ddk::contract::labelsnow owns that text, so every DDK wallet's BIP-329 export reads the same. It builds without themanagerfeature.Changes
contract::labels:funding_labels(contract_id, outpoint) -> FundingLabelsreturns the transaction label and the output label, each paired with the txid or outpoint it belongs on.close_label(contract_id, outcomes) -> String.bip329types, so a stateless wallet wraps them in its own record type.wallet/command.rsuses the module for the funding labels and the close label.spendable: Some(false)stays with the BIP-329 record it belongs to.Not changed
DLC refund <id>andDLC cancel <temp id>. DDK has no refund or cancel label today; a refund close is written asDLC close <id>. Adding them would change exports on purpose, so it's left for a separate decision.Testing
cargo test -p ddk --lib: 81 passed, including the newlabel_text_is_stableand the existing label tests.cargo test -p ddk --test enumeration -- --ignored: the end-to-end flow writes the funding, outpoint and close labels and round-trips the JSONL export.cargo fmt --check,cargo clippy -- -D warningsandcargo check -p ddk --no-default-featurespass.:. That is fixed, and the test covers it.