Closed yknl closed 1 year ago
wallet/api
folder there is stacks.ts
which contains stacks api Calls.Additional recommendations:
./common
of the Xverse mobile app repo:./api
- Network requests to that fetch data./transactions
- Functions that deal with generation or parsing of transactions./wallet
- Functions that deal with key derivation, encryption etc../utils
- Util functions and everything elseFurther, within ./api
, the actual API network call functions should be separated by source. For example, all of calls to xverse-api
can be under ./api/xverse
, similarly ./api/gamma
, ./api/blockcypher
, ./api/stacks-node
and etc. The API exposed to the apps (xverse mobile and desktop) should not be tied to a particular source. Rather they should be named by function.
For example:
A function getNFTDetails()
will use an API network call function from ./api/gamma
. If the API source was ever to change from Gamma to something else, we can still make sure that getNFTDetails()
's return type is the same, avoiding breaking changes on the app side.
Within ./transactions
, we can categorize by functionality into btc
, stacks
and later lightning
.
currency
?transaction
should be namedtransactions