Decode bitcoin transaction vin address - bitcoin

I'm building a graph of blockchain transactions and have a problem to extract source address for a transaction (output addresses are easy,bundled in the getrawtransaction result).
for example this transaction https://www.blockchain.com/btc/tx/8d787db12e04630a10191772f068fae43d30fbb93e6198e7efa636ce03f16222?show_adv=true
the getrawtransaction has an output of
{
"result": {
"txid": "8d787db12e04630a10191772f068fae43d30fbb93e6198e7efa636ce03f16222",
"hash": "7a0a667bf96d65a11eeab8ec17e232c5afdbe724b6e5e60697790bde3037c2c8",
"version": 2,
"size": 248,
"vsize": 166,
"weight": 662,
"locktime": 597359,
"vin": [
{
"txid": "2a1dda8fb17cdcefb26a377492aff6076bd03a93f742d595df1d0ff4951a4305",
"vout": 0,
"scriptSig": {
"asm": "00140d9cad5ccd91bf6ed56ec6bcb7762ec52ecb7b8d",
"hex": "1600140d9cad5ccd91bf6ed56ec6bcb7762ec52ecb7b8d"
},
"txinwitness": [
"3045022100f2900ede33aab8838464cfb127a962960c29cd97ba62e830c69a38621514d2980220706aa5c28d6e1a134f74b99e6280b357dc1f20ae00f4fcca12ab4ccfab5ceac701",
"033b18a261c30edaf859dc523700f3a6085a413ab51b4f63ca84d26073e8e7c709"
],
"sequence": 4294967294
}
],
"vout": [
{
"value": 0.16957303,
"n": 0,
"scriptPubKey": {
"asm": "OP_HASH160 d45c146bdb6ad9c61f3300341e2524e8e64394ac OP_EQUAL",
"hex": "a914d45c146bdb6ad9c61f3300341e2524e8e64394ac87",
"reqSigs": 1,
"type": "scripthash",
"addresses": [
"3M3sV2VBqPXzZHkbdBXo9dMpEw7xxHCFow"
]
}
},
{
"value": 0.07866618,
"n": 1,
"scriptPubKey": {
"asm": "OP_HASH160 69f37417a9fb77744ec258ac2ff22e99266ac354 OP_EQUAL",
"hex": "a91469f37417a9fb77744ec258ac2ff22e99266ac35487",
"reqSigs": 1,
"type": "scripthash",
"addresses": [
"3BMEX8XxUxyEKfRDAJmSMhyd3Y7QWh7PQV"
]
}
}
],
"hex": "0200000000010105431a95f40f1ddf95d542f7933ad06b07f6af9274376ab2efdc7cb18fda1d2a00000000171600140d9cad5ccd91bf6ed56ec6bcb7762ec52ecb7b8dfeffffff0277bf02010000000017a914d45c146bdb6ad9c61f3300341e2524e8e64394ac87fa0878000000000017a91469f37417a9fb77744ec258ac2ff22e99266ac3548702483045022100f2900ede33aab8838464cfb127a962960c29cd97ba62e830c69a38621514d2980220706aa5c28d6e1a134f74b99e6280b357dc1f20ae00f4fcca12ab4ccfab5ceac70121033b18a261c30edaf859dc523700f3a6085a413ab51b4f63ca84d26073e8e7c7096f1d0900",
"blockhash": "00000000000000000002726a175241b0f200c561daf30c668d8652cf3b949343",
"confirmations": 18,
"time": 1569914555,
"blocktime": 1569914555
},
"error": null,
"id": null
}
the source address per blockchain explorer is 36UuEDoDQX5JppSVnpaccV5DCKiquRyPxB. Was not able to derive it from any of the vin fields.

You can decode scriptSig to get the address.
There is a RPC call in bitcoin core that can help you achieve this: decodescript.

Related

Is it correct to see a different cabin value aside that passed in the get FlightOffers APi as travelerClass?

From the documentation of the Get Route for the flight offers Api, I can add travelerClass as a filter to make a request. If I add say travelerClass as ECONOMY?
I expect to see only offers with ECONOMY. However I see that within the fareDetailsBySegment section in the result, I see that some Offers have their cabin values as other than ECONOMY. I see some with value of BUSINESS while others as PREMIUM_ECONOMY.
Is this proper?
My Concern
I want to be able to get all bookings that where ECONOMY based only. So I need to be sure that the flight offers returned in the first place are strictly limited by the travelerClass.
I will appreciate any clarity on the this issue. Also if there is a better way to go about this concern above, it will be most appreciated.
An example of my request is below:
Amadeus.shopping.flightOffersSearch.get({
originLocationCode: 'SYD',
destinationLocationCode: 'BKK',
departureDate: '2022-11-01',
adults: '1',
travelClass: 'ECONOMY'
}).then(...)
Offer with BUSINESS instead of ECONOMY
{
"type": "flight-offer",
"id": "22",
"source": "GDS",
"instantTicketingRequired": false,
"nonHomogeneous": false,
"oneWay": false,
"lastTicketingDate": "2022-11-01",
"numberOfBookableSeats": 6,
"itineraries": [
{
"duration": "PT28H20M",
"segments": [
{
"departure": {
"iataCode": "SYD",
"terminal": "1",
"at": "2022-11-01T12:00:00"
},
"arrival": {
"iataCode": "PVG",
"terminal": "2",
"at": "2022-11-01T19:30:00"
},
"carrierCode": "MU",
"number": "562",
"aircraft": {
"code": "77W"
},
"operating": {
"carrierCode": "MU"
},
"duration": "PT10H30M",
"id": "13",
"numberOfStops": 0,
"blacklistedInEU": false
},
{
"departure": {
"iataCode": "PVG",
"terminal": "1",
"at": "2022-11-02T08:45:00"
},
"arrival": {
"iataCode": "BKK",
"at": "2022-11-02T12:20:00"
},
"carrierCode": "MU",
"number": "541",
"aircraft": {
"code": "320"
},
"operating": {
"carrierCode": "MU"
},
"duration": "PT4H35M",
"id": "14",
"numberOfStops": 0,
"blacklistedInEU": false
}
]
}
],
"price": {
"currency": "EUR",
"total": "4048.84",
"base": "3858.00",
"fees": [
{
"amount": "0.00",
"type": "SUPPLIER"
},
{
"amount": "0.00",
"type": "TICKETING"
}
],
"grandTotal": "4048.84"
},
"pricingOptions": {
"fareType": [
"PUBLISHED"
],
"includedCheckedBagsOnly": true
},
"validatingAirlineCodes": [
"MU"
],
"travelerPricings": [
{
"travelerId": "1",
"fareOption": "STANDARD",
"travelerType": "ADULT",
"price": {
"currency": "EUR",
"total": "4048.84",
"base": "3858.00"
},
"fareDetailsBySegment": [
{
"segmentId": "13",
"cabin": "ECONOMY",
"fareBasis": "YSE0WDNQ",
"class": "Y",
"includedCheckedBags": {
"quantity": 2
}
},
{
"segmentId": "14",
"cabin": "BUSINESS",
"fareBasis": "QSE0WCNL",
"class": "Q",
"includedCheckedBags": {
"quantity": 2
}
}
]
}
]
}
in order to apply the filter for cabin class, I suggest you to try with POST method.
in POST method has more search criteria you can apply, below example is something that I have tried and it works: response only contains ECONOMY classes by updating values under cabinRestrictions.
details of the request model is available in API reference page
amadeus.shopping.flightOffersSearch.post(JSON.stringify({
"currencyCode": "USD",
"originDestinations": [
{
"id": "1",
"originLocationCode": "SYD",
"destinationLocationCode": "BKK",
"departureDateTimeRange": {
"date": "2022-11-01"
}
}
],
"travelers": [
{
"id": "1",
"travelerType": "ADULT"
}
],
"sources": [
"GDS"
],
"searchCriteria": {
"maxFlightOffers": 10,
"flightFilters": {
"cabinRestrictions": [
{
"cabin": "ECONOMY",
"coverage": "ALL_SEGMENTS",
"originDestinationIds": [
1
]
}
]
}
}
})).then(...)

Amadeus Flight Offers Different Prices

We're using flight offers search api and ready to move to prod. But when we search flights with ECONOMY class the prices are not even close to "amadeus.net" search engine results or TK (Turkish Airlines) web site prices. If we use BUSINESS class as a parameter the api results are closer to real prices. How can we solve this issue?
The sample query is: (IST - CGN 25th May ECONOMY and TK Opearated flight departures 16:05 )
/v2/shopping/flight-offers?originLocationCode=IST&destinationLocationCode=CGN&departureDate=2021-05-25&adults=1&travelClass=ECONOMY&includedAirlineCodes=TK&nonStop=true&max=250
The api result is: €206.55
TK Web Site: €121
Amadeus.net €103
Detailed API result:
{
"meta": {
"count": 2,
"links": {
"self": "https://test.api.amadeus.com/v2/shopping/flight-offers?originLocationCode=IST&destinationLocationCode=CGN&departureDate=2021-05-25&adults=1&travelClass=ECONOMY&includedAirlineCodes=TK&nonStop=true&max=250"
}
},
"data": [
{
"type": "flight-offer",
"id": "2",
"source": "GDS",
"instantTicketingRequired": false,
"nonHomogeneous": false,
"oneWay": false,
"lastTicketingDate": "2021-05-25",
"numberOfBookableSeats": 9,
"itineraries": [
{
"duration": "PT3H20M",
"segments": [
{
"departure": {
"iataCode": "IST",
"at": "2021-05-25T16:05:00"
},
"arrival": {
"iataCode": "CGN",
"terminal": "2",
"at": "2021-05-25T18:25:00"
},
"carrierCode": "TK",
"number": "1675",
"aircraft": {
"code": "321"
},
"operating": {
"carrierCode": "TK"
},
"duration": "PT3H20M",
"id": "2",
"numberOfStops": 0,
"blacklistedInEU": false
}
]
}
],
"price": {
"currency": "EUR",
"total": "206.55",
"base": "134.00",
"fees": [
{
"amount": "0.00",
"type": "SUPPLIER"
},
{
"amount": "0.00",
"type": "TICKETING"
}
],
"grandTotal": "206.55"
},
"pricingOptions": {
"fareType": [
"PUBLISHED"
],
"includedCheckedBagsOnly": true
},
"validatingAirlineCodes": [
"TK"
],
"travelerPricings": [
{
"travelerId": "1",
"fareOption": "STANDARD",
"travelerType": "ADULT",
"price": {
"currency": "EUR",
"total": "206.55",
"base": "134.00"
},
"fareDetailsBySegment": [
{
"segmentId": "2",
"cabin": "ECONOMY",
"fareBasis": "QT2PXOW",
"class": "Q",
"includedCheckedBags": {
"weight": 30,
"weightUnit": "KG"
}
}
]
}
]
}
],
"dictionaries": {
"locations": {
"SAW": {
"cityCode": "IST",
"countryCode": "TR"
},
"CGN": {
"cityCode": "CGN",
"countryCode": "DE"
},
"IST": {
"cityCode": "IST",
"countryCode": "TR"
}
},
"aircraft": {
"321": "AIRBUS A321",
"738": "BOEING 737-800"
},
"currencies": {
"EUR": "EURO"
},
"carriers": {
"TK": "TURKISH AIRLINES"
}
}
}
Thanks in advance
There are two reasons why you see different prices:
The Self-Service APIs return published airfares coming from the GDS and not any negotiated ones. That means the flights returned by the APIs can be more expensive than the ones you find in OTAs or airline websites.
In the test environment that you are using, you get access to cached flight data which might be different from the live prices.

Square API: Object version does not match latest database version

I'm trying to use the following Square API endpoint to update an item, but I'm getting some errors. Here is the item that I'm trying to update.
{
"type": "ITEM",
"id": "7HXK6NVBDKSOK64CCAYZJ2KW",
"updated_at": "2020-08-08T21:43:41.849Z",
"version": 1596923021849,
"is_deleted": false,
"present_at_all_locations": false,
"present_at_location_ids": [
"1JZ5JTPBW0EXY"
],
"item_data": {
"name": "Hummus Plate",
"description": "Olives, feta, tomatoes, tzatziki and warm pita.",
"visibility": "PRIVATE",
"category_id": "ARB5LTTDUSER6T66ZWYO65FL",
"variations": [
{
"type": "ITEM_VARIATION",
"id": "HBIHPLROOJUUNUSW3BZUDQ5J",
"updated_at": "2020-08-08T21:40:14.581Z",
"version": 1596922814581,
"is_deleted": false,
"present_at_all_locations": false,
"present_at_location_ids": [
"1JZ5JTPBW0EXY"
],
"item_variation_data": {
"item_id": "7HXK6NVBDKSOK64CCAYZJ2KW",
"name": "Regular",
"ordinal": 0,
"pricing_type": "FIXED_PRICING",
"price_money": {
"amount": 1000,
"currency": "USD"
}
}
}
],
"product_type": "REGULAR",
"skip_modifier_screen": true,
"ecom_available": false,
"ecom_visibility": "UNINDEXED"
}
}
Here the body content.
{
"batches": [{
"objects": [{
"type": "ITEM_VARIATION",
"id": "T6KKCATDIU2VV4BDBMVGML4W",
"item_variation_data": {
"item_id": "FNWWGFTBQWFAYK6JGBD3LDLD",
"pricing_type": "FIXED_PRICING",
"price_money": {
"amount": 150,
"currency": "USD"
}
}
}]
}],
"idempotency_key": "61994762-3a6s-4b75-sf81-fdfaf"
}
Here is the error I'm getting:
**{
"errors": [
{
"category": "INVALID_REQUEST_ERROR",
"code": "VERSION_MISMATCH",
"detail": "Object version does not match latest database version.",
"field": "version"
}
]
}**
I'm not sure what I'm doing wrong, but I appreciate any help I can get. Thank you in advance!
When updating a catalog object in Square, you need to provide the latest version number in the request.
{
"batches": [{
"objects": [{
"type": "ITEM_VARIATION",
"id": "T6KKCATDIU2VV4BDBMVGML4W",
"version": "12345",
"item_variation_data": {
"item_id": "FNWWGFTBQWFAYK6JGBD3LDLD",
"pricing_type": "FIXED_PRICING",
"price_money": {
"amount": 150,
"currency": "USD"
}
}
}]
}],
"idempotency_key": "61994762-3a6s-4b75-sf81-fdfaf"
}

extra bag information is missing in the flight offer price response

I'm testing self-service APIs. I wonder if this is a bug:
I make a search request, and the response contains the extra bag information in the flight-offer/price/additionalServices
Then I make the offer price request by adding include=bags parameter in the path of Flight Offers Price API.
However there is no any bags information in the response, neither in the offer/price/additionalServices, nor in the included/.
I still try to create order by adding the extra bag. So I use the extra bag information that I got at step 1 (search response). And the order is created successfully.
It seems that the extra bag information is missing in step 2 (response of flight offer price), is it a bug?
Here is an example of my test to reproduce the issue:
search request
{
"currencyCode": "EUR",
"originDestinations": [
{
"id": "1",
"originLocationCode": "PAR",
"destinationLocationCode": "NYC",
"departureDateTimeRange": {
"date": "2020-08-20",
"time": "10:00:00"
}
}
],
"travelers": [
{
"id": "1",
"travelerType": "ADULT"
}
],
"sources": [
"GDS"
],
"searchCriteria": {
"maxFlightOffers": 3
}
}
Then I select the second offer in the response to make a offer price request using include=bags parameter
{
"type": "flight-offer",
"id": "2",
"source": "GDS",
"instantTicketingRequired": false,
"nonHomogeneous": false,
"oneWay": false,
"lastTicketingDate": "2020-08-13",
"numberOfBookableSeats": 8,
"itineraries": [
{
"duration": "PT8H15M",
"segments": [
{
"departure": {
"iataCode": "ORY",
"terminal": "4",
"at": "2020-08-20T19:45:00"
},
"arrival": {
"iataCode": "EWR",
"terminal": "B",
"at": "2020-08-20T22:00:00"
},
"carrierCode": "TX",
"number": "6720",
"aircraft": {
"code": "359"
},
"operating": {
"carrierCode": "BF"
},
"duration": "PT8H15M",
"id": "3",
"numberOfStops": 0,
"blacklistedInEU": false
}
]
}
],
"price": {
"currency": "EUR",
"total": "149.44",
"base": "41.00",
"fees": [
{
"amount": "0.00",
"type": "SUPPLIER"
},
{
"amount": "0.00",
"type": "TICKETING"
}
],
"grandTotal": "149.44",
"additionalServices": [
{
"amount": "70.00",
"type": "CHECKED_BAGS"
}
]
},
"pricingOptions": {
"fareType": [
"PUBLISHED"
],
"includedCheckedBagsOnly": false
},
"validatingAirlineCodes": [
"TX"
],
"travelerPricings": [
{
"travelerId": "1",
"fareOption": "STANDARD",
"travelerType": "ADULT",
"price": {
"currency": "EUR",
"total": "149.44",
"base": "41.00"
},
"fareDetailsBySegment": [
{
"segmentId": "3",
"cabin": "ECONOMY",
"fareBasis": "ULBCOWFR",
"brandedFare": "EBASIC",
"class": "U",
"includedCheckedBags": {
"quantity": 0
}
}
]
}
]
}
There is no extra bag in the response.
Thanks

Raw transaction Error: mandatory-script-verify-flag-failed (Signature must be zero for failed CHECK(MULTI)SIG operation)

I'm trying to create and sign a raw transaction and broadcast it to the testnet.
This is input transaction:
{
"error": null,
"id": "1",
"result": {
"blockhash": "000000000000006ad3b6dcf2a1e1725eeb3f7c5e424feca4577d4c9e106d26e5",
"blocktime": 1587495286,
"confirmations": 689,
"hash": "c6cbe3462b78a072ef0ff3f0b436372ad55d811b4ba0feb581d0adfefdd8f815",
"hex": "02000000000101fd1819b6a5f2ca631fd7eafecdb021cb1e2ea28485cc72b8903967637d784aa40100000017160014030df68f3c20d14bd8e998588ca7e640ada02284feffffff0296361b00000000001976a914814a2c0bb0d155667341be55633e7351a7d5c57888acde1745290100000017a9149c5fefdc8021652844976aa2ba3e49f0933933c887024730440220033b4acb8120f25db5c83fb8ed4d73dc1e4d45e271c98d9f8ac46f2cc6de32e502200405228466f0b07ae8edc7d80d81c6c2983c811ee6d4588bf46ce65fdf000bc80121039657df486ea7bf33580ce678a2ac90b0dc2b82e97edc23d36daf1743d618d355ca421a00",
"locktime": 1721034,
"size": 249,
"time": 1587495286,
"txid": "ccd36c5467ad0d9d1fa4f4d081020c066f1fa7ab9b734d9b0cc90b491eeeabdc",
"version": 2,
"vin": [
{
"scriptSig": {
"asm": "0014030df68f3c20d14bd8e998588ca7e640ada02284",
"hex": "160014030df68f3c20d14bd8e998588ca7e640ada02284"
},
"sequence": 4294967294,
"txid": "a44a787d63673990b872cc8584a22e1ecb21b0cdfeead71f63caf2a5b61918fd",
"txinwitness": [
"30440220033b4acb8120f25db5c83fb8ed4d73dc1e4d45e271c98d9f8ac46f2cc6de32e502200405228466f0b07ae8edc7d80d81c6c2983c811ee6d4588bf46ce65fdf000bc801",
"039657df486ea7bf33580ce678a2ac90b0dc2b82e97edc23d36daf1743d618d355"
],
"vout": 1
}
],
"vout": [
{
"n": 0,
"scriptPubKey": {
"addresses": [
"msJaKN7KCGARZrKWyy169GzztFLx7aTRBf"
],
"asm": "OP_DUP OP_HASH160 814a2c0bb0d155667341be55633e7351a7d5c578 OP_EQUALVERIFY OP_CHECKSIG",
"hex": "76a914814a2c0bb0d155667341be55633e7351a7d5c57888ac",
"reqSigs": 1,
"type": "pubkeyhash"
},
"value": 0.01783446
},
{
"n": 1,
"scriptPubKey": {
"addresses": [
"2N7W4L2UTnsTW4wYVLgBGLKoxHdFJ9L54WU"
],
"asm": "OP_HASH160 9c5fefdc8021652844976aa2ba3e49f0933933c8 OP_EQUAL",
"hex": "a9149c5fefdc8021652844976aa2ba3e49f0933933c887",
"reqSigs": 1,
"type": "scripthash"
},
"value": 49.87361246
}
],
"vsize": 168,
"weight": 669
}
}
I do the following steps:
Create the raw transaction. This is the serialized raw transaction:
0100000001dcabee1e490bc90c9b4d739baba71f6f060c0281d0f4a41f9d0dad67546cd3cc0000000000ffffffff0196361b00000000001976a91459fe1a9f9f0a5af33396c59990f064be1ca5127488ac00000000
Decode the raw transaction. This is the decoded transaction:
{
"error": null,
"id": "1",
"result": {
"hash": "787a2c60c4bd1d92590e6dfe132f18322c27a2667f134903393de0e6f973234a",
"locktime": 0,
"size": 85,
"txid": "787a2c60c4bd1d92590e6dfe132f18322c27a2667f134903393de0e6f973234a",
"version": 1,
"vin": [
{
"scriptSig": {
"asm": "",
"hex": ""
},
"sequence": 4294967295,
"txid": "ccd36c5467ad0d9d1fa4f4d081020c066f1fa7ab9b734d9b0cc90b491eeeabdc",
"vout": 0
}
],
"vout": [
{
"n": 0,
"scriptPubKey": {
"addresses": [
"moinqaiuWShfsemB9nGcAGFZNMa3ZwPMq6"
],
"asm": "OP_DUP OP_HASH160 59fe1a9f9f0a5af33396c59990f064be1ca51274 OP_EQUALVERIFY OP_CHECKSIG",
"hex": "76a91459fe1a9f9f0a5af33396c59990f064be1ca5127488ac",
"reqSigs": 1,
"type": "pubkeyhash"
},
"value": 0.01783446
}
],
"vsize": 85,
"weight": 340
}
}
Sign the raw transaction. I don't have access to the private keys, because they are stored in a HSM. To sign the transaction, I have to send the serialized transaction and the public key to the HSM endpoint. It signs the transaction with the private key, which belongs to the public key and returns the signature.
The signature looks like this:
3045022100f1f05b567ff95997c60c6ece7b78df1b3ed12d145551e41986a682b807f9adaf02201c914c74297b28a9564b17fd1e94710ed2ad0c32147b26e44e71fefdce51df9a
This is the public key:
3056301006072a8648ce3d020106052b8104000a034200045ca49382a5836bc13732efb3e66c5fd4ed159679517b7fdc48796e5b411af09f08d3a7b663610006f972162bd0f8f77a140782401f87b2f34f330777e59fb992
Decode the singed transaction. This is the decoded signed transaction:
{
"error": null,
"id": "1",
"result": {
"hash": "6d97a4e3239b375121b189ebb56af72c7f4111a03f1796e2ced241afe97d733a",
"locktime": 0,
"size": 224,
"txid": "6d97a4e3239b375121b189ebb56af72c7f4111a03f1796e2ced241afe97d733a",
"version": 1,
"vin": [
{
"scriptSig": {
"asm": "3045022100f1f05b567ff95997c60c6ece7b78df1b3ed12d145551e41986a682b807f9adaf02201c914c74297b28a9564b17fd1e94710ed2ad0c32147b26e44e71fefdce51df9a[ALL] 045ca49382a5836bc13732efb3e66c5fd4ed159679517b7fdc48796e5b411af09f08d3a7b663610006f972162bd0f8f77a140782401f87b2f34f330777e59fb992",
"hex": "483045022100f1f05b567ff95997c60c6ece7b78df1b3ed12d145551e41986a682b807f9adaf02201c914c74297b28a9564b17fd1e94710ed2ad0c32147b26e44e71fefdce51df9a0141045ca49382a5836bc13732efb3e66c5fd4ed159679517b7fdc48796e5b411af09f08d3a7b663610006f972162bd0f8f77a140782401f87b2f34f330777e59fb992"
},
"sequence": 4294967295,
"txid": "ccd36c5467ad0d9d1fa4f4d081020c066f1fa7ab9b734d9b0cc90b491eeeabdc",
"vout": 0
}
],
"vout": [
{
"n": 0,
"scriptPubKey": {
"addresses": [
"moinqaiuWShfsemB9nGcAGFZNMa3ZwPMq6"
],
"asm": "OP_DUP OP_HASH160 59fe1a9f9f0a5af33396c59990f064be1ca51274 OP_EQUALVERIFY OP_CHECKSIG",
"hex": "76a91459fe1a9f9f0a5af33396c59990f064be1ca5127488ac",
"reqSigs": 1,
"type": "pubkeyhash"
},
"value": 0.01763446
}
],
"vsize": 224,
"weight": 896
}
}
Broadcast the signed transaction with RPC sendrawtransaction:
{"id":"1","jsonrpc":"1.0","method":"sendrawtransaction","params":["0100000001dcabee1e490bc90c9b4d739baba71f6f060c0281d0f4a41f9d0dad67546cd3cc000000008b483045022100f1f05b567ff95997c60c6ece7b78df1b3ed12d145551e41986a682b807f9adaf02201c914c74297b28a9564b17fd1e94710ed2ad0c32147b26e44e71fefdce51df9a0141045ca49382a5836bc13732efb3e66c5fd4ed159679517b7fdc48796e5b411af09f08d3a7b663610006f972162bd0f8f77a140782401f87b2f34f330777e59fb992ffffffff0176e81a00000000001976a91459fe1a9f9f0a5af33396c59990f064be1ca5127488ac00000000"]}
I always get the following error:
{
"error": {
"code": -26,
"message": "mandatory-script-verify-flag-failed (Signature must be zero for failed CHECK(MULTI)SIG operation)"
},
"id": "1",
"result": null
}
I also tried to broadcast it on https://live.blockcypher.com/btc/pushtx. There I get the following error:
Error validating transaction: Error running script for input 0 referencing ccd36c5467ad0d9d1fa4f4d081020c066f1fa7ab9b734d9b0cc90b491eeeabdc at 0: Script was NOT verified successfully..
What is wrong with my transaction?