<p>1) First you can add <code>connect=1.1.1.1</code> to your <code>bitcoin.conf</code>. Your node won't search for other nodes and just try to connect to 1.1.1.1. Since 1.1.1.1 is not a node, your node will have 0 peers.</p>

<p>2) Then you can make the transaction, open the debug console and enter: <code>gettransaction YOURTXID</code>. (or <code>getrawtransaction</code> to get the hex encoded transaction)</p>

<p>3) Then you can close Core, add <a href="https://bitcoin.stackexchange.com/q/45988"><code>zapwallettxes=1</code></a> to <code>bitcoin.conf</code> and start Core to remove unconfirmed wallet transaction you've made to cancel it.</p>

CC BY-SA 4.0
2020-07-17T18:19:04.657Z
Thank you. Took me a long time to test it but I can now confirm it works as intended.
Jernej
CC BY-SA 4.0
2020-05-08T17:27:51.857Z
2020-05-08T17:27:51.857Z
MCCCS
<p>I would like to use Bitcoin core's wallet UI to create a transaction but instead of broadcasting it I would like to get the underlying raw transaction.</p>

<p>Is there a way to do that? </p>

<p>I assume that network sniffing tools might be able to help but I wonder if there is a direct way. I think it would be really useful to have such feature - view raw transaction &amp; confirm before broadcast.</p>

<p>The motivation for this specific scenario is the following  - I would like to create a raw transaction on an offline machine running Bitcoin core (with synced blockhain) and broadcast the transaction from another machine.</p>

<p>I am aware that what I am asking for is easily achievable with the CLI but I'd like to use the convenience of a GUI (&amp; fee calculations) and also avoid creating non-intended transactions.</p>

<bitcoin-core><transactions><wallet><raw-transaction>
Bitcoin core - creating transaction from UI without broadcasting it
Jernej
# Bitcoin core - creating transaction from UI without broadcasting it

(Asked by: username_0 on 2020-05-08)

I would like to use Bitcoin core's wallet UI to create a transaction but instead of broadcasting it I would like to get the underlying raw transaction.

Is there a way to do that?

I assume that network sniffing tools might be able to help but I wonder if there is a direct way. I think it would be really useful to have such feature - view raw transaction & confirm before broadcast.

The motivation for this specific scenario is the following - I would like to create a raw transaction on an offline machine running Bitcoin core (with synced blockhain) and broadcast the transaction from another machine.

I am aware that what I am asking for is easily achievable with the CLI but I'd like to use the convenience of a GUI (& fee calculations) and also avoid creating non-intended transactions.

**Tags:** bitcoin-core, transactions, wallet, raw-transaction


---

## 1 answers

### Answer by username_1 on 2020-05-08. Score: 1 | Accepted answer

1) First you can add `connect=1.1.1.1` to your `bitcoin.conf`. Your node won't search for other nodes and just try to connect to 1.1.1.1. Since 1.1.1.1 is not a node, your node will have 0 peers.

2) Then you can make the transaction, open the debug console and enter: `gettransaction YOURTXID`. (or `getrawtransaction` to get the hex encoded transaction)

3) Then you can close Core, add [`zapwallettxes=1`](https://bitcoin.stackexchange.com/q/45988) to `bitcoin.conf` and start Core to remove unconfirmed wallet transaction you've made to cancel it.

> **Comments:**
> **username_0**: Thank you. Took me a long time to test it but I can now confirm it works as intended.  

---

