Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[Meta] Bitcoin Support on Desktop #29262

Open
yrliou opened this issue Mar 23, 2023 · 0 comments
Open

[Meta] Bitcoin Support on Desktop #29262

yrliou opened this issue Mar 23, 2023 · 0 comments
Assignees
Labels
feature/web3/wallet/bitcoin feature/web3/wallet/core feature/web3/wallet Integrating Ethereum+ wallet support OS/Desktop priority/P3 The next thing for us to work on. It'll ride the trains.

Comments

@yrliou
Copy link
Member

yrliou commented Mar 23, 2023

What we have now:

  • Creation of bitcoin accounts. Only Segwit(bc1...) accounts are supported now.
  • Sending coins to addresses of types P2PKH, P2SH, P2WPKH, P2WSH and P2TR is supported
  • Coin balance for account. We track set of used change and receive addresses for account and request balance for each of them from RPC.
  • Account->Deposit generates first unused receive address for the account.
  • Coin selections algorithm is adapted knapsack solver from BitcoinCore.
    • Groups utxos by address to spend them only together.
    • Sorts groups by total value.
    • Picks randomly starting from highest value group. Repeat this in many iterations.
    • Algorithm avoids dust outputs.
    • Algorithm uses adjust transaction fee by current fee rate.
  • We use this api for RPC https://github.com/blockstream/esplora/blob/master/API.md
  • When wallet is restored we run bitcoin account discovery(as for other coins) per bip-44

Scope of work:

Related Security/Privacy reviews:

cc @jamesmudgett @bbondy @supermassive

@yrliou yrliou added this to Web3 Mar 23, 2023
@yrliou yrliou moved this to In Progress in Web3 Mar 23, 2023
@yrliou yrliou added the priority/P3 The next thing for us to work on. It'll ride the trains. label Mar 23, 2023
@supermassive supermassive changed the title [Meta] Bitcoin Support on Desktop Backend [Meta] Bitcoin Support on Desktop Sep 4, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
feature/web3/wallet/bitcoin feature/web3/wallet/core feature/web3/wallet Integrating Ethereum+ wallet support OS/Desktop priority/P3 The next thing for us to work on. It'll ride the trains.
Projects
Status: In Progress
Development

No branches or pull requests

2 participants