#[repr(packed(1))]pub struct VerifierAccountData {
pub enclave: Quote,
pub authority: Pubkey,
pub attestation_queue: Pubkey,
pub created_at: i64,
pub is_on_queue: bool,
pub last_heartbeat: i64,
pub reward_escrow: Pubkey,
pub stake_wallet: Pubkey,
pub success_ewma: Ewma,
pub failure_ewma: Ewma,
pub gateway_uri: [u8; 64],
pub _ebuf: [u8; 872],
}Fields§
§enclave: QuoteRepresents the state of the quote verifiers enclave.
The authority of the EnclaveAccount which is permitted to make account changes.
attestation_queue: PubkeyQueue used for attestation to verify a MRENCLAVE measurement.
created_at: i64The unix timestamp when the quote was created.
is_on_queue: boolWhether the quote is located on the AttestationQueues buffer.
last_heartbeat: i64The last time the quote heartbeated on-chain.
reward_escrow: PubkeyThe SwitchboardWallet account containing the reward escrow for verifying quotes on-chain. We should set this whenever the operator changes so we dont need to pass another account and can verify with has_one.
stake_wallet: PubkeyThe SwitchboardWallet account containing the queues required min_stake. Needs to be separate from the reward_escrow. Allows easier 3rd party management of stake from rewards.
success_ewma: EwmaTracks the number of successful price attestations.
failure_ewma: EwmaTracks the number of failed price attestations (user reported).
gateway_uri: [u8; 64]URI location of the verifier’s gateway.
_ebuf: [u8; 872]Reserved.
Implementations§
source§impl VerifierAccountData
impl VerifierAccountData
pub fn size() -> usize
sourcepub fn new<'info>(
quote_account_info: &'info AccountInfo<'info>
) -> Result<Ref<'info, VerifierAccountData>>
pub fn new<'info>( quote_account_info: &'info AccountInfo<'info> ) -> Result<Ref<'info, VerifierAccountData>>
sourcepub fn new_from_bytes(data: &[u8]) -> Result<&VerifierAccountData>
pub fn new_from_bytes(data: &[u8]) -> Result<&VerifierAccountData>
pub fn signer(&self) -> Pubkey
pub fn assert_signer(&self, signer: &AccountInfo<'_>) -> Result<()>
pub fn is_verified(&self, clock: &Clock) -> bool
pub fn verify(&self, clock: &Clock) -> Result<()>
pub fn gateway_uri(&self) -> Option<String>
pub fn ed25519_signer(&self) -> Option<Pubkey>
pub fn secp256k1_signer(&self) -> Option<[u8; 64]>
pub fn libsecp256k1_signer(&self) -> Option<PublicKey>
pub fn fetch(client: &RpcClient, pubkey: Pubkey) -> Result<Self, SbError>
pub async fn fetch_async( client: &RpcClient, pubkey: Pubkey ) -> Result<Self, SbError>
pub fn fetch_sync<T: SyncClient>( client: &T, pubkey: Pubkey ) -> Result<Self, SbError>
Trait Implementations§
source§impl AccountDeserialize for VerifierAccountData
impl AccountDeserialize for VerifierAccountData
source§fn try_deserialize(buf: &mut &[u8]) -> Result<Self>
fn try_deserialize(buf: &mut &[u8]) -> Result<Self>
Mint account into a token
Account.source§fn try_deserialize_unchecked(buf: &mut &[u8]) -> Result<Self>
fn try_deserialize_unchecked(buf: &mut &[u8]) -> Result<Self>
source§impl Clone for VerifierAccountData
impl Clone for VerifierAccountData
source§fn clone(&self) -> VerifierAccountData
fn clone(&self) -> VerifierAccountData
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for VerifierAccountData
impl Debug for VerifierAccountData
source§impl Discriminator for VerifierAccountData
impl Discriminator for VerifierAccountData
const DISCRIMINATOR: [u8; 8] = _
fn discriminator() -> [u8; 8]
impl Copy for VerifierAccountData
impl Pod for VerifierAccountData
impl ZeroCopy for VerifierAccountData
Auto Trait Implementations§
impl RefUnwindSafe for VerifierAccountData
impl Send for VerifierAccountData
impl Sync for VerifierAccountData
impl Unpin for VerifierAccountData
impl UnwindSafe for VerifierAccountData
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.