Post
Topic
Board Web Wallets
Re: Blockchain.info - Bitcoin Block explorer & Currency Statistics
by
piuk
on 25/10/2013, 10:03:11 UTC
Feature suggestion - Blockchain Wallet API List Addresses should include an optional field $confirmations

Is there any way to pull full raw transaction or block data in hex? I'm trying to use http://blockchain.info/rawtx/$tx_index but the scriptsig and scriptpubkey are missing. Being able to pull the information is the same format as sendrawtransaction would be very useful.

I'v added a scripts parameter and confirmations parameter to /rawtx and /merchant/list.

Bug report, since I can't find a logical place to put this under http://github.com/blockchain:

When I tried to push the following transaction to http://blockchain.info/pushtx:

Code:
010000000125b98a02b8eb1ef3efb471cc87d6f028b53eadf29fe1cfb73fd0151188b6fe9300000000fd5f0100493046022100bcb0e128a7f4f39575f538979ecce4d49142ef6b613b4a98609bc14a7ae5ee0c02210094aca62aeae8301711560171087d8f069b79016d037f4e806df6c2efe12354e3014830450220257a3130f1d47ddf06b6a33882a1f1295cd8506f1ba1383b8b4cb5a40813c7ff022100ccea8cf93c54540f770e805a61585fb0ae82d6b6f68929b65afb0d6a9c0aa4ab014cc9524104b469d4fafd936e8630a5377223c5b7acfa9d2948b96845cc332607ec8528e6018abe46af616567ca44fca2d703a400dfdae73d0e21265c4dbeaf09e6294aa41941048ac7607d833aedb50c7be390955513f40327ff83891b53db2b241af64526ac17b37e7599f5ab2d4c7152779470dbc95c91526217de7bc002197ded7410526bfe4104cad74f0cf89dca7e13f37257e81308772fe3c7280f656ac88367867c54256ed606aa4dd2dc8ce4e73abb3159974f11657d2a365cee6fe86eeec4a8ce529cecd153aeffffffff0110270000000000001976a91405778c85c60c69598ea5bc896f872415fa7100b288ac00000000

I got an "Invalid Signature" error.

The transaction worked just fine when I sent it through the electrum sendrawtransaction CLI option. Here's the transaction deserialized:

Code:
> pybtctool deserialize `cat tx`
{"locktime": 0, "outs": [{"value": 10000, "script": "76a91405778c85c60c69598ea5bc896f872415fa7100b288ac"}], "version": 1, "ins": [{"script": "00493046022100bcb0e128a7f4f39575f538979ecce4d49142ef6b613b4a98609bc14a7ae5ee0c02210094aca62aeae8301711560171087d8f069b79016d037f4e806df6c2efe12354e3014830450220257a3130f1d47ddf06b6a33882a1f1295cd8506f1ba1383b8b4cb5a40813c7ff022100ccea8cf93c54540f770e805a61585fb0ae82d6b6f68929b65afb0d6a9c0aa4ab014cc9524104b469d4fafd936e8630a5377223c5b7acfa9d2948b96845cc332607ec8528e6018abe46af616567ca44fca2d703a400dfdae73d0e21265c4dbeaf09e6294aa41941048ac7607d833aedb50c7be390955513f40327ff83891b53db2b241af64526ac17b37e7599f5ab2d4c7152779470dbc95c91526217de7bc002197ded7410526bfe4104cad74f0cf89dca7e13f37257e81308772fe3c7280f656ac88367867c54256ed606aa4dd2dc8ce4e73abb3159974f11657d2a365cee6fe86eeec4a8ce529cecd153ae", "outpoint": {"index": 0, "hash": "93feb6881115d03fb7cfe19ff2ad3eb528f0d687cc71b4eff31eebb8028ab925"}, "sequence": 4294967295}]}
> pybtctool deserialize_script `cat script`
[null, "3046022100bcb0e128a7f4f39575f538979ecce4d49142ef6b613b4a98609bc14a7ae5ee0c02210094aca62aeae8301711560171087d8f069b79016d037f4e806df6c2efe12354e301", "30450220257a3130f1d47ddf06b6a33882a1f1295cd8506f1ba1383b8b4cb5a40813c7ff022100ccea8cf93c54540f770e805a61585fb0ae82d6b6f68929b65afb0d6a9c0aa4ab01", "524104b469d4fafd936e8630a5377223c5b7acfa9d2948b96845cc332607ec8528e6018abe46af616567ca44fca2d703a400dfdae73d0e21265c4dbeaf09e6294aa41941048ac7607d833aedb50c7be390955513f40327ff83891b53db2b241af64526ac17b37e7599f5ab2d4c7152779470dbc95c91526217de7bc002197ded7410526bfe4104cad74f0cf89dca7e13f37257e81308772fe3c7280f656ac88367867c54256ed606aa4dd2dc8ce4e73abb3159974f11657d2a365cee6fe86eeec4a8ce529cecd153ae"]

The sigs all validate just fine. Lost the privkeys unfortunately. Any idea what's up?

Is it redeeming a multisig transaction? Signature validation for P2SH/multsig scripts is untested, i'm not sure if bitcoinj can validate them or not.