Author

Topic: Comprehensive Article on Generating a Bitcoin Address Using JavaScript (Read 1628 times)

legendary
Activity: 1596
Merit: 1100
Very nice write up. There are some libraries like bitcoin-js that do accomplish that task, but they aren't very well documented, so your work is definitely welcome here.

One note - The version byte can have up to four valid values for Bitcoin network:
- 0x00 - main network pubkey hash address
- 0x05 - main network script hash address (e.g. multisig address)
- 0x6F - test network pubkey hash address
- 0xC4 - test network script hash address

More information: https://en.bitcoin.it/wiki/List_of_address_prefixes

Obligatory, related plugs:

https://github.com/gasteve/node-libcoin  (bitcoin JS library, for node.js -- an update of bitcoinjs-server)
https://en.bitcoin.it/wiki/Identity_protocol_v1  (also uses base58-encode-check and a well known prefix)


Thanks, I wasn't aware of node-libcoin despite being so heavily invested in the Node.js community: https://npmjs.org/~jp. Jeff, it looks like you're one of the authors of the Node.js libcoin. I'm curious, why did you choose to do the ECC code in C++?

Using OpenSSL is important for bug-for-bug compatibility, even ignoring the performance improvements.

jp
member
Activity: 69
Merit: 10
Very nice write up. There are some libraries like bitcoin-js that do accomplish that task, but they aren't very well documented, so your work is definitely welcome here.

One note - The version byte can have up to four valid values for Bitcoin network:
- 0x00 - main network pubkey hash address
- 0x05 - main network script hash address (e.g. multisig address)
- 0x6F - test network pubkey hash address
- 0xC4 - test network script hash address

More information: https://en.bitcoin.it/wiki/List_of_address_prefixes

Obligatory, related plugs:

https://github.com/gasteve/node-libcoin  (bitcoin JS library, for node.js -- an update of bitcoinjs-server)
https://en.bitcoin.it/wiki/Identity_protocol_v1  (also uses base58-encode-check and a well known prefix)


Thanks, I wasn't aware of node-libcoin despite being so heavily invested in the Node.js community: https://npmjs.org/~jp. Jeff, it looks like you're one of the authors of the Node.js libcoin. I'm curious, why did you choose to do the ECC code in C++?

legendary
Activity: 1596
Merit: 1100
Very nice write up. There are some libraries like bitcoin-js that do accomplish that task, but they aren't very well documented, so your work is definitely welcome here.

One note - The version byte can have up to four valid values for Bitcoin network:
- 0x00 - main network pubkey hash address
- 0x05 - main network script hash address (e.g. multisig address)
- 0x6F - test network pubkey hash address
- 0xC4 - test network script hash address

More information: https://en.bitcoin.it/wiki/List_of_address_prefixes

Obligatory, related plugs:

https://github.com/gasteve/node-libcoin  (bitcoin JS library, for node.js -- an update of bitcoinjs-server)
https://en.bitcoin.it/wiki/Identity_protocol_v1  (also uses base58-encode-check and a well known prefix)



sr. member
Activity: 310
Merit: 253
Excellent article!
sr. member
Activity: 370
Merit: 250
This was a great read
member
Activity: 80
Merit: 10
Lead developer
Very nice write up. There are some libraries like bitcoin-js that do accomplish that task, but they aren't very well documented, so your work is definitely welcome here.

One note - The version byte can have up to four valid values for Bitcoin network:
- 0x00 - main network pubkey hash address
- 0x05 - main network script hash address (e.g. multisig address)
- 0x6F - test network pubkey hash address
- 0xC4 - test network script hash address

More information: https://en.bitcoin.it/wiki/List_of_address_prefixes
jp
member
Activity: 69
Merit: 10
Hey guys, I noticed the lack of a comprehensive article out there that explains exactly how Bitcoin addresses are created. So, I did the research, and wrote one Smiley It's pretty in depth. I'd love any feedback, thanks!

http://procbits.com/2013/08/27/generating-a-bitcoin-address-with-javascript
Jump to: