Agent

Usage:

import { Agent } from '@web3-storage/access/agent'

Type Parameters

Hierarchy

  • Agent

Constructors

Properties

#data: AgentData
connection: ConnectionView<S>
url: URL

Accessors

Methods

  • Get all the proofs matching the capabilities.

    Proofs are delegations with an audience matching agent DID, or with an audience matching the session DID.

    Proof of session will also be included in the returned proofs if any proofs matching the passed capabilities require it.

    Parameters

    • Optional caps: CapabilityQuery[]

      Capabilities to filter by. Empty or undefined caps with return all the proofs.

    • Optional options: {
          sessionProofIssuer: undefined | `did:${string}:${string}`;
      }
      • sessionProofIssuer: undefined | `did:${string}:${string}`

        only include session proofs for this issuer

    Returns Delegation<Capabilities>[]

  • Sets the current selected space

    Other methods will default to use the current space if no resource is defined

    Parameters

    • space: `did:key:${string}`

    Returns Promise<`did:key:${string}`>

Generated using TypeDoc