Browse Source
Conflicts: Script.js ScriptInterpreter.js Transaction.js test/testdata.js ...conflicts resolved by taking Manuel's changes, and then manually including Matias's changes on those same files. The conflicts resulted from differences in indentation, which is because Matias' changes unindendented all the code that had been but is not now inside a function.patch-2
Ryan X. Charles
11 years ago
55 changed files with 4665 additions and 4592 deletions
@ -0,0 +1,6 @@ |
|||
require('bignum').config({ |
|||
EXPONENTIAL_AT: 9999999, |
|||
DECIMAL_PLACES: 0, |
|||
ROUNDING_MODE: 1, |
|||
}); |
|||
|
@ -0,0 +1,88 @@ |
|||
'use strict'; |
|||
|
|||
/* |
|||
* Example for usage of browserify with soop |
|||
* |
|||
* The key parameter 'pack' |
|||
* The supplied 'custom_prelude.js' file is needed for |
|||
* .load function of soop. |
|||
*/ |
|||
|
|||
var fs = require('fs'); |
|||
var browserify = require('browserify'); |
|||
var browserPack = require('browser-pack'); |
|||
var opts = {}; |
|||
|
|||
|
|||
var preludePath = 'node_modules/soop/example/custom_prelude.js'; |
|||
|
|||
var pack = function (params) { |
|||
params.raw = true; |
|||
params.sourceMapPrefix = '//#'; |
|||
params.prelude= fs.readFileSync(preludePath, 'utf8'); |
|||
params.preludePath= preludePath; |
|||
return browserPack(params); |
|||
}; |
|||
|
|||
opts.pack = pack; |
|||
opts.debug = true; |
|||
|
|||
var modules = [ |
|||
'Address', |
|||
'Block', |
|||
'Bloom', |
|||
'Buffers.monkey', |
|||
'Connection', |
|||
'Deserialize', |
|||
'Gruntfile', |
|||
'Number.monkey', |
|||
'Opcode', |
|||
'Peer', |
|||
'PeerManager', |
|||
'PrivateKey', |
|||
'RpcClient', |
|||
'SIN', |
|||
'SINKey', |
|||
'Script', |
|||
'ScriptInterpreter', |
|||
'Sign', |
|||
'Transaction', |
|||
'Wallet', |
|||
'WalletKey', |
|||
'config', |
|||
'const', |
|||
'networks', |
|||
'bitcore', |
|||
]; |
|||
|
|||
var b = browserify(opts); |
|||
b.require('browserify-bignum/bignumber.js', {expose: 'bignum'} ); |
|||
b.require('browserify-buffertools/buffertools.js', {expose:'buffertools'}); |
|||
b.require('buffer', {expose: 'buffer'}); |
|||
b.require('base58-native'); |
|||
b.require('./Key.js', {expose: 'KeyModule'}); |
|||
b.require('./util/log'); |
|||
b.require('./util/util'); |
|||
b.require('./util/EncodedData'); |
|||
b.require('./util/VersionedData'); |
|||
b.add('./browser/bignum_config.js'); |
|||
|
|||
modules.forEach(function(m) { |
|||
b.require('./' + m + '.js' ,{expose:m} ); |
|||
}); |
|||
|
|||
var bopts = { |
|||
// detectGlobals: true,
|
|||
// insertGlobals: 'Buffer',
|
|||
// insertGlobalVars: {
|
|||
// Buffer: function () {
|
|||
// return 'require("buffer").Buffer';
|
|||
// },
|
|||
// },
|
|||
}; |
|||
|
|||
b.bundle(bopts).pipe(process.stdout); |
|||
|
|||
|
|||
|
|||
|
Loading…
Reference in new issue