Package org.saidone.config
Class EthereumConfig
java.lang.Object
org.saidone.config.EthereumConfig
@Configuration
@ConditionalOnExpression("${application.service.vault.notarization.enabled}.equals(true) and \'${application.service.vault.notarization.impl}\'.equals(\'ethereum\')")
@ConfigurationProperties(prefix="application.service.vault.notarization.ethereum")
public class EthereumConfig
extends Object
Configuration properties used to connect to an Ethereum node.
When autoGenerate
is enabled a new key pair and account
address are created at startup. Otherwise the privateKey
and
account
values must be provided and will be used to sign and
send transactions.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
init()
Generates an Ethereum account ifautoGenerate
is enabled.
-
Constructor Details
-
EthereumConfig
public EthereumConfig()
-
-
Method Details
-
init
@PostConstruct public void init() throws InvalidAlgorithmParameterException, NoSuchAlgorithmException, NoSuchProviderExceptionGenerates an Ethereum account ifautoGenerate
is enabled.- Throws:
InvalidAlgorithmParameterException
- if the algorithm parameters are invalidNoSuchAlgorithmException
- if the algorithm cannot be foundNoSuchProviderException
- if the security provider is unavailable
-