Package network.quant.ethereum
Class EthereumAccount
- java.lang.Object
-
- network.quant.ethereum.EthereumAccount
-
- All Implemented Interfaces:
network.quant.api.Account
public class EthereumAccount extends java.lang.Object implements network.quant.api.AccountEthereum implementation of Account
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static network.quant.api.AccountgetInstance(network.quant.api.NETWORK network)static network.quant.api.AccountgetInstance(network.quant.api.NETWORK network, byte[] privateKey, java.math.BigInteger nonce)static network.quant.api.AccountgetInstance(network.quant.api.NETWORK network, byte[] privateKey, java.math.BigInteger nonce, network.quant.api.Encryptor encryptor, network.quant.api.Compressor compressor)Get Ethereum wallet instance by given secret key arraystatic network.quant.api.AccountgetInstance(network.quant.api.NETWORK network, java.math.BigInteger privateKey, java.math.BigInteger nonce)static network.quant.api.AccountgetInstance(network.quant.api.NETWORK network, java.math.BigInteger privateKey, java.math.BigInteger nonce, network.quant.api.Encryptor encryptor, network.quant.api.Compressor compressor)Get Ethereum wallet instance by given secret key numberstatic network.quant.api.AccountgetInstance(network.quant.api.NETWORK network, network.quant.api.Encryptor encryptor, network.quant.api.Compressor compressor)Create Ethereum wallet instance with new keystatic network.quant.api.AccountgetInstance(network.quant.api.NETWORK network, org.web3j.crypto.ECKeyPair privateKey, java.math.BigInteger nonce)static network.quant.api.AccountgetInstance(network.quant.api.NETWORK network, org.web3j.crypto.ECKeyPair privateKey, java.math.BigInteger nonce, network.quant.api.Encryptor encryptor, network.quant.api.Compressor compressor)Get Ethereum wallet instance by given secret key objectjava.math.BigIntegergetPrivateKey()voidsetPrivateKey(java.math.BigInteger key)voidsign(java.lang.String fromAddress, java.lang.String toAddress, byte[] data, network.quant.api.DltTransaction dltTransaction)voidsign(java.lang.String fromAddress, java.lang.String toAddress, java.io.InputStream stream, network.quant.api.DltTransaction dltTransaction)voidsign(java.lang.String fromAddress, java.lang.String toAddress, java.lang.String message, network.quant.api.DltTransaction dltTransaction)network.quant.api.AccountwithNetwork(network.quant.api.NETWORK network)
-
-
-
Method Detail
-
withNetwork
public network.quant.api.Account withNetwork(network.quant.api.NETWORK network)
- Specified by:
withNetworkin interfacenetwork.quant.api.Account
-
setPrivateKey
public void setPrivateKey(java.math.BigInteger key)
- Specified by:
setPrivateKeyin interfacenetwork.quant.api.Account
-
getPrivateKey
public java.math.BigInteger getPrivateKey()
- Specified by:
getPrivateKeyin interfacenetwork.quant.api.Account
-
sign
public void sign(java.lang.String fromAddress, java.lang.String toAddress, java.lang.String message, network.quant.api.DltTransaction dltTransaction)- Specified by:
signin interfacenetwork.quant.api.Account
-
sign
public void sign(java.lang.String fromAddress, java.lang.String toAddress, byte[] data, network.quant.api.DltTransaction dltTransaction)- Specified by:
signin interfacenetwork.quant.api.Account
-
sign
public void sign(java.lang.String fromAddress, java.lang.String toAddress, java.io.InputStream stream, network.quant.api.DltTransaction dltTransaction)- Specified by:
signin interfacenetwork.quant.api.Account
-
getInstance
public static network.quant.api.Account getInstance(network.quant.api.NETWORK network, network.quant.api.Encryptor encryptor, network.quant.api.Compressor compressor) throws java.lang.ExceptionCreate Ethereum wallet instance with new key- Parameters:
network- NETWORK containing network paramencryptor- Encryptor containing encryptorcompressor- Compressor containing compressor- Returns:
- Account containing a Ethereum wallet
- Throws:
java.lang.Exception
-
getInstance
public static network.quant.api.Account getInstance(network.quant.api.NETWORK network) throws java.lang.Exception- Throws:
java.lang.Exception
-
getInstance
public static network.quant.api.Account getInstance(network.quant.api.NETWORK network, java.math.BigInteger privateKey, java.math.BigInteger nonce, network.quant.api.Encryptor encryptor, network.quant.api.Compressor compressor)Get Ethereum wallet instance by given secret key number- Parameters:
network- NETWORK containing network paramprivateKey- BigInteger containing the keyencryptor- Encryptor containing encryptorcompressor- Compressor containing compressor- Returns:
- Account containing a Ethereum wallet
-
getInstance
public static network.quant.api.Account getInstance(network.quant.api.NETWORK network, java.math.BigInteger privateKey, java.math.BigInteger nonce)
-
getInstance
public static network.quant.api.Account getInstance(network.quant.api.NETWORK network, byte[] privateKey, java.math.BigInteger nonce, network.quant.api.Encryptor encryptor, network.quant.api.Compressor compressor)Get Ethereum wallet instance by given secret key array- Parameters:
network- NETWORK containing network paramprivateKey- byte array containing the key in arrayencryptor- Encryptor containing encryptorcompressor- Compressor containing compressor- Returns:
- Account containing a Ethereum wallet
-
getInstance
public static network.quant.api.Account getInstance(network.quant.api.NETWORK network, byte[] privateKey, java.math.BigInteger nonce)
-
getInstance
public static network.quant.api.Account getInstance(network.quant.api.NETWORK network, org.web3j.crypto.ECKeyPair privateKey, java.math.BigInteger nonce, network.quant.api.Encryptor encryptor, network.quant.api.Compressor compressor)Get Ethereum wallet instance by given secret key object- Parameters:
network- NETWORK containing network paramprivateKey- ECKey containing the keyencryptor- Encryptor containing encryptorcompressor- Compressor containing compressor- Returns:
- Account containing a Ethereum wallet
-
getInstance
public static network.quant.api.Account getInstance(network.quant.api.NETWORK network, org.web3j.crypto.ECKeyPair privateKey, java.math.BigInteger nonce)
-
-