acceptSplice
@totemsdk/omnia-splice / acceptSplice
Function: acceptSplice()
acceptSplice(
channel,proposal,leaseProvider):Promise<SpliceAcceptance>
Counterparty accepts a splice proposal by co-signing the splice TX digest.
Requires the channel to be in 'quiesced' state.
WOTS lease safety: reserves a key slot before signing. The returned
acceptorReservationId and acceptorSigningIndices are embedded in the
SpliceAcceptance and consumed by finalizeSplice to commit or burn the
acceptor's key-slot reservation.
The acceptor independently:
- Validates party membership (proposer and acceptor both in channel).
- Validates proposal balance conservation and amount constraints.
- Cryptographically binds the signed draft to the proposal params by
recomputing the expected draft from
params + channeland comparing digests — rejects if they differ (tamper detection). - Reserves a WOTS key slot via
leaseProvider.wotsLease. - Signs the splice TX digest with reserved indices.
Parameters
channel
OmniaChannel | QuiescedChannel
Quiesced channel.
proposal
Splice proposal from the initiating party.
leaseProvider
Provides the acceptor signer and WOTS lease.
Returns
Promise<SpliceAcceptance>
SpliceAcceptance containing acceptor co-signature and lease data.