diff --git a/src/types.js b/src/types.js index 9ee5c6f..038d9b3 100644 --- a/src/types.js +++ b/src/types.js @@ -23,7 +23,6 @@ function UInt53 (value) { // external dependent types var BigInt = typeforce.quacksLike('BigInteger') -var ECCurve = typeforce.quacksLike('Curve') var ECPoint = typeforce.quacksLike('Point') // exposed, external API @@ -44,7 +43,6 @@ var Network = typeforce.compile({ var types = { BigInt: BigInt, Buffer256bit: Buffer256bit, - ECCurve: ECCurve, ECPoint: ECPoint, ECSignature: ECSignature, Hash160bit: Hash160bit, diff --git a/test/types.js b/test/types.js index 9691d53..9556927 100644 --- a/test/types.js +++ b/test/types.js @@ -4,11 +4,15 @@ var assert = require('assert') var types = require('../src/types') describe('types', function () { - describe('ECCurve/ECPoint/BigInt', function () { + describe('BigInt/ECPoint', function () { it('return true for duck types', function () { - assert(types.quacksLike('BigInteger', function BigInteger () {})) - assert(types.quacksLike('Curve', function Curve () {})) - assert(types.quacksLike('Point', function Point () {})) + assert(types.BigInt(new function BigInteger () {})) + assert(types.ECPoint(new function Point () {})) + }) + + it('return false for bad types', function () { + assert(!types.BigInt(new function NotABigInteger () {})) + assert(!types.ECPoint(new function NotAPoint () {})) }) }) })