ShockWallet shows "Unknown Recipient" when scanning ndebit - Profile lookup protocol mismatch #5
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
When scanning an ndebit with ShockWallet, the app displays "Unknown Recipient" even though the wallet service (Lightning.Pub) has published a valid Kind 0 profile to the relay specified in the ndebit.
Root Cause Analysis
After investigating the ShockWallet codebase (
shocknet/wallet), we discovered a protocol mismatch in how profile lookups are performed:How ndebit works (CLINK spec)
0: 32-byte wallet service public key1: Relay URL (recommended relay for finding the wallet service)2: Optional pointer identifierHow Lightning.Pub publishes profiles
name,display_name,about,pictureHow ShockWallet looks up profiles
From
wallet/app/store/sagas/users.ts:ShockWallet uses Gun RPC protocol for profile lookups, NOT standard Nostr Kind 0 queries.
It does not respect the relay hint embedded in the ndebit.
Evidence
Profile is correctly published and queryable:
Yet ShockWallet shows "Unknown Recipient" because it queries Gun RPC instead of Nostr.
Affected Components
wallet/app/store/sagas/users.tswallet/app/screens/Chats/View.jssrc/services/main/index.tsPossible Solutions
Option 1: Modify ShockWallet (Recommended)
Add fallback to query Nostr Kind 0 from the ndebit's relay hint when Gun RPC returns no profile:
Option 2: Modify Lightning.Pub
Make Lightning.Pub also publish profiles via Gun protocol. This is more complex and ties us to Gun infrastructure.
Option 3: Hybrid approach
Workaround (Current)
The CLINK debit flow itself works correctly - payments complete successfully. Only the UI display is affected.
For testing, we can use
test-debit.mjswhich doesn't require profile resolution.Related Files
packages/nostr-client/mock-machine.mjs- Mock ATM that works with CLINKpackages/nostr-client/test-debit.mjs- Test script proving CLINK flow workssrc/services/main/index.ts- Added Kind 0 profile publishingReferences
[reserved] migration number alignmentto ShockWallet shows "Unknown Recipient" when scanning ndebit - Profile lookup protocol mismatchMoved to shock-wallet repo: aiolabs/shock-wallet#3
This issue is specific to ShockWallet's profile lookup implementation and belongs in that repository.