@githat/nextjs 0.2.7 → 0.2.8
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/README.md +5 -6
- package/dist/index.d.mts +1 -4
- package/dist/index.d.ts +1 -4
- package/dist/index.js +1 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -25,7 +25,7 @@ GitHat is your backend. This SDK connects your app to `api.githat.io` with pre-b
|
|
|
25
25
|
- **Server-Side Auth** — Verify tokens, wrap API routes, and inject auth headers
|
|
26
26
|
- **Customer Data API** — Store and query app data in GitHat's managed DynamoDB
|
|
27
27
|
- **Multi-Tenant** — Organizations, team invitations, and role-based access — managed by GitHat's backend
|
|
28
|
-
- **
|
|
28
|
+
- **Agent Verification** — Verify AI agents on-chain
|
|
29
29
|
- **Dark Theme Included** — Import `@githat/nextjs/styles` for a polished dark UI out of the box
|
|
30
30
|
- **TypeScript First** — Full type definitions for every component, hook, and utility
|
|
31
31
|
- **Dual Output** — Ships ESM + CJS so it works everywhere
|
|
@@ -194,7 +194,7 @@ That's it. You now have a fully authenticated app with sign-in, sign-up, route p
|
|
|
194
194
|
| Component | Description | Props |
|
|
195
195
|
|------------------|--------------------------------------------|--------------------------------------------------|
|
|
196
196
|
| `ProtectedRoute` | Redirects unauthenticated users to sign-in | `children`, `fallback?` |
|
|
197
|
-
| `VerifiedBadge` | Displays
|
|
197
|
+
| `VerifiedBadge` | Displays agent verification status | `type: 'agent'`, `identifier`, `label?` |
|
|
198
198
|
|
|
199
199
|
### Example: Password Reset Flow
|
|
200
200
|
|
|
@@ -274,8 +274,8 @@ import { VerifiedBadge } from '@githat/nextjs';
|
|
|
274
274
|
export default function AgentCard() {
|
|
275
275
|
return (
|
|
276
276
|
<div>
|
|
277
|
-
<h3>My
|
|
278
|
-
<VerifiedBadge type="
|
|
277
|
+
<h3>My Agent</h3>
|
|
278
|
+
<VerifiedBadge type="agent" identifier="0xABC...123" label="Verified" />
|
|
279
279
|
</div>
|
|
280
280
|
);
|
|
281
281
|
}
|
|
@@ -346,8 +346,7 @@ const {
|
|
|
346
346
|
fetch, // <T>(path: string, init?: RequestInit) => Promise<T>
|
|
347
347
|
getUserOrgs, // () => Promise<{ orgs: GitHatOrg[] }>
|
|
348
348
|
|
|
349
|
-
//
|
|
350
|
-
verifyMCP, // (domain: string) => Promise<{ verified: boolean }>
|
|
349
|
+
// Agent Verification
|
|
351
350
|
verifyAgent, // (wallet: string) => Promise<{ verified: boolean }>
|
|
352
351
|
|
|
353
352
|
// Organization Metadata
|
package/dist/index.d.mts
CHANGED
|
@@ -87,9 +87,6 @@ declare function useGitHat(): {
|
|
|
87
87
|
getUserOrgs: () => Promise<{
|
|
88
88
|
orgs: GitHatOrg[];
|
|
89
89
|
}>;
|
|
90
|
-
verifyMCP: (domain: string) => Promise<{
|
|
91
|
-
verified: boolean;
|
|
92
|
-
}>;
|
|
93
90
|
verifyAgent: (wallet: string) => Promise<{
|
|
94
91
|
verified: boolean;
|
|
95
92
|
}>;
|
|
@@ -313,7 +310,7 @@ declare function UserButton(): react_jsx_runtime.JSX.Element | null;
|
|
|
313
310
|
declare function OrgSwitcher(): react_jsx_runtime.JSX.Element | null;
|
|
314
311
|
|
|
315
312
|
interface VerifiedBadgeProps {
|
|
316
|
-
type: '
|
|
313
|
+
type: 'agent';
|
|
317
314
|
identifier: string;
|
|
318
315
|
label?: string;
|
|
319
316
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -87,9 +87,6 @@ declare function useGitHat(): {
|
|
|
87
87
|
getUserOrgs: () => Promise<{
|
|
88
88
|
orgs: GitHatOrg[];
|
|
89
89
|
}>;
|
|
90
|
-
verifyMCP: (domain: string) => Promise<{
|
|
91
|
-
verified: boolean;
|
|
92
|
-
}>;
|
|
93
90
|
verifyAgent: (wallet: string) => Promise<{
|
|
94
91
|
verified: boolean;
|
|
95
92
|
}>;
|
|
@@ -313,7 +310,7 @@ declare function UserButton(): react_jsx_runtime.JSX.Element | null;
|
|
|
313
310
|
declare function OrgSwitcher(): react_jsx_runtime.JSX.Element | null;
|
|
314
311
|
|
|
315
312
|
interface VerifiedBadgeProps {
|
|
316
|
-
type: '
|
|
313
|
+
type: 'agent';
|
|
317
314
|
identifier: string;
|
|
318
315
|
label?: string;
|
|
319
316
|
}
|
package/dist/index.js
CHANGED
|
@@ -547,7 +547,6 @@ function useGitHat() {
|
|
|
547
547
|
return {
|
|
548
548
|
fetch: client.fetchApi,
|
|
549
549
|
getUserOrgs: () => client.fetchApi("/user/orgs"),
|
|
550
|
-
verifyMCP: (domain) => client.fetchApi(`/verify/mcp/${domain}`),
|
|
551
550
|
verifyAgent: (wallet) => client.fetchApi(`/verify/agent/${wallet}`),
|
|
552
551
|
getOrgMetadata,
|
|
553
552
|
updateOrgMetadata,
|
|
@@ -994,8 +993,7 @@ function VerifiedBadge({ type, identifier, label }) {
|
|
|
994
993
|
setVerified(cached.verified);
|
|
995
994
|
return;
|
|
996
995
|
}
|
|
997
|
-
|
|
998
|
-
verify(identifier).then((data) => {
|
|
996
|
+
githat.verifyAgent(identifier).then((data) => {
|
|
999
997
|
if (mounted.current) {
|
|
1000
998
|
setVerified(data.verified);
|
|
1001
999
|
cache.set(key, { verified: data.verified, ts: Date.now() });
|