event icon indicating copy to clipboard operation
event copied to clipboard

Extended message signing and verification ability in CLN node implementation

Open cherry-1729-9090 opened this issue 5 months ago • 0 comments

Description

Relates to PR : #2945 Related to issue : #2922

PR #2945 introduced extended message signing capabilities (signing messages with on-chain Bitcoin addresses) for LND, LNC, and Embedded Node backends. However, Core Lightning (CLN) has incomplete support for this feature.

Current State of CLN Message Signing Support :

What Works :

  • Message Signing with Address: CLN REST API provides signmessagewithkey endpoint
  • Lightning Message Signing/Verification: Standard CLN message signing using node keys works normally

What's Missing :

  • Message Verification with Address: CLN REST API does not provide an equivalent verification endpoint for address-based signatures

Solution in This PR This PR implements a temporary UI solution while we wait for CLN to add the missing verification API:

  • Disables address-based message verification for CLN backends by setting supportsAddressMessageVerification as false
  • Adds proper error handling with a clear user-facing message explaining the limitation
  • Maintains full functionality for other backends (LND, LNC, Embedded Node)

For CLN users:

  • [x] Can sign messages with on-chain addresses
  • [x] Can sign/verify messages with Lightning node keys (standard flow)
  • [ ] Cannot verify address-based signatures (shows clear "not supported" message)

For other backends:

  • [x] Full address-based signing and verification support (unchanged)

https://github.com/user-attachments/assets/c020cfd1-c94f-4db1-86b6-c3c367aa2a8a

image

This pull request is categorized as a:

  • [x] New feature
  • [ ] Bug fix
  • [ ] Code refactor
  • [ ] Configuration change
  • [x] Locales update
  • [ ] Quality assurance
  • [ ] Other

Checklist

  • [x] I’ve run yarn run tsc and made sure my code compiles correctly
  • [x] I’ve run yarn run lint and made sure my code didn’t contain any problematic patterns
  • [x] I’ve run yarn run prettier and made sure my code is formatted correctly
  • [x] I’ve run yarn run test and made sure all of the tests pass

Testing

If you modified or added a utility file, did you add new unit tests?

  • [ ] No, I’m a fool
  • [ ] Yes
  • [x] N/A

I have tested this PR on the following platforms (please specify OS version and phone model/VM):

  • [x] Android
  • [ ] iOS

I have tested this PR with the following types of nodes (please specify node version and API version where appropriate):

  • [x] Embedded LND
  • [x] LND (REST)
  • [x] LND (Lightning Node Connect)
  • [x] Core Lightning (CLNRest)
  • [ ] Nostr Wallet Connect
  • [ ] LndHub

Locales

  • [x] I’ve added new locale text that requires translations
  • [ ] I’m aware that new translations should be made on the ZEUS Transfix page and not directly to this repo

Third Party Dependencies and Packages

  • [ ] Contributors will need to run yarn after this PR is merged in
  • [ ] 3rd party dependencies have been modified:
    • verify that package.json and yarn.lock have been properly updated
    • verify that dependencies are installed for both iOS and Android platforms

Other:

  • [ ] Changes were made that require an update to the README
  • [ ] Changes were made that require an update to onboarding

cherry-1729-9090 avatar Jun 30 '25 15:06 cherry-1729-9090