pub struct FunctionRequestInit<'info> {
pub request: AccountInfo<'info>,
pub authority: AccountInfo<'info>,
pub function: AccountInfo<'info>,
pub function_authority: Option<AccountInfo<'info>>,
pub escrow: AccountInfo<'info>,
pub mint: AccountInfo<'info>,
pub state: AccountInfo<'info>,
pub attestation_queue: AccountInfo<'info>,
pub payer: AccountInfo<'info>,
pub system_program: AccountInfo<'info>,
pub token_program: AccountInfo<'info>,
pub associated_token_program: AccountInfo<'info>,
}Fields§
§request: AccountInfo<'info>CHECK: the authority of the request
function: AccountInfo<'info>CHECK: function authority required to permit new requests
escrow: AccountInfo<'info>§mint: AccountInfo<'info>§state: AccountInfo<'info>§attestation_queue: AccountInfo<'info>§payer: AccountInfo<'info>§system_program: AccountInfo<'info>§token_program: AccountInfo<'info>§associated_token_program: AccountInfo<'info>Implementations§
Source§impl<'info> FunctionRequestInit<'info>
impl<'info> FunctionRequestInit<'info>
pub fn get_instruction( &self, program_id: Pubkey, params: FunctionRequestInitParams, ) -> Result<Instruction>
Sourcepub fn invoke(
&self,
program: AccountInfo<'info>,
max_container_params_len: Option<u32>,
container_params: Option<Vec<u8>>,
garbage_collection_slot: Option<u64>,
) -> ProgramResult
pub fn invoke( &self, program: AccountInfo<'info>, max_container_params_len: Option<u32>, container_params: Option<Vec<u8>>, garbage_collection_slot: Option<u64>, ) -> ProgramResult
Invokes the instruction using a signed authority.
§Arguments
-
program: The Switchboard Attestation program AccountInfo. -
max_container_params_len: The maximum length of the vector containing the container parameters.- Default: 256 bytes.
- Example:
Some(512).
-
container_params: The parameters for the container.- Default: Empty vector.
- Example:
Some(request_params.into_bytes()).
-
garbage_collection_slot: The slot when the request can be closed by anyone and is considered expired.- Default: None, meaning only the authority can close the request.
§Returns
ProgramResult: Indicates the result of the instruction execution.
Sourcepub fn invoke_signed(
&self,
program: AccountInfo<'info>,
max_container_params_len: Option<u32>,
container_params: Option<Vec<u8>>,
garbage_collection_slot: Option<u64>,
signer_seeds: &[&[&[u8]]],
) -> ProgramResult
pub fn invoke_signed( &self, program: AccountInfo<'info>, max_container_params_len: Option<u32>, container_params: Option<Vec<u8>>, garbage_collection_slot: Option<u64>, signer_seeds: &[&[&[u8]]], ) -> ProgramResult
Invokes the instruction using a signed authority.
§Arguments
-
program: The Switchboard Attestation program AccountInfo. -
max_container_params_len: The maximum length of the vector containing the container parameters.- Default: 256 bytes.
- Example:
Some(512).
-
container_params: The parameters for the container.- Default: Empty vector.
- Example:
Some(request_params.into_bytes()).
-
garbage_collection_slot: The slot when the request can be closed by anyone and is considered expired.- Default: None, meaning only the authority can close the request.
-
signer_seeds: Seeds used for signing.
§Returns
ProgramResult: Indicates the result of the instruction execution.
Trait Implementations§
Source§impl<'info> Accounts<'info, FunctionRequestInitBumps> for FunctionRequestInit<'info>where
'info: 'info,
impl<'info> Accounts<'info, FunctionRequestInitBumps> for FunctionRequestInit<'info>where
'info: 'info,
Source§fn try_accounts(
__program_id: &Pubkey,
__accounts: &mut &'info [AccountInfo<'info>],
__ix_data: &[u8],
__bumps: &mut FunctionRequestInitBumps,
__reallocs: &mut BTreeSet<Pubkey>,
) -> Result<Self>
fn try_accounts( __program_id: &Pubkey, __accounts: &mut &'info [AccountInfo<'info>], __ix_data: &[u8], __bumps: &mut FunctionRequestInitBumps, __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 FunctionRequestInit<'info>where
'info: 'info,
impl<'info> AccountsExit<'info> for FunctionRequestInit<'info>where
'info: 'info,
Source§impl<'info> Bumps for FunctionRequestInit<'info>where
'info: 'info,
impl<'info> Bumps for FunctionRequestInit<'info>where
'info: 'info,
Source§type Bumps = FunctionRequestInitBumps
type Bumps = FunctionRequestInitBumps
Source§impl Discriminator for FunctionRequestInit<'_>
impl Discriminator for FunctionRequestInit<'_>
const DISCRIMINATOR: [u8; 8]
fn discriminator() -> [u8; 8]
Source§impl<'info> ToAccountInfos<'info> for FunctionRequestInit<'info>where
'info: 'info,
impl<'info> ToAccountInfos<'info> for FunctionRequestInit<'info>where
'info: 'info,
fn to_account_infos(&self) -> Vec<AccountInfo<'info>>
Source§impl<'info> ToAccountMetas for FunctionRequestInit<'info>
impl<'info> ToAccountMetas for FunctionRequestInit<'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 FunctionRequestInit<'info>
impl<'info> !RefUnwindSafe for FunctionRequestInit<'info>
impl<'info> !Send for FunctionRequestInit<'info>
impl<'info> !Sync for FunctionRequestInit<'info>
impl<'info> Unpin for FunctionRequestInit<'info>
impl<'info> !UnwindSafe for FunctionRequestInit<'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