MemoryOmniaVtxoStore
@totemsdk/omnia-vtxo / MemoryOmniaVtxoStore
Class: MemoryOmniaVtxoStore
Implements
Constructors
Constructor
new MemoryOmniaVtxoStore():
MemoryOmniaVtxoStore
Returns
MemoryOmniaVtxoStore
Methods
getPool()
getPool(
poolId):Promise<OmniaVtxoPool|undefined>
Parameters
poolId
string
Returns
Promise<OmniaVtxoPool | undefined>
Implementation of
getVtxo()
getVtxo(
vtxoId):Promise<OmniaVtxo|undefined>
Parameters
vtxoId
string
Returns
Promise<OmniaVtxo | undefined>
Implementation of
listVtxos()
listVtxos(
poolId?):Promise<OmniaVtxo[]>
Parameters
poolId?
string
Returns
Promise<OmniaVtxo[]>
Implementation of
markVtxoSpent()
markVtxoSpent(
vtxoId,now?):Promise<void>
Marks a VTXO as spent. Accepts an optional now timestamp for deterministic testing.
When now is omitted the store falls back to Date.now() — this is intentional
and explicitly documented: the store is a persistence layer, not a pure function,
so wall-clock time is an acceptable default for production use. Pass now in tests.
Parameters
vtxoId
string
now?
number
Returns
Promise<void>
Implementation of
savePool()
savePool(
pool):Promise<void>
Parameters
pool
Returns
Promise<void>
Implementation of
saveVtxo()
saveVtxo(
vtxo):Promise<void>
Parameters
vtxo
Returns
Promise<void>