|
|
@ -252,24 +252,36 @@ describe('Script', function() { |
|
|
|
}); |
|
|
|
|
|
|
|
describe('#isMultisigOut', function() { |
|
|
|
it('should classify known multisig out 1 as multisig out', function() { |
|
|
|
it('should classify known multisig out 1', function() { |
|
|
|
Script('OP_2 21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 OP_2 OP_CHECKMULTISIG').isMultisigOut().should.equal(true); |
|
|
|
}); |
|
|
|
it('should classify known multisig out 2 as multisig out', function() { |
|
|
|
it('should classify known multisig out 2', function() { |
|
|
|
Script('OP_1 21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 OP_2 OP_CHECKMULTISIG').isMultisigOut().should.equal(true); |
|
|
|
}); |
|
|
|
it('should classify known multisig out 3 as multisig out', function() { |
|
|
|
it('should classify known multisig out 3', function() { |
|
|
|
Script('OP_2 21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 21 0x03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640 OP_3 OP_CHECKMULTISIG').isMultisigOut().should.equal(true); |
|
|
|
}); |
|
|
|
|
|
|
|
it('should classify non-multisig out 1 as non-multisig out', function() { |
|
|
|
it('should classify non-multisig out 1', function() { |
|
|
|
Script('OP_2 21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 OP_2 OP_CHECKMULTISIG OP_EQUAL').isMultisigOut().should.equal(false); |
|
|
|
}); |
|
|
|
it('should classify non-multisig out 2 as non-multisig out', function() { |
|
|
|
it('should classify non-multisig out 2', function() { |
|
|
|
Script('OP_2').isMultisigOut().should.equal(false); |
|
|
|
}); |
|
|
|
it('should classify non-multisig out 3 as non-multisig out', function() { |
|
|
|
Script('OP_2 OP_2 21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 OP_2 OP_CHECKMULTISIG OP_EQUAL').isMultisigOut().should.equal(false); |
|
|
|
}); |
|
|
|
|
|
|
|
describe('#isMultisigIn', function() { |
|
|
|
it('should classify multisig in 1', function() { |
|
|
|
Script('OP_0 0x47 0x3044022002a27769ee33db258bdf7a3792e7da4143ec4001b551f73e6a190b8d1bde449d02206742c56ccd94a7a2e16ca52fc1ae4a0aa122b0014a867a80de104f9cb18e472c01').isMultisigIn().should.equal(true); |
|
|
|
}); |
|
|
|
it('should classify multisig in 2', function() { |
|
|
|
Script('OP_0 0x47 0x3044022002a27769ee33db258bdf7a3792e7da4143ec4001b551f73e6a190b8d1bde449d02206742c56ccd94a7a2e16ca52fc1ae4a0aa122b0014a867a80de104f9cb18e472c01 0x47 30450220357011fd3b3ad2b8f2f2d01e05dc6108b51d2a245b4ef40c112d6004596f0475022100a8208c93a39e0c366b983f9a80bfaf89237fcd64ca543568badd2d18ee2e1d7501').isMultisigIn().should.equal(true); |
|
|
|
}); |
|
|
|
it('should classify non-multisig in 1', function() { |
|
|
|
Script('0x47 0x3044022002a27769ee33db258bdf7a3792e7da4143ec4001b551f73e6a190b8d1bde449d02206742c56ccd94a7a2e16ca52fc1ae4a0aa122b0014a867a80de104f9cb18e472c01').isMultisigIn().should.equal(false); |
|
|
|
}); |
|
|
|
it('should classify non-multisig in 2', function() { |
|
|
|
Script('OP_0 0x47 0x3044022002a27769ee33db258bdf7a3792e7da4143ec4001b551f73e6a190b8d1bde449d02206742c56ccd94a7a2e16ca52fc1ae4a0aa122b0014a867a80de104f9cb18e472c01 OP_0').isMultisigIn().should.equal(false); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|