ledger

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2024 License: LGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DEBUG bool

Functions

func GetAddress

func GetAddress() string

GetAddress ProcessAddressCommand list the address associated with Ledger Nano S

func ProcessAddressCommand

func ProcessAddressCommand()

ProcessAddressCommand list the address associated with Ledger Nano S

func SignTx

func SignTx(tx []byte) ([]byte, error)

SignTx signs the given transaction with the requested account.

Types

type APDU

type APDU struct {
	CLA     byte
	INS     byte
	P1, P2  byte
	Payload []byte
}

type ErrCode

type ErrCode uint16

func (ErrCode) Error

func (c ErrCode) Error() string

type NanoS

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

func OpenNanoS

func OpenNanoS() (*NanoS, error)

OpenNanoS start process

func (*NanoS) Exchange

func (n *NanoS) Exchange(cmd byte, p1, p2 byte, data []byte) (resp []byte, err error)

func (*NanoS) GetAddress

func (n *NanoS) GetAddress() (addr string, err error)

GetAddress return address from path

func (*NanoS) GetVersion

func (n *NanoS) GetVersion() (version string, err error)

GetVersion return app version

func (*NanoS) SignTxn

func (n *NanoS) SignTxn(txn []byte) (sig [signatureSize]byte, err error)

SignTxn sign a TX

Jump to

Keyboard shortcuts

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