I've selected an arbitrary transaction id and retrieved its associated transaction details using the blockcypher explorer as follows:
from blockcypher import get_transaction_details
get_transaction_details('0db8ca471c0e0fd3ce6f24197d9a9cec9647fd3df5ab6aa2e174e0ea85949146')
The output is the following python dictionary
{'addresses': ['17uP1g6ppdKVonMQWJ2ojeUZ8r9AhH2tgf',
'19jaGQFE39oH71WdR1ZJjpajjnP8tWNZdv', '1PJwNGYympRP3kJ8hqkY2ayHDVHokrASrv'],
'block_hash':'0000000000000000032ba4f95d39b86b2cc24c27e3c0d3201070945faf890e0d',
'block_height': 419922,
'block_index': 1,
'confidence': 1,
'confirmations': 186323,
'confirmed': datetime.datetime(2016, 7, 9, 4, 3, tzinfo=tzutc()),
'double_spend': False,
'fees': 311300,
'hash':'0db8ca471c0e0fd3ce6f24197d9a9cec9647fd3df5ab6aa2e174e0ea85949146',
'inputs': [{'addresses': ['19jaGQFE39oH71WdR1ZJjpajjnP8tWNZdv'],
'age': 418553,
'output_index': 0,
'output_value': 44695270,
'prev_hash':'81b3bcc34490facea42a729ae166f599c7933501273010d0eb0c2a0efe190153',
'script': '483045022100e664861517c0ea91df7e4bde7001b7cda6b034a7f4c4c6e622b681a57bf72c4102207b02fa4046f6ca5c180aa60ee57e67fff4e82c09a7e60515b15a989cd4bd5d3a012103017e89c4294b1ca99533b424c367db4f18747c0cacad393e3fb103640bcdb2ce',
'script_type': 'pay-to-pubkey-hash',
'sequence': 4294967295}],
'outputs': [{'addresses': ['17uP1g6ppdKVonMQWJ2ojeUZ8r9AhH2tgf'],
'script': '76a9144bb8c253f24fa707f6796a0b3c542f78c94b4dcc88ac',
'script_type': 'pay-to-pubkey-hash',
'spent_by': '43a771f414804dcc5ef5b4a577961a1e694ce8f477b391da1a404a600a14c8e3',
'value': 18695900},
{'addresses': ['1PJwNGYympRP3kJ8hqkY2ayHDVHokrASrv'],
'script': '76a914f4b738bc3ee9ebad027381304b2b3e81a618a60488ac',
'script_type': 'pay-to-pubkey-hash',
'spent_by': '0ea2858001f752c4eb7d0bba88568e9dfb25cdcc76adab42bc1ccfbf27c8bda1',
'value': 25688070}],
'preference': 'high',
'received': datetime.datetime(2016, 7, 9, 3, 41, 4, 370000, tzinfo=tzutc()),
'relayed_by': '80.249.197.154:8333',
'size': 226,
'total': 44383970,
'ver': 1,
'vin_sz': 1,
'vout_sz': 2}
Now, from what I understand, the input script should be
<sig> <PubKey>
and the output script should be
DUP HASH160 <PubKHash> EQUALVERIFY CHECKSIG
In the above transaction details I see that there is one input script and two output scripts, which the blockcypher documentation says are raw hexadecimal encodings. However, when I put the encoding under the "scripts" fields into a hex decoder I get nothing that makes sense. My questions are:
1) How can I decode the strings in the "scripts" fields of the transaction details dictionary to see the actual scripts. When I do, will they follow the format I outlined above?
2) How can I verify that the unlocking (input) script, indeed works on the locked (output) scripts? Is that possible using only the transaction details I have generated above?