Struct switchboard_solana::attestation_program::instructions::request_verify::FunctionRequestVerify
source · pub struct FunctionRequestVerify<'info> {
pub request: AccountInfo<'info>,
pub function_enclave_signer: AccountInfo<'info>,
pub escrow: AccountInfo<'info>,
pub function: AccountInfo<'info>,
pub function_escrow: Option<AccountInfo<'info>>,
pub verifier_quote: AccountInfo<'info>,
pub verifier_enclave_signer: AccountInfo<'info>,
pub verifier_permission: AccountInfo<'info>,
pub state: AccountInfo<'info>,
pub attestation_queue: AccountInfo<'info>,
pub receiver: AccountInfo<'info>,
pub token_program: AccountInfo<'info>,
}
Fields§
§request: AccountInfo<'info>
#[account( mut, has_one = function, has_one = escrow @ SwitchboardError::InvalidEscrow, )] pub request: Box<Account<’info, FunctionRequestAccountData>>,
function_enclave_signer: AccountInfo<'info>
§escrow: AccountInfo<'info>
#[account( mut, constraint = escrow.is_native() && escrow.owner == state.key() )] pub escrow: Box<Account<’info, TokenAccount>>,
function: AccountInfo<'info>
#[account( mut, has_one = attestation_queue @ SwitchboardError::InvalidQueue, )] pub function: AccountLoader<’info, FunctionAccountData>,
function_escrow: Option<AccountInfo<'info>>
#[account( mut, constraint = escrow.is_native() && escrow.owner == state.key() )] pub function_escrow: Option<Box<Account<’info, TokenAccount>>>,
verifier_quote: AccountInfo<'info>
#[account( has_one = attestation_queue @ SwitchboardError::InvalidQueue, constraint = verifier_quote.load()?.enclave.enclave_signer == verifier_enclave_signer.key() @ SwitchboardError::InvalidEnclaveSigner, )] pub verifier_quote: AccountLoader<’info, VerifierAccountData>,
verifier_enclave_signer: AccountInfo<'info>
§verifier_permission: AccountInfo<'info>
#[account( seeds = [ PERMISSION_SEED, attestation_queue.load()?.authority.as_ref(), attestation_queue.key().as_ref(), verifier_quote.key().as_ref() ], bump = verifier_permission.load()?.bump, )] pub verifier_permission: AccountLoader<’info, AttestationPermissionAccountData>,
state: AccountInfo<'info>
#[account( seeds = STATE_SEED, bump = state.load()?.bump, )] pub state: AccountLoader<’info, AttestationProgramState>,
attestation_queue: AccountInfo<'info>
pub attestation_queue: AccountLoader<’info, AttestationQueueAccountData>,
receiver: AccountInfo<'info>
#[account( mut, constraint = receiver.is_native() )] pub receiver: Box<Account<’info, TokenAccount>>,
token_program: AccountInfo<'info>
pub token_program: Program<’info, Token>,
Implementations§
source§impl<'info> FunctionRequestVerify<'info>
impl<'info> FunctionRequestVerify<'info>
pub fn get_instruction( &self, program_id: Pubkey, params: &FunctionRequestVerifyParams ) -> Result<Instruction>
pub fn invoke( &self, program: AccountInfo<'info>, params: &FunctionRequestVerifyParams ) -> ProgramResult
pub fn invoke_signed( &self, program: AccountInfo<'info>, params: &FunctionRequestVerifyParams, signer_seeds: &[&[&[u8]]] ) -> ProgramResult
pub fn build_ix( accounts: &FunctionRequestVerifyAccounts, params: &FunctionRequestVerifyParams ) -> Result<Instruction, SbError>
Trait Implementations§
source§impl<'info> Accounts<'info, FunctionRequestVerifyBumps> for FunctionRequestVerify<'info>where
'info: 'info,
impl<'info> Accounts<'info, FunctionRequestVerifyBumps> for FunctionRequestVerify<'info>where
'info: 'info,
source§fn try_accounts(
__program_id: &Pubkey,
__accounts: &mut &'info [AccountInfo<'info>],
__ix_data: &[u8],
__bumps: &mut FunctionRequestVerifyBumps,
__reallocs: &mut BTreeSet<Pubkey>
) -> Result<Self>
fn try_accounts( __program_id: &Pubkey, __accounts: &mut &'info [AccountInfo<'info>], __ix_data: &[u8], __bumps: &mut FunctionRequestVerifyBumps, __reallocs: &mut BTreeSet<Pubkey> ) -> Result<Self>
Mint
account from the SPL token program in a particular
field, then it should be impossible for this method to return Ok
if
any other account type is given–from the SPL token program or elsewhere. Read moresource§impl<'info> AccountsExit<'info> for FunctionRequestVerify<'info>where
'info: 'info,
impl<'info> AccountsExit<'info> for FunctionRequestVerify<'info>where
'info: 'info,
source§impl<'info> Bumps for FunctionRequestVerify<'info>where
'info: 'info,
impl<'info> Bumps for FunctionRequestVerify<'info>where
'info: 'info,
§type Bumps = FunctionRequestVerifyBumps
type Bumps = FunctionRequestVerifyBumps
source§impl Discriminator for FunctionRequestVerify<'_>
impl Discriminator for FunctionRequestVerify<'_>
const DISCRIMINATOR: [u8; 8] = _
fn discriminator() -> [u8; 8]
source§impl<'info> ToAccountInfos<'info> for FunctionRequestVerify<'info>where
'info: 'info,
impl<'info> ToAccountInfos<'info> for FunctionRequestVerify<'info>where
'info: 'info,
fn to_account_infos(&self) -> Vec<AccountInfo<'info>>
source§impl<'info> ToAccountMetas for FunctionRequestVerify<'info>
impl<'info> ToAccountMetas for FunctionRequestVerify<'info>
source§fn to_account_metas(&self, is_signer: Option<bool>) -> Vec<AccountMeta>
fn to_account_metas(&self, is_signer: Option<bool>) -> Vec<AccountMeta>
is_signer
is given as an optional override for the signer meta field.
This covers the edge case when a program-derived-address needs to relay
a transaction from a client to another program but sign the transaction
before the relay. The client cannot mark the field as a signer, and so
we have to override the is_signer meta field given by the client.