OutCast3k / coinbin

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

Work with multichain #46

Open andrewkrug opened 8 years ago

andrewkrug commented 8 years ago

So I'm running my own private instance of multichain running the bitcoin protocol. Any easy way to fork this and connect it to the multichain API instead of bitcoin proper?

NxtChg commented 8 years ago

From what I understand, it's trivial to write a php script to push txs using your own node, but the problem is getting unspent outputs, since the default Bitcoin client doesn't provide this for arbitrary addresses.

andrewkrug commented 8 years ago

Would you be willing to look at multichain and see if this could be adapted?

NxtChg commented 8 years ago

You need to ask multichain developers how to get unspent tx outputs for arbitrary address.

It doesn't look like the default client supports it, same as Bitcoin, but I might be wrong.

Maybe there's some web API too.

andrewkrug commented 8 years ago

It looks like their API supports everything that bitcoin core does and then some. http://www.multichain.com/developers/json-rpc-api/ Sorry for the ignorance. This is my first time trying to program against bitcoin JSON and am desperate for help.

NxtChg commented 8 years ago

Yes, that's what I checked.

Here's the quote from 'listunspent': "Returns a list of unspent transaction outputs in the wallet".

This means it works the same way as in Bitcoin and only returns information about addresses that are in the wallet. All the other mentions of 'unspent' don't seem to be relevant.

You either need a web API from some blockexplorer that works with multichain or a modified client that has additional index in its database and can return unspent outputs for any address.