I want to define a type of link that goes from an “Agent ID” entry (the entry where the hashed content is the public key of an agent) to one of my own entry types.
Based on the docs for entry!
and the docs for link!
, it seems that when you’re defining a link coming from a system entry, you should choose the “from” direction and specify the “other entry type” as the name of that system entry.
Like this
#[entry_def]
fn foo_def() -> ValidatingEntryType {
entry!(
name: "foo",
description: "bar",
sharing: Sharing::Public,
validation_package: || { hdk::ValidationPackageDefiniton::Entry },
validation: | my_entry: hdk::EntryValidationData<Foo>| { Ok(()) },
links: [
link!(
direction: hdk::LinkDirection::From,
other_type: "..." // what do I put for agent ID?
link_type: "baz",
validation_package: || { hdk::ValidationPackageDefinition::Entry },
validation: |_, _, _| Ok(()),
)
]
)
}
However, as pointed out in the above code snippet, I don’t know what to put for other_type
. What should I put for other_type
?