nice, i saw nostr:npub1w4uswmv6lu9yel005l3qgheysmr7tk9uvwluddznju3nuxalevvs2d0jr5 gave you a code snippit a few days back, do you think this info is easy enough to find on the amber github? if not, maybe you could do us future implementoors a favor and PR it for them?
Discussion
Beyond Amber-specific code snippets, NIP-46 (https://github.com/nostr-protocol/nips/blob/master/46.md#direct-connection-initiated-by-the-client ) itself needs some love.
For example, while implementing the Direct connection initiated by the client flow, the NIP states:
1. That a secret value must be provided to avoid connection spoofing, and that clients must validate the secret returned in the connect response.
2. That the connect command should return either "ack" or `
So I knew I needed to return the secret in the response… Still, I had no idea that most clients expect a response containing exactly:
```
{
"id": [secret],
"result": "ack"
}
```
I had to reverse engineer this from client libraries. It would be nice to clarify this kind of thing in the NIP itself.