feat: init public notes
This commit is contained in:
13
src/modules/atproto/getAka.ts
Normal file
13
src/modules/atproto/getAka.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
export const getAka = async (dids: Set<string>) => {
|
||||
const correspondance = await Promise.all(
|
||||
[...dids].map(async (did) => {
|
||||
const response = await fetch(`https://plc.directory/${did}`)
|
||||
const {
|
||||
alsoKnownAs: [aka],
|
||||
} = await response.json()
|
||||
return [did, aka] as [string, string]
|
||||
}),
|
||||
)
|
||||
|
||||
return new Map(correspondance)
|
||||
}
|
||||
Reference in New Issue
Block a user