Closed lamafab closed 1 year ago
Hi lamafab, Thank you for your great work. I would like to know when the development can be completed and released?
@vccomnet just opened this last night -> https://github.com/trustwallet/wallet-core/pull/3233, almost there!
It's done
Can i generate taproot address with wallet-core now? i uesd @trustwallet/wallet-core, how can i use it?
Hey @weixuefeng no it's not possible, there is the current status:
Hey @weixuefeng no it's not possible, there is the current status:
Support for BRC20 transfers, sending and receiving:
- [x] Implemented and tested in Wallet Core.
- [x] Publicly exposed (high priority).
Support for P2WPKH (Segwit), sending and receiving:
- [x] Implemented and tested in Wallet Core.
- [x] Publicly exposed
Support for P2TR key-path (Taproot), sending and receiving:
- [x] Implemented and tested in Wallet Core.
- [x] Publicly exposed via C interface (low priority).
Hi Milerius, is it exposed to C interface now? can I generate taproot address in the iOS App or Android App?
Hey @hanxianlong, it's not exposed yet. We're planning this for Q1 2024.
UPDATE: PR for this is here: https://github.com/trustwallet/wallet-core/pull/3233
About
In order to implement BRC20, we need to support the Ordinal protocol, which requires Taproot. Respectively, wallet-core must be able to create "inscriptions".
From the docs:
Inscriptions are created with the following Bitcoin script (which never executes):
Related:
Task List
Part 1:
UPDATE 2023-05-26 I found a Rust project that implements many of Bitcoin mechanisms: https://github.com/rust-bitcoin/rust-bitcoin/ I'm using this to build a MVP as of now and digging through the source code. We can still decide on whether we want to include the full library or strip out the parts that we need.
[x] Implemented a mechanism to build transactions with custom Scripts (builder pattern).
[x] Sign transactions with our
tw_keypair
crate.[x] Encode (signed) transaction.
[x] Implement builder pattern for ordinals.
[x] Implement the construction of Taproot addresses.
[x] Extend
Script.cpp
with abuildPayToTaproot
function, which must support two ways of spending the outputs:rust-bitcoin
handles this for us.rust-bitcoin
handles this for us.[x] Extend
Script.cpp
with any requiredwitnessData
construction.[x] Implement the construction of the Merkle tree and the extraction of any of its branches.
rust-bitcoin
handles this for us.[x] ~Extend our Rust curve implemenation with Schnorr support (straight forward to do since we rely on
k256
)~rust-bitcoin
uses thesecp256k1
library underneath, which we got rid-off. I'll try to integrate this withk256
, if possible.tw_keypair
is on hold (audit related), so we'll just stick withsecp256k1
for now which already has support for Schnorr signatures and public key tweaking.[x] Add derivation support for Taproot (BIP86)
For the sake of completeness, we should eventually work on this:
Part 2: