coldwallet

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: May 15, 2022 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const LedgerScheme = "ledger"

LedgerScheme is the protocol scheme prefixing account and wallet URLs.

View Source
const TrezorScheme = "trezor"

TrezorScheme is the protocol scheme prefixing account and wallet URLs.

Variables

This section is empty.

Functions

This section is empty.

Types

type ColdWallet

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

func NewColdWallet

func NewColdWallet(hub *Hub, deviceInfo hid.DeviceInfo) (*ColdWallet, error)

func (*ColdWallet) Delete

func (w *ColdWallet) Delete(address common.Address, password string) error

func (*ColdWallet) Derive

func (w *ColdWallet) Derive(path types.DerivationPath, pin bool) (common.Address, error)

func (*ColdWallet) GetPublicKey

func (w *ColdWallet) GetPublicKey(address common.Address) (*crypto.PublicKey, error)

func (*ColdWallet) ID

func (w *ColdWallet) ID() string

func (*ColdWallet) IsUnlocked

func (w *ColdWallet) IsUnlocked(address common.Address) bool

func (*ColdWallet) List

func (w *ColdWallet) List() ([]common.Address, error)

func (*ColdWallet) Lock

func (w *ColdWallet) Lock(address common.Address) error

func (*ColdWallet) NewKey

func (w *ColdWallet) NewKey(password string) (common.Address, error)

func (*ColdWallet) Sign

func (w *ColdWallet) Sign(address common.Address, txrlp common.Bytes) (*crypto.Signature, error)

func (*ColdWallet) Status

func (w *ColdWallet) Status() (string, error)

func (*ColdWallet) Unlock

func (w *ColdWallet) Unlock(address common.Address, password string, derivationPath types.DerivationPath) error

Neither address nor password is used by the function, silently ignored

func (*ColdWallet) UpdatePassword

func (w *ColdWallet) UpdatePassword(address common.Address, oldPassword, newPassword string) error

type Hub

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

Hub finds and handles generic USB hardware wallets.

func NewLedgerHub

func NewLedgerHub() (*Hub, error)

NewLedgerHub creates a new hardware wallet manager for Ledger devices.

func NewTrezorHub

func NewTrezorHub() (*Hub, error)

NewTrezorHub creates a new hardware wallet manager for Trezor devices.

func (*Hub) Wallets

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

Wallets returns all the currently tracked USB devices that appear to be hardware wallets.

Directories

Path Synopsis
trezor
Package trezor contains the wire protocol wrapper in Go.
Package trezor contains the wire protocol wrapper in Go.

Jump to

Keyboard shortcuts

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