@@ -2510,10 +2510,8 @@ var RequestManager = require('./web3/requestmanager');
2510
2510
var Iban = require ( './web3/iban' ) ;
2511
2511
var Eth = require ( './web3/methods/eth' ) ;
2512
2512
var DB = require ( './web3/methods/db' ) ;
2513
- var Shh = require ( './web3/methods/shh' ) ;
2514
2513
var Net = require ( './web3/methods/net' ) ;
2515
2514
var Personal = require ( './web3/methods/personal' ) ;
2516
- var Swarm = require ( './web3/methods/swarm' ) ;
2517
2515
var Settings = require ( './web3/settings' ) ;
2518
2516
var version = require ( './version.json' ) ;
2519
2517
var utils = require ( './utils/utils' ) ;
@@ -2532,10 +2530,8 @@ function Web3 (provider) {
2532
2530
this . currentProvider = provider ;
2533
2531
this . eth = new Eth ( this ) ;
2534
2532
this . db = new DB ( this ) ;
2535
- this . shh = new Shh ( this ) ;
2536
2533
this . net = new Net ( this ) ;
2537
2534
this . personal = new Personal ( this ) ;
2538
- this . bzz = new Swarm ( this ) ;
2539
2535
this . settings = new Settings ( ) ;
2540
2536
this . version = {
2541
2537
api : version . version
@@ -2612,11 +2608,6 @@ var properties = function () {
2612
2608
name : 'version.ethereum' ,
2613
2609
getter : 'eth_protocolVersion' ,
2614
2610
inputFormatter : utils . toDecimal
2615
- } ) ,
2616
- new Property ( {
2617
- name : 'version.whisper' ,
2618
- getter : 'shh_version' ,
2619
- inputFormatter : utils . toDecimal
2620
2611
} )
2621
2612
] ;
2622
2613
} ;
@@ -2632,7 +2623,7 @@ Web3.prototype.createBatch = function () {
2632
2623
module . exports = Web3 ;
2633
2624
2634
2625
2635
- } , { "./utils/sha3" :19 , "./utils/utils" :20 , "./version.json" :21 , "./web3/batch" :24 , "./web3/extend" :28 , "./web3/httpprovider" :32 , "./web3/iban" :33 , "./web3/ipcprovider" :34 , "./web3/methods/db" :37 , "./web3/methods/eth" :38 , "./web3/methods/net" :39 , "./web3/methods/personal" :40 , "./web3/methods/shh" : 41 , "./web3/methods/swarm" : 42 , "./web3/ property" :45 , "./web3/requestmanager" :46 , "./web3/settings" :47 , "bignumber.js" :"bignumber.js" } ] , 23 :[ function ( require , module , exports ) {
2626
+ } , { "./utils/sha3" :19 , "./utils/utils" :20 , "./version.json" :21 , "./web3/batch" :24 , "./web3/extend" :28 , "./web3/httpprovider" :32 , "./web3/iban" :33 , "./web3/ipcprovider" :34 , "./web3/methods/db" :37 , "./web3/methods/eth" :38 , "./web3/methods/net" :39 , "./web3/methods/personal" :40 , "./web3/property" :45 , "./web3/requestmanager" :46 , "./web3/settings" :47 , "bignumber.js" :"bignumber.js" } ] , 23 :[ function ( require , module , exports ) {
2636
2627
/*
2637
2628
This file is part of web3.js.
2638
2629
@@ -3486,8 +3477,6 @@ var getOptions = function (options, type) {
3486
3477
fromBlock : formatters . inputBlockNumberFormatter ( options . fromBlock ) ,
3487
3478
toBlock : formatters . inputBlockNumberFormatter ( options . toBlock )
3488
3479
} ;
3489
- case 'shh' :
3490
- return options ;
3491
3480
}
3492
3481
} ;
3493
3482
@@ -5699,300 +5688,7 @@ var properties = function () {
5699
5688
5700
5689
module . exports = Personal ;
5701
5690
5702
- } , { "../formatters" :30 , "../method" :36 , "../property" :45 } ] , 41 :[ function ( require , module , exports ) {
5703
- /*
5704
- This file is part of web3.js.
5705
-
5706
- web3.js is free software: you can redistribute it and/or modify
5707
- it under the terms of the GNU Lesser General Public License as published by
5708
- the Free Software Foundation, either version 3 of the License, or
5709
- (at your option) any later version.
5710
-
5711
- web3.js is distributed in the hope that it will be useful,
5712
- but WITHOUT ANY WARRANTY; without even the implied warranty of
5713
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
5714
- GNU Lesser General Public License for more details.
5715
-
5716
- You should have received a copy of the GNU Lesser General Public License
5717
- along with web3.js. If not, see <http://www.gnu.org/licenses/>.
5718
- */
5719
- /** @file shh.js
5720
- * @authors :
5721
- * Fabian Vogelsteller <fabian@ethereum.org>
5722
- * Marek Kotewicz <marek@ethcore.io>
5723
- * @date 2017
5724
- */
5725
-
5726
- var Method = require ( '../method' ) ;
5727
- var Filter = require ( '../filter' ) ;
5728
- var watches = require ( './watches' ) ;
5729
-
5730
- var Shh = function ( web3 ) {
5731
- this . _requestManager = web3 . _requestManager ;
5732
-
5733
- var self = this ;
5734
-
5735
- methods ( ) . forEach ( function ( method ) {
5736
- method . attachToObject ( self ) ;
5737
- method . setRequestManager ( self . _requestManager ) ;
5738
- } ) ;
5739
- } ;
5740
-
5741
- Shh . prototype . newMessageFilter = function ( options , callback , filterCreationErrorCallback ) {
5742
- return new Filter ( options , 'shh' , this . _requestManager , watches . shh ( ) , null , callback , filterCreationErrorCallback ) ;
5743
- } ;
5744
-
5745
- var methods = function ( ) {
5746
-
5747
- return [
5748
- new Method ( {
5749
- name : 'version' ,
5750
- call : 'shh_version' ,
5751
- params : 0
5752
- } ) ,
5753
- new Method ( {
5754
- name : 'info' ,
5755
- call : 'shh_info' ,
5756
- params : 0
5757
- } ) ,
5758
- new Method ( {
5759
- name : 'setMaxMessageSize' ,
5760
- call : 'shh_setMaxMessageSize' ,
5761
- params : 1
5762
- } ) ,
5763
- new Method ( {
5764
- name : 'setMinPoW' ,
5765
- call : 'shh_setMinPoW' ,
5766
- params : 1
5767
- } ) ,
5768
- new Method ( {
5769
- name : 'markTrustedPeer' ,
5770
- call : 'shh_markTrustedPeer' ,
5771
- params : 1
5772
- } ) ,
5773
- new Method ( {
5774
- name : 'newKeyPair' ,
5775
- call : 'shh_newKeyPair' ,
5776
- params : 0
5777
- } ) ,
5778
- new Method ( {
5779
- name : 'addPrivateKey' ,
5780
- call : 'shh_addPrivateKey' ,
5781
- params : 1
5782
- } ) ,
5783
- new Method ( {
5784
- name : 'deleteKeyPair' ,
5785
- call : 'shh_deleteKeyPair' ,
5786
- params : 1
5787
- } ) ,
5788
- new Method ( {
5789
- name : 'hasKeyPair' ,
5790
- call : 'shh_hasKeyPair' ,
5791
- params : 1
5792
- } ) ,
5793
- new Method ( {
5794
- name : 'getPublicKey' ,
5795
- call : 'shh_getPublicKey' ,
5796
- params : 1
5797
- } ) ,
5798
- new Method ( {
5799
- name : 'getPrivateKey' ,
5800
- call : 'shh_getPrivateKey' ,
5801
- params : 1
5802
- } ) ,
5803
- new Method ( {
5804
- name : 'newSymKey' ,
5805
- call : 'shh_newSymKey' ,
5806
- params : 0
5807
- } ) ,
5808
- new Method ( {
5809
- name : 'addSymKey' ,
5810
- call : 'shh_addSymKey' ,
5811
- params : 1
5812
- } ) ,
5813
- new Method ( {
5814
- name : 'generateSymKeyFromPassword' ,
5815
- call : 'shh_generateSymKeyFromPassword' ,
5816
- params : 1
5817
- } ) ,
5818
- new Method ( {
5819
- name : 'hasSymKey' ,
5820
- call : 'shh_hasSymKey' ,
5821
- params : 1
5822
- } ) ,
5823
- new Method ( {
5824
- name : 'getSymKey' ,
5825
- call : 'shh_getSymKey' ,
5826
- params : 1
5827
- } ) ,
5828
- new Method ( {
5829
- name : 'deleteSymKey' ,
5830
- call : 'shh_deleteSymKey' ,
5831
- params : 1
5832
- } ) ,
5833
-
5834
- // subscribe and unsubscribe missing
5835
-
5836
- new Method ( {
5837
- name : 'post' ,
5838
- call : 'shh_post' ,
5839
- params : 1 ,
5840
- inputFormatter : [ null ]
5841
- } )
5842
- ] ;
5843
- } ;
5844
-
5845
- module . exports = Shh ;
5846
-
5847
-
5848
- } , { "../filter" :29 , "../method" :36 , "./watches" :43 } ] , 42 :[ function ( require , module , exports ) {
5849
- /*
5850
- This file is part of web3.js.
5851
-
5852
- web3.js is free software: you can redistribute it and/or modify
5853
- it under the terms of the GNU Lesser General Public License as published by
5854
- the Free Software Foundation, either version 3 of the License, or
5855
- (at your option) any later version.
5856
-
5857
- web3.js is distributed in the hope that it will be useful,
5858
- but WITHOUT ANY WARRANTY; without even the implied warranty of
5859
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
5860
- GNU Lesser General Public License for more details.
5861
-
5862
- You should have received a copy of the GNU Lesser General Public License
5863
- along with web3.js. If not, see <http://www.gnu.org/licenses/>.
5864
- */
5865
- /**
5866
- * @file bzz.js
5867
- * @author Alex Beregszaszi <alex@rtfs.hu>
5868
- * @date 2016
5869
- *
5870
- * Reference: https://github.com/ethereum/go-ethereum/blob/swarm/internal/web3ext/web3ext.go#L33
5871
- */
5872
-
5873
- "use strict" ;
5874
-
5875
- var Method = require ( '../method' ) ;
5876
- var Property = require ( '../property' ) ;
5877
-
5878
- function Swarm ( web3 ) {
5879
- this . _requestManager = web3 . _requestManager ;
5880
-
5881
- var self = this ;
5882
-
5883
- methods ( ) . forEach ( function ( method ) {
5884
- method . attachToObject ( self ) ;
5885
- method . setRequestManager ( self . _requestManager ) ;
5886
- } ) ;
5887
-
5888
- properties ( ) . forEach ( function ( p ) {
5889
- p . attachToObject ( self ) ;
5890
- p . setRequestManager ( self . _requestManager ) ;
5891
- } ) ;
5892
- }
5893
-
5894
- var methods = function ( ) {
5895
- var blockNetworkRead = new Method ( {
5896
- name : 'blockNetworkRead' ,
5897
- call : 'bzz_blockNetworkRead' ,
5898
- params : 1 ,
5899
- inputFormatter : [ null ]
5900
- } ) ;
5901
-
5902
- var syncEnabled = new Method ( {
5903
- name : 'syncEnabled' ,
5904
- call : 'bzz_syncEnabled' ,
5905
- params : 1 ,
5906
- inputFormatter : [ null ]
5907
- } ) ;
5908
-
5909
- var swapEnabled = new Method ( {
5910
- name : 'swapEnabled' ,
5911
- call : 'bzz_swapEnabled' ,
5912
- params : 1 ,
5913
- inputFormatter : [ null ]
5914
- } ) ;
5915
-
5916
- var download = new Method ( {
5917
- name : 'download' ,
5918
- call : 'bzz_download' ,
5919
- params : 2 ,
5920
- inputFormatter : [ null , null ]
5921
- } ) ;
5922
-
5923
- var upload = new Method ( {
5924
- name : 'upload' ,
5925
- call : 'bzz_upload' ,
5926
- params : 2 ,
5927
- inputFormatter : [ null , null ]
5928
- } ) ;
5929
-
5930
- var retrieve = new Method ( {
5931
- name : 'retrieve' ,
5932
- call : 'bzz_retrieve' ,
5933
- params : 1 ,
5934
- inputFormatter : [ null ]
5935
- } ) ;
5936
-
5937
- var store = new Method ( {
5938
- name : 'store' ,
5939
- call : 'bzz_store' ,
5940
- params : 2 ,
5941
- inputFormatter : [ null , null ]
5942
- } ) ;
5943
-
5944
- var get = new Method ( {
5945
- name : 'get' ,
5946
- call : 'bzz_get' ,
5947
- params : 1 ,
5948
- inputFormatter : [ null ]
5949
- } ) ;
5950
-
5951
- var put = new Method ( {
5952
- name : 'put' ,
5953
- call : 'bzz_put' ,
5954
- params : 2 ,
5955
- inputFormatter : [ null , null ]
5956
- } ) ;
5957
-
5958
- var modify = new Method ( {
5959
- name : 'modify' ,
5960
- call : 'bzz_modify' ,
5961
- params : 4 ,
5962
- inputFormatter : [ null , null , null , null ]
5963
- } ) ;
5964
-
5965
- return [
5966
- blockNetworkRead ,
5967
- syncEnabled ,
5968
- swapEnabled ,
5969
- download ,
5970
- upload ,
5971
- retrieve ,
5972
- store ,
5973
- get ,
5974
- put ,
5975
- modify
5976
- ] ;
5977
- } ;
5978
-
5979
- var properties = function ( ) {
5980
- return [
5981
- new Property ( {
5982
- name : 'hive' ,
5983
- getter : 'bzz_hive'
5984
- } ) ,
5985
- new Property ( {
5986
- name : 'info' ,
5987
- getter : 'bzz_info'
5988
- } )
5989
- ] ;
5990
- } ;
5991
-
5992
-
5993
- module . exports = Swarm ;
5994
-
5995
- } , { "../method" :36 , "../property" :45 } ] , 43 :[ function ( require , module , exports ) {
5691
+ } , { "../formatters" :30 , "../method" :36 , "../property" :45 } ] , 43 :[ function ( require , module , exports ) {
5996
5692
/*
5997
5693
This file is part of web3.js.
5998
5694
@@ -6068,36 +5764,8 @@ var eth = function () {
6068
5764
] ;
6069
5765
} ;
6070
5766
6071
- /// @returns an array of objects describing web3.shh.watch api methods
6072
- var shh = function ( ) {
6073
-
6074
- return [
6075
- new Method ( {
6076
- name : 'newFilter' ,
6077
- call : 'shh_newMessageFilter' ,
6078
- params : 1
6079
- } ) ,
6080
- new Method ( {
6081
- name : 'uninstallFilter' ,
6082
- call : 'shh_deleteMessageFilter' ,
6083
- params : 1
6084
- } ) ,
6085
- new Method ( {
6086
- name : 'getLogs' ,
6087
- call : 'shh_getFilterMessages' ,
6088
- params : 1
6089
- } ) ,
6090
- new Method ( {
6091
- name : 'poll' ,
6092
- call : 'shh_getFilterMessages' ,
6093
- params : 1
6094
- } )
6095
- ] ;
6096
- } ;
6097
-
6098
5767
module . exports = {
6099
- eth : eth ,
6100
- shh : shh
5768
+ eth : eth
6101
5769
} ;
6102
5770
6103
5771
0 commit comments