Closed robertclarkson closed 1 year ago
Trying to build a transaction. Unsure if im doing it correctly? I get the error
Exception in native call from JS
Any help much appreciated.
const txbuilder = await new TxBuilder().create(); await txbuilder.feeRate(2); const addr = await new Address().create('muiFYa8MjFeorqCmboFqyNRc3aJReTdzC4'); await txbuilder.addRecipient(addr, 0.0001); await txbuilder.finish(wallet);
OK my bad. Turns out i need the script pubkey in here
await txbuilder.addRecipient(await addr.scriptPubKey(), 0.0001);
Trying to build a transaction. Unsure if im doing it correctly? I get the error
Any help much appreciated.