def test_keys(self): seed = Seed("adjust mugged vaults atlas nasty mews damp toenail suddenly toxic possible "\ "framed succeed fuzzy return demonstrate nucleus album noises peculiar virtual "\ "rowboat inorganic jester fuzzy") self.assertFalse(seed.is_mymonero()) self.assertEqual( seed.secret_spend_key(), '482700617ba810f94035d7f4d7ccc1a29878e165b4867872b705204c85406906') self.assertEqual( seed.secret_view_key(), '09ed72c713d3e9e19bef2f5204cf85f6cb25de7842aa0722abeb12697f171903') self.assertEqual( seed.public_spend_key(), '4ee576f52b9c6a824a3d5c2832d117177d2bb9992507c2c78788bb8dbaf4b640') self.assertEqual( seed.public_view_key(), 'e1ef99d66312ec0b16b17c66c591ab59594e21621588b63b62fa69fe615a768e') self.assertEqual( seed.public_address(), '44cWztNFdAqNnycvZbUoj44vsbAEmKnx9aNgkjHdjtMsBrSeKiY8J4s2raH7EMawA2Fwo9utaRTV7Aw8EcTMNMxhH4YtKdH' ) self.assertIsInstance(seed.public_address(), Address) self.assertEqual( seed.public_address(net='stage'), '54pZ5jHDGmwNnycvZbUoj44vsbAEmKnx9aNgkjHdjtMsBrSeKiY8J4s2raH7EMawA2Fwo9utaRTV7Aw8EcTMNMxhH6cuARW' ) self.assertIsInstance(seed.public_address(net='stage'), Address) seed = Seed( "dwelt idols lopped blender haggled rabbits piloted value swagger taunts toolbox upgrade swagger" ) self.assertTrue(seed.is_mymonero()) # check if the same seed without checksum matches the hex self.assertEqual(seed.hex, Seed(" ".join(seed.phrase.split(" ")[:12])).hex) # the following fails, #21 addresses that self.assertEqual( seed.secret_spend_key(), 'a67505f92004dd6242b64acd16e34ecf788a2d28b6072091e054238d84591403') self.assertEqual( seed.secret_view_key(), '83f652cb370948c8cbcf06839df043aa8c0d0ed36e38b3c827c4c00370af1a0f') self.assertEqual( seed.public_address(), '47dwi1w9it69yZyTBBRD52ctQqw3B2FZx79bCEgVUKGHH2m7MjmaXrjeQfchMMkarG6AF9a36JvBWCyRaqEcUixpKLQRxdj' ) self.assertIsInstance(seed.public_address(), Address)
def test_portuguese(self): seed = Seed( u"rebuscar mefistofelico luto isca vulva ontologico autuar epiteto jarro invulneravel inquisitorial vietnamita voile potro mamute giroscopio scherzo cheroqui gueto loquaz fissurar fazer violoncelo viquingue vulva", "Portuguese") self.assertFalse(seed.is_mymonero()) self.assertEqual( seed.secret_spend_key(), '60916cfcb10fa0b2b0648e36ecd7037f5c1972d36b2e6d56c2f4feca613a4200') self.assertEqual( seed.secret_view_key(), 'b23941e3f4da76e0fab171d94a36fe70031fb501f1f80e0cb3b4b4638b5f7106') self.assertEqual( seed.public_spend_key(), '340c89026a03637e8b0abda566ac99b98a7c85b30a81281be19af869c3631dfb') self.assertEqual( seed.public_view_key(), '23bb38c5e34867c49a65f0e7192138483361d419febbd429f256088e5e62a55e') self.assertEqual( seed.public_address(), '43bWUqKAoYWNAdMtuaSF2pY2yptw7zfCB5fV2fXLkYTvj1NNYUKM4aaZtJCVYJunHuD5SNE2CPTCo81wDhZc8bReBidbX1w' )
def test_spanish(self): seed = Seed( u"riesgo lápiz martes fuerza dinero pupila pago mensaje guion libro órgano juntar imperio puñal historia pasión nación posible paso límite don afirmar receta reposo fuerza", "Spanish") self.assertFalse(seed.is_mymonero()) self.assertEqual( seed.secret_spend_key(), '5973d91299466a9a51ddfcd20d1710c776aa1399279b292b264ab6b7ab608105') self.assertEqual( seed.secret_view_key(), '5f7a66cf32120515870f89e3a156ec2024154334a3b43af1da05244ec4cf250d') self.assertEqual( seed.public_spend_key(), '42161417635c6bd31a8dce8c2bd3b5f4879369fb732073d9f6fa82b18329c7f7') self.assertEqual( seed.public_view_key(), '6acc984fecb5894b5661d446954ffcfe302cd1d2cf0e5177c2553aafb1dc3d2a') self.assertEqual( seed.public_address(), '448MxehQwbgcJyJ3fKnTYYhuF7g7cs7AJdTXoybMu8UEiPFtFpEVNTaDbsK5vatPHVjWwjvJfyWKiM2pBKXJrg4U5qeGXjZ' )
def test_japanese(self): seed = Seed( u"いもり すあな いきる しちょう うったえる ちひょう けなみ たいちょう うぶごえ しかい しなぎれ いっせい つかれる しなん ばあさん たいまつばな しひょう おいかける あんがい ていへん せんもん きこく せんく そそぐ つかれる", "Japanese") self.assertFalse(seed.is_mymonero()) self.assertEqual( seed.secret_spend_key(), 'a047598095d2ada065af73758f7082900b9b0d721b5f99a541a78bd461ffc607') self.assertEqual( seed.secret_view_key(), '080c6135edf93233176d41c8535caef0f13d596dc5093b5a5afa4279339dbc00') self.assertEqual( seed.public_spend_key(), '85d849793fce4d0238d991d3aab7ac790cee73e5732d378c216f11bd3b873e43') self.assertEqual( seed.public_view_key(), '19dc462a6074a26fa7788b45e542a71ffdbd48502e41ae8790c46fd6de556de3') self.assertEqual( seed.public_address(), '46hHs9s3boi1NZJHGSwMgfMFLpCBaKwdQQSSf7fqVjWdCDxudsDmqqbKgBkpYDX6JA6MMZG8o5yrMPg9ztrXHdEkSfUA131' )