mintlayer-core
mintlayer-core copied to clipboard
Translate `Destination` into script
The Destination type is now included directly in the script. It could be broken down into its constituent parts during translation and represented in script explicitly:
- The
Signaturescript primitive to just take a pubkey / signature pair, verifying just one signature, rather than a destination. - The multisig destination is represented using the
Thresholdconstruct
This is slightly more versatile and unifies code paths between various ways of representing multisigs. Also more suitable to place on chain with a canonical way of encoding mutisig rather than having a choice between a threshold of signle sig destinations or a destination with a multisig in it.
There is also currently duplication in witness lookup by the signature verification function and the witness included in the script. This awkwardness would be resolved by having a canonical way of doing signature checks.