Bitcoin Script


SUBMITTED BY: bitminter

DATE: Sept. 14, 2016, 10:24 a.m.

FORMAT: Text only

SIZE: 301 Bytes

HITS: 4546

  1. // create a new p2pkh paying to a specific address
  2. var address = Address.fromString('1NaTVwXDDUJaXDQajoa9MqHhz4uTxtgK14');
  3. var script = Script.buildPublicKeyHashOut(address);
  4. assert(script.toString() === 'OP_DUP OP_HASH160 20 0xecae7d092947b7ee4998e254aa48900d26d2ce1d OP_EQUALVERIFY OP_CHECKSIG');

comments powered by Disqus