rename to web3

This commit is contained in:
Marek Kotewicz 2015-04-07 04:39:47 +02:00
parent c80ede50c3
commit 73b9ed29c0
18 changed files with 63 additions and 42 deletions

View File

@ -1,7 +1,7 @@
{
"name": "ethereum.js",
"name": "web3",
"namespace": "ethereum",
"version": "0.2.4",
"version": "0.2.5",
"description": "Ethereum Compatible JavaScript API",
"main": [
"./dist/ethereum.js",

View File

@ -1100,7 +1100,7 @@ module.exports = {
},{"bignumber.js":"bignumber.js"}],7:[function(require,module,exports){
module.exports={
"version": "0.2.4"
"version": "0.2.5"
}
},{}],8:[function(require,module,exports){
@ -3234,16 +3234,23 @@ module.exports = {
module.exports = BigNumber; // jshint ignore:line
},{}],"ethereum.js":[function(require,module,exports){
var web3 = require('./lib/web3');
},{}],"web3":[function(require,module,exports){
// dont override global variable
if (typeof web3 !== 'undefined') {
var web3;
}
web3 = require('./lib/web3');
web3.providers.HttpProvider = require('./lib/web3/httpprovider');
web3.providers.QtSyncProvider = require('./lib/web3/qtsync');
web3.eth.contract = require('./lib/web3/contract');
web3.abi = require('./lib/solidity/abi');
module.exports = web3;
},{"./lib/solidity/abi":1,"./lib/web3":8,"./lib/web3/contract":9,"./lib/web3/httpprovider":16,"./lib/web3/qtsync":21}]},{},["ethereum.js"])
},{"./lib/solidity/abi":1,"./lib/web3":8,"./lib/web3/contract":9,"./lib/web3/httpprovider":16,"./lib/web3/qtsync":21}]},{},["web3"])
//# sourceMappingURL=ethereum-light.js.map
//# sourceMappingURL=web3-light.js.map

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1100,7 +1100,7 @@ module.exports = {
},{"bignumber.js":"bignumber.js"}],7:[function(require,module,exports){
module.exports={
"version": "0.2.4"
"version": "0.2.5"
}
},{}],8:[function(require,module,exports){
@ -5899,16 +5899,23 @@ module.exports = {
}
})(this);
},{"crypto":26}],"ethereum.js":[function(require,module,exports){
var web3 = require('./lib/web3');
},{"crypto":26}],"web3":[function(require,module,exports){
// dont override global variable
if (typeof web3 !== 'undefined') {
var web3;
}
web3 = require('./lib/web3');
web3.providers.HttpProvider = require('./lib/web3/httpprovider');
web3.providers.QtSyncProvider = require('./lib/web3/qtsync');
web3.eth.contract = require('./lib/web3/contract');
web3.abi = require('./lib/solidity/abi');
module.exports = web3;
},{"./lib/solidity/abi":1,"./lib/web3":8,"./lib/web3/contract":9,"./lib/web3/httpprovider":16,"./lib/web3/qtsync":21}]},{},["ethereum.js"])
},{"./lib/solidity/abi":1,"./lib/web3":8,"./lib/web3/contract":9,"./lib/web3/httpprovider":16,"./lib/web3/qtsync":21}]},{},["web3"])
//# sourceMappingURL=ethereum.js.map
//# sourceMappingURL=web3.js.map

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -3,10 +3,10 @@
<head>
<script type="text/javascript" src="../node_modules/bignumber.js/bignumber.min.js"></script>
<script type="text/javascript" src="../dist/ethereum-light.js"></script>
<script type="text/javascript" src="../dist/web3-light.js"></script>
<script type="text/javascript">
var web3 = require('ethereum.js');
var web3 = require('web3');
web3.setProvider(new web3.providers.HttpProvider());
function watchBalance() {

View File

@ -2,10 +2,10 @@
<html>
<head>
<script type="text/javascript" src="../dist/ethereum.js"></script>
<script type="text/javascript" src="../dist/web3"></script>
<script type="text/javascript">
var web3 = require('ethereum.js');
var web3 = require('web3');
web3.setProvider(new web3.providers.HttpProvider());
// solidity source code

View File

@ -2,10 +2,10 @@
<html>
<head>
<script type="text/javascript" src="../dist/ethereum.js"></script>
<script type="text/javascript" src="../dist/web3.js"></script>
<script type="text/javascript">
var web3 = require('ethereum.js');
var web3 = require('web3');
web3.setProvider(new web3.providers.HttpProvider());
// solidity source code

View File

@ -1,9 +1,9 @@
<!doctype>
<html>
<head>
<script type="text/javascript" src="../dist/ethereum.js"></script>
<script type="text/javascript" src="../dist/web3.js"></script>
<script type="text/javascript">
var web3 = require('ethereum.js');
var web3 = require('web3');
web3.setProvider(new web3.providers.HttpProvider('http://localhost:8080'));
var desc = [{

View File

@ -1,9 +1,9 @@
<!doctype>
<html>
<head>
<script type="text/javascript" src="../dist/ethereum.js"></script>
<script type="text/javascript" src="../dist/web3.js"></script>
<script type="text/javascript">
var web3 = require('ethereum.js');
var web3 = require('web3');
web3.setProvider(new web3.providers.HttpProvider('http://localhost:8080'));
var source = "" +

View File

@ -2,10 +2,10 @@
<html>
<head>
<script type="text/javascript" src="../dist/ethereum.js"></script>
<script type="text/javascript" src="../dist/web3.js"></script>
<script type="text/javascript">
var web3 = require('ethereum.js');
var web3 = require('web3');
web3.setProvider(new web3.providers.HttpProvider());
// solidity source code

View File

@ -19,8 +19,8 @@ var replace = require('gulp-replace');
var DEST = './dist/';
var src = 'index';
var dst = 'ethereum';
var lightDst = 'ethereum-light';
var dst = 'web3';
var lightDst = 'web3-light';
var browserifyOptions = {
debug: true,
@ -60,7 +60,7 @@ gulp.task('lint', function(){
gulp.task('buildLight', ['clean'], function () {
return browserify(browserifyOptions)
.require('./' + src + '.js', {expose: 'ethereum.js'})
.require('./' + src + '.js', {expose: 'web3'})
.ignore('bignumber.js')
.require('./lib/utils/browser-bn.js', {expose: 'bignumber.js'}) // fake bignumber.js
.add('./' + src + '.js')
@ -75,7 +75,7 @@ gulp.task('buildLight', ['clean'], function () {
gulp.task('buildStandalone', ['clean'], function () {
return browserify(browserifyOptions)
.require('./' + src + '.js', {expose: 'ethereum.js'})
.require('./' + src + '.js', {expose: 'web3'})
.require('bignumber.js') // expose it to dapp users
.add('./' + src + '.js')
.ignore('crypto')

View File

@ -1,7 +1,14 @@
var web3 = require('./lib/web3');
// dont override global variable
if (typeof web3 !== 'undefined') {
var web3;
}
web3 = require('./lib/web3');
web3.providers.HttpProvider = require('./lib/web3/httpprovider');
web3.providers.QtSyncProvider = require('./lib/web3/qtsync');
web3.eth.contract = require('./lib/web3/contract');
web3.abi = require('./lib/solidity/abi');
module.exports = web3;

View File

@ -1,3 +1,3 @@
{
"version": "0.2.4"
"version": "0.2.5"
}

View File

@ -1,7 +1,7 @@
/* jshint ignore:start */
Package.describe({
name: 'ethereum:js',
version: '0.2.4',
version: '0.2.5',
summary: 'Ethereum JavaScript API, middleware to talk to a ethreum node over RPC',
git: 'https://github.com/ethereum/ethereum.js',
// By default, Meteor will default to using README.md for documentation.

View File

@ -1,7 +1,7 @@
{
"name": "ethereum.js",
"name": "web3",
"namespace": "ethereum",
"version": "0.2.4",
"version": "0.2.5",
"description": "Ethereum JavaScript API, middleware to talk to a ethereum node over RPC",
"main": "./index.js",
"directories": {