Skip to main content

proposeSpliceOut

@totemsdk/omnia-splice


@totemsdk/omnia-splice / proposeSpliceOut

Function: proposeSpliceOut()

proposeSpliceOut(channel, withdrawAmount, withdrawAddress, leaseProvider, newBalances?, extraOutputs?): Promise<SpliceProposal>

Initiating party proposes a splice-out: withdraw funds from the channel on-chain.

Requires the channel to be in 'quiesced' state (see quiesceChannel).

WOTS lease safety: reserves a key slot before signing (same semantics as proposeSpliceIn). The proposerReservationId in the returned SpliceProposal must be committed/burned by finalizeSplice.

Parameters​

channel​

OmniaChannel | QuiescedChannel

Quiesced channel.

withdrawAmount​

bigint

Amount to remove from the channel.

withdrawAddress​

string

On-chain destination for the withdrawn funds.

leaseProvider​

SpliceLeaseProvider

Provides the proposer signer and WOTS lease.

newBalances?​

Record<string, bigint>

How the remaining total should be split after splice.

extraOutputs?​

object[]

Optional additional on-chain outputs (third-party payments).

Returns​

Promise<SpliceProposal>

SpliceProposal signed by the proposer with lease reservation data.