Skip to content

Golang implementation of a key management service's client for EVM applications

License

Notifications You must be signed in to change notification settings

LampardNguyen234/evm-kms

Repository files navigation

Go Report Card License: MIT

EVM-Compatible KMS

Key Management Service's client for EVM applications.

Dependencies

See go.mod

Status

This product is currently in beta quality, take your own risk.

TODOs

Tutorial

Create a config file

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", the aws field is not needed.
  • If type = "aws", the gcp field is not needed.

Create a KMSSigner from the config file

kmsSigner, err := NewKMSSignerFromConfigFile("kms-config.json")
if err != nil {
	panic(err)
}

Contributions

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.

About

Golang implementation of a key management service's client for EVM applications

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages