Open UMU618 opened 5 years ago
Maybe related to this ? https://github.com/EOSIO/eosjs-ecc/pull/38/files
Maybe related to this ? https://github.com/EOSIO/eosjs-ecc/pull/38/files
No.
The checksum of EOS8ddPoePGrH4x1mha1RHcbjU1cAWWFLWqBQF6Q35RrTsZdLouC1 is wrong, should be EOS8ddPoePGrH4x1mha1RHcbjU1cAWWFLWqBQF6Q35RrTsZdLouCm.
my issue is about unexcepted type, not checksum.
ecc.isValidPublic('EOS5K6ag7t87u3F4jdkmt73wQtd9oprQFyJsp6vskrrwoQoPqcPdE7') return false #489
Version eosjs 20.0.0-beta3 eosjs-ecc 4.0.4
Describe the bug
To Reproduce
get the public keys of 1255gdpaftgs
validate these keys using ecc.isValidPublic()
Expected behavior true, but return false.
More It seems like a bug of
ecurve 1.0.5
ecc.PublicKey('EOS5Kkxpsx71txnR8niEmZmcG6d6AeSQqYw1qfXYQBDkgh5v4tbGxH')
type is 128, isValidPublic() = false
ecc.PublicKey('EOS7enq7SL9AUhBYgkYMksj34LPKtAr7iu56KKrNTcUPTRqTp5VaN')
type is 3, isValidPublic() = true
I use C++ code to validate these keys, and the test passes.