ledger

package module
v0.0.0-...-1f6a0e3 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2023 License: BSD-3-Clause Imports: 12 Imported by: 0

README

coinflect-ledger-go

Coming soon

Documentation

Index

Constants

View Source
const (
	CLA                   = 0x80
	INSVersion            = 0x00
	INSPromptPublicKey    = 0x02
	INSPromptExtPublicKey = 0x03
	INSSignHash           = 0x04
)
View Source
const (
	// PublicKeyCompressedLength is the byte count of a compressed public key
	PublicKeyCompressedLength = 33
)

Variables

View Source
var (
	ErrLedgerNotConnected       = errors.New("ledger is not connected")
	ErrCoinflectAppNotExecuting = errors.New("ledger is not executing coinflect app")
	ErrLedgerIsBlocked          = errors.New("ledger is blocked")
	ErrRejectedSignature        = errors.New("hash sign operation rejected by ledger user")
	ErrRejectedKeyProvide       = errors.New("public key provide operation rejected by ledger user")
)

Functions

func NewChild

func NewChild(key []byte, chainCode []byte, childIdx uint32) ([]byte, error)

Types

type Ledger

type Ledger interface {
	Version() (version string, commit string, name string, err error)
	Address(displayHRP string, addressIndex uint32) (ids.ShortID, error)
	Addresses(addressIndices []uint32) ([]ids.ShortID, error)
	SignHash(hash []byte, addressIndices []uint32) ([][]byte, error)
	Disconnect() error
}

Ledger interface for the ledger wrapper

func New

func New() (Ledger, error)

New attempts to connect to a Ledger on the device over HID.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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