Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NIP38: User Statuses #771

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open

NIP38: User Statuses #771

wants to merge 11 commits into from

Conversation

reyamir
Copy link
Contributor

@reyamir reyamir commented Feb 17, 2025

Description

Add support for create NIP38 event with EventBuilder. Close: #666

Usage:

// Send a General statuses event to relays
let general = LiveStatus {
    status_type: StatusType::General,
    expiration: None,
    reference: None,
};
let builder = EventBuilder::live_statuses(general, "Building rust-nostr", vec![]);
client.send_event_builder(builder).await?;

// Send a Music statuses event to relays
let music = LiveStatus {
    status_type: StatusType::Music,
    expiration: Some(Timestamp::now()),
    reference: Some("spotify:search:Intergalatic%20-%20Beastie%20Boys".into()),
};
let builder = EventBuilder::live_statuses(music, "Intergalatic - Beastie Boys", vec![]);
client.send_event_builder(builder).await?;

Notes to the reviewers

None

Checklist

@reyamir reyamir marked this pull request as ready for review February 19, 2025 00:21
Copy link
Member

@yukibtc yukibtc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I've marked some changes to do

@yukibtc
Copy link
Member

yukibtc commented Feb 19, 2025

Ah, and can you also mark NIP38 as supported in crates/nostr/README.md?

@reyamir
Copy link
Contributor Author

reyamir commented Feb 20, 2025

Ah, thank for your suggestions, I will update it later today.

@reyamir reyamir requested a review from yukibtc February 24, 2025 01:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NIP-38 support
2 participants