Browse Source

scripts: re-add constrained hash types to *HashOutput

hk-custom-address
Daniel Cousens 10 years ago
parent
commit
b933c6da44
  1. 4
      src/scripts.js

4
src/scripts.js

@ -306,14 +306,14 @@ function pubKeyOutput (pubKey) {
// OP_DUP OP_HASH160 {pubKeyHash} OP_EQUALVERIFY OP_CHECKSIG // OP_DUP OP_HASH160 {pubKeyHash} OP_EQUALVERIFY OP_CHECKSIG
function pubKeyHashOutput (pubKeyHash) { function pubKeyHashOutput (pubKeyHash) {
typeforce(typeforce.Buffer, pubKeyHash) typeforce(types.Hash160bit, pubKeyHash)
return compile([OPS.OP_DUP, OPS.OP_HASH160, pubKeyHash, OPS.OP_EQUALVERIFY, OPS.OP_CHECKSIG]) return compile([OPS.OP_DUP, OPS.OP_HASH160, pubKeyHash, OPS.OP_EQUALVERIFY, OPS.OP_CHECKSIG])
} }
// OP_HASH160 {scriptHash} OP_EQUAL // OP_HASH160 {scriptHash} OP_EQUAL
function scriptHashOutput (scriptHash) { function scriptHashOutput (scriptHash) {
typeforce(typeforce.Buffer, scriptHash) typeforce(types.Hash160bit, scriptHash)
return compile([OPS.OP_HASH160, scriptHash, OPS.OP_EQUAL]) return compile([OPS.OP_HASH160, scriptHash, OPS.OP_EQUAL])
} }

Loading…
Cancel
Save