bitmessage-js/README.md

96 lines
2.7 KiB
Markdown
Raw Normal View History

2014-12-17 11:08:42 +00:00
# bitmessage [![Build Status](https://travis-ci.org/bitchan/bitmessage.svg?branch=master)](https://travis-ci.org/bitchan/bitmessage)
2014-12-11 17:57:42 +00:00
2015-01-21 00:19:35 +00:00
[![NPM](https://nodei.co/npm/bitmessage.png)](https://www.npmjs.com/package/bitmessage)
2014-12-28 17:08:41 +00:00
JavaScript Bitmessage library for both browserify and node. The goal of this project is to implement Bitmessage protocol v3 for both platforms at the maximum possible level (we still can't create TCP connections or listen for incoming connections in the Browser but the Proof of work and crypto is fully doable).
Public library API is currently in alpha stage, breaking changes are very likely to happen.
2014-12-28 16:59:57 +00:00
2014-12-30 18:30:12 +00:00
API documentation is available [here](https://bitchan.github.io/bitmessage/docs/).
2014-12-30 17:00:28 +00:00
2014-12-28 16:59:57 +00:00
## References
2015-01-03 16:49:20 +00:00
* [Bitmessage wiki](https://bitmessage.org/wiki/Main_Page)
2014-12-28 16:59:57 +00:00
* [Protocol specification](https://bitmessage.org/wiki/Protocol_specification)
* [Whitepaper](https://bitmessage.org/bitmessage.pdf)
## Feature matrix (both Browser and Node)
2015-01-15 21:00:27 +00:00
- [x] Crypto
2015-01-16 15:35:40 +00:00
- [x] SHA-1
2014-12-28 16:59:57 +00:00
- [x] SHA-256
2015-01-16 15:35:40 +00:00
- [x] SHA-512
2014-12-28 16:59:57 +00:00
- [x] RIPEMD-160
- [x] PRNG
- [x] ECC keys manipulation
- [x] ECDSA
2015-01-13 23:36:07 +00:00
- [x] ECDH
- [x] ECIES
- [x] AES-256-CBC
- [x] HMAC-SHA-256
2015-01-11 13:59:43 +00:00
- [x] Common structures
2015-01-04 20:59:14 +00:00
- [x] message
- [x] object
2014-12-28 16:59:57 +00:00
- [x] var_int
2015-01-02 14:27:03 +00:00
- [x] var_str
- [x] var_int_list
2015-01-05 23:32:10 +00:00
- [x] net_addr
2015-01-15 21:00:27 +00:00
- [x] inv_vect
2015-01-11 13:59:43 +00:00
- [x] encrypted
2015-01-04 23:40:52 +00:00
- [x] service features
- [x] pubkey features
2015-01-16 00:08:56 +00:00
- [x] Message types
2015-01-15 17:13:02 +00:00
- [x] version
2015-01-15 18:11:33 +00:00
- [x] verack
- [x] addr
2015-01-15 21:00:27 +00:00
- [x] inv
2015-01-15 21:07:49 +00:00
- [x] getdata
2015-01-16 00:08:56 +00:00
- [x] error
- [ ] Object types
2015-01-18 11:37:09 +00:00
- [x] getpubkey
- [x] pubkey
- [ ] msg
- [ ] broadcast
- [x] WIF
2015-01-09 21:36:42 +00:00
- [x] POW
2015-01-18 12:34:02 +00:00
- [x] High-level classes
- [x] Address
2015-01-15 21:07:49 +00:00
- [x] UserAgent
2014-12-28 16:59:57 +00:00
- [ ] Parse PyBitmessage configs
2015-01-02 21:56:54 +00:00
- [ ] keys.dat
- [ ] knownnodes.dat
- [ ] messages.dat
2014-12-28 16:59:57 +00:00
2014-12-28 17:08:41 +00:00
## Feature matrix (Node.js only)
2014-12-28 16:59:57 +00:00
- [ ] Network
- [ ] Bootstrap
- [ ] Connect to the network
- [ ] Accept connections
2014-12-11 17:57:42 +00:00
2014-12-13 18:59:48 +00:00
## Usage
2015-01-19 12:08:56 +00:00
### Address
2014-12-13 18:59:48 +00:00
```js
2014-12-28 16:59:57 +00:00
var Address = require("bitmessage").Address;
2015-01-19 12:08:56 +00:00
// Generate a new random Bitmessage identity.
var addr1 = Address.fromRandom();
console.log("New random Bitmessage address:", addr1.encode());
// Or create it from passphrase.
var addr2 = Address.fromPassphrase("test");
console.log("Deterministic Bitmessage address:", addr2.encode());
2014-12-13 18:59:48 +00:00
```
2014-12-11 17:57:42 +00:00
## License
bitmessage - JavaScript Bitmessage library
Written in 2014 by Kagami Hiiragi <kagami@genshiken.org>
To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this software to the public domain worldwide. This software is distributed without any warranty.
You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.