[SDK] Validate and brand the persisted account did (#11387)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Samuel Newman
2026-08-13 22:26:22 +03:00
committed by GitHub
parent 9fe0084874
commit 3677c98873
46 changed files with 154 additions and 205 deletions
+3 -3
View File
@@ -1,4 +1,4 @@
import {AtUri} from '@atproto/syntax'
import {type AtIdentifierString, AtUri} from '@atproto/syntax'
import {parse} from 'psl'
import TLDs from 'tlds'
@@ -43,8 +43,8 @@ export function makeRecordUri(
rkey: string,
) {
const urip = new AtUri('at://placeholder.placeholder/')
// @ts-expect-error TODO new-sdk-migration
urip.host = didOrName
// the helper takes the did or handle as a plain string
urip.host = didOrName as AtIdentifierString
urip.collection = collection
urip.rkey = rkey
return urip.toString()