Using Stellar SDK and account on Ledger

Noah: 23 May 2022

Perhaps what I am trying to do is not possible, but here is what my goal is:

I want to transfer XML stored on my ledger device to another account using Stellar SDK. I have the 24 worked mneumonic, was able to enter it into the offline version of and get private/public keys.

But now when I try to create a transaction I get "tx_bad_auth", which I am assuming is due to the wrong public/private key pair I am using?

Has anybody attempted something like this? I know I could transfer the funds using my ledger wallet, but trying to see if I could do the same thing with my own code.

Liam: 23 May 2022

OK, figured it out what's going on here. I was using an incorrect keypair to sign the transaction.

If you have lumens in your ledger wallet, and want to sign the transactions using its private key, you can enter your mnemonic here (or on the locally stored version), and then grab the BIP39 Seed value from it and use it to load the privatekey.