Actions
approve
Authorize contracts to manage your tokens.
useApprove()
Grants permission to a smart contract to spend tokens from the user’s wallet. Required before staking or other delegated actions.
Parameters
- encryptKey (string): User’s decryption PIN
- wallet (WalletData): Wallet public/private key pair
- contractAddress (string): Token contract to approve
- spender (string): Contract address to authorize
- amount (string | number): Maximum spend allowance
- decimals (number): Token decimals (default: 18)
Example Implementation
Related Actions
:::warning Approvals are specific to each token-contract pair. You’ll need to re-approve when interacting with new contracts. :::