Documentation
¶
Overview ¶
Package ledger provides hardware wallet integration via Ledger devices.
Index ¶
- type LedgerDevice
- func (dev *LedgerDevice) Address(hrp string, index uint32) (ids.ShortID, error)
- func (dev *LedgerDevice) Addresses(indices []uint32) ([]ids.ShortID, error)
- func (dev *LedgerDevice) Close() error
- func (dev *LedgerDevice) Disconnect() error
- func (dev *LedgerDevice) FindAddresses(addresses []string, maxIndex uint32) (map[string]uint32, error)
- func (dev *LedgerDevice) FindFunds(network network.Network, amount uint64, maxIndex uint32) ([]uint32, error)
- func (dev *LedgerDevice) GetAddresses(indices []uint32, hrp string, chainID string) ([]string, error)
- func (dev *LedgerDevice) Sign(hash []byte, indices []uint32) ([][]byte, error)
- func (dev *LedgerDevice) SignHash(hash []byte, indices []uint32) ([][]byte, error)
- func (dev *LedgerDevice) Version() (v *version.Semantic, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LedgerDevice ¶
type LedgerDevice struct {
// contains filtered or unexported fields
}
func New ¶
func New() (*LedgerDevice, error)
func (*LedgerDevice) Addresses ¶ added in v0.2.1
func (dev *LedgerDevice) Addresses(indices []uint32) ([]ids.ShortID, error)
Addresses returns addresses for the given indices
func (*LedgerDevice) Close ¶ added in v0.2.1
func (dev *LedgerDevice) Close() error
Close closes the connection to the ledger device
func (*LedgerDevice) Disconnect ¶ added in v0.2.1
func (dev *LedgerDevice) Disconnect() error
Disconnect closes the connection to the ledger device
func (*LedgerDevice) FindAddresses ¶
func (*LedgerDevice) FindFunds ¶
func (dev *LedgerDevice) FindFunds( network network.Network, amount uint64, maxIndex uint32, ) ([]uint32, error)
FindFunds searches for a set of indices that pay a given amount
func (*LedgerDevice) GetAddresses ¶ added in v0.2.1
func (dev *LedgerDevice) GetAddresses(indices []uint32, hrp string, chainID string) ([]string, error)
GetAddresses returns Lux addresses for the given indices
func (*LedgerDevice) Sign ¶ added in v0.2.1
func (dev *LedgerDevice) Sign(hash []byte, indices []uint32) ([][]byte, error)
Sign signs a hash with the ledger device for multiple indices
Click to show internal directories.
Click to hide internal directories.