2020-06-10 00:08:19 -07:00
|
|
|
[zcash-android-wallet-sdk](../../index.md) / [cash.z.ecc.android.sdk.data](../index.md) / [SdkSynchronizer](index.md) / [<init>](./-init-.md)
|
2019-03-28 23:31:25 -07:00
|
|
|
|
|
|
|
# <init>
|
|
|
|
|
2020-06-10 00:08:19 -07:00
|
|
|
`SdkSynchronizer(wallet: `[`Wallet`](../../cash.z.ecc.android.sdk.secure/-wallet/index.md)`, ledger: `[`TransactionRepository`](../-transaction-repository/index.md)`, sender: `[`TransactionSender`](../-transaction-sender/index.md)`, processor: `[`CompactBlockProcessor`](../../cash.z.ecc.android.sdk.block/-compact-block-processor/index.md)`, encoder: `[`TransactionEncoder`](../-transaction-encoder/index.md)`)`
|
2019-03-28 23:31:25 -07:00
|
|
|
|
2019-08-30 10:05:02 -07:00
|
|
|
A synchronizer that attempts to remain operational, despite any number of errors that can occur. It acts as the glue
|
|
|
|
that ties all the pieces of the SDK together. Each component of the SDK is designed for the potential of stand-alone
|
|
|
|
usage but coordinating all the interactions is non-trivial. So the synchronizer facilitates this, acting as reference
|
|
|
|
that demonstrates how all the pieces can be tied together. Its goal is to allow a developer to focus on their app
|
|
|
|
rather than the nuances of how Zcash works.
|
2019-03-28 23:31:25 -07:00
|
|
|
|
2019-03-30 09:22:20 -07:00
|
|
|
### Parameters
|
|
|
|
|
2019-08-30 10:05:02 -07:00
|
|
|
`wallet` - the component that wraps the JNI layer that interacts with the rust backend and manages wallet config.
|
2019-03-30 09:22:20 -07:00
|
|
|
|
|
|
|
`repository` - the component that exposes streams of wallet transaction information.
|
|
|
|
|
2019-08-30 10:05:02 -07:00
|
|
|
`sender` - the component responsible for sending transactions to lightwalletd in order to spend funds.
|
2019-03-30 09:22:20 -07:00
|
|
|
|
2019-08-30 10:05:02 -07:00
|
|
|
`processor` - the component that saves the downloaded compact blocks to the cache and then scans those blocks for
|
|
|
|
data related to this wallet.
|
2019-03-30 09:22:20 -07:00
|
|
|
|
2020-06-09 20:28:21 -07:00
|
|
|
`encoder` - the component that creates a signed transaction, used for spending funds.
|