Package 

Class RustDerivationTool

    • Method Detail

      • deriveUnifiedAddress

         String deriveUnifiedAddress(String viewingKey, Integer networkId)

        Given a Unified Full Viewing Key string, return the associated Unified Address.

        Parameters:
        viewingKey - the viewing key to use for deriving the address.
      • derivePrivateUseMetadataKey

         Array<ByteArray> derivePrivateUseMetadataKey(JniMetadataKey accountMetadataKey, String ufvk, Integer networkId, ByteArray privateUseSubject)

        Derives a metadata key for private use from a ZIP 325 Account Metadata Key.

        If ufvk is non-null, this method will return one metadata key for every FVK item contained within the UFVK, in preference order. As UFVKs may in general change over time (due to the inclusion of new higher-preference FVK items, or removal of older deprecated FVK items), private usage of these keys should always follow preference order:

        • For encryption-like private usage, the first key in the array should always be used, and all other keys ignored.

        • For decryption-like private usage, each key in the array should be tried in turn until metadata can be recovered, and then the metadata should be re-encrypted under the first key.

        Parameters:
        ufvk - the external UFVK for which a metadata key is required, or null if the metadata key is "inherent" (for the same account as the Account Metadata Key).
        privateUseSubject - a globally unique non-empty sequence of at most 252 bytes that identifies the desired private-use context.
      • deriveArbitraryWalletKey

         ByteArray deriveArbitraryWalletKey(ByteArray contextString, ByteArray seed)

        Derives a ZIP 32 Arbitrary Key from the given seed at the "wallet level", i.e. directly from the seed with no ZIP 32 path applied.

        The resulting key will be the same across all networks (Zcash mainnet, Zcash testnet, OtherCoin mainnet, and so on). You can think of it as a context-specific seed fingerprint that can be used as (static) key material.

        Parameters:
        contextString - a globally-unique non-empty sequence of at most 252 bytes that identifies the desired context.
      • deriveArbitraryAccountKey

         ByteArray deriveArbitraryAccountKey(ByteArray contextString, ByteArray seed, Integer networkId, Long accountIndex)

        Derives a ZIP 32 Arbitrary Key from the given seed at the account level.

        Parameters:
        contextString - a globally-unique non-empty sequence of at most 252 bytes that identifies the desired context.