diff --git a/.npmignore b/.npmignore new file mode 100644 index 0000000..912ae46 --- /dev/null +++ b/.npmignore @@ -0,0 +1,9 @@ +node_modules/ +es/ +compiled/ +.idea +src/ +tools/ +test/ +esdoc.json +CHANGELOG.md \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index 21de609..0000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,6 +0,0 @@ -## v0.4.0 -- Add AccountLogin class -- Clean up imports -- Use babel for tests -## v0.3.0 -- Extract websocket library to separate graphenejs-ws lib diff --git a/dist/bundle.js b/dist/bundle.js index 02e81c2..53b1c0a 100644 --- a/dist/bundle.js +++ b/dist/bundle.js @@ -4,9 +4,9 @@ else if(typeof define === 'function' && define.amd) define([], factory); else if(typeof exports === 'object') - exports["decentjs-lib"] = factory(); + exports["dcore"] = factory(); else - root["decentjs-lib"] = factory(); + root["dcore"] = factory(); })(this, function() { return /******/ (function(modules) { // webpackBootstrap /******/ // The module cache @@ -13215,7 +13215,8 @@ module.exports = BigInteger /* 37 */ /***/ (function(module, exports, __webpack_require__) { -/* WEBPACK VAR INJECTION */(function(Buffer) {var assert = __webpack_require__(3) +var assert = __webpack_require__(3) +var Buffer = __webpack_require__(2).Buffer var BigInteger = __webpack_require__(5) var THREE = BigInteger.valueOf(3) @@ -13401,7 +13402,7 @@ Point.prototype.multiplyTwo = function (j, x, k) { Point.prototype.getEncoded = function (compressed) { if (compressed == null) compressed = this.compressed - if (this.curve.isInfinity(this)) return new Buffer('00', 'hex') // Infinity point encoded is simply '00' + if (this.curve.isInfinity(this)) return Buffer.alloc(1, 0) // Infinity point encoded is simply '00' var x = this.affineX var y = this.affineY @@ -13410,12 +13411,12 @@ Point.prototype.getEncoded = function (compressed) { // 0x02/0x03 | X if (compressed) { - buffer = new Buffer(1 + byteLength) + buffer = Buffer.allocUnsafe(1 + byteLength) buffer.writeUInt8(y.isEven() ? 0x02 : 0x03, 0) // 0x04 | X | Y } else { - buffer = new Buffer(1 + byteLength + byteLength) + buffer = Buffer.allocUnsafe(1 + byteLength + byteLength) buffer.writeUInt8(0x04, 0) y.toBuffer(byteLength).copy(buffer, 1 + byteLength) @@ -13459,7 +13460,6 @@ Point.prototype.toString = function () { module.exports = Point -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0).Buffer)) /***/ }), /* 38 */ @@ -19663,7 +19663,7 @@ class ErrorWithCause { /* 68 */ /***/ (function(module, exports) { -module.exports = {"_args":[["bigi@1.4.2","/Users/duski/Documents/touch4it/dev/decentGo/decentjs-lib"]],"_from":"bigi@1.4.2","_id":"bigi@1.4.2","_inBundle":false,"_integrity":"sha1-nGZalfiLiwj8Bc/XMfVhhZ1yWCU=","_location":"/bigi","_phantomChildren":{},"_requested":{"type":"version","registry":true,"raw":"bigi@1.4.2","name":"bigi","escapedName":"bigi","rawSpec":"1.4.2","saveSpec":null,"fetchSpec":"1.4.2"},"_requiredBy":["/","/ecurve"],"_resolved":"https://registry.npmjs.org/bigi/-/bigi-1.4.2.tgz","_spec":"1.4.2","_where":"/Users/duski/Documents/touch4it/dev/decentGo/decentjs-lib","bugs":{"url":"https://github.com/cryptocoinjs/bigi/issues"},"dependencies":{},"description":"Big integers.","devDependencies":{"coveralls":"^2.11.2","istanbul":"^0.3.5","jshint":"^2.5.1","mocha":"^2.1.0","mochify":"^2.1.0"},"homepage":"https://github.com/cryptocoinjs/bigi#readme","keywords":["cryptography","math","bitcoin","arbitrary","precision","arithmetic","big","integer","int","number","biginteger","bigint","bignumber","decimal","float"],"main":"./lib/index.js","name":"bigi","repository":{"url":"git+https://github.com/cryptocoinjs/bigi.git","type":"git"},"scripts":{"browser-test":"mochify --wd -R spec","coverage":"istanbul cover ./node_modules/.bin/_mocha -- --reporter list test/*.js","coveralls":"npm run-script coverage && node ./node_modules/.bin/coveralls < coverage/lcov.info","jshint":"jshint --config jshint.json lib/*.js ; true","test":"_mocha -- test/*.js","unit":"mocha"},"testling":{"files":"test/*.js","harness":"mocha","browsers":["ie/9..latest","firefox/latest","chrome/latest","safari/6.0..latest","iphone/6.0..latest","android-browser/4.2..latest"]},"version":"1.4.2"} +module.exports = {"_from":"bigi@^1.4.1","_id":"bigi@1.4.2","_inBundle":false,"_integrity":"sha1-nGZalfiLiwj8Bc/XMfVhhZ1yWCU=","_location":"/bigi","_phantomChildren":{},"_requested":{"type":"range","registry":true,"raw":"bigi@^1.4.1","name":"bigi","escapedName":"bigi","rawSpec":"^1.4.1","saveSpec":null,"fetchSpec":"^1.4.1"},"_requiredBy":["/","/ecurve"],"_resolved":"https://registry.npmjs.org/bigi/-/bigi-1.4.2.tgz","_shasum":"9c665a95f88b8b08fc05cfd731f561859d725825","_spec":"bigi@^1.4.1","_where":"/Users/duski/Documents/touch4it/dev/decentGo/decentjs-lib","bugs":{"url":"https://github.com/cryptocoinjs/bigi/issues"},"bundleDependencies":false,"dependencies":{},"deprecated":false,"description":"Big integers.","devDependencies":{"coveralls":"^2.11.2","istanbul":"^0.3.5","jshint":"^2.5.1","mocha":"^2.1.0","mochify":"^2.1.0"},"homepage":"https://github.com/cryptocoinjs/bigi#readme","keywords":["cryptography","math","bitcoin","arbitrary","precision","arithmetic","big","integer","int","number","biginteger","bigint","bignumber","decimal","float"],"main":"./lib/index.js","name":"bigi","repository":{"url":"git+https://github.com/cryptocoinjs/bigi.git","type":"git"},"scripts":{"browser-test":"mochify --wd -R spec","coverage":"istanbul cover ./node_modules/.bin/_mocha -- --reporter list test/*.js","coveralls":"npm run-script coverage && node ./node_modules/.bin/coveralls < coverage/lcov.info","jshint":"jshint --config jshint.json lib/*.js ; true","test":"_mocha -- test/*.js","unit":"mocha"},"testling":{"files":"test/*.js","harness":"mocha","browsers":["ie/9..latest","firefox/latest","chrome/latest","safari/6.0..latest","iphone/6.0..latest","android-browser/4.2..latest"]},"version":"1.4.2"} /***/ }), /* 69 */ diff --git a/examples/index.html b/examples/index.html deleted file mode 100644 index 6efa63c..0000000 --- a/examples/index.html +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - SearchContent example - - - -

Content search

- - -
- - - - - \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index abfc375..f4c5b03 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { - "name": "decentjs-lib", - "version": "0.5.2", + "name": "dcore", + "version": "1.0.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -1975,8 +1975,7 @@ "estraverse": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.1.0.tgz", - "integrity": "sha1-QPI6dgkgQb5kZ9fyNckztnB2bgU=", - "dev": true + "integrity": "sha1-QPI6dgkgQb5kZ9fyNckztnB2bgU=" }, "esutils": { "version": "2.0.2", diff --git a/package.json b/package.json index 3ee08ec..7743b21 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { - "name": "decentjs-lib", - "version": "0.5.2", - "description": "Pure JavaScript DECENT library for node.js and browsers.", + "name": "dcore", + "version": "1.0.0", + "description": "Low level javascript library for Decent blockchain", "browser": { "ws": false, "crypto": false @@ -22,18 +22,10 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/svk31/decentjs-lib.git" - }, - "author": "Sigve Kvalsvik (https://github.com/svk31)", - "contributors": [ - "James Calfee (https://github.com/jcalfee/)", - "Daniel Larimer (https://github.com/bytemaster/)", - "Valentine Zavgorodnev (https://github.com/valzav/)" - ], - "license": "BSD-2-Clause-FreeBSD", - "bugs": { - "url": "https://github.com/svk31/decentjs-lib/issues" + "url": "https://github.com/DECENTfoundation/decentjs-lib" }, + "author": "DECENT Foundation ", + "license": "MIT", "engines": { "node": ">= 6.0.0" }, @@ -48,6 +40,7 @@ "crypto-js": "^3.1.9-1", "deep-equal": "^1.0.1", "ecurve": "^1.0.2", + "esdoc-es7-plugin": "0.0.3", "event-emitter": "^0.3.4", "immutable": "^3.7.6", "secure-random": "^1.1.1", diff --git a/webpack.config.js b/webpack.config.js index f20b10f..e4ab808 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -6,6 +6,6 @@ module.exports = { filename: 'bundle.js', path: path.resolve(__dirname, 'dist'), libraryTarget: 'umd', - library: 'decentjs-lib' + library: 'dcore' } }; \ No newline at end of file