Portal API’s convenient helper methods are designed to streamline data retrieval from the Portal REST API.
portal.getNFTAssets
chainId
: The chain identifier in CAIP-2 format (e.g., “eip155:1” for Ethereum mainnet, “solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp” for Solana mainnet)portal.getAssets
chainId
: The chain identifier in CAIP-2 format (e.g., “eip155:1” for Ethereum mainnet, “solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp” for Solana mainnet)portal.getTransactions
blockTimestamp
descending (latest transactions will come first). This includes both inbound and outbound transactions.
chainId
: The chain identifier in CAIP-2 format (e.g., “eip155:1” for Ethereum mainnet, “solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp” for Solana mainnet)limit
: Optional maximum number of transactions to return. If nil, returns all transactions.offset
: Optional number of transactions to skip for pagination. If nil, starts from the beginning.order
: Optional TransactionOrder
to specify the sort order of transactions: ASC
or DESC
.portal.getBalances
chainId
: The chain identifier in CAIP-2 format (e.g., “eip155:1” for Ethereum mainnet, “solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp” for Solana mainnet)portal.buildEip155Transaction
chainId
: The chain identifier in CAIP-2 format (e.g., “eip155:1” for Ethereum mainnet)params
: A BuildTransactionParam
object containing:
to
: Recipient’s addresstoken
: Token identifier or contract addressamount
: Amount to transfer as a stringportal.buildSolanaTransaction
chainId
: The chain identifier in CAIP-2 format (e.g., “solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp” for Solana mainnet)params
: A BuildTransactionParam
object containing:
to
: Recipient’s Solana addresstoken
: Token identifier (“SOL” for native transfers, mint address for SPL tokens)amount
: Amount to transfer as a string (in lamports for SOL, raw amount for SPL tokens)portal.getWalletCapabilities
portal.evaluateTransaction
chainId
: The chain identifier in CAIP-2 format (e.g., "eip155:1"
for Ethereum mainnet).transaction
: An EvaluateTransactionParam
object containing the transaction details:
to
: (Required) The destination address.value
: (Optional) The transaction value in wei.data
: (Optional) The transaction data for contract interactions.maxFeePerGas
: (Optional) The maximum total fee per gas unit.maxPriorityFeePerGas
: (Optional) The maximum priority fee per gas unit.gas
: (Optional) The gas limit.gasPrice
: (Optional) The gas price for legacy transactions.operationType
: Optional EvaluateTransactionOperationType
to specify the type of evaluation:
.validation
: Perform security validation only..simulation
: Perform transaction simulation only..all
: Perform both validation and simulation.