Creating an external signer for EthSigner
EthSigner supports the addition of more external signers in same way as HashiCorp Vault.
To create an external signer:
Clone the EthSigner repository.
Create a Gradle module for the new signer in the
ethsigner/signer
directory.To ensure the module for the new signer is built, add the module to the
settings.gradle
file.In the new module, create a concrete child class of
SignerSubCommand
.The new
SignerSubCommand
must include the parameters (tagged with PicoCLI annotations) to initialize your signer.Update the
createSigner()
function to be the entry point to create and return your signer. Your signer is exposed only as aTransactionSigner
.noteThe new signing class is responsible for fulfilling the
TransactionSigner
interface. To fulfill theTransactionSigner
interface, the class must be able to create a signature for a block of bytes and provide the address associated with the key pair in the signer. ::: 6. InEthSignerApp.java
, register the newSignerSubCommand
with thecmdLineParser
as for existing signers.Update the EthSigner::app module dependency list to include the module created in step 2.