You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
350 B

  1. package crypto
  2. import (
  3. ledger "github.com/zondax/ledger-goclient"
  4. )
  5. var device *ledger.Ledger
  6. // Ledger derivation path
  7. type DerivationPath = []uint32
  8. // getLedger gets a copy of the device, and caches it
  9. func getLedger() (*ledger.Ledger, error) {
  10. var err error
  11. if device == nil {
  12. device, err = ledger.FindLedger()
  13. }
  14. return device, err
  15. }