Skip to content

@lelantos-org/sdk / wallet / awaitCommitments

Function: awaitCommitments() โ€‹

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

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

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

Returns a status rather than void, so a lagging indexer and an aborted wait are both distinguishable from success.

Does not throw by default: this runs after a successful broadcast, so a slow indexer is not a failed transaction. Pass throwOnTimeout when the caller needs an exception.

Parameters โ€‹

ParameterType
cmsstring[]
read() => readonly StoredNote[]
sync(limit) => Promise<unknown>
opts?AwaitCommitmentsOpts

Returns โ€‹

Promise<AwaitCommitmentsResult>

Lelantosno cookies ๐Ÿช ยท no tracking ๐Ÿ‘๏ธ ยท no accounts ๐Ÿ‘คwalletexplorer4536080GitHub