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);
|
||||
};
|
||||
|
||||
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 = [
|
||||
'lib/Address',
|
||||
'lib/Armory',
|
||||
|
@ -106,7 +95,6 @@ var createBitcore = function(opts) {
|
|||
}
|
||||
|
||||
var bopts = {
|
||||
pack: pack,
|
||||
debug: true,
|
||||
standalone: 'bitcore',
|
||||
insertGlobals: true
|
||||
|
|
|
@ -1174,6 +1174,7 @@ var lookup = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
|
|||
? Uint8Array
|
||||
: Array
|
||||
|
||||
var ZERO = '0'.charCodeAt(0)
|
||||
var PLUS = '+'.charCodeAt(0)
|
||||
var SLASH = '/'.charCodeAt(0)
|
||||
var NUMBER = '0'.charCodeAt(0)
|
||||
|
@ -1282,9 +1283,9 @@ var lookup = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
|
|||
return output
|
||||
}
|
||||
|
||||
exports.toByteArray = b64ToByteArray
|
||||
exports.fromByteArray = uint8ToBase64
|
||||
}(typeof exports === 'undefined' ? (this.base64js = {}) : exports))
|
||||
module.exports.toByteArray = b64ToByteArray
|
||||
module.exports.fromByteArray = uint8ToBase64
|
||||
}())
|
||||
|
||||
},{}],4:[function(require,module,exports){
|
||||
exports.read = function(buffer, offset, isLE, mLen, nBytes) {
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
'use strict';
|
||||
var imports = require('soop').imports();
|
||||
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 Script = imports.Script || require('./Script');
|
||||
|
||||
|
@ -42,8 +42,8 @@ function Address(version, hash) {
|
|||
Address.super(this, arguments);
|
||||
}
|
||||
|
||||
Address.parent = parent;
|
||||
parent.applyEncodingsTo(Address);
|
||||
Address.prototype = Object.create(VersionedData.prototype)
|
||||
VersionedData.applyEncodingsTo(Address);
|
||||
|
||||
// create a pubKeyHash address
|
||||
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();
|
||||
}
|
||||
Connection.parent = imports.parent || require('events').EventEmitter;
|
||||
|
||||
var EventEmitter = require('events').EventEmitter;
|
||||
Connection.prototype = Object.create(EventEmitter.prototype)
|
||||
Connection.prototype.open = function(callback) {
|
||||
if (typeof callback === 'function') this.once('connect', callback);
|
||||
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.prototype.start = function() {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
var imports = require('soop').imports();
|
||||
|
||||
var parent = imports.parent || require('../util/VersionedData');
|
||||
var networks = imports.networks || require('../networks');
|
||||
var VersionedData = require('../util/VersionedData');
|
||||
var networks = require('../networks');
|
||||
|
||||
//compressed is true if public key is compressed; false otherwise
|
||||
function PrivateKey(version, buf, compressed) {
|
||||
|
@ -10,8 +10,8 @@ function PrivateKey(version, buf, compressed) {
|
|||
this.compressed(compressed);
|
||||
};
|
||||
|
||||
PrivateKey.parent = parent;
|
||||
parent.applyEncodingsTo(PrivateKey);
|
||||
PrivateKey.prototype = Object.create(VersionedData.prototype)
|
||||
VersionedData.applyEncodingsTo(PrivateKey);
|
||||
|
||||
PrivateKey.prototype.validate = function() {
|
||||
this.doAsBinary(function() {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
var imports = require('soop').imports();
|
||||
var parent = imports.parent || require('../util/VersionedData');
|
||||
var VersionedData = require('../util/VersionedData');
|
||||
|
||||
function SIN(type, payload) {
|
||||
if (typeof type != 'number') {
|
||||
|
@ -12,8 +12,9 @@ function SIN(type, payload) {
|
|||
this.type(type);
|
||||
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_TESTNET = 0x11; // associated with sacrifice TX
|
||||
|
|
|
@ -63,7 +63,6 @@
|
|||
"commander": "~2.2.0",
|
||||
"mocha": ">=1.15.1",
|
||||
"sjcl": "=1.0.1",
|
||||
"soop": "=0.1.5",
|
||||
"bindings": "=1.1.1",
|
||||
"bufferput": "git://github.com/bitpay/node-bufferput.git",
|
||||
"bignum": "=0.6.2",
|
||||
|
|
Loading…
Reference in New Issue