-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
261 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
'use strict'; | ||
|
||
var chai = require('chai'); | ||
var bitcore = require('../bitcore'); | ||
|
||
var should = chai.should(); | ||
|
||
var Key = bitcore.Key; | ||
|
||
describe.skip('Key', function() { | ||
it('should initialze the main object', function() { | ||
should.exist(Key); | ||
}); | ||
it('should be able to create instance', function() { | ||
var k = new Key(); | ||
should.exist(k); | ||
}); | ||
}); | ||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
'use strict'; | ||
|
||
var chai = require('chai'); | ||
var bitcore = require('../bitcore'); | ||
|
||
var should = chai.should(); | ||
|
||
var PeerManagerModule = bitcore.PeerManager; | ||
var PeerManager; | ||
|
||
describe('PeerManager', function() { | ||
it('should initialze the main object', function() { | ||
should.exist(PeerManagerModule); | ||
}); | ||
it('should be able to create class', function() { | ||
PeerManager = PeerManagerModule.class(); | ||
should.exist(PeerManager); | ||
}); | ||
it('should be able to create instance', function() { | ||
var pm = new PeerManager(); | ||
should.exist(pm); | ||
}); | ||
it('should be able to start instance', function() { | ||
var pm = new PeerManager(); | ||
pm.start.bind(pm).should.not.throw(); | ||
}); | ||
it('should be able to stop instance', function() { | ||
var pm = new PeerManager(); | ||
pm.start(); | ||
pm.stop.bind(pm).should.not.throw(); | ||
}); | ||
}); | ||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
'use strict'; | ||
|
||
var chai = require('chai'); | ||
var bitcore = require('../bitcore'); | ||
|
||
var should = chai.should(); | ||
|
||
var PrivateKeyModule = bitcore.PrivateKey; | ||
var PrivateKey; | ||
|
||
describe('PrivateKey', function() { | ||
it('should initialze the main object', function() { | ||
should.exist(PrivateKeyModule); | ||
}); | ||
it('should be able to create class', function() { | ||
PrivateKey = PrivateKeyModule.class(); | ||
should.exist(PrivateKey); | ||
}); | ||
it('should be able to create instance', function() { | ||
var pk = new PrivateKey(); | ||
should.exist(pk); | ||
}); | ||
}); | ||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
'use strict'; | ||
|
||
var chai = require('chai'); | ||
var bitcore = require('../bitcore'); | ||
|
||
var should = chai.should(); | ||
|
||
var RpcClientModule = bitcore.RpcClient; | ||
var RpcClient; | ||
RpcClient = RpcClientModule.class(); | ||
|
||
describe('RpcClient', function() { | ||
it('should initialze the main object', function() { | ||
should.exist(RpcClientModule); | ||
}); | ||
it('should be able to create class', function() { | ||
should.exist(RpcClient); | ||
}); | ||
it('should be able to create instance', function() { | ||
var s = new RpcClient(); | ||
should.exist(s); | ||
}); | ||
}); | ||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,28 @@ | ||
'use strict'; | ||
|
||
|
||
|
||
var chai = require('chai'); | ||
var bitcore = require('../bitcore'); | ||
|
||
var should = chai.should(); | ||
|
||
var SINKeyModule = bitcore.SINKey; | ||
var SINKey; | ||
var SINModule = bitcore.SIN; | ||
var SIN; | ||
|
||
|
||
describe('SINKey', function() { | ||
describe('SIN', function() { | ||
it('should initialze the main object', function() { | ||
should.exist(SINKeyModule); | ||
should.exist(SINModule); | ||
}); | ||
it('should be able to create class', function() { | ||
SINKey = SINKeyModule.class(); | ||
should.exist(SINKey); | ||
SIN = SINModule.class(); | ||
should.exist(SIN); | ||
}); | ||
it('should be able to create instance', function() { | ||
var sk = new SINKey(); | ||
sk.generate(); | ||
should.exist(sk.created); | ||
should.exist(sk.privKey.private); | ||
should.exist(sk.privKey.public); | ||
should.exist(sk.privKey.compressed); | ||
var s = new SIN(); | ||
should.exist(s); | ||
}); | ||
}); | ||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
'use strict'; | ||
|
||
|
||
|
||
var chai = require('chai'); | ||
var bitcore = require('../bitcore'); | ||
|
||
var should = chai.should(); | ||
|
||
var SINKeyModule = bitcore.SINKey; | ||
var SINKey; | ||
|
||
|
||
describe('SINKey', function() { | ||
it('should initialze the main object', function() { | ||
should.exist(SINKeyModule); | ||
}); | ||
it('should be able to create class', function() { | ||
SINKey = SINKeyModule.class(); | ||
should.exist(SINKey); | ||
}); | ||
it('should be able to create instance', function() { | ||
var sk = new SINKey(); | ||
sk.generate(); | ||
should.exist(sk.created); | ||
should.exist(sk.privKey.private); | ||
should.exist(sk.privKey.public); | ||
should.exist(sk.privKey.compressed); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
'use strict'; | ||
|
||
var chai = require('chai'); | ||
var bitcore = require('../bitcore'); | ||
|
||
var should = chai.should(); | ||
|
||
var WalletModule = bitcore.Wallet; | ||
var Wallet; | ||
|
||
describe('Wallet', function() { | ||
it('should initialze the main object', function() { | ||
should.exist(WalletModule); | ||
}); | ||
it('should be able to create class', function() { | ||
Wallet = WalletModule.class(); | ||
should.exist(Wallet); | ||
}); | ||
it('should be able to create instance', function() { | ||
var s = new Wallet(); | ||
should.exist(s); | ||
}); | ||
}); | ||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
'use strict'; | ||
|
||
var chai = require('chai'); | ||
var bitcore = require('../bitcore'); | ||
|
||
var should = chai.should(); | ||
|
||
var WalletKeyModule = bitcore.WalletKey; | ||
var networks = bitcore.networks; | ||
var WalletKey; | ||
|
||
describe('WalletKey', function() { | ||
it('should initialze the main object', function() { | ||
should.exist(WalletKeyModule); | ||
}); | ||
it('should be able to create class', function() { | ||
WalletKey = WalletKeyModule.class(); | ||
should.exist(WalletKey); | ||
}); | ||
it('should be able to create instance', function() { | ||
var s = new WalletKey({ | ||
network: networks.livenet | ||
}); | ||
should.exist(s); | ||
}); | ||
}); | ||
|
||
|
||
|
||
|
||
|