aries / net.globalid.aries.storage / WalletStorageManager

WalletStorageManager

class WalletStorageManager

Wallet storage manager

The wallet storage manager is used for adding, getting, updating, removing and searching records in provided wallet. The manager doesn't hard-linked with processing wallet and can be used with multiple wallets.

Constructors

<init>

Wallet storage manager

WalletStorageManager()

Functions

add

Addes a new non-secret record to wallet

fun add(wallet: Wallet, record: BaseRecord): Completable

delete

Deletes a non-secret a record from wallet by id. This method is important because Java doesn't work with inline methods with reified generic.

fun <T : BaseRecord> delete(wallet: Wallet, type: Class<T>, id: String): Single<Boolean>

Deletes a non-secret a record from wallet by id

fun <T : BaseRecord> delete(wallet: Wallet, id: String): Single<Boolean>

get

Gets a non-secret a record from wallet by id. This method is important because Java doesn't work with inline methods with reified generic.

fun <T : BaseRecord> get(wallet: Wallet, type: Class<T>, id: String): Maybe<T>

Gets a non-secret a record from wallet by id

fun <T : BaseRecord> get(wallet: Wallet, id: String): Maybe<T>

search

Searches special records in wallet by query and options with limit count. This method is important because Java doesn't work with inline methods with reified generic.

fun <T : BaseRecord> search(wallet: Wallet, type: Class<T>, query: SearchQuery = QueryBuilder.EMPTY_QUERY, options: SearchOptions = SearchOptions(), count: Int): Single<List<T>>

Searches special records in wallet by query and options with limit count.

fun <T : BaseRecord> search(wallet: Wallet, query: SearchQuery = QueryBuilder.EMPTY_QUERY, options: SearchOptions = SearchOptions(), count: Int): Single<List<T>>

update

Updates a non-secret a record from wallet by record

fun update(wallet: Wallet, record: BaseRecord): Completable