ledger

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2023 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeauthorizeBaking

func DeauthorizeBaking(transport string, id string) error

func GetHighWatermark

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

func GetHighWatermarks

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

func SetHighWatermark

func SetHighWatermark(transport string, id string, hwm uint32) error

func SetupBaking

func SetupBaking(transport string, 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"`
	Transport  string        `yaml:"transport"`
}

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) SignMessage

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

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