Skip to content

Commit 0cea884

Browse files
committed
Expose EventBuilder::gift_wrap_from_seal
1 parent 56dc7f7 commit 0cea884

File tree

5 files changed

+338
-200
lines changed

5 files changed

+338
-200
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
* Expose `Alphabet`, `SingleLetterTag` and `Filter` ([Yuki Kishimoto])
3636
* Expose `Client::fetch_events` ([Yuki Kishimoto])
3737
* Expose `EventBuilder::seal` ([Yuki Kishimoto])
38+
* Expose `EventBuilder::gift_wrap_from_seal` ([Yuki Kishimoto])
3839

3940
### Fixed
4041

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,17 @@ abstract class EventBuilder implements RustOpaqueInterface {
2020
/// Set a custom `created_at` UNIX timestamp
2121
EventBuilder customCreatedAt({required BigInt createdAt});
2222

23+
/// Gift Wrap from seal
24+
///
25+
/// <https://github.com/nostr-protocol/nips/blob/master/59.md>
26+
static Event giftWrapFromSeal(
27+
{required PublicKey receiver,
28+
required Event seal,
29+
required List<Tag> extraTags}) =>
30+
NostrSdk.instance.api
31+
.crateApiProtocolEventBuilderEventBuilderGiftWrapFromSeal(
32+
receiver: receiver, seal: seal, extraTags: extraTags);
33+
2334
/// New event builder
2435
factory EventBuilder({required int kind, required String content}) =>
2536
NostrSdk.instance.api.crateApiProtocolEventBuilderEventBuilderNew(

0 commit comments

Comments
 (0)