ChannelOps
@totemsdk/omnia-router / ChannelOps
Interface: ChannelOps
Dependency-injected HTLC operations.
In production, wire in the real functions from @totemsdk/omnia: import { addHTLC, fulfillHTLC, timeoutHTLC } from '@totemsdk/omnia'; const ops: ChannelOps = { addHTLC, fulfillHTLC, timeoutHTLC };
In tests, pass mocks directly — no jest.mock() needed.
Methods
addHTLC()
addHTLC(
channel,params,leaseProvider):Promise<{channel:RouterChannel;error?:string;htlcId:string; }>
Parameters
channel
params
leaseProvider
unknown
Returns
Promise<{ channel: RouterChannel; error?: string; htlcId: string; }>
fulfillHTLC()
fulfillHTLC(
channel,htlcId,preimage,leaseProvider):Promise<{channel:RouterChannel;error?:string; }>
Parameters
channel
htlcId
string
preimage
string
leaseProvider
unknown
Returns
Promise<{ channel: RouterChannel; error?: string; }>
timeoutHTLC()
timeoutHTLC(
channel,htlcId,leaseProvider):Promise<{channel:RouterChannel;error?:string; }>
Parameters
channel
htlcId
string
leaseProvider
unknown
Returns
Promise<{ channel: RouterChannel; error?: string; }>