interface TransactionEncoder
createTransaction |
Creates a transaction, throwing an exception whenever things are missing. When the provided wallet implementation doesn't throw an exception, we wrap the issue into a descriptive exception ourselves (rather than using double-bangs for things). abstract suspend fun createTransaction(spendingKey: String, zatoshi: Long, toAddress: String, memo: ByteArray? = byteArrayOf(), fromAccountIndex: Int = 0): EncodedTransaction |
isValidShieldedAddress |
Utility function to help with validation. This is not called during createTransaction because this class asserts that all validation is done externally by the UI, for now. abstract suspend fun isValidShieldedAddress(address: String): Boolean |
isValidTransparentAddress |
Utility function to help with validation. This is not called during createTransaction because this class asserts that all validation is done externally by the UI, for now. abstract suspend fun isValidTransparentAddress(address: String): Boolean |
WalletTransactionEncoder |
Class responsible for encoding a transaction in a consistent way. This bridges the gap by behaving like a stateless API so that callers can request createTransaction and receive a result, even though there are intermediate database interactions. class WalletTransactionEncoder : TransactionEncoder |