Type Parameters

  • T

    Agent

Hierarchy

  • Agent

Constructors

Properties

#fetch: ((input: URL | RequestInfo, init?: RequestInit) => Promise<Response>)

Type declaration

    • (input: URL | RequestInfo, init?: RequestInit): Promise<Response>
    • Parameters

      • input: URL | RequestInfo
      • Optional init: RequestInit

      Returns Promise<Response>

#service: undefined | Principal<"key">
connection: ConnectionView<Service>
data: AgentData<T>
issuer: T
store: IStore<T>
url: URL

Methods

  • Query the delegations store for all the delegations matching the capabilities provided.

    Parameters

    • Optional caps: Capability<Ability, `${string}:${string}`, any>[]

    Returns AsyncGenerator<{
        delegation: Delegation<Capabilities>;
        meta?: DelegationMeta;
    }, void, unknown>

  • Parameters

    • Optional opts: {
          signal: undefined | AbortSignal;
      }
      • signal: undefined | AbortSignal

    Returns Promise<Delegation<[{}]>>

  • Add a proof to the agent store

    A proof is a delegation with an audience matching agent DID

    Parameters

    • delegation: Delegation<Capabilities>

    Returns Promise<void>

  • Creates a space signer and a delegation to the agent

    Parameters

    • name: string

    Returns Promise<{
        did: `did:key:${string}`;
        proof: Delegation<[ToDeriveClaim<{}>]>;
    }>

  • Get current space DID, proofs and abilities

    Returns Promise<undefined | {
        capabilities: any[];
        did: `did:${string}:${string}`;
        proofs: Delegation<Capabilities>[];
    }>

  • Get delegations created by the agent for others.

    Parameters

    • Optional caps: Capability<Ability, `${string}:${string}`, any>[]

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

    Returns AsyncGenerator<Delegation<Capabilities>, void, unknown>

  • Get delegations created by the agent for others and their metadata.

    Parameters

    • Optional caps: Capability<Ability, `${string}:${string}`, any>[]

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

    Returns AsyncGenerator<{
        delegation: Delegation<Capabilities>;
        meta?: DelegationMeta;
    }, void, unknown>

  • Execute the given capability on the Access service connection

    Type Parameters

    • A extends Ability

    • R extends `${string}:${string}` & Phantom<{}, R>

    • CAP extends TheCapabilityParser<CapabilityMatch<A, R, C>, CAP>

    • C extends Caveats = {}

    Parameters

    Returns Promise<InferServiceInvocationReturn<InferInvokedCapability<CAP>, Service>>

  • Get all the proofs matching the capabilities

    Proofs are delegations with an audience matching agent DID.

    Parameters

    • Optional caps: Capability<Ability, `${string}:${string}`, any>[]

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

    Returns Promise<Delegation<Capabilities>[]>

  • Invokes voucher/redeem for the free tier, wait on the websocket for the voucher/claim and invokes it

    It also adds a full space delegation to the service in the voucher/claim invocation to allow for recovery

    Parameters

    • email: string
    • Optional opts: {
          signal: undefined | AbortSignal;
      }
      • signal: undefined | AbortSignal

    Returns Promise<void>

  • Sets the current selected space

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

    Parameters

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

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

Generated using TypeDoc