refactor: add getHomeserver

Adds getHomeserver method.
Updates example app.
Bumps version to 0.10.2.
Updates README.md.
This commit is contained in:
coreyphillips
2025-03-22 12:41:30 -04:00
parent 45190e6a29
commit 989b7252a0
19 changed files with 1860 additions and 1644 deletions

View File

@@ -22,6 +22,7 @@ import {
session,
deleteFile,
getSignupToken,
getHomeserver,
} from '@synonymdev/react-native-pubky';
const HOMESERVER = '8pinxxgqs41n4aididenw5apqp1urfmzdztr8jt4abrkdn435ewo';
@@ -190,6 +191,23 @@ export default function App() {
}
}}
/>
<Button
title={'getHomeserver'}
onPress={async (): Promise<void> => {
try {
const res = await getHomeserver(
PUBLIC_KEY // Public key
);
if (res.isErr()) {
console.log(res.error.message);
return;
}
console.log(res.value);
} catch (e) {
console.log(e);
}
}}
/>
<Button
title={'signout'}
onPress={async (): Promise<void> => {