Skip to content

Commit

Permalink
Deprecate Agent.accountDid in favor of Agent.assertDid
Browse files Browse the repository at this point in the history
  • Loading branch information
matthieusieben committed Aug 26, 2024
1 parent ec2e426 commit bbca17b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/orange-geese-punch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@atproto/api": patch
---

Deprecate Agent.accountDid in favor of Agent.assertDid
7 changes: 6 additions & 1 deletion packages/api/src/agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,10 +203,15 @@ export class Agent extends XrpcClient {
return this.sessionManager.did
}

/** @deprecated Use {@link Agent.assertDid} instead */
get accountDid() {
return this.assertDid
}

/**
* Get the authenticated user's DID, or throw an error if not authenticated.
*/
public get accountDid(): string {
get assertDid(): string {
this.assertAuthenticated()
return this.did
}
Expand Down

0 comments on commit bbca17b

Please sign in to comment.