ledger

package
v0.3.3-beta-rc1 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2022 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeauthorizeBaking

func DeauthorizeBaking(id string) error

func GetHighWatermark

func GetHighWatermark(id string) (hwm uint32, err error)

func GetHighWatermarks

func GetHighWatermarks(id string) (mainHWM, testHWM uint32, chainID string, err error)

func SetHighWatermark

func SetHighWatermark(id string, hwm uint32) error

func SetupBaking

func SetupBaking(id, keyID, chainID string, mainHWM, testHWM uint32) (pkh string, err error)

Types

type Config

type Config struct {
	ID         string        `yaml:"id"`
	Keys       []string      `yaml:"keys"`
	CloseAfter time.Duration `yaml:"close_after"`
}

Config represents Ledger signer backend configuration

type Vault

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

Vault is a Ledger signer backend

func New

func New(ctx context.Context, conf *Config) (*Vault, error)

New returns new Ledger signer

func (*Vault) GetPublicKey

func (v *Vault) GetPublicKey(ctx context.Context, id string) (vault.StoredKey, error)

GetPublicKey returns a public key by given ID

func (*Vault) ListPublicKeys

func (v *Vault) ListPublicKeys(ctx context.Context) vault.StoredKeysIterator

ListPublicKeys returns a list of keys stored under the backend

func (*Vault) Name

func (v *Vault) Name() string

Name returns a backend name i.e. Ledger

func (*Vault) Sign

func (v *Vault) Sign(ctx context.Context, digest []byte, key vault.StoredKey) (cryptoutils.Signature, error)

Sign returns a signature

func (*Vault) SignRaw

func (v *Vault) SignRaw(ctx context.Context, data []byte, key vault.StoredKey) (cryptoutils.Signature, error)

SignRaw implements RawSigner interface

func (*Vault) VaultName

func (v *Vault) VaultName() string

VaultName returns an instance ID

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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