usbwallet

package
v0.0.0-...-c41ebe0 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2022 License: MIT Imports: 25 Imported by: 1

Documentation

Overview

Package usbwallet implements support for USB hardware wallets.

Index

Constants

View Source
const LedgerScheme = "ledger"

LedgerScheme is the protocol scheme prefixing account and wallet URLs.

Variables

View Source
var (
	UseHardwareError = errors.New("use the hardware")
)

Functions

This section is empty.

Types

type Hub

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

Hub is a accounts.Backend that can find and handle generic USB hardware wallets.

func NewLedgerHub

func NewLedgerHub(debugLogging bool) (*Hub, error)

NewLedgerHub creates a new hardware wallet manager for Ledger devices.

func (*Hub) Wallets

func (hub *Hub) Wallets() []accounts.Wallet

Wallets implements accounts.Backend, returning all the currently tracked USB devices that appear to be hardware wallets.

type LedgerSignature

type LedgerSignature struct {
}

type LedgerSignerTester

type LedgerSignerTester struct {
	signing.Signer
	PubKey   []byte
	SignThis []byte
	// contains filtered or unexported fields
}

func (*LedgerSignerTester) PreSignature

func (l *LedgerSignerTester) PreSignature() protocol.Signature

func (*LedgerSignerTester) SetPublicKey

func (l *LedgerSignerTester) SetPublicKey(sig protocol.Signature) error

func (*LedgerSignerTester) Sign

func (l *LedgerSignerTester) Sign(sig protocol.Signature, sigMdHash []byte, txnHash []byte) error

func (*LedgerSignerTester) SignTransaction

func (l *LedgerSignerTester) SignTransaction(sig protocol.Signature, txn *protocol.Transaction) error

type Signer

type Signer struct {
	signing.Signer

	Derivation bip44.Derivation
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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