Various fixes for deadcat example - #4
Draft
stringhandler wants to merge 9 commits into
Draft
Conversation
A utxo_type resolved its compile params and leaf refs against whatever was ambient at each mention, so one type could derive two different addresses in two actions with no error — an address is a hash, and a wrong one looks like a right one. Declaring `params` now closes the scope: a site binds them with `args`, defaults may read instance scope only, and validate proves every site binds what it must. Also types two fields that were bare JSON (`destination`, taproot leaf payload items), so the schema links them and malformed ones fail at load instead of silently skipping an output; fixes a declared change output being dropped for having no amount_sat; adds a backstop that no declared input can vanish from the PSET; and resolves covenant input assets by label like every other path.
An address and its script hash are two views of one destination: the covenant commits
to the hash, the transaction pays to the address, and if they disagree the spend fails
on-chain. A manifest could only state them separately. `compute: {type: script_hash}`
now derives one from the other.
Three fixes found by using it. A pinned outpoint's amount and asset are read from the
chain rather than defaulted to 0 or retyped by hand — that value is what the sighash
commits to. `confidential: false` now beats an address's own blinding key, which a
covenant reading the output amount requires and which was honoured for wallet
destinations only. And a witness may be written as bare hex, which every hash this
crate produces is, without being reinterpreted when it is also valid decimal.
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.
No description provided.