-
Notifications
You must be signed in to change notification settings - Fork 11
feat: add NFC Issuer Service documentation #69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
andreyudentsovottofeller
wants to merge
6
commits into
main
Choose a base branch
from
feat/nfc-credential-and-refresh-docs
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
eb1af19
feat: add NFC Issuer Service documentation
andreyudentsovottofeller 1b38cf7
feat: introduce issuer credential (#79)
paolodamico d149aa6
Update 9303.mdx
paolodamico 1174188
Merge branch 'main' into feat/nfc-credential-and-refresh-docs
paolodamico f471f01
Add minor updates
andreyudentsovottofeller b2ccf6f
Add quotes
andreyudentsovottofeller File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -160,7 +160,7 @@ | |
| }, | ||
| { | ||
| "group": "Credentials", | ||
| "pages": ["world-id/credentials/legacy-presets"] | ||
| "pages": ["world-id/credentials/index", "world-id/credentials/9303"] | ||
| }, | ||
| { | ||
| "group": "Migration", | ||
|
|
@@ -201,10 +201,6 @@ | |
| "GET /is-valid-root", | ||
| "GET /status/{id}" | ||
| ] | ||
| }, | ||
| { | ||
| "group": "Issuers", | ||
| "pages": ["world-id/reference/poh-issuer"] | ||
| } | ||
| ] | ||
| }, | ||
|
|
@@ -720,19 +716,19 @@ | |
| }, | ||
| { | ||
| "source": "/world-id/credentials/presets", | ||
| "destination": "/world-id/credentials/legacy-presets" | ||
| "destination": "/world-id/credentials#legacy-presets" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would rename the page back |
||
| }, | ||
| { | ||
| "source": "/world-id/face-check/overview", | ||
| "destination": "/world-id/selfie-check/overview" | ||
| }, | ||
| { | ||
| "source": "/world-id/face-check/web-integration", | ||
| "destination": "/world-id/credentials/legacy-presets" | ||
| "destination": "/world-id/credentials#legacy-presets" | ||
| }, | ||
| { | ||
| "source": "/world-id/face-check/testing", | ||
| "destination": "/world-id/credentials/legacy-presets" | ||
| "destination": "/world-id/credentials#legacy-presets" | ||
| } | ||
| ], | ||
| "api": { | ||
|
|
||
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,223 @@ | ||
| import React from "react"; | ||
|
|
||
| /** | ||
| * Hero card for credential issuer documentation pages. | ||
| * Mintlify-safe: no hooks, no client-side state. | ||
| * | ||
| * IMPORTANT: Tailwind classes MUST be string literals in className | ||
| * props — Mintlify only prefixes classes it can statically analyze. | ||
| * Never use variables for className values. | ||
| * | ||
| * Props: | ||
| * - title: string — credential display name | ||
| * - description: string — one-sentence summary | ||
| * - image: string — path to thumbnail image | ||
| * - bgColor: string — hex color for the banner background | ||
| * - issuerName: string — who issues this credential | ||
| * - issuerHref: string — link to issuer (optional) | ||
| * - issuerVerified: boolean — show verified badge (optional) | ||
| * - status: "active" | "beta" | "deprecated" | ||
| * - id: number — credential schema ID | ||
| * - sybilResistance: boolean — whether uniqueness is enforced | ||
| * - sybilResistanceDescription: string — tooltip on the Yes tag | ||
| * - validityPeriod: string — e.g. "10 years or document expiry" | ||
| * - sourceCodeHref: string — GitHub URL, or "coming-soon" | ||
| */ | ||
| export const CredentialHero = ({ | ||
| title, | ||
| description, | ||
| image, | ||
| bgColor = "#1a1a2e", | ||
| issuerName, | ||
| issuerHref, | ||
| issuerVerified, | ||
| status, | ||
| id, | ||
| sybilResistance, | ||
| sybilResistanceDescription, | ||
| validityPeriod, | ||
| sourceCodeHref, | ||
| }) => { | ||
| return ( | ||
| <div className="not-prose rounded-3xl bg-zinc-100 dark:bg-zinc-900"> | ||
| {/* Banner */} | ||
| <div | ||
| className="relative overflow-hidden rounded-t-3xl px-6 py-8 md:px-8 md:py-10" | ||
| style={{ backgroundColor: bgColor }} | ||
| > | ||
| <div className="flex items-center justify-between gap-6"> | ||
| <div className="min-w-0"> | ||
| <h2 className="m-0 text-2xl font-semibold text-white sm:text-3xl"> | ||
| {title} | ||
| </h2> | ||
| {description && ( | ||
| <p className="m-0 mt-2 max-w-[420px] text-[15px] leading-relaxed text-white/75"> | ||
| {description} | ||
| </p> | ||
| )} | ||
| </div> | ||
| {image && ( | ||
| <img | ||
| src={image} | ||
| alt={title} | ||
| className="hidden h-28 w-auto rounded-xl object-contain shadow-lg shadow-black/30 sm:block" | ||
| /> | ||
| )} | ||
| </div> | ||
| </div> | ||
|
|
||
| {/* Metadata table */} | ||
| <div> | ||
| {issuerName && ( | ||
| <div className="flex items-center gap-3 border-b border-zinc-200 px-6 py-3.5 text-[14px] md:px-8 dark:border-zinc-800"> | ||
| <span className="flex h-7 w-7 shrink-0 items-center justify-center rounded-lg bg-zinc-200/70 text-zinc-500 dark:bg-zinc-800 dark:text-zinc-400"> | ||
| <Icon icon="building" size={16} /> | ||
| </span> | ||
| <span className="w-36 shrink-0 font-medium text-zinc-500 dark:text-zinc-400"> | ||
| Issued by | ||
| </span> | ||
| <span className="inline-flex items-center gap-1"> | ||
| {issuerVerified && ( | ||
| <Tooltip tip="Verified issuer"> | ||
| <span className="inline-flex items-center cursor-help" style={{ height: "20px" }}> | ||
| <Icon icon="circle-check" iconType="solid" size={14} color="#3b82f6" /> | ||
| </span> | ||
| </Tooltip> | ||
| )} | ||
| {issuerHref ? ( | ||
| <a | ||
| href={issuerHref} | ||
| target="_blank" | ||
| rel="noopener noreferrer" | ||
| className="font-medium text-zinc-900 underline decoration-zinc-300 underline-offset-2 hover:decoration-zinc-500 dark:text-zinc-100 dark:decoration-zinc-600 dark:hover:decoration-zinc-400" | ||
| > | ||
| {issuerName} | ||
| </a> | ||
| ) : ( | ||
| <span className="font-medium text-zinc-900 dark:text-zinc-100"> | ||
| {issuerName} | ||
| </span> | ||
| )} | ||
| </span> | ||
| </div> | ||
| )} | ||
| {status && ( | ||
| <div className="flex items-center gap-3 border-b border-zinc-200 px-6 py-3.5 text-[14px] md:px-8 dark:border-zinc-800"> | ||
| <span className="flex h-7 w-7 shrink-0 items-center justify-center rounded-lg bg-zinc-200/70 text-zinc-500 dark:bg-zinc-800 dark:text-zinc-400"> | ||
| <Icon icon="signal" size={16} /> | ||
| </span> | ||
| <span className="w-36 shrink-0 font-medium text-zinc-500 dark:text-zinc-400"> | ||
| Status | ||
| </span> | ||
| {status === "active" && ( | ||
| <span className="inline-flex items-center rounded-md bg-green-50 px-2 py-0.5 text-xs font-semibold text-green-700 ring-1 ring-green-600/20 ring-inset dark:bg-green-500/10 dark:text-green-400 dark:ring-green-500/20"> | ||
| Active | ||
| </span> | ||
| )} | ||
| {status === "beta" && ( | ||
| <span className="inline-flex items-center rounded-md bg-blue-50 px-2 py-0.5 text-xs font-semibold text-blue-700 ring-1 ring-blue-600/20 ring-inset dark:bg-blue-500/10 dark:text-blue-400 dark:ring-blue-500/20"> | ||
| Beta | ||
| </span> | ||
| )} | ||
| {status === "deprecated" && ( | ||
| <span className="inline-flex items-center rounded-md bg-amber-50 px-2 py-0.5 text-xs font-semibold text-amber-700 ring-1 ring-amber-600/20 ring-inset dark:bg-amber-500/10 dark:text-amber-400 dark:ring-amber-500/20"> | ||
| Deprecated | ||
| </span> | ||
| )} | ||
| </div> | ||
| )} | ||
| {id != null && ( | ||
| <div className="flex items-center gap-3 border-b border-zinc-200 px-6 py-3.5 text-[14px] md:px-8 dark:border-zinc-800"> | ||
| <span className="flex h-7 w-7 shrink-0 items-center justify-center rounded-lg bg-zinc-200/70 text-zinc-500 dark:bg-zinc-800 dark:text-zinc-400"> | ||
| <Icon icon="hashtag" size={16} /> | ||
| </span> | ||
| <span className="w-36 shrink-0 font-medium text-zinc-500 dark:text-zinc-400"> | ||
| ID | ||
| </span> | ||
| <span className="font-mono font-medium text-zinc-900 dark:text-zinc-100"> | ||
| {id} | ||
| </span> | ||
| </div> | ||
| )} | ||
| {sybilResistance != null && ( | ||
| <div className="flex items-center gap-3 border-b border-zinc-200 px-6 py-3.5 text-[14px] md:px-8 dark:border-zinc-800"> | ||
| <span className="flex h-7 w-7 shrink-0 items-center justify-center rounded-lg bg-zinc-200/70 text-zinc-500 dark:bg-zinc-800 dark:text-zinc-400"> | ||
| <Icon icon="shield-check" size={16} /> | ||
| </span> | ||
| <span className="w-36 shrink-0 font-medium text-zinc-500 dark:text-zinc-400"> | ||
| Sybil resistance | ||
| </span> | ||
| {sybilResistance ? ( | ||
| <span className="inline-flex items-center gap-1.5"> | ||
| <span className="inline-flex items-center rounded-md bg-green-50 px-2 py-0.5 text-xs font-semibold text-green-700 ring-1 ring-green-600/20 ring-inset dark:bg-green-500/10 dark:text-green-400 dark:ring-green-500/20"> | ||
| Yes | ||
| </span> | ||
| {sybilResistanceDescription && ( | ||
| <Tooltip tip={sybilResistanceDescription}> | ||
| <span className="cursor-help text-zinc-400 dark:text-zinc-500"> | ||
| <Icon icon="circle-info" size={14} /> | ||
| </span> | ||
| </Tooltip> | ||
| )} | ||
| </span> | ||
| ) : ( | ||
| <span className="inline-flex items-center rounded-md bg-zinc-100 px-2 py-0.5 text-xs font-semibold text-zinc-500 ring-1 ring-zinc-500/20 ring-inset dark:bg-zinc-800 dark:text-zinc-400 dark:ring-zinc-500/20"> | ||
| No | ||
| </span> | ||
| )} | ||
| </div> | ||
| )} | ||
| {validityPeriod && ( | ||
| <div className="flex items-center gap-3 border-b border-zinc-200 px-6 py-3.5 text-[14px] md:px-8 dark:border-zinc-800"> | ||
| <span className="flex h-7 w-7 shrink-0 items-center justify-center rounded-lg bg-zinc-200/70 text-zinc-500 dark:bg-zinc-800 dark:text-zinc-400"> | ||
| <Icon icon="clock" size={16} /> | ||
| </span> | ||
| <span className="w-36 shrink-0 font-medium text-zinc-500 dark:text-zinc-400"> | ||
| <span className="inline-flex items-center gap-1"> | ||
| Validity period | ||
| <Tooltip tip="The default duration period of the credential. Generally the maximum recommended sybil resistance window."> | ||
| <span className="cursor-help text-zinc-400 dark:text-zinc-500"> | ||
| <Icon icon="circle-info" size={12} /> | ||
| </span> | ||
| </Tooltip> | ||
| </span> | ||
| </span> | ||
| <span className="font-medium text-zinc-900 dark:text-zinc-100"> | ||
| {validityPeriod} | ||
| </span> | ||
| </div> | ||
| )} | ||
| {sourceCodeHref && ( | ||
| <div className="flex items-center gap-3 px-6 py-3.5 text-[14px] md:px-8"> | ||
| <span className="flex h-7 w-7 shrink-0 items-center justify-center rounded-lg bg-zinc-200/70 text-zinc-500 dark:bg-zinc-800 dark:text-zinc-400"> | ||
| <Icon icon="code" size={16} /> | ||
| </span> | ||
| <span className="w-36 shrink-0 font-medium text-zinc-500 dark:text-zinc-400"> | ||
| SDK Reference | ||
| </span> | ||
| {sourceCodeHref === "coming-soon" ? ( | ||
| <span className="inline-flex items-center gap-1.5 rounded-md bg-blue-50 px-2 py-0.5 text-xs font-semibold text-blue-700 ring-1 ring-blue-600/20 ring-inset dark:bg-blue-500/10 dark:text-blue-400 dark:ring-blue-500/20"> | ||
| <Icon icon="lock" size={11} /> | ||
| Coming soon | ||
| </span> | ||
| ) : ( | ||
| <a | ||
| href={sourceCodeHref} | ||
| target="_blank" | ||
| rel="noopener noreferrer" | ||
| className="font-medium text-zinc-900 underline decoration-zinc-300 underline-offset-2 hover:decoration-zinc-500 dark:text-zinc-100 dark:decoration-zinc-600 dark:hover:decoration-zinc-400" | ||
| > | ||
| {sourceCodeHref.split("/").pop()} | ||
| </a> | ||
| )} | ||
| </div> | ||
| )} | ||
| </div> | ||
|
|
||
| {/* Bottom spacer */} | ||
| <div className="h-2" /> | ||
| </div> | ||
| ); | ||
| }; | ||
|
|
||
| export default CredentialHero; |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This page is great but it doesn't really help an RP integrate, that's why I think it belongs under the Technical Reference