Complete Swap
Claim VHTLC
Claim BTC from an Arkade Virtual HTLC for EVM to Arkade swaps and on-chain BTC to Arkade swaps.
When the service funds an Arkade VHTLC, you need to claim it by revealing the preimage. The SDK handles this automatically.
const result = await client.claimArkade(swapId, {
destinationAddress: "ark1q...", // Your Arkade address
});
if (result.success) {
console.log("Claimed! TX:", result.txId);
console.log("Amount:", result.claimAmount, "sats");
} else {
console.error("Claim failed:", result.message);
}Check VHTLC Amounts
Before claiming, you can check the available amounts:
const amounts = await client.amountsForSwap(swapId);
console.log("Spendable:", amounts.spendable, "sats");
console.log("Spent:", amounts.spent, "sats");
console.log("Recoverable:", amounts.recoverable, "sats");When to Use VHTLC Claim
| Swap Type | Claim Method |
|---|---|
| BTC → Polygon/Ethereum | claim() |
| On-chain BTC → Arkade | claimArkade() |
| EVM → Arkade | Automatic (service claims) |