OutCast3k / coinbin

Javascript Bitcoin Wallet. Supports Multisig, Stealth, HD, SegWit, Bech32, Time Locked Addresses, RBF and more!
https://coinb.in/
MIT License
906 stars 621 forks source link

chain.so backend API suspended due to spam #189

Closed ghost closed 4 years ago

ghost commented 5 years ago

This blocks dogecoin and litecoin transaction functionality in coinbin (UTXO query, TX broadcast).

Info from chain.so : "The API was disabled for public access due to relentless spam, adversely affecting the entire site. It will return as a paid option at a later stage." https://old.reddit.com/r/dogecoin/comments/cqttm7/chainso_api_and_python_cryptos_module/ex05cx8/

ghost commented 5 years ago

I have done some work to use blockchair API as an alternative. It is very similar in use, the main difference is that amounts are provided in satoshis so had to be converted. One other difference is the blockchair documentation indicates that an API key is needed. I've requested one, still waiting on a response from them. Here's my WIP. At the moment it is functional without the API. https://github.com/Wowee0/coinbin/tree/blockchair_api

ghost commented 5 years ago

Looking at the code some more, the functionality to choose API provider is already built in to the UI - this change adds the functionality of blockcypher.com / blockchair.com / chain.so for btc/ltc/doge. Thus the user can easily choose an alternate provider if one goes down. (Where as the existing one in production only supports chain.so for ltc/doge and is currently broken). The testing overhead is increased with this bigger matrix of choices, however. Anyway, here it is:

https://github.com/Wowee0/coinbin/tree/choose_backend

I'd appreciate if anyone could have a look / provide feedback. @yottalogical @K2APacific @tomcarbon @OutCast3k @nformant1

ghost commented 5 years ago

blockcypher.com does not support bech32. Could be a hassle for LTC users. Should we make the default backend for LTC blockchair instead?

tomcarbon commented 5 years ago

Successfully submitted Dogecoin 2/2 multisig payment using this patch. Create Multisig, Retrieve Transactions, Sign (x2), and Broadcast checked out with this initial test. Thanks

tx: b6b1f5268235ce4a51ef477eea100718fce698989f5caf872d859b27e762021c