extension
extension copied to clipboard
feat: bitcoin client
Try out this version of the Hiro Wallet - download extension builds.
DRAFT
This PR proposes changes to introduce a BitcoinClient
and refactors the existing code related to apiClients
and useApi
to use a new StacksClient
. To achieve this separation, I the query
folder now contains a bitcoin
and stacks
folder.
In addition, there is code here testing the Blockdaemon api service, so those changes (adding pkgs, etc) can ignore and/or removed if we end up going with the discovered free http api (which is what I ended up working with for this draft).
cc/ @kyranjamie @fbwoolf
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Updated |
---|---|---|---|
stacks-wallet-web | ✅ Ready (Inspect) | Visit Preview | Sep 29, 2022 at 4:46PM (UTC) |
I'd avoid using the word data
alone like this (just about anything can be classed as "data").
The query naming was really just to specify we're consuming the data via react-query. Isn't that how we're still doing it, even with separate stx/btc auto generated clients?
I'd avoid using the word
data
alone like this (just about anything can be classed as "data").The query naming was really just to specify we're consuming the data via react-query. Isn't that how we're still doing it, even with separate stx/btc auto generated clients?
Yep, that is a good point. I can change it back to query
at the top level. Will do today.
just a heads up, i've recently been playing around with the blockdaemon service too, and their TS library installs a large amount of dependencies that could be of concern, esp if you're only using the library for data fetching.
@kyranjamie can you circle back and check this for the network naming changes? Took me a sec to get your point, but ended up using DefaultNetworkConfigurationsAvailableInWallet
and NetworkModes
to distinguish the two ...let me know if that makes more sense to you, or not? Also, I ended up using whenChainId
and just removing the added whenNetwork
.