Skip to content

Instantly share code, notes, and snippets.

@vdhanan
Created April 1, 2024 21:56
Show Gist options
  • Save vdhanan/0a0498c9e672d44e0e51331c78510f80 to your computer and use it in GitHub Desktop.
Save vdhanan/0a0498c9e672d44e0e51331c78510f80 to your computer and use it in GitHub Desktop.
diff --git a/keyserver/src/keyserver.js b/keyserver/src/keyserver.js
index bb64717ecf..b26eac4570 100644
--- a/keyserver/src/keyserver.js
+++ b/keyserver/src/keyserver.js
@@ -52,10 +52,19 @@ import {
getWebAppURLFacts,
getWebAppCorsConfig,
} from './utils/urls.js';
+import { getRustAPI } from 'rust-node-addon';
const shouldDisplayQRCodeInTerminal = false;
void (async () => {
+ const rustAPI = await getRustAPI();
+ const farcasterUsers = await rustAPI.getFarcasterUsers([
+ '111',
+ '1234',
+ '111111111',
+ ]);
+ console.log('got the following users:', farcasterUsers);
+
const [webAppCorsConfig] = await Promise.all([
getWebAppCorsConfig(),
olm.init(),
@vdhanan
Copy link
Author

vdhanan commented Apr 1, 2024

[NODEM] got the following users: [
[NODEM]   {
[NODEM]     userID: 'farcastertest1',
[NODEM]     username: 'farcastertest1address',
[NODEM]     farcasterID: '111'
[NODEM]   },
[NODEM]   {
[NODEM]     userID: '7A78B516-A2B5-4B75-8303-E837D687AFB5',
[NODEM]     username: '0x99e50e331C296aF9E2A99aCC3Cb1E66F1d25EBfB',
[NODEM]     farcasterID: '1234'
[NODEM]   }
[NODEM] ]

(FID 111111111 was not associated with a comm user, so we expect to get nothing back for it)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment