mirror of
https://github.com/aljazceru/react-native-pubky.git
synced 2026-02-22 23:44:51 +01:00
feat: republish homeserver
Adds republishHomeserver method. Upgrades bindings. Updates README.md.
This commit is contained in:
@@ -160,6 +160,21 @@ export async function signUp(
|
||||
}
|
||||
}
|
||||
|
||||
export async function republishHomeserver(
|
||||
secretKey: string,
|
||||
homeserver: string
|
||||
): Promise<Result<string>> {
|
||||
try {
|
||||
const res = await Pubky.republishHomeserver(secretKey, homeserver);
|
||||
if (res[0] === 'error') {
|
||||
return err(res[1]);
|
||||
}
|
||||
return ok(res[1]);
|
||||
} catch (e) {
|
||||
return err(JSON.stringify(e));
|
||||
}
|
||||
}
|
||||
|
||||
export async function signIn(secretKey: string): Promise<Result<SessionInfo>> {
|
||||
try {
|
||||
const res = await Pubky.signIn(secretKey);
|
||||
|
||||
Reference in New Issue
Block a user