Skip to main content

createExitDraft

@totemsdk/omnia-vtxo


@totemsdk/omnia-vtxo / createExitDraft

Function: createExitDraft()

createExitDraft(vtxo, now?): object

Creates a mock exit draft for a VTXO. Validates the proof leaf before drafting, caps the exit at the verified share, and consumes the VTXO's receipt so a second exit draft is refused (double-exit prevention, #28).

Parameters

vtxo

OmniaVtxo

now?

number

Timestamp in ms. Defaults to Date.now() if omitted — pass explicitly for determinism.

Returns

object

draft

draft: ExitDraft

receipt

receipt: VtxoOperatorReceipt