def test_encode_4_bytes_account_index(self): self.assertEqual('zswfoZa', ss58_encode_account_index(67305985, ss58_format=2)) self.assertEqual('zswfoZa', ss58_encode('0x01020304', ss58_format=2))
def test_encode_1_byte_account_index_with_format(self): self.assertEqual('g4b', ss58_encode_account_index(1, ss58_format=2)) self.assertEqual('g4b', ss58_encode('0x01', ss58_format=2))
def test_encode_2_bytes_account_index(self): self.assertEqual('3xygo', ss58_encode_account_index(256, ss58_format=2)) self.assertEqual('3xygo', ss58_encode('0x0001', ss58_format=2))
def test_encode_1_byte_account_index(self): self.assertEqual('F7NZ', ss58_encode_account_index(1))