Add protected chapter

This commit is contained in:
Jon Staab
2026-05-20 12:27:22 -07:00
parent f0d49c6fb8
commit 8ad0bc393b
8 changed files with 675 additions and 5 deletions
+4 -2
View File
@@ -13,7 +13,9 @@ fn fixed_secret() -> SecretKey {
}
fn build_hashed(content: &str, tags: Vec<Tag>) -> HashedEvent {
EventContent::new(content, tags)
EventContent::new()
.content(content)
.tags(tags)
.kind(1)
.stamp(1_700_000_000)
.own(fixed_secret().public_key())
@@ -29,7 +31,7 @@ fn sign_fixture() -> Event {
#[test]
fn pipeline_progresses_through_types() {
let content = EventContent::new("hi", Tags::new());
let content = EventContent::new().content("hi").tags(Tags::new());
let template: EventTemplate = content.kind(1);
let stamped: StampedEvent = template.stamp(1_700_000_000);
let owned: OwnedEvent = stamped.own(fixed_secret().public_key());