Class Wallet

java.lang.Object
org.web3j.crypto.Wallet

public class Wallet extends Object
Ethereum wallet file management. For reference, refer to Web3 Secret Storage Definition or the Go Ethereum client implementation.

Note: the Bouncy Castle Scrypt implementation SCrypt, fails to comply with the following Ethereum reference Scrypt test vector:


 // Only value of r that cost (as an int) could be exceeded for is 1
 if (r == 1 && N_STANDARD > 65536)
 {
     throw new IllegalArgumentException("Cost parameter N_STANDARD must be > 1 and < 65536.");
 }
 
  • Constructor Details

    • Wallet

      public Wallet()
  • Method Details

    • create

      public static WalletFile create(String password, org.web3j.crypto.ECKeyPair ecKeyPair, int n, int p) throws org.web3j.crypto.CipherException
      Throws:
      org.web3j.crypto.CipherException
    • createStandard

      public static WalletFile createStandard(String password, org.web3j.crypto.ECKeyPair ecKeyPair) throws org.web3j.crypto.CipherException
      Throws:
      org.web3j.crypto.CipherException
    • createLight

      public static WalletFile createLight(String password, org.web3j.crypto.ECKeyPair ecKeyPair) throws org.web3j.crypto.CipherException
      Throws:
      org.web3j.crypto.CipherException
    • decrypt

      public static org.web3j.crypto.ECKeyPair decrypt(String password, WalletFile walletFile) throws org.web3j.crypto.CipherException
      Throws:
      org.web3j.crypto.CipherException