pub struct PostDelegationActions {
pub inserted_signers: u8,
pub inserted_non_signers: u8,
pub signers: Vec<[u8; 32]>,
pub non_signers: Vec<MaybeEncryptedPubkey>,
pub instructions: Vec<MaybeEncryptedInstruction>,
}Expand description
This struct is used both as instruction args and as persisted state: it is received as instruction data and then stored in the delegation-record account immediately after DelegationRecord.
In the basic form, PostDelegationActions is constructed from Vec
[signers.., non_signers..]
That is, the first non-signer pubkey index is signers.len().
In the advanced form, an existing PostDelegationActions value (usually provided by an off-chain
client) is combined with Vec
[old_signers.., old_non_signers.., new_signers.., new_non_signers..]
That is, the first “new signer” comes after the old keys (old_signers + old_non_signers). Also,
the signers field is created from:
[old_signers.., new_signers..]
and non-signers field is created from:
[old_non_signers.., new_non_signers..]
Fields§
§inserted_signers: u8§inserted_non_signers: u8§signers: Vec<[u8; 32]>§non_signers: Vec<MaybeEncryptedPubkey>§instructions: Vec<MaybeEncryptedInstruction>Trait Implementations§
Source§impl BorshDeserialize for PostDelegationActions
impl BorshDeserialize for PostDelegationActions
fn deserialize_reader<__R: Read>(reader: &mut __R) -> Result<Self, Error>
Source§fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
Source§fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>where
R: Read,
Source§impl Debug for PostDelegationActions
impl Debug for PostDelegationActions
Source§impl Decrypt for PostDelegationActions
impl Decrypt for PostDelegationActions
Source§fn decrypt(
self,
recipient_x25519_pubkey: &[u8; 32],
recipient_x25519_secret: &[u8; 32],
) -> Result<Self::Output, DecryptError>
fn decrypt( self, recipient_x25519_pubkey: &[u8; 32], recipient_x25519_secret: &[u8; 32], ) -> Result<Self::Output, DecryptError>
This function decrypts PostDelegationActions as well as validates it, matching the expected signers with the AccountMetas.
type Output = Vec<Instruction>
fn decrypt_with_keypair(
self,
recipient_keypair: &Keypair,
) -> Result<Self::Output, DecryptError>where
Self: Sized,
Auto Trait Implementations§
impl Freeze for PostDelegationActions
impl RefUnwindSafe for PostDelegationActions
impl Send for PostDelegationActions
impl Sync for PostDelegationActions
impl Unpin for PostDelegationActions
impl UnsafeUnpin for PostDelegationActions
impl UnwindSafe for PostDelegationActions
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
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