Package 

Class WalletCoordinator

    • Constructor Detail

      • WalletCoordinator

        WalletCoordinator(Context context, Flow<PersistableWallet> persistableWallet, Flow<Boolean> isTorEnabled, Flow<Boolean> isExchangeRateEnabled, String accountName, String keySource)
        Parameters:
        persistableWallet - flow of the user's stored wallet.
        isTorEnabled - flow indicating whether tor has been enabled for Synchronizer features supporting tor connection
        accountName - A human-readable name for the account, that will be used while instantiating Synchronizer.new
        keySource - A string identifier or other metadata describing the source of the seed, that will be used while instantiating Synchronizer.newOne area where this class needs to change before it can be moved out of the incubator is that we need to be able to start synchronization without necessarily decrypting the wallet.
    • Method Detail

      • getSynchronizer

         final StateFlow<Synchronizer> getSynchronizer()

        Synchronizer for the Zcash SDK. Emits null until a wallet secret is persisted.

        Note that this synchronizer is closed as soon as it stops being collected. For UI use cases, see WalletViewModel.

      • rescanBlockchain

         final Boolean rescanBlockchain()

        Rescans the blockchain.

        In order for a rescan to occur, the synchronizer must be loaded already which would happen if the UI is collecting it.

      • resetSdk

         final Unit resetSdk()

        Resets persisted data in the SDK, but preserves the wallet secret. This will cause the WalletCoordinator to emit a new synchronizer instance.

      • deleteSdkDataFlow

         final Flow<Boolean> deleteSdkDataFlow()

        This Flow-providing function deletes all the persisted data in the SDK (databases associated with this wallet, all compact blocks, and data derived from those blocks) but preserves the wallet secrets. This function requires secrets available on the device at the time of running.