Skip to content

With two separate instances, no message appears when sending encrypted message to other instance #8

@mazz

Description

@mazz

In two separate terminals I have nostr running. When I attempt to send a private message to the public key of instance 2, I see no message appear.

I obtain the public key of Instance 2 using NostrBasics.Keys.PublicKey.to_npub(pubkey)

NostrApp.send_encrypted_direct_messages("npub1ngza9xfjwyt5xqktjt03aac6lnjzqvn8lskmvfpargya8k6rrkasswux8u", "hello")

Instance 1:

.iex.local.exs

relays = [
  "wss://relay.nostr.bg",
  "wss://relay.nostr.pro"
]

nsec = "nsec...lg"
{:ok, pkey} = NostrBasics.Keys.PrivateKey.from_nsec(nsec)
NostrApp.start_link(relays, pkey)

{:ok, pubkey} = NostrBasics.Keys.PublicKey.from_private_key(pkey)
NostrApp.timeline(pubkey)
NostrApp.encrypted_direct_messages

Instance 2:

.iex.local.exs

relays = [
  "wss://relay.nostr.bg",
  "wss://relay.nostr.pro"
]

nsec = "nsec...ru"
{:ok, pkey} = NostrBasics.Keys.PrivateKey.from_nsec(nsec)
NostrApp.start_link(relays, pkey)

{:ok, pubkey} = NostrBasics.Keys.PublicKey.from_private_key(pkey)
NostrApp.timeline(pubkey)
NostrApp.encrypted_direct_messages

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions