Creates a sender spend transaction for an HTLC after the timelock expires.
Method Signature
async createHTLCSenderSpendTx({
htlcTx,
hash,
hashLockDestinationPubkey,
sequenceLockDestinationPubkey,
satsPerVbyteFee,
}: {
htlcTx: string;
hash: string;
hashLockDestinationPubkey: string;
sequenceLockDestinationPubkey: string;
satsPerVbyteFee: number;
}): Promise<string>
Parameters
The hash used in the HTLC
hashLockDestinationPubkey
Public key for the hash lock destination
sequenceLockDestinationPubkey
Public key for the sequence lock destination
Fee rate in sats per vbyte
Returns
The signed sender spend transaction hex
Example
const txHex = await wallet.createHTLCSenderSpendTx({
htlcTx: "02000000...",
hash: "abc123...",
hashLockDestinationPubkey: "02...",
sequenceLockDestinationPubkey: "03...",
satsPerVbyteFee: 10
});
console.log("Sender spend tx:", txHex);