import { Web5Rpc, DidRequest, VcResponse, DidResponse, DwnResponse, DidInterface, DwnInterface, SendVcRequest, SendDwnRequest, ProcessVcRequest, ProcessDwnRequest, Web5PlatformAgent, AgentPermissionsApi } from '@web5/agent'; import { BearerDid } from '@web5/dids'; import { AgentDidApi, AgentDwnApi, AgentSyncApi, AgentCryptoApi, AgentKeyManager, HdIdentityVault, LocalKeyManager, AgentIdentityApi } from '@web5/agent'; /** * Initialization parameters for {@link Web5IdentityAgent}, including an optional recovery phrase that * can be used to derive keys to encrypt the vault and generate a DID. */ export type AgentInitializeParams = { /** * The password used to secure the Agent vault. * * The password selected should be strong and securely managed to prevent unauthorized access. */ password: string; /** * An optional recovery phrase used to deterministically generate the cryptographic keys for the * Agent vault. * * Supplying this phrase enables the vault's contents to be restored or replicated across devices. * If omitted, a new phrase is generated, which should be securely recorded for future recovery needs. */ recoveryPhrase?: string; }; export type AgentStartParams = { /** * The password used to unlock the previously initialized Agent vault. */ password: string; }; export type AgentParams = { /** Optional. The Decentralized Identifier (DID) representing this Web5 User Agent. */ agentDid?: BearerDid; /** Encrypted vault used for managing the Agent's DID and associated keys. */ agentVault: HdIdentityVault; /** Provides cryptographic capabilties like signing, encryption, hashing and key derivation. */ cryptoApi: AgentCryptoApi; /** Specifies the local path to be used by the Agent's persistent data stores. */ dataPath?: string; /** Facilitates DID operations including create, update, and resolve. */ didApi: AgentDidApi; /** Facilitates DWN operations including processing and sending requests. */ dwnApi: AgentDwnApi; /** Facilitates decentralized Identity operations including create, import, and export. */ identityApi: AgentIdentityApi; /** Responsible for securely managing the cryptographic keys of the agent. */ keyManager: TKeyManager; /** Facilitates fetching, requesting, creating, revoking and validating revocation status of permissions */ permissionsApi: AgentPermissionsApi; /** Remote procedure call (RPC) client used to communicate with other Web5 services. */ rpcClient: Web5Rpc; /** Facilitates data synchronization of DWN records between nodes. */ syncApi: AgentSyncApi; }; export declare class Web5IdentityAgent implements Web5PlatformAgent { crypto: AgentCryptoApi; did: AgentDidApi; dwn: AgentDwnApi; identity: AgentIdentityApi; keyManager: TKeyManager; permissions: AgentPermissionsApi; rpc: Web5Rpc; sync: AgentSyncApi; vault: HdIdentityVault; private _agentDid?; constructor(params: AgentParams); get agentDid(): BearerDid; set agentDid(did: BearerDid); /** * If any of the required agent components are not provided, instantiate default implementations. */ static create({ dataPath, agentDid, agentVault, cryptoApi, didApi, dwnApi, identityApi, keyManager, permissionsApi, rpcClient, syncApi }?: Partial): Promise; firstLaunch(): Promise; /** * Initializes the User Agent with a password, and optionally a recovery phrase. * * This method is typically called once, the first time the Agent is launched, and is responsible * for setting up the agent's operational environment, cryptographic key material, and readiness * for processing Web5 requests. * * The password is used to secure the Agent vault, and the recovery phrase is used to derive the * cryptographic keys for the vault. If a recovery phrase is not provided, a new recovery phrase * will be generated and returned. The password should be chosen and entered by the end-user. */ initialize({ password, recoveryPhrase }: AgentInitializeParams): Promise; processDidRequest(request: DidRequest): Promise>; processDwnRequest(request: ProcessDwnRequest): Promise>; processVcRequest(_request: ProcessVcRequest): Promise; sendDidRequest(_request: DidRequest): Promise>; sendDwnRequest(request: SendDwnRequest): Promise>; sendVcRequest(_request: SendVcRequest): Promise; start({ password }: AgentInitializeParams): Promise; } //# sourceMappingURL=identity-agent.d.ts.map