Class PolykeyAgent

Hierarchy

  • CreateDestroyStartStop
    • PolykeyAgent

Constructors

Properties

[initLock]: RWLockWriter
acl: ACL
certManager: CertManager
clientService: ClientService
db: DB
discovery: Discovery
gestaltGraph: GestaltGraph
identitiesManager: IdentitiesManager
keyRing: KeyRing
logger: Logger
nodeConnectionManager: NodeConnectionManager
nodeGraph: NodeGraph
nodeManager: NodeManager
nodePath: string
notificationsManager: NotificationsManager
schema: Schema
sessionManager: SessionManager
sigchain: Sigchain
status: Status
taskManager: TaskManager
vaultManager: VaultManager
workerManager: undefined | PolykeyWorkerManagerInterface

Accessors

  • get [destroyed](): boolean
  • Returns boolean

  • get [eventHandled](): ReadonlyWeakSet<Event>
  • Returns ReadonlyWeakSet<Event>

  • get [eventHandlers](): ReadonlyMap<string, Set<EventHandlerInfo>>
  • Returns ReadonlyMap<string, Set<EventHandlerInfo>>

  • get [eventTarget](): EventTarget
  • Returns EventTarget

  • get [handleEventError](): ((evt) => void)
  • Returns ((evt) => void)

      • (evt): void
      • Parameters

        • evt: EventError

        Returns void

  • get [running](): boolean
  • Returns boolean

  • get [statusP](): Promise<Status>
  • Returns Promise<Status>

  • get [status](): Status
  • Returns Status

Methods

  • Parameters

    • type: string
    • callback: null | EventListenerOrEventListenerObject
    • Optional options: boolean | AddEventListenerOptions

    Returns void

  • Parameters

    • password: string

    Returns Promise<void>

  • Parameters

    • event: Event

    Returns boolean

  • Parameters

    • type: string
    • callback: null | EventListenerOrEventListenerObject
    • Optional options: boolean | EventListenerOptions

    Returns void

  • Parameters

    • __namedParameters: {
          fresh?: boolean;
          options?: Partial<PolykeyAgentStartOptions>;
          password: string;
          workers?: number;
      }
      • Optional fresh?: boolean
      • Optional options?: Partial<PolykeyAgentStartOptions>
      • password: string
      • Optional workers?: number

    Returns Promise<void>

  • Asynchronously stops the PolykeyAgent

    Returns Promise<void>

  • Create the Polykey Agent.

    All optional configuration is deep-merged with defaults.

    If any of the optional dependencies is injected, their lifecycle will not be managed by PolykeyAgent. Furthermore, if you inject an optional dependency, make sure you are injecting all upstream transitive dependencies at the same time. For example if you inject acl, you must also inject db.

    Parameters

    • __namedParameters: {
          fresh?: boolean;
          fs?: FileSystem;
          logger?: Logger;
          options?: {
              agentServiceHost?: string;
              agentServicePort?: number;
              client?: { connectTimeoutTime?: number | undefined; keepAliveTimeoutTime?: number | undefined; keepAliveIntervalTime?: number | undefined; };
              clientServiceHost?: string;
              clientServicePort?: number;
              ipv6Only?: boolean;
              keys?: ({ passwordOpsLimit?: { toString?: {} | undefined; toFixed?: {} | undefined; toExponential?: {} | undefined; toPrecision?: {} | undefined; valueOf?: {} | undefined; toLocaleString?: {} | undefined; readonly [brand]?: "PasswordOpsLimit" | undefined; } | undefined; passwordMemLimit?: { ...; } | undefined; strictMemoryL...) | ({ passwordOpsLimit?: { toString?: {} | undefined; toFixed?: {} | undefined; toExponential?: {} | undefined; toPrecision?: {} | undefined; valueOf?: {} | undefined; toLocaleString?: {} | undefined; readonly [brand]?: "PasswordOpsLimit" | undefined; } | undefined; ... 4 more ...; certRenewLeadTime?: number | undefined...) | ({ passwordOpsLimit?: { toString?: {} | undefined; toFixed?: {} | undefined; toExponential?: {} | undefined; toPrecision?: {} | undefined; valueOf?: {} | undefined; toLocaleString?: {} | undefined; readonly [brand]?: "PasswordOpsLimit" | undefined; } | undefined; ... 4 more ...; certRenewLeadTime?: number | undefined...) | ({ passwordOpsLimit?: { toString?: {} | undefined; toFixed?: {} | undefined; toExponential?: {} | undefined; toPrecision?: {} | undefined; valueOf?: {} | undefined; toLocaleString?: {} | undefined; readonly [brand]?: "PasswordOpsLimit" | undefined; } | undefined; ... 4 more ...; certRenewLeadTime?: number | undefined...);
              nodePath?: string;
              nodes?: { connectionIdleTimeoutTime?: number | undefined; connectionFindConcurrencyLimit?: number | undefined; connectionConnectTimeoutTime?: number | undefined; connectionKeepAliveTimeoutTime?: number | undefined; connectionKeepAliveIntervalTime?: number | undefined; connectionHolePunchIntervalTime?: number | undefined; rp...;
              rpc?: { callTimeoutTime?: number | undefined; parserBufferSize?: number | undefined; };
              seedNodes?: { [x: string & { readonly [brand]: "NodeIdEncoded"; }]: { host?: { [x: number]: string | undefined; toString?: {} | undefined; charAt?: {} | undefined; charCodeAt?: {} | undefined; concat?: {} | undefined; ... 46 more ...; readonly [brand]?: "Host" | undefined; } | { ...; } | undefined; port?: { ...; } | undefined; ...;
              workers?: number;
          };
          password: string;
      }
      • Optional fresh?: boolean
      • Optional fs?: FileSystem
      • Optional logger?: Logger
      • Optional options?: {
            agentServiceHost?: string;
            agentServicePort?: number;
            client?: { connectTimeoutTime?: number | undefined; keepAliveTimeoutTime?: number | undefined; keepAliveIntervalTime?: number | undefined; };
            clientServiceHost?: string;
            clientServicePort?: number;
            ipv6Only?: boolean;
            keys?: ({ passwordOpsLimit?: { toString?: {} | undefined; toFixed?: {} | undefined; toExponential?: {} | undefined; toPrecision?: {} | undefined; valueOf?: {} | undefined; toLocaleString?: {} | undefined; readonly [brand]?: "PasswordOpsLimit" | undefined; } | undefined; passwordMemLimit?: { ...; } | undefined; strictMemoryL...) | ({ passwordOpsLimit?: { toString?: {} | undefined; toFixed?: {} | undefined; toExponential?: {} | undefined; toPrecision?: {} | undefined; valueOf?: {} | undefined; toLocaleString?: {} | undefined; readonly [brand]?: "PasswordOpsLimit" | undefined; } | undefined; ... 4 more ...; certRenewLeadTime?: number | undefined...) | ({ passwordOpsLimit?: { toString?: {} | undefined; toFixed?: {} | undefined; toExponential?: {} | undefined; toPrecision?: {} | undefined; valueOf?: {} | undefined; toLocaleString?: {} | undefined; readonly [brand]?: "PasswordOpsLimit" | undefined; } | undefined; ... 4 more ...; certRenewLeadTime?: number | undefined...) | ({ passwordOpsLimit?: { toString?: {} | undefined; toFixed?: {} | undefined; toExponential?: {} | undefined; toPrecision?: {} | undefined; valueOf?: {} | undefined; toLocaleString?: {} | undefined; readonly [brand]?: "PasswordOpsLimit" | undefined; } | undefined; ... 4 more ...; certRenewLeadTime?: number | undefined...);
            nodePath?: string;
            nodes?: { connectionIdleTimeoutTime?: number | undefined; connectionFindConcurrencyLimit?: number | undefined; connectionConnectTimeoutTime?: number | undefined; connectionKeepAliveTimeoutTime?: number | undefined; connectionKeepAliveIntervalTime?: number | undefined; connectionHolePunchIntervalTime?: number | undefined; rp...;
            rpc?: { callTimeoutTime?: number | undefined; parserBufferSize?: number | undefined; };
            seedNodes?: { [x: string & { readonly [brand]: "NodeIdEncoded"; }]: { host?: { [x: number]: string | undefined; toString?: {} | undefined; charAt?: {} | undefined; charCodeAt?: {} | undefined; concat?: {} | undefined; ... 46 more ...; readonly [brand]?: "Host" | undefined; } | { ...; } | undefined; port?: { ...; } | undefined; ...;
            workers?: number;
        }
        • Optional agentServiceHost?: string
        • Optional agentServicePort?: number
        • Optional client?: { connectTimeoutTime?: number | undefined; keepAliveTimeoutTime?: number | undefined; keepAliveIntervalTime?: number | undefined; }
        • Optional clientServiceHost?: string
        • Optional clientServicePort?: number
        • Optional ipv6Only?: boolean
        • Optional keys?: ({ passwordOpsLimit?: { toString?: {} | undefined; toFixed?: {} | undefined; toExponential?: {} | undefined; toPrecision?: {} | undefined; valueOf?: {} | undefined; toLocaleString?: {} | undefined; readonly [brand]?: "PasswordOpsLimit" | undefined; } | undefined; passwordMemLimit?: { ...; } | undefined; strictMemoryL...) | ({ passwordOpsLimit?: { toString?: {} | undefined; toFixed?: {} | undefined; toExponential?: {} | undefined; toPrecision?: {} | undefined; valueOf?: {} | undefined; toLocaleString?: {} | undefined; readonly [brand]?: "PasswordOpsLimit" | undefined; } | undefined; ... 4 more ...; certRenewLeadTime?: number | undefined...) | ({ passwordOpsLimit?: { toString?: {} | undefined; toFixed?: {} | undefined; toExponential?: {} | undefined; toPrecision?: {} | undefined; valueOf?: {} | undefined; toLocaleString?: {} | undefined; readonly [brand]?: "PasswordOpsLimit" | undefined; } | undefined; ... 4 more ...; certRenewLeadTime?: number | undefined...) | ({ passwordOpsLimit?: { toString?: {} | undefined; toFixed?: {} | undefined; toExponential?: {} | undefined; toPrecision?: {} | undefined; valueOf?: {} | undefined; toLocaleString?: {} | undefined; readonly [brand]?: "PasswordOpsLimit" | undefined; } | undefined; ... 4 more ...; certRenewLeadTime?: number | undefined...)
        • Optional nodePath?: string
        • Optional nodes?: { connectionIdleTimeoutTime?: number | undefined; connectionFindConcurrencyLimit?: number | undefined; connectionConnectTimeoutTime?: number | undefined; connectionKeepAliveTimeoutTime?: number | undefined; connectionKeepAliveIntervalTime?: number | undefined; connectionHolePunchIntervalTime?: number | undefined; rp...
        • Optional rpc?: { callTimeoutTime?: number | undefined; parserBufferSize?: number | undefined; }
        • Optional seedNodes?: { [x: string & { readonly [brand]: "NodeIdEncoded"; }]: { host?: { [x: number]: string | undefined; toString?: {} | undefined; charAt?: {} | undefined; charCodeAt?: {} | undefined; concat?: {} | undefined; ... 46 more ...; readonly [brand]?: "Host" | undefined; } | { ...; } | undefined; port?: { ...; } | undefined; ...
        • Optional workers?: number
      • password: string

    Returns Promise<PolykeyAgent>

Generated using TypeDoc