Java Code Examples for org.web3j.crypto.Credentials#getEcKeyPair()

The following examples show how to use org.web3j.crypto.Credentials#getEcKeyPair() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: WalletManager.java    From guarda-android-wallets with GNU General Public License v3.0 5 votes vote down vote up
private void restoreWalletFromFile(String walletPath, String pass, WalletCreationCallback callback) {
    Credentials credentials = null;
    try {
        credentials = WalletUtils.loadCredentials(pass, walletPath);
    } catch (IOException | CipherException e) {
        e.printStackTrace();
    }

    if (credentials != null) {
        ECKeyPair keyPair = credentials.getEcKeyPair();
        WalletCreationTask task = new WalletCreationTask(callback, keyPair);
        task.execute(pass);
    }
}
 
Example 2
Source File: WalletManager.java    From guarda-android-wallets with GNU General Public License v3.0 5 votes vote down vote up
private void restoreWalletFromFile(String walletPath, String pass, WalletCreationCallback callback) {
    Credentials credentials = null;
    try {
        credentials = WalletUtils.loadCredentials(pass, walletPath);
    } catch (IOException | CipherException e) {
        e.printStackTrace();
    }

    if (credentials != null) {
        ECKeyPair keyPair = credentials.getEcKeyPair();
        WalletCreationTask task = new WalletCreationTask(callback, keyPair);
        task.execute(pass);
    }
}
 
Example 3
Source File: WalletManager.java    From guarda-android-wallets with GNU General Public License v3.0 5 votes vote down vote up
private void restoreWalletFromFile(String walletPath, String pass, WalletCreationCallback callback) {
    Credentials credentials = null;
    try {
        credentials = WalletUtils.loadCredentials(pass, walletPath);
    } catch (IOException | CipherException e) {
        e.printStackTrace();
    }

    if (credentials != null) {
        ECKeyPair keyPair = credentials.getEcKeyPair();
        WalletCreationTask task = new WalletCreationTask(callback, keyPair);
        task.execute(pass);
    }
}