class WalletTransactionEncoder : TransactionEncoder
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.
<init> |
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. WalletTransactionEncoder(rustBackend: RustBackendWelding, repository: TransactionRepository) |
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). suspend fun createTransaction(spendingKey: String, zatoshi: Long, toAddress: String, memo: ByteArray?, fromAccountIndex: Int): EncodedTransaction |
fetchParams |
Download and store the params into the given directory. suspend fun fetchParams(destinationDir: String): Unit |
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. 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. suspend fun isValidTransparentAddress(address: String): Boolean |