signer

package module
v0.0.0-...-f3afa42 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2021 License: MIT Imports: 4 Imported by: 0

README

Signer

zero trust crypto/blockchain signer service,implement by golang

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotFound = errors.New("Resource not found", errors.WithVendor(errVendor), errors.WithCode(-1))
)

errors

Functions

This section is empty.

Types

type CryptoProvider

type CryptoProvider interface {
	// Export mnemonic
	Export(ctx context.Context, password string, tenancyID string) (mnemonic string, err error)
	// Import tenancy with mnemonic
	Import(ctx context.Context, password string, mnemonic string) (tenancyID string, err error)
	// Open and create new crypto provider and keystore
	Open(ctx context.Context, password string) (tenancyID string, err error)
	// Close close crypto provider and rm keystore
	Close(ctx context.Context, tenancyID string) error
	// OpenKey open new key
	OpenKey(ctx context.Context, password string, tenancyID string, bip44Path string) (keyID string, err error)
	// Sign call key sign
	Sign(ctx context.Context, password string, keyID string, curve elliptic.Curve, hashed []byte) (r *big.Int, s *big.Int, v *big.Int, err error)
	// CloseKey close key
	CloseKey(ctx context.Context, keyID string) error
	// Generate public keys
	PublicKeys(ctx context.Context, password string, keyID string, curves []elliptic.Curve) (pubkeys [][]byte, err error)
}

CryptoProvider crypto provider service

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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