Struct switchboard_solana::attestation_program::instructions::service_verify::FunctionServiceVerify
source · pub struct FunctionServiceVerify<'info> {
pub service: AccountInfo<'info>,
pub function_enclave_signer: AccountInfo<'info>,
pub escrow_wallet: AccountInfo<'info>,
pub escrow_token_wallet: AccountInfo<'info>,
pub function: AccountInfo<'info>,
pub function_escrow_token_wallet: Option<AccountInfo<'info>>,
pub verifier_quote: AccountInfo<'info>,
pub verifier_enclave_signer: AccountInfo<'info>,
pub verifier_permission: AccountInfo<'info>,
pub attestation_queue: AccountInfo<'info>,
pub receiver: AccountInfo<'info>,
pub token_program: AccountInfo<'info>,
}
Fields§
§service: AccountInfo<'info>
#[account( mut, has_one = function, has_one = escrow_wallet @ SwitchboardError::InvalidEscrow, has_one = escrow_token_wallet @ SwitchboardError::InvalidEscrow, constraint = service.pending_enclave.enclave_signer == function_enclave_signer.key() @ SwitchboardError::InvalidEnclaveSigner, )] pub service: Box<Account<’info, FunctionServiceAccountData>>,
function_enclave_signer: AccountInfo<'info>
§escrow_wallet: AccountInfo<'info>
#[account(mut)] pub escrow_wallet: Box<Account<’info, SwitchboardWallet>>,
escrow_token_wallet: AccountInfo<'info>
#[account( mut, constraint = escrow_token_wallet.is_native() )] pub escrow_token_wallet: Box<Account<’info, TokenAccount>>,
function: AccountInfo<'info>
#[account( mut, has_one = attestation_queue @ SwitchboardError::InvalidQueue, )] pub function: AccountLoader<’info, FunctionAccountData>,
function_escrow_token_wallet: Option<AccountInfo<'info>>
#[account( mut, constraint = escrow.is_native() && escrow.owner == state.key() )] pub function_escrow_token_wallet: 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>,
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> FunctionServiceVerify<'info>
impl<'info> FunctionServiceVerify<'info>
pub fn get_instruction( &self, program_id: Pubkey, params: &FunctionServiceVerifyParams ) -> Result<Instruction>
pub fn invoke( &self, program: AccountInfo<'info>, params: &FunctionServiceVerifyParams ) -> ProgramResult
pub fn invoke_signed( &self, program: AccountInfo<'info>, params: &FunctionServiceVerifyParams, signer_seeds: &[&[&[u8]]] ) -> ProgramResult
pub fn build_ix( accounts: &FunctionServiceVerifyAccounts, params: &FunctionServiceVerifyParams ) -> Result<Instruction, SbError>
Trait Implementations§
source§impl<'info> Accounts<'info, FunctionServiceVerifyBumps> for FunctionServiceVerify<'info>where
'info: 'info,
impl<'info> Accounts<'info, FunctionServiceVerifyBumps> for FunctionServiceVerify<'info>where
'info: 'info,
source§fn try_accounts(
__program_id: &Pubkey,
__accounts: &mut &'info [AccountInfo<'info>],
__ix_data: &[u8],
__bumps: &mut FunctionServiceVerifyBumps,
__reallocs: &mut BTreeSet<Pubkey>
) -> Result<Self>
fn try_accounts( __program_id: &Pubkey, __accounts: &mut &'info [AccountInfo<'info>], __ix_data: &[u8], __bumps: &mut FunctionServiceVerifyBumps, __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 FunctionServiceVerify<'info>where
'info: 'info,
impl<'info> AccountsExit<'info> for FunctionServiceVerify<'info>where
'info: 'info,
source§impl<'info> Bumps for FunctionServiceVerify<'info>where
'info: 'info,
impl<'info> Bumps for FunctionServiceVerify<'info>where
'info: 'info,
§type Bumps = FunctionServiceVerifyBumps
type Bumps = FunctionServiceVerifyBumps
source§impl Discriminator for FunctionServiceVerify<'_>
impl Discriminator for FunctionServiceVerify<'_>
const DISCRIMINATOR: [u8; 8] = _
fn discriminator() -> [u8; 8]
source§impl<'info> ToAccountInfos<'info> for FunctionServiceVerify<'info>where
'info: 'info,
impl<'info> ToAccountInfos<'info> for FunctionServiceVerify<'info>where
'info: 'info,
fn to_account_infos(&self) -> Vec<AccountInfo<'info>>
source§impl<'info> ToAccountMetas for FunctionServiceVerify<'info>
impl<'info> ToAccountMetas for FunctionServiceVerify<'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.