Learn about W3C-compliant identity resolution on NEAR.
This document details how to use the did:near method for decentralized identifiers on the NEAR blockchain, how it complies with W3C DID Core, and how it integrates with verifiable credentials (VCs), proof registries, and resolution tooling.
A Decentralized Identifier (DID) is a persistent, unique identifier that does not require a centralized registry. On NEAR, DIDs are created based on either account names or raw public keys, and they are fully compatible with the W3C DID standard.
Authors
Built in collaboration with NTT DATA Innovation Center Web3
Issuer is linked to the signer account via NEAR transaction.
DID resolution and structure is fully W3C-compliant.
cid is always a Base64-encoded SHA-256 hash of the VC content.
Key Security: Only FullAccess keys are included in the DID document’s verificationMethod array, ensuring that only keys with complete account authority are used for authentication.
Public keys are handled securely via NEAR native accounts or custom registries.
Multi-Network Support: The resolver automatically routes requests to the correct network (mainnet/testnet) based on the DID suffix.
The did:near method enables full-stack decentralized identity flows on NEAR, including:
Account- and key-based identifiers
W3C-compliant DID documents
Smart contract-backed credential proofs
SDKs for resolution and attestation
Use this stack to build portable, verifiable, and secure Web3 identity solutions on NEAR.
Was this page helpful?
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"NEAR Docs","colors":{"primary":"#1fb858","light":"#1fb858","dark":"#1fb858"},"logo":{"light":"https://mintcdn.com/neardocs/qO2GD-gji1aakHqN/assets/logo.svg?fit=max\u0026auto=format\u0026n=qO2GD-gji1aakHqN\u0026q=85\u0026s=fe9551b1c3085e39a97965b2886dad4a","dark":"https://mintcdn.com/neardocs/qO2GD-gji1aakHqN/assets/logo_rev.svg?fit=max\u0026auto=format\u0026n=qO2GD-gji1aakHqN\u0026q=85\u0026s=1455d1ccc3385495e8b52e6657ce8c84"},"favicon":"https://mintcdn.com/neardocs/qO2GD-gji1aakHqN/assets/favicon.svg?fit=max\u0026auto=format\u0026n=qO2GD-gji1aakHqN\u0026q=85\u0026s=ef64e8324f93ca4f703d8ebad5e32c53","api":{"openapi":"openapi.json","playground":{"display":"interactive"},"examples":{"defaults":"all","languages":["bash","javascript","python"]}},"appearance":{"default":"system","strict":false},"navbar":{"links":[{"icon":"wallet","href":"https://wallet.near.org/","label":"Wallets"},{"icon":"search","href":"https://explorer.near.org/","label":"Explorers"},{"icon":"layout-grid","href":"https://nearcatalog.xyz/","label":"NEAR Catalog"}]},"search":{"prompt":"Search docs..."},"seo":{"metatags":{"google-site-verification":"x36GvqeIYFjDAl2NNFM-83XykcMYMLRY6f9lgUZbDpA"}},"fonts":{"family":"Inter"},"icons":{"library":"lucide"},"styling":{"eyebrows":"breadcrumbs","codeblocks":{"theme":{"light":"github-light","dark":"github-dark"}},"latex":true},"integrations":{"ga4":{"measurementId":"G-TMG0M3DPNW"}},"contextual":{"options":["copy","claude","cursor"],"display":"header"},"interaction":{"drilldown":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"neardocs","hasAudioNarration":false,"actualSubdomain":"neardocs","customDomains":["docs.near.org"],"gitSource":{"type":"github","owner":"near","repo":"docs","deployBranch":"master","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6ae7a0588c40a3519a19f52a","collectionId":"fbf18d59-9041-4eff-a071-77ac06cfb881","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ae7a0588c40a3519a19f52a"},"feedback":{"thumbs":true},"entitlements":{},"buildId":"6ae7a0588c40a3519a19f52a","clientVersion":"0.0.4045","searchFilterCounts":[{"language":"default","tag":"RPC","count":46},{"language":"default","tag":"Smart Contracts","count":42},{"language":"default","tag":"Protocol","count":30},{"language":"default","tag":"Building Smart Contracts","count":30},{"language":"default","tag":"Tokens \u0026 Primitives","count":21},{"language":"default","tag":"Concepts","count":19},{"language":"default","tag":"Tutorials","count":19},{"language":"default","tag":"Home","count":17},{"language":"default","tag":"Multi-Chain","count":15},{"language":"default","tag":"Web3 Apps","count":15}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"custom.css","content":".home-code code{max-height:300px;overflow-y:auto}.github-source-link{display:flex;justify-content:flex-end;margin-top:-1rem;margin-bottom:1.25rem;font-size:.75rem;line-height:1rem}.github-source-link>[data-as=p],.github-source-link>p{margin:0}.github-source-link a{display:inline-flex;align-items:center;gap:.375rem;color:#656d76;border-bottom:0;text-decoration:none}.github-source-link a::before{content:\"\";display:inline-block;width:.875rem;height:.875rem;flex-shrink:0;background-color:currentColor;mask:url(/assets/github.svg) center/contain no-repeat;-webkit-mask:url(/assets/github.svg) center/contain no-repeat}.github-source-link a:hover{text-decoration:underline}.dark .github-source-link a{color:#8b949e}"}],"page":{"pagePath":"primitives/didnear","slug":"/primitives/didnear","pageMetadata":{"title":"Decentralized Identifiers (DIDs)","icon":"fingerprint","description":"Learn about W3C-compliant identity resolution on NEAR.","href":"/primitives/didnear"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Learn about W3C-compliant identity resolution on NEAR.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,hr:`hr`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{Accordion,CodeBlock,Heading,Table}=_components;if(!Accordion)_missingMdxReference(`Accordion`,true);if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Table)_missingMdxReference(`Table`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`This document details how to use the `,_jsx(_components.code,{children:`did:near`}),` method for decentralized identifiers on the NEAR blockchain, how it complies with `,_jsx(_components.a,{href:`https://www.w3.org/TR/did-core/`,children:`W3C DID Core`}),`, and how it integrates with verifiable credentials (VCs), proof registries, and resolution tooling.`]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`what-is-a-did`,children:`What is a DID?`}),`\n`,_jsxs(_components.p,{children:[`A `,_jsx(_components.strong,{children:`Decentralized Identifier (DID)`}),` is a persistent, unique identifier that does not require a centralized registry. On NEAR, DIDs are created based on either account names or raw public keys, and they are fully compatible with the W3C DID standard.`]}),`\n`,_jsx(Accordion,{title:`Authors`,id:`authors`,children:_jsx(_components.p,{children:`Built in collaboration with NTT DATA Innovation Center Web3`})}),`\n`,_jsx(_components.hr,{}),`\n`,_jsxs(Heading,{level:`2`,id:`the-didnear-method`,children:[`The `,_jsx(_components.code,{children:`did:near`}),` Method`]}),`\n`,_jsx(_components.p,{children:`This method supports two types of DIDs with different resolution strategies:`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Example`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Named Account`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`did:near:alice.testnet`}),` or `,_jsx(_components.code,{children:`did:near:alice.near`})]}),_jsx(_components.td,{children:`Resolved directly from on-chain NEAR account keys (FullAccess keys)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Registry DID (Base58)`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`did:near:CF5RiJYh4EVmEt8UADTjoP3XaZo1NPWxv6w5TmkLqjpR`})}),_jsxs(_components.td,{children:[`Resolved via smart contract registry using `,_jsx(_components.code,{children:`identity_owner`}),` method`]})]})]})]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`did-document-format`,children:`DID Document Format`}),`\n`,_jsxs(_components.p,{children:[`Example output from resolving a `,_jsx(_components.code,{children:`did:near`}),`:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`17`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light github-dark`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#24292e`,color:`#24292e`,\"--shiki-dark\":`#e1e4e8`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`17`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"@context\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: [`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"https://www.w3.org/ns/did/v1\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"https://w3id.org/security/suites/ed25519-2018/v1\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"did:near:alice.testnet\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"verificationMethod\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"did:near:alice.testnet#owner\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"Ed25519VerificationKey2018\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"controller\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"did:near:alice.testnet\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"publicKeyBase58\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"7WLUHT69sw5UpYK9xAY5cbdWKf4vSMruXzwfbL999zXo\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"authentication\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: [`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"did:near:alice.testnet#owner\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"assertionMethod\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: [`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"did:near:alice.testnet#owner\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`]`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`This structure follows the `,_jsx(_components.a,{href:`https://www.w3.org/TR/did-core/`,children:`W3C DID Core Spec`}),`, including:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`A DID identifier (`,_jsx(_components.code,{children:`id`}),`)`]}),`\n`,_jsxs(_components.li,{children:[`Key references (`,_jsx(_components.code,{children:`verificationMethod`}),`)`]}),`\n`,_jsx(_components.li,{children:`Authentication and assertion capabilities`}),`\n`,_jsx(_components.li,{children:`Base58-encoded Ed25519 public keys`}),`\n`]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`-repositories`,children:`⚙️ Repositories`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Component`}),_jsx(_components.th,{children:`Repository URL`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`DID Registry (contract)`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`https://github.com/DTI-web3/did-near`,children:`https://github.com/DTI-web3/did-near`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`ProofType Contract`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`https://github.com/DTI-web3/did-near-prooftype`,children:`https://github.com/DTI-web3/did-near-prooftype`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`ProofType SDK`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`https://www.npmjs.com/package/@kaytrust/prooftypes`,children:`https://www.npmjs.com/package/@kaytrust/prooftypes`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`DID Resolver SDK`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`https://github.com/DTI-web3/did-near-resolver`,children:`https://github.com/DTI-web3/did-near-resolver`})})]})]})]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`how-resolution-works`,children:`How Resolution Works`}),`\n`,_jsx(_components.p,{children:`The resolver uses different strategies based on DID format:`}),`\n`,_jsxs(Heading,{level:`3`,id:`named-account-dids-didnearalice-testnet`,children:[`Named Account DIDs (`,_jsx(_components.code,{children:`did:near:alice.testnet`}),`)`]}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`Parse the account ID from the DID (e.g., `,_jsx(_components.code,{children:`alice.testnet`}),`).`]}),`\n`,_jsxs(_components.li,{children:[`Determine the network from the suffix (`,_jsx(_components.code,{children:`.testnet`}),` → testnet, `,_jsx(_components.code,{children:`.near`}),` → mainnet).`]}),`\n`,_jsxs(_components.li,{children:[`Query the NEAR RPC using `,_jsx(_components.code,{children:`near-api-js`}),` to fetch account access keys.`]}),`\n`,_jsxs(_components.li,{children:[`Filter for keys with `,_jsx(_components.code,{children:`permission: \"FullAccess\"`}),`.`]}),`\n`,_jsx(_components.li,{children:`Construct the DID document with all FullAccess public keys as verification methods.`}),`\n`]}),`\n`,_jsxs(Heading,{level:`3`,id:`registry-dids-didnearcf5rijyh4evmet8uadtjop3xazo1npwxv6w5tmklqjpr`,children:[`Registry DIDs (`,_jsx(_components.code,{children:`did:near:CF5RiJYh4EVmEt8UADTjoP3XaZo1NPWxv6w5TmkLqjpR`}),`)`]}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`Identify the DID as Base58 format (44-50 character string matching `,_jsx(_components.code,{children:`[1-9A-HJ-NP-Za-km-z]+`}),`).`]}),`\n`,_jsxs(_components.li,{children:[`Call the `,_jsx(_components.code,{children:`identity_owner`}),` view method on the configured registry contract.`]}),`\n`,_jsx(_components.li,{children:`Retrieve the owner DID registered for that Base58 identifier.`}),`\n`,_jsx(_components.li,{children:`Construct the DID document with the public key from the registry.`}),`\n`]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`how-to-use`,children:`How to Use`}),`\n`,_jsx(Heading,{level:`3`,id:`create-a-did`,children:`Create a DID`}),`\n`,_jsx(Heading,{level:`4`,id:`named-account-did-direct-resolution`,children:`Named Account DID (Direct Resolution)`}),`\n`,_jsx(_components.p,{children:`If using a NEAR wallet account, the DID is derived directly from the account name:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light github-dark`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#24292e`,color:`#24292e`,\"--shiki-dark\":`#e1e4e8`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`const`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` did`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` =`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"did:near:yourname.testnet\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`; `}),_jsx(_components.span,{style:{color:`#6A737D`,\"--shiki-dark\":`#6A737D`},children:`// For testnet`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`const`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` did`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` =`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"did:near:yourname.near\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`; `}),_jsx(_components.span,{style:{color:`#6A737D`,\"--shiki-dark\":`#6A737D`},children:`// For mainnet`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`4`,id:`registry-did-contract-based`,children:`Registry DID (Contract-Based)`}),`\n`,_jsx(_components.p,{children:`If using a Base58-encoded identifier registered in a smart contract:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light github-dark`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#24292e`,color:`#24292e`,\"--shiki-dark\":`#e1e4e8`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`const`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` did`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` =`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"did:near:CF5RiJYh4EVmEt8UADTjoP3XaZo1NPWxv6w5TmkLqjpR\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`;`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`4`,id:`network-specific-dids`,children:`Network-Specific DIDs`}),`\n`,_jsx(_components.p,{children:`You can explicitly specify the network:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light github-dark`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#24292e`,color:`#24292e`,\"--shiki-dark\":`#e1e4e8`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`const`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` did`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` =`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"did:near:testnet:CF5RiJYh4EVmEt8UADTjoP3XaZo1NPWxv6w5TmkLqjpR\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`; `}),_jsx(_components.span,{style:{color:`#6A737D`,\"--shiki-dark\":`#6A737D`},children:`// Explicitly targets testnet`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`const`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` did`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` =`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"did:near:near:CF5RiJYh4EVmEt8UADTjoP3XaZo1NPWxv6w5TmkLqjpR\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`; `}),_jsx(_components.span,{style:{color:`#6A737D`,\"--shiki-dark\":`#6A737D`},children:`// Explicitly targets mainnet`})]}),`\n`]})})}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`issuing-and-verifying-credentials`,children:`Issuing and Verifying Credentials`}),`\n`,_jsx(Heading,{level:`3`,id:`step-1-–-hash-the-credential`,children:`Step 1 – Hash the Credential`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light github-dark`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#24292e`,color:`#24292e`,\"--shiki-dark\":`#e1e4e8`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`const`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` cid`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` =`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:` SHA256`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`(`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`JSON`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`.`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:`stringify`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`(credential)).`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:`toString`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`(CryptoJS.enc.Base64);`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`step-2-–-issue-on-near`,children:`Step 2 – Issue on NEAR`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light github-dark`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#24292e`,color:`#24292e`,\"--shiki-dark\":`#e1e4e8`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`await`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` proofType.`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:`generateProof`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`(credential, {`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` wallet,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` cid`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`});`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`This records the hash (`,_jsx(_components.code,{children:`cid`}),`) on-chain with the `,_jsx(_components.code,{children:`subject_did`}),`.`]}),`\n`,_jsx(Heading,{level:`3`,id:`step-3-–-verify-on-chain`,children:`Step 3 – Verify On-chain`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light github-dark`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#24292e`,color:`#24292e`,\"--shiki-dark\":`#e1e4e8`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`const`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` isValid`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` =`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` await`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` proofType.`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:`verifyProof`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`(`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"did:near:subject|bafy...\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`); `}),_jsx(_components.span,{style:{color:`#6A737D`,\"--shiki-dark\":`#6A737D`},children:`// returns true or false`})]}),`\n`]})})}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`sdk-usage`,children:`SDK Usage`}),`\n`,_jsx(Heading,{level:`3`,id:`resolver-sdk`,children:`Resolver SDK`}),`\n`,_jsx(Heading,{level:`4`,id:`standalone-usage`,children:`Standalone Usage`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`19`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light github-dark`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#24292e`,color:`#24292e`,\"--shiki-dark\":`#e1e4e8`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`19`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`import`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` { NearDIDResolver } `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`from`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` '@kaytrust/did-near-resolver'`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`const`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` resolver`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` =`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` new`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:` NearDIDResolver`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`({`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` networks: [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` networkId: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`'testnet'`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` rpcUrl: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`'https://rpc.testnet.near.org'`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` contractId: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`'neardidregistry.testnet'`}),_jsx(_components.span,{style:{color:`#6A737D`,\"--shiki-dark\":`#6A737D`},children:` // Optional: only for Registry DIDs`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` networkId: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`'mainnet'`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`, `}),_jsx(_components.span,{style:{color:`#6A737D`,\"--shiki-dark\":`#6A737D`},children:`// You can use 'near' for mainnet (or 'mainnet', both are equivalent)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` rpcUrl: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`'https://rpc.mainnet.near.org'`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` contractId: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`'neardidregistry.near'`}),_jsx(_components.span,{style:{color:`#6A737D`,\"--shiki-dark\":`#6A737D`},children:` // Optional`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`});`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`const`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` doc`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` =`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` await`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` resolver.`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:`resolveDID`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`(`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"did:near:alice.testnet\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`console.`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:`log`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`(doc.id); `}),_jsx(_components.span,{style:{color:`#6A737D`,\"--shiki-dark\":`#6A737D`},children:`// \"did:near:alice.testnet\"`})]}),`\n`]})})}),`\n`,_jsxs(Heading,{level:`4`,id:`integration-with-did-resolver`,children:[`Integration with `,_jsx(_components.code,{children:`did-resolver`})]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`20`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light github-dark`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#24292e`,color:`#24292e`,\"--shiki-dark\":`#e1e4e8`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`20`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`import`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` { Resolver } `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`from`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` 'did-resolver'`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`import`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` { getResolver } `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`from`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` '@kaytrust/did-near-resolver'`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`const`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` nearResolver`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` =`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:` getResolver`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`({`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` networks: [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` networkId: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`'testnet'`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` rpcUrl: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`'https://rpc.testnet.near.org'`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` contractId: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`'neardidregistry.testnet'`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`});`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`const`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` resolver`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` =`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` new`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:` Resolver`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` ...`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`nearResolver,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6A737D`,\"--shiki-dark\":`#6A737D`},children:` // ... other DID methods`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`});`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`const`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` result`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` =`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` await`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` resolver.`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:`resolve`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`(`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`'did:near:alice.testnet'`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`console.`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:`log`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`(result.didDocument);`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`prooftype-sdk`,children:`ProofType SDK`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light github-dark`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#24292e`,color:`#24292e`,\"--shiki-dark\":`#e1e4e8`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`5`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`import`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` { ProofTypeNear } `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`from`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` '@kaytrust/prooftypes'`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`const`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` proofType`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` =`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` new`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:` ProofTypeNear`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`const`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` proof`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` =`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` await`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` proofType.`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:`generateProof`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`(vcPayload, { wallet, cid });`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`const`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` isValid`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` =`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` await`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` proofType.`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:`verifyProof`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`(proof);`})]}),`\n`]})})}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`security-\u0026-compliance`,children:`Security \u0026 Compliance`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Each `,_jsx(_components.code,{children:`(did, cid)`}),` pair can only be registered once.`]}),`\n`,_jsx(_components.li,{children:`Issuer is linked to the signer account via NEAR transaction.`}),`\n`,_jsx(_components.li,{children:`DID resolution and structure is fully W3C-compliant.`}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`cid`}),` is always a Base64-encoded SHA-256 hash of the VC content.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Key Security`}),`: Only `,_jsx(_components.code,{children:`FullAccess`}),` keys are included in the DID document’s `,_jsx(_components.code,{children:`verificationMethod`}),` array, ensuring that only keys with complete account authority are used for authentication.`]}),`\n`,_jsx(_components.li,{children:`Public keys are handled securely via NEAR native accounts or custom registries.`}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Multi-Network Support`}),`: The resolver automatically routes requests to the correct network (mainnet/testnet) based on the DID suffix.`]}),`\n`]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`testnet-deployment`,children:`Testnet Deployment`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Registry Contract: `,_jsx(_components.code,{children:`neardidregistry.testnet`})]}),`\n`,_jsxs(_components.li,{children:[`ProofType Contract: `,_jsx(_components.code,{children:`neardtiprooftype.testnet`})]}),`\n`,_jsxs(_components.li,{children:[`Network: `,_jsx(_components.code,{children:`testnet`})]}),`\n`,_jsxs(_components.li,{children:[`Language: Rust (`,_jsx(_components.code,{children:`near-sdk`}),`)`]}),`\n`]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`conclusion`,children:`Conclusion`}),`\n`,_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`did:near`}),` method enables full-stack decentralized identity flows on NEAR, including:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Account- and key-based identifiers`}),`\n`,_jsx(_components.li,{children:`W3C-compliant DID documents`}),`\n`,_jsx(_components.li,{children:`Smart contract-backed credential proofs`}),`\n`,_jsx(_components.li,{children:`SDKs for resolution and attestation`}),`\n`]}),`\n`,_jsx(_components.p,{children:`Use this stack to build portable, verifiable, and secure Web3 identity solutions on NEAR.`})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"codeStyling":{"theme":{"light":"github-light","dark":"github-dark"}},"config":{},"pageMetadata":{"title":"Decentralized Identifiers (DIDs)","icon":"fingerprint","description":"Learn about W3C-compliant identity resolution on NEAR.","href":"/primitives/didnear"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"What is a DID?","slug":"what-is-a-did","depth":2,"children":[]},{"title":"The did:near Method","slug":"the-didnear-method","depth":2,"children":[]},{"title":"DID Document Format","slug":"did-document-format","depth":2,"children":[]},{"title":"⚙️ Repositories","slug":"-repositories","depth":2,"children":[]},{"title":"How Resolution Works","slug":"how-resolution-works","depth":2,"children":[{"title":"Named Account DIDs (did:near:alice.testnet)","slug":"named-account-dids-didnearalice-testnet","depth":3,"children":[]},{"title":"Registry DIDs (did:near:CF5RiJYh4EVmEt8UADTjoP3XaZo1NPWxv6w5TmkLqjpR)","slug":"registry-dids-didnearcf5rijyh4evmet8uadtjop3xazo1npwxv6w5tmklqjpr","depth":3,"children":[]}]},{"title":"How to Use","slug":"how-to-use","depth":2,"children":[{"title":"Create a DID","slug":"create-a-did","depth":3,"children":[]},{"title":"Named Account DID (Direct Resolution)","slug":"named-account-did-direct-resolution","depth":4,"children":[]},{"title":"Registry DID (Contract-Based)","slug":"registry-did-contract-based","depth":4,"children":[]},{"title":"Network-Specific DIDs","slug":"network-specific-dids","depth":4,"children":[]}]},{"title":"Issuing and Verifying Credentials","slug":"issuing-and-verifying-credentials","depth":2,"children":[{"title":"Step 1 – Hash the Credential","slug":"step-1-–-hash-the-credential","depth":3,"children":[]},{"title":"Step 2 – Issue on NEAR","slug":"step-2-–-issue-on-near","depth":3,"children":[]},{"title":"Step 3 – Verify On-chain","slug":"step-3-–-verify-on-chain","depth":3,"children":[]}]},{"title":"SDK Usage","slug":"sdk-usage","depth":2,"children":[{"title":"Resolver SDK","slug":"resolver-sdk","depth":3,"children":[]},{"title":"Standalone Usage","slug":"standalone-usage","depth":4,"children":[]},{"title":"Integration with did-resolver","slug":"integration-with-did-resolver","depth":4,"children":[]},{"title":"ProofType SDK","slug":"prooftype-sdk","depth":3,"children":[]}]},{"title":"Security \u0026 Compliance","slug":"security-\u0026-compliance","depth":2,"children":[]},{"title":"Testnet Deployment","slug":"testnet-deployment","depth":2,"children":[]},{"title":"Conclusion","slug":"conclusion","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/neardocs/86bd1b8645a68f87/gleap.js","/_mintlify/custom/neardocs/12aaa8206e84cdb3/scripts/patch-openapi.js"],"subdomain":"neardocs","siteName":"NEAR Docs","title":"Decentralized Identifiers (DIDs) - NEAR Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-03-24T14:25:00.267Z","originalFileLocation":"primitives/didnear.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Learn about W3C-compliant identity resolution on NEAR.\">\u003cmeta data-mint-head name=\"application-name\" content=\"NEAR Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/neardocs/jx3X3HW4FX2vbKtn/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/neardocs/jx3X3HW4FX2vbKtn/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/neardocs/jx3X3HW4FX2vbKtn/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/neardocs/jx3X3HW4FX2vbKtn/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/neardocs/jx3X3HW4FX2vbKtn/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/neardocs/jx3X3HW4FX2vbKtn/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/neardocs/jx3X3HW4FX2vbKtn/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/neardocs/jx3X3HW4FX2vbKtn/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/neardocs/jx3X3HW4FX2vbKtn/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Decentralized Identifiers (DIDs) - NEAR Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Learn about W3C-compliant identity resolution on NEAR.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"NEAR Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.near.org/primitives/didnear\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://neardocs.mintlify.app/_mintlify/api/og/v2?division=Identity\u0026amp;title=Decentralized+Identifiers+%28DIDs%29\u0026amp;description=Learn+about+W3C-compliant+identity+resolution+on+NEAR.\u0026amp;theme=df941d03d19b89657352cf9a\u0026amp;signature=f240a40ffa4f108d9027551f94401960db610d4bcea4d216caa116ccd00c6058\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Decentralized Identifiers (DIDs) - NEAR Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Learn about W3C-compliant identity resolution on NEAR.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://neardocs.mintlify.app/_mintlify/api/og/v2?division=Identity\u0026amp;title=Decentralized+Identifiers+%28DIDs%29\u0026amp;description=Learn+about+W3C-compliant+identity+resolution+on+NEAR.\u0026amp;theme=df941d03d19b89657352cf9a\u0026amp;signature=f240a40ffa4f108d9027551f94401960db610d4bcea4d216caa116ccd00c6058\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/neardocs/jx3X3HW4FX2vbKtn/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"NEAR Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#1fb858\">\u003cmeta data-mint-head name=\"google-site-verification\" content=\"x36GvqeIYFjDAl2NNFM-83XykcMYMLRY6f9lgUZbDpA\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.near.org/primitives/didnear\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/primitives/didnear.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.near.org/#organization\",\"name\":\"NEAR Docs\",\"url\":\"https://docs.near.org\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/neardocs/qO2GD-gji1aakHqN/assets/logo.svg?fit=max\u0026auto=format\u0026n=qO2GD-gji1aakHqN\u0026q=85\u0026s=fe9551b1c3085e39a97965b2886dad4a\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.near.org#website\",\"name\":\"NEAR Docs\",\"url\":\"https://docs.near.org\",\"publisher\":{\"@id\":\"https://docs.near.org/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.near.org/primitives/didnear#webpage\",\"url\":\"https://docs.near.org/primitives/didnear\",\"name\":\"Decentralized Identifiers (DIDs)\",\"description\":\"Learn about W3C-compliant identity resolution on NEAR.\",\"dateModified\":\"2026-03-24T14:25:00.267Z\",\"isPartOf\":{\"@id\":\"https://docs.near.org#website\"},\"breadcrumb\":{\"@id\":\"https://docs.near.org/primitives/didnear#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.near.org/primitives/didnear#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"NEAR Docs\",\"item\":\"https://docs.near.org\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Decentralized Identifiers (DIDs)\",\"item\":\"https://docs.near.org/primitives/didnear\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.near.org/primitives/didnear#article\",\"headline\":\"Decentralized Identifiers (DIDs)\",\"name\":\"Decentralized Identifiers (DIDs)\",\"description\":\"Learn about W3C-compliant identity resolution on NEAR.\",\"url\":\"https://docs.near.org/primitives/didnear\",\"mainEntityOfPage\":{\"@id\":\"https://docs.near.org/primitives/didnear#webpage\"},\"dateModified\":\"2026-03-24T14:25:00.267Z\",\"publisher\":{\"@id\":\"https://docs.near.org/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.near.org#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"NEAR Docs\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"NEAR Docs","nav":{"global":null,"tabs":[{"tab":"Home","icon":"house","pages":[{"title":"Home","href":""}]},{"tab":"Protocol","icon":"layers","pages":[{"title":"Protocol","href":"/protocol/network/architecture"}]},{"tab":"Smart Contracts","icon":"file-badge","pages":[{"title":"Smart Contracts","href":"/smart-contracts/what-is"}]},{"tab":"Web3 Apps","icon":"terminal","pages":[{"title":"Web3 Apps","href":"/web3-apps/what-is"}]},{"tab":"Multi-Chain","icon":"link-2","pages":[{"title":"Multi-Chain","href":"/chain-abstraction/what-is"}]},{"tab":"Tokens \u0026 Primitives","icon":"coins","groups":[{"group":" ","pages":[{"title":"What are Primitives?","sidebarTitle":"Introduction","icon":"info","href":"/primitives/what-is"}]},{"group":"Fungible Tokens (FT)","pages":[{"title":"The Standard","icon":"circle-dollar-sign","href":"/primitives/ft/standard"},{"title":"Using FTs","icon":"circle-dollar-sign","href":"/primitives/ft/ft"},{"title":"Creating a FT Contract","icon":"circle-dollar-sign","href":"/primitives/ft/sdk-contract-tools"}]},{"group":"Non-Fungible Tokens (NFT)","pages":[{"title":"The Standard","icon":"image","href":"/primitives/nft/standard"},{"title":"Using NFTs","icon":"image","href":"/primitives/nft/nft"},{"title":"Creating a NFT Contract","icon":"image","href":"/primitives/nft/sdk-contract-tools"}]},{"group":"Linkdrops","pages":[{"title":"The Standard","icon":"link","href":"/primitives/linkdrop/standard"},{"title":"Using Linkdrops","icon":"link","href":"/primitives/linkdrop/linkdrop"}]},{"group":"Governance","pages":[{"title":"Decentralized Autonomous Organizations","icon":"landmark","href":"/primitives/dao"}]},{"group":"DeFi","pages":[{"title":"Oracles","icon":"trending-up","href":"/primitives/oracles"},{"title":"Decentralized Exchanges (DEX)","icon":"trending-up","href":"/primitives/dex"},{"title":"Tokenized Vaults","icon":"trending-up","href":"/primitives/tokenized-vaults"}]},{"group":"Off-chain Compute","pages":[{"title":"Off-chain Compute","href":"/primitives/off-chain-compute/what-is"},{"title":"OutLayer","description":"OutLayer is a verifiable off-chain compute platform for NEAR. Run Rust/WASM code inside Intel TDX enclaves with built-in VRF, secrets, MPC vaults, and payment keys.","href":"/primitives/off-chain-compute/outlayer"}]},{"group":"Identity","pages":[{"title":"Decentralized Identifiers (DIDs)","icon":"fingerprint","href":"/primitives/didnear"}]},{"group":"Social","pages":[{"title":"Social","icon":"users","description":"Learn how to build social features on NEAR - profiles, posts, follows, likes and notifications - using SocialDB (social.near) and the near-social-js SDK.","href":"/primitives/social"}]},{"group":"Lockup Contracts","pages":[{"title":"Introduction","icon":"clock","href":"/primitives/lockup/introduction"},{"title":"Lockup Contracts","icon":"clock","href":"/primitives/lockup/lockup"}]},{"group":"Liquid Staking","pages":[{"title":"Using Liquid Staking","icon":"droplets","href":"/primitives/liquid-staking/liquid-staking"},{"title":"Deploying Your Own Contract","icon":"droplets","href":"/primitives/liquid-staking/deploy-your-own-contract"}]}]},{"tab":"Data Infra","icon":"database","pages":[{"title":"Data Infra","href":"/data-infrastructure/what-is"}]},{"tab":"Integrations","icon":"plug","pages":[{"title":"Integrations","href":"/integrations/exchange-integration"}]},{"tab":"RPC","icon":"server","pages":[{"title":"RPC","href":"/api/rpc/introduction"}]}]},"basePath":"","title":"Decentralized Identifiers (DIDs) - NEAR Docs","buildId":"dpl_36EDyZCDfRuoUD9af5CH4M1bqY2h","deploymentId":"dpl_36EDyZCDfRuoUD9af5CH4M1bqY2h","dynamics":[],"chunks":[]}