Skip to content
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

[Feature Request] Extending the current api explorer to support light wallets up to trezor codebook v2. #24

Open
SkynetResearchProject opened this issue Mar 2, 2023 · 3 comments

Comments

@SkynetResearchProject
Copy link

SkynetResearchProject commented Mar 2, 2023

Here is a practically working web wallet https://github.com/PIVX-Labs/MyPIVXWallet.git.
It works on the principle of MyEtherWallet. Unlike electrum, this pivx wallet does not use an additional network of electrumx servers.
For its work, you only need an explorer with trezor/codebook/api/v2/
I don't see the point in moving to trezor/codebook, go language and another database.
So I'm currently working on api extension (/ext/ or ext/v2/ )for equidus 1.99. A few features are missing for a quick start.
The main function is /api/v2/utxo. I started modify the code. To receive and send coins, it is enough to add one function /ext/utxo/addr|xpub. Other features: the launch of the masternode and the cold staking wallet can be disabled, commented out.
If you take care of the missing api functions, then other pivx-based projects can quickly adopt this lightweight wallet and your explorer will become even more popular. It can be converted into an apk container.

Addresses from xpub maked.
https://stackoverflow.com/questions/66391617/how-can-i-derive-btc-m44-addresses-from-xpub maked
Mypivxwallet: // If the user creates more than ${MAX_ACCOUNT_GAP} empty wallets we will not be able to sync them! MAX_ACCOUNT_GAP=20

/ext/getaddresstxs/
[{"timestamp":,"txid":"b0bb...","sent":800000,"received":0,"balance":}, send and recive must be swapped, added vout and etp

For pubx (recive>sent or tx.vin=[]) :
[{"address":"1", "path":"m/44/xx/0/1", "timestamp":,"txid":"b0bb...","value":800000, vout: 1", height: xxxxx, confirm: xxxx},
{"address":"1", "path":"","timestamp":,"txid":"b0bb...","value":90000000, vout: 2", height: xxxxx, confirm: xxxx},
{"address":"1", "path":"", "timestamp":,"txid":"b0bb...","value":800000, vout: 3", height: xxxxx, confirm: xxxx},
]

@SkynetResearchProject
Copy link
Author

It's ready for breadwallet (apk) https://github.com/digiwage/iquidus-getutxos-explorer .
Utxos are saved to db, when saved tx.

@joeuhren
Copy link
Contributor

joeuhren commented Mar 7, 2023

Thanks for the feature request, it seems like a great idea to add trezor/codebook/api/v2/ support to the explorer although I do not personally have experience with apis like /api/v2/utxo or MyPIVXWallet at this moment.

The iquidus-getutxos-explorer link you posted claims to add support for /ext/getutxos to an older iquidus explorer but it is not clear to me what the differences are between that and what I assume is the newer /api/v2/utxo

Lots of research to be done here and unfortunately I have little time at this moment. I would like to add a crowdfunding task for this idea so that whoever ends up developing this feature can recieve a bounty payment, but it seems there may be a lot of pre-research that would need to be done beforehand to have a better idea exactly how difficult it would be to develop and is therefore difficult to put a price tag on it right now.

It would be ideal if someone who isn't me can take the reins on this task since I already have a long list of fixes and features that I am waiting to add as time permits. I suggest starting a pull request with some of the basic ideas in place and we can continue the conversation here to fill in some of the knowledge gaps and I can help out wherever possible.

@SkynetResearchProject
Copy link
Author

Callback functions are executed asynchronously, they are nested. (that's why arrays outside of them have no values, calls are still being made, but the code has already slipped below. This is very convenient! But for now, Chinese literacy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants