{"id":14384467,"url":"https://github.com/mikeal/dkv","last_synced_at":"2025-10-19T19:28:53.527Z","repository":{"id":66002831,"uuid":"302223982","full_name":"mikeal/dkv","owner":"mikeal","description":"Decentralized key-value store running on IPFS","archived":false,"fork":false,"pushed_at":"2020-10-19T04:29:37.000Z","size":17,"stargazers_count":55,"open_issues_count":1,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-19T20:00:34.076Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/mikeal.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2020-10-08T03:40:39.000Z","updated_at":"2024-05-02T11:59:20.000Z","dependencies_parsed_at":"2023-08-31T08:19:46.217Z","dependency_job_id":null,"html_url":"https://github.com/mikeal/dkv","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mikeal/dkv","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikeal%2Fdkv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikeal%2Fdkv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikeal%2Fdkv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikeal%2Fdkv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mikeal","download_url":"https://codeload.github.com/mikeal/dkv/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikeal%2Fdkv/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279002619,"owners_count":26083425,"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","status":"online","status_checked_at":"2025-10-10T02:00:06.843Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-08-28T18:01:24.648Z","updated_at":"2025-10-10T03:39:02.046Z","avatar_url":"https://github.com/mikeal.png","language":"JavaScript","readme":"# DKV (Decentralized Key-Value Store)\n\nDKV is a decentralized graph store built on IPFS.\n\n```js\nimport IPFS from 'ipfs'\nimport DKV from 'dkv'\n\nconst ipfs = await IPFS.create()\n\nlet store = await DKV.empty(ipfs)\nstore = await store.set('mykey', { hello: 'world' })\n\nstore.id // 'bafyreibbbjhk7fnxplcc6fqb24jctxffgxoqv65466gbx73n3jbqyzn3ru'\nawait store.get('mykey') // { hello: 'world' }\n```\n\nEvery mutation (`set()`, `del()`) returns a new instance because every\nmutation creates a new immutable state with a unique `id` (CID).\n\nSince the data is accessible over IPFS it is shared in a p2p network\nand other peers can access the data using the id of the store (`store.id`).\n\n```js\nlet store = DKV.from(ipfs, 'bafyreibbbjhk7fnxplcc6fqb24jctxffgxoqv65466gbx73n3jbqyzn3ru')\n```\n\n## links\n\nDKV offers a simple interface for storing key/value pairs. Values\ncan include links to other values recursively, giving you the\nability to create complex graphs that de-duplicate commonly\nlinked data.\n\n```js\nlet store = await DKV.empty(ipfs)\nconst pizza = await store.link({ type: 'food', name: 'pizza' })\nstore = await store.set('bob', { type: 'person', name: 'bob', favoriteFoor: pizza })\n\nconst bob = await store.get('bob')\nawait bob.favoriteFood() // { type: 'food', name: 'pizza' }\n```\n\n# API\n\n## DKV.empty(ipfs, pin=true)\n\n## DKV.from(ipfs, cid, pin=true)\n\n## DKV.fromEntries(ipfs, entries, pin=true)\n\n## store.get(key)\n\n## store.set(key, value)\n\n## store.set(map)\n\n## store.del(key)\n\n## store.del(keys)\n","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikeal%2Fdkv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmikeal%2Fdkv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikeal%2Fdkv/lists"}