Introduction
A ProgramExec authority accepts approval from a Solana program for a wallet operation.- Use when: an existing policy or approval integration decides whether an operation may proceed.
- For: apps consuming an integration that supplies ProgramExec approval instructions.
How it works
- Obtain the integration’s program ID and authorization instruction prefix.
- Create a role pairing that authority with the required wallet permissions.
- Ask the integration for an approval bound to the exact wallet operation.
- Pass the approval to the Swig builder, then submit the complete returned instruction list.
Approval contract
- The authorization prefix fits within 40 bytes; use the integration’s exact value.
- For wallet execution, the approval instruction’s first two accounts are the Swig config and wallet, in that order.
- The builder accepts one approval instruction in
preInstructionsand includes it in its output. - Other management operations can have different approval account requirements; follow the integration’s client.
SDK example
Register the integration
Authorize an operation
Supply a freshly fetchedswig, its ProgramExec role ID, and the integration’s approval for walletInstructions.

