fixed the issue that caused jasmine test to fail, and revise api exposed. 

The key type is actually inside subKeys. subKeys are of KeyPacketInfo structure.