Skip to main content
Claims an HTLC by providing the preimage.

Method Signature

async claimHTLC(preimage: string): Promise<Transfer>

Parameters

preimage
string
required
The 32-byte preimage as a hex string

Returns

transfer
Transfer
required
The claimed transfer details

Example

const transfer = await wallet.claimHTLC("abc123..."); // 32 bytes hex
console.log("HTLC claimed:", transfer.id);