hsm

package
v0.0.0-...-a934766 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2024 License: MIT Imports: 11 Imported by: 0

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

	Gclient *kms.KeyManagementClient
}

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

func NewManagedKey

func NewManagedKey(ctx context.Context, client *kms.KeyManagementClient, address string, 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) NewEthereumTransactorrWithChainID

func (mk *ManagedKey) NewEthereumTransactorrWithChainID(ctx context.Context, chainID *big.Int) (*bind.TransactOpts, error)

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

func (*ManagedKey) SignHash

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