-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for Taproot and BRC20 #3233
Conversation
I think we're good to go. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few suggestions before merge 🙂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome 🔥
🎉 |
For context, how it works: Explanation: The process involves two transactions: a Commit transaction and a Reveal transaction. Both must be created and submitted simultaneously. The Commit transaction requires one or more standard inputs and outputs for the BRC20 transfer inscription and standard change/return. The Reveal transaction requires the BRC20 transfer inscription as input and outputs tagged satoshis. To create the BRC20 transfer inscription, use the function Once the commit and reveal inscriptions have been processed, the resulting output of tagged satoshis can be transferred to the final recipient. It's important that the tagged satoshis are used as the first input and then spent as the first output. This transaction can be a normal transaction such as P2PKH or P2WPKH. For more information, see the reference |
* [r2r]: Add ThetaFuel EVM compatible chain * [r2r]: Bump wc-kotlin version to 3.1.38 (#3218) * [ERC-4337] Fix user operation hash mistake (#3228) * [ERC-4337] Fix user operation hash mistake * Update TestBarz.kt --------- Co-authored-by: hewigovens <[email protected]> * [r2r] Update starknet-ff crate (#3230) * [Sync]: Apply changes from DeFi wallet-core (#3225) * [Barz] Format signature API changes (#3241) * [Barz] Public API refactoring (#3212) * Getting rid of attestationObject in Barz public API * remove duplicates * Update Barz.cpp * Update Barz.cpp * Update BarzTests.swift * update tests * Update WebAuthnTests.cpp * Update TestBarz.kt * Update TestWebAuthn.kt * update android tests * Update TestBarz.kt * Update TestBarz.kt * Update TestBarz.kt * fix nullability * tests update * Add support for Taproot and BRC20 (#3233) * [Barz] Add TokenReceiverFacet support (#3240) * [CFX]: Add support for Conflux eSpace (#3259) * [License]: update to apache 2.0 (#3256) * [Barz] Execute batch (#3257) * [Kotlin] Fixed GH Action (#3263) * feat(evm/thorchain): use depositWithExpiry for regular transfer (#3266) * feat(swift): update to 3.2.1 (#3269) * Add iOS and android tests to check if new methods available (#3267) * [WASM] Fixed CoinType.deriveAddressFromPublicKeyAndDerivation (#3271) * [Polkadot]: Refactor Polkadot to support any Substrate chain (#3261) * [Acala]: Add Acala and AcalaEVM chains (#3274) * [Kotlin] Added UInt value to enums (#3276) Co-authored-by: Sztergbaum Roman <[email protected]> * fix(bitcoin): Fix `TWAnySignerPlan` (#3278) * [README]: Update README.md (#3280) Removed broken IFWallet link Updated supported blockchain count according to registry.md Corrected some typos and grammatical mistakes * [Chain/EVM]: add opbnb testnet (#3291) * [Barz] Upgrade to the new Barz contract constructor (#3288) * [Polkadot]: Fix `Staking::Bond` and `Staking::BondAndNominate` (#3293) * [Webauthn] Add some helpers to extract P256 values (#3292) * [Cardano] Support utxo with legacy(byron) address (#3284) * [Cardano]: Fix signing in JS (#3299) --------- Co-authored-by: Ruslan Serebriakov <[email protected]> Co-authored-by: hewigovens <[email protected]> Co-authored-by: Fabio Lama <[email protected]> Co-authored-by: Sztergbaum Roman <[email protected]> Co-authored-by: Maxim Pestryakov <[email protected]> Co-authored-by: Sabuhi Fatalizada <[email protected]> Co-authored-by: Sergey Balashov <[email protected]>
* [r2r]: Add ThetaFuel EVM compatible chain * [r2r]: Bump wc-kotlin version to 3.1.38 (#3218) * [ERC-4337] Fix user operation hash mistake (#3228) * [ERC-4337] Fix user operation hash mistake * Update TestBarz.kt --------- Co-authored-by: hewigovens <[email protected]> * [r2r] Update starknet-ff crate (#3230) * [Sync]: Apply changes from DeFi wallet-core (#3225) * [Barz] Format signature API changes (#3241) * [Barz] Public API refactoring (#3212) * Getting rid of attestationObject in Barz public API * remove duplicates * Update Barz.cpp * Update Barz.cpp * Update BarzTests.swift * update tests * Update WebAuthnTests.cpp * Update TestBarz.kt * Update TestWebAuthn.kt * update android tests * Update TestBarz.kt * Update TestBarz.kt * Update TestBarz.kt * fix nullability * tests update * Add support for Taproot and BRC20 (#3233) * [Barz] Add TokenReceiverFacet support (#3240) * [CFX]: Add support for Conflux eSpace (#3259) * [License]: update to apache 2.0 (#3256) * [Barz] Execute batch (#3257) * [Kotlin] Fixed GH Action (#3263) * feat(evm/thorchain): use depositWithExpiry for regular transfer (#3266) * feat(swift): update to 3.2.1 (#3269) * Add iOS and android tests to check if new methods available (#3267) * [WASM] Fixed CoinType.deriveAddressFromPublicKeyAndDerivation (#3271) * [Polkadot]: Refactor Polkadot to support any Substrate chain (#3261) * [Acala]: Add Acala and AcalaEVM chains (#3274) * [Kotlin] Added UInt value to enums (#3276) Co-authored-by: Sztergbaum Roman <[email protected]> * fix(bitcoin): Fix `TWAnySignerPlan` (#3278) * [README]: Update README.md (#3280) Removed broken IFWallet link Updated supported blockchain count according to registry.md Corrected some typos and grammatical mistakes * [Chain/EVM]: add opbnb testnet (#3291) * [Barz] Upgrade to the new Barz contract constructor (#3288) * [Polkadot]: Fix `Staking::Bond` and `Staking::BondAndNominate` (#3293) * [Webauthn] Add some helpers to extract P256 values (#3292) * [Cardano] Support utxo with legacy(byron) address (#3284) * [Cardano]: Fix signing in JS (#3299) --------- Co-authored-by: Ruslan Serebriakov <[email protected]> Co-authored-by: hewigovens <[email protected]> Co-authored-by: Fabio Lama <[email protected]> Co-authored-by: Sztergbaum Roman <[email protected]> Co-authored-by: Maxim Pestryakov <[email protected]> Co-authored-by: Sabuhi Fatalizada <[email protected]> Co-authored-by: Sergey Balashov <[email protected]>
* [r2r]: Add ThetaFuel EVM compatible chain * [r2r]: Bump wc-kotlin version to 3.1.38 (#3218) * [ERC-4337] Fix user operation hash mistake (#3228) * [ERC-4337] Fix user operation hash mistake * Update TestBarz.kt --------- Co-authored-by: hewigovens <[email protected]> * [r2r] Update starknet-ff crate (#3230) * [Sync]: Apply changes from DeFi wallet-core (#3225) * [Barz] Format signature API changes (#3241) * [Barz] Public API refactoring (#3212) * Getting rid of attestationObject in Barz public API * remove duplicates * Update Barz.cpp * Update Barz.cpp * Update BarzTests.swift * update tests * Update WebAuthnTests.cpp * Update TestBarz.kt * Update TestWebAuthn.kt * update android tests * Update TestBarz.kt * Update TestBarz.kt * Update TestBarz.kt * fix nullability * tests update * Add support for Taproot and BRC20 (#3233) * [Barz] Add TokenReceiverFacet support (#3240) * [CFX]: Add support for Conflux eSpace (#3259) * [License]: update to apache 2.0 (#3256) * [Barz] Execute batch (#3257) * [Kotlin] Fixed GH Action (#3263) * feat(evm/thorchain): use depositWithExpiry for regular transfer (#3266) * feat(swift): update to 3.2.1 (#3269) * Add iOS and android tests to check if new methods available (#3267) * [WASM] Fixed CoinType.deriveAddressFromPublicKeyAndDerivation (#3271) * [Polkadot]: Refactor Polkadot to support any Substrate chain (#3261) * [Acala]: Add Acala and AcalaEVM chains (#3274) * [Kotlin] Added UInt value to enums (#3276) Co-authored-by: Sztergbaum Roman <[email protected]> * fix(bitcoin): Fix `TWAnySignerPlan` (#3278) * [README]: Update README.md (#3280) Removed broken IFWallet link Updated supported blockchain count according to registry.md Corrected some typos and grammatical mistakes * [Chain/EVM]: add opbnb testnet (#3291) * [Barz] Upgrade to the new Barz contract constructor (#3288) * [Polkadot]: Fix `Staking::Bond` and `Staking::BondAndNominate` (#3293) * [Webauthn] Add some helpers to extract P256 values (#3292) * [Cardano] Support utxo with legacy(byron) address (#3284) * [Cardano]: Fix signing in JS (#3299) --------- Co-authored-by: Ruslan Serebriakov <[email protected]> Co-authored-by: hewigovens <[email protected]> Co-authored-by: Fabio Lama <[email protected]> Co-authored-by: Sztergbaum Roman <[email protected]> Co-authored-by: Maxim Pestryakov <[email protected]> Co-authored-by: Sabuhi Fatalizada <[email protected]> Co-authored-by: Sergey Balashov <[email protected]>
Hi lamafab, Regards |
(see discussion #3567) |
LATEST UPDATE: See #3233 (comment)
Opening this and closing #3213. We're almost there!
tw_legacy_address_string
tw_segwit_address_string
tw_taproot_address_string
tw_build_p2pkh_script
tw_build_p2wpkh_script
tw_build_p2tr_key_path_script
tw_build_brc20_inscribe_transfer
tw_taproot_build_and_sign_transaction
Also, I'm really not a fan of how the
TransactionPlan
in the Protobuf structure works and behaves (it combines two types of functionalities in one), but for now we just keep and extend it. @Milerius probably can give me some advice on better C++ design regarding the FFIs and how the BRC20 transfer information should be extended in the Protobuf structure. Additionally, I want to take a couple of hours for cleanup and code quality improvements, especially those mentioned by @satoshiotomakanBesides that, for the workflow of BRC20 transfers, especially on the iOS/Android side, I created this chart and added a bunch of comments, including open question when selecting inputs/outputs:
This looks complicated, but the first two steps (Deploy and Mint) can be ignored, we can maybe add those to the front-end later if we want to. For the transfer itself, it takes three (!!) Bitcoin on-chain transfers to make one BRC20 transfer:
I do wonder whether step two can be skipped and hence combining step one and three. I just followed the behavior of the Unistat wallet. Might be worth trying out.(the answer is "no")