> ## 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.

# claimHTLC

> Claim an HTLC by providing the preimage.

Claims an HTLC by providing the preimage.

## Method Signature

```typescript theme={null}
async claimHTLC(preimage: string): Promise<Transfer>
```

## Parameters

<ResponseField name="preimage" type="string" required>
  The 32-byte preimage as a hex string
</ResponseField>

## Returns

<ResponseField name="transfer" type="Transfer" required>
  The claimed transfer details
</ResponseField>

## Example

```typescript theme={null}
const transfer = await wallet.claimHTLC("abc123..."); // 32 bytes hex
console.log("HTLC claimed:", transfer.id);
```
