GithubHelp home page GithubHelp logo

Comments (19)

prestwich avatar prestwich commented on August 16, 2024 1

its probably riddled with bugs 👌

from coins.

prestwich avatar prestwich commented on August 16, 2024 1

the schema was passing an incorrect length to the KeyDerivation deserialization. Fixed in 5668e6a

from coins.

prestwich avatar prestwich commented on August 16, 2024 1

if you're in JS, the WASM target uses the ledger JS transports and the PSBT should be able to sign with it. I still need to check your example and see where the bug is

from coins.

prestwich avatar prestwich commented on August 16, 2024

What version of the ledger firmware and ledger Bitcoin app are you on? There have been some recent changes to the necessary apdus

from coins.

thomaseizinger avatar thomaseizinger commented on August 16, 2024

I was on 1.5.5 and upgraded to 1.6.0 yesterday, however that didn't change anything. Same error in both cases.

from coins.

prestwich avatar prestwich commented on August 16, 2024

are you signing witness or legacy inputs? My legacy support is spotty at the moment

from coins.

thomaseizinger avatar thomaseizinger commented on August 16, 2024

I skimmed the APDU code and tried to cross reference with the spec but I didn't get very far.

Some things I noticed:

from coins.

thomaseizinger avatar thomaseizinger commented on August 16, 2024

are you signing witness or legacy inputs? My legacy support is spotty at the moment

All native segwit unless I messed it up somewhere :D
But the inputs are all funded to bech32 addresses and I am spending to bech32 as well.

from coins.

prestwich avatar prestwich commented on August 16, 2024

0x80 is usually a continuation flag. I'll try to take some time tomorrow to dive into this

from coins.

thomaseizinger avatar thomaseizinger commented on August 16, 2024

I tried to set the PoC up in a "nice" way :)
You should be able to run it (see the included shell script) end to end with the ledger plugged in if that helps with anything!

from coins.

prestwich avatar prestwich commented on August 16, 2024

The psbt crate has a basic ledger signer that I have run a few times. It's overdue for a refactor to deprecate the txin witness (see #44)

from coins.

thomaseizinger avatar thomaseizinger commented on August 16, 2024

Ah I missed that one, I was using the psbt stuff from rust-bitcoin 😅

Will give that a go and see if it works!

from coins.

thomaseizinger avatar thomaseizinger commented on August 16, 2024

I've pushed a branch here: https://github.com/thomaseizinger/rust-ledger-poc/tree/use-bitcoins-psbt

Unfortunately, I can't even parse the psbt from base64 😬
It fails with: Error: failed to fill whole buffer

That is the psbt I used:

cHNidP8BAHECAAAAAeBANSdI+VT5VJvVfchN4UEUniZ5cfeucBkBuoA475wjAAAAAAD+////AgDh9QUAAAAAFgAU7gEhvO/VGbeMDvk2DeqaTVkRQh8AERAkAQAAABYAFCQ8xyUkB4v4DqmV7T6aVADqs8M5AAAAAAABAR8A8gUqAQAAABYAFO4BIbzv1Rm3jA75Ng3qmk1ZEUIfIgYDbXrhM7lpiaTJhxwJSplsX1r33gCcoD9xL4wEteLypE8YRwNsJ1QAAIABAACAAAAAgAAAAAAAAAAAACICA2164TO5aYmkyYccCUqZbF9a994AnKA/cS+MBLXi8qRPGEcDbCdUAACAAQAAgAAAAIAAAAAAAAAAAAAiAgONam8JJOdoEr/jubocGRelQAnn2NfLVM7jLliPK0n8KBhHA2wnVAAAgAEAAIAAAACAAQAAAAAAAAAA`

I also needed to fix another compile error 😅 #65

from coins.

prestwich avatar prestwich commented on August 16, 2024

failed to fill whole buffer

this would be a (de)serialization issue. I have narrowed it down to an issue with the input bip32 derivation deserialization

from coins.

prestwich avatar prestwich commented on August 16, 2024

I'll check your example routines when I get a second.

Typically the 6985 error is triggered here: Code. It often means there was some missing information and a signature was requested before the device was ready to produce it.

from coins.

thomaseizinger avatar thomaseizinger commented on August 16, 2024

I'll check your example routines when I get a second.

Typically the 6985 error is triggered here: Code. It often means there was some missing information and a signature was requested before the device was ready to produce it.

Thanks! I also stumbled over that code path in the source code but I couldn't really conclude on what to do differently as a result 😅

I will try again with the fix when I get around to it :)

from coins.

prestwich avatar prestwich commented on August 16, 2024

okay, I started a new job so progress on this issue has been slow. I pushed a branch that fixes osx compilation errors afaict

from coins.

thomaseizinger avatar thomaseizinger commented on August 16, 2024

Congratulations! :)

That is okay, we ended up going back to using JavaScript and the ledgerjs package for what we are currently trying to achieve. I am still curious on what the issue is though!

Note that I also opened LedgerHQ/app-bitcoin#164 although looking at the other issues, the Ledger team doesn't seem to give too much attention to the OSS community 🙃

from coins.

prestwich avatar prestwich commented on August 16, 2024

dropping this here for more digging

out.log

from coins.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.