title: Transferring SPL Token using @Solana\web3.js
body: <p>I am trying to transfer SPL tokens and am getting the error from the function
  mintToken.getOrCreateAssociatedAccountInfo(wallet.publicKey);</p>
  <p>Error:
  &quot;Invalid seeds, address must fall off the curve&quot;</p>
  <p>My wallet variable a an AnchorWallet</p>
  <p>ToWallet is obtained via:<br />
  var toWallet = anchor.web3.Keypair.fromSecretKey(DEMO_TO_WALLET);</p>
  <pre><code> try {
      if (wallet) {
        const mintPublicKey = new anchor.web3.PublicKey(&quot;Token address&quot;);    
        const mintToken = new Token(
          props.connection,
          mintPublicKey,
          TOKEN_PROGRAM_ID,
          toWallet 
        );
  
        const fromTokenAccount = await mintToken.getOrCreateAssociatedAccountInfo(
          wallet.publicKey
        );
      
        const destPublicKey = new anchor.web3.PublicKey(toWallet);
      
        // Get the derived address of the destination wallet which will hold the custom token
        const associatedDestinationTokenAddr = await Token.getAssociatedTokenAddress(
          mintToken.associatedProgramId,
          mintToken.programId,
          mintPublicKey,
          destPublicKey
        );
      
        const receiverAccount = await props.connection.getAccountInfo(associatedDestinationTokenAddr);
              
        const instructions: anchor.web3.TransactionInstruction[] = [];  
      
        if (receiverAccount === null) {
      
          instructions.push(
            Token.createAssociatedTokenAccountInstruction(
              mintToken.associatedProgramId,
              mintToken.programId,
              mintPublicKey,
              associatedDestinationTokenAddr,
              destPublicKey,
              wallet.publicKey
            )
          )
      
        }
        
        instructions.push(
          Token.createTransferInstruction(
            TOKEN_PROGRAM_ID,
            fromTokenAccount.address,
            associatedDestinationTokenAddr,
            wallet.publicKey,
            [],
            1
          )
        );
      
        const transaction = new anchor.web3.Transaction().add(...instructions);
        transaction.feePayer = wallet.publicKey;
        transaction.recentBlockhash = (await props.connection.getRecentBlockhash()).blockhash;
        
        const transactionSignature = await props.connection.sendRawTransaction(
          transaction.serialize(),
          { skipPreflight: true }
        );
      
        await props.connection.confirmTransaction(transactionSignature);
  </code></pre>