Preferred consolidated cache representation.
Ensure we have usable keys for a specific keyset id.
Keyset ID.
Keyset with keys.
Returns all the keys in this KeyChain across all units.
Array of MintKeys objects.
Get a keyset by ID or the cheapest keyset if no ID is provided.
Optionalid: stringOptional keyset ID.
Keyset with keys.
StaticcacheConvert a KeyChainCache back into Mint API DTOs.
This is the inverse of KeyChain.mintToCacheDTO.
StaticfromConstruct a KeyChain from previously cached data.
Mint URL or Mint instance.
The unit this KeyChain should filter queries by (e.g. 'sat').
Cache produced by keyChain.cache or KeyChain.mintToCacheDTO.
StaticmintConvert Mint API DTOs into a consolidated KeyChainCache.
Mint URL.
All keysets from mint.getKeySets() — any unit.
All keys from mint.getKeys() — any unit.
This is symmetrical to KeyChain.cacheToMintDTO. It is used by the cache getter and any
code that wants to move from raw Mint DTOs to the new cache shape.
Manages all keysets for a Mint. Queries filter by the wallet's unit.
Remarks
Stores keysets for every unit the mint exposes. Methods like
getKeysets()andgetCheapestKeyset()filter bythis.unit;getKeyset(id)is a direct lookup and is intentionally cross-unit.