etherkeyms

package module
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2022 License: CC0-1.0 Imports: 14 Imported by: 1

README

Go Reference

EtherKeyMS is a library for Ethereum operation with the Key Management Service (KMS) from the Google Cloud Platform (GCP). Better leave those keys in secured place. 😏

This is free and unencumbered software released into the public domain.

Your feedback and code is welcome.

Documentation

Overview

Package etherkeyms utilises the Key Management Service (KMS) from the Google Cloud Platform (GCP) for Ethereum operations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ManagedKey

type ManagedKey struct {
	// KMS uses a slash-separated path for identification.
	// This field is read-only.
	KeyName string
	// Each (public) key maps to one address on the blockchain.
	// This field is read-only.
	EthereumAddr common.Address
	// contains filtered or unexported fields
}

ManagedKey represents a key from the Key Management Service (KMS).

func NewManagedKey

func NewManagedKey(ctx context.Context, client *kms.KeyManagementClient, keyName string) (*ManagedKey, error)

NewManagedKey executes a fail-fast initialization. Key names from the Google cloud are slash-separated paths.

func (*ManagedKey) NewEthereumSigner

func (mk *ManagedKey) NewEthereumSigner(ctx context.Context, txIdentification types.Signer) bind.SignerFn

NewEthereumSigner returns a KMS-backed instance. Ctx applies to the entire lifespan of the bind.SignerFn.

func (*ManagedKey) NewEthereumTransactor

func (mk *ManagedKey) NewEthereumTransactor(ctx context.Context, txIdentification types.Signer) *bind.TransactOpts

NewEthereumTransactor returns a KMS-backed instance. Ctx applies to the entire lifespan of the bind.TransactOpts.

func (*ManagedKey) SignHash added in v1.1.0

func (mk *ManagedKey) SignHash(ctx context.Context, hash common.Hash) ([]byte, error)

SignHash returns the signature bytes.

Jump to

Keyboard shortcuts

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