Represents a pending access request. It can be used to poll for the requested delegation.

Hierarchy

  • PendingAccessRequest

Constructors

Properties

Accessors

Methods

Constructors

  • Parameters

    • model: {
          agent: Agent<Service>;
          audience: `did:${string}:${string}`;
          expiration: number;
          provider: `did:web:${string}`;
          request: Link<unknown, number, number, 1>;
      }
      • agent: Agent<Service>
        • Agent handling interaction.
      • audience: `did:${string}:${string}`
        • Principal requesting an access.
      • expiration: number
        • Seconds in UTC.
      • provider: `did:web:${string}`
        • Provider handling request.
      • request: Link<unknown, number, number, 1>
        • Link to the access/authorize invocation.

    Returns PendingAccessRequest

Properties

model: {
    agent: Agent<Service>;
    audience: `did:${string}:${string}`;
    expiration: number;
    provider: `did:web:${string}`;
    request: Link<unknown, number, number, 1>;
}

Type declaration

  • agent: Agent<Service>
    • Agent handling interaction.
  • audience: `did:${string}:${string}`
    • Principal requesting an access.
  • expiration: number
    • Seconds in UTC.
  • provider: `did:web:${string}`
    • Provider handling request.
  • request: Link<unknown, number, number, 1>
    • Link to the access/authorize invocation.

Accessors

  • get audience(): `did:${string}:${string}`
  • Returns `did:${string}:${string}`

  • get expiration(): Date
  • Returns Date

  • get provider(): `did:web:${string}`
  • Returns `did:web:${string}`

  • get request(): Link<any, number, number, 1>
  • Returns Link<any, number, number, 1>

Methods

  • Continuously polls delegations until this request is approved or expired. Returns a GrantedAccess object (view over the delegations) that can be used in the invocations or can be saved in the agent (store) using .save() method.

    Parameters

    • Optional options: {
          interval?: number;
          signal?: AbortSignal;
      }
      • Optional interval?: number
      • Optional signal?: AbortSignal

    Returns Promise<Result<GrantedAccess, Error>>

Generated using TypeDoc