Add methods to decode information from output scripts

This commit is contained in:
Thomas Kerin 2016-11-01 16:06:01 +01:00 committed by Daniel Cousens
parent 53f08a7569
commit 27b48e8aa2
5 changed files with 252 additions and 82 deletions

View file

@ -10,7 +10,16 @@ var fixtures = require('./fixtures/script.json')
describe('script', function () {
// TODO
describe.skip('isCanonicalPubKey', function () {})
describe('isCanonicalPubKey', function () {
it('rejects if not provided a Buffer', function () {
assert.strictEqual(false, bscript.isCanonicalPubKey(0))
})
it('rejects smaller than 33', function () {
for (var i = 0; i < 33; i++) {
assert.strictEqual(false, bscript.isCanonicalPubKey(new Buffer('', i)))
}
})
})
describe.skip('isCanonicalSignature', function () {})
describe('fromASM/toASM', function () {