What is the proper length and format for public keys on NEAR

259 Views Asked by At

Some public keys that are generated from storage devices are 44 characters after the ed25519: prefix (52 total) and some are 43 characters (51 total). Is this permissable?

Is the ed25519: prefix necessary to include whenever using a public key?

1

There are 1 best solutions below

0
On BEST ANSWER

ed25519: prefix is usually optional and is applied by default.

It is ok for keys to have different length. A key is basically a large binary number encoded using base58 with leading zeros being dropped.

Basically the same thing happening as if we had keys encoded in decimal and one key would be 999 while another key is 1001.