Add constants for msg and pubkey object types to api.py