airgap-it / airgap-vault

The AirGap Vault is installed on a spare smartphone that has no connection to any network, thus it is air gapped. This app handles the private key.
MIT License
372 stars 105 forks source link

Bitcoin Taproot support / bech32m addresses #106

Open AndreasGassmann opened 2 years ago

AndreasGassmann commented 2 years ago

Taproot support is currently being added to bitcoinjs-lib. Once their integration is released, we can add a new protocol, Bitcoin (Taproot).

https://github.com/bitcoinjs/bitcoinjs-lib/pull/1742

motorina0 commented 2 years ago

@AndreasGassmann I just wanted to let you know that I have updated the PR above, now it uses (an injectable) tiny-secp256k1 for the taproot ecc functions (previously it had custom logic).

Any review / comment / testcase / suggestion is appreciated. It would help us get this logic quicker in the official release.

AndreasGassmann commented 2 years ago

Thanks for your work and updating the PR. I will hopefully have time to look into it in the next few days and will give you feedback. Is there documentation available how tiny-secp256k1 can be injected and any other notable changes?

motorina0 commented 2 years ago

Is there documentation available how tiny-secp256k1 can be injected

  • there are samples in the unit tests here and here
  • basically p2tr takes an extra optional parameter that must respect the TinySecp256k1Interface interface
  • there will also be some documentation once we decide on the final version
  • the fixtures can serve as sample data

any other notable changes

  • nothing extra. The code is actually lighter, some ECC logic has been replaced and tiny-secp256k1 used instead
bz404 commented 5 months ago

Awesome