signer
The signer/
package contains libraries for signing messages and transactions with hardware security modules (HSMs).
At this time, only GCP KMS-managed HSMs are supported, but we hope to add support for AWS Cloud HSM, Azure Dedicated HSM, and self-hosted HSMs.
Prerequisites
You'll need to set appropriate GOOGLE_APPLICATION_CREDENTIALS
for submitting requests.
The easiest way is to create a service account with the roles/cloudkms.signer
and roles/cloudkms.publicKeyViewer
minimum permission set.
You should add a new JSON key to your service account, and download it. Then set
export GOOGLE_APPLICATION_CREDENTIALS=key.json
pointing to the downloaded keyfile.
Install
You can install dependencies for the signer
package with
npm install
Build
You can build the signer
package with
npm run build
Test
You can test the signer
package with
npm run test
which executes tests using jest
. You'll need to have a running local Ethereum node with some default funded signers.