Skip to content

feat: nip01event immutable light#348

Merged
frnandu merged 1 commit intofix-websocket-performance-issues-2-refactor-nip-01from
fix/nip-01-immutable-light
Dec 22, 2025
Merged

feat: nip01event immutable light#348
frnandu merged 1 commit intofix-websocket-performance-issues-2-refactor-nip-01from
fix/nip-01-immutable-light

Conversation

@frnandu
Copy link
Collaborator

@frnandu frnandu commented Dec 22, 2025

No description provided.

@frnandu frnandu requested a review from 1-leo December 22, 2025 14:26
Copy link
Contributor

@1-leo 1-leo left a comment

Choose a reason for hiding this comment

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

This review is a bit messy. I started by commenting on every occurrence but noticed that it does not make sense. Find and replace will do this in ms

Its basically

instead of

  final event = Nip01Event(

do

final event = Nip01Utils.createEventCalculateId(

in our own code so we "future proof " it already.

Has the benefit that we can easily switch to async calc id where possible.

// broadcast a new event using the logged in account with it's signer to sign
NdkBroadcastResponse response = ndk.broadcast.broadcast(
nostrEvent: Nip01EventService.createEventCalculateId(
nostrEvent: Nip01Event(
Copy link
Contributor

Choose a reason for hiding this comment

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

In the example, we should advise using the new method. Using Nip01Utils

Copy link
Contributor

Choose a reason for hiding this comment

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

applies to all examples

);

final requestEvent = Nip01EventService.createEventCalculateId(
final requestEvent = Nip01Event(
Copy link
Contributor

Choose a reason for hiding this comment

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

In our own code we should use the new method. Using Nip01Utils

Copy link
Contributor

Choose a reason for hiding this comment

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

applies to all occurrences

NostrMessageRaw nostrMsg;
try {
nostrMsg = await IsolateManager.instance
.runInEncodingIsolate<String, NostrMessageRaw>(
Copy link
Contributor

Choose a reason for hiding this comment

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

as discussed, we can leave it for now and I try to do this in the isolate manager (web support)

@frnandu frnandu merged commit c65eaaa into fix-websocket-performance-issues-2-refactor-nip-01 Dec 22, 2025
3 checks passed
@frnandu frnandu changed the title nip01event immutable light feat: nip01event immutable light Mar 23, 2026
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.

2 participants