Skip to content

openagents_sdk::profiles

Public profiles and published agents' owners (#12254, #12255).

A person's profile is a kind 0 event their own key signs; the apps publish it to a relay themselves. What this module calls is the rest:

  • The account's name@openagents.com name, as the app's session (GET, PUT, and DELETE /v1/device/name).
  • A published agent's own key and the NIP-OA owner tag the owner's client signs for it (GET, PUT /v1/published-agents/{id}/owner).
ItemWhat it does
AccountName structThe account's name and the key it points at, or no name.
AgentOwner structWhat the owner of a published agent signs, and who owns it now.
OwnerSet structThe answer after the owner's tag was accepted.

AccountName

pub struct AccountName {
    pub name: Option<String>,
    pub pubkey: Option<String>,
}

The account's name and the key it points at, or no name.

AgentOwner

pub struct AgentOwner {
    pub agent: String,
    pub npub: String,
    pub conditions: String,
    pub preimage: String,
    pub owner: Option<String>,
    pub revoked: bool,
}

What the owner of a published agent signs, and who owns it now.

OwnerSet

pub struct OwnerSet {
    pub agent: String,
    pub npub: String,
    pub owner: String,
    pub published: u64,
}

The answer after the owner's tag was accepted.