Closed lxx14 closed 4 years ago
second addInput should have a vout of 0.
you used 1 where you should use 0
Thank you very match for fast answer, I am change my input, but nothing changed in wallet on the testnet... here is my decoding transaction:
{
"addresses": [
"mmXt7ZkAkUvyj9BxDekCw5WdAPtf8eZfZj",
"mfaLp8mBCa3mvD5kMn2LQgAQ5RXVyFabZ8"
],
"block_height": -1,
"block_index": -1,
"confirmations": 0,
"double_spend": false,
"fees": 2434121,
"hash": "c91f81c80b4882b9a679995d48160f852d9c52884338e690e4b8444370a6544b",
"inputs": [
{
"addresses": [
"mmXt7ZkAkUvyj9BxDekCw5WdAPtf8eZfZj"
],
"age": 1580302,
"output_index": 0,
"output_value": 2784121,
"prev_hash": "68d915a19d50b2139139dcdfced41eba509a654ec93c65c9793b6bdd0f73064b",
"script": "473044022002c247ad9054b9492feeb2258bd264deb1d936c2967a04325bb36e7ce38d32bc022054b5d8f3f628ce067b73a2b4690745e115edc466314b50f1aa3bb1bcc0582cb0012102b819bee332f189035a50588eca61290323adedc1023b9864e61d9112a87fe260",
"script_type": "pay-to-pubkey-hash",
"sequence": 4294967295
},
{
"addresses": [
"mmXt7ZkAkUvyj9BxDekCw5WdAPtf8eZfZj"
],
"age": 1580391,
"output_index": 0,
"output_value": 2976363,
"prev_hash": "5b2e76f3916e7e10ca55ef638e668f8dc0a01fed5acb10535f456d17c8a021cb",
"script": "4730440220757e8267a560588a15cd325e465694933983440a3203e411e6331a7aaa6d938f022063bb5ff584f06f33c7554ad67be0b23b301ba71619b3b5a47adf9bd5e15e01a4012102b819bee332f189035a50588eca61290323adedc1023b9864e61d9112a87fe260",
"script_type": "pay-to-pubkey-hash",
"sequence": 4294967295
}
],
"outputs": [
{
"addresses": [
"mfaLp8mBCa3mvD5kMn2LQgAQ5RXVyFabZ8"
],
"script": "76a91400a40ba55fd64a77ce70676299be9a59e566201188ac",
"script_type": "pay-to-pubkey-hash",
"value": 3276363
},
{
"addresses": [
"mmXt7ZkAkUvyj9BxDekCw5WdAPtf8eZfZj"
],
"script": "76a91441fdae40c88b74fda388833bdd152f6833778a1688ac",
"script_type": "pay-to-pubkey-hash",
"value": 50000
}
],
"preference": "high",
"received": "2019-10-08T07:21:53.710669043Z",
"relayed_by": "52.91.241.203",
"size": 372,
"total": 3326363,
"ver": 2,
"vin_sz": 2,
"vout_sz": 2
}
This is wallet from:
https://live.blockcypher.com/btc-testnet/address/mmXt7ZkAkUvyj9BxDekCw5WdAPtf8eZfZj/
This is wallet to:
https://live.blockcypher.com/btc-testnet/address/mfaLp8mBCa3mvD5kMn2LQgAQ5RXVyFabZ8/
BTC not moved from first wallet to second....
You didn't broadcast the transaction.
You need to send the signed transaction to a node to get it relayed to the network.
I broadcasted it for you.
Here's the details: https://testnet.smartbit.com.au/tx/c91f81c80b4882b9a679995d48160f852d9c52884338e690e4b8444370a6544b
Next time, you can POST the transaction to this endpoint for the API you are using:
https://www.blockcypher.com/dev/bitcoin/#push-raw-transaction-endpoint
POST to:
https://api.blockcypher.com/v1/btc/test3/txs/push
With {"tx":"02000000.......00000000"}
Which contains your transaction.
thank you very very very match))
I began to understand much more
I can't use bitcoinjs-lib and bip39,How do you use them in react-native? thank you very match
Can anybody describe me where I made mistake. I want to transfer btc from 2 transactions in 1st address to 2nd address, I can sign transaction? decode it? buuuut... In testnet my bitcoins dont move (below my code):