Zcash-ify
This commit is contained in:
parent
764aa6d4e9
commit
bc8e5f4121
11
bower.json
11
bower.json
|
@ -1,17 +1,18 @@
|
|||
{
|
||||
"name": "bitcore-lib",
|
||||
"main": "./bitcore-lib.min.js",
|
||||
"name": "bitcore-lib-zcash",
|
||||
"main": "./bitcore-lib-zcash.min.js",
|
||||
"version": "0.13.19",
|
||||
"homepage": "http://bitcore.io",
|
||||
"authors": [
|
||||
"BitPay, Inc."
|
||||
"BitPay, Inc.",
|
||||
"Jack Grigg"
|
||||
],
|
||||
"description": "A pure, powerful core for your bitcoin project.",
|
||||
"description": "A pure, powerful core for your zcash project.",
|
||||
"moduleType": [
|
||||
"globals"
|
||||
],
|
||||
"keywords": [
|
||||
"bitcoin",
|
||||
"zcash",
|
||||
"bitcore",
|
||||
"btc",
|
||||
"satoshi"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
|
||||
var bitcoreTasks = require('bitcore-build');
|
||||
var bitcoreTasks = require('bitcore-build-zcash');
|
||||
|
||||
bitcoreTasks('lib');
|
||||
|
|
6
index.js
6
index.js
|
@ -6,9 +6,9 @@ var bitcore = module.exports;
|
|||
bitcore.version = 'v' + require('./package.json').version;
|
||||
bitcore.versionGuard = function(version) {
|
||||
if (version !== undefined) {
|
||||
var message = 'More than one instance of bitcore-lib found. ' +
|
||||
'Please make sure to require bitcore-lib and check that submodules do' +
|
||||
' not also include their own bitcore-lib dependency.';
|
||||
var message = 'More than one instance of bitcore-lib-zcash found. ' +
|
||||
'Please make sure to require bitcore-lib-zcash and check that submodules do' +
|
||||
' not also include their own bitcore-lib-zcash dependency.';
|
||||
throw new Error(message);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -110,8 +110,8 @@ URI.isValid = function(arg, knownParams) {
|
|||
URI.parse = function(uri) {
|
||||
var info = URL.parse(uri, true);
|
||||
|
||||
if (info.protocol !== 'bitcoin:') {
|
||||
throw new TypeError('Invalid bitcoin URI');
|
||||
if (info.protocol !== 'zcash:') {
|
||||
throw new TypeError('Invalid zcash URI');
|
||||
}
|
||||
|
||||
// workaround to host insensitiveness
|
||||
|
@ -135,7 +135,7 @@ URI.prototype._fromObject = function(obj) {
|
|||
/* jshint maxcomplexity: 10 */
|
||||
|
||||
if (!Address.isValid(obj.address)) {
|
||||
throw new TypeError('Invalid bitcoin address');
|
||||
throw new TypeError('Invalid zcash address');
|
||||
}
|
||||
|
||||
this.address = new Address(obj.address);
|
||||
|
@ -205,7 +205,7 @@ URI.prototype.toString = function() {
|
|||
_.extend(query, this.extras);
|
||||
|
||||
return URL.format({
|
||||
protocol: 'bitcoin:',
|
||||
protocol: 'zcash:',
|
||||
host: this.address,
|
||||
query: query
|
||||
});
|
||||
|
|
14
package.json
14
package.json
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "bitcore-lib",
|
||||
"name": "bitcore-lib-zcash",
|
||||
"version": "0.13.19",
|
||||
"description": "A pure and powerful JavaScript Bitcoin library.",
|
||||
"description": "A pure and powerful JavaScript Zcash library.",
|
||||
"author": "BitPay <dev@bitpay.com>",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
@ -54,10 +54,14 @@
|
|||
{
|
||||
"name": "Wei Lu",
|
||||
"email": "luwei.here@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "Jack Grigg",
|
||||
"email": "jack@z.cash"
|
||||
}
|
||||
],
|
||||
"keywords": [
|
||||
"bitcoin",
|
||||
"zcash",
|
||||
"transaction",
|
||||
"address",
|
||||
"p2p",
|
||||
|
@ -74,7 +78,7 @@
|
|||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/bitpay/bitcore-lib.git"
|
||||
"url": "https://github.com/str4d/bitcore-lib-zcash.git"
|
||||
},
|
||||
"browser": {
|
||||
"request": "browser-request"
|
||||
|
@ -88,7 +92,7 @@
|
|||
"lodash": "=3.10.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"bitcore-build": "bitpay/bitcore-build",
|
||||
"bitcore-build-zcash": "str4d/bitcore-build-zcash",
|
||||
"brfs": "^1.2.0",
|
||||
"chai": "^1.10.0",
|
||||
"gulp": "^3.8.10",
|
||||
|
|
|
@ -4,11 +4,11 @@
|
|||
<title>Mocha</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="stylesheet" href="../node_modules/bitcore-build/node_modules/mocha/mocha.css" />
|
||||
<link rel="stylesheet" href="../node_modules/bitcore-build-zcash/node_modules/mocha/mocha.css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="mocha"></div>
|
||||
<script src="../node_modules/bitcore-build/node_modules/mocha/mocha.js"></script>
|
||||
<script src="../node_modules/bitcore-build-zcash/node_modules/mocha/mocha.js"></script>
|
||||
<script>mocha.setup('bdd')</script>
|
||||
<script src="../tests.js"></script>
|
||||
<script>
|
||||
|
|
Loading…
Reference in New Issue