Struct switchboard_solana::attestation_program::accounts::switchboard_wallet::SwitchboardWallet
source · pub struct SwitchboardWallet {
pub bump: u8,
pub initialized: u8,
pub mint: Pubkey,
pub attestation_queue: Pubkey,
pub authority: Pubkey,
pub name: [u8; 32],
pub resource_count: u32,
pub withdraw_authority: Pubkey,
pub token_wallet: Pubkey,
pub resources: Vec<Pubkey>,
pub resources_max_len: u32,
pub _ebuf: [u8; 64],
}
Fields§
§bump: u8
§initialized: u8
§mint: Pubkey
§attestation_queue: Pubkey
§name: [u8; 32]
§resource_count: u32
§token_wallet: Pubkey
§resources: Vec<Pubkey>
§resources_max_len: u32
§_ebuf: [u8; 64]
Reserved.
Implementations§
source§impl SwitchboardWallet
impl SwitchboardWallet
pub fn space(len: Option<u32>) -> usize
pub fn should_init(info: &AccountInfo<'_>) -> bool
sourcepub fn new<'info>(
wallet_account_info: &'info AccountInfo<'info>
) -> Result<Box<Account<'info, SwitchboardWallet>>>
pub fn new<'info>( wallet_account_info: &'info AccountInfo<'info> ) -> Result<Box<Account<'info, SwitchboardWallet>>>
pub fn add_resource(&mut self, resource: Pubkey) -> Result<()>
pub fn remove_resource( &mut self, resource: Pubkey, idx: Option<u32> ) -> Result<()>
pub fn parse_name(name: &[u8]) -> [u8; 32]
pub fn derive_key( mint: Pubkey, attestation_queue: Pubkey, authority: Pubkey, name: Vec<u8> ) -> Pubkey
source§impl SwitchboardWallet
impl SwitchboardWallet
pub fn from_seed( attestation_queue: Pubkey, authority: Pubkey, name: Vec<u8> ) -> Pubkey
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>
pub async fn get_or_create_from_seed( rpc: &RpcClient, payer: Arc<Keypair>, attestation_queue: Pubkey, seed: Option<Vec<u8>> ) -> Result<Pubkey, SbError>
Trait Implementations§
source§impl AccountDeserialize for SwitchboardWallet
impl AccountDeserialize for SwitchboardWallet
source§fn try_deserialize(buf: &mut &[u8]) -> Result<Self>
fn try_deserialize(buf: &mut &[u8]) -> Result<Self>
Deserializes previously initialized account data. Should fail for all
uninitialized accounts, where the bytes are zeroed. Implementations
should be unique to a particular account type so that one can never
successfully deserialize the data of one account type into another.
For example, if the SPL token program were to implement this trait,
it should be impossible to deserialize a
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>
Deserializes account data without checking the account discriminator.
This should only be used on account initialization, when the bytes of
the account are zeroed.
source§impl AccountSerialize for SwitchboardWallet
impl AccountSerialize for SwitchboardWallet
source§impl BorshDeserialize for SwitchboardWalletwhere
u8: BorshDeserialize,
Pubkey: BorshDeserialize,
[u8; 32]: BorshDeserialize,
u32: BorshDeserialize,
Vec<Pubkey>: BorshDeserialize,
[u8; 64]: BorshDeserialize,
impl BorshDeserialize for SwitchboardWalletwhere
u8: BorshDeserialize,
Pubkey: BorshDeserialize,
[u8; 32]: BorshDeserialize,
u32: BorshDeserialize,
Vec<Pubkey>: BorshDeserialize,
[u8; 64]: BorshDeserialize,
fn deserialize_reader<R: Read>(reader: &mut R) -> Result<Self, Error>
§fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
Deserializes this instance from a given slice of bytes.
Updates the buffer to point at the remaining bytes.
§fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
Deserialize this instance from a slice of bytes.
fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>where
R: Read,
source§impl BorshSerialize for SwitchboardWalletwhere
u8: BorshSerialize,
Pubkey: BorshSerialize,
[u8; 32]: BorshSerialize,
u32: BorshSerialize,
Vec<Pubkey>: BorshSerialize,
[u8; 64]: BorshSerialize,
impl BorshSerialize for SwitchboardWalletwhere
u8: BorshSerialize,
Pubkey: BorshSerialize,
[u8; 32]: BorshSerialize,
u32: BorshSerialize,
Vec<Pubkey>: BorshSerialize,
[u8; 64]: BorshSerialize,
source§impl Clone for SwitchboardWallet
impl Clone for SwitchboardWallet
source§fn clone(&self) -> SwitchboardWallet
fn clone(&self) -> SwitchboardWallet
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Default for SwitchboardWallet
impl Default for SwitchboardWallet
source§impl Discriminator for SwitchboardWallet
impl Discriminator for SwitchboardWallet
const DISCRIMINATOR: [u8; 8] = _
fn discriminator() -> [u8; 8]
Auto Trait Implementations§
impl RefUnwindSafe for SwitchboardWallet
impl Send for SwitchboardWallet
impl Sync for SwitchboardWallet
impl Unpin for SwitchboardWallet
impl UnwindSafe for SwitchboardWallet
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
Mutably borrows from an owned value. Read more