Skip to main content

Crate pubky_messenger

Crate pubky_messenger 

Source
Expand description

§Pubky Messenger

A Rust library for secure private messaging using the Pubky protocol.

§Features

  • End-to-end encrypted messaging
  • Authentication via pkarr recovery files
  • Message signature verification
  • Profile and contact management

§Example

use pubky_messenger::PrivateMessengerClient;
use pkarr::PublicKey;

// Load recovery file
let recovery_file = std::fs::read("recovery.pkarr")?;

// Create client
let client = PrivateMessengerClient::from_recovery_file(&recovery_file, Some("passphrase"))?;

// Sign in
client.sign_in().await?;

// Send a message
let recipient = PublicKey::try_from("recipient_public_key")?;
client.send_message(&recipient, "Hello, world!").await?;

// Get messages
let messages = client.get_messages(&recipient).await?;

Structs§

DecryptedMessage
A decrypted message for application use
FollowedUser
A user that is being followed
Keypair
Ed25519 keypair to sign dns Packets.
PrivateMessage
A private message with encrypted sender and content
PrivateMessengerClient
Main client for private messaging
PubkyProfile
Profile information from Pubky
PublicKey
Ed25519 public key to verify a signature over dns Packets.

Enums§

Language
Language to be used for the mnemonic phrase.