Skip to main content
Function Signature
Parameters
  • lamports: Amount of lamports to send (1 SOL = 1,000,000,000 lamports)
  • to: The recipient’s Solana address
  • withChainId: The CAIP-2 chain identifier (e.g., “solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp” for Solana mainnet)
Returns The transaction hash (signature) as a string Throws
  • MpcError.addressNotFound if no Solana address is found for the wallet
  • PortalSolError.failedToGetLatestBlockhash if unable to get the latest blockhash
  • PortalSolError.failedToGetTransactionHash if transaction signing/sending fails
  • Errors from SolanaSwift.PublicKey initialization if addresses are invalid
Example Usage
Implementation Notes
  • Run generateor recover if needed.
  • Amount must be specified in lamports (1 SOL = 1,000,000,000 lamports)
  • The transaction is automatically signed and sent to the network
  • The fee is paid by the sender’s address
  • Consider adding extra amount for transaction fees
  • The function waits for transaction submission but not confirmation