<p>The 'wallet import format' (WIF) is a standardized way of encoding a private key so that other wallets can recognize it. You could use it to import the private key to your node's wallet, and then sign and send the transaction from there, but I think thats different than what you want to do: keep the private keys on the mobile, but broadcast signed transactions from your node.</p>

<p>The <code>bitcoin-cli</code> command you'll want is <code>sendrawtransaction</code>, but in order to make this work you'll need to get a signed raw transaction hex to use as input. So you'll need a mobile wallet that can provide you with the signed raw transaction, and do so without broadcasting it to the network. </p>

<p>Use <code>bitcoin-cli help sendrawtransaction</code> for more detail on the command. </p>

<p>As another option, you could use a mobile wallet which allows you to manually connect to the desired node. This would accomplish a similar result. </p>

CC BY-SA 4.0
2018-07-16T06:50:52.060Z
Great, you are right that I want to keep the private keys on the mobile, so this sounds like what I want. Thanks
Barney Chambers
CC BY-SA 4.0
2018-07-16T06:46:47.140Z
2018-07-16T06:46:47.140Z
chytrik
<p>I have my Bitcoin WIF on a mobile application, and I want to use a Bitcoin-cli node running externally on a server to broadcast my transaction request from my mobile device. I cannot use <code>SendToAddress</code> because that CLI command can only be run on a node when the Bitcoins are on that node.</p>

<p>What Bitcoin-cli command do I use, to send coins from my mobile application's wallet, to another address? </p>

<bitcoin-core><bitcoin-cli><mobile><cli>
How to broadcast transaction through Bitcoin-cli on public node
Barney Chambers
# How to broadcast transaction through Bitcoin-cli on public node

(Asked by: username_0 on 2018-07-16)

I have my Bitcoin WIF on a mobile application, and I want to use a Bitcoin-cli node running externally on a server to broadcast my transaction request from my mobile device. I cannot use `SendToAddress` because that CLI command can only be run on a node when the Bitcoins are on that node.

What Bitcoin-cli command do I use, to send coins from my mobile application's wallet, to another address?

**Tags:** bitcoin-core, bitcoin-cli, mobile, cli


---

## 1 answers

### Answer by username_1 on 2018-07-16. Score: 1 | Accepted answer

The 'wallet import format' (WIF) is a standardized way of encoding a private key so that other wallets can recognize it. You could use it to import the private key to your node's wallet, and then sign and send the transaction from there, but I think thats different than what you want to do: keep the private keys on the mobile, but broadcast signed transactions from your node.

The `bitcoin-cli` command you'll want is `sendrawtransaction`, but in order to make this work you'll need to get a signed raw transaction hex to use as input. So you'll need a mobile wallet that can provide you with the signed raw transaction, and do so without broadcasting it to the network.

Use `bitcoin-cli help sendrawtransaction` for more detail on the command.

As another option, you could use a mobile wallet which allows you to manually connect to the desired node. This would accomplish a similar result.

> **Comments:**
> **username_0**: Great, you are right that I want to keep the private keys on the mobile, so this sounds like what I want. Thanks  

---

