Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions cmd/mist/assets/examples/whisper.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,23 +40,23 @@ <h1>Whisper test</h1>
document.querySelector("#id").innerHTML = id;
document.querySelector("#known").innerHTML = shh.haveIdentity(id);

var watch = shh.watch({topics: ["test"]})
var watch = shh.watch({topic: ["test"]})
watch.arrived(function(message) {
document.querySelector("#table").innerHTML += "<tr><td colspan='2'>"+JSON.stringify(message)+"</td></tr>";
});

var selfWatch = shh.watch({to: id, topics: ["test"]})
var selfWatch = shh.watch({to: id, topic: ["test"]})
selfWatch.arrived(function(message) {
document.querySelector("#table").innerHTML += "<tr><td>To me</td><td>"+JSON.stringify(message)+"</td></tr>";
});

function test() {
shh.post({topics: ["test"], payload: web3.fromAscii("test it")});
shh.post({topic: ["test"], payload: web3.fromAscii("test it")});
count();
}

function test2() {
shh.post({to: id, topics: ["test"], payload: web3.fromAscii("Private")});
shh.post({to: id, topic: ["test"], payload: web3.fromAscii("Private")});
count();
}

Expand Down
8 changes: 5 additions & 3 deletions cmd/mist/assets/ext/ethereum.js/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
This is the Ethereum compatible [JavaScript API](https://github.com/ethereum/wiki/wiki/JavaScript-API)
which implements the [Generic JSON RPC](https://github.com/ethereum/wiki/wiki/Generic-JSON-RPC) spec. It's available on npm as a node module and also for bower and component as an embeddable js

[![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![dependency status][dep-image]][dep-url] [![dev dependency status][dep-dev-image]][dep-dev-url]
[![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![dependency status][dep-image]][dep-url] [![dev dependency status][dep-dev-image]][dep-dev-url][![Coverage Status][coveralls-image]][coveralls-url]

<!-- [![browser support](https://ci.testling.com/ethereum/ethereum.js.png)](https://ci.testling.com/ethereum/ethereum.js) -->

Expand All @@ -30,9 +30,9 @@ Require the library:

var web3 = require('web3');

Set a provider (QtProvider, WebSocketProvider, HttpRpcProvider)
Set a provider (QtSyncProvider, HttpSyncProvider)

var web3.setProvider(new web3.providers.WebSocketProvider('ws://localhost:40404/eth'));
web3.setProvider(new web3.providers.HttpSyncProvider());

There you go, now you can use it:

Expand Down Expand Up @@ -93,4 +93,6 @@ ethereum -ws -loglevel=4
[dep-url]: https://david-dm.org/ethereum/ethereum.js
[dep-dev-image]: https://david-dm.org/ethereum/ethereum.js/dev-status.svg
[dep-dev-url]: https://david-dm.org/ethereum/ethereum.js#info=devDependencies
[coveralls-image]: https://coveralls.io/repos/ethereum/ethereum.js/badge.svg?branch=master
[coveralls-url]: https://coveralls.io/r/ethereum/ethereum.js?branch=master

2 changes: 1 addition & 1 deletion cmd/mist/assets/ext/ethereum.js/bower.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "ethereum.js",
"namespace": "ethereum",
"version": "0.0.13",
"version": "0.0.15",
"description": "Ethereum Compatible JavaScript API",
"main": ["./dist/ethereum.js", "./dist/ethereum.min.js"],
"dependencies": {
Expand Down
Loading