Documentation Index
Fetch the complete documentation index at: https://docs.portalhq.io/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Portal’s Delegations feature allows you to manage token approvals and delegated transfers across EVM and Solana chains. With delegations, you can:- Approve other addresses to spend tokens on your behalf
- Revoke existing delegations
- Check status of active delegations
- Transfer tokens as a delegate from another address
What are Token Delegations?
Token delegations enable one address (the owner) to authorize another address (the delegate) to transfer tokens on their behalf, up to a specified amount.EVM Chains (ERC-20)
On EVM chains, delegations work through the ERC-20approve function:
- Owner approves a delegate address for a specific token amount
- Delegate can transfer tokens using
transferFromup to the approved amount - Owner can revoke by setting approval to zero
ETH on Ethereum, MON on Monad, SOL on Solana) will return an error.
Common use cases:
- DEX trading (approve router to swap tokens)
- Lending protocols (approve to deposit collateral)
- NFT marketplaces (approve to list tokens)
- Gasless transactions (approve relayer to pay gas)
Solana (SPL Token)
On Solana, delegations work through SPL Token delegate authorities:- Owner delegates authority to another address for specific token accounts
- Delegate can transfer up to the delegated amount
- Owner can revoke by removing the delegate authority
Security Considerations
Best Practices
- Limit approval amounts: Only approve the exact amount needed for a transaction
- Time-bound approvals: Revoke delegations after use
- Monitor active delegations: Use
getStatus()to track approvals - Validate addresses: Always verify contract addresses from official sources
- Test on testnets: Validate flows on testnet before mainnet deployment
Supported Networks
Delegations are available on all Portal-supported EVM and Solana chains:EVM Networks
- Ethereum (
eip155:1) - Ethereum Sepolia (
eip155:11155111) - Polygon (
eip155:137) - Base (
eip155:8453) - Arbitrum (
eip155:42161) - Optimism (
eip155:10) - Monad (
eip155:143) - Monad Testnet (
eip155:10143) - And all other EVM chains supported by Portal
Solana Networks
- Solana Mainnet (
solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp) - Solana Devnet (
solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1)
Key Operations
Approve Delegation
Grant permission for another address to spend tokens on your behalf. Parameters:chain: CAIP-2 format chain ID (e.g.,eip155:1,solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp)token: ERC-20 contract address (EVM) or SPL Token mint address (Solana). Native assets like ETH, MON, and SOL are not supported.delegateAddress: Address receiving approvalamount: Approval amount in raw token units (as string)
- Unsigned transaction(s) ready for signing
- Metadata about the approval operation
Revoke Delegation
Remove spending permission from a previously approved address. Parameters:chain: CAIP-2 format chain IDtoken: Token contract address or mint addressdelegateAddress: Address to revoke approval from
- Unsigned transaction(s) to revoke the approval
- Metadata about the revocation
Get Delegation Status
Check current approval status and balances for a token. Parameters:chain: CAIP-2 format chain IDtoken: Token contract address or mint addressdelegateAddress: Address to check approval for
- Current token balance
- List of active delegations with amounts
- Delegation details per address
Transfer From
Transfer tokens as a delegate from another address to a destination. Parameters:chain: CAIP-2 format chain IDtoken: Token identifier (symbol or address)fromAddress: Owner’s address (where tokens are held)toAddress: Destination addressamount: Amount to transfer (human-readable format)
- Unsigned transaction(s) for the transfer
- Metadata about the transfer operation
Transaction Flow
All delegation operations follow this flow:- Call delegation method (approve, revoke, transferFrom)
- Receive unsigned transaction(s) with metadata
- Sign transaction using Portal’s signing methods
- Broadcast transaction to the network
- Wait for confirmation on-chain
Portal’s delegation methods return unsigned transactions that you must sign and broadcast. They do not automatically submit transactions to the blockchain.
Chain-Specific Details
EVM (Ethereum, Polygon, etc.)
- Uses standard ERC-20
approve()andtransferFrom()methods - Returns
transactionsarray with unsigned transaction objects - Each transaction includes:
from,to,data,value - Approval amounts are in wei/smallest token unit
Solana
- Uses SPL Token delegate instructions
- Returns
encodedTransactionsarray with base64-encoded transactions - Delegations are per token account, not per mint
- Must specify exact token account addresses
Next Steps
Ready to implement delegations in your app? Choose your platform:- Manage Delegations with the Enclave MPC API
- Manage Delegations with iOS
- Manage Delegations with Android
- Manage Delegations with React Native
- Manage Delegations with Web
Additional Resources
- Portal API Methods - Learn about Portal’s API architecture
- Chain ID Formatting - Understanding CAIP-2 format
- Security Best Practices - Secure your Portal integration
- Error Codes - Complete error reference
- Client Delegations API - Check delegation status for an address using the Client API
- Custodian Delegations API - Check delegation status for a client using the Custodian API