zcash-android-wallet-sdk / cash.z.wallet.sdk / Initializer / deriveAddress

deriveAddress

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

Given a seed and account index, return the associated address.

Parameters

seed - the seed from which to derive the address.

accountIndex - the index of the account to use for deriving the address. Multiple accounts are not fully supported so the default value of 1 is recommended.

Return
the address that corresponds to the seed and account index.

fun deriveAddress(viewingKey: String): String

Given a viewing key string, return the associated address.

Parameters

viewingKey - the viewing key to use for deriving the address. The viewing key is tied to a specific account so no account index is required.

Return
the address that corresponds to the viewing key.