{"_id":"muport-core","_rev":"31-b9a6de10d8fe2cc6dad7ed3d7e4e9633","name":"muport-core","dist-tags":{"next":"0.4.1-beta-2","latest":"0.4.1"},"versions":{"0.0.1-security":{"name":"muport-core","version":"0.0.1-security","_id":"muport-core@0.0.1-security","maintainers":[{"name":"ehsalazar","email":"ernie@npmjs.com"}],"homepage":"https://github.com/npm/security-holder#readme","bugs":{"url":"https://github.com/npm/security-holder/issues"},"dist":{"shasum":"c1ea44d070fad363eeb68cead36d94f465807fae","tarball":"https://registry.npmjs.org/muport-core/-/muport-core-0.0.1-security.tgz","fileCount":2,"integrity":"sha512-vk7RZoyNftgm5ngPkk2suFBzMnOGoBHlhqOpU3jUwymFETeBGunkmizeuTGECviFEr8aRj71O0u0AwODA/m0MQ==","signatures":[{"sig":"MEQCIAmcUIrPxMD6sWdDisCyUNSjS+CVTaZIZfXDc+SqLEYjAiBRx2epRlLDfdVZdP/ahSjq4fdeupAwVX5NRGuXuN97Bg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":471},"_npmUser":{"name":"ehsalazar","email":"ernie@npmjs.com"},"repository":{"url":"git+https://github.com/npm/security-holder.git","type":"git"},"_npmVersion":"5.7.1","description":"security holding package","directories":{},"_nodeVersion":"8.2.1","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/muport-core_0.0.1-security_1521480616746_0.6504357548248905","host":"s3://npm-registry-packages"}},"0.2.0":{"name":"muport-core","version":"0.2.0","author":"","license":"Apache-2.0","_id":"muport-core@0.2.0","maintainers":[{"name":"oed","email":"oed3933@gmail.com"}],"homepage":"https://github.com/uport-project/muport-core-js#readme","bugs":{"url":"https://github.com/uport-project/muport-core-js/issues"},"dist":{"shasum":"2120127a2835a65883b62725b7a3dd270f2e928d","tarball":"https://registry.npmjs.org/muport-core/-/muport-core-0.2.0.tgz","fileCount":17,"integrity":"sha512-zIXGgMTSm98h6uvxzkeMYw4xKx6cPLrxSzt+qavzmsrn5adeHwzGlgrBphxXIE0+ZSymyR7FZ7QGm2BZf1TLgg==","signatures":[{"sig":"MEYCIQDkUTS/TrzhImwDtM+5GZgpyVxRg846Px7YBvLzHcJdxwIhAJKYhv01iE70Y4088EsdSQGRwnUHE4z5oQg4eQMCPQuV","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":292504,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa1iR7CRA9TVsSAnZWagAAGw0P/2Auonr6dnxhOR2EDlbR\nIr/bB3wv9bg93x/fxo941CcREsvUgJf5S4b1hxCfveDVu+RhUA6EAaBCEJDz\npknW6nIWBDCoLFft9dVrAqPTTykzLckUYFbDx8+6YXG7DsIG6GlQm3uoh482\nXlrJ4VnaLSMY4zAAFuksf6biqE3DcmzVccs5dcLuhkg3KHZmuzOqbQWnvfDH\n25QPOuorpkkFLm4z8okLxCgKQXcnoXSZtSRqq85K4/hl6fDT1ghSXGyLdWlG\n7PDgfO6HQ1Z60UyZhHZ38fgvEQHrUrvPCDc6r/dD70fqqSEJNG3ENp/qdmAa\nWEE/GCroP9scSHuP6z8OLxQCbXKuHp2xEtbnIabMaF4N8bG/sQdJd2TuFfdb\n/i/LDT3sq8I2YKXSd8+iMy50WWzB9IrHbm5nfD159Q4546uzL7ctLQe43nyT\nhb29ToY8YaRhE6Yu4+Ihqq0lEn693w+sptelg8Z/VfuYy+/Zt4RqmqHYrOo5\nph54d5PzInoKzQSoKk9m09BTAmJNKNzevYO8Ms3SlvaSRY4GOjaZq2Eq+x1U\nB1eRdAn9riBfQp45t5gs7qmVlL8pNskKzknB1ky9IFFvwHZN1svHwGYBudQg\n0GMSDM2uJpnSQE+uTJ3PIrPfodD2BFgLyKZQEq2adTzt5auGL5tmijn/jEGZ\n+mPw\r\n=yW41\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/muport.js","gitHead":"65109caa95d96f64294925da92f4699ea76892b4","scripts":{"test":"jest --coverage","build":"babel src --out-dir lib","generate-readme":"cp readme-template.md README.md; ./node_modules/.bin/jsdoc2md -d 2 src/muport.js >> README.md"},"_npmUser":{"name":"oed","email":"oed3933@gmail.com"},"deprecated":"Deprecated in favor of Ceramic: https://developers.ceramic.network","repository":{"url":"git+https://github.com/uport-project/muport-core-js.git","type":"git"},"_npmVersion":"5.8.0","description":"Create and use µPort identities","directories":{"lib":"lib"},"_nodeVersion":"9.11.1","dependencies":{"bs58":"^4.0.1","web3":"0.20.6","bip39":"^2.5.0","did-jwt":"0.0.7","bluebird":"^3.5.1","crypto-js":"^3.1.9-1","ethjs-abi":"^0.2.1","ipfs-mini":"^1.1.2","tweetnacl":"^1.0.0","secrets.js":"^0.1.8","did-resolver":"^0.0.4","babel-runtime":"^6.26.0","ethereumjs-tx":"^1.3.4","tweetnacl-util":"^0.15.0","ethereumjs-wallet":"^0.6.0","muport-did-resolver":"^0.0.4","ethereum-claims-registry":"^0.0.4"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.1.2","jest":"^22.4.2","babel-cli":"^6.26.0","ganache-cli":"^6.1.0","babel-preset-env":"^1.6.1","jsdoc-to-markdown":"^4.0.1","babel-plugin-transform-runtime":"^6.23.0","babel-plugin-transform-object-rest-spread":"^6.26.0"},"_npmOperationalInternal":{"tmp":"tmp/muport-core_0.2.0_1523983482449_0.5529004700549307","host":"s3://npm-registry-packages"}},"0.2.1":{"name":"muport-core","version":"0.2.1","author":"","license":"Apache-2.0","_id":"muport-core@0.2.1","maintainers":[{"name":"oed","email":"oed3933@gmail.com"}],"homepage":"https://github.com/uport-project/muport-core-js#readme","bugs":{"url":"https://github.com/uport-project/muport-core-js/issues"},"dist":{"shasum":"fa7ece4779369d1285f971da0f8408a2f651a905","tarball":"https://registry.npmjs.org/muport-core/-/muport-core-0.2.1.tgz","fileCount":17,"integrity":"sha512-nPiV2MqTVbXaHPDEnvzmSFOZHDeICxXEI458x0V+bU8MEagYbplGRMMXYQ/7W4Yq/dJE5rNM2n9VuuPLcHrgsg==","signatures":[{"sig":"MEQCIFXl63KqDZmIBPlc5h8/gYdOnQS4H6xFy4YSE0EviQKpAiAIJtfEbqbKcjPiDFW0nm5NZ1AMxUF4FbRcc9348y7l0A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":292819,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa2J3WCRA9TVsSAnZWagAAHMIP/3BJjf/vr9DichIJ/4FU\nu3K/J4GG6TLKPjcGzRC63y5saIN9JxnVfG+QpzjOflrPwtIcN0OmdghDre/q\nlNrPLBEcbAepyg32gZaDRPAjGl9m7ceLOdAVtfTcttiGbIlUyqaMN8dCCNB+\neS2w7O0jfnoS71/i+xtP2/hCF+EjLK440K3vGHss5+gUuy7LDJkJiwRv8mq4\nkJB0YHJPgI3JFs19xYNVxZaEwn+5kpWU0+YJ/BkK5OugJ5mtJBNLjqnSSNaq\nbhsaUtZAdiftc90KvBgj+C3WowERH36PVctl8rZCN2r/aqwZF+uWKXuINd8e\nFmI4U6V/1mlL9eitBah+zUVU0SCstJi4BODhPaaKGu854gf11aD6RXgyGD5/\nlcnmdLvdFlM2/Eqeh4G6j+qigYQQB7O/KgONAzn7vi5SooBU9lERY5jHomKE\nYANSFZcanxHxf19rJj/6/k4QgeXGNGmHWyVNvUHMEXo9eFecHemABHWop43J\nFfB00ZvlAN9JEl9BaHxFJH0YeTIJj7Ir06GdS1qGIG8TLXyi55Tjzl4OVOa4\nV7LqOj64KmN1fVVg2TgoT0fBUZL/Nu5Pf7rv6RHx0DeKUCLg8b3q1JnpGNml\nqYLL4lJOYAx+VdhEHvrjKV5KgPGdTnwZrXgvE2zvE3G6ZGhGuWjwP9tZFReS\nZLqI\r\n=qG0F\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/muport.js","gitHead":"347ab8461872b9e25a1ad2e489bb6df05149e5eb","scripts":{"test":"jest --coverage","build":"babel src --out-dir lib","generate-readme":"cp readme-template.md README.md; ./node_modules/.bin/jsdoc2md -d 2 src/muport.js >> README.md"},"_npmUser":{"name":"oed","email":"oed3933@gmail.com"},"deprecated":"Deprecated in favor of Ceramic: https://developers.ceramic.network","repository":{"url":"git+https://github.com/uport-project/muport-core-js.git","type":"git"},"_npmVersion":"5.8.0","description":"Create and use µPort identities","directories":{"lib":"lib"},"_nodeVersion":"9.11.1","dependencies":{"bs58":"^4.0.1","web3":"0.20.6","bip39":"^2.5.0","did-jwt":"0.0.7","bluebird":"^3.5.1","crypto-js":"^3.1.9-1","ethjs-abi":"^0.2.1","ipfs-mini":"^1.1.2","tweetnacl":"^1.0.0","secrets.js":"^0.1.8","did-resolver":"^0.0.4","babel-runtime":"^6.26.0","ethereumjs-tx":"^1.3.4","tweetnacl-util":"^0.15.0","ethereumjs-wallet":"^0.6.0","muport-did-resolver":"^0.0.4","ethereum-claims-registry":"^0.0.4"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.1.2","jest":"^22.4.2","babel-cli":"^6.26.0","ganache-cli":"^6.1.0","babel-preset-env":"^1.6.1","jsdoc-to-markdown":"^4.0.1","babel-plugin-transform-runtime":"^6.23.0","babel-plugin-transform-object-rest-spread":"^6.26.0"},"_npmOperationalInternal":{"tmp":"tmp/muport-core_0.2.1_1524145622087_0.265430720275186","host":"s3://npm-registry-packages"}},"0.2.3":{"name":"muport-core","version":"0.2.3","author":"","license":"Apache-2.0","_id":"muport-core@0.2.3","maintainers":[{"name":"chrislundkvist","email":"christian.lundkvist@gmail.com"},{"name":"oed","email":"oed3933@gmail.com"}],"homepage":"https://github.com/uport-project/muport-core-js#readme","bugs":{"url":"https://github.com/uport-project/muport-core-js/issues"},"dist":{"shasum":"3b214984325a7fc21f526edd6aab1f02d04f5862","tarball":"https://registry.npmjs.org/muport-core/-/muport-core-0.2.3.tgz","fileCount":17,"integrity":"sha512-HFC55082HX40eLnSgOBMfqHeOJWEqYu00cbipQcbPhLlg5LNFm4jIGhgF9rIbbAQYu7WsMzT5gBLAg7hastrKg==","signatures":[{"sig":"MEUCIBrA2qwFxhumnnPD9NrkfGAsyxXYn26lExKMER34/flHAiEAsIM6Mw2LxWEGME/m9PsCLanioecCMMyDOdFqKC+Fe7E=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":293118,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa2QReCRA9TVsSAnZWagAAjCgP/1zfOjYvvNNyPVEvh6XG\n3CdJ+oRSTfdq45HOF2fMSun19JF0oJ1PUVLb0xUaW6aZiPCQKDTo7XH0eqef\nx2jIRiNDmlV89FbvWzDW6F5HPWPozy86v0aWdT9yY6MCfCxi2OA535RQStAy\nrYuvYjWoTbLyD9q0CfTbOYm5d3Cb+X4eSNo0D4n+wm9k7fMfKJP4GFpntkLb\nSfWPnhyOGO9m9QCQg/c8sHIphOO8N36nphOb/Gc79oT7h0yqIr16nrI7wmR9\nmfpVEZqNBRCNQrD8D+fsjhon0JJoEU/U/068Go23VfIzOKDSMuWdVh3bKsAi\nMDK50Q/F3+CDQ6RgiW9s42MD/ocr/e8DooDmt1L3o1fo/FQD8aiJvJjWm7wN\nFkpexLmj8MhplXtfOUgUgcf5mn1wE62DYIEuz11oGfbL/JWHjaDEr5pZ0zj0\ned/5DaCBqLtqt9ZybuHsZcuNAnr+SAAtzZxguDykY4h9va+Vdb+DVTajgpO+\nrtUt6938u439A2M3vQDKf9XcACDdhrQXR9JMnIKtO+uEAdCUJt2PqYz3Wzek\nzu3pLiYOXvHRskXx7sQ8Hv6hQrAAfkQu5GxL/etLS1ok2ERKIqQZBfla0nQ4\n+eQ3EC1BQuTGzNcyIDF5Wf1b7fB35JNYsyW3utOoUHeiFHUZKgIKSsr608Pv\nSrkF\r\n=SHKR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/muport.js","gitHead":"6c975f2fd0924ebdce1aede641fe87f1c2cc14e1","scripts":{"test":"jest --coverage","build":"babel src --out-dir lib","generate-readme":"cp readme-template.md README.md; ./node_modules/.bin/jsdoc2md -d 2 src/muport.js >> README.md"},"_npmUser":{"name":"chrislundkvist","email":"christian.lundkvist@gmail.com"},"deprecated":"Deprecated in favor of Ceramic: https://developers.ceramic.network","repository":{"url":"git+https://github.com/uport-project/muport-core-js.git","type":"git"},"_npmVersion":"5.4.2","description":"Create and use µPort identities","directories":{"lib":"lib"},"_nodeVersion":"8.7.0","dependencies":{"bs58":"^4.0.1","web3":"0.20.6","bip39":"^2.5.0","did-jwt":"0.0.7","bluebird":"^3.5.1","crypto-js":"^3.1.9-1","ethjs-abi":"^0.2.1","ipfs-mini":"^1.1.2","tweetnacl":"^1.0.0","secrets.js":"^0.1.8","did-resolver":"^0.0.4","babel-runtime":"^6.26.0","ethereumjs-tx":"^1.3.4","tweetnacl-util":"^0.15.0","ethereumjs-wallet":"^0.6.0","muport-did-resolver":"^0.0.4","ethereum-claims-registry":"^0.0.4"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.1.2","jest":"^22.4.2","babel-cli":"^6.26.0","ganache-cli":"^6.1.0","babel-preset-env":"^1.6.1","jsdoc-to-markdown":"^4.0.1","babel-plugin-transform-runtime":"^6.23.0","babel-plugin-transform-object-rest-spread":"^6.26.0"},"_npmOperationalInternal":{"tmp":"tmp/muport-core_0.2.3_1524171869812_0.6240862673462744","host":"s3://npm-registry-packages"}},"0.2.4":{"name":"muport-core","version":"0.2.4","author":"","license":"Apache-2.0","_id":"muport-core@0.2.4","maintainers":[{"name":"chrislundkvist","email":"christian.lundkvist@gmail.com"},{"name":"oed","email":"oed3933@gmail.com"}],"homepage":"https://github.com/uport-project/muport-core-js#readme","bugs":{"url":"https://github.com/uport-project/muport-core-js/issues"},"dist":{"shasum":"31faf7781e0aaa3124ea3a5d2473f5e27d0e3b0b","tarball":"https://registry.npmjs.org/muport-core/-/muport-core-0.2.4.tgz","fileCount":17,"integrity":"sha512-PfK5a//hgy61gIYPN1TrL5qCN/kwT0s4hyDwQR7ExetEon9hGvMCgdDoe+YOID7wEv1rhoXHpChUPq8UMv3NhA==","signatures":[{"sig":"MEUCICCB6xIQhTDsHzESUfxqvXSqYrtrrekMsIKu05DEZSLqAiEA+IIlnbxK5CWhdFd21aY5v6R+gxCv8Qy/an54Z3fWUA8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":296588,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa2gtiCRA9TVsSAnZWagAAoiYP/0i/GiTkxylYYcVVP2qo\nO5Oym9X0fyjVGBIPIvTOKzjGtz7KLnUI5PwAqyt6szNUGpo2z+fR8hAQqPyb\nAW7FOa2BYCTDfcgQaAlYxYMXD+lsREuVcpMsP6psMyF6Bs3vnpQG+UZpn2WC\nXbybUDGVH3jZ1+/JaYhiq0wB4rngWg4xzhOnfxMu3iAynt0IrNR0PY3ACPOn\n2b8I9GdHBTq6Ca0fLIfU9m7tIYkPfemGGeFyDrC99n2h20mXDswyAUrxJm3/\nhw2YvA9acrUeIKwOI6Yb+8qbp1BA90zcFXPtrffYkzuQDJkbtkM15QqE13iN\n/VAN0Kno0S0HZbKelUTNnkB2PRNHtDIXa9ZUSD+S0rsVp1dQT7xT4g4AoIx+\nA0FJ0M54KoYYw1I0jKEaC1QCSwA1yt8+6wsbgJLygC79YWdv24dOZWxVMm+b\nPFTmKgEOGnM3r9TDBzvw+kxfknmuNkW1FQUbOG96ti+cnwHv5dwvgnG4VSs0\n/aQidc2/yans8Zy6i8HU3DkLI1OfnpLQ430KAtyth5bVoaG2x7BgOya/DMEi\nExIC7xWepMC7s5kY0SGtRMnV713KCjrNsSELj72qqowMO/92rTp201zSDoc1\n36TovtKEAz1lkUTcNlnYaKuQrB0I1pHuc9AWVb/UQLHhibrWf5dXfl9aCAGn\nfNjv\r\n=HYnw\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/muport.js","gitHead":"e7c8e61129f087f3adbfbf6ac7fdaa34292504f6","scripts":{"test":"jest --coverage","build":"babel src --out-dir lib","generate-readme":"cp readme-template.md README.md; ./node_modules/.bin/jsdoc2md -d 2 src/muport.js >> README.md"},"_npmUser":{"name":"oed","email":"oed3933@gmail.com"},"deprecated":"Deprecated in favor of Ceramic: https://developers.ceramic.network","repository":{"url":"git+https://github.com/uport-project/muport-core-js.git","type":"git"},"_npmVersion":"5.8.0","description":"Create and use µPort identities","directories":{"lib":"lib"},"_nodeVersion":"9.11.1","dependencies":{"bs58":"^4.0.1","web3":"0.20.6","bip39":"^2.5.0","ethers":"^3.0.15","did-jwt":"0.0.7","bluebird":"^3.5.1","crypto-js":"^3.1.9-1","ethjs-abi":"^0.2.1","ipfs-mini":"^1.1.2","tweetnacl":"^1.0.0","secrets.js":"^0.1.8","did-resolver":"^0.0.4","babel-runtime":"^6.26.0","ethereumjs-tx":"^1.3.4","tweetnacl-util":"^0.15.0","ethereumjs-wallet":"^0.6.0","muport-did-resolver":"^0.0.4","ethereum-claims-registry":"^0.0.4"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.1.2","jest":"^22.4.2","babel-cli":"^6.26.0","ganache-cli":"^6.1.0","babel-preset-env":"^1.6.1","jsdoc-to-markdown":"^4.0.1","babel-plugin-transform-runtime":"^6.23.0","babel-plugin-transform-object-rest-spread":"^6.26.0"},"_npmOperationalInternal":{"tmp":"tmp/muport-core_0.2.4_1524239200961_0.6615890064747383","host":"s3://npm-registry-packages"}},"0.3.0-beta-1":{"name":"muport-core","version":"0.3.0-beta-1","author":"","license":"Apache-2.0","_id":"muport-core@0.3.0-beta-1","maintainers":[{"name":"chrislundkvist","email":"christian.lundkvist@gmail.com"},{"name":"oed","email":"oed3933@gmail.com"}],"homepage":"https://github.com/uport-project/muport-core-js#readme","bugs":{"url":"https://github.com/uport-project/muport-core-js/issues"},"dist":{"shasum":"93352ec3a46dc982289cb4cf76fbce667566b30e","tarball":"https://registry.npmjs.org/muport-core/-/muport-core-0.3.0-beta-1.tgz","fileCount":17,"integrity":"sha512-bGVUNTXF8jGtRLb7LzMVIi7d2qHpYvyp5RjoeOzcHeBz9EMkwqwEDagHb96d5qvFi1LKPcHdjxYz4YHE/yIWqA==","signatures":[{"sig":"MEYCIQD0ycLCR3s/zfPwqwfx2WQJusx2Bjsw9Gm/5UClg952+wIhALvsMn96ZzzQe7bnLOagDh/6OY8L5OwHZ1D0N5x3x8gv","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":302487,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa8di+CRA9TVsSAnZWagAA2RYP/jfhbDcDyxyT8bZPBcqq\nuUP2d/2IdY8nGeUcGYjiFk/BzyrGbjBZfWO8k0UJYYHgIUTMgNjJGsU4sYfL\nZB8puIirDI36XelcpFBHSpYooiJPO83J5Ok+84sYAYEDUbccF8UvvhfyI9Ml\nFPrXseKIpCLsFW7Z0rF9va0JI1Q6KRisZFzMwvkETbzqln33rUNAurH+4Aij\nPC12ThwCZ5//NliXnz7rLW8p4x6XgnjlYJWO3GCDTEJmy8goqUfbmsACe4cS\nlEdEaO0KkLlvD2ZBTLrHgLuugE4r2Mk5v/td84kHR3KOvGBdtXYBqz5iCO/N\nvIQDlE/+5kRIw9wiz6qneI5jiilUbFtV6zHXldsbyZqJPJcN71BQz8l/iZ6J\neBnZ6cOSdjoG8gCdEAzrNIZLr+7J1/Zxvx5Al7J9Aq0H7aTSe4ePO24Q6feg\njpONpy6wUhWRR0bWj/Q6pMuvdMHBXpSpi5DhDiSrNVEMzallWufQBKmq4MtB\nZ8WBpzxXFr22WThZPcKwO86kZoiooeQZq5M2qYHPSui2DZd7g/EKbObIiuFl\n4J/6rVrzynsCB8qdrpF7owEYXHBypq99gkinNG9daNjj9BYDwzeLsZ9hOtX9\nFPRvXmZzVlS2maXSQTMo2L2Pm2EaNErPynCYDWn80AgpMpGm/Al4pgx5x1+M\nbsLE\r\n=3fo5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/muport.js","readme":"# µPort core\n[![CircleCI](https://circleci.com/gh/uport-project/muport-core-js.svg?style=svg&circle-token=d007f3bfb7d76e05bea029ca9aa1dd523c97d453)](https://circleci.com/gh/uport-project/muport-core-js) [![codecov](https://codecov.io/gh/uport-project/muport-core-js/branch/master/graph/badge.svg?token=G53BcQfF8N)](https://codecov.io/gh/uport-project/muport-core-js)\n\nThis library is intended to be used to create, update, and recover µPort identities, as well as using the identity to sign and encrypt data.\n\n## Usage\nSimply install using npm\n```\n$ npm install muport-core\n```\nand then import into your project\n```js\nconst MuPort = require('muport-core')\n```\n\n<a name=\"MuPort\"></a>\n\n## MuPort\nPrimary object for interacting with a µPort identity. MuPort enables creation and\nupdating of µPort identities. It also provides functionality to sign claims and\nhelp other identities recover.\n\n**Kind**: global class  \n\n* [MuPort](#MuPort)\n    * [new MuPort(serializeState, [opts])](#new_MuPort_new)\n    * _instance_\n        * [.helpRecover(did)](#MuPort+helpRecover) ⇒ <code>Promise.&lt;String, Error&gt;</code>\n        * [.getDid()](#MuPort+getDid) ⇒ <code>String</code>\n        * [.getDidDocument()](#MuPort+getDidDocument) ⇒ <code>Object</code>\n        * [.getRecoveryDelegateDids()](#MuPort+getRecoveryDelegateDids) ⇒ <code>Array.&lt;String&gt;</code>\n        * [.updateIdentity(publicProfile, delegateDids)](#MuPort+updateIdentity) ⇒ <code>Promise.&lt;Object, Error&gt;</code>\n        * [.signJWT()](#MuPort+signJWT) ⇒ <code>Promise.&lt;String, Error&gt;</code>\n        * [.verifyJWT(jwt, audience)](#MuPort+verifyJWT) ⇒ <code>Promise.&lt;Object, Error&gt;</code>\n        * [.serializeState()](#MuPort+serializeState) ⇒ <code>String</code>\n    * _static_\n        * [.newIdentity(publicProfile, delegateDids, [opts])](#MuPort.newIdentity) ⇒ <code>Promise.&lt;MuPort, Error&gt;</code>\n        * [.recoverIdentity(did, shares, [opts])](#MuPort.recoverIdentity) ⇒ <code>Promise.&lt;MuPort, Error&gt;</code>\n        * [.resolveIdentityDocument(did, [opts])](#MuPort.resolveIdentityDocument) ⇒ <code>Promise.&lt;Object, Error&gt;</code>\n\n<a name=\"new_MuPort_new\"></a>\n\n### new MuPort(serializeState, [opts])\nInstantiates a µPort identity from its serialized state.\n\n\n| Param | Type | Description |\n| --- | --- | --- |\n| serializeState | <code>String</code> | the serialized state of a µPort identity |\n| [opts] | <code>Object</code> | optional parameters |\n| opts.ipfsConf | <code>Object</code> | configuration options for ipfs-mini |\n| opts.rpcProviderUrl | <code>String</code> | rpc url to a custom ethereum node |\n\n<a name=\"MuPort+helpRecover\"></a>\n\n### muPort.helpRecover(did) ⇒ <code>Promise.&lt;String, Error&gt;</code>\nHelp another identity recover. Returns a decrypted share if the current identity is a delegate\nreturns undefined otherwise\n\n**Kind**: instance method of [<code>MuPort</code>](#MuPort)  \n**Returns**: <code>Promise.&lt;String, Error&gt;</code> - a share that the recovering identity can use  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| did | <code>String</code> | the did of the identity that should be recovered |\n\n<a name=\"MuPort+getDid\"></a>\n\n### muPort.getDid() ⇒ <code>String</code>\nThe DID is the identifier of the identity. This is a unique string that can be used to\nlook up information about the identity.\n\n**Kind**: instance method of [<code>MuPort</code>](#MuPort)  \n**Returns**: <code>String</code> - the DID  \n<a name=\"MuPort+getDidDocument\"></a>\n\n### muPort.getDidDocument() ⇒ <code>Object</code>\nThe DID Document is a json object that contains information such as public keys\n\n**Kind**: instance method of [<code>MuPort</code>](#MuPort)  \n**Returns**: <code>Object</code> - the DID Document  \n<a name=\"MuPort+getRecoveryDelegateDids\"></a>\n\n### muPort.getRecoveryDelegateDids() ⇒ <code>Array.&lt;String&gt;</code>\nThe recovery delegates that can help this identity recover\n\n**Kind**: instance method of [<code>MuPort</code>](#MuPort)  \n**Returns**: <code>Array.&lt;String&gt;</code> - an array containing the DIDs of the delegates  \n<a name=\"MuPort+updateIdentity\"></a>\n\n### muPort.updateIdentity(publicProfile, delegateDids) ⇒ <code>Promise.&lt;Object, Error&gt;</code>\nThis function is used to update the publicProfile and/or the recoveryNetwork of the identity.\nThe returned object has three properties; `address` an ethereum address, `costInEther` a number,\nand `finishUpdate` a function.\nIn order to complete the update of the delegates you have to\nsend `costInEther` ether to the `address` on mainnet (or other network if you are using\na custom config). Once that is done the `finishUpdate` function can be called. This\nfunction sends a transaction to the network that updates the identity. The function\nwill throw an error if there is to little ether in the `address`.\nBoth publicProfile and delegateDids are optional and you may pass null if you don't wish to\nupdate one of them.\n\n**Kind**: instance method of [<code>MuPort</code>](#MuPort)  \n**Returns**: <code>Promise.&lt;Object, Error&gt;</code> - an object with the data needed to finalize the update  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| publicProfile | <code>Object</code> | a new public profile for the identity |\n| delegateDids | <code>Array.&lt;String&gt;</code> | an array containing the 3 DIDs of the new delegates |\n\n<a name=\"MuPort+signJWT\"></a>\n\n### muPort.signJWT() ⇒ <code>Promise.&lt;String, Error&gt;</code>\nSigns the given payload (claim) and return a promis with the JWT.\n\n**Kind**: instance method of [<code>MuPort</code>](#MuPort)  \n**Returns**: <code>Promise.&lt;String, Error&gt;</code> - a promise that resolves to a JWT  \n<a name=\"MuPort+verifyJWT\"></a>\n\n### muPort.verifyJWT(jwt, audience) ⇒ <code>Promise.&lt;Object, Error&gt;</code>\nVerifies a JWT.\n\n**Kind**: instance method of [<code>MuPort</code>](#MuPort)  \n**Returns**: <code>Promise.&lt;Object, Error&gt;</code> - a promise that resolves to the decoded JWT  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| jwt | <code>String</code> |  | the JWT to verify |\n| audience | <code>String</code> | <code>this.did</code> | the audience, defaults to did of current identity |\n\n<a name=\"MuPort+serializeState\"></a>\n\n### muPort.serializeState() ⇒ <code>String</code>\nSerialize the state of the current identity to be able to reconstruct it later.\n\n**Kind**: instance method of [<code>MuPort</code>](#MuPort)  \n**Returns**: <code>String</code> - the serialized state  \n<a name=\"MuPort.newIdentity\"></a>\n\n### MuPort.newIdentity(publicProfile, delegateDids, [opts]) ⇒ <code>Promise.&lt;MuPort, Error&gt;</code>\nCreates a new µPort identity.\n\n**Kind**: static method of [<code>MuPort</code>](#MuPort)  \n**Returns**: <code>Promise.&lt;MuPort, Error&gt;</code> - a promise that resolves to an instance of the MuPort class  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| publicProfile | <code>Object</code> | a public profile for the new identity |\n| delegateDids | <code>Array.&lt;String&gt;</code> | three DIDs that can be used to recover the identity at a later point (optional) |\n| [opts] | <code>Object</code> | optional parameters |\n| opts.externalMgmtKey | <code>String</code> | an ethereum address to be used as an external managementKey |\n| opts.ipfsConf | <code>Object</code> | configuration options for ipfs-mini |\n| opts.rpcProviderUrl | <code>String</code> | rpc url to a custom ethereum node |\n\n<a name=\"MuPort.recoverIdentity\"></a>\n\n### MuPort.recoverIdentity(did, shares, [opts]) ⇒ <code>Promise.&lt;MuPort, Error&gt;</code>\nRecovers a µPort identity.\n\n**Kind**: static method of [<code>MuPort</code>](#MuPort)  \n**Returns**: <code>Promise.&lt;MuPort, Error&gt;</code> - a promise that resolves to an instance of the MuPort class  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| did | <code>String</code> | the DID of the identity to be recovered |\n| shares | <code>Array.&lt;String&gt;</code> | atleast two shares that your delegates helped recover |\n| [opts] | <code>Object</code> | optional parameters |\n| opts.ipfsConf | <code>Object</code> | configuration options for ipfs-mini |\n| opts.rpcProviderUrl | <code>String</code> | rpc url to a custom ethereum node |\n\n<a name=\"MuPort.resolveIdentityDocument\"></a>\n\n### MuPort.resolveIdentityDocument(did, [opts]) ⇒ <code>Promise.&lt;Object, Error&gt;</code>\nResovles the identity document for the given DID.\n\n**Kind**: static method of [<code>MuPort</code>](#MuPort)  \n**Returns**: <code>Promise.&lt;Object, Error&gt;</code> - a promise that resolves to the identity document  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| did | <code>String</code> | the DID of the identity |\n| [opts] | <code>Object</code> | optional parameters |\n| opts.ipfsConf | <code>Object</code> | configuration options for ipfs-mini |\n| opts.rpcProviderUrl | <code>String</code> | rpc url to a custom ethereum node |\n\n","gitHead":"fb63430fe9ee5522f9cb146e595ad9382a25f9d3","scripts":{"test":"jest --coverage","build":"babel src --out-dir lib","generate-readme":"cp readme-template.md README.md; ./node_modules/.bin/jsdoc2md -d 2 src/muport.js >> README.md"},"_npmUser":{"name":"oed","email":"oed3933@gmail.com"},"repository":{"url":"git+https://github.com/uport-project/muport-core-js.git","type":"git"},"_npmVersion":"5.8.0","description":"Create and use µPort identities","directories":{"lib":"lib"},"_nodeVersion":"9.11.1","dependencies":{"bs58":"^4.0.1","web3":"0.20.6","bip39":"^2.5.0","ethers":"^3.0.15","did-jwt":"0.0.7","bluebird":"^3.5.1","crypto-js":"^3.1.9-1","ethjs-abi":"^0.2.1","ipfs-mini":"^1.1.2","tweetnacl":"^1.0.0","secrets.js":"^0.1.8","did-resolver":"^0.0.4","babel-runtime":"^6.26.0","ethereumjs-tx":"^1.3.4","tweetnacl-util":"^0.15.0","ethereumjs-wallet":"^0.6.0","muport-did-resolver":"^0.0.7-beta-12","ethereum-claims-registry":"^0.0.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^4.1.2","jest":"^22.4.2","babel-cli":"^6.26.0","ganache-cli":"^6.1.0","babel-preset-env":"^1.6.1","jsdoc-to-markdown":"^4.0.1","babel-plugin-transform-runtime":"^6.23.0","babel-plugin-transform-object-rest-spread":"^6.26.0"},"_npmOperationalInternal":{"tmp":"tmp/muport-core_0.3.0-beta-1_1525799102580_0.6877166002702357","host":"s3://npm-registry-packages"}},"0.3.0-beta-2":{"name":"muport-core","version":"0.3.0-beta-2","author":"","license":"Apache-2.0","_id":"muport-core@0.3.0-beta-2","maintainers":[{"name":"chrislundkvist","email":"christian.lundkvist@gmail.com"},{"name":"oed","email":"oed3933@gmail.com"}],"homepage":"https://github.com/uport-project/muport-core-js#readme","bugs":{"url":"https://github.com/uport-project/muport-core-js/issues"},"dist":{"shasum":"19d5cdf79b7360d859dd7a2ab2f2a7105407e330","tarball":"https://registry.npmjs.org/muport-core/-/muport-core-0.3.0-beta-2.tgz","fileCount":17,"integrity":"sha512-jfO27eMyOYyFXAtNRff+8ji6kpNNlEQE+dYv3F2Hwl2MnI9xRg/BOON1tMNTFgKEz6UOOFXsbIR2CXWPDsc1zA==","signatures":[{"sig":"MEYCIQDfWUnCi69g8TSKnOnOx+AeGTDDf4viiO/oveETyqFeqgIhAP99A+OmqNbJO+jjQFfBOs03hr2/8LaoBK2sYnLG3WS4","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":302475,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa8qexCRA9TVsSAnZWagAAgzcP/2Gamkf7q/xJ+G6z9v6q\n0/85hqH/mTBZBD3btTLWXAJ8SWgY3P5Tz2AeyCsl/j6s/1LiLAIPKD4yj0nI\nfnV9vH8uzdNZZeIhdvxMwrFPMVbKd592ciO+ZNy6EFlkpTOCCfJFwk3MxZaH\nyRic5u5s0gIPoudIzZNqdK6ubVUgQDj95gz4bLvUrYwiGOHDT8tPC+jzbngo\nIhWjKovsARVZRpMIqvK6Zqm6l1PLEdDaaaATJKtQizhAYttBv3XFgfAbOsxg\n+GSOKRTx4fQWyg40zIKtfxp8CRGmuKE8Mn1/Bs2k6d8N9Gj3f1jK+d6EmQ/N\nbNFTQyhJ1Z3DylE1JB+D9Vuckc5e0RafuyihhlhEZid1Ur6DwFI3/Q/Ue6XE\nVhyukq8bQTDjh4WIIdAr7DQtlF2Q0OW96fxuAQRKMA7EhGH2rP9QvfZMREe5\nP4ZqT+Vfmq19XKypflwuqWgIFlm8c9u19KVeA0brc9vExGShgWEbCt3H1VfU\nyr6r1zAPgHzXVMRQudLFrJuYiSZqEJ8mUOIHtrBvw9V9N3UDnxOBZRdT0ZLq\nBGVaa/iHLqs0OdFmkRZ1f81dtz1kN5713khgkqw0/7mD9MEz/it7J8S4xY7G\nfiISrOvLV8mHx+iKEhdl85jb98xZunAQy+RJf+3Cy+tQKr6fAwCRF1U0niF2\nifZw\r\n=IciN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/muport.js","readme":"# µPort core\n[![CircleCI](https://circleci.com/gh/uport-project/muport-core-js.svg?style=svg&circle-token=d007f3bfb7d76e05bea029ca9aa1dd523c97d453)](https://circleci.com/gh/uport-project/muport-core-js) [![codecov](https://codecov.io/gh/uport-project/muport-core-js/branch/master/graph/badge.svg?token=G53BcQfF8N)](https://codecov.io/gh/uport-project/muport-core-js)\n\nThis library is intended to be used to create, update, and recover µPort identities, as well as using the identity to sign and encrypt data.\n\n## Usage\nSimply install using npm\n```\n$ npm install muport-core\n```\nand then import into your project\n```js\nconst MuPort = require('muport-core')\n```\n\n<a name=\"MuPort\"></a>\n\n## MuPort\nPrimary object for interacting with a µPort identity. MuPort enables creation and\nupdating of µPort identities. It also provides functionality to sign claims and\nhelp other identities recover.\n\n**Kind**: global class  \n\n* [MuPort](#MuPort)\n    * [new MuPort(serializeState, [opts])](#new_MuPort_new)\n    * _instance_\n        * [.helpRecover(did)](#MuPort+helpRecover) ⇒ <code>Promise.&lt;String, Error&gt;</code>\n        * [.getDid()](#MuPort+getDid) ⇒ <code>String</code>\n        * [.getDidDocument()](#MuPort+getDidDocument) ⇒ <code>Object</code>\n        * [.getRecoveryDelegateDids()](#MuPort+getRecoveryDelegateDids) ⇒ <code>Array.&lt;String&gt;</code>\n        * [.updateIdentity(publicProfile, delegateDids)](#MuPort+updateIdentity) ⇒ <code>Promise.&lt;Object, Error&gt;</code>\n        * [.signJWT()](#MuPort+signJWT) ⇒ <code>Promise.&lt;String, Error&gt;</code>\n        * [.verifyJWT(jwt, audience)](#MuPort+verifyJWT) ⇒ <code>Promise.&lt;Object, Error&gt;</code>\n        * [.serializeState()](#MuPort+serializeState) ⇒ <code>String</code>\n    * _static_\n        * [.newIdentity(publicProfile, delegateDids, [opts])](#MuPort.newIdentity) ⇒ <code>Promise.&lt;MuPort, Error&gt;</code>\n        * [.recoverIdentity(did, shares, [opts])](#MuPort.recoverIdentity) ⇒ <code>Promise.&lt;MuPort, Error&gt;</code>\n        * [.resolveIdentityDocument(did, [opts])](#MuPort.resolveIdentityDocument) ⇒ <code>Promise.&lt;Object, Error&gt;</code>\n\n<a name=\"new_MuPort_new\"></a>\n\n### new MuPort(serializeState, [opts])\nInstantiates a µPort identity from its serialized state.\n\n\n| Param | Type | Description |\n| --- | --- | --- |\n| serializeState | <code>String</code> | the serialized state of a µPort identity |\n| [opts] | <code>Object</code> | optional parameters |\n| opts.ipfsConf | <code>Object</code> | configuration options for ipfs-mini |\n| opts.rpcProviderUrl | <code>String</code> | rpc url to a custom ethereum node |\n\n<a name=\"MuPort+helpRecover\"></a>\n\n### muPort.helpRecover(did) ⇒ <code>Promise.&lt;String, Error&gt;</code>\nHelp another identity recover. Returns a decrypted share if the current identity is a delegate\nreturns undefined otherwise\n\n**Kind**: instance method of [<code>MuPort</code>](#MuPort)  \n**Returns**: <code>Promise.&lt;String, Error&gt;</code> - a share that the recovering identity can use  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| did | <code>String</code> | the did of the identity that should be recovered |\n\n<a name=\"MuPort+getDid\"></a>\n\n### muPort.getDid() ⇒ <code>String</code>\nThe DID is the identifier of the identity. This is a unique string that can be used to\nlook up information about the identity.\n\n**Kind**: instance method of [<code>MuPort</code>](#MuPort)  \n**Returns**: <code>String</code> - the DID  \n<a name=\"MuPort+getDidDocument\"></a>\n\n### muPort.getDidDocument() ⇒ <code>Object</code>\nThe DID Document is a json object that contains information such as public keys\n\n**Kind**: instance method of [<code>MuPort</code>](#MuPort)  \n**Returns**: <code>Object</code> - the DID Document  \n<a name=\"MuPort+getRecoveryDelegateDids\"></a>\n\n### muPort.getRecoveryDelegateDids() ⇒ <code>Array.&lt;String&gt;</code>\nThe recovery delegates that can help this identity recover\n\n**Kind**: instance method of [<code>MuPort</code>](#MuPort)  \n**Returns**: <code>Array.&lt;String&gt;</code> - an array containing the DIDs of the delegates  \n<a name=\"MuPort+updateIdentity\"></a>\n\n### muPort.updateIdentity(publicProfile, delegateDids) ⇒ <code>Promise.&lt;Object, Error&gt;</code>\nThis function is used to update the publicProfile and/or the recoveryNetwork of the identity.\nThe returned object has three properties; `address` an ethereum address, `costInEther` a number,\nand `finishUpdate` a function.\nIn order to complete the update of the delegates you have to\nsend `costInEther` ether to the `address` on mainnet (or other network if you are using\na custom config). Once that is done the `finishUpdate` function can be called. This\nfunction sends a transaction to the network that updates the identity. The function\nwill throw an error if there is to little ether in the `address`.\nBoth publicProfile and delegateDids are optional and you may pass null if you don't wish to\nupdate one of them.\n\n**Kind**: instance method of [<code>MuPort</code>](#MuPort)  \n**Returns**: <code>Promise.&lt;Object, Error&gt;</code> - an object with the data needed to finalize the update  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| publicProfile | <code>Object</code> | a new public profile for the identity |\n| delegateDids | <code>Array.&lt;String&gt;</code> | an array containing the 3 DIDs of the new delegates |\n\n<a name=\"MuPort+signJWT\"></a>\n\n### muPort.signJWT() ⇒ <code>Promise.&lt;String, Error&gt;</code>\nSigns the given payload (claim) and return a promis with the JWT.\n\n**Kind**: instance method of [<code>MuPort</code>](#MuPort)  \n**Returns**: <code>Promise.&lt;String, Error&gt;</code> - a promise that resolves to a JWT  \n<a name=\"MuPort+verifyJWT\"></a>\n\n### muPort.verifyJWT(jwt, audience) ⇒ <code>Promise.&lt;Object, Error&gt;</code>\nVerifies a JWT.\n\n**Kind**: instance method of [<code>MuPort</code>](#MuPort)  \n**Returns**: <code>Promise.&lt;Object, Error&gt;</code> - a promise that resolves to the decoded JWT  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| jwt | <code>String</code> |  | the JWT to verify |\n| audience | <code>String</code> | <code>this.did</code> | the audience, defaults to did of current identity |\n\n<a name=\"MuPort+serializeState\"></a>\n\n### muPort.serializeState() ⇒ <code>String</code>\nSerialize the state of the current identity to be able to reconstruct it later.\n\n**Kind**: instance method of [<code>MuPort</code>](#MuPort)  \n**Returns**: <code>String</code> - the serialized state  \n<a name=\"MuPort.newIdentity\"></a>\n\n### MuPort.newIdentity(publicProfile, delegateDids, [opts]) ⇒ <code>Promise.&lt;MuPort, Error&gt;</code>\nCreates a new µPort identity.\n\n**Kind**: static method of [<code>MuPort</code>](#MuPort)  \n**Returns**: <code>Promise.&lt;MuPort, Error&gt;</code> - a promise that resolves to an instance of the MuPort class  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| publicProfile | <code>Object</code> | a public profile for the new identity |\n| delegateDids | <code>Array.&lt;String&gt;</code> | three DIDs that can be used to recover the identity at a later point (optional) |\n| [opts] | <code>Object</code> | optional parameters |\n| opts.externalMgmtKey | <code>String</code> | an ethereum address to be used as an external managementKey |\n| opts.ipfsConf | <code>Object</code> | configuration options for ipfs-mini |\n| opts.rpcProviderUrl | <code>String</code> | rpc url to a custom ethereum node |\n\n<a name=\"MuPort.recoverIdentity\"></a>\n\n### MuPort.recoverIdentity(did, shares, [opts]) ⇒ <code>Promise.&lt;MuPort, Error&gt;</code>\nRecovers a µPort identity.\n\n**Kind**: static method of [<code>MuPort</code>](#MuPort)  \n**Returns**: <code>Promise.&lt;MuPort, Error&gt;</code> - a promise that resolves to an instance of the MuPort class  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| did | <code>String</code> | the DID of the identity to be recovered |\n| shares | <code>Array.&lt;String&gt;</code> | atleast two shares that your delegates helped recover |\n| [opts] | <code>Object</code> | optional parameters |\n| opts.ipfsConf | <code>Object</code> | configuration options for ipfs-mini |\n| opts.rpcProviderUrl | <code>String</code> | rpc url to a custom ethereum node |\n\n<a name=\"MuPort.resolveIdentityDocument\"></a>\n\n### MuPort.resolveIdentityDocument(did, [opts]) ⇒ <code>Promise.&lt;Object, Error&gt;</code>\nResovles the identity document for the given DID.\n\n**Kind**: static method of [<code>MuPort</code>](#MuPort)  \n**Returns**: <code>Promise.&lt;Object, Error&gt;</code> - a promise that resolves to the identity document  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| did | <code>String</code> | the DID of the identity |\n| [opts] | <code>Object</code> | optional parameters |\n| opts.ipfsConf | <code>Object</code> | configuration options for ipfs-mini |\n| opts.rpcProviderUrl | <code>String</code> | rpc url to a custom ethereum node |\n\n","gitHead":"dc2e9f3db44e858abc5b735bb1badd4a40f8e42d","scripts":{"test":"jest --coverage","build":"babel src --out-dir lib","generate-readme":"cp readme-template.md README.md; ./node_modules/.bin/jsdoc2md -d 2 src/muport.js >> README.md"},"_npmUser":{"name":"oed","email":"oed3933@gmail.com"},"repository":{"url":"git+https://github.com/uport-project/muport-core-js.git","type":"git"},"_npmVersion":"5.8.0","description":"Create and use µPort identities","directories":{"lib":"lib"},"_nodeVersion":"9.11.1","dependencies":{"bs58":"^4.0.1","web3":"0.20.6","bip39":"^2.5.0","ethers":"^3.0.15","did-jwt":"0.0.7","bluebird":"^3.5.1","crypto-js":"^3.1.9-1","ethjs-abi":"^0.2.1","ipfs-mini":"^1.1.2","tweetnacl":"^1.0.0","secrets.js":"^0.1.8","did-resolver":"^0.0.4","babel-runtime":"^6.26.0","ethereumjs-tx":"^1.3.4","tweetnacl-util":"^0.15.0","ethereumjs-wallet":"^0.6.0","muport-did-resolver":"^0.0.7-beta-14","ethereum-claims-registry":"^0.0.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^4.1.2","jest":"^22.4.2","babel-cli":"^6.26.0","ganache-cli":"^6.1.0","babel-preset-env":"^1.6.1","jsdoc-to-markdown":"^4.0.1","babel-plugin-transform-runtime":"^6.23.0","babel-plugin-transform-object-rest-spread":"^6.26.0"},"_npmOperationalInternal":{"tmp":"tmp/muport-core_0.3.0-beta-2_1525852080992_0.7031312656333444","host":"s3://npm-registry-packages"}},"0.3.0-beta-3":{"name":"muport-core","version":"0.3.0-beta-3","author":"","license":"Apache-2.0","_id":"muport-core@0.3.0-beta-3","maintainers":[{"name":"chrislundkvist","email":"christian.lundkvist@gmail.com"},{"name":"oed","email":"oed3933@gmail.com"}],"homepage":"https://github.com/uport-project/muport-core-js#readme","bugs":{"url":"https://github.com/uport-project/muport-core-js/issues"},"dist":{"shasum":"ba6fcd68b0e03ce462d77cb368bb6926788e6448","tarball":"https://registry.npmjs.org/muport-core/-/muport-core-0.3.0-beta-3.tgz","fileCount":17,"integrity":"sha512-2HLP7TC/ot4dPXEbfO1zNfZmOOZ4AKNILFpHmshUHpvhdsMMsb1BxjwnxFagAAqu67dtHSBoF5auq2QDcn/a3w==","signatures":[{"sig":"MEUCIAwoMZXGoYYKMI6HTzzjLix9IuYlzYqn/LfF8tNFpT0dAiEA68U1KVscDltcdo73LHpMxHzsm4TQm30Ank0yHyNjois=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":304242,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa8umJCRA9TVsSAnZWagAAX2wP/R2HOui+dBFwLswqrFew\n3pMv+ix8hz5DY2OLroHNL3cvPKFtmw1KfOnnUkWKc62vTUnW4piphX8gssgk\nhZZI+/eLpiFEkr2Z7dQr85UZEVNpqx9mid+0iwqM+NkQ/Q/ZM+jryXFS45zv\nZl7caXqo+pGHIhkBMJoJhQ77/qk+25CXyx17Uyz1LWX859CgMumnliFNq+57\nIG8Ro5n5rgsLslrkClEJ1sZxKS+gA9MP0X6vSwavdm9HIg0rVsZDdxPwXxFF\npGCXgsAVUVLPiX7Zaamt/l6NXXlD2ltolBPZJdkIwAQer2qY6OIuoKRiTA6/\n1uj4k9Qvwh9SACTNDsaJ/eiIolMshFi9gAbAJfXaa5GSH3xBYNvDoTn7rMBt\nZeoKkYuj90qFA0kc169lr/wrnMYDzBg0x26bOBeR8KqaNqtguYUe19Whv/OW\ntTTxPuqquE1kAYhVq0UzouAaY43jeNYnC9C1FWnihUdmyg8/oCcAJedeIqf3\nD59mxfe+ewcGO5F8H+FBtjbKaBSmk8j1uAr/AKB8cjEvZglC+Bc7+nC1GipI\nFQDLxSvt7xLV/EvDMsRBjczSHLyAqbuSAf3Ji2x4xdjZjueVwNXqAt14jiZ9\nWvhuoxUHOZ2ASAioQPzltflFeg/vw4DUI4AQaDrRhoOU7Y8ZATanVwd67qaC\nX+Hv\r\n=2vgB\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/muport.js","readme":"# µPort core\n[![CircleCI](https://circleci.com/gh/uport-project/muport-core-js.svg?style=svg&circle-token=d007f3bfb7d76e05bea029ca9aa1dd523c97d453)](https://circleci.com/gh/uport-project/muport-core-js) [![codecov](https://codecov.io/gh/uport-project/muport-core-js/branch/master/graph/badge.svg?token=G53BcQfF8N)](https://codecov.io/gh/uport-project/muport-core-js)\n\nThis library is intended to be used to create, update, and recover µPort identities, as well as using the identity to sign and encrypt data.\n\n## Usage\nSimply install using npm\n```\n$ npm install muport-core\n```\nand then import into your project\n```js\nconst MuPort = require('muport-core')\n```\n\n<a name=\"MuPort\"></a>\n\n## MuPort\nPrimary object for interacting with a µPort identity. MuPort enables creation and\nupdating of µPort identities. It also provides functionality to sign claims and\nhelp other identities recover.\n\n**Kind**: global class  \n\n* [MuPort](#MuPort)\n    * [new MuPort(serializeState, [opts])](#new_MuPort_new)\n    * _instance_\n        * [.helpRecover(did)](#MuPort+helpRecover) ⇒ <code>Promise.&lt;String, Error&gt;</code>\n        * [.getDid()](#MuPort+getDid) ⇒ <code>String</code>\n        * [.getDidDocument()](#MuPort+getDidDocument) ⇒ <code>Object</code>\n        * [.getRecoveryDelegateDids()](#MuPort+getRecoveryDelegateDids) ⇒ <code>Array.&lt;String&gt;</code>\n        * [.updateIdentity(publicProfile, delegateDids)](#MuPort+updateIdentity) ⇒ <code>Promise.&lt;Object, Error&gt;</code>\n        * [.signJWT()](#MuPort+signJWT) ⇒ <code>Promise.&lt;String, Error&gt;</code>\n        * [.verifyJWT(jwt, audience)](#MuPort+verifyJWT) ⇒ <code>Promise.&lt;Object, Error&gt;</code>\n        * [.serializeState()](#MuPort+serializeState) ⇒ <code>String</code>\n    * _static_\n        * [.newIdentity(publicProfile, delegateDids, [opts])](#MuPort.newIdentity) ⇒ <code>Promise.&lt;MuPort, Error&gt;</code>\n        * [.recoverIdentity(did, shares, [opts])](#MuPort.recoverIdentity) ⇒ <code>Promise.&lt;MuPort, Error&gt;</code>\n        * [.resolveIdentityDocument(did, [opts])](#MuPort.resolveIdentityDocument) ⇒ <code>Promise.&lt;Object, Error&gt;</code>\n\n<a name=\"new_MuPort_new\"></a>\n\n### new MuPort(serializeState, [opts])\nInstantiates a µPort identity from its serialized state.\n\n\n| Param | Type | Description |\n| --- | --- | --- |\n| serializeState | <code>String</code> | the serialized state of a µPort identity |\n| [opts] | <code>Object</code> | optional parameters |\n| opts.ipfsConf | <code>Object</code> | configuration options for ipfs-mini |\n| opts.rpcProviderUrl | <code>String</code> | rpc url to a custom ethereum node |\n\n<a name=\"MuPort+helpRecover\"></a>\n\n### muPort.helpRecover(did) ⇒ <code>Promise.&lt;String, Error&gt;</code>\nHelp another identity recover. Returns a decrypted share if the current identity is a delegate\nreturns undefined otherwise\n\n**Kind**: instance method of [<code>MuPort</code>](#MuPort)  \n**Returns**: <code>Promise.&lt;String, Error&gt;</code> - a share that the recovering identity can use  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| did | <code>String</code> | the did of the identity that should be recovered |\n\n<a name=\"MuPort+getDid\"></a>\n\n### muPort.getDid() ⇒ <code>String</code>\nThe DID is the identifier of the identity. This is a unique string that can be used to\nlook up information about the identity.\n\n**Kind**: instance method of [<code>MuPort</code>](#MuPort)  \n**Returns**: <code>String</code> - the DID  \n<a name=\"MuPort+getDidDocument\"></a>\n\n### muPort.getDidDocument() ⇒ <code>Object</code>\nThe DID Document is a json object that contains information such as public keys\n\n**Kind**: instance method of [<code>MuPort</code>](#MuPort)  \n**Returns**: <code>Object</code> - the DID Document  \n<a name=\"MuPort+getRecoveryDelegateDids\"></a>\n\n### muPort.getRecoveryDelegateDids() ⇒ <code>Array.&lt;String&gt;</code>\nThe recovery delegates that can help this identity recover\n\n**Kind**: instance method of [<code>MuPort</code>](#MuPort)  \n**Returns**: <code>Array.&lt;String&gt;</code> - an array containing the DIDs of the delegates  \n<a name=\"MuPort+updateIdentity\"></a>\n\n### muPort.updateIdentity(publicProfile, delegateDids) ⇒ <code>Promise.&lt;Object, Error&gt;</code>\nThis function is used to update the publicProfile and/or the recoveryNetwork of the identity.\nThe returned object has three properties; `address` an ethereum address, `costInEther` a number,\nand `finishUpdate` a function.\nIn order to complete the update of the delegates you have to\nsend `costInEther` ether to the `address` on mainnet (or other network if you are using\na custom config). Once that is done the `finishUpdate` function can be called. This\nfunction sends a transaction to the network that updates the identity. The function\nwill throw an error if there is to little ether in the `address`.\nBoth publicProfile and delegateDids are optional and you may pass null if you don't wish to\nupdate one of them.\n\n**Kind**: instance method of [<code>MuPort</code>](#MuPort)  \n**Returns**: <code>Promise.&lt;Object, Error&gt;</code> - an object with the data needed to finalize the update  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| publicProfile | <code>Object</code> | a new public profile for the identity |\n| delegateDids | <code>Array.&lt;String&gt;</code> | an array containing the 3 DIDs of the new delegates |\n\n<a name=\"MuPort+signJWT\"></a>\n\n### muPort.signJWT() ⇒ <code>Promise.&lt;String, Error&gt;</code>\nSigns the given payload (claim) and return a promis with the JWT.\n\n**Kind**: instance method of [<code>MuPort</code>](#MuPort)  \n**Returns**: <code>Promise.&lt;String, Error&gt;</code> - a promise that resolves to a JWT  \n<a name=\"MuPort+verifyJWT\"></a>\n\n### muPort.verifyJWT(jwt, audience) ⇒ <code>Promise.&lt;Object, Error&gt;</code>\nVerifies a JWT.\n\n**Kind**: instance method of [<code>MuPort</code>](#MuPort)  \n**Returns**: <code>Promise.&lt;Object, Error&gt;</code> - a promise that resolves to the decoded JWT  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| jwt | <code>String</code> |  | the JWT to verify |\n| audience | <code>String</code> | <code>this.did</code> | the audience, defaults to did of current identity |\n\n<a name=\"MuPort+serializeState\"></a>\n\n### muPort.serializeState() ⇒ <code>String</code>\nSerialize the state of the current identity to be able to reconstruct it later.\n\n**Kind**: instance method of [<code>MuPort</code>](#MuPort)  \n**Returns**: <code>String</code> - the serialized state  \n<a name=\"MuPort.newIdentity\"></a>\n\n### MuPort.newIdentity(publicProfile, delegateDids, [opts]) ⇒ <code>Promise.&lt;MuPort, Error&gt;</code>\nCreates a new µPort identity.\n\n**Kind**: static method of [<code>MuPort</code>](#MuPort)  \n**Returns**: <code>Promise.&lt;MuPort, Error&gt;</code> - a promise that resolves to an instance of the MuPort class  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| publicProfile | <code>Object</code> | a public profile for the new identity |\n| delegateDids | <code>Array.&lt;String&gt;</code> | three DIDs that can be used to recover the identity at a later point (optional) |\n| [opts] | <code>Object</code> | optional parameters |\n| opts.externalMgmtKey | <code>String</code> | an ethereum address to be used as an external managementKey |\n| opts.ipfsConf | <code>Object</code> | configuration options for ipfs-mini |\n| opts.rpcProviderUrl | <code>String</code> | rpc url to a custom ethereum node |\n\n<a name=\"MuPort.recoverIdentity\"></a>\n\n### MuPort.recoverIdentity(did, shares, [opts]) ⇒ <code>Promise.&lt;MuPort, Error&gt;</code>\nRecovers a µPort identity.\n\n**Kind**: static method of [<code>MuPort</code>](#MuPort)  \n**Returns**: <code>Promise.&lt;MuPort, Error&gt;</code> - a promise that resolves to an instance of the MuPort class  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| did | <code>String</code> | the DID of the identity to be recovered |\n| shares | <code>Array.&lt;String&gt;</code> | atleast two shares that your delegates helped recover |\n| [opts] | <code>Object</code> | optional parameters |\n| opts.ipfsConf | <code>Object</code> | configuration options for ipfs-mini |\n| opts.rpcProviderUrl | <code>String</code> | rpc url to a custom ethereum node |\n\n<a name=\"MuPort.resolveIdentityDocument\"></a>\n\n### MuPort.resolveIdentityDocument(did, [opts]) ⇒ <code>Promise.&lt;Object, Error&gt;</code>\nResovles the identity document for the given DID.\n\n**Kind**: static method of [<code>MuPort</code>](#MuPort)  \n**Returns**: <code>Promise.&lt;Object, Error&gt;</code> - a promise that resolves to the identity document  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| did | <code>String</code> | the DID of the identity |\n| [opts] | <code>Object</code> | optional parameters |\n| opts.ipfsConf | <code>Object</code> | configuration options for ipfs-mini |\n| opts.rpcProviderUrl | <code>String</code> | rpc url to a custom ethereum node |\n\n","gitHead":"dc2e9f3db44e858abc5b735bb1badd4a40f8e42d","scripts":{"test":"jest --coverage","build":"babel src --out-dir lib","generate-readme":"cp readme-template.md README.md; ./node_modules/.bin/jsdoc2md -d 2 src/muport.js >> README.md"},"_npmUser":{"name":"oed","email":"oed3933@gmail.com"},"repository":{"url":"git+https://github.com/uport-project/muport-core-js.git","type":"git"},"_npmVersion":"5.8.0","description":"Create and use µPort identities","directories":{"lib":"lib"},"_nodeVersion":"9.11.1","dependencies":{"bs58":"^4.0.1","web3":"0.20.6","bip39":"^2.5.0","ethers":"^3.0.15","did-jwt":"0.0.7","bluebird":"^3.5.1","crypto-js":"^3.1.9-1","ethjs-abi":"^0.2.1","ipfs-mini":"^1.1.2","tweetnacl":"^1.0.0","secrets.js":"^0.1.8","did-resolver":"^0.0.4","babel-runtime":"^6.26.0","ethereumjs-tx":"^1.3.4","tweetnacl-util":"^0.15.0","ethereumjs-wallet":"^0.6.0","muport-did-resolver":"^0.0.7-beta-14","ethereum-claims-registry":"^0.0.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^4.1.2","jest":"^22.4.2","babel-cli":"^6.26.0","ganache-cli":"^6.1.0","babel-preset-env":"^1.6.1","jsdoc-to-markdown":"^4.0.1","babel-plugin-transform-runtime":"^6.23.0","babel-plugin-transform-object-rest-spread":"^6.26.0"},"_npmOperationalInternal":{"tmp":"tmp/muport-core_0.3.0-beta-3_1525868937141_0.9657633354548945","host":"s3://npm-registry-packages"}},"0.3.0":{"name":"muport-core","version":"0.3.0","author":"","license":"Apache-2.0","_id":"muport-core@0.3.0","maintainers":[{"name":"chrislundkvist","email":"christian.lundkvist@gmail.com"},{"name":"oed","email":"oed3933@gmail.com"}],"homepage":"https://github.com/uport-project/muport-core-js#readme","bugs":{"url":"https://github.com/uport-project/muport-core-js/issues"},"dist":{"shasum":"19ce5f6b572122d6259d5b2e1bc6d26ad970ee3b","tarball":"https://registry.npmjs.org/muport-core/-/muport-core-0.3.0.tgz","fileCount":17,"integrity":"sha512-gSOZGBs1kSp3Vu+Cn3YRA7oWwhpolpZmDTAU+TXlNCxlmTZt9h2OoN7i5AxZ6MT1UIjSh17FCUgZi0EEeZ1mxw==","signatures":[{"sig":"MEUCIQDeZ8NAdBHqkls2FSyaNpwSQrSagDcIxB5npif5RkimrwIgQ9TomDYZfJhioB1S/Y3vOIdmhxxdMsScIsf4wYsG9bc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":304238,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa9BEVCRA9TVsSAnZWagAAI/4QAKMAG33cW/RccuWW+fNi\nVqnb1sxMH9J8wiA5BcNAx1wYk05oL1pZFUuDVlOp1jgfRk1pXxRoPGb0YCZ8\nvqFwi8jzfKhYGpblQKPd1j66Un22itkrYyq1K3iubtEfpTHsYv3jxRO38nhz\n384oyupbDkJQMWrNELYjyg+5klMxa5SaFHUDitKD2a7hr9dPH0+S9KBYihx/\n3NdhEgXWZrjJH3mTmx5gMZvdJ+h9vYCi13w1WfAAdlT6hkpmI7XonRvg8W29\nl04JXOXNZAXhMW8oDCQ5sJQ+loGtEPnlZ9IgXg3vkYnsNDJVjlJlijnHvn3J\nuoF4oaPNV4pD5cUrD9/9lIZcCw2/Q1ih01wXMu8zbGweY1eb4lRX5UKUGzBf\nwRA/07gM/JMXbIBvSYAi5T6oyu+Zc/Ru/OLyCJehineD/hBNDfmIo8Xi6z9P\nMYKnh14NkjCjEprMW91dWylmxeVZ7qloRG07IMJRRrfJOQw2Ht+wDZ6NHV0m\ngSdU2aMhp6X3qMq0H2jM3wmG8PXBQ5Yye+uM+TFuiN20uTNe4kAefqo4i5fy\nTvk2iegEb0s16rG3TNDYUG+l4uW7JTOSxawWAlMJ/p6Bm9wUCKCjKkrfElzN\n0fiVPMmqQw6FgE+py5ZVcN0f6XZabevLO4LNYfKzsaz3if08wdT1vt0GW2SI\nFzYa\r\n=c1Lv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/muport.js","gitHead":"44630dff06d4d17c64a17ee9f8f22a78b852ac52","scripts":{"test":"jest --coverage","build":"babel src --out-dir lib","prepublish":"npm run build","generate-readme":"cp readme-template.md README.md; ./node_modules/.bin/jsdoc2md -d 2 src/muport.js >> README.md"},"_npmUser":{"name":"oed","email":"oed3933@gmail.com"},"deprecated":"Deprecated in favor of Ceramic: https://developers.ceramic.network","repository":{"url":"git+https://github.com/uport-project/muport-core-js.git","type":"git"},"_npmVersion":"5.8.0","description":"Create and use µPort identities","directories":{"lib":"lib"},"_nodeVersion":"9.11.1","dependencies":{"bs58":"^4.0.1","web3":"0.20.6","bip39":"^2.5.0","ethers":"^3.0.15","did-jwt":"0.0.7","bluebird":"^3.5.1","crypto-js":"^3.1.9-1","ethjs-abi":"^0.2.1","ipfs-mini":"^1.1.2","tweetnacl":"^1.0.0","secrets.js":"^0.1.8","did-resolver":"^0.0.4","babel-runtime":"^6.26.0","ethereumjs-tx":"^1.3.4","tweetnacl-util":"^0.15.0","ethereumjs-wallet":"^0.6.0","muport-did-resolver":"^0.1.0","ethereum-claims-registry":"^0.0.4"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.1.2","jest":"^22.4.2","babel-cli":"^6.26.0","ganache-cli":"^6.1.0","babel-preset-env":"^1.6.1","jsdoc-to-markdown":"^4.0.1","babel-plugin-transform-runtime":"^6.23.0","babel-plugin-transform-object-rest-spread":"^6.26.0"},"_npmOperationalInternal":{"tmp":"tmp/muport-core_0.3.0_1525944596353_0.2621378714413616","host":"s3://npm-registry-packages"}},"0.3.1":{"name":"muport-core","version":"0.3.1","author":"","license":"Apache-2.0","_id":"muport-core@0.3.1","maintainers":[{"name":"chrislundkvist","email":"christian.lundkvist@gmail.com"},{"name":"oed","email":"oed3933@gmail.com"}],"homepage":"https://github.com/uport-project/muport-core-js#readme","bugs":{"url":"https://github.com/uport-project/muport-core-js/issues"},"dist":{"shasum":"e9db55099189331f21fbab1d038431a7ccf3fdb7","tarball":"https://registry.npmjs.org/muport-core/-/muport-core-0.3.1.tgz","fileCount":17,"integrity":"sha512-tWpXRXKGZpQxEvfeJQHpzCPDVGMlGNZbheeyNRTepa7JxMB8I35xkC69KsBndg01X2ZtZN+rEtz4iTEZHMxkuw==","signatures":[{"sig":"MEUCICxhdy2DgzhhA8+4GZYHZOC7NXWsu2cPO2CCpqUKZw4WAiEAkjEYZyrAXh4YG37t8HGwFpsHWEGMj4/zpwjms5Ru1cs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":311676,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbFm4kCRA9TVsSAnZWagAADRAP/igohgEsFVuCiSLpwO3m\n3RtxtPMqPl0yK5kEyEVQx/QIoQITiXNrXVC95JtEhVtYOZFSUqNPbI+Gwclm\n+Fx+QJZ3ySTfcubRRzRHuVfXYXI8dSFt++9atBiTfs4U/5H1viV8ymAq8Sda\n7XELrbVdqi5W5z/SuV+Kan4uMV04qo3UCYhzdr9it3WSv8M/9BIE6lR+NUX/\nbvagkpLthYfyretJePtjXybhyNoh4Avw8qrICKknDvw04w0KEsJEyRTydScA\nKoejPS6Q5dgXAni0bN6WmVkFVf0VrKCsrmat5WYJ5MmPQpX61XsINgCNOJTj\nswYV9iZ/Nb/a5FCnnqyLNKuj3Q01Uh6fbCpSyX4wtLSCKay+QjMfm454zAyp\nwvG9GJmWxTMelYsM8sirKsZsBy1vX0nHbo76UpunWsnn5LmXyIu+jCPUd8Av\nZGNwRIk4pubQghi3dgfJdwok1XGQ9rHU4P9pWjgDzdMmRPTEWLs6cYdGwCwc\n8x/k2uu8cZCUKI9h5NaaOrMw22NV+fw8SdXBshkquBtjvPVKk3Bpo+oTKZk3\nTAY0GGzteS/EjddF440WRvVorR8QJwU14y0F0UX1ZtsUbqOoeH/GMQa500FY\nKuxSo0OVXcHMquHBcyvo+Qr0mZMAJyGp/ChUCzPF2twVPKRNVhjMeLbCjQO4\n3kga\r\n=QLIW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/muport.js","gitHead":"655bdb72e8ecced5d7d360124612b7c862d236e4","scripts":{"test":"jest --coverage","build":"babel src --out-dir lib","prepublish":"npm run build","generate-readme":"cp readme-template.md README.md; ./node_modules/.bin/jsdoc2md -d 2 src/muport.js >> README.md"},"_npmUser":{"name":"oed","email":"oed3933@gmail.com"},"deprecated":"Deprecated in favor of Ceramic: https://developers.ceramic.network","repository":{"url":"git+https://github.com/uport-project/muport-core-js.git","type":"git"},"_npmVersion":"6.1.0","description":"Create and use µPort identities","directories":{"lib":"lib"},"_nodeVersion":"10.3.0","dependencies":{"bs58":"^4.0.1","web3":"0.20.6","bip39":"^2.5.0","ethers":"^3.0.15","did-jwt":"0.0.7","bluebird":"^3.5.1","crypto-js":"^3.1.9-1","ethjs-abi":"^0.2.1","ipfs-mini":"^1.1.2","tweetnacl":"^1.0.0","secrets.js":"^0.1.8","did-resolver":"^0.0.4","babel-runtime":"^6.26.0","ethereumjs-tx":"^1.3.4","tweetnacl-util":"^0.15.0","ethereumjs-wallet":"^0.6.0","muport-did-resolver":"^0.1.0","ethereum-claims-registry":"^0.0.4"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.1.2","jest":"^22.4.2","babel-cli":"^6.26.0","ganache-cli":"^6.1.0","babel-preset-env":"^1.6.1","jsdoc-to-markdown":"^4.0.1","babel-plugin-transform-runtime":"^6.23.0","babel-plugin-transform-object-rest-spread":"^6.26.0"},"_npmOperationalInternal":{"tmp":"tmp/muport-core_0.3.1_1528196643460_0.6718572262905027","host":"s3://npm-registry-packages"}},"0.4.0":{"name":"muport-core","version":"0.4.0","author":"","license":"Apache-2.0","_id":"muport-core@0.4.0","maintainers":[{"name":"chrislundkvist","email":"christian.lundkvist@gmail.com"},{"name":"oed","email":"oed3933@gmail.com"}],"homepage":"https://github.com/uport-project/muport-core-js#readme","bugs":{"url":"https://github.com/uport-project/muport-core-js/issues"},"dist":{"shasum":"94b6b52aa315cb8daacd844a7491a184dce7f96d","tarball":"https://registry.npmjs.org/muport-core/-/muport-core-0.4.0.tgz","fileCount":19,"integrity":"sha512-p21nAsqmd52cDj2P84zUm08pT02XaOETLYDloa+YltdXfuRG65O26R8e2hffmLkb/F/YKc8PBqHbhLkUqWW7yA==","signatures":[{"sig":"MEUCIQDDUmwzqc/hkPHj+7vMZBQOMxWgUbEhx6bAr3gdWI1y6QIgFret+XhHSfJpO7DJf1663AIJ0v3OuYWM2PrdHKr/vew=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":381002,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbdSfMCRA9TVsSAnZWagAA/KMP/30+3TRcYgY9OEvwY3A8\nSDcpMVk5d6CACATiyZej+eoE9QifIFoefw6450dQuwZngvO4FRgRCXR1NxN8\nmnzqR8j2/r0N7qUs7aeovWgZLfoKS/QHBFaHXlESiYEfyVjbEA+U2G4HJ09s\nFc+/MFxJE5db+QH3a1orNZXbhy2RTgi6+ISW4dpEXyu99jEAi6jWB/4nA3i6\niVue5BrHnCQxMD66FYPDZEwx9tzUICCZTDRTZJ5T4g27/J8HWylIBDplsezO\nSjAnv76+JQPIFP7NqUfU+GQnn5EI3Sh2ev4qAQjat0GdvQg9bRNAivv95oUf\nFYSBM2dyJSKBydfEIjrIStRGw9sTpkiHTDcmZsWmAl6ZnK7f25fK9/xYDGnM\niVnQwPZCPn/e6mv2A9VzLfbaV8OLiggVc/meuUfC9Yf84AGJZghBDHkvHwaa\nb0r4IGwmMXdWv0anEalTUuS/jbgX/6axu6hjF4XCEdNNBthuUtLOnjxAFwVa\nt0433IEBlc0dROlTz6Aat8IRzjlejhP8v1M+u7QLW36irs80rCj/3qjbogc2\nAL9Y363pafW3QuZjwx1QoWYdyMkst69pU4r3evtVnkQ2zV1Y/S/GgsMgv6Ji\nOf7eJBPfdNYDgmeMwW4iA10koZOgS1+ijQqYl2Ub+8do4oZgmugyiXRE/Gkt\nCMB5\r\n=SR3+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/muport.js","gitHead":"ae7aeffb879eeace01d285de4dabb713acb89854","scripts":{"test":"jest --coverage","build":"babel src --out-dir lib","prepublish":"npm run build","generate-readme":"cp readme-template.md README.md; ./node_modules/.bin/jsdoc2md -d 2 src/muport.js >> README.md"},"_npmUser":{"name":"oed","email":"oed3933@gmail.com"},"deprecated":"Deprecated in favor of Ceramic: https://developers.ceramic.network","repository":{"url":"git+https://github.com/uport-project/muport-core-js.git","type":"git"},"_npmVersion":"6.2.0","description":"Create and use µPort identities","directories":{"lib":"lib"},"_nodeVersion":"10.8.0","dependencies":{"bs58":"^4.0.1","bip39":"^2.5.0","ethers":"^3.0.24","did-jwt":"0.0.8","bluebird":"^3.5.1","ipfs-mini":"^1.1.2","tweetnacl":"^1.0.0","secrets.js":"^0.1.8","did-resolver":"0.0.4","web3-eth-abi":"^1.0.0-beta.34","babel-runtime":"^6.26.0","ethereumjs-tx":"^1.3.5","tweetnacl-util":"^0.15.0","ethereumjs-wallet":"^0.6.0","ethr-did-registry":"0.0.3","muport-did-resolver":"^0.2.0","ethereum-claims-registry":"0.0.4"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.1.2","jest":"^23.2.0","nock":"^9.3.3","web3":"^1.0.0-beta.34","babel-cli":"^6.26.0","ipfsd-ctl":"^0.37.5","ganache-cli":"^6.1.3","babel-preset-env":"^1.7.0","jsdoc-to-markdown":"^4.0.1","babel-plugin-transform-object-rest-spread":"^6.26.0"},"_npmOperationalInternal":{"tmp":"tmp/muport-core_0.4.0_1534404556336_0.723399857731228","host":"s3://npm-registry-packages"}},"0.4.0-beta-1":{"name":"muport-core","version":"0.4.0-beta-1","author":"","license":"Apache-2.0","_id":"muport-core@0.4.0-beta-1","maintainers":[{"name":"chrislundkvist","email":"christian.lundkvist@gmail.com"},{"name":"oed","email":"oed3933@gmail.com"}],"homepage":"https://github.com/uport-project/muport-core-js#readme","bugs":{"url":"https://github.com/uport-project/muport-core-js/issues"},"dist":{"shasum":"ba7f08f0987a082d6564b032f48badafd9fff9ad","tarball":"https://registry.npmjs.org/muport-core/-/muport-core-0.4.0-beta-1.tgz","fileCount":19,"integrity":"sha512-sCPU2bJG3rLfWYfJ+pI6iR3bgr4ZAKqNkY49jgPjDTj9eCWCOd0F2Tb5dLUd4aG4Qwt8mbJvOUOqNjbhVNnGrg==","signatures":[{"sig":"MEQCIGY/fn5h/NLiDLfHsiGD5bpcmJbtAAvAtrNQtgQ5trUNAiAwdRJRy+xeA1MKzbUGdnYW5xEUdtAaR1ebo+9m6LJbhg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":380927,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbknoCCRA9TVsSAnZWagAADL4QAILJP1YU83FGpJQrpIpC\nNbitKEyPGWEp5mR9aZXVYX8VPtnhykpZ0/4HiaXu3Qtu1rRqsa6Xpu2GiPv7\ndxYCs9gD8PaSOt+x7+3zxT6LkVTKl47t9NxExqnEOmcwslg1O4Ox5hr0ja8+\nX1qvqDvZDP8V2YFAiNsuh7rlv9xpVUm0finSuzbsPQtzBtMLZVe8aoDwvoGd\no9MquIFEvsqptXJiDivutRbQGF1tu56LdlKbecjun3819UdQ5qRNDpE0OfuJ\nL4ZHKueuR+vsl615VXaUGOKg2xlWlJaZrxr4IC/WiRlRu2IPaobudd1lgqYm\nyTSwkRPK4Joe/iPZnK1ByycNOEaaXiM8Ofx+Yi0dd8sksPItKNQDxvxQhhim\ngZ0GSsdn2lHbrcbaELizmm0K7sHVidoMjYoX+NtBaTtPwR/yf/2SizaYalBE\nm0x8yNlw96rv2vFLpHT+jhBSxUNrllbdY6IEWmJqfEf0Ne4UqVaiv4UQN42t\nx2QPAFw8v5FO6ayvn97I7O/HiuOWuuotyf6F8EqlwMOe/ovYahjk6L23OIMA\nyCI7nNNVO8QBRFbFRe1+G4VLzw8klsTAVf0+O43NWWYsAQOZ7v5sxodSWVl6\nylLTcyE6CFh4sxTJBNsQ78QAHPIABoYa6yrcBcTR3R7z38SiNJ0qP9z8WK8b\nRSz2\r\n=D66L\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/muport.js","readme":"# µPort core\n[![CircleCI](https://circleci.com/gh/uport-project/muport-core-js.svg?style=svg&circle-token=d007f3bfb7d76e05bea029ca9aa1dd523c97d453)](https://circleci.com/gh/uport-project/muport-core-js) [![codecov](https://codecov.io/gh/uport-project/muport-core-js/branch/master/graph/badge.svg?token=G53BcQfF8N)](https://codecov.io/gh/uport-project/muport-core-js)\n\nThis library is intended to be used to create, update, and recover µPort identities, as well as using the identity to sign and encrypt data.\n\n## Usage\nSimply install using npm\n```\n$ npm install muport-core\n```\nand then import into your project\n```js\nconst MuPort = require('muport-core')\n```\n\n<a name=\"MuPort\"></a>\n\n## MuPort\nPrimary object for interacting with a µPort identity. MuPort enables creation and\nupdating of µPort identities. It also provides functionality to sign claims and\nhelp other identities recover.\n\n**Kind**: global class  \n\n* [MuPort](#MuPort)\n    * [new MuPort(serializeState, [opts])](#new_MuPort_new)\n    * _instance_\n        * [.helpRecover(did)](#MuPort+helpRecover) ⇒ <code>Promise.&lt;String, Error&gt;</code>\n        * [.getDid()](#MuPort+getDid) ⇒ <code>String</code>\n        * [.getDidDocument()](#MuPort+getDidDocument) ⇒ <code>Object</code>\n        * [.getRecoveryDelegateDids()](#MuPort+getRecoveryDelegateDids) ⇒ <code>Array.&lt;String&gt;</code>\n        * [.updateIdentity(publicProfile, delegateDids)](#MuPort+updateIdentity) ⇒ <code>Promise.&lt;Object, Error&gt;</code>\n        * [.signJWT()](#MuPort+signJWT) ⇒ <code>Promise.&lt;String, Error&gt;</code>\n        * [.verifyJWT(jwt, audience)](#MuPort+verifyJWT) ⇒ <code>Promise.&lt;Object, Error&gt;</code>\n        * [.encrypt(msg, toPublic, nonce)](#MuPort+encrypt) ⇒ <code>Object</code>\n        * [.decrypt(ciphertext, fromPublic, nonce, toBuffer)](#MuPort+decrypt) ⇒ <code>String</code> \\| <code>Buffer</code>\n        * [.symEncrypt(msg, nonce)](#MuPort+symEncrypt) ⇒ <code>Object</code>\n        * [.symDecrypt(ciphertext, nonce, toBuffer)](#MuPort+symDecrypt) ⇒ <code>String</code> \\| <code>Buffer</code>\n        * [.serializeState()](#MuPort+serializeState) ⇒ <code>String</code>\n    * _static_\n        * [.newIdentity(publicProfile, delegateDids, [opts])](#MuPort.newIdentity) ⇒ <code>Promise.&lt;MuPort, Error&gt;</code>\n        * [.recoverIdentity(did, shares, [opts])](#MuPort.recoverIdentity) ⇒ <code>Promise.&lt;MuPort, Error&gt;</code>\n        * [.resolveIdentityDocument(did, [opts])](#MuPort.resolveIdentityDocument) ⇒ <code>Promise.&lt;Object, Error&gt;</code>\n\n<a name=\"new_MuPort_new\"></a>\n\n### new MuPort(serializeState, [opts])\nInstantiates a µPort identity from its serialized state.\n\n\n| Param | Type | Description |\n| --- | --- | --- |\n| serializeState | <code>String</code> | the serialized state of a µPort identity |\n| [opts] | <code>Object</code> | optional parameters |\n| opts.ipfsConf | <code>Object</code> | configuration options for ipfs-mini |\n| opts.rpcProviderUrl | <code>String</code> | rpc url to a custom ethereum node |\n\n<a name=\"MuPort+helpRecover\"></a>\n\n### muPort.helpRecover(did) ⇒ <code>Promise.&lt;String, Error&gt;</code>\nHelp another identity recover. Returns a decrypted share if the current identity is a delegate\nreturns undefined otherwise\n\n**Kind**: instance method of [<code>MuPort</code>](#MuPort)  \n**Returns**: <code>Promise.&lt;String, Error&gt;</code> - a share that the recovering identity can use  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| did | <code>String</code> | the did of the identity that should be recovered |\n\n<a name=\"MuPort+getDid\"></a>\n\n### muPort.getDid() ⇒ <code>String</code>\nThe DID is the identifier of the identity. This is a unique string that can be used to\nlook up information about the identity.\n\n**Kind**: instance method of [<code>MuPort</code>](#MuPort)  \n**Returns**: <code>String</code> - the DID  \n<a name=\"MuPort+getDidDocument\"></a>\n\n### muPort.getDidDocument() ⇒ <code>Object</code>\nThe DID Document is a json object that contains information such as public keys\n\n**Kind**: instance method of [<code>MuPort</code>](#MuPort)  \n**Returns**: <code>Object</code> - the DID Document  \n<a name=\"MuPort+getRecoveryDelegateDids\"></a>\n\n### muPort.getRecoveryDelegateDids() ⇒ <code>Array.&lt;String&gt;</code>\nThe recovery delegates that can help this identity recover\n\n**Kind**: instance method of [<code>MuPort</code>](#MuPort)  \n**Returns**: <code>Array.&lt;String&gt;</code> - an array containing the DIDs of the delegates  \n<a name=\"MuPort+updateIdentity\"></a>\n\n### muPort.updateIdentity(publicProfile, delegateDids) ⇒ <code>Promise.&lt;Object, Error&gt;</code>\nThis function is used to update the publicProfile and/or the recoveryNetwork of the identity.\nThe returned object has three properties; `address` an ethereum address, `costInEther` a number,\nand `finishUpdate` a function.\nIn order to complete the update of the delegates you have to\nsend `costInEther` ether to the `address` on mainnet (or other network if you are using\na custom config). Once that is done the `finishUpdate` function can be called. This\nfunction sends a transaction to the network that updates the identity. The function\nwill throw an error if there is to little ether in the `address`.\nBoth publicProfile and delegateDids are optional and you may pass null if you don't wish to\nupdate one of them.\n\n**Kind**: instance method of [<code>MuPort</code>](#MuPort)  \n**Returns**: <code>Promise.&lt;Object, Error&gt;</code> - an object with the data needed to finalize the update  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| publicProfile | <code>Object</code> | a new public profile for the identity |\n| delegateDids | <code>Array.&lt;String&gt;</code> | an array containing the 3 DIDs of the new delegates |\n\n<a name=\"MuPort+signJWT\"></a>\n\n### muPort.signJWT() ⇒ <code>Promise.&lt;String, Error&gt;</code>\nSigns the given payload (claim) and return a promis with the JWT.\n\n**Kind**: instance method of [<code>MuPort</code>](#MuPort)  \n**Returns**: <code>Promise.&lt;String, Error&gt;</code> - a promise that resolves to a JWT  \n<a name=\"MuPort+verifyJWT\"></a>\n\n### muPort.verifyJWT(jwt, audience) ⇒ <code>Promise.&lt;Object, Error&gt;</code>\nVerifies a JWT.\n\n**Kind**: instance method of [<code>MuPort</code>](#MuPort)  \n**Returns**: <code>Promise.&lt;Object, Error&gt;</code> - a promise that resolves to the decoded JWT  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| jwt | <code>String</code> |  | the JWT to verify |\n| audience | <code>String</code> | <code>this.did</code> | the audience, defaults to did of current identity |\n\n<a name=\"MuPort+encrypt\"></a>\n\n### muPort.encrypt(msg, toPublic, nonce) ⇒ <code>Object</code>\nAsymmetrically encrypt a message\n\n**Kind**: instance method of [<code>MuPort</code>](#MuPort)  \n**Returns**: <code>Object</code> - an object containing the nonce and the ciphertext  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| msg | <code>String</code> | the message to encrypt |\n| toPublic | <code>String</code> | the public key to encrypt to, encoded as a base64 string |\n| nonce | <code>String</code> | (optional) the nonce, encoded as a base64 string |\n\n<a name=\"MuPort+decrypt\"></a>\n\n### muPort.decrypt(ciphertext, fromPublic, nonce, toBuffer) ⇒ <code>String</code> \\| <code>Buffer</code>\nDecrypt an asymmetrically encrypted message\n\n**Kind**: instance method of [<code>MuPort</code>](#MuPort)  \n**Returns**: <code>String</code> \\| <code>Buffer</code> - the decrypted message  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| ciphertext | <code>String</code> | the ciphertext to decrypt, encoded as a base64 string |\n| fromPublic | <code>String</code> | the public key of the entity that encrypted the msg, encoded as a base64 string |\n| nonce | <code>String</code> | the nonce, encoded as a base64 string |\n| toBuffer | <code>Boolean</code> | a boolean deciding whether to |\n\n<a name=\"MuPort+symEncrypt\"></a>\n\n### muPort.symEncrypt(msg, nonce) ⇒ <code>Object</code>\nSymmetrically encrypt a message\n\n**Kind**: instance method of [<code>MuPort</code>](#MuPort)  \n**Returns**: <code>Object</code> - an object containing the nonce and the ciphertext  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| msg | <code>String</code> | the message to encrypt |\n| nonce | <code>String</code> | (optional) the nonce, encoded as a base64 string |\n\n<a name=\"MuPort+symDecrypt\"></a>\n\n### muPort.symDecrypt(ciphertext, nonce, toBuffer) ⇒ <code>String</code> \\| <code>Buffer</code>\nDecrypt a symmetrically encrypted message\n\n**Kind**: instance method of [<code>MuPort</code>](#MuPort)  \n**Returns**: <code>String</code> \\| <code>Buffer</code> - the decrypted message  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| ciphertext | <code>String</code> | the ciphertext to decrypt, encoded as a base64 string |\n| nonce | <code>String</code> | the nonce, encoded as a base64 string |\n| toBuffer | <code>Boolean</code> | a boolean deciding whether to |\n\n<a name=\"MuPort+serializeState\"></a>\n\n### muPort.serializeState() ⇒ <code>String</code>\nSerialize the state of the current identity to be able to reconstruct it later.\n\n**Kind**: instance method of [<code>MuPort</code>](#MuPort)  \n**Returns**: <code>String</code> - the serialized state  \n<a name=\"MuPort.newIdentity\"></a>\n\n### MuPort.newIdentity(publicProfile, delegateDids, [opts]) ⇒ <code>Promise.&lt;MuPort, Error&gt;</code>\nCreates a new µPort identity.\n\n**Kind**: static method of [<code>MuPort</code>](#MuPort)  \n**Returns**: <code>Promise.&lt;MuPort, Error&gt;</code> - a promise that resolves to an instance of the MuPort class  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| publicProfile | <code>Object</code> | a public profile for the new identity |\n| delegateDids | <code>Array.&lt;String&gt;</code> | three DIDs that can be used to recover the identity at a later point (optional) |\n| [opts] | <code>Object</code> | optional parameters |\n| opts.externalMgmtKey | <code>String</code> | an ethereum address to be used as an external managementKey |\n| opts.ipfsConf | <code>Object</code> | configuration options for ipfs-mini |\n| opts.rpcProviderUrl | <code>String</code> | rpc url to a custom ethereum node |\n\n<a name=\"MuPort.recoverIdentity\"></a>\n\n### MuPort.recoverIdentity(did, shares, [opts]) ⇒ <code>Promise.&lt;MuPort, Error&gt;</code>\nRecovers a µPort identity.\n\n**Kind**: static method of [<code>MuPort</code>](#MuPort)  \n**Returns**: <code>Promise.&lt;MuPort, Error&gt;</code> - a promise that resolves to an instance of the MuPort class  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| did | <code>String</code> | the DID of the identity to be recovered |\n| shares | <code>Array.&lt;String&gt;</code> | atleast two shares that your delegates helped recover |\n| [opts] | <code>Object</code> | optional parameters |\n| opts.ipfsConf | <code>Object</code> | configuration options for ipfs-mini |\n| opts.rpcProviderUrl | <code>String</code> | rpc url to a custom ethereum node |\n\n<a name=\"MuPort.resolveIdentityDocument\"></a>\n\n### MuPort.resolveIdentityDocument(did, [opts]) ⇒ <code>Promise.&lt;Object, Error&gt;</code>\nResovles the identity document for the given DID.\n\n**Kind**: static method of [<code>MuPort</code>](#MuPort)  \n**Returns**: <code>Promise.&lt;Object, Error&gt;</code> - a promise that resolves to the identity document  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| did | <code>String</code> | the DID of the identity |\n| [opts] | <code>Object</code> | optional parameters |\n| opts.ipfsConf | <code>Object</code> | configuration options for ipfs-mini |\n| opts.rpcProviderUrl | <code>String</code> | rpc url to a custom ethereum node |\n\n","gitHead":"ae7aeffb879eeace01d285de4dabb713acb89854","scripts":{"test":"jest --coverage","build":"babel src --out-dir lib","prepublish":"npm run build","generate-readme":"cp readme-template.md README.md; ./node_modules/.bin/jsdoc2md -d 2 src/muport.js >> README.md"},"_npmUser":{"name":"oed","email":"oed3933@gmail.com"},"repository":{"url":"git+https://github.com/uport-project/muport-core-js.git","type":"git"},"_npmVersion":"6.2.0","description":"Create and use µPort identities","directories":{"lib":"lib"},"_nodeVersion":"10.8.0","dependencies":{"bs58":"^4.0.1","bip39":"^2.5.0","ethers":"^3.0.24","did-jwt":"0.0.8","bluebird":"^3.5.1","sss-wasm":"^0.1.0","ipfs-mini":"^1.1.2","tweetnacl":"^1.0.0","did-resolver":"0.0.4","web3-eth-abi":"^1.0.0-beta.34","babel-runtime":"^6.26.0","ethereumjs-tx":"^1.3.5","tweetnacl-util":"^0.15.0","ethereumjs-wallet":"^0.6.0","ethr-did-registry":"0.0.3","muport-did-resolver":"^0.2.0","ethereum-claims-registry":"0.0.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^4.1.2","jest":"^23.2.0","nock":"^9.3.3","web3":"^1.0.0-beta.34","babel-cli":"^6.26.0","ipfsd-ctl":"^0.37.5","ganache-cli":"^6.1.3","babel-preset-env":"^1.7.0","jsdoc-to-markdown":"^4.0.1","babel-plugin-transform-runtime":"^6.23.0","babel-plugin-transform-object-rest-spread":"^6.26.0"},"_npmOperationalInternal":{"tmp":"tmp/muport-core_0.4.0-beta-1_1536326145636_0.5962890898226287","host":"s3://npm-registry-packages"}},"0.4.1-beta-1":{"name":"muport-core","version":"0.4.1-beta-1","author":"","license":"Apache-2.0","_id":"muport-core@0.4.1-beta-1","maintainers":[{"name":"chrislundkvist","email":"christian.lundkvist@gmail.com"},{"name":"oed","email":"oed3933@gmail.com"}],"homepage":"https://github.com/uport-project/muport-core-js#readme","bugs":{"url":"https://github.com/uport-project/muport-core-js/issues"},"dist":{"shasum":"455893352a76bf3baf4cdebaa34a74832e3d5f39","tarball":"https://registry.npmjs.org/muport-core/-/muport-core-0.4.1-beta-1.tgz","fileCount":19,"integrity":"sha512-LaQ9QfMvvIQE5sceSGDbBWNk1cC+Aw+O7CBGyz+LSL9Cx8pYbRj7jocK/uZajmemvi0v596ygrdZ3tD2odAUmw==","signatures":[{"sig":"MEUCIQCmbMUbvTu5tCEFG1coHa7xnvX4OBIoFdkCeBm3AVFJmwIgRbsqPRbdDJ18hKZYU+B4RSDTTKZiXLk6xIkVOhmtfRs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":380927,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbknoQCRA9TVsSAnZWagAAdMcP/iZaoav4s8n/H085oKu8\nqjy1BQ8Sfc8RZpj6odz4U4k/nBMpWz+Iz3DXvSE3o0R8ge4YyobW3t6azc3P\nvGV2lvmZrO0EW131dQqWhGkHsESxeWUkNO7SmkuLY0sNFc3+i4GblBiPXF8l\nLKlYSYSap33ougo3TO0JnF/XT7od9eu3l94xiM97PAmPp+g7ek0qBmhx4UsK\n78PSoGpjm3lCAfo3iMJEagiP1fUDhYRyYWeFEM+rem25LKtQSI1I4TSF0aUX\nrZP8oY5cIHgRZLezfJ2ZG7Nm8z/UUv4r+v3rNVHjT3ghL+THgEWkNZJYrLqX\nL+aJV6gwxqaceOGL1pZoo4rL1V3dW+YtOUnYeIxOxPWiQR4iCUKoSN5wX5b9\nXmm/4lwwV9w/jc+XxTLQ+YWpFQez21yOeJYj/BfnrIUmDQN5DebeNbSKvn2g\n72YVOlzq3D0Ct+XXrUA9Hne1oSQCRZ2ZUE78aXLF1oZqdy+GcOqdR0JAAN/2\nxaB+1uYTp3BAWzt9fbI2sQNrJDvDXlohfa0A5FWMyTlCwDNMJbFyY2aQu6BF\nxXabM6e6rt7K3J7UXePU0t4xLYgvUMbUoYqmJIYTO9JcOkwaRVP88RAY1J3u\nQKAhUpG3TdqOh9/UthKY7kRq96X9BnZ8nwFyEgP3M/vAQmevtqdYF/1rkigt\nBaVK\r\n=Qupy\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/muport.js","readme":"# µPort core\n[![CircleCI](https://circleci.com/gh/uport-project/muport-core-js.svg?style=svg&circle-token=d007f3bfb7d76e05bea029ca9aa1dd523c97d453)](https://circleci.com/gh/uport-project/muport-core-js) [![codecov](https://codecov.io/gh/uport-project/muport-core-js/branch/master/graph/badge.svg?token=G53BcQfF8N)](https://codecov.io/gh/uport-project/muport-core-js)\n\nThis library is intended to be used to create, update, and recover µPort identities, as well as using the identity to sign and encrypt data.\n\n## Usage\nSimply install using npm\n```\n$ npm install muport-core\n```\nand then import into your project\n```js\nconst MuPort = require('muport-core')\n```\n\n<a name=\"MuPort\"></a>\n\n## MuPort\nPrimary object for interacting with a µPort identity. MuPort enables creation and\nupdating of µPort identities. It also provides functionality to sign claims and\nhelp other identities recover.\n\n**Kind**: global class  \n\n* [MuPort](#MuPort)\n    * [new MuPort(serializeState, [opts])](#new_MuPort_new)\n    * _instance_\n        * [.helpRecover(did)](#MuPort+helpRecover) ⇒ <code>Promise.&lt;String, Error&gt;</code>\n        * [.getDid()](#MuPort+getDid) ⇒ <code>String</code>\n        * [.getDidDocument()](#MuPort+getDidDocument) ⇒ <code>Object</code>\n        * [.getRecoveryDelegateDids()](#MuPort+getRecoveryDelegateDids) ⇒ <code>Array.&lt;String&gt;</code>\n        * [.updateIdentity(publicProfile, delegateDids)](#MuPort+updateIdentity) ⇒ <code>Promise.&lt;Object, Error&gt;</code>\n        * [.signJWT()](#MuPort+signJWT) ⇒ <code>Promise.&lt;String, Error&gt;</code>\n        * [.verifyJWT(jwt, audience)](#MuPort+verifyJWT) ⇒ <code>Promise.&lt;Object, Error&gt;</code>\n        * [.encrypt(msg, toPublic, nonce)](#MuPort+encrypt) ⇒ <code>Object</code>\n        * [.decrypt(ciphertext, fromPublic, nonce, toBuffer)](#MuPort+decrypt) ⇒ <code>String</code> \\| <code>Buffer</code>\n        * [.symEncrypt(msg, nonce)](#MuPort+symEncrypt) ⇒ <code>Object</code>\n        * [.symDecrypt(ciphertext, nonce, toBuffer)](#MuPort+symDecrypt) ⇒ <code>String</code> \\| <code>Buffer</code>\n        * [.serializeState()](#MuPort+serializeState) ⇒ <code>String</code>\n    * _static_\n        * [.newIdentity(publicProfile, delegateDids, [opts])](#MuPort.newIdentity) ⇒ <code>Promise.&lt;MuPort, Error&gt;</code>\n        * [.recoverIdentity(did, shares, [opts])](#MuPort.recoverIdentity) ⇒ <code>Promise.&lt;MuPort, Error&gt;</code>\n        * [.resolveIdentityDocument(did, [opts])](#MuPort.resolveIdentityDocument) ⇒ <code>Promise.&lt;Object, Error&gt;</code>\n\n<a name=\"new_MuPort_new\"></a>\n\n### new MuPort(serializeState, [opts])\nInstantiates a µPort identity from its serialized state.\n\n\n| Param | Type | Description |\n| --- | --- | --- |\n| serializeState | <code>String</code> | the serialized state of a µPort identity |\n| [opts] | <code>Object</code> | optional parameters |\n| opts.ipfsConf | <code>Object</code> | configuration options for ipfs-mini |\n| opts.rpcProviderUrl | <code>String</code> | rpc url to a custom ethereum node |\n\n<a name=\"MuPort+helpRecover\"></a>\n\n### muPort.helpRecover(did) ⇒ <code>Promise.&lt;String, Error&gt;</code>\nHelp another identity recover. Returns a decrypted share if the current identity is a delegate\nreturns undefined otherwise\n\n**Kind**: instance method of [<code>MuPort</code>](#MuPort)  \n**Returns**: <code>Promise.&lt;String, Error&gt;</code> - a share that the recovering identity can use  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| did | <code>String</code> | the did of the identity that should be recovered |\n\n<a name=\"MuPort+getDid\"></a>\n\n### muPort.getDid() ⇒ <code>String</code>\nThe DID is the identifier of the identity. This is a unique string that can be used to\nlook up information about the identity.\n\n**Kind**: instance method of [<code>MuPort</code>](#MuPort)  \n**Returns**: <code>String</code> - the DID  \n<a name=\"MuPort+getDidDocument\"></a>\n\n### muPort.getDidDocument() ⇒ <code>Object</code>\nThe DID Document is a json object that contains information such as public keys\n\n**Kind**: instance method of [<code>MuPort</code>](#MuPort)  \n**Returns**: <code>Object</code> - the DID Document  \n<a name=\"MuPort+getRecoveryDelegateDids\"></a>\n\n### muPort.getRecoveryDelegateDids() ⇒ <code>Array.&lt;String&gt;</code>\nThe recovery delegates that can help this identity recover\n\n**Kind**: instance method of [<code>MuPort</code>](#MuPort)  \n**Returns**: <code>Array.&lt;String&gt;</code> - an array containing the DIDs of the delegates  \n<a name=\"MuPort+updateIdentity\"></a>\n\n### muPort.updateIdentity(publicProfile, delegateDids) ⇒ <code>Promise.&lt;Object, Error&gt;</code>\nThis function is used to update the publicProfile and/or the recoveryNetwork of the identity.\nThe returned object has three properties; `address` an ethereum address, `costInEther` a number,\nand `finishUpdate` a function.\nIn order to complete the update of the delegates you have to\nsend `costInEther` ether to the `address` on mainnet (or other network if you are using\na custom config). Once that is done the `finishUpdate` function can be called. This\nfunction sends a transaction to the network that updates the identity. The function\nwill throw an error if there is to little ether in the `address`.\nBoth publicProfile and delegateDids are optional and you may pass null if you don't wish to\nupdate one of them.\n\n**Kind**: instance method of [<code>MuPort</code>](#MuPort)  \n**Returns**: <code>Promise.&lt;Object, Error&gt;</code> - an object with the data needed to finalize the update  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| publicProfile | <code>Object</code> | a new public profile for the identity |\n| delegateDids | <code>Array.&lt;String&gt;</code> | an array containing the 3 DIDs of the new delegates |\n\n<a name=\"MuPort+signJWT\"></a>\n\n### muPort.signJWT() ⇒ <code>Promise.&lt;String, Error&gt;</code>\nSigns the given payload (claim) and return a promis with the JWT.\n\n**Kind**: instance method of [<code>MuPort</code>](#MuPort)  \n**Returns**: <code>Promise.&lt;String, Error&gt;</code> - a promise that resolves to a JWT  \n<a name=\"MuPort+verifyJWT\"></a>\n\n### muPort.verifyJWT(jwt, audience) ⇒ <code>Promise.&lt;Object, Error&gt;</code>\nVerifies a JWT.\n\n**Kind**: instance method of [<code>MuPort</code>](#MuPort)  \n**Returns**: <code>Promise.&lt;Object, Error&gt;</code> - a promise that resolves to the decoded JWT  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| jwt | <code>String</code> |  | the JWT to verify |\n| audience | <code>String</code> | <code>this.did</code> | the audience, defaults to did of current identity |\n\n<a name=\"MuPort+encrypt\"></a>\n\n### muPort.encrypt(msg, toPublic, nonce) ⇒ <code>Object</code>\nAsymmetrically encrypt a message\n\n**Kind**: instance method of [<code>MuPort</code>](#MuPort)  \n**Returns**: <code>Object</code> - an object containing the nonce and the ciphertext  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| msg | <code>String</code> | the message to encrypt |\n| toPublic | <code>String</code> | the public key to encrypt to, encoded as a base64 string |\n| nonce | <code>String</code> | (optional) the nonce, encoded as a base64 string |\n\n<a name=\"MuPort+decrypt\"></a>\n\n### muPort.decrypt(ciphertext, fromPublic, nonce, toBuffer) ⇒ <code>String</code> \\| <code>Buffer</code>\nDecrypt an asymmetrically encrypted message\n\n**Kind**: instance method of [<code>MuPort</code>](#MuPort)  \n**Returns**: <code>String</code> \\| <code>Buffer</code> - the decrypted message  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| ciphertext | <code>String</code> | the ciphertext to decrypt, encoded as a base64 string |\n| fromPublic | <code>String</code> | the public key of the entity that encrypted the msg, encoded as a base64 string |\n| nonce | <code>String</code> | the nonce, encoded as a base64 string |\n| toBuffer | <code>Boolean</code> | a boolean deciding whether to |\n\n<a name=\"MuPort+symEncrypt\"></a>\n\n### muPort.symEncrypt(msg, nonce) ⇒ <code>Object</code>\nSymmetrically encrypt a message\n\n**Kind**: instance method of [<code>MuPort</code>](#MuPort)  \n**Returns**: <code>Object</code> - an object containing the nonce and the ciphertext  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| msg | <code>String</code> | the message to encrypt |\n| nonce | <code>String</code> | (optional) the nonce, encoded as a base64 string |\n\n<a name=\"MuPort+symDecrypt\"></a>\n\n### muPort.symDecrypt(ciphertext, nonce, toBuffer) ⇒ <code>String</code> \\| <code>Buffer</code>\nDecrypt a symmetrically encrypted message\n\n**Kind**: instance method of [<code>MuPort</code>](#MuPort)  \n**Returns**: <code>String</code> \\| <code>Buffer</code> - the decrypted message  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| ciphertext | <code>String</code> | the ciphertext to decrypt, encoded as a base64 string |\n| nonce | <code>String</code> | the nonce, encoded as a base64 string |\n| toBuffer | <code>Boolean</code> | a boolean deciding whether to |\n\n<a name=\"MuPort+serializeState\"></a>\n\n### muPort.serializeState() ⇒ <code>String</code>\nSerialize the state of the current identity to be able to reconstruct it later.\n\n**Kind**: instance method of [<code>MuPort</code>](#MuPort)  \n**Returns**: <code>String</code> - the serialized state  \n<a name=\"MuPort.newIdentity\"></a>\n\n### MuPort.newIdentity(publicProfile, delegateDids, [opts]) ⇒ <code>Promise.&lt;MuPort, Error&gt;</code>\nCreates a new µPort identity.\n\n**Kind**: static method of [<code>MuPort</code>](#MuPort)  \n**Returns**: <code>Promise.&lt;MuPort, Error&gt;</code> - a promise that resolves to an instance of the MuPort class  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| publicProfile | <code>Object</code> | a public profile for the new identity |\n| delegateDids | <code>Array.&lt;String&gt;</code> | three DIDs that can be used to recover the identity at a later point (optional) |\n| [opts] | <code>Object</code> | optional parameters |\n| opts.externalMgmtKey | <code>String</code> | an ethereum address to be used as an external managementKey |\n| opts.ipfsConf | <code>Object</code> | configuration options for ipfs-mini |\n| opts.rpcProviderUrl | <code>String</code> | rpc url to a custom ethereum node |\n\n<a name=\"MuPort.recoverIdentity\"></a>\n\n### MuPort.recoverIdentity(did, shares, [opts]) ⇒ <code>Promise.&lt;MuPort, Error&gt;</code>\nRecovers a µPort identity.\n\n**Kind**: static method of [<code>MuPort</code>](#MuPort)  \n**Returns**: <code>Promise.&lt;MuPort, Error&gt;</code> - a promise that resolves to an instance of the MuPort class  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| did | <code>String</code> | the DID of the identity to be recovered |\n| shares | <code>Array.&lt;String&gt;</code> | atleast two shares that your delegates helped recover |\n| [opts] | <code>Object</code> | optional parameters |\n| opts.ipfsConf | <code>Object</code> | configuration options for ipfs-mini |\n| opts.rpcProviderUrl | <code>String</code> | rpc url to a custom ethereum node |\n\n<a name=\"MuPort.resolveIdentityDocument\"></a>\n\n### MuPort.resolveIdentityDocument(did, [opts]) ⇒ <code>Promise.&lt;Object, Error&gt;</code>\nResovles the identity document for the given DID.\n\n**Kind**: static method of [<code>MuPort</code>](#MuPort)  \n**Returns**: <code>Promise.&lt;Object, Error&gt;</code> - a promise that resolves to the identity document  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| did | <code>String</code> | the DID of the identity |\n| [opts] | <code>Object</code> | optional parameters |\n| opts.ipfsConf | <code>Object</code> | configuration options for ipfs-mini |\n| opts.rpcProviderUrl | <code>String</code> | rpc url to a custom ethereum node |\n\n","gitHead":"ae7aeffb879eeace01d285de4dabb713acb89854","scripts":{"test":"jest --coverage","build":"babel src --out-dir lib","prepublish":"npm run build","generate-readme":"cp readme-template.md README.md; ./node_modules/.bin/jsdoc2md -d 2 src/muport.js >> README.md"},"_npmUser":{"name":"oed","email":"oed3933@gmail.com"},"repository":{"url":"git+https://github.com/uport-project/muport-core-js.git","type":"git"},"_npmVersion":"6.2.0","description":"Create and use µPort identities","directories":{"lib":"lib"},"_nodeVersion":"10.8.0","dependencies":{"bs58":"^4.0.1","bip39":"^2.5.0","ethers":"^3.0.24","did-jwt":"0.0.8","bluebird":"^3.5.1","sss-wasm":"^0.1.0","ipfs-mini":"^1.1.2","tweetnacl":"^1.0.0","did-resolver":"0.0.4","web3-eth-abi":"^1.0.0-beta.34","babel-runtime":"^6.26.0","ethereumjs-tx":"^1.3.5","tweetnacl-util":"^0.15.0","ethereumjs-wallet":"^0.6.0","ethr-did-registry":"0.0.3","muport-did-resolver":"^0.2.0","ethereum-claims-registry":"0.0.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^4.1.2","jest":"^23.2.0","nock":"^9.3.3","web3":"^1.0.0-beta.34","babel-cli":"^6.26.0","ipfsd-ctl":"^0.37.5","ganache-cli":"^6.1.3","babel-preset-env":"^1.7.0","jsdoc-to-markdown":"^4.0.1","babel-plugin-transform-runtime":"^6.23.0","babel-plugin-transform-object-rest-spread":"^6.26.0"},"_npmOperationalInternal":{"tmp":"tmp/muport-core_0.4.1-beta-1_1536326159930_0.5341985593333314","host":"s3://npm-registry-packages"}},"0.4.1-beta-2":{"name":"muport-core","version":"0.4.1-beta-2","author":"","license":"Apache-2.0","_id":"muport-core@0.4.1-beta-2","maintainers":[{"name":"chrislundkvist","email":"christian.lundkvist@gmail.com"},{"name":"oed","email":"oed3933@gmail.com"}],"homepage":"https://github.com/uport-project/muport-core-js#readme","bugs":{"url":"https://github.com/uport-project/muport-core-js/issues"},"dist":{"shasum":"a1126f9943849ca284ba9c1b8d86de992c7e1513","tarball":"https://registry.npmjs.org/muport-core/-/muport-core-0.4.1-beta-2.tgz","fileCount":19,"integrity":"sha512-lUaYtwsUwojuFgNkUMQPGVuHbAR7Gw2IF1LLqv7zDFiHAmuH9FIOXkXwBGec6NlnQnNOcCre4RJagRRzrMgdsw==","signatures":[{"sig":"MEUCIQCUgLUL048OzKIvRQ0IN0kDkaHzUskHDQR8p3+veI+esgIgGkMSKkM8vCuvbLDAG542SoSaA7uQyPbYHrJMRHwPKOE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":379941,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbknsVCRA9TVsSAnZWagAA9nsQAJxzlcZdkNxzI24wrv4w\nKYJmhx0IigY0v462Njh5xWC2MBZzYd8eW+u6HShmEoEil8Zu1KQAIGkdwReY\nVBFs/N4J6C1iCaNwZDZ3l8OjZGMpOio6lHCy/Bunwu0iJhAgkp7AIZ/fkM9T\nXBBnJTft5MUQJkh97emrIGEzysPj6s2v4Cfrb8GVr2vv9VRJtLsfGlvDLZmB\njXRlmuZupccLII14DTE+WM8Kldbttmenmz4A+rkmUGVyfUVWjXnvQ8u6PFUf\nVdVcnA3HAwOhrSPJtk9HQUM0uE7YVNddMjqNMejGd4D9mmoLEmstCF/+Oss2\nfLAT+zzsIT2r6nBfUQQcGcW0WlxHpFMr0pkad267KgVfoUCXb46YWiuXW8Ka\nmMJy8G0lxmfpZg9ugFuJws5IiKA1rrKTbo30tQ7f3X7OKEDqO+9EPmcE1nIJ\ndbFubor1rQEuk7v1teodBPYgVLdegGM0CA1QXrsDmVD0YRLoFdYQC3jGG0zz\ngD8s7QVMhPc1+y+InP1baUCdSyOaRve1+xXqaC3THTrY4mknNnrqPTt927L2\nx6U6+MW6mZNfaE6Y4DIGPX7ZmCLj4BmW82D2qBXbDnoJtOb61a+e1mm0KXkK\nJtRywEc9isHfTlqoTFvKcPI1slpe6ywubS8TcVSWpIkiD2hjJuhu5lCfRQp3\naZJF\r\n=8Uw4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/muport.js","readme":"# µPort core\n[![CircleCI](https://circleci.com/gh/uport-project/muport-core-js.svg?style=svg&circle-token=d007f3bfb7d76e05bea029ca9aa1dd523c97d453)](https://circleci.com/gh/uport-project/muport-core-js) [![codecov](https://codecov.io/gh/uport-project/muport-core-js/branch/master/graph/badge.svg?token=G53BcQfF8N)](https://codecov.io/gh/uport-project/muport-core-js)\n\nThis library is intended to be used to create, update, and recover µPort identities, as well as using the identity to sign and encrypt data.\n\n## Usage\nSimply install using npm\n```\n$ npm install muport-core\n```\nand then import into your project\n```js\nconst MuPort = require('muport-core')\n```\n\n<a name=\"MuPort\"></a>\n\n## MuPort\nPrimary object for interacting with a µPort identity. MuPort enables creation and\nupdating of µPort identities. It also provides functionality to sign claims and\nhelp other identities recover.\n\n**Kind**: global class  \n\n* [MuPort](#MuPort)\n    * [new MuPort(serializeState, [opts])](#new_MuPort_new)\n    * _instance_\n        * [.helpRecover(did)](#MuPort+helpRecover) ⇒ <code>Promise.&lt;String, Error&gt;</code>\n        * [.getDid()](#MuPort+getDid) ⇒ <code>String</code>\n        * [.getDidDocument()](#MuPort+getDidDocument) ⇒ <code>Object</code>\n        * [.getRecoveryDelegateDids()](#MuPort+getRecoveryDelegateDids) ⇒ <code>Array.&lt;String&gt;</code>\n        * [.updateIdentity(publicProfile, delegateDids)](#MuPort+updateIdentity) ⇒ <code>Promise.&lt;Object, Error&gt;</code>\n        * [.signJWT()](#MuPort+signJWT) ⇒ <code>Promise.&lt;String, Error&gt;</code>\n        * [.verifyJWT(jwt, audience)](#MuPort+verifyJWT) ⇒ <code>Promise.&lt;Object, Error&gt;</code>\n        * [.encrypt(msg, toPublic, nonce)](#MuPort+encrypt) ⇒ <code>Object</code>\n        * [.decrypt(ciphertext, fromPublic, nonce, toBuffer)](#MuPort+decrypt) ⇒ <code>String</code> \\| <code>Buffer</code>\n        * [.symEncrypt(msg, nonce)](#MuPort+symEncrypt) ⇒ <code>Object</code>\n        * [.symDecrypt(ciphertext, nonce, toBuffer)](#MuPort+symDecrypt) ⇒ <code>String</code> \\| <code>Buffer</code>\n        * [.serializeState()](#MuPort+serializeState) ⇒ <code>String</code>\n    * _static_\n        * [.newIdentity(publicProfile, delegateDids, [opts])](#MuPort.newIdentity) ⇒ <code>Promise.&lt;MuPort, Error&gt;</code>\n        * [.recoverIdentity(did, shares, [opts])](#MuPort.recoverIdentity) ⇒ <code>Promise.&lt;MuPort, Error&gt;</code>\n        * [.resolveIdentityDocument(did, [opts])](#MuPort.resolveIdentityDocument) ⇒ <code>Promise.&lt;Object, Error&gt;</code>\n\n<a name=\"new_MuPort_new\"></a>\n\n### new MuPort(serializeState, [opts])\nInstantiates a µPort identity from its serialized state.\n\n\n| Param | Type | Description |\n| --- | --- | --- |\n| serializeState | <code>String</code> | the serialized state of a µPort identity |\n| [opts] | <code>Object</code> | optional parameters |\n| opts.ipfsConf | <code>Object</code> | configuration options for ipfs-mini |\n| opts.rpcProviderUrl | <code>String</code> | rpc url to a custom ethereum node |\n\n<a name=\"MuPort+helpRecover\"></a>\n\n### muPort.helpRecover(did) ⇒ <code>Promise.&lt;String, Error&gt;</code>\nHelp another identity recover. Returns a decrypted share if the current identity is a delegate\nreturns undefined otherwise\n\n**Kind**: instance method of [<code>MuPort</code>](#MuPort)  \n**Returns**: <code>Promise.&lt;String, Error&gt;</code> - a share that the recovering identity can use  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| did | <code>String</code> | the did of the identity that should be recovered |\n\n<a name=\"MuPort+getDid\"></a>\n\n### muPort.getDid() ⇒ <code>String</code>\nThe DID is the identifier of the identity. This is a unique string that can be used to\nlook up information about the identity.\n\n**Kind**: instance method of [<code>MuPort</code>](#MuPort)  \n**Returns**: <code>String</code> - the DID  \n<a name=\"MuPort+getDidDocument\"></a>\n\n### muPort.getDidDocument() ⇒ <code>Object</code>\nThe DID Document is a json object that contains information such as public keys\n\n**Kind**: instance method of [<code>MuPort</code>](#MuPort)  \n**Returns**: <code>Object</code> - the DID Document  \n<a name=\"MuPort+getRecoveryDelegateDids\"></a>\n\n### muPort.getRecoveryDelegateDids() ⇒ <code>Array.&lt;String&gt;</code>\nThe recovery delegates that can help this identity recover\n\n**Kind**: instance method of [<code>MuPort</code>](#MuPort)  \n**Returns**: <code>Array.&lt;String&gt;</code> - an array containing the DIDs of the delegates  \n<a name=\"MuPort+updateIdentity\"></a>\n\n### muPort.updateIdentity(publicProfile, delegateDids) ⇒ <code>Promise.&lt;Object, Error&gt;</code>\nThis function is used to update the publicProfile and/or the recoveryNetwork of the identity.\nThe returned object has three properties; `address` an ethereum address, `costInEther` a number,\nand `finishUpdate` a function.\nIn order to complete the update of the delegates you have to\nsend `costInEther` ether to the `address` on mainnet (or other network if you are using\na custom config). Once that is done the `finishUpdate` function can be called. This\nfunction sends a transaction to the network that updates the identity. The function\nwill throw an error if there is to little ether in the `address`.\nBoth publicProfile and delegateDids are optional and you may pass null if you don't wish to\nupdate one of them.\n\n**Kind**: instance method of [<code>MuPort</code>](#MuPort)  \n**Returns**: <code>Promise.&lt;Object, Error&gt;</code> - an object with the data needed to finalize the update  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| publicProfile | <code>Object</code> | a new public profile for the identity |\n| delegateDids | <code>Array.&lt;String&gt;</code> | an array containing the 3 DIDs of the new delegates |\n\n<a name=\"MuPort+signJWT\"></a>\n\n### muPort.signJWT() ⇒ <code>Promise.&lt;String, Error&gt;</code>\nSigns the given payload (claim) and return a promis with the JWT.\n\n**Kind**: instance method of [<code>MuPort</code>](#MuPort)  \n**Returns**: <code>Promise.&lt;String, Error&gt;</code> - a promise that resolves to a JWT  \n<a name=\"MuPort+verifyJWT\"></a>\n\n### muPort.verifyJWT(jwt, audience) ⇒ <code>Promise.&lt;Object, Error&gt;</code>\nVerifies a JWT.\n\n**Kind**: instance method of [<code>MuPort</code>](#MuPort)  \n**Returns**: <code>Promise.&lt;Object, Error&gt;</code> - a promise that resolves to the decoded JWT  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| jwt | <code>String</code> |  | the JWT to verify |\n| audience | <code>String</code> | <code>this.did</code> | the audience, defaults to did of current identity |\n\n<a name=\"MuPort+encrypt\"></a>\n\n### muPort.encrypt(msg, toPublic, nonce) ⇒ <code>Object</code>\nAsymmetrically encrypt a message\n\n**Kind**: instance method of [<code>MuPort</code>](#MuPort)  \n**Returns**: <code>Object</code> - an object containing the nonce and the ciphertext  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| msg | <code>String</code> | the message to encrypt |\n| toPublic | <code>String</code> | the public key to encrypt to, encoded as a base64 string |\n| nonce | <code>String</code> | (optional) the nonce, encoded as a base64 string |\n\n<a name=\"MuPort+decrypt\"></a>\n\n### muPort.decrypt(ciphertext, fromPublic, nonce, toBuffer) ⇒ <code>String</code> \\| <code>Buffer</code>\nDecrypt an asymmetrically encrypted message\n\n**Kind**: instance method of [<code>MuPort</code>](#MuPort)  \n**Returns**: <code>String</code> \\| <code>Buffer</code> - the decrypted message  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| ciphertext | <code>String</code> | the ciphertext to decrypt, encoded as a base64 string |\n| fromPublic | <code>String</code> | the public key of the entity that encrypted the msg, encoded as a base64 string |\n| nonce | <code>String</code> | the nonce, encoded as a base64 string |\n| toBuffer | <code>Boolean</code> | a boolean deciding whether to |\n\n<a name=\"MuPort+symEncrypt\"></a>\n\n### muPort.symEncrypt(msg, nonce) ⇒ <code>Object</code>\nSymmetrically encrypt a message\n\n**Kind**: instance method of [<code>MuPort</code>](#MuPort)  \n**Returns**: <code>Object</code> - an object containing the nonce and the ciphertext  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| msg | <code>String</code> | the message to encrypt |\n| nonce | <code>String</code> | (optional) the nonce, encoded as a base64 string |\n\n<a name=\"MuPort+symDecrypt\"></a>\n\n### muPort.symDecrypt(ciphertext, nonce, toBuffer) ⇒ <code>String</code> \\| <code>Buffer</code>\nDecrypt a symmetrically encrypted message\n\n**Kind**: instance method of [<code>MuPort</code>](#MuPort)  \n**Returns**: <code>String</code> \\| <code>Buffer</code> - the decrypted message  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| ciphertext | <code>String</code> | the ciphertext to decrypt, encoded as a base64 string |\n| nonce | <code>String</code> | the nonce, encoded as a base64 string |\n| toBuffer | <code>Boolean</code> | a boolean deciding whether to |\n\n<a name=\"MuPort+serializeState\"></a>\n\n### muPort.serializeState() ⇒ <code>String</code>\nSerialize the state of the current identity to be able to reconstruct it later.\n\n**Kind**: instance method of [<code>MuPort</code>](#MuPort)  \n**Returns**: <code>String</code> - the serialized state  \n<a name=\"MuPort.newIdentity\"></a>\n\n### MuPort.newIdentity(publicProfile, delegateDids, [opts]) ⇒ <code>Promise.&lt;MuPort, Error&gt;</code>\nCreates a new µPort identity.\n\n**Kind**: static method of [<code>MuPort</code>](#MuPort)  \n**Returns**: <code>Promise.&lt;MuPort, Error&gt;</code> - a promise that resolves to an instance of the MuPort class  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| publicProfile | <code>Object</code> | a public profile for the new identity |\n| delegateDids | <code>Array.&lt;String&gt;</code> | three DIDs that can be used to recover the identity at a later point (optional) |\n| [opts] | <code>Object</code> | optional parameters |\n| opts.externalMgmtKey | <code>String</code> | an ethereum address to be used as an external managementKey |\n| opts.ipfsConf | <code>Object</code> | configuration options for ipfs-mini |\n| opts.rpcProviderUrl | <code>String</code> | rpc url to a custom ethereum node |\n\n<a name=\"MuPort.recoverIdentity\"></a>\n\n### MuPort.recoverIdentity(did, shares, [opts]) ⇒ <code>Promise.&lt;MuPort, Error&gt;</code>\nRecovers a µPort identity.\n\n**Kind**: static method of [<code>MuPort</code>](#MuPort)  \n**Returns**: <code>Promise.&lt;MuPort, Error&gt;</code> - a promise that resolves to an instance of the MuPort class  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| did | <code>String</code> | the DID of the identity to be recovered |\n| shares | <code>Array.&lt;String&gt;</code> | atleast two shares that your delegates helped recover |\n| [opts] | <code>Object</code> | optional parameters |\n| opts.ipfsConf | <code>Object</code> | configuration options for ipfs-mini |\n| opts.rpcProviderUrl | <code>String</code> | rpc url to a custom ethereum node |\n\n<a name=\"MuPort.resolveIdentityDocument\"></a>\n\n### MuPort.resolveIdentityDocument(did, [opts]) ⇒ <code>Promise.&lt;Object, Error&gt;</code>\nResovles the identity document for the given DID.\n\n**Kind**: static method of [<code>MuPort</code>](#MuPort)  \n**Returns**: <code>Promise.&lt;Object, Error&gt;</code> - a promise that resolves to the identity document  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| did | <code>String</code> | the DID of the identity |\n| [opts] | <code>Object</code> | optional parameters |\n| opts.ipfsConf | <code>Object</code> | configuration options for ipfs-mini |\n| opts.rpcProviderUrl | <code>String</code> | rpc url to a custom ethereum node |\n\n","gitHead":"ae7aeffb879eeace01d285de4dabb713acb89854","scripts":{"test":"jest --coverage","build":"babel src --out-dir lib","prepublish":"npm run build","generate-readme":"cp readme-template.md README.md; ./node_modules/.bin/jsdoc2md -d 2 src/muport.js >> README.md"},"_npmUser":{"name":"oed","email":"oed3933@gmail.com"},"repository":{"url":"git+https://github.com/uport-project/muport-core-js.git","type":"git"},"_npmVersion":"6.2.0","description":"Create and use µPort identities","directories":{"lib":"lib"},"_nodeVersion":"10.8.0","dependencies":{"bs58":"^4.0.1","bip39":"^2.5.0","ethers":"^3.0.24","did-jwt":"0.0.8","bluebird":"^3.5.1","ipfs-mini":"^1.1.2","tweetnacl":"^1.0.0","secrets.js":"^0.1.8","did-resolver":"0.0.4","web3-eth-abi":"^1.0.0-beta.34","babel-runtime":"^6.26.0","ethereumjs-tx":"^1.3.5","tweetnacl-util":"^0.15.0","ethereumjs-wallet":"^0.6.0","ethr-did-registry":"0.0.3","muport-did-resolver":"^0.2.0","ethereum-claims-registry":"0.0.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^4.1.2","jest":"^23.2.0","nock":"^9.3.3","web3":"^1.0.0-beta.34","babel-cli":"^6.26.0","ipfsd-ctl":"^0.37.5","ganache-cli":"^6.1.3","babel-preset-env":"^1.7.0","jsdoc-to-markdown":"^4.0.1","babel-plugin-transform-runtime":"^6.23.0","babel-plugin-transform-object-rest-spread":"^6.26.0"},"_npmOperationalInternal":{"tmp":"tmp/muport-core_0.4.1-beta-2_1536326420996_0.22623695133020805","host":"s3://npm-registry-packages"}},"0.4.1":{"name":"muport-core","version":"0.4.1","author":"","license":"Apache-2.0","_id":"muport-core@0.4.1","maintainers":[{"name":"chrislundkvist","email":"christian.lundkvist@gmail.com"},{"name":"oed","email":"oed3933@gmail.com"}],"homepage":"https://github.com/uport-project/muport-core-js#readme","bugs":{"url":"https://github.com/uport-project/muport-core-js/issues"},"dist":{"shasum":"f9ad33cdaa48a8a3e936c41061b7438700266993","tarball":"https://registry.npmjs.org/muport-core/-/muport-core-0.4.1.tgz","fileCount":19,"integrity":"sha512-ZTm5KkU3w+40263M6tqPd60mgjM8Im3SB7+ek7UH1heRweJEJW8Ltynv9omhSOmPXoP2Isi9MTRtyAbxeB/O8g==","signatures":[{"sig":"MEUCIQDOQ6LNm0qExS3WsU5chPLUKvwkH54XhghfKy3Kd308mwIgHwMG+oh8UIh+kM6VxDOUDFQrsmq55Ph+EHq5cLTUK3A=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":380027,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbkn+MCRA9TVsSAnZWagAAE2gQAJNdxW9XUpiExktgYic/\nnJ6Ja5n5+cK7MIOFvGjN9tJfW3gAfy0JjRXa0BfgcbAah3yeZ0MPf5t95QIS\nx29Yati1//N7iLzX+M0qI3bmxFfHxPf4GqpQb22hoUCcaGejhsf4ONmdlKOX\nHFY4iFqL968zHIe/Gh4OcgSHNHXm4TeqOcfQNSL222vP4XzMrdweXpeqAROS\nbB3rLIhdTj1ak5r7HTyNiGu65UqYLne6THdOgRSlnS5gGS7Hg5S5cbrd8bEf\nVr66hMBW51TdJPMvNNTn+fQAQqzA33aqiODjbz0fi84t/kaWgt4XpK7Wv91D\nyFs/DksBHMrhj62SfFnduYX0hYdW90s8rs2DZXk8Jw5nhPVpotaVrxgt1Zyf\nnyKaD9MUUkemArXD7OEYAEXiVXpqhpMVpPkwUvb0DX+zHM6nvYQztgA2HRpC\ntWnV/kXTcfjfLtr2Ba3xuyJRxc3C1YCnclK4RtfU7HOt8VA0uHQQPOyn1F+3\nLolmUH+tK24gQwBPBQ0MLvjn9+aPp+ueULBkjlqaX5/3Jyokvnc+u1dS2AKI\n14WH1LUl61zpy6iA2rJRU2tLMXwac72MdmmDyC8dNfLoDCSDOFfGkwxGaEHS\nUPO/dmLX5JME9kIH37zM4q0u0AfIxpmT0YXMUrMc+bol5Aj+nnKxureTbjbQ\n663n\r\n=Lbqv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/muport.js","gitHead":"b23862e08468bf18a82e7fa87fa3491ddc9b0ba8","scripts":{"test":"jest --coverage","build":"babel src --out-dir lib","prepublish":"npm run build","generate-readme":"cp readme-template.md README.md; ./node_modules/.bin/jsdoc2md -d 2 src/muport.js >> README.md"},"_npmUser":{"name":"oed","email":"oed3933@gmail.com"},"deprecated":"Deprecated in favor of Ceramic: https://developers.ceramic.network","repository":{"url":"git+https://github.com/uport-project/muport-core-js.git","type":"git"},"_npmVersion":"6.2.0","description":"Create and use µPort identities","directories":{"lib":"lib"},"_nodeVersion":"10.8.0","dependencies":{"bs58":"^4.0.1","bip39":"^2.5.0","ethers":"^3.0.24","did-jwt":"0.0.8","bluebird":"^3.5.1","ipfs-mini":"^1.1.2","tweetnacl":"^1.0.0","secrets.js":"^0.1.8","did-resolver":"0.0.4","web3-eth-abi":"^1.0.0-beta.34","babel-runtime":"^6.26.0","ethereumjs-tx":"^1.3.5","tweetnacl-util":"^0.15.0","ethereumjs-wallet":"^0.6.0","ethr-did-registry":"0.0.3","muport-did-resolver":"^0.2.0","ethereum-claims-registry":"0.0.4"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.1.2","jest":"^23.2.0","nock":"^9.3.3","web3":"^1.0.0-beta.34","babel-cli":"^6.26.0","ipfsd-ctl":"^0.37.5","ganache-cli":"^6.1.3","babel-preset-env":"^1.7.0","jsdoc-to-markdown":"^4.0.1","babel-plugin-transform-runtime":"^6.23.0","babel-plugin-transform-object-rest-spread":"^6.26.0"},"_npmOperationalInternal":{"tmp":"tmp/muport-core_0.4.1_1536327563841_0.0877917048742769","host":"s3://npm-registry-packages"}}},"time":{"created":"2018-03-19T17:30:16.745Z","modified":"2024-10-23T15:43:15.723Z","0.1.2":"2018-03-19T17:30:04.463Z","0.0.1-security":"2018-03-19T17:30:16.801Z","0.2.0":"2018-04-17T16:44:42.621Z","0.2.1":"2018-04-19T13:47:02.231Z","0.2.3":"2018-04-19T21:04:29.949Z","0.2.4":"2018-04-20T15:46:41.155Z","0.3.0-beta-1":"2018-05-08T17:05:02.656Z","0.3.0-beta-2":"2018-05-09T07:48:01.088Z","0.3.0-beta-3":"2018-05-09T12:28:57.298Z","0.3.0":"2018-05-10T09:29:56.618Z","0.3.1":"2018-06-05T11:04:03.534Z","0.4.0":"2018-08-16T07:29:16.395Z","0.4.0-beta-1":"2018-09-07T13:15:45.772Z","0.4.1-beta-1":"2018-09-07T13:16:00.110Z","0.4.1-beta-2":"2018-09-07T13:20:21.166Z","0.4.1":"2018-09-07T13:39:24.025Z"},"bugs":{"url":"https://github.com/uport-project/muport-core-js/issues"},"license":"Apache-2.0","homepage":"https://github.com/uport-project/muport-core-js#readme","repository":{"url":"git+https://github.com/uport-project/muport-core-js.git","type":"git"},"description":"Create and use µPort identities","maintainers":[{"email":"oed@3box.io","name":"oed"},{"email":"christian.lundkvist@gmail.com","name":"chrislundkvist"}],"readme":"# µPort core\n[![CircleCI](https://circleci.com/gh/uport-project/muport-core-js.svg?style=svg&circle-token=d007f3bfb7d76e05bea029ca9aa1dd523c97d453)](https://circleci.com/gh/uport-project/muport-core-js) [![codecov](https://codecov.io/gh/uport-project/muport-core-js/branch/master/graph/badge.svg?token=G53BcQfF8N)](https://codecov.io/gh/uport-project/muport-core-js)\n\nThis library is intended to be used to create, update, and recover µPort identities, as well as using the identity to sign and encrypt data.\n\n## Usage\nSimply install using npm\n```\n$ npm install muport-core\n```\nand then import into your project\n```js\nconst MuPort = require('muport-core')\n```\n\n<a name=\"MuPort\"></a>\n\n## MuPort\nPrimary object for interacting with a µPort identity. MuPort enables creation and\nupdating of µPort identities. It also provides functionality to sign claims and\nhelp other identities recover.\n\n**Kind**: global class  \n\n* [MuPort](#MuPort)\n    * [new MuPort(serializeState, [opts])](#new_MuPort_new)\n    * _instance_\n        * [.helpRecover(did)](#MuPort+helpRecover) ⇒ <code>Promise.&lt;String, Error&gt;</code>\n        * [.getDid()](#MuPort+getDid) ⇒ <code>String</code>\n        * [.getDidDocument()](#MuPort+getDidDocument) ⇒ <code>Object</code>\n        * [.getRecoveryDelegateDids()](#MuPort+getRecoveryDelegateDids) ⇒ <code>Array.&lt;String&gt;</code>\n        * [.updateIdentity(publicProfile, delegateDids)](#MuPort+updateIdentity) ⇒ <code>Promise.&lt;Object, Error&gt;</code>\n        * [.signJWT()](#MuPort+signJWT) ⇒ <code>Promise.&lt;String, Error&gt;</code>\n        * [.verifyJWT(jwt, audience)](#MuPort+verifyJWT) ⇒ <code>Promise.&lt;Object, Error&gt;</code>\n        * [.encrypt(msg, toPublic, nonce)](#MuPort+encrypt) ⇒ <code>Object</code>\n        * [.decrypt(ciphertext, fromPublic, nonce, toBuffer)](#MuPort+decrypt) ⇒ <code>String</code> \\| <code>Buffer</code>\n        * [.symEncrypt(msg, nonce)](#MuPort+symEncrypt) ⇒ <code>Object</code>\n        * [.symDecrypt(ciphertext, nonce, toBuffer)](#MuPort+symDecrypt) ⇒ <code>String</code> \\| <code>Buffer</code>\n        * [.serializeState()](#MuPort+serializeState) ⇒ <code>String</code>\n    * _static_\n        * [.newIdentity(publicProfile, delegateDids, [opts])](#MuPort.newIdentity) ⇒ <code>Promise.&lt;MuPort, Error&gt;</code>\n        * [.recoverIdentity(did, shares, [opts])](#MuPort.recoverIdentity) ⇒ <code>Promise.&lt;MuPort, Error&gt;</code>\n        * [.resolveIdentityDocument(did, [opts])](#MuPort.resolveIdentityDocument) ⇒ <code>Promise.&lt;Object, Error&gt;</code>\n\n<a name=\"new_MuPort_new\"></a>\n\n### new MuPort(serializeState, [opts])\nInstantiates a µPort identity from its serialized state.\n\n\n| Param | Type | Description |\n| --- | --- | --- |\n| serializeState | <code>String</code> | the serialized state of a µPort identity |\n| [opts] | <code>Object</code> | optional parameters |\n| opts.ipfsConf | <code>Object</code> | configuration options for ipfs-mini |\n| opts.rpcProviderUrl | <code>String</code> | rpc url to a custom ethereum node |\n\n<a name=\"MuPort+helpRecover\"></a>\n\n### muPort.helpRecover(did) ⇒ <code>Promise.&lt;String, Error&gt;</code>\nHelp another identity recover. Returns a decrypted share if the current identity is a delegate\nreturns undefined otherwise\n\n**Kind**: instance method of [<code>MuPort</code>](#MuPort)  \n**Returns**: <code>Promise.&lt;String, Error&gt;</code> - a share that the recovering identity can use  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| did | <code>String</code> | the did of the identity that should be recovered |\n\n<a name=\"MuPort+getDid\"></a>\n\n### muPort.getDid() ⇒ <code>String</code>\nThe DID is the identifier of the identity. This is a unique string that can be used to\nlook up information about the identity.\n\n**Kind**: instance method of [<code>MuPort</code>](#MuPort)  \n**Returns**: <code>String</code> - the DID  \n<a name=\"MuPort+getDidDocument\"></a>\n\n### muPort.getDidDocument() ⇒ <code>Object</code>\nThe DID Document is a json object that contains information such as public keys\n\n**Kind**: instance method of [<code>MuPort</code>](#MuPort)  \n**Returns**: <code>Object</code> - the DID Document  \n<a name=\"MuPort+getRecoveryDelegateDids\"></a>\n\n### muPort.getRecoveryDelegateDids() ⇒ <code>Array.&lt;String&gt;</code>\nThe recovery delegates that can help this identity recover\n\n**Kind**: instance method of [<code>MuPort</code>](#MuPort)  \n**Returns**: <code>Array.&lt;String&gt;</code> - an array containing the DIDs of the delegates  \n<a name=\"MuPort+updateIdentity\"></a>\n\n### muPort.updateIdentity(publicProfile, delegateDids) ⇒ <code>Promise.&lt;Object, Error&gt;</code>\nThis function is used to update the publicProfile and/or the recoveryNetwork of the identity.\nThe returned object has three properties; `address` an ethereum address, `costInEther` a number,\nand `finishUpdate` a function.\nIn order to complete the update of the delegates you have to\nsend `costInEther` ether to the `address` on mainnet (or other network if you are using\na custom config). Once that is done the `finishUpdate` function can be called. This\nfunction sends a transaction to the network that updates the identity. The function\nwill throw an error if there is to little ether in the `address`.\nBoth publicProfile and delegateDids are optional and you may pass null if you don't wish to\nupdate one of them.\n\n**Kind**: instance method of [<code>MuPort</code>](#MuPort)  \n**Returns**: <code>Promise.&lt;Object, Error&gt;</code> - an object with the data needed to finalize the update  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| publicProfile | <code>Object</code> | a new public profile for the identity |\n| delegateDids | <code>Array.&lt;String&gt;</code> | an array containing the 3 DIDs of the new delegates |\n\n<a name=\"MuPort+signJWT\"></a>\n\n### muPort.signJWT() ⇒ <code>Promise.&lt;String, Error&gt;</code>\nSigns the given payload (claim) and return a promis with the JWT.\n\n**Kind**: instance method of [<code>MuPort</code>](#MuPort)  \n**Returns**: <code>Promise.&lt;String, Error&gt;</code> - a promise that resolves to a JWT  \n<a name=\"MuPort+verifyJWT\"></a>\n\n### muPort.verifyJWT(jwt, audience) ⇒ <code>Promise.&lt;Object, Error&gt;</code>\nVerifies a JWT.\n\n**Kind**: instance method of [<code>MuPort</code>](#MuPort)  \n**Returns**: <code>Promise.&lt;Object, Error&gt;</code> - a promise that resolves to the decoded JWT  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| jwt | <code>String</code> |  | the JWT to verify |\n| audience | <code>String</code> | <code>this.did</code> | the audience, defaults to did of current identity |\n\n<a name=\"MuPort+encrypt\"></a>\n\n### muPort.encrypt(msg, toPublic, nonce) ⇒ <code>Object</code>\nAsymmetrically encrypt a message\n\n**Kind**: instance method of [<code>MuPort</code>](#MuPort)  \n**Returns**: <code>Object</code> - an object containing the nonce and the ciphertext  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| msg | <code>String</code> | the message to encrypt |\n| toPublic | <code>String</code> | the public key to encrypt to, encoded as a base64 string |\n| nonce | <code>String</code> | (optional) the nonce, encoded as a base64 string |\n\n<a name=\"MuPort+decrypt\"></a>\n\n### muPort.decrypt(ciphertext, fromPublic, nonce, toBuffer) ⇒ <code>String</code> \\| <code>Buffer</code>\nDecrypt an asymmetrically encrypted message\n\n**Kind**: instance method of [<code>MuPort</code>](#MuPort)  \n**Returns**: <code>String</code> \\| <code>Buffer</code> - the decrypted message  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| ciphertext | <code>String</code> | the ciphertext to decrypt, encoded as a base64 string |\n| fromPublic | <code>String</code> | the public key of the entity that encrypted the msg, encoded as a base64 string |\n| nonce | <code>String</code> | the nonce, encoded as a base64 string |\n| toBuffer | <code>Boolean</code> | a boolean deciding whether to |\n\n<a name=\"MuPort+symEncrypt\"></a>\n\n### muPort.symEncrypt(msg, nonce) ⇒ <code>Object</code>\nSymmetrically encrypt a message\n\n**Kind**: instance method of [<code>MuPort</code>](#MuPort)  \n**Returns**: <code>Object</code> - an object containing the nonce and the ciphertext  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| msg | <code>String</code> | the message to encrypt |\n| nonce | <code>String</code> | (optional) the nonce, encoded as a base64 string |\n\n<a name=\"MuPort+symDecrypt\"></a>\n\n### muPort.symDecrypt(ciphertext, nonce, toBuffer) ⇒ <code>String</code> \\| <code>Buffer</code>\nDecrypt a symmetrically encrypted message\n\n**Kind**: instance method of [<code>MuPort</code>](#MuPort)  \n**Returns**: <code>String</code> \\| <code>Buffer</code> - the decrypted message  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| ciphertext | <code>String</code> | the ciphertext to decrypt, encoded as a base64 string |\n| nonce | <code>String</code> | the nonce, encoded as a base64 string |\n| toBuffer | <code>Boolean</code> | a boolean deciding whether to |\n\n<a name=\"MuPort+serializeState\"></a>\n\n### muPort.serializeState() ⇒ <code>String</code>\nSerialize the state of the current identity to be able to reconstruct it later.\n\n**Kind**: instance method of [<code>MuPort</code>](#MuPort)  \n**Returns**: <code>String</code> - the serialized state  \n<a name=\"MuPort.newIdentity\"></a>\n\n### MuPort.newIdentity(publicProfile, delegateDids, [opts]) ⇒ <code>Promise.&lt;MuPort, Error&gt;</code>\nCreates a new µPort identity.\n\n**Kind**: static method of [<code>MuPort</code>](#MuPort)  \n**Returns**: <code>Promise.&lt;MuPort, Error&gt;</code> - a promise that resolves to an instance of the MuPort class  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| publicProfile | <code>Object</code> | a public profile for the new identity |\n| delegateDids | <code>Array.&lt;String&gt;</code> | three DIDs that can be used to recover the identity at a later point (optional) |\n| [opts] | <code>Object</code> | optional parameters |\n| opts.externalMgmtKey | <code>String</code> | an ethereum address to be used as an external managementKey |\n| opts.ipfsConf | <code>Object</code> | configuration options for ipfs-mini |\n| opts.rpcProviderUrl | <code>String</code> | rpc url to a custom ethereum node |\n\n<a name=\"MuPort.recoverIdentity\"></a>\n\n### MuPort.recoverIdentity(did, shares, [opts]) ⇒ <code>Promise.&lt;MuPort, Error&gt;</code>\nRecovers a µPort identity.\n\n**Kind**: static method of [<code>MuPort</code>](#MuPort)  \n**Returns**: <code>Promise.&lt;MuPort, Error&gt;</code> - a promise that resolves to an instance of the MuPort class  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| did | <code>String</code> | the DID of the identity to be recovered |\n| shares | <code>Array.&lt;String&gt;</code> | atleast two shares that your delegates helped recover |\n| [opts] | <code>Object</code> | optional parameters |\n| opts.ipfsConf | <code>Object</code> | configuration options for ipfs-mini |\n| opts.rpcProviderUrl | <code>String</code> | rpc url to a custom ethereum node |\n\n<a name=\"MuPort.resolveIdentityDocument\"></a>\n\n### MuPort.resolveIdentityDocument(did, [opts]) ⇒ <code>Promise.&lt;Object, Error&gt;</code>\nResovles the identity document for the given DID.\n\n**Kind**: static method of [<code>MuPort</code>](#MuPort)  \n**Returns**: <code>Promise.&lt;Object, Error&gt;</code> - a promise that resolves to the identity document  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| did | <code>String</code> | the DID of the identity |\n| [opts] | <code>Object</code> | optional parameters |\n| opts.ipfsConf | <code>Object</code> | configuration options for ipfs-mini |\n| opts.rpcProviderUrl | <code>String</code> | rpc url to a custom ethereum node |\n\n","readmeFilename":"README.md"}