From 8b03387f58a042bb7ccc6b7d01de1ddf2f1ddd99 Mon Sep 17 00:00:00 2001 From: Liran Cohen Date: Wed, 16 Oct 2024 17:28:36 -0400 Subject: [PATCH] add doc comments --- packages/agent/src/identity-api.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/packages/agent/src/identity-api.ts b/packages/agent/src/identity-api.ts index 1e51cb85c..f35bab22a 100644 --- a/packages/agent/src/identity-api.ts +++ b/packages/agent/src/identity-api.ts @@ -218,10 +218,24 @@ export class AgentIdentityApi { return getDwnServiceEndpointUrls(didUri, this.agent.did); } + /** + * Sets the DWN endpoints for the given DID. + * + * @param didUri - The DID URI to set the DWN endpoints for. + * @param endpoints - The array of DWN endpoints to set. + * @throws An error if the DID is not found, or if an update cannot be performed. + */ public async setDwnEndpoints({ didUri, endpoints }: { didUri: string; endpoints: string[] }): Promise { const bearerDid = await this.agent.did.get({ didUri }); if (!bearerDid) {