TransactionModifyingSigner
A signer interface that potentially modifies the provided Transaction | Transactions before signing them.
For instance, this enables wallets to inject additional instructions into the
transaction before signing them. For each transaction, instead of returning a
SignatureDictionary, its
TransactionModifyingSigner#modifyAndSignTransactions | modifyAndSignTransactions function
returns an updated Transaction with a potentially modified set of instructions and
signature dictionary. The returned transaction must be within the transaction size limit,
and include a lifetimeConstraint.
Type Parameters
| Type Parameter | Default type | Description | 
|---|---|---|
| TAddressextendsstring | string | Supply a string literal to define a signer having a particular address. | 
Example
Remarks
Here are the main characteristics of this signer interface:
- Sequential. Contrary to partial signers, these cannot be executed in parallel as each call can modify the provided transactions.
- First signers. For a given transaction, a modifying signer must always be used before a partial signer as the former will likely modify the transaction and thus impact the outcome of the latter.
- Potential conflicts. If more than one modifying signer is provided, the second signer may invalidate the signature of the first one. However, modifying signers may decide not to modify a transaction based on the existence of signatures for that transaction.