spl_token_wrap/
state.rs

1//! Program state
2
3use {
4    bytemuck::{Pod, Zeroable},
5    solana_pubkey::Pubkey,
6};
7
8/// Backpointer
9///
10/// Since the backpointer account address is derived from the wrapped mint, it
11/// allows clients to easily work with wrapped tokens.
12///
13/// Try to fetch the account at `get_wrapped_mint_backpointer_address`.
14///  * if it doesn't exist, then the token is not wrapped
15///  * if it exists, read the data in the account as the unwrapped mint address
16///
17/// With this info, clients can easily unwrap tokens, even if they don't know
18/// the origin.
19#[derive(Copy, Clone, Debug, PartialEq, Pod, Zeroable)]
20#[repr(transparent)]
21pub struct Backpointer {
22    /// Address that the wrapped mint is wrapping
23    pub unwrapped_mint: Pubkey,
24}