Skip to main content

Function: withCreditRetry()

withCreditRetry<T>(store, fn): Promise<T>

Defined in: packages/agentos/src/safety/runtime/CompoundCreditLedger.ts:93

Runs fn in one transaction, again when a concurrent writer took a version or a unique key first (two first grants of one scope, two reservations racing on a new account), at most three times in all.

Type Parameters​

T​

T

Parameters​

store​

ICompoundCreditStore

fn​

(trx) => Promise<T>

Returns​

Promise<T>