def test_parse_xpub(self):
        res = xpubkey_to_address(
            'fe4e13b0f311a55b8a5db9a32e959da9f011b131019d4cebe6141b9e2c93edcbfc0954c358b062a9f94111548e50bde5847a3096b8b7872dcffadb0e9579b9017b01000200'
        )
        self.assertEquals(res, (
            '04ee98d63800824486a1cf5b4376f2f574d86e0a3009a6448105703453f3368e8e1d8d090aaecdd626a45cc49876709a3bbb6dc96a4311b3cac03e225df5f63dfc',
            'LTv6KFwtiNafLvxggFFQMRSQEXtBUru9eG'))

        res = xpubkey_to_address(
            'fd307d260305ef27224bbcf6cf5238d2b3638b5a78d5')
        self.assertEquals(res, (None, 'LWdgGJGqSmaGYcp6e21RvpGmcuexJorNEH'))
    def test_parse_xpub(self):
        res = xpubkey_to_address(
            'fe4e13b0f311a55b8a5db9a32e959da9f011b131019d4cebe6141b9e2c93edcbfc0954c358b062a9f94111548e50bde5847a3096b8b7872dcffadb0e9579b9017b01000200'
        )
        self.assertEquals(res, (
            '04ee98d63800824486a1cf5b4376f2f574d86e0a3009a6448105703453f3368e8e1d8d090aaecdd626a45cc49876709a3bbb6dc96a4311b3cac03e225df5f63dfc',
            '19h943e4diLc68GXW7G75QNe2KWuMu7BaJ'))

        res = xpubkey_to_address(
            'fd007d260305ef27224bbcf6cf5238d2b3638b5a78d5')
        self.assertEquals(res, (None, '1CQj15y1N7LDHp7wTt28eoD1QhHgFgxECH'))
示例#3
0
    def test_parse_xpub(self):
        res = xpubkey_to_address(
            'fe4e13b0f311a55b8a5db9a32e959da9f011b131019d4cebe6141b9e2c93edcbfc0954c358b062a9f94111548e50bde5847a3096b8b7872dcffadb0e9579b9017b01000200'
        )
        self.assertEquals(res, (
            '04ee98d63800824486a1cf5b4376f2f574d86e0a3009a6448105703453f3368e8e1d8d090aaecdd626a45cc49876709a3bbb6dc96a4311b3cac03e225df5f63dfc',
            'XjNytJHxbRZCF4s7MzaKvw4Rrf6bPRuPnW'))

        res = xpubkey_to_address(
            'fd4c7d260305ef27224bbcf6cf5238d2b3638b5a78d5')
        self.assertEquals(res, ('fd4c7d260305ef27224bbcf6cf5238d2b3638b5a78d5',
                                'Xn6ZqLcuKpYoSkiXKmLMWKtoF2sNExHwjT'))
示例#4
0
    def test_parse_xpub(self):
        res = xpubkey_to_address(
            '044A7B10DC2FB0B17F08D363AEEB38FB304826B53369EC4F1339E4F01C8E425487626781EA6568A3308D72CABF52710BE28913012EA4D717D6B42D7043654E4BAE'
        )
        self.assertEquals(res, (
            '044A7B10DC2FB0B17F08D363AEEB38FB304826B53369EC4F1339E4F01C8E425487626781EA6568A3308D72CABF52710BE28913012EA4D717D6B42D7043654E4BAE',
            'PKTVLrS7aHzYHwKHWCaMA2fGgqxmbCfNZc'))

        res = xpubkey_to_address(
            'fd4c7d260305ef27224bbcf6cf5238d2b3638b5a78d5')
        self.assertEquals(res, ('fd4c7d260305ef27224bbcf6cf5238d2b3638b5a78d5',
                                'PKTVLrS7aHzYHwKHWCaMA2fGgqxmbCfNZc'))
示例#5
0
 def test_parse_xpub(self):
     res = xpubkey_to_address(
         'fe4e13b0f311a55b8a5db9a32e959da9f011b131019d4cebe6141b9e2c93edcbfc0954c358b062a9f94111548e50bde5847a3096b8b7872dcffadb0e9579b9017b01000200'
     )
     self.assertEqual(res, (
         '04ee98d63800824486a1cf5b4376f2f574d86e0a3009a6448105703453f3368e8e1d8d090aaecdd626a45cc49876709a3bbb6dc96a4311b3cac03e225df5f63dfc',
         't1SZk4P4Cc38CgmKRSY5EDDUZGyhzA66iHH'))
示例#6
0
    def test_errors(self):
        with self.assertRaises(TypeError):
            transaction.Transaction.pay_script(output_type=None, addr='')

        with self.assertRaises(BaseException):
            xpubkey_to_address('')
示例#7
0
 def test_parse_xpub(self):
     res = xpubkey_to_address('fe4e13b0f311a55b8a5db9a32e959da9f011b131019d4cebe6141b9e2c93edcbfc0954c358b062a9f94111548e50bde5847a3096b8b7872dcffadb0e9579b9017b01000200')
     self.assertEqual(res, ('04ee98d63800824486a1cf5b4376f2f574d86e0a3009a6448105703453f3368e8e1d8d090aaecdd626a45cc49876709a3bbb6dc96a4311b3cac03e225df5f63dfc', '19h943e4diLc68GXW7G75QNe2KWuMu7BaJ'))
示例#8
0
    def test_errors(self):
        with self.assertRaises(TypeError):
            transaction.Transaction.pay_script(output_type=None, addr='')

        with self.assertRaises(BaseException):
            xpubkey_to_address('')
示例#9
0
 def test_parse_xpub(self):
     res = xpubkey_to_address('fe4e13b0f311a55b8a5db9a32e959da9f011b131019d4cebe6141b9e2c93edcbfc0954c358b062a9f94111548e50bde5847a3096b8b7872dcffadb0e9579b9017b01000200')
     self.assertEqual(res, ('04ee98d63800824486a1cf5b4376f2f574d86e0a3009a6448105703453f3368e8e1d8d090aaecdd626a45cc49876709a3bbb6dc96a4311b3cac03e225df5f63dfc', Address.from_string('19h943e4diLc68GXW7G75QNe2KWuMu7BaJ')))
示例#10
0
    def test_parse_xpub(self):
        res = xpubkey_to_address('fe4e13b0f311a55b8a5db9a32e959da9f011b131019d4cebe6141b9e2c93edcbfc0954c358b062a9f94111548e50bde5847a3096b8b7872dcffadb0e9579b9017b01000200')
        self.assertEquals(res, ('04ee98d63800824486a1cf5b4376f2f574d86e0a3009a6448105703453f3368e8e1d8d090aaecdd626a45cc49876709a3bbb6dc96a4311b3cac03e225df5f63dfc', 'LTv6KFwtiNafLvxggFFQMRSQEXtBUru9eG'))

        res = xpubkey_to_address('fd307d260305ef27224bbcf6cf5238d2b3638b5a78d5')
        self.assertEquals(res, (None, 'LWdgGJGqSmaGYcp6e21RvpGmcuexJorNEH'))
示例#11
0
    def test_parse_xpub(self):
        res = xpubkey_to_address('fe4e13b0f311a55b8a5db9a32e959da9f011b131019d4cebe6141b9e2c93edcbfc0954c358b062a9f94111548e50bde5847a3096b8b7872dcffadb0e9579b9017b01000200')
        self.assertEquals(res, ('04ee98d63800824486a1cf5b4376f2f574d86e0a3009a6448105703453f3368e8e1d8d090aaecdd626a45cc49876709a3bbb6dc96a4311b3cac03e225df5f63dfc', '19h943e4diLc68GXW7G75QNe2KWuMu7BaJ'))

        res = xpubkey_to_address('fd007d260305ef27224bbcf6cf5238d2b3638b5a78d5')
        self.assertEquals(res, (None, '1CQj15y1N7LDHp7wTt28eoD1QhHgFgxECH'))