import { AgentCryptoApi, AgentDidApi, AgentDwnApi, AgentIdentityApi, AgentKeyManager, AgentPermissionsApi, AgentSyncApi, DidInterface, DidRequest, DidResponse, DwnInterface, DwnResponse, LocalKeyManager, ProcessDwnRequest, ProcessVcRequest, SendDwnRequest, SendVcRequest, VcResponse, Web5PlatformAgent, Web5Rpc } from '@web5/agent'; import { BearerDid } from '@web5/dids'; import { AgentInitializeParams } from '@web5/user-agent'; import { DcxIdentityVault } from './index.js'; export type DcxAgentInitializeParams = { /** * 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; dwnEndpoints: string[]; }; export type DcxAgentStartParams = { /** * The password used to unlock the previously initialized Agent vault. */ password: string; }; export type DcxAgentParams = { /** 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: DcxIdentityVault; /** 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 DcxAgent implements Web5PlatformAgent { crypto: AgentCryptoApi; did: AgentDidApi; dwn: AgentDwnApi; identity: AgentIdentityApi; keyManager: TKeyManager; permissions: AgentPermissionsApi; rpc: Web5Rpc; sync: AgentSyncApi; vault: DcxIdentityVault; private _agentDid?; constructor(params: DcxAgentParams); 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, dwnEndpoints, }: DcxAgentInitializeParams): 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=dcx-agent.d.ts.map