Interface KeystoreService

All Known Implementing Classes:
KeystoreServiceImpl

public interface KeystoreService
  • Method Summary

    Modifier and Type Method Description
    java.lang.String createKeystore​(HdWallet hdWallet, java.lang.String keystorePassword)
    stores public key and mnemonic seed words (but not the password!) as JSON
    java.lang.String createKeystore​(KeyPair keyPair, java.lang.String keystorePassword, java.lang.String keystoreName)
    create a JSON keystore which can be stored in a file for later recovery of the private key
    java.lang.String recoverEncodedPrivateKey​(java.lang.String keystoreJSON, java.lang.String keystorePassword)
    allows to recover a private key from a given keystore json
    java.util.List<java.lang.String> recoverMnemonicSeedWords​(java.lang.String keystoreJSON, java.lang.String keystorePassword)
    allows to recover the mnemnonic seed words from a given keystore json
  • Method Details

    • createKeystore

      java.lang.String createKeystore​(KeyPair keyPair, java.lang.String keystorePassword, java.lang.String keystoreName) throws AException
      create a JSON keystore which can be stored in a file for later recovery of the private key
      Parameters:
      keyPair - the public / private keypair
      keystorePassword - the password for symmetric encryption
      keystoreName - the name of the keystore wallet
      Returns:
      encrypts the keypair using the given walletPassword and returns a JSON derived from Keystore
      Throws:
      AException - if an error occurs
    • recoverEncodedPrivateKey

      java.lang.String recoverEncodedPrivateKey​(java.lang.String keystoreJSON, java.lang.String keystorePassword) throws AException
      allows to recover a private key from a given keystore json
      Parameters:
      keystoreJSON - the keystore JSON derived from Keystore
      keystorePassword - the symmetric password used to create the keystore
      Returns:
      encoded private key
      Throws:
      AException - if an error occurs
    • createKeystore

      java.lang.String createKeystore​(HdWallet hdWallet, java.lang.String keystorePassword) throws AException
      stores public key and mnemonic seed words (but not the password!) as JSON
      Parameters:
      hdWallet - instance of HdWallet
      keystorePassword - keystorePassword the symmetric password used to create the keystore
      Returns:
      encrypts the HDWallets seed word list using the given walletPassword and returns a JSON derived from Keystore
      Throws:
      AException - if an error occurs
    • recoverMnemonicSeedWords

      java.util.List<java.lang.String> recoverMnemonicSeedWords​(java.lang.String keystoreJSON, java.lang.String keystorePassword) throws AException
      allows to recover the mnemnonic seed words from a given keystore json
      Parameters:
      keystoreJSON - the keystore JSON derived from Keystore
      keystorePassword - the symmetric password used to create the keystore
      Returns:
      list of mnemonic seed words
      Throws:
      AException - if an error occurs