zcash-android-wallet-sdk / cash.z.wallet.sdk / Synchronizer / sendToAddress

sendToAddress

abstract fun sendToAddress(spendingKey: String, zatoshi: Long, toAddress: String, memo: String = "", fromAccountIndex: Int = 0): Flow<PendingTransaction>

Sends zatoshi.

Parameters

spendingKey - the key associated with the notes that will be spent.

zatoshi - the amount of zatoshi to send.

toAddress - the recipient's address.

memo - the optional memo to include as part of the transaction.

fromAccountIndex - the optional account id to use. By default, the first account is used.

Return
a flow of PendingTransaction objects representing changes to the state of the transaction. Any time the state changes a new instance will be emitted by this flow. This is useful for updating the UI without needing to poll. Of course, polling is always an option for any wallet that wants to ignore this return value.