pub struct TransferHook<'a> {
pub authority: &'a [u8; 32],
pub program_id: &'a [u8; 32],
}Expand description
Transfer-hook binding extracted from a Token-2022 mint.
Layout of the TransferHook extension value (64 bytes):
0..32 authority (Pubkey - may be rotated via SetTransferHook)
32..64 program_id (Pubkey - the hook program invoked on transfer)References are borrowed from the mint buffer, so the caller
typically clones .to_bytes() into an owned Address before
further use. This is R6 audit closure; see
[examples/hopper-token-2022-transfer-hook] for the end-to-end
reference program.
Fields§
Authority allowed to update the hook program binding.
program_id: &'a [u8; 32]Program ID of the hook that Token-2022 invokes on every transfer.
Auto Trait Implementations§
impl<'a> Freeze for TransferHook<'a>
impl<'a> RefUnwindSafe for TransferHook<'a>
impl<'a> Send for TransferHook<'a>
impl<'a> Sync for TransferHook<'a>
impl<'a> Unpin for TransferHook<'a>
impl<'a> UnsafeUnpin for TransferHook<'a>
impl<'a> UnwindSafe for TransferHook<'a>
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
Mutably borrows from an owned value. Read more