fix PublicKey api