Skip to main content

addHTLC

@totemsdk/omnia


@totemsdk/omnia / addHTLC

Function: addHTLC()

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

Adds a Hash Time-Locked Contract as a conditional output in the next state update.

Spec: addHTLC(channel, htlcParams, leaseProvider) — signer is optional, falls back to channel.localSigner.

Parameters

channel

OmniaChannel

params

AddHTLCParams

leaseProvider

WotsLeaseProvider

signer?

ChannelSigner

Returns

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