Key Management Service's client for EVM applications.
See go.mod
This product is currently in beta quality, take your own risk.
Create a json file consisting of the following information:
{
"type": "gcp",
"gcp": {
"ProjectID": "evm-kms",
"LocationID": "us-west1",
"CredentialLocation": "/Users/SomeUser/.cred/gcp-credential.json",
"Key": {
"Keyring": "my-keying-name",
"Name": "evm-ecdsa",
"Version": "1"
},
"ChainID": 1
},
"aws": {
"KeyID": "KEY_ID",
"ChainID": 1,
"Region": "AWS_REGION",
"AccessKeyID": "ACCESS_KEY_ID",
"SecretAccessKey": "SECRET_ACCESS_KEY",
"SessionToken": "SESSION_TOKEN"
}
}
- If
type = "gcp"
, theaws
field is not needed. - If
type = "aws"
, thegcp
field is not needed.
kmsSigner, err := NewKMSSignerFromConfigFile("kms-config.json")
if err != nil {
panic(err)
}
You are encouraged to open an issue if you encounter a problem
while using this code. Even better, you can create PRs to the
main
branch if you think these are necessary functions.