sendTransaction · P2PKH
Back to the sendTransaction overview
Send a standard P2PKH transaction to transfer TBC to a recipient address.
ts
const params = [
{
flag: "P2PKH", // Required
address: "", // Required, recipient address
satoshis: 0, // Required, amount in satoshis
broadcastEnabled: true, // Optional, defaults to true
},
];
const { txid } = await Turing.sendTransaction(params); // When broadcastEnabled is true
// const { txraw } = await Turing.sendTransaction(params); // When broadcastEnabled is false
// const { error } = await Turing.sendTransaction(params); // When an error occursLive Example
Live Example
Turing.sendTransaction() / P2PKH
The active wallet network is Unknown. This method requires TBC. Switch networks and try again.
Code Preview