Skip to content

CommitOptions

Defined in: packages/synapse-sdk/src/types.ts:652

Options for committing pieces on-chain

optional extraData?: `0x${string}`

Defined in: packages/synapse-sdk/src/types.ts:656

Pre-built signed extraData (avoids re-signing)


optional onSubmitted?: (txHash) => void

Defined in: packages/synapse-sdk/src/types.ts:672

Called when the commit transaction is submitted (before on-chain confirmation). The hash is Curio’s Location wait key and is not guaranteed to be the final included on-chain hash if Curio replaces the send by fee. Prefer CommitResult.confirmedTxHash after confirmation.

ParameterType
txHash`0x${string}`

void


pieces: object[]

Defined in: packages/synapse-sdk/src/types.ts:654

Pieces to commit with optional per-piece metadata

pieceCid: PieceCID

optional pieceMetadata?: MetadataObject


optional signal?: AbortSignal

Defined in: packages/synapse-sdk/src/types.ts:665

Optional AbortSignal to cancel the commit requests and the confirmation wait.

Aborting after CommitOptions.onSubmitted only stops waiting: the transaction was already submitted and can still confirm on chain. When this context has no data set yet, it does not learn the new data set ID, so a later commit() on the same context creates another data set.