Class Agent

An Agent is a user or machine that can write data to an Atomic Server. An Agent might not have subject, sometimes. https://atomicdata.dev/classes/Agent

Hierarchy

  • Agent

Implements

Constructors

  • Parameters

    • privateKey: string
    • Optional subject: string

    Returns Agent

Properties

client: Client
privateKey: string
publicKey?: string
subject?: string

URL of the Agent

Methods

  • Returns a base64 encoded JSON object containing the Subject and the Private Key. Used for signing in with one string

    Returns string

  • Returns public key or generates one using the private key

    Returns Promise<string>

  • Fetches the public key for the agent, checks if it matches with the current one

    Returns Promise<void>

  • Parses a base64 JSON object containing a privateKey and subject, and constructs an Agent from that.

    Parameters

    • secretB64: string

    Returns Agent

Generated using TypeDoc