Account Structs
CPI account structures required for making calls to the Inco Lightning program.Operation
Used for all encrypted operations (arithmetic, comparison, bitwise, random, input functions, select).| Account | Mutable | Signer | Description |
|---|---|---|---|
signer | ✓ | ✓ | Transaction signer authorizing the operation |
Usage
Allow
Used for granting or revoking decryption access.| Account | Mutable | Signer | Description |
|---|---|---|---|
allowance_account | ✓ | PDA storing allowance state | |
signer | ✓ | ✓ | Handle owner authorizing the allowance |
allowed_address | Address being granted/revoked access | ||
system_program | System program for account creation |
PDA Derivation
The allowance account is a PDA derived from the handle and allowed address:Usage
IsAllowed
Used for checking if an address has decryption permission.| Account | Mutable | Signer | Description |
|---|---|---|---|
allowance_account | PDA storing allowance state | ||
allowed_address | Address to check permission for |
Usage
VerifySignature
Used for verifying Ed25519 signatures for attested decryption.| Account | Mutable | Signer | Description |
|---|---|---|---|
instructions | Instructions sysvar (SYSVAR_INSTRUCTIONS_ID) | ||
signer | ✓ | ✓ | Transaction signer authorizing the verification |