def file_sign( blockchain_id, hostname, input_path, passphrase=None, config_path=CONFIG_PATH, wallet_keys=None ):
config_dir = os.path.dirname(config_path)<EOL>key_info = file_key_lookup( blockchain_id, <NUM_LIT:0>, hostname, config_path=config_path, wallet_keys=wallet_keys )<EOL>if '<STR_LIT:error>' in key_info:<EOL><INDENT>return {'<STR_LIT:error>': '<STR_LIT>'}<EOL><DEDENT>res = blockstack_gpg.gpg_sign( input_path, key_info, config_dir=config_dir )<EOL>if '<STR_LIT:error>' in res:<EOL><INDENT>log.error("<STR_LIT>" % res['<STR_LIT:error>'])<EOL>return {'<STR_LIT:error>': '<STR_LIT>'}<EOL><DEDENT>return {'<STR_LIT:status>': True, '<STR_LIT>': key_info['<STR_LIT>'], '<STR_LIT>': res['<STR_LIT>']}<EOL>
Sign a file with the current blockchain ID's host's public key.
@config_path should be for the *client*, not blockstack-file
Return {'status': True, 'sender_key_id': ..., 'sig': ...} on success, and write ciphertext to output_path
Return {'error': ...} on error