function validateRecipient(address: string): void { if (!align.blockchain.utils.isValidAddress(address)) { throw new Error("Invalid recipient address"); } // Also check it's not the zero address if (address === "0x0000000000000000000000000000000000000000") { throw new Error("Cannot send to zero address"); }}
This validates the format only. It doesn’t check if the address exists
on-chain or has any balance.