Make Payments
Lucid Evolution provides several methods for making payments, each with its own specific use case:
For straightforward payments to a public key or native script address, use pay.ToAddress
:
const tx = await lucid
.newTx()
.pay.ToAddress("addr_test...", { lovelace: 5000000n })
.complete();
const signedTx = await tx.sign.withWallet().complete();
const txHash = await signedTx.submit();
Evolution Note: Changed from payToAddress
to pay.ToAddress