A callback used to initialize the promise. This callback is passed two arguments: a resolve callback used to resolve the promise with a value or the result of another promise, and a reject callback used to reject the promise with a provided reason or error.
Protected_Shared mutable reference to the signer, propagated through all chain links
Readonly[toStatic Readonly[species]ProtectedsignerThe signer used to sign the event (reads from shared ref)
Sets the NIP-31 alt tag for the event
Sets the event signer to use when building this event
Attaches a callback for only the rejection of the Promise.
A Promise for the completion of the callback.
ProtectedchainCustom .then method that wraps the resulting promise in a new event factory
Sets the event content
Sets the NIP-36 content-warning tag for the event
Set the event created_at timestamp in seconds. if no value is provided, the current unix timestamp will be used
Optionalcreated: number | DateSets the encrypted content of the event
Optionaloverride: EncryptionMethodSets the NIP-40 expiration timestamp for the event
Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The resolved value cannot be modified from the callback.
Optionalonfinally: (() => void) | nullThe callback to execute when the Promise is settled (fulfilled or rejected).
A Promise for the completion of the callback.
Sets the meta tags for the event
Modifies the events hidden tags array
Modifies the events public tags array
Modifies the events public and optional hidden tags
Sets the NIP-70 "-" tag for the event
Sets the parent message "e" tag for NIP-17 reply threading
Signs the event using a signer interface and returns a Promise
Optionalsigner: EventSignerStamps the pubkey onto the event template
Optionalsigner: EventSignerStrips the pubkey, sig, and id from the event
Sets the text content of the message
Optionaloptions: TextContentOptionsAttaches callbacks for the resolution and/or rejection of the Promise.
Optionalonfulfilled: ((value: WrappedMessageTemplate) => TResult1 | PromiseLike<TResult1>) | nullThe callback to execute when the Promise is resolved.
Optionalonrejected: ((reason: any) => TResult2 | PromiseLike<TResult2>) | nullThe callback to execute when the Promise is rejected.
A Promise for the completion of which ever callback is executed.
StaticallCreates a Promise that is resolved with an array of results when all of the provided Promises resolve, or rejected when any Promise is rejected.
An array of Promises.
A new Promise.
StaticallCreates a Promise that is resolved with an array of results when all of the provided Promises resolve or reject.
An array of Promises.
A new Promise.
StaticanyThe any function returns a promise that is fulfilled by the first given promise to be fulfilled, or rejected with an AggregateError containing an array of rejection reasons if all of the given promises are rejected. It resolves all elements of the passed iterable to promises as it runs this algorithm.
An array or iterable of Promises.
A new Promise.
The any function returns a promise that is fulfilled by the first given promise to be fulfilled, or rejected with an AggregateError containing an array of rejection reasons if all of the given promises are rejected. It resolves all elements of the passed iterable to promises as it runs this algorithm.
A new Promise.
StaticcreateCreates a new wrapped message.
A single recipient pubkey or an array of recipient pubkeys
The plaintext message content
StaticfromStaticfromStaticraceStaticrejectCreates a new rejected promise for the provided reason.
Optionalreason: anyThe reason the promise was rejected.
A new rejected Promise.
StaticreplyCreates a reply to a wrapped message
StaticresolveCreates a new resolved promise.
A resolved promise.
Creates a new Promise.