You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, our Input type requires you to set a witness_index. This is propagates to the methods get_asset_inputs_for_amount, add_fee_resources which is especially painful because they are defined on the Account trait. Predicates as an implementor of Account have no use for the witness_index.
witness_index is the index in the witnesses field of a transaction where the signature of the wallet that owns the input is expected to be found. It's quite tricky to avoid exposing this on a higher level as we can't ignore the order of signatures because every signer also signs over the witnesses field and thereby includes every previous signature.
@segfault-magnet mentioned the possibility of storing calls to sign_transaction as intentions which will be applied in a post-processing step, similarly to how we handle dynamic data encoding for predicates.
Another option might be to always default to idx 0 (or 1 in the case of Contract txs) and have a special interface for creating txs with multiple signatures since they are more of a niche use-case.
The text was updated successfully, but these errors were encountered:
closes: #965
BREAKING CHANGE:
- `send_transaction`, `dry_run`, `dry_run_no_validation` and
`estimate_transaction_cost` need ownership of the `tx`.
- removed witness index from `Input` and corresponding functions
- wallet's `sign_transaction` now accepts a `TransactionBuilder`
Co-authored-by: MujkicA <ahmedmujkic2@gmail.com>
closes: #965
BREAKING CHANGE:
- `send_transaction`, `dry_run`, `dry_run_no_validation` and
`estimate_transaction_cost` need ownership of the `tx`.
- removed witness index from `Input` and corresponding functions
- wallet's `sign_transaction` now accepts a `TransactionBuilder`
Co-authored-by: MujkicA <ahmedmujkic2@gmail.com>
Currently, our
Input
type requires you to set awitness_index
. This is propagates to the methodsget_asset_inputs_for_amount
,add_fee_resources
which is especially painful because they are defined on theAccount
trait. Predicates as an implementor ofAccount
have no use for thewitness_index
.witness_index
is the index in thewitnesses
field of a transaction where the signature of the wallet that owns the input is expected to be found. It's quite tricky to avoid exposing this on a higher level as we can't ignore the order of signatures because every signer also signs over thewitnesses
field and thereby includes every previous signature.@segfault-magnet mentioned the possibility of storing calls to
sign_transaction
as intentions which will be applied in a post-processing step, similarly to how we handle dynamic data encoding for predicates.Another option might be to always default to idx 0 (or 1 in the case of Contract txs) and have a special interface for creating txs with multiple signatures since they are more of a niche use-case.
The text was updated successfully, but these errors were encountered: