{"id":18908818,"url":"https://github.com/orbitdb/orbit-db-polkadot-iam","last_synced_at":"2025-04-15T05:32:07.910Z","repository":{"id":46564693,"uuid":"362249427","full_name":"orbitdb/orbit-db-polkadot-iam","owner":"orbitdb","description":"Identity Provider and Access Controller for Polkadot / Substrate based accounts","archived":false,"fork":false,"pushed_at":"2021-10-05T17:03:10.000Z","size":204,"stargazers_count":5,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-28T16:43:51.245Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/orbitdb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-04-27T20:59:30.000Z","updated_at":"2022-01-19T10:39:18.000Z","dependencies_parsed_at":"2022-09-13T07:00:33.424Z","dependency_job_id":null,"html_url":"https://github.com/orbitdb/orbit-db-polkadot-iam","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orbitdb%2Forbit-db-polkadot-iam","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orbitdb%2Forbit-db-polkadot-iam/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orbitdb%2Forbit-db-polkadot-iam/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orbitdb%2Forbit-db-polkadot-iam/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/orbitdb","download_url":"https://codeload.github.com/orbitdb/orbit-db-polkadot-iam/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249015511,"owners_count":21198823,"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-08T09:28:47.452Z","updated_at":"2025-04-15T05:32:07.648Z","avatar_url":"https://github.com/orbitdb.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# OrbitDB / Polkadot IAM _(orbit-db-polkadot-iam)_\n\n\u003e Identity Provider and Access Controller for Polkadot / Substrate based accounts\n\n## Install\n\nThis is a [node.js](https://nodejs.org) project.\n\n```bash\n# deps\nnpm install ipfs orbit-db @polkadot/api\n\n# install this package\nnpm install orbit-db-polkadot-iam\n```\n\nSee the [tests](https://github.com/orbitdb/orbit-db-polkadot-iam/tree/main/test)\nfor examples or the following usage section.\n\n## Usage\n\n```JavaScript\nconst assert = require('assert')\nconst OrbitDB = require('orbit-db')\nconst IPFS = require('ipfs')\nconst {\n  AccessControllers,\n  PolkadotIdentityProvider,\n  createIdentity\n} = require('../src/orbit-db-polkadot-iam')\n\n;(async function () {\n  // Identity creation based on the passphrase from the Polkadot documentation.\n  const phrase = 'entire material egg meadow latin bargain dutch coral blood melt acoustic thought'\n  const identity = await createIdentity(phrase)\n\n  // Identity verification using the OrbitDB internals\n  // See: https://github.com/orbitdb/orbit-db-identity-provider\n  assert(await PolkadotIdentityProvider.verifyIdentity(identity))\n\n  // Usage with IPFS and OrbitDB\n  const ipfs = await IPFS.create()\n\n  const orbitdb = await OrbitDB.createInstance(ipfs, {\n    AccessControllers: AccessControllers,\n    identity: identity\n  })\n\n  // Write access can currently be any polkadot ID aka address\n  const db = await orbitdb.kvstore('root', {\n    accessController: {\n      type: 'Polkadot',\n      write: [identity.id]\n    }\n  })\n\n  // Only allowed accounts will be permitted to write to the db\n  await db.set('foo', 'bar')\n})()\n```\n\n## Contributing\n\nIssues and PRs welcome.\n\n## License\n\nMIT © 2021 OrbitDB Community\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Forbitdb%2Forbit-db-polkadot-iam","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Forbitdb%2Forbit-db-polkadot-iam","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Forbitdb%2Forbit-db-polkadot-iam/lists"}