{"_id":"orbit-db-identity-provider","_rev":"41-2d36c86ce8a3650a8b6831316523b554","name":"orbit-db-identity-provider","dist-tags":{"latest":"0.5.0","next":"0.5.1-3f895b7.0"},"versions":{"0.0.1":{"name":"orbit-db-identity-provider","version":"0.0.1","description":"Default identity provider for OrbitDB","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/orbitdb/orbit-db-identity-provider.git"},"keywords":[],"author":{"name":"shamb0t"},"license":"MIT","bugs":{"url":"https://github.com/orbitdb/orbit-db-identity-provider/issues"},"homepage":"https://github.com/orbitdb/orbit-db-identity-provider#readme","gitHead":"d49c093133f8767b863d7d94be83379adf0b6b7a","_id":"orbit-db-identity-provider@0.0.1","_npmVersion":"6.4.0","_nodeVersion":"9.3.0","_npmUser":{"name":"shamb0t","email":"shams.methnani@gmail.com"},"dist":{"integrity":"sha512-bH1sbKEhxehBQ2dLd0L/DWLz45AF+hpd6XxnYEnmPe+pLqwhYZOVG5YZte+bx+q7rWBuSeNqbM3zk8N3EHy/kQ==","shasum":"be6befc78f23eaaa668c893222816926d747738e","tarball":"https://registry.npmjs.org/orbit-db-identity-provider/-/orbit-db-identity-provider-0.0.1.tgz","fileCount":7,"unpackedSize":4650,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbhV18CRA9TVsSAnZWagAAV2sP/1uYmlGLlydcuMDSanfq\n5ZK+OL0MivEcojF1Vd8XiKd4eqT0K4/6mnC2cWPVwbFLS0UZBJNyYTkVdqS2\nca69DMKumMMi5DDrENsfmijB094aIHD8HE9DcZqKc9K+T7W1+NT9VVWKT2PC\ndVwSuwnp5u76B6ypmlhDoL80+xiqZnfcDMBND+dLRo4/1C+LY/X1uEsJbWtm\nL4kZv2QNYYjpRhXeMwt1tVMWisIEcBfXIfSLGPFu1lmfz78AyXChM3XLlsek\nr+eMS53QEVB5d5BryBSeaejqB3tz3C6kbOGZCeCuLfBTDg5cSiGwqGYrr4Vf\nv2dy0jdj1rUQvgnJSh/ftZ9KxcqLI5capRjTLdaFnBN67e2BiRIK7NeGVNyt\ngOp5KqgIVVL+079eiEXM48dvzwBE7Z3m9lkNAd6lO5I0CNdlPoOJ2P4X92i8\nFa7pJtHlY3ZDrw9PUzwTSFMKgjvO4UgKqVPpzoWqLIfPnVO5jv7pKLBSFb7L\nDtQJMzbjusp/PhwpkUl7kZyOW89KD6EvS6MQDYLj2Kbrl2zyLenNGX4BRY1c\niUV+yiJ6CQ7eijgFR6Q738OrU6UENXRw6VAI5OONK5t3w9aUeTexGu4pFHHs\n/w/qvC2/PybIow04u1MMKEAuX5EQOTgICJYVfY7YBO6ZWcbwWG45INNI+4vZ\nrl66\r\n=bisa\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEh2hyfXIkZSdFNUCVEeBdPeYrmnf5K58vCs86RVFcYiAiEA1BtJnFf4GLPH/+bnjwmkcqo5KVfVx+duAiCyRqW3au0="}]},"maintainers":[{"name":"shamb0t","email":"shams.methnani@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/orbit-db-identity-provider_0.0.1_1535466875853_0.6857491342966255"},"_hasShrinkwrap":false,"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.0.2":{"name":"orbit-db-identity-provider","version":"0.0.2","description":"Default identity provider for OrbitDB","main":"index.js","scripts":{"test":"mocha"},"repository":{"type":"git","url":"git+https://github.com/orbitdb/orbit-db-identity-provider.git"},"keywords":[],"author":{"name":"shamb0t"},"license":"MIT","bugs":{"url":"https://github.com/orbitdb/orbit-db-identity-provider/issues"},"homepage":"https://github.com/orbitdb/orbit-db-identity-provider#readme","devDependencies":{"ethers":"^3.0.27","mkdirp":"^0.5.1","mocha":"^5.2.0","node-localstorage":"^1.3.1","orbit-db-keystore":"github:orbitdb/orbit-db-keystore#fix/verification","rimraf":"^2.6.2"},"gitHead":"693ff383f48807a3b3330d9c462662757580c58b","_id":"orbit-db-identity-provider@0.0.2","_npmVersion":"6.4.0","_nodeVersion":"9.3.0","_npmUser":{"name":"shamb0t","email":"shams.methnani@gmail.com"},"dist":{"integrity":"sha512-xE69h4FBIBU4im3KoirRxblHQyDeZesMKw12QqUtRYiIHVT7vhI4hx1QmsUDlZerBz8Pv4IJN4wVMijqCpc7xQ==","shasum":"f2e05ac05b2154667ab341e1da8402cea5d056f7","tarball":"https://registry.npmjs.org/orbit-db-identity-provider/-/orbit-db-identity-provider-0.0.2.tgz","fileCount":11,"unpackedSize":22132,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbmnvyCRA9TVsSAnZWagAA2H0P/idwqhZ9Qo7kPXi2Zo7v\ngMRE32epGrKV6CyavKXyOAFhRfE/nEyko1nVaq6ZuHVE0Al2dLKtzy8hP4br\noV49FAe8O0p0zESA+oP4mu1Gx1OUKqoTl6mjRaP7x/NwSFPYDTpamMaLPtvA\nm7jnFKbQiWrDeOf7k7dQ4IKZk0j+mbeJhb07l0EE9PbEY2Ta5XXxgzaZeKEl\n6yQEAEKxXXFd/NIgRwL0NCviEHJ7fRGEdIc7Xs3A5Hws0o3fgm7q/zQMbG4o\n2yECStXgb8Y4hkUVYlz1AkDCpFwgLwlg97+XWBHkNWOcx5PHsyUpxssr7+wQ\npH2fmKixzQTEv3S2X0XKv6KSMUnx9HTANeY7AmVW3P3dlQ2seX/1IzUrkXT4\nQVYEsCQ8bSQK74R9FwL9FGpODFj+VMdLnQySm7qG9HCqZSSWTT8S0UqnsgJ5\n9Xy2Hcq2/IA10Gv5QEEis7LVZ0RnfjYzd+KKQDXdTq/ZH9ksUfFD06B4FXMf\nqPX8OsNdrxIuacbTxwJkUVYwacV4fdW9fJwWa/21v2c5WuBCGqSVLSXr9RB4\n/z0WrCDrVm8ogCdjCM1v4DR1aN/dGFU5Xb4uhDo4yWsG9o17mMLBI1jl+/gP\nMNFDWaJZjbk3uAma4m38ov5WXC+VUokoWBv/Npxsf+m1RGh1wa4EfefZ/G6E\ndJ15\r\n=w44H\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGVfdZodsgFuYZybWc+mlbUa+vw2s0JHyBTXU3VMa5dxAiEAlZsi/pUwh0M6EsMRkcdKZNYGSF7juyqYWmiI0KX4iVs="}]},"maintainers":[{"email":"haad@headbanggames.com","name":"haad"},{"email":"shams.methnani@gmail.com","name":"shamb0t"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/orbit-db-identity-provider_0.0.2_1536850929955_0.1991507538840962"},"_hasShrinkwrap":false,"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.0.3":{"name":"orbit-db-identity-provider","version":"0.0.3","description":"Default identity provider for OrbitDB","main":"index.js","scripts":{"test":"mocha"},"repository":{"type":"git","url":"git+https://github.com/orbitdb/orbit-db-identity-provider.git"},"keywords":[],"author":{"name":"shamb0t"},"license":"MIT","bugs":{"url":"https://github.com/orbitdb/orbit-db-identity-provider/issues"},"homepage":"https://github.com/orbitdb/orbit-db-identity-provider#readme","devDependencies":{"ethers":"^3.0.27","mkdirp":"^0.5.1","mocha":"^5.2.0","node-localstorage":"^1.3.1","orbit-db-keystore":"github:orbitdb/orbit-db-keystore#fix/verification","rimraf":"^2.6.2"},"gitHead":"4bfba4d2dbf3f31868e03a07661dcaaf15e33932","_id":"orbit-db-identity-provider@0.0.3","_npmVersion":"6.4.0","_nodeVersion":"9.3.0","_npmUser":{"name":"shamb0t","email":"shams.methnani@gmail.com"},"dist":{"integrity":"sha512-Cr3NuaZRj27VGL9VcQSPGqEeUp6PzQ50ha+BDxFpIjsffzjfk7MPEVOexblOp7TJ955YSg4h8lUDr1hMObCHJQ==","shasum":"1a31f9d4572e482313743a6241fc02dbf859c35d","tarball":"https://registry.npmjs.org/orbit-db-identity-provider/-/orbit-db-identity-provider-0.0.3.tgz","fileCount":11,"unpackedSize":22495,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJboMztCRA9TVsSAnZWagAAVCMP+wfptPUNCecLC8HTlH4a\ng82rSVrLrBxTfqrFAHs8BetnVuOXdSqTXIXW0+r/qHIEhMkvPJOaVsXDkKrl\n+yvwpcqLZmyfQl/YdZMM6HKgp2esz90jRkjoCgjuOObCs2M7QsbQcFcONvXf\n6DK2ZJoPl988en/P+3SjmS+ik7Q2gNWBkCtSjzpfdaccVMeseKsB9VBEwivB\nTGcXREIIihtx4hj0Zot1l3OWF7M2cWMDprlNmNv7VD46GJSjhDQxv0uQ54G9\nlwLNjnDx66N8aYyziTNeI0/SyNcp5DLXmvl4XiMq6h7wR30vCOGhdVQcvaDD\nyu87fP2VyNdzITts5hrr0/lmHCGGUw4QTzHOS9H3mtVXNMHqZeYgzRjJfUrN\nMKy8u6bKe/ekDfY1NrR1+afuCalB/rZUUfITp9hVZaWLS3lPhDpPszlKMObi\noOiBsbRD9PhGROg6A4UeFm3z5Z7CnqNbT/HBSIuWeuxDcFYn+qWf0FvVNuZy\nfEXOnK2L/nuDe2tHQzOApUwyIzgeXxnEre8xmnFH4PgdI7aLpDwFKx7pv8Xk\nXjtyg5BQJPSngknIouzMFDFBf7uw310HtjXRILk3geteKrKcZVibSUgbeFZh\nFAsNvJ5eBe5PFjzWDz9lDn4TDX71aqimebruYc0F1KkG/J/KmbL0c95Edbrf\n/XF8\r\n=p7OP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCID+rv/CiUGLcxWe2H/11AcLuAklBcRAosPk8doQ07YsJAiBUptaJHTkngO8PvMk4dHW8o41UCvUk4tdAuLnetR2P3Q=="}]},"maintainers":[{"email":"haad@headbanggames.com","name":"haad"},{"email":"shams.methnani@gmail.com","name":"shamb0t"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/orbit-db-identity-provider_0.0.3_1537264876850_0.31195189698519443"},"_hasShrinkwrap":false,"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.1.0-rc.1":{"name":"orbit-db-identity-provider","version":"0.1.0-rc.1","description":"Default identity provider for OrbitDB","main":"index.js","scripts":{"test":"mocha","lint":"standard","build":"npm run build:dist","build:dist":"webpack --config webpack.config.js --display-modules --sort-modules-by size --mode=production"},"repository":{"type":"git","url":"git+https://github.com/orbitdb/orbit-db-identity-provider.git"},"keywords":["orbitdb","orbit-db","identity"],"author":{"name":"shamb0t"},"contributors":[{"name":"shamb0t"},{"name":"haadcode"},{"name":"RichardLitt"},{"name":"latenssi"},{"name":"adam-palazzo"}],"license":"MIT","bugs":{"url":"https://github.com/orbitdb/orbit-db-identity-provider/issues"},"homepage":"https://github.com/orbitdb/orbit-db-identity-provider#readme","devDependencies":{"fs-extra":"^7.0.1","mocha":"^5.2.0","rimraf":"^2.6.2","standard":"^12.0.1","webpack":"^4.27.1","webpack-cli":"^3.1.2","localstorage-level-migration":"github:orbitdb/localstorage-level-migration"},"standard":{"env":["mocha"]},"dependencies":{"ethers":"^4.0.20","orbit-db-keystore":"rc1"},"readme":"# orbit-db-identity-provider\n\n[![Gitter](https://img.shields.io/gitter/room/nwjs/nw.js.svg)](https://gitter.im/orbitdb/Lobby)  \n[![npm version](https://badge.fury.io/js/orbit-db-identity-provider.svg)](https://www.npmjs.com/package/orbit-db-identity-provider)\n\n> Default identity provider for OrbitDB\n\n`Identities` is a package to manage identities in [@OrbitDB](http://github.com/orbitdb/orbit-db)\n\n## Table of Contents\n\n  - [Install](#install)\n  - [Usage](#usage)\n    - [Creating an identity](#creating-an-identity)\n    - [Adding a custom identity signer and verifier](#adding-a-custom-identity-signer-and-verifier)\n    - [Properties](#properties)\n      - [id](#id)\n      - [publicKey](#publickey)\n      - [signatures](#signatures)\n  - [Contribute](#contribute)\n    - [Tests](#tests)\n    - [Build](#build)\n    - [Linting](#linting)\n  - [License](#license)\n\n## Install\n\nThis project uses [npm](https://npmjs.com/) and [nodejs](https://nodejs.org/)\n\n```sh\n$ npm i --save orbit-db-identity-provider\n```\n\n## Usage\n\nThe `Identity` object contains signatures proving possession of some external identifier and an OrbitDB public key. This is included to allow proof of ownership of an external identifier within OrbitDB.\n\n### Creating an identity\n```js\nconst Identities = require('orbit-db-identity-provider')\nconst options = { id: 'local-id'}\nconst identity = await Identities.createIdentity(options)\n\nconsole.log(identity.toJSON())\n// prints\n{\n  id: '045757bffcc7a4f4cf94c0cf214b3d3547a62195a09588df36b74aff837b2fdc14551360a323bf9de2ac8fb2eda9bd1bae5de53577a8db41ee2b46b4bf8cd7be33',\n  publicKey: '04b5c54ef8f2514a58338e64aa08aa6052c3cfef1225a10b51017f2ad63a92fb166e7a19cba44321c9402ab1b62c940cd5e65e81e4d584c1208dbd021f6e22c6f5',\n  signatures:  {\n    id: '3046022100aab534483f474bd3791eb9dcf1f61b6bdb4b07f70e8eca1ea7b530ac0ca13ca1022100e9d95eeeacc9813808400eb37f8aae6be7873df460d2a03e7a19132e34f0bd16',\n    publicKey: '30440220514b6fee38cbec96d9851905e575d6e209834c94be5e009a8261737d4ef23dfc0220794fa8dee564701d337b68fdbeef76bb81d777154c211d84ac345ec287a2a8e1'\n  },\n  type: 'orbitdb'\n}\n\n```\nIf `options.type` is not specified, Identities will default to creating an identity with type '`orbitdb'`, meaning the signing key will sign another OrbitDB public key. This public key can be an already-existing OrbitDB key allowing you to link several keys to a 'master' OrbitDB key to, for example, link keys across devices.\n\nTo use an existing keystore, you can pass it as an argument in the options as follows:\n```js\nconst identity = await Identities.createIdentity({ id: 'local-id', keystore: existingKeystore })\n```\n\n### Create identity using existing keys\n\nTo create an identity using existing keys, you need to install `localstorage-level-migration`\n\n```js\nconst Identities = require('orbit-db-identity-provider')\nconst migrate = require('localstorage-level-migration')\nconst options = { id: 'new-id', migrate: migrate('/path/to/keys') }\nconst identity = await Identities.createIdentity(options)\n\nconsole.log(identity.toJSON())\n// prints\n{\n  id: '<new-id>',\n  publicKey: '<compressed-original-key>',\n  signatures:  {\n    id: '<new-id-signed-by-public-key>',\n    publicKey: '<public-key-signed-by-id>'\n  },\n  type: 'orbitdb'\n}\n\n```\n\n### Adding a custom identity signer and verifier\n\nTo link an OrbitDB signing key with an external identity, you must provide a custom class which implements the `IdentityProvider` [interface](https://github.com/orbitdb/orbit-db-identity-provider/blob/master/src/identity-provider-interface.js).\n\n```js\nclass MyIdentityProvider extends IdentityProvider {\n  static get type () { return 'MyIdentityType' } // return type\n  async getId () { } // return identifier of external id (eg. a public key)\n  async signIdentity (data) { } //return a signature of data (signature of the OrbtiDB public key)\n  static async verifyIdentity (identity) { } //return true if identity.sigantures are valid\n}\n\nIdentities.addIdentityProvider(MyIdentityProvider)\n\n// to create an identity of type `MyIdentityType`\nconst identity = await Identities.createIdentity({ type: `MyIdentityType`})\n\n```\n\n\n### Properties\n\n#### id\n\nReturns the ID of the external identity.\n\n#### publicKey\n\nReturns the signing key used to sign OrbitDB entries.\n\n#### signatures\nReturns an object containing two signatures\n```js\n{ id: <id-signature>, publicKey: <pub-key+id-siganture> }\n```\n\nThe first signature, `id`, is `identity.id` signed by `identiy.publicKey`. This allows the owner of `id` to prove they own the private key associated with `publicKey`. The second signature `publicKey` is created by signing the concatenation `identity.signature.id + identity.publicKey` using `identity.id`. This links the two identifiers.\n\n## Contribute\n\nPlease, feel free to contribute! Take a look at [the issues](https://github.com/orbitdb/orbit-db-identity-provider/issues), and comment on an existing issue or create a new one if you have questions, bugs, or suggestions. For larger PRs, open an issue first if you could - drive-by PRs are also welcomed.\n\nPlease abide by the [Code of Conduct](CODE_OF_CONDUCT.md). For more on contributing to [@OrbitDB](https://github.com/orbitdb/), check out the docs in [orbitdb/welcome](https://github.com/orbitdb/welcome).\n\n### Tests\n\nRun tests with:\n\n```sh\n$ npm test\n```\n\n### Build\n\nThe build script will build the distribution file for browsers.\n\n```sh\n$ npm run build\n```\n\n### Linting\n\nPlease use [`standard`](https://standardjs.com). To check,\n\n\n```sh\n$ npm run lint\n```\n\n## License\n\n[MIT](LICENSE) © 2018 Haja Networks Oy\n","readmeFilename":"README.md","gitHead":"e9f07054f67d8ea047cce168e996c33cc6ee21ee","_id":"orbit-db-identity-provider@0.1.0-rc.1","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"shamb0t","email":"shams@haja.io"},"dist":{"integrity":"sha512-HSwNnITN1Xy9Ka/wY67kGeaO6B60upO7Bzyye+VIPdroXRXxFQDkj4AdrqnyWkZaLWJQBiGQhcalWcf/1FTpxQ==","shasum":"7a7bb622a045f83c4df0f398678d3d2e0773eef2","tarball":"https://registry.npmjs.org/orbit-db-identity-provider/-/orbit-db-identity-provider-0.1.0-rc.1.tgz","fileCount":26,"unpackedSize":186454,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcojqfCRA9TVsSAnZWagAANroP/iemhvh7Smzhf16U7Tfh\njE8ZK/nyFycA8K5AX4pddcG7crGOtDcDK8GBpV2KUhH2PI+jm0qMUQS0v2Or\npG8SJxBgwkk54FnWZcSBPBlFNzMOOpMnw57wRS+osD3MDQQe+yBj5euNk01u\n7RNuE60Bv/TzEM6P0WGbURG6HXxJHW7Jq+5pDOGTk85vodzJ/rXwiA1b7Pm9\nAwR3HcUyfAEDBLH0idR80BkQ1dOgW3XrBfry7TbtIkr8+HjNOA25GRlLZXcv\nWM1OUdW1YWo8Wftf8Hebpu8kH9a9ukJXOr99c906ghww/KNS1jGpR8ePJg6Z\nGI0tXi8A19DPOmiu0amaHGHTfn4v67K+rt6rot/Oi4qCk39iqy9EB4t9MdQq\ntXWdZ+EUTO7nD6to+2R6XJR9rPapLlVA2RvKLFGMzhcu1CyBFVa7yrzbbrmJ\n3tWdR4uD2XfJPNSpjcEjRtvgMbqN1JnxyVlrdmtlTt3bA7UOlfK1tFmx4j5x\nJYER71vW+e7r6eyMdlkFpNncGVMOOlp1t1DLrEeo54Z3TL6qIwnzfOYiNDX0\nyyi0VxcJJQUR3cH+OCpYIsx4+15hicZK0k3KWZpvR5917p1o4vxKygk5FNuZ\n1RFALuGmwHvOfToKXd2veRe5unLLHrv/eKLNgnXkEtTSvdinQ46+xF6lnZyq\nKlfY\r\n=t9US\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCapmds/iW9lW0Skf1zzQfxLb428HVhV7f2O2BSQNrycQIgaEGy3KCT4Nlq/TVB32tVBFV3zu6wZIdjwLZLxOklUTQ="}]},"maintainers":[{"email":"haad@headbanggames.com","name":"haad"},{"email":"shams.methnani@gmail.com","name":"shamb0t"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/orbit-db-identity-provider_0.1.0-rc.1_1554135711183_0.4333651085968966"},"_hasShrinkwrap":false,"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.1.0-rc.1.1":{"name":"orbit-db-identity-provider","version":"0.1.0-rc.1.1","description":"Default identity provider for OrbitDB","main":"index.js","scripts":{"test":"mocha","lint":"standard","build":"npm run build:dist","build:dist":"webpack --config webpack.config.js --display-modules --sort-modules-by size --mode=production"},"repository":{"type":"git","url":"git+https://github.com/orbitdb/orbit-db-identity-provider.git"},"keywords":["orbitdb","orbit-db","identity"],"author":{"name":"shamb0t"},"contributors":[{"name":"shamb0t"},{"name":"haadcode"},{"name":"RichardLitt"},{"name":"latenssi"},{"name":"adam-palazzo"}],"license":"MIT","bugs":{"url":"https://github.com/orbitdb/orbit-db-identity-provider/issues"},"homepage":"https://github.com/orbitdb/orbit-db-identity-provider#readme","devDependencies":{"fs-extra":"^7.0.1","mocha":"^5.2.0","rimraf":"^2.6.2","standard":"^12.0.1","webpack":"^4.27.1","webpack-cli":"^3.1.2","localstorage-level-migration":"^0.0.1"},"standard":{"env":["mocha"]},"dependencies":{"ethers":"^4.0.20","orbit-db-keystore":"github:orbitdb/orbit-db-keystore#decompress"},"gitHead":"b8defc552ba992d6c4c2f6d782b6ef522b2f8306","readme":"# orbit-db-identity-provider\n\n[![Gitter](https://img.shields.io/gitter/room/nwjs/nw.js.svg)](https://gitter.im/orbitdb/Lobby)  \n[![npm version](https://badge.fury.io/js/orbit-db-identity-provider.svg)](https://www.npmjs.com/package/orbit-db-identity-provider)\n\n> Default identity provider for OrbitDB\n\n`Identities` is a package to manage identities in [@OrbitDB](http://github.com/orbitdb/orbit-db)\n\n## Table of Contents\n\n  - [Install](#install)\n  - [Usage](#usage)\n    - [Creating an identity](#creating-an-identity)\n    - [Adding a custom identity signer and verifier](#adding-a-custom-identity-signer-and-verifier)\n    - [Properties](#properties)\n      - [id](#id)\n      - [publicKey](#publickey)\n      - [signatures](#signatures)\n  - [Contribute](#contribute)\n    - [Tests](#tests)\n    - [Build](#build)\n    - [Linting](#linting)\n  - [License](#license)\n\n## Install\n\nThis project uses [npm](https://npmjs.com/) and [nodejs](https://nodejs.org/)\n\n```sh\n$ npm i --save orbit-db-identity-provider\n```\n\n## Usage\n\nThe `Identity` object contains signatures proving possession of some external identifier and an OrbitDB public key. This is included to allow proof of ownership of an external identifier within OrbitDB.\n\n### Creating an identity\n```js\nconst Identities = require('orbit-db-identity-provider')\nconst options = { id: 'local-id'}\nconst identity = await Identities.createIdentity(options)\n\nconsole.log(identity.toJSON())\n// prints\n{\n  id: '045757bffcc7a4f4cf94c0cf214b3d3547a62195a09588df36b74aff837b2fdc14551360a323bf9de2ac8fb2eda9bd1bae5de53577a8db41ee2b46b4bf8cd7be33',\n  publicKey: '04b5c54ef8f2514a58338e64aa08aa6052c3cfef1225a10b51017f2ad63a92fb166e7a19cba44321c9402ab1b62c940cd5e65e81e4d584c1208dbd021f6e22c6f5',\n  signatures:  {\n    id: '3046022100aab534483f474bd3791eb9dcf1f61b6bdb4b07f70e8eca1ea7b530ac0ca13ca1022100e9d95eeeacc9813808400eb37f8aae6be7873df460d2a03e7a19132e34f0bd16',\n    publicKey: '30440220514b6fee38cbec96d9851905e575d6e209834c94be5e009a8261737d4ef23dfc0220794fa8dee564701d337b68fdbeef76bb81d777154c211d84ac345ec287a2a8e1'\n  },\n  type: 'orbitdb'\n}\n\n```\nIf `options.type` is not specified, Identities will default to creating an identity with type '`orbitdb'`, meaning the signing key will sign another OrbitDB public key. This public key can be an already-existing OrbitDB key allowing you to link several keys to a 'master' OrbitDB key to, for example, link keys across devices.\n\nTo use an existing keystore, you can pass it as an argument in the options as follows:\n```js\nconst identity = await Identities.createIdentity({ id: 'local-id', keystore: existingKeystore })\n```\n\n### Create identity using existing keys\n\nTo create an identity using existing keys, you need to install `localstorage-level-migration`\n\n```js\nconst Identities = require('orbit-db-identity-provider')\nconst migrate = require('localstorage-level-migration')\nconst options = { id: 'new-id', migrate: migrate('/path/to/keys') }\nconst identity = await Identities.createIdentity(options)\n\nconsole.log(identity.toJSON())\n// prints\n{\n  id: '<new-id>',\n  publicKey: '<compressed-original-key>',\n  signatures:  {\n    id: '<new-id-signed-by-public-key>',\n    publicKey: '<public-key-signed-by-id>'\n  },\n  type: 'orbitdb'\n}\n\n```\n\n### Adding a custom identity signer and verifier\n\nTo link an OrbitDB signing key with an external identity, you must provide a custom class which implements the `IdentityProvider` [interface](https://github.com/orbitdb/orbit-db-identity-provider/blob/master/src/identity-provider-interface.js).\n\n```js\nclass MyIdentityProvider extends IdentityProvider {\n  static get type () { return 'MyIdentityType' } // return type\n  async getId () { } // return identifier of external id (eg. a public key)\n  async signIdentity (data) { } //return a signature of data (signature of the OrbtiDB public key)\n  static async verifyIdentity (identity) { } //return true if identity.sigantures are valid\n}\n\nIdentities.addIdentityProvider(MyIdentityProvider)\n\n// to create an identity of type `MyIdentityType`\nconst identity = await Identities.createIdentity({ type: `MyIdentityType`})\n\n```\n\n\n### Properties\n\n#### id\n\nReturns the ID of the external identity.\n\n#### publicKey\n\nReturns the signing key used to sign OrbitDB entries.\n\n#### signatures\nReturns an object containing two signatures\n```js\n{ id: <id-signature>, publicKey: <pub-key+id-siganture> }\n```\n\nThe first signature, `id`, is `identity.id` signed by `identiy.publicKey`. This allows the owner of `id` to prove they own the private key associated with `publicKey`. The second signature `publicKey` is created by signing the concatenation `identity.signature.id + identity.publicKey` using `identity.id`. This links the two identifiers.\n\n## Contribute\n\nPlease, feel free to contribute! Take a look at [the issues](https://github.com/orbitdb/orbit-db-identity-provider/issues), and comment on an existing issue or create a new one if you have questions, bugs, or suggestions. For larger PRs, open an issue first if you could - drive-by PRs are also welcomed.\n\nPlease abide by the [Code of Conduct](CODE_OF_CONDUCT.md). For more on contributing to [@OrbitDB](https://github.com/orbitdb/), check out the docs in [orbitdb/welcome](https://github.com/orbitdb/welcome).\n\n### Tests\n\nRun tests with:\n\n```sh\n$ npm test\n```\n\n### Build\n\nThe build script will build the distribution file for browsers.\n\n```sh\n$ npm run build\n```\n\n### Linting\n\nPlease use [`standard`](https://standardjs.com). To check,\n\n\n```sh\n$ npm run lint\n```\n\n## License\n\n[MIT](LICENSE) © 2018 Haja Networks Oy\n","readmeFilename":"README.md","_id":"orbit-db-identity-provider@0.1.0-rc.1.1","_nodeVersion":"10.15.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-dL3INNT0xWF4h1KhkRxUia8FdnPx7BF89XUWrQJQ3Rl0usbKO3ogsapEvJuvdlC47dH3DvDFuei1uWpsL5WDjQ==","shasum":"7451a027da82c27f51fdc23e49c73f07ad792f9f","tarball":"https://registry.npmjs.org/orbit-db-identity-provider/-/orbit-db-identity-provider-0.1.0-rc.1.1.tgz","fileCount":26,"unpackedSize":186377,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcp5qyCRA9TVsSAnZWagAARXAQAJDCMV1u8GIzGEEAv968\nQhwX5nuYnxBin+XCoPj847q8SqGDCqV7m9pTornDFY3mLbj5Fgyww7icljws\nztbP76iG4qL6dMVFwz0QHNsehDI7jdnIFS8pzbepAwxiC8DAhSQybcxewVJX\nq9iUWdHu4HyR9VG2Kgt8uEck0aVQyGwKx+IgLLY037KRVhmpPQHyvxeLI1nE\nFWhiB2p/RQ2l4U5kPAYtm91Oi6sK1N0LSFO5X+jPCzqSa+/G/WmiymjPCsB8\nXy07bqvQGdG2Fb/nCMezos+UkFDls8HsbKnDml7boVx8NXMISh7hig02PE4D\njerHMA+joCJQcRIok/bThNCcNRcJbzdF206FmmWfd8q4tLLUc/kd97RrB8yr\nOMsOqrD/Uha4lgLn1QxrKbUeNiZq3hBofD9efJK1AK7O4wFDbMGu2U0UP/J1\nO0jd0ZDi4GEsOg3nTZ+H7K3X18Qz5Bd4SZyU+UDzke/PHVWZZVtI6llwV6+I\nCSY+thH4hoaOISbaYj/sj+edUtWta6KZK3yIvSS0osVMNmtLT8iYoQhsbLI0\n+FO5ksukrNaNILnP/s29MkZp8kEy179pYo39UeXFcMzxY8eHLj/HAiDxQyKW\neEdwEO5faTzR78xknlclSS7al+YtAzWwO/DwtMGgJssP+A+4puTwQzY6R41v\n2a1G\r\n=30Pg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDBb+G/K1a6s045rrKzAYxkJfGJWhczPqUEHVdS8OsXNwIgAaVnoFfX3xkFKuhLElHgKlCT3sEwm9HqnlzbhKjCOuA="}]},"maintainers":[{"email":"haad@haja.io","name":"haad"},{"email":"mark@haja.io","name":"hajamark"},{"email":"shams@haja.io","name":"shamb0t"}],"_npmUser":{"name":"hajamark","email":"mark@haja.io"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/orbit-db-identity-provider_0.1.0-rc.1.1_1554487986243_0.45244464906219095"},"_hasShrinkwrap":false,"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.1.1-rc.1.1":{"name":"orbit-db-identity-provider","version":"0.1.1-rc.1.1","description":"Default identity provider for OrbitDB","main":"index.js","scripts":{"test":"mocha"},"repository":{"type":"git","url":"git+https://github.com/orbitdb/orbit-db-identity-provider.git"},"keywords":[],"author":{"name":"shamb0t"},"license":"MIT","bugs":{"url":"https://github.com/orbitdb/orbit-db-identity-provider/issues"},"homepage":"https://github.com/orbitdb/orbit-db-identity-provider#readme","devDependencies":{"ethers":"^3.0.27","mkdirp":"^0.5.1","mocha":"^5.2.0","node-localstorage":"^1.3.1","orbit-db-keystore":"rc1.1","rimraf":"^2.6.2"},"readme":"# orbit-db-identity-provider\n\n> Default identity provider for orbitdb\n\n### Use\n```js\nconst Keystore = require('orbit-db-keystore')\nconst keystore = Keystore.create('keysPath')\nconst identity = await IdentityProvider.createIdentity(keystore, 'peerid')\n\nconsole.log(identity.toJSON())\n<!-- { id: 'peerid',\n  publicKey: '0453895b939459e222a72003fd1f2cf6a242d4e8c00406fee36382655cbca66110965a839b91b9f9486f8f29f4547b7e0c0f32938899a0f43a59d7d803e333cc49',\n  signatures:\n   { id: '3044022046fab6d5370792bb3575bdcca87f0a23d372f02231445c74f0b5d52375e9d10d02207b9267396bcdb33fdf543f19afcbef5d68ee767f985dc9865dc353a68ccdd66f',\n     publicKey: '3045022100863765c299cf75a992db5cd4e2bd67e4cacf6de37b10451d8cb799eb73b6801502207d18b9c31d19921d62783d23c92a2297d17d21afbfb12063906620e9e6be9e4f' },\n  type: 'orbitdb' } -->\n\n```\n\n## License\n\n[MIT](LICENSE) © 2018 Haja Networks Oy\n","readmeFilename":"README.md","gitHead":"d5a5a3ea7c55c41d73c39487741c84e0a3bd8c53","_id":"orbit-db-identity-provider@0.1.1-rc.1.1","_nodeVersion":"10.15.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-ZKklAEIWW+wfNecTRUENt90wxbeaLZLXVnC1wt232BSrGnDAMgQkXWFEAOw3cwzvvbUS4CNWXCOQXHIM4uhnMA==","shasum":"c0abbe37cace049646a2e57268b63098ebe8df9b","tarball":"https://registry.npmjs.org/orbit-db-identity-provider/-/orbit-db-identity-provider-0.1.1-rc.1.1.tgz","fileCount":11,"unpackedSize":23016,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcp6EdCRA9TVsSAnZWagAA9r4P/AizdvzDRZjnQIQbG3LI\n/biCj2uDHRSs8Ac8gp7qkPf9K0RI5xdC/9cjCn8p92edCd6ZqO4WiF7wQAWU\ny2AKFro3jytT5jOedMfZEVtVtepL+lXJAWcQrZezmyy3cPPVNSsgla83tBEV\nsz5mIhg8vKflG9bLuruOiN4fCqkftOccbAgqqqEr0ExgMquGyskhPLyjJN+G\njTlA3swIrZDQqrMjKoXO2ZW4FARN30BzuRIXxxjLdd0gBfLmwnnTNGWXK1rC\nKka5u6JPy3fDqK6QCFeSyxmWLtZkFW+rgvsvl9BT03POi9662cL5h+dlnisa\nX/EGdyD1bHm3kZApjMTFuN9uOrBB63PRfEhCJTQKEyvupToTKF6yzzPOOOD1\nSA50iBMXAF7QtTJDoVwuUNbalih8nzM9LRpKD47N+Wjn3zK7w8gkFIkGSD1h\neT5bDKl2OcSfufXZsa8D44CrAxzCj2+vLEWJgJxJbzlkn9JGM53vGJCVUTI1\nP1YU56o0ltJGjX0XW9Tvu2Zc4e0SWb7i8uYuPg7kExHWRXGzDPMcrNMakjfk\nQ1q7Xjb2Jl+TCVUV3ikVE5maPhXzAqs6J9brc1tn8RhQG2tzTfh8hiLqTRFe\n+uXQH6A8jk7DcJKPJl8DDMOW24P5JRvL/i4A0MJAkjS8SbmvorNQeAL7F8RT\njmA8\r\n=Sv1z\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBfAjhmbLSTiii2k41cDut6nzk78Ux2eP7b8GTMHZ7OEAiEAz7jzsq5yOEdIEjYIPwXBb2fe/cC4Al0a/M77n7+rGio="}]},"maintainers":[{"email":"haad@haja.io","name":"haad"},{"email":"mark@haja.io","name":"hajamark"},{"email":"shams@haja.io","name":"shamb0t"}],"_npmUser":{"name":"hajamark","email":"mark@haja.io"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/orbit-db-identity-provider_0.1.1-rc.1.1_1554489628990_0.8759484135526137"},"_hasShrinkwrap":false,"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.1.0-rc.1.2":{"name":"orbit-db-identity-provider","version":"0.1.0-rc.1.2","description":"Default identity provider for OrbitDB","main":"index.js","scripts":{"test":"mocha","lint":"standard","build":"npm run build:dist","build:dist":"webpack --config webpack.config.js --display-modules --sort-modules-by size --mode=production"},"repository":{"type":"git","url":"git+https://github.com/orbitdb/orbit-db-identity-provider.git"},"keywords":["orbitdb","orbit-db","identity"],"author":{"name":"shamb0t"},"contributors":[{"name":"shamb0t"},{"name":"haadcode"},{"name":"RichardLitt"},{"name":"latenssi"},{"name":"adam-palazzo"}],"license":"MIT","bugs":{"url":"https://github.com/orbitdb/orbit-db-identity-provider/issues"},"homepage":"https://github.com/orbitdb/orbit-db-identity-provider#readme","devDependencies":{"fs-extra":"^7.0.1","mocha":"^5.2.0","rimraf":"^2.6.2","standard":"^12.0.1","webpack":"^4.27.1","webpack-cli":"^3.1.2","localstorage-level-migration":"^0.0.1"},"standard":{"env":["mocha"]},"dependencies":{"ethers":"^4.0.20","orbit-db-keystore":"rc1.2"},"readme":"# orbit-db-identity-provider\n\n[![Gitter](https://img.shields.io/gitter/room/nwjs/nw.js.svg)](https://gitter.im/orbitdb/Lobby)  \n[![npm version](https://badge.fury.io/js/orbit-db-identity-provider.svg)](https://www.npmjs.com/package/orbit-db-identity-provider)\n\n> Default identity provider for OrbitDB\n\n`Identities` is a package to manage identities in [@OrbitDB](http://github.com/orbitdb/orbit-db)\n\n## Table of Contents\n\n  - [Install](#install)\n  - [Usage](#usage)\n    - [Creating an identity](#creating-an-identity)\n    - [Adding a custom identity signer and verifier](#adding-a-custom-identity-signer-and-verifier)\n    - [Properties](#properties)\n      - [id](#id)\n      - [publicKey](#publickey)\n      - [signatures](#signatures)\n  - [Contribute](#contribute)\n    - [Tests](#tests)\n    - [Build](#build)\n    - [Linting](#linting)\n  - [License](#license)\n\n## Install\n\nThis project uses [npm](https://npmjs.com/) and [nodejs](https://nodejs.org/)\n\n```sh\n$ npm i --save orbit-db-identity-provider\n```\n\n## Usage\n\nThe `Identity` object contains signatures proving possession of some external identifier and an OrbitDB public key. This is included to allow proof of ownership of an external identifier within OrbitDB.\n\n### Creating an identity\n```js\nconst Identities = require('orbit-db-identity-provider')\nconst options = { id: 'local-id'}\nconst identity = await Identities.createIdentity(options)\n\nconsole.log(identity.toJSON())\n// prints\n{\n  id: '045757bffcc7a4f4cf94c0cf214b3d3547a62195a09588df36b74aff837b2fdc14551360a323bf9de2ac8fb2eda9bd1bae5de53577a8db41ee2b46b4bf8cd7be33',\n  publicKey: '04b5c54ef8f2514a58338e64aa08aa6052c3cfef1225a10b51017f2ad63a92fb166e7a19cba44321c9402ab1b62c940cd5e65e81e4d584c1208dbd021f6e22c6f5',\n  signatures:  {\n    id: '3046022100aab534483f474bd3791eb9dcf1f61b6bdb4b07f70e8eca1ea7b530ac0ca13ca1022100e9d95eeeacc9813808400eb37f8aae6be7873df460d2a03e7a19132e34f0bd16',\n    publicKey: '30440220514b6fee38cbec96d9851905e575d6e209834c94be5e009a8261737d4ef23dfc0220794fa8dee564701d337b68fdbeef76bb81d777154c211d84ac345ec287a2a8e1'\n  },\n  type: 'orbitdb'\n}\n\n```\nIf `options.type` is not specified, Identities will default to creating an identity with type '`orbitdb'`, meaning the signing key will sign another OrbitDB public key. This public key can be an already-existing OrbitDB key allowing you to link several keys to a 'master' OrbitDB key to, for example, link keys across devices.\n\nTo use an existing keystore, you can pass it as an argument in the options as follows:\n```js\nconst identity = await Identities.createIdentity({ id: 'local-id', keystore: existingKeystore })\n```\n\n### Create identity using existing keys\n\nTo create an identity using existing keys, you need to install `localstorage-level-migration`\n\n```js\nconst Identities = require('orbit-db-identity-provider')\nconst migrate = require('localstorage-level-migration')\nconst options = { id: 'new-id', migrate: migrate('/path/to/keys') }\nconst identity = await Identities.createIdentity(options)\n\nconsole.log(identity.toJSON())\n// prints\n{\n  id: '<new-id>',\n  publicKey: '<compressed-original-key>',\n  signatures:  {\n    id: '<new-id-signed-by-public-key>',\n    publicKey: '<public-key-signed-by-id>'\n  },\n  type: 'orbitdb'\n}\n\n```\n\n### Adding a custom identity signer and verifier\n\nTo link an OrbitDB signing key with an external identity, you must provide a custom class which implements the `IdentityProvider` [interface](https://github.com/orbitdb/orbit-db-identity-provider/blob/master/src/identity-provider-interface.js).\n\n```js\nclass MyIdentityProvider extends IdentityProvider {\n  static get type () { return 'MyIdentityType' } // return type\n  async getId () { } // return identifier of external id (eg. a public key)\n  async signIdentity (data) { } //return a signature of data (signature of the OrbtiDB public key)\n  static async verifyIdentity (identity) { } //return true if identity.sigantures are valid\n}\n\nIdentities.addIdentityProvider(MyIdentityProvider)\n\n// to create an identity of type `MyIdentityType`\nconst identity = await Identities.createIdentity({ type: `MyIdentityType`})\n\n```\n\n\n### Properties\n\n#### id\n\nReturns the ID of the external identity.\n\n#### publicKey\n\nReturns the signing key used to sign OrbitDB entries.\n\n#### signatures\nReturns an object containing two signatures\n```js\n{ id: <id-signature>, publicKey: <pub-key+id-siganture> }\n```\n\nThe first signature, `id`, is `identity.id` signed by `identiy.publicKey`. This allows the owner of `id` to prove they own the private key associated with `publicKey`. The second signature `publicKey` is created by signing the concatenation `identity.signature.id + identity.publicKey` using `identity.id`. This links the two identifiers.\n\n## Contribute\n\nPlease, feel free to contribute! Take a look at [the issues](https://github.com/orbitdb/orbit-db-identity-provider/issues), and comment on an existing issue or create a new one if you have questions, bugs, or suggestions. For larger PRs, open an issue first if you could - drive-by PRs are also welcomed.\n\nPlease abide by the [Code of Conduct](CODE_OF_CONDUCT.md). For more on contributing to [@OrbitDB](https://github.com/orbitdb/), check out the docs in [orbitdb/welcome](https://github.com/orbitdb/welcome).\n\n### Tests\n\nRun tests with:\n\n```sh\n$ npm test\n```\n\n### Build\n\nThe build script will build the distribution file for browsers.\n\n```sh\n$ npm run build\n```\n\n### Linting\n\nPlease use [`standard`](https://standardjs.com). To check,\n\n\n```sh\n$ npm run lint\n```\n\n## License\n\n[MIT](LICENSE) © 2018 Haja Networks Oy\n","readmeFilename":"README.md","_id":"orbit-db-identity-provider@0.1.0-rc.1.2","_nodeVersion":"10.15.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-GcfooAdVr/G7nkvRqzE8ZL+w9Tt2dYMvQEC9uBFrYAtI4KMFLc0K9tShu/SlDdymtmWaudTwRBotc32jhukuEA==","shasum":"521404b7a6a876214ac60a2d0baa2612e99d3ce0","tarball":"https://registry.npmjs.org/orbit-db-identity-provider/-/orbit-db-identity-provider-0.1.0-rc.1.2.tgz","fileCount":26,"unpackedSize":712207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcqek9CRA9TVsSAnZWagAAQCUP/0ylmR9myWTAsYTrDAhP\nPaUFIabRc+cu3KXNLFQ+sAaRHkwrvIfp3tR9aPXAPYbpbwuzjDq/XCeDzPoK\n5bUTjom7ZtmmOl0/1cufF0258YF4UpMn6jyPTTiSYbahPlwA0aQFl3xfD3sY\nHoY8aLBVX/txBjMX/tPqBqoZPuWmSR9HUJeBbKNQouVtlxnxLcZYp20GTbwL\nFxZujeMOqCTYXpilwO+5hmjZbI1Iwtt+5o70Nv9AZ1UamaaCerFcmHHXG5Eh\n9GtZ4oDvlgWaNNyzL5hrJWevIoHuCnHdeLSl6ai/CRPAR4FQCq3MpJ8PvkZ4\ntzOQre8CHFJLtdNd4k6u7wrcnOg69nxW1GdRbwlixjdQyCRLTyFeZ3IIGp/n\npz6I0U388CwmdsDKLqFjRYgcsJzndNWJDlnpNxyJKl9hXP9OoePF8PfF24QH\nyoTBOno1spKq7U4/rgOkheAGUNfZiNx8wTZOe4QQ+hBslGFkZkMVUvUCv3dt\nNOO7HZYOf6vbYcCLw6Fn3F8jNevPvwOxGKxRfqRCG77JqZKNWC/76PFKpsHu\nRQ7/p2UQSOtvGi94WW/PFrBcDKLcpCxhjYmnUXXow95XEC5QyDauGdIOTraK\nd8Gdv1sDZc0tVItd4vsK9pmDHK2ogRFW4c0qUnNaYPumU8LJ6MTu2AfyE6C1\nBMrF\r\n=f4p+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICOi5rx99DA/Gu7wkKCv6kC5PkR2ewFdoc9ZdZm30Gq2AiA6GlR4W9KImuCgwnIfzOfi3ki8DO4jOkhbvlX5DsJiDw=="}]},"maintainers":[{"email":"haad@haja.io","name":"haad"},{"email":"mark@haja.io","name":"hajamark"},{"email":"shams@haja.io","name":"shamb0t"}],"_npmUser":{"name":"hajamark","email":"mark@haja.io"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/orbit-db-identity-provider_0.1.0-rc.1.2_1554639164340_0.7163777151473802"},"_hasShrinkwrap":false,"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.1.1-rc.1.2":{"name":"orbit-db-identity-provider","version":"0.1.1-rc.1.2","description":"Default identity provider for OrbitDB","main":"index.js","scripts":{"test":"mocha","lint":"standard","build":"npm run build:dist","build:dist":"webpack --config webpack.config.js --display-modules --sort-modules-by size --mode=production"},"repository":{"type":"git","url":"git+https://github.com/orbitdb/orbit-db-identity-provider.git"},"keywords":["orbitdb","orbit-db","identity"],"author":{"name":"shamb0t"},"contributors":[{"name":"shamb0t"},{"name":"haadcode"},{"name":"RichardLitt"},{"name":"latenssi"},{"name":"adam-palazzo"}],"license":"MIT","bugs":{"url":"https://github.com/orbitdb/orbit-db-identity-provider/issues"},"homepage":"https://github.com/orbitdb/orbit-db-identity-provider#readme","devDependencies":{"fs-extra":"^7.0.1","mocha":"^5.2.0","rimraf":"^2.6.2","standard":"^12.0.1","webpack":"^4.27.1","webpack-cli":"^3.1.2","localstorage-level-migration":"^0.0.1"},"standard":{"env":["mocha"]},"dependencies":{"ethers":"^4.0.20","orbit-db-keystore":"rc1.2"},"readme":"# orbit-db-identity-provider\n\n[![Gitter](https://img.shields.io/gitter/room/nwjs/nw.js.svg)](https://gitter.im/orbitdb/Lobby)  \n[![npm version](https://badge.fury.io/js/orbit-db-identity-provider.svg)](https://www.npmjs.com/package/orbit-db-identity-provider)\n\n> Default identity provider for OrbitDB\n\n`Identities` is a package to manage identities in [@OrbitDB](http://github.com/orbitdb/orbit-db)\n\n## Table of Contents\n\n  - [Install](#install)\n  - [Usage](#usage)\n    - [Creating an identity](#creating-an-identity)\n    - [Adding a custom identity signer and verifier](#adding-a-custom-identity-signer-and-verifier)\n    - [Properties](#properties)\n      - [id](#id)\n      - [publicKey](#publickey)\n      - [signatures](#signatures)\n  - [Contribute](#contribute)\n    - [Tests](#tests)\n    - [Build](#build)\n    - [Linting](#linting)\n  - [License](#license)\n\n## Install\n\nThis project uses [npm](https://npmjs.com/) and [nodejs](https://nodejs.org/)\n\n```sh\n$ npm i --save orbit-db-identity-provider\n```\n\n## Usage\n\nThe `Identity` object contains signatures proving possession of some external identifier and an OrbitDB public key. This is included to allow proof of ownership of an external identifier within OrbitDB.\n\n### Creating an identity\n```js\nconst Identities = require('orbit-db-identity-provider')\nconst options = { id: 'local-id'}\nconst identity = await Identities.createIdentity(options)\n\nconsole.log(identity.toJSON())\n// prints\n{\n  id: '045757bffcc7a4f4cf94c0cf214b3d3547a62195a09588df36b74aff837b2fdc14551360a323bf9de2ac8fb2eda9bd1bae5de53577a8db41ee2b46b4bf8cd7be33',\n  publicKey: '04b5c54ef8f2514a58338e64aa08aa6052c3cfef1225a10b51017f2ad63a92fb166e7a19cba44321c9402ab1b62c940cd5e65e81e4d584c1208dbd021f6e22c6f5',\n  signatures:  {\n    id: '3046022100aab534483f474bd3791eb9dcf1f61b6bdb4b07f70e8eca1ea7b530ac0ca13ca1022100e9d95eeeacc9813808400eb37f8aae6be7873df460d2a03e7a19132e34f0bd16',\n    publicKey: '30440220514b6fee38cbec96d9851905e575d6e209834c94be5e009a8261737d4ef23dfc0220794fa8dee564701d337b68fdbeef76bb81d777154c211d84ac345ec287a2a8e1'\n  },\n  type: 'orbitdb'\n}\n\n```\nIf `options.type` is not specified, Identities will default to creating an identity with type '`orbitdb'`, meaning the signing key will sign another OrbitDB public key. This public key can be an already-existing OrbitDB key allowing you to link several keys to a 'master' OrbitDB key to, for example, link keys across devices.\n\nTo use an existing keystore, you can pass it as an argument in the options as follows:\n```js\nconst identity = await Identities.createIdentity({ id: 'local-id', keystore: existingKeystore })\n```\n\n### Create identity using existing keys\n\nTo create an identity using existing keys, you need to install `localstorage-level-migration`\n\n```js\nconst Identities = require('orbit-db-identity-provider')\nconst migrate = require('localstorage-level-migration')\nconst options = { id: 'new-id', migrate: migrate('/path/to/keys') }\nconst identity = await Identities.createIdentity(options)\n\nconsole.log(identity.toJSON())\n// prints\n{\n  id: '<new-id>',\n  publicKey: '<compressed-original-key>',\n  signatures:  {\n    id: '<new-id-signed-by-public-key>',\n    publicKey: '<public-key-signed-by-id>'\n  },\n  type: 'orbitdb'\n}\n\n```\n\n### Adding a custom identity signer and verifier\n\nTo link an OrbitDB signing key with an external identity, you must provide a custom class which implements the `IdentityProvider` [interface](https://github.com/orbitdb/orbit-db-identity-provider/blob/master/src/identity-provider-interface.js).\n\n```js\nclass MyIdentityProvider extends IdentityProvider {\n  static get type () { return 'MyIdentityType' } // return type\n  async getId () { } // return identifier of external id (eg. a public key)\n  async signIdentity (data) { } //return a signature of data (signature of the OrbtiDB public key)\n  static async verifyIdentity (identity) { } //return true if identity.sigantures are valid\n}\n\nIdentities.addIdentityProvider(MyIdentityProvider)\n\n// to create an identity of type `MyIdentityType`\nconst identity = await Identities.createIdentity({ type: `MyIdentityType`})\n\n```\n\n\n### Properties\n\n#### id\n\nReturns the ID of the external identity.\n\n#### publicKey\n\nReturns the signing key used to sign OrbitDB entries.\n\n#### signatures\nReturns an object containing two signatures\n```js\n{ id: <id-signature>, publicKey: <pub-key+id-siganture> }\n```\n\nThe first signature, `id`, is `identity.id` signed by `identiy.publicKey`. This allows the owner of `id` to prove they own the private key associated with `publicKey`. The second signature `publicKey` is created by signing the concatenation `identity.signature.id + identity.publicKey` using `identity.id`. This links the two identifiers.\n\n## Contribute\n\nPlease, feel free to contribute! Take a look at [the issues](https://github.com/orbitdb/orbit-db-identity-provider/issues), and comment on an existing issue or create a new one if you have questions, bugs, or suggestions. For larger PRs, open an issue first if you could - drive-by PRs are also welcomed.\n\nPlease abide by the [Code of Conduct](CODE_OF_CONDUCT.md). For more on contributing to [@OrbitDB](https://github.com/orbitdb/), check out the docs in [orbitdb/welcome](https://github.com/orbitdb/welcome).\n\n### Tests\n\nRun tests with:\n\n```sh\n$ npm test\n```\n\n### Build\n\nThe build script will build the distribution file for browsers.\n\n```sh\n$ npm run build\n```\n\n### Linting\n\nPlease use [`standard`](https://standardjs.com). To check,\n\n\n```sh\n$ npm run lint\n```\n\n## License\n\n[MIT](LICENSE) © 2018 Haja Networks Oy\n","readmeFilename":"README.md","_id":"orbit-db-identity-provider@0.1.1-rc.1.2","_nodeVersion":"10.15.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-EJ8//8hdhAb0Va9fsBGqVnmxk+89fuSW5Ya5rGPpU0xrylHNm4VtWDDwPd7yheWbn5uI5IyZNbfvaSL7uHbScg==","shasum":"2368405b05eab1a34e8cc0323f4eedbcf74ec0e0","tarball":"https://registry.npmjs.org/orbit-db-identity-provider/-/orbit-db-identity-provider-0.1.1-rc.1.2.tgz","fileCount":26,"unpackedSize":712207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcqelhCRA9TVsSAnZWagAAmoAP/0sbzK5itBBRVgQm/lmd\nfe+N86O4fcHzLhhW2ekfhuWGmyiCauDKVz+kbnzPIUWaypEPCT+pFfGQUTLi\nnjvkyM4Dadgnb2ZeRMha9Ban4N+rHh41S3GeDYFxhewM48CfBtPtU8cFSfAb\nXy4LgxVfr4VpNVPBs2dyEE5pTabQGIrmVHIX2gjIH22TwkyWau1xa9EWWto7\no1TlVFyNfG1rtXDchRBeYFhmKncEPY8tLXtZg2hlNtlOoYj5TE8r+pUQgRY4\nbkR751M0AVC+kBUVQvUsIkWWOdckWAcWIDJ7J1TlLI4kD6MYr9OTufDrmB5d\nt+bmjRZbxRjMFArx7uSXtvFhPnHKcyXTtPxZvIydAGQWQbZTcL1rLjG8Lql8\nAvbLp8HtlA++UUVZ8e+rfyFzeNu8+I1bv3UntmrMQsUZYY+GZIrsaW+4H8bW\niPZZmFajoWJY5tyI1optnZQIG8TyBvtWnUZ38ACe9AKwcuJZfxFgGLBiGM0F\n2S8vL+8FTY+KnIpKjoJTTjuZ8N4W89+E4dOcXJWAX/JMFcp9zbXGOzhVK4GX\n3z8iiz+msjXUz7pXa0Sfw3OY1F1PqCs6THctoK0koGDXlethrQVhNs0OB3os\nIrg5Cxlcoc5oJbpfpCA9eeLilVBw/PIowlskm9FBgeTwVn5GobWJVI82YYAF\neEBC\r\n=bj46\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDCvA3KjSSztr84fEEeNJN0T1/2gu31t8ybQTYXYdiO2wIgV/5sCQi+tC5rdvJuRDTW9g9kQhiiStYWAXJnR64xAlE="}]},"maintainers":[{"email":"haad@haja.io","name":"haad"},{"email":"mark@haja.io","name":"hajamark"},{"email":"shams@haja.io","name":"shamb0t"}],"_npmUser":{"name":"hajamark","email":"mark@haja.io"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/orbit-db-identity-provider_0.1.1-rc.1.2_1554639201219_0.1487347536670991"},"_hasShrinkwrap":false,"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.1.2-rc.1.2":{"name":"orbit-db-identity-provider","version":"0.1.2-rc.1.2","description":"Default identity provider for OrbitDB","main":"index.js","scripts":{"test":"mocha","lint":"standard","build":"npm run build:dist","build:dist":"webpack --config webpack.config.js --display-modules --sort-modules-by size --mode=production"},"repository":{"type":"git","url":"git+https://github.com/orbitdb/orbit-db-identity-provider.git"},"keywords":["orbitdb","orbit-db","identity"],"author":{"name":"shamb0t"},"contributors":[{"name":"shamb0t"},{"name":"haadcode"},{"name":"RichardLitt"},{"name":"latenssi"},{"name":"adam-palazzo"}],"license":"MIT","bugs":{"url":"https://github.com/orbitdb/orbit-db-identity-provider/issues"},"homepage":"https://github.com/orbitdb/orbit-db-identity-provider#readme","devDependencies":{"fs-extra":"^7.0.1","mocha":"^5.2.0","rimraf":"^2.6.2","standard":"^12.0.1","webpack":"^4.27.1","webpack-cli":"^3.1.2","localstorage-level-migration":"^0.0.1"},"standard":{"env":["mocha"]},"dependencies":{"ethers":"^4.0.20","orbit-db-keystore":"rc1.2"},"readme":"# orbit-db-identity-provider\n\n[![Gitter](https://img.shields.io/gitter/room/nwjs/nw.js.svg)](https://gitter.im/orbitdb/Lobby)  \n[![npm version](https://badge.fury.io/js/orbit-db-identity-provider.svg)](https://www.npmjs.com/package/orbit-db-identity-provider)\n\n> Default identity provider for OrbitDB\n\n`Identities` is a package to manage identities in [@OrbitDB](http://github.com/orbitdb/orbit-db)\n\n## Table of Contents\n\n  - [Install](#install)\n  - [Usage](#usage)\n    - [Creating an identity](#creating-an-identity)\n    - [Adding a custom identity signer and verifier](#adding-a-custom-identity-signer-and-verifier)\n    - [Properties](#properties)\n      - [id](#id)\n      - [publicKey](#publickey)\n      - [signatures](#signatures)\n  - [Contribute](#contribute)\n    - [Tests](#tests)\n    - [Build](#build)\n    - [Linting](#linting)\n  - [License](#license)\n\n## Install\n\nThis project uses [npm](https://npmjs.com/) and [nodejs](https://nodejs.org/)\n\n```sh\n$ npm i --save orbit-db-identity-provider\n```\n\n## Usage\n\nThe `Identity` object contains signatures proving possession of some external identifier and an OrbitDB public key. This is included to allow proof of ownership of an external identifier within OrbitDB.\n\n### Creating an identity\n```js\nconst Identities = require('orbit-db-identity-provider')\nconst options = { id: 'local-id'}\nconst identity = await Identities.createIdentity(options)\n\nconsole.log(identity.toJSON())\n// prints\n{\n  id: '045757bffcc7a4f4cf94c0cf214b3d3547a62195a09588df36b74aff837b2fdc14551360a323bf9de2ac8fb2eda9bd1bae5de53577a8db41ee2b46b4bf8cd7be33',\n  publicKey: '04b5c54ef8f2514a58338e64aa08aa6052c3cfef1225a10b51017f2ad63a92fb166e7a19cba44321c9402ab1b62c940cd5e65e81e4d584c1208dbd021f6e22c6f5',\n  signatures:  {\n    id: '3046022100aab534483f474bd3791eb9dcf1f61b6bdb4b07f70e8eca1ea7b530ac0ca13ca1022100e9d95eeeacc9813808400eb37f8aae6be7873df460d2a03e7a19132e34f0bd16',\n    publicKey: '30440220514b6fee38cbec96d9851905e575d6e209834c94be5e009a8261737d4ef23dfc0220794fa8dee564701d337b68fdbeef76bb81d777154c211d84ac345ec287a2a8e1'\n  },\n  type: 'orbitdb'\n}\n\n```\nIf `options.type` is not specified, Identities will default to creating an identity with type '`orbitdb'`, meaning the signing key will sign another OrbitDB public key. This public key can be an already-existing OrbitDB key allowing you to link several keys to a 'master' OrbitDB key to, for example, link keys across devices.\n\nTo use an existing keystore, you can pass it as an argument in the options as follows:\n```js\nconst identity = await Identities.createIdentity({ id: 'local-id', keystore: existingKeystore })\n```\n\n### Create identity using existing keys\n\nTo create an identity using existing keys, you need to install `localstorage-level-migration`\n\n```js\nconst Identities = require('orbit-db-identity-provider')\nconst migrate = require('localstorage-level-migration')\nconst options = { id: 'new-id', migrate: migrate('/path/to/keys') }\nconst identity = await Identities.createIdentity(options)\n\nconsole.log(identity.toJSON())\n// prints\n{\n  id: '<new-id>',\n  publicKey: '<compressed-original-key>',\n  signatures:  {\n    id: '<new-id-signed-by-public-key>',\n    publicKey: '<public-key-signed-by-id>'\n  },\n  type: 'orbitdb'\n}\n\n```\n\n### Adding a custom identity signer and verifier\n\nTo link an OrbitDB signing key with an external identity, you must provide a custom class which implements the `IdentityProvider` [interface](https://github.com/orbitdb/orbit-db-identity-provider/blob/master/src/identity-provider-interface.js).\n\n```js\nclass MyIdentityProvider extends IdentityProvider {\n  static get type () { return 'MyIdentityType' } // return type\n  async getId () { } // return identifier of external id (eg. a public key)\n  async signIdentity (data) { } //return a signature of data (signature of the OrbtiDB public key)\n  static async verifyIdentity (identity) { } //return true if identity.sigantures are valid\n}\n\nIdentities.addIdentityProvider(MyIdentityProvider)\n\n// to create an identity of type `MyIdentityType`\nconst identity = await Identities.createIdentity({ type: `MyIdentityType`})\n\n```\n\n\n### Properties\n\n#### id\n\nReturns the ID of the external identity.\n\n#### publicKey\n\nReturns the signing key used to sign OrbitDB entries.\n\n#### signatures\nReturns an object containing two signatures\n```js\n{ id: <id-signature>, publicKey: <pub-key+id-siganture> }\n```\n\nThe first signature, `id`, is `identity.id` signed by `identiy.publicKey`. This allows the owner of `id` to prove they own the private key associated with `publicKey`. The second signature `publicKey` is created by signing the concatenation `identity.signature.id + identity.publicKey` using `identity.id`. This links the two identifiers.\n\n## Contribute\n\nPlease, feel free to contribute! Take a look at [the issues](https://github.com/orbitdb/orbit-db-identity-provider/issues), and comment on an existing issue or create a new one if you have questions, bugs, or suggestions. For larger PRs, open an issue first if you could - drive-by PRs are also welcomed.\n\nPlease abide by the [Code of Conduct](CODE_OF_CONDUCT.md). For more on contributing to [@OrbitDB](https://github.com/orbitdb/), check out the docs in [orbitdb/welcome](https://github.com/orbitdb/welcome).\n\n### Tests\n\nRun tests with:\n\n```sh\n$ npm test\n```\n\n### Build\n\nThe build script will build the distribution file for browsers.\n\n```sh\n$ npm run build\n```\n\n### Linting\n\nPlease use [`standard`](https://standardjs.com). To check,\n\n\n```sh\n$ npm run lint\n```\n\n## License\n\n[MIT](LICENSE) © 2018 Haja Networks Oy\n","readmeFilename":"README.md","_id":"orbit-db-identity-provider@0.1.2-rc.1.2","_nodeVersion":"10.15.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-DKCxCzGJ+VjOsHG24rAkaTMod4fg3EXWLoGhwP3ZXR6pNwPGnZkT9VU1sG3SK/L40aLhMmOV96056YgWjHJp3A==","shasum":"09eef15ee61fa96a80e2e220584417213e708988","tarball":"https://registry.npmjs.org/orbit-db-identity-provider/-/orbit-db-identity-provider-0.1.2-rc.1.2.tgz","fileCount":26,"unpackedSize":712207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcqeqZCRA9TVsSAnZWagAAaZkQAILwJSt+JUKSWUbbAL3H\nRLo49weHnh4n4Ranppz7LHx1baFec//NJC5AldlEDpy42Maf6OI2dps8HpFf\n+ewCCebKkYlX89MXU+w8seOZ94kJrqPTlqSGqVrOj08mwR8PzRwIkHFwrTww\ny36AoyIv9fl2ab/5VSUXZtGISZe4637gJouEY4OT76/TDIqNWjFzTXYI1irD\nHd686/kftSbB5DwTeFxsOhvQUj6eLmt+xXYKkXmCJ33cfGkQhEkYlffZgVOf\nPCt1fIY3t1PpiMFzTUMGdTsxduehr+4y74/5nKYeUcFE9N0mwzAyF2jH4R3s\nImqKENRdwziVxadaflSMkn3okVWr9RQvSvQy6A9LzBuZObSgtSDFgLik3UUB\nkx0kIJ61NaFq1bTVd+VQ+fVny4cFNyyvuiZIIxU7AZdJSSJ82IbPWwuDvgE1\nJu/OqF1NhkUfnx0pLhkizQ0RRuwj0caVQwP1uNS+iiMMvI0WWtLqDjPhqUH+\nRZLI4kcYsbylLD74YViKDf0kXnVPmhz+y2PYZIJIugLIzxYPfVpEke3XBAoE\nOpjgR/ow1UkDIzsdNwxuSzx2dAmWwddsYHJeQ4CK0AsvBFEpbbMCcp/dhh3t\ntz/lCKqtn/yAuJg7ynai2Cg+hAegNwA/CGyJ72diE7sZuHH5IabSmeHJtK/9\nl/dp\r\n=jnQd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD7eIuTN0Jf2iziqR1KLDd3m6tCCPKfXR07fy9UcM601QIgdpCXpT1r31F/QdS2XbmD0fASrNeRVWKmHAiOsBxdAbs="}]},"maintainers":[{"email":"haad@haja.io","name":"haad"},{"email":"mark@haja.io","name":"hajamark"},{"email":"shams@haja.io","name":"shamb0t"}],"_npmUser":{"name":"hajamark","email":"mark@haja.io"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/orbit-db-identity-provider_0.1.2-rc.1.2_1554639513011_0.251321777001718"},"_hasShrinkwrap":false,"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.1.0-rc.1.3":{"name":"orbit-db-identity-provider","version":"0.1.0-rc.1.3","description":"Default identity provider for OrbitDB","main":"index.js","scripts":{"test":"mocha","lint":"standard","build":"npm run build:dist","build:dist":"webpack --config webpack.config.js --display-modules --sort-modules-by size --mode=production"},"repository":{"type":"git","url":"git+https://github.com/orbitdb/orbit-db-identity-provider.git"},"keywords":["orbitdb","orbit-db","identity"],"author":{"name":"shamb0t"},"contributors":[{"name":"shamb0t"},{"name":"haadcode"},{"name":"RichardLitt"},{"name":"latenssi"},{"name":"adam-palazzo"}],"license":"MIT","bugs":{"url":"https://github.com/orbitdb/orbit-db-identity-provider/issues"},"homepage":"https://github.com/orbitdb/orbit-db-identity-provider#readme","devDependencies":{"fs-extra":"^7.0.1","mocha":"^5.2.0","rimraf":"^2.6.2","standard":"^12.0.1","webpack":"^4.27.1","webpack-cli":"^3.1.2","localstorage-level-migration":"^0.0.1"},"standard":{"env":["mocha"]},"dependencies":{"ethers":"^4.0.20","orbit-db-keystore":"rc1.2"},"readme":"# orbit-db-identity-provider\n\n[![Gitter](https://img.shields.io/gitter/room/nwjs/nw.js.svg)](https://gitter.im/orbitdb/Lobby)  \n[![npm version](https://badge.fury.io/js/orbit-db-identity-provider.svg)](https://www.npmjs.com/package/orbit-db-identity-provider)\n\n> Default identity provider for OrbitDB\n\n`Identities` is a package to manage identities in [@OrbitDB](http://github.com/orbitdb/orbit-db)\n\n## Table of Contents\n\n  - [Install](#install)\n  - [Usage](#usage)\n    - [Creating an identity](#creating-an-identity)\n    - [Adding a custom identity signer and verifier](#adding-a-custom-identity-signer-and-verifier)\n    - [Properties](#properties)\n      - [id](#id)\n      - [publicKey](#publickey)\n      - [signatures](#signatures)\n  - [Contribute](#contribute)\n    - [Tests](#tests)\n    - [Build](#build)\n    - [Linting](#linting)\n  - [License](#license)\n\n## Install\n\nThis project uses [npm](https://npmjs.com/) and [nodejs](https://nodejs.org/)\n\n```sh\n$ npm i --save orbit-db-identity-provider\n```\n\n## Usage\n\nThe `Identity` object contains signatures proving possession of some external identifier and an OrbitDB public key. This is included to allow proof of ownership of an external identifier within OrbitDB.\n\n### Creating an identity\n```js\nconst Identities = require('orbit-db-identity-provider')\nconst options = { id: 'local-id'}\nconst identity = await Identities.createIdentity(options)\n\nconsole.log(identity.toJSON())\n// prints\n{\n  id: '045757bffcc7a4f4cf94c0cf214b3d3547a62195a09588df36b74aff837b2fdc14551360a323bf9de2ac8fb2eda9bd1bae5de53577a8db41ee2b46b4bf8cd7be33',\n  publicKey: '04b5c54ef8f2514a58338e64aa08aa6052c3cfef1225a10b51017f2ad63a92fb166e7a19cba44321c9402ab1b62c940cd5e65e81e4d584c1208dbd021f6e22c6f5',\n  signatures:  {\n    id: '3046022100aab534483f474bd3791eb9dcf1f61b6bdb4b07f70e8eca1ea7b530ac0ca13ca1022100e9d95eeeacc9813808400eb37f8aae6be7873df460d2a03e7a19132e34f0bd16',\n    publicKey: '30440220514b6fee38cbec96d9851905e575d6e209834c94be5e009a8261737d4ef23dfc0220794fa8dee564701d337b68fdbeef76bb81d777154c211d84ac345ec287a2a8e1'\n  },\n  type: 'orbitdb'\n}\n\n```\nIf `options.type` is not specified, Identities will default to creating an identity with type '`orbitdb'`, meaning the signing key will sign another OrbitDB public key. This public key can be an already-existing OrbitDB key allowing you to link several keys to a 'master' OrbitDB key to, for example, link keys across devices.\n\nTo use an existing keystore, you can pass it as an argument in the options as follows:\n```js\nconst identity = await Identities.createIdentity({ id: 'local-id', keystore: existingKeystore })\n```\n\n### Create identity using existing keys\n\nTo create an identity using existing keys, you need to install `localstorage-level-migration`\n\n```js\nconst Identities = require('orbit-db-identity-provider')\nconst migrate = require('localstorage-level-migration')\nconst options = { id: 'new-id', migrate: migrate('/path/to/keys') }\nconst identity = await Identities.createIdentity(options)\n\nconsole.log(identity.toJSON())\n// prints\n{\n  id: '<new-id>',\n  publicKey: '<compressed-original-key>',\n  signatures:  {\n    id: '<new-id-signed-by-public-key>',\n    publicKey: '<public-key-signed-by-id>'\n  },\n  type: 'orbitdb'\n}\n\n```\n\n### Adding a custom identity signer and verifier\n\nTo link an OrbitDB signing key with an external identity, you must provide a custom class which implements the `IdentityProvider` [interface](https://github.com/orbitdb/orbit-db-identity-provider/blob/master/src/identity-provider-interface.js).\n\n```js\nclass MyIdentityProvider extends IdentityProvider {\n  static get type () { return 'MyIdentityType' } // return type\n  async getId () { } // return identifier of external id (eg. a public key)\n  async signIdentity (data) { } //return a signature of data (signature of the OrbtiDB public key)\n  static async verifyIdentity (identity) { } //return true if identity.sigantures are valid\n}\n\nIdentities.addIdentityProvider(MyIdentityProvider)\n\n// to create an identity of type `MyIdentityType`\nconst identity = await Identities.createIdentity({ type: `MyIdentityType`})\n\n```\n\n\n### Properties\n\n#### id\n\nReturns the ID of the external identity.\n\n#### publicKey\n\nReturns the signing key used to sign OrbitDB entries.\n\n#### signatures\nReturns an object containing two signatures\n```js\n{ id: <id-signature>, publicKey: <pub-key+id-siganture> }\n```\n\nThe first signature, `id`, is `identity.id` signed by `identiy.publicKey`. This allows the owner of `id` to prove they own the private key associated with `publicKey`. The second signature `publicKey` is created by signing the concatenation `identity.signature.id + identity.publicKey` using `identity.id`. This links the two identifiers.\n\n## Contribute\n\nPlease, feel free to contribute! Take a look at [the issues](https://github.com/orbitdb/orbit-db-identity-provider/issues), and comment on an existing issue or create a new one if you have questions, bugs, or suggestions. For larger PRs, open an issue first if you could - drive-by PRs are also welcomed.\n\nPlease abide by the [Code of Conduct](CODE_OF_CONDUCT.md). For more on contributing to [@OrbitDB](https://github.com/orbitdb/), check out the docs in [orbitdb/welcome](https://github.com/orbitdb/welcome).\n\n### Tests\n\nRun tests with:\n\n```sh\n$ npm test\n```\n\n### Build\n\nThe build script will build the distribution file for browsers.\n\n```sh\n$ npm run build\n```\n\n### Linting\n\nPlease use [`standard`](https://standardjs.com). To check,\n\n\n```sh\n$ npm run lint\n```\n\n## License\n\n[MIT](LICENSE) © 2018 Haja Networks Oy\n","readmeFilename":"README.md","gitHead":"09461d2b186fb80e6c6b94f7ad1b203a74fcf15a","_id":"orbit-db-identity-provider@0.1.0-rc.1.3","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"shamb0t","email":"shams@haja.io"},"dist":{"integrity":"sha512-6Noppqab+PbZA+TB29+bzQTz/UVmSzdzQWwGHR6fOvMbdBjzGjC/ReKs1G5sU5RnNj42c9glIUpjWZy7MIIqPQ==","shasum":"2ffa1122dd81cfebc32f797d8965b74a271bec7a","tarball":"https://registry.npmjs.org/orbit-db-identity-provider/-/orbit-db-identity-provider-0.1.0-rc.1.3.tgz","fileCount":26,"unpackedSize":712207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcrxXICRA9TVsSAnZWagAA9/oQAIPrvtT0ankElC8G4/2Z\n9Lgw3qtQ0wQltTiMBmKbW3XVsBRPhap1+m2qnYrx6Cp9/+O0jbyxWpf2ZaHa\ngnEHW0fHFe+92ntziKWc5cpP3/gzGkxhfoiwb/oIYa+DBGP/gV1siuRXIul+\nBByLx3pGtnQs8UFHXdSaBqHOmuY42oMAGsKo6Fpj+eLaG2HGO1cs8MYW9a9+\nDlFaSr63hB7eGJTTAkyg+UGRwIXvDe1F/kCjZDaw8YByiFNGUtreAlXpwdK3\nRcteRuFrymTn4SGVOcJ8laepxiX5XfbgxyPM2R93an5z0mHuVWnWfpnrWp0L\nhCtGXEejpWo6veU2/pJV+8yVUCx5xdaBVm8aCuR0tmtG7Lj7k+7xxcbYTh9y\nMekpiizv5ZlIMAGf+JniJPduxlEYo5qwAoRrmTN/dchXL92e2BzVt6UaCV5A\nUMlZR65oH9i6ON0new4p/r90rnl9iqnrBhr5rBEa2FezUEbxD+sH/Ig89ubq\nVrBZfVsp7lrxN4m/yqILKzP0e1eFRaaPjjlXZYqdLWW8il/shUsgD+LAToS9\nbvi35ZrSu3+Tr/Oko5+4JuvGoepfAGdtuhh2w7vn8TiWXSO+oZ4usqVJigZh\nyosPo5EpiKvhxR6JWVYi1y0sBl+zQeYlQcpVGxNZ1m1wvC/VBlsUrkqVMaBk\nnFMS\r\n=uOuc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCW3qFLQ16ZDOiWG+EIkpKapKYBdEIaiaM1jt21sLLA+QIgXMJ7mhllpJs3Don2Eq47G5N+TzfAfMRraD7OwKTAPR0="}]},"maintainers":[{"email":"haad@haja.io","name":"haad"},{"email":"mark@haja.io","name":"hajamark"},{"email":"shams@haja.io","name":"shamb0t"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/orbit-db-identity-provider_0.1.0-rc.1.3_1554978247395_0.790362810498118"},"_hasShrinkwrap":false,"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.1.0-rc2":{"name":"orbit-db-identity-provider","version":"0.1.0-rc2","description":"Default identity provider for OrbitDB","main":"index.js","scripts":{"test":"mocha","lint":"standard","build":"npm run build:dist","build:dist":"webpack --config webpack.config.js --display-modules --sort-modules-by size --mode=production"},"repository":{"type":"git","url":"git+https://github.com/orbitdb/orbit-db-identity-provider.git"},"keywords":["orbitdb","orbit-db","identity"],"author":{"name":"shamb0t"},"contributors":[{"name":"shamb0t"},{"name":"haadcode"},{"name":"RichardLitt"},{"name":"latenssi"},{"name":"adam-palazzo"}],"license":"MIT","bugs":{"url":"https://github.com/orbitdb/orbit-db-identity-provider/issues"},"homepage":"https://github.com/orbitdb/orbit-db-identity-provider#readme","devDependencies":{"fs-extra":"^7.0.1","mocha":"^5.2.0","rimraf":"^2.6.2","standard":"^12.0.1","webpack":"^4.27.1","webpack-cli":"^3.1.2","localstorage-level-migration":"^0.0.1"},"standard":{"env":["mocha"]},"dependencies":{"ethers":"^4.0.20","orbit-db-keystore":"next"},"readme":"# orbit-db-identity-provider\n\n[![Gitter](https://img.shields.io/gitter/room/nwjs/nw.js.svg)](https://gitter.im/orbitdb/Lobby)  \n[![npm version](https://badge.fury.io/js/orbit-db-identity-provider.svg)](https://www.npmjs.com/package/orbit-db-identity-provider)\n\n> Default identity provider for OrbitDB\n\n`Identities` is a package to manage identities in [@OrbitDB](http://github.com/orbitdb/orbit-db)\n\n## Table of Contents\n\n  - [Install](#install)\n  - [Usage](#usage)\n    - [Creating an identity](#creating-an-identity)\n    - [Adding a custom identity signer and verifier](#adding-a-custom-identity-signer-and-verifier)\n    - [Properties](#properties)\n      - [id](#id)\n      - [publicKey](#publickey)\n      - [signatures](#signatures)\n  - [Contribute](#contribute)\n    - [Tests](#tests)\n    - [Build](#build)\n    - [Linting](#linting)\n  - [License](#license)\n\n## Install\n\nThis project uses [npm](https://npmjs.com/) and [nodejs](https://nodejs.org/)\n\n```sh\n$ npm i --save orbit-db-identity-provider\n```\n\n## Usage\n\nThe `Identity` object contains signatures proving possession of some external identifier and an OrbitDB public key. This is included to allow proof of ownership of an external identifier within OrbitDB.\n\n### Creating an identity\n```js\nconst Identities = require('orbit-db-identity-provider')\nconst options = { id: 'local-id'}\nconst identity = await Identities.createIdentity(options)\n\nconsole.log(identity.toJSON())\n// prints\n{\n  id: '045757bffcc7a4f4cf94c0cf214b3d3547a62195a09588df36b74aff837b2fdc14551360a323bf9de2ac8fb2eda9bd1bae5de53577a8db41ee2b46b4bf8cd7be33',\n  publicKey: '04b5c54ef8f2514a58338e64aa08aa6052c3cfef1225a10b51017f2ad63a92fb166e7a19cba44321c9402ab1b62c940cd5e65e81e4d584c1208dbd021f6e22c6f5',\n  signatures:  {\n    id: '3046022100aab534483f474bd3791eb9dcf1f61b6bdb4b07f70e8eca1ea7b530ac0ca13ca1022100e9d95eeeacc9813808400eb37f8aae6be7873df460d2a03e7a19132e34f0bd16',\n    publicKey: '30440220514b6fee38cbec96d9851905e575d6e209834c94be5e009a8261737d4ef23dfc0220794fa8dee564701d337b68fdbeef76bb81d777154c211d84ac345ec287a2a8e1'\n  },\n  type: 'orbitdb'\n}\n\n```\nIf `options.type` is not specified, Identities will default to creating an identity with type '`orbitdb'`, meaning the signing key will sign another OrbitDB public key. This public key can be an already-existing OrbitDB key allowing you to link several keys to a 'master' OrbitDB key to, for example, link keys across devices.\n\nTo use an existing keystore, you can pass it as an argument in the options as follows:\n```js\nconst identity = await Identities.createIdentity({ id: 'local-id', keystore: existingKeystore })\n```\n\n### Create identity using existing keys\n\nTo create an identity using existing keys, you need to install `localstorage-level-migration`\n\n```js\nconst Identities = require('orbit-db-identity-provider')\nconst migrate = require('localstorage-level-migration')\nconst options = { id: 'new-id', migrate: migrate('/path/to/keys') }\nconst identity = await Identities.createIdentity(options)\n\nconsole.log(identity.toJSON())\n// prints\n{\n  id: '<new-id>',\n  publicKey: '<compressed-original-key>',\n  signatures:  {\n    id: '<new-id-signed-by-public-key>',\n    publicKey: '<public-key-signed-by-id>'\n  },\n  type: 'orbitdb'\n}\n\n```\n\n### Adding a custom identity signer and verifier\n\nTo link an OrbitDB signing key with an external identity, you must provide a custom class which implements the `IdentityProvider` [interface](https://github.com/orbitdb/orbit-db-identity-provider/blob/master/src/identity-provider-interface.js).\n\n```js\nclass MyIdentityProvider extends IdentityProvider {\n  static get type () { return 'MyIdentityType' } // return type\n  async getId () { } // return identifier of external id (eg. a public key)\n  async signIdentity (data) { } //return a signature of data (signature of the OrbtiDB public key)\n  static async verifyIdentity (identity) { } //return true if identity.sigantures are valid\n}\n\nIdentities.addIdentityProvider(MyIdentityProvider)\n\n// to create an identity of type `MyIdentityType`\nconst identity = await Identities.createIdentity({ type: `MyIdentityType`})\n\n```\n\n\n### Properties\n\n#### id\n\nReturns the ID of the external identity.\n\n#### publicKey\n\nReturns the signing key used to sign OrbitDB entries.\n\n#### signatures\nReturns an object containing two signatures\n```js\n{ id: <id-signature>, publicKey: <pub-key+id-siganture> }\n```\n\nThe first signature, `id`, is `identity.id` signed by `identiy.publicKey`. This allows the owner of `id` to prove they own the private key associated with `publicKey`. The second signature `publicKey` is created by signing the concatenation `identity.signature.id + identity.publicKey` using `identity.id`. This links the two identifiers.\n\n## Contribute\n\nPlease, feel free to contribute! Take a look at [the issues](https://github.com/orbitdb/orbit-db-identity-provider/issues), and comment on an existing issue or create a new one if you have questions, bugs, or suggestions. For larger PRs, open an issue first if you could - drive-by PRs are also welcomed.\n\nPlease abide by the [Code of Conduct](CODE_OF_CONDUCT.md). For more on contributing to [@OrbitDB](https://github.com/orbitdb/), check out the docs in [orbitdb/welcome](https://github.com/orbitdb/welcome).\n\n### Tests\n\nRun tests with:\n\n```sh\n$ npm test\n```\n\n### Build\n\nThe build script will build the distribution file for browsers.\n\n```sh\n$ npm run build\n```\n\n### Linting\n\nPlease use [`standard`](https://standardjs.com). To check,\n\n\n```sh\n$ npm run lint\n```\n\n## License\n\n[MIT](LICENSE) © 2018 Haja Networks Oy\n","readmeFilename":"README.md","_id":"orbit-db-identity-provider@0.1.0-rc2","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-P1+nvPE7D3DHT2Lv+KljijU071EMldGbwEki94kLMTeiXuLRgcnPQwMM1IMBbWmPfUojWNpXS4X+o6ad6tEllA==","shasum":"3a79141029b2a8c608e4e74b6464ac82e91522fb","tarball":"https://registry.npmjs.org/orbit-db-identity-provider/-/orbit-db-identity-provider-0.1.0-rc2.tgz","fileCount":26,"unpackedSize":712203,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcycQtCRA9TVsSAnZWagAAg64P/2CHpKATsxFbJMvsVwgP\nitLLqegkcaeDd2uhYisHnT3Sfi7DmSG/W1pHSm86CbFRRG30tznFg+ppZA4Z\ntVhOTbb2HUTlqo6qUo8kvyZiO3aFyJNt5Ijf4/n9qgh1QsaWUNfGBKfXG1NH\nfJfheZVXJtusYyr7fllNX67+NQlrLDL8JSGNybAPItw1UD9e8egYOMHdQ7Zl\nkoee7QCk6YaQ5N9fWjZeNvJuFn4RSV6KDAKikB/H8aH9+EhIGcFz0WJRN18V\nyW31ypK9lM/6Ei3PXN3Kvqzkj25tYZzzI9qXak+hOS0YSHhvcIunsWv0sDHX\nGVsm6xDxIiZDxGjpLsxE7FDN9EC14od/iWI1MCsaHaIlOFuqTkytBSXgpszv\nmce7ENG65zqcLQsI5bO/YNZTzukRRb7hQ8dPH28DVSnB+wSVaWEA7tY0IQ4m\nZWRjQE6mJJkDCDrlTBr2IJJPImU5LTHCYJJ/MgFvhANGDUK8++GoyI6gkKhu\nevI489jTJXOesR/SRRn1S38LepW8Fx2yvKVht0QRYq8N222ye4AR9SBU38Jv\nAgJ+0LxRF/wsGTz/eFzIODwskr6DSWZIlzbPZx/oC/QR88EXxqV13tXU4p/s\nnMVhYgX8PjHIt5N7OQnFt2TKe8TvMtxhFJD0GYfiDUu+jSFo8KvlBHlZ9XCh\nZTua\r\n=XCfV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCYqrltnGL3WyzVbYowV1JbdjN6Jh01qfhyZRevDPhJNwIgE+7ErgIGdEQmIo+1LE8AEEDc+8mT2z02nV3OM9Fa1Y0="}]},"maintainers":[{"email":"haad@haja.io","name":"haad"},{"email":"mark@haja.io","name":"hajamark"},{"email":"shams@haja.io","name":"shamb0t"}],"_npmUser":{"name":"hajamark","email":"mark@haja.io"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/orbit-db-identity-provider_0.1.0-rc2_1556726828673_0.8036012125971161"},"_hasShrinkwrap":false,"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.1.0":{"name":"orbit-db-identity-provider","version":"0.1.0","description":"Default identity provider for OrbitDB","main":"index.js","scripts":{"test":"mocha","lint":"standard","build":"npm run build:dist","build:dist":"webpack --config webpack.config.js --display-modules --sort-modules-by size --mode=production"},"repository":{"type":"git","url":"git+https://github.com/orbitdb/orbit-db-identity-provider.git"},"keywords":["orbitdb","orbit-db","identity"],"author":{"name":"shamb0t"},"contributors":[{"name":"shamb0t"},{"name":"haadcode"},{"name":"RichardLitt"},{"name":"latenssi"},{"name":"adam-palazzo"}],"license":"MIT","bugs":{"url":"https://github.com/orbitdb/orbit-db-identity-provider/issues"},"homepage":"https://github.com/orbitdb/orbit-db-identity-provider#readme","devDependencies":{"fs-extra":"^7.0.1","mocha":"^5.2.0","rimraf":"^2.6.2","standard":"^12.0.1","webpack":"^4.27.1","webpack-cli":"^3.1.2","localstorage-level-migration":"^0.0.1"},"standard":{"env":["mocha"]},"dependencies":{"ethers":"^4.0.20","orbit-db-keystore":"~0.2.0"},"gitHead":"9002598c8a8dfadb43b8c4a8f72357cae6340ea0","_id":"orbit-db-identity-provider@0.1.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"shamb0t","email":"shams@haja.io"},"dist":{"integrity":"sha512-U8c2+Jmz903gpYMBHFQ+3RVj86up7Y7SJdPqOxvJVN2PQ4HXqLl2JiiFUIHtlb8wyyoCYHi1TSsGovD5wmgRlA==","shasum":"9af5a38b12117e09f6b133581881b01b8e49b7d7","tarball":"https://registry.npmjs.org/orbit-db-identity-provider/-/orbit-db-identity-provider-0.1.0.tgz","fileCount":26,"unpackedSize":712201,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcyvn1CRA9TVsSAnZWagAA7QgP/RVbdcotR0lQ8S/1aovq\n8JcQZgdWxecdh9kZcBzhK76Ma4LwHufcJfC/cc34Pext1I6UwXe4hRHNNXjo\nL7uSh4GPkLdLKlJFoh5N5IGT1wDNfJy0wKjfyCDweSjgDR5FG+uwoCLl/PG3\n31bwjsqTb7C1yBtMUJiWWZjTN54xdQiXlhRqyI2QpyxSfuVfxbO0OE5tzaZ8\n5v1fb2Q+lQwu28IZP5q4V/ClicQ7SoqFGnCMe4cBBFNk3F26WszhDGos5b1v\n40x29plmhElDInRabljIT0ZkNrsgLF2FEJY+5wp7/2MH8F4JJ2b5sHE1kxTT\nCbO/CkGuVeY7PuWZ6RK2bGfMx3XNcA6dkgvJ+9gfeizfwyKeMYaWUo53m0sk\n/ue+OwHG4T3/PzE68RcfwwvCYkAxtstsgmtwLW9WkPiXOthgarDut3JUp4MJ\nF93ox+uaU3ZJuCBeRncmqWo0G/mSubn0eBzPdpN/MzZoHn7Iin1ZQc9zjXBk\nsfakAQo5PR0VonRQXkpq3Gi5f1j1xf8yhNfNnYSFeb0LRLuCGBKORe58ttEC\nNcomZBKCySkq/1fndDwvi08pRkUyKOfqwYL2RbXi7HdknW2GaJomb04p3D2m\n8no/p6CPEFhGlYKuKup92VbF8V541gIT8yYxYEvqDy3zsKD5j7/kzdaOHuR0\nM5GL\r\n=rikV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE/OWpQCgFOyKv8qFDQhkAruxv888ujixCHVdLWUzCFxAiBe6pzEk7uO/6eCIpPRbv1IQlk+UEZaxX9gvdKYkdSvgw=="}]},"maintainers":[{"email":"haad@haja.io","name":"haad"},{"email":"mark@haja.io","name":"hajamark"},{"email":"shams@haja.io","name":"shamb0t"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/orbit-db-identity-provider_0.1.0_1556806132427_0.7243204884820946"},"_hasShrinkwrap":false,"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.1.1":{"name":"orbit-db-identity-provider","version":"0.1.1","description":"Default identity provider for OrbitDB","main":"index.js","scripts":{"test":"mocha","lint":"standard","build":"npm run build:dist","build:dist":"webpack --config webpack.config.js --display-modules --sort-modules-by size --mode=production"},"repository":{"type":"git","url":"git+https://github.com/orbitdb/orbit-db-identity-provider.git"},"keywords":["orbitdb","orbit-db","identity"],"author":{"name":"shamb0t"},"contributors":[{"name":"shamb0t"},{"name":"haadcode"},{"name":"RichardLitt"},{"name":"latenssi"},{"name":"adam-palazzo"}],"license":"MIT","bugs":{"url":"https://github.com/orbitdb/orbit-db-identity-provider/issues"},"homepage":"https://github.com/orbitdb/orbit-db-identity-provider#readme","devDependencies":{"fs-extra":"^7.0.1","mocha":"^5.2.0","rimraf":"^2.6.2","standard":"^12.0.1","webpack":"^4.27.1","webpack-cli":"^3.1.2","localstorage-level-migration":"^0.0.1"},"standard":{"env":["mocha"]},"dependencies":{"ethers":"^4.0.20","orbit-db-keystore":"~0.2.0"},"localMaintainers":["haad <haad@haja.io>","shamb0t <shams@haja.io>","hajamark <mark@haja.io>"],"gitHead":"32bf83dfdf5bcb74ec99438da9b9f7e8dd36acb4","_id":"orbit-db-identity-provider@0.1.1","_nodeVersion":"10.16.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-457LgawjHQazqQw+bMc5cEebWHk0AHx3hDEbajIEScwR59ayesFYLvZd5DSynCemD7ZTg9rpgSb9wgwhtA+N8Q==","shasum":"f4ae09fd61d25033037deee459ff3d06201a0ff0","tarball":"https://registry.npmjs.org/orbit-db-identity-provider/-/orbit-db-identity-provider-0.1.1.tgz","fileCount":26,"unpackedSize":765841,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc+A+OCRA9TVsSAnZWagAAUrcQAJgqcZuuUa0C/e9tia/h\nRNJqMhGPC1QD+EFILOlyHvPFdECKxaMk5CgmSO52+rcPqP8p32WuJ2HKDI4g\n4QECp5lJtIsbc+WHvxACfbS2BGw0DjL7WknKmtU0gPucsT2i0LMnSG9H+Qjl\nhj94GW3gvGUA9nZDXx6gJWZ+jkx65GuJbw0LkSbW65+9kC6yTPjbtZZ2S/x2\nLfRnyWIog2XCeWsMnsKC2PzCfL//e0m87f409FNWhj7B88IYphBxImmJ03a/\n03TfoVKeRtDzO+0uFDNjTI/hR1/BF4NabpaefCl0ZIsVSAL4yt6GO5GWsRgC\nMclbEBjGek20hK/0GtXImkHZS+wuAG2R4xW958twlKbw7y3rIE2eTGfOCf46\ntq4MxohXwDvjB9Kei3ukjATFf1IrKjKMa/64aOcmCdKbVW59Yp2VFDH31cRA\nbwLhk4PmcueZmkMJRkshBRCZx8jZVyXIAdsXhkkw45oVFNW++xyMd3UCMqec\n59xcR3/ofINzvvQr9+YtVC63SlG0I/q2+qgrQYNMUXYbA75AJMQz5u5VLQdn\nCRza9vOoOF760aqxN3Z5RqoiQR7EhNmBDLjuwFBUQq1aRVKkPaViLBKJ3yrV\nlMy8jdQmHOqoh1o8T3qqNM/3kdLUypCuCxuVqoNcVCEQmnIU8KpL9X/M5OQj\nsEZe\r\n=YtAt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAZgNvDw2qOuwPak1L11L7vBg2sPIIWrR04uFo1JCnboAiBOC5Gk0lbLgj51cbrFC2dZXH83PFuVOnKr9Mw6Y7NS9A=="}]},"maintainers":[{"email":"haad@haja.io","name":"haad"},{"email":"mark@haja.io","name":"hajamark"},{"email":"shams@haja.io","name":"shamb0t"}],"_npmUser":{"name":"shamb0t","email":"shams@haja.io"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/orbit-db-identity-provider_0.1.1_1559760781245_0.07388548377815374"},"_hasShrinkwrap":false,"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.1.2":{"name":"orbit-db-identity-provider","version":"0.1.2","description":"Default identity provider for OrbitDB","main":"index.js","scripts":{"test":"mocha","lint":"standard","build":"npm run build:dist","build:dist":"webpack --config webpack.config.js --display-modules --sort-modules-by size --mode=production"},"repository":{"type":"git","url":"git+https://github.com/orbitdb/orbit-db-identity-provider.git"},"keywords":["orbitdb","orbit-db","identity"],"author":{"name":"shamb0t"},"contributors":[{"name":"shamb0t"},{"name":"haadcode"},{"name":"RichardLitt"},{"name":"latenssi"},{"name":"adam-palazzo"}],"license":"MIT","bugs":{"url":"https://github.com/orbitdb/orbit-db-identity-provider/issues"},"homepage":"https://github.com/orbitdb/orbit-db-identity-provider#readme","devDependencies":{"fs-extra":"^7.0.1","mocha":"^5.2.0","rimraf":"^2.6.2","standard":"^12.0.1","webpack":"^4.27.1","webpack-cli":"^3.1.2","localstorage-level-migration":"^0.0.1"},"standard":{"env":["mocha"]},"dependencies":{"ethers":"^4.0.20","orbit-db-keystore":"~0.2.0"},"localMaintainers":["haad <haad@haja.io>","shamb0t <shams@haja.io>","hajamark <mark@haja.io>"],"gitHead":"159dc3ad56135f156114224a590075230ab82057","_id":"orbit-db-identity-provider@0.1.2","_nodeVersion":"10.16.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-KGwBusf/UIPtiZnU4zaEONUimkowgda+v//T7Qeg5brZz2fmC8K8kl1PU3ccCO44g2Ve5BgoJcSTIncZm0hzEw==","shasum":"6b496446d2d66c84fc96fdeb248488611f28cf01","tarball":"https://registry.npmjs.org/orbit-db-identity-provider/-/orbit-db-identity-provider-0.1.2.tgz","fileCount":31,"unpackedSize":3167304,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdLCnkCRA9TVsSAnZWagAAJrsP/inutxoPPNQ3AoOHsq0p\nFOdsIEekyRtVwFUG8mmCPzp6Zd/fdVW7C04jucCMgVSWoDl4egUQXSqjutcH\n5TwM+EVPvtQtQ5dkSm9XqNwIpXdBOyZzuhm4zwdkYBcpqAa7rN87HyIcCq8v\nbC9wXTSPQqvTMmFT1yqD48OPMZjKS2v1CRNzBm6umz7dCxVvnnklKvxAogxz\nC7aok5tx3wNevsczIa8Xv3SpGOGaBRZuiorzWV6nj026lArBWgfzfWW4d50+\n4ezTz+6UmQMJ5uuFWnYAMvxIsOLV7FOoxUk4QG/O5OGGzW2qv980rgvkxgWc\n1IDhMiuM7VwKlSynd7kRGD00dE+XQelCSD6wme1eQnpQWIvCngs/HcKXvZsf\navtjaF8E/atRmx+oH2iyApGUBhh2Qdgc9AopzVWXcAf06+J0saCuJavbyzW5\nmQnv1cGRN0bkzqHPANeIHmlVtreLEwGxRpAR9Fv5snDCf7/f75wVgNdEaRpI\nXZ36sEDieAV3GM6G1Hr8Jxso3VaYuEhpO4L2zhBpPoOcffKLo6uP0u4FwM6w\nUeesqVpGcymEBalkXGKptAPJ0KrOJ56Sl7cpkSay8GJpW9T1B6vHpHWFLT6l\nZSsBGYQj8pZtfu1lpG9M63Er5Wo+dLanLbASI1NLzLC5jrmkNUWIbM4i+KqZ\nneXi\r\n=clmr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGdUO+bIW+HwAIIfSAbxz2yN6+AZXYDD0aX1stb9jc5SAiAklzH5JLVAxy/Z3hp/zQnnBtMitjCNUj/pewYz9NKRSw=="}]},"maintainers":[{"email":"haad@haja.io","name":"haad"},{"email":"mark@haja.io","name":"hajamark"},{"email":"shams@haja.io","name":"shamb0t"}],"_npmUser":{"name":"shamb0t","email":"shams@haja.io"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/orbit-db-identity-provider_0.1.2_1563175395912_0.5824676536722935"},"_hasShrinkwrap":false,"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.1.3":{"name":"orbit-db-identity-provider","version":"0.1.3","description":"Default identity provider for OrbitDB","main":"index.js","scripts":{"test":"mocha","lint":"standard","build":"npm run build:dist","build:dist":"webpack --config webpack.config.js --display-modules --sort-modules-by size --mode=production"},"repository":{"type":"git","url":"git+https://github.com/orbitdb/orbit-db-identity-provider.git"},"keywords":["orbitdb","orbit-db","identity"],"author":{"name":"shamb0t"},"contributors":[{"name":"shamb0t"},{"name":"haadcode"},{"name":"RichardLitt"},{"name":"latenssi"},{"name":"adam-palazzo"}],"license":"MIT","bugs":{"url":"https://github.com/orbitdb/orbit-db-identity-provider/issues"},"homepage":"https://github.com/orbitdb/orbit-db-identity-provider#readme","devDependencies":{"fs-extra":"^7.0.1","mocha":"^5.2.0","rimraf":"^2.6.2","standard":"^12.0.1","webpack":"^4.27.1","webpack-cli":"^3.1.2","localstorage-level-migration":"^0.0.1"},"standard":{"env":["mocha"]},"dependencies":{"ethers":"^4.0.20","orbit-db-keystore":"~0.2.0"},"localMaintainers":["haad <haad@haja.io>","shamb0t <shams@haja.io>","hajamark <mark@haja.io>"],"gitHead":"a6cf1139bea3e59f9e03918ee02ba697904008a5","_id":"orbit-db-identity-provider@0.1.3","_nodeVersion":"10.16.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-WOoCFm9ii7n/tAWSBoctwPkQhrtUoUN6EXCW6gHCiSIHG77pk/a8ZA19SBhDbbZlpxYFAdLZ+6lmff60Bret7A==","shasum":"76044c9e7496d87598a0b3179d54275d3bcdf801","tarball":"https://registry.npmjs.org/orbit-db-identity-provider/-/orbit-db-identity-provider-0.1.3.tgz","fileCount":14,"unpackedSize":3163372,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdLCytCRA9TVsSAnZWagAAuf0P/2K1sBDORxqZJ/ASLbIm\neY5a+7cPb3fetJcjxESdKhDKkLs12amoauImII9ZdKPeccoTkNk5J8VkI3ih\n7cvpPd0xX9vfzqEv9ZQDMEwN7bRfvtCSom0EUBs2Kfy5YOLhP4B4LmNIyt5Z\nY6JUMdd+C3ejZ8ZvlPq2BQTAYxXwBNs3yGL2YOAR5lFf5SPBH6gPin/O4YIc\nKLMrxBP58+YxQvZ61ypTpa49+WZelLLRZ6FG85lH7VF2AXljHTD/0v+jSObK\nrsi8Hox20n4I8tsh4rJTSZfvxWHtAlJVJWII0JTCo7uZTkZZCItYrypvd3I3\nFMceavjXbnHTvtQBEZndcZNsLHxIObp2PjBIZbKZTlGARFp3OeyUbQdRLvYy\njbctSSfavMPtke5utHK9IIkEacokB0BOrYy14kaOWSddOTkBxRvtKcvs+aqI\nncC/iuLYVZgzRgKCbVk7oJFky/mlctp2X3ui/9OLwJ7KyeXWV896HzY0A4Q5\nT75UMpTecmBRLzWgVyhPXhat266Ygvjhlfh5qjgc/2e+7Ly2Pofd71r5Yqcj\nap9Ec2t8IDrsLchO98Wszdz/R+4973ZO/pnz9rXYx05zyvRZXYXD+51/m+AS\nJtM7nGWlTsFfPBDJ0zACBBJFxziP0ozvoZ9hFKpaRd2Vzm+Q+QNTepFWy0fW\ne4gB\r\n=4D4d\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG2/5KhFocRfX3e5xW+nN3ndMa9WIqQU9rXw8TmMuKXRAiA90kQcA0PgqX9jgO0ji34O+DaB+eSbPaZTNa1R/p3a7A=="}]},"maintainers":[{"email":"haad@haja.io","name":"haad"},{"email":"mark@haja.io","name":"hajamark"},{"email":"shams@haja.io","name":"shamb0t"}],"_npmUser":{"name":"shamb0t","email":"shams@haja.io"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/orbit-db-identity-provider_0.1.3_1563176109018_0.44224572068430734"},"_hasShrinkwrap":false,"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.1.4":{"name":"orbit-db-identity-provider","version":"0.1.4","description":"Default identity provider for OrbitDB","main":"index.js","scripts":{"test":"mocha","lint":"standard","build":"npm run build:dist","build:dist":"webpack --config webpack.config.js --display-modules --sort-modules-by size --mode=production"},"repository":{"type":"git","url":"git+https://github.com/orbitdb/orbit-db-identity-provider.git"},"keywords":["orbitdb","orbit-db","identity"],"author":{"name":"shamb0t"},"contributors":[{"name":"shamb0t"},{"name":"haadcode"},{"name":"RichardLitt"},{"name":"latenssi"},{"name":"adam-palazzo"}],"license":"MIT","bugs":{"url":"https://github.com/orbitdb/orbit-db-identity-provider/issues"},"homepage":"https://github.com/orbitdb/orbit-db-identity-provider#readme","devDependencies":{"fs-extra":"^7.0.1","mocha":"^5.2.0","rimraf":"^2.6.2","standard":"^12.0.1","webpack":"^4.27.1","webpack-cli":"^3.1.2","localstorage-level-migration":"^0.0.1"},"standard":{"env":["mocha"]},"dependencies":{"ethers":"^4.0.20","orbit-db-keystore":"~0.2.0"},"localMaintainers":["haad <haad@haja.io>","shamb0t <shams@haja.io>","hajamark <mark@haja.io>"],"gitHead":"7217e87773be470a84412f98688938958b8a00f6","_id":"orbit-db-identity-provider@0.1.4","_nodeVersion":"10.16.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-SaOX0ePCCIscouLF9ahSzjvPodlSmUOs0yARsQVwnAQz8FFtCMD69YOk77+6Id9DReMbgnTFAaKzHI+y54HKlw==","shasum":"5cbd9d37c39d880f589ff2bad869a1fabb65d9ce","tarball":"https://registry.npmjs.org/orbit-db-identity-provider/-/orbit-db-identity-provider-0.1.4.tgz","fileCount":13,"unpackedSize":2493287,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdLDYUCRA9TVsSAnZWagAARecQAIYyUjFMrgDjV51Apglx\nG1Q/VujkZYd7q5sNX0NmAB3htyMmEbS3R4e/uOSO19e2y8zijT3GbP0EW/jq\nLUXruGhK3zS9OHOwCRkPJbr4O5bUzgrCjWvqi1DprNAQ7P0PDUF2fWQBAKSX\nHo9t89zGgNnO/DdtyyDhuVnZkDpbXUvTcQCWGu8U6xBn02IqhEMa6i3t1lBx\nESG4IcvbUYSKKYEXaOcR8QGW/JticcQZdSuW93n8tQSxwGUlcfZVSUtsxjEZ\nk7/owgkZpxQyOD0IZOaEgE1CD+yjrBlx7BewEl/V7pqb16/kA7kPTJlTPFOi\nWYH3h+N+3VRdWNL/kByOkQhVDnICfzIh49XjvZcY4ORCAQbuU74w+fBuB893\n4dGVjSOrZ0PtQWw9fPxg3C8OsG6Dv8/MPRGLIUx6cNmBSbtF5DNe6xADn1Vx\nI+lJhaNbq+euyUZPkK+JjmGTE7ziqo7kgNrHxWQ7ilbo1y6dNXkdoq6X1lX8\nBCVSP31xVs5QavFScHf2onoAsRDd+UgiQhyzuzINqBUp9C4YxUXKDM35V5BI\nc1MfJ6rtir9AhHoD/mZIadKGkmXhlzXhkTtbh57Gw4+htMKJx9lf4BHfTMos\nA3pJghFX/EaQdYjx7K2sjONwi5uI4Kwwv8k4m0/bG4egpZE8fUBZOpJ1OLUD\naE28\r\n=Kgev\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDgXKNizfZoxgezPxeamqnanCFpR6dYvmRHlu05Qzc3PwIgaBk4GiIQVWHgdNezzgevP4sP/ZgqbssM6iHEIZ1sxy8="}]},"maintainers":[{"email":"haad@haja.io","name":"haad"},{"email":"mark@haja.io","name":"hajamark"},{"email":"shams@haja.io","name":"shamb0t"}],"_npmUser":{"name":"shamb0t","email":"shams@haja.io"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/orbit-db-identity-provider_0.1.4_1563178515373_0.12610253107075708"},"_hasShrinkwrap":false,"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.1.5":{"name":"orbit-db-identity-provider","version":"0.1.5","description":"Default identity provider for OrbitDB","main":"index.js","scripts":{"test":"mocha","lint":"standard","build":"npm run build:dist","build:dist":"webpack --config webpack.config.js --display-modules --sort-modules-by size --mode=production"},"repository":{"type":"git","url":"git+https://github.com/orbitdb/orbit-db-identity-provider.git"},"keywords":["orbitdb","orbit-db","identity"],"author":{"name":"shamb0t"},"contributors":[{"name":"shamb0t"},{"name":"haadcode"},{"name":"RichardLitt"},{"name":"latenssi"},{"name":"adam-palazzo"}],"license":"MIT","bugs":{"url":"https://github.com/orbitdb/orbit-db-identity-provider/issues"},"homepage":"https://github.com/orbitdb/orbit-db-identity-provider#readme","devDependencies":{"fs-extra":"^7.0.1","mocha":"^5.2.0","rimraf":"^2.6.2","standard":"^12.0.1","webpack":"^4.27.1","webpack-cli":"^3.1.2","localstorage-level-migration":"^0.0.1"},"standard":{"env":["mocha"]},"dependencies":{"ethers":"^4.0.20","orbit-db-keystore":"~0.2.0"},"localMaintainers":["haad <haad@haja.io>","shamb0t <shams@haja.io>","hajamark <mark@haja.io>"],"gitHead":"0884a90cab9ef91127c5ff2ec0693984de483abf","_id":"orbit-db-identity-provider@0.1.5","_nodeVersion":"10.16.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-mFwSuxLNiTNnv4+WlepzlN8q+Mj2m+s9GFnyoENemDQN+F21WBxJGwZ8uFJ34m3LBe848gJLJuJR7KefGKOIiQ==","shasum":"77ac6de55dc0fb06787d8f9ef27fbd7848221fff","tarball":"https://registry.npmjs.org/orbit-db-identity-provider/-/orbit-db-identity-provider-0.1.5.tgz","fileCount":13,"unpackedSize":690911,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdLDbvCRA9TVsSAnZWagAAgFkP/0BhxW+sRj7QPOi2D4/Z\nc1taRlDHMfxbIsfwyE0WgUjHJRgZsZP/QRzFNqrsDCgiv84dMLWm8OGyn7hx\niAt+bNnxLjuUYnvO9le2bwkiJvnINLTOqYZ0ztqq+ROBP/GrEgbJI8t0mgpy\nWywXS7XrKjJ7ZlLcY753oGOOuM6RmS1e9vquCpviR9Mef38FM1f+W1HdXXyh\n0PJ8zaZENvuXTwUnmjX1FYVpyovnrTgtHonKY+D9ceo8vN2z25oCRa5Lmjnh\nQQWZrMScfnifjXderrYMeZHNCRllNZf8wrw700PzBTyJGLRElHEvPX1KMUgc\nOWWF5rZRsTB4HW3kEDBHZeUuDv5qfCdjPwah6A0UcHaN7JP5ChoZFnvh8/U6\nk+kEKyunIyq6ByI1LIkIQINvJDpx34btT1i/6KA+16kOXmaW58XGx89iNgPA\nqR+cVpvULZsI9qSdw140M76rYQSQnA3Lz/j83jXrD1tNVrp5oFa8T1pqxB9e\n5AEzLCha7JDQoSFVjVs3fyItlUDK6vK+lgDHY8IY/wQy2VMgqmRukRRP19sl\nT7dnda+h2GhW15zZsuL77tbySCKAZQiK/WpCkiEtgxEHEL/Y1G32LX2yrxea\nRl+QE7pxNX8yOs5mfpPCiQvuRDQyb2XDeSCWHUU4occ/1rCUHZn6ciXfomsC\nNIjh\r\n=4Ssg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCID5KswauU8QYCUVEToZImzXjicr49j3IE3AWNnRTRwBCAiB1HlDZiVbfyW3sjdoAQG3O8H3KsZQnXP2swDlQ36msGA=="}]},"maintainers":[{"email":"haad@haja.io","name":"haad"},{"email":"mark@haja.io","name":"hajamark"},{"email":"shams@haja.io","name":"shamb0t"}],"_npmUser":{"name":"shamb0t","email":"shams@haja.io"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/orbit-db-identity-provider_0.1.5_1563178734931_0.48038644658448293"},"_hasShrinkwrap":false,"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.1.6":{"name":"orbit-db-identity-provider","version":"0.1.6","description":"Default identity provider for OrbitDB","main":"index.js","scripts":{"test":"mocha","lint":"standard","build":"npm run build:dist","build:dist":"webpack --config webpack.config.js --display-modules --sort-modules-by size --mode=production"},"repository":{"type":"git","url":"git+https://github.com/orbitdb/orbit-db-identity-provider.git"},"keywords":["orbitdb","orbit-db","identity"],"author":{"name":"shamb0t"},"contributors":[{"name":"shamb0t"},{"name":"haadcode"},{"name":"RichardLitt"},{"name":"latenssi"},{"name":"adam-palazzo"}],"license":"MIT","bugs":{"url":"https://github.com/orbitdb/orbit-db-identity-provider/issues"},"homepage":"https://github.com/orbitdb/orbit-db-identity-provider#readme","devDependencies":{"fs-extra":"^7.0.1","mocha":"^5.2.0","rimraf":"^2.6.2","standard":"^13.0.2","webpack":"^4.27.1","webpack-cli":"^3.1.2","localstorage-level-migration":"^0.0.1"},"standard":{"env":["mocha"]},"dependencies":{"ethers":"^4.0.20","orbit-db-keystore":"~0.2.0"},"localMaintainers":["haad <haad@haja.io>","shamb0t <shams@haja.io>","hajamark <mark@haja.io>"],"gitHead":"1e4b5991709cd957574889ba34ff9f3add6074d2","_id":"orbit-db-identity-provider@0.1.6","_nodeVersion":"10.16.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-BuDCko5u73e9Ch6r8xrJ+QRsGgPlx2Kn3tcOMCZaC4xaif0T9pB7wp7+P2DWL00tMMqippw3udMljwXyM3KEXQ==","shasum":"3b37320713255c7ace2c8ee03b50f7f16a32d2c1","tarball":"https://registry.npmjs.org/orbit-db-identity-provider/-/orbit-db-identity-provider-0.1.6.tgz","fileCount":13,"unpackedSize":770036,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdOb7cCRA9TVsSAnZWagAA8lwP/R8Gykef++xyVJmeSMuw\nehdIjC5DDI6rfI7U4z2D57p4NCt962M7ncxclcYq1oHDx8BBaYg01gaCHtp1\nEYxDQGIZcxLizRk+XsF71KZQ+HYJy4phoVza4X6lNvRpFgJ7KykoNW1jUKDf\n9Z49sYVJoE3jtQ8VOik72jxbTKJALNfjmfaK6rYTbtIcMaiDRAC4wpYuwYzn\nKFNmlTP+iAZCMmXXpPjRZLhh7/nTQzeZEvLYbQE61J4ZSEzEz15X9nlEtDn1\nwMWCDYbQlzX2acITogMMPhOw/Hy+Luv99icjPC1qI9UlYBPVNEUa3geSyMsE\ny7XTkKOnp75ZGtSNHGFSwPbFZGa9AqkmbOTzqCffivvcF8YzugcOJ1bN2LzW\njTC5X2jss3U+dnIahmoZw4FPmVIDUYQgcX78Ho1YIl4LiUOlRrdYxuHhaydJ\nPfwmClE9HTklF8ue6R1BDlu56L807xW4EN9f2HeOW3X8V349EJaMOjgSSxiV\nAZ+0cK1GYgSLcs6OGB8oQcj9cs2FEZ/Qb4JkgD66zyLmZasSx+EEXkd4pyej\nTzYusSdQ9s9tqsNlg6Ce2rnluRlJFoEeQgKgU+uhbUUKXus97xB2GAeq5GK+\nRHlwbOQc18DeHvt0L5YoHnoriFQ6aMScOXvq/A5mzJozB0idJNP9NNonaZyt\nbV72\r\n=I8wW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDsFs21MXgz3nQLW0/VC/HpIzstVYnLjtmwJHd82JgELAiAOIkNaNo4asHkGRVIvM0gjnr3u1tTOo67bDHseeoCXAA=="}]},"maintainers":[{"email":"haad@haja.io","name":"haad"},{"email":"mark@haja.io","name":"hajamark"},{"email":"shams@haja.io","name":"shamb0t"}],"_npmUser":{"name":"shamb0t","email":"shams@haja.io"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/orbit-db-identity-provider_0.1.6_1564065499452_0.19470622171438445"},"_hasShrinkwrap":false,"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.2.0-rc1":{"name":"orbit-db-identity-provider","version":"0.2.0-rc1","description":"Default identity provider for OrbitDB","main":"index.js","scripts":{"test":"npm run test:node && npm run test:browser","test:node":"TEST=all mocha","test:browser":"npm run build:tests && mocha-headless-chrome -f ./test/browser/index.html -a no-sandbox","lint":"standard","build":"npm run build:dist","build:dist":"webpack --config ./conf/webpack.config.js --display-modules --sort-modules-by size --mode=production","build:tests":"webpack --config ./conf/webpack.tests.config.js --mode development"},"repository":{"type":"git","url":"git+https://github.com/orbitdb/orbit-db-identity-provider.git"},"keywords":["orbitdb","orbit-db","identity"],"author":{"name":"shamb0t"},"contributors":[{"name":"shamb0t"},{"name":"haadcode"},{"name":"RichardLitt"},{"name":"latenssi"},{"name":"adam-palazzo"}],"license":"MIT","bugs":{"url":"https://github.com/orbitdb/orbit-db-identity-provider/issues"},"homepage":"https://github.com/orbitdb/orbit-db-identity-provider#readme","devDependencies":{"@babel/core":"^7.5.5","@babel/plugin-syntax-object-rest-spread":"^7.2.0","@babel/plugin-transform-modules-commonjs":"^7.5.0","@babel/plugin-transform-runtime":"^7.5.5","@babel/preset-env":"^7.5.5","@babel/runtime":"^7.5.5","fs-extra":"^7.0.1","json-loader":"^0.5.7","localstorage-level-migration":"next","mocha":"^5.2.0","mocha-headless-chrome":"^2.0.3","orbit-db-storage-adapter":"^0.4.1","orbit-db-test-utils":"^0.4.0","rimraf":"^2.6.2","standard":"^13.0.2","webpack":"^4.29.1","webpack-cli":"^3.2.2"},"standard":{"env":["mocha"]},"dependencies":{"ethers":"^4.0.20","orbit-db-keystore":"next"},"localMaintainers":["haad <haad@haja.io>","shamb0t <shams@haja.io>","hajamark <mark@haja.io>"],"_id":"orbit-db-identity-provider@0.2.0-rc1","_nodeVersion":"10.15.3","_npmVersion":"6.11.1","dist":{"integrity":"sha512-KmroXc0+6WxvMj6tCwi6LrdLDg8q4C7SoRV0UDE2ZQSbiLDUD7uHeCox1ZuNILlbtLtAMEciP/ovMhu2E+AB0A==","shasum":"e7638cc0789ff56aee2fe6e36fc29ff72189df35","tarball":"https://registry.npmjs.org/orbit-db-identity-provider/-/orbit-db-identity-provider-0.2.0-rc1.tgz","fileCount":15,"unpackedSize":777023,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdaXBZCRA9TVsSAnZWagAAVgwP/1M9ZUS1R4SIkxHnNkl2\ndJRPKGEDcCRt50+SqKD1+u403oZd6lmqZo09YPek03fBpUyXrnvF8cOLOpiK\nF5hKs0Wtb5haxhoMBZ0L8ocuUWcN8e/xtOekfcxgOt80etOjzTx6+oY3sOtR\nEuT920TsZQyyj0zV6AlRjUxdKr49igcA27VYXOFqpfG1Q3P2+CX2VtPDKRJD\n3PAldLR6GKzemyxZ5J67rlEiybeEVEWirgpgyZfaRm7JlE4173zjJrzNYq3l\nmwY82SMbPQ8tseQ64eEWDyp9dL0xk3eypq2v7mxpDbRJYmrW9rGWZbLBcUdF\nSVg48TGOWTrqQ62gtQDsY0zvMBiyJqWoiKTHFodlxgeZXD0ayRgDkwge/5Y2\neHhjiWQltUHdzs44ImcrhoowkugPEsyMUha0xgxwZj69UqGLHKylZ8vobzJh\nsin7JSUMVVO/rXx+ygU0duNQR23FOC6Y/e3QRjlJvxuyb7DygSJaCzKDDviD\nTTL2vrcWRLOqeGEt3J9m73fCAbl63ofBlAFyoiGVBytzp2kzoiaav+FUQ88z\nj0bLMqFgWDnwSVFY4lWsW+bA3hDivhJPHRbFbO76M2D/Q0Yx1ZzBZg/NsvRr\nNKWyk/pU53Kzdk51MbP5YGMg3b+u3e7TRQlzmbMUnpMe0Urn2SKne0mbwmrv\nyPHu\r\n=dwy7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBWI/4fen2Sm0Bf/qUicAAeHOJT2kBRdZG5eDJQ+p7mXAiEAjpB5KsgOV2ZgDygvaof0clw16AFbEDSuYx06Xow3AnE="}]},"maintainers":[{"email":"haad@haja.io","name":"haad"},{"email":"mark@haja.io","name":"hajamark"},{"email":"shams@haja.io","name":"shamb0t"}],"_npmUser":{"name":"hajamark","email":"mark@haja.io"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/orbit-db-identity-provider_0.2.0-rc1_1567191128891_0.8021640007814863"},"_hasShrinkwrap":false,"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.2.0-rc2":{"name":"orbit-db-identity-provider","version":"0.2.0-rc2","description":"Default identity provider for OrbitDB","main":"index.js","scripts":{"test":"npm run test:node && npm run test:browser","test:node":"TEST=all mocha","test:browser":"npm run build:tests && mocha-headless-chrome -f ./test/browser/index.html -a no-sandbox","lint":"standard","build":"npm run build:dist","build:dist":"webpack --config ./conf/webpack.config.js --display-modules --sort-modules-by size --mode=production","build:tests":"webpack --config ./conf/webpack.tests.config.js --mode development"},"repository":{"type":"git","url":"git+https://github.com/orbitdb/orbit-db-identity-provider.git"},"keywords":["orbitdb","orbit-db","identity"],"author":{"name":"shamb0t"},"contributors":[{"name":"shamb0t"},{"name":"haadcode"},{"name":"RichardLitt"},{"name":"latenssi"},{"name":"adam-palazzo"}],"license":"MIT","bugs":{"url":"https://github.com/orbitdb/orbit-db-identity-provider/issues"},"homepage":"https://github.com/orbitdb/orbit-db-identity-provider#readme","devDependencies":{"@babel/core":"^7.5.5","@babel/plugin-syntax-object-rest-spread":"^7.2.0","@babel/plugin-transform-modules-commonjs":"^7.5.0","@babel/plugin-transform-runtime":"^7.5.5","@babel/preset-env":"^7.5.5","@babel/runtime":"^7.5.5","fs-extra":"^7.0.1","json-loader":"^0.5.7","localstorage-level-migration":"next","mocha":"^5.2.0","mocha-headless-chrome":"^2.0.3","orbit-db-storage-adapter":"^0.4.1","orbit-db-test-utils":"^0.4.0","rimraf":"^2.6.2","standard":"^13.0.2","webpack":"^4.29.1","webpack-cli":"^3.2.2"},"standard":{"env":["mocha"]},"dependencies":{"ethers":"^4.0.20","orbit-db-keystore":"next"},"localMaintainers":["haad <haad@haja.io>","shamb0t <shams@haja.io>","hajamark <mark@haja.io>"],"readme":"# orbit-db-identity-provider\n\n[![Gitter](https://img.shields.io/gitter/room/nwjs/nw.js.svg)](https://gitter.im/orbitdb/Lobby)  \n[![npm version](https://badge.fury.io/js/orbit-db-identity-provider.svg)](https://www.npmjs.com/package/orbit-db-identity-provider)\n\n> Default identity provider for OrbitDB\n\n`Identities` is a package to manage identities in [@OrbitDB](http://github.com/orbitdb/orbit-db)\n\n## Table of Contents\n\n  - [Install](#install)\n  - [Usage](#usage)\n    - [Creating an identity](#creating-an-identity)\n    - [Adding a custom identity signer and verifier](#adding-a-custom-identity-signer-and-verifier)\n    - [Properties](#properties)\n      - [id](#id)\n      - [publicKey](#publickey)\n      - [signatures](#signatures)\n  - [Contribute](#contribute)\n    - [Tests](#tests)\n    - [Build](#build)\n    - [Linting](#linting)\n  - [License](#license)\n\n## Install\n\nThis project uses [npm](https://npmjs.com/) and [nodejs](https://nodejs.org/)\n\n```sh\n$ npm i --save orbit-db-identity-provider\n```\n\n## Usage\n\nThe `Identity` object contains signatures proving possession of some external identifier and an OrbitDB public key. This is included to allow proof of ownership of an external identifier within OrbitDB.\n\n### Creating an identity\n```js\nconst Identities = require('orbit-db-identity-provider')\nconst options = { id: 'local-id'}\nconst identity = await Identities.createIdentity(options)\n\nconsole.log(identity.toJSON())\n// prints\n{\n  id: '045757bffcc7a4f4cf94c0cf214b3d3547a62195a09588df36b74aff837b2fdc14551360a323bf9de2ac8fb2eda9bd1bae5de53577a8db41ee2b46b4bf8cd7be33',\n  publicKey: '04b5c54ef8f2514a58338e64aa08aa6052c3cfef1225a10b51017f2ad63a92fb166e7a19cba44321c9402ab1b62c940cd5e65e81e4d584c1208dbd021f6e22c6f5',\n  signatures:  {\n    id: '3046022100aab534483f474bd3791eb9dcf1f61b6bdb4b07f70e8eca1ea7b530ac0ca13ca1022100e9d95eeeacc9813808400eb37f8aae6be7873df460d2a03e7a19132e34f0bd16',\n    publicKey: '30440220514b6fee38cbec96d9851905e575d6e209834c94be5e009a8261737d4ef23dfc0220794fa8dee564701d337b68fdbeef76bb81d777154c211d84ac345ec287a2a8e1'\n  },\n  type: 'orbitdb'\n}\n\n```\nIf `options.type` is not specified, Identities will default to creating an identity with type '`orbitdb'`, meaning the signing key will sign another OrbitDB public key. This public key can be an already-existing OrbitDB key allowing you to link several keys to a 'master' OrbitDB key to, for example, link keys across devices.\n\nTo use an existing keystore, you can pass it as an argument in the options as follows:\n```js\nconst identity = await Identities.createIdentity({ id: 'local-id', keystore: existingKeystore })\n```\n\n### Create identity using existing keys\n\nTo create an identity using existing keys, you need to install `localstorage-level-migration`\n\n```js\nconst Identities = require('orbit-db-identity-provider')\nconst migrate = require('localstorage-level-migration')\nconst options = { id: 'new-id', migrate: migrate('/path/to/keys') }\nconst identity = await Identities.createIdentity(options)\n\nconsole.log(identity.toJSON())\n// prints\n{\n  id: '<new-id>',\n  publicKey: '<compressed-original-key>',\n  signatures:  {\n    id: '<new-id-signed-by-public-key>',\n    publicKey: '<public-key-signed-by-id>'\n  },\n  type: 'orbitdb'\n}\n\n```\n\n### Adding a custom identity signer and verifier\n\nTo link an OrbitDB signing key with an external identity, you must provide a custom class which implements the `IdentityProvider` [interface](https://github.com/orbitdb/orbit-db-identity-provider/blob/master/src/identity-provider-interface.js).\n\n```js\nclass MyIdentityProvider extends IdentityProvider {\n  static get type () { return 'MyIdentityType' } // return type\n  async getId () { } // return identifier of external id (eg. a public key)\n  async signIdentity (data) { } //return a signature of data (signature of the OrbtiDB public key)\n  static async verifyIdentity (identity) { } //return true if identity.sigantures are valid\n}\n\nIdentities.addIdentityProvider(MyIdentityProvider)\n\n// to create an identity of type `MyIdentityType`\nconst identity = await Identities.createIdentity({ type: `MyIdentityType`})\n\n```\n\n\n### Properties\n\n#### id\n\nReturns the ID of the external identity.\n\n#### publicKey\n\nReturns the signing key used to sign OrbitDB entries.\n\n#### signatures\nReturns an object containing two signatures\n```js\n{ id: <id-signature>, publicKey: <pub-key+id-siganture> }\n```\n\nThe first signature, `id`, is `identity.id` signed by `identiy.publicKey`. This allows the owner of `id` to prove they own the private key associated with `publicKey`. The second signature `publicKey` is created by signing the concatenation `identity.signature.id + identity.publicKey` using `identity.id`. This links the two identifiers.\n\n## Contribute\n\nPlease, feel free to contribute! Take a look at [the issues](https://github.com/orbitdb/orbit-db-identity-provider/issues), and comment on an existing issue or create a new one if you have questions, bugs, or suggestions. For larger PRs, open an issue first if you could - drive-by PRs are also welcomed.\n\nPlease abide by the [Code of Conduct](CODE_OF_CONDUCT.md). For more on contributing to [@OrbitDB](https://github.com/orbitdb/), check out the docs in [orbitdb/welcome](https://github.com/orbitdb/welcome).\n\n### Tests\n\nRun tests with:\n\n```sh\n$ npm test\n```\n\n### Build\n\nThe build script will build the distribution file for browsers.\n\n```sh\n$ npm run build\n```\n\n### Linting\n\nPlease use [`standard`](https://standardjs.com). To check,\n\n\n```sh\n$ npm run lint\n```\n\n## License\n\n[MIT](LICENSE) © 2018 Haja Networks Oy\n","readmeFilename":"README.md","_id":"orbit-db-identity-provider@0.2.0-rc2","_nodeVersion":"10.15.3","_npmVersion":"6.11.1","dist":{"integrity":"sha512-cIPLbRs2AnV/sXVKh6Keg6cZa58E+D+Acztpqz+8Im6BWqJlFg0QfvDP8vmgqL42Pk91LJpwOOdqJhcCIUM4IQ==","shasum":"8340472f247cf63a0ca2f0e2926f5b36221012f4","tarball":"https://registry.npmjs.org/orbit-db-identity-provider/-/orbit-db-identity-provider-0.2.0-rc2.tgz","fileCount":15,"unpackedSize":777023,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdaXB7CRA9TVsSAnZWagAAcqsP/jpqsMMCRmUuE3tQVnaY\nrxheU2oID5xcD072FaHOlBDkZkLPofJqkpWWSyrRmM69eFagIore91HmidXa\njoPubn8P8dtu/VgLiEtXTqY28gpaVsDEVd1bol0B3I9ydeJja+R77Rai2rTO\nlWek0/DEDOZOGXONn1dTPt2b97iG8koZJnRiEcEvIOrKwTmju/ictWoYVJAb\nE8i++muLSU3m7f94+9S28pLCWUX7C5W1BQAMrqgMrB93UMPP5hXVKgly3oPb\niTbwb8z+ewPmTezgmItOCPlWQOnX2x7TLuwDgoeBiXljDzskbN35XAUr/jN9\n8ciHcRJf+TguxFHCax5n+KAJbCLfglsnkQPE5jYJk5m96hRlh8ITZOrlTX7H\nzmhdhZ9tL/PX4aicoh5LW07Kdzgcnd3JR/9J68RnPEXIZ0JqQSBhBzF+r6qG\nkhNVn6ThnAPwz+PPIipkm2rZ0hDKMnJV3vA50nlxIj1XLys4jRFoa4MFzfwN\nJ8Gd6AngqWgxYNCjgXKsmGcNgscMeHQ58qU/c9TJF8vEIk8aBNnSdM2eEK2O\naujD41oHjv1uVtzclT5wZwAecvNKbprSD9fbqXT2VjCMpH8qrGNAkYC1fTXq\nRUHLAwQwsVwC1Cp/AIZOp+uQ/2+n5wK4p4CRC4wn4ZibJY5+l/S4Vb9kJacI\nnfE+\r\n=3Htb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCLqC1SXuQn9rbYkUk82v2OeFPkjKq6qpobsBQ0BoQQcwIgWRcTHcZiDmNoV6JDPpwvX1B/bEojqLf5T5KdiZyoEtA="}]},"maintainers":[{"email":"haad@haja.io","name":"haad"},{"email":"mark@haja.io","name":"hajamark"},{"email":"shams@haja.io","name":"shamb0t"}],"_npmUser":{"name":"hajamark","email":"mark@haja.io"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/orbit-db-identity-provider_0.2.0-rc2_1567191163170_0.7918197318044506"},"_hasShrinkwrap":false,"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.1.7":{"name":"orbit-db-identity-provider","version":"0.1.7","description":"Default identity provider for OrbitDB","main":"index.js","scripts":{"test":"mocha","lint":"standard","build":"npm run build:dist","build:dist":"webpack --config webpack.config.js --display-modules --sort-modules-by size --mode=production"},"repository":{"type":"git","url":"git+https://github.com/orbitdb/orbit-db-identity-provider.git"},"keywords":["orbitdb","orbit-db","identity"],"author":{"name":"shamb0t"},"contributors":[{"name":"shamb0t"},{"name":"haadcode"},{"name":"RichardLitt"},{"name":"latenssi"},{"name":"adam-palazzo"}],"license":"MIT","bugs":{"url":"https://github.com/orbitdb/orbit-db-identity-provider/issues"},"homepage":"https://github.com/orbitdb/orbit-db-identity-provider#readme","devDependencies":{"fs-extra":"^7.0.1","mocha":"^5.2.0","rimraf":"^2.6.2","standard":"^13.0.2","webpack":"^4.27.1","webpack-cli":"^3.1.2","localstorage-level-migration":"^0.0.1"},"standard":{"env":["mocha"]},"dependencies":{"ethers":"^4.0.20","orbit-db-keystore":"~0.2.0"},"localMaintainers":["haad <haad@haja.io>","shamb0t <shams@haja.io>","hajamark <mark@haja.io>"],"_id":"orbit-db-identity-provider@0.1.7","_nodeVersion":"10.15.3","_npmVersion":"6.11.1","dist":{"integrity":"sha512-4V/RyLN3uXxzfYBhizcIy2NQmeOXpxx6l65PkExFs2reeULHgxuenbbTLxBOvP0nOnEE9L4U6JjNrJkbpyO20A==","shasum":"9265ea4895d8e0fc1a0d76d223e48c92f0265dfa","tarball":"https://registry.npmjs.org/orbit-db-identity-provider/-/orbit-db-identity-provider-0.1.7.tgz","fileCount":13,"unpackedSize":770036,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdaXDECRA9TVsSAnZWagAAtmkP/1LSIeRnKlCJZNHBPp3z\nVjENHbYWgRUE8S3z1m54LyXNvRlFbFncifras/CU3zDTFsEorlh+B9NTxYHE\ndC8qsoI09AmbippY12Uk3ThXj2Wdjx1JsRkoHULYK3YTn5qV0obVctTzUCJN\nkLpL07P+sOWgyYveAz6VdtgSsGntyMTmwC4Diogaz1E8q8o63hSlMlo8HiLo\npiugH/TQ9KRm9VWIUxw4VPexk7/QUEUr/V8wPT4dAldAcpOHDPco8uqQquq0\n+7HsFFffW6iWYVikvM+ObLt+UpTP1fBeSsmKbx28S5F1huMni9PEmvlggWVs\nnnp1Nvaw/CzzjwtpCjsnIGyP+ImZhC75494lOvfzuju0aKqhE4lA6TpIwIFP\nGq9cyLxGRgXj8BvpeFmWsIxtT5U35HjWVpB/fsNlZ8Rix6cs9+PchBsJOhaA\nHwO+FFfIHinFHjIlVjdGgZrAlj1tddMJ4OfbzQiN5ggVG792S5PBEizUyypw\nR1DBat0OUbdlkxHGGRtoPHjH4h9PeRkg77I80934QMpPM8AnQZaEA5cSXkuL\nP8G9BRIBtVOHwrhhJjBeF8R5+pTsZYNtnYrZPJ1i8qKmUnPTQCWHSJyDGBjB\n175lnRaz8Ju0Lgirs0EF9OB4H1oONO/UaXxjfBWMA478Q4OSl85asOuNUTqf\n+l8T\r\n=ew0i\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQClOFR6/EZrvLe7Gbrk6TIkoZd5t9L9GZmZ1M9nGQXo9AIgOnSPTBiHGGfYKd1jysKc22PHcNqI8AGhfBuhNKva6zk="}]},"maintainers":[{"email":"haad@haja.io","name":"haad"},{"email":"mark@haja.io","name":"hajamark"},{"email":"shams@haja.io","name":"shamb0t"}],"_npmUser":{"name":"hajamark","email":"mark@haja.io"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/orbit-db-identity-provider_0.1.7_1567191235402_0.23040464121617155"},"_hasShrinkwrap":false,"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.2.0-rc3":{"name":"orbit-db-identity-provider","version":"0.2.0-rc3","description":"Default identity provider for OrbitDB","main":"index.js","scripts":{"test":"npm run test:node && npm run test:browser","test:node":"TEST=all mocha","test:browser":"npm run build:tests && mocha-headless-chrome -f ./test/browser/index.html -a no-sandbox","lint":"standard","build":"npm run build:dist","build:dist":"webpack --config ./conf/webpack.config.js --display-modules --sort-modules-by size --mode=production","build:tests":"webpack --config ./conf/webpack.tests.config.js --mode development"},"repository":{"type":"git","url":"git+https://github.com/orbitdb/orbit-db-identity-provider.git"},"keywords":["orbitdb","orbit-db","identity"],"author":{"name":"shamb0t"},"contributors":[{"name":"shamb0t"},{"name":"haadcode"},{"name":"RichardLitt"},{"name":"latenssi"},{"name":"adam-palazzo"}],"license":"MIT","bugs":{"url":"https://github.com/orbitdb/orbit-db-identity-provider/issues"},"homepage":"https://github.com/orbitdb/orbit-db-identity-provider#readme","devDependencies":{"@babel/core":"^7.5.5","@babel/plugin-syntax-object-rest-spread":"^7.2.0","@babel/plugin-transform-modules-commonjs":"^7.5.0","@babel/plugin-transform-runtime":"^7.5.5","@babel/preset-env":"^7.5.5","@babel/runtime":"^7.5.5","fs-extra":"^7.0.1","json-loader":"^0.5.7","localstorage-level-migration":"next","mocha":"^5.2.0","mocha-headless-chrome":"^2.0.3","orbit-db-storage-adapter":"^0.4.2","orbit-db-test-utils":"^0.7.2","rimraf":"^2.6.2","standard":"^13.0.2","webpack":"^4.29.1","webpack-cli":"^3.2.2"},"standard":{"env":["mocha"]},"dependencies":{"ethers":"^4.0.20","orbit-db-keystore":"next"},"localMaintainers":["haad <haad@haja.io>","shamb0t <shams@haja.io>","hajamark <mark@haja.io>"],"readme":"# orbit-db-identity-provider\n\n[![Gitter](https://img.shields.io/gitter/room/nwjs/nw.js.svg)](https://gitter.im/orbitdb/Lobby)  \n[![npm version](https://badge.fury.io/js/orbit-db-identity-provider.svg)](https://www.npmjs.com/package/orbit-db-identity-provider)\n\n> Default identity provider for OrbitDB\n\n`Identities` is a package to manage identities in [@OrbitDB](http://github.com/orbitdb/orbit-db)\n\n## Table of Contents\n\n  - [Install](#install)\n  - [Usage](#usage)\n    - [Creating an identity](#creating-an-identity)\n    - [Adding a custom identity signer and verifier](#adding-a-custom-identity-signer-and-verifier)\n    - [Properties](#properties)\n      - [id](#id)\n      - [publicKey](#publickey)\n      - [signatures](#signatures)\n  - [Contribute](#contribute)\n    - [Tests](#tests)\n    - [Build](#build)\n    - [Linting](#linting)\n  - [License](#license)\n\n## Install\n\nThis project uses [npm](https://npmjs.com/) and [nodejs](https://nodejs.org/)\n\n```sh\n$ npm i --save orbit-db-identity-provider\n```\n\n## Usage\n\nThe `Identity` object contains signatures proving possession of some external identifier and an OrbitDB public key. This is included to allow proof of ownership of an external identifier within OrbitDB.\n\n### Creating an identity\n```js\nconst Identities = require('orbit-db-identity-provider')\nconst options = { id: 'local-id'}\nconst identity = await Identities.createIdentity(options)\n\nconsole.log(identity.toJSON())\n// prints\n{\n  id: '045757bffcc7a4f4cf94c0cf214b3d3547a62195a09588df36b74aff837b2fdc14551360a323bf9de2ac8fb2eda9bd1bae5de53577a8db41ee2b46b4bf8cd7be33',\n  publicKey: '04b5c54ef8f2514a58338e64aa08aa6052c3cfef1225a10b51017f2ad63a92fb166e7a19cba44321c9402ab1b62c940cd5e65e81e4d584c1208dbd021f6e22c6f5',\n  signatures:  {\n    id: '3046022100aab534483f474bd3791eb9dcf1f61b6bdb4b07f70e8eca1ea7b530ac0ca13ca1022100e9d95eeeacc9813808400eb37f8aae6be7873df460d2a03e7a19132e34f0bd16',\n    publicKey: '30440220514b6fee38cbec96d9851905e575d6e209834c94be5e009a8261737d4ef23dfc0220794fa8dee564701d337b68fdbeef76bb81d777154c211d84ac345ec287a2a8e1'\n  },\n  type: 'orbitdb'\n}\n\n```\nIf `options.type` is not specified, Identities will default to creating an identity with type '`orbitdb'`, meaning the signing key will sign another OrbitDB public key. This public key can be an already-existing OrbitDB key allowing you to link several keys to a 'master' OrbitDB key to, for example, link keys across devices.\n\nTo use an existing keystore, you can pass it as an argument in the options as follows:\n```js\nconst identity = await Identities.createIdentity({ id: 'local-id', keystore: existingKeystore })\n```\n\n### Create identity using existing keys\n\nTo create an identity using existing keys, you need to install `localstorage-level-migration`\n\n```js\nconst Identities = require('orbit-db-identity-provider')\nconst migrate = require('localstorage-level-migration')\nconst options = { id: 'new-id', migrate: migrate('/path/to/keys') }\nconst identity = await Identities.createIdentity(options)\n\nconsole.log(identity.toJSON())\n// prints\n{\n  id: '<new-id>',\n  publicKey: '<compressed-original-key>',\n  signatures:  {\n    id: '<new-id-signed-by-public-key>',\n    publicKey: '<public-key-signed-by-id>'\n  },\n  type: 'orbitdb'\n}\n\n```\n\n### Adding a custom identity signer and verifier\n\nTo link an OrbitDB signing key with an external identity, you must provide a custom class which implements the `IdentityProvider` [interface](https://github.com/orbitdb/orbit-db-identity-provider/blob/master/src/identity-provider-interface.js).\n\n```js\nclass MyIdentityProvider extends IdentityProvider {\n  static get type () { return 'MyIdentityType' } // return type\n  async getId () { } // return identifier of external id (eg. a public key)\n  async signIdentity (data) { } //return a signature of data (signature of the OrbtiDB public key)\n  static async verifyIdentity (identity) { } //return true if identity.sigantures are valid\n}\n\nIdentities.addIdentityProvider(MyIdentityProvider)\n\n// to create an identity of type `MyIdentityType`\nconst identity = await Identities.createIdentity({ type: `MyIdentityType`})\n\n```\n\n\n### Properties\n\n#### id\n\nReturns the ID of the external identity.\n\n#### publicKey\n\nReturns the signing key used to sign OrbitDB entries.\n\n#### signatures\nReturns an object containing two signatures\n```js\n{ id: <id-signature>, publicKey: <pub-key+id-siganture> }\n```\n\nThe first signature, `id`, is `identity.id` signed by `identiy.publicKey`. This allows the owner of `id` to prove they own the private key associated with `publicKey`. The second signature `publicKey` is created by signing the concatenation `identity.signature.id + identity.publicKey` using `identity.id`. This links the two identifiers.\n\n## Contribute\n\nPlease, feel free to contribute! Take a look at [the issues](https://github.com/orbitdb/orbit-db-identity-provider/issues), and comment on an existing issue or create a new one if you have questions, bugs, or suggestions. For larger PRs, open an issue first if you could - drive-by PRs are also welcomed.\n\nPlease abide by the [Code of Conduct](CODE_OF_CONDUCT.md). For more on contributing to [@OrbitDB](https://github.com/orbitdb/), check out the docs in [orbitdb/welcome](https://github.com/orbitdb/welcome).\n\n### Tests\n\nRun tests with:\n\n```sh\n$ npm test\n```\n\n### Build\n\nThe build script will build the distribution file for browsers.\n\n```sh\n$ npm run build\n```\n\n### Linting\n\nPlease use [`standard`](https://standardjs.com). To check,\n\n\n```sh\n$ npm run lint\n```\n\n## License\n\n[MIT](LICENSE) © 2018 Haja Networks Oy\n","readmeFilename":"README.md","_id":"orbit-db-identity-provider@0.2.0-rc3","_nodeVersion":"10.15.3","_npmVersion":"6.11.1","dist":{"integrity":"sha512-jBj66tSQ9MK8V3BiqEoZRJ85jdAp5L5x2xPf0awfaJm+52ybzvH+Rus/YZAHIxcYqYTIj7HpZEzBKgSOmmbpow==","shasum":"711bb023db57f812f56a94dea62a16cc06ff7fe5","tarball":"https://registry.npmjs.org/orbit-db-identity-provider/-/orbit-db-identity-provider-0.2.0-rc3.tgz","fileCount":15,"unpackedSize":777299,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdbRzoCRA9TVsSAnZWagAABoYP/2sJq4wc+hMbbFEd1fjg\nKnB1sbWLfNiNlKjrosCHDyZWaz50bQGmDixRiILfTfGz794BzN/ADMHT3EzD\nreEpEhiI0GM7QzGMa/JpgPIqFAB+TG83iZNcP6lZtna1a+TK+n6TfEw6bBUC\nXJfARCn9+ukKPu7n3gliQuhzaWbtJmFfpZ6QBvJDO4OTotkv4ex/5JHUm9fR\nPZR1+k2ftiwVTHyRo7qQzIJEg7avocyWJz9diFXLkwp+EHB7oa9Fla4i3dqH\ngPUaWijZ6dzhPIeFWA3rUiXJn3cxs3p97seLLjmLw4jv2l0JNHGj2IFHs5Uw\nzf/QSJKtFKUQ7HNvsbENhZll39v//ozIvhRcF8d1vLN4sNS7N3m/uebaOAm2\nHpGtjRvFNCE+GAIJsa74LYYDoNM4fThlT/eNhRdI+nVwh6NeCHkclvcuWw9X\nc5aQ+cN/3X37Sbmd7smkuWfsRVswtpVSDujQxP9Ip8KKGK9DGsnf4FI3cvl0\ntLNrMz99+myD3S+X6THZ8os3FKK0U2TQTSwynlu+uFNs+gaDXsIAn/FJna0e\nSlXzpGwwds9aEKFSscbHGjuINYtAsXFTrpPSFmOWFc3lh0I7MS0Jn+rfXEm1\nm4Sx2odImq976xxPc87wEKqlxw6KI148dlCBWMtlkvEBCFHULUsIEbf8f+00\nUIam\r\n=sKbj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICcQ/b4fsv7Gr42o2j17IhvD2z7DYpdMk5USrdYb5MyKAiA6Y8mp2k/1u45Q6730FvfMRhge+YjWhqHPIR35H3SWBg=="}]},"maintainers":[{"email":"haad@haja.io","name":"haad"},{"email":"mark@haja.io","name":"hajamark"},{"email":"shams@haja.io","name":"shamb0t"}],"_npmUser":{"name":"hajamark","email":"mark@haja.io"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/orbit-db-identity-provider_0.2.0-rc3_1567431911353_0.5591228812151747"},"_hasShrinkwrap":false,"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.2.0":{"name":"orbit-db-identity-provider","version":"0.2.0","description":"Default identity provider for OrbitDB","main":"index.js","scripts":{"test":"npm run test:node && npm run test:browser","test:node":"TEST=all mocha","test:browser":"npm run build:tests && mocha-headless-chrome -f ./test/browser/index.html -a no-sandbox","lint":"standard","build":"npm run build:dist","build:dist":"webpack --config ./conf/webpack.config.js --display-modules --sort-modules-by size --mode=production","build:tests":"webpack --config ./conf/webpack.tests.config.js --mode development"},"repository":{"type":"git","url":"git+https://github.com/orbitdb/orbit-db-identity-provider.git"},"keywords":["orbitdb","orbit-db","identity"],"author":{"name":"shamb0t"},"contributors":[{"name":"shamb0t"},{"name":"haadcode"},{"name":"RichardLitt"},{"name":"latenssi"},{"name":"adam-palazzo"}],"license":"MIT","bugs":{"url":"https://github.com/orbitdb/orbit-db-identity-provider/issues"},"homepage":"https://github.com/orbitdb/orbit-db-identity-provider#readme","devDependencies":{"@babel/core":"^7.5.5","@babel/plugin-syntax-object-rest-spread":"^7.2.0","@babel/plugin-transform-modules-commonjs":"^7.5.0","@babel/plugin-transform-runtime":"^7.5.5","@babel/preset-env":"^7.5.5","@babel/runtime":"^7.5.5","fs-extra":"^7.0.1","json-loader":"^0.5.7","localstorage-level-migration":"~0.1.0","mocha":"^5.2.0","mocha-headless-chrome":"^2.0.3","orbit-db-storage-adapter":"^0.4.2","orbit-db-test-utils":"^0.7.2","rimraf":"^2.6.2","standard":"^13.0.2","webpack":"^4.29.1","webpack-cli":"^3.2.2"},"standard":{"env":["mocha"]},"dependencies":{"ethers":"^4.0.20","orbit-db-keystore":"~0.3.0"},"localMaintainers":["haad <haad@haja.io>","shamb0t <shams@haja.io>","hajamark <mark@haja.io>"],"gitHead":"ca429440934c59096aed533be0294af23b86addb","_id":"orbit-db-identity-provider@0.2.0","_nodeVersion":"10.16.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-U6/UpMRkuJFaJGgFuVLE78WPkognBeo9IAULLD9qfB8WMSE3te8S6Zntnj/DtQbJR2tX34rB8e2D4KXtKfaA2g==","shasum":"babbfc7a6250d3ab7cf02955cb48629b6f6f2c5d","tarball":"https://registry.npmjs.org/orbit-db-identity-provider/-/orbit-db-identity-provider-0.2.0.tgz","fileCount":13,"unpackedSize":792680,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdlhvuCRA9TVsSAnZWagAA50UQAJxDgtFBESaoyvFd3B81\nGU7kMdbI0mP6GIQ8lV7cFl5ddA/5gp0ftOIS6HC2Neamg2kDnqOmm5J7YpnJ\nA1UvNo+hx3r6UEYeQ4uBncrA2SXp22drf9Jhi09pFuSNabs+uSwejpKsDRUi\nZleqRxaFJuRnZKSnLPP9AbRuWQerURzmb+mlbfvWWFKT0ItTCSrzTtgRduY8\nbDg9ivI/rzdO3fH1+8ubHc7Lzr3YmBCxFKkGxM9LGav2WYjPEB14OywRpdi0\nuS+b7OQ9bNb84TNQvMDAetTNIqr1NlYMW1glXk9wlhiG1043rt9+4WwteSuU\nNfzI2nevB66R9vZGpl17Hp+30l3orJgrQVNkaSdtdIc0srO1D7bjCIeK+SX0\nfzhy1vn8mN+S+u21/V0EdO6X0lCbbxfZGQQ/pF5JaT0mwEMNfYtxsVGIzGiT\ndGxYUNUYFQwo2r820oHCK/RjilaoESosErOLau+eurjT6z/0VJmy1iHAvyMU\n+xPhaQiWw9/+UFbpFn8OvUY9ThpM2GLnuh2R9Fy5RgLgmJeoHNz9RedTvJhP\nigBdMx/EnmwZtZ4xW6me2bCW0qEQxbDTk73mgQiRcjKUxf5aqaeeoLQGuIAu\nlxth1f+6LgwQA/L6V8m7LpmvN8HzquLbBTg45+YvZ6eckeSc1nHeznjlYkL/\nObPV\r\n=5N8D\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDB4P7I2UndD6xGYR8Bqu9yIAlO4/Jw1nFrqXsHbBD5jAIhAPbADjQWQEmovgfm1+7fhDSFLckca42ORqEMVwbRlOzP"}]},"maintainers":[{"email":"haad@haja.io","name":"haad"},{"email":"mark@haja.io","name":"hajamark"},{"email":"shams@haja.io","name":"shamb0t"}],"_npmUser":{"name":"shamb0t","email":"shams@haja.io"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/orbit-db-identity-provider_0.2.0_1570118637384_0.7759094318348285"},"_hasShrinkwrap":false,"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.2.1":{"name":"orbit-db-identity-provider","version":"0.2.1","description":"Default identity provider for OrbitDB","main":"index.js","scripts":{"test":"npm run test:node && npm run test:browser","test:node":"TEST=all mocha","test:browser":"npm run build:tests && mocha-headless-chrome -f ./test/browser/index.html -a no-sandbox","lint":"standard","build":"npm run build:dist","build:dist":"webpack --config ./conf/webpack.config.js --display-modules --sort-modules-by size --mode=production","build:tests":"webpack --config ./conf/webpack.tests.config.js --mode development"},"repository":{"type":"git","url":"git+https://github.com/orbitdb/orbit-db-identity-provider.git"},"keywords":["orbitdb","orbit-db","identity"],"author":{"name":"shamb0t"},"contributors":[{"name":"shamb0t"},{"name":"haadcode"},{"name":"RichardLitt"},{"name":"latenssi"},{"name":"adam-palazzo"}],"license":"MIT","bugs":{"url":"https://github.com/orbitdb/orbit-db-identity-provider/issues"},"homepage":"https://github.com/orbitdb/orbit-db-identity-provider#readme","devDependencies":{"@babel/core":"^7.5.5","@babel/plugin-syntax-object-rest-spread":"^7.2.0","@babel/plugin-transform-modules-commonjs":"^7.5.0","@babel/plugin-transform-runtime":"^7.5.5","@babel/preset-env":"^7.5.5","@babel/runtime":"^7.5.5","fs-extra":"^7.0.1","json-loader":"^0.5.7","localstorage-level-migration":"~0.1.0","mocha":"^5.2.0","mocha-headless-chrome":"^2.0.3","orbit-db-storage-adapter":"^0.4.2","orbit-db-test-utils":"^0.7.2","rimraf":"^2.6.2","standard":"^13.0.2","webpack":"^4.29.1","webpack-cli":"^3.2.2"},"standard":{"env":["mocha"]},"dependencies":{"ethers":"^4.0.20","orbit-db-keystore":"~0.3.0"},"localMaintainers":["haad <haad@haja.io>","shamb0t <shams@haja.io>","hajamark <mark@haja.io>"],"gitHead":"5e6eb9e112506e083ff8ed9f4397ffdc4187b8f9","_id":"orbit-db-identity-provider@0.2.1","_nodeVersion":"10.16.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-IG8oNetdFBp1B2SYw8rLtZXkGEErfMGIZxps2i9AahM7qFvZDoaJ8r1ME6GQMEStFCQ14N4n6Tf+owTGBIPK2A==","shasum":"f5736c3580b24a477482031a874ce4b108fee3ff","tarball":"https://registry.npmjs.org/orbit-db-identity-provider/-/orbit-db-identity-provider-0.2.1.tgz","fileCount":13,"unpackedSize":853946,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdxD3JCRA9TVsSAnZWagAAZWMP/RqSy083tPIzQUlkDaK4\naJ4dmFen9AMm4gs4k1cchCeLPzNvBYbNFG8HG8CNM6ynvt55VPi1Ex1VU8lE\ntlsZPccwyjPtLKuuWGNR0Pwn6m6MNmxoZ3vRLO4JEet5qDFwdSjhUNnpgGel\nPCh2Oe98uzcw+bMYNGJgYwon3uBUUo9N2y1HuBqZKzz1fppQKsJwvQN69xim\n7lnEusEb8Ims5D11Z6xld+T0AjRa1FoeUqMvEhsv03t0Pc1KfOWzgfFR7ApX\ntYUo3UuSly7nxY5ucP+OdKgwa+GXJON/h3rBCGPuGj7kfaLE22jQbuwZqZ6p\np4XNofnc2qmstfYPMZyeRKO7nEefKR0If+DhOxsFkwkvlxjnOH/aysYPMm9t\n1AaozqJadptM30AwO1b2GAimZUgM08IA+EalBw6ZuNeRAfAuJfMUO+ybpaxj\nirI+3hZ/vVt4KyvmMNkjiyz39qyuCQXq6z6JyF1u5vxNH60z8pToL3oNXWoK\nJJSgAhzPeSLThVMj5Pr5GVT8chuBeM4gUP+8QBre0zeyZsmN5OrCsFA5wmUX\nJaNf2lsBUdh0orW0H75R9y8un3C9G1ogHIc+U6bAzCbBJCESDQ5Ssou3Oi5c\nMBHIM6ZfSOvDWtY8pJRfQH8c7XuS7mVxUrmA2KKBhgOK2rPEMpd15I7gQs2W\nU9oy\r\n=Wu/n\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBblo9pFeM0Pd1Tb1y4JUchsfi5KJ+ZCwy04OP3LmUepAiEA6mNjrH6j2pLRHo9rueKkmy4DuxLfaZXR/fIMtQMjiv8="}]},"maintainers":[{"email":"haad@haja.io","name":"haad"},{"email":"mark@haja.io","name":"hajamark"},{"email":"shams@haja.io","name":"shamb0t"}],"_npmUser":{"name":"shamb0t","email":"shams@haja.io"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/orbit-db-identity-provider_0.2.1_1573141960671_0.36451301319730645"},"_hasShrinkwrap":false,"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.3.0-rc1":{"name":"orbit-db-identity-provider","version":"0.3.0-rc1","description":"Default identity provider for OrbitDB","main":"index.js","scripts":{"test":"npm run test:node && npm run test:browser","test:node":"TEST=all mocha","test:browser":"npm run build:tests && mocha-headless-chrome -f ./test/browser/index.html -a no-sandbox","lint":"standard","build":"npm run build:dist","build:dist":"webpack --config ./conf/webpack.config.js --display-modules --sort-modules-by size --mode=production","build:tests":"webpack --config ./conf/webpack.tests.config.js --mode development"},"repository":{"type":"git","url":"git+https://github.com/orbitdb/orbit-db-identity-provider.git"},"keywords":["orbitdb","orbit-db","identity"],"author":{"name":"shamb0t"},"contributors":[{"name":"shamb0t"},{"name":"haadcode"},{"name":"RichardLitt"},{"name":"latenssi"},{"name":"adam-palazzo"}],"license":"MIT","bugs":{"url":"https://github.com/orbitdb/orbit-db-identity-provider/issues"},"homepage":"https://github.com/orbitdb/orbit-db-identity-provider#readme","devDependencies":{"@babel/core":"^7.5.5","@babel/plugin-syntax-object-rest-spread":"^7.2.0","@babel/plugin-transform-modules-commonjs":"^7.5.0","@babel/plugin-transform-runtime":"^7.5.5","@babel/preset-env":"^7.5.5","@babel/runtime":"^7.5.5","babel-loader":"^8.0.6","fs-extra":"^7.0.1","is-node":"^1.0.2","json-loader":"^0.5.7","localstorage-level-migration":"~0.1.0","mocha":"^5.2.0","mocha-headless-chrome":"^2.0.3","orbit-db-storage-adapter":"^0.4.2","rimraf":"^2.6.2","standard":"^13.0.2","webpack":"^4.29.1","webpack-cli":"^3.2.2"},"standard":{"env":["mocha"]},"dependencies":{"ethers":"^4.0.20","orbit-db-keystore":"~0.3.4"},"localMaintainers":["haad <haad@haja.io>","shamb0t <shams@haja.io>","hajamark <mark@haja.io>"],"readme":"# orbit-db-identity-provider\n\n[![Gitter](https://img.shields.io/gitter/room/nwjs/nw.js.svg)](https://gitter.im/orbitdb/Lobby) [![Matrix](https://img.shields.io/badge/matrix-%23orbitdb%3Apermaweb.io-blue.svg)](https://riot.permaweb.io/#/room/#orbitdb:permaweb.io) [![Discord](https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord)](https://discord.gg/cscuf5T)\n[![npm version](https://badge.fury.io/js/orbit-db-identity-provider.svg)](https://www.npmjs.com/package/orbit-db-identity-provider)\n\n> Default identity provider for OrbitDB\n\n`Identities` is a package to manage identities in [@OrbitDB](http://github.com/orbitdb/orbit-db)\n\n## Table of Contents\n\n  - [Install](#install)\n  - [Usage](#usage)\n    - [Creating an identity](#creating-an-identity)\n    - [Adding a custom identity signer and verifier](#adding-a-custom-identity-signer-and-verifier)\n    - [Properties](#properties)\n      - [id](#id)\n      - [publicKey](#publickey)\n      - [signatures](#signatures)\n  - [Contribute](#contribute)\n    - [Tests](#tests)\n    - [Build](#build)\n    - [Linting](#linting)\n  - [License](#license)\n\n## Install\n\nThis project uses [npm](https://npmjs.com/) and [nodejs](https://nodejs.org/)\n\n```sh\n$ npm i --save orbit-db-identity-provider\n```\n\n## Usage\n\nThe `Identity` object contains signatures proving possession of some external identifier and an OrbitDB public key. This is included to allow proof of ownership of an external identifier within OrbitDB.\n\n### Creating an identity\n```js\nconst Identities = require('orbit-db-identity-provider')\nconst options = { id: 'local-id'}\nconst identity = await Identities.createIdentity(options)\n\nconsole.log(identity.toJSON())\n// prints\n{\n  id: '045757bffcc7a4f4cf94c0cf214b3d3547a62195a09588df36b74aff837b2fdc14551360a323bf9de2ac8fb2eda9bd1bae5de53577a8db41ee2b46b4bf8cd7be33',\n  publicKey: '04b5c54ef8f2514a58338e64aa08aa6052c3cfef1225a10b51017f2ad63a92fb166e7a19cba44321c9402ab1b62c940cd5e65e81e4d584c1208dbd021f6e22c6f5',\n  signatures:  {\n    id: '3046022100aab534483f474bd3791eb9dcf1f61b6bdb4b07f70e8eca1ea7b530ac0ca13ca1022100e9d95eeeacc9813808400eb37f8aae6be7873df460d2a03e7a19132e34f0bd16',\n    publicKey: '30440220514b6fee38cbec96d9851905e575d6e209834c94be5e009a8261737d4ef23dfc0220794fa8dee564701d337b68fdbeef76bb81d777154c211d84ac345ec287a2a8e1'\n  },\n  type: 'orbitdb'\n}\n\n```\nIf `options.type` is not specified, Identities will default to creating an identity with type '`orbitdb'`, meaning the signing key will sign another OrbitDB public key. This public key can be an already-existing OrbitDB key allowing you to link several keys to a 'master' OrbitDB key to, for example, link keys across devices.\n\nTo use an existing keystore, you can pass it as an argument in the options as follows:\n```js\nconst identity = await Identities.createIdentity({ id: 'local-id', keystore: existingKeystore })\n```\n\n### Create identity using existing keys\n\nTo create an identity using existing keys, you need to install `localstorage-level-migration`\n\n```js\nconst Identities = require('orbit-db-identity-provider')\nconst migrate = require('localstorage-level-migration')\nconst options = { id: 'new-id', migrate: migrate('/path/to/keys') }\nconst identity = await Identities.createIdentity(options)\n\nconsole.log(identity.toJSON())\n// prints\n{\n  id: '<new-id>',\n  publicKey: '<compressed-original-key>',\n  signatures:  {\n    id: '<new-id-signed-by-public-key>',\n    publicKey: '<public-key-signed-by-id>'\n  },\n  type: 'orbitdb'\n}\n\n```\n\n### Adding a custom identity signer and verifier\n\nTo link an OrbitDB signing key with an external identity, you must provide a custom class which implements the `IdentityProvider` [interface](https://github.com/orbitdb/orbit-db-identity-provider/blob/master/src/identity-provider-interface.js).\n\n```js\nclass MyIdentityProvider extends IdentityProvider {\n  static get type () { return 'MyIdentityType' } // return type\n  async getId () { } // return identifier of external id (eg. a public key)\n  async signIdentity (data) { } //return a signature of data (signature of the OrbtiDB public key)\n  static async verifyIdentity (identity) { } //return true if identity.sigantures are valid\n}\n\nIdentities.addIdentityProvider(MyIdentityProvider)\n\n// to create an identity of type `MyIdentityType`\nconst identity = await Identities.createIdentity({ type: `MyIdentityType`})\n\n```\n\n\n### Properties\n\n#### id\n\nReturns the ID of the external identity.\n\n#### publicKey\n\nReturns the signing key used to sign OrbitDB entries.\n\n#### signatures\nReturns an object containing two signatures\n```js\n{ id: <id-signature>, publicKey: <pub-key+id-siganture> }\n```\n\nThe first signature, `id`, is `identity.id` signed by `identiy.publicKey`. This allows the owner of `id` to prove they own the private key associated with `publicKey`. The second signature `publicKey` is created by signing the concatenation `identity.signature.id + identity.publicKey` using `identity.id`. This links the two identifiers.\n\n## Contribute\n\nPlease, feel free to contribute! Take a look at [the issues](https://github.com/orbitdb/orbit-db-identity-provider/issues), and comment on an existing issue or create a new one if you have questions, bugs, or suggestions. For larger PRs, open an issue first if you could - drive-by PRs are also welcomed.\n\nPlease abide by the [Code of Conduct](CODE_OF_CONDUCT.md). For more on contributing to [@OrbitDB](https://github.com/orbitdb/), check out the docs in [orbitdb/welcome](https://github.com/orbitdb/welcome).\n\n### Tests\n\nRun tests with:\n\n```sh\n$ npm test\n```\n\n### Build\n\nThe build script will build the distribution file for browsers.\n\n```sh\n$ npm run build\n```\n\n### Linting\n\nPlease use [`standard`](https://standardjs.com). To check,\n\n\n```sh\n$ npm run lint\n```\n\n## License\n\n[MIT](LICENSE) © 2018 Haja Networks Oy\n","readmeFilename":"README.md","gitHead":"8d61ac9c90ed98f6b9ef7e39cefed03d3a601caa","_id":"orbit-db-identity-provider@0.3.0-rc1","_nodeVersion":"10.16.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-2Q01/qrsCcB+j5XPor8/XlsX9A6lYXt4jF5UFOgSbaxrP+OxwIJHAUAVxY+bvpNyJX2uEUQ/ZUSomWO02dRTWg==","shasum":"857d911ec37c02703dd9835674f59dddcfe07ca4","tarball":"https://registry.npmjs.org/orbit-db-identity-provider/-/orbit-db-identity-provider-0.3.0-rc1.tgz","fileCount":13,"unpackedSize":788500,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd55eYCRA9TVsSAnZWagAAPyIP/j2B2SGuZDsmxmMVuUoz\nUTzywGEqglx0qp5fvx5Jm3Q/SRvbW68bsEWAJP5ESNQCw5CPA+Itg4kAKtut\nGy8TGUmCBF7pdevXSS8/+i1fo0PkyXYNz8kwmZJHXWzujZ+0kjqAefjOkG1I\noGYkfClvH0Ud1QWhZ1i9qO+ZW0lzfXiJbpyDz4PdvKgDWF0ULG6p87PB/Ba8\nnNnUgz+aD9Xzl8UUlY+CiE/OYcvB6XQaB2eLfO0ABwYP0ReI3yVIuNh94QWI\nR6s7zhdcbkm1MOu9ElYhjhDDSy3SLWGU/h+wz7/42BgGFq7yxcb1w6aroIyr\nqwNBUe/6HcmLs/w3ipWyBM9mOsdVMv3FRMgXup9c3/WGs6UnT/ote1fgqTWy\ncYK8ujnH55jJJ1wNKOyYW7zD9T4jT4W8t8N3s/LtuSryrKnEInb3WqH9+XFQ\nojkn1oWJFwUkGRWXUyX+n3sSHdb0doSr0YVG+WKeg1r54xmjXIL16Z/ZG85W\n6hmYSDIK6JxGAG77lmKm9wWLtI9Xv1G4NHSJtqxBOO/tWFWNY93PM2DpS0El\nEGxCC/zSETuLupLWTflTtn79vqpYVJL5rqjoag6zO8USbKhLd5vyUCOMQBfv\neXOfyBzvXwsNQ7BvoZYlqiS9fYXPmX73EnLhKyPcYQOyMeB52RPHBC2V0vEg\nxpmK\r\n=kyZZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC3jdh2Q8W3tjHTZ6ce2I35mF4sbFz9BrpvsQLoF3FGsgIhAJGXLyp7DzXfdF8NRFxvgNj4R1qqihi+vwdaOAiav1NG"}]},"maintainers":[{"email":"haad@haja.io","name":"haad"},{"email":"mark@haja.io","name":"hajamark"},{"email":"shams@haja.io","name":"shamb0t"}],"_npmUser":{"name":"shamb0t","email":"shams@haja.io"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/orbit-db-identity-provider_0.3.0-rc1_1575458711786_0.2968867710316856"},"_hasShrinkwrap":false,"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.3.0":{"name":"orbit-db-identity-provider","version":"0.3.0","description":"Default identity provider for OrbitDB","main":"index.js","scripts":{"test":"npm run test:node && npm run test:browser","test:node":"TEST=all mocha","test:browser":"npm run build:tests && mocha-headless-chrome -f ./test/browser/index.html -a no-sandbox","lint":"standard","build":"npm run build:dist","build:dist":"webpack --config ./conf/webpack.config.js --display-modules --sort-modules-by size --mode=production","build:tests":"webpack --config ./conf/webpack.tests.config.js --mode development"},"repository":{"type":"git","url":"git+https://github.com/orbitdb/orbit-db-identity-provider.git"},"keywords":["orbitdb","orbit-db","identity"],"author":{"name":"shamb0t"},"contributors":[{"name":"shamb0t"},{"name":"haadcode"},{"name":"RichardLitt"},{"name":"latenssi"},{"name":"adam-palazzo"}],"license":"MIT","bugs":{"url":"https://github.com/orbitdb/orbit-db-identity-provider/issues"},"homepage":"https://github.com/orbitdb/orbit-db-identity-provider#readme","devDependencies":{"@babel/core":"^7.5.5","@babel/plugin-syntax-object-rest-spread":"^7.2.0","@babel/plugin-transform-modules-commonjs":"^7.5.0","@babel/plugin-transform-runtime":"^7.5.5","@babel/preset-env":"^7.5.5","@babel/runtime":"^7.5.5","babel-loader":"^8.0.6","fs-extra":"^7.0.1","is-node":"^1.0.2","json-loader":"^0.5.7","localstorage-level-migration":"~0.1.0","mocha":"^5.2.0","mocha-headless-chrome":"^2.0.3","rimraf":"^2.6.2","standard":"^13.0.2","webpack":"^4.29.1","webpack-cli":"^3.2.2"},"standard":{"env":["mocha"]},"dependencies":{"ethers":"^4.0.20","orbit-db-keystore":"~0.3.4"},"localMaintainers":["haad <haad@haja.io>","shamb0t <shams@haja.io>","hajamark <mark@haja.io>"],"gitHead":"87920cbca7c036bfb9db891b19b65a5d71dcdfff","_id":"orbit-db-identity-provider@0.3.0","_nodeVersion":"10.16.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-RQJTdtHQWRCOTiGIRMiMJ0xvx7W6bAIekEnQolTA8ex1/TLpXCkTl18z89fGFbmcqaoOuLPN7qbd8grX48kloA==","shasum":"a1f0cabc72e7c4cd09f3c2713cc4bba24097cdf2","tarball":"https://registry.npmjs.org/orbit-db-identity-provider/-/orbit-db-identity-provider-0.3.0.tgz","fileCount":13,"unpackedSize":788454,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd56lmCRA9TVsSAnZWagAADQ8P/3Vr5pYX4jGEn6uKeayu\nPjvGQfmYVuySdUrNXwTfndrmq09EucEuTZ0sw+fw1o2YMB8NKCAYo9eQlXAf\nUEB7HCIxVBZ37R7whwXNCA2jcW0zNcX3wiZCXWjDCdUbIqzsZxdxjtLzxtmZ\nisrRxMOxaS31mJi6Ywego9r82th24Ve4sdm9efc98s5ZLaMbdE1+oEW009iq\nqjSrFwmNgnYpfj+maiMUrKPGBMpRaRaVqAw5L3S1z00risyoS7M7a7f5Ev/0\nCQSy1CTmNRHy9QzU+5CVJxz3qfpmra8mqgYiHpuoULBWxplCq1XZlJlwDOqI\n2XoMXNKjVxG9vovWiDrbujyoD8bXEAKWChj2d6BFbJrQummhu3reNRVGU1Kj\ntwdgwSAop9h01PmOBHJHs7fuVX1QgJyxeUAwk0eNwc5sLyuLZb/+3fQLoYNQ\ncG15nc7JkgSAErMXq1oCGTqgx+OGK/YcNb+bV27sFmTLlL1bxbwER7NClFqc\nch2btQCmJRddjNqBAl0AzWwTcFKvtjGl+POR/55PxhxtFLfh9Ed5y7VNn2NS\nVbdQxdFR7vOjFl5DqVIBFxkpmxGNiPd+65LMwwHvu9U/uPmVWMYLPCEFi1bZ\nLiShp2YOSb2YGmcGVY2IQV8BpCjZaK5RdAj2NEX/tmX3s/nFeob+cjiWOFB7\ne5jv\r\n=ysjl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD2nJ8PR55LoxVfl1F8OuJQFDKunhMLINm5I3TlKvFrgQIgGguVZzIDQyqUjQGBkVkU+DCS5jXVWaa8T2ERh77moX4="}]},"maintainers":[{"email":"haad@haja.io","name":"haad"},{"email":"mark@haja.io","name":"hajamark"},{"email":"shams@haja.io","name":"shamb0t"}],"_npmUser":{"name":"shamb0t","email":"shams@haja.io"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/orbit-db-identity-provider_0.3.0_1575463269973_0.9525777150295416"},"_hasShrinkwrap":false,"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.3.1":{"name":"orbit-db-identity-provider","version":"0.3.1","description":"Default identity provider for OrbitDB","main":"index.js","scripts":{"test":"npm run test:node && npm run test:browser","test:node":"TEST=all mocha","test:browser":"npm run build:tests && mocha-headless-chrome -f ./test/browser/index.html -a no-sandbox","lint":"standard","build":"npm run build:dist","build:dist":"webpack --config ./conf/webpack.config.js --display-modules --sort-modules-by size --mode=production","build:tests":"webpack --config ./conf/webpack.tests.config.js --mode development"},"repository":{"type":"git","url":"git+https://github.com/orbitdb/orbit-db-identity-provider.git"},"keywords":["orbitdb","orbit-db","identity"],"author":{"name":"shamb0t"},"contributors":[{"name":"shamb0t"},{"name":"haadcode"},{"name":"RichardLitt"},{"name":"latenssi"},{"name":"adam-palazzo"}],"license":"MIT","bugs":{"url":"https://github.com/orbitdb/orbit-db-identity-provider/issues"},"homepage":"https://github.com/orbitdb/orbit-db-identity-provider#readme","devDependencies":{"@babel/core":"^7.5.5","@babel/plugin-syntax-object-rest-spread":"^7.2.0","@babel/plugin-transform-modules-commonjs":"^7.5.0","@babel/plugin-transform-runtime":"^7.5.5","@babel/preset-env":"^7.5.5","@babel/runtime":"^7.5.5","babel-loader":"^8.0.6","fs-extra":"^7.0.1","is-node":"^1.0.2","json-loader":"^0.5.7","localstorage-level-migration":"~0.1.0","mocha":"^5.2.0","mocha-headless-chrome":"^2.0.3","rimraf":"^2.6.2","standard":"^13.0.2","webpack":"^4.29.1","webpack-cli":"^3.2.2"},"standard":{"env":["mocha"]},"dependencies":{"ethers":"^5.0.8","orbit-db-keystore":"~0.3.5"},"localMaintainers":["haad <haad@haja.io>","shamb0t <shams@haja.io>","hajamark <mark@haja.io>"],"gitHead":"7acbfeb5b0eac38a88c13e82f563cf8a591d57db","_id":"orbit-db-identity-provider@0.3.1","_nodeVersion":"12.18.0","_npmVersion":"6.14.6","dist":{"integrity":"sha512-kR6uUCovNecTTPTDsCkm07VEEg1nozx5bz0/ZUO7Oo+0EhCACPO9DZ3g5Wy9bPBHyaaRYqcocQfqAvTdfwyWLQ==","shasum":"ed2eaccf14981fd105984644052bb28e32b2fa20","tarball":"https://registry.npmjs.org/orbit-db-identity-provider/-/orbit-db-identity-provider-0.3.1.tgz","fileCount":13,"unpackedSize":788453,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfKuSZCRA9TVsSAnZWagAAh/MP/ifsJYzrpkEGGrsDhCPT\nK2bl6jkJjJgLZ7FO9deY3Vf6jO/vsYd+THtlJIl7KkGCz+q/Uja8j80sjtIp\nL07qlLYKeppNU33lc+ItWdREE8J9F+wNR4baWW+mhUCKovjiVgaoIVuCINFD\n/CfZUOiIOH2ScLHhc8Iq6eqcaBpxEwGPWy+6bUltrpsj3tzVmNswuZ28Dnbv\nL0M8ldmWtGbmBpw63vp2MTqdtUiKUMpmbiZn0rE8U1CR6Xx/RcSoDn0TbFsX\nuASVLs6FTJaKnD0n3leVUc2elgmVqWJ0G5MtBnoBOJ5DL4qA2p/k34cHGpfD\nhILQQB1VPnC4B00+n79Hgi+tUNQG/9jcdffy5xiXSYfFMMhdpAKmazam9pSH\nrdvHRum9eFapSJlJJ4a9bOT07jGNr2tICJEcNNQXJmoS40pD2ktLCuDjQyQn\n0v8yK1JXn8aTVvGtOVxt7Lm9GHQI8g11EgDmP5aaoYRE2pebaBqUa2Flo4DG\nTKHnU3WEkICf2E/EzB8uAxB3sgvQDM4Zud/aON/GBjKz1zJcGY6IfmcSnHE5\nSRyYEUZxmJF51Wa+0DNxNuEodEPkHNxvzOmoIHbJz2XNik/CLM1WcqqApPXH\nxFKyP6wG8xdzEhLRcjgvshJ+PufidomYLm1y7SKvNemFK88SEQntT+97veDR\ncq16\r\n=nEOU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDAxSr9TMJoqngDBgAZjq3JW8q1YOK6HH3iVlwByMDEwAIgdHzPfclA/uIPWJCbA6rJEbjvwIo/4E/bgBe1QDN39aE="}]},"maintainers":[{"email":"haad@haja.io","name":"haad"},{"email":"mark@haja.io","name":"hajamark"},{"email":"shams@haja.io","name":"shamb0t"}],"_npmUser":{"name":"hajamark","email":"mark@mrh.io"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/orbit-db-identity-provider_0.3.1_1596646552605_0.056554454306179336"},"_hasShrinkwrap":false,"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.4.0":{"name":"orbit-db-identity-provider","version":"0.4.0","description":"Default identity provider for OrbitDB","main":"index.js","scripts":{"test":"npm run test:node && npm run test:browser","test:node":"TEST=all mocha","test:browser":"npm run build:tests && mocha-headless-chrome -f ./test/browser/index.html -a no-sandbox","lint":"standard","build":"npm run build:dist","build:dist":"webpack --config ./conf/webpack.config.js --mode=production","build:tests":"webpack --config ./conf/webpack.tests.config.js --mode development"},"repository":{"type":"git","url":"git+https://github.com/orbitdb/orbit-db-identity-provider.git"},"keywords":["orbitdb","orbit-db","identity"],"author":{"name":"shamb0t"},"contributors":[{"name":"shamb0t"},{"name":"haadcode"},{"name":"RichardLitt"},{"name":"latenssi"},{"name":"adam-palazzo"}],"license":"MIT","bugs":{"url":"https://github.com/orbitdb/orbit-db-identity-provider/issues"},"homepage":"https://github.com/orbitdb/orbit-db-identity-provider#readme","devDependencies":{"@babel/core":"^7.5.5","@babel/plugin-syntax-object-rest-spread":"^7.2.0","@babel/plugin-transform-modules-commonjs":"^7.5.0","@babel/plugin-transform-runtime":"^7.5.5","@babel/preset-env":"^7.5.5","@babel/runtime":"^7.5.5","babel-loader":"^8.0.6","fs-extra":"^10.0.0","is-node":"^1.0.2","json-loader":"^0.5.7","key-did-provider-ed25519":"^1.0.0","key-did-resolver":"^1.2.1","localstorage-level-migration":"~0.1.0","mocha":"^8.4.0","mocha-headless-chrome":"^3.1.0","process":"^0.11.10","rimraf":"^3.0.2","standard":"^16.0.3","webpack":"^5.38.0","webpack-cli":"^4.7.0"},"standard":{"env":["mocha"]},"dependencies":{"@ethersproject/wallet":"^5.0.10","assert":"^2.0.0","dids":"^2.1.0","orbit-db-keystore":"^1.0.0","path-browserify":"^1.0.1","stream-browserify":"^3.0.0"},"localMaintainers":["haad <haad@haja.io>","shamb0t <shams@haja.io>","hajamark <mark@haja.io>"],"gitHead":"b5c23ef1113b9f01fddc710d1a00ad4de231bfd6","_id":"orbit-db-identity-provider@0.4.0","_nodeVersion":"14.16.0","_npmVersion":"7.13.0","dist":{"integrity":"sha512-nPHWlMoAad2bZem6mLZ4Skv1LQeANzbhFersMcI5/8y2Iz+zK/waIp3t9mxKC4J+bjOnUJGr39bpr788qklyFA==","shasum":"2225742e96e28855788b17a9e3fbb392123d20e8","tarball":"https://registry.npmjs.org/orbit-db-identity-provider/-/orbit-db-identity-provider-0.4.0.tgz","fileCount":15,"unpackedSize":1011350,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgsTO/CRA9TVsSAnZWagAA7T0QAJ7wVPn34pd3ZDCrIJFd\nDxDiovtKsBKJADVUZEly3DsHZ4GA/YYGSA0T54PCcCneUCxht4c5tbetnzGr\nxduNqkXrWozpjxo/PSFY6TlPQk4emMzg3U1YyvDuI0F48cyqTSMl10bOl7xJ\n15odXuTPE6WGRhNQoCL0yeNU0cv49THXEXiUgl9RHNJbJd+cAMwIaVHnvMj1\nMXRErMcchbS6ZdXEPOxEE9n+ttG3b8QrR7PFYf7BDGQ9HJhxpGbdXPBMjnl7\nn/UjKVUlJwuBb6NDHyAk4O3yYnU393HtEMF0uUVcg41JiPQZDFqhLxD1f9v0\ngu0nsuMVFVABus5/RNVSrdxFF80nOU+0x9V1CTFhhcIHZk0wwrQbycRCuld3\ntf/kUCyAG2PaSZaKWedxysuxl1nXWRK3ZSdrN9z147nId7eXoFHtWpbFUxZj\n5Cr1m2RAY+k0SS4hO+ZUMC5hMnVP/udG5k0yfZATkeQi+4NSFPOA6SALwzc2\na01/mLHSZEJTLGCp/sSrXO1l2aW73HVz8j3ufJIHKlSbYENaN6teSOxPKDX1\nF59WLm4N+qlO/MdBYJCWiLqYI2UdOgcBOScexWx6JvNaCqr3Ba0/p2T1bvER\n2yEwM/q4bDxk5+7Dg0N6cZ7saAYzi+2xzcTMFt6tVCnAig4L7jFmaPtQ+TJP\nzZLa\r\n=y2nO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEaeRFphvY0qxiNJVUfS+r0taLVXn7vanPMOCAyUUXXTAiEA2tHrAiSKny3gvOkLSHrCX1+asKP5se6x+kEkaLBL4fk="}]},"_npmUser":{"name":"hajamark","email":"mark@mrh.io"},"directories":{},"maintainers":[{"name":"haad","email":"haad@haja.io"},{"name":"shamb0t","email":"shams.methnani@gmail.com"},{"name":"hajamark","email":"mark@mrh.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/orbit-db-identity-provider_0.4.0_1622225854603_0.11086192693551489"},"_hasShrinkwrap":false,"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.4.1-699a573.0":{"name":"orbit-db-identity-provider","version":"0.4.1-699a573.0","description":"Default identity provider for OrbitDB","main":"src/identities.js","type":"module","exports":{".":"./src/identities.js","./did":"./src/identity-providers/did.js","./ethereum":"./src/identity-providers/ethereum.js","./interface":"./src/identity-providers/interface.js","./orbitdb":"./src/identity-providers/orbitdb.js"},"scripts":{"test":"npm run test:node && npm run test:browser","test:node":"TEST=all mocha","test:browser":"npm run build:tests && mocha-headless-chrome -f ./test/browser/index.html -a no-sandbox","lint":"standard","lint:fix":"standard --fix","build":"npm run build:dist","build:dist":"webpack --config ./conf/webpack.config.js --mode=production","build:tests":"webpack --config ./conf/webpack.tests.config.js --mode production"},"repository":{"type":"git","url":"git+https://github.com/orbitdb/orbit-db-identity-provider.git"},"keywords":["orbitdb","orbit-db","identity"],"author":{"name":"shamb0t"},"contributors":[{"name":"shamb0t"},{"name":"haadcode"},{"name":"RichardLitt"},{"name":"latenssi"},{"name":"adam-palazzo"}],"license":"MIT","bugs":{"url":"https://github.com/orbitdb/orbit-db-identity-provider/issues"},"homepage":"https://github.com/orbitdb/orbit-db-identity-provider#readme","devDependencies":{"@babel/core":"^7.5.5","@babel/preset-env":"^7.20.2","@babel/runtime":"^7.5.5","babel-loader":"^8.0.6","fs-extra":"^10.0.0","is-node":"^1.0.2","json-loader":"^0.5.7","key-did-provider-ed25519":"^2.0.1","key-did-resolver":"^2.3.0","level-js":"^6.1.0","levelup":"^5.1.1","localstorage-level-migration":"^0.0.2","mocha":"^8.4.0","mocha-headless-chrome":"^3.1.0","process":"^0.11.10","rimraf":"^3.0.2","standard":"^17.0.0","webpack":"^5.38.0","webpack-cli":"^4.7.0"},"standard":{"env":["mocha"]},"dependencies":{"@ethersproject/wallet":"^5.0.10","assert":"^2.0.0","dids":"^3.4.0","lru":"^3.1.0","orbit-db-keystore":"^1.0.1-ae215fb.0","path-browserify":"^1.0.1","stream-browserify":"^3.0.0","uint8arrays":"^4.0.2"},"localMaintainers":["haad <haad@haja.io>","shamb0t <shams@haja.io>","hajamark <mark@haja.io>"],"readme":"# orbit-db-identity-provider\n\n[![Gitter](https://img.shields.io/gitter/room/nwjs/nw.js.svg)](https://gitter.im/orbitdb/Lobby) [![Matrix](https://img.shields.io/badge/matrix-%23orbitdb%3Apermaweb.io-blue.svg)](https://riot.permaweb.io/#/room/#orbitdb:permaweb.io) \n[![npm version](https://badge.fury.io/js/orbit-db-identity-provider.svg)](https://www.npmjs.com/package/orbit-db-identity-provider)\n\n> Default identity provider for OrbitDB\n\n`Identities` is a package to manage identities in [@OrbitDB](http://github.com/orbitdb/orbit-db)\n\n## Table of Contents\n\n  - [Install](#install)\n  - [Usage](#usage)\n    - [Creating an identity](#creating-an-identity)\n    - [Adding a custom identity signer and verifier](#adding-a-custom-identity-signer-and-verifier)\n    - [Properties](#properties)\n      - [id](#id)\n      - [publicKey](#publickey)\n      - [signatures](#signatures)\n  - [Contribute](#contribute)\n    - [Tests](#tests)\n    - [Build](#build)\n    - [Linting](#linting)\n  - [License](#license)\n\n## Install\n\nThis project uses [npm](https://npmjs.com/) and [nodejs](https://nodejs.org/)\n\n```sh\n$ npm i --save orbit-db-identity-provider\n```\n\n## Usage\n\nThe `Identity` object contains signatures proving possession of some external identifier and an OrbitDB public key. This is included to allow proof of ownership of an external identifier within OrbitDB.\n\n### Creating an identity\n```js\nimport Identities from 'orbit-db-identity-provider'\nconst options = { id: 'local-id'}\nconst identity = await Identities.createIdentity(options)\n\nconsole.log(identity.toJSON())\n// prints\n{\n  id: '045757bffcc7a4f4cf94c0cf214b3d3547a62195a09588df36b74aff837b2fdc14551360a323bf9de2ac8fb2eda9bd1bae5de53577a8db41ee2b46b4bf8cd7be33',\n  publicKey: '04b5c54ef8f2514a58338e64aa08aa6052c3cfef1225a10b51017f2ad63a92fb166e7a19cba44321c9402ab1b62c940cd5e65e81e4d584c1208dbd021f6e22c6f5',\n  signatures:  {\n    id: '3046022100aab534483f474bd3791eb9dcf1f61b6bdb4b07f70e8eca1ea7b530ac0ca13ca1022100e9d95eeeacc9813808400eb37f8aae6be7873df460d2a03e7a19132e34f0bd16',\n    publicKey: '30440220514b6fee38cbec96d9851905e575d6e209834c94be5e009a8261737d4ef23dfc0220794fa8dee564701d337b68fdbeef76bb81d777154c211d84ac345ec287a2a8e1'\n  },\n  type: 'orbitdb'\n}\n\n```\nIf `options.type` is not specified, Identities will default to creating an identity with type '`orbitdb'`, meaning the signing key will sign another OrbitDB public key. This public key can be an already-existing OrbitDB key allowing you to link several keys to a 'master' OrbitDB key to, for example, link keys across devices.\n\nTo use an existing keystore, you can pass it as an argument in the options as follows:\n```js\nconst identity = await Identities.createIdentity({ id: 'local-id', keystore: existingKeystore })\n```\n\n#### Creating an identity with a DID\nDecentralized Identifiers (DID) is a common way to represent a digital identity. Below is an example using the `did:key` method (specifically [key-did-provider-ed25519](https://github.com/ceramicnetwork/key-did-provider-ed25519)).\n```js\nimport { Ed25519Provider } from 'key-did-provider-ed25519'\nimport KeyResolver from 'key-did-resolver'\nimport Identities from 'orbit-db-identity-provider'\nIdentities.DIDIdentityProvider.setDIDResolver(KeyResolver.getResolver())\n\nconst seed = // 32 bytes of entropy (Uint8Array)\nconst didProvider = new Ed25519Provider(seed)\nconst identity = await Identities.createIdentity({ type: 'DID', didProvider })\n```\n\n#### Creating an identity with an Ethereum wallet\nIdentities can also be created using Ethereum wallets. The example below uses [ethers](https://docs.ethers.io/) to open a users wallet and sign the identity.\n```js\nimport Identities from \"orbit-db-identity-provider\";\nimport { ethers } from \"ethers\";\n\nconst provider = new ethers.providers.Web3Provider(/* window.ethereum */);\nconst wallet = provider.getSigner();\nconst identity = await Identities.createIdentity({\n  type: \"ethereum\",\n  wallet,\n});\n```\n_Note: If you don't supply a `wallet`, a random one will be created for you._\n\n### Create identity using existing keys\n\nTo create an identity using existing keys, you need to install `localstorage-level-migration`\n\n```js\nimport Identities from 'orbit-db-identity-provider'\nimport migrate from 'localstorage-level-migration'\nconst options = { id: 'new-id', migrate: migrate('/path/to/keys') }\nconst identity = await Identities.createIdentity(options)\n\nconsole.log(identity.toJSON())\n// prints\n{\n  id: '<new-id>',\n  publicKey: '<compressed-original-key>',\n  signatures:  {\n    id: '<new-id-signed-by-public-key>',\n    publicKey: '<public-key-signed-by-id>'\n  },\n  type: 'orbitdb'\n}\n\n```\n\n### Adding a custom identity signer and verifier\n\nTo link an OrbitDB signing key with an external identity, you must provide a custom class which implements the `IdentityProvider` [interface](https://github.com/orbitdb/orbit-db-identity-provider/blob/master/src/identity-provider-interface.js).\n\n```js\nclass MyIdentityProvider extends IdentityProvider {\n  static get type () { return 'MyIdentityType' } // return type\n  async getId () { } // return identifier of external id (eg. a public key)\n  async signIdentity (data) { } //return a signature of data (signature of the OrbtiDB public key)\n  static async verifyIdentity (identity) { } //return true if identity.sigantures are valid\n}\n\nIdentities.addIdentityProvider(MyIdentityProvider)\n\n// to create an identity of type `MyIdentityType`\nconst identity = await Identities.createIdentity({ type: `MyIdentityType`})\n\n```\n\n### Properties\n\n#### id\n\nReturns the ID of the external identity.\n\n#### publicKey\n\nReturns the signing key used to sign OrbitDB entries.\n\n#### signatures\nReturns an object containing two signatures\n```js\n{ id: <id-signature>, publicKey: <pub-key+id-siganture> }\n```\n\nThe first signature, `id`, is `identity.id` signed by `identiy.publicKey`. This allows the owner of `id` to prove they own the private key associated with `publicKey`. The second signature `publicKey` is created by signing the concatenation `identity.signature.id + identity.publicKey` using `identity.id`. This links the two identifiers.\n\n## Contribute\n\nPlease, feel free to contribute! Take a look at [the issues](https://github.com/orbitdb/orbit-db-identity-provider/issues), and comment on an existing issue or create a new one if you have questions, bugs, or suggestions. For larger PRs, open an issue first if you could - drive-by PRs are also welcomed.\n\nPlease abide by the [Code of Conduct](CODE_OF_CONDUCT.md). For more on contributing to [@OrbitDB](https://github.com/orbitdb/), check out the docs in [orbitdb/welcome](https://github.com/orbitdb/welcome).\n\n### Tests\n\nRun tests with:\n\n```sh\n$ npm test\n```\n\n### Build\n\nThe build script will build the distribution file for browsers.\n\n```sh\n$ npm run build\n```\n\n### Linting\n\nPlease use [`standard`](https://standardjs.com). To check,\n\n\n```sh\n$ npm run lint\n```\n\n## License\n\n[MIT](LICENSE) © 2018 Haja Networks Oy\n","readmeFilename":"README.md","gitHead":"699a573bca771f8af8e6310896087904765de4d3","_id":"orbit-db-identity-provider@0.4.1-699a573.0","_nodeVersion":"18.12.1","_npmVersion":"8.19.2","dist":{"integrity":"sha512-zfYgJWIRsxJyUO+NRn6dTslGENWmotJN/JkzT/kSO7lPW9CqAOv+H71Eeg1frJ5/3qnhUn1nCEi2vyw5oEb0bA==","shasum":"7592b855ba89bb08ccccf11af9d01858eb34fd64","tarball":"https://registry.npmjs.org/orbit-db-identity-provider/-/orbit-db-identity-provider-0.4.1-699a573.0.tgz","fileCount":16,"unpackedSize":1013170,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEPNjL3vruzrespxf59sREcM6w8+H3JktIycPol4GCfTAiEA0HJTum/xPwVLKWBfh+o3rsvpIwnzhcHkiAGwopjaeds="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjvEbqACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoaPw/8DbJMdinU1DZN+mQa85AYUeAC2ppiSnxxQ1F1zK/P9S8NU3/e\r\norujidaMSHWfZHmVOvQLvSIeWreXY6xy1+YGfoISFGQrrGoh31BvO4u1f+yc\r\nDzIqu7NnWP3Hdx787LGe3mX0It33ZwdfJ3viN6aYYqnN9G7ivuHGG1fYSUSg\r\nr7Avemr6dHQ11Ctf3bA+BJ4Z1fkTXEeOWaJZvQSZck0pp1UIeg1d4u21Xjyl\r\nV7RrQxMZ9q4oO5GNixyzziKfgVCTH1A6j+CNcIB4233Tpn8/navRD+MBb+bL\r\nNnwo57g+VyNHehzeyrBiKryYfRihtClFHump9u9nUrffCNXin0raXpsjiSIh\r\n0WTLBGoXWQm4DHppEqWOVWyLvzfbgM0L0xouRQ9LwUXSbz4RgGhNzZx4m/yg\r\nvqxedyBSm1fF0mXIdmDKXjbdry2aDGenX0FZ1OoRPbxcr1mmsqcFBjlPEfSF\r\np+hv1cZUd2lE96+wj1XVVfby8CIXtGX5jbBE3VcdFwiRFITypmJ0tLL0FpFW\r\nRSZIjoQQ9BX4sL+TVOaWY1Lsdu9HXCPYHBQ4muNq5obLAmz0LAT4p4lruZ1f\r\nMTJjgfolzdE6nLPM354XcoyLlutieKRRv76VgGyj3nS9wGF2uCbnRyWfKlvM\r\nWSHaJ8YGFpthrQwjxTp+2Qc/p+c47iHDbus=\r\n=iG13\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"haad","email":"haad@haja.io"},"directories":{},"maintainers":[{"name":"haad","email":"haad@haja.io"},{"name":"shamb0t","email":"shams.methnani@gmail.com"},{"name":"hajamark","email":"mark@mrh.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/orbit-db-identity-provider_0.4.1-699a573.0_1673283305776_0.6670797675684512"},"_hasShrinkwrap":false,"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.4.1-1f5a165.0":{"name":"orbit-db-identity-provider","version":"0.4.1-1f5a165.0","description":"Default identity provider for OrbitDB","main":"src/identities.js","type":"module","exports":{".":"./src/identities.js","./did":"./src/identity-providers/did.js","./ethereum":"./src/identity-providers/ethereum.js","./interface":"./src/identity-providers/interface.js","./orbitdb":"./src/identity-providers/orbitdb.js"},"scripts":{"test":"npm run test:node && npm run test:browser","test:node":"TEST=all mocha","test:browser":"npm run build:tests && mocha-headless-chrome -f ./test/browser/index.html -a no-sandbox","lint":"standard","lint:fix":"standard --fix","build":"npm run build:dist","build:dist":"webpack --config ./conf/webpack.config.js","build:tests":"webpack --config ./conf/webpack.tests.config.js"},"repository":{"type":"git","url":"git+https://github.com/orbitdb/orbit-db-identity-provider.git"},"keywords":["orbitdb","orbit-db","identity"],"author":{"name":"shamb0t"},"contributors":[{"name":"shamb0t"},{"name":"haadcode"},{"name":"RichardLitt"},{"name":"latenssi"},{"name":"adam-palazzo"}],"license":"MIT","bugs":{"url":"https://github.com/orbitdb/orbit-db-identity-provider/issues"},"homepage":"https://github.com/orbitdb/orbit-db-identity-provider#readme","devDependencies":{"@babel/core":"^7.20.12","@babel/preset-env":"^7.20.2","@babel/runtime":"^7.20.7","babel-loader":"^9.1.2","fs-extra":"^11.1.0","is-node":"^1.0.2","json-loader":"^0.5.7","key-did-provider-ed25519":"^2.0.1","key-did-resolver":"^2.3.0","level-js":"^6.1.0","levelup":"^5.1.1","localstorage-level-migration":"next","mocha":"^10.2.0","mocha-headless-chrome":"^4.0.0","process":"^0.11.10","rimraf":"^3.0.2","standard":"^17.0.0","webpack":"^5.75.0","webpack-cli":"^5.0.1"},"standard":{"env":["mocha"]},"dependencies":{"@ethersproject/wallet":"^5.7.0","assert":"^2.0.0","dids":"^3.4.0","lru":"^3.1.0","orbit-db-keystore":"next","path-browserify":"^1.0.1","stream-browserify":"^3.0.0","uint8arrays":"^4.0.3"},"localMaintainers":["haad <haad@haja.io>","shamb0t <shams@haja.io>","hajamark <mark@haja.io>"],"readme":"# orbit-db-identity-provider\n\n[![Gitter](https://img.shields.io/gitter/room/nwjs/nw.js.svg)](https://gitter.im/orbitdb/Lobby) [![Matrix](https://img.shields.io/badge/matrix-%23orbitdb%3Apermaweb.io-blue.svg)](https://riot.permaweb.io/#/room/#orbitdb:permaweb.io) \n[![npm version](https://badge.fury.io/js/orbit-db-identity-provider.svg)](https://www.npmjs.com/package/orbit-db-identity-provider)\n\n> Default identity provider for OrbitDB\n\n`Identities` is a package to manage identities in [@OrbitDB](http://github.com/orbitdb/orbit-db)\n\n## Table of Contents\n\n  - [Install](#install)\n  - [Usage](#usage)\n    - [Creating an identity](#creating-an-identity)\n    - [Adding a custom identity signer and verifier](#adding-a-custom-identity-signer-and-verifier)\n    - [Properties](#properties)\n      - [id](#id)\n      - [publicKey](#publickey)\n      - [signatures](#signatures)\n  - [Contribute](#contribute)\n    - [Tests](#tests)\n    - [Build](#build)\n    - [Linting](#linting)\n  - [License](#license)\n\n## Install\n\nThis project uses [npm](https://npmjs.com/) and [nodejs](https://nodejs.org/)\n\n```sh\n$ npm i --save orbit-db-identity-provider\n```\n\n## Usage\n\nThe `Identity` object contains signatures proving possession of some external identifier and an OrbitDB public key. This is included to allow proof of ownership of an external identifier within OrbitDB.\n\n### Creating an identity\n```js\nimport Identities from 'orbit-db-identity-provider'\nconst options = { id: 'local-id'}\nconst identity = await Identities.createIdentity(options)\n\nconsole.log(identity.toJSON())\n// prints\n{\n  id: '045757bffcc7a4f4cf94c0cf214b3d3547a62195a09588df36b74aff837b2fdc14551360a323bf9de2ac8fb2eda9bd1bae5de53577a8db41ee2b46b4bf8cd7be33',\n  publicKey: '04b5c54ef8f2514a58338e64aa08aa6052c3cfef1225a10b51017f2ad63a92fb166e7a19cba44321c9402ab1b62c940cd5e65e81e4d584c1208dbd021f6e22c6f5',\n  signatures:  {\n    id: '3046022100aab534483f474bd3791eb9dcf1f61b6bdb4b07f70e8eca1ea7b530ac0ca13ca1022100e9d95eeeacc9813808400eb37f8aae6be7873df460d2a03e7a19132e34f0bd16',\n    publicKey: '30440220514b6fee38cbec96d9851905e575d6e209834c94be5e009a8261737d4ef23dfc0220794fa8dee564701d337b68fdbeef76bb81d777154c211d84ac345ec287a2a8e1'\n  },\n  type: 'orbitdb'\n}\n\n```\nIf `options.type` is not specified, Identities will default to creating an identity with type '`orbitdb'`, meaning the signing key will sign another OrbitDB public key. This public key can be an already-existing OrbitDB key allowing you to link several keys to a 'master' OrbitDB key to, for example, link keys across devices.\n\nTo use an existing keystore, you can pass it as an argument in the options as follows:\n```js\nconst identity = await Identities.createIdentity({ id: 'local-id', keystore: existingKeystore })\n```\n\n#### Creating an identity with a DID\nDecentralized Identifiers (DID) is a common way to represent a digital identity. Below is an example using the `did:key` method (specifically [key-did-provider-ed25519](https://github.com/ceramicnetwork/key-did-provider-ed25519)).\n```js\nimport { Ed25519Provider } from 'key-did-provider-ed25519'\nimport KeyResolver from 'key-did-resolver'\nimport Identities from 'orbit-db-identity-provider'\nIdentities.DIDIdentityProvider.setDIDResolver(KeyResolver.getResolver())\n\nconst seed = // 32 bytes of entropy (Uint8Array)\nconst didProvider = new Ed25519Provider(seed)\nconst identity = await Identities.createIdentity({ type: 'DID', didProvider })\n```\n\n#### Creating an identity with an Ethereum wallet\nIdentities can also be created using Ethereum wallets. The example below uses [ethers](https://docs.ethers.io/) to open a users wallet and sign the identity.\n```js\nimport Identities from \"orbit-db-identity-provider\";\nimport { ethers } from \"ethers\";\n\nconst provider = new ethers.providers.Web3Provider(/* window.ethereum */);\nconst wallet = provider.getSigner();\nconst identity = await Identities.createIdentity({\n  type: \"ethereum\",\n  wallet,\n});\n```\n_Note: If you don't supply a `wallet`, a random one will be created for you._\n\n### Create identity using existing keys\n\nTo create an identity using existing keys, you need to install `localstorage-level-migration`\n\n```js\nimport Identities from 'orbit-db-identity-provider'\nimport migrate from 'localstorage-level-migration'\nconst options = { id: 'new-id', migrate: migrate('/path/to/keys') }\nconst identity = await Identities.createIdentity(options)\n\nconsole.log(identity.toJSON())\n// prints\n{\n  id: '<new-id>',\n  publicKey: '<compressed-original-key>',\n  signatures:  {\n    id: '<new-id-signed-by-public-key>',\n    publicKey: '<public-key-signed-by-id>'\n  },\n  type: 'orbitdb'\n}\n\n```\n\n### Adding a custom identity signer and verifier\n\nTo link an OrbitDB signing key with an external identity, you must provide a custom class which implements the `IdentityProvider` [interface](https://github.com/orbitdb/orbit-db-identity-provider/blob/master/src/identity-provider-interface.js).\n\n```js\nclass MyIdentityProvider extends IdentityProvider {\n  static get type () { return 'MyIdentityType' } // return type\n  async getId () { } // return identifier of external id (eg. a public key)\n  async signIdentity (data) { } //return a signature of data (signature of the OrbtiDB public key)\n  static async verifyIdentity (identity) { } //return true if identity.sigantures are valid\n}\n\nIdentities.addIdentityProvider(MyIdentityProvider)\n\n// to create an identity of type `MyIdentityType`\nconst identity = await Identities.createIdentity({ type: `MyIdentityType`})\n\n```\n\n### Properties\n\n#### id\n\nReturns the ID of the external identity.\n\n#### publicKey\n\nReturns the signing key used to sign OrbitDB entries.\n\n#### signatures\nReturns an object containing two signatures\n```js\n{ id: <id-signature>, publicKey: <pub-key+id-siganture> }\n```\n\nThe first signature, `id`, is `identity.id` signed by `identiy.publicKey`. This allows the owner of `id` to prove they own the private key associated with `publicKey`. The second signature `publicKey` is created by signing the concatenation `identity.signature.id + identity.publicKey` using `identity.id`. This links the two identifiers.\n\n## Contribute\n\nPlease, feel free to contribute! Take a look at [the issues](https://github.com/orbitdb/orbit-db-identity-provider/issues), and comment on an existing issue or create a new one if you have questions, bugs, or suggestions. For larger PRs, open an issue first if you could - drive-by PRs are also welcomed.\n\nPlease abide by the [Code of Conduct](CODE_OF_CONDUCT.md). For more on contributing to [@OrbitDB](https://github.com/orbitdb/), check out the docs in [orbitdb/welcome](https://github.com/orbitdb/welcome).\n\n### Tests\n\nRun tests with:\n\n```sh\n$ npm test\n```\n\n### Build\n\nThe build script will build the distribution file for browsers.\n\n```sh\n$ npm run build\n```\n\n### Linting\n\nPlease use [`standard`](https://standardjs.com). To check,\n\n\n```sh\n$ npm run lint\n```\n\n## License\n\n[MIT](LICENSE) © 2018 Haja Networks Oy\n","readmeFilename":"README.md","gitHead":"1f5a1657719a5f2191d6652a9c67a59693bdc010","_id":"orbit-db-identity-provider@0.4.1-1f5a165.0","_nodeVersion":"18.12.1","_npmVersion":"8.19.2","dist":{"integrity":"sha512-8JnFS5Oz07Yg7sj+RsyuCBe6Rw2uKWZvPAajVBRJG0GOAdrb5DXle9xxs1SVL+hnu9ku007RgRmy4xtCpKo59Q==","shasum":"d4c291848fc42e71e2a588d59f80af26482a5f09","tarball":"https://registry.npmjs.org/orbit-db-identity-provider/-/orbit-db-identity-provider-0.4.1-1f5a165.0.tgz","fileCount":16,"unpackedSize":985732,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDerZk0a+B5Bls1qyyXjWcgsNnpbzhP/2wkhlVcUkvS7AIhAJypS2eHJCo/va8U6Z9/HMY2t/X1L2Lbe9Uzao8yO/qw"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjv+pEACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqxfQ//dMwuUgpadyuk6bK+zcnu/7AYu7507dMmbh4UXF2b0Mpvr+xF\r\n5c9CBIVH9/r+orWczOBnvELf9vdRLvQQLO4s9C1nxHw3QmJHpuakfvN8Cjob\r\nPhT58XmIM/j6mJUXPkMTYriy1qF4Bw+iinYo8GVcJVQWKV1a527p/AfGr8W0\r\n/fosdO6Lj2Q3d+IdNSpZWEVjEPNCo8faYeyWOH1RM3qqJZrUp1qnE/QtIi1F\r\nxYMRD4hKJkA+Y9w4GtY6Jrc25N37NU69IEjfvTbr+QLmbIjGnoNsbjNLQo0E\r\nwtfAkHlrenpfc7SXAO5NyEkME7PBfn+e2Kcbn3Bc3F4GuGYI2DOut7//s6+u\r\n8LEhheGy9Uy66WFo7mWRMgDnNi757KWZBZOsrcI1yUEjaMkiAu52BllbwipE\r\n4zDKioMYJ6oR6miOKZ5dTNjkF8qrQOTS2mEXfArpqYuuWt2NOUcYVnV/7N2W\r\n8ZHjsE4qtT/RNMoQC1Q5pl2I1LCQP5LQ7/enIcAfKnGS+v8kBm85/i4SJA1w\r\nL7TM67z6eXvfkdmusNaJ3E0fKVpVe6QWen79hLQh92u+D1N2AIiNshMxUVDM\r\n1ItY+6vbC4RrhAP6TM6xe4nJrJV4/jrKDpf8TVVElhBjWy7I2OUQnFV3EMXQ\r\nncsMP8RRYihe5lUlAlG2xkj3AUdW4eqW8x8=\r\n=/Y1O\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"haad","email":"haad@headbanggames.com"},"directories":{},"maintainers":[{"name":"haad","email":"haad@headbanggames.com"},{"name":"shamb0t","email":"shams.methnani@gmail.com"},{"name":"hajamark","email":"mark@mrh.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/orbit-db-identity-provider_0.4.1-1f5a165.0_1673521731961_0.47702798269051905"},"_hasShrinkwrap":false,"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.4.1-f3dbe64.0":{"name":"orbit-db-identity-provider","version":"0.4.1-f3dbe64.0","description":"Default identity provider for OrbitDB","main":"src/identities.js","type":"module","exports":{".":"./src/identities.js","./did":"./src/identity-providers/did.js","./ethereum":"./src/identity-providers/ethereum.js","./interface":"./src/identity-providers/interface.js","./orbitdb":"./src/identity-providers/orbitdb.js"},"scripts":{"test":"npm run test:node && npm run test:browser","test:node":"TEST=all mocha","test:browser":"npm run build:tests && mocha-headless-chrome -f ./test/browser/index.html -a no-sandbox","lint":"standard","lint:fix":"standard --fix","build":"npm run build:dist","build:dist":"webpack --config ./conf/webpack.config.js","build:tests":"webpack --config ./conf/webpack.tests.config.js"},"repository":{"type":"git","url":"git+https://github.com/orbitdb/orbit-db-identity-provider.git"},"keywords":["orbitdb","orbit-db","identity"],"author":{"name":"shamb0t"},"contributors":[{"name":"shamb0t"},{"name":"haadcode"},{"name":"RichardLitt"},{"name":"latenssi"},{"name":"adam-palazzo"}],"license":"MIT","bugs":{"url":"https://github.com/orbitdb/orbit-db-identity-provider/issues"},"homepage":"https://github.com/orbitdb/orbit-db-identity-provider#readme","devDependencies":{"@babel/core":"^7.20.12","@babel/preset-env":"^7.20.2","@babel/runtime":"^7.20.7","babel-loader":"^9.1.2","fs-extra":"^11.1.0","is-node":"^1.0.2","json-loader":"^0.5.7","key-did-provider-ed25519":"^2.0.1","key-did-resolver":"^2.3.0","level-js":"^6.1.0","levelup":"^5.1.1","localstorage-level-migration":"next","mocha":"^10.2.0","mocha-headless-chrome":"^4.0.0","process":"^0.11.10","rimraf":"^3.0.2","standard":"^17.0.0","webpack":"^5.75.0","webpack-cli":"^5.0.1"},"standard":{"env":["mocha"]},"dependencies":{"@ethersproject/wallet":"^5.7.0","assert":"^2.0.0","dids":"^3.4.0","lru":"^3.1.0","orbit-db-keystore":"next","path-browserify":"^1.0.1","stream-browserify":"^3.0.0","uint8arrays":"^4.0.3"},"localMaintainers":["haad <haad@haja.io>","shamb0t <shams@haja.io>","hajamark <mark@haja.io>"],"readme":"# orbit-db-identity-provider\n\n[![Gitter](https://img.shields.io/gitter/room/nwjs/nw.js.svg)](https://gitter.im/orbitdb/Lobby) [![Matrix](https://img.shields.io/badge/matrix-%23orbitdb%3Apermaweb.io-blue.svg)](https://riot.permaweb.io/#/room/#orbitdb:permaweb.io) \n[![npm version](https://badge.fury.io/js/orbit-db-identity-provider.svg)](https://www.npmjs.com/package/orbit-db-identity-provider)\n\n> Default identity provider for OrbitDB\n\n`Identities` is a package to manage identities in [@OrbitDB](http://github.com/orbitdb/orbit-db)\n\n## Table of Contents\n\n  - [Install](#install)\n  - [Usage](#usage)\n    - [Creating an identity](#creating-an-identity)\n    - [Adding a custom identity signer and verifier](#adding-a-custom-identity-signer-and-verifier)\n    - [Properties](#properties)\n      - [id](#id)\n      - [publicKey](#publickey)\n      - [signatures](#signatures)\n  - [Contribute](#contribute)\n    - [Tests](#tests)\n    - [Build](#build)\n    - [Linting](#linting)\n  - [License](#license)\n\n## Install\n\nThis project uses [npm](https://npmjs.com/) and [nodejs](https://nodejs.org/)\n\n```sh\n$ npm i --save orbit-db-identity-provider\n```\n\n## Usage\n\nThe `Identity` object contains signatures proving possession of some external identifier and an OrbitDB public key. This is included to allow proof of ownership of an external identifier within OrbitDB.\n\n### Creating an identity\n```js\nimport Identities from 'orbit-db-identity-provider'\nconst options = { id: 'local-id'}\nconst identity = await Identities.createIdentity(options)\n\nconsole.log(identity.toJSON())\n// prints\n{\n  id: '045757bffcc7a4f4cf94c0cf214b3d3547a62195a09588df36b74aff837b2fdc14551360a323bf9de2ac8fb2eda9bd1bae5de53577a8db41ee2b46b4bf8cd7be33',\n  publicKey: '04b5c54ef8f2514a58338e64aa08aa6052c3cfef1225a10b51017f2ad63a92fb166e7a19cba44321c9402ab1b62c940cd5e65e81e4d584c1208dbd021f6e22c6f5',\n  signatures:  {\n    id: '3046022100aab534483f474bd3791eb9dcf1f61b6bdb4b07f70e8eca1ea7b530ac0ca13ca1022100e9d95eeeacc9813808400eb37f8aae6be7873df460d2a03e7a19132e34f0bd16',\n    publicKey: '30440220514b6fee38cbec96d9851905e575d6e209834c94be5e009a8261737d4ef23dfc0220794fa8dee564701d337b68fdbeef76bb81d777154c211d84ac345ec287a2a8e1'\n  },\n  type: 'orbitdb'\n}\n\n```\nIf `options.type` is not specified, Identities will default to creating an identity with type '`orbitdb'`, meaning the signing key will sign another OrbitDB public key. This public key can be an already-existing OrbitDB key allowing you to link several keys to a 'master' OrbitDB key to, for example, link keys across devices.\n\nTo use an existing keystore, you can pass it as an argument in the options as follows:\n```js\nconst identity = await Identities.createIdentity({ id: 'local-id', keystore: existingKeystore })\n```\n\n#### Creating an identity with a DID\nDecentralized Identifiers (DID) is a common way to represent a digital identity. Below is an example using the `did:key` method (specifically [key-did-provider-ed25519](https://github.com/ceramicnetwork/key-did-provider-ed25519)).\n```js\nimport { Ed25519Provider } from 'key-did-provider-ed25519'\nimport KeyResolver from 'key-did-resolver'\nimport Identities from 'orbit-db-identity-provider'\nIdentities.DIDIdentityProvider.setDIDResolver(KeyResolver.getResolver())\n\nconst seed = // 32 bytes of entropy (Uint8Array)\nconst didProvider = new Ed25519Provider(seed)\nconst identity = await Identities.createIdentity({ type: 'DID', didProvider })\n```\n\n#### Creating an identity with an Ethereum wallet\nIdentities can also be created using Ethereum wallets. The example below uses [ethers](https://docs.ethers.io/) to open a users wallet and sign the identity.\n```js\nimport Identities from \"orbit-db-identity-provider\";\nimport { ethers } from \"ethers\";\n\nconst provider = new ethers.providers.Web3Provider(/* window.ethereum */);\nconst wallet = provider.getSigner();\nconst identity = await Identities.createIdentity({\n  type: \"ethereum\",\n  wallet,\n});\n```\n_Note: If you don't supply a `wallet`, a random one will be created for you._\n\n### Create identity using existing keys\n\nTo create an identity using existing keys, you need to install `localstorage-level-migration`\n\n```js\nimport Identities from 'orbit-db-identity-provider'\nimport migrate from 'localstorage-level-migration'\nconst options = { id: 'new-id', migrate: migrate('/path/to/keys') }\nconst identity = await Identities.createIdentity(options)\n\nconsole.log(identity.toJSON())\n// prints\n{\n  id: '<new-id>',\n  publicKey: '<compressed-original-key>',\n  signatures:  {\n    id: '<new-id-signed-by-public-key>',\n    publicKey: '<public-key-signed-by-id>'\n  },\n  type: 'orbitdb'\n}\n\n```\n\n### Adding a custom identity signer and verifier\n\nTo link an OrbitDB signing key with an external identity, you must provide a custom class which implements the `IdentityProvider` [interface](https://github.com/orbitdb/orbit-db-identity-provider/blob/master/src/identity-provider-interface.js).\n\n```js\nclass MyIdentityProvider extends IdentityProvider {\n  static get type () { return 'MyIdentityType' } // return type\n  async getId () { } // return identifier of external id (eg. a public key)\n  async signIdentity (data) { } //return a signature of data (signature of the OrbtiDB public key)\n  static async verifyIdentity (identity) { } //return true if identity.sigantures are valid\n}\n\nIdentities.addIdentityProvider(MyIdentityProvider)\n\n// to create an identity of type `MyIdentityType`\nconst identity = await Identities.createIdentity({ type: `MyIdentityType`})\n\n```\n\n### Properties\n\n#### id\n\nReturns the ID of the external identity.\n\n#### publicKey\n\nReturns the signing key used to sign OrbitDB entries.\n\n#### signatures\nReturns an object containing two signatures\n```js\n{ id: <id-signature>, publicKey: <pub-key+id-siganture> }\n```\n\nThe first signature, `id`, is `identity.id` signed by `identiy.publicKey`. This allows the owner of `id` to prove they own the private key associated with `publicKey`. The second signature `publicKey` is created by signing the concatenation `identity.signature.id + identity.publicKey` using `identity.id`. This links the two identifiers.\n\n## Contribute\n\nPlease, feel free to contribute! Take a look at [the issues](https://github.com/orbitdb/orbit-db-identity-provider/issues), and comment on an existing issue or create a new one if you have questions, bugs, or suggestions. For larger PRs, open an issue first if you could - drive-by PRs are also welcomed.\n\nPlease abide by the [Code of Conduct](CODE_OF_CONDUCT.md). For more on contributing to [@OrbitDB](https://github.com/orbitdb/), check out the docs in [orbitdb/welcome](https://github.com/orbitdb/welcome).\n\n### Tests\n\nRun tests with:\n\n```sh\n$ npm test\n```\n\n### Build\n\nThe build script will build the distribution file for browsers.\n\n```sh\n$ npm run build\n```\n\n### Linting\n\nPlease use [`standard`](https://standardjs.com). To check,\n\n\n```sh\n$ npm run lint\n```\n\n## License\n\n[MIT](LICENSE) © 2018 Haja Networks Oy\n","readmeFilename":"README.md","gitHead":"f3dbe6430ee1f841c4c18eb187abe841ac335a40","_id":"orbit-db-identity-provider@0.4.1-f3dbe64.0","_nodeVersion":"18.13.0","_npmVersion":"8.19.3","dist":{"integrity":"sha512-/aI1CzKj2CMBZWgrudKfF4GPBGWifJw3LRNhI6evxBgOXJhhQGSfx+kEvJjxFOROVqEd3ivYq2kDMQ+dNRw9yg==","shasum":"125c8a51db0b8b46e0cb10d9697e4866790aead3","tarball":"https://registry.npmjs.org/orbit-db-identity-provider/-/orbit-db-identity-provider-0.4.1-f3dbe64.0.tgz","fileCount":16,"unpackedSize":998764,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHgdjzjgqIpy1/kY0JmeZCM544Y02/jQibPLY6zn+UmRAiEA8ooVasVuJ0dC4ifYe7GUaMT0ZWd5LLptsukNj8K6M0Y="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjxke1ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrvJA//SmwaJuK3yYr4f6U1ukjCCHoK+MpI/47lS4e7CgCyI3IXrkBK\r\n5IppjKSbS5GlD7UOIuMTx3ZydnoGC2rVE6Y2jzSHYUl7iS4XoHpEUvK7HAF1\r\nKDxr0NEZ4oRnJkSFveyQiagFUFDmjHXMJM3UBntKAuCsIMthopc5cl3ldedU\r\nCkT5wzpRIFbnLbjLPhYi4rj+wcHSEvMTC52LMvQBYxh8CssnNnDh7G/GRCYR\r\nErdjDchgUsEMj6FK4zbmT3ZVm9IgIHecTNZE7nkXWX0LEPDM6z53/bY36jVq\r\nhHMmdt4WqynLks4pYF53r/PqKp5A79I3/HqU+AqCTNp+4YmPFAgTek114VOQ\r\nOoQ3mFa8n2vB1Qtu7hBBQfS9tXoIM+S4YshEGxFkd9FJ210R5z3DAvk6/NJv\r\n32no4zC/r++Gq9NiH5mpIxRqoEztvB0pv1vPZmn6M2RiaUM6ypvUVS9RqaA2\r\n/ikvquhWtY7QnIva9gWX+5wflnoDe8/aAkkjQK2QZ12awNc2+fXdep0YUunV\r\nfQKcTifhRuSndbEwmJvP6eNuDrEOIzJrrI7d7Oc8s2YXZ4zOg0uBa9thQwTJ\r\nSHhSHu/B/W/VZXb3JSo2TKqOivXvJFtD1+PYOzhAKmMm0nyjCMIq62p1evMH\r\n6TU7JFz4uElGWdRCNm8ZKS40sPcX/BJbgKA=\r\n=nyj9\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"haad","email":"haad@headbanggames.com"},"directories":{},"maintainers":[{"name":"haad","email":"haad@headbanggames.com"},{"name":"shamb0t","email":"shams.methnani@gmail.com"},{"name":"hajamark","email":"mark@mrh.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/orbit-db-identity-provider_0.4.1-f3dbe64.0_1673938869575_0.01241253993946101"},"_hasShrinkwrap":false,"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.5.1-3f895b7.0":{"name":"orbit-db-identity-provider","version":"0.5.1-3f895b7.0","description":"Default identity provider for OrbitDB","main":"src/identities.js","type":"module","exports":{".":"./src/identities.js","./did":"./src/identity-providers/did.js","./ethereum":"./src/identity-providers/ethereum.js","./interface":"./src/identity-providers/interface.js","./orbitdb":"./src/identity-providers/orbitdb.js"},"scripts":{"test":"npm run test:node && npm run test:browser","test:node":"TEST=all mocha","test:browser":"npm run build:tests && mocha-headless-chrome -f ./test/browser/index.html -a no-sandbox","lint":"standard","lint:fix":"standard --fix","build":"npm run build:dist","build:dist":"webpack --config ./conf/webpack.config.js","build:tests":"webpack --config ./conf/webpack.tests.config.js"},"repository":{"type":"git","url":"git+https://github.com/orbitdb/orbit-db-identity-provider.git"},"keywords":["orbitdb","orbit-db","identity"],"author":{"name":"shamb0t"},"contributors":[{"name":"shamb0t"},{"name":"haadcode"},{"name":"RichardLitt"},{"name":"latenssi"},{"name":"adam-palazzo"}],"license":"MIT","bugs":{"url":"https://github.com/orbitdb/orbit-db-identity-provider/issues"},"homepage":"https://github.com/orbitdb/orbit-db-identity-provider#readme","devDependencies":{"@babel/core":"^7.20.12","@babel/preset-env":"^7.20.2","@babel/runtime":"^7.20.7","babel-loader":"^9.1.2","fs-extra":"^11.1.0","is-node":"^1.0.2","json-loader":"^0.5.7","key-did-provider-ed25519":"^2.0.1","key-did-resolver":"^2.3.0","level-js":"^6.1.0","levelup":"^5.1.1","localstorage-level-migration":"^0.2.0","mocha":"^10.2.0","mocha-headless-chrome":"^4.0.0","process":"^0.11.10","rimraf":"^3.0.2","standard":"^17.0.0","webpack":"^5.75.0","webpack-cli":"^5.0.1"},"standard":{"env":["mocha"]},"dependencies":{"@ethersproject/wallet":"^5.7.0","assert":"^2.0.0","dids":"^3.4.0","lru":"^3.1.0","orbit-db-keystore":"^2.0.0","path-browserify":"^1.0.1","stream-browserify":"^3.0.0","uint8arrays":"^4.0.3"},"localMaintainers":["haad <haad@haja.io>","shamb0t <shams@haja.io>","hajamark <mark@haja.io>"],"readme":"# orbit-db-identity-provider\n\n[![Gitter](https://img.shields.io/gitter/room/nwjs/nw.js.svg)](https://gitter.im/orbitdb/Lobby) [![Matrix](https://img.shields.io/badge/matrix-%23orbitdb%3Apermaweb.io-blue.svg)](https://riot.permaweb.io/#/room/#orbitdb:permaweb.io) \n[![npm version](https://badge.fury.io/js/orbit-db-identity-provider.svg)](https://www.npmjs.com/package/orbit-db-identity-provider)\n\n> Default identity provider for OrbitDB\n\n`Identities` is a package to manage identities in [@OrbitDB](http://github.com/orbitdb/orbit-db)\n\n## Table of Contents\n\n  - [Install](#install)\n  - [Usage](#usage)\n    - [Creating an identity](#creating-an-identity)\n    - [Adding a custom identity signer and verifier](#adding-a-custom-identity-signer-and-verifier)\n    - [Properties](#properties)\n      - [id](#id)\n      - [publicKey](#publickey)\n      - [signatures](#signatures)\n  - [Contribute](#contribute)\n    - [Tests](#tests)\n    - [Build](#build)\n    - [Linting](#linting)\n  - [License](#license)\n\n## Install\n\nThis project uses [npm](https://npmjs.com/) and [nodejs](https://nodejs.org/)\n\n```sh\n$ npm i --save orbit-db-identity-provider\n```\n\n## Usage\n\nThe `Identity` object contains signatures proving possession of some external identifier and an OrbitDB public key. This is included to allow proof of ownership of an external identifier within OrbitDB.\n\n### Creating an identity\n```js\nimport Identities from 'orbit-db-identity-provider'\nconst options = { id: 'local-id'}\nconst identity = await Identities.createIdentity(options)\n\nconsole.log(identity.toJSON())\n// prints\n{\n  id: '045757bffcc7a4f4cf94c0cf214b3d3547a62195a09588df36b74aff837b2fdc14551360a323bf9de2ac8fb2eda9bd1bae5de53577a8db41ee2b46b4bf8cd7be33',\n  publicKey: '04b5c54ef8f2514a58338e64aa08aa6052c3cfef1225a10b51017f2ad63a92fb166e7a19cba44321c9402ab1b62c940cd5e65e81e4d584c1208dbd021f6e22c6f5',\n  signatures:  {\n    id: '3046022100aab534483f474bd3791eb9dcf1f61b6bdb4b07f70e8eca1ea7b530ac0ca13ca1022100e9d95eeeacc9813808400eb37f8aae6be7873df460d2a03e7a19132e34f0bd16',\n    publicKey: '30440220514b6fee38cbec96d9851905e575d6e209834c94be5e009a8261737d4ef23dfc0220794fa8dee564701d337b68fdbeef76bb81d777154c211d84ac345ec287a2a8e1'\n  },\n  type: 'orbitdb'\n}\n\n```\nIf `options.type` is not specified, Identities will default to creating an identity with type '`orbitdb'`, meaning the signing key will sign another OrbitDB public key. This public key can be an already-existing OrbitDB key allowing you to link several keys to a 'master' OrbitDB key to, for example, link keys across devices.\n\nTo use an existing keystore, you can pass it as an argument in the options as follows:\n```js\nconst identity = await Identities.createIdentity({ id: 'local-id', keystore: existingKeystore })\n```\n\n#### Creating an identity with a DID\nDecentralized Identifiers (DID) is a common way to represent a digital identity. Below is an example using the `did:key` method (specifically [key-did-provider-ed25519](https://github.com/ceramicnetwork/key-did-provider-ed25519)).\n```js\nimport { Ed25519Provider } from 'key-did-provider-ed25519'\nimport KeyResolver from 'key-did-resolver'\nimport Identities from 'orbit-db-identity-provider'\nIdentities.DIDIdentityProvider.setDIDResolver(KeyResolver.getResolver())\n\nconst seed = // 32 bytes of entropy (Uint8Array)\nconst didProvider = new Ed25519Provider(seed)\nconst identity = await Identities.createIdentity({ type: 'DID', didProvider })\n```\n\n#### Creating an identity with an Ethereum wallet\nIdentities can also be created using Ethereum wallets. The example below uses [ethers](https://docs.ethers.io/) to open a users wallet and sign the identity.\n```js\nimport Identities from \"orbit-db-identity-provider\";\nimport { ethers } from \"ethers\";\n\nconst provider = new ethers.providers.Web3Provider(/* window.ethereum */);\nconst wallet = provider.getSigner();\nconst identity = await Identities.createIdentity({\n  type: \"ethereum\",\n  wallet,\n});\n```\n_Note: If you don't supply a `wallet`, a random one will be created for you._\n\n### Create identity using existing keys\n\nTo create an identity using existing keys, you need to install `localstorage-level-migration`\n\n```js\nimport Identities from 'orbit-db-identity-provider'\nimport migrate from 'localstorage-level-migration'\nconst options = { id: 'new-id', migrate: migrate('/path/to/keys') }\nconst identity = await Identities.createIdentity(options)\n\nconsole.log(identity.toJSON())\n// prints\n{\n  id: '<new-id>',\n  publicKey: '<compressed-original-key>',\n  signatures:  {\n    id: '<new-id-signed-by-public-key>',\n    publicKey: '<public-key-signed-by-id>'\n  },\n  type: 'orbitdb'\n}\n\n```\n\n### Adding a custom identity signer and verifier\n\nTo link an OrbitDB signing key with an external identity, you must provide a custom class which implements the `IdentityProvider` [interface](https://github.com/orbitdb/orbit-db-identity-provider/blob/master/src/identity-provider-interface.js).\n\n```js\nclass MyIdentityProvider extends IdentityProvider {\n  static get type () { return 'MyIdentityType' } // return type\n  async getId () { } // return identifier of external id (eg. a public key)\n  async signIdentity (data) { } //return a signature of data (signature of the OrbtiDB public key)\n  static async verifyIdentity (identity) { } //return true if identity.sigantures are valid\n}\n\nIdentities.addIdentityProvider(MyIdentityProvider)\n\n// to create an identity of type `MyIdentityType`\nconst identity = await Identities.createIdentity({ type: `MyIdentityType`})\n\n```\n\n### Properties\n\n#### id\n\nReturns the ID of the external identity.\n\n#### publicKey\n\nReturns the signing key used to sign OrbitDB entries.\n\n#### signatures\nReturns an object containing two signatures\n```js\n{ id: <id-signature>, publicKey: <pub-key+id-siganture> }\n```\n\nThe first signature, `id`, is `identity.id` signed by `identiy.publicKey`. This allows the owner of `id` to prove they own the private key associated with `publicKey`. The second signature `publicKey` is created by signing the concatenation `identity.signature.id + identity.publicKey` using `identity.id`. This links the two identifiers.\n\n## Contribute\n\nPlease, feel free to contribute! Take a look at [the issues](https://github.com/orbitdb/orbit-db-identity-provider/issues), and comment on an existing issue or create a new one if you have questions, bugs, or suggestions. For larger PRs, open an issue first if you could - drive-by PRs are also welcomed.\n\nPlease abide by the [Code of Conduct](CODE_OF_CONDUCT.md). For more on contributing to [@OrbitDB](https://github.com/orbitdb/), check out the docs in [orbitdb/welcome](https://github.com/orbitdb/welcome).\n\n### Tests\n\nRun tests with:\n\n```sh\n$ npm test\n```\n\n### Build\n\nThe build script will build the distribution file for browsers.\n\n```sh\n$ npm run build\n```\n\n### Linting\n\nPlease use [`standard`](https://standardjs.com). To check,\n\n\n```sh\n$ npm run lint\n```\n\n## License\n\n[MIT](LICENSE) © 2018 Haja Networks Oy\n","readmeFilename":"README.md","gitHead":"3f895b7d1b6c74a89170589857e22c6bae5a9deb","_id":"orbit-db-identity-provider@0.5.1-3f895b7.0","_nodeVersion":"18.13.0","_npmVersion":"8.19.3","dist":{"integrity":"sha512-zmATX7gqRTxnlhYZN1NgHAsNeA4MOer4VWgPcCHccoxoyN8YrzosopFj6NoduQmuA5RJBqEGxf3vj3KYYjLGdA==","shasum":"8dfc63bec481029ce4aa11169138e7ee88396c3e","tarball":"https://registry.npmjs.org/orbit-db-identity-provider/-/orbit-db-identity-provider-0.5.1-3f895b7.0.tgz","fileCount":17,"unpackedSize":999287,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDgf500W7jxmoBPY8ljxevrmyqYkLDMCr0JyCW40qVzXQIgJGAjUxZ37KRaLSE+VMqksgR5VcwwujQU9j+38p/SV/k="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjyC5PACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp6hw//Uu4t06IWEWYCwLeZCa1BwBqbNKch9rSw4hYYTdmOF2xyDEv8\r\nY+UOfsUA+TW76ad8gsp2iJRVZ1x+S06nrYSQAG6IxZfN0LqN8e/WhIv5yK84\r\n5VVZHI38BAtCS1XfhwylqrxdalIlyNScZ9wo3c+zqRODPGn/J5dsHtZ7g+xL\r\ncqiS70XJ4Gk3nyjEd+dQigjRqYBwQU7XcqLVpsZvIpcCn53+PnkQs8aheiEg\r\novJ/8DV+rWVezYrXYU7uA7MPlatR5rRWF2JcVj+4e2zoW8eGa0rA4W/a/cdt\r\nzxe03HIpDyHCvJOFLucXfMkAozPP4yQgh4NiX0pERmy8rGjYD1EgRqj5ntkK\r\nPgXslKFgTM+qE4UHDOUPmV8f+F9krdihwxdRsgc7b+QY/odpNveiJoAmPCP9\r\nFgQ3X9w1k5AaoUhVBKGQ+9kyizH1pYfNxb3Zs4uTHA6GtspCr63sHr5DNDa2\r\nQuz8Ma4UhOfR5SauR5NI+hBbDKpNvTqj6vAzBUiX2bEPIQkJe5pe+L/KYS/c\r\ncvsQeY9PeFfu/Bvm4b/bArmb2/uzqJLN3bb4gF2dZVsGc4QO2MqFjbz8R5oo\r\nadN1gKaAqjXyhGMKEL4aVKuLEL8cPDMpIygyTUjsbX9sw71npnEPxpKjodbg\r\nJTGmEeh40JD19kO/1aepqIeU9r94CNwZwC4=\r\n=Hjg+\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"haad","email":"haad@headbanggames.com"},"directories":{},"maintainers":[{"name":"haad","email":"haad@headbanggames.com"},{"name":"shamb0t","email":"shams.methnani@gmail.com"},{"name":"hajamark","email":"mark@mrh.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/orbit-db-identity-provider_0.5.1-3f895b7.0_1674063438843_0.6564214133302457"},"_hasShrinkwrap":false,"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.5.0":{"name":"orbit-db-identity-provider","version":"0.5.0","description":"Default identity provider for OrbitDB","main":"src/identities.js","type":"module","exports":{".":"./src/identities.js","./did":"./src/identity-providers/did.js","./ethereum":"./src/identity-providers/ethereum.js","./interface":"./src/identity-providers/interface.js","./orbitdb":"./src/identity-providers/orbitdb.js"},"scripts":{"test":"npm run test:node && npm run test:browser","test:node":"TEST=all mocha","test:browser":"npm run build:tests && mocha-headless-chrome -f ./test/browser/index.html -a no-sandbox","lint":"standard","lint:fix":"standard --fix","build":"npm run build:dist","build:dist":"webpack --config ./conf/webpack.config.js","build:tests":"webpack --config ./conf/webpack.tests.config.js"},"repository":{"type":"git","url":"git+https://github.com/orbitdb/orbit-db-identity-provider.git"},"keywords":["orbitdb","orbit-db","identity"],"author":{"name":"shamb0t"},"contributors":[{"name":"shamb0t"},{"name":"haadcode"},{"name":"RichardLitt"},{"name":"latenssi"},{"name":"adam-palazzo"}],"license":"MIT","bugs":{"url":"https://github.com/orbitdb/orbit-db-identity-provider/issues"},"homepage":"https://github.com/orbitdb/orbit-db-identity-provider#readme","devDependencies":{"@babel/core":"^7.20.12","@babel/preset-env":"^7.20.2","@babel/runtime":"^7.20.7","babel-loader":"^9.1.2","fs-extra":"^11.1.0","is-node":"^1.0.2","json-loader":"^0.5.7","key-did-provider-ed25519":"^2.0.1","key-did-resolver":"^2.3.0","level-js":"^6.1.0","levelup":"^5.1.1","localstorage-level-migration":"^0.2.0","mocha":"^10.2.0","mocha-headless-chrome":"^4.0.0","process":"^0.11.10","rimraf":"^3.0.2","standard":"^17.0.0","webpack":"^5.75.0","webpack-cli":"^5.0.1"},"standard":{"env":["mocha"]},"dependencies":{"@ethersproject/wallet":"^5.7.0","assert":"^2.0.0","dids":"^3.4.0","lru":"^3.1.0","orbit-db-keystore":"^2.0.0","path-browserify":"^1.0.1","stream-browserify":"^3.0.0","uint8arrays":"^4.0.3"},"localMaintainers":["haad <haad@haja.io>","shamb0t <shams@haja.io>","hajamark <mark@haja.io>"],"gitHead":"3f895b7d1b6c74a89170589857e22c6bae5a9deb","_id":"orbit-db-identity-provider@0.5.0","_nodeVersion":"18.13.0","_npmVersion":"8.19.3","dist":{"integrity":"sha512-lgw3RMdVRBFApy6C7PyPlnD4dVVauIyBldT+vXdB4StN+iwCspms+RKELdDGK9VRkNaHoW6lEJ7W+yE3XCfRSQ==","shasum":"842509f6d3438ffaf45f13e04dcbbec4b85dc371","tarball":"https://registry.npmjs.org/orbit-db-identity-provider/-/orbit-db-identity-provider-0.5.0.tgz","fileCount":17,"unpackedSize":999277,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC0LK5ZRUFnjlGgDGv2I7jTWzljhb+333qD4QeI3vUuzAIhAPdYuwC2a9/kAOvEQsc+Cl0k+wlK2VFe4/bkxcB5s0yJ"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjyC/SACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr0gxAAlNO9O+lKg9de6B3kH+X50JoyOF2dhbDiKjb4eLDSm1eEsszL\r\nhHXL08WLUqB4Oe+nmkQ4t9HuXOEEAGYF8zwczn3fYLiViXE164t7x4aCT/nE\r\nGxi2A71aJ7LSicHPP98nnKag0FgdUeWGQYJcZKm6jP9M+Ip8dPzpKZxgVMyN\r\nyLx4jglMcWC2/HZ+RlyT4EHkfv6TqdJyII1fwJSuGn3AK3vUZ1IqFZq8FONN\r\nhcBuDp5ZsqmvkgFiSbKnaURuzwgO9B+cOTMEzCOnXRqAIKZb7eC0W3x3UhVF\r\nzJm0hxEJD7SNw6EX4jZXeXAUpuRYB26/J6/XUIOmHXTZCZXw8lbp9xFrIUaX\r\nyyNZHhiEvHXa3IH63iInJ0H5WIxlxrBAXXzV1/w/3sUn32pof/5HzmrwL7gx\r\nr232iMK0BOPnZnlhJXXiFoD/zi48jOFr8eX+yFan9Pf8K8L+3QNsWYNduCnX\r\nP7GTdqZHfZJay47rrvpb9j6nSlUGqZnm0hh6Uyogp0hUFyxFDKHUucPhJmoh\r\nE00Php16COTJwb5iD3loouIqUOIX6daFpcMPcKi28oMug5woOljBM04EbDGF\r\nKSx6EsPG5rIWgQNmbDu1nPBUTq9DPLcBhTNGpRQtAQAuZdEr1echnwo0CmGZ\r\nwNvT8R/JYpMu8og2cRCtouEBWPPeDZISVEA=\r\n=D0Lk\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"haad","email":"haad@headbanggames.com"},"directories":{},"maintainers":[{"name":"haad","email":"haad@headbanggames.com"},{"name":"shamb0t","email":"shams.methnani@gmail.com"},{"name":"hajamark","email":"mark@mrh.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/orbit-db-identity-provider_0.5.0_1674063826170_0.08800076216269459"},"_hasShrinkwrap":false,"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."}},"time":{"created":"2018-08-28T14:34:35.853Z","0.0.1":"2018-08-28T14:34:35.944Z","modified":"2024-01-25T07:10:09.773Z","0.0.2":"2018-09-13T15:02:10.110Z","0.0.3":"2018-09-18T10:01:16.938Z","0.1.0-rc.1":"2019-04-01T16:21:51.299Z","0.1.0-rc.1.1":"2019-04-05T18:13:06.369Z","0.1.1-rc.1.1":"2019-04-05T18:40:29.094Z","0.1.0-rc.1.2":"2019-04-07T12:12:44.551Z","0.1.1-rc.1.2":"2019-04-07T12:13:21.408Z","0.1.2-rc.1.2":"2019-04-07T12:18:33.198Z","0.1.0-rc.1.3":"2019-04-11T10:24:07.541Z","0.1.0-rc2":"2019-05-01T16:07:08.888Z","0.1.0":"2019-05-02T14:08:52.627Z","0.1.1":"2019-06-05T18:53:01.388Z","0.1.2":"2019-07-15T07:23:16.029Z","0.1.3":"2019-07-15T07:35:09.241Z","0.1.4":"2019-07-15T08:15:15.698Z","0.1.5":"2019-07-15T08:18:55.080Z","0.1.6":"2019-07-25T14:38:19.603Z","0.2.0-rc1":"2019-08-30T18:52:09.096Z","0.2.0-rc2":"2019-08-30T18:52:43.361Z","0.1.7":"2019-08-30T18:53:55.839Z","0.2.0-rc3":"2019-09-02T13:45:11.530Z","0.2.0":"2019-10-03T16:03:57.550Z","0.2.1":"2019-11-07T15:52:40.841Z","0.3.0-rc1":"2019-12-04T11:25:11.978Z","0.3.0":"2019-12-04T12:41:10.157Z","0.3.1":"2020-08-05T16:55:52.850Z","0.4.0":"2021-05-28T18:17:34.790Z","0.4.1-699a573.0":"2023-01-09T16:55:06.015Z","0.4.1-1f5a165.0":"2023-01-12T11:08:52.155Z","0.4.1-f3dbe64.0":"2023-01-17T07:01:09.786Z","0.5.1-3f895b7.0":"2023-01-18T17:37:19.113Z","0.5.0":"2023-01-18T17:43:46.389Z"},"maintainers":[{"name":"haad","email":"haad@headbanggames.com"},{"name":"hajamark","email":"mark@mrh.io"},{"name":"shamb0t","email":"shams.methnani@gmail.com"}],"description":"Default identity provider for OrbitDB","homepage":"https://github.com/orbitdb/orbit-db-identity-provider#readme","keywords":["orbitdb","orbit-db","identity"],"repository":{"type":"git","url":"git+https://github.com/orbitdb/orbit-db-identity-provider.git"},"author":{"name":"shamb0t"},"bugs":{"url":"https://github.com/orbitdb/orbit-db-identity-provider/issues"},"license":"MIT","readme":"# orbit-db-identity-provider\n\n[![Gitter](https://img.shields.io/gitter/room/nwjs/nw.js.svg)](https://gitter.im/orbitdb/Lobby) [![Matrix](https://img.shields.io/badge/matrix-%23orbitdb%3Apermaweb.io-blue.svg)](https://riot.permaweb.io/#/room/#orbitdb:permaweb.io) \n[![npm version](https://badge.fury.io/js/orbit-db-identity-provider.svg)](https://www.npmjs.com/package/orbit-db-identity-provider)\n\n> Default identity provider for OrbitDB\n\n`Identities` is a package to manage identities in [@OrbitDB](http://github.com/orbitdb/orbit-db)\n\n## Table of Contents\n\n  - [Install](#install)\n  - [Usage](#usage)\n    - [Creating an identity](#creating-an-identity)\n    - [Adding a custom identity signer and verifier](#adding-a-custom-identity-signer-and-verifier)\n    - [Properties](#properties)\n      - [id](#id)\n      - [publicKey](#publickey)\n      - [signatures](#signatures)\n  - [Contribute](#contribute)\n    - [Tests](#tests)\n    - [Build](#build)\n    - [Linting](#linting)\n  - [License](#license)\n\n## Install\n\nThis project uses [npm](https://npmjs.com/) and [nodejs](https://nodejs.org/)\n\n```sh\n$ npm i --save orbit-db-identity-provider\n```\n\n## Usage\n\nThe `Identity` object contains signatures proving possession of some external identifier and an OrbitDB public key. This is included to allow proof of ownership of an external identifier within OrbitDB.\n\n### Creating an identity\n```js\nimport Identities from 'orbit-db-identity-provider'\nconst options = { id: 'local-id'}\nconst identity = await Identities.createIdentity(options)\n\nconsole.log(identity.toJSON())\n// prints\n{\n  id: '045757bffcc7a4f4cf94c0cf214b3d3547a62195a09588df36b74aff837b2fdc14551360a323bf9de2ac8fb2eda9bd1bae5de53577a8db41ee2b46b4bf8cd7be33',\n  publicKey: '04b5c54ef8f2514a58338e64aa08aa6052c3cfef1225a10b51017f2ad63a92fb166e7a19cba44321c9402ab1b62c940cd5e65e81e4d584c1208dbd021f6e22c6f5',\n  signatures:  {\n    id: '3046022100aab534483f474bd3791eb9dcf1f61b6bdb4b07f70e8eca1ea7b530ac0ca13ca1022100e9d95eeeacc9813808400eb37f8aae6be7873df460d2a03e7a19132e34f0bd16',\n    publicKey: '30440220514b6fee38cbec96d9851905e575d6e209834c94be5e009a8261737d4ef23dfc0220794fa8dee564701d337b68fdbeef76bb81d777154c211d84ac345ec287a2a8e1'\n  },\n  type: 'orbitdb'\n}\n\n```\nIf `options.type` is not specified, Identities will default to creating an identity with type '`orbitdb'`, meaning the signing key will sign another OrbitDB public key. This public key can be an already-existing OrbitDB key allowing you to link several keys to a 'master' OrbitDB key to, for example, link keys across devices.\n\nTo use an existing keystore, you can pass it as an argument in the options as follows:\n```js\nconst identity = await Identities.createIdentity({ id: 'local-id', keystore: existingKeystore })\n```\n\n#### Creating an identity with a DID\nDecentralized Identifiers (DID) is a common way to represent a digital identity. Below is an example using the `did:key` method (specifically [key-did-provider-ed25519](https://github.com/ceramicnetwork/key-did-provider-ed25519)).\n```js\nimport { Ed25519Provider } from 'key-did-provider-ed25519'\nimport KeyResolver from 'key-did-resolver'\nimport Identities from 'orbit-db-identity-provider'\nIdentities.DIDIdentityProvider.setDIDResolver(KeyResolver.getResolver())\n\nconst seed = // 32 bytes of entropy (Uint8Array)\nconst didProvider = new Ed25519Provider(seed)\nconst identity = await Identities.createIdentity({ type: 'DID', didProvider })\n```\n\n#### Creating an identity with an Ethereum wallet\nIdentities can also be created using Ethereum wallets. The example below uses [ethers](https://docs.ethers.io/) to open a users wallet and sign the identity.\n```js\nimport Identities from \"orbit-db-identity-provider\";\nimport { ethers } from \"ethers\";\n\nconst provider = new ethers.providers.Web3Provider(/* window.ethereum */);\nconst wallet = provider.getSigner();\nconst identity = await Identities.createIdentity({\n  type: \"ethereum\",\n  wallet,\n});\n```\n_Note: If you don't supply a `wallet`, a random one will be created for you._\n\n### Create identity using existing keys\n\nTo create an identity using existing keys, you need to install `localstorage-level-migration`\n\n```js\nimport Identities from 'orbit-db-identity-provider'\nimport migrate from 'localstorage-level-migration'\nconst options = { id: 'new-id', migrate: migrate('/path/to/keys') }\nconst identity = await Identities.createIdentity(options)\n\nconsole.log(identity.toJSON())\n// prints\n{\n  id: '<new-id>',\n  publicKey: '<compressed-original-key>',\n  signatures:  {\n    id: '<new-id-signed-by-public-key>',\n    publicKey: '<public-key-signed-by-id>'\n  },\n  type: 'orbitdb'\n}\n\n```\n\n### Adding a custom identity signer and verifier\n\nTo link an OrbitDB signing key with an external identity, you must provide a custom class which implements the `IdentityProvider` [interface](https://github.com/orbitdb/orbit-db-identity-provider/blob/master/src/identity-provider-interface.js).\n\n```js\nclass MyIdentityProvider extends IdentityProvider {\n  static get type () { return 'MyIdentityType' } // return type\n  async getId () { } // return identifier of external id (eg. a public key)\n  async signIdentity (data) { } //return a signature of data (signature of the OrbtiDB public key)\n  static async verifyIdentity (identity) { } //return true if identity.sigantures are valid\n}\n\nIdentities.addIdentityProvider(MyIdentityProvider)\n\n// to create an identity of type `MyIdentityType`\nconst identity = await Identities.createIdentity({ type: `MyIdentityType`})\n\n```\n\n### Properties\n\n#### id\n\nReturns the ID of the external identity.\n\n#### publicKey\n\nReturns the signing key used to sign OrbitDB entries.\n\n#### signatures\nReturns an object containing two signatures\n```js\n{ id: <id-signature>, publicKey: <pub-key+id-siganture> }\n```\n\nThe first signature, `id`, is `identity.id` signed by `identiy.publicKey`. This allows the owner of `id` to prove they own the private key associated with `publicKey`. The second signature `publicKey` is created by signing the concatenation `identity.signature.id + identity.publicKey` using `identity.id`. This links the two identifiers.\n\n## Contribute\n\nPlease, feel free to contribute! Take a look at [the issues](https://github.com/orbitdb/orbit-db-identity-provider/issues), and comment on an existing issue or create a new one if you have questions, bugs, or suggestions. For larger PRs, open an issue first if you could - drive-by PRs are also welcomed.\n\nPlease abide by the [Code of Conduct](CODE_OF_CONDUCT.md). For more on contributing to [@OrbitDB](https://github.com/orbitdb/), check out the docs in [orbitdb/welcome](https://github.com/orbitdb/welcome).\n\n### Tests\n\nRun tests with:\n\n```sh\n$ npm test\n```\n\n### Build\n\nThe build script will build the distribution file for browsers.\n\n```sh\n$ npm run build\n```\n\n### Linting\n\nPlease use [`standard`](https://standardjs.com). To check,\n\n\n```sh\n$ npm run lint\n```\n\n## License\n\n[MIT](LICENSE) © 2018 Haja Networks Oy\n","readmeFilename":"README.md","contributors":[{"name":"shamb0t"},{"name":"haadcode"},{"name":"RichardLitt"},{"name":"latenssi"},{"name":"adam-palazzo"}]}