Struct switchboard_on_demand::on_demand::accounts::queue::QueueAccountData
source · #[repr(C)]pub struct QueueAccountData {Show 18 fields
pub authority: Pubkey,
pub mr_enclaves: [[u8; 32]; 32],
pub oracle_keys: [Pubkey; 128],
pub max_quote_verification_age: i64,
pub last_heartbeat: i64,
pub node_timeout: i64,
pub oracle_min_stake: u64,
pub allow_authority_override_after: i64,
pub mr_enclaves_len: u32,
pub oracle_keys_len: u32,
pub reward: u32,
pub curr_idx: u32,
pub gc_idx: u32,
pub require_authority_heartbeat_permission: u8,
pub require_authority_verify_permission: u8,
pub require_usage_permissions: u8,
pub mint: Pubkey,
pub _ebuf: [u8; 1024],
/* private fields */
}
Fields§
The address of the authority which is permitted to add/remove allowed enclave measurements.
mr_enclaves: [[u8; 32]; 32]
Allowed enclave measurements.
oracle_keys: [Pubkey; 128]
The addresses of the quote oracles who have a valid verification status and have heartbeated on-chain recently.
max_quote_verification_age: i64
The maximum allowable time until a EnclaveAccount needs to be re-verified on-chain.
last_heartbeat: i64
The unix timestamp when the last quote oracle heartbeated on-chain.
node_timeout: i64
§oracle_min_stake: u64
The minimum number of lamports a quote oracle needs to lock-up in order to heartbeat and verify other quotes.
mr_enclaves_len: u32
The number of allowed enclave measurements.
oracle_keys_len: u32
The length of valid quote oracles for the given attestation queue.
reward: u32
The reward paid to quote oracles for attesting on-chain.
curr_idx: u32
Incrementer used to track the current quote oracle permitted to run any available functions.
gc_idx: u32
Incrementer used to garbage collect and remove stale quote oracles.
require_usage_permissions: u8
§mint: Pubkey
§_ebuf: [u8; 1024]
Reserved.
Implementations§
source§impl QueueAccountData
impl QueueAccountData
pub fn size() -> usize
sourcepub fn new<'info>(
attestation_queue_account_info: &'info AccountInfo<'info>,
) -> Result<Ref<'info, QueueAccountData>, OnDemandError>
pub fn new<'info>( attestation_queue_account_info: &'info AccountInfo<'info>, ) -> Result<Ref<'info, QueueAccountData>, OnDemandError>
Returns the deserialized Switchboard AttestationQueue account
§Arguments
attestation_queue_account_info
- A Solana AccountInfo referencing an existing Switchboard AttestationQueue
§Examples
use switchboard_solana::QueueAccountData;
let attestation_queue = QueueAccountData::new(attestation_queue_account_info)?;
sourcepub fn new_from_bytes(data: &[u8]) -> Result<&QueueAccountData, OnDemandError>
pub fn new_from_bytes(data: &[u8]) -> Result<&QueueAccountData, OnDemandError>
pub fn has_mr_enclave(&self, mr_enclave: &[u8]) -> bool
pub fn permitted_enclaves(&self) -> Vec<[u8; 32]>
pub fn garbage_collection_node(&self) -> Option<Pubkey>
pub fn idx_of_oracle(&self, oracle: &Pubkey) -> Option<usize>
pub fn oracle_keys(&self) -> Vec<Pubkey>
pub async fn fetch_async( client: &RpcClient, pubkey: Pubkey, ) -> Result<Self, OnDemandError>
pub async fn fetch_oracles( &self, client: &RpcClient, ) -> Result<Vec<(Pubkey, OracleAccountData)>, OnDemandError>
Trait Implementations§
source§impl AccountDeserialize for QueueAccountData
impl AccountDeserialize for QueueAccountData
source§fn try_deserialize(buf: &mut &[u8]) -> Result<Self, Error>
fn try_deserialize(buf: &mut &[u8]) -> Result<Self, Error>
Mint
account into a token
Account
.source§fn try_deserialize_unchecked(buf: &mut &[u8]) -> Result<Self, Error>
fn try_deserialize_unchecked(buf: &mut &[u8]) -> Result<Self, Error>
source§impl Clone for QueueAccountData
impl Clone for QueueAccountData
source§fn clone(&self) -> QueueAccountData
fn clone(&self) -> QueueAccountData
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for QueueAccountData
impl Debug for QueueAccountData
source§impl Discriminator for QueueAccountData
impl Discriminator for QueueAccountData
const DISCRIMINATOR: [u8; 8] = _
fn discriminator() -> [u8; 8]
impl Copy for QueueAccountData
impl Pod for QueueAccountData
Auto Trait Implementations§
impl Freeze for QueueAccountData
impl RefUnwindSafe for QueueAccountData
impl Send for QueueAccountData
impl Sync for QueueAccountData
impl Unpin for QueueAccountData
impl UnwindSafe for QueueAccountData
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§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
§impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
§type Bits = T
type Bits = T
Self
must have the same layout as the specified Bits
except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern
.§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
bits
as &Self
.source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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