Skip to content

@lelantos-org/sdk / internal / awaitCommitments

Function: awaitCommitments() ​

ts
function awaitCommitments(
   cms, 
   read, 
   sync, 
   opts?
): Promise<AwaitCommitmentsResult>;

Defined in: @lelantos-org/sdk/dist/wallet/notes/note-cache.d.ts:34

Poll until every commitment in cms appears in read().

Returns a status instead of throwing: it runs after a successful broadcast, where a slow indexer is not a failed transaction. Set throwOnTimeout to throw on timeout.

sync receives the page size to use, undefined for the sync's default.

Parameters ​

ParameterType
cmsreadonly string[]
read() => readonly StoredNote[]
sync(pageSize) => Promise<unknown>
opts?AwaitCommitmentsOpts

Returns ​

Promise<AwaitCommitmentsResult>