Documentation
    Preparing search index...

    Concrete Ed25519 key pair for an agent.

    Construct via AgentKeyPair.load_or_create: it reads the private key from the given IAgentKeyStore, or generates and persists a new one when the store is empty.

    Implements

    Index

    Methods

    • Returns this agent's identifier (hex-encoded Ed25519 public key).

      Returns string

      Hex-encoded AgentId.

    • Signs data with the agent's Ed25519 private key.

      Parameters

      • data: Uint8Array

        Bytes to sign.

      Returns Uint8Array

      Raw 64-byte Ed25519 signature.

    • Loads the agent's key pair from the store, generating and persisting a new one when the store holds no key. If the store doesn't contain a key yet, a new random Ed25519 private key is generated and stored. If the store contains an invalid key, an error is thrown.

      Parameters

      Returns Promise<AgentKeyPair>

      The loaded or newly created key pair.

      Error if the store contains an invalid key.