-
public class Synchronizer.Companion
-
-
Field Summary
Fields Modifier and Type Field Description public final static Synchronizer.CompanionINSTANCE
-
Method Summary
Modifier and Type Method Description final CloseableSynchronizernew(Context context, ZcashNetwork zcashNetwork, String alias, LightWalletEndpoint lightWalletEndpoint, ByteArray seed, BlockHeight birthday, WalletInitMode walletInitMode)Primary method that SDK clients will use to construct a synchronizer. final CloseableSynchronizernewBlocking(Context context, ZcashNetwork zcashNetwork, String alias, LightWalletEndpoint lightWalletEndpoint, ByteArray seed, BlockHeight birthday, WalletInitMode walletInitMode)Effectively the same as new although designed to be a blocking call with better interoperability with Java clients. final Booleanerase(Context appContext, ZcashNetwork network, String alias)Delete the databases associated with this wallet. -
-
Method Detail
-
new
final CloseableSynchronizer new(Context context, ZcashNetwork zcashNetwork, String alias, LightWalletEndpoint lightWalletEndpoint, ByteArray seed, BlockHeight birthday, WalletInitMode walletInitMode)
Primary method that SDK clients will use to construct a synchronizer.
- Parameters:
zcashNetwork- the network to use.alias- A string used to segregate multiple wallets in the filesystem.lightWalletEndpoint- Server endpoint.seed- the wallet's seed phrase.birthday- Block height representing the "birthday" of the wallet.walletInitMode- a required parameter with one of WalletInitMode values.
-
newBlocking
final CloseableSynchronizer newBlocking(Context context, ZcashNetwork zcashNetwork, String alias, LightWalletEndpoint lightWalletEndpoint, ByteArray seed, BlockHeight birthday, WalletInitMode walletInitMode)
Effectively the same as new although designed to be a blocking call with better interoperability with Java clients.
This is a blocking call, so it should not be called from the main thread.
-
erase
final Boolean erase(Context appContext, ZcashNetwork network, String alias)
Delete the databases associated with this wallet. This removes all compact blocks and data derived from those blocks. Although most data can be regenerated by setting up a new Synchronizer instance with the seed, there are two special cases where data is not retained:
Outputs created with a
nullOVKThe UA to which a transaction was sent (recovery from seed will only reveal the receiver, not the full UA)
- Parameters:
appContext- the application context.network- the network associated with the data to be erased.alias- the alias used to create the local data.
-
-
-
-