Skip to content

Commit fb11192

Browse files
fix(docs): update phase1 plan attestation examples to pipe delimiters
Example code in the implementation plan still used colon delimiters. Updated all attestation format strings and assertions to use pipes, matching the actual implementation.
1 parent e885e5b commit fb11192

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

docs/plans/2026-03-31-heartwood-phase1.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -798,8 +798,8 @@ fn blind_proof_round_trip() {
798798
assert!(proof.purpose.is_none());
799799
assert!(proof.index.is_none());
800800

801-
// Attestation format: "nsec-tree:own:{master_hex}:{child_hex}"
802-
assert!(proof.attestation.starts_with("nsec-tree:own:"));
801+
// Attestation format: "nsec-tree:own|{master_hex}|{child_hex}"
802+
assert!(proof.attestation.starts_with("nsec-tree:own|"));
803803
assert_eq!(proof.signature.len(), 128); // 64 bytes as hex
804804

805805
// Verify
@@ -818,9 +818,9 @@ fn full_proof_round_trip() {
818818
assert_eq!(proof.purpose.as_deref(), Some("social"));
819819
assert_eq!(proof.index, Some(0));
820820

821-
// Attestation format: "nsec-tree:link:{master_hex}:{child_hex}:social:0"
822-
assert!(proof.attestation.starts_with("nsec-tree:link:"));
823-
assert!(proof.attestation.ends_with(":social:0"));
821+
// Attestation format: "nsec-tree:link|{master_hex}|{child_hex}|social|0"
822+
assert!(proof.attestation.starts_with("nsec-tree:link|"));
823+
assert!(proof.attestation.ends_with("|social|0"));
824824

825825
// Verify
826826
assert!(verify_proof(&proof).unwrap());
@@ -833,7 +833,7 @@ fn tampered_attestation_fails_verification() {
833833
let child = derive(&root, "social", Some(0)).unwrap();
834834

835835
let mut proof = create_blind_proof(&root, &child).unwrap();
836-
proof.attestation = "nsec-tree:own:0000:0000".to_string();
836+
proof.attestation = "nsec-tree:own|0000|0000".to_string();
837837

838838
assert!(!verify_proof(&proof).unwrap());
839839
}
@@ -860,7 +860,7 @@ pub fn create_blind_proof(
860860
let master_hex = master_hex_from_root(root)?;
861861
let child_hex = bytes_to_hex(&child.public_key);
862862

863-
let attestation = format!("nsec-tree:own:{}:{}", master_hex, child_hex);
863+
let attestation = format!("nsec-tree:own|{}|{}", master_hex, child_hex);
864864
let signature = sign_attestation(root, &attestation)?;
865865

866866
Ok(LinkageProof {
@@ -882,7 +882,7 @@ pub fn create_full_proof(
882882
let child_hex = bytes_to_hex(&child.public_key);
883883

884884
let attestation = format!(
885-
"nsec-tree:link:{}:{}:{}:{}",
885+
"nsec-tree:link|{}|{}|{}|{}",
886886
master_hex, child_hex, child.purpose, child.index
887887
);
888888
let signature = sign_attestation(root, &attestation)?;

0 commit comments

Comments
 (0)