Skip to main content

timeoutHTLC

@totemsdk/omnia


@totemsdk/omnia / timeoutHTLC

Function: timeoutHTLC()

timeoutHTLC(channel, htlcId, leaseProvider, chainProvider, signer?): Promise<{ channel: OmniaChannel; error?: string; partialState: Partial<SignedChannelState>; }>

After timeoutBlock, HTLC amount returns to sender balance in new state.

Spec: timeoutHTLC(channel, htlcId, leaseProvider, chainProvider) — signer is optional. The current block height is fetched from chainProvider.getTip() — the caller cannot supply an untrusted height. This prevents premature timeout attacks.

Parameters

channel

OmniaChannel

htlcId

string

leaseProvider

WotsLeaseProvider

chainProvider

ChainStateProvider

signer?

ChannelSigner

Returns

Promise<{ channel: OmniaChannel; error?: string; partialState: Partial<SignedChannelState>; }>