mirror of https://github.com/status-im/web3.js.git
Add basic bzz API.
This commit is contained in:
parent
d04c48dd8e
commit
57b4e918f3
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
@ -2431,6 +2431,7 @@ var version = require('./version.json');
|
||||||
var net = require('./web3/methods/net');
|
var net = require('./web3/methods/net');
|
||||||
var eth = require('./web3/methods/eth');
|
var eth = require('./web3/methods/eth');
|
||||||
var db = require('./web3/methods/db');
|
var db = require('./web3/methods/db');
|
||||||
|
var bzz = require('./web3/methods/bzz');
|
||||||
var shh = require('./web3/methods/shh');
|
var shh = require('./web3/methods/shh');
|
||||||
var watches = require('./web3/methods/watches');
|
var watches = require('./web3/methods/watches');
|
||||||
var Filter = require('./web3/filter');
|
var Filter = require('./web3/filter');
|
||||||
|
@ -2506,6 +2507,7 @@ web3.shh.filter = function (fil, callback) {
|
||||||
};
|
};
|
||||||
web3.net = {};
|
web3.net = {};
|
||||||
web3.db = {};
|
web3.db = {};
|
||||||
|
web3.bzz = {};
|
||||||
web3.setProvider = function (provider) {
|
web3.setProvider = function (provider) {
|
||||||
this.currentProvider = provider;
|
this.currentProvider = provider;
|
||||||
RequestManager.getInstance().setProvider(provider);
|
RequestManager.getInstance().setProvider(provider);
|
||||||
|
@ -2589,11 +2591,12 @@ setupMethods(web3.eth, eth.methods);
|
||||||
setupProperties(web3.eth, eth.properties);
|
setupProperties(web3.eth, eth.properties);
|
||||||
setupMethods(web3.db, db.methods);
|
setupMethods(web3.db, db.methods);
|
||||||
setupMethods(web3.shh, shh.methods);
|
setupMethods(web3.shh, shh.methods);
|
||||||
|
setupMethods(web3.bzz, bzz.methods);
|
||||||
|
|
||||||
module.exports = web3;
|
module.exports = web3;
|
||||||
|
|
||||||
|
|
||||||
},{"./utils/config":18,"./utils/sha3":19,"./utils/utils":20,"./version.json":21,"./web3/batch":24,"./web3/filter":28,"./web3/formatters":29,"./web3/iban":32,"./web3/method":35,"./web3/methods/db":36,"./web3/methods/eth":37,"./web3/methods/net":38,"./web3/methods/shh":39,"./web3/methods/watches":40,"./web3/property":42,"./web3/requestmanager":43,"./web3/syncing":44}],23:[function(require,module,exports){
|
},{"./utils/config":18,"./utils/sha3":19,"./utils/utils":20,"./version.json":21,"./web3/batch":24,"./web3/filter":28,"./web3/formatters":29,"./web3/iban":32,"./web3/method":35,"./web3/methods/db":36,"./web3/methods/eth":37,"./web3/methods/net":38,"./web3/methods/shh":39,"./web3/methods/bzz":96,"./web3/methods/watches":40,"./web3/property":42,"./web3/requestmanager":43,"./web3/syncing":44}],23:[function(require,module,exports){
|
||||||
/*
|
/*
|
||||||
This file is part of ethereum.js.
|
This file is part of ethereum.js.
|
||||||
|
|
||||||
|
@ -4910,7 +4913,53 @@ Method.prototype.send = function () {
|
||||||
module.exports = Method;
|
module.exports = Method;
|
||||||
|
|
||||||
|
|
||||||
},{"../utils/utils":20,"./errors":26,"./requestmanager":43}],36:[function(require,module,exports){
|
},{"../utils/utils":20,"./errors":26,"./requestmanager":43}],96:[function(require,module,exports){
|
||||||
|
/*
|
||||||
|
This file is part of ethereum.js.
|
||||||
|
|
||||||
|
ethereum.js is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
ethereum.js is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU Lesser General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Lesser General Public License
|
||||||
|
along with ethereum.js. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
/** @file bzz.js
|
||||||
|
* @authors:
|
||||||
|
* Gav Wood <g@ethdev.com>
|
||||||
|
* @date 2015
|
||||||
|
*/
|
||||||
|
|
||||||
|
var Method = require('../method');
|
||||||
|
|
||||||
|
var put = new Method({
|
||||||
|
name: 'put',
|
||||||
|
call: 'bzz_put',
|
||||||
|
params: 1
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
var get = new Method({
|
||||||
|
name: 'get',
|
||||||
|
call: 'bzz_get',
|
||||||
|
params: 1
|
||||||
|
});
|
||||||
|
|
||||||
|
var methods = [
|
||||||
|
put, get
|
||||||
|
];
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
methods: methods
|
||||||
|
};
|
||||||
|
|
||||||
|
},{"../method":35}],36:[function(require,module,exports){
|
||||||
/*
|
/*
|
||||||
This file is part of ethereum.js.
|
This file is part of ethereum.js.
|
||||||
|
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -28,6 +28,7 @@ var version = require('./version.json');
|
||||||
var net = require('./web3/methods/net');
|
var net = require('./web3/methods/net');
|
||||||
var eth = require('./web3/methods/eth');
|
var eth = require('./web3/methods/eth');
|
||||||
var db = require('./web3/methods/db');
|
var db = require('./web3/methods/db');
|
||||||
|
var bzz = require('./web3/methods/bzz');
|
||||||
var shh = require('./web3/methods/shh');
|
var shh = require('./web3/methods/shh');
|
||||||
var watches = require('./web3/methods/watches');
|
var watches = require('./web3/methods/watches');
|
||||||
var Filter = require('./web3/filter');
|
var Filter = require('./web3/filter');
|
||||||
|
|
|
@ -0,0 +1,44 @@
|
||||||
|
/*
|
||||||
|
This file is part of ethereum.js.
|
||||||
|
|
||||||
|
ethereum.js is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
ethereum.js is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU Lesser General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Lesser General Public License
|
||||||
|
along with ethereum.js. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
/** @file bzz.js
|
||||||
|
* @authors:
|
||||||
|
* Gav Wood <g@ethdev.com>
|
||||||
|
* @date 2015
|
||||||
|
*/
|
||||||
|
|
||||||
|
var Method = require('../method');
|
||||||
|
|
||||||
|
var put = new Method({
|
||||||
|
name: 'put',
|
||||||
|
call: 'bzz_put',
|
||||||
|
params: 1
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
var get = new Method({
|
||||||
|
name: 'get',
|
||||||
|
call: 'bzz_get',
|
||||||
|
params: 1
|
||||||
|
});
|
||||||
|
|
||||||
|
var methods = [
|
||||||
|
put, get
|
||||||
|
];
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
methods: methods
|
||||||
|
};
|
Loading…
Reference in New Issue