types: remove ECCurve
This commit is contained in:
parent
752cf4b6c1
commit
b252924517
2 changed files with 8 additions and 6 deletions
|
@ -23,7 +23,6 @@ function UInt53 (value) {
|
||||||
|
|
||||||
// external dependent types
|
// external dependent types
|
||||||
var BigInt = typeforce.quacksLike('BigInteger')
|
var BigInt = typeforce.quacksLike('BigInteger')
|
||||||
var ECCurve = typeforce.quacksLike('Curve')
|
|
||||||
var ECPoint = typeforce.quacksLike('Point')
|
var ECPoint = typeforce.quacksLike('Point')
|
||||||
|
|
||||||
// exposed, external API
|
// exposed, external API
|
||||||
|
@ -44,7 +43,6 @@ var Network = typeforce.compile({
|
||||||
var types = {
|
var types = {
|
||||||
BigInt: BigInt,
|
BigInt: BigInt,
|
||||||
Buffer256bit: Buffer256bit,
|
Buffer256bit: Buffer256bit,
|
||||||
ECCurve: ECCurve,
|
|
||||||
ECPoint: ECPoint,
|
ECPoint: ECPoint,
|
||||||
ECSignature: ECSignature,
|
ECSignature: ECSignature,
|
||||||
Hash160bit: Hash160bit,
|
Hash160bit: Hash160bit,
|
||||||
|
|
|
@ -4,11 +4,15 @@ var assert = require('assert')
|
||||||
var types = require('../src/types')
|
var types = require('../src/types')
|
||||||
|
|
||||||
describe('types', function () {
|
describe('types', function () {
|
||||||
describe('ECCurve/ECPoint/BigInt', function () {
|
describe('BigInt/ECPoint', function () {
|
||||||
it('return true for duck types', function () {
|
it('return true for duck types', function () {
|
||||||
assert(types.quacksLike('BigInteger', function BigInteger () {}))
|
assert(types.BigInt(new function BigInteger () {}))
|
||||||
assert(types.quacksLike('Curve', function Curve () {}))
|
assert(types.ECPoint(new function Point () {}))
|
||||||
assert(types.quacksLike('Point', function Point () {}))
|
})
|
||||||
|
|
||||||
|
it('return false for bad types', function () {
|
||||||
|
assert(!types.BigInt(new function NotABigInteger () {}))
|
||||||
|
assert(!types.ECPoint(new function NotAPoint () {}))
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
Loading…
Add table
Reference in a new issue