Class KeystoreServiceImpl

java.lang.Object
com.kryptokrauts.aeternity.sdk.service.keystore.impl.KeystoreServiceImpl
All Implemented Interfaces:
KeystoreService

public class KeystoreServiceImpl
extends java.lang.Object
implements KeystoreService
  • Constructor Summary

    Constructors
    Constructor Description
    KeystoreServiceImpl()  
  • 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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • KeystoreServiceImpl

      public KeystoreServiceImpl()
  • Method Details

    • createKeystore

      public java.lang.String createKeystore​(HdWallet hdWallet, java.lang.String keystorePassword) throws AException
      Description copied from interface: KeystoreService
      stores public key and mnemonic seed words (but not the password!) as JSON
      Specified by:
      createKeystore in interface KeystoreService
      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

      public java.util.List<java.lang.String> recoverMnemonicSeedWords​(java.lang.String keystoreJSON, java.lang.String keystorePassword) throws AException
      Description copied from interface: KeystoreService
      allows to recover the mnemnonic seed words from a given keystore json
      Specified by:
      recoverMnemonicSeedWords in interface KeystoreService
      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
    • createKeystore

      public java.lang.String createKeystore​(KeyPair keyPair, java.lang.String keystorePassword, java.lang.String keystoreName) throws AException
      Description copied from interface: KeystoreService
      create a JSON keystore which can be stored in a file for later recovery of the private key
      Specified by:
      createKeystore in interface KeystoreService
      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

      public java.lang.String recoverEncodedPrivateKey​(java.lang.String keystoreJSON, java.lang.String keystorePassword) throws AException
      Description copied from interface: KeystoreService
      allows to recover a private key from a given keystore json
      Specified by:
      recoverEncodedPrivateKey in interface KeystoreService
      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