Closed nicolasburtey closed 4 years ago
I guess that my encoding method does expect a description, but I can modify it to not require one
Can you show the code for signature? Does it work if you specify tokens in createSignedRequest
?
I asked for clarification on lightning-rfc regarding the description part.
Can you show the code for signature?
Maybe I'm mistaken your question, but I'm using:
const {signature} = await lnService.signMessage({lnd, message: hash});
Does it work if you specify tokens in createSignedRequest?
createSignedRequest doesn't take token as an argument. it takes an array of tags + hrm (which contain the amount).
I put up a fix for the empty description issue, can you try that out?
Ok one thing I would try changing is instead of using signMessage
, use signBytes
Here is an example code you can follow: https://github.com/alexbosworth/ln-service/blob/master/test/signerrpc-integration/test_sign_bytes.js#L13
trying now. Seems SignBytes is not mentioned in the method in the readme. Don't know if this is intentional.
Is this in some ways the derivation path used by lnd to get the private key of the node (that correspond to the public key broadcasted publicly) ?
key_family: 6,
key_index: 0,
trying now. Seems SignBytes is not mentioned in the method in the readme. Don't know if this is intentional.
You're right, it should be mentioned in the readme but it's not there
Is this in some ways the derivation path used by lnd to get the private key of the node (that correspond to the public key broadcasted publicly) ?
key_family: 6, key_index: 0,
That's the identity key, you can use getPublicKey
to see the public key at family 6, index 0
createSignedRequest doesn't take token as an argument. it takes an array of tags + hrm (which contain the amount).
You're right on this, I just saw it taking tokens in the test but that was superfluous
has time to made more tests. it's working. thanks!
If I run this:
I have the following issue:
ExpectedPaymentDescriptionOrDescriptionHashForPayReq
I can add a description field to get the error away (but I believe memo are optional, not mandatory?)
If I run the full script, I'm running into this issue
ExpectedValidSignatureForSignedPaymentRequest
:Any idea what I'm doing wrong here?