Skip to main content

Function: releaseSpend()

releaseSpend(store, id, settledMicro, at): Promise<boolean>

Defined in: packages/agentos/src/safety/runtime/SpendReservations.ts:261

Settles a reservation once at what its use cost, rounded down to whole micro-dollars; false when it was settled already. A cost that is not a finite number, zero or more, was never known, so the reservation settles at its whole amount, as an expired one does: a cost below zero settled at nothing would take the reservation's whole amount out of the day's total.

Parameters​

store​

SpendDayStore

id​

string

settledMicro​

number

at​

Date

Returns​

Promise<boolean>