addSignersToInstruction
Attaches the provided TransactionSigners to the account metas of an instruction when applicable.
For an account meta to match a provided signer it:
- Must have a signer role (AccountRole.READONLY_SIGNER or AccountRole.WRITABLE_SIGNER).
- Must have the same address as the provided signer.
- Must not have an attached signer already.
Type Parameters
| Type Parameter | Description |
|---|---|
TInstruction extends Instruction<string, readonly (AccountLookupMeta<string, string> | AccountMeta<string>)[]> | The inferred type of the instruction provided. |
Parameters
| Parameter | Type |
|---|---|
signers | TransactionSigner[] |
instruction | | TInstruction | InstructionWithSigners & TInstruction |
Returns
InstructionWithSigners & TInstruction