Skip to main content

profile_card_path

Function profile_card_path 

Source
pub fn profile_card_path(owner: &DidNostr) -> PodPath
Expand description

Returns the profile document’s path for owner: /pods/<pk>/profile/card.

§Panics

Does not panic: the path is built from a valid key and fixed segments, so it always parses.

§Examples

use stratum_node_core::{profile_card_path, DidNostr};

let owner = DidNostr::from_hex("79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798")?;
let path = profile_card_path(&owner);
assert_eq!(path.as_str(), format!("/pods/{}/profile/card", owner.to_hex()));
assert_eq!(path.owner(), owner);