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

RustBackend

class RustBackend : RustBackendWelding

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.

Constructors

<init>

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.

RustBackend()

Functions

clear

fun clear(clearCacheDb: Boolean = true, clearDataDb: Boolean = true): Unit

createToAddress

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

deriveAddress

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

deriveSpendingKeys

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

deriveViewingKey

fun deriveViewingKey(spendingKey: String): String

deriveViewingKeys

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

getAddress

fun getAddress(account: Int): String

getBalance

fun getBalance(account: Int): Long

getReceivedMemoAsUtf8

fun getReceivedMemoAsUtf8(idNote: Long): String

getSentMemoAsUtf8

fun getSentMemoAsUtf8(idNote: Long): String

getVerifiedBalance

fun getVerifiedBalance(account: Int): Long

init

Loads the library and initializes path variables. Although it is best to only call this function once, it is idempotent.

fun init(cacheDbPath: String, dataDbPath: String, paramsPath: String): RustBackend

initAccountsTable

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

initBlocksTable

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

initDataDb

fun initDataDb(): Boolean

isValidShieldedAddr

fun isValidShieldedAddr(addr: String): Boolean

isValidTransparentAddr

fun isValidTransparentAddr(addr: String): Boolean

rewindToHeight

fun rewindToHeight(height: Int): Boolean

scanBlocks

fun scanBlocks(limit: Int): Boolean

validateCombinedChain

fun validateCombinedChain(): Int

Companion Object Functions

load

fun load(): Unit