team-exor / eiquidus

Feature-rich open-source altcoin block explorer. Regular Updates ~ Platform Independent ~ Mobile Friendly ~ Supports Themes, Markets, Charts, Claiming Addresses, Public API's, Custom RPC Cmds, Bitcoin, Heavycoin, zk-SNARKs ~ List Masternodes, Network Peers, Top 100 Wallets ~ Built-in Update Script ~ Highly Customizable
https://explorer.exor.io
BSD 3-Clause "New" or "Revised" License
87 stars 180 forks source link

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

Open SkynetResearchProject opened 1 year ago

SkynetResearchProject commented 1 year ago

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 commented 1 year ago

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

joeuhren commented 1 year ago

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 commented 1 year ago

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.