Advertisement
Guest User

Untitled

a guest
Dec 12th, 2017
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. $compressed_public_key = "12CLR6mkJMqhAoyuAsbjmgo6RuVc99dM76";
  2. $public_key_sha256 = hash('sha256', $compressed_public_key);
  3. $ripemd160_of_sha256 = hash('ripemd160',$public_key_sha256);
  4. $redeemScript = "0014".$ripemd160_of_sha256;
  5. $sha256_of_redeemScript = hash('sha256', $redeemScript);
  6. $ripemd160_of_redeemScript = hash('ripemd160',$sha256_of_redeemScript);
  7. $segwitAddress = base58_encode_with_prefix_and_checksum(0x05, $ripemd160_of_redeemScript);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement