
BitPay introduces Bitcore - kolev
http://bitcore.io/
======
robbles
Quick note to anyone looking to build bitcoin-based apps - although something
like this is probably useful for some applications, you don't actually need a
complicated bitcoin client library to interface with the blockchain.

The bitcoin daemon, bitcoind, handles the protocol for you and can run as a
headless server. It has a simple JSON-RPC protocol that you can use to create
wallets, send and receive transactions, etc. You could write your own client
for it in any language quite easily, and for most languages, there's an OS
implementation already.

[https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_Calls...](https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_Calls_list)

In fact, I'd argue that running a cluster of bitcoind servers is probably a
better approach, due to separation of concerns. Also, I'd guess that the
C++-based and widely used bitcoind is probably faster and more stable than
this node-based implementation. Not to knock this project - it's just going to
difficult to compete.

~~~
vbuterin
IMO, bitcoind is a terrible idea. The huge deal-breaking problem with bitcoind
is that it provides no way to query for transactions associated with a
specific address unless you import that address into the client and give it
the private key. This severely restricts your freedom to do your own wallet
management, and compromuses security if you want to have many Bitcoin nodes on
many semi-secure servers for redundancy.

I personally recommend either SX (see [http://github.com/vbuterin/node-
sx](http://github.com/vbuterin/node-sx) for an HTTP pass through server, and I
have one running at [http://multisig.info:3001](http://multisig.info:3001)) or
if you are okay with centralization then plain old blockchain.info.

~~~
nly
> The huge deal-breaking problem with bitcoind is that it provides no way to
> query for transactions associated with a specific address unless you import
> that address into the client and give it the private key.

The reason bitcoind doesn't provide the feature you're after is because it's
_not actually possible_ to tie an address to a comprehensive set of
transactions.

Addresses are hashes of public keys... public keys which may or may not have
been used in isolation, or in one of several common conventions, to make a
transaction. Only a particular implementation programmed to parse a
predetermined set of transaction script types can actually determine what
subset of transaction outputs are spendable, and what consistutes your wallets
balance. The protocol itself has no concept of wallets or balances

~~~
makomk
That's not a problem in practice; if you give someone an address and they use
it to pay with any conforming client, the resulting transaction will conform
to one predictable, easily parsed format. Yes, there are numerous other
transaction types possible with the same underlying public key, but they _are
represented by different addresses in all cases_.

------
jbaudanza
This is great. It looks like there is already functionality to connect to
peers and send and receive transactions. Is there any functionality to store
and query the blockchain as well?

------
kolev
They also have a blockchain explorer using Bitcore with AngularJS:
[http://insight.bitcore.io/](http://insight.bitcore.io/)

~~~
utnick
The Readme says insight requires a running bitcoind to communicate to over
RPC, does bitcore require the same? or is bitcore like a reimplementation of
bitcoind?

~~~
martindale
Bitcore does not require bitcoind, only Insight.

------
jonpaul
Shameless plug:
[https://github.com/cryptocoinjs](https://github.com/cryptocoinjs) (Bitcoin
JavaScript fork of the original BitcoinJS) Right now, we're focused on
Bitcoin, but we're moving fast and will be expanding support for altcoins.
Also, if you're interested in the intricacies of addresses and Bitcoin, I'd
encourage to read a very detailed article that I wrote on Bitcoin Addresses
and JavaScript: [http://procbits.com/2013/08/27/generating-a-bitcoin-
address-...](http://procbits.com/2013/08/27/generating-a-bitcoin-address-with-
javascript) Doesn't use CryptoCoinJS yet as the article was written before I
started CryptoCoinJS.

~~~
urethra
Please support Dogecoin.

~~~
saym
Seconding this post, because votes are mostly anonymous and you can't see I
upvoted his/her comment.

~~~
arasmussen
What do you mean votes are "mostly" anonymous?

~~~
cbhl
Among other things, pg and anyone with physical access to the HN server should
have the capability to determine which users voted on a given comment, since
the server needs to store that so it knows to not let you vote twice.

~~~
nwh
It's intentional that you can't.

------
nly
> Bitcore is a complete, native interface to the Bitcoin network

Javascript: the new native.

~~~
teacup50
If there was a list of a use cases for typed, "safer" languages, crypto-
currency would be near the top of the list.

I can't think of any technical, risk-related, or financial justification for
implementing a core piece of crypto-currency infrastructure in Javascript, on
Node.

It seems fairly clear that while Bitcoin itself may be a very well designed
crypto protocol, the people doing the implementation are woefully
underqualified.

~~~
aaron-lebo
I think part of the reason you might see some bugs in the Bitcoin code is
because it is C++ code managing low level things like memory and threading.

You don't get static typing with nodejs, but you can probably simplify the
implementation somewhat by not dealing with low level details and therefore
actually get some safety. But aside form that justification there is also the
fact that a lot of people won't touch C++ and a code base like this allows a
lot more developers to read and understand the protocol.

I guess the ideal implementation would be a modern statically typed language
like Rust, Go, or Haskell.

~~~
oscargrouch
C++ is not for scared kids.. C++ is the katana of programming languages:
powerful, but you must know how to use it to avoid cut yourself.. and i think
the bitcoin core in c++ is being implemented in other softwares as well.. and
im pretty sure that this is happening BECAUSE it was created in C++ (only C
could also be a fit here)

So kudos to Satoshi whoever he is for this..

------
martindale
Eric from BitPay here! Happy to answer any questions.

~~~
ctide
What's the plan for supporting altcoins, or is there one?

~~~
martindale
BitPay is focused on Bitcoin, but Bitcore itself is agnostic as to which
blockchain is utilized. We'll gladly review pull requests increasing the
utility of this as a tool for cryptofinance in general.

~~~
bendoernberg
Would like to see Dogecoin compatibility

------
pera
Sorry I don't understand what is this... is it a bitcoin client for node?

------
rakoo
I find it strange to use try/catch to validate an address. I'd expect the
validate function to return true/false.

Is there more doc ? This could be interesting.

~~~
Guvante
It looks like the intended use is to simply call validate and ignore the
result, allowing you to assume from then on it is a valid address.

In theory they should provide a "TryValidate" or similar but it doesn't look
like they do at the moment.

------
christiangenco
Does it do anything more than validate addresses?

~~~
kolev
Yes, but examples and documentation are lacking.

~~~
martindale
Documentation incoming.

------
Kiro
Would this be something to use if I want to build a Bitcoin casino?

------
quellhorst
Where are the docs at?

------
nbody
Any plans for support on other cryptocurrencies?

~~~
untilHellbanned
DOGE please!

------
presorted
Am I paranoid thinking it crazy to use an untyped, interpreted language for
financial apps?

~~~
patio11
I'm torn between "The record for bug-free C or Java code are not exactly
inspiring" and "Wait wait wait in a system with Bitcoin and Javascript you
think _Javascript_ is the probable source of problems?"

~~~
presorted
My question implicitly defined the scope of the conversation to be programming
languages. I like how you broke out of that, and pointed out that Bitcoin
might have bigger problems that need to be tackled first. Every time I try to
think about how to solve Bitcoin's problems, I return to the traditional
banking paradigm: you _pay_ someone else to take the risks of managing the
money, and they will thus reimburse you if something bad happens.

------
barkingcat
prediction: 5 min later, announces that Bitcore has a security exploit. All
coins stolen from all projects that uses it.

~~~
dmix
"Security Please use at your own risk."

So you predicted what their documentation says on the homepage?

