remove soop inheritance system
This commit is contained in:
parent
3f0dd8d7ff
commit
cd7eae8359
@ -11,17 +11,6 @@ var puts = function(error, stdout, stderr) {
|
|||||||
//sys.puts(stderr);
|
//sys.puts(stderr);
|
||||||
};
|
};
|
||||||
|
|
||||||
var pack = function(params) {
|
|
||||||
var file = require.resolve('soop');
|
|
||||||
var dir = file.substr(0, file.length - String('soop.js').length);
|
|
||||||
var preludePath = dir + 'example/custom_prelude.js';
|
|
||||||
params.raw = true;
|
|
||||||
params.sourceMapPrefix = '//#';
|
|
||||||
params.prelude = fs.readFileSync(preludePath, 'utf8');
|
|
||||||
params.preludePath = preludePath;
|
|
||||||
return browserPack(params);
|
|
||||||
};
|
|
||||||
|
|
||||||
var modules = [
|
var modules = [
|
||||||
'lib/Address',
|
'lib/Address',
|
||||||
'lib/Armory',
|
'lib/Armory',
|
||||||
@ -106,7 +95,6 @@ var createBitcore = function(opts) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var bopts = {
|
var bopts = {
|
||||||
pack: pack,
|
|
||||||
debug: true,
|
debug: true,
|
||||||
standalone: 'bitcore',
|
standalone: 'bitcore',
|
||||||
insertGlobals: true
|
insertGlobals: true
|
||||||
|
|||||||
@ -1174,6 +1174,7 @@ var lookup = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
|
|||||||
? Uint8Array
|
? Uint8Array
|
||||||
: Array
|
: Array
|
||||||
|
|
||||||
|
var ZERO = '0'.charCodeAt(0)
|
||||||
var PLUS = '+'.charCodeAt(0)
|
var PLUS = '+'.charCodeAt(0)
|
||||||
var SLASH = '/'.charCodeAt(0)
|
var SLASH = '/'.charCodeAt(0)
|
||||||
var NUMBER = '0'.charCodeAt(0)
|
var NUMBER = '0'.charCodeAt(0)
|
||||||
@ -1282,9 +1283,9 @@ var lookup = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
|
|||||||
return output
|
return output
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.toByteArray = b64ToByteArray
|
module.exports.toByteArray = b64ToByteArray
|
||||||
exports.fromByteArray = uint8ToBase64
|
module.exports.fromByteArray = uint8ToBase64
|
||||||
}(typeof exports === 'undefined' ? (this.base64js = {}) : exports))
|
}())
|
||||||
|
|
||||||
},{}],4:[function(require,module,exports){
|
},{}],4:[function(require,module,exports){
|
||||||
exports.read = function(buffer, offset, isLE, mLen, nBytes) {
|
exports.read = function(buffer, offset, isLE, mLen, nBytes) {
|
||||||
|
|||||||
@ -32,7 +32,7 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
var imports = require('soop').imports();
|
var imports = require('soop').imports();
|
||||||
var coinUtil = imports.coinUtil || require('../util');
|
var coinUtil = imports.coinUtil || require('../util');
|
||||||
var parent = imports.parent || require('../util/VersionedData');
|
var VersionedData = require('../util/VersionedData');
|
||||||
var networks = imports.networks || require('../networks');
|
var networks = imports.networks || require('../networks');
|
||||||
var Script = imports.Script || require('./Script');
|
var Script = imports.Script || require('./Script');
|
||||||
|
|
||||||
@ -42,8 +42,8 @@ function Address(version, hash) {
|
|||||||
Address.super(this, arguments);
|
Address.super(this, arguments);
|
||||||
}
|
}
|
||||||
|
|
||||||
Address.parent = parent;
|
Address.prototype = Object.create(VersionedData.prototype)
|
||||||
parent.applyEncodingsTo(Address);
|
VersionedData.applyEncodingsTo(Address);
|
||||||
|
|
||||||
// create a pubKeyHash address
|
// create a pubKeyHash address
|
||||||
Address.fromPubKey = function(pubKey, network) {
|
Address.fromPubKey = function(pubKey, network) {
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@ -62,8 +62,8 @@ function Connection(socket, peer, opts) {
|
|||||||
|
|
||||||
this.setupHandlers();
|
this.setupHandlers();
|
||||||
}
|
}
|
||||||
Connection.parent = imports.parent || require('events').EventEmitter;
|
var EventEmitter = require('events').EventEmitter;
|
||||||
|
Connection.prototype = Object.create(EventEmitter.prototype)
|
||||||
Connection.prototype.open = function(callback) {
|
Connection.prototype.open = function(callback) {
|
||||||
if (typeof callback === 'function') this.once('connect', callback);
|
if (typeof callback === 'function') this.once('connect', callback);
|
||||||
this.socket.connect(this.peer.port, this.peer.host);
|
this.socket.connect(this.peer.port, this.peer.host);
|
||||||
|
|||||||
@ -37,7 +37,8 @@ function PeerManager(config) {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
PeerManager.parent = imports.parent || require('events').EventEmitter;
|
var EventEmitter = require('events').EventEmitter;
|
||||||
|
PeerManager.prototype = Object.create(EventEmitter.prototype)
|
||||||
PeerManager.Connection = Connection;
|
PeerManager.Connection = Connection;
|
||||||
|
|
||||||
PeerManager.prototype.start = function() {
|
PeerManager.prototype.start = function() {
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
var imports = require('soop').imports();
|
var imports = require('soop').imports();
|
||||||
|
|
||||||
var parent = imports.parent || require('../util/VersionedData');
|
var VersionedData = require('../util/VersionedData');
|
||||||
var networks = imports.networks || require('../networks');
|
var networks = require('../networks');
|
||||||
|
|
||||||
//compressed is true if public key is compressed; false otherwise
|
//compressed is true if public key is compressed; false otherwise
|
||||||
function PrivateKey(version, buf, compressed) {
|
function PrivateKey(version, buf, compressed) {
|
||||||
@ -10,8 +10,8 @@ function PrivateKey(version, buf, compressed) {
|
|||||||
this.compressed(compressed);
|
this.compressed(compressed);
|
||||||
};
|
};
|
||||||
|
|
||||||
PrivateKey.parent = parent;
|
PrivateKey.prototype = Object.create(VersionedData.prototype)
|
||||||
parent.applyEncodingsTo(PrivateKey);
|
VersionedData.applyEncodingsTo(PrivateKey);
|
||||||
|
|
||||||
PrivateKey.prototype.validate = function() {
|
PrivateKey.prototype.validate = function() {
|
||||||
this.doAsBinary(function() {
|
this.doAsBinary(function() {
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
var imports = require('soop').imports();
|
var imports = require('soop').imports();
|
||||||
var parent = imports.parent || require('../util/VersionedData');
|
var VersionedData = require('../util/VersionedData');
|
||||||
|
|
||||||
function SIN(type, payload) {
|
function SIN(type, payload) {
|
||||||
if (typeof type != 'number') {
|
if (typeof type != 'number') {
|
||||||
@ -12,8 +12,9 @@ function SIN(type, payload) {
|
|||||||
this.type(type);
|
this.type(type);
|
||||||
this.payload(payload);
|
this.payload(payload);
|
||||||
};
|
};
|
||||||
SIN.parent = parent;
|
|
||||||
parent.applyEncodingsTo(SIN);
|
SIN.prototype = Object.create(VersionedData.prototype)
|
||||||
|
VersionedData.applyEncodingsTo(SIN);
|
||||||
|
|
||||||
SIN.SIN_PERSIST_MAINNET = 0x01; // associated with sacrifice TX
|
SIN.SIN_PERSIST_MAINNET = 0x01; // associated with sacrifice TX
|
||||||
SIN.SIN_PERSIST_TESTNET = 0x11; // associated with sacrifice TX
|
SIN.SIN_PERSIST_TESTNET = 0x11; // associated with sacrifice TX
|
||||||
|
|||||||
@ -63,7 +63,6 @@
|
|||||||
"commander": "~2.2.0",
|
"commander": "~2.2.0",
|
||||||
"mocha": ">=1.15.1",
|
"mocha": ">=1.15.1",
|
||||||
"sjcl": "=1.0.1",
|
"sjcl": "=1.0.1",
|
||||||
"soop": "=0.1.5",
|
|
||||||
"bindings": "=1.1.1",
|
"bindings": "=1.1.1",
|
||||||
"bufferput": "git://github.com/bitpay/node-bufferput.git",
|
"bufferput": "git://github.com/bitpay/node-bufferput.git",
|
||||||
"bignum": "=0.6.2",
|
"bignum": "=0.6.2",
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user