I want to transfer an asset from one account to another and I would like to know is there way to send asset without entering the mnemonics of the recipient?
You should never enter the recipient mnemonic.
What service are you using?
However, the recipient needs to opt-in to the asset if they did not already do it.
Opting in requires the mnemonic of the recipient, but is normally handled by the wallet software.
in this tutorial, mnemonics are required to send an asset to someone. is there other way to do it?
As long as the recipient opted in (Part 3), you don’t need the mnemonic for the transfer in Part 4 (https://developer.algorand.org/tutorials/asa-go/?from_query=asa#part-4-transfer).
You can just set the variable
recipient to the address of the receiver. For example:
const recipient = "RGLJNYN4FJSMPS4W3UOIXDYLK454F3CNYI4VY4UPXRQJF4E6OC5CU7AJQM";
but in step 4.2, secret key is used to sign transaction. We are still using the secret key.
Step 4.2 uses the key of the sender not of the recipient.
The sender’s secret key is necessary because you don’t want anybody stealing your assets and sending them in random places.
thanks for the information