add fromPubkey convenience function