pub struct FunctionVerify<'info> {
pub function: AccountInfo<'info>,
pub function_enclave_signer: Signer<'info>,
pub verifier: AccountInfo<'info>,
pub verifier_signer: Signer<'info>,
pub verifier_permission: AccountInfo<'info>,
pub escrow_wallet: AccountInfo<'info>,
pub escrow_token_wallet: AccountInfo<'info>,
pub receiver: AccountInfo<'info>,
pub attestation_queue: AccountInfo<'info>,
pub token_program: AccountInfo<'info>,
}Fields§
§function: AccountInfo<'info>#[account( mut, seeds = [ FUNCTION_SEED, function.load()?.creator_seed.as_ref(), &function.load()?.created_at_slot.to_le_bytes() ], bump = function.load()?.bump, has_one = attestation_queue @ SwitchboardError::InvalidQueue, has_one = escrow_token_wallet @ SwitchboardError::InvalidEscrow, has_one = escrow_wallet, )] pub function: AccountLoader<’info, FunctionAccountData>,
function_enclave_signer: Signer<'info>§verifier: AccountInfo<'info>#[account( has_one = attestation_queue @ SwitchboardError::InvalidQueue, constraint = verifier.load()?.enclave.enclave_signer == verifier_signer.key() @ SwitchboardError::InvalidEnclaveSigner, )] pub verifier: AccountLoader<’info, VerifierAccountData>,
verifier_signer: Signer<'info>§verifier_permission: AccountInfo<'info>#[account( seeds = [ PERMISSION_SEED, attestation_queue.load()?.authority.as_ref(), attestation_queue.key().as_ref(), verifier.key().as_ref() ], bump = verifier_permission.load()?.bump, )] pub verifier_permission: AccountLoader<’info, AttestationPermissionAccountData>,
escrow_wallet: AccountInfo<'info>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>>,
receiver: AccountInfo<'info>#[account( mut, constraint = receiver.is_native() )] pub receiver: Box<Account<’info, TokenAccount>>,
attestation_queue: AccountInfo<'info>pub attestation_queue: AccountLoader<’info, AttestationQueueAccountData>,
token_program: AccountInfo<'info>pub token_program: Program<’info, Token>,
Implementations§
Source§impl<'info> FunctionVerify<'info>
impl<'info> FunctionVerify<'info>
pub fn get_instruction( &self, program_id: Pubkey, params: FunctionVerifyParams, ) -> Result<Instruction>
pub fn invoke( &self, program: AccountInfo<'info>, observed_time: i64, next_allowed_timestamp: i64, error_code: u8, mr_enclave: [u8; 32], ) -> ProgramResult
pub fn invoke_signed( &self, program: AccountInfo<'info>, observed_time: i64, next_allowed_timestamp: i64, error_code: u8, mr_enclave: [u8; 32], signer_seeds: &[&[&[u8]]], ) -> ProgramResult
pub fn build_ix( accounts: &FunctionVerifyAccounts, params: &FunctionVerifyParams, ) -> Result<Instruction, SbError>
target_os="solana" only.Trait Implementations§
Source§impl<'info> Accounts<'info, FunctionVerifyBumps> for FunctionVerify<'info>where
'info: 'info,
impl<'info> Accounts<'info, FunctionVerifyBumps> for FunctionVerify<'info>where
'info: 'info,
Source§fn try_accounts(
__program_id: &Pubkey,
__accounts: &mut &'info [AccountInfo<'info>],
__ix_data: &[u8],
__bumps: &mut FunctionVerifyBumps,
__reallocs: &mut BTreeSet<Pubkey>,
) -> Result<Self>
fn try_accounts( __program_id: &Pubkey, __accounts: &mut &'info [AccountInfo<'info>], __ix_data: &[u8], __bumps: &mut FunctionVerifyBumps, __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 FunctionVerify<'info>where
'info: 'info,
impl<'info> AccountsExit<'info> for FunctionVerify<'info>where
'info: 'info,
Source§impl<'info> Bumps for FunctionVerify<'info>where
'info: 'info,
impl<'info> Bumps for FunctionVerify<'info>where
'info: 'info,
Source§type Bumps = FunctionVerifyBumps
type Bumps = FunctionVerifyBumps
Source§impl Discriminator for FunctionVerify<'_>
impl Discriminator for FunctionVerify<'_>
const DISCRIMINATOR: [u8; 8]
fn discriminator() -> [u8; 8]
Source§impl<'info> ToAccountInfos<'info> for FunctionVerify<'info>where
'info: 'info,
impl<'info> ToAccountInfos<'info> for FunctionVerify<'info>where
'info: 'info,
fn to_account_infos(&self) -> Vec<AccountInfo<'info>>
Source§impl<'info> ToAccountMetas for FunctionVerify<'info>
impl<'info> ToAccountMetas for FunctionVerify<'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.Auto Trait Implementations§
impl<'info> Freeze for FunctionVerify<'info>
impl<'info> !RefUnwindSafe for FunctionVerify<'info>
impl<'info> !Send for FunctionVerify<'info>
impl<'info> !Sync for FunctionVerify<'info>
impl<'info> Unpin for FunctionVerify<'info>
impl<'info> !UnwindSafe for FunctionVerify<'info>
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more