|
321 | 321 |
|
322 | 322 | var eth = web3.eth;
|
323 | 323 | // Eth object properties
|
324 |
| - Object.defineProperty(eth, "key", { |
325 |
| - get: function() { |
326 |
| - return new Promise(function(resolve, reject) { |
327 |
| - eth.provider.send({call: "getKey"}, function(k) { |
328 |
| - resolve(k); |
329 |
| - }); |
330 |
| - }); |
331 |
| - }, |
332 |
| - }); |
333 |
| - |
334 | 324 | Object.defineProperty(eth, "gasPrice", {
|
335 | 325 | get: function() {
|
336 | 326 | return "10000000000000"
|
|
340 | 330 | Object.defineProperty(eth, "coinbase", {
|
341 | 331 | get: function() {
|
342 | 332 | return new Promise(function(resolve, reject) {
|
343 |
| - web3.provider.send({call: "getCoinBase"}, function(coinbase) { |
| 333 | + web3.provider.send({call: "coinbase"}, function(coinbase) { |
344 | 334 | resolve(coinbase);
|
345 | 335 | });
|
346 | 336 | });
|
|
350 | 340 | Object.defineProperty(eth, "listening", {
|
351 | 341 | get: function() {
|
352 | 342 | return new Promise(function(resolve, reject) {
|
353 |
| - web3.provider.send({call: "getIsListening"}, function(listening) { |
| 343 | + web3.provider.send({call: "listening"}, function(listening) { |
354 | 344 | resolve(listening);
|
355 | 345 | });
|
356 | 346 | });
|
|
361 | 351 | Object.defineProperty(eth, "mining", {
|
362 | 352 | get: function() {
|
363 | 353 | return new Promise(function(resolve, reject) {
|
364 |
| - web3.provider.send({call: "getIsMining"}, function(mining) { |
| 354 | + web3.provider.send({call: "mining"}, function(mining) { |
365 | 355 | resolve(mining);
|
366 | 356 | });
|
367 | 357 | });
|
|
371 | 361 | Object.defineProperty(eth, "peerCount", {
|
372 | 362 | get: function() {
|
373 | 363 | return new Promise(function(resolve, reject) {
|
374 |
| - web3.provider.send({call: "getPeerCount"}, function(peerCount) { |
| 364 | + web3.provider.send({call: "peerCount"}, function(peerCount) { |
375 | 365 | resolve(peerCount);
|
376 | 366 | });
|
377 | 367 | });
|
|
0 commit comments