import { address } from '@solana/addresses';await transfer(address(fromAddress), address(toAddress), lamports(100000n));
[!TIP]
When starting from a known-good address as a string, it's more efficient to typecast it rather
than to use the address helper, because the helper unconditionally performs validation on
its input.
import { Address } from '@solana/addresses';const MEMO_PROGRAM_ADDRESS = 'MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr' as Address<'MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr'>;