Skip to content

Commit

Permalink
add tests for hash160ToAddress
Browse files Browse the repository at this point in the history
  • Loading branch information
fluency03 committed May 12, 2018
1 parent 8d7620e commit 7c62187
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,18 @@ class Secp256k1Test extends FlatSpec with Matchers {
"4A2541129368D7D9BB05CD8AFBDF7705A6540D98028236965553F91BF1C5B4F70073F55B55D").address shouldEqual
"1DU8Hi1sbHTpEP9vViBEkEw6noeUrgKkJH"

Secp256k1.hash160ToAddress("45590A0195EB451711B9D076E4C0CD04675AAD55") shouldEqual
"17KgHnGbu49vhav3ck7tjnBm9Lk9tpeLhX"

Secp256k1.hash160ToAddress("88C2D2FA846282C870A76CADECBE45C4ACD72BB6") shouldEqual
"1DU8Hi1sbHTpEP9vViBEkEw6noeUrgKkJH"

Secp256k1.addressToHash160("1DU8Hi1sbHTpEP9vViBEkEw6noeUrgKkJH") shouldEqual
("00", "88C2D2FA846282C870A76CADECBE45C4ACD72BB6".toLowerCase)

Secp256k1.addressToHash160("17KgHnGbu49vhav3ck7tjnBm9Lk9tpeLhX") shouldEqual
("00", "45590A0195EB451711B9D076E4C0CD04675AAD55".toLowerCase)

Secp256k1.privateKeyToBytes(pair.getPrivate).toBigInt shouldEqual Secp256k1.privateKeyToHex(pair.getPrivate).hex2BigInt

}
Expand Down

0 comments on commit 7c62187

Please sign in to comment.