{"id":19294562,"url":"https://github.com/web3-storage/ucanto-name-system","last_synced_at":"2025-04-22T08:30:33.364Z","repository":{"id":40492224,"uuid":"487951437","full_name":"web3-storage/ucanto-name-system","owner":"web3-storage","description":null,"archived":true,"fork":false,"pushed_at":"2022-05-24T06:47:58.000Z","size":701,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-12T22:42:35.998Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/web3-storage.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-05-02T18:35:30.000Z","updated_at":"2024-04-18T16:37:51.000Z","dependencies_parsed_at":"2022-08-09T22:00:55.255Z","dependency_job_id":null,"html_url":"https://github.com/web3-storage/ucanto-name-system","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/web3-storage%2Fucanto-name-system","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/web3-storage%2Fucanto-name-system/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/web3-storage%2Fucanto-name-system/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/web3-storage%2Fucanto-name-system/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/web3-storage","download_url":"https://codeload.github.com/web3-storage/ucanto-name-system/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250205970,"owners_count":21392157,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-09T22:38:43.832Z","updated_at":"2025-04-22T08:30:32.854Z","avatar_url":"https://github.com/web3-storage.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ucanto-name-service\n\nA networked service that maintains a mapping of [DID](https://www.w3.org/TR/did-core/)s to [CID](https://github.com/multiformats/cid)s.\n\nControllers of a DID can invoke the `name/publish` capability to change the CID corresponding to their DID.\n\nControllers can also delegate the `name/publish` capability using [UCAN](https://github.com/ucan-wg/spec)s so that other people can publish on their behalf.\n\nAnyone can resolve the CID for a DID using the `name/resolve` capability.\n\n## Usage\n\nThere is a hosted instance [on glitch](https://glitch.com/edit/#!/cypress-fluttering-koala) accessible at:\n* http-name-resolver: https://cypress-fluttering-koala.glitch.me\n* ucanto HTTP transport control plane: https://cypress-fluttering-koala.glitch.me/control\n\n```bash\nsecret=\"$(npx --yes @web3-storage/ucanto-name-system request-secret)\"\necho \"secret=$secret\"\n\ndid=\"$(npx --yes @web3-storage/ucanto-name-system whoami $secret)\"\necho \"did=$did\"\n\nglitch_data_uri=\"https://cypress-fluttering-koala.glitch.me\"\nglitch_control_uri=\"$glitch_data_uri/control\"\n\necho \"resolving before publish, expecting 404 response\"\ncurl \"$glitch_data_uri/$did\" -i\n\necho \"publishing new cid\"\nnpx --yes @web3-storage/ucanto-name-system publish --uri=\"$glitch_control_uri\" --secret=\"$secret\" --cid=\"bafkreigh2akiscaildcqabsyg3dfr6chu3fgpregiymsck7e7aqa4s52zy\"\n\necho \"resolving after publish\"\ncurl \"$glitch_data_uri/$did\" -i | grep location\n\necho \"opening in browser\"; sleep 2;\nopen \"$glitch_data_uri/$did\"\n```\n\n## Interface\n\n```js\ninterface Publish {\n  can: \"name/publish\"\n  with: DID\n  content: Link\u003cany\u003e\n  origin: null|Link\u003cPublish\u003e\n}\n\ninterface Resolve {\n  can: \"name/resolve\",\n  with: DID\n}\n\ninterface NameService {\n  publish(request: Invocation\u003cPublish\u003e): Promise\u003c\n    Result\u003c\n      Link\u003cPublish\u003e\u003e,\n      PermissionError | OriginError\n    \u003e\n  \u003e\n  resolve(request: Invocation\u003cResolve\u003e): Promise\u003c\n    Result\u003c\n      Publish,\n      PermissionError | NotFoundError\n    \u003e\n  \u003e\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweb3-storage%2Fucanto-name-system","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fweb3-storage%2Fucanto-name-system","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweb3-storage%2Fucanto-name-system/lists"}