@oxyhq/core 1.10.0 → 1.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oxyhq/core",
3
- "version": "1.10.0",
3
+ "version": "1.11.0",
4
4
  "description": "OxyHQ SDK Foundation — API client, authentication, cryptographic identity, and shared utilities",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -85,6 +85,25 @@ export function OxyServicesUserMixin<T extends typeof OxyServicesBase>(Base: T)
85
85
  }
86
86
  }
87
87
 
88
+ /**
89
+ * Resolve a fediverse handle to an Oxy user profile.
90
+ * Performs WebFinger discovery and returns the user, or null if not found.
91
+ * @param handle - Fediverse handle (e.g. "@user@mastodon.social" or "user@domain")
92
+ */
93
+ async resolveProfile(handle: string): Promise<User | null> {
94
+ try {
95
+ const result = await this.makeRequest<{ data: User | null }>('GET', '/profiles/resolve', {
96
+ handle,
97
+ }, {
98
+ cache: true,
99
+ cacheTTL: 24 * 60 * 60 * 1000, // 24h cache — matches server-side staleness window
100
+ });
101
+ return result.data ?? null;
102
+ } catch {
103
+ return null;
104
+ }
105
+ }
106
+
88
107
  /**
89
108
  * Get profile recommendations
90
109
  */