pub struct SmartWallet {
pub base: Pubkey,
pub bump: u8,
pub threshold: u64,
pub minimum_delay: i64,
pub grace_period: i64,
pub owner_set_seqno: u32,
pub num_transactions: u64,
pub owners: Vec<Pubkey>,
pub reserved: [u64; 16],
}Expand description
A SmartWallet is a multisig wallet with Timelock capabilities.
Fields§
§base: PubkeyBase used to derive.
bump: u8Bump seed for deriving PDA seeds.
threshold: u64Minimum number of owner approvals needed to sign a Transaction.
minimum_delay: i64Minimum delay between approval and execution, in seconds.
grace_period: i64Time after the ETA until a Transaction expires.
owner_set_seqno: u32Sequence of the ownership set.
This may be used to see if the owners on the multisig have changed since the last time the owners were checked. This is used on Transaction approval to ensure that owners cannot approve old transactions.
num_transactions: u64Total number of Transactions on this SmartWallet.
owners: Vec<Pubkey>Owners of the SmartWallet.
reserved: [u64; 16]Extra space for program upgrades.
Implementations§
Source§impl SmartWallet
impl SmartWallet
Sourcepub fn space(max_owners: u8) -> usize
pub fn space(max_owners: u8) -> usize
Computes the space a SmartWallet uses.
Sourcepub fn owner_index_opt(&self, key: Pubkey) -> Option<usize>
pub fn owner_index_opt(&self, key: Pubkey) -> Option<usize>
Gets the index of the key in the owners Vec, or None
Sourcepub fn try_owner_index(&self, key: Pubkey) -> Result<usize>
pub fn try_owner_index(&self, key: Pubkey) -> Result<usize>
Gets the index of the key in the owners Vec, or error
Trait Implementations§
Source§impl AccountDeserialize for SmartWallet
impl AccountDeserialize for SmartWallet
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 AccountSerialize for SmartWallet
impl AccountSerialize for SmartWallet
Source§impl BorshDeserialize for SmartWalletwhere
Pubkey: BorshDeserialize,
u8: BorshDeserialize,
u64: BorshDeserialize,
i64: BorshDeserialize,
u32: BorshDeserialize,
Vec<Pubkey>: BorshDeserialize,
[u64; 16]: BorshDeserialize,
impl BorshDeserialize for SmartWalletwhere
Pubkey: BorshDeserialize,
u8: BorshDeserialize,
u64: BorshDeserialize,
i64: BorshDeserialize,
u32: BorshDeserialize,
Vec<Pubkey>: BorshDeserialize,
[u64; 16]: BorshDeserialize,
Source§impl BorshSerialize for SmartWalletwhere
Pubkey: BorshSerialize,
u8: BorshSerialize,
u64: BorshSerialize,
i64: BorshSerialize,
u32: BorshSerialize,
Vec<Pubkey>: BorshSerialize,
[u64; 16]: BorshSerialize,
impl BorshSerialize for SmartWalletwhere
Pubkey: BorshSerialize,
u8: BorshSerialize,
u64: BorshSerialize,
i64: BorshSerialize,
u32: BorshSerialize,
Vec<Pubkey>: BorshSerialize,
[u64; 16]: BorshSerialize,
Source§impl Clone for SmartWallet
impl Clone for SmartWallet
Source§fn clone(&self) -> SmartWallet
fn clone(&self) -> SmartWallet
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SmartWallet
impl Debug for SmartWallet
Source§impl Default for SmartWallet
impl Default for SmartWallet
Source§fn default() -> SmartWallet
fn default() -> SmartWallet
Source§impl Discriminator for SmartWallet
impl Discriminator for SmartWallet
fn discriminator() -> [u8; 8]
Source§impl PartialEq for SmartWallet
impl PartialEq for SmartWallet
impl StructuralPartialEq for SmartWallet
Auto Trait Implementations§
impl Freeze for SmartWallet
impl RefUnwindSafe for SmartWallet
impl Send for SmartWallet
impl Sync for SmartWallet
impl Unpin for SmartWallet
impl UnwindSafe for SmartWallet
Blanket Implementations§
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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