以太坊 - 与web3不存在/不可用错误

时间:2016-06-11 12:14:03

标签: ethereum whisper

我试图在geth控制台上使用web3运行一个简单的耳语示例:

var f = web3.shh.filter({topics: ["qwerty"]})
f.get()
web3.shh.getMessages("qwerty")
web3.shh.post({topics: ["qwerty"], payload: "0x847a786376", ttl: "0x1E", workToProve: "0x9" })

但是我收到了这些错误:

> f.get()
Filter ID Error: filter().get() can't be chained synchronous, please provide a callback for the get() method.
    at web3.js:3602:23
    at <anonymous>:1:1

> web3.shh.getMessages("qwerty")
TypeError: 'getMessages' is not a function
    at <anonymous>:1:1

> web3.shh.post({topics: ["qwerty"], payload: "0x847a786376", ttl: "0x1E", workToProve: "0x9" })
The method shh_post does not exist/is not available
    at web3.js:3119:20
    at web3.js:6023:15
    at web3.js:4995:36
    at <anonymous>:1:1

文档是不是最新的,还是不能使用我的geth版本(试过1.4.5和1.5)? 还得到一个&#34;不存在/不可用&#34; web3.shh.newIdentity()

的错误

0 个答案:

没有答案