> ## Documentation Index
> Fetch the complete documentation index at: https://docs.spark.money/llms.txt
> Use this file to discover all available pages before exploring further.

# createHTLCSenderSpendTx

> Create a signed transaction to reclaim an expired HTLC as sender.

Creates a sender spend transaction for an HTLC after the timelock expires.

## Method Signature

```typescript theme={null}
async createHTLCSenderSpendTx({
  htlcTx,
  hash,
  hashLockDestinationPubkey,
  sequenceLockDestinationPubkey,
  satsPerVbyteFee,
}: {
  htlcTx: string;
  hash: string;
  hashLockDestinationPubkey: string;
  sequenceLockDestinationPubkey: string;
  satsPerVbyteFee: number;
}): Promise<string>
```

## Parameters

<ResponseField name="htlcTx" type="string" required>
  The HTLC transaction hex
</ResponseField>

<ResponseField name="hash" type="string" required>
  The hash used in the HTLC
</ResponseField>

<ResponseField name="hashLockDestinationPubkey" type="string" required>
  Public key for the hash lock destination
</ResponseField>

<ResponseField name="sequenceLockDestinationPubkey" type="string" required>
  Public key for the sequence lock destination
</ResponseField>

<ResponseField name="satsPerVbyteFee" type="number" required>
  Fee rate in sats per vbyte
</ResponseField>

## Returns

<ResponseField name="txHex" type="string" required>
  The signed sender spend transaction hex
</ResponseField>

## Example

```typescript theme={null}
const txHex = await wallet.createHTLCSenderSpendTx({
  htlcTx: "02000000...",
  hash: "abc123...",
  hashLockDestinationPubkey: "02...",
  sequenceLockDestinationPubkey: "03...",
  satsPerVbyteFee: 10
});
console.log("Sender spend tx:", txHex);
```
