Skip to main content

FinalizeUnsignedWithId

Trait FinalizeUnsignedWithId 

Source
pub trait FinalizeUnsignedWithId {
    // Required method
    fn finalize_unsigned_with_id(self, public_key: PublicKey) -> UnsignedEvent;
}
Expand description

Finalize into an UnsignedEvent with the event id already computed.

nostr 0.44’s EventBuilder::build populated id; 0.45’s finalize_unsigned deliberately leaves it None so a caller can mine NIP-13 PoW before the id is fixed. Vector never mines rumors and reads .id throughout the send pipeline (pending-message keys, retry payloads, edit ids), where a None is a runtime failure the compiler can’t see. This restores the old semantics at every call site that wants an addressable rumor.

Required Methods§

Source

fn finalize_unsigned_with_id(self, public_key: PublicKey) -> UnsignedEvent

Finalize and compute the id.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl FinalizeUnsignedWithId for EventBuilder

Implementors§