SignV2 is the protocol’s main execution path. If a wallet is doing real work,
this instruction is usually involved.
What SignV2 carries
The instruction arguments identify:
- the active
role_id - the length of the nested instruction payload
- the nested instruction payload to execute
- the authority payload used to authenticate the role
SignV2 usually means checking both the execution
payload and the authority payload.
What the program does
At a high level,SignV2:
- loads the Swig config account and wallet-address PDA
- looks up the role by
role_id - authenticates the role through the standard or session path
- parses the nested instructions
- checks the role’s actions against those instructions
- signs execution through the wallet-address PDA
What permissions actually control
DuringSignV2, the program is not just checking whether a signer is valid. It
is checking whether the requested instruction shape fits the role’s action set.
Examples:
- SOL and token limit actions cap how much value can move
- destination-limited actions constrain where funds can go
Program,ProgramCurated,ProgramAll, andProgramScopecontrol CPI accessAllandAllButManageAuthorityrepresent broader execution authority
Why ProgramScope is special
ProgramScope is the most specialized execution permission in the protocol.
It is designed for cases where a role should be able to interact with a program
and a target account, but only within scoped numeric limits. The program uses
the stored field layout to validate the relevant balance or counter fields
during execution.
Why broad roles behave differently
Roles withAll or AllButManageAuthority are intentionally less constrained
than narrowly scoped roles. That makes them operationally useful, but it also
makes them the highest-risk roles in a wallet.
In practice:
- keep broad roles limited to admin or trusted automation paths
- use narrower transfer and program permissions for user-facing execution
Debugging a failed execution
When aSignV2 flow fails, the useful questions are:
- did the program load the intended
role_id - did the authority payload match the role’s authority type
- did the nested instruction payload match the role’s action set
- did a scoped limit, destination check, or program rule reject execution

