zcash-android-wallet-sdk / cash.z.wallet.sdk.jni / RustBackendWelding

RustBackendWelding

interface RustBackendWelding

Contract defining the exposed capabilities of the Rust backend. This is what welds the SDK to the Rust layer. It is not documented because it is not intended to be used, directly. Instead, use the synchronizer or one of its subcomponents.

Functions

createToAddress

abstract fun createToAddress(account: Int, extsk: String, to: String, value: Long, memo: ByteArray? = byteArrayOf()): Long

deriveAddress

abstract fun deriveAddress(seed: ByteArray, accountIndex: Int = 0): String
abstract fun deriveAddress(viewingKey: String): String

deriveSpendingKeys

abstract fun deriveSpendingKeys(seed: ByteArray, numberOfAccounts: Int = 1): Array<String>

deriveViewingKey

abstract fun deriveViewingKey(spendingKey: String): String

deriveViewingKeys

abstract fun deriveViewingKeys(seed: ByteArray, numberOfAccounts: Int = 1): Array<String>

getAddress

abstract fun getAddress(account: Int = 0): String

getBalance

abstract fun getBalance(account: Int = 0): Long

getReceivedMemoAsUtf8

abstract fun getReceivedMemoAsUtf8(idNote: Long): String

getSentMemoAsUtf8

abstract fun getSentMemoAsUtf8(idNote: Long): String

getVerifiedBalance

abstract fun getVerifiedBalance(account: Int = 0): Long

initAccountsTable

abstract fun initAccountsTable(seed: ByteArray, numberOfAccounts: Int): Array<String>

initBlocksTable

abstract fun initBlocksTable(height: Int, hash: String, time: Long, saplingTree: String): Boolean

initDataDb

abstract fun initDataDb(): Boolean

isValidShieldedAddr

abstract fun isValidShieldedAddr(addr: String): Boolean

isValidTransparentAddr

abstract fun isValidTransparentAddr(addr: String): Boolean

rewindToHeight

abstract fun rewindToHeight(height: Int): Boolean

scanBlocks

abstract fun scanBlocks(limit: Int = -1): Boolean

validateCombinedChain

abstract fun validateCombinedChain(): Int

Inheritors

RustBackend

Serves as the JNI boundary between the Kotlin and Rust layers. Functions in this class should not be called directly by code outside of the SDK. Instead, one of the higher-level components should be used such as Wallet.kt or CompactBlockProcessor.kt.

class RustBackend : RustBackendWelding