1

i try to send a transaction to bitcoin testnet for about 3 days now but i can't success... Probably someone can help and give me some example code.

What i try to do:

I'm writing some payment functionality in the stellar network, where people can pay with btc. Therefore i generate a bitcoin address/WIF and save this in my db.

I then please the customer to pay on this address. I check all transactions from the bitcoin network and when i get a payment on this address i want to either move the btc to some other btc-address or refund the amount (minus fee) to the source btc-address.

I'm running a full node (https://hub.docker.com/r/kylemanna/bitcoind/) and checking the transaction works great.

But for the transfers i'm stuck somehow. I'm new to bitcoin, so this might probably be the reason ...

I'm building the service with go(lang) and using the https://github.com/btcsuite so far. I'm connecting via rpcclient.

The only resources i found on the web for this is: https://www.thepolyglotdeveloper.com/2018/03/create-sign-bitcoin-transactions-golang/

Till now i tried the following UTXO: f3a38acecbd9faaaebc8cb8fd88cb535388060f35923b60e6a7f185b4bb35a4f

(https://live.blockcypher.com/btc-testnet/tx/f3a38acecbd9faaaebc8cb8fd88cb535388060f35923b60e6a7f185b4bb35a4f/)

The WIF-String for "n18HgZaBAT3r7PmdLE6jxxHUCQbi65neiQ" is "cNtsnL67rYr3r2nX6vyZrDrBGk4cKbvcMKS6wmfnzRwCCYiA4Soj"

The signed transaction i created so far are all valid and i can paste them into https://live.blockcypher.com/btc-testnet/pushtx/ but i always get an error that there's a missing reference for the transactions. My docker-node returns "Missing inputs".

If someone could give some complete example, on how to create this transaction, i would be very very happy.

Many thanks.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.