signer

package
v0.0.14 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2022 License: MIT Imports: 6 Imported by: 17

Documentation

Overview

Package signer provides a common interface for signing

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Encode

func Encode(sg Signature) []byte

Encode encodes a signature.

Types

type Signature

type Signature interface {
	V() *big.Int
	R() *big.Int
	S() *big.Int
}

Signature is an ecdsa signature interface.

func NewSignature

func NewSignature(v, r, s *big.Int) Signature

NewSignature creates a new signature using the v, r, and s params.

type Signer

type Signer interface {
	// SignMessage signs a message
	SignMessage(ctx context.Context, message []byte, hash bool) (Signature, error)
	// GetTransactor gets the transactor for a tx manager.
	// TODO: this doesn't support pre-london txes yet
	GetTransactor(chainID *big.Int) (*bind.TransactOpts, error)
	// Address gets the address of the address of the signer
	Address() ethCommon.Address
}

Signer provides a common interface for signing/transacting.

Directories

Path Synopsis
Package kmssigner contains a new signer that uses aws-kms as an hsm
Package kmssigner contains a new signer that uses aws-kms as an hsm
kmsmock
Package kmsmock sets up a mock kms server that is used for testing our kms driver TODO: we should consider moving this to a common testutils/mocking folder or something internal to avoid exporting
Package kmsmock sets up a mock kms server that is used for testing our kms driver TODO: we should consider moving this to a common testutils/mocking folder or something internal to avoid exporting
kmsmock/internal
Package internal contains modules exported from local-kms in order to avoid rewriting code
Package internal contains modules exported from local-kms in order to avoid rewriting code
Package localsigner is a local signer
Package localsigner is a local signer

Jump to

Keyboard shortcuts

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