Also, due to the lack of nodes with Whisper enabled, you need to create a [static-nodes.json](https://github.com/status-im/status-js/blob/master/static-nodes.json) file, that must be placed in a specific path (if using `ropsten` in a linux environment, `~/.ethereum/testnet/geth/static-nodes.json`
#### Using `murmur`
```
$ murmur-client --ws --no-bridge
```
See `murmur` [documentation](https://github.com/status-im/murmur) for additional details.
#### Using `status-go`
```
$ /path/to/status-go/statusd
```
See `status-go` [documentation](https://github.com/status-im/status-go) for additional details.
* _url_ - an address of a valid http, websocket or ipc provider.
* _privateKey_ - private key of the user that will send / receive messages. It will be added to the whisper node. Default: random private key. Optional
* _privateKey_ - private key of the user that will send / receive messages. It will be added to the whisper node. Default: random private key. Optional
Process incoming chat requests messages from other users
```javascript
status.onChatRequest(cb);
```
```javascript
status.onChatRequest((err, data) => {
if(err)
console.error(err);
else
console.dir(data);
// message information
// {
// displayName, // Display Name
// profilePic, // Base64 Profile picture
// username // Random username (Adjective1 Adjective2 Animal)
// }
});
```
Arguments
* _cb_ - a callback that will be called, possibly with an error, when a chat request is received. If there is no error, the first argument will be null.
Add a contact by pubKey. (TODO: send contact request msg)
```javascript
status.addContact(pubKey, [cb]);
```
```javascript
status.addContact("0x1122...9900");
```
Arguments
* _pubKey_ - public key to add as a contact.
* _cb_ - a callback that will be called, possibly with an error, when the contact is added. If there is no error, the first argument will be null. Optional.
### removeContact
Remove a contact by pubKey.
```javascript
status.removeContact(pubKey);
```
```javascript
status.removeContact("0x1122...9900");
```
Arguments
* _pubKey_ - public key to remove from known contacts.
Thank you for considering to help out with the source code! We welcome contributions from anyone on the internet, and are grateful for even the smallest of fixes!
If you'd like to contribute to `status-js`, please fork, fix, commit and send a pull request for the maintainers to review and merge into the main code base. If you wish to submit more complex changes though, please check up with the core devs first on [#status-js channel](https://get.status.im/chat/public/status-js) to ensure those changes are in line with the general philosophy of the project and/or get some early feedback which can make both your efforts much lighter as well as our review and merge procedures quick and simple.