move Signature to crypto/
This commit is contained in:
parent
9e34dfe3dd
commit
1f3d7d9872
2
index.js
2
index.js
|
@ -8,6 +8,7 @@ bitcore.crypto.ECDSA = require('./lib/crypto/ecdsa');
|
||||||
bitcore.crypto.Hash = require('./lib/crypto/hash');
|
bitcore.crypto.Hash = require('./lib/crypto/hash');
|
||||||
bitcore.crypto.Random = require('./lib/crypto/random');
|
bitcore.crypto.Random = require('./lib/crypto/random');
|
||||||
bitcore.crypto.Point = require('./lib/crypto/point');
|
bitcore.crypto.Point = require('./lib/crypto/point');
|
||||||
|
bitcore.crypto.Signature = require('./lib/crypto/signature');
|
||||||
|
|
||||||
// encoding
|
// encoding
|
||||||
bitcore.encoding = {};
|
bitcore.encoding = {};
|
||||||
|
@ -27,7 +28,6 @@ bitcore.Opcode = require('./lib/opcode');
|
||||||
bitcore.PrivateKey = require('./lib/privatekey');
|
bitcore.PrivateKey = require('./lib/privatekey');
|
||||||
bitcore.PublicKey = require('./lib/publickey');
|
bitcore.PublicKey = require('./lib/publickey');
|
||||||
bitcore.Script = require('./lib/script');
|
bitcore.Script = require('./lib/script');
|
||||||
bitcore.Signature = require('./lib/signature');
|
|
||||||
bitcore.Transaction = require('./lib/transaction');
|
bitcore.Transaction = require('./lib/transaction');
|
||||||
bitcore.Txin = require('./lib/txin');
|
bitcore.Txin = require('./lib/txin');
|
||||||
bitcore.Txout = require('./lib/txout');
|
bitcore.Txout = require('./lib/txout');
|
||||||
|
|
|
@ -2,16 +2,18 @@
|
||||||
|
|
||||||
var BN = require('./bn');
|
var BN = require('./bn');
|
||||||
var Point = require('./point');
|
var Point = require('./point');
|
||||||
|
var Signature = require('./signature');
|
||||||
var Random = require('./random');
|
var Random = require('./random');
|
||||||
var PublicKey = require('../publickey');
|
var PublicKey = require('../publickey');
|
||||||
var PrivateKey = require('../privatekey');
|
var PrivateKey = require('../privatekey');
|
||||||
var Signature = require('../signature');
|
|
||||||
|
|
||||||
var ECDSA = function ECDSA(obj) {
|
var ECDSA = function ECDSA(obj) {
|
||||||
if (!(this instanceof ECDSA))
|
if (!(this instanceof ECDSA)) {
|
||||||
return new ECDSA(obj);
|
return new ECDSA(obj);
|
||||||
if (obj)
|
}
|
||||||
|
if (obj) {
|
||||||
this.set(obj);
|
this.set(obj);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
ECDSA.prototype.set = function(obj) {
|
ECDSA.prototype.set = function(obj) {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
var BN = require('./crypto/bn');
|
var BN = require('./bn');
|
||||||
|
|
||||||
var Signature = function Signature(r, s) {
|
var Signature = function Signature(r, s) {
|
||||||
if (!(this instanceof Signature))
|
if (!(this instanceof Signature))
|
|
@ -4,9 +4,9 @@ var should = require('chai').should();
|
||||||
var bitcore = require('../..');
|
var bitcore = require('../..');
|
||||||
var ECDSA = bitcore.crypto.ECDSA;
|
var ECDSA = bitcore.crypto.ECDSA;
|
||||||
var Hash = bitcore.crypto.Hash;
|
var Hash = bitcore.crypto.Hash;
|
||||||
|
var Signature = bitcore.crypto.Signature;
|
||||||
var PrivateKey = bitcore.PrivateKey;
|
var PrivateKey = bitcore.PrivateKey;
|
||||||
var PublicKey = bitcore.PublicKey;
|
var PublicKey = bitcore.PublicKey;
|
||||||
var Signature = bitcore.Signature;
|
|
||||||
var BN = bitcore.crypto.BN;
|
var BN = bitcore.crypto.BN;
|
||||||
|
|
||||||
describe('ECDSA', function() {
|
describe('ECDSA', function() {
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
var should = require('chai').should();
|
var should = require('chai').should();
|
||||||
var bitcore = require('..');
|
var bitcore = require('../..');
|
||||||
var BN = bitcore.crypto.BN;
|
var BN = bitcore.crypto.BN;
|
||||||
var Signature = bitcore.Signature;
|
var Signature = bitcore.crypto.Signature;
|
||||||
|
|
||||||
describe('Signature', function() {
|
describe('Signature', function() {
|
||||||
|
|
Loading…
Reference in New Issue