Merge pull request #121 from rex4539/fix-typos

Fix typos and cleanup
This commit is contained in:
Kevin Gorham 2020-04-16 11:33:30 -04:00 committed by GitHub
commit ae2af49913
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 28 additions and 28 deletions

View File

@ -45,7 +45,7 @@ Thankfully, the only thing an app developer has to be concerned with is the foll
## Overview ## Overview
At a high level, this SDK simply helps native Android codebases connect to Zcash's Rust crypto libraries without needing to know Rust or be a Cryptographer. Think of it as welding. The SDK takes separate things and tightly bonds them together such that each can remain as idiomatic as possible. It's goal is to make it easy for an app to incorporate shielded transactions while remaining a good citizen on mobile devices. At a high level, this SDK simply helps native Android codebases connect to Zcash's Rust crypto libraries without needing to know Rust or be a Cryptographer. Think of it as welding. The SDK takes separate things and tightly bonds them together such that each can remain as idiomatic as possible. Its goal is to make it easy for an app to incorporate shielded transactions while remaining a good citizen on mobile devices.
Given all the moving parts, making things easy requires coordination. The [Synchronizer](docs/-synchronizer/README.md) provides that layer of abstraction so that the primary steps to make use of this SDK are simply: Given all the moving parts, making things easy requires coordination. The [Synchronizer](docs/-synchronizer/README.md) provides that layer of abstraction so that the primary steps to make use of this SDK are simply:

View File

@ -56,7 +56,7 @@ In the UNTRUSTED scenario:
## Security Invariants ## Security Invariants
Given these scenarios and adversaries, we can now state the security invariants Given these scenarios and adversaries, we can now state the security invariants
we stive to satisfy. While we pride ourselves on building high-quality software, we strive to satisfy. While we pride ourselves on building high-quality software,
all software contains bugs, and so this threat model must not be construed as all software contains bugs, and so this threat model must not be construed as
any kind of warranty that our software satisfies these properties. any kind of warranty that our software satisfies these properties.

View File

@ -33,7 +33,7 @@ To explore the app, click on each menu item, in order, and also look at the asso
![The android demo app, running in Android Studio](assets/demo-app.png?raw=true "Demo App with Android Studio") ![The android demo app, running in Android Studio](assets/demo-app.png?raw=true "Demo App with Android Studio")
The demo app is not trying to show what's possible, but to present how to accomplish the building blocks of wallet functionality in a simple way in code. It is comprised of the following self-contained demos. All data is reset between demos in order to keep the behavior repeatable and independant of state. The demo app is not trying to show what's possible, but to present how to accomplish the building blocks of wallet functionality in a simple way in code. It is comprised of the following self-contained demos. All data is reset between demos in order to keep the behavior repeatable and independent of state.
### Demos ### Demos
@ -44,7 +44,7 @@ Get Address|[GetAddressFragment.kt](app/src/main/java/cash/z/wallet/sdk/demoapp/
Get Latest Height|[GetLatestHeightFragment.kt](app/src/main/java/cash/z/wallet/sdk/demoapp/demos/getlatestheight/GetLatestHeightFragment.kt)|Given a lightwalletd server, retrieve the latest block height Get Latest Height|[GetLatestHeightFragment.kt](app/src/main/java/cash/z/wallet/sdk/demoapp/demos/getlatestheight/GetLatestHeightFragment.kt)|Given a lightwalletd server, retrieve the latest block height
Get Block|[GetBlockFragment.kt](app/src/main/java/cash/z/wallet/sdk/demoapp/demos/getblock/GetBlockFragment.kt)|Given a lightwalletd server, retrieve a compact block Get Block|[GetBlockFragment.kt](app/src/main/java/cash/z/wallet/sdk/demoapp/demos/getblock/GetBlockFragment.kt)|Given a lightwalletd server, retrieve a compact block
Get Block Range|[GetBlockRangeFragment.kt](app/src/main/java/cash/z/wallet/sdk/demoapp/demos/getblockrange/GetBlockRangeFragment.kt)|Given a lightwalletd server, retrieve a range of compact blocks Get Block Range|[GetBlockRangeFragment.kt](app/src/main/java/cash/z/wallet/sdk/demoapp/demos/getblockrange/GetBlockRangeFragment.kt)|Given a lightwalletd server, retrieve a range of compact blocks
List Transactions|[ListTransactionsFragment.kt](app/src/main/java/cash/z/wallet/sdk/demoapp/demos/listtransactions/ListTransactionsFragment.kt)|Given a seed, list all related shielded transations List Transactions|[ListTransactionsFragment.kt](app/src/main/java/cash/z/wallet/sdk/demoapp/demos/listtransactions/ListTransactionsFragment.kt)|Given a seed, list all related shielded transactions
Send|[SendFragment.kt](app/src/main/java/cash/z/wallet/sdk/demoapp/demos/send/SendFragment.kt)|Send and monitor a transaction, the most complex demo Send|[SendFragment.kt](app/src/main/java/cash/z/wallet/sdk/demoapp/demos/send/SendFragment.kt)|Send and monitor a transaction, the most complex demo
[Back to contents](#contents) [Back to contents](#contents)

View File

@ -177,7 +177,7 @@ class Initializer(
* @param birthday the birthday to use for this wallet. This is used in order to seed the data * @param birthday the birthday to use for this wallet. This is used in order to seed the data
* DB with the first sapling tree, which also determines where the SDK begins downloading and * DB with the first sapling tree, which also determines where the SDK begins downloading and
* scanning. Any blocks lower than the height represented by this birthday can safely be ignored * scanning. Any blocks lower than the height represented by this birthday can safely be ignored
* since a wallet cannot have transactions prior to it's creation. * since a wallet cannot have transactions prior to its creation.
* @param numberOfAccounts the number of accounts to create. Only 1 account is tested and * @param numberOfAccounts the number of accounts to create. Only 1 account is tested and
* supported at this time. It is possible, although unlikely that multiple accounts would behave * supported at this time. It is possible, although unlikely that multiple accounts would behave
* as expected. Due to the nature of shielded address, the official Zcash recommendation is to * as expected. Due to the nature of shielded address, the official Zcash recommendation is to

View File

@ -141,7 +141,7 @@ class SdkSynchronizer internal constructor(
* *
* @param parentScope the scope to use for this synchronizer, typically something with a * @param parentScope the scope to use for this synchronizer, typically something with a
* lifecycle such as an Activity for single-activity apps or a logged in user session. This * lifecycle such as an Activity for single-activity apps or a logged in user session. This
* scope is only used for launching this synchronzer's job as a child. If no scope is provided, * scope is only used for launching this synchronizer's job as a child. If no scope is provided,
* then this synchronizer and all of its coroutines will run until stop is called, which is not * then this synchronizer and all of its coroutines will run until stop is called, which is not
* recommended since it can leak resources. That type of behavior is more useful for tests. * recommended since it can leak resources. That type of behavior is more useful for tests.
* *

View File

@ -284,7 +284,7 @@ interface Synchronizer {
/** /**
* An instance of [AddressType] corresponding to an invalid address. * An instance of [AddressType] corresponding to an invalid address.
* *
* @param reason a descrption of why the address was invalid. * @param reason a description of why the address was invalid.
*/ */
class Invalid(val reason: String = "Invalid") : AddressType() class Invalid(val reason: String = "Invalid") : AddressType()

View File

@ -325,7 +325,7 @@ class CompactBlockProcessor(
* *
* @param range the range of blocks to validate. * @param range the range of blocks to validate.
* *
* @return -1 when there is not problem. Otherwise, return the lowest height where an error was * @return -1 when there is no problem. Otherwise, return the lowest height where an error was
* found. In other words, validation starts at the back of the chain and works toward the tip. * found. In other words, validation starts at the back of the chain and works toward the tip.
*/ */
private fun validateNewBlocks(range: IntRange?): Int { private fun validateNewBlocks(range: IntRange?): Int {
@ -346,7 +346,7 @@ class CompactBlockProcessor(
* *
* @param range the range of blocks to scan. * @param range the range of blocks to scan.
* *
* @return -1 when there is not problem. Otherwise, return the lowest height where an error was * @return -1 when there is no problem. Otherwise, return the lowest height where an error was
* found. In other words, scanning starts at the back of the chain and works toward the tip. * found. In other words, scanning starts at the back of the chain and works toward the tip.
*/ */
private suspend fun scanNewBlocks(range: IntRange?): Boolean = withContext(IO) { private suspend fun scanNewBlocks(range: IntRange?): Boolean = withContext(IO) {

View File

@ -5,7 +5,7 @@ import java.lang.RuntimeException
/** /**
* Marker for all custom exceptions from the SDK. Making it an interface would result in more typing * Marker for all custom exceptions from the SDK. Making it an interface would result in more typing
* so its a supertype, instead. * so it's a supertype, instead.
*/ */
open class SdkException(message: String, cause: Throwable?) : RuntimeException(message, cause) open class SdkException(message: String, cause: Throwable?) : RuntimeException(message, cause)
@ -28,7 +28,7 @@ sealed class RepositoryException(message: String, cause: Throwable? = null) : Sd
} }
/** /**
* High-level exceptions thrown by the synchronizer, which do not fall within the umbrealla of a * High-level exceptions thrown by the synchronizer, which do not fall within the umbrella of a
* child component. * child component.
*/ */
sealed class SynchronizerException(message: String, cause: Throwable? = null) : SdkException(message, cause) { sealed class SynchronizerException(message: String, cause: Throwable? = null) : SdkException(message, cause) {

View File

@ -133,7 +133,7 @@ inline fun BigDecimal?.toUsdString(
/** /**
* Create a number formatter for use with converting currency to strings. This probably isn't needed * Create a number formatter for use with converting currency to strings. This probably isn't needed
* externally since the other formatting functions leverage this, instead. Leverages the default * externally since the other formatting functions leverage this, instead. Leverages the default
* rounding mode for zec found in ZEC_FORMATTER. * rounding mode for ZEC found in ZEC_FORMATTER.
* *
* @param maxDecimals the number of decimal places to use in the format. Default is 6 because ZEC is * @param maxDecimals the number of decimal places to use in the format. Default is 6 because ZEC is
* glorious. * glorious.

View File

@ -64,7 +64,7 @@ inline fun retrySimple(retries: Int = 2, sleepTime: Long = 20L, block: (Int) ->
* @param onErrorListener a callback that gets the first shot at processing any error and can veto * @param onErrorListener a callback that gets the first shot at processing any error and can veto
* the retry behavior by returning false. * the retry behavior by returning false.
* @param initialDelayMillis the initial delay before retrying. * @param initialDelayMillis the initial delay before retrying.
* @param maxDelayMillis the maximum delay between retrys. * @param maxDelayMillis the maximum delay between retries.
* @param block the logic to run once and then run again if it fails. * @param block the logic to run once and then run again if it fails.
*/ */
suspend inline fun retryWithBackoff(noinline onErrorListener: ((Throwable) -> Boolean)? = null, initialDelayMillis: Long = 1000L, maxDelayMillis: Long = MAX_BACKOFF_INTERVAL, block: () -> Unit) { suspend inline fun retryWithBackoff(noinline onErrorListener: ((Throwable) -> Boolean)? = null, initialDelayMillis: Long = 1000L, maxDelayMillis: Long = MAX_BACKOFF_INTERVAL, block: () -> Unit) {

View File

@ -15,7 +15,7 @@ import kotlinx.coroutines.flow.Flow
* Constructs a `Flow<PagedList>`, from this `DataSource.Factory`, convenience for * Constructs a `Flow<PagedList>`, from this `DataSource.Factory`, convenience for
* [FlowPagedListBuilder]. * [FlowPagedListBuilder].
* *
* No work (such as loading) is done immediately, the creation of the first PagedList is is * No work (such as loading) is done immediately, the creation of the first PagedList is
* deferred until the Flow is collected. * deferred until the Flow is collected.
* *
* @param config Paging configuration. * @param config Paging configuration.
@ -39,7 +39,7 @@ fun <Key, Value> DataSource.Factory<Key, Value>.toFlowPagedList(
* Constructs a `Flow<PagedList>`, from this `DataSource.Factory`, convenience for * Constructs a `Flow<PagedList>`, from this `DataSource.Factory`, convenience for
* [FlowPagedListBuilder]. * [FlowPagedListBuilder].
* *
* No work (such as loading) is done immediately, the creation of the first PagedList is is * No work (such as loading) is done immediately, the creation of the first PagedList is
* deferred until the Flow is collected. * deferred until the Flow is collected.
* *
* @param pageSize Page size. * @param pageSize Page size.

View File

@ -39,7 +39,7 @@ class FlowPagedListBuilder<Key, Value>(
/** /**
* Constructs the `Flow<PagedList>`. * Constructs the `Flow<PagedList>`.
* *
* No work (such as loading) is done immediately, the creation of the first PagedList is is * No work (such as loading) is done immediately, the creation of the first PagedList is
* deferred until the Flow is collected. * deferred until the Flow is collected.
* *
* @return The Flow of PagedLists * @return The Flow of PagedLists

View File

@ -54,7 +54,7 @@ interface OutboundTransactionManager {
* Given a transaction and the height at which it was mined, update the transaction to indicate * Given a transaction and the height at which it was mined, update the transaction to indicate
* that it was mined. * that it was mined.
* *
* @param pendingTx the pending transaction that has been mineed. * @param pendingTx the pending transaction that has been mined.
* @param minedHeight the height at which the given transaction was mined, according to the data * @param minedHeight the height at which the given transaction was mined, according to the data
* that has been processed from the blockchain. * that has been processed from the blockchain.
*/ */
@ -67,7 +67,7 @@ interface OutboundTransactionManager {
* @param id the id to monitor. * @param id the id to monitor.
* *
* @return a flow of pending transactions that are emitted anytime the transaction associated * @return a flow of pending transactions that are emitted anytime the transaction associated
* withh the given id changes. * with the given id changes.
*/ */
suspend fun monitorById(id: Long): Flow<PendingTransaction> suspend fun monitorById(id: Long): Flow<PendingTransaction>