<p>Guggero from lightningcommunity.slack.com told me:</p>
<blockquote>
<p>The v2 signmessage isn‘t used by the CLI and the signature format is also different. Look at the v1 signmessage, that signs with the node key and is used by lncli. The v2 here isn‘t really an upgrade, the two signmessage RPCs have completely different use cases. Unfortunately that‘s not very apparent when only looking at the REST URLs</p>
</blockquote>
<p>So I shouldn't be using v2 if I am to compare the results of <code>lncli signmessage</code>.</p>
<p>True enough, when you use v1 you get the expected signature.</p>

CC BY-SA 4.0
2021-06-07T00:18:56.980Z
2021-06-07T00:18:56.980Z
Ramon Tayag
<p>Talking to just one node (baby steps), I want to call <a href="https://api.lightning.community/#v2-signer-verifymessage" rel="nofollow noreferrer"><code>/v2/signer/verifymessage</code></a> giving the output of <code>lncli signmessage &quot;Hello, Jessica&quot;</code>. On the <code>alice</code> node on <a href="https://lightningpolar.com/" rel="nofollow noreferrer">Polar</a>, I get:</p>
<pre><code>d9aa91ggo54ouho9axcw3itokb5u697tigi1r8o1kq4qkx87acduoz5f5wnxyts8dt8emhie9r3gnkxkwo5ogzo5xwsrfkhzpg5qnnmh
</code></pre>
<p>How do I encode this to send over to <code>/v2/signer/verifymessage</code>? I'm only slightly familiar with low-level string manipulation. The <a href="https://api.lightning.community/#v2-signer-verifymessage" rel="nofollow noreferrer">api</a> says to send bytes, but what format (hoping this question makes sense)?</p>
<p>If it helps, I'm comfortable with <a href="https://ruby-doc.org/core-2.2.2/Array.html#method-i-pack" rel="nofollow noreferrer">Ruby</a>, but I can probably figure it out if I see examples in JS or Python.</p>

<lightning-network><lightning-network-daemon>
How to encode for LND `/v2/signer/verifymessage`?
Ramon Tayag
# How to encode for LND `/v2/signer/verifymessage`?

(Asked by: username_0 on 2021-06-06)

Talking to just one node (baby steps), I want to call [`/v2/signer/verifymessage`](https://api.lightning.community/#v2-signer-verifymessage) giving the output of `lncli signmessage "Hello, Jessica"`. On the `alice` node on [Polar](https://lightningpolar.com/), I get:

```
d9aa91ggo54ouho9axcw3itokb5u697tigi1r8o1kq4qkx87acduoz5f5wnxyts8dt8emhie9r3gnkxkwo5ogzo5xwsrfkhzpg5qnnmh

```

How do I encode this to send over to `/v2/signer/verifymessage`? I'm only slightly familiar with low-level string manipulation. The [api](https://api.lightning.community/#v2-signer-verifymessage) says to send bytes, but what format (hoping this question makes sense)?

If it helps, I'm comfortable with [Ruby](https://ruby-doc.org/core-2.2.2/Array.html#method-i-pack), but I can probably figure it out if I see examples in JS or Python.

**Tags:** lightning-network, lightning-network-daemon


---

## 1 answers

### Answer by username_0 on 2021-06-07. Score: 0

Guggero from lightningcommunity.slack.com told me:

> The v2 signmessage isn‘t used by the CLI and the signature format is also different. Look at the v1 signmessage, that signs with the node key and is used by lncli. The v2 here isn‘t really an upgrade, the two signmessage RPCs have completely different use cases. Unfortunately that‘s not very apparent when only looking at the REST URLs

So I shouldn't be using v2 if I am to compare the results of `lncli signmessage`.

True enough, when you use v1 you get the expected signature.


---

