DbObjectBox class
Constructors
DbObjectBox ({bool attach = false , String ? directory })
crates objectbox db instace
attach to attach to already open instance (e.g. for isolates)
directory optional custom directory for the database (useful for testing)
Properties
dbRdy
→ Future
no setter
hashCode
→ int
The hash code for this object.
no setter inherited
runtimeType
→ Type
A representation of the runtime type of the object.
no setter inherited
Methods
clearAll ()
→ Future <void >
Clears all cached data.
override
close ()
→ Future <void >
closes the cache manger
used to close the db
override
getCashuSecretCounter ({required String mintUrl , required String keysetId })
→ Future <int >
getDefaultWalletIdForReceiving ()
→ String ?
getDefaultWalletIdForSending ()
→ String ?
getKeysets ({String ? mintUrl })
→ Future <List >
getMintInfos ({List <String > ? mintUrls })
→ Future <List ? >
getProofs ({String ? mintUrl , String ? keysetId , dynamic state = CashuProofState.unspend })
→ Future <List >
getTransactions ({int ? limit , int ? offset , String ? walletId , String ? unit , dynamic walletType })
→ Future <List >
getWallets ({List <String > ? ids })
→ Future <List >
loadContactList (String pubKey )
→ Future <ContactList? >
override
loadEvent (String id )
→ Future <Nip01Event? >
override
loadEvents ({List <String > ? ids , List <String > ? pubKeys , List <int > ? kinds , Map <String , List <String > > ? tags , int ? since , int ? until , String ? search , int ? limit })
→ Future <List <Nip01Event > >
Load events from cache with flexible filtering
ids - list of event ids
pubKeys - list of authors pubKeys
kinds - list of kinds
tags - map of tags (e.g. {'p': 'pubkey1', 'e': 'eventid1'})
since - timestamp
until - timestamp
search - search string to match against content
limit - limit of results
returns list of events
override
loadFilterFetchedRangeRecords (String filterHash )
→ Future <List <FilterFetchedRangeRecord > >
Load all fetched range records for a filter hash
override
loadFilterFetchedRangeRecordsByRelay (String filterHash , String relayUrl )
→ Future <List <FilterFetchedRangeRecord > >
Load all fetched range records for a filter hash and relay
override
loadFilterFetchedRangeRecordsByRelayUrl (String relayUrl )
→ Future <List <FilterFetchedRangeRecord > >
Load all fetched range records for a relay (all filters)
override
loadMetadata (String pubKey )
→ Future <Metadata? >
override
loadMetadatas (List <String > pubKeys )
→ Future <List <Metadata? > >
override
loadNip05 ({String ? pubKey , String ? identifier })
→ Future <Nip05? >
override
loadNip05s (List <String > pubKeys )
→ Future <List <Nip05? > >
override
loadRelaySet (String name , String pubKey )
→ Future <RelaySet? >
override
loadUserRelayList (String pubKey )
→ Future <UserRelayList? >
override
noSuchMethod (Invocation invocation )
→ dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeAllContactLists ()
→ Future <void >
override
removeAllEvents ()
→ Future <void >
override
removeAllEventsByPubKey (String pubKey )
→ Future <void >
override
removeAllFilterFetchedRangeRecords ()
→ Future <void >
Remove all filter fetched range records
override
removeAllMetadatas ()
→ Future <void >
override
removeAllNip05s ()
→ Future <void >
override
removeAllRelaySets ()
→ Future <void >
override
removeAllUserRelayLists ()
→ Future <void >
override
removeContactList (String pubKey )
→ Future <void >
override
removeEvent (String id )
→ Future <void >
override
removeEvents ({List <String > ? ids , List <String > ? pubKeys , List <int > ? kinds , Map <String , List <String > > ? tags , int ? since , int ? until })
→ Future <void >
Remove events from cache with flexible filtering
ids - list of event ids
pubKeys - list of authors pubKeys
kinds - list of kinds
tags - map of tags (e.g. {'p': 'pubkey1', 'e': 'eventid1'})
since - timestamp
until - timestamp
If all parameters are empty, returns early (doesn't delete everything)
override
removeFilterFetchedRangeRecords (String filterHash )
→ Future <void >
Remove all fetched range records for a filter hash
override
removeFilterFetchedRangeRecordsByFilterAndRelay (String filterHash , String relayUrl )
→ Future <void >
Remove fetched range records for a specific filter hash and relay
override
removeFilterFetchedRangeRecordsByRelay (String relayUrl )
→ Future <void >
Remove all fetched range records for a relay
override
removeMetadata (String pubKey )
→ Future <void >
override
removeMintInfo ({required String mintUrl })
→ Future <void >
removeNip05 (String pubKey )
→ Future <void >
override
removeProofs ({required List proofs , required String mintUrl })
→ Future <void >
removeRelaySet (String name , String pubKey )
→ Future <void >
override
removeUserRelayList (String pubKey )
→ Future <void >
override
removeWallet (String walletId )
→ Future <void >
saveContactList (ContactList contactList )
→ Future <void >
override
saveContactLists (List <ContactList > contactLists )
→ Future <void >
override
saveEvent (Nip01Event event )
→ Future <void >
override
saveEvents (List <Nip01Event > events )
→ Future <void >
override
saveFilterFetchedRangeRecord (FilterFetchedRangeRecord record )
→ Future <void >
Save a filter fetched range record
override
saveFilterFetchedRangeRecords (List <FilterFetchedRangeRecord > records )
→ Future <void >
Save multiple filter fetched range records
override
saveKeyset (dynamic keyset )
→ Future <void >
saveMetadata (Metadata metadata )
→ Future <void >
override
saveMetadatas (List <Metadata > metadatas )
→ Future <void >
override
saveMintInfo ({required dynamic mintInfo })
→ Future <void >
saveNip05 (Nip05 nip05 )
→ Future <void >
override
saveNip05s (List <Nip05 > nip05s )
→ Future <void >
override
saveProofs ({required List proofs , required String mintUrl })
→ Future <void >
saveRelaySet (RelaySet relaySet )
→ Future <void >
override
saveTransactions (List transactions )
→ Future <void >
saveUserRelayList (UserRelayList userRelayList )
→ Future <void >
override
saveUserRelayLists (List <UserRelayList > userRelayLists )
→ Future <void >
override
searchEvents ({List <String > ? ids , List <String > ? authors , List <int > ? kinds , Map <String , List <String > > ? tags , int ? since , int ? until , String ? search , int limit = 100 })
→ Future <Iterable <Nip01Event > >
search events
ids - list of event ids
authors - list of authors pubKeys
kinds - list of kinds
tags - map of tags
since - timestamp
until - timestamp
search - search string to match against content
limit - limit of results
returns list of events
override
searchMetadatas (String search , int limit )
→ Future <Iterable <Metadata > >
Search by name, nip05
override
setCashuSecretCounter ({required String mintUrl , required String keysetId , required int counter })
→ Future <void >
setDefaultWalletForReceiving (String ? walletId )
→ void
setDefaultWalletForSending (String ? walletId )
→ void
storeWallet (dynamic wallet )
→ Future <void >
toString ()
→ String
A string representation of this object.
inherited