Expand description
TEMPORARY: backend facade for SPL Token CPI builders.
This module keeps Hopper-owned instruction semantics while execution still flows through the active backend substrate. It will be replaced by Hopper-native instruction builders once the substrate-facing builders are finalized.
Semantic CPI facades: the API is Hopper-owned (builder pattern over
AccountView / Signer), while execution is delegated through Hopper’s
checked CPI semantics.
Provides checked-by-default TransferChecked, MintToChecked, BurnChecked,
ApproveChecked, CloseAccount, Revoke, and InitializeAccount builders.
Deprecated plain Transfer/MintTo/Burn/Approve builders are compiled only
when legacy-token-instructions is explicitly enabled.
Modules§
- instructions
- Compatibility re-exports.
Structs§
- Approve
Checked - Builder for SPL Token ApproveChecked (instruction index 13).
- Burn
Checked - Builder for SPL Token BurnChecked (instruction index 15).
- Close
Account - Builder for SPL Token CloseAccount (instruction index 9).
- Initialize
Account - Builder for SPL Token InitializeAccount (instruction index 1).
- Mint
ToChecked - Builder for SPL Token MintToChecked (instruction index 14).
- Revoke
- Builder for SPL Token Revoke (instruction index 5).
- Transfer
Checked - Builder for SPL Token TransferChecked (instruction index 12).
Constants§
- 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).