Skip to content

Commit 56dc7f7

Browse files
committed
Expose EventBuilder::seal
1 parent 0961b47 commit 56dc7f7

File tree

5 files changed

+343
-194
lines changed

5 files changed

+343
-194
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
* Expose `EventId` ([Yuki Kishimoto])
3535
* Expose `Alphabet`, `SingleLetterTag` and `Filter` ([Yuki Kishimoto])
3636
* Expose `Client::fetch_events` ([Yuki Kishimoto])
37+
* Expose `EventBuilder::seal` ([Yuki Kishimoto])
3738

3839
### Fixed
3940

lib/src/rust/api/protocol/event/builder.dart

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,16 @@ abstract class EventBuilder implements RustOpaqueInterface {
3030
/// Only values `> 0` are accepted!
3131
EventBuilder pow({required int difficulty});
3232

33+
/// Seal
34+
///
35+
/// <https://github.com/nostr-protocol/nips/blob/master/59.md>
36+
static Future<EventBuilder> seal(
37+
{required NostrSigner signer,
38+
required PublicKey receiverPubkey,
39+
required UnsignedEvent rumor}) =>
40+
NostrSdk.instance.api.crateApiProtocolEventBuilderEventBuilderSeal(
41+
signer: signer, receiverPubkey: receiverPubkey, rumor: rumor);
42+
3343
/// Build, sign and return event
3444
Future<Event> sign({required NostrSigner signer});
3545

0 commit comments

Comments
 (0)