<p>For readers, this issue has been resolved <a href="https://github.com/ElementsProject/lightning/issues/3533" rel="nofollow noreferrer">here</a>.</p>

<p>Note that Gabriele's syntax was correct but that you currently cannot use unconfirmed UTXOs with <code>txprepare</code> [1] ! The documentation has been update accordingly.</p>

<p>[1] This caused <code>lightningd</code> to crash but has been fixed by now. </p>

CC BY-SA 4.0
2020-02-20T12:37:58.843Z
2020-02-20T12:37:58.843Z
Antoine Poinsot
<p>Well,
It seems that this format works:</p>

<pre><code>lightning-cli txprepare "[{\"destinationaddress\":\"all\"}]" slow 1 "[\"txid:1\"]"
</code></pre>

<p>It is  also logic from an encoding point of view but for a reason I don't know, I always mistake something.</p>

CC BY-SA 4.0
2020-02-17T15:54:50.073Z
2020-02-17T15:54:50.073Z
Gabriele Domenichini
<p>I have tried many different forms but I cannot prepare a transaction with <code>lightning-cli txprepare</code> from the Linux prompt.</p>

<pre><code>lightning-cli txprepare [{\"bc1qvzr0mwps952d0cdmchyd2pe5rlee5tfces5dzf\":\"all\"}] slow 1 [c2ff...:1]
lightning-cli: Incorrect 'id' in response: null

lightning-cli txprepare "[{\"bc1qvzr0mwps952d0cdmchyd2pe5rlee5tfces5dzf\":\"all\"}]" slow 1 "[c2ff...:1]"
lightning-cli: Incorrect 'id' in response: null
</code></pre>

<p>and many other trials.</p>

<p>What is the correct syntax?
How is it possible to avoid the double quote issue in the shell?
Is it possible to have an actual example of what SHOULD work?</p>

<p>Thank you.</p>

<lightning-network><core-lightning>
Exact syntax for lightning-cli txprepare
Gabriele Domenichini
# Exact syntax for lightning-cli txprepare

(Asked by: username_0 on 2020-02-17)

I have tried many different forms but I cannot prepare a transaction with lightning-cli txprepare from the Linux prompt.
lightning-cli txprepare [{\"bc1qvzr0mwps952d0cdmchyd2pe5rlee5tfces5dzf\":\"all\"}] slow 1 [c2ff...:1]
lightning-cli: Incorrect 'id' in response: null

lightning-cli txprepare "[{\"bc1qvzr0mwps952d0cdmchyd2pe5rlee5tfces5dzf\":\"all\"}]" slow 1 "[c2ff...:1]"
lightning-cli: Incorrect 'id' in response: null

and many other trials.
What is the correct syntax?
How is it possible to avoid the double quote issue in the shell?
Is it possible to have an actual example of what SHOULD work?
Thank you.

**Tags:** lightning-network, core-lightning


---

## 2 answers

### Answer by username_1 on 2020-02-20. Score: 2

For readers, this issue has been resolved [here](https://github.com/ElementsProject/lightning/issues/3533).

Note that Gabriele's syntax was correct but that you currently cannot use unconfirmed UTXOs with `txprepare` [1] ! The documentation has been update accordingly.

[1] This caused `lightningd` to crash but has been fixed by now.


---

### Answer by username_0 on 2020-02-17. Score: 0

Well,
It seems that this format works:
lightning-cli txprepare "[{\"destinationaddress\":\"all\"}]" slow 1 "[\"txid:1\"]"

It is  also logic from an encoding point of view but for a reason I don't know, I always mistake something.


---

