Expand description
Hopper-native SPL Token CPI builders.
The API is Hopper-owned (builder pattern over AccountView / Signer) and
execution flows through Hopper’s checked native CPI semantics.
Provides checked-by-default TransferChecked, MintToChecked, BurnChecked,
ApproveChecked, CloseAccount, Revoke, SetAuthority, FreezeAccount,
ThawAccount, SyncNative, and InitializeAccount builders.
Multisig owner flows are first-class via bounded signer-account slices.
Deprecated plain Transfer/MintTo/Burn/Approve builders are compiled only
when legacy-token-instructions is explicitly enabled.
Re-exports§
pub use crate::token_mint::InitializeMint2;pub use crate::token_mint::MintConfig;pub use crate::token_mint::MintPlan;pub use crate::token_mint::MintProgram;
Modules§
- instructions
- Legacy module-path re-exports.
Structs§
- Approve
Checked - Builder for SPL Token ApproveChecked (instruction index 13).
- Burn
Checked - Builder for SPL Token BurnChecked (instruction index 15).
- Checked
Mint Decimals - Proof token that an SPL Mint matched expected decimals.
- Checked
Token Authority - Proof token that an SPL TokenAccount matched an expected token authority.
- Checked
Token Mint - Proof token that an SPL TokenAccount matched an expected mint.
- Close
Account - Builder for SPL Token CloseAccount (instruction index 9).
- Freeze
Account - Builder for SPL Token FreezeAccount (instruction index 10).
- Initialize
Account - Builder for SPL Token InitializeAccount (instruction index 1).
- Initialize
Account2 - Builder for SPL Token InitializeAccount2 (instruction index 16).
- Initialize
Account3 - Builder for SPL Token InitializeAccount3 (instruction index 18).
- Mint
ToChecked - Builder for SPL Token MintToChecked (instruction index 14).
- Revoke
- Builder for SPL Token Revoke (instruction index 5).
- SetAuthority
- Builder for SPL Token SetAuthority (instruction index 6).
- SplMint
- Known external SPL Mint adapter.
- SplMint
View - Guard-owned zero-copy SPL Mint view.
- SplToken
Account - Known external SPL TokenAccount adapter.
- SplToken
Account View - Guard-owned zero-copy SPL TokenAccount view.
- Sync
Native - Builder for SPL Token SyncNative (instruction index 17).
- Thaw
Account - Builder for SPL Token ThawAccount (instruction index 11).
- Token
Amount Snapshot - Snapshot of a token account amount before CPI.
- Transfer
Checked - Builder for classic SPL Token TransferChecked (instruction index 12).
Enums§
- Token
Authority Type - Authority classes accepted by SPL Token’s SetAuthority instruction.
Constants§
- MAX_
TOKEN_ MULTISIG_ SIGNERS - SPL Token multisig accounts support at most 11 signer accounts.
- SPL_
MINT_ LEN - SPL_
TOKEN_ ACCOUNT_ LEN - TOKEN_
PROGRAM_ ID - SPL Token program address.
Functions§
- require_
mint_ authority - Verify an SPL Mint account’s
mint_authorityCOption field matchesexpected_authority. - require_
mint_ decimals - Verify an SPL Mint account’s
decimalsbyte matchesexpected. - require_
mint_ freeze_ authority - Verify an SPL Mint account’s
freeze_authorityCOption field matchesexpected_freeze. - require_
token_ authority - Verify an SPL Token account’s
ownerfield matchesauthority.key(). - require_
token_ mint - Verify an SPL Token account’s
mintfield matchesexpected_mint. - require_
token_ owner_ eq - Verify an SPL Token account’s
ownerfield matches a pubkey supplied directly (i.e. not wrapped in anAccountView).