ethkms

package
v0.0.0-...-948650a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 25, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

Package ethkms provides KMS-backed EVM addresses.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GCP

type GCP struct {
	// contains filtered or unexported fields
}

GCP instances are EVM signers backed by Google Cloud's key-management service.

func NewGCP

func NewGCP(ctx context.Context, key string, chainID *big.Int, opts ...option.ClientOption) (*GCP, error)

NewGCP constructs an EVM signer backed by the specified GCP KMS key, which MUST be a secp256k1-sha256 EC signing key. The SHA256 variant is the only secp256k1 signing algorithm supported by GCP KMS, but as it accepts already- hashed digests, we simply substitute SHA256 with KECCAK256 as they have the same bit length.

Any ClientOptions are propagated to the constructor for the KeyManagementClient backing the returned signer.

func (*GCP) Address

func (g *GCP) Address() common.Address

Address returns the Ethereum address controlled by the signer's private key.

func (*GCP) Close

func (g *GCP) Close() error

Close closes the GCP connection.

func (*GCP) SignTx

func (g *GCP) SignTx(ctx context.Context, tx *types.Transaction) (*types.Transaction, error)

SignTx returns tx, signed by the GCP KMS.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL