{"_id":"uport","_rev":"86-b044e8a7c6114ec50e29db788e91964f","name":"uport","description":"Library for interacting with uport profiles and attestations","dist-tags":{"latest":"0.6.5","next":"0.7.0-alpha-13","next-minor":"0.6.3"},"versions":{"0.1.0":{"name":"uport","version":"0.1.0","description":"Library for interacting with uport profiles and attestations","main":"lib/index.js","files":["lib","dist","src"],"scripts":{"test":"jest","build:es5":"babel src -d lib","build":"yarn test && yarn build:es5"},"author":{"name":"Pelle Braendgaard","email":"pelle.braendgaard@consensys.net"},"license":"MIT","dependencies":{"jsontokens":"^0.6.5","uport-lite":"^0.1.1"},"jest":{"coverageDirectory":"./coverage/","collectCoverage":true},"devDependencies":{"babel":"^6.5.2","babel-cli":"^6.22.2","babel-jest":"^18.0.0","babel-plugin-syntax-object-rest-spread":"^6.13.0","babel-plugin-transform-object-rest-spread":"^6.22.0","babel-polyfill":"^6.22.0","babel-preset-es2015":"^6.22.0","babel-preset-react":"^6.22.0","babel-register":"^6.22.0","jest":"^18.1.0","mockdate":"^2.0.1"},"gitHead":"1b19a3d98f5bbb7d244136ead1e057fafab49d74","_id":"uport@0.1.0","_shasum":"d847010f467a8171716d5bb3d914b85a277e69c1","_from":".","_npmVersion":"3.10.10","_nodeVersion":"7.3.0","_npmUser":{"name":"pelleb","email":"pelleb@gmail.com"},"dist":{"shasum":"d847010f467a8171716d5bb3d914b85a277e69c1","tarball":"https://registry.npmjs.org/uport/-/uport-0.1.0.tgz","integrity":"sha512-KMiiOJLev9/KiBSNEyTnTgJjVJjtKKPOLpiLvYxaEMxz09ytBFsVFNpfofclddk4SHjidyuBTnihwtTUclx5mA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCxMF+UbCjpv09ULQBSSaGFljxS89bRYR9vP11SjesOLwIgIaVGFh1MOM28sf1C0OeetdiWHu9NSxGmHeG062s4asE="}]},"maintainers":[{"name":"pelleb","email":"pelleb@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/uport-0.1.0.tgz_1485731047122_0.12572126369923353"},"directories":{}},"0.1.1":{"name":"uport","version":"0.1.1","description":"Library for interacting with uport profiles and attestations","main":"lib/index.js","files":["lib","dist","src"],"scripts":{"test":"jest","build:es5":"babel src -d lib","build":"yarn test && yarn build:es5"},"author":{"name":"Pelle Braendgaard","email":"pelle.braendgaard@consensys.net"},"license":"MIT","dependencies":{"jsontokens":"^0.6.5","uport-lite":"^0.1.1"},"jest":{"coverageDirectory":"./coverage/","collectCoverage":true},"devDependencies":{"babel":"^6.5.2","babel-cli":"^6.22.2","babel-jest":"^18.0.0","babel-plugin-syntax-object-rest-spread":"^6.13.0","babel-plugin-transform-object-rest-spread":"^6.22.0","babel-polyfill":"^6.22.0","babel-preset-es2015":"^6.22.0","babel-preset-react":"^6.22.0","babel-register":"^6.22.0","jest":"^18.1.0","mockdate":"^2.0.1"},"gitHead":"0612bf843b19242fe53a4ad0d95f1c5c08432570","_id":"uport@0.1.1","_shasum":"a0245b124a42654a39b21b2d519157001aef83da","_from":".","_npmVersion":"3.10.10","_nodeVersion":"7.3.0","_npmUser":{"name":"pelleb","email":"pelleb@gmail.com"},"dist":{"shasum":"a0245b124a42654a39b21b2d519157001aef83da","tarball":"https://registry.npmjs.org/uport/-/uport-0.1.1.tgz","integrity":"sha512-5IGO7y2k7Z8KSTsIj4/LFRRlRnFxnKYWnsbxxL0UrxXij/LkIWgS1DcD08dWLWvxJg5rmoznQ1I/2QGwdgJNow==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB3E0q6RYdUTyDFPmYS3jjkuUbZLo5UeEKhRVM3+S0OHAiA6/WLIicSHGOVMG0vNNr/gb6yREIbqVY/H1swUyAEAeg=="}]},"maintainers":[{"name":"pelleb","email":"pelleb@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/uport-0.1.1.tgz_1485737842706_0.5432395527604967"},"directories":{}},"0.1.3":{"name":"uport","version":"0.1.3","description":"Library for interacting with uport profiles and attestations","main":"lib/index.js","files":["lib","dist","src"],"scripts":{"test":"jest","build:es5":"babel src -d lib","build:browser":"webpack --config webpack.config.js","build":"yarn test && yarn build:es5 && yarn build:browser"},"author":{"name":"Pelle Braendgaard","email":"pelle.braendgaard@consensys.net"},"license":"MIT","dependencies":{"jsontokens":"^0.6.5","uport-lite":"^0.1.1"},"jest":{"coverageDirectory":"./coverage/","collectCoverage":true},"devDependencies":{"babel":"^6.5.2","babel-cli":"^6.22.2","babel-jest":"^18.0.0","babel-loader":"^6.2.10","babel-plugin-syntax-object-rest-spread":"^6.13.0","babel-plugin-transform-object-rest-spread":"^6.22.0","babel-polyfill":"^6.22.0","babel-preset-es2015":"^6.22.0","babel-preset-react":"^6.22.0","babel-register":"^6.22.0","jest":"^18.1.0","json-loader":"^0.5.4","mockdate":"^2.0.1","webpack":"^1.14.0"},"gitHead":"9da1be26e8064eded5b9431cf42fac44655c05ae","_id":"uport@0.1.3","_shasum":"d7b3cbf85b98953cca71ba4f5eea6ae70c3cfec8","_from":".","_npmVersion":"3.10.10","_nodeVersion":"7.3.0","_npmUser":{"name":"pelleb","email":"pelleb@gmail.com"},"dist":{"shasum":"d7b3cbf85b98953cca71ba4f5eea6ae70c3cfec8","tarball":"https://registry.npmjs.org/uport/-/uport-0.1.3.tgz","integrity":"sha512-6eZoLcEMuKXw6ayRz3vw19FvudTkyeuNbhfTMDaK4PCruKLQsq0sz9/UzOwFa6Gkhkt2Zw9KqzRqaJJ/0dHiMg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGlR8XuF2Xm6ZUlFyHL0HjAPQQYiZM5kuxDp5T3+kNOmAiBsSnr264/U2KC9rUSd2u/1hdkf5wiArf0/LQrpAe2YSw=="}]},"maintainers":[{"name":"pelleb","email":"pelleb@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/uport-0.1.3.tgz_1485749920937_0.552932379534468"},"directories":{}},"0.2.0":{"name":"uport","version":"0.2.0","description":"Library for interacting with uport profiles and attestations","main":"lib/index.js","files":["lib","dist","src"],"scripts":{"test":"jest","build:es5":"babel src -d lib","build:browser":"webpack --config webpack.config.js","build":"yarn test && yarn build:es5 && yarn build:browser"},"author":{"name":"Pelle Braendgaard","email":"pelle.braendgaard@consensys.net"},"license":"MIT","dependencies":{"jsontokens":"^0.6.5","uport-lite":"^0.1.1"},"jest":{"coverageDirectory":"./coverage/","collectCoverage":true},"devDependencies":{"babel":"^6.5.2","babel-cli":"^6.22.2","babel-jest":"^18.0.0","babel-loader":"^6.2.10","babel-plugin-syntax-object-rest-spread":"^6.13.0","babel-plugin-transform-object-rest-spread":"^6.22.0","babel-polyfill":"^6.22.0","babel-preset-es2015":"^6.22.0","babel-preset-react":"^6.22.0","babel-register":"^6.22.0","jest":"^18.1.0","json-loader":"^0.5.4","mockdate":"^2.0.1","webpack":"^1.14.0"},"gitHead":"13aa95c2e70bf663225fc96eea8d3b1030c66de9","_id":"uport@0.2.0","_shasum":"7697b4c346a619503952a278f8c93e09936ac818","_from":".","_npmVersion":"3.10.10","_nodeVersion":"7.3.0","_npmUser":{"name":"pelleb","email":"pelleb@gmail.com"},"dist":{"shasum":"7697b4c346a619503952a278f8c93e09936ac818","tarball":"https://registry.npmjs.org/uport/-/uport-0.2.0.tgz","integrity":"sha512-jP+fZrnlFOzRRhu7tT8dhTYgc8ghSHH9Nu+RguMj/UVz9ZNaL7oBv6YPEAaKRcqTTz8ou0j0vjRYu3+pYg5BAA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBp7MKLHYAjm2aAwP/WBpnuID8J/AOyruF5C0txeEVW5AiEAkvUrhh3vBwOdxoRO0FXXIr4atDkgWbWEanlCrOhf32M="}]},"maintainers":[{"name":"pelleb","email":"pelleb@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/uport-0.2.0.tgz_1486069344890_0.16107136476784945"},"directories":{}},"0.2.1":{"name":"uport","version":"0.2.1","description":"Library for interacting with uport profiles and attestations","main":"lib/index.js","files":["lib","dist","src"],"scripts":{"test":"jest","build:es5":"babel src -d lib","build:browser":"webpack --config webpack.config.js","build":"yarn test && yarn build:es5 && yarn build:browser"},"author":{"name":"Pelle Braendgaard","email":"pelle.braendgaard@consensys.net"},"license":"MIT","dependencies":{"jsontokens":"^0.6.5","uport-lite":"^0.1.1"},"jest":{"coverageDirectory":"./coverage/","collectCoverage":true},"devDependencies":{"babel":"^6.5.2","babel-cli":"^6.22.2","babel-jest":"^18.0.0","babel-loader":"^6.2.10","babel-plugin-syntax-object-rest-spread":"^6.13.0","babel-plugin-transform-object-rest-spread":"^6.22.0","babel-polyfill":"^6.22.0","babel-preset-es2015":"^6.22.0","babel-preset-react":"^6.22.0","babel-register":"^6.22.0","jest":"^18.1.0","json-loader":"^0.5.4","mockdate":"^2.0.1","webpack":"^1.14.0"},"gitHead":"f38fe635ca9c71b2e94d4f62a28fb38a28e39371","_id":"uport@0.2.1","_shasum":"34b6c293e7ece2083505635463e2997ffd80152e","_from":".","_npmVersion":"3.10.10","_nodeVersion":"7.3.0","_npmUser":{"name":"pelleb","email":"pelleb@gmail.com"},"dist":{"shasum":"34b6c293e7ece2083505635463e2997ffd80152e","tarball":"https://registry.npmjs.org/uport/-/uport-0.2.1.tgz","integrity":"sha512-Jl07/c041DsoCc7uMKOnuXWlTDbOFsQ6AXJ/W3flpu1kewrwNOXcSTB1FYOursb7jl2+cQ77nG+qJUtng1+DcA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCzXkls0dU9Vl2zQEJMy++7JNNoqcZp1xOuiiw604cVpAIgCR+PziTb49vCkIi/hbLFP+tg55Yc3ZHohDzt/dNKCsU="}]},"maintainers":[{"name":"pelleb","email":"pelleb@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/uport-0.2.1.tgz_1486135534797_0.9743686181027442"},"directories":{}},"0.2.2":{"name":"uport","version":"0.2.2","description":"Library for interacting with uport profiles and attestations","main":"lib/index.js","files":["lib","dist","src"],"scripts":{"test":"jest","build:es5":"babel src -d lib","build:browser":"webpack --config webpack.config.js","build":"yarn test && yarn build:es5 && yarn build:browser"},"author":{"name":"Pelle Braendgaard","email":"pelle.braendgaard@consensys.net"},"license":"MIT","dependencies":{"jsontokens":"^0.6.5","uport-lite":"^0.1.1"},"jest":{"coverageDirectory":"./coverage/","collectCoverage":true},"devDependencies":{"babel":"^6.5.2","babel-cli":"^6.22.2","babel-jest":"^18.0.0","babel-loader":"^6.2.10","babel-plugin-syntax-object-rest-spread":"^6.13.0","babel-plugin-transform-object-rest-spread":"^6.22.0","babel-polyfill":"^6.22.0","babel-preset-es2015":"^6.22.0","babel-preset-react":"^6.22.0","babel-register":"^6.22.0","jest":"^18.1.0","json-loader":"^0.5.4","mockdate":"^2.0.1","webpack":"^1.14.0"},"gitHead":"ad040a4dbf81ba2f1549c887a31ec8b652c8adac","_id":"uport@0.2.2","_shasum":"0a3fe559006ab4fb1a13f6b0ea8b069cf18807c3","_from":".","_npmVersion":"3.10.10","_nodeVersion":"7.3.0","_npmUser":{"name":"pelleb","email":"pelleb@gmail.com"},"dist":{"shasum":"0a3fe559006ab4fb1a13f6b0ea8b069cf18807c3","tarball":"https://registry.npmjs.org/uport/-/uport-0.2.2.tgz","integrity":"sha512-xXqw79LTY8DI7PHt0uR3GgScVgRhxavetpjZNbGBgWDQQzpZnOCit47zax5nqPSA2jhGBCC8WGJnMjDdbHgpUg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICJBFotkx2The8lZXDb2hkCSkvI4hngP8if7rtUXH86+AiEA8+0eoiAiSEuFO/Mb+LTFogV+SgBMIUNncxH80AQ9tXQ="}]},"maintainers":[{"name":"pelleb","email":"pelleb@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/uport-0.2.2.tgz_1486167569330_0.23157681105658412"},"directories":{}},"0.3.0":{"name":"uport","version":"0.3.0","description":"Library for interacting with uport profiles and attestations","main":"lib/index.js","files":["lib","dist","src"],"scripts":{"test":"jest","build:es5":"babel src -d lib","build:browser":"webpack --config webpack.config.js","build":"yarn test && yarn build:es5 && yarn build:browser"},"author":{"name":"Pelle Braendgaard","email":"pelle.braendgaard@consensys.net"},"license":"MIT","dependencies":{"ethjs-util":"^0.1.3","jsontokens":"^0.6.5","uport-lite":"^0.2.0"},"jest":{"coverageDirectory":"./coverage/","collectCoverage":true},"devDependencies":{"babel":"^6.5.2","babel-cli":"^6.22.2","babel-jest":"^18.0.0","babel-loader":"^6.2.10","babel-plugin-syntax-object-rest-spread":"^6.13.0","babel-plugin-transform-object-rest-spread":"^6.22.0","babel-polyfill":"^6.22.0","babel-preset-es2015":"^6.22.0","babel-preset-react":"^6.22.0","babel-register":"^6.22.0","jest":"^18.1.0","json-loader":"^0.5.4","mockdate":"^2.0.1","webpack":"^1.14.0"},"gitHead":"001910e300808db3b97ec2afff7825c234e50abf","_id":"uport@0.3.0","_shasum":"1058687ffe382a668157b76e4b638f80f0a11f98","_from":".","_npmVersion":"3.10.10","_nodeVersion":"7.3.0","_npmUser":{"name":"pelleb","email":"pelleb@gmail.com"},"dist":{"shasum":"1058687ffe382a668157b76e4b638f80f0a11f98","tarball":"https://registry.npmjs.org/uport/-/uport-0.3.0.tgz","integrity":"sha512-qGLqdeRomby70oBnVreEWN02unD2ebZE1z/HKtVsd5Hqsy6Q84MoU5jqFbPwQ3DwZSvaQ0KO3I9uCqZcPiBw2A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAZ2ji023Za9B3U7oIC3Hpyr+O/bCvvtY5i4isROx6SUAiAthXVj2+JIsU91TxiyXHqcTa6SwpD620Nxs2JQ13cZ6A=="}]},"maintainers":[{"name":"pelleb","email":"pelleb@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/uport-0.3.0.tgz_1486575761725_0.9037783059757203"},"directories":{}},"0.3.1":{"name":"uport","version":"0.3.1","description":"Library for interacting with uport profiles and attestations","main":"lib/index.js","files":["lib","dist","src"],"scripts":{"test":"jest","build:es5":"babel src -d lib","build:browser":"webpack --config webpack.config.js","build":"yarn test && yarn build:es5 && yarn build:browser"},"author":{"name":"Pelle Braendgaard","email":"pelle.braendgaard@consensys.net"},"license":"MIT","dependencies":{"ethjs-util":"^0.1.3","jsontokens":"^0.6.5","uport-lite":"^0.2.2"},"jest":{"coverageDirectory":"./coverage/","collectCoverage":true},"devDependencies":{"babel":"^6.5.2","babel-cli":"^6.22.2","babel-jest":"^18.0.0","babel-loader":"^6.2.10","babel-plugin-syntax-object-rest-spread":"^6.13.0","babel-plugin-transform-object-rest-spread":"^6.22.0","babel-polyfill":"^6.22.0","babel-preset-es2015":"^6.22.0","babel-preset-react":"^6.22.0","babel-register":"^6.22.0","jest":"^18.1.0","json-loader":"^0.5.4","mockdate":"^2.0.1","webpack":"^1.14.0"},"gitHead":"265c4200df0c4da056fa1f2ec769813aa2fc5eb5","_id":"uport@0.3.1","_shasum":"74440be21ef4e29e6b1c9363fef44d74ed8ae1b2","_from":".","_npmVersion":"3.10.10","_nodeVersion":"7.3.0","_npmUser":{"name":"pelleb","email":"pelleb@gmail.com"},"dist":{"shasum":"74440be21ef4e29e6b1c9363fef44d74ed8ae1b2","tarball":"https://registry.npmjs.org/uport/-/uport-0.3.1.tgz","integrity":"sha512-7HI7TM0J0RurevtZ5tLoWIHXi3X262Vld91iFBh44jJEXsiOimCcN4DibZjGaDMOej04+h/DgCVakSXWMKT9dQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFunk6OPP0ly/ZPOnZCPO2HlVLoNJkH9HTMfHrk88Y+HAiASYPJxGt9exbyktDmH+4XWaRzvVwIzJRqwh7bFx1c3JQ=="}]},"maintainers":[{"name":"pelleb","email":"pelleb@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/uport-0.3.1.tgz_1486965338225_0.09346965490840375"},"directories":{}},"0.3.2":{"name":"uport","version":"0.3.2","description":"Library for interacting with uport profiles and attestations","main":"lib/index.js","files":["lib","dist","src"],"scripts":{"test":"jest","build:es5":"babel src -d lib","build:browser":"webpack --config webpack.config.js","build":"yarn test && yarn build:es5 && yarn build:browser"},"author":{"name":"Pelle Braendgaard","email":"pelle.braendgaard@consensys.net"},"license":"MIT","dependencies":{"ethjs-util":"^0.1.3","jsontokens":"^0.6.5","nets":"^3.2.0","uport-lite":"^0.2.4"},"jest":{"coverageDirectory":"./coverage/","collectCoverage":true,"unmockedModulePathPatterns":["<rootDir>/node_modules/nock"]},"devDependencies":{"babel":"^6.5.2","babel-cli":"^6.22.2","babel-jest":"^18.0.0","babel-loader":"^6.2.10","babel-plugin-syntax-object-rest-spread":"^6.13.0","babel-plugin-transform-object-rest-spread":"^6.22.0","babel-polyfill":"^6.22.0","babel-preset-es2015":"^6.22.0","babel-preset-react":"^6.22.0","babel-register":"^6.22.0","jest":"^18.1.0","json-loader":"^0.5.4","mockdate":"^2.0.1","nock":"^9.0.6","webpack":"^1.14.0"},"gitHead":"51161ff7e5897b2303aa29397eab1dce6b74a376","_id":"uport@0.3.2","_shasum":"26ac181a3859ff7ba8cb6951e6c507ae883c2541","_from":".","_npmVersion":"3.10.10","_nodeVersion":"7.3.0","_npmUser":{"name":"pelleb","email":"pelleb@gmail.com"},"dist":{"shasum":"26ac181a3859ff7ba8cb6951e6c507ae883c2541","tarball":"https://registry.npmjs.org/uport/-/uport-0.3.2.tgz","integrity":"sha512-zuSgFLxW639+zKw5BozUjCDa2Gs1EF7LV+zqwxJoeH8JdIH0WahzErshOrYupK+0qfT4XKSLRkMVN/RqHyo/Ow==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDONtSSEwQ35cO7DkLo6dLrcAOloZeIW47DjLHDnTpHqgIgHkdqB5tNadWAcBPB16gRog82vV2HBX4V3HYjP/7yBxI="}]},"maintainers":[{"name":"pelleb","email":"pelleb@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/uport-0.3.2.tgz_1487644256109_0.144804407376796"},"directories":{}},"0.3.3":{"name":"uport","version":"0.3.3","description":"Library for interacting with uport profiles and attestations","main":"lib/index.js","files":["lib","dist","src"],"scripts":{"test":"jest","build:es5":"babel src -d lib","build:browser":"webpack --config webpack.config.js","build":"yarn test && yarn build:es5 && yarn build:browser"},"author":{"name":"Pelle Braendgaard","email":"pelle.braendgaard@consensys.net"},"license":"MIT","dependencies":{"ethjs-util":"^0.1.3","jsontokens":"^0.6.5","nets":"^3.2.0","uport-lite":"^0.2.4"},"jest":{"coverageDirectory":"./coverage/","collectCoverage":true,"unmockedModulePathPatterns":["<rootDir>/node_modules/nock"]},"devDependencies":{"babel":"^6.5.2","babel-cli":"^6.22.2","babel-jest":"^18.0.0","babel-loader":"^6.2.10","babel-plugin-syntax-object-rest-spread":"^6.13.0","babel-plugin-transform-object-rest-spread":"^6.22.0","babel-polyfill":"^6.22.0","babel-preset-es2015":"^6.22.0","babel-preset-react":"^6.22.0","babel-register":"^6.22.0","jest":"^18.1.0","json-loader":"^0.5.4","mockdate":"^2.0.1","nock":"^9.0.6","webpack":"^1.14.0"},"gitHead":"caa191f0e7c19ff5a552121e59ddb2c10755c80a","_id":"uport@0.3.3","_shasum":"237d5873ab12f230f1db49424b7cb40cdd0ce633","_from":".","_npmVersion":"3.10.10","_nodeVersion":"7.3.0","_npmUser":{"name":"pelleb","email":"pelleb@gmail.com"},"dist":{"shasum":"237d5873ab12f230f1db49424b7cb40cdd0ce633","tarball":"https://registry.npmjs.org/uport/-/uport-0.3.3.tgz","integrity":"sha512-yxbNTBbuPj/uNQHwG4zNkB+x5aIrJDn7xXhlVagVjZZLO1UDQzD5fJepqye3WUWlugCts8lCxxxCzUgmhV624A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDbU0R6zheW7Ncg8OfClp73QffJ/8FqauK8tdjW8XHUAgIhAIQFgjKDcsjCmukSQdt959jkrJCmajDI/UadYjcwm7Gq"}]},"maintainers":[{"name":"pelleb","email":"pelleb@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/uport-0.3.3.tgz_1490885547231_0.39739745226688683"},"directories":{}},"0.4.0-alpha-1":{"name":"uport","version":"0.4.0-alpha-1","description":"Library for interacting with uport profiles and attestations","main":"lib/index.js","files":["lib","dist","src"],"scripts":{"test":"jest","build:es5":"babel src -d lib","build:browser":"webpack --config webpack.config.js","build":"yarn test && yarn build:es5 && yarn build:browser"},"author":{"name":"Pelle Braendgaard","email":"pelle.braendgaard@consensys.net"},"license":"MIT","dependencies":{"ethjs-util":"^0.1.3","jsontokens":"^0.6.5","mnid":"^0.1.1","nets":"^3.2.0","uport-lite":"next"},"jest":{"coverageDirectory":"./coverage/","collectCoverage":true,"unmockedModulePathPatterns":["<rootDir>/node_modules/nock"]},"devDependencies":{"babel":"^6.5.2","babel-cli":"^6.22.2","babel-jest":"^18.0.0","babel-loader":"^6.2.10","babel-plugin-syntax-object-rest-spread":"^6.13.0","babel-plugin-transform-object-rest-spread":"^6.22.0","babel-polyfill":"^6.22.0","babel-preset-es2015":"^6.22.0","babel-preset-react":"^6.22.0","babel-register":"^6.22.0","jest":"^18.1.0","json-loader":"^0.5.4","mockdate":"^2.0.1","nock":"^9.0.6","webpack":"^1.14.0"},"gitHead":"1bcb96fb5e7d00fcd228f1aac665c31ff1bf0eac","_id":"uport@0.4.0-alpha-1","_shasum":"969fc66c0f594cfb12b35655da92bc393e094203","_from":".","_npmVersion":"3.10.10","_nodeVersion":"7.3.0","_npmUser":{"name":"pelleb","email":"pelleb@gmail.com"},"dist":{"shasum":"969fc66c0f594cfb12b35655da92bc393e094203","tarball":"https://registry.npmjs.org/uport/-/uport-0.4.0-alpha-1.tgz","integrity":"sha512-iofUAGjHODh0PzHQzp/Pl9wwl/Y8fVaAe5rUafq8V7MuwXmbSwGukukdKncKWxUzZDFobDTptESIAVRQNuEZWg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDEhMziZvGz5GUETS2HOSrmtI7hqfH2R47A5I9B690coQIhAJVudE9edD8ziV6zE+XPsM49NCHJaSGpeVwwQRbWOpnN"}]},"maintainers":[{"name":"pelleb","email":"pelleb@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/uport-0.4.0-alpha-1.tgz_1491427135904_0.8566507645882666"},"directories":{}},"0.4.0":{"name":"uport","version":"0.4.0","description":"Library for interacting with uport profiles and attestations","main":"lib/index.js","files":["lib","dist","src"],"scripts":{"test":"jest","build:es5":"babel src -d lib","build:browser":"webpack --config webpack.config.js","build":"yarn build:es5 && yarn test && yarn build:browser"},"author":{"name":"Pelle Braendgaard","email":"pelle.braendgaard@consensys.net"},"license":"MIT","dependencies":{"ethjs-util":"^0.1.3","jsontokens":"^0.6.5","mnid":"^0.1.1","nets":"^3.2.0","uport-lite":"^1.0.0"},"jest":{"coverageDirectory":"./coverage/","collectCoverage":true,"unmockedModulePathPatterns":["<rootDir>/node_modules/nock"]},"devDependencies":{"babel":"^6.5.2","babel-cli":"^6.22.2","babel-jest":"^18.0.0","babel-loader":"^6.2.10","babel-plugin-syntax-object-rest-spread":"^6.13.0","babel-plugin-transform-object-rest-spread":"^6.22.0","babel-polyfill":"^6.22.0","babel-preset-es2015":"^6.22.0","babel-preset-react":"^6.22.0","babel-register":"^6.22.0","jest":"^18.1.0","json-loader":"^0.5.4","mockdate":"^2.0.1","nock":"^9.0.6","webpack":"^1.14.0"},"gitHead":"cb1a49c50c6ed182a360cfc275e95137ef674bbc","_id":"uport@0.4.0","_shasum":"ff850b8b0d4aee42f8e4c8c689446cece5fe94f8","_from":".","_npmVersion":"3.10.10","_nodeVersion":"7.3.0","_npmUser":{"name":"pelleb","email":"pelleb@gmail.com"},"dist":{"shasum":"ff850b8b0d4aee42f8e4c8c689446cece5fe94f8","tarball":"https://registry.npmjs.org/uport/-/uport-0.4.0.tgz","integrity":"sha512-bJB4GXEBNdxGGbkkVzhYfLvEc6GqoLgsYVyLvElfCghNOM2Qn6kj9u57sZm7xnVVXRu6cYtXPw06eoC90bqbtg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEMoQ9U03d2Thhj20jtbE4nZBmee5QLzzUnj4x5Te39dAiEA0oeGa0deh1QuhiAC5BRemoh0dze6K/BoG8+F082Z3kA="}]},"maintainers":[{"name":"pelleb","email":"pelleb@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/uport-0.4.0.tgz_1492796368706_0.8088712503667921"},"directories":{}},"0.4.1":{"name":"uport","version":"0.4.1","description":"Library for interacting with uport profiles and attestations","main":"lib/index.js","files":["lib","dist","src"],"scripts":{"test":"jest","build:es5":"babel src -d lib","build:browser":"webpack --config webpack.config.js","build":"yarn build:es5 && yarn test && yarn build:browser"},"author":{"name":"Pelle Braendgaard","email":"pelle.braendgaard@consensys.net"},"license":"MIT","dependencies":{"ethjs-util":"^0.1.3","jsontokens":"^0.6.5","mnid":"^0.1.1","nets":"^3.2.0","uport-lite":"^1.0.0"},"jest":{"coverageDirectory":"./coverage/","collectCoverage":true,"unmockedModulePathPatterns":["<rootDir>/node_modules/nock"]},"devDependencies":{"babel":"^6.5.2","babel-cli":"^6.22.2","babel-jest":"^18.0.0","babel-loader":"^6.2.10","babel-plugin-syntax-object-rest-spread":"^6.13.0","babel-plugin-transform-object-rest-spread":"^6.22.0","babel-polyfill":"^6.22.0","babel-preset-es2015":"^6.22.0","babel-preset-react":"^6.22.0","babel-register":"^6.22.0","body-parser":"^1.17.1","express":"^4.15.2","jest":"^18.1.0","json-loader":"^0.5.4","mockdate":"^2.0.1","nock":"^9.0.6","webpack":"^1.14.0"},"gitHead":"75010fec0e3126ffbb6e96fd7657b92b0fb32daf","_id":"uport@0.4.1","_shasum":"3e78b2c89127eef8d41b917674a7aead2a66bf73","_from":".","_npmVersion":"3.10.10","_nodeVersion":"7.3.0","_npmUser":{"name":"pelleb","email":"pelleb@gmail.com"},"dist":{"shasum":"3e78b2c89127eef8d41b917674a7aead2a66bf73","tarball":"https://registry.npmjs.org/uport/-/uport-0.4.1.tgz","integrity":"sha512-cbhKWgXKi2NCrj9SWvXtxMjkV/u2Uw1+xwZHjwNqRfJQX84xuK/8nayiJqVkX9kdGXHbADwnXrXAXIRyJuadng==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDWgeoBgHZVjaX8UZ6f+lKI/PPNLp7CkmkoyThzpKKpxAIgcljKJgwAs7xugbTeDxuTmw7CO9oDMxDvE5Lb7JbKK7o="}]},"maintainers":[{"name":"pelleb","email":"pelleb@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/uport-0.4.1.tgz_1493351675021_0.2101057805120945"},"directories":{}},"0.4.2":{"name":"uport","version":"0.4.2","description":"Library for interacting with uport profiles and attestations","main":"lib/index.js","files":["lib","dist","src"],"scripts":{"test":"jest","build:es5":"babel src -d lib","build:browser":"webpack --config webpack.config.js","build":"yarn build:es5 && yarn test && yarn build:browser"},"author":{"name":"Pelle Braendgaard","email":"pelle.braendgaard@consensys.net"},"license":"MIT","dependencies":{"ethjs-util":"^0.1.3","jsontokens":"^0.6.5","mnid":"^0.1.1","nets":"^3.2.0","uport-lite":"^1.0.0"},"jest":{"coverageDirectory":"./coverage/","collectCoverage":true,"unmockedModulePathPatterns":["<rootDir>/node_modules/nock"]},"devDependencies":{"babel":"^6.5.2","babel-cli":"^6.22.2","babel-jest":"^18.0.0","babel-loader":"^6.2.10","babel-plugin-syntax-object-rest-spread":"^6.13.0","babel-plugin-transform-object-rest-spread":"^6.22.0","babel-polyfill":"^6.22.0","babel-preset-es2015":"^6.22.0","babel-preset-react":"^6.22.0","babel-register":"^6.22.0","body-parser":"^1.17.1","express":"^4.15.2","jest":"^18.1.0","json-loader":"^0.5.4","mockdate":"^2.0.1","nock":"^9.0.6","webpack":"^1.14.0"},"gitHead":"d116850b09c4e77508db3af4f2500302a8940765","_id":"uport@0.4.2","_shasum":"1c9632304d84ebba53e3842da9df864ce59b9082","_from":".","_npmVersion":"3.10.10","_nodeVersion":"7.3.0","_npmUser":{"name":"pelleb","email":"pelleb@gmail.com"},"dist":{"shasum":"1c9632304d84ebba53e3842da9df864ce59b9082","tarball":"https://registry.npmjs.org/uport/-/uport-0.4.2.tgz","integrity":"sha512-mxoj7hNdaIUCVWMNyOPgT/h8N1GwFe3KBx8QW7GUiAiOd5XaeCJGpyZnlJ7pbD6LKQEBfu4ixBpvp7SiHvDFgA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDUIPOBW9wt/ZsnRLCzZiNduGAAMBQlur4R+c584+48SwIhAOvg9KLJPUxAjuseaG0XY6F44ecpDeNIC5O9l+ul0tN1"}]},"maintainers":[{"name":"pelleb","email":"pelleb@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/uport-0.4.2.tgz_1496763967417_0.7489281946327537"},"directories":{}},"0.5.1":{"name":"uport","version":"0.5.1","description":"Library for interacting with uport profiles and attestations","main":"lib/index.js","files":["lib","dist","src"],"scripts":{"test":"jest","build:es5":"babel src -d lib","build:browser":"webpack --config webpack.config.js","build":"yarn build:es5 && yarn test && yarn build:browser","build:docs:html":"jsdoc src/* README.md -d docs","build:docs:md":"./node_modules/jsdoc-to-markdown/bin/cli.js src/* > DOCS.md","build:docs":"npm run build:docs:html && npm run build:docs:md"},"author":{"name":"Pelle Braendgaard","email":"pelle.braendgaard@consensys.net"},"license":"MIT","dependencies":{"ethjs-util":"^0.1.3","jsontokens":"^0.6.5","mnid":"^0.1.1","nets":"^3.2.0","uport-lite":"^1.0.0"},"jest":{"coverageDirectory":"./coverage/","collectCoverage":true,"unmockedModulePathPatterns":["<rootDir>/node_modules/nock"]},"devDependencies":{"babel":"^6.5.2","babel-cli":"^6.22.2","babel-jest":"^18.0.0","babel-loader":"^6.2.10","babel-plugin-syntax-object-rest-spread":"^6.13.0","babel-plugin-transform-object-rest-spread":"^6.22.0","babel-polyfill":"^6.22.0","babel-preset-es2015":"^6.22.0","babel-preset-react":"^6.22.0","babel-register":"^6.22.0","body-parser":"^1.17.1","express":"^4.15.2","jest":"^18.1.0","jsdoc":"^3.4.3","jsdoc-to-markdown":"^1.3.7","json-loader":"^0.5.4","mockdate":"^2.0.1","nock":"^9.0.6","webpack":"^1.14.0"},"gitHead":"025ae7959ab0d00365bbfa753e01dc36cc72f3da","_id":"uport@0.5.1","_npmVersion":"5.3.0","_nodeVersion":"8.2.1","_npmUser":{"name":"localredhead","email":"levi.strope@gmail.com"},"dist":{"integrity":"sha512-VF3mU4J4Si9EERhhiJxaZUx79x5VSArrWka1Yqxp99uWgvcGRCiWeKSze92FJZ7ZOs846wYkA+fNoi227EaU0Q==","shasum":"60c465fb35beb8e42953a2a8a82582ba88736763","tarball":"https://registry.npmjs.org/uport/-/uport-0.5.1.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDPfm5YNKnP6etJFYyxA3fXxMtfQBa23OsBs80CnEdYGgIgMMI8lgihNMWSGtgXZFHMSdHv9Nm6lS2gUbpJjxOdvI0="}]},"maintainers":[{"email":"levi.strope@gmail.com","name":"localredhead"},{"email":"pelleb@gmail.com","name":"pelleb"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/uport-0.5.1.tgz_1503692284933_0.13712178473360837"},"directories":{}},"0.5.2":{"name":"uport","version":"0.5.2","description":"Library for interacting with uport profiles and attestations","main":"lib/index.js","files":["lib","dist","src"],"scripts":{"test":"jest","build:es5":"babel src -d lib","build:browser":"webpack --config webpack.config.js","build":"yarn build:es5 && yarn test && yarn build:browser","build:docs:html":"jsdoc src/* README.md -d docs","build:docs:md":"./node_modules/jsdoc-to-markdown/bin/cli.js src/* > DOCS.md","build:docs":"npm run build:docs:html && npm run build:docs:md","prepublish":"yarn build"},"author":{"name":"Pelle Braendgaard","email":"pelle.braendgaard@consensys.net"},"license":"MIT","dependencies":{"ethjs-util":"^0.1.3","jsontokens":"^0.6.5","mnid":"^0.1.1","nets":"^3.2.0","uport-lite":"^1.0.0"},"jest":{"coverageDirectory":"./coverage/","collectCoverage":true,"unmockedModulePathPatterns":["<rootDir>/node_modules/nock"]},"devDependencies":{"babel-cli":"^6.22.2","babel-jest":"^18.0.0","babel-loader":"^6.2.10","babel-plugin-syntax-object-rest-spread":"^6.13.0","babel-plugin-transform-object-rest-spread":"^6.22.0","babel-polyfill":"^6.22.0","babel-preset-es2015":"^6.22.0","babel-preset-react":"^6.22.0","babel-register":"^6.22.0","body-parser":"^1.17.1","express":"^4.15.2","jest":"^18.1.0","jsdoc":"^3.4.3","jsdoc-to-markdown":"^1.3.7","json-loader":"^0.5.4","mockdate":"^2.0.1","nock":"^9.0.6","webpack":"^1.14.0"},"gitHead":"a726f3dc28d26f05c0561b9fb5d680ce55e88fa7","_id":"uport@0.5.2","_npmVersion":"5.3.0","_nodeVersion":"8.5.0","_npmUser":{"name":"localredhead","email":"levi.strope@gmail.com"},"dist":{"integrity":"sha512-50OTZBRWsYP3o0VudOEPD9FJEla9WutLEEkYP2Xy4r/+6H/T5AbhY1mY/vwEoKG3QW+Cu+A5nBt9Zw/QW0RkxA==","shasum":"14afdb3d8e114014c1a8af1ef248b021a30eb595","tarball":"https://registry.npmjs.org/uport/-/uport-0.5.2.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDIiPJfb0/qOdlQJ0Sb8/dW3+aXeXo7WnZ6fCBD32kbEwIgS6/1FlK9MHb8SzYOnsWXtBJoPw10ZIqGn6DZoDtjdhs="}]},"maintainers":[{"email":"levi.strope@gmail.com","name":"localredhead"},{"email":"pelleb@gmail.com","name":"pelleb"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/uport-0.5.2.tgz_1505791763410_0.35908698034472764"},"directories":{}},"0.5.3":{"name":"uport","version":"0.5.3","description":"Library for interacting with uport profiles and attestations","main":"lib/index.js","files":["lib","dist","src","tutorial"],"scripts":{"test":"jest","build:es5":"babel src -d lib","build:browser":"webpack --config webpack.config.js","build":"yarn build:es5 && yarn test && yarn build:browser","build:docs:html":"jsdoc src/* README.md -d docs","build:docs:md":"./node_modules/jsdoc-to-markdown/bin/cli.js src/* > DOCS.md","build:docs":"npm run build:docs:html && npm run build:docs:md","prepublish":"yarn build"},"author":{"name":"Pelle Braendgaard","email":"pelle.braendgaard@consensys.net"},"license":"MIT","dependencies":{"ethjs-util":"^0.1.3","jsontokens":"^0.6.5","mnid":"^0.1.1","nets":"^3.2.0","uport-lite":"^1.0.0"},"jest":{"coverageDirectory":"./coverage/","collectCoverage":true,"unmockedModulePathPatterns":["<rootDir>/node_modules/nock"]},"devDependencies":{"babel-cli":"^6.22.2","babel-jest":"^18.0.0","babel-loader":"^6.2.10","babel-plugin-syntax-object-rest-spread":"^6.13.0","babel-plugin-transform-object-rest-spread":"^6.22.0","babel-polyfill":"^6.22.0","babel-preset-es2015":"^6.22.0","babel-preset-react":"^6.22.0","babel-register":"^6.22.0","body-parser":"^1.17.1","express":"^4.15.2","jest":"^18.1.0","jsdoc":"^3.4.3","jsdoc-to-markdown":"^1.3.7","json-loader":"^0.5.4","mockdate":"^2.0.1","nock":"^9.0.6","webpack":"^1.14.0"},"gitHead":"f022d44f3f0966dffecc9f304a6a945993695fa2","_id":"uport@0.5.3","_npmVersion":"5.3.0","_nodeVersion":"8.5.0","_npmUser":{"name":"localredhead","email":"levi.strope@gmail.com"},"dist":{"integrity":"sha512-U46Xk3ltM2gVCaC7Vx7Gg8bcPLGdCndYpX/KaKO4AmMu3L03Xk/YpsVJNgJjALAaxkNu9CRWX/YnITaSetQfHA==","shasum":"27c4e1c5161506320e68e7e9f59724d22e4d7f67","tarball":"https://registry.npmjs.org/uport/-/uport-0.5.3.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQChehYc3QrWZxPlumuBiSIWoNhGKopjhhV8ELrJAFS3CAIgJGnZOsSUaHRhSThhlrz57x4CsXxo1ryS6pZqcr/L2Gs="}]},"maintainers":[{"email":"levi.strope@gmail.com","name":"localredhead"},{"email":"pelleb@gmail.com","name":"pelleb"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/uport-0.5.3.tgz_1506354553523_0.5780035511124879"},"directories":{}},"0.5.4":{"name":"uport","version":"0.5.4","description":"Library for interacting with uport profiles and attestations","main":"lib/index.js","files":["lib","dist","src","tutorial"],"scripts":{"test":"jest","build:es5":"babel src -d lib","build:browser":"webpack --config webpack.config.js","build":"yarn build:es5 && yarn test && yarn build:browser","build:docs:html":"jsdoc src/* README.md -d docs","build:docs:md":"./node_modules/jsdoc-to-markdown/bin/cli.js src/* > DOCS.md","build:docs":"npm run build:docs:html && npm run build:docs:md","prepublish":"yarn build"},"author":{"name":"Pelle Braendgaard","email":"pelle.braendgaard@consensys.net"},"license":"MIT","dependencies":{"ethjs-util":"^0.1.3","jsontokens":"^0.6.5","mnid":"^0.1.1","nets":"^3.2.0","uport-lite":"^1.0.0"},"jest":{"coverageDirectory":"./coverage/","collectCoverage":true,"unmockedModulePathPatterns":["<rootDir>/node_modules/nock"]},"devDependencies":{"babel-cli":"^6.22.2","babel-jest":"^18.0.0","babel-loader":"^6.2.10","babel-plugin-syntax-object-rest-spread":"^6.13.0","babel-plugin-transform-object-rest-spread":"^6.22.0","babel-polyfill":"^6.22.0","babel-preset-es2015":"^6.22.0","babel-preset-react":"^6.22.0","babel-register":"^6.22.0","body-parser":"^1.17.1","express":"^4.15.2","jest":"^18.1.0","jsdoc":"^3.4.3","jsdoc-to-markdown":"^1.3.7","json-loader":"^0.5.4","mockdate":"^2.0.1","nock":"^9.0.6","webpack":"^1.14.0"},"gitHead":"01788d8e9e39a3d91e1c160d1e29c7fe5cb08bb8","_id":"uport@0.5.4","_npmVersion":"5.3.0","_nodeVersion":"8.5.0","_npmUser":{"name":"localredhead","email":"levi.strope@gmail.com"},"dist":{"integrity":"sha512-Da9sBgXR71Nwol3mdwsY/KocWVMN7G8fUFtkw8Ddeiocoyda4USy1psj8Nuk3swa6quXEfoWLqe0PKfeiBaE9A==","shasum":"7ebf31364020d2cb6d30086e8ae6e6214733a037","tarball":"https://registry.npmjs.org/uport/-/uport-0.5.4.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAWl9Nhh56vtCiC+hc28EBQB1AKXFE1q9yCYqMHaf1jWAiBGhJm/UHppmZ9GYSXfQf3ANqPBIMPOzjlEIjUQb8ozig=="}]},"maintainers":[{"email":"levi.strope@gmail.com","name":"localredhead"},{"email":"pelleb@gmail.com","name":"pelleb"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/uport-0.5.4.tgz_1506466055839_0.9018987244926393"},"directories":{}},"0.6.0-alpha-1":{"name":"uport","version":"0.6.0-alpha-1","description":"Library for interacting with uport profiles and attestations","main":"lib/index.js","files":["lib","dist","src","tutorial"],"scripts":{"test":"jest","build:es5":"babel src -d lib","build:browser":"webpack --config webpack.config.js","build":"yarn build:es5 && yarn test && yarn build:browser","build:docs:html":"jsdoc src/* README.md -d docs","build:docs:md":"./node_modules/jsdoc-to-markdown/bin/cli.js src/* > DOCS.md","build:docs":"npm run build:docs:html && npm run build:docs:md","prepublish":"yarn build"},"author":{"name":"Pelle Braendgaard","email":"pelle.braendgaard@consensys.net"},"license":"MIT","dependencies":{"ethjs-util":"^0.1.3","jsontokens":"^0.7.6","mnid":"^0.1.1","nets":"^3.2.0","uport-lite":"^1.0.0"},"jest":{"coverageDirectory":"./coverage/","collectCoverage":true,"unmockedModulePathPatterns":["<rootDir>/node_modules/nock"]},"devDependencies":{"babel-cli":"^6.22.2","babel-jest":"^18.0.0","babel-loader":"^6.2.10","babel-plugin-syntax-object-rest-spread":"^6.13.0","babel-plugin-transform-object-rest-spread":"^6.22.0","babel-polyfill":"^6.22.0","babel-preset-es2015":"^6.22.0","babel-preset-react":"^6.22.0","babel-register":"^6.22.0","body-parser":"^1.17.1","express":"^4.15.2","jest":"^18.1.0","jsdoc":"^3.4.3","jsdoc-to-markdown":"^1.3.7","json-loader":"^0.5.4","mockdate":"^2.0.1","nock":"^9.0.6","webpack":"^1.14.0"},"gitHead":"98cb16b2d767873fe666ab5df6b2f13dd4295d72","_id":"uport@0.6.0-alpha-1","_npmVersion":"5.3.0","_nodeVersion":"8.5.0","_npmUser":{"name":"pelleb","email":"pelleb@gmail.com"},"dist":{"integrity":"sha512-9ERxaLxzd/FAiLbrcudLBjvoScatzoHrm+8Jbidmx+RRWCkN8MaeTm65i0xvBHdwk8uWrqJT1IFRULoU+IyOUw==","shasum":"261f48d4c1e0110894ae0e715e30ca36a35355ab","tarball":"https://registry.npmjs.org/uport/-/uport-0.6.0-alpha-1.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDNSkPuOcRakpo6olNMIafS4LpYs9Ys+9UHgeqkkP4R7gIhAOcEHE0QyPcPRoBwh22RfX4H3jO0LZUhkLlt+J37XhTz"}]},"maintainers":[{"email":"levi.strope@gmail.com","name":"localredhead"},{"email":"pelleb@gmail.com","name":"pelleb"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/uport-0.6.0-alpha-1.tgz_1506696489188_0.9502302089240402"},"directories":{}},"0.6.0-alpha-2":{"name":"uport","version":"0.6.0-alpha-2","description":"Library for interacting with uport profiles and attestations","main":"lib/index.js","files":["lib","dist","src","tutorial"],"scripts":{"test":"jest","build:es5":"babel src -d lib","build:browser":"webpack --config webpack.config.js","build":"yarn build:es5 && yarn test && yarn build:browser","build:docs:html":"jsdoc src/* README.md -d docs","build:docs:md":"./node_modules/jsdoc-to-markdown/bin/cli.js src/* > DOCS.md","build:docs":"npm run build:docs:html && npm run build:docs:md","prepublish":"yarn build"},"author":{"name":"Pelle Braendgaard","email":"pelle.braendgaard@consensys.net"},"license":"MIT","dependencies":{"ethjs-util":"^0.1.3","jsontokens":"^0.7.6","mnid":"^0.1.1","nets":"^3.2.0","uport-lite":"^1.0.0"},"jest":{"coverageDirectory":"./coverage/","collectCoverage":true,"unmockedModulePathPatterns":["<rootDir>/node_modules/nock"]},"devDependencies":{"babel-cli":"^6.22.2","babel-jest":"^18.0.0","babel-loader":"^6.2.10","babel-plugin-syntax-object-rest-spread":"^6.13.0","babel-plugin-transform-object-rest-spread":"^6.22.0","babel-polyfill":"^6.22.0","babel-preset-es2015":"^6.22.0","babel-preset-react":"^6.22.0","babel-register":"^6.22.0","body-parser":"^1.17.1","express":"^4.15.2","jest":"^18.1.0","jsdoc":"^3.4.3","jsdoc-to-markdown":"^1.3.7","json-loader":"^0.5.4","mockdate":"^2.0.1","nock":"^9.0.6","webpack":"^1.14.0"},"gitHead":"5272f4e4e1e93e6a31623edc03d3ba8337eb4cd0","_id":"uport@0.6.0-alpha-2","_npmVersion":"5.3.0","_nodeVersion":"8.5.0","_npmUser":{"name":"pelleb","email":"pelleb@gmail.com"},"dist":{"integrity":"sha512-66XbrpJ+fYBdJwHDLlIg2vWSkD9K/FV4Z2bA2dkqNHArBczfpvKX06FkSmzuN6R9VLOVbgEuMf7GxY/ztHIEkA==","shasum":"f4cf4de14fa47e7548f265f34e4459e18d79ecda","tarball":"https://registry.npmjs.org/uport/-/uport-0.6.0-alpha-2.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCjE45lt115pjQQgxLsvED3hUqUD46lMbt/9fT4LMK6CgIhALQd/aIc82x/7FT9s0PuDOnlxs30KxN6445nHwUbHWTm"}]},"maintainers":[{"email":"levi.strope@gmail.com","name":"localredhead"},{"email":"pelleb@gmail.com","name":"pelleb"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/uport-0.6.0-alpha-2.tgz_1506723670665_0.8026755859609693"},"directories":{}},"0.6.0-alpha-3":{"name":"uport","version":"0.6.0-alpha-3","description":"Library for interacting with uport profiles and attestations","main":"lib/index.js","files":["lib","dist","src","tutorial"],"scripts":{"test":"jest","build:es5":"babel src -d lib","build:browser":"webpack --config webpack.config.js","build":"yarn build:es5 && yarn test && yarn build:browser","build:docs:html":"jsdoc src/* README.md -d docs","build:docs:md":"./node_modules/jsdoc-to-markdown/bin/cli.js src/* > DOCS.md","build:docs":"npm run build:docs:html && npm run build:docs:md","prepublish":"yarn build"},"author":{"name":"Pelle Braendgaard","email":"pelle.braendgaard@consensys.net"},"license":"MIT","dependencies":{"ethjs-util":"^0.1.3","jsontokens":"^0.7.6","mnid":"^0.1.1","nets":"^3.2.0","tweetnacl":"^1.0.0","tweetnacl-util":"^0.15.0","uport-lite":"^1.0.0"},"jest":{"coverageDirectory":"./coverage/","collectCoverage":true,"unmockedModulePathPatterns":["<rootDir>/node_modules/nock"]},"devDependencies":{"babel-cli":"^6.22.2","babel-jest":"^18.0.0","babel-loader":"^6.2.10","babel-plugin-syntax-object-rest-spread":"^6.13.0","babel-plugin-transform-object-rest-spread":"^6.22.0","babel-polyfill":"^6.22.0","babel-preset-es2015":"^6.22.0","babel-preset-react":"^6.22.0","babel-register":"^6.22.0","body-parser":"^1.17.1","express":"^4.15.2","jest":"^18.1.0","jsdoc":"^3.4.3","jsdoc-to-markdown":"^1.3.7","json-loader":"^0.5.4","mockdate":"^2.0.1","nock":"^9.0.6","webpack":"^1.14.0"},"gitHead":"23a5c9c4543410b52c0083fe2735c57f23e73896","_id":"uport@0.6.0-alpha-3","_npmVersion":"5.3.0","_nodeVersion":"8.5.0","_npmUser":{"name":"pelleb","email":"pelleb@gmail.com"},"dist":{"integrity":"sha512-VTLGyrjxxDvGvJrp27Tw9VIjIROw2WFnN9tPwWqXv5Q1beZm1ZR9eXfFeE7T3ieXfNsHENvNaiSI5Bkv0JZIcg==","shasum":"5f927020c77c96c2899ccf920c3b15b50af4f16e","tarball":"https://registry.npmjs.org/uport/-/uport-0.6.0-alpha-3.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCkIHqKqwaILPf3IKjcOykpnZeRe4LL06FKFjcONgAozgIhANfXmljDxFEGFZme7LdtOCS4t8VpdkbE6HKrO++9jgDV"}]},"maintainers":[{"email":"levi.strope@gmail.com","name":"localredhead"},{"email":"pelleb@gmail.com","name":"pelleb"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/uport-0.6.0-alpha-3.tgz_1506811128091_0.5136151066981256"},"directories":{}},"0.6.0-alpha-4":{"name":"uport","version":"0.6.0-alpha-4","description":"Library for interacting with uport profiles and attestations","main":"lib/index.js","files":["lib","dist","src","tutorial"],"scripts":{"test":"jest","build:es5":"babel src -d lib","build:browser":"webpack --config webpack.config.js","build":"yarn build:es5 && yarn test && yarn build:browser","build:docs:html":"jsdoc src/* README.md -d docs","build:docs:md":"./node_modules/jsdoc-to-markdown/bin/cli.js src/* > DOCS.md","build:docs":"npm run build:docs:html && npm run build:docs:md","prepublish":"yarn build"},"author":{"name":"Pelle Braendgaard","email":"pelle.braendgaard@consensys.net"},"license":"MIT","dependencies":{"ethjs-util":"^0.1.3","jsontokens":"^0.7.6","mnid":"^0.1.1","nets":"^3.2.0","tweetnacl":"^1.0.0","tweetnacl-util":"^0.15.0","uport-lite":"^1.0.0"},"jest":{"coverageDirectory":"./coverage/","collectCoverage":true,"unmockedModulePathPatterns":["<rootDir>/node_modules/nock"]},"devDependencies":{"babel-cli":"^6.22.2","babel-jest":"^18.0.0","babel-loader":"^6.2.10","babel-plugin-syntax-object-rest-spread":"^6.13.0","babel-plugin-transform-object-rest-spread":"^6.22.0","babel-polyfill":"^6.22.0","babel-preset-es2015":"^6.22.0","babel-preset-react":"^6.22.0","babel-register":"^6.22.0","body-parser":"^1.17.1","express":"^4.15.2","jest":"^18.1.0","jsdoc":"^3.4.3","jsdoc-to-markdown":"^1.3.7","json-loader":"^0.5.4","mockdate":"^2.0.1","nock":"^9.0.6","webpack":"^1.14.0"},"gitHead":"20897e1a63900d2788ff07f90ab8b82a3e528ff0","_id":"uport@0.6.0-alpha-4","_npmVersion":"5.3.0","_nodeVersion":"8.5.0","_npmUser":{"name":"pelleb","email":"pelleb@gmail.com"},"dist":{"integrity":"sha512-So9Ol6b70jjQoYJwsMw9Dj1Z0fblGLTc2zPT4tWyV3iG8Abibi2STsJS4ERSmir/DLR3wbF2Wh6gTDMzCEI7Qw==","shasum":"13c89b708c2f29c4cc2b32f872c2507aecce2227","tarball":"https://registry.npmjs.org/uport/-/uport-0.6.0-alpha-4.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDUO55arI8Hj7Gr+7G6TyX3vRpwRS2Z6jDs3u9tYlMbEAIgRxcqomDHelCtfPBDFYKQtOxVTluFeRA4USH9Nnkr1pY="}]},"maintainers":[{"email":"levi.strope@gmail.com","name":"localredhead"},{"email":"pelleb@gmail.com","name":"pelleb"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/uport-0.6.0-alpha-4.tgz_1507130384896_0.4738747077062726"},"directories":{}},"0.6.0-alpha-5":{"name":"uport","version":"0.6.0-alpha-5","description":"Library for interacting with uport profiles and attestations","main":"lib/index.js","files":["lib","dist","src","tutorial"],"scripts":{"test":"jest","build:es5":"babel src -d lib","build:browser":"webpack --config webpack.config.js","build":"yarn build:es5 && yarn test && yarn build:browser","build:docs:html":"jsdoc src/* README.md -d docs","build:docs:md":"./node_modules/jsdoc-to-markdown/bin/cli.js src/* > DOCS.md","build:docs":"npm run build:docs:html && npm run build:docs:md","prepublish":"yarn build"},"author":{"name":"Pelle Braendgaard","email":"pelle.braendgaard@consensys.net"},"license":"MIT","dependencies":{"ethjs-util":"^0.1.3","jsontokens":"^0.7.6","mnid":"^0.1.1","nets":"^3.2.0","tweetnacl":"^1.0.0","tweetnacl-util":"^0.15.0","uport-lite":"^1.0.0"},"jest":{"coverageDirectory":"./coverage/","collectCoverage":true,"unmockedModulePathPatterns":["<rootDir>/node_modules/nock"]},"devDependencies":{"babel-cli":"^6.22.2","babel-jest":"^18.0.0","babel-loader":"^6.2.10","babel-plugin-syntax-object-rest-spread":"^6.13.0","babel-plugin-transform-object-rest-spread":"^6.22.0","babel-polyfill":"^6.22.0","babel-preset-es2015":"^6.22.0","babel-preset-react":"^6.22.0","babel-register":"^6.22.0","body-parser":"^1.17.1","express":"^4.15.2","jest":"^18.1.0","jsdoc":"^3.4.3","jsdoc-to-markdown":"^1.3.7","json-loader":"^0.5.4","mockdate":"^2.0.1","nock":"^9.0.6","webpack":"^1.14.0"},"gitHead":"088ffd64ac195b9f4411d982fcfd54c02d70404a","_id":"uport@0.6.0-alpha-5","_npmVersion":"5.3.0","_nodeVersion":"8.5.0","_npmUser":{"name":"localredhead","email":"levi.strope@gmail.com"},"dist":{"integrity":"sha512-NMeQKcksViKjdqOUSIn6afVWvtBwouYiWT6rNRq10qS1bf7ddQBDsog/rq9h7jyYh0hx1NcokR6t2iyJy1Ej4A==","shasum":"ce3db3f9fa344cd01280b4219f5d6ad802494974","tarball":"https://registry.npmjs.org/uport/-/uport-0.6.0-alpha-5.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGTech9lf1HO4e9r/uPrMBksTr0Ja2wujo1qJYefFiY2AiEAwMAdnXQXD3tUCGbkZKduQjkG4K3s0YtJGDdNzGOM2h0="}]},"maintainers":[{"email":"levi.strope@gmail.com","name":"localredhead"},{"email":"pelleb@gmail.com","name":"pelleb"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/uport-0.6.0-alpha-5.tgz_1508349421024_0.19945011101663113"},"directories":{}},"0.6.0-alpha-6":{"name":"uport","version":"0.6.0-alpha-6","description":"Library for interacting with uport profiles and attestations","main":"lib/index.js","files":["lib","dist","src","tutorial"],"scripts":{"test":"jest","build:es5":"babel src -d lib","build:browser":"webpack --config webpack.config.js","build":"yarn build:es5 && yarn test && yarn build:browser","build:docs:html":"jsdoc src/* README.md -d docs","build:docs:md":"./node_modules/jsdoc-to-markdown/bin/cli.js src/* > DOCS.md","build:docs":"npm run build:docs:html && npm run build:docs:md","prepublish":"yarn build"},"author":{"name":"Pelle Braendgaard","email":"pelle.braendgaard@consensys.net"},"license":"MIT","dependencies":{"ethjs-util":"^0.1.3","jsontokens":"^0.7.6","mnid":"^0.1.1","nets":"^3.2.0","tweetnacl":"^1.0.0","tweetnacl-util":"^0.15.0","uport-lite":"^1.0.0"},"jest":{"coverageDirectory":"./coverage/","collectCoverage":true,"unmockedModulePathPatterns":["<rootDir>/node_modules/nock"]},"devDependencies":{"babel-cli":"^6.22.2","babel-jest":"^18.0.0","babel-loader":"^6.2.10","babel-plugin-syntax-object-rest-spread":"^6.13.0","babel-plugin-transform-object-rest-spread":"^6.22.0","babel-polyfill":"^6.22.0","babel-preset-es2015":"^6.22.0","babel-preset-react":"^6.22.0","babel-register":"^6.22.0","body-parser":"^1.17.1","express":"^4.15.2","jest":"^18.1.0","jsdoc":"^3.4.3","jsdoc-to-markdown":"^1.3.7","json-loader":"^0.5.4","mockdate":"^2.0.1","nock":"^9.0.6","webpack":"^1.14.0"},"gitHead":"473b4065bb0fc77b96ef11ef50d9c426b7eb218c","_id":"uport@0.6.0-alpha-6","_npmVersion":"5.4.2","_nodeVersion":"8.7.0","_npmUser":{"name":"pelleb","email":"pelleb@gmail.com"},"dist":{"integrity":"sha512-MZi3DyNdZh545HegYaPNW0jQGU6qBosYHwblfprOpu+X1NJkt+l26GMPUTab65YpxTW4Yl8WjDHkCnD1xcO0MA==","shasum":"8a1119720989ffe40a80a2e9219d2b6ed5525867","tarball":"https://registry.npmjs.org/uport/-/uport-0.6.0-alpha-6.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBhek/nfkJsvuMRVwqIf/gyEin1BMYcq6c3JOCGLQDebAiAM0gFjsJZRv2qy2ZcL0p9hWzDvseb8mvnLOPAhPqFvKw=="}]},"maintainers":[{"email":"levi.strope@gmail.com","name":"localredhead"},{"email":"pelleb@gmail.com","name":"pelleb"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/uport-0.6.0-alpha-6.tgz_1509127589704_0.3401841295417398"},"directories":{}},"0.6.0":{"name":"uport","version":"0.6.0","description":"Library for interacting with uport profiles and attestations","main":"lib/index.js","files":["lib","dist","src","tutorial"],"scripts":{"test":"jest","build:es5":"babel src -d lib","build:browser":"webpack --config webpack.config.js","build":"yarn build:es5 && yarn test && yarn build:browser","build:docs:html":"jsdoc src/* README.md -d docs","build:docs:md":"./node_modules/jsdoc-to-markdown/bin/cli.js src/* > DOCS.md","build:docs":"npm run build:docs:html && npm run build:docs:md","prepublish":"yarn build"},"author":{"name":"Pelle Braendgaard","email":"pelle.braendgaard@consensys.net"},"license":"MIT","dependencies":{"ethjs-util":"^0.1.3","jsontokens":"^0.7.6","mnid":"^0.1.1","nets":"^3.2.0","tweetnacl":"^1.0.0","tweetnacl-util":"^0.15.0","uport-lite":"^1.0.0"},"jest":{"coverageDirectory":"./coverage/","collectCoverage":true,"unmockedModulePathPatterns":["<rootDir>/node_modules/nock"]},"devDependencies":{"babel-cli":"^6.22.2","babel-jest":"^18.0.0","babel-loader":"^6.2.10","babel-plugin-syntax-object-rest-spread":"^6.13.0","babel-plugin-transform-object-rest-spread":"^6.22.0","babel-polyfill":"^6.22.0","babel-preset-es2015":"^6.22.0","babel-preset-react":"^6.22.0","babel-register":"^6.22.0","body-parser":"^1.17.1","express":"^4.15.2","jest":"^18.1.0","jsdoc":"^3.4.3","jsdoc-to-markdown":"^1.3.7","json-loader":"^0.5.4","mockdate":"^2.0.1","nock":"^9.0.6","webpack":"^1.14.0"},"gitHead":"568a1b866a98ba2ce9b5ec35f2c69cac899009d5","_id":"uport@0.6.0","_npmVersion":"5.5.1","_nodeVersion":"8.7.0","_npmUser":{"name":"oed","email":"oed3933@gmail.com"},"dist":{"integrity":"sha512-t3pG3if5wq/VEH/F6RnvfkvXjtH6K6Uc2Q/VtJROSx6HU+/JcZkbnAoBwf+/MmdrPNuDZQCl4eCns6zcLW0lVg==","shasum":"bd273a93b1755b047670d36b66814746eb2bb9be","tarball":"https://registry.npmjs.org/uport/-/uport-0.6.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFfonv50sM+GRiFhXsLQve6vBArxLrPzgGd7/tQaS/GNAiEA5BZt39pBjmPcavbdW5i1gF8YGr0IR5Ea1dC3nsGclRM="}]},"maintainers":[{"email":"zachferland@gmail.com","name":"zachferland"},{"email":"oed3933@gmail.com","name":"oed"},{"email":"levi.strope@gmail.com","name":"localredhead"},{"email":"pelleb@gmail.com","name":"pelleb"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/uport-0.6.0.tgz_1509386826315_0.5865046139806509"},"directories":{}},"0.6.1":{"name":"uport","version":"0.6.1","description":"Library for interacting with uport profiles and attestations","main":"lib/index.js","files":["lib","dist","src","tutorial"],"scripts":{"test":"jest","build:es5":"babel src -d lib","build:browser":"webpack --config webpack.config.js","build":"yarn build:es5 && yarn test && yarn build:browser","build:docs:html":"jsdoc src/* README.md -d docs","build:docs:md":"./node_modules/jsdoc-to-markdown/bin/cli.js src/* > DOCS.md","build:docs":"npm run build:docs:html && npm run build:docs:md","prepublish":"yarn build"},"author":{"name":"Pelle Braendgaard","email":"pelle.braendgaard@consensys.net"},"license":"MIT","dependencies":{"ethjs-util":"^0.1.3","jsontokens":"^0.7.6","mnid":"^0.1.1","nets":"^3.2.0","tweetnacl":"^1.0.0","tweetnacl-util":"^0.15.0","uport-lite":"^1.0.0"},"jest":{"coverageDirectory":"./coverage/","collectCoverage":true,"unmockedModulePathPatterns":["<rootDir>/node_modules/nock"]},"devDependencies":{"babel-cli":"^6.22.2","babel-jest":"^18.0.0","babel-loader":"^6.2.10","babel-plugin-syntax-object-rest-spread":"^6.13.0","babel-plugin-transform-object-rest-spread":"^6.22.0","babel-polyfill":"^6.22.0","babel-preset-es2015":"^6.22.0","babel-preset-react":"^6.22.0","babel-register":"^6.22.0","body-parser":"^1.17.1","express":"^4.15.2","jest":"^18.1.0","jsdoc":"^3.4.3","jsdoc-to-markdown":"^1.3.7","json-loader":"^0.5.4","mockdate":"^2.0.1","nock":"^9.0.6","webpack":"^1.14.0"},"gitHead":"0e893de4dc3dab696ca6d32fb79677931a10cc9e","_id":"uport@0.6.1","_npmVersion":"5.6.0","_nodeVersion":"9.4.0","_npmUser":{"name":"pelleb","email":"pelleb@gmail.com"},"dist":{"integrity":"sha512-Q705Fz9W/jXF+Q0eKRQ9svv4DUQ6rNcuq4sOWzDrDf6V5RJ3qG4W533lL7Vd0Cl0wg1tvD/inyoTc+4iaG9NIQ==","shasum":"79df0f24a668e3348c8ff9a107f2d17e0a37fb9b","tarball":"https://registry.npmjs.org/uport/-/uport-0.6.1.tgz","fileCount":16,"unpackedSize":1267642,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDzb6JXY3qs4w83RKYSULIl6SWsI+Y9VoFDanHtvZUnvQIgWzWX8FBoVH4bfVkCMxeEJnyuSIfjjhRjxVUvRglJsY0="}]},"maintainers":[{"email":"levi.strope@gmail.com","name":"localredhead"},{"email":"oed3933@gmail.com","name":"oed"},{"email":"pelleb@gmail.com","name":"pelleb"},{"email":"zachferland@gmail.com","name":"zachferland"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/uport_0.6.1_1519068032220_0.9844242074907426"},"_hasShrinkwrap":false},"0.6.2":{"name":"uport","version":"0.6.2","description":"Library for interacting with uport profiles and attestations","main":"lib/index.js","files":["lib","dist","src","tutorial"],"scripts":{"test":"jest","build:es5":"babel src -d lib","build:browser":"webpack --config webpack.config.js","build":"yarn build:es5 && yarn test && yarn build:browser","build:docs:html":"jsdoc src/* README.md -d docs","build:docs:md":"./node_modules/jsdoc-to-markdown/bin/cli.js src/* > DOCS.md","build:docs":"npm run build:docs:html && npm run build:docs:md","prepublish":"yarn build"},"author":{"name":"Pelle Braendgaard","email":"pelle.braendgaard@consensys.net"},"license":"MIT","dependencies":{"ethjs-util":"^0.1.3","jsontokens":"^0.7.6","mnid":"^0.1.1","nets":"^3.2.0","tweetnacl":"^1.0.0","tweetnacl-util":"^0.15.0","uport-lite":"^1.0.0"},"jest":{"coverageDirectory":"./coverage/","collectCoverage":true,"unmockedModulePathPatterns":["<rootDir>/node_modules/nock"]},"devDependencies":{"babel-cli":"^6.22.2","babel-jest":"^18.0.0","babel-loader":"^6.2.10","babel-plugin-syntax-object-rest-spread":"^6.13.0","babel-plugin-transform-object-rest-spread":"^6.22.0","babel-polyfill":"^6.22.0","babel-preset-es2015":"^6.22.0","babel-preset-react":"^6.22.0","babel-register":"^6.22.0","body-parser":"^1.17.1","express":"^4.15.2","jest":"^18.1.0","jsdoc":"^3.4.3","jsdoc-to-markdown":"^1.3.7","json-loader":"^0.5.4","mockdate":"^2.0.1","nock":"^9.0.6","webpack":"^1.14.0"},"gitHead":"f5f456bf8f5212ca4578ac47fa1260396971f7ca","_id":"uport@0.6.2","_npmVersion":"5.6.0","_nodeVersion":"9.5.0","_npmUser":{"name":"pelleb","email":"pelleb@gmail.com"},"dist":{"integrity":"sha512-oMZRSJPpLFpuvs5NR6KPje7LzQK10zn8uwnA42pPGvwEFSepEnI2bGZOr/VaZ+Mp2y+ngHo37SEu9marK1rj3Q==","shasum":"3b75a545c530ef8b67969e580003c2128e1592ba","tarball":"https://registry.npmjs.org/uport/-/uport-0.6.2.tgz","fileCount":16,"unpackedSize":1267908,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCID2GAsuWeLJCbQyJmVujkfCC0kdGzS6HgdEedTv6druHAiEA414DEEJI4aAjfEEKUBQMhSrgWCeS9SXmopDmErUyIRM="}]},"maintainers":[{"email":"levi.strope@gmail.com","name":"localredhead"},{"email":"oed3933@gmail.com","name":"oed"},{"email":"pelleb@gmail.com","name":"pelleb"},{"email":"zachferland@gmail.com","name":"zachferland"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/uport_0.6.2_1519254663667_0.6641396743077208"},"_hasShrinkwrap":false},"0.7.0-alpha-1":{"name":"uport","version":"0.7.0-alpha-1","description":"Library for interacting with uport profiles and attestations","main":"lib/index.js","files":["lib","dist","src","tutorial"],"scripts":{"test":"jest","test:ci":"jest -u --coverage","build:es5":"babel src -d lib","build:browser":"webpack --config webpack.config.js","build":"yarn build:es5 && yarn test:ci && yarn build:browser","build:docs:html":"jsdoc src/* README.md -d docs","build:docs:md":"./node_modules/jsdoc-to-markdown/bin/cli.js src/* > DOCS.md","build:docs":"npm run build:docs:html && npm run build:docs:md","prepublish":"yarn build"},"author":{"name":"Pelle Braendgaard","email":"pelle.braendgaard@consensys.net"},"license":"MIT","dependencies":{"did-jwt":"^0.0.7","did-resolver":"^0.0.4","ethjs-util":"^0.1.3","ethr-did-resolver":"^0.0.7","mnid":"^0.1.1","nets":"^3.2.0","tweetnacl":"^1.0.0","tweetnacl-util":"^0.15.0","uport-did-resolver":"^0.0.2","uport-lite":"^1.0.2"},"jest":{"coverageDirectory":"./coverage/","unmockedModulePathPatterns":["<rootDir>/node_modules/nock"],"testEnvironment":"node"},"devDependencies":{"babel-cli":"^6.26.0","babel-core":"^6.26.0","babel-jest":"^22.4.3","babel-loader":"^7.1.4","babel-plugin-syntax-object-rest-spread":"^6.13.0","babel-plugin-transform-es2015-modules-umd":"^6.24.1","babel-plugin-transform-object-rest-spread":"^6.26.0","babel-plugin-transform-runtime":"^6.23.0","babel-polyfill":"^6.22.0","babel-preset-env":"^1.6.1","body-parser":"^1.17.1","express":"^4.15.2","jest":"^22.4.3","jsdoc":"^3.4.3","jsdoc-to-markdown":"^1.3.7","json-loader":"^0.5.4","mockdate":"^2.0.1","nock":"^9.0.6","webpack":"^4.6.0","webpack-cli":"^2.0.15"},"readme":"# uport-js\n\n## Integrate uPort in your javascript application\n\nuPort provides a simple way for your users to login to your website and provide private credentials such as identity information and contact details to you.\n\nYou can also “attest” credentials they provide to you or that you yourself have about them. This can be shared back to your customers so you can help them build their digital identity.\n\nUport.js provides a simple way for you to integrate uport.js into your javascript application. You can also interact with your uPort users directly in the browser.\n\nWe have an easy to use browser library [uport-connect](https://github.com/uport-project/uport-connect) which can help you do so.\n\n## Setup your uPort application identity\n\nFirst make sure you have your uPort app installed and you've setup your own uPort identity.\n\n### What is a uPort identity?\n\nAn identity in uPort is really just someone or something that can sign data or transactions and also receive signed data about itself.\n\nAn identity has an identifier in the form of an [MNID](https://github.com/uport-project/mnid), a signing key, and a public key stored on the [uPort Registry](https://github.com/uport-project/uport-registry).\n\nAn identity can:\n\n- Sign JWTs (JSON Web Tokens)\n  - [Authenticate themselves to a third party](messages/shareresp.md)\n  - [Disclose private information about themselves](messages/shareresp.md)\n- [Receive requests for disclosure about themselves](messages/sharereq.md)\n- [Receive and store signed third party verifications about themselves](flows/verification.md)\n- [Sign Ethereum transactions](flows/tx.md)\n\nWhen interacting privately with a user you will be interchanging signed JWT([JSON Web Token](https://jwt.io/)). To verify the signature of the JWT you and your users will be fetching your public key from the public profile.\n\nFor details on uPort's underlying architecture, read our [spec repo](https://github.com/uport-project/specs) or check out the [uPort identity contracts] (https://github.com/uport-project/uport-identity).\n\n## Configure your application\n\nIn your application you must first configure your uPort object.\n\n```javascript\nimport { Credentials } from 'uport'\n\n// For new ethereum based addresses\nconst credentials = new Credentials({\n  appName: 'App Name',\n  did: 'did:ethr:0x....',\n  privateKey: process.env.PRIVATE_KEY\n})\n\n// You can create a new identity\n\nconsole.log(Credentials.createIdentity())\n\n// For legacy application identity created on App Manager\nconst credentials = new Credentials({\n  appName: 'App Name',\n  address: 'MNID Encoded uPort Address For Your App',\n  privateKey: process.env.PRIVATE_KEY\n})\n\n\n```\n\n## Requesting information from your users\n\nTo request information from your user you create a Selective Disclosure Request JWT and present it to your user in the web browser.\n\nThe most basic request to get a users public uport identity details:\n\n```javascript\ncredentials.requestDisclosure().then(requestToken => {\n  // send requestToken to browser\n})\n```\n\nYou can ask for specific private data like this:\n\n```javascript\ncredentials.requestDisclosure({\n    requested: ['name','phone','identity_no'],\n    callbackUrl: 'https://....' // URL to send the response of the request to\n  }.then(requestToken => {\n  // send requestToken to browser\n  })\n```\n\nIf you need to know the users address on a specific ethereum network, specify it's `network_id` (currently defaults to ropsten `0x3`). In this case be aware that the `address` returned will be the address on the public network (currently ropsten) for the users profile. The requested network address will be in the `networkAddress` field and will be MNID encoded.\n\n```javascript\ncredentials.requestDisclosure({network_id: '0x4'}).then(requestToken => {\n  // send requestToken to browser\n})\n```\n\nBack in your server code you receive the token:\n\n```javascript\ncredentials.authenticate(responseToken).then(profile => {\n  // Store user profile\n})\n```\n\n### Stateless Challenge/Response\n\nTo ensure that the response received was created as a response to your selective disclosure request above, the original request is included in the response from the mobile app.\n\nThe default verification rule is that the issuer of the embedded request must match the clientId in your Credentials object and that the original request has not yet expired.\n\nSome applications that exclusively live in the browser are unable to sign the original request. In those cases the request token verification is ignored.\n\n### Requesting Push notification tokens from your users\n\nAs part of the selective disclosure request you can ask for permission from your users to communicate directly with their app.\n\n```javascript\ncredentials.createRequest({\n  requested:[...],\n  notifications: true\n}).then(requestToken => {\n  // send to browser\n})\n```\n\nPresent it to the user like before. On the server you can receive the push token like this:\n\n```javascript\ncredentials.receive(responseToken).then(profile => {\n  // Store user profile\n  // Store push token securely\n  console.log(profile.pushToken)\n})\n```\n\n## Attesting information about your users\n\nAttesting information about your users helps add real value to your application. Your users will use uport to build up their own digital identity and your business is an important part of this.\n\nIf you're a financial institution you may be able to attest to KYC related information such as national identity numbers. If you're an educational application you may want to attest to your users achievements in a way that they can securely share.\n\n### What are attestations\n\nAttestations are shareable private information that one party can sign about another party. They are designed to be shared privately by you to your users and by them to other users.\n\n### Creating an attestation\n\n```javascript\ncredentials.attest({\n  sub: '0x...', // uport address of user\n  exp: <future timestamp>, // If your information is not permanent make sure to add an expires timestamp\n  claims: {name:'John Smith'}\n}).then(attestation => {\n  // send attestation to user\n})\n```\n\nAs before you will want to send this to your user. You can do this in the browser\n\n```javascript\nconst connect = new uportconnect.Connect('app name')\nconnect.showRequest(attestation) // no response is needed for an attestation\n```\n\nIf you requested a push notification token in the above selective disclosure step you can also send attestations directly to your users app in real time.\n\n```javascript\ncredentials.push(pushToken, `me.uport:add?attestation=${attestationjwt}`, message).then(response => {\n\n})\n```\n\n## Asking users to sign Ethereum transactions\n\nEthereum smart contracts live on the blockchain and at a certain address. The application interface is known as the abi and can be created by the Solidity compiler.\n\nOur Contract class will let you create a javascript object modelling the SmartContract allowing you to create uport uri's that you can send to the user.\n\n```javascript\nimport { Contract } from 'uport'\nconst abi = // import from json or have directly in code\nconst contract = Contract(abi).at(contractAddress)\n// creates a request for the user to call the transfer() function on the smart contract\nconst txRequest = tokenContract.transfer(....)\n```\n\nIn your front end use 'uport-connect' to present it to your user either as a QR code or as a uport-button depending on whether they are on a desktop or mobile browser.\n\n```javascript\nconst connect = new uportconnect.Connect('app name')\nconnect.sendTransaction(txRequest).then(txResponse => {\n  // send response back to server\n})\n```\n\nBack in your server code you receive the `txResponse`. This is a standard ethereum transaction object that you can verify.\n\n","readmeFilename":"README.md","gitHead":"ebc3c412d5143b533d8e26dc8fa567a7f85b1fc6","_id":"uport@0.7.0-alpha-1","_npmVersion":"5.6.0","_nodeVersion":"9.11.1","_npmUser":{"name":"pelleb","email":"pelleb@gmail.com"},"dist":{"integrity":"sha512-J/17lGFolUDTrWFecjFSOtLWn+5vkfmqVJJWap5bCkhOVG6d6ZX2IGutRpyAPUBaZdWp1TxrR16Sh00x3Zb68A==","shasum":"3de13300c8d1ec69f670e67f00fdb1e5d8e3e0d0","tarball":"https://registry.npmjs.org/uport/-/uport-0.7.0-alpha-1.tgz","fileCount":18,"unpackedSize":678205,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa4U50CRA9TVsSAnZWagAALaQP/iSGOUHiMXRdElTzXlp8\nSPMCaAgBY5BIgiTXOEOWAzpRJH1WDnl9070/yrbAraCWhWlCihor+52y1koN\no7vHsF1Cy2fQpC7ggllMZ2jrf/YkRnZ/I1hYCORSLegI+/Mr+nhNQJLEmD6W\nwfowgGWqmi1XEDYrKJzNKrV2N2n0Mjv0Pa6yeo1mm/Nu+6uwsSbJNoIH7aoX\nJ1X/IQY3LLkb6dxSq0Frgszlzp1Qqe0SFnICJSR8f/WVt2ErFaQ0MChDNmmh\nYGMjcPsDsyp8xVnKCKGgfPGTrnbum8M+DEIlUWxERtyuxf0pKM7xq51N4cDQ\n51MlG7KKnmuWNY1GkRKBUkjtZl5j7CmnPKtfQr2W4IdwqkvAfWVAVY5kGAmn\nfjg59jGOGRQ1IyB9HQnfDTPQ4z/9grSmFV1tQWrsL++Tg6wQ0HeoFfxn0Eg9\n2qcaVXiuqHjvXROyopUdsvb0l2Wd3BusHwKy0RBh+Af6VOsXyMIVNMZ03/BF\nm5Z1YOoWtceGYyUxKDF+C0LocDtf3NQpy64g30cnzuqeenK9rCAuYq7Ygc/j\ny1ULx65tdpG8UZhAwwgLxioCLxe6JVbvqsnliOqbz1/FXQdc2mcRwqkz9923\nUO/SQtf5fXHZqTMWVc3JbTuUAj2txJo8eEpUR7md0vUNJ8VfufAMw0CitoLy\nRYNY\r\n=nBhA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFGZYMyGoMY5ZFb4QeqKb3gBBRt0zeVWlIvg/uvmTS7IAiEA/VsIfzWYQ3rTdXWJZAeAlHL+PGY3jbEAg9E+G5ylANI="}]},"maintainers":[{"email":"levi.strope@gmail.com","name":"localredhead"},{"email":"oed3933@gmail.com","name":"oed"},{"email":"pelleb@gmail.com","name":"pelleb"},{"email":"zachferland@gmail.com","name":"zachferland"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/uport_0.7.0-alpha-1_1524715123494_0.7552734955717617"},"_hasShrinkwrap":false},"0.7.0-alpha-2":{"name":"uport","version":"0.7.0-alpha-2","description":"Library for interacting with uport profiles and attestations","main":"lib/index.js","files":["lib","dist","src","tutorial"],"scripts":{"test":"jest","test:ci":"jest -u --coverage","build:es5":"babel src -d lib","build:browser":"webpack --config webpack.config.js","build":"yarn build:es5 && yarn test:ci && yarn build:browser","build:docs:html":"jsdoc src/* README.md -d docs","build:docs:md":"./node_modules/jsdoc-to-markdown/bin/cli.js src/* > DOCS.md","build:docs":"npm run build:docs:html && npm run build:docs:md","prepublish":"yarn build"},"author":{"name":"Pelle Braendgaard","email":"pelle.braendgaard@consensys.net"},"license":"MIT","dependencies":{"did-jwt":"^0.0.7","did-resolver":"^0.0.4","ethjs-util":"^0.1.3","ethr-did-resolver":"^0.0.7","mnid":"^0.1.1","uport-did-resolver":"^0.0.2","uport-lite":"^1.0.2"},"jest":{"coverageDirectory":"./coverage/","unmockedModulePathPatterns":["<rootDir>/node_modules/nock"],"testEnvironment":"node"},"devDependencies":{"babel-cli":"^6.26.0","babel-core":"^6.26.0","babel-jest":"^22.4.3","babel-loader":"^7.1.4","babel-plugin-syntax-object-rest-spread":"^6.13.0","babel-plugin-transform-es2015-modules-umd":"^6.24.1","babel-plugin-transform-object-rest-spread":"^6.26.0","babel-plugin-transform-runtime":"^6.23.0","babel-polyfill":"^6.22.0","babel-preset-env":"^1.6.1","body-parser":"^1.17.1","express":"^4.15.2","jest":"^22.4.3","jsdoc":"^3.4.3","jsdoc-to-markdown":"^1.3.7","json-loader":"^0.5.4","mockdate":"^2.0.1","webpack":"^4.6.0","webpack-cli":"^2.0.15"},"readme":"# uport-js\n\n## Integrate uPort in your javascript application\n\nuPort provides a simple way for your users to login to your website and provide private credentials such as identity information and contact details to you.\n\nYou can also “attest” credentials they provide to you or that you yourself have about them. This can be shared back to your customers so you can help them build their digital identity.\n\nUport.js provides a simple way for you to integrate uport.js into your javascript application. You can also interact with your uPort users directly in the browser.\n\nWe have an easy to use browser library [uport-connect](https://github.com/uport-project/uport-connect) which can help you do so.\n\n## Setup your uPort application identity\n\nFirst make sure you have your uPort app installed and you've setup your own uPort identity.\n\n### What is a uPort identity?\n\nAn identity in uPort is really just someone or something that can sign data or transactions and also receive signed data about itself.\n\nAn identity has an identifier in the form of an [MNID](https://github.com/uport-project/mnid), a signing key, and a public key stored on the [uPort Registry](https://github.com/uport-project/uport-registry).\n\nAn identity can:\n\n- Sign JWTs (JSON Web Tokens)\n  - [Authenticate themselves to a third party](messages/shareresp.md)\n  - [Disclose private information about themselves](messages/shareresp.md)\n- [Receive requests for disclosure about themselves](messages/sharereq.md)\n- [Receive and store signed third party verifications about themselves](flows/verification.md)\n- [Sign Ethereum transactions](flows/tx.md)\n\nWhen interacting privately with a user you will be interchanging signed JWT([JSON Web Token](https://jwt.io/)). To verify the signature of the JWT you and your users will be fetching your public key from the public profile.\n\nFor details on uPort's underlying architecture, read our [spec repo](https://github.com/uport-project/specs) or check out the [uPort identity contracts] (https://github.com/uport-project/uport-identity).\n\n## Configure your application\n\nIn your application you must first configure your uPort object.\n\n```javascript\nimport { Credentials } from 'uport'\n\n// For new ethereum based addresses\nconst credentials = new Credentials({\n  appName: 'App Name',\n  did: 'did:ethr:0x....',\n  privateKey: process.env.PRIVATE_KEY\n})\n\n// You can create a new identity\n\nconsole.log(Credentials.createIdentity())\n\n// For legacy application identity created on App Manager\nconst credentials = new Credentials({\n  appName: 'App Name',\n  address: 'MNID Encoded uPort Address For Your App',\n  privateKey: process.env.PRIVATE_KEY\n})\n\n\n```\n\n## Requesting information from your users\n\nTo request information from your user you create a Selective Disclosure Request JWT and present it to your user in the web browser.\n\nThe most basic request to get a users public uport identity details:\n\n```javascript\ncredentials.requestDisclosure().then(requestToken => {\n  // send requestToken to browser\n})\n```\n\nYou can ask for specific private data like this:\n\n```javascript\ncredentials.requestDisclosure({\n    requested: ['name','phone','identity_no'],\n    callbackUrl: 'https://....' // URL to send the response of the request to\n  }.then(requestToken => {\n  // send requestToken to browser\n  })\n```\n\nIf you need to know the users address on a specific ethereum network, specify it's `network_id` (currently defaults to ropsten `0x3`). In this case be aware that the `address` returned will be the address on the public network (currently ropsten) for the users profile. The requested network address will be in the `networkAddress` field and will be MNID encoded.\n\n```javascript\ncredentials.requestDisclosure({network_id: '0x4'}).then(requestToken => {\n  // send requestToken to browser\n})\n```\n\nBack in your server code you receive the token:\n\n```javascript\ncredentials.authenticate(responseToken).then(profile => {\n  // Store user profile\n})\n```\n\n### Stateless Challenge/Response\n\nTo ensure that the response received was created as a response to your selective disclosure request above, the original request is included in the response from the mobile app.\n\nThe default verification rule is that the issuer of the embedded request must match the clientId in your Credentials object and that the original request has not yet expired.\n\nSome applications that exclusively live in the browser are unable to sign the original request. In those cases the request token verification is ignored.\n\n### Requesting Push notification tokens from your users\n\nAs part of the selective disclosure request you can ask for permission from your users to communicate directly with their app.\n\n```javascript\ncredentials.createRequest({\n  requested:[...],\n  notifications: true\n}).then(requestToken => {\n  // send to browser\n})\n```\n\nPresent it to the user like before. On the server you can receive the push token like this:\n\n```javascript\ncredentials.receive(responseToken).then(profile => {\n  // Store user profile\n  // Store push token securely\n  console.log(profile.pushToken)\n})\n```\n\n## Attesting information about your users\n\nAttesting information about your users helps add real value to your application. Your users will use uport to build up their own digital identity and your business is an important part of this.\n\nIf you're a financial institution you may be able to attest to KYC related information such as national identity numbers. If you're an educational application you may want to attest to your users achievements in a way that they can securely share.\n\n### What are attestations\n\nAttestations are shareable private information that one party can sign about another party. They are designed to be shared privately by you to your users and by them to other users.\n\n### Creating an attestation\n\n```javascript\ncredentials.attest({\n  sub: '0x...', // uport address of user\n  exp: <future timestamp>, // If your information is not permanent make sure to add an expires timestamp\n  claims: {name:'John Smith'}\n}).then(attestation => {\n  // send attestation to user\n})\n```\n\nAs before you will want to send this to your user. You can do this in the browser\n\n```javascript\nconst connect = new uportconnect.Connect('app name')\nconnect.showRequest(attestation) // no response is needed for an attestation\n```\n\nIf you requested a push notification token in the above selective disclosure step you can also send attestations directly to your users app in real time.\n\n```javascript\ncredentials.push(pushToken, `me.uport:add?attestation=${attestationjwt}`, message).then(response => {\n\n})\n```\n\n## Asking users to sign Ethereum transactions\n\nEthereum smart contracts live on the blockchain and at a certain address. The application interface is known as the abi and can be created by the Solidity compiler.\n\nOur Contract class will let you create a javascript object modelling the SmartContract allowing you to create uport uri's that you can send to the user.\n\n```javascript\nimport { Contract } from 'uport'\nconst abi = // import from json or have directly in code\nconst contract = Contract(abi).at(contractAddress)\n// creates a request for the user to call the transfer() function on the smart contract\nconst txRequest = tokenContract.transfer(....)\n```\n\nIn your front end use 'uport-connect' to present it to your user either as a QR code or as a uport-button depending on whether they are on a desktop or mobile browser.\n\n```javascript\nconst connect = new uportconnect.Connect('app name')\nconnect.sendTransaction(txRequest).then(txResponse => {\n  // send response back to server\n})\n```\n\nBack in your server code you receive the `txResponse`. This is a standard ethereum transaction object that you can verify.\n\n","readmeFilename":"README.md","gitHead":"f76a23410a92c7e234e51951478a545ccd2f2f5a","_id":"uport@0.7.0-alpha-2","_npmVersion":"5.6.0","_nodeVersion":"9.11.1","_npmUser":{"name":"pelleb","email":"pelleb@gmail.com"},"dist":{"integrity":"sha512-8MOZvJAFxR23Yy//0nxPxxP7zyUN++rqdbujpaOE3skm9wBDLqVIe0kKoVnTtDHNpi83XZOCMzXcNt3ncpRGGw==","shasum":"92f7eff46dbf7ac5b933fbce3b834efea4a1be5f","tarball":"https://registry.npmjs.org/uport/-/uport-0.7.0-alpha-2.tgz","fileCount":18,"unpackedSize":623934,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa40SrCRA9TVsSAnZWagAAJHAP/1IFkVGBXW9KkWNehs9E\nX4Ozbsw3jBBy4GS93bZThOy7/P9LrvJE4A4j+J8NeOh6S21CfhLGr6tO6qDP\nvQCu+ndofswonYpC5WskpmjU1NbkebdCkeWEi0i6UFPriODX16gXN5c/344r\nqP2C5exiIEVCOx01okQ6N1tUlDdOItqQevMTQd9FTirHnqemSnTCEMM0Spqo\neODkTC3eJe+Wj4Hjq3zuoFJjd/Hw2eectbPYTyzj/rRQuxfFC5rK6+Qo2I4M\nXgHu13+2e4sRY5dG+d5OW3ZReV2mkNISI4BUMSxQhdelLBA5fxFTiqsDPWWo\n1vYUsOGr8JfQCKJtOwr8zRecFsrfh79vitiVcUP8IGQzgXwjlEDFhvUoptZe\nfuPavl+iTkLCqlv9eCoJniZyVPSvfq7jspv6zyhKxKO4nisePjlUxLqkOsJO\nhmsqWDaVPpBTbRUG0HCm6gVOxvSoYmsfSHJ3dyrIskvqK3KEuIyg4QJX46Yu\n/6CdLIXWJc7hmJW+OYwUtmiZTT/fme8Z9F4oBFgGT0lXoZ9U9pJpZIxvSCAn\nHGPzrJ8WpWiCkpD3GdF8uJc/Xl9La8ohfGxiIgAxISWEE/++/17NKlQXFa1a\nGdyNCTOeKWloyuSGzww5N3/nJ5i+FtgujI8zzf8xpsu9QKG54iRVs0RaiVEd\ngU0X\r\n=r2Wj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDkRPqwuLhHpZiBIfbrOpv+pPZ5CYo0E6UuZ+YX5geMSQIgSa4TpEEZx57bu5Uu42fN1dHVC4LafUHWaxo9Jpy8ZiY="}]},"maintainers":[{"email":"levi.strope@gmail.com","name":"localredhead"},{"email":"oed3933@gmail.com","name":"oed"},{"email":"pelleb@gmail.com","name":"pelleb"},{"email":"zachferland@gmail.com","name":"zachferland"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/uport_0.7.0-alpha-2_1524843690577_0.19497612499438244"},"_hasShrinkwrap":false},"0.7.0-alpha-3":{"name":"uport","version":"0.7.0-alpha-3","description":"Library for interacting with uport profiles and attestations","main":"lib/index.js","files":["lib","dist","src","tutorial"],"scripts":{"test":"jest","test:ci":"jest -u --coverage","build:es5":"babel src -d lib","build:browser":"webpack --config webpack.config.js","build":"yarn build:es5 && yarn test:ci && yarn build:browser","build:docs:html":"jsdoc src/* README.md -d docs","build:docs:md":"./node_modules/jsdoc-to-markdown/bin/cli.js src/* > DOCS.md","build:docs":"npm run build:docs:html && npm run build:docs:md","prepublish":"yarn build"},"author":{"name":"Pelle Braendgaard","email":"pelle.braendgaard@consensys.net"},"license":"MIT","dependencies":{"did-jwt":"^0.0.7","did-resolver":"^0.0.4","ethjs-util":"^0.1.3","ethr-did-resolver":"^0.0.7","mnid":"^0.1.1","muport-did-resolver":"^0.1.0","uport-did-resolver":"^0.0.2","uport-lite":"^1.0.2"},"jest":{"coverageDirectory":"./coverage/","unmockedModulePathPatterns":["<rootDir>/node_modules/nock"],"testEnvironment":"node"},"devDependencies":{"babel-cli":"^6.26.0","babel-core":"^6.26.0","babel-jest":"^22.4.3","babel-loader":"^7.1.4","babel-plugin-syntax-object-rest-spread":"^6.13.0","babel-plugin-transform-es2015-modules-umd":"^6.24.1","babel-plugin-transform-object-rest-spread":"^6.26.0","babel-plugin-transform-runtime":"^6.23.0","babel-polyfill":"^6.22.0","babel-preset-env":"^1.6.1","body-parser":"^1.17.1","express":"^4.15.2","jest":"^22.4.3","jsdoc":"^3.4.3","jsdoc-to-markdown":"^1.3.7","json-loader":"^0.5.4","mockdate":"^2.0.1","webpack":"^4.6.0","webpack-cli":"^2.0.15"},"readme":"# uport-js\n\n## Integrate uPort in your javascript application\n\nuPort provides a simple way for your users to login to your website and provide private credentials such as identity information and contact details to you.\n\nYou can also “attest” credentials they provide to you or that you yourself have about them. This can be shared back to your customers so you can help them build their digital identity.\n\nUport.js provides a simple way for you to integrate uport.js into your javascript application. You can also interact with your uPort users directly in the browser.\n\nWe have an easy to use browser library [uport-connect](https://github.com/uport-project/uport-connect) which can help you do so.\n\n## Setup your uPort application identity\n\nFirst make sure you have your uPort app installed and you've setup your own uPort identity.\n\n### What is a uPort identity?\n\nAn identity in uPort is really just someone or something that can sign data or transactions and also receive signed data about itself.\n\nAn identity has an identifier in the form of an [MNID](https://github.com/uport-project/mnid), a signing key, and a public key stored on the [uPort Registry](https://github.com/uport-project/uport-registry).\n\nAn identity can:\n\n- Sign JWTs (JSON Web Tokens)\n  - [Authenticate themselves to a third party](messages/shareresp.md)\n  - [Disclose private information about themselves](messages/shareresp.md)\n- [Receive requests for disclosure about themselves](messages/sharereq.md)\n- [Receive and store signed third party verifications about themselves](flows/verification.md)\n- [Sign Ethereum transactions](flows/tx.md)\n\nWhen interacting privately with a user you will be interchanging signed JWT([JSON Web Token](https://jwt.io/)). To verify the signature of the JWT you and your users will be fetching your public key from the public profile.\n\nFor details on uPort's underlying architecture, read our [spec repo](https://github.com/uport-project/specs) or check out the [uPort identity contracts] (https://github.com/uport-project/uport-identity).\n\n## Configure your application\n\nIn your application you must first configure your uPort object.\n\n```javascript\nimport { Credentials } from 'uport'\n\n// For new ethereum based addresses\nconst credentials = new Credentials({\n  appName: 'App Name',\n  did: 'did:ethr:0x....',\n  privateKey: process.env.PRIVATE_KEY\n})\n\n// You can create a new identity\n\nconsole.log(Credentials.createIdentity())\n\n// For legacy application identity created on App Manager\nconst credentials = new Credentials({\n  appName: 'App Name',\n  address: 'MNID Encoded uPort Address For Your App',\n  privateKey: process.env.PRIVATE_KEY\n})\n\n\n```\n\n## Requesting information from your users\n\nTo request information from your user you create a Selective Disclosure Request JWT and present it to your user in the web browser.\n\nThe most basic request to get a users public uport identity details:\n\n```javascript\ncredentials.requestDisclosure().then(requestToken => {\n  // send requestToken to browser\n})\n```\n\nYou can ask for specific private data like this:\n\n```javascript\ncredentials.requestDisclosure({\n    requested: ['name','phone','identity_no'],\n    callbackUrl: 'https://....' // URL to send the response of the request to\n  }.then(requestToken => {\n  // send requestToken to browser\n  })\n```\n\nIf you need to know the users address on a specific ethereum network, specify it's `network_id` (currently defaults to ropsten `0x3`). In this case be aware that the `address` returned will be the address on the public network (currently ropsten) for the users profile. The requested network address will be in the `networkAddress` field and will be MNID encoded.\n\n```javascript\ncredentials.requestDisclosure({network_id: '0x4'}).then(requestToken => {\n  // send requestToken to browser\n})\n```\n\nBack in your server code you receive the token:\n\n```javascript\ncredentials.authenticate(responseToken).then(profile => {\n  // Store user profile\n})\n```\n\n### Stateless Challenge/Response\n\nTo ensure that the response received was created as a response to your selective disclosure request above, the original request is included in the response from the mobile app.\n\nThe default verification rule is that the issuer of the embedded request must match the clientId in your Credentials object and that the original request has not yet expired.\n\nSome applications that exclusively live in the browser are unable to sign the original request. In those cases the request token verification is ignored.\n\n### Requesting Push notification tokens from your users\n\nAs part of the selective disclosure request you can ask for permission from your users to communicate directly with their app.\n\n```javascript\ncredentials.createRequest({\n  requested:[...],\n  notifications: true\n}).then(requestToken => {\n  // send to browser\n})\n```\n\nPresent it to the user like before. On the server you can receive the push token like this:\n\n```javascript\ncredentials.receive(responseToken).then(profile => {\n  // Store user profile\n  // Store push token securely\n  console.log(profile.pushToken)\n})\n```\n\n## Attesting information about your users\n\nAttesting information about your users helps add real value to your application. Your users will use uport to build up their own digital identity and your business is an important part of this.\n\nIf you're a financial institution you may be able to attest to KYC related information such as national identity numbers. If you're an educational application you may want to attest to your users achievements in a way that they can securely share.\n\n### What are attestations\n\nAttestations are shareable private information that one party can sign about another party. They are designed to be shared privately by you to your users and by them to other users.\n\n### Creating an attestation\n\n```javascript\ncredentials.attest({\n  sub: '0x...', // uport address of user\n  exp: <future timestamp>, // If your information is not permanent make sure to add an expires timestamp\n  claims: {name:'John Smith'}\n}).then(attestation => {\n  // send attestation to user\n})\n```\n\nAs before you will want to send this to your user. You can do this in the browser\n\n```javascript\nconst connect = new uportconnect.Connect('app name')\nconnect.showRequest(attestation) // no response is needed for an attestation\n```\n\nIf you requested a push notification token in the above selective disclosure step you can also send attestations directly to your users app in real time.\n\n```javascript\ncredentials.push(pushToken, `me.uport:add?attestation=${attestationjwt}`, message).then(response => {\n\n})\n```\n\n## Asking users to sign Ethereum transactions\n\nEthereum smart contracts live on the blockchain and at a certain address. The application interface is known as the abi and can be created by the Solidity compiler.\n\nOur Contract class will let you create a javascript object modelling the SmartContract allowing you to create uport uri's that you can send to the user.\n\n```javascript\nimport { Contract } from 'uport'\nconst abi = // import from json or have directly in code\nconst contract = Contract(abi).at(contractAddress)\n// creates a request for the user to call the transfer() function on the smart contract\nconst txRequest = tokenContract.transfer(....)\n```\n\nIn your front end use 'uport-connect' to present it to your user either as a QR code or as a uport-button depending on whether they are on a desktop or mobile browser.\n\n```javascript\nconst connect = new uportconnect.Connect('app name')\nconnect.sendTransaction(txRequest).then(txResponse => {\n  // send response back to server\n})\n```\n\nBack in your server code you receive the `txResponse`. This is a standard ethereum transaction object that you can verify.\n\n","readmeFilename":"README.md","gitHead":"7f66f0a7f6ec1f83ae87c7f769449039a31bc45b","_id":"uport@0.7.0-alpha-3","_npmVersion":"5.3.0","_nodeVersion":"8.4.0","_npmUser":{"name":"zachferland","email":"zachferland@gmail.com"},"dist":{"integrity":"sha512-56hcSskGjYGnirz+1FbIX6OlQZ9Uxbn2VmtRZ3D0eMTaCHynh4A9WZMEb4N02BHZnCtzBYXV9R/poqEFU6XBqw==","shasum":"7f3676b530418240b8d2fffa67c5a71e760ceaee","tarball":"https://registry.npmjs.org/uport/-/uport-0.7.0-alpha-3.tgz","fileCount":18,"unpackedSize":967922,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbEDxMCRA9TVsSAnZWagAASJUQAIWG119iQrHmRm9z1x4Z\nzb0RNGWXMTU7P/hrp6slpc6iTJNyYylh0UcQAFWP+eBbFwXktoiH0Cwi+WGH\nUb/wBHCdj1q1diFMc2BITD14ARoHGC/XuEDyhmRRKdNZbZPpnJNCuyzAEEKy\nyJAJYo9txsj36mux34bv0ahDo9JPQ+OI4uFanwbOs3zlzUdJu5jvgBTniy8p\nL02lXzd709vQysC26c2ofqyDe/YpM8azjyO11RnPfPO/qFGUfrR+FDFzZ6JD\nVAIRYlL00kUbtqDnH3xWsJAZMlLBAPo3bYfw1YZqW9EICJ0HizthWUOY3ZUG\nuG4jUdFRVz1k+23wvNE5Zlj6UsaF6IAAr2ycc/IlfdUPm2npWqhNUOA0COAi\nDN1vqgBq0TZQztwRjinxgidRM8FvXTRS2mKXvKGpO5EIcd3RifRk69F5bXOM\nZCy9kwy3OE9Za+ldYIcWmVATY2GklcZcYj1udYml2md0fNf329zaTB/P7jOB\nMxZ7I0I6MWmsZdDQh/QRVAvCgQ0gWCIDo4ybDJWvgbgpJ9NUi6R7mcG6Psku\n358W+fpXjhvsvXmbWJ/GLLxUzfYFXU7POEmW/58TCAZrRsZ84R/XtPCNX1PY\nx+jWxiHh9Ht5eVKnXCqYRZCKYic4WkT6b8z8noRtUch4Bn5ta6k1zJg8Ob1m\nUyiZ\r\n=NnWA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCsiSHNXOnRWHBC6M7evsmrozwzzsQD1osb5hKuF7poSQIgKxJzLz7T0E46/uS7YUrQFvwis3/sYqP8tJC82iSxdTw="}]},"maintainers":[{"email":"levi.strope@gmail.com","name":"localredhead"},{"email":"oed3933@gmail.com","name":"oed"},{"email":"pelleb@gmail.com","name":"pelleb"},{"email":"zachferland@gmail.com","name":"zachferland"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/uport_0.7.0-alpha-3_1527790667048_0.9683858467622994"},"_hasShrinkwrap":false},"0.7.0-alpha-4":{"name":"uport","version":"0.7.0-alpha-4","description":"Library for interacting with uport profiles and attestations","main":"lib/index.js","files":["lib","dist","src","tutorial"],"scripts":{"test":"jest","test:ci":"jest -u --coverage","build:es5":"babel src -d lib","build:browser":"webpack --config webpack.config.js","build":"yarn build:es5 && yarn test:ci && yarn build:browser","build:docs:html":"jsdoc src/* README.md -d docs","build:docs:md":"./node_modules/jsdoc-to-markdown/bin/cli.js src/* > DOCS.md","build:docs":"npm run build:docs:html && npm run build:docs:md","prepublish":"yarn build"},"author":{"name":"Pelle Braendgaard","email":"pelle.braendgaard@consensys.net"},"license":"MIT","dependencies":{"did-jwt":"^0.0.7","did-resolver":"^0.0.4","ethjs-util":"^0.1.3","ethr-did-resolver":"^0.0.7","mnid":"^0.1.1","muport-did-resolver":"^0.1.0","uport-did-resolver":"^0.0.2","uport-lite":"^1.0.2"},"jest":{"coverageDirectory":"./coverage/","unmockedModulePathPatterns":["<rootDir>/node_modules/nock"],"testEnvironment":"node"},"devDependencies":{"babel-cli":"^6.26.0","babel-core":"^6.26.0","babel-jest":"^22.4.3","babel-loader":"^7.1.4","babel-plugin-syntax-object-rest-spread":"^6.13.0","babel-plugin-transform-es2015-modules-umd":"^6.24.1","babel-plugin-transform-object-rest-spread":"^6.26.0","babel-plugin-transform-runtime":"^6.23.0","babel-polyfill":"^6.22.0","babel-preset-env":"^1.6.1","body-parser":"^1.17.1","express":"^4.15.2","jest":"^22.4.3","jsdoc":"^3.4.3","jsdoc-to-markdown":"^1.3.7","json-loader":"^0.5.4","mockdate":"^2.0.1","webpack":"^4.6.0","webpack-cli":"^2.0.15"},"readme":"# uport-js\n\n## Integrate uPort in your javascript application\n\nuPort provides a simple way for your users to login to your website and provide private credentials such as identity information and contact details to you.\n\nYou can also “attest” credentials they provide to you or that you yourself have about them. This can be shared back to your customers so you can help them build their digital identity.\n\nUport.js provides a simple way for you to integrate uport.js into your javascript application. You can also interact with your uPort users directly in the browser.\n\nWe have an easy to use browser library [uport-connect](https://github.com/uport-project/uport-connect) which can help you do so.\n\n## Setup your uPort application identity\n\nFirst make sure you have your uPort app installed and you've setup your own uPort identity.\n\n### What is a uPort identity?\n\nAn identity in uPort is really just someone or something that can sign data or transactions and also receive signed data about itself.\n\nAn identity has an identifier in the form of an [MNID](https://github.com/uport-project/mnid), a signing key, and a public key stored on the [uPort Registry](https://github.com/uport-project/uport-registry).\n\nAn identity can:\n\n- Sign JWTs (JSON Web Tokens)\n  - [Authenticate themselves to a third party](messages/shareresp.md)\n  - [Disclose private information about themselves](messages/shareresp.md)\n- [Receive requests for disclosure about themselves](messages/sharereq.md)\n- [Receive and store signed third party verifications about themselves](flows/verification.md)\n- [Sign Ethereum transactions](flows/tx.md)\n\nWhen interacting privately with a user you will be interchanging signed JWT([JSON Web Token](https://jwt.io/)). To verify the signature of the JWT you and your users will be fetching your public key from the public profile.\n\nFor details on uPort's underlying architecture, read our [spec repo](https://github.com/uport-project/specs) or check out the [uPort identity contracts] (https://github.com/uport-project/uport-identity).\n\n## Configure your application\n\nIn your application you must first configure your uPort object.\n\n```javascript\nimport { Credentials } from 'uport'\n\n// For new ethereum based addresses\nconst credentials = new Credentials({\n  appName: 'App Name',\n  did: 'did:ethr:0x....',\n  privateKey: process.env.PRIVATE_KEY\n})\n\n// You can create a new identity\n\nconsole.log(Credentials.createIdentity())\n\n// For legacy application identity created on App Manager\nconst credentials = new Credentials({\n  appName: 'App Name',\n  address: 'MNID Encoded uPort Address For Your App',\n  privateKey: process.env.PRIVATE_KEY\n})\n\n\n```\n\n## Requesting information from your users\n\nTo request information from your user you create a Selective Disclosure Request JWT and present it to your user in the web browser.\n\nThe most basic request to get a users public uport identity details:\n\n```javascript\ncredentials.requestDisclosure().then(requestToken => {\n  // send requestToken to browser\n})\n```\n\nYou can ask for specific private data like this:\n\n```javascript\ncredentials.requestDisclosure({\n    requested: ['name','phone','identity_no'],\n    callbackUrl: 'https://....' // URL to send the response of the request to\n  }.then(requestToken => {\n  // send requestToken to browser\n  })\n```\n\nIf you need to know the users address on a specific ethereum network, specify it's `network_id` (currently defaults to ropsten `0x3`). In this case be aware that the `address` returned will be the address on the public network (currently ropsten) for the users profile. The requested network address will be in the `networkAddress` field and will be MNID encoded.\n\n```javascript\ncredentials.requestDisclosure({network_id: '0x4'}).then(requestToken => {\n  // send requestToken to browser\n})\n```\n\nBack in your server code you receive the token:\n\n```javascript\ncredentials.authenticate(responseToken).then(profile => {\n  // Store user profile\n})\n```\n\n### Stateless Challenge/Response\n\nTo ensure that the response received was created as a response to your selective disclosure request above, the original request is included in the response from the mobile app.\n\nThe default verification rule is that the issuer of the embedded request must match the clientId in your Credentials object and that the original request has not yet expired.\n\nSome applications that exclusively live in the browser are unable to sign the original request. In those cases the request token verification is ignored.\n\n### Requesting Push notification tokens from your users\n\nAs part of the selective disclosure request you can ask for permission from your users to communicate directly with their app.\n\n```javascript\ncredentials.createRequest({\n  requested:[...],\n  notifications: true\n}).then(requestToken => {\n  // send to browser\n})\n```\n\nPresent it to the user like before. On the server you can receive the push token like this:\n\n```javascript\ncredentials.receive(responseToken).then(profile => {\n  // Store user profile\n  // Store push token securely\n  console.log(profile.pushToken)\n})\n```\n\n## Attesting information about your users\n\nAttesting information about your users helps add real value to your application. Your users will use uport to build up their own digital identity and your business is an important part of this.\n\nIf you're a financial institution you may be able to attest to KYC related information such as national identity numbers. If you're an educational application you may want to attest to your users achievements in a way that they can securely share.\n\n### What are attestations\n\nAttestations are shareable private information that one party can sign about another party. They are designed to be shared privately by you to your users and by them to other users.\n\n### Creating an attestation\n\n```javascript\ncredentials.attest({\n  sub: '0x...', // uport address of user\n  exp: <future timestamp>, // If your information is not permanent make sure to add an expires timestamp\n  claims: {name:'John Smith'}\n}).then(attestation => {\n  // send attestation to user\n})\n```\n\nAs before you will want to send this to your user. You can do this in the browser\n\n```javascript\nconst connect = new uportconnect.Connect('app name')\nconnect.showRequest(attestation) // no response is needed for an attestation\n```\n\nIf you requested a push notification token in the above selective disclosure step you can also send attestations directly to your users app in real time.\n\n```javascript\ncredentials.push(pushToken, `me.uport:add?attestation=${attestationjwt}`, message).then(response => {\n\n})\n```\n\n## Asking users to sign Ethereum transactions\n\nEthereum smart contracts live on the blockchain and at a certain address. The application interface is known as the abi and can be created by the Solidity compiler.\n\nOur Contract class will let you create a javascript object modelling the SmartContract allowing you to create uport uri's that you can send to the user.\n\n```javascript\nimport { Contract } from 'uport'\nconst abi = // import from json or have directly in code\nconst contract = Contract(abi).at(contractAddress)\n// creates a request for the user to call the transfer() function on the smart contract\nconst txRequest = tokenContract.transfer(....)\n```\n\nIn your front end use 'uport-connect' to present it to your user either as a QR code or as a uport-button depending on whether they are on a desktop or mobile browser.\n\n```javascript\nconst connect = new uportconnect.Connect('app name')\nconnect.sendTransaction(txRequest).then(txResponse => {\n  // send response back to server\n})\n```\n\nBack in your server code you receive the `txResponse`. This is a standard ethereum transaction object that you can verify.\n\n","readmeFilename":"README.md","gitHead":"c5e29ead0f6bc11e27bc25660f1d8ed5483f4aa7","_id":"uport@0.7.0-alpha-4","_npmVersion":"5.3.0","_nodeVersion":"8.4.0","_npmUser":{"name":"zachferland","email":"zachferland@gmail.com"},"dist":{"integrity":"sha512-axd21+UIY82UVFq8Dv452E81IfKcAZpIALi1ellOXaInXyr8ULXhc4l1FpSr71a5I7JHwUHDdsRkYd32Vcv1Gg==","shasum":"4d64ea7ea91ba19a3b12c2a63acfea44d563bc0d","tarball":"https://registry.npmjs.org/uport/-/uport-0.7.0-alpha-4.tgz","fileCount":20,"unpackedSize":676076,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbH86QCRA9TVsSAnZWagAAg9AQAKCujeo+ptkKghPo+KzZ\nmiMc5sPN4J1wx2EcVo3xn1OwAzl1eqRD80zsITvFALMi2s+/jxFlwmocuADP\n4z7fOYokbQTzAhsJt1TckPYBBCK05ztPwiTZ4e3DiI/hbLbiNQjFPTe88Cla\nIsisTbpVaLcyt7aJdHYRwIkhYj9U1JN9+wmtIyT1Cf0Ky9DQ/nAdPTSGNpHv\nSrXxjA5STEne6SUZRDN9Jbbe9u0eu0IlaRBCq1x9ZwEv3N92LgJt8xuuJwVt\nV6O3nCmKtLscM7n6HKEUE5hLEnWiwL91gpBkFIezTItOIGMEKVdjkcxmY4D3\n9YeN+nvdsb1URGB5Tk6sRkhDOO1h48gvRIN5a8SL1UsLpGiV45z+1YsOkOFM\nDxd+RxOmRU5BTq5PbfshKD1d6/cVLNumLvX1EruXPSI+HFpPqnKEo5N9w5x5\nG+j3IIl53v0MbOeQwRGa6NwgtTAUHg+NIIU06KeaEvXDMk5GigxpL0c1Uuop\nN3F3OZjo4vytC18C1siQszDsWBQhEGhL4CCmHKcj1X8XKRhnrgIbwKqjiPxq\nDM5AQPe7YzedSgn0Iy+aUZPVnA6Y5uT0kvr5yOjTtP6+2PuyfPOPEh9LyxWE\nkkpqoIHGcZXxNZkBfHdRxFlXl1xN0uOQG+xMB1w7zfx0yqF1ExRKM/VNkLhv\nxroH\r\n=RInY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHLDoxM0TId7lMZak4MPRnrZb2vpSxaNtDY9+94l0ltwAiEAr1j8cq7o51/wQyOXU6wOqZnw7dbr6x6qcbcSV9MnJto="}]},"maintainers":[{"email":"levi.strope@gmail.com","name":"localredhead"},{"email":"oed3933@gmail.com","name":"oed"},{"email":"pelleb@gmail.com","name":"pelleb"},{"email":"zachferland@gmail.com","name":"zachferland"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/uport_0.7.0-alpha-4_1528811151494_0.8035790980079225"},"_hasShrinkwrap":false},"0.7.0-alpha-5":{"name":"uport","version":"0.7.0-alpha-5","description":"Library for interacting with uport profiles and attestations","main":"lib/index.js","files":["lib","dist","src","tutorial"],"scripts":{"test":"jest","test:ci":"jest -u --coverage","build:es5":"babel src -d lib","build:browser":"webpack --config webpack.config.js","build":"yarn build:es5 && yarn test:ci && yarn build:browser","build:docs:html":"jsdoc src/* README.md -d docs","build:docs:md":"./node_modules/jsdoc-to-markdown/bin/cli.js src/* > DOCS.md","build:docs":"npm run build:docs:html && npm run build:docs:md","prepublish":"yarn build"},"author":{"name":"Pelle Braendgaard","email":"pelle.braendgaard@consensys.net"},"license":"MIT","dependencies":{"did-jwt":"^0.0.7","did-resolver":"^0.0.4","ethjs-util":"^0.1.3","ethr-did-resolver":"^0.0.7","mnid":"^0.1.1","muport-did-resolver":"^0.1.0","uport-did-resolver":"^0.0.2","uport-lite":"^1.0.2"},"jest":{"coverageDirectory":"./coverage/","unmockedModulePathPatterns":["<rootDir>/node_modules/nock"],"testEnvironment":"node"},"devDependencies":{"babel-cli":"^6.26.0","babel-core":"^6.26.0","babel-jest":"^22.4.3","babel-loader":"^7.1.4","babel-plugin-syntax-object-rest-spread":"^6.13.0","babel-plugin-transform-es2015-modules-umd":"^6.24.1","babel-plugin-transform-object-rest-spread":"^6.26.0","babel-plugin-transform-runtime":"^6.23.0","babel-polyfill":"^6.22.0","babel-preset-env":"^1.6.1","body-parser":"^1.17.1","express":"^4.15.2","jest":"^22.4.3","jsdoc":"^3.4.3","jsdoc-to-markdown":"^1.3.7","json-loader":"^0.5.4","mockdate":"^2.0.1","webpack":"^4.6.0","webpack-cli":"^2.0.15"},"readme":"# uport-js\n\n## Integrate uPort in your javascript application\n\nuPort provides a simple way for your users to login to your website and provide private credentials such as identity information and contact details to you.\n\nYou can also “attest” credentials they provide to you or that you yourself have about them. This can be shared back to your customers so you can help them build their digital identity.\n\nUport.js provides a simple way for you to integrate uport.js into your javascript application. You can also interact with your uPort users directly in the browser.\n\nWe have an easy to use browser library [uport-connect](https://github.com/uport-project/uport-connect) which can help you do so.\n\n## Setup your uPort application identity\n\nFirst make sure you have your uPort app installed and you've setup your own uPort identity.\n\n### What is a uPort identity?\n\nAn identity in uPort is really just someone or something that can sign data or transactions and also receive signed data about itself.\n\nAn identity has an identifier in the form of an [MNID](https://github.com/uport-project/mnid), a signing key, and a public key stored on the [uPort Registry](https://github.com/uport-project/uport-registry).\n\nAn identity can:\n\n- Sign JWTs (JSON Web Tokens)\n  - [Authenticate themselves to a third party](messages/shareresp.md)\n  - [Disclose private information about themselves](messages/shareresp.md)\n- [Receive requests for disclosure about themselves](messages/sharereq.md)\n- [Receive and store signed third party verifications about themselves](flows/verification.md)\n- [Sign Ethereum transactions](flows/tx.md)\n\nWhen interacting privately with a user you will be interchanging signed JWT([JSON Web Token](https://jwt.io/)). To verify the signature of the JWT you and your users will be fetching your public key from the public profile.\n\nFor details on uPort's underlying architecture, read our [spec repo](https://github.com/uport-project/specs) or check out the [uPort identity contracts] (https://github.com/uport-project/uport-identity).\n\n## Configure your application\n\nIn your application you must first configure your uPort object.\n\n```javascript\nimport { Credentials } from 'uport'\n\n// For new ethereum based addresses\nconst credentials = new Credentials({\n  appName: 'App Name',\n  did: 'did:ethr:0x....',\n  privateKey: process.env.PRIVATE_KEY\n})\n\n// You can create a new identity\n\nconsole.log(Credentials.createIdentity())\n\n// For legacy application identity created on App Manager\nconst credentials = new Credentials({\n  appName: 'App Name',\n  address: 'MNID Encoded uPort Address For Your App',\n  privateKey: process.env.PRIVATE_KEY\n})\n\n\n```\n\n## Requesting information from your users\n\nTo request information from your user you create a Selective Disclosure Request JWT and present it to your user in the web browser.\n\nThe most basic request to get a users public uport identity details:\n\n```javascript\ncredentials.requestDisclosure().then(requestToken => {\n  // send requestToken to browser\n})\n```\n\nYou can ask for specific private data like this:\n\n```javascript\ncredentials.requestDisclosure({\n    requested: ['name','phone','identity_no'],\n    callbackUrl: 'https://....' // URL to send the response of the request to\n  }.then(requestToken => {\n  // send requestToken to browser\n  })\n```\n\nIf you need to know the users address on a specific ethereum network, specify it's `network_id` (currently defaults to ropsten `0x3`). In this case be aware that the `address` returned will be the address on the public network (currently ropsten) for the users profile. The requested network address will be in the `networkAddress` field and will be MNID encoded.\n\n```javascript\ncredentials.requestDisclosure({network_id: '0x4'}).then(requestToken => {\n  // send requestToken to browser\n})\n```\n\nBack in your server code you receive the token:\n\n```javascript\ncredentials.authenticate(responseToken).then(profile => {\n  // Store user profile\n})\n```\n\n### Stateless Challenge/Response\n\nTo ensure that the response received was created as a response to your selective disclosure request above, the original request is included in the response from the mobile app.\n\nThe default verification rule is that the issuer of the embedded request must match the clientId in your Credentials object and that the original request has not yet expired.\n\nSome applications that exclusively live in the browser are unable to sign the original request. In those cases the request token verification is ignored.\n\n### Requesting Push notification tokens from your users\n\nAs part of the selective disclosure request you can ask for permission from your users to communicate directly with their app.\n\n```javascript\ncredentials.createRequest({\n  requested:[...],\n  notifications: true\n}).then(requestToken => {\n  // send to browser\n})\n```\n\nPresent it to the user like before. On the server you can receive the push token like this:\n\n```javascript\ncredentials.receive(responseToken).then(profile => {\n  // Store user profile\n  // Store push token securely\n  console.log(profile.pushToken)\n})\n```\n\n## Attesting information about your users\n\nAttesting information about your users helps add real value to your application. Your users will use uport to build up their own digital identity and your business is an important part of this.\n\nIf you're a financial institution you may be able to attest to KYC related information such as national identity numbers. If you're an educational application you may want to attest to your users achievements in a way that they can securely share.\n\n### What are attestations\n\nAttestations are shareable private information that one party can sign about another party. They are designed to be shared privately by you to your users and by them to other users.\n\n### Creating an attestation\n\n```javascript\ncredentials.attest({\n  sub: '0x...', // uport address of user\n  exp: <future timestamp>, // If your information is not permanent make sure to add an expires timestamp\n  claims: {name:'John Smith'}\n}).then(attestation => {\n  // send attestation to user\n})\n```\n\nAs before you will want to send this to your user. You can do this in the browser\n\n```javascript\nconst connect = new uportconnect.Connect('app name')\nconnect.showRequest(attestation) // no response is needed for an attestation\n```\n\nIf you requested a push notification token in the above selective disclosure step you can also send attestations directly to your users app in real time.\n\n```javascript\ncredentials.push(pushToken, `me.uport:add?attestation=${attestationjwt}`, message).then(response => {\n\n})\n```\n\n## Asking users to sign Ethereum transactions\n\nEthereum smart contracts live on the blockchain and at a certain address. The application interface is known as the abi and can be created by the Solidity compiler.\n\nOur Contract class will let you create a javascript object modelling the SmartContract allowing you to create uport uri's that you can send to the user.\n\n```javascript\nimport { Contract } from 'uport'\nconst abi = // import from json or have directly in code\nconst contract = Contract(abi).at(contractAddress)\n// creates a request for the user to call the transfer() function on the smart contract\nconst txRequest = tokenContract.transfer(....)\n```\n\nIn your front end use 'uport-connect' to present it to your user either as a QR code or as a uport-button depending on whether they are on a desktop or mobile browser.\n\n```javascript\nconst connect = new uportconnect.Connect('app name')\nconnect.sendTransaction(txRequest).then(txResponse => {\n  // send response back to server\n})\n```\n\nBack in your server code you receive the `txResponse`. This is a standard ethereum transaction object that you can verify.\n\n","readmeFilename":"README.md","gitHead":"800b796c620a427ec8615dccce420f20f87092f5","_id":"uport@0.7.0-alpha-5","_npmVersion":"5.3.0","_nodeVersion":"8.4.0","_npmUser":{"name":"zachferland","email":"zachferland@gmail.com"},"dist":{"integrity":"sha512-EJ+alDF3HGhmX4A+hsTmiQafwVW6C/ONhMCd0977f4bxPWe+ihrj6xHbtZgJKARt1RUB+BqwZxXF7eeT+RPMeg==","shasum":"bc979d0476d28baec6eabe1dd96216ead372e157","tarball":"https://registry.npmjs.org/uport/-/uport-0.7.0-alpha-5.tgz","fileCount":20,"unpackedSize":676079,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbH/2xCRA9TVsSAnZWagAA3v8P/0nmLhzSJx3cuBUjzB4H\nJR1ttp93QkPwnFlT1idVovNmpOQMWgIvX9gaLrvf3Hgcfj53P2fGfN+ifJ/j\nnrcYbWiRwtbTDONr6Y+XMFduRUqr+R8QZ2yavRpVA9B4P8QxKv56YCgOkjn9\nqkH1566X3aw/UNJIIVkG1xus5miCIJAfS3Mej1JCwqI5sABLq9Bhh10H+IEZ\ngQ0arIh5HHy32ElNCy+zn+oaCYrPG0evCb7BOwU4zIBkUn5es+zMFNsOI3gT\nW/X6gDsn6en9NZOSMVYIb4ceCa9FLU7PsYsndua0JUR5z9odHV1G/dHezcyp\nIrdsVIv8rC+URWGYKukcWsepS/o/K0lJAQlbdQktTp3LkiEAud/7ak/dTUOE\nc/rrh66r0vZQ+QJhnOxCudx9Lif2w9CgUQeCoGo5CFlhGZnI0OrU3QXWjUGF\nmK/n/ie5bxrWu4NUO58lfh27EHNn1VxiVlEeQ282qWXdomQqG6+9yYpWeUiz\n56r4mK0ITeqbf07V8zkTaxDel/TAM1TLk5oNzXkaaIrIcoDXYoQFQdSpuUTs\nrBb6b7faGL8FQhepH3wSh/Dw4DPI2uQnUBl5rGWY9e6PN6jrFwTTgKCdi/75\nFGr8tBQcCzlkS3XToFd2a3bMezujwIx+wbJDABLRI4A6KBFrmqj1ERFnBXGv\nNrhD\r\n=1ZEj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIECJ4D9awHaYgRsEbWxr6jvHgIMm4f49q7+R95ZN7acIAiEA9nogRztYxz419Qjf09epKYrHZ0J9T8ski62S3BzzF9M="}]},"maintainers":[{"email":"levi.strope@gmail.com","name":"localredhead"},{"email":"oed3933@gmail.com","name":"oed"},{"email":"pelleb@gmail.com","name":"pelleb"},{"email":"zachferland@gmail.com","name":"zachferland"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/uport_0.7.0-alpha-5_1528823217067_0.09068696822114619"},"_hasShrinkwrap":false},"0.7.0-alpha-minor-1":{"name":"uport","version":"0.7.0-alpha-minor-1","description":"Library for interacting with uport profiles and attestations","main":"lib/index.js","files":["lib","dist","src","tutorial"],"scripts":{"test":"jest","test:ci":"jest -u --coverage","build:es5":"babel src -d lib","build:browser":"webpack --config webpack.config.js","build":"yarn build:es5 && yarn test:ci && yarn build:browser","build:docs:html":"jsdoc src/* README.md -d docs","build:docs:md":"./node_modules/jsdoc-to-markdown/bin/cli.js src/* > DOCS.md","build:docs":"npm run build:docs:html && npm run build:docs:md","prepublish":"yarn build"},"author":{"name":"Pelle Braendgaard","email":"pelle.braendgaard@consensys.net"},"license":"MIT","dependencies":{"did-jwt":"^0.0.7","did-resolver":"^0.0.4","ethjs-util":"^0.1.3","ethr-did-resolver":"^0.0.7","mnid":"^0.1.1","muport-did-resolver":"^0.1.0","uport-core":"0.0.36","uport-did-resolver":"^0.0.3","uport-lite":"^1.0.2"},"jest":{"coverageDirectory":"./coverage/","unmockedModulePathPatterns":["<rootDir>/node_modules/nock"],"testEnvironment":"node"},"devDependencies":{"babel-cli":"^6.26.0","babel-core":"^6.26.0","babel-jest":"^22.4.3","babel-loader":"^7.1.4","babel-plugin-syntax-object-rest-spread":"^6.13.0","babel-plugin-transform-es2015-modules-umd":"^6.24.1","babel-plugin-transform-object-rest-spread":"^6.26.0","babel-plugin-transform-runtime":"^6.23.0","babel-polyfill":"^6.22.0","babel-preset-env":"^1.6.1","body-parser":"^1.17.1","express":"^4.15.2","jest":"^22.4.3","jsdoc":"^3.4.3","jsdoc-to-markdown":"^1.3.7","json-loader":"^0.5.4","mockdate":"^2.0.1","webpack":"^4.6.0","webpack-cli":"^2.0.15"},"readme":"# uport-js\n\n## Integrate uPort in your javascript application\n\nuPort provides a simple way for your users to login to your website and provide private credentials such as identity information and contact details to you.\n\nYou can also “attest” credentials they provide to you or that you yourself have about them. This can be shared back to your customers so you can help them build their digital identity.\n\nUport.js provides a simple way for you to integrate uport.js into your javascript application. You can also interact with your uPort users directly in the browser.\n\nWe have an easy to use browser library [uport-connect](https://github.com/uport-project/uport-connect) which can help you do so.\n\n## Setup your uPort application identity\n\nFirst make sure you have your uPort app installed and you've setup your own uPort identity.\n\n### What is a uPort identity?\n\nAn identity in uPort is really just someone or something that can sign data or transactions and also receive signed data about itself.\n\nAn identity has an identifier in the form of an [MNID](https://github.com/uport-project/mnid), a signing key, and a public key stored on the [uPort Registry](https://github.com/uport-project/uport-registry).\n\nAn identity can:\n\n- Sign JWTs (JSON Web Tokens)\n  - [Authenticate themselves to a third party](messages/shareresp.md)\n  - [Disclose private information about themselves](messages/shareresp.md)\n- [Receive requests for disclosure about themselves](messages/sharereq.md)\n- [Receive and store signed third party verifications about themselves](flows/verification.md)\n- [Sign Ethereum transactions](flows/tx.md)\n\nWhen interacting privately with a user you will be interchanging signed JWT([JSON Web Token](https://jwt.io/)). To verify the signature of the JWT you and your users will be fetching your public key from the public profile.\n\nFor details on uPort's underlying architecture, read our [spec repo](https://github.com/uport-project/specs) or check out the [uPort identity contracts] (https://github.com/uport-project/uport-identity).\n\n## Configure your application\n\nIn your application you must first configure your uPort object.\n\n```javascript\nimport { Credentials } from 'uport'\n\n// For new ethereum based addresses\nconst credentials = new Credentials({\n  appName: 'App Name',\n  did: 'did:ethr:0x....',\n  privateKey: process.env.PRIVATE_KEY\n})\n\n// You can create a new identity\n\nconsole.log(Credentials.createIdentity())\n\n// For legacy application identity created on App Manager\nconst credentials = new Credentials({\n  appName: 'App Name',\n  address: 'MNID Encoded uPort Address For Your App',\n  privateKey: process.env.PRIVATE_KEY\n})\n\n\n```\n\n## Requesting information from your users\n\nTo request information from your user you create a Selective Disclosure Request JWT and present it to your user in the web browser.\n\nThe most basic request to get a users public uport identity details:\n\n```javascript\ncredentials.requestDisclosure().then(requestToken => {\n  // send requestToken to browser\n})\n```\n\nYou can ask for specific private data like this:\n\n```javascript\ncredentials.requestDisclosure({\n    requested: ['name','phone','identity_no'],\n    callbackUrl: 'https://....' // URL to send the response of the request to\n  }.then(requestToken => {\n  // send requestToken to browser\n  })\n```\n\nIf you need to know the users address on a specific ethereum network, specify it's `network_id` (currently defaults to ropsten `0x3`). In this case be aware that the `address` returned will be the address on the public network (currently ropsten) for the users profile. The requested network address will be in the `networkAddress` field and will be MNID encoded.\n\n```javascript\ncredentials.requestDisclosure({network_id: '0x4'}).then(requestToken => {\n  // send requestToken to browser\n})\n```\n\nBack in your server code you receive the token:\n\n```javascript\ncredentials.authenticate(responseToken).then(profile => {\n  // Store user profile\n})\n```\n\n### Stateless Challenge/Response\n\nTo ensure that the response received was created as a response to your selective disclosure request above, the original request is included in the response from the mobile app.\n\nThe default verification rule is that the issuer of the embedded request must match the clientId in your Credentials object and that the original request has not yet expired.\n\nSome applications that exclusively live in the browser are unable to sign the original request. In those cases the request token verification is ignored.\n\n### Requesting Push notification tokens from your users\n\nAs part of the selective disclosure request you can ask for permission from your users to communicate directly with their app.\n\n```javascript\ncredentials.createRequest({\n  requested:[...],\n  notifications: true\n}).then(requestToken => {\n  // send to browser\n})\n```\n\nPresent it to the user like before. On the server you can receive the push token like this:\n\n```javascript\ncredentials.receive(responseToken).then(profile => {\n  // Store user profile\n  // Store push token securely\n  console.log(profile.pushToken)\n})\n```\n\n## Attesting information about your users\n\nAttesting information about your users helps add real value to your application. Your users will use uport to build up their own digital identity and your business is an important part of this.\n\nIf you're a financial institution you may be able to attest to KYC related information such as national identity numbers. If you're an educational application you may want to attest to your users achievements in a way that they can securely share.\n\n### What are attestations\n\nAttestations are shareable private information that one party can sign about another party. They are designed to be shared privately by you to your users and by them to other users.\n\n### Creating an attestation\n\n```javascript\ncredentials.attest({\n  sub: '0x...', // uport address of user\n  exp: <future timestamp>, // If your information is not permanent make sure to add an expires timestamp\n  claims: {name:'John Smith'}\n}).then(attestation => {\n  // send attestation to user\n})\n```\n\nAs before you will want to send this to your user. You can do this in the browser\n\n```javascript\nconst connect = new uportconnect.Connect('app name')\nconnect.showRequest(attestation) // no response is needed for an attestation\n```\n\nIf you requested a push notification token in the above selective disclosure step you can also send attestations directly to your users app in real time.\n\n```javascript\ncredentials.push(pushToken, `me.uport:add?attestation=${attestationjwt}`, message).then(response => {\n\n})\n```\n\n## Asking users to sign Ethereum transactions\n\nEthereum smart contracts live on the blockchain and at a certain address. The application interface is known as the abi and can be created by the Solidity compiler.\n\nOur Contract class will let you create a javascript object modelling the SmartContract allowing you to create uport uri's that you can send to the user.\n\n```javascript\nimport { Contract } from 'uport'\nconst abi = // import from json or have directly in code\nconst contract = Contract(abi).at(contractAddress)\n// creates a request for the user to call the transfer() function on the smart contract\nconst txRequest = tokenContract.transfer(....)\n```\n\nIn your front end use 'uport-connect' to present it to your user either as a QR code or as a uport-button depending on whether they are on a desktop or mobile browser.\n\n```javascript\nconst connect = new uportconnect.Connect('app name')\nconnect.sendTransaction(txRequest).then(txResponse => {\n  // send response back to server\n})\n```\n\nBack in your server code you receive the `txResponse`. This is a standard ethereum transaction object that you can verify.\n\n","readmeFilename":"README.md","gitHead":"6989614d8879b2e2540de47a12dbf0b482b4740d","_id":"uport@0.7.0-alpha-minor-1","_npmVersion":"5.3.0","_nodeVersion":"8.4.0","_npmUser":{"name":"zachferland","email":"zachferland@gmail.com"},"dist":{"integrity":"sha512-P7GCAeGIr+oCu4Ar/9HzLvCJDoysCmzxictxBJtIOxQRSRmCd+3olFXdv8EzjJD/Qw4KmhO15QWJ/QK14oCNOA==","shasum":"49efc74cfa4cd7e5875a939ddb02b059a39874ca","tarball":"https://registry.npmjs.org/uport/-/uport-0.7.0-alpha-minor-1.tgz","fileCount":20,"unpackedSize":932735,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbK/BiCRA9TVsSAnZWagAAuEkP/i4vyKiKHajsRkh6XltM\nQvlB4Sit2pxrjqrifexr23+kLATdWt52GoceSoEk++plOXm2UBYUTBpMl1cG\nIt4L5WSW97FmuKv6TTs/5nXlxy9Sa3Vwm+IDzDsJJxZwOgiPR1AFSml3HCkq\nlYH1OtlhuIbA9o1E6QnRTHlr9e9U7heIyjQ2XC4JYAE1KtD4BiYzk3/YixZz\n+4Q7iGFQbfxoCENptssKP66lptQuU47X1vYSAp/hlmkCvNhqHyS+fkYdTGeM\nJUn6MbJR0reyn4nVdz5gcCXH4SkMKtd4pf/Vh6d7/dPxgtCy8nOpRoDGEmJL\n+g9Ta6KXMV9vKB/Vh2S85nDMqTY2SIH0wRGVxtBbQN1CK6/n5rpiwsiuyHc5\n6x8vG8itarjgNqA9PWwx5GNm28QuYj7gRGaHmdIZNd5GVYPYVa+3LuDNmJsG\nttTHv9Gg6XEaMeGnZj5+eR1QrCLoyrruY+Xbesw6sYwNZPIZMhhDuOM+jHTj\n+HkPrH7diqoOyuVZztsb/zMk7LwS9G4Y8dIGFAFCwPJsVNpCpto1ZtZf40Xb\nMLV2pXL0nAvt2lktkUOWrsJaDu44zXigg5uayUusedd4KHrcGgIOVz2Ph1mi\nX3K+C/ARJVhYhDGumnooDT4508poCVJVIT38huEu8MoWXNhF5O82M6FegwJB\nh3mz\r\n=D3oY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQClaujzI2eyhQ8BuJlaac42JWlimzdxR/4HNBo25mhuVAIhAJugDvjE6Lq2Ojw1l//EYNIvAiBE7X3fY53GtAYKLGJB"}]},"maintainers":[{"email":"levi.strope@gmail.com","name":"localredhead"},{"email":"oed3933@gmail.com","name":"oed"},{"email":"pelleb@gmail.com","name":"pelleb"},{"email":"zachferland@gmail.com","name":"zachferland"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/uport_0.7.0-alpha-minor-1_1529606242252_0.909474201932368"},"_hasShrinkwrap":false},"0.7.0-alpha-minor-2":{"name":"uport","version":"0.7.0-alpha-minor-2","description":"Library for interacting with uport profiles and attestations","main":"lib/index.js","files":["lib","dist","src","tutorial"],"scripts":{"test":"jest","test:ci":"jest -u --coverage","build:es5":"babel src -d lib","build:browser":"webpack --config webpack.config.js","build":"yarn build:es5 && yarn test:ci && yarn build:browser","build:docs:html":"jsdoc src/* README.md -d docs","build:docs:md":"./node_modules/jsdoc-to-markdown/bin/cli.js src/* > DOCS.md","build:docs":"npm run build:docs:html && npm run build:docs:md","prepublish":"yarn build"},"author":{"name":"Pelle Braendgaard","email":"pelle.braendgaard@consensys.net"},"license":"MIT","dependencies":{"did-jwt":"^0.0.7","did-resolver":"^0.0.4","ethjs-util":"^0.1.3","ethr-did-resolver":"^0.0.7","mnid":"^0.1.1","muport-did-resolver":"^0.1.0","uport-core":"0.0.36","uport-did-resolver":"^0.0.3","uport-lite":"^1.0.2"},"jest":{"coverageDirectory":"./coverage/","unmockedModulePathPatterns":["<rootDir>/node_modules/nock"],"testEnvironment":"node"},"devDependencies":{"babel-cli":"^6.26.0","babel-core":"^6.26.0","babel-jest":"^22.4.3","babel-loader":"^7.1.4","babel-plugin-syntax-object-rest-spread":"^6.13.0","babel-plugin-transform-es2015-modules-umd":"^6.24.1","babel-plugin-transform-object-rest-spread":"^6.26.0","babel-plugin-transform-runtime":"^6.23.0","babel-polyfill":"^6.22.0","babel-preset-env":"^1.6.1","body-parser":"^1.17.1","express":"^4.15.2","jest":"^22.4.3","jsdoc":"^3.4.3","jsdoc-to-markdown":"^1.3.7","json-loader":"^0.5.4","mockdate":"^2.0.1","webpack":"^4.6.0","webpack-cli":"^2.0.15"},"readme":"# uport-js\n\n## Integrate uPort in your javascript application\n\nuPort provides a simple way for your users to login to your website and provide private credentials such as identity information and contact details to you.\n\nYou can also “attest” credentials they provide to you or that you yourself have about them. This can be shared back to your customers so you can help them build their digital identity.\n\nUport.js provides a simple way for you to integrate uport.js into your javascript application. You can also interact with your uPort users directly in the browser.\n\nWe have an easy to use browser library [uport-connect](https://github.com/uport-project/uport-connect) which can help you do so.\n\n## Setup your uPort application identity\n\nFirst make sure you have your uPort app installed and you've setup your own uPort identity.\n\n### What is a uPort identity?\n\nAn identity in uPort is really just someone or something that can sign data or transactions and also receive signed data about itself.\n\nAn identity has an identifier in the form of an [MNID](https://github.com/uport-project/mnid), a signing key, and a public key stored on the [uPort Registry](https://github.com/uport-project/uport-registry).\n\nAn identity can:\n\n- Sign JWTs (JSON Web Tokens)\n  - [Authenticate themselves to a third party](messages/shareresp.md)\n  - [Disclose private information about themselves](messages/shareresp.md)\n- [Receive requests for disclosure about themselves](messages/sharereq.md)\n- [Receive and store signed third party verifications about themselves](flows/verification.md)\n- [Sign Ethereum transactions](flows/tx.md)\n\nWhen interacting privately with a user you will be interchanging signed JWT([JSON Web Token](https://jwt.io/)). To verify the signature of the JWT you and your users will be fetching your public key from the public profile.\n\nFor details on uPort's underlying architecture, read our [spec repo](https://github.com/uport-project/specs) or check out the [uPort identity contracts] (https://github.com/uport-project/uport-identity).\n\n## Configure your application\n\nIn your application you must first configure your uPort object.\n\n```javascript\nimport { Credentials } from 'uport'\n\n// For new ethereum based addresses\nconst credentials = new Credentials({\n  appName: 'App Name',\n  did: 'did:ethr:0x....',\n  privateKey: process.env.PRIVATE_KEY\n})\n\n// You can create a new identity\n\nconsole.log(Credentials.createIdentity())\n\n// For legacy application identity created on App Manager\nconst credentials = new Credentials({\n  appName: 'App Name',\n  address: 'MNID Encoded uPort Address For Your App',\n  privateKey: process.env.PRIVATE_KEY\n})\n\n\n```\n\n## Requesting information from your users\n\nTo request information from your user you create a Selective Disclosure Request JWT and present it to your user in the web browser.\n\nThe most basic request to get a users public uport identity details:\n\n```javascript\ncredentials.requestDisclosure().then(requestToken => {\n  // send requestToken to browser\n})\n```\n\nYou can ask for specific private data like this:\n\n```javascript\ncredentials.requestDisclosure({\n    requested: ['name','phone','identity_no'],\n    callbackUrl: 'https://....' // URL to send the response of the request to\n  }.then(requestToken => {\n  // send requestToken to browser\n  })\n```\n\nIf you need to know the users address on a specific ethereum network, specify it's `network_id` (currently defaults to ropsten `0x3`). In this case be aware that the `address` returned will be the address on the public network (currently ropsten) for the users profile. The requested network address will be in the `networkAddress` field and will be MNID encoded.\n\n```javascript\ncredentials.requestDisclosure({network_id: '0x4'}).then(requestToken => {\n  // send requestToken to browser\n})\n```\n\nBack in your server code you receive the token:\n\n```javascript\ncredentials.authenticate(responseToken).then(profile => {\n  // Store user profile\n})\n```\n\n### Stateless Challenge/Response\n\nTo ensure that the response received was created as a response to your selective disclosure request above, the original request is included in the response from the mobile app.\n\nThe default verification rule is that the issuer of the embedded request must match the clientId in your Credentials object and that the original request has not yet expired.\n\nSome applications that exclusively live in the browser are unable to sign the original request. In those cases the request token verification is ignored.\n\n### Requesting Push notification tokens from your users\n\nAs part of the selective disclosure request you can ask for permission from your users to communicate directly with their app.\n\n```javascript\ncredentials.createRequest({\n  requested:[...],\n  notifications: true\n}).then(requestToken => {\n  // send to browser\n})\n```\n\nPresent it to the user like before. On the server you can receive the push token like this:\n\n```javascript\ncredentials.receive(responseToken).then(profile => {\n  // Store user profile\n  // Store push token securely\n  console.log(profile.pushToken)\n})\n```\n\n## Attesting information about your users\n\nAttesting information about your users helps add real value to your application. Your users will use uport to build up their own digital identity and your business is an important part of this.\n\nIf you're a financial institution you may be able to attest to KYC related information such as national identity numbers. If you're an educational application you may want to attest to your users achievements in a way that they can securely share.\n\n### What are attestations\n\nAttestations are shareable private information that one party can sign about another party. They are designed to be shared privately by you to your users and by them to other users.\n\n### Creating an attestation\n\n```javascript\ncredentials.attest({\n  sub: '0x...', // uport address of user\n  exp: <future timestamp>, // If your information is not permanent make sure to add an expires timestamp\n  claims: {name:'John Smith'}\n}).then(attestation => {\n  // send attestation to user\n})\n```\n\nAs before you will want to send this to your user. You can do this in the browser\n\n```javascript\nconst connect = new uportconnect.Connect('app name')\nconnect.showRequest(attestation) // no response is needed for an attestation\n```\n\nIf you requested a push notification token in the above selective disclosure step you can also send attestations directly to your users app in real time.\n\n```javascript\ncredentials.push(pushToken, `me.uport:add?attestation=${attestationjwt}`, message).then(response => {\n\n})\n```\n\n## Asking users to sign Ethereum transactions\n\nEthereum smart contracts live on the blockchain and at a certain address. The application interface is known as the abi and can be created by the Solidity compiler.\n\nOur Contract class will let you create a javascript object modelling the SmartContract allowing you to create uport uri's that you can send to the user.\n\n```javascript\nimport { Contract } from 'uport'\nconst abi = // import from json or have directly in code\nconst contract = Contract(abi).at(contractAddress)\n// creates a request for the user to call the transfer() function on the smart contract\nconst txRequest = tokenContract.transfer(....)\n```\n\nIn your front end use 'uport-connect' to present it to your user either as a QR code or as a uport-button depending on whether they are on a desktop or mobile browser.\n\n```javascript\nconst connect = new uportconnect.Connect('app name')\nconnect.sendTransaction(txRequest).then(txResponse => {\n  // send response back to server\n})\n```\n\nBack in your server code you receive the `txResponse`. This is a standard ethereum transaction object that you can verify.\n\n","readmeFilename":"README.md","gitHead":"89a7304712d5f24c3d591fb2b0ac2cd0695888df","_id":"uport@0.7.0-alpha-minor-2","_npmVersion":"5.3.0","_nodeVersion":"8.4.0","_npmUser":{"name":"zachferland","email":"zachferland@gmail.com"},"dist":{"integrity":"sha512-W8r/Kz6aSFDyg6DgjLwgc4IOqOklCFZuUP3IeMfBKoEO1oITUkKI3rr71cchMpV+0d+PV5QEMm8QooFofjBdYg==","shasum":"e7a2a6c22242a0333d7c49fd8142f672d8a4ed7b","tarball":"https://registry.npmjs.org/uport/-/uport-0.7.0-alpha-minor-2.tgz","fileCount":20,"unpackedSize":932905,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbLU6BCRA9TVsSAnZWagAAoKwP/jWxsZBsFpK6WHTlC5vt\ncetBayyhjyvosKzxtblTnZaNyP3VVWgk8D/f0imKbsBibZ1Nj7vhzySf7EZX\nto4On5UFy7RKUg1YArDuXOoALlfrNo3MawnJSEgBWgHophVfyEftZ9rAYZzg\nQyEiX6PE5zPG9K0pU28md3E75VR2zTI6tswGCfdRJm9laoHvUbMAn95yJOye\nXM5+dERfMeV5riDv9oI3FihWQeF/Dgomwr+/XG0dZ0HVxc9SM6tI1pYCtXq1\nZW9usIqQistRiDtfjz3W31E+5wVrulqjzZxP0wSB2hKbAKU2je8jg+gbOQBW\nj0VYezr1EAGD6h8QuujIbPWiUiGtvXRuf/W89PYXrDeGoEYrf9neVczK3Niq\n+8zKUhKinGSRbVken6RRcxNQgxCao897wp9ZIvSccbH7ZbSDivfK1PWm3Bea\nGl9edaVEjymU183vYQ7QXhQMkcXRvx8e2TDdSd7zD9On2+P0AOUWxrH4OISO\ngRn2edl7xImxP+hKUdwuCMYufcK73hA73sYl8jY4MtaI1hPNORiOzQYUuVaq\nqx7afbrGXnEgWXpn/Tjotvy2QUogsqDSsiYcDino2CLmcv57uFFO2qyl5dlZ\nPKBNxtp6Ish7NBvK9KA7ZCNYjSVROUyZEaSwevWeMqzI3/g6bHhKAVh11CxQ\nynqe\r\n=PENi\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICgSADe0OE2gwglONcd0I2drWLsGp6xM6M5+7pIWClnFAiBSq4avjpUE7g0z6qRJZe/RaxCYDwvqcAh5i53huz3RYQ=="}]},"maintainers":[{"email":"levi.strope@gmail.com","name":"localredhead"},{"email":"oed3933@gmail.com","name":"oed"},{"email":"pelleb@gmail.com","name":"pelleb"},{"email":"zachferland@gmail.com","name":"zachferland"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/uport_0.7.0-alpha-minor-2_1529695873807_0.5362126093722708"},"_hasShrinkwrap":false},"0.7.0-alpha-minor-3":{"name":"uport","version":"0.7.0-alpha-minor-3","description":"Library for interacting with uport profiles and attestations","main":"lib/index.js","files":["lib","dist","src","tutorial"],"scripts":{"test":"jest","test:ci":"jest -u --coverage","build:es5":"babel src -d lib","build:browser":"webpack --config webpack.config.js","build":"yarn build:es5 && yarn test:ci && yarn build:browser","build:docs:html":"jsdoc src/* README.md -d docs","build:docs:md":"./node_modules/jsdoc-to-markdown/bin/cli.js src/* > DOCS.md","build:docs":"npm run build:docs:html && npm run build:docs:md","prepublish":"yarn build"},"author":{"name":"Pelle Braendgaard","email":"pelle.braendgaard@consensys.net"},"license":"MIT","dependencies":{"did-jwt":"^0.0.7","did-resolver":"^0.0.4","ethjs-util":"^0.1.3","ethr-did-resolver":"^0.0.7","mnid":"^0.1.1","muport-did-resolver":"^0.1.0","uport-core":"0.0.36","uport-did-resolver":"^0.0.3","uport-lite":"^1.0.2"},"jest":{"coverageDirectory":"./coverage/","unmockedModulePathPatterns":["<rootDir>/node_modules/nock"],"testEnvironment":"node"},"devDependencies":{"babel-cli":"^6.26.0","babel-core":"^6.26.0","babel-jest":"^22.4.3","babel-loader":"^7.1.4","babel-plugin-syntax-object-rest-spread":"^6.13.0","babel-plugin-transform-es2015-modules-umd":"^6.24.1","babel-plugin-transform-object-rest-spread":"^6.26.0","babel-plugin-transform-runtime":"^6.23.0","babel-polyfill":"^6.22.0","babel-preset-env":"^1.6.1","body-parser":"^1.17.1","express":"^4.15.2","jest":"^22.4.3","jsdoc":"^3.4.3","jsdoc-to-markdown":"^1.3.7","json-loader":"^0.5.4","mockdate":"^2.0.1","webpack":"^4.6.0","webpack-cli":"^2.0.15"},"readme":"# uport-js\n\n## Integrate uPort in your javascript application\n\nuPort provides a simple way for your users to login to your website and provide private credentials such as identity information and contact details to you.\n\nYou can also “attest” credentials they provide to you or that you yourself have about them. This can be shared back to your customers so you can help them build their digital identity.\n\nUport.js provides a simple way for you to integrate uport.js into your javascript application. You can also interact with your uPort users directly in the browser.\n\nWe have an easy to use browser library [uport-connect](https://github.com/uport-project/uport-connect) which can help you do so.\n\n## Setup your uPort application identity\n\nFirst make sure you have your uPort app installed and you've setup your own uPort identity.\n\n### What is a uPort identity?\n\nAn identity in uPort is really just someone or something that can sign data or transactions and also receive signed data about itself.\n\nAn identity has an identifier in the form of an [MNID](https://github.com/uport-project/mnid), a signing key, and a public key stored on the [uPort Registry](https://github.com/uport-project/uport-registry).\n\nAn identity can:\n\n- Sign JWTs (JSON Web Tokens)\n  - [Authenticate themselves to a third party](messages/shareresp.md)\n  - [Disclose private information about themselves](messages/shareresp.md)\n- [Receive requests for disclosure about themselves](messages/sharereq.md)\n- [Receive and store signed third party verifications about themselves](flows/verification.md)\n- [Sign Ethereum transactions](flows/tx.md)\n\nWhen interacting privately with a user you will be interchanging signed JWT([JSON Web Token](https://jwt.io/)). To verify the signature of the JWT you and your users will be fetching your public key from the public profile.\n\nFor details on uPort's underlying architecture, read our [spec repo](https://github.com/uport-project/specs) or check out the [uPort identity contracts] (https://github.com/uport-project/uport-identity).\n\n## Configure your application\n\nIn your application you must first configure your uPort object.\n\n```javascript\nimport { Credentials } from 'uport'\n\n// For new ethereum based addresses\nconst credentials = new Credentials({\n  appName: 'App Name',\n  did: 'did:ethr:0x....',\n  privateKey: process.env.PRIVATE_KEY\n})\n\n// You can create a new identity\n\nconsole.log(Credentials.createIdentity())\n\n// For legacy application identity created on App Manager\nconst credentials = new Credentials({\n  appName: 'App Name',\n  address: 'MNID Encoded uPort Address For Your App',\n  privateKey: process.env.PRIVATE_KEY\n})\n\n\n```\n\n## Requesting information from your users\n\nTo request information from your user you create a Selective Disclosure Request JWT and present it to your user in the web browser.\n\nThe most basic request to get a users public uport identity details:\n\n```javascript\ncredentials.requestDisclosure().then(requestToken => {\n  // send requestToken to browser\n})\n```\n\nYou can ask for specific private data like this:\n\n```javascript\ncredentials.requestDisclosure({\n    requested: ['name','phone','identity_no'],\n    callbackUrl: 'https://....' // URL to send the response of the request to\n  }.then(requestToken => {\n  // send requestToken to browser\n  })\n```\n\nIf you need to know the users address on a specific ethereum network, specify it's `network_id` (currently defaults to ropsten `0x3`). In this case be aware that the `address` returned will be the address on the public network (currently ropsten) for the users profile. The requested network address will be in the `networkAddress` field and will be MNID encoded.\n\n```javascript\ncredentials.requestDisclosure({network_id: '0x4'}).then(requestToken => {\n  // send requestToken to browser\n})\n```\n\nBack in your server code you receive the token:\n\n```javascript\ncredentials.authenticate(responseToken).then(profile => {\n  // Store user profile\n})\n```\n\n### Stateless Challenge/Response\n\nTo ensure that the response received was created as a response to your selective disclosure request above, the original request is included in the response from the mobile app.\n\nThe default verification rule is that the issuer of the embedded request must match the clientId in your Credentials object and that the original request has not yet expired.\n\nSome applications that exclusively live in the browser are unable to sign the original request. In those cases the request token verification is ignored.\n\n### Requesting Push notification tokens from your users\n\nAs part of the selective disclosure request you can ask for permission from your users to communicate directly with their app.\n\n```javascript\ncredentials.createRequest({\n  requested:[...],\n  notifications: true\n}).then(requestToken => {\n  // send to browser\n})\n```\n\nPresent it to the user like before. On the server you can receive the push token like this:\n\n```javascript\ncredentials.receive(responseToken).then(profile => {\n  // Store user profile\n  // Store push token securely\n  console.log(profile.pushToken)\n})\n```\n\n## Attesting information about your users\n\nAttesting information about your users helps add real value to your application. Your users will use uport to build up their own digital identity and your business is an important part of this.\n\nIf you're a financial institution you may be able to attest to KYC related information such as national identity numbers. If you're an educational application you may want to attest to your users achievements in a way that they can securely share.\n\n### What are attestations\n\nAttestations are shareable private information that one party can sign about another party. They are designed to be shared privately by you to your users and by them to other users.\n\n### Creating an attestation\n\n```javascript\ncredentials.attest({\n  sub: '0x...', // uport address of user\n  exp: <future timestamp>, // If your information is not permanent make sure to add an expires timestamp\n  claims: {name:'John Smith'}\n}).then(attestation => {\n  // send attestation to user\n})\n```\n\nAs before you will want to send this to your user. You can do this in the browser\n\n```javascript\nconst connect = new uportconnect.Connect('app name')\nconnect.showRequest(attestation) // no response is needed for an attestation\n```\n\nIf you requested a push notification token in the above selective disclosure step you can also send attestations directly to your users app in real time.\n\n```javascript\ncredentials.push(pushToken, `me.uport:add?attestation=${attestationjwt}`, message).then(response => {\n\n})\n```\n\n## Asking users to sign Ethereum transactions\n\nEthereum smart contracts live on the blockchain and at a certain address. The application interface is known as the abi and can be created by the Solidity compiler.\n\nOur Contract class will let you create a javascript object modelling the SmartContract allowing you to create uport uri's that you can send to the user.\n\n```javascript\nimport { Contract } from 'uport'\nconst abi = // import from json or have directly in code\nconst contract = Contract(abi).at(contractAddress)\n// creates a request for the user to call the transfer() function on the smart contract\nconst txRequest = tokenContract.transfer(....)\n```\n\nIn your front end use 'uport-connect' to present it to your user either as a QR code or as a uport-button depending on whether they are on a desktop or mobile browser.\n\n```javascript\nconst connect = new uportconnect.Connect('app name')\nconnect.sendTransaction(txRequest).then(txResponse => {\n  // send response back to server\n})\n```\n\nBack in your server code you receive the `txResponse`. This is a standard ethereum transaction object that you can verify.\n\n","readmeFilename":"README.md","gitHead":"aae1a98ccb9b1e0a206a907ca01b4febd3cb7a7b","_id":"uport@0.7.0-alpha-minor-3","_npmVersion":"5.3.0","_nodeVersion":"8.4.0","_npmUser":{"name":"zachferland","email":"zachferland@gmail.com"},"dist":{"integrity":"sha512-d6yo9UXOBV+fQsB9kRIZepOx1WMzI0ZXO1H1VBSMFRTFAm+1qwH7M64lJC7WP1S2jmpWb3C5tOF2Tc2wEkuBFQ==","shasum":"4a9b093f7f1eb9f8b448793d565b5f5f9a82f97e","tarball":"https://registry.npmjs.org/uport/-/uport-0.7.0-alpha-minor-3.tgz","fileCount":20,"unpackedSize":933169,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbLVF7CRA9TVsSAnZWagAAEK4P/ijMalUXK6mZ+anTlAJa\npJ66OiQfPFJDGYUGb9txfEi1M4tZ7KKOEKumdVF0Xm12Jfo889a9ckM+jsrc\n9XxzeI3Ioe61JgrTqeQT/MEm4Ls7+3w7oHU8ChvQugqzi00bWoM2am04MDvl\ntjnru63YA9zpELbT3XS4b/yd3OaH/56jfZ02e/azs2eZd14k8cpLY+vL5px8\ncxnrP3BnQHtbY3ynPIEayDGdQSRSgrLW+WpHbtWq38mXqbRqsRT+I0BWYSiA\nANHcoWUH8AdKiWHQ01sxhtYlntdomMFV/mK8c72z496B86Yp6BASFnUBF+53\njTipfxbcl++J4/NuBsDfmJQoT4ZL9DFVnm+1oeAdTlXFW46qpvAMw6APvgyR\ns0mQGW40mwGqOlyexkdKyH7j6QMa+1DaqAX1r10X9lIv9eW1tma9egiSpnIF\nq/bgDldXLBKWEMJ3xDo0Dk7DgAuxeJDIj3fHdQooSaYLDYF8Mv5joWoB2BjO\nMxnFV7MYFeT8aZaomL5ojno+lFved6E3U0TpIGd5ZJr0IpsTLXjZOtxoMIOr\n2li9/SOIXNa1KZbXfx3ftu6DtJ+P7byVU42eON3DLNNX/YH5KsvTwPOg4QL0\n8cfV3iu9AwfVngWejJ509EVyS82hBxOkiEBKkm0E8OS7/6Fqiy5CXeShWZ5V\nfKJ3\r\n=//oy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE0r9MImldsgCRbe3/jcsspMQkq1qt4IXfV7ZXNfadU7AiEA7Ld2aH8DJd8B+id1YxrhzS5qROwmsdPJw3o+Ubt6GcQ="}]},"maintainers":[{"email":"levi.strope@gmail.com","name":"localredhead"},{"email":"oed3933@gmail.com","name":"oed"},{"email":"pelleb@gmail.com","name":"pelleb"},{"email":"zachferland@gmail.com","name":"zachferland"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/uport_0.7.0-alpha-minor-3_1529696635218_0.20410225168000884"},"_hasShrinkwrap":false},"0.7.0-alpha-minor-4":{"name":"uport","version":"0.7.0-alpha-minor-4","description":"Library for interacting with uport profiles and attestations","main":"lib/index.js","files":["lib","dist","src","tutorial"],"scripts":{"test":"jest","test:ci":"jest -u --coverage","build:es5":"babel src -d lib","build:browser":"webpack --config webpack.config.js","build":"yarn build:es5 && yarn test:ci && yarn build:browser","build:docs:html":"jsdoc src/* README.md -d docs","build:docs:md":"./node_modules/jsdoc-to-markdown/bin/cli.js src/* > DOCS.md","build:docs":"npm run build:docs:html && npm run build:docs:md","prepublish":"yarn build"},"author":{"name":"Pelle Braendgaard","email":"pelle.braendgaard@consensys.net"},"license":"MIT","dependencies":{"did-jwt":"^0.0.7","did-resolver":"^0.0.4","ethjs-util":"^0.1.3","ethr-did-resolver":"^0.0.7","mnid":"^0.1.1","muport-did-resolver":"^0.1.0","uport-core":"0.0.36","uport-did-resolver":"^0.0.3","uport-lite":"^1.0.2"},"jest":{"coverageDirectory":"./coverage/","unmockedModulePathPatterns":["<rootDir>/node_modules/nock"],"testEnvironment":"node"},"devDependencies":{"babel-cli":"^6.26.0","babel-core":"^6.26.0","babel-jest":"^22.4.3","babel-loader":"^7.1.4","babel-plugin-syntax-object-rest-spread":"^6.13.0","babel-plugin-transform-es2015-modules-umd":"^6.24.1","babel-plugin-transform-object-rest-spread":"^6.26.0","babel-plugin-transform-runtime":"^6.23.0","babel-polyfill":"^6.22.0","babel-preset-env":"^1.6.1","body-parser":"^1.17.1","express":"^4.15.2","jest":"^22.4.3","jsdoc":"^3.4.3","jsdoc-to-markdown":"^1.3.7","json-loader":"^0.5.4","mockdate":"^2.0.1","webpack":"^4.6.0","webpack-cli":"^2.0.15"},"readme":"# uport-js\n\n## Integrate uPort in your javascript application\n\nuPort provides a simple way for your users to login to your website and provide private credentials such as identity information and contact details to you.\n\nYou can also “attest” credentials they provide to you or that you yourself have about them. This can be shared back to your customers so you can help them build their digital identity.\n\nUport.js provides a simple way for you to integrate uport.js into your javascript application. You can also interact with your uPort users directly in the browser.\n\nWe have an easy to use browser library [uport-connect](https://github.com/uport-project/uport-connect) which can help you do so.\n\n## Setup your uPort application identity\n\nFirst make sure you have your uPort app installed and you've setup your own uPort identity.\n\n### What is a uPort identity?\n\nAn identity in uPort is really just someone or something that can sign data or transactions and also receive signed data about itself.\n\nAn identity has an identifier in the form of an [MNID](https://github.com/uport-project/mnid), a signing key, and a public key stored on the [uPort Registry](https://github.com/uport-project/uport-registry).\n\nAn identity can:\n\n- Sign JWTs (JSON Web Tokens)\n  - [Authenticate themselves to a third party](messages/shareresp.md)\n  - [Disclose private information about themselves](messages/shareresp.md)\n- [Receive requests for disclosure about themselves](messages/sharereq.md)\n- [Receive and store signed third party verifications about themselves](flows/verification.md)\n- [Sign Ethereum transactions](flows/tx.md)\n\nWhen interacting privately with a user you will be interchanging signed JWT([JSON Web Token](https://jwt.io/)). To verify the signature of the JWT you and your users will be fetching your public key from the public profile.\n\nFor details on uPort's underlying architecture, read our [spec repo](https://github.com/uport-project/specs) or check out the [uPort identity contracts] (https://github.com/uport-project/uport-identity).\n\n## Configure your application\n\nIn your application you must first configure your uPort object.\n\n```javascript\nimport { Credentials } from 'uport'\n\n// For new ethereum based addresses\nconst credentials = new Credentials({\n  appName: 'App Name',\n  did: 'did:ethr:0x....',\n  privateKey: process.env.PRIVATE_KEY\n})\n\n// You can create a new identity\n\nconsole.log(Credentials.createIdentity())\n\n// For legacy application identity created on App Manager\nconst credentials = new Credentials({\n  appName: 'App Name',\n  address: 'MNID Encoded uPort Address For Your App',\n  privateKey: process.env.PRIVATE_KEY\n})\n\n\n```\n\n## Requesting information from your users\n\nTo request information from your user you create a Selective Disclosure Request JWT and present it to your user in the web browser.\n\nThe most basic request to get a users public uport identity details:\n\n```javascript\ncredentials.requestDisclosure().then(requestToken => {\n  // send requestToken to browser\n})\n```\n\nYou can ask for specific private data like this:\n\n```javascript\ncredentials.requestDisclosure({\n    requested: ['name','phone','identity_no'],\n    callbackUrl: 'https://....' // URL to send the response of the request to\n  }.then(requestToken => {\n  // send requestToken to browser\n  })\n```\n\nIf you need to know the users address on a specific ethereum network, specify it's `network_id` (currently defaults to ropsten `0x3`). In this case be aware that the `address` returned will be the address on the public network (currently ropsten) for the users profile. The requested network address will be in the `networkAddress` field and will be MNID encoded.\n\n```javascript\ncredentials.requestDisclosure({network_id: '0x4'}).then(requestToken => {\n  // send requestToken to browser\n})\n```\n\nBack in your server code you receive the token:\n\n```javascript\ncredentials.authenticate(responseToken).then(profile => {\n  // Store user profile\n})\n```\n\n### Stateless Challenge/Response\n\nTo ensure that the response received was created as a response to your selective disclosure request above, the original request is included in the response from the mobile app.\n\nThe default verification rule is that the issuer of the embedded request must match the clientId in your Credentials object and that the original request has not yet expired.\n\nSome applications that exclusively live in the browser are unable to sign the original request. In those cases the request token verification is ignored.\n\n### Requesting Push notification tokens from your users\n\nAs part of the selective disclosure request you can ask for permission from your users to communicate directly with their app.\n\n```javascript\ncredentials.createRequest({\n  requested:[...],\n  notifications: true\n}).then(requestToken => {\n  // send to browser\n})\n```\n\nPresent it to the user like before. On the server you can receive the push token like this:\n\n```javascript\ncredentials.receive(responseToken).then(profile => {\n  // Store user profile\n  // Store push token securely\n  console.log(profile.pushToken)\n})\n```\n\n## Attesting information about your users\n\nAttesting information about your users helps add real value to your application. Your users will use uport to build up their own digital identity and your business is an important part of this.\n\nIf you're a financial institution you may be able to attest to KYC related information such as national identity numbers. If you're an educational application you may want to attest to your users achievements in a way that they can securely share.\n\n### What are attestations\n\nAttestations are shareable private information that one party can sign about another party. They are designed to be shared privately by you to your users and by them to other users.\n\n### Creating an attestation\n\n```javascript\ncredentials.attest({\n  sub: '0x...', // uport address of user\n  exp: <future timestamp>, // If your information is not permanent make sure to add an expires timestamp\n  claims: {name:'John Smith'}\n}).then(attestation => {\n  // send attestation to user\n})\n```\n\nAs before you will want to send this to your user. You can do this in the browser\n\n```javascript\nconst connect = new uportconnect.Connect('app name')\nconnect.showRequest(attestation) // no response is needed for an attestation\n```\n\nIf you requested a push notification token in the above selective disclosure step you can also send attestations directly to your users app in real time.\n\n```javascript\ncredentials.push(pushToken, `me.uport:add?attestation=${attestationjwt}`, message).then(response => {\n\n})\n```\n\n## Asking users to sign Ethereum transactions\n\nEthereum smart contracts live on the blockchain and at a certain address. The application interface is known as the abi and can be created by the Solidity compiler.\n\nOur Contract class will let you create a javascript object modelling the SmartContract allowing you to create uport uri's that you can send to the user.\n\n```javascript\nimport { Contract } from 'uport'\nconst abi = // import from json or have directly in code\nconst contract = Contract(abi).at(contractAddress)\n// creates a request for the user to call the transfer() function on the smart contract\nconst txRequest = tokenContract.transfer(....)\n```\n\nIn your front end use 'uport-connect' to present it to your user either as a QR code or as a uport-button depending on whether they are on a desktop or mobile browser.\n\n```javascript\nconst connect = new uportconnect.Connect('app name')\nconnect.sendTransaction(txRequest).then(txResponse => {\n  // send response back to server\n})\n```\n\nBack in your server code you receive the `txResponse`. This is a standard ethereum transaction object that you can verify.\n\n","readmeFilename":"README.md","gitHead":"633bba4b349ae446e49707fca21988452508ca11","_id":"uport@0.7.0-alpha-minor-4","_npmVersion":"5.3.0","_nodeVersion":"8.4.0","_npmUser":{"name":"zachferland","email":"zachferland@gmail.com"},"dist":{"integrity":"sha512-cEKg2JYn3hPI3CWclkTT9uiAgFf+Iko2iVmcVAt1V1nAETsOFAHJq/oEGIW58Zca5KTtlykHn9KBLeuSB4rP3Q==","shasum":"61b42516e3a430dd766f2d6674ae15475af62391","tarball":"https://registry.npmjs.org/uport/-/uport-0.7.0-alpha-minor-4.tgz","fileCount":20,"unpackedSize":933918,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbLVpsCRA9TVsSAnZWagAAb/8P/1zDj8SGdHya1pwvDlgF\nwwUnAvETCkVEm+qmi+JaHEJF9AHj4sH5C32BVtWXW1PpQblcXcjIvqIRh7FS\ngjHv4KNY9to+T2hBITtY8q9ppBTxfpAxaMyVqAcHKpzW0997+fagZdOMiXWo\nXo+P5KnxEpUnZ8ldd2VijGpJnG3XFJiOHeIwrhiSNdjfjZv5w+ADvmD3avyu\nX9meE35GCgbTKIvIjDt6QSng3bTMhX/fs1CZNB6+aUqmgTYl21kPd8ii/42Z\nPBgGL1pLqLCqrU48+wVXcNfn5v9heGwffr8v/pbfzrFK7vL58FPTY6FfD4JA\nSSsteb01ux16Us3WEMzfkdQtkLS8iVvkVvzorhP1yYbiH7cQ5BnKAr9eoahN\nwjSqC2JkVoyFO4dpiQoGlid1GFlf6DQjoy2pIb0GvPPxxKzQ5VE5jMqBNBxu\nKyq4lrsCcBBFy7T05zIBcPTmzIuzliUN8bN5ks9HArb+sWB7BzZNzeRHVO4g\nnb8LBNDVtu2RASR9euIaVKQR8h9e0St/6uaFoV4RSp2ZH2UeBuZ0Otdywwlt\np5rr1JIrWV2IQmSzOlyzAZpxrT4E33AaDzwQtWT+sIk9TFEymKrXkEkPsL4r\nH+c2jZC9bdSATW3IOvNSiTo7vd7FYZJc7KW4Kmf2Kys2awifR/v2mDqCpzrS\n3OYf\r\n=0Hta\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEC4lWVzTyVPXz9iYb0FZAflmLZsaoDIf29SJ2EJPjvTAiA0cRdU2GoqpgpIeT1X394J/6daAZ0zXRQkP2EvLQA/dA=="}]},"maintainers":[{"email":"levi.strope@gmail.com","name":"localredhead"},{"email":"oed3933@gmail.com","name":"oed"},{"email":"pelleb@gmail.com","name":"pelleb"},{"email":"zachferland@gmail.com","name":"zachferland"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/uport_0.7.0-alpha-minor-4_1529698924339_0.5473134688740324"},"_hasShrinkwrap":false},"0.7.0-alpha-minor-5":{"name":"uport","version":"0.7.0-alpha-minor-5","description":"Library for interacting with uport profiles and attestations","main":"lib/index.js","files":["lib","dist","src","tutorial"],"scripts":{"test":"jest","test:ci":"jest -u --coverage","build:es5":"babel src -d lib","build:browser":"webpack --config webpack.config.js","build":"yarn build:es5 && yarn test:ci && yarn build:browser","build:docs:html":"jsdoc src/* README.md -d docs","build:docs:md":"./node_modules/jsdoc-to-markdown/bin/cli.js src/* > DOCS.md","build:docs":"npm run build:docs:html && npm run build:docs:md","prepublish":"yarn build"},"author":{"name":"Pelle Braendgaard","email":"pelle.braendgaard@consensys.net"},"license":"MIT","dependencies":{"did-jwt":"^0.0.7","did-resolver":"^0.0.4","ethjs-util":"^0.1.3","ethr-did-resolver":"^0.0.7","mnid":"^0.1.1","muport-did-resolver":"^0.1.0","uport-core":"0.0.36","uport-did-resolver":"^0.0.3","uport-lite":"^1.0.2"},"jest":{"coverageDirectory":"./coverage/","unmockedModulePathPatterns":["<rootDir>/node_modules/nock"],"testEnvironment":"node"},"devDependencies":{"babel-cli":"^6.26.0","babel-core":"^6.26.0","babel-jest":"^22.4.3","babel-loader":"^7.1.4","babel-plugin-syntax-object-rest-spread":"^6.13.0","babel-plugin-transform-es2015-modules-umd":"^6.24.1","babel-plugin-transform-object-rest-spread":"^6.26.0","babel-plugin-transform-runtime":"^6.23.0","babel-polyfill":"^6.22.0","babel-preset-env":"^1.6.1","body-parser":"^1.17.1","express":"^4.15.2","jest":"^22.4.3","jsdoc":"^3.4.3","jsdoc-to-markdown":"^1.3.7","json-loader":"^0.5.4","mockdate":"^2.0.1","webpack":"^4.6.0","webpack-cli":"^2.0.15"},"readme":"# uport-js\n\n## Integrate uPort in your javascript application\n\nuPort provides a simple way for your users to login to your website and provide private credentials such as identity information and contact details to you.\n\nYou can also “attest” credentials they provide to you or that you yourself have about them. This can be shared back to your customers so you can help them build their digital identity.\n\nUport.js provides a simple way for you to integrate uport.js into your javascript application. You can also interact with your uPort users directly in the browser.\n\nWe have an easy to use browser library [uport-connect](https://github.com/uport-project/uport-connect) which can help you do so.\n\n## Setup your uPort application identity\n\nFirst make sure you have your uPort app installed and you've setup your own uPort identity.\n\n### What is a uPort identity?\n\nAn identity in uPort is really just someone or something that can sign data or transactions and also receive signed data about itself.\n\nAn identity has an identifier in the form of an [MNID](https://github.com/uport-project/mnid), a signing key, and a public key stored on the [uPort Registry](https://github.com/uport-project/uport-registry).\n\nAn identity can:\n\n- Sign JWTs (JSON Web Tokens)\n  - [Authenticate themselves to a third party](messages/shareresp.md)\n  - [Disclose private information about themselves](messages/shareresp.md)\n- [Receive requests for disclosure about themselves](messages/sharereq.md)\n- [Receive and store signed third party verifications about themselves](flows/verification.md)\n- [Sign Ethereum transactions](flows/tx.md)\n\nWhen interacting privately with a user you will be interchanging signed JWT([JSON Web Token](https://jwt.io/)). To verify the signature of the JWT you and your users will be fetching your public key from the public profile.\n\nFor details on uPort's underlying architecture, read our [spec repo](https://github.com/uport-project/specs) or check out the [uPort identity contracts] (https://github.com/uport-project/uport-identity).\n\n## Configure your application\n\nIn your application you must first configure your uPort object.\n\n```javascript\nimport { Credentials } from 'uport'\n\n// For new ethereum based addresses\nconst credentials = new Credentials({\n  appName: 'App Name',\n  did: 'did:ethr:0x....',\n  privateKey: process.env.PRIVATE_KEY\n})\n\n// You can create a new identity\n\nconsole.log(Credentials.createIdentity())\n\n// For legacy application identity created on App Manager\nconst credentials = new Credentials({\n  appName: 'App Name',\n  address: 'MNID Encoded uPort Address For Your App',\n  privateKey: process.env.PRIVATE_KEY\n})\n\n\n```\n\n## Requesting information from your users\n\nTo request information from your user you create a Selective Disclosure Request JWT and present it to your user in the web browser.\n\nThe most basic request to get a users public uport identity details:\n\n```javascript\ncredentials.requestDisclosure().then(requestToken => {\n  // send requestToken to browser\n})\n```\n\nYou can ask for specific private data like this:\n\n```javascript\ncredentials.requestDisclosure({\n    requested: ['name','phone','identity_no'],\n    callbackUrl: 'https://....' // URL to send the response of the request to\n  }.then(requestToken => {\n  // send requestToken to browser\n  })\n```\n\nIf you need to know the users address on a specific ethereum network, specify it's `network_id` (currently defaults to ropsten `0x3`). In this case be aware that the `address` returned will be the address on the public network (currently ropsten) for the users profile. The requested network address will be in the `networkAddress` field and will be MNID encoded.\n\n```javascript\ncredentials.requestDisclosure({network_id: '0x4'}).then(requestToken => {\n  // send requestToken to browser\n})\n```\n\nBack in your server code you receive the token:\n\n```javascript\ncredentials.authenticate(responseToken).then(profile => {\n  // Store user profile\n})\n```\n\n### Stateless Challenge/Response\n\nTo ensure that the response received was created as a response to your selective disclosure request above, the original request is included in the response from the mobile app.\n\nThe default verification rule is that the issuer of the embedded request must match the clientId in your Credentials object and that the original request has not yet expired.\n\nSome applications that exclusively live in the browser are unable to sign the original request. In those cases the request token verification is ignored.\n\n### Requesting Push notification tokens from your users\n\nAs part of the selective disclosure request you can ask for permission from your users to communicate directly with their app.\n\n```javascript\ncredentials.createRequest({\n  requested:[...],\n  notifications: true\n}).then(requestToken => {\n  // send to browser\n})\n```\n\nPresent it to the user like before. On the server you can receive the push token like this:\n\n```javascript\ncredentials.receive(responseToken).then(profile => {\n  // Store user profile\n  // Store push token securely\n  console.log(profile.pushToken)\n})\n```\n\n## Attesting information about your users\n\nAttesting information about your users helps add real value to your application. Your users will use uport to build up their own digital identity and your business is an important part of this.\n\nIf you're a financial institution you may be able to attest to KYC related information such as national identity numbers. If you're an educational application you may want to attest to your users achievements in a way that they can securely share.\n\n### What are attestations\n\nAttestations are shareable private information that one party can sign about another party. They are designed to be shared privately by you to your users and by them to other users.\n\n### Creating an attestation\n\n```javascript\ncredentials.attest({\n  sub: '0x...', // uport address of user\n  exp: <future timestamp>, // If your information is not permanent make sure to add an expires timestamp\n  claims: {name:'John Smith'}\n}).then(attestation => {\n  // send attestation to user\n})\n```\n\nAs before you will want to send this to your user. You can do this in the browser\n\n```javascript\nconst connect = new uportconnect.Connect('app name')\nconnect.showRequest(attestation) // no response is needed for an attestation\n```\n\nIf you requested a push notification token in the above selective disclosure step you can also send attestations directly to your users app in real time.\n\n```javascript\ncredentials.push(pushToken, `me.uport:add?attestation=${attestationjwt}`, message).then(response => {\n\n})\n```\n\n## Asking users to sign Ethereum transactions\n\nEthereum smart contracts live on the blockchain and at a certain address. The application interface is known as the abi and can be created by the Solidity compiler.\n\nOur Contract class will let you create a javascript object modelling the SmartContract allowing you to create uport uri's that you can send to the user.\n\n```javascript\nimport { Contract } from 'uport'\nconst abi = // import from json or have directly in code\nconst contract = Contract(abi).at(contractAddress)\n// creates a request for the user to call the transfer() function on the smart contract\nconst txRequest = tokenContract.transfer(....)\n```\n\nIn your front end use 'uport-connect' to present it to your user either as a QR code or as a uport-button depending on whether they are on a desktop or mobile browser.\n\n```javascript\nconst connect = new uportconnect.Connect('app name')\nconnect.sendTransaction(txRequest).then(txResponse => {\n  // send response back to server\n})\n```\n\nBack in your server code you receive the `txResponse`. This is a standard ethereum transaction object that you can verify.\n\n","readmeFilename":"README.md","gitHead":"cfd4d02548d4062c3f691cc50f77e4ca550a3bb9","_id":"uport@0.7.0-alpha-minor-5","_npmVersion":"5.3.0","_nodeVersion":"8.4.0","_npmUser":{"name":"zachferland","email":"zachferland@gmail.com"},"dist":{"integrity":"sha512-wd4ItLw9R/Xqmm+DTX2uvQuvmI5DfkgimJjuOTC0rtOzIPDoK6or2/3Yik0nx5k1WBVqsHseCeQ3IJssmU/lpQ==","shasum":"433ca1722f35952f5ee66423662e3b00a0640575","tarball":"https://registry.npmjs.org/uport/-/uport-0.7.0-alpha-minor-5.tgz","fileCount":20,"unpackedSize":933887,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbLWFXCRA9TVsSAnZWagAAbzQQAJn+CZf9dVddOQuwsimS\nDpBJfk5yqXSRE7kzFnJv79XIlGXdbl13VxOjuQxm+d0xHFXBHVCqR0SR4ESX\nW7PJHQLTJnrwg9VZzxJLCMJl+KAJ01Og6t6rFCO+qeLovE7IEn+yWgH3OrRd\n/d98WH7C77nmtgu7CwI1ZdMY6bRBgwHh9nyBkuoABAtGr+qlpJgd6hBF1sE5\nxCGE7WeERveTgAnmByqXxSvh31pabwxfGNDuNI+jtJmVFWep1qkpzl4jpwfZ\nF4g/jqG4iZOewHF3eDIdCiaGALUjzCPvtChQ1mjUltW6vegSfXPiBRUebgkh\n7gFjg5nRfzyyugNzkkZwcGLl/53KJEOjUG+lZVDiAPFE9dD44/uhlS/3MS1w\neyx5x9aZwjHebCBx18WcHyYNk5xw67M0bb2G7cDgcyNM0epoMQO8Nl+3Q/DT\nFSsSd7sTheZcSPrfEjQ9cVVZ/LCyT8wgqmnmmoRsb9FjPTtKa2y/M/7F42y2\nblIBv1x1Ceu4LzDorh9EYGuZA6vPt86JpefFntwII3xQBVXfV95GoYoNZJJ/\nW6mrY9P6TZhPS5ji3Ua0UuqtPA/STzBSsyd8x3fd4iVaBrVWGp7YOC6zXJ82\nxLN7NAmyfyPdBQ5SlZVVz9b1HwnQxZ39Ir4J2VrV+OlyQbTWumkIcHitWL+a\nMHRu\r\n=Dh6o\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGpHbf/igXCbfUJJ09NajY5CPfRYtdgLDFxM0grH5GSvAiEArOBj0Hc+4d1URjQ7/2s4HIdOFblyQNs4bWXD5vuOn+Q="}]},"maintainers":[{"email":"levi.strope@gmail.com","name":"localredhead"},{"email":"oed3933@gmail.com","name":"oed"},{"email":"pelleb@gmail.com","name":"pelleb"},{"email":"zachferland@gmail.com","name":"zachferland"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/uport_0.7.0-alpha-minor-5_1529700695093_0.8432365512746933"},"_hasShrinkwrap":false},"0.7.0-alpha-minor-6":{"name":"uport","version":"0.7.0-alpha-minor-6","description":"Library for interacting with uport profiles and attestations","main":"lib/index.js","files":["lib","dist","src","tutorial"],"scripts":{"test":"jest","test:ci":"jest -u --coverage","build:es5":"babel src -d lib","build:browser":"webpack --config webpack.config.js","build":"yarn build:es5 && yarn test:ci && yarn build:browser","build:docs:html":"jsdoc src/* README.md -d docs","build:docs:md":"./node_modules/jsdoc-to-markdown/bin/cli.js src/* > DOCS.md","build:docs":"npm run build:docs:html && npm run build:docs:md","prepublish":"yarn build"},"author":{"name":"Pelle Braendgaard","email":"pelle.braendgaard@consensys.net"},"license":"MIT","dependencies":{"did-jwt":"^0.0.7","did-resolver":"^0.0.4","ethjs-util":"^0.1.3","ethr-did-resolver":"^0.0.7","mnid":"^0.1.1","muport-did-resolver":"^0.1.0","uport-core":"0.0.36","uport-did-resolver":"^0.0.3","uport-lite":"^1.0.2"},"jest":{"coverageDirectory":"./coverage/","unmockedModulePathPatterns":["<rootDir>/node_modules/nock"],"testEnvironment":"node"},"devDependencies":{"babel-cli":"^6.26.0","babel-core":"^6.26.0","babel-jest":"^22.4.3","babel-loader":"^7.1.4","babel-plugin-syntax-object-rest-spread":"^6.13.0","babel-plugin-transform-es2015-modules-umd":"^6.24.1","babel-plugin-transform-object-rest-spread":"^6.26.0","babel-plugin-transform-runtime":"^6.23.0","babel-polyfill":"^6.22.0","babel-preset-env":"^1.6.1","body-parser":"^1.17.1","express":"^4.15.2","jest":"^22.4.3","jsdoc":"^3.4.3","jsdoc-to-markdown":"^1.3.7","json-loader":"^0.5.4","mockdate":"^2.0.1","webpack":"^4.6.0","webpack-cli":"^2.0.15"},"readme":"# uport-js\n\n## Integrate uPort in your javascript application\n\nuPort provides a simple way for your users to login to your website and provide private credentials such as identity information and contact details to you.\n\nYou can also “attest” credentials they provide to you or that you yourself have about them. This can be shared back to your customers so you can help them build their digital identity.\n\nUport.js provides a simple way for you to integrate uport.js into your javascript application. You can also interact with your uPort users directly in the browser.\n\nWe have an easy to use browser library [uport-connect](https://github.com/uport-project/uport-connect) which can help you do so.\n\n## Setup your uPort application identity\n\nFirst make sure you have your uPort app installed and you've setup your own uPort identity.\n\n### What is a uPort identity?\n\nAn identity in uPort is really just someone or something that can sign data or transactions and also receive signed data about itself.\n\nAn identity has an identifier in the form of an [MNID](https://github.com/uport-project/mnid), a signing key, and a public key stored on the [uPort Registry](https://github.com/uport-project/uport-registry).\n\nAn identity can:\n\n- Sign JWTs (JSON Web Tokens)\n  - [Authenticate themselves to a third party](messages/shareresp.md)\n  - [Disclose private information about themselves](messages/shareresp.md)\n- [Receive requests for disclosure about themselves](messages/sharereq.md)\n- [Receive and store signed third party verifications about themselves](flows/verification.md)\n- [Sign Ethereum transactions](flows/tx.md)\n\nWhen interacting privately with a user you will be interchanging signed JWT([JSON Web Token](https://jwt.io/)). To verify the signature of the JWT you and your users will be fetching your public key from the public profile.\n\nFor details on uPort's underlying architecture, read our [spec repo](https://github.com/uport-project/specs) or check out the [uPort identity contracts] (https://github.com/uport-project/uport-identity).\n\n## Configure your application\n\nIn your application you must first configure your uPort object.\n\n```javascript\nimport { Credentials } from 'uport'\n\n// For new ethereum based addresses\nconst credentials = new Credentials({\n  appName: 'App Name',\n  did: 'did:ethr:0x....',\n  privateKey: process.env.PRIVATE_KEY\n})\n\n// You can create a new identity\n\nconsole.log(Credentials.createIdentity())\n\n// For legacy application identity created on App Manager\nconst credentials = new Credentials({\n  appName: 'App Name',\n  address: 'MNID Encoded uPort Address For Your App',\n  privateKey: process.env.PRIVATE_KEY\n})\n\n\n```\n\n## Requesting information from your users\n\nTo request information from your user you create a Selective Disclosure Request JWT and present it to your user in the web browser.\n\nThe most basic request to get a users public uport identity details:\n\n```javascript\ncredentials.requestDisclosure().then(requestToken => {\n  // send requestToken to browser\n})\n```\n\nYou can ask for specific private data like this:\n\n```javascript\ncredentials.requestDisclosure({\n    requested: ['name','phone','identity_no'],\n    callbackUrl: 'https://....' // URL to send the response of the request to\n  }.then(requestToken => {\n  // send requestToken to browser\n  })\n```\n\nIf you need to know the users address on a specific ethereum network, specify it's `network_id` (currently defaults to ropsten `0x3`). In this case be aware that the `address` returned will be the address on the public network (currently ropsten) for the users profile. The requested network address will be in the `networkAddress` field and will be MNID encoded.\n\n```javascript\ncredentials.requestDisclosure({network_id: '0x4'}).then(requestToken => {\n  // send requestToken to browser\n})\n```\n\nBack in your server code you receive the token:\n\n```javascript\ncredentials.authenticate(responseToken).then(profile => {\n  // Store user profile\n})\n```\n\n### Stateless Challenge/Response\n\nTo ensure that the response received was created as a response to your selective disclosure request above, the original request is included in the response from the mobile app.\n\nThe default verification rule is that the issuer of the embedded request must match the clientId in your Credentials object and that the original request has not yet expired.\n\nSome applications that exclusively live in the browser are unable to sign the original request. In those cases the request token verification is ignored.\n\n### Requesting Push notification tokens from your users\n\nAs part of the selective disclosure request you can ask for permission from your users to communicate directly with their app.\n\n```javascript\ncredentials.createRequest({\n  requested:[...],\n  notifications: true\n}).then(requestToken => {\n  // send to browser\n})\n```\n\nPresent it to the user like before. On the server you can receive the push token like this:\n\n```javascript\ncredentials.receive(responseToken).then(profile => {\n  // Store user profile\n  // Store push token securely\n  console.log(profile.pushToken)\n})\n```\n\n## Attesting information about your users\n\nAttesting information about your users helps add real value to your application. Your users will use uport to build up their own digital identity and your business is an important part of this.\n\nIf you're a financial institution you may be able to attest to KYC related information such as national identity numbers. If you're an educational application you may want to attest to your users achievements in a way that they can securely share.\n\n### What are attestations\n\nAttestations are shareable private information that one party can sign about another party. They are designed to be shared privately by you to your users and by them to other users.\n\n### Creating an attestation\n\n```javascript\ncredentials.attest({\n  sub: '0x...', // uport address of user\n  exp: <future timestamp>, // If your information is not permanent make sure to add an expires timestamp\n  claims: {name:'John Smith'}\n}).then(attestation => {\n  // send attestation to user\n})\n```\n\nAs before you will want to send this to your user. You can do this in the browser\n\n```javascript\nconst connect = new uportconnect.Connect('app name')\nconnect.showRequest(attestation) // no response is needed for an attestation\n```\n\nIf you requested a push notification token in the above selective disclosure step you can also send attestations directly to your users app in real time.\n\n```javascript\ncredentials.push(pushToken, `me.uport:add?attestation=${attestationjwt}`, message).then(response => {\n\n})\n```\n\n## Asking users to sign Ethereum transactions\n\nEthereum smart contracts live on the blockchain and at a certain address. The application interface is known as the abi and can be created by the Solidity compiler.\n\nOur Contract class will let you create a javascript object modelling the SmartContract allowing you to create uport uri's that you can send to the user.\n\n```javascript\nimport { Contract } from 'uport'\nconst abi = // import from json or have directly in code\nconst contract = Contract(abi).at(contractAddress)\n// creates a request for the user to call the transfer() function on the smart contract\nconst txRequest = tokenContract.transfer(....)\n```\n\nIn your front end use 'uport-connect' to present it to your user either as a QR code or as a uport-button depending on whether they are on a desktop or mobile browser.\n\n```javascript\nconst connect = new uportconnect.Connect('app name')\nconnect.sendTransaction(txRequest).then(txResponse => {\n  // send response back to server\n})\n```\n\nBack in your server code you receive the `txResponse`. This is a standard ethereum transaction object that you can verify.\n\n","readmeFilename":"README.md","gitHead":"cfd4d02548d4062c3f691cc50f77e4ca550a3bb9","_id":"uport@0.7.0-alpha-minor-6","_npmVersion":"5.3.0","_nodeVersion":"8.4.0","_npmUser":{"name":"zachferland","email":"zachferland@gmail.com"},"dist":{"integrity":"sha512-HYY/lW9PFuWjoOnf2RbSyxseFoRjeKxG6TAMyYZZ9E5iq45khPdE2g4ZP3BA7s+WakflHyouuam54RbaHoOilw==","shasum":"eecbffd99442c0991c55abe2496133cbcef1b80d","tarball":"https://registry.npmjs.org/uport/-/uport-0.7.0-alpha-minor-6.tgz","fileCount":20,"unpackedSize":934081,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbLWedCRA9TVsSAnZWagAAB7QP/24NDCO6fpH2kFnu1bVn\n1ZVmTDjwAZOKuegLn5JudWNgY2ujXyvR9vVAaIDb1Lxqfmar1zvYEcx0ffwV\nJNdAf8ki7dq+PGEaNhLuOhIpPvI9zW6f960l3+MWzL9daUF7mwBiBXwnxB/S\nBwlxzv65KE3+kPXyXeUS8mX0yc3UqiMW0gonwGpiag4ZiTuun0d8q1TdUETq\ncU/Z20poz2jwIPbIzceLj/YkwK9TLx/RbldGyVuwcUNrec8mL9bHXC8g4Lg3\nXxHeDglTIUF4VizMrD60q42TeaV+WyuQtExroayK9HOHEBVdpXDOzbR+5Ml5\npYtxrIHkoRpTaHVxXO76GR538cLvvwMOVo+1DE18c+obt1fviPY5hgYXf1fN\nxdsZMoUeqcpP42bnw4ZJDwwdTf2N20xdKuvEaIcziCB9B7y291Lh3ViSlzRT\n9T9TFtLZPsArKz85zJPlQ+kvfrHdtTJnF8lBAateLfP1JdjOhc/mz7fdpnhY\neTixLAYOi8M/jGWaBuSFiUFpw9S0J5q0mk6ndQ0JWwh9obmi2tu/Z8PhMclh\nCPJu/FwnKAfsbkO6K9rXBJEhsNI0M8r4pwPK3N25Z541V+2sWApEXs/gMSAB\n8Bnu44qx8Z/VX/RdLUPRi3P5M0twL7iHHTiB0jQCtGhSKlVfwVbpKLmCC2O9\n3hcm\r\n=ZIdV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCU7N1cpdRXP1wa8ZnBBa71Xr6sdf2c5TQC2znDNzFRfQIhALjPME3zN5MGjG6UyJPA2j76KQpjDxjP7iYJWFViwLiV"}]},"maintainers":[{"email":"levi.strope@gmail.com","name":"localredhead"},{"email":"oed3933@gmail.com","name":"oed"},{"email":"pelleb@gmail.com","name":"pelleb"},{"email":"zachferland@gmail.com","name":"zachferland"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/uport_0.7.0-alpha-minor-6_1529702300999_0.8844084238760281"},"_hasShrinkwrap":false},"0.7.0-alpha-minor-7":{"name":"uport","version":"0.7.0-alpha-minor-7","description":"Library for interacting with uport profiles and attestations","main":"lib/index.js","files":["lib","dist","src","tutorial"],"scripts":{"test":"jest","test:ci":"jest -u --coverage","build:es5":"babel src -d lib","build:browser":"webpack --config webpack.config.js","build":"yarn build:es5 && yarn test:ci && yarn build:browser","build:docs:html":"jsdoc src/* README.md -d docs","build:docs:md":"./node_modules/jsdoc-to-markdown/bin/cli.js src/* > DOCS.md","build:docs":"npm run build:docs:html && npm run build:docs:md","prepublish":"yarn build"},"author":{"name":"Pelle Braendgaard","email":"pelle.braendgaard@consensys.net"},"license":"MIT","dependencies":{"did-jwt":"^0.0.7","did-resolver":"^0.0.4","ethjs-util":"^0.1.3","ethr-did-resolver":"^0.0.7","mnid":"^0.1.1","muport-did-resolver":"^0.1.0","uport-core":"0.0.36","uport-did-resolver":"^0.0.3","uport-lite":"^1.0.2"},"jest":{"coverageDirectory":"./coverage/","unmockedModulePathPatterns":["<rootDir>/node_modules/nock"],"testEnvironment":"node"},"devDependencies":{"babel-cli":"^6.26.0","babel-core":"^6.26.0","babel-jest":"^22.4.3","babel-loader":"^7.1.4","babel-plugin-syntax-object-rest-spread":"^6.13.0","babel-plugin-transform-es2015-modules-umd":"^6.24.1","babel-plugin-transform-object-rest-spread":"^6.26.0","babel-plugin-transform-runtime":"^6.23.0","babel-polyfill":"^6.22.0","babel-preset-env":"^1.6.1","body-parser":"^1.17.1","express":"^4.15.2","jest":"^22.4.3","jsdoc":"^3.4.3","jsdoc-to-markdown":"^1.3.7","json-loader":"^0.5.4","mockdate":"^2.0.1","webpack":"^4.6.0","webpack-cli":"^2.0.15"},"readme":"# uport-js\n\n## Integrate uPort in your javascript application\n\nuPort provides a simple way for your users to login to your website and provide private credentials such as identity information and contact details to you.\n\nYou can also “attest” credentials they provide to you or that you yourself have about them. This can be shared back to your customers so you can help them build their digital identity.\n\nUport.js provides a simple way for you to integrate uport.js into your javascript application. You can also interact with your uPort users directly in the browser.\n\nWe have an easy to use browser library [uport-connect](https://github.com/uport-project/uport-connect) which can help you do so.\n\n## Setup your uPort application identity\n\nFirst make sure you have your uPort app installed and you've setup your own uPort identity.\n\n### What is a uPort identity?\n\nAn identity in uPort is really just someone or something that can sign data or transactions and also receive signed data about itself.\n\nAn identity has an identifier in the form of an [MNID](https://github.com/uport-project/mnid), a signing key, and a public key stored on the [uPort Registry](https://github.com/uport-project/uport-registry).\n\nAn identity can:\n\n- Sign JWTs (JSON Web Tokens)\n  - [Authenticate themselves to a third party](messages/shareresp.md)\n  - [Disclose private information about themselves](messages/shareresp.md)\n- [Receive requests for disclosure about themselves](messages/sharereq.md)\n- [Receive and store signed third party verifications about themselves](flows/verification.md)\n- [Sign Ethereum transactions](flows/tx.md)\n\nWhen interacting privately with a user you will be interchanging signed JWT([JSON Web Token](https://jwt.io/)). To verify the signature of the JWT you and your users will be fetching your public key from the public profile.\n\nFor details on uPort's underlying architecture, read our [spec repo](https://github.com/uport-project/specs) or check out the [uPort identity contracts] (https://github.com/uport-project/uport-identity).\n\n## Configure your application\n\nIn your application you must first configure your uPort object.\n\n```javascript\nimport { Credentials } from 'uport'\n\n// For new ethereum based addresses\nconst credentials = new Credentials({\n  appName: 'App Name',\n  did: 'did:ethr:0x....',\n  privateKey: process.env.PRIVATE_KEY\n})\n\n// You can create a new identity\n\nconsole.log(Credentials.createIdentity())\n\n// For legacy application identity created on App Manager\nconst credentials = new Credentials({\n  appName: 'App Name',\n  address: 'MNID Encoded uPort Address For Your App',\n  privateKey: process.env.PRIVATE_KEY\n})\n\n\n```\n\n## Requesting information from your users\n\nTo request information from your user you create a Selective Disclosure Request JWT and present it to your user in the web browser.\n\nThe most basic request to get a users public uport identity details:\n\n```javascript\ncredentials.requestDisclosure().then(requestToken => {\n  // send requestToken to browser\n})\n```\n\nYou can ask for specific private data like this:\n\n```javascript\ncredentials.requestDisclosure({\n    requested: ['name','phone','identity_no'],\n    callbackUrl: 'https://....' // URL to send the response of the request to\n  }.then(requestToken => {\n  // send requestToken to browser\n  })\n```\n\nIf you need to know the users address on a specific ethereum network, specify it's `network_id` (currently defaults to ropsten `0x3`). In this case be aware that the `address` returned will be the address on the public network (currently ropsten) for the users profile. The requested network address will be in the `networkAddress` field and will be MNID encoded.\n\n```javascript\ncredentials.requestDisclosure({network_id: '0x4'}).then(requestToken => {\n  // send requestToken to browser\n})\n```\n\nBack in your server code you receive the token:\n\n```javascript\ncredentials.authenticate(responseToken).then(profile => {\n  // Store user profile\n})\n```\n\n### Stateless Challenge/Response\n\nTo ensure that the response received was created as a response to your selective disclosure request above, the original request is included in the response from the mobile app.\n\nThe default verification rule is that the issuer of the embedded request must match the clientId in your Credentials object and that the original request has not yet expired.\n\nSome applications that exclusively live in the browser are unable to sign the original request. In those cases the request token verification is ignored.\n\n### Requesting Push notification tokens from your users\n\nAs part of the selective disclosure request you can ask for permission from your users to communicate directly with their app.\n\n```javascript\ncredentials.createRequest({\n  requested:[...],\n  notifications: true\n}).then(requestToken => {\n  // send to browser\n})\n```\n\nPresent it to the user like before. On the server you can receive the push token like this:\n\n```javascript\ncredentials.receive(responseToken).then(profile => {\n  // Store user profile\n  // Store push token securely\n  console.log(profile.pushToken)\n})\n```\n\n## Attesting information about your users\n\nAttesting information about your users helps add real value to your application. Your users will use uport to build up their own digital identity and your business is an important part of this.\n\nIf you're a financial institution you may be able to attest to KYC related information such as national identity numbers. If you're an educational application you may want to attest to your users achievements in a way that they can securely share.\n\n### What are attestations\n\nAttestations are shareable private information that one party can sign about another party. They are designed to be shared privately by you to your users and by them to other users.\n\n### Creating an attestation\n\n```javascript\ncredentials.attest({\n  sub: '0x...', // uport address of user\n  exp: <future timestamp>, // If your information is not permanent make sure to add an expires timestamp\n  claims: {name:'John Smith'}\n}).then(attestation => {\n  // send attestation to user\n})\n```\n\nAs before you will want to send this to your user. You can do this in the browser\n\n```javascript\nconst connect = new uportconnect.Connect('app name')\nconnect.showRequest(attestation) // no response is needed for an attestation\n```\n\nIf you requested a push notification token in the above selective disclosure step you can also send attestations directly to your users app in real time.\n\n```javascript\ncredentials.push(pushToken, `me.uport:add?attestation=${attestationjwt}`, message).then(response => {\n\n})\n```\n\n## Asking users to sign Ethereum transactions\n\nEthereum smart contracts live on the blockchain and at a certain address. The application interface is known as the abi and can be created by the Solidity compiler.\n\nOur Contract class will let you create a javascript object modelling the SmartContract allowing you to create uport uri's that you can send to the user.\n\n```javascript\nimport { Contract } from 'uport'\nconst abi = // import from json or have directly in code\nconst contract = Contract(abi).at(contractAddress)\n// creates a request for the user to call the transfer() function on the smart contract\nconst txRequest = tokenContract.transfer(....)\n```\n\nIn your front end use 'uport-connect' to present it to your user either as a QR code or as a uport-button depending on whether they are on a desktop or mobile browser.\n\n```javascript\nconst connect = new uportconnect.Connect('app name')\nconnect.sendTransaction(txRequest).then(txResponse => {\n  // send response back to server\n})\n```\n\nBack in your server code you receive the `txResponse`. This is a standard ethereum transaction object that you can verify.\n\n","readmeFilename":"README.md","gitHead":"bcff300984ff13113ce406a512fc47ef1a2e9f48","_id":"uport@0.7.0-alpha-minor-7","_npmVersion":"5.3.0","_nodeVersion":"8.4.0","_npmUser":{"name":"zachferland","email":"zachferland@gmail.com"},"dist":{"integrity":"sha512-iuRWpNg4npPQRwfit6nRQjIQYO7Te4bhmSMovPjRTF02k4UUpom/2ofUXElmiNTae7B/LTIzJzoS2YIYLbo3kw==","shasum":"ffda42b4f8f4e34fc2bb615393c255e297490cad","tarball":"https://registry.npmjs.org/uport/-/uport-0.7.0-alpha-minor-7.tgz","fileCount":20,"unpackedSize":934866,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbM4igCRA9TVsSAnZWagAAFCcP+QEEd5YsGjGbuvXtxKc0\nE88LMDMRsOida+EGnVlEvB3WLmFTwwbQmokhfTUWjIF2lais8JkMVBUepWtO\nJ6+eJlVIz1AaHCJfGwYsInI2GH7zMDLXcOt6pHfCNHo2LoD9VCuZg5h6XSfx\nJWX4Enj54QoTSNyLkip8RRNiCpgVKSVe2JNu382mw0IMfimrbAugKyf+oapT\npVaVKbDDvJ3rk8O7WL5B5/ie4Wd+yzIjwixLdm4PB936Z7KvmMOtACcBbVDP\njUzsZuxv2uzBjbozVVN8xb6tiMJo6pMYK0M7jBREYqML2fXMAk0K2d1JL4x/\nbJZX/YZASMifb5k3Y3OF4N6lpDdwKKPLVLH2noWmp2hoUmgkkbSuzJUwnSCr\nl7uCW+795eNXKzDaIZhY7DvRXCG9khxG6p2VThMWgm0gN53Ekex3sGt18KUY\nNnMR2RMid/3geNAvAJOt7CrgpGMnxHiGkgKFGbwJZE9327N36c4U4YKwtgy8\ntHKIvFUq+F7/pebGDSaFI1bNsFq4JzsogmLK2xeyyPzVJmuMtozSBqznyVQF\n6nnVuWRHYgIdgKAZmFVQITAlrzNY5mdRNpJSoPCQcIgtn7pQim494W55FQmp\n7fZwsJJUlWiVF9aK6A7XxZ3RtN+WMqzvlK05bNaMp0zMU4zYvMGnUc9soxcO\nyn3Z\r\n=vzy/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDZlhSTylj2YaQRAN/jYgUjt3QSCLRQpyaNKxX9Y5ilZwIhAJRK64abkDt2FViMFAiiEv3Alp+An6urWWMONCgCr52x"}]},"maintainers":[{"email":"levi.strope@gmail.com","name":"localredhead"},{"email":"oed3933@gmail.com","name":"oed"},{"email":"pelleb@gmail.com","name":"pelleb"},{"email":"zachferland@gmail.com","name":"zachferland"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/uport_0.7.0-alpha-minor-7_1530103968439_0.19955937179960004"},"_hasShrinkwrap":false},"0.7.0-alpha-minor-8":{"name":"uport","version":"0.7.0-alpha-minor-8","description":"Library for interacting with uport profiles and attestations","main":"lib/index.js","files":["lib","dist","src","tutorial"],"scripts":{"test":"jest","test:ci":"jest -u --coverage","build:es5":"babel src -d lib","build:browser":"webpack --config webpack.config.js","build":"yarn build:es5 && yarn test:ci && yarn build:browser","build:docs:html":"jsdoc src/* README.md -d docs","build:docs:md":"./node_modules/jsdoc-to-markdown/bin/cli.js src/* > DOCS.md","build:docs":"npm run build:docs:html && npm run build:docs:md","prepublish":"yarn build"},"author":{"name":"Pelle Braendgaard","email":"pelle.braendgaard@consensys.net"},"license":"MIT","dependencies":{"did-jwt":"^0.0.7","did-resolver":"^0.0.4","ethjs-util":"^0.1.3","ethr-did-resolver":"^0.0.7","mnid":"^0.1.1","muport-did-resolver":"^0.1.0","uport-core":"0.0.36","uport-did-resolver":"^0.0.3","uport-lite":"^1.0.2"},"jest":{"coverageDirectory":"./coverage/","unmockedModulePathPatterns":["<rootDir>/node_modules/nock"],"testEnvironment":"node"},"devDependencies":{"babel-cli":"^6.26.0","babel-core":"^6.26.0","babel-jest":"^22.4.3","babel-loader":"^7.1.4","babel-plugin-syntax-object-rest-spread":"^6.13.0","babel-plugin-transform-es2015-modules-umd":"^6.24.1","babel-plugin-transform-object-rest-spread":"^6.26.0","babel-plugin-transform-runtime":"^6.23.0","babel-polyfill":"^6.22.0","babel-preset-env":"^1.6.1","body-parser":"^1.17.1","express":"^4.15.2","jest":"^22.4.3","jsdoc":"^3.4.3","jsdoc-to-markdown":"^1.3.7","json-loader":"^0.5.4","mockdate":"^2.0.1","webpack":"^4.6.0","webpack-cli":"^2.0.15"},"readme":"# uport-js\n\n## Integrate uPort in your javascript application\n\nuPort provides a simple way for your users to login to your website and provide private credentials such as identity information and contact details to you.\n\nYou can also “attest” credentials they provide to you or that you yourself have about them. This can be shared back to your customers so you can help them build their digital identity.\n\nUport.js provides a simple way for you to integrate uport.js into your javascript application. You can also interact with your uPort users directly in the browser.\n\nWe have an easy to use browser library [uport-connect](https://github.com/uport-project/uport-connect) which can help you do so.\n\n## Setup your uPort application identity\n\nFirst make sure you have your uPort app installed and you've setup your own uPort identity.\n\n### What is a uPort identity?\n\nAn identity in uPort is really just someone or something that can sign data or transactions and also receive signed data about itself.\n\nAn identity has an identifier in the form of an [MNID](https://github.com/uport-project/mnid), a signing key, and a public key stored on the [uPort Registry](https://github.com/uport-project/uport-registry).\n\nAn identity can:\n\n- Sign JWTs (JSON Web Tokens)\n  - [Authenticate themselves to a third party](messages/shareresp.md)\n  - [Disclose private information about themselves](messages/shareresp.md)\n- [Receive requests for disclosure about themselves](messages/sharereq.md)\n- [Receive and store signed third party verifications about themselves](flows/verification.md)\n- [Sign Ethereum transactions](flows/tx.md)\n\nWhen interacting privately with a user you will be interchanging signed JWT([JSON Web Token](https://jwt.io/)). To verify the signature of the JWT you and your users will be fetching your public key from the public profile.\n\nFor details on uPort's underlying architecture, read our [spec repo](https://github.com/uport-project/specs) or check out the [uPort identity contracts] (https://github.com/uport-project/uport-identity).\n\n## Configure your application\n\nIn your application you must first configure your uPort object.\n\n```javascript\nimport { Credentials } from 'uport'\n\n// For new ethereum based addresses\nconst credentials = new Credentials({\n  appName: 'App Name',\n  did: 'did:ethr:0x....',\n  privateKey: process.env.PRIVATE_KEY\n})\n\n// You can create a new identity\n\nconsole.log(Credentials.createIdentity())\n\n// For legacy application identity created on App Manager\nconst credentials = new Credentials({\n  appName: 'App Name',\n  address: 'MNID Encoded uPort Address For Your App',\n  privateKey: process.env.PRIVATE_KEY\n})\n\n\n```\n\n## Requesting information from your users\n\nTo request information from your user you create a Selective Disclosure Request JWT and present it to your user in the web browser.\n\nThe most basic request to get a users public uport identity details:\n\n```javascript\ncredentials.requestDisclosure().then(requestToken => {\n  // send requestToken to browser\n})\n```\n\nYou can ask for specific private data like this:\n\n```javascript\ncredentials.requestDisclosure({\n    requested: ['name','phone','identity_no'],\n    callbackUrl: 'https://....' // URL to send the response of the request to\n  }.then(requestToken => {\n  // send requestToken to browser\n  })\n```\n\nIf you need to know the users address on a specific ethereum network, specify it's `network_id` (currently defaults to ropsten `0x3`). In this case be aware that the `address` returned will be the address on the public network (currently ropsten) for the users profile. The requested network address will be in the `networkAddress` field and will be MNID encoded.\n\n```javascript\ncredentials.requestDisclosure({network_id: '0x4'}).then(requestToken => {\n  // send requestToken to browser\n})\n```\n\nBack in your server code you receive the token:\n\n```javascript\ncredentials.authenticate(responseToken).then(profile => {\n  // Store user profile\n})\n```\n\n### Stateless Challenge/Response\n\nTo ensure that the response received was created as a response to your selective disclosure request above, the original request is included in the response from the mobile app.\n\nThe default verification rule is that the issuer of the embedded request must match the clientId in your Credentials object and that the original request has not yet expired.\n\nSome applications that exclusively live in the browser are unable to sign the original request. In those cases the request token verification is ignored.\n\n### Requesting Push notification tokens from your users\n\nAs part of the selective disclosure request you can ask for permission from your users to communicate directly with their app.\n\n```javascript\ncredentials.createRequest({\n  requested:[...],\n  notifications: true\n}).then(requestToken => {\n  // send to browser\n})\n```\n\nPresent it to the user like before. On the server you can receive the push token like this:\n\n```javascript\ncredentials.receive(responseToken).then(profile => {\n  // Store user profile\n  // Store push token securely\n  console.log(profile.pushToken)\n})\n```\n\n## Attesting information about your users\n\nAttesting information about your users helps add real value to your application. Your users will use uport to build up their own digital identity and your business is an important part of this.\n\nIf you're a financial institution you may be able to attest to KYC related information such as national identity numbers. If you're an educational application you may want to attest to your users achievements in a way that they can securely share.\n\n### What are attestations\n\nAttestations are shareable private information that one party can sign about another party. They are designed to be shared privately by you to your users and by them to other users.\n\n### Creating an attestation\n\n```javascript\ncredentials.attest({\n  sub: '0x...', // uport address of user\n  exp: <future timestamp>, // If your information is not permanent make sure to add an expires timestamp\n  claims: {name:'John Smith'}\n}).then(attestation => {\n  // send attestation to user\n})\n```\n\nAs before you will want to send this to your user. You can do this in the browser\n\n```javascript\nconst connect = new uportconnect.Connect('app name')\nconnect.showRequest(attestation) // no response is needed for an attestation\n```\n\nIf you requested a push notification token in the above selective disclosure step you can also send attestations directly to your users app in real time.\n\n```javascript\ncredentials.push(pushToken, `me.uport:add?attestation=${attestationjwt}`, message).then(response => {\n\n})\n```\n\n## Asking users to sign Ethereum transactions\n\nEthereum smart contracts live on the blockchain and at a certain address. The application interface is known as the abi and can be created by the Solidity compiler.\n\nOur Contract class will let you create a javascript object modelling the SmartContract allowing you to create uport uri's that you can send to the user.\n\n```javascript\nimport { Contract } from 'uport'\nconst abi = // import from json or have directly in code\nconst contract = Contract(abi).at(contractAddress)\n// creates a request for the user to call the transfer() function on the smart contract\nconst txRequest = tokenContract.transfer(....)\n```\n\nIn your front end use 'uport-connect' to present it to your user either as a QR code or as a uport-button depending on whether they are on a desktop or mobile browser.\n\n```javascript\nconst connect = new uportconnect.Connect('app name')\nconnect.sendTransaction(txRequest).then(txResponse => {\n  // send response back to server\n})\n```\n\nBack in your server code you receive the `txResponse`. This is a standard ethereum transaction object that you can verify.\n\n","readmeFilename":"README.md","gitHead":"ff24bad2534b07d3a7694309fa3cea61f40dac06","_id":"uport@0.7.0-alpha-minor-8","_npmVersion":"5.3.0","_nodeVersion":"8.4.0","_npmUser":{"name":"zachferland","email":"zachferland@gmail.com"},"dist":{"integrity":"sha512-IQQlRTQrkNwhyYAfPeKBD+vjqZOsLkY4U1+VyzKNVyPsdtRJ91O82rqbWGlu/Iv0p14NY9unpIzLBexrTfU7QA==","shasum":"3c52fbc7d2b1f06107546362179066ffe3088f71","tarball":"https://registry.npmjs.org/uport/-/uport-0.7.0-alpha-minor-8.tgz","fileCount":20,"unpackedSize":934272,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbM4oDCRA9TVsSAnZWagAAvwgQAKGsjzjeg0LOpqbWjbid\nyeYJ+CPk84Pti4R5w6whJNaiJWrBPGjZKm58DIvyyAx1CuwMeejidaC9qbix\n4meuPvlmQJxFSYkfEQXhm6NzZbKP4MKF1cpapkDJa1CDyCFxwndcyAKHNoSx\nsFAWIRbOrueF4+JiSebFW+5XW+y9SQEZT3qQLLiW/4s8q//VprnksEaDExwA\ngN6nTuyhpZbetpN54mgC2ieK35axd8jg5OHbZpXMRb/ETUx1P5odtv5OnNmX\nITW5IJf/O5IMOP2XYgUj9K0PWSGWxf6nv9jCgDYv2ruWjnT3GLHqMr1AHH2p\nraKYh8VMqcyJI94F6OhM3RHhSrVBWeBlOd/FvMtTv1SwbC0hPgsIUcM8ghWV\nc5z3EsKFa0EsOO9REqQsKWXI1t2NBMfNPJ1hWQcO5GSHQsBlTESZPvM2E0/O\nP5ivT1GIdd9xpWHAMa/93Dv6FuA2leR4OmIskq4BRbjiRTEmzOVnuO9xY3dM\neStqkmlaZLF7FqIJNs9MkKcvpe0a2U42g6CXeKJ9VIkbOLxB59cjaAEcXg4m\nor8zjbEQlHi4oGdZ8hdLREuqLy0zznxab4Y1+PSpfEzwV90QsjnMw3hfwQbS\n8SnsSR1TMLwZwllXrcw90oIKd+zYMQ57NOl34yfyG0xmFmxuRRDUWJLkOl+m\nVO4U\r\n=mUh+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDIajGE6W/6g4A+45ZLURWtM0LPypB/OyJ7B08Py4scuwIhAMX82HA7gg+tXh5HvK0FT6lTAJfW1cyKvgn6Gtnr+N8C"}]},"maintainers":[{"email":"levi.strope@gmail.com","name":"localredhead"},{"email":"oed3933@gmail.com","name":"oed"},{"email":"pelleb@gmail.com","name":"pelleb"},{"email":"zachferland@gmail.com","name":"zachferland"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/uport_0.7.0-alpha-minor-8_1530104323316_0.9205018341269531"},"_hasShrinkwrap":false},"0.7.0-alpha-minor-9":{"name":"uport","version":"0.7.0-alpha-minor-9","description":"Library for interacting with uport profiles and attestations","main":"lib/index.js","files":["lib","dist","src","tutorial"],"scripts":{"test":"jest","test:ci":"jest -u --coverage","build:es5":"babel src -d lib","build:browser":"webpack --config webpack.config.js","build":"yarn build:es5 && yarn test:ci && yarn build:browser","build:docs:html":"jsdoc src/* README.md -d docs","build:docs:md":"./node_modules/jsdoc-to-markdown/bin/cli.js src/* > DOCS.md","build:docs":"npm run build:docs:html && npm run build:docs:md","prepublish":"yarn build"},"author":{"name":"Pelle Braendgaard","email":"pelle.braendgaard@consensys.net"},"license":"MIT","dependencies":{"did-jwt":"^0.0.7","did-resolver":"^0.0.4","ethjs-util":"^0.1.3","ethr-did-resolver":"^0.0.7","mnid":"^0.1.1","muport-did-resolver":"^0.1.0","uport-core":"0.0.36","uport-did-resolver":"^0.0.3","uport-lite":"^1.0.2"},"jest":{"coverageDirectory":"./coverage/","unmockedModulePathPatterns":["<rootDir>/node_modules/nock"],"testEnvironment":"node"},"devDependencies":{"babel-cli":"^6.26.0","babel-core":"^6.26.0","babel-jest":"^22.4.3","babel-loader":"^7.1.4","babel-plugin-syntax-object-rest-spread":"^6.13.0","babel-plugin-transform-es2015-modules-umd":"^6.24.1","babel-plugin-transform-object-rest-spread":"^6.26.0","babel-plugin-transform-runtime":"^6.23.0","babel-polyfill":"^6.22.0","babel-preset-env":"^1.6.1","body-parser":"^1.17.1","express":"^4.15.2","jest":"^22.4.3","jsdoc":"^3.4.3","jsdoc-to-markdown":"^1.3.7","json-loader":"^0.5.4","mockdate":"^2.0.1","webpack":"^4.6.0","webpack-cli":"^2.0.15"},"readme":"# uport-js\n\n## Integrate uPort in your javascript application\n\nuPort provides a simple way for your users to login to your website and provide private credentials such as identity information and contact details to you.\n\nYou can also “attest” credentials they provide to you or that you yourself have about them. This can be shared back to your customers so you can help them build their digital identity.\n\nUport.js provides a simple way for you to integrate uport.js into your javascript application. You can also interact with your uPort users directly in the browser.\n\nWe have an easy to use browser library [uport-connect](https://github.com/uport-project/uport-connect) which can help you do so.\n\n## Setup your uPort application identity\n\nFirst make sure you have your uPort app installed and you've setup your own uPort identity.\n\n### What is a uPort identity?\n\nAn identity in uPort is really just someone or something that can sign data or transactions and also receive signed data about itself.\n\nAn identity has an identifier in the form of an [MNID](https://github.com/uport-project/mnid), a signing key, and a public key stored on the [uPort Registry](https://github.com/uport-project/uport-registry).\n\nAn identity can:\n\n- Sign JWTs (JSON Web Tokens)\n  - [Authenticate themselves to a third party](messages/shareresp.md)\n  - [Disclose private information about themselves](messages/shareresp.md)\n- [Receive requests for disclosure about themselves](messages/sharereq.md)\n- [Receive and store signed third party verifications about themselves](flows/verification.md)\n- [Sign Ethereum transactions](flows/tx.md)\n\nWhen interacting privately with a user you will be interchanging signed JWT([JSON Web Token](https://jwt.io/)). To verify the signature of the JWT you and your users will be fetching your public key from the public profile.\n\nFor details on uPort's underlying architecture, read our [spec repo](https://github.com/uport-project/specs) or check out the [uPort identity contracts] (https://github.com/uport-project/uport-identity).\n\n## Configure your application\n\nIn your application you must first configure your uPort object.\n\n```javascript\nimport { Credentials } from 'uport'\n\n// For new ethereum based addresses\nconst credentials = new Credentials({\n  appName: 'App Name',\n  did: 'did:ethr:0x....',\n  privateKey: process.env.PRIVATE_KEY\n})\n\n// You can create a new identity\n\nconsole.log(Credentials.createIdentity())\n\n// For legacy application identity created on App Manager\nconst credentials = new Credentials({\n  appName: 'App Name',\n  address: 'MNID Encoded uPort Address For Your App',\n  privateKey: process.env.PRIVATE_KEY\n})\n\n\n```\n\n## Requesting information from your users\n\nTo request information from your user you create a Selective Disclosure Request JWT and present it to your user in the web browser.\n\nThe most basic request to get a users public uport identity details:\n\n```javascript\ncredentials.requestDisclosure().then(requestToken => {\n  // send requestToken to browser\n})\n```\n\nYou can ask for specific private data like this:\n\n```javascript\ncredentials.requestDisclosure({\n    requested: ['name','phone','identity_no'],\n    callbackUrl: 'https://....' // URL to send the response of the request to\n  }.then(requestToken => {\n  // send requestToken to browser\n  })\n```\n\nIf you need to know the users address on a specific ethereum network, specify it's `network_id` (currently defaults to ropsten `0x3`). In this case be aware that the `address` returned will be the address on the public network (currently ropsten) for the users profile. The requested network address will be in the `networkAddress` field and will be MNID encoded.\n\n```javascript\ncredentials.requestDisclosure({network_id: '0x4'}).then(requestToken => {\n  // send requestToken to browser\n})\n```\n\nBack in your server code you receive the token:\n\n```javascript\ncredentials.authenticate(responseToken).then(profile => {\n  // Store user profile\n})\n```\n\n### Stateless Challenge/Response\n\nTo ensure that the response received was created as a response to your selective disclosure request above, the original request is included in the response from the mobile app.\n\nThe default verification rule is that the issuer of the embedded request must match the clientId in your Credentials object and that the original request has not yet expired.\n\nSome applications that exclusively live in the browser are unable to sign the original request. In those cases the request token verification is ignored.\n\n### Requesting Push notification tokens from your users\n\nAs part of the selective disclosure request you can ask for permission from your users to communicate directly with their app.\n\n```javascript\ncredentials.createRequest({\n  requested:[...],\n  notifications: true\n}).then(requestToken => {\n  // send to browser\n})\n```\n\nPresent it to the user like before. On the server you can receive the push token like this:\n\n```javascript\ncredentials.receive(responseToken).then(profile => {\n  // Store user profile\n  // Store push token securely\n  console.log(profile.pushToken)\n})\n```\n\n## Attesting information about your users\n\nAttesting information about your users helps add real value to your application. Your users will use uport to build up their own digital identity and your business is an important part of this.\n\nIf you're a financial institution you may be able to attest to KYC related information such as national identity numbers. If you're an educational application you may want to attest to your users achievements in a way that they can securely share.\n\n### What are attestations\n\nAttestations are shareable private information that one party can sign about another party. They are designed to be shared privately by you to your users and by them to other users.\n\n### Creating an attestation\n\n```javascript\ncredentials.attest({\n  sub: '0x...', // uport address of user\n  exp: <future timestamp>, // If your information is not permanent make sure to add an expires timestamp\n  claims: {name:'John Smith'}\n}).then(attestation => {\n  // send attestation to user\n})\n```\n\nAs before you will want to send this to your user. You can do this in the browser\n\n```javascript\nconst connect = new uportconnect.Connect('app name')\nconnect.showRequest(attestation) // no response is needed for an attestation\n```\n\nIf you requested a push notification token in the above selective disclosure step you can also send attestations directly to your users app in real time.\n\n```javascript\ncredentials.push(pushToken, `me.uport:add?attestation=${attestationjwt}`, message).then(response => {\n\n})\n```\n\n## Asking users to sign Ethereum transactions\n\nEthereum smart contracts live on the blockchain and at a certain address. The application interface is known as the abi and can be created by the Solidity compiler.\n\nOur Contract class will let you create a javascript object modelling the SmartContract allowing you to create uport uri's that you can send to the user.\n\n```javascript\nimport { Contract } from 'uport'\nconst abi = // import from json or have directly in code\nconst contract = Contract(abi).at(contractAddress)\n// creates a request for the user to call the transfer() function on the smart contract\nconst txRequest = tokenContract.transfer(....)\n```\n\nIn your front end use 'uport-connect' to present it to your user either as a QR code or as a uport-button depending on whether they are on a desktop or mobile browser.\n\n```javascript\nconst connect = new uportconnect.Connect('app name')\nconnect.sendTransaction(txRequest).then(txResponse => {\n  // send response back to server\n})\n```\n\nBack in your server code you receive the `txResponse`. This is a standard ethereum transaction object that you can verify.\n\n","readmeFilename":"README.md","gitHead":"409b75828f2b48a4c0e398f2ce3dfafdd96a29fd","_id":"uport@0.7.0-alpha-minor-9","_npmVersion":"5.3.0","_nodeVersion":"8.4.0","_npmUser":{"name":"zachferland","email":"zachferland@gmail.com"},"dist":{"integrity":"sha512-x5tNkTZvDnUjncvqfQJn5ut+LEob7te/5oBIk79aRiznSUOhueT0OMylmlUJYmySnfmE8uEKd7oe2wevK95RWw==","shasum":"4f18976da1a90e37e95fcf61d7ebeb089af4d7a7","tarball":"https://registry.npmjs.org/uport/-/uport-0.7.0-alpha-minor-9.tgz","fileCount":20,"unpackedSize":934691,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbNScHCRA9TVsSAnZWagAAM/QP/1IrFeMw2DPCmW+VkGWX\nn3RucbSwulCTqCZ8S5+MJSqn3ggCNKB++kqWiGg/+GWfI0Vo6kGnMA/b35b7\n/5LrNbdGWI3Y0DEwBF4T+Ot9wwoGMK76qCpZXvc3RAkSY2Uzj2ch87cOGrBu\nultBK1b9my/00NwWJAPc8DRZ3tNnW7Z6YvNAeYPAUgNoQRXIDJRAhsGpTM7J\nvUOvTpMcTEHFg/SUISMQcmOiXrVUhVB/AVegrrmQNmcc6xoVpgPRph94+X2m\nDkgwv9BcqfcWkAHQSRCjYDVcGQjXEA7GCJNLo58L9UcFXSJJnQkTRNEWU/iJ\nAcNOSCR9n8RXiwl/2DRJujZncramJiOhMVHO6ZRV/uRPs0JLfFL5w1oWQm8I\nlMqBKRavR18cW3B9LrFcPFhwrPw+0VRZQAtFGYAKHgjzCfEYqpWoW4iT6zng\nugpNlIZ7Fut5H3EM/e33hr3CcwH75y0JJzFNqpX8RnASVQmEIUK3OlpwM66C\nwpWIt3/h/5b/zGRPLIDFQBhiQ59beqhMiEfyC59uIVdwrHZAoDtRytMhoely\nxLmYSvx9BoBVGQoV8GRHTwXqmNt28Dxga61ebc+7vHiV6xo1YAwvrikyhklR\nFXLi0ecsDFCWDsjJo2h7Bppu6HfvFz5q6uvlEN6eSzitdb2YqO+je55yIfIi\n57H5\r\n=JFi6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHTxOuTUcuRLwK0UnfrLc2lF4lwdzchAvH6XcWxN1x3zAiAHDr93aHVBVGUay438bfOlqY2bccUatXYwd4dwDhiuZg=="}]},"maintainers":[{"email":"levi.strope@gmail.com","name":"localredhead"},{"email":"oed3933@gmail.com","name":"oed"},{"email":"pelleb@gmail.com","name":"pelleb"},{"email":"zachferland@gmail.com","name":"zachferland"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/uport_0.7.0-alpha-minor-9_1530210054964_0.7971897393305927"},"_hasShrinkwrap":false},"0.7.0-alpha-minor-10":{"name":"uport","version":"0.7.0-alpha-minor-10","description":"Library for interacting with uport profiles and attestations","main":"lib/index.js","files":["lib","dist","src","tutorial"],"scripts":{"test":"jest","test:ci":"jest -u --coverage","build:es5":"babel src -d lib","build:browser":"webpack --config webpack.config.js","build":"yarn build:es5 && yarn test:ci && yarn build:browser","build:docs:html":"jsdoc src/* README.md -d docs","build:docs:md":"./node_modules/jsdoc-to-markdown/bin/cli.js src/* > DOCS.md","build:docs":"npm run build:docs:html && npm run build:docs:md","prepublish":"yarn build"},"author":{"name":"Pelle Braendgaard","email":"pelle.braendgaard@consensys.net"},"license":"MIT","dependencies":{"did-jwt":"^0.0.7","did-resolver":"^0.0.4","ethjs-util":"^0.1.3","ethr-did-resolver":"^0.0.7","mnid":"^0.1.1","muport-did-resolver":"^0.1.0","uport-core":"0.0.36","uport-did-resolver":"^0.0.3","uport-lite":"^1.0.2"},"jest":{"coverageDirectory":"./coverage/","unmockedModulePathPatterns":["<rootDir>/node_modules/nock"],"testEnvironment":"node"},"devDependencies":{"babel-cli":"^6.26.0","babel-core":"^6.26.0","babel-jest":"^22.4.3","babel-loader":"^7.1.4","babel-plugin-syntax-object-rest-spread":"^6.13.0","babel-plugin-transform-es2015-modules-umd":"^6.24.1","babel-plugin-transform-object-rest-spread":"^6.26.0","babel-plugin-transform-runtime":"^6.23.0","babel-polyfill":"^6.22.0","babel-preset-env":"^1.6.1","body-parser":"^1.17.1","express":"^4.15.2","jest":"^22.4.3","jsdoc":"^3.4.3","jsdoc-to-markdown":"^1.3.7","json-loader":"^0.5.4","mockdate":"^2.0.1","webpack":"^4.6.0","webpack-cli":"^2.0.15"},"readme":"# uport-js\n\n## Integrate uPort in your javascript application\n\nuPort provides a simple way for your users to login to your website and provide private credentials such as identity information and contact details to you.\n\nYou can also “attest” credentials they provide to you or that you yourself have about them. This can be shared back to your customers so you can help them build their digital identity.\n\nUport.js provides a simple way for you to integrate uport.js into your javascript application. You can also interact with your uPort users directly in the browser.\n\nWe have an easy to use browser library [uport-connect](https://github.com/uport-project/uport-connect) which can help you do so.\n\n## Setup your uPort application identity\n\nFirst make sure you have your uPort app installed and you've setup your own uPort identity.\n\n### What is a uPort identity?\n\nAn identity in uPort is really just someone or something that can sign data or transactions and also receive signed data about itself.\n\nAn identity has an identifier in the form of an [MNID](https://github.com/uport-project/mnid), a signing key, and a public key stored on the [uPort Registry](https://github.com/uport-project/uport-registry).\n\nAn identity can:\n\n- Sign JWTs (JSON Web Tokens)\n  - [Authenticate themselves to a third party](messages/shareresp.md)\n  - [Disclose private information about themselves](messages/shareresp.md)\n- [Receive requests for disclosure about themselves](messages/sharereq.md)\n- [Receive and store signed third party verifications about themselves](flows/verification.md)\n- [Sign Ethereum transactions](flows/tx.md)\n\nWhen interacting privately with a user you will be interchanging signed JWT([JSON Web Token](https://jwt.io/)). To verify the signature of the JWT you and your users will be fetching your public key from the public profile.\n\nFor details on uPort's underlying architecture, read our [spec repo](https://github.com/uport-project/specs) or check out the [uPort identity contracts] (https://github.com/uport-project/uport-identity).\n\n## Configure your application\n\nIn your application you must first configure your uPort object.\n\n```javascript\nimport { Credentials } from 'uport'\n\n// For new ethereum based addresses\nconst credentials = new Credentials({\n  appName: 'App Name',\n  did: 'did:ethr:0x....',\n  privateKey: process.env.PRIVATE_KEY\n})\n\n// You can create a new identity\n\nconsole.log(Credentials.createIdentity())\n\n// For legacy application identity created on App Manager\nconst credentials = new Credentials({\n  appName: 'App Name',\n  address: 'MNID Encoded uPort Address For Your App',\n  privateKey: process.env.PRIVATE_KEY\n})\n\n\n```\n\n## Requesting information from your users\n\nTo request information from your user you create a Selective Disclosure Request JWT and present it to your user in the web browser.\n\nThe most basic request to get a users public uport identity details:\n\n```javascript\ncredentials.requestDisclosure().then(requestToken => {\n  // send requestToken to browser\n})\n```\n\nYou can ask for specific private data like this:\n\n```javascript\ncredentials.requestDisclosure({\n    requested: ['name','phone','identity_no'],\n    callbackUrl: 'https://....' // URL to send the response of the request to\n  }.then(requestToken => {\n  // send requestToken to browser\n  })\n```\n\nIf you need to know the users address on a specific ethereum network, specify it's `network_id` (currently defaults to ropsten `0x3`). In this case be aware that the `address` returned will be the address on the public network (currently ropsten) for the users profile. The requested network address will be in the `networkAddress` field and will be MNID encoded.\n\n```javascript\ncredentials.requestDisclosure({network_id: '0x4'}).then(requestToken => {\n  // send requestToken to browser\n})\n```\n\nBack in your server code you receive the token:\n\n```javascript\ncredentials.authenticate(responseToken).then(profile => {\n  // Store user profile\n})\n```\n\n### Stateless Challenge/Response\n\nTo ensure that the response received was created as a response to your selective disclosure request above, the original request is included in the response from the mobile app.\n\nThe default verification rule is that the issuer of the embedded request must match the clientId in your Credentials object and that the original request has not yet expired.\n\nSome applications that exclusively live in the browser are unable to sign the original request. In those cases the request token verification is ignored.\n\n### Requesting Push notification tokens from your users\n\nAs part of the selective disclosure request you can ask for permission from your users to communicate directly with their app.\n\n```javascript\ncredentials.createRequest({\n  requested:[...],\n  notifications: true\n}).then(requestToken => {\n  // send to browser\n})\n```\n\nPresent it to the user like before. On the server you can receive the push token like this:\n\n```javascript\ncredentials.receive(responseToken).then(profile => {\n  // Store user profile\n  // Store push token securely\n  console.log(profile.pushToken)\n})\n```\n\n## Attesting information about your users\n\nAttesting information about your users helps add real value to your application. Your users will use uport to build up their own digital identity and your business is an important part of this.\n\nIf you're a financial institution you may be able to attest to KYC related information such as national identity numbers. If you're an educational application you may want to attest to your users achievements in a way that they can securely share.\n\n### What are attestations\n\nAttestations are shareable private information that one party can sign about another party. They are designed to be shared privately by you to your users and by them to other users.\n\n### Creating an attestation\n\n```javascript\ncredentials.attest({\n  sub: '0x...', // uport address of user\n  exp: <future timestamp>, // If your information is not permanent make sure to add an expires timestamp\n  claims: {name:'John Smith'}\n}).then(attestation => {\n  // send attestation to user\n})\n```\n\nAs before you will want to send this to your user. You can do this in the browser\n\n```javascript\nconst connect = new uportconnect.Connect('app name')\nconnect.showRequest(attestation) // no response is needed for an attestation\n```\n\nIf you requested a push notification token in the above selective disclosure step you can also send attestations directly to your users app in real time.\n\n```javascript\ncredentials.push(pushToken, `me.uport:add?attestation=${attestationjwt}`, message).then(response => {\n\n})\n```\n\n## Asking users to sign Ethereum transactions\n\nEthereum smart contracts live on the blockchain and at a certain address. The application interface is known as the abi and can be created by the Solidity compiler.\n\nOur Contract class will let you create a javascript object modelling the SmartContract allowing you to create uport uri's that you can send to the user.\n\n```javascript\nimport { Contract } from 'uport'\nconst abi = // import from json or have directly in code\nconst contract = Contract(abi).at(contractAddress)\n// creates a request for the user to call the transfer() function on the smart contract\nconst txRequest = tokenContract.transfer(....)\n```\n\nIn your front end use 'uport-connect' to present it to your user either as a QR code or as a uport-button depending on whether they are on a desktop or mobile browser.\n\n```javascript\nconst connect = new uportconnect.Connect('app name')\nconnect.sendTransaction(txRequest).then(txResponse => {\n  // send response back to server\n})\n```\n\nBack in your server code you receive the `txResponse`. This is a standard ethereum transaction object that you can verify.\n\n","readmeFilename":"README.md","gitHead":"409b75828f2b48a4c0e398f2ce3dfafdd96a29fd","_id":"uport@0.7.0-alpha-minor-10","_npmVersion":"5.3.0","_nodeVersion":"8.4.0","_npmUser":{"name":"zachferland","email":"zachferland@gmail.com"},"dist":{"integrity":"sha512-6GJ9ku/5/lfxpENddr1dyEDmuDnYehA+6uQYw7vodXWFMG0YeX2+mlTtugCYUskeBUjc5YMinDTiEJ/U6djV0Q==","shasum":"b12074ef0a6e64ceb50e1e8f7501eff9e259ef87","tarball":"https://registry.npmjs.org/uport/-/uport-0.7.0-alpha-minor-10.tgz","fileCount":20,"unpackedSize":934692,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbNSimCRA9TVsSAnZWagAARf8P/21YOiz2LuRn6nuyFMpg\nqsiNtkcnPlJro765PcX8oAdV42VMw5tOS3LTH/FaYqYRaIYXuPcF7YdHi8g9\n43akT/tFyO1I7uN7J3KwagnpVYPVJOWos/9U5CNYKcXOOyO6R12s9578uS5X\nP9z4VJh5cCySADPWMWBVlUCeVHku8AqoPpCOoJSZBzqFfQLX1nch7DBAPdhD\n3sQTPHrqVzNoRLizICfWQ9mmIwPwbPtdfsU0lKwEnzoNCqRvSbNeSMeWWFhE\nd594URhWn8/fQnMbPBLeIudGU2sHGpDzTjGMe9ym8wOG0CJglks+93QMeJSI\nFfp8NqW+ILYpjmVCx7//MU77EYMpcuhAQq2DslIHlr7nyGpTNiH3aW1VY0Q/\nwf8UiWugQ6IvEV59/a8pyeJtDVVw83D1zHzQ5ixKvzOC7ezMd/l8IuF5VTsU\nlj7CVZt97arT9vvqSAqwPCjYc1aiZnqD8YG/GQ47gbD5n7fcxHcrsZe3mpkb\n3QadSfEPCQ8XjcCmMPSW/aLfu2PdsasoezuEBqhfXoBQXLwCsNDFMs8Jj+Lo\nTYYYvHkMnmJMIPFyRVWYhoezOJr46c/6rN6MtkpJ8m1ZzS/ZrE8+IUXZMuws\nDidp12O5m4WY+rA1Hp7CjDqIkAEhkutojkYRFS2GPEkdhP4sVt//lzcEM6ef\nhka1\r\n=uNUv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAwvRo4AwMuWnr8X+VxUmiODftdEAe1UafI5I9Sd3PpLAiEAxV+tyH0kvqwlCZfNtiyskv7+PEHZZesC4zlcUX5lW1k="}]},"maintainers":[{"email":"levi.strope@gmail.com","name":"localredhead"},{"email":"oed3933@gmail.com","name":"oed"},{"email":"pelleb@gmail.com","name":"pelleb"},{"email":"zachferland@gmail.com","name":"zachferland"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/uport_0.7.0-alpha-minor-10_1530210469960_0.04250524341982209"},"_hasShrinkwrap":false},"0.7.0-alpha-minor-11":{"name":"uport","version":"0.7.0-alpha-minor-11","description":"Library for interacting with uport profiles and attestations","main":"lib/index.js","files":["lib","dist","src","tutorial"],"scripts":{"test":"jest","test:ci":"jest -u --coverage","build:es5":"babel src -d lib","build:browser":"webpack --config webpack.config.js","build":"yarn build:es5 && yarn test:ci && yarn build:browser","build:docs:html":"jsdoc src/* README.md -d docs","build:docs:md":"./node_modules/jsdoc-to-markdown/bin/cli.js src/* > DOCS.md","build:docs":"npm run build:docs:html && npm run build:docs:md","prepublish":"yarn build"},"author":{"name":"Pelle Braendgaard","email":"pelle.braendgaard@consensys.net"},"license":"MIT","dependencies":{"did-jwt":"^0.0.7","did-resolver":"^0.0.4","ethjs-util":"^0.1.3","ethr-did-resolver":"^0.0.7","mnid":"^0.1.1","muport-did-resolver":"^0.1.0","uport-core":"^0.0.43","uport-did-resolver":"^0.0.3","uport-lite":"^1.0.2"},"jest":{"coverageDirectory":"./coverage/","unmockedModulePathPatterns":["<rootDir>/node_modules/nock"],"testEnvironment":"node"},"devDependencies":{"babel-cli":"^6.26.0","babel-core":"^6.26.0","babel-jest":"^22.4.3","babel-loader":"^7.1.4","babel-plugin-syntax-object-rest-spread":"^6.13.0","babel-plugin-transform-es2015-modules-umd":"^6.24.1","babel-plugin-transform-object-rest-spread":"^6.26.0","babel-plugin-transform-runtime":"^6.23.0","babel-polyfill":"^6.22.0","babel-preset-env":"^1.6.1","body-parser":"^1.17.1","express":"^4.15.2","jest":"^22.4.3","jsdoc":"^3.4.3","jsdoc-to-markdown":"^1.3.7","json-loader":"^0.5.4","mockdate":"^2.0.1","webpack":"^4.6.0","webpack-cli":"^2.0.15"},"readme":"# uport-js\n\n## Integrate uPort in your javascript application\n\nuPort provides a simple way for your users to login to your website and provide private credentials such as identity information and contact details to you.\n\nYou can also “attest” credentials they provide to you or that you yourself have about them. This can be shared back to your customers so you can help them build their digital identity.\n\nUport.js provides a simple way for you to integrate uport.js into your javascript application. You can also interact with your uPort users directly in the browser.\n\nWe have an easy to use browser library [uport-connect](https://github.com/uport-project/uport-connect) which can help you do so.\n\n## Setup your uPort application identity\n\nFirst make sure you have your uPort app installed and you've setup your own uPort identity.\n\n### What is a uPort identity?\n\nAn identity in uPort is really just someone or something that can sign data or transactions and also receive signed data about itself.\n\nAn identity has an identifier in the form of an [MNID](https://github.com/uport-project/mnid), a signing key, and a public key stored on the [uPort Registry](https://github.com/uport-project/uport-registry).\n\nAn identity can:\n\n- Sign JWTs (JSON Web Tokens)\n  - [Authenticate themselves to a third party](messages/shareresp.md)\n  - [Disclose private information about themselves](messages/shareresp.md)\n- [Receive requests for disclosure about themselves](messages/sharereq.md)\n- [Receive and store signed third party verifications about themselves](flows/verification.md)\n- [Sign Ethereum transactions](flows/tx.md)\n\nWhen interacting privately with a user you will be interchanging signed JWT([JSON Web Token](https://jwt.io/)). To verify the signature of the JWT you and your users will be fetching your public key from the public profile.\n\nFor details on uPort's underlying architecture, read our [spec repo](https://github.com/uport-project/specs) or check out the [uPort identity contracts] (https://github.com/uport-project/uport-identity).\n\n## Configure your application\n\nIn your application you must first configure your uPort object.\n\n```javascript\nimport { Credentials } from 'uport'\n\n// For new ethereum based addresses\nconst credentials = new Credentials({\n  appName: 'App Name',\n  did: 'did:ethr:0x....',\n  privateKey: process.env.PRIVATE_KEY\n})\n\n// You can create a new identity\n\nconsole.log(Credentials.createIdentity())\n\n// For legacy application identity created on App Manager\nconst credentials = new Credentials({\n  appName: 'App Name',\n  address: 'MNID Encoded uPort Address For Your App',\n  privateKey: process.env.PRIVATE_KEY\n})\n\n\n```\n\n## Requesting information from your users\n\nTo request information from your user you create a Selective Disclosure Request JWT and present it to your user in the web browser.\n\nThe most basic request to get a users public uport identity details:\n\n```javascript\ncredentials.requestDisclosure().then(requestToken => {\n  // send requestToken to browser\n})\n```\n\nYou can ask for specific private data like this:\n\n```javascript\ncredentials.requestDisclosure({\n    requested: ['name','phone','identity_no'],\n    callbackUrl: 'https://....' // URL to send the response of the request to\n  }.then(requestToken => {\n  // send requestToken to browser\n  })\n```\n\nIf you need to know the users address on a specific ethereum network, specify it's `network_id` (currently defaults to ropsten `0x3`). In this case be aware that the `address` returned will be the address on the public network (currently ropsten) for the users profile. The requested network address will be in the `networkAddress` field and will be MNID encoded.\n\n```javascript\ncredentials.requestDisclosure({network_id: '0x4'}).then(requestToken => {\n  // send requestToken to browser\n})\n```\n\nBack in your server code you receive the token:\n\n```javascript\ncredentials.authenticate(responseToken).then(profile => {\n  // Store user profile\n})\n```\n\n### Stateless Challenge/Response\n\nTo ensure that the response received was created as a response to your selective disclosure request above, the original request is included in the response from the mobile app.\n\nThe default verification rule is that the issuer of the embedded request must match the clientId in your Credentials object and that the original request has not yet expired.\n\nSome applications that exclusively live in the browser are unable to sign the original request. In those cases the request token verification is ignored.\n\n### Requesting Push notification tokens from your users\n\nAs part of the selective disclosure request you can ask for permission from your users to communicate directly with their app.\n\n```javascript\ncredentials.createRequest({\n  requested:[...],\n  notifications: true\n}).then(requestToken => {\n  // send to browser\n})\n```\n\nPresent it to the user like before. On the server you can receive the push token like this:\n\n```javascript\ncredentials.receive(responseToken).then(profile => {\n  // Store user profile\n  // Store push token securely\n  console.log(profile.pushToken)\n})\n```\n\n## Attesting information about your users\n\nAttesting information about your users helps add real value to your application. Your users will use uport to build up their own digital identity and your business is an important part of this.\n\nIf you're a financial institution you may be able to attest to KYC related information such as national identity numbers. If you're an educational application you may want to attest to your users achievements in a way that they can securely share.\n\n### What are attestations\n\nAttestations are shareable private information that one party can sign about another party. They are designed to be shared privately by you to your users and by them to other users.\n\n### Creating an attestation\n\n```javascript\ncredentials.attest({\n  sub: '0x...', // uport address of user\n  exp: <future timestamp>, // If your information is not permanent make sure to add an expires timestamp\n  claims: {name:'John Smith'}\n}).then(attestation => {\n  // send attestation to user\n})\n```\n\nAs before you will want to send this to your user. You can do this in the browser\n\n```javascript\nconst connect = new uportconnect.Connect('app name')\nconnect.showRequest(attestation) // no response is needed for an attestation\n```\n\nIf you requested a push notification token in the above selective disclosure step you can also send attestations directly to your users app in real time.\n\n```javascript\ncredentials.push(pushToken, `me.uport:add?attestation=${attestationjwt}`, message).then(response => {\n\n})\n```\n\n## Asking users to sign Ethereum transactions\n\nEthereum smart contracts live on the blockchain and at a certain address. The application interface is known as the abi and can be created by the Solidity compiler.\n\nOur Contract class will let you create a javascript object modelling the SmartContract allowing you to create uport uri's that you can send to the user.\n\n```javascript\nimport { Contract } from 'uport'\nconst abi = // import from json or have directly in code\nconst contract = Contract(abi).at(contractAddress)\n// creates a request for the user to call the transfer() function on the smart contract\nconst txRequest = tokenContract.transfer(....)\n```\n\nIn your front end use 'uport-connect' to present it to your user either as a QR code or as a uport-button depending on whether they are on a desktop or mobile browser.\n\n```javascript\nconst connect = new uportconnect.Connect('app name')\nconnect.sendTransaction(txRequest).then(txResponse => {\n  // send response back to server\n})\n```\n\nBack in your server code you receive the `txResponse`. This is a standard ethereum transaction object that you can verify.\n\n","readmeFilename":"README.md","gitHead":"409b75828f2b48a4c0e398f2ce3dfafdd96a29fd","_id":"uport@0.7.0-alpha-minor-11","_npmVersion":"5.3.0","_nodeVersion":"8.4.0","_npmUser":{"name":"zachferland","email":"zachferland@gmail.com"},"dist":{"integrity":"sha512-lVLP9AuwlEdrL0ZhfIyQMJKd/ptrCdx56vALO557YZQ81R+ZyllaLTBHNy+zm6pOSdTNBGz1WW0KFB9Gd5s5Mg==","shasum":"6dc5f59a434fbd0dab913fc8065450148cf047b3","tarball":"https://registry.npmjs.org/uport/-/uport-0.7.0-alpha-minor-11.tgz","fileCount":20,"unpackedSize":934693,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbNTNwCRA9TVsSAnZWagAAJDYP/05uLuJxPMVCq/OqmOPr\ntMHAjGgDVWwC9tjKYd+E91riPh59TQVDmrWOjOw9LKCT5ABrbuK9na8VQefS\nAXPSk15JqDWQXhW1LCaU6UuUHmlpIOutAtvikB0j+GMjTIcND4YrFdIZDGSh\nlRCiq2Ef69heRWpNR5zrVeqLw0Raprmsq4sSoVkmEFI9tmzL5lKey5x1cwB4\nDJGeIjG6xoF7zhBxKsaILdNIXUNmXcEQOj9yg/j6RAnV2xuh8w3D9syS5cxw\nxhPQfICqGZxNuq4SN067Q22pl3YJoYDcbpG/7dIXLwuYNhC12Od+JYhSBibJ\nytwnWnJSw4sJNUiXk3GsfcoGO1Fh3989Jvvg/WPLl1q6pm6aJMhrQ/OBLaN2\n6Zl2GtQhuP5ssJC8SslJqYXVbCw6ONy5VlOf0z34BSUXLI2Oxl4VYSBl8Pfm\nD/0yT8KjfhHe08eNp2cFcrwSmvD0xrfK54lFofTj7l/riCNQGTZ1f/lFhKww\nGwWy9uHZOYoARWpsd0GLvr7+sX99UKs7pVS1K7ZIrl7wNl2dHC3bPfb6wFC7\ndNqhNm8FOkj2YoO18xnwvFr3TaKUGq8x3r79PmXkLYxPbmeKiAxch0hUbMZw\nXguc3LB8sS590mrjIJsOfSCWjjdmBzW4IvKjkR+3MmAKtIHGmgsk7ID1Pfju\n34ma\r\n=083l\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDa9ma1RTA+Y22Sqx9LqKAJdnHjycczSa21LJ0OJa5LDQIgN35jFnHR6/veeIb3js2AXN5b6/gwjDX3mB7b+t4iRqo="}]},"maintainers":[{"email":"levi.strope@gmail.com","name":"localredhead"},{"email":"oed3933@gmail.com","name":"oed"},{"email":"pelleb@gmail.com","name":"pelleb"},{"email":"zachferland@gmail.com","name":"zachferland"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/uport_0.7.0-alpha-minor-11_1530213232817_0.34305423986533823"},"_hasShrinkwrap":false},"0.7.0-alpha-minor-12":{"name":"uport","version":"0.7.0-alpha-minor-12","description":"Library for interacting with uport profiles and attestations","main":"lib/index.js","files":["lib","dist","src","tutorial"],"scripts":{"test":"jest","test:ci":"jest -u --coverage","build:es5":"babel src -d lib","build:browser":"webpack --config webpack.config.js","build":"yarn build:es5 && yarn test:ci && yarn build:browser","build:docs:html":"jsdoc src/* README.md -d docs","build:docs:md":"./node_modules/jsdoc-to-markdown/bin/cli.js src/* > DOCS.md","build:docs":"npm run build:docs:html && npm run build:docs:md","prepublish":"yarn build"},"author":{"name":"Pelle Braendgaard","email":"pelle.braendgaard@consensys.net"},"license":"MIT","dependencies":{"did-jwt":"^0.0.7","did-resolver":"^0.0.4","ethjs-util":"^0.1.3","ethr-did-resolver":"^0.0.7","mnid":"^0.1.1","muport-did-resolver":"^0.1.0","uport-core":"^0.0.43","uport-did-resolver":"^0.0.3","uport-lite":"^1.0.2"},"jest":{"coverageDirectory":"./coverage/","unmockedModulePathPatterns":["<rootDir>/node_modules/nock"],"testEnvironment":"node"},"devDependencies":{"babel-cli":"^6.26.0","babel-core":"^6.26.0","babel-jest":"^22.4.3","babel-loader":"^7.1.4","babel-plugin-syntax-object-rest-spread":"^6.13.0","babel-plugin-transform-es2015-modules-umd":"^6.24.1","babel-plugin-transform-object-rest-spread":"^6.26.0","babel-plugin-transform-runtime":"^6.23.0","babel-polyfill":"^6.22.0","babel-preset-env":"^1.6.1","body-parser":"^1.17.1","express":"^4.15.2","jest":"^22.4.3","jsdoc":"^3.4.3","jsdoc-to-markdown":"^1.3.7","json-loader":"^0.5.4","mockdate":"^2.0.1","webpack":"^4.6.0","webpack-cli":"^2.0.15"},"readme":"# uport-js\n\n## Integrate uPort in your javascript application\n\nuPort provides a simple way for your users to login to your website and provide private credentials such as identity information and contact details to you.\n\nYou can also “attest” credentials they provide to you or that you yourself have about them. This can be shared back to your customers so you can help them build their digital identity.\n\nUport.js provides a simple way for you to integrate uport.js into your javascript application. You can also interact with your uPort users directly in the browser.\n\nWe have an easy to use browser library [uport-connect](https://github.com/uport-project/uport-connect) which can help you do so.\n\n## Setup your uPort application identity\n\nFirst make sure you have your uPort app installed and you've setup your own uPort identity.\n\n### What is a uPort identity?\n\nAn identity in uPort is really just someone or something that can sign data or transactions and also receive signed data about itself.\n\nAn identity has an identifier in the form of an [MNID](https://github.com/uport-project/mnid), a signing key, and a public key stored on the [uPort Registry](https://github.com/uport-project/uport-registry).\n\nAn identity can:\n\n- Sign JWTs (JSON Web Tokens)\n  - [Authenticate themselves to a third party](messages/shareresp.md)\n  - [Disclose private information about themselves](messages/shareresp.md)\n- [Receive requests for disclosure about themselves](messages/sharereq.md)\n- [Receive and store signed third party verifications about themselves](flows/verification.md)\n- [Sign Ethereum transactions](flows/tx.md)\n\nWhen interacting privately with a user you will be interchanging signed JWT([JSON Web Token](https://jwt.io/)). To verify the signature of the JWT you and your users will be fetching your public key from the public profile.\n\nFor details on uPort's underlying architecture, read our [spec repo](https://github.com/uport-project/specs) or check out the [uPort identity contracts] (https://github.com/uport-project/uport-identity).\n\n## Configure your application\n\nIn your application you must first configure your uPort object.\n\n```javascript\nimport { Credentials } from 'uport'\n\n// For new ethereum based addresses\nconst credentials = new Credentials({\n  appName: 'App Name',\n  did: 'did:ethr:0x....',\n  privateKey: process.env.PRIVATE_KEY\n})\n\n// You can create a new identity\n\nconsole.log(Credentials.createIdentity())\n\n// For legacy application identity created on App Manager\nconst credentials = new Credentials({\n  appName: 'App Name',\n  address: 'MNID Encoded uPort Address For Your App',\n  privateKey: process.env.PRIVATE_KEY\n})\n\n\n```\n\n## Requesting information from your users\n\nTo request information from your user you create a Selective Disclosure Request JWT and present it to your user in the web browser.\n\nThe most basic request to get a users public uport identity details:\n\n```javascript\ncredentials.requestDisclosure().then(requestToken => {\n  // send requestToken to browser\n})\n```\n\nYou can ask for specific private data like this:\n\n```javascript\ncredentials.requestDisclosure({\n    requested: ['name','phone','identity_no'],\n    callbackUrl: 'https://....' // URL to send the response of the request to\n  }.then(requestToken => {\n  // send requestToken to browser\n  })\n```\n\nIf you need to know the users address on a specific ethereum network, specify it's `network_id` (currently defaults to ropsten `0x3`). In this case be aware that the `address` returned will be the address on the public network (currently ropsten) for the users profile. The requested network address will be in the `networkAddress` field and will be MNID encoded.\n\n```javascript\ncredentials.requestDisclosure({network_id: '0x4'}).then(requestToken => {\n  // send requestToken to browser\n})\n```\n\nBack in your server code you receive the token:\n\n```javascript\ncredentials.authenticate(responseToken).then(profile => {\n  // Store user profile\n})\n```\n\n### Stateless Challenge/Response\n\nTo ensure that the response received was created as a response to your selective disclosure request above, the original request is included in the response from the mobile app.\n\nThe default verification rule is that the issuer of the embedded request must match the clientId in your Credentials object and that the original request has not yet expired.\n\nSome applications that exclusively live in the browser are unable to sign the original request. In those cases the request token verification is ignored.\n\n### Requesting Push notification tokens from your users\n\nAs part of the selective disclosure request you can ask for permission from your users to communicate directly with their app.\n\n```javascript\ncredentials.createRequest({\n  requested:[...],\n  notifications: true\n}).then(requestToken => {\n  // send to browser\n})\n```\n\nPresent it to the user like before. On the server you can receive the push token like this:\n\n```javascript\ncredentials.receive(responseToken).then(profile => {\n  // Store user profile\n  // Store push token securely\n  console.log(profile.pushToken)\n})\n```\n\n## Attesting information about your users\n\nAttesting information about your users helps add real value to your application. Your users will use uport to build up their own digital identity and your business is an important part of this.\n\nIf you're a financial institution you may be able to attest to KYC related information such as national identity numbers. If you're an educational application you may want to attest to your users achievements in a way that they can securely share.\n\n### What are attestations\n\nAttestations are shareable private information that one party can sign about another party. They are designed to be shared privately by you to your users and by them to other users.\n\n### Creating an attestation\n\n```javascript\ncredentials.attest({\n  sub: '0x...', // uport address of user\n  exp: <future timestamp>, // If your information is not permanent make sure to add an expires timestamp\n  claims: {name:'John Smith'}\n}).then(attestation => {\n  // send attestation to user\n})\n```\n\nAs before you will want to send this to your user. You can do this in the browser\n\n```javascript\nconst connect = new uportconnect.Connect('app name')\nconnect.showRequest(attestation) // no response is needed for an attestation\n```\n\nIf you requested a push notification token in the above selective disclosure step you can also send attestations directly to your users app in real time.\n\n```javascript\ncredentials.push(pushToken, `me.uport:add?attestation=${attestationjwt}`, message).then(response => {\n\n})\n```\n\n## Asking users to sign Ethereum transactions\n\nEthereum smart contracts live on the blockchain and at a certain address. The application interface is known as the abi and can be created by the Solidity compiler.\n\nOur Contract class will let you create a javascript object modelling the SmartContract allowing you to create uport uri's that you can send to the user.\n\n```javascript\nimport { Contract } from 'uport'\nconst abi = // import from json or have directly in code\nconst contract = Contract(abi).at(contractAddress)\n// creates a request for the user to call the transfer() function on the smart contract\nconst txRequest = tokenContract.transfer(....)\n```\n\nIn your front end use 'uport-connect' to present it to your user either as a QR code or as a uport-button depending on whether they are on a desktop or mobile browser.\n\n```javascript\nconst connect = new uportconnect.Connect('app name')\nconnect.sendTransaction(txRequest).then(txResponse => {\n  // send response back to server\n})\n```\n\nBack in your server code you receive the `txResponse`. This is a standard ethereum transaction object that you can verify.\n\n","readmeFilename":"README.md","gitHead":"b599fbf891b6a9075b22f5a81150d6a04c018f8b","_id":"uport@0.7.0-alpha-minor-12","_npmVersion":"5.3.0","_nodeVersion":"8.4.0","_npmUser":{"name":"zachferland","email":"zachferland@gmail.com"},"dist":{"integrity":"sha512-M5uehS8mreLvRgTCj+KKi6LRp3/ClF4+NQWgahtq0koL+9Q/bGbAwIelwV3DJrQQqbfgJ+8p+yUYRA0D8r8mhg==","shasum":"3b12d6c4a5a597279d9b932e0bf02fd27f26e703","tarball":"https://registry.npmjs.org/uport/-/uport-0.7.0-alpha-minor-12.tgz","fileCount":20,"unpackedSize":935925,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbNV+XCRA9TVsSAnZWagAAvocQAKMr8H0T/ennhZayRJxx\nxkaJEWr2bdQE9K/ttty6LNB9Ac+7U8ZQ/wQaZP05zTB/Ag/RqdP6ukkaFR9A\nTZlkdXcjDkeJIT8Tq02fZ/62ZH8cdtQh+Oik0kaNbP5EB6lweUcPUd2PFYJB\nmkET3poGcVCPDov3qHhmZwh10G8AOG94ccrbBbIuflDkR74XsTlPIXziEids\nP0V1W19doCYOkz00ILYfrQALc5rvlP4TRuuYprB6ukKqOTFu4CGjm1hqTLOb\nVX/dsIKC0z6yVZnmfOMjeWp+0ljMJxwuv4wgcwCxUwWTn38vG7oQWEmndlke\nib9kvfd32C9Bde/3Epv9Kq1xf5IBXgM7UPXJjpDccHrAa5+20qSEznImQXod\n/y46cTL+7nMMj0gMMYSXVWtoNCygr/XSJqoq45YPa3POYqJZY8bBav2653Xn\nzfDF7faP1eT2v20hvVlfcukFBmOQzTlIAYS2x5cW2KpNtSqMyv8aToFx6ztP\n4ZEUlGbSBaVTHWIaJc1wErSaCfwbeMQ4wGDrMfoLAhPtEb1XTsMKycBaQAg2\ngnSQs+Se6kMKeG/l9oVEuj1iZHTpHKaP7Xjj1W1/1IZzu7clGVBaVLqInniA\ndNNFdjjzkLi/hkCtuMaRJgm6znYuJQdBeQ30qIUMkzLHZA5NxvglBsjlWCHc\nL4KU\r\n=Gfi4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCWmDNgNo5NGFA8esnDcBf99HoZ1pUk6f29XPlixyELPgIhAPQ/PYxyjp5CACT4AnvCexWAnbbKC9ctCrvp1wrEnHRA"}]},"maintainers":[{"email":"levi.strope@gmail.com","name":"localredhead"},{"email":"oed3933@gmail.com","name":"oed"},{"email":"pelleb@gmail.com","name":"pelleb"},{"email":"zachferland@gmail.com","name":"zachferland"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/uport_0.7.0-alpha-minor-12_1530224535088_0.47911406808433465"},"_hasShrinkwrap":false},"0.7.0-alpha-minor-13":{"name":"uport","version":"0.7.0-alpha-minor-13","description":"Library for interacting with uport profiles and attestations","main":"lib/index.js","files":["lib","dist","src","tutorial"],"scripts":{"test":"jest","test:ci":"jest -u --coverage","build:es5":"babel src -d lib","build:browser":"webpack --config webpack.config.js","build":"yarn build:es5 && yarn test:ci && yarn build:browser","build:docs:html":"jsdoc src/* README.md -d docs","build:docs:md":"./node_modules/jsdoc-to-markdown/bin/cli.js -f src/* --template 'template.hbs' -c js2doc.conf > docs/reference/index.md; echo","build:docs":"npm run build:docs:html && npm run build:docs:md","prepublish":"yarn build"},"author":{"name":"Pelle Braendgaard","email":"pelle.braendgaard@consensys.net"},"license":"MIT","dependencies":{"base64url":"^3.0.0","did-jwt":"^0.0.7","did-resolver":"^0.0.4","ethr-did-resolver":"^0.0.7","ethjs-util":"^0.1.3","jsontokens":"^0.7.6","mnid":"^0.1.1","muport-did-resolver":"^0.1.0","nets":"^3.2.0","tweetnacl":"^1.0.0","tweetnacl-util":"^0.15.0","uport-lite":"^1.0.0","uport-core":"^0.0.43","uport-did-resolver":"^0.0.3"},"jest":{"coverageDirectory":"./coverage/","collectCoverage":true,"unmockedModulePathPatterns":["<rootDir>/node_modules/nock"],"testEnvironment":"node"},"devDependencies":{"babel-cli":"^6.26.0","babel-core":"^6.26.0","babel-jest":"^22.4.3","babel-loader":"^7.1.4","babel-plugin-syntax-object-rest-spread":"^6.13.0","babel-plugin-transform-es2015-modules-umd":"^6.24.1","babel-plugin-transform-object-rest-spread":"^6.26.0","babel-plugin-transform-runtime":"^6.23.0","babel-polyfill":"^6.22.0","babel-preset-env":"^1.6.1","body-parser":"^1.17.1","express":"^4.15.2","jest":"^22.4.3","jsdoc":"^3.4.3","jsdoc-to-markdown":"^1.3.7","json-loader":"^0.5.4","mockdate":"^2.0.1","nock":"^9.0.6","webpack":"^4.6.0","webpack-cli":"^2.0.15"},"readme":"# uport-js\n\n## Integrate uPort in your javascript application\n\nuPort provides a simple way for your users to login to your website and provide private credentials such as identity information and contact details to you.\n\nYou can also “attest” credentials they provide to you or that you yourself have about them. This can be shared back to your customers so you can help them build their digital identity.\n\nUport.js provides a simple way for you to integrate uport.js into your javascript application. You can also interact with your uPort users directly in the browser.\n\nWe have an easy to use browser library [uport-connect](https://github.com/uport-project/uport-connect) which can help you do so.\n\n## Setup your uPort application identity\n\nFirst make sure you have your uPort app installed and you've setup your own uPort identity.\n\n### What is a uPort identity?\n\nAn identity in uPort is really just someone or something that can sign data or transactions and also receive signed data about itself.\n\nAn identity has an identifier in the form of an [MNID](https://github.com/uport-project/mnid), a signing key, and a public key stored on the [uPort Registry](https://github.com/uport-project/uport-registry).\n\nAn identity can:\n\n- Sign JWTs (JSON Web Tokens)\n  - [Authenticate themselves to a third party](messages/shareresp.md)\n  - [Disclose private information about themselves](messages/shareresp.md)\n- [Receive requests for disclosure about themselves](messages/sharereq.md)\n- [Receive and store signed third party verifications about themselves](flows/verification.md)\n- [Sign Ethereum transactions](flows/tx.md)\n\nWhen interacting privately with a user you will be interchanging signed JWT([JSON Web Token](https://jwt.io/)). To verify the signature of the JWT you and your users will be fetching your public key from the public profile.\n\nFor details on uPort's underlying architecture, read our [spec repo](https://github.com/uport-project/specs) or check out the [uPort identity contracts] (https://github.com/uport-project/uport-identity).\n\n## Configure your application\n\nIn your application you must first configure your uPort object.\n\n```javascript\nimport { Credentials, SimpleSigner } from 'uport'\n\nconst signer = SimpleSigner(process.env.PRIVATE_KEY)\nconst credentials = new Credentials({\n  appName: 'App Name',\n  address: 'MNID Encoded uPort Address For Your App',\n  signer: signer,\n  networks: networks\n})\n```\n\nGoing forward all uPort application ID addresses must be [MNID encoded](https://github.com/uport-project/mnid). MNID will encode the network with the address. Use of hex encoded addresses is deprecated. Using a hex encoded address will indicated you are on ropsten using our deprecated registry, if you require this use case then continue to pass a hex encoded address. If you are on ropsten but using our latest registry, pass a MNID encoded address with ropsten.\n\nThe networks object includes a set of networks for which JWTs will be verified over. JWT verification includes an on-chain lookup for the public key mapped to the issuers identity, the MIND encoding of the issuer's address defines the network and registry to use for lookup. If you are interested in verifying JWTs over additional networks, pass in a network configs object, defined as follows:\n\n```javascript\n const networks = { id: '0x2a' :\n                      { registry: '0x5f8e9351dc2d238fb878b6ae43aa740d62fc9758',\n                        rpcUrl: 'https://kovan.infura.io' },\n                   id: ....   : { ... }\n                 }\n```\n\nLook in [uport-lite](https://github.com/uport-project/uport-lite) for the default networks and registries which will be queried for JWT verification.\n\n## Requesting information from your users\n\nTo request information from your user you create a Selective Disclosure Request JWT and present it to your user in the web browser.\n\nThe most basic request to get a users public uport identity details:\n\n```javascript\ncredentials.createRequest().then(requestToken => {\n  // send requestToken to browser\n})\n```\n\nYou can ask for specific private data like this:\n\n```javascript\ncredentials.createRequest({\n    requested: ['name','phone','identity_no'],\n    callbackUrl: 'https://....' // URL to send the response of the request to\n  }).then(requestToken => {\n  // send requestToken to browser\n  })\n```\n\nIf you need to know the users address on a specific ethereum network, specify it's `network_id` (currently defaults to ropsten `0x3`). In this case be aware that the `address` returned will be the address on the public network (currently ropsten) for the users profile. The requested network address will be in the `networkAddress` field and will be MNID encoded.\n\n```javascript\ncredentials.createRequest({network_id: '0x4'}).then(requestToken => {\n  // send requestToken to browser\n})\n```\n\nIn your front end use [uport-connect](https://github.com/uport-project/uport-connect) to present it to your user either as a QR code or as a uport-button depending on whether they are on a desktop or mobile browser.\n\n```javascript\nconst connect = new uportconnect.Connect('app name')\nconnect.showRequest(requestToken).then(response => {\n  // send response back to server\n})\n```\n\nBack in your server code you receive the token:\n\n```javascript\ncredentials.receive(responseToken).then(profile => {\n  // Store user profile\n})\n```\nFor more information about the contents of the profile object see the uport-persona documentation.\n\n### Stateless Challenge/Response\n\nTo ensure that the response received was created as a response to your selective disclosure request above, the original request is included in the response from the mobile app.\n\nThe default verification rule is that the issuer of the embedded request must match the clientId in your Credentials object and that the original request has not yet expired.\n\nSome applications that exclusively live in the browser are unable to sign the original request. In those cases the request token verification is ignored.\n\n### Requesting Push notification tokens from your users\n\nAs part of the selective disclosure request you can ask for permission from your users to communicate directly with their app.\n\n```javascript\ncredentials.createRequest({\n  requested:[...],\n  notifications: true\n}).then(requestToken => {\n  // send to browser\n})\n```\n\nPresent it to the user like before. On the server you can receive the push token like this:\n\n```javascript\ncredentials.receive(responseToken).then(profile => {\n  // Store user profile\n  // Store push token securely\n  console.log(profile.pushToken)\n})\n```\n\n## Attesting information about your users\n\nAttesting information about your users helps add real value to your application. Your users will use uport to build up their own digital identity and your business is an important part of this.\n\nIf you're a financial institution you may be able to attest to KYC related information such as national identity numbers. If you're an educational application you may want to attest to your users achievements in a way that they can securely share.\n\n### What are attestations\n\nAttestations are shareable private information that one party can sign about another party. They are designed to be shared privately by you to your users and by them to other users.\n\n### Creating an attestation\n\n```javascript\ncredentials.attest({\n  sub: '0x...', // uport address of user\n  exp: <future timestamp>, // If your information is not permanent make sure to add an expires timestamp\n  claims: {name:'John Smith'}\n}).then(attestation => {\n  // send attestation to user\n})\n```\n\nAs before you will want to send this to your user. You can do this in the browser\n\n```javascript\nconst connect = new uportconnect.Connect('app name')\nconnect.showRequest(attestation) // no response is needed for an attestation\n```\n\nIf you requested a push notification token in the above selective disclosure step you can also send attestations directly to your users app in real time.\n\n```javascript\ncredentials.push(pushToken, `me.uport:add?attestation=${attestationjwt}`, message).then(response => {\n\n})\n```\n\n## Asking users to sign Ethereum transactions\n\nEthereum smart contracts live on the blockchain and at a certain address. The application interface is known as the abi and can be created by the Solidity compiler.\n\nOur Contract class will let you create a javascript object modelling the SmartContract allowing you to create uport uri's that you can send to the user.\n\n```javascript\nimport { Contract } from 'uport'\nconst abi = // import from json or have directly in code\nconst contract = Contract(abi).at(contractAddress)\n// creates a request for the user to call the transfer() function on the smart contract\nconst txRequest = tokenContract.transfer(....)\n```\n\nIn your front end use 'uport-connect' to present it to your user either as a QR code or as a uport-button depending on whether they are on a desktop or mobile browser.\n\n```javascript\nconst connect = new uportconnect.Connect('app name')\nconnect.sendTransaction(txRequest).then(txResponse => {\n  // send response back to server\n})\n```\n\nBack in your server code you receive the `txResponse`. This is a standard ethereum transaction object that you can verify.\n\n## Creating Custom Signers for integrating with HSM\n\nYou can easily create custom signers that integrates into your existing signing infrastructure.\n\n```javascript\nfunction sign(data, callback) {\n    const signature = '' // send your data to your back end signer and return DER signed data\n    callback(null, signature)\n}\n```\n","readmeFilename":"README.md","gitHead":"71aaf07aea696190a07d11f87df6b0f2e2d545bc","_id":"uport@0.7.0-alpha-minor-13","_npmVersion":"5.3.0","_nodeVersion":"8.4.0","_npmUser":{"name":"zachferland","email":"zachferland@gmail.com"},"dist":{"integrity":"sha512-7ECos0TG12Ub/cCYLbuMoHU4KT10ibJgu7fZLC+wJnaWcFQNKYmZnm+qPeyu+c8u1zp5yNGuFtYlkqONbXqIAg==","shasum":"297d647465e1d75a2478418d2d9c91bfacc9c1b0","tarball":"https://registry.npmjs.org/uport/-/uport-0.7.0-alpha-minor-13.tgz","fileCount":21,"unpackedSize":1048360,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbR5XFCRA9TVsSAnZWagAA/gQP/0HcKCHRg5CmJi0QVnTR\nvOLHqvLuu54CbKnt9mPIdmJsbAEGF9FYXnJKy5PbFFKqfcIi1mYgYQlPvTTe\nsZoeJDARsJBgVLrE5Lvwd/RuByggQKgpOhGxCQz1R3JDSmxjxWyAdtg6waTj\n5XzPDIuxsP+7ne9TzI3A7sQiMx3vhQbru08h6557qPQYKZX2/bnOsMzY+x/E\nHDMbzJfytqxSqLiF/kkaSd+sns3lNj5luxumx6T3EsxZRDdD+8UlA/Xa3ehd\nBWdUoqBrEt9wHIMyHydSYS4wfOAd5QWyc64TI6Sk7bjZKH4ygPIf0OPjjoVR\n/+j5Tk5OvS13WFURQplM2c2jN+qpjIIxpnXhhGHQXlOzw64U8un1mRttY+36\nUXmlun4CDqICV8gQTZ5pG7EPfMpZR6wkGtYqkFVMAe4fVzranCFp1ym0vr6C\n3Bm6qB29IcMX8keG2OE6OTDVW4qOc/8QxNPzgCGw1IGvbDMRl7QT9101P2Bi\ntTNO7/ifgMVWsdl+5fkx9f9JUExCpn0NhcMe6FQtANRqANipUcMYihHCv6s1\nrFfD3JLCN3SowQVIWaPCSDOHsZ+ZdygbQreJe7/a60sj72okoa1bja4HCkxi\nLcY2CLMuPFaf5DEW1AKW/0gs27WWBFRO33zBAS6pEYqF6NmKbZCCU4iEPLxs\nlQ2H\r\n=QRdR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDT2kJI9X5VVY0QKyhbDyOr0TonhsCahvPAppwAqcbKjQIgXM3Pa5CwFzqvHl3w7ATTyTtTXaqgioLhAnpp2YFuNF4="}]},"maintainers":[{"email":"levi.strope@gmail.com","name":"localredhead"},{"email":"oed3933@gmail.com","name":"oed"},{"email":"pelleb@gmail.com","name":"pelleb"},{"email":"zachferland@gmail.com","name":"zachferland"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/uport_0.7.0-alpha-minor-13_1531418052952_0.2180595830515113"},"_hasShrinkwrap":false},"0.7.0-alpha-minor-14":{"name":"uport","version":"0.7.0-alpha-minor-14","description":"Library for interacting with uport profiles and attestations","main":"lib/index.js","files":["lib","dist","src","tutorial"],"scripts":{"test":"jest","test:ci":"jest -u --coverage","build:es5":"babel src -d lib","build:browser":"webpack --config webpack.config.js","build":"yarn build:es5 && yarn test:ci && yarn build:browser","build:docs:html":"jsdoc src/* README.md -d docs","build:docs:md":"./node_modules/jsdoc-to-markdown/bin/cli.js -f src/* --template 'template.hbs' -c js2doc.conf > docs/reference/index.md; echo","build:docs":"npm run build:docs:html && npm run build:docs:md","prepublish":"yarn build"},"author":{"name":"Pelle Braendgaard","email":"pelle.braendgaard@consensys.net"},"license":"MIT","dependencies":{"base64url":"^3.0.0","did-jwt":"^0.0.7","did-resolver":"^0.0.4","ethr-did-resolver":"^0.0.7","ethjs-util":"^0.1.3","jsontokens":"^0.7.6","mnid":"^0.1.1","muport-did-resolver":"^0.1.0","nets":"^3.2.0","tweetnacl":"^1.0.0","tweetnacl-util":"^0.15.0","uport-lite":"^1.0.0","uport-core":"^0.0.43","uport-did-resolver":"^0.0.3"},"jest":{"coverageDirectory":"./coverage/","collectCoverage":true,"unmockedModulePathPatterns":["<rootDir>/node_modules/nock"],"testEnvironment":"node"},"devDependencies":{"babel-cli":"^6.26.0","babel-core":"^6.26.0","babel-jest":"^22.4.3","babel-loader":"^7.1.4","babel-plugin-syntax-object-rest-spread":"^6.13.0","babel-plugin-transform-es2015-modules-umd":"^6.24.1","babel-plugin-transform-object-rest-spread":"^6.26.0","babel-plugin-transform-runtime":"^6.23.0","babel-polyfill":"^6.22.0","babel-preset-env":"^1.6.1","body-parser":"^1.17.1","express":"^4.15.2","jest":"^22.4.3","jsdoc":"^3.4.3","jsdoc-to-markdown":"^1.3.7","json-loader":"^0.5.4","mockdate":"^2.0.1","nock":"^9.0.6","webpack":"^4.6.0","webpack-cli":"^2.0.15"},"readme":"# uport-js\n\n## Integrate uPort in your javascript application\n\nuPort provides a simple way for your users to login to your website and provide private credentials such as identity information and contact details to you.\n\nYou can also “attest” credentials they provide to you or that you yourself have about them. This can be shared back to your customers so you can help them build their digital identity.\n\nUport.js provides a simple way for you to integrate uport.js into your javascript application. You can also interact with your uPort users directly in the browser.\n\nWe have an easy to use browser library [uport-connect](https://github.com/uport-project/uport-connect) which can help you do so.\n\n## Setup your uPort application identity\n\nFirst make sure you have your uPort app installed and you've setup your own uPort identity.\n\n### What is a uPort identity?\n\nAn identity in uPort is really just someone or something that can sign data or transactions and also receive signed data about itself.\n\nAn identity has an identifier in the form of an [MNID](https://github.com/uport-project/mnid), a signing key, and a public key stored on the [uPort Registry](https://github.com/uport-project/uport-registry).\n\nAn identity can:\n\n- Sign JWTs (JSON Web Tokens)\n  - [Authenticate themselves to a third party](messages/shareresp.md)\n  - [Disclose private information about themselves](messages/shareresp.md)\n- [Receive requests for disclosure about themselves](messages/sharereq.md)\n- [Receive and store signed third party verifications about themselves](flows/verification.md)\n- [Sign Ethereum transactions](flows/tx.md)\n\nWhen interacting privately with a user you will be interchanging signed JWT([JSON Web Token](https://jwt.io/)). To verify the signature of the JWT you and your users will be fetching your public key from the public profile.\n\nFor details on uPort's underlying architecture, read our [spec repo](https://github.com/uport-project/specs) or check out the [uPort identity contracts] (https://github.com/uport-project/uport-identity).\n\n## Configure your application\n\nIn your application you must first configure your uPort object.\n\n```javascript\nimport { Credentials, SimpleSigner } from 'uport'\n\nconst signer = SimpleSigner(process.env.PRIVATE_KEY)\nconst credentials = new Credentials({\n  appName: 'App Name',\n  address: 'MNID Encoded uPort Address For Your App',\n  signer: signer,\n  networks: networks\n})\n```\n\nGoing forward all uPort application ID addresses must be [MNID encoded](https://github.com/uport-project/mnid). MNID will encode the network with the address. Use of hex encoded addresses is deprecated. Using a hex encoded address will indicated you are on ropsten using our deprecated registry, if you require this use case then continue to pass a hex encoded address. If you are on ropsten but using our latest registry, pass a MNID encoded address with ropsten.\n\nThe networks object includes a set of networks for which JWTs will be verified over. JWT verification includes an on-chain lookup for the public key mapped to the issuers identity, the MIND encoding of the issuer's address defines the network and registry to use for lookup. If you are interested in verifying JWTs over additional networks, pass in a network configs object, defined as follows:\n\n```javascript\n const networks = { id: '0x2a' :\n                      { registry: '0x5f8e9351dc2d238fb878b6ae43aa740d62fc9758',\n                        rpcUrl: 'https://kovan.infura.io' },\n                   id: ....   : { ... }\n                 }\n```\n\nLook in [uport-lite](https://github.com/uport-project/uport-lite) for the default networks and registries which will be queried for JWT verification.\n\n## Requesting information from your users\n\nTo request information from your user you create a Selective Disclosure Request JWT and present it to your user in the web browser.\n\nThe most basic request to get a users public uport identity details:\n\n```javascript\ncredentials.createRequest().then(requestToken => {\n  // send requestToken to browser\n})\n```\n\nYou can ask for specific private data like this:\n\n```javascript\ncredentials.createRequest({\n    requested: ['name','phone','identity_no'],\n    callbackUrl: 'https://....' // URL to send the response of the request to\n  }).then(requestToken => {\n  // send requestToken to browser\n  })\n```\n\nIf you need to know the users address on a specific ethereum network, specify it's `network_id` (currently defaults to ropsten `0x3`). In this case be aware that the `address` returned will be the address on the public network (currently ropsten) for the users profile. The requested network address will be in the `networkAddress` field and will be MNID encoded.\n\n```javascript\ncredentials.createRequest({network_id: '0x4'}).then(requestToken => {\n  // send requestToken to browser\n})\n```\n\nIn your front end use [uport-connect](https://github.com/uport-project/uport-connect) to present it to your user either as a QR code or as a uport-button depending on whether they are on a desktop or mobile browser.\n\n```javascript\nconst connect = new uportconnect.Connect('app name')\nconnect.showRequest(requestToken).then(response => {\n  // send response back to server\n})\n```\n\nBack in your server code you receive the token:\n\n```javascript\ncredentials.receive(responseToken).then(profile => {\n  // Store user profile\n})\n```\nFor more information about the contents of the profile object see the uport-persona documentation.\n\n### Stateless Challenge/Response\n\nTo ensure that the response received was created as a response to your selective disclosure request above, the original request is included in the response from the mobile app.\n\nThe default verification rule is that the issuer of the embedded request must match the clientId in your Credentials object and that the original request has not yet expired.\n\nSome applications that exclusively live in the browser are unable to sign the original request. In those cases the request token verification is ignored.\n\n### Requesting Push notification tokens from your users\n\nAs part of the selective disclosure request you can ask for permission from your users to communicate directly with their app.\n\n```javascript\ncredentials.createRequest({\n  requested:[...],\n  notifications: true\n}).then(requestToken => {\n  // send to browser\n})\n```\n\nPresent it to the user like before. On the server you can receive the push token like this:\n\n```javascript\ncredentials.receive(responseToken).then(profile => {\n  // Store user profile\n  // Store push token securely\n  console.log(profile.pushToken)\n})\n```\n\n## Attesting information about your users\n\nAttesting information about your users helps add real value to your application. Your users will use uport to build up their own digital identity and your business is an important part of this.\n\nIf you're a financial institution you may be able to attest to KYC related information such as national identity numbers. If you're an educational application you may want to attest to your users achievements in a way that they can securely share.\n\n### What are attestations\n\nAttestations are shareable private information that one party can sign about another party. They are designed to be shared privately by you to your users and by them to other users.\n\n### Creating an attestation\n\n```javascript\ncredentials.attest({\n  sub: '0x...', // uport address of user\n  exp: <future timestamp>, // If your information is not permanent make sure to add an expires timestamp\n  claims: {name:'John Smith'}\n}).then(attestation => {\n  // send attestation to user\n})\n```\n\nAs before you will want to send this to your user. You can do this in the browser\n\n```javascript\nconst connect = new uportconnect.Connect('app name')\nconnect.showRequest(attestation) // no response is needed for an attestation\n```\n\nIf you requested a push notification token in the above selective disclosure step you can also send attestations directly to your users app in real time.\n\n```javascript\ncredentials.push(pushToken, `me.uport:add?attestation=${attestationjwt}`, message).then(response => {\n\n})\n```\n\n## Asking users to sign Ethereum transactions\n\nEthereum smart contracts live on the blockchain and at a certain address. The application interface is known as the abi and can be created by the Solidity compiler.\n\nOur Contract class will let you create a javascript object modelling the SmartContract allowing you to create uport uri's that you can send to the user.\n\n```javascript\nimport { Contract } from 'uport'\nconst abi = // import from json or have directly in code\nconst contract = Contract(abi).at(contractAddress)\n// creates a request for the user to call the transfer() function on the smart contract\nconst txRequest = tokenContract.transfer(....)\n```\n\nIn your front end use 'uport-connect' to present it to your user either as a QR code or as a uport-button depending on whether they are on a desktop or mobile browser.\n\n```javascript\nconst connect = new uportconnect.Connect('app name')\nconnect.sendTransaction(txRequest).then(txResponse => {\n  // send response back to server\n})\n```\n\nBack in your server code you receive the `txResponse`. This is a standard ethereum transaction object that you can verify.\n\n## Creating Custom Signers for integrating with HSM\n\nYou can easily create custom signers that integrates into your existing signing infrastructure.\n\n```javascript\nfunction sign(data, callback) {\n    const signature = '' // send your data to your back end signer and return DER signed data\n    callback(null, signature)\n}\n```\n","readmeFilename":"README.md","gitHead":"b1538394081e5d1b42df47ecded2b78f654e05ca","_id":"uport@0.7.0-alpha-minor-14","_npmVersion":"5.3.0","_nodeVersion":"8.4.0","_npmUser":{"name":"zachferland","email":"zachferland@gmail.com"},"dist":{"integrity":"sha512-vDgpjDQOTclAkkFVq2lgNzrTQq+PLAbN6qE7O8m7BarFPE5OSLsXDSberLdJxEbFOJE7w+iv45/Mo8vFUvh56A==","shasum":"8a5f2cb31e2e825dc20fac1e5731eeab33d7218c","tarball":"https://registry.npmjs.org/uport/-/uport-0.7.0-alpha-minor-14.tgz","fileCount":21,"unpackedSize":1048422,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbT3gQCRA9TVsSAnZWagAAQZ8QAJ9myvdB5imclpjCP3eZ\naAIz3MCiku158GLEYTXHwaCAw6pwtbtuXR3k9tSCFze6kbIo7TVSHQaVtm2L\nr6V5sidiMqwC58TLstsUuMbVXSYjpHeyMQyc2XS137Fi1r0Z4SDa1bDw9K+9\nE+PbB4k8ILDC1tFGH5wKe33wnr64ci7PwoEDyGg4UIQhQu+8hOSmxUzflXA5\nmUGmWgktfWwooHC0CSrvoFY7O2r9P/60zeJuzhisIjWQONoM429JyWvWL8sJ\n9sVwdPo6Gc+UbRdwtKUdjAKVaKsWkbIbc3xxCQ902MsXjCxDc4i321xlMod0\njbzwUKwrWRuOEICIiPt/+gvzuI5bGsv/GFXjsOeNsTLTfkIlOnCGTGoT0ILB\nmiRI3LaMuWCN3wfnTcwWjez+pPQyaXj0KtViKI0/jyZHNRzo5C9c5Wh84Se9\nru1kfi/WFRYG9ZNs8OwNesdd02jpS81UAjow+P6GyGvRvhxwfWms0TJVYsaO\nOV1vUvsDoJg6iY7NY+UxZqzwYLVhZYmrN8BLLoa/xe12ANmidEcB5C++MmXE\nMMgHpV5+N1zwnaRmvwMLxyjtSWhS+oYXshFHtBFWbXlHlBDZ5mBf745K1yR1\nrBbV6JhA0G5kehq+WEBj9sOc3RAeUk9m5HH9umvWefC1ntI/ZX01dQmymaGe\nE/I5\r\n=Xs74\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBjw2GjN61LEOFG6J+NpLN7D7R+LT8kJTJYIHWoRCfC+AiBaiEd7vB8YWFZ8ApzKoxFBP10W4T5NSuYxe0ytDTvXoA=="}]},"maintainers":[{"email":"levi.strope@gmail.com","name":"localredhead"},{"email":"oed3933@gmail.com","name":"oed"},{"email":"pelleb@gmail.com","name":"pelleb"},{"email":"zachferland@gmail.com","name":"zachferland"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/uport_0.7.0-alpha-minor-14_1531934736599_0.18548572938379682"},"_hasShrinkwrap":false},"0.7.0-alpha-minor-15":{"name":"uport","version":"0.7.0-alpha-minor-15","description":"Library for interacting with uport profiles and attestations","main":"lib/index.js","files":["lib","dist","src","tutorial"],"scripts":{"test":"jest","test:ci":"jest -u --coverage","build:es5":"babel src -d lib","build:browser":"webpack --config webpack.config.js","build":"yarn build:es5 && yarn test:ci && yarn build:browser","build:docs:html":"jsdoc src/* README.md -d docs","build:docs:md":"./node_modules/jsdoc-to-markdown/bin/cli.js -f src/* --template 'template.hbs' -c js2doc.conf > docs/reference/index.md; echo","build:docs":"npm run build:docs:html && npm run build:docs:md","prepublish":"yarn build"},"author":{"name":"Pelle Braendgaard","email":"pelle.braendgaard@consensys.net"},"license":"MIT","dependencies":{"base64url":"^3.0.0","did-jwt":"^0.0.7","did-resolver":"^0.0.4","ethr-did-resolver":"^0.0.7","ethjs-util":"^0.1.3","jsontokens":"^0.7.6","mnid":"^0.1.1","muport-did-resolver":"^0.1.0","nets":"^3.2.0","tweetnacl":"^1.0.0","tweetnacl-util":"^0.15.0","uport-lite":"^1.0.0","uport-core":"^0.0.43","uport-did-resolver":"^0.0.3"},"jest":{"coverageDirectory":"./coverage/","collectCoverage":true,"unmockedModulePathPatterns":["<rootDir>/node_modules/nock"],"testEnvironment":"node"},"devDependencies":{"babel-cli":"^6.26.0","babel-core":"^6.26.0","babel-jest":"^22.4.3","babel-loader":"^7.1.4","babel-plugin-syntax-object-rest-spread":"^6.13.0","babel-plugin-transform-es2015-modules-umd":"^6.24.1","babel-plugin-transform-object-rest-spread":"^6.26.0","babel-plugin-transform-runtime":"^6.23.0","babel-polyfill":"^6.22.0","babel-preset-env":"^1.6.1","body-parser":"^1.17.1","express":"^4.15.2","jest":"^22.4.3","jsdoc":"^3.4.3","jsdoc-to-markdown":"^1.3.7","json-loader":"^0.5.4","mockdate":"^2.0.1","nock":"^9.0.6","webpack":"^4.6.0","webpack-cli":"^2.0.15"},"readme":"# uport-js\n\n## Integrate uPort in your javascript application\n\nuPort provides a simple way for your users to login to your website and provide private credentials such as identity information and contact details to you.\n\nYou can also “attest” credentials they provide to you or that you yourself have about them. This can be shared back to your customers so you can help them build their digital identity.\n\nUport.js provides a simple way for you to integrate uport.js into your javascript application. You can also interact with your uPort users directly in the browser.\n\nWe have an easy to use browser library [uport-connect](https://github.com/uport-project/uport-connect) which can help you do so.\n\n## Setup your uPort application identity\n\nFirst make sure you have your uPort app installed and you've setup your own uPort identity.\n\n### What is a uPort identity?\n\nAn identity in uPort is really just someone or something that can sign data or transactions and also receive signed data about itself.\n\nAn identity has an identifier in the form of an [MNID](https://github.com/uport-project/mnid), a signing key, and a public key stored on the [uPort Registry](https://github.com/uport-project/uport-registry).\n\nAn identity can:\n\n- Sign JWTs (JSON Web Tokens)\n  - [Authenticate themselves to a third party](messages/shareresp.md)\n  - [Disclose private information about themselves](messages/shareresp.md)\n- [Receive requests for disclosure about themselves](messages/sharereq.md)\n- [Receive and store signed third party verifications about themselves](flows/verification.md)\n- [Sign Ethereum transactions](flows/tx.md)\n\nWhen interacting privately with a user you will be interchanging signed JWT([JSON Web Token](https://jwt.io/)). To verify the signature of the JWT you and your users will be fetching your public key from the public profile.\n\nFor details on uPort's underlying architecture, read our [spec repo](https://github.com/uport-project/specs) or check out the [uPort identity contracts] (https://github.com/uport-project/uport-identity).\n\n## Configure your application\n\nIn your application you must first configure your uPort object.\n\n```javascript\nimport { Credentials, SimpleSigner } from 'uport'\n\nconst signer = SimpleSigner(process.env.PRIVATE_KEY)\nconst credentials = new Credentials({\n  appName: 'App Name',\n  address: 'MNID Encoded uPort Address For Your App',\n  signer: signer,\n  networks: networks\n})\n```\n\nGoing forward all uPort application ID addresses must be [MNID encoded](https://github.com/uport-project/mnid). MNID will encode the network with the address. Use of hex encoded addresses is deprecated. Using a hex encoded address will indicated you are on ropsten using our deprecated registry, if you require this use case then continue to pass a hex encoded address. If you are on ropsten but using our latest registry, pass a MNID encoded address with ropsten.\n\nThe networks object includes a set of networks for which JWTs will be verified over. JWT verification includes an on-chain lookup for the public key mapped to the issuers identity, the MIND encoding of the issuer's address defines the network and registry to use for lookup. If you are interested in verifying JWTs over additional networks, pass in a network configs object, defined as follows:\n\n```javascript\n const networks = { id: '0x2a' :\n                      { registry: '0x5f8e9351dc2d238fb878b6ae43aa740d62fc9758',\n                        rpcUrl: 'https://kovan.infura.io' },\n                   id: ....   : { ... }\n                 }\n```\n\nLook in [uport-lite](https://github.com/uport-project/uport-lite) for the default networks and registries which will be queried for JWT verification.\n\n## Requesting information from your users\n\nTo request information from your user you create a Selective Disclosure Request JWT and present it to your user in the web browser.\n\nThe most basic request to get a users public uport identity details:\n\n```javascript\ncredentials.createRequest().then(requestToken => {\n  // send requestToken to browser\n})\n```\n\nYou can ask for specific private data like this:\n\n```javascript\ncredentials.createRequest({\n    requested: ['name','phone','identity_no'],\n    callbackUrl: 'https://....' // URL to send the response of the request to\n  }).then(requestToken => {\n  // send requestToken to browser\n  })\n```\n\nIf you need to know the users address on a specific ethereum network, specify it's `network_id` (currently defaults to ropsten `0x3`). In this case be aware that the `address` returned will be the address on the public network (currently ropsten) for the users profile. The requested network address will be in the `networkAddress` field and will be MNID encoded.\n\n```javascript\ncredentials.createRequest({network_id: '0x4'}).then(requestToken => {\n  // send requestToken to browser\n})\n```\n\nIn your front end use [uport-connect](https://github.com/uport-project/uport-connect) to present it to your user either as a QR code or as a uport-button depending on whether they are on a desktop or mobile browser.\n\n```javascript\nconst connect = new uportconnect.Connect('app name')\nconnect.showRequest(requestToken).then(response => {\n  // send response back to server\n})\n```\n\nBack in your server code you receive the token:\n\n```javascript\ncredentials.receive(responseToken).then(profile => {\n  // Store user profile\n})\n```\nFor more information about the contents of the profile object see the uport-persona documentation.\n\n### Stateless Challenge/Response\n\nTo ensure that the response received was created as a response to your selective disclosure request above, the original request is included in the response from the mobile app.\n\nThe default verification rule is that the issuer of the embedded request must match the clientId in your Credentials object and that the original request has not yet expired.\n\nSome applications that exclusively live in the browser are unable to sign the original request. In those cases the request token verification is ignored.\n\n### Requesting Push notification tokens from your users\n\nAs part of the selective disclosure request you can ask for permission from your users to communicate directly with their app.\n\n```javascript\ncredentials.createRequest({\n  requested:[...],\n  notifications: true\n}).then(requestToken => {\n  // send to browser\n})\n```\n\nPresent it to the user like before. On the server you can receive the push token like this:\n\n```javascript\ncredentials.receive(responseToken).then(profile => {\n  // Store user profile\n  // Store push token securely\n  console.log(profile.pushToken)\n})\n```\n\n## Attesting information about your users\n\nAttesting information about your users helps add real value to your application. Your users will use uport to build up their own digital identity and your business is an important part of this.\n\nIf you're a financial institution you may be able to attest to KYC related information such as national identity numbers. If you're an educational application you may want to attest to your users achievements in a way that they can securely share.\n\n### What are attestations\n\nAttestations are shareable private information that one party can sign about another party. They are designed to be shared privately by you to your users and by them to other users.\n\n### Creating an attestation\n\n```javascript\ncredentials.attest({\n  sub: '0x...', // uport address of user\n  exp: <future timestamp>, // If your information is not permanent make sure to add an expires timestamp\n  claims: {name:'John Smith'}\n}).then(attestation => {\n  // send attestation to user\n})\n```\n\nAs before you will want to send this to your user. You can do this in the browser\n\n```javascript\nconst connect = new uportconnect.Connect('app name')\nconnect.showRequest(attestation) // no response is needed for an attestation\n```\n\nIf you requested a push notification token in the above selective disclosure step you can also send attestations directly to your users app in real time.\n\n```javascript\ncredentials.push(pushToken, `me.uport:add?attestation=${attestationjwt}`, message).then(response => {\n\n})\n```\n\n## Asking users to sign Ethereum transactions\n\nEthereum smart contracts live on the blockchain and at a certain address. The application interface is known as the abi and can be created by the Solidity compiler.\n\nOur Contract class will let you create a javascript object modelling the SmartContract allowing you to create uport uri's that you can send to the user.\n\n```javascript\nimport { Contract } from 'uport'\nconst abi = // import from json or have directly in code\nconst contract = Contract(abi).at(contractAddress)\n// creates a request for the user to call the transfer() function on the smart contract\nconst txRequest = tokenContract.transfer(....)\n```\n\nIn your front end use 'uport-connect' to present it to your user either as a QR code or as a uport-button depending on whether they are on a desktop or mobile browser.\n\n```javascript\nconst connect = new uportconnect.Connect('app name')\nconnect.sendTransaction(txRequest).then(txResponse => {\n  // send response back to server\n})\n```\n\nBack in your server code you receive the `txResponse`. This is a standard ethereum transaction object that you can verify.\n\n## Creating Custom Signers for integrating with HSM\n\nYou can easily create custom signers that integrates into your existing signing infrastructure.\n\n```javascript\nfunction sign(data, callback) {\n    const signature = '' // send your data to your back end signer and return DER signed data\n    callback(null, signature)\n}\n```\n","readmeFilename":"README.md","gitHead":"b1538394081e5d1b42df47ecded2b78f654e05ca","_id":"uport@0.7.0-alpha-minor-15","_npmVersion":"5.3.0","_nodeVersion":"8.4.0","_npmUser":{"name":"zachferland","email":"zachferland@gmail.com"},"dist":{"integrity":"sha512-zVaiCzhSjKXpzhnU0EGdozj9HqAilVg7vDFxCBZjHU2SLC/xwcqcLBd1rvliCuC7mVuDin8yRzjz64DgAH6vFw==","shasum":"0ccf3fe66c78ac23a368e749a163867cba4b0060","tarball":"https://registry.npmjs.org/uport/-/uport-0.7.0-alpha-minor-15.tgz","fileCount":21,"unpackedSize":1048307,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbT5oDCRA9TVsSAnZWagAA6WAP/2g4/H9PDHytEnOSEk23\nmFmZHRi5V+2OM8SzCuQG/4jxn6Y1bJy6btJtQWshUa5QMllF5jY4jjapj1bY\nUh0PKd3olV8keeiZOvOhNIHSPvVw5E6y9IO7qP/VdNtw7foOG00w7flGPL9T\nXa8aDhtV5+90+v5GwnLki7NkAYp5fPZ/fHXIujbRSl4gTU6/jai9ERAKHGp1\ngbFELZqk61u2TEr1zvGVXQVZo+UKkVFPiDFnT+MzVaT0emTzxpZ6SR3EOGZx\n4jLWWSxQFHRUpZOO0vXnF/X/lPw9s56edu/E0bPN4D/TjuuzIL7WoQMsNUnI\n5cem6bHeKgyqY6nT5YpvOYdQohkKJLpnHXwaYej9Fp0xI8Wsg5PwF8WF7yMR\nPW3PQyzmS2AO9f0lTmV2TTWFj00Cdlj87r3K5U+J2G4RmYTsPz88SqtkOPF6\nyFDUdMaSZwS9QDjJ0j+egeLaZeKFMDa0pyxmgai4GMc1JmG8R2LawuPOeD8w\nN4F+tERQu2fC3wmEbQcJ4hH2r6Cgg7rBevoflBVeAU/jihMxx5iZdVn+PANQ\nicJpna4m+nxv/t0Zhc2homWD5Ul1QphyCrMR4RP53u4S/QP3g5Ry/NcpX2dJ\noBDTtU3OC85sPzGJny5+nn4N03kI5rmwqStnGBaJaVCdEmWnoMPZN6ueTrcj\naYVI\r\n=Augh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD/k/MHZrJDi+WzP9XDXf6gOYZN8QZ9rvP5d30hv6nPOwIhANBKBCBheuBo/LTF6gXj8V/U8LzBzbNxCH93njn8+wM/"}]},"maintainers":[{"email":"levi.strope@gmail.com","name":"localredhead"},{"email":"oed3933@gmail.com","name":"oed"},{"email":"pelleb@gmail.com","name":"pelleb"},{"email":"zachferland@gmail.com","name":"zachferland"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/uport_0.7.0-alpha-minor-15_1531943427651_0.4829311319691698"},"_hasShrinkwrap":false},"0.7.0-alpha-minor-16":{"name":"uport","version":"0.7.0-alpha-minor-16","description":"Library for interacting with uport profiles and attestations","main":"lib/index.js","files":["lib","dist","src","tutorial"],"scripts":{"test":"jest","test:ci":"jest -u --coverage","build:es5":"babel src -d lib","build:browser":"webpack --config webpack.config.js","build":"yarn build:es5 && yarn test:ci && yarn build:browser","build:docs:html":"jsdoc src/* README.md -d docs","build:docs:md":"./node_modules/jsdoc-to-markdown/bin/cli.js -f src/* --template 'template.hbs' -c js2doc.conf > docs/reference/index.md; echo","build:docs":"npm run build:docs:html && npm run build:docs:md","prepublish":"yarn build"},"author":{"name":"Pelle Braendgaard","email":"pelle.braendgaard@consensys.net"},"license":"MIT","dependencies":{"base64url":"^3.0.0","did-jwt":"^0.0.7","did-resolver":"^0.0.4","ethr-did-resolver":"^0.0.7","ethjs-util":"^0.1.3","jsontokens":"^0.7.6","mnid":"^0.1.1","muport-did-resolver":"^0.1.0","nets":"^3.2.0","tweetnacl":"^1.0.0","tweetnacl-util":"^0.15.0","uport-lite":"^1.0.0","uport-core":"^0.0.43","uport-did-resolver":"^0.0.3"},"jest":{"coverageDirectory":"./coverage/","collectCoverage":true,"unmockedModulePathPatterns":["<rootDir>/node_modules/nock"],"testEnvironment":"node"},"devDependencies":{"babel-cli":"^6.26.0","babel-core":"^6.26.0","babel-jest":"^22.4.3","babel-loader":"^7.1.4","babel-plugin-syntax-object-rest-spread":"^6.13.0","babel-plugin-transform-es2015-modules-umd":"^6.24.1","babel-plugin-transform-object-rest-spread":"^6.26.0","babel-plugin-transform-runtime":"^6.23.0","babel-polyfill":"^6.22.0","babel-preset-env":"^1.6.1","body-parser":"^1.17.1","express":"^4.15.2","jest":"^22.4.3","jsdoc":"^3.4.3","jsdoc-to-markdown":"^1.3.7","json-loader":"^0.5.4","mockdate":"^2.0.1","nock":"^9.0.6","webpack":"^4.6.0","webpack-cli":"^2.0.15"},"readme":"# uport-js\n\n## Integrate uPort in your javascript application\n\nuPort provides a simple way for your users to login to your website and provide private credentials such as identity information and contact details to you.\n\nYou can also “attest” credentials they provide to you or that you yourself have about them. This can be shared back to your customers so you can help them build their digital identity.\n\nUport.js provides a simple way for you to integrate uport.js into your javascript application. You can also interact with your uPort users directly in the browser.\n\nWe have an easy to use browser library [uport-connect](https://github.com/uport-project/uport-connect) which can help you do so.\n\n## Setup your uPort application identity\n\nFirst make sure you have your uPort app installed and you've setup your own uPort identity.\n\n### What is a uPort identity?\n\nAn identity in uPort is really just someone or something that can sign data or transactions and also receive signed data about itself.\n\nAn identity has an identifier in the form of an [MNID](https://github.com/uport-project/mnid), a signing key, and a public key stored on the [uPort Registry](https://github.com/uport-project/uport-registry).\n\nAn identity can:\n\n- Sign JWTs (JSON Web Tokens)\n  - [Authenticate themselves to a third party](messages/shareresp.md)\n  - [Disclose private information about themselves](messages/shareresp.md)\n- [Receive requests for disclosure about themselves](messages/sharereq.md)\n- [Receive and store signed third party verifications about themselves](flows/verification.md)\n- [Sign Ethereum transactions](flows/tx.md)\n\nWhen interacting privately with a user you will be interchanging signed JWT([JSON Web Token](https://jwt.io/)). To verify the signature of the JWT you and your users will be fetching your public key from the public profile.\n\nFor details on uPort's underlying architecture, read our [spec repo](https://github.com/uport-project/specs) or check out the [uPort identity contracts] (https://github.com/uport-project/uport-identity).\n\n## Configure your application\n\nIn your application you must first configure your uPort object.\n\n```javascript\nimport { Credentials, SimpleSigner } from 'uport'\n\nconst signer = SimpleSigner(process.env.PRIVATE_KEY)\nconst credentials = new Credentials({\n  appName: 'App Name',\n  address: 'MNID Encoded uPort Address For Your App',\n  signer: signer,\n  networks: networks\n})\n```\n\nGoing forward all uPort application ID addresses must be [MNID encoded](https://github.com/uport-project/mnid). MNID will encode the network with the address. Use of hex encoded addresses is deprecated. Using a hex encoded address will indicated you are on ropsten using our deprecated registry, if you require this use case then continue to pass a hex encoded address. If you are on ropsten but using our latest registry, pass a MNID encoded address with ropsten.\n\nThe networks object includes a set of networks for which JWTs will be verified over. JWT verification includes an on-chain lookup for the public key mapped to the issuers identity, the MIND encoding of the issuer's address defines the network and registry to use for lookup. If you are interested in verifying JWTs over additional networks, pass in a network configs object, defined as follows:\n\n```javascript\n const networks = { id: '0x2a' :\n                      { registry: '0x5f8e9351dc2d238fb878b6ae43aa740d62fc9758',\n                        rpcUrl: 'https://kovan.infura.io' },\n                   id: ....   : { ... }\n                 }\n```\n\nLook in [uport-lite](https://github.com/uport-project/uport-lite) for the default networks and registries which will be queried for JWT verification.\n\n## Requesting information from your users\n\nTo request information from your user you create a Selective Disclosure Request JWT and present it to your user in the web browser.\n\nThe most basic request to get a users public uport identity details:\n\n```javascript\ncredentials.createRequest().then(requestToken => {\n  // send requestToken to browser\n})\n```\n\nYou can ask for specific private data like this:\n\n```javascript\ncredentials.createRequest({\n    requested: ['name','phone','identity_no'],\n    callbackUrl: 'https://....' // URL to send the response of the request to\n  }).then(requestToken => {\n  // send requestToken to browser\n  })\n```\n\nIf you need to know the users address on a specific ethereum network, specify it's `network_id` (currently defaults to ropsten `0x3`). In this case be aware that the `address` returned will be the address on the public network (currently ropsten) for the users profile. The requested network address will be in the `networkAddress` field and will be MNID encoded.\n\n```javascript\ncredentials.createRequest({network_id: '0x4'}).then(requestToken => {\n  // send requestToken to browser\n})\n```\n\nIn your front end use [uport-connect](https://github.com/uport-project/uport-connect) to present it to your user either as a QR code or as a uport-button depending on whether they are on a desktop or mobile browser.\n\n```javascript\nconst connect = new uportconnect.Connect('app name')\nconnect.showRequest(requestToken).then(response => {\n  // send response back to server\n})\n```\n\nBack in your server code you receive the token:\n\n```javascript\ncredentials.receive(responseToken).then(profile => {\n  // Store user profile\n})\n```\nFor more information about the contents of the profile object see the uport-persona documentation.\n\n### Stateless Challenge/Response\n\nTo ensure that the response received was created as a response to your selective disclosure request above, the original request is included in the response from the mobile app.\n\nThe default verification rule is that the issuer of the embedded request must match the clientId in your Credentials object and that the original request has not yet expired.\n\nSome applications that exclusively live in the browser are unable to sign the original request. In those cases the request token verification is ignored.\n\n### Requesting Push notification tokens from your users\n\nAs part of the selective disclosure request you can ask for permission from your users to communicate directly with their app.\n\n```javascript\ncredentials.createRequest({\n  requested:[...],\n  notifications: true\n}).then(requestToken => {\n  // send to browser\n})\n```\n\nPresent it to the user like before. On the server you can receive the push token like this:\n\n```javascript\ncredentials.receive(responseToken).then(profile => {\n  // Store user profile\n  // Store push token securely\n  console.log(profile.pushToken)\n})\n```\n\n## Attesting information about your users\n\nAttesting information about your users helps add real value to your application. Your users will use uport to build up their own digital identity and your business is an important part of this.\n\nIf you're a financial institution you may be able to attest to KYC related information such as national identity numbers. If you're an educational application you may want to attest to your users achievements in a way that they can securely share.\n\n### What are attestations\n\nAttestations are shareable private information that one party can sign about another party. They are designed to be shared privately by you to your users and by them to other users.\n\n### Creating an attestation\n\n```javascript\ncredentials.attest({\n  sub: '0x...', // uport address of user\n  exp: <future timestamp>, // If your information is not permanent make sure to add an expires timestamp\n  claims: {name:'John Smith'}\n}).then(attestation => {\n  // send attestation to user\n})\n```\n\nAs before you will want to send this to your user. You can do this in the browser\n\n```javascript\nconst connect = new uportconnect.Connect('app name')\nconnect.showRequest(attestation) // no response is needed for an attestation\n```\n\nIf you requested a push notification token in the above selective disclosure step you can also send attestations directly to your users app in real time.\n\n```javascript\ncredentials.push(pushToken, `me.uport:add?attestation=${attestationjwt}`, message).then(response => {\n\n})\n```\n\n## Asking users to sign Ethereum transactions\n\nEthereum smart contracts live on the blockchain and at a certain address. The application interface is known as the abi and can be created by the Solidity compiler.\n\nOur Contract class will let you create a javascript object modelling the SmartContract allowing you to create uport uri's that you can send to the user.\n\n```javascript\nimport { Contract } from 'uport'\nconst abi = // import from json or have directly in code\nconst contract = Contract(abi).at(contractAddress)\n// creates a request for the user to call the transfer() function on the smart contract\nconst txRequest = tokenContract.transfer(....)\n```\n\nIn your front end use 'uport-connect' to present it to your user either as a QR code or as a uport-button depending on whether they are on a desktop or mobile browser.\n\n```javascript\nconst connect = new uportconnect.Connect('app name')\nconnect.sendTransaction(txRequest).then(txResponse => {\n  // send response back to server\n})\n```\n\nBack in your server code you receive the `txResponse`. This is a standard ethereum transaction object that you can verify.\n\n## Creating Custom Signers for integrating with HSM\n\nYou can easily create custom signers that integrates into your existing signing infrastructure.\n\n```javascript\nfunction sign(data, callback) {\n    const signature = '' // send your data to your back end signer and return DER signed data\n    callback(null, signature)\n}\n```\n","readmeFilename":"README.md","gitHead":"78316a68284b4e826d8e286a0efd6f8d44702372","_id":"uport@0.7.0-alpha-minor-16","_npmVersion":"5.3.0","_nodeVersion":"8.4.0","_npmUser":{"name":"zachferland","email":"zachferland@gmail.com"},"dist":{"integrity":"sha512-ABV3hafKN4RznPtGvoeXz06QNfL3o/t3qqBd0WRQb8LLa7fk6r3fIgn7b2MmCo1s7Nqn11pJFR1y9eqFGAQAbQ==","shasum":"474483ae080fb72dcecb439d638743b903367393","tarball":"https://registry.npmjs.org/uport/-/uport-0.7.0-alpha-minor-16.tgz","fileCount":21,"unpackedSize":1047696,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbUQXkCRA9TVsSAnZWagAAOUkP+wcPXgQ6Ed3vOEIZPTws\nbdBILFUNIAyJy9evwLR/OfeWP//ggy1nKECJU0HhWLoqpYFFN9ERlY4jQYSg\nGF+1uxLy23mPEAsggL6dmM2ITQ+ySbd6vSBDEIPLPFlD2/hGvOUHwSWKY/SN\nkHK1KlmXZpinOijKShweRIORJiVKB6eH1MoVaX0GZTA+twW4onFfKVhrTGL1\niL1RobaNgDyqncheFoxTtZgQvGd82IF/7rxoWwIJnZd5jb3Y/iRPwUjPRZaD\nOOvBnZH1GvhMqW0H6Lfu+S9aQv1LLlUvfQ/QQDZd3I73nBJ6gpPqnMGaR687\njQ6iD8MzToZrdpZea3kkDI1tUaHBSztoBpzGHlMDL51/ciEVXfhBLCFnk4Yk\nir+8R7xtxzt/gK17E3I11V1fXzgDwAug14gdSKWALj5qzyc6W77atk0HUlc2\n84kea4h8EPIFCoB/GZItHVGoat37+69umJ2/wB6bjwHgiHIMaN9bZVLmyWkP\nLWu2caDXt65sfGqUjjRS+G9fDPUgbHqbilLgsjfQuHoPvHUd5iByDMkyKVQA\nxWoGctFf+/UQdA+kPHquOeK1AchqsoiZOZzMCbSoN1nPJiqErracmIOfDRfS\nvFerdqPGd2YgG349JY93e7v/uIr/0h6q9z04NISFo81MDSG9TRVaJ7TqCGo7\nq0Sk\r\n=w+X4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCXFmJ4vd/4CV21ezWz9NdhLYpduIGnRH3bmwgv83DstgIhANZtvIRbZeL5Y+TV+GwSekLfjnpFOey18lAIYpd6Urde"}]},"maintainers":[{"email":"levi.strope@gmail.com","name":"localredhead"},{"email":"oed3933@gmail.com","name":"oed"},{"email":"pelleb@gmail.com","name":"pelleb"},{"email":"zachferland@gmail.com","name":"zachferland"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/uport_0.7.0-alpha-minor-16_1532036580354_0.6150667254685962"},"_hasShrinkwrap":false},"0.7.0-alpha-minor-17":{"name":"uport","version":"0.7.0-alpha-minor-17","description":"Library for interacting with uport profiles and attestations","main":"lib/index.js","files":["lib","dist","src","tutorial"],"scripts":{"test":"jest","test:ci":"jest -u --coverage","build:es5":"babel src -d lib","build:browser":"webpack --config webpack.config.js","build":"yarn build:es5 && yarn test:ci && yarn build:browser","build:docs:html":"jsdoc src/* README.md -d docs","build:docs:md":"./node_modules/jsdoc-to-markdown/bin/cli.js -f src/* --template 'template.hbs' -c js2doc.conf > docs/reference/index.md; echo","build:docs":"npm run build:docs:html && npm run build:docs:md","prepublish":"yarn build"},"author":{"name":"Pelle Braendgaard","email":"pelle.braendgaard@consensys.net"},"license":"MIT","dependencies":{"base64url":"^3.0.0","did-jwt":"^0.0.7","did-resolver":"^0.0.4","ethr-did-resolver":"^0.0.7","ethjs-util":"^0.1.3","jsontokens":"^0.7.6","mnid":"^0.1.1","muport-did-resolver":"^0.1.0","nets":"^3.2.0","tweetnacl":"^1.0.0","tweetnacl-util":"^0.15.0","uport-lite":"^1.0.0","uport-core":"^0.0.43","uport-did-resolver":"^0.0.3"},"jest":{"coverageDirectory":"./coverage/","collectCoverage":true,"unmockedModulePathPatterns":["<rootDir>/node_modules/nock"],"testEnvironment":"node"},"devDependencies":{"babel-cli":"^6.26.0","babel-core":"^6.26.0","babel-jest":"^22.4.3","babel-loader":"^7.1.4","babel-plugin-syntax-object-rest-spread":"^6.13.0","babel-plugin-transform-es2015-modules-umd":"^6.24.1","babel-plugin-transform-object-rest-spread":"^6.26.0","babel-plugin-transform-runtime":"^6.23.0","babel-polyfill":"^6.22.0","babel-preset-env":"^1.6.1","body-parser":"^1.17.1","express":"^4.15.2","jest":"^22.4.3","jsdoc":"^3.4.3","jsdoc-to-markdown":"^1.3.7","json-loader":"^0.5.4","mockdate":"^2.0.1","nock":"^9.0.6","webpack":"^4.6.0","webpack-cli":"^2.0.15"},"readme":"# uport-js\n\n## Integrate uPort in your javascript application\n\nuPort provides a simple way for your users to login to your website and provide private credentials such as identity information and contact details to you.\n\nYou can also “attest” credentials they provide to you or that you yourself have about them. This can be shared back to your customers so you can help them build their digital identity.\n\nUport.js provides a simple way for you to integrate uport.js into your javascript application. You can also interact with your uPort users directly in the browser.\n\nWe have an easy to use browser library [uport-connect](https://github.com/uport-project/uport-connect) which can help you do so.\n\n## Setup your uPort application identity\n\nFirst make sure you have your uPort app installed and you've setup your own uPort identity.\n\n### What is a uPort identity?\n\nAn identity in uPort is really just someone or something that can sign data or transactions and also receive signed data about itself.\n\nAn identity has an identifier in the form of an [MNID](https://github.com/uport-project/mnid), a signing key, and a public key stored on the [uPort Registry](https://github.com/uport-project/uport-registry).\n\nAn identity can:\n\n- Sign JWTs (JSON Web Tokens)\n  - [Authenticate themselves to a third party](messages/shareresp.md)\n  - [Disclose private information about themselves](messages/shareresp.md)\n- [Receive requests for disclosure about themselves](messages/sharereq.md)\n- [Receive and store signed third party verifications about themselves](flows/verification.md)\n- [Sign Ethereum transactions](flows/tx.md)\n\nWhen interacting privately with a user you will be interchanging signed JWT([JSON Web Token](https://jwt.io/)). To verify the signature of the JWT you and your users will be fetching your public key from the public profile.\n\nFor details on uPort's underlying architecture, read our [spec repo](https://github.com/uport-project/specs) or check out the [uPort identity contracts] (https://github.com/uport-project/uport-identity).\n\n## Configure your application\n\nIn your application you must first configure your uPort object.\n\n```javascript\nimport { Credentials, SimpleSigner } from 'uport'\n\nconst signer = SimpleSigner(process.env.PRIVATE_KEY)\nconst credentials = new Credentials({\n  appName: 'App Name',\n  address: 'MNID Encoded uPort Address For Your App',\n  signer: signer,\n  networks: networks\n})\n```\n\nGoing forward all uPort application ID addresses must be [MNID encoded](https://github.com/uport-project/mnid). MNID will encode the network with the address. Use of hex encoded addresses is deprecated. Using a hex encoded address will indicated you are on ropsten using our deprecated registry, if you require this use case then continue to pass a hex encoded address. If you are on ropsten but using our latest registry, pass a MNID encoded address with ropsten.\n\nThe networks object includes a set of networks for which JWTs will be verified over. JWT verification includes an on-chain lookup for the public key mapped to the issuers identity, the MIND encoding of the issuer's address defines the network and registry to use for lookup. If you are interested in verifying JWTs over additional networks, pass in a network configs object, defined as follows:\n\n```javascript\n const networks = { id: '0x2a' :\n                      { registry: '0x5f8e9351dc2d238fb878b6ae43aa740d62fc9758',\n                        rpcUrl: 'https://kovan.infura.io' },\n                   id: ....   : { ... }\n                 }\n```\n\nLook in [uport-lite](https://github.com/uport-project/uport-lite) for the default networks and registries which will be queried for JWT verification.\n\n## Requesting information from your users\n\nTo request information from your user you create a Selective Disclosure Request JWT and present it to your user in the web browser.\n\nThe most basic request to get a users public uport identity details:\n\n```javascript\ncredentials.createRequest().then(requestToken => {\n  // send requestToken to browser\n})\n```\n\nYou can ask for specific private data like this:\n\n```javascript\ncredentials.createRequest({\n    requested: ['name','phone','identity_no'],\n    callbackUrl: 'https://....' // URL to send the response of the request to\n  }).then(requestToken => {\n  // send requestToken to browser\n  })\n```\n\nIf you need to know the users address on a specific ethereum network, specify it's `network_id` (currently defaults to ropsten `0x3`). In this case be aware that the `address` returned will be the address on the public network (currently ropsten) for the users profile. The requested network address will be in the `networkAddress` field and will be MNID encoded.\n\n```javascript\ncredentials.createRequest({network_id: '0x4'}).then(requestToken => {\n  // send requestToken to browser\n})\n```\n\nIn your front end use [uport-connect](https://github.com/uport-project/uport-connect) to present it to your user either as a QR code or as a uport-button depending on whether they are on a desktop or mobile browser.\n\n```javascript\nconst connect = new uportconnect.Connect('app name')\nconnect.showRequest(requestToken).then(response => {\n  // send response back to server\n})\n```\n\nBack in your server code you receive the token:\n\n```javascript\ncredentials.receive(responseToken).then(profile => {\n  // Store user profile\n})\n```\nFor more information about the contents of the profile object see the uport-persona documentation.\n\n### Stateless Challenge/Response\n\nTo ensure that the response received was created as a response to your selective disclosure request above, the original request is included in the response from the mobile app.\n\nThe default verification rule is that the issuer of the embedded request must match the clientId in your Credentials object and that the original request has not yet expired.\n\nSome applications that exclusively live in the browser are unable to sign the original request. In those cases the request token verification is ignored.\n\n### Requesting Push notification tokens from your users\n\nAs part of the selective disclosure request you can ask for permission from your users to communicate directly with their app.\n\n```javascript\ncredentials.createRequest({\n  requested:[...],\n  notifications: true\n}).then(requestToken => {\n  // send to browser\n})\n```\n\nPresent it to the user like before. On the server you can receive the push token like this:\n\n```javascript\ncredentials.receive(responseToken).then(profile => {\n  // Store user profile\n  // Store push token securely\n  console.log(profile.pushToken)\n})\n```\n\n## Attesting information about your users\n\nAttesting information about your users helps add real value to your application. Your users will use uport to build up their own digital identity and your business is an important part of this.\n\nIf you're a financial institution you may be able to attest to KYC related information such as national identity numbers. If you're an educational application you may want to attest to your users achievements in a way that they can securely share.\n\n### What are attestations\n\nAttestations are shareable private information that one party can sign about another party. They are designed to be shared privately by you to your users and by them to other users.\n\n### Creating an attestation\n\n```javascript\ncredentials.attest({\n  sub: '0x...', // uport address of user\n  exp: <future timestamp>, // If your information is not permanent make sure to add an expires timestamp\n  claims: {name:'John Smith'}\n}).then(attestation => {\n  // send attestation to user\n})\n```\n\nAs before you will want to send this to your user. You can do this in the browser\n\n```javascript\nconst connect = new uportconnect.Connect('app name')\nconnect.showRequest(attestation) // no response is needed for an attestation\n```\n\nIf you requested a push notification token in the above selective disclosure step you can also send attestations directly to your users app in real time.\n\n```javascript\ncredentials.push(pushToken, `me.uport:add?attestation=${attestationjwt}`, message).then(response => {\n\n})\n```\n\n## Asking users to sign Ethereum transactions\n\nEthereum smart contracts live on the blockchain and at a certain address. The application interface is known as the abi and can be created by the Solidity compiler.\n\nOur Contract class will let you create a javascript object modelling the SmartContract allowing you to create uport uri's that you can send to the user.\n\n```javascript\nimport { Contract } from 'uport'\nconst abi = // import from json or have directly in code\nconst contract = Contract(abi).at(contractAddress)\n// creates a request for the user to call the transfer() function on the smart contract\nconst txRequest = tokenContract.transfer(....)\n```\n\nIn your front end use 'uport-connect' to present it to your user either as a QR code or as a uport-button depending on whether they are on a desktop or mobile browser.\n\n```javascript\nconst connect = new uportconnect.Connect('app name')\nconnect.sendTransaction(txRequest).then(txResponse => {\n  // send response back to server\n})\n```\n\nBack in your server code you receive the `txResponse`. This is a standard ethereum transaction object that you can verify.\n\n## Creating Custom Signers for integrating with HSM\n\nYou can easily create custom signers that integrates into your existing signing infrastructure.\n\n```javascript\nfunction sign(data, callback) {\n    const signature = '' // send your data to your back end signer and return DER signed data\n    callback(null, signature)\n}\n```\n","readmeFilename":"README.md","gitHead":"78316a68284b4e826d8e286a0efd6f8d44702372","_id":"uport@0.7.0-alpha-minor-17","_npmVersion":"5.3.0","_nodeVersion":"8.4.0","_npmUser":{"name":"zachferland","email":"zachferland@gmail.com"},"dist":{"integrity":"sha512-7F9SbUFTkiNdwRO0NcXZoUyyYVYLlOofPm5nQ5UzA4DDhL4nEJf0DFfxapwJzQQh9PnrWLbw4yNltzhs/5J0VQ==","shasum":"dda9c070345073dc5d3cf8a96c56842300b2cbb4","tarball":"https://registry.npmjs.org/uport/-/uport-0.7.0-alpha-minor-17.tgz","fileCount":21,"unpackedSize":1048038,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbUdxPCRA9TVsSAnZWagAAsj4P/i9RCj/99V4HpyEiqf41\nC3d4xZYlTWuJvkz9raPsAzSmTuZrGK8rvFcX2EGzVDJIMtwmxIqWYoRI9hgP\np1lt731khW1abbSpIIJ7fol72G3BvOVnHAHxdPKlwV0okR9EpezBo0ImlhbK\nmNwNINT6ARnqnk3MWuGMrCvN+VXJ4phDzi2mO4ylONJgRhIhcPJceQ8waTBY\nvJ2gz0v9zEmyMrIZ4+YXLxt7UmOQwpoXundshFH7NrtW28ziB1SIW71YM16q\nMmBiKKoPWOoXQ1L8ZG3AhU4qObf9PMS8LjPc+JI7TFKMy2WbGj7o2IwaG+7I\n7T6p3n6ScxjwoJyRAyhHQF//wkpWcdplFAzPnF4ytGU9qCp9J9KFAGzmb7F+\nynLtitwUGp/voKvtGNkeIrj3nqwhQUnn4hi30MGjgW3cwLHsH9cAVnECHJG1\nxhdHx6t2JrEuvg3LixaUH4hKgOwCwHRSorOX9BdG8pR1CsnpWxryIIrk+z3/\n9kvNzYXndbQoEtgTl0MDH5XbNVAMt26CTJBqecjQwt6zY09kOh2+LyHeKmKt\nZB1Poee4wtlAJVazII5QwM3RoYgvSu0GUwqUOSjs4nVZDVbI5lGIjl37/t+n\nuy+vImyrT6xAvd55Y1poWHXSHgYVmYt4AdBVMZiB+CR/iST0a/NqwGsd/XUI\nCR1p\r\n=rbWi\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDfT+2vnn8adqFwtXS4UvyL3CbVlamzLOLSDa9EW1zUTwIgXT++264JVkfeg/9ug9OY8aPIoH/D1pmdFwM5yeKR8lY="}]},"maintainers":[{"email":"levi.strope@gmail.com","name":"localredhead"},{"email":"oed3933@gmail.com","name":"oed"},{"email":"pelleb@gmail.com","name":"pelleb"},{"email":"zachferland@gmail.com","name":"zachferland"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/uport_0.7.0-alpha-minor-17_1532091471623_0.3114241744357398"},"_hasShrinkwrap":false},"0.7.0-alpha-minor-18":{"name":"uport","version":"0.7.0-alpha-minor-18","description":"Library for interacting with uport profiles and attestations","main":"lib/index.js","files":["lib","dist","src","tutorial"],"scripts":{"test":"jest","test:ci":"jest -u --coverage","build:es5":"babel src -d lib","build:browser":"webpack --config webpack.config.js","build":"yarn build:es5 && yarn test:ci && yarn build:browser","build:docs:html":"jsdoc src/* README.md -d docs","build:docs:md":"./node_modules/jsdoc-to-markdown/bin/cli.js -f src/* --template 'template.hbs' -c js2doc.conf > docs/reference/index.md; echo","build:docs":"npm run build:docs:html && npm run build:docs:md","prepublish":"yarn build"},"author":{"name":"Pelle Braendgaard","email":"pelle.braendgaard@consensys.net"},"license":"MIT","dependencies":{"base64url":"^3.0.0","did-jwt":"^0.0.7","did-resolver":"^0.0.4","ethr-did-resolver":"^0.0.7","ethjs-util":"^0.1.3","jsontokens":"^0.7.6","mnid":"^0.1.1","muport-did-resolver":"^0.1.0","nets":"^3.2.0","tweetnacl":"^1.0.0","tweetnacl-util":"^0.15.0","uport-lite":"^1.0.0","uport-core":"^0.0.43","uport-did-resolver":"^0.0.3"},"jest":{"coverageDirectory":"./coverage/","collectCoverage":true,"unmockedModulePathPatterns":["<rootDir>/node_modules/nock"],"testEnvironment":"node"},"devDependencies":{"babel-cli":"^6.26.0","babel-core":"^6.26.0","babel-jest":"^22.4.3","babel-loader":"^7.1.4","babel-plugin-syntax-object-rest-spread":"^6.13.0","babel-plugin-transform-es2015-modules-umd":"^6.24.1","babel-plugin-transform-object-rest-spread":"^6.26.0","babel-plugin-transform-runtime":"^6.23.0","babel-polyfill":"^6.22.0","babel-preset-env":"^1.6.1","body-parser":"^1.17.1","express":"^4.15.2","jest":"^22.4.3","jsdoc":"^3.4.3","jsdoc-to-markdown":"^1.3.7","json-loader":"^0.5.4","mockdate":"^2.0.1","nock":"^9.0.6","webpack":"^4.6.0","webpack-cli":"^2.0.15"},"readme":"# uport-js\n\n## Integrate uPort in your javascript application\n\nuPort provides a simple way for your users to login to your website and provide private credentials such as identity information and contact details to you.\n\nYou can also “attest” credentials they provide to you or that you yourself have about them. This can be shared back to your customers so you can help them build their digital identity.\n\nUport.js provides a simple way for you to integrate uport.js into your javascript application. You can also interact with your uPort users directly in the browser.\n\nWe have an easy to use browser library [uport-connect](https://github.com/uport-project/uport-connect) which can help you do so.\n\n## Setup your uPort application identity\n\nFirst make sure you have your uPort app installed and you've setup your own uPort identity.\n\n### What is a uPort identity?\n\nAn identity in uPort is really just someone or something that can sign data or transactions and also receive signed data about itself.\n\nAn identity has an identifier in the form of an [MNID](https://github.com/uport-project/mnid), a signing key, and a public key stored on the [uPort Registry](https://github.com/uport-project/uport-registry).\n\nAn identity can:\n\n- Sign JWTs (JSON Web Tokens)\n  - [Authenticate themselves to a third party](messages/shareresp.md)\n  - [Disclose private information about themselves](messages/shareresp.md)\n- [Receive requests for disclosure about themselves](messages/sharereq.md)\n- [Receive and store signed third party verifications about themselves](flows/verification.md)\n- [Sign Ethereum transactions](flows/tx.md)\n\nWhen interacting privately with a user you will be interchanging signed JWT([JSON Web Token](https://jwt.io/)). To verify the signature of the JWT you and your users will be fetching your public key from the public profile.\n\nFor details on uPort's underlying architecture, read our [spec repo](https://github.com/uport-project/specs) or check out the [uPort identity contracts] (https://github.com/uport-project/uport-identity).\n\n## Configure your application\n\nIn your application you must first configure your uPort object.\n\n```javascript\nimport { Credentials, SimpleSigner } from 'uport'\n\nconst signer = SimpleSigner(process.env.PRIVATE_KEY)\nconst credentials = new Credentials({\n  appName: 'App Name',\n  address: 'MNID Encoded uPort Address For Your App',\n  signer: signer,\n  networks: networks\n})\n```\n\nGoing forward all uPort application ID addresses must be [MNID encoded](https://github.com/uport-project/mnid). MNID will encode the network with the address. Use of hex encoded addresses is deprecated. Using a hex encoded address will indicated you are on ropsten using our deprecated registry, if you require this use case then continue to pass a hex encoded address. If you are on ropsten but using our latest registry, pass a MNID encoded address with ropsten.\n\nThe networks object includes a set of networks for which JWTs will be verified over. JWT verification includes an on-chain lookup for the public key mapped to the issuers identity, the MIND encoding of the issuer's address defines the network and registry to use for lookup. If you are interested in verifying JWTs over additional networks, pass in a network configs object, defined as follows:\n\n```javascript\n const networks = { id: '0x2a' :\n                      { registry: '0x5f8e9351dc2d238fb878b6ae43aa740d62fc9758',\n                        rpcUrl: 'https://kovan.infura.io' },\n                   id: ....   : { ... }\n                 }\n```\n\nLook in [uport-lite](https://github.com/uport-project/uport-lite) for the default networks and registries which will be queried for JWT verification.\n\n## Requesting information from your users\n\nTo request information from your user you create a Selective Disclosure Request JWT and present it to your user in the web browser.\n\nThe most basic request to get a users public uport identity details:\n\n```javascript\ncredentials.createRequest().then(requestToken => {\n  // send requestToken to browser\n})\n```\n\nYou can ask for specific private data like this:\n\n```javascript\ncredentials.createRequest({\n    requested: ['name','phone','identity_no'],\n    callbackUrl: 'https://....' // URL to send the response of the request to\n  }).then(requestToken => {\n  // send requestToken to browser\n  })\n```\n\nIf you need to know the users address on a specific ethereum network, specify it's `network_id` (currently defaults to ropsten `0x3`). In this case be aware that the `address` returned will be the address on the public network (currently ropsten) for the users profile. The requested network address will be in the `networkAddress` field and will be MNID encoded.\n\n```javascript\ncredentials.createRequest({network_id: '0x4'}).then(requestToken => {\n  // send requestToken to browser\n})\n```\n\nIn your front end use [uport-connect](https://github.com/uport-project/uport-connect) to present it to your user either as a QR code or as a uport-button depending on whether they are on a desktop or mobile browser.\n\n```javascript\nconst connect = new uportconnect.Connect('app name')\nconnect.showRequest(requestToken).then(response => {\n  // send response back to server\n})\n```\n\nBack in your server code you receive the token:\n\n```javascript\ncredentials.receive(responseToken).then(profile => {\n  // Store user profile\n})\n```\nFor more information about the contents of the profile object see the uport-persona documentation.\n\n### Stateless Challenge/Response\n\nTo ensure that the response received was created as a response to your selective disclosure request above, the original request is included in the response from the mobile app.\n\nThe default verification rule is that the issuer of the embedded request must match the clientId in your Credentials object and that the original request has not yet expired.\n\nSome applications that exclusively live in the browser are unable to sign the original request. In those cases the request token verification is ignored.\n\n### Requesting Push notification tokens from your users\n\nAs part of the selective disclosure request you can ask for permission from your users to communicate directly with their app.\n\n```javascript\ncredentials.createRequest({\n  requested:[...],\n  notifications: true\n}).then(requestToken => {\n  // send to browser\n})\n```\n\nPresent it to the user like before. On the server you can receive the push token like this:\n\n```javascript\ncredentials.receive(responseToken).then(profile => {\n  // Store user profile\n  // Store push token securely\n  console.log(profile.pushToken)\n})\n```\n\n## Attesting information about your users\n\nAttesting information about your users helps add real value to your application. Your users will use uport to build up their own digital identity and your business is an important part of this.\n\nIf you're a financial institution you may be able to attest to KYC related information such as national identity numbers. If you're an educational application you may want to attest to your users achievements in a way that they can securely share.\n\n### What are attestations\n\nAttestations are shareable private information that one party can sign about another party. They are designed to be shared privately by you to your users and by them to other users.\n\n### Creating an attestation\n\n```javascript\ncredentials.attest({\n  sub: '0x...', // uport address of user\n  exp: <future timestamp>, // If your information is not permanent make sure to add an expires timestamp\n  claims: {name:'John Smith'}\n}).then(attestation => {\n  // send attestation to user\n})\n```\n\nAs before you will want to send this to your user. You can do this in the browser\n\n```javascript\nconst connect = new uportconnect.Connect('app name')\nconnect.showRequest(attestation) // no response is needed for an attestation\n```\n\nIf you requested a push notification token in the above selective disclosure step you can also send attestations directly to your users app in real time.\n\n```javascript\ncredentials.push(pushToken, `me.uport:add?attestation=${attestationjwt}`, message).then(response => {\n\n})\n```\n\n## Asking users to sign Ethereum transactions\n\nEthereum smart contracts live on the blockchain and at a certain address. The application interface is known as the abi and can be created by the Solidity compiler.\n\nOur Contract class will let you create a javascript object modelling the SmartContract allowing you to create uport uri's that you can send to the user.\n\n```javascript\nimport { Contract } from 'uport'\nconst abi = // import from json or have directly in code\nconst contract = Contract(abi).at(contractAddress)\n// creates a request for the user to call the transfer() function on the smart contract\nconst txRequest = tokenContract.transfer(....)\n```\n\nIn your front end use 'uport-connect' to present it to your user either as a QR code or as a uport-button depending on whether they are on a desktop or mobile browser.\n\n```javascript\nconst connect = new uportconnect.Connect('app name')\nconnect.sendTransaction(txRequest).then(txResponse => {\n  // send response back to server\n})\n```\n\nBack in your server code you receive the `txResponse`. This is a standard ethereum transaction object that you can verify.\n\n## Creating Custom Signers for integrating with HSM\n\nYou can easily create custom signers that integrates into your existing signing infrastructure.\n\n```javascript\nfunction sign(data, callback) {\n    const signature = '' // send your data to your back end signer and return DER signed data\n    callback(null, signature)\n}\n```\n","readmeFilename":"README.md","gitHead":"dab0a7e9b1bcd1a5f2a64374e0463c816da5f76c","_id":"uport@0.7.0-alpha-minor-18","_npmVersion":"5.3.0","_nodeVersion":"8.4.0","_npmUser":{"name":"zachferland","email":"zachferland@gmail.com"},"dist":{"integrity":"sha512-mlqwE9gFqkeUPaarWq//4qMvT5wldU9UyInaqyoe7uVJmxiBzoORQ8gQ9tgcaIXEaOMEVCfUBAQRJ3oGjaeSWg==","shasum":"9a8d181a98f24a7643a2630622a9b34bb00b8eeb","tarball":"https://registry.npmjs.org/uport/-/uport-0.7.0-alpha-minor-18.tgz","fileCount":21,"unpackedSize":1048037,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbV4TRCRA9TVsSAnZWagAA6jsQAIHcp3G81XjHw899AA4i\nWGGaMEMdjWZWag8GFSnAWW22PK93ANnYj5sDBYNheunj+C2yna5HAb4dJwYf\n2LL9Z+2UAeFnAERZGfilwwhouL3O2COlW44xmy9zivip7axgLEHgbhtU3uIT\n5v5Mz7jO0Zf1C2kTQWxoGAHp4UdRXEXjcTpMAN16n8FfZwBUIo9ElqbEv5Kl\nbHCZV4dyVPoC/i1LtubWDa3W1UfA21QcKLYmaGtei9i65TSHDlDsnPusaHL7\nLboMaW7tkg/dimNnLHuTTveroFhTkds5YVELFhCzrIpDP6HzbJFcLlGQOLzN\neQDXzms/vNY1qBTcmkjPRUxn6a2JptYK38jz0qI1MDHLyxRFcqJ60GcwrewO\nJFfDgC7y0JJbUteT4aRD2/ULZCeqL1rSf2jrCUfAbfXbAdtvLhnoDyR4HOwG\n6681qMia0nPB0VUGQSU+IRmIxvX7NSCrZjgaBj1O4UZO27JQ9OLxGo/QqZbL\nEfKVUmK0nBrVYtGaVBotUeYbThYFW4Q8agdUwnuEJpkMK86Y7fUB79cr2+zu\nQBXk1U/t318gwFGz9g+rU1XDp6/01M8ZnlNMwcfTY0rxzx3Y1rEWhuRhQgw9\nK/vyOu63hwnEgEwaw7PBZCXJP5p51D7jE3h4c5T+ctKEr4a4MppEMYFAJ1nI\nt5sW\r\n=oPIc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEUl6kfR3MhPMKXIhdBiflaDJmXrrycYJBH/U1mF+2wfAiBh/59GkjQbmFEAGuDhAJ8RdlNOJxXxfk5d7l5PA+eeUQ=="}]},"maintainers":[{"email":"levi.strope@gmail.com","name":"localredhead"},{"email":"oed3933@gmail.com","name":"oed"},{"email":"pelleb@gmail.com","name":"pelleb"},{"email":"zachferland@gmail.com","name":"zachferland"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/uport_0.7.0-alpha-minor-18_1532462289635_0.8386037579844978"},"_hasShrinkwrap":false},"0.7.0-alpha-minor-19":{"name":"uport","version":"0.7.0-alpha-minor-19","description":"Library for interacting with uport profiles and attestations","main":"lib/index.js","files":["lib","dist","src","tutorial"],"scripts":{"test":"jest","test:ci":"jest -u --coverage","build:es5":"babel src -d lib","build:browser":"webpack --config webpack.config.js","build":"yarn build:es5 && yarn test:ci && yarn build:browser","build:docs:html":"jsdoc src/* README.md -d docs","build:docs:md":"./node_modules/jsdoc-to-markdown/bin/cli.js -f src/* --template 'template.hbs' -c js2doc.conf > docs/reference/index.md; echo","build:docs":"npm run build:docs:html && npm run build:docs:md","prepublish":"yarn build"},"author":{"name":"Pelle Braendgaard","email":"pelle.braendgaard@consensys.net"},"license":"MIT","dependencies":{"base64url":"^3.0.0","did-jwt":"^0.0.7","did-resolver":"^0.0.4","ethr-did-resolver":"^0.0.7","ethjs-util":"^0.1.3","jsontokens":"^0.7.6","mnid":"^0.1.1","muport-did-resolver":"^0.1.0","nets":"^3.2.0","tweetnacl":"^1.0.0","tweetnacl-util":"^0.15.0","uport-lite":"^1.0.0","uport-core":"^0.0.43","uport-did-resolver":"^0.0.3"},"jest":{"coverageDirectory":"./coverage/","collectCoverage":true,"unmockedModulePathPatterns":["<rootDir>/node_modules/nock"],"testEnvironment":"node"},"devDependencies":{"babel-cli":"^6.26.0","babel-core":"^6.26.0","babel-jest":"^22.4.3","babel-loader":"^7.1.4","babel-plugin-syntax-object-rest-spread":"^6.13.0","babel-plugin-transform-es2015-modules-umd":"^6.24.1","babel-plugin-transform-object-rest-spread":"^6.26.0","babel-plugin-transform-runtime":"^6.23.0","babel-polyfill":"^6.22.0","babel-preset-env":"^1.6.1","body-parser":"^1.17.1","express":"^4.15.2","jest":"^22.4.3","jsdoc":"^3.4.3","jsdoc-to-markdown":"^1.3.7","json-loader":"^0.5.4","mockdate":"^2.0.1","nock":"^9.0.6","webpack":"^4.6.0","webpack-cli":"^2.0.15"},"readme":"# uport-js\n\n## Integrate uPort in your javascript application\n\nuPort provides a simple way for your users to login to your website and provide private credentials such as identity information and contact details to you.\n\nYou can also “attest” credentials they provide to you or that you yourself have about them. This can be shared back to your customers so you can help them build their digital identity.\n\nUport.js provides a simple way for you to integrate uport.js into your javascript application. You can also interact with your uPort users directly in the browser.\n\nWe have an easy to use browser library [uport-connect](https://github.com/uport-project/uport-connect) which can help you do so.\n\n## Setup your uPort application identity\n\nFirst make sure you have your uPort app installed and you've setup your own uPort identity.\n\n### What is a uPort identity?\n\nAn identity in uPort is really just someone or something that can sign data or transactions and also receive signed data about itself.\n\nAn identity has an identifier in the form of an [MNID](https://github.com/uport-project/mnid), a signing key, and a public key stored on the [uPort Registry](https://github.com/uport-project/uport-registry).\n\nAn identity can:\n\n- Sign JWTs (JSON Web Tokens)\n  - [Authenticate themselves to a third party](messages/shareresp.md)\n  - [Disclose private information about themselves](messages/shareresp.md)\n- [Receive requests for disclosure about themselves](messages/sharereq.md)\n- [Receive and store signed third party verifications about themselves](flows/verification.md)\n- [Sign Ethereum transactions](flows/tx.md)\n\nWhen interacting privately with a user you will be interchanging signed JWT([JSON Web Token](https://jwt.io/)). To verify the signature of the JWT you and your users will be fetching your public key from the public profile.\n\nFor details on uPort's underlying architecture, read our [spec repo](https://github.com/uport-project/specs) or check out the [uPort identity contracts] (https://github.com/uport-project/uport-identity).\n\n## Configure your application\n\nIn your application you must first configure your uPort object.\n\n```javascript\nimport { Credentials, SimpleSigner } from 'uport'\n\nconst signer = SimpleSigner(process.env.PRIVATE_KEY)\nconst credentials = new Credentials({\n  appName: 'App Name',\n  address: 'MNID Encoded uPort Address For Your App',\n  signer: signer,\n  networks: networks\n})\n```\n\nGoing forward all uPort application ID addresses must be [MNID encoded](https://github.com/uport-project/mnid). MNID will encode the network with the address. Use of hex encoded addresses is deprecated. Using a hex encoded address will indicated you are on ropsten using our deprecated registry, if you require this use case then continue to pass a hex encoded address. If you are on ropsten but using our latest registry, pass a MNID encoded address with ropsten.\n\nThe networks object includes a set of networks for which JWTs will be verified over. JWT verification includes an on-chain lookup for the public key mapped to the issuers identity, the MIND encoding of the issuer's address defines the network and registry to use for lookup. If you are interested in verifying JWTs over additional networks, pass in a network configs object, defined as follows:\n\n```javascript\n const networks = { id: '0x2a' :\n                      { registry: '0x5f8e9351dc2d238fb878b6ae43aa740d62fc9758',\n                        rpcUrl: 'https://kovan.infura.io' },\n                   id: ....   : { ... }\n                 }\n```\n\nLook in [uport-lite](https://github.com/uport-project/uport-lite) for the default networks and registries which will be queried for JWT verification.\n\n## Requesting information from your users\n\nTo request information from your user you create a Selective Disclosure Request JWT and present it to your user in the web browser.\n\nThe most basic request to get a users public uport identity details:\n\n```javascript\ncredentials.createRequest().then(requestToken => {\n  // send requestToken to browser\n})\n```\n\nYou can ask for specific private data like this:\n\n```javascript\ncredentials.createRequest({\n    requested: ['name','phone','identity_no'],\n    callbackUrl: 'https://....' // URL to send the response of the request to\n  }).then(requestToken => {\n  // send requestToken to browser\n  })\n```\n\nIf you need to know the users address on a specific ethereum network, specify it's `network_id` (currently defaults to ropsten `0x3`). In this case be aware that the `address` returned will be the address on the public network (currently ropsten) for the users profile. The requested network address will be in the `networkAddress` field and will be MNID encoded.\n\n```javascript\ncredentials.createRequest({network_id: '0x4'}).then(requestToken => {\n  // send requestToken to browser\n})\n```\n\nIn your front end use [uport-connect](https://github.com/uport-project/uport-connect) to present it to your user either as a QR code or as a uport-button depending on whether they are on a desktop or mobile browser.\n\n```javascript\nconst connect = new uportconnect.Connect('app name')\nconnect.showRequest(requestToken).then(response => {\n  // send response back to server\n})\n```\n\nBack in your server code you receive the token:\n\n```javascript\ncredentials.receive(responseToken).then(profile => {\n  // Store user profile\n})\n```\nFor more information about the contents of the profile object see the uport-persona documentation.\n\n### Stateless Challenge/Response\n\nTo ensure that the response received was created as a response to your selective disclosure request above, the original request is included in the response from the mobile app.\n\nThe default verification rule is that the issuer of the embedded request must match the clientId in your Credentials object and that the original request has not yet expired.\n\nSome applications that exclusively live in the browser are unable to sign the original request. In those cases the request token verification is ignored.\n\n### Requesting Push notification tokens from your users\n\nAs part of the selective disclosure request you can ask for permission from your users to communicate directly with their app.\n\n```javascript\ncredentials.createRequest({\n  requested:[...],\n  notifications: true\n}).then(requestToken => {\n  // send to browser\n})\n```\n\nPresent it to the user like before. On the server you can receive the push token like this:\n\n```javascript\ncredentials.receive(responseToken).then(profile => {\n  // Store user profile\n  // Store push token securely\n  console.log(profile.pushToken)\n})\n```\n\n## Attesting information about your users\n\nAttesting information about your users helps add real value to your application. Your users will use uport to build up their own digital identity and your business is an important part of this.\n\nIf you're a financial institution you may be able to attest to KYC related information such as national identity numbers. If you're an educational application you may want to attest to your users achievements in a way that they can securely share.\n\n### What are attestations\n\nAttestations are shareable private information that one party can sign about another party. They are designed to be shared privately by you to your users and by them to other users.\n\n### Creating an attestation\n\n```javascript\ncredentials.attest({\n  sub: '0x...', // uport address of user\n  exp: <future timestamp>, // If your information is not permanent make sure to add an expires timestamp\n  claims: {name:'John Smith'}\n}).then(attestation => {\n  // send attestation to user\n})\n```\n\nAs before you will want to send this to your user. You can do this in the browser\n\n```javascript\nconst connect = new uportconnect.Connect('app name')\nconnect.showRequest(attestation) // no response is needed for an attestation\n```\n\nIf you requested a push notification token in the above selective disclosure step you can also send attestations directly to your users app in real time.\n\n```javascript\ncredentials.push(pushToken, `me.uport:add?attestation=${attestationjwt}`, message).then(response => {\n\n})\n```\n\n## Asking users to sign Ethereum transactions\n\nEthereum smart contracts live on the blockchain and at a certain address. The application interface is known as the abi and can be created by the Solidity compiler.\n\nOur Contract class will let you create a javascript object modelling the SmartContract allowing you to create uport uri's that you can send to the user.\n\n```javascript\nimport { Contract } from 'uport'\nconst abi = // import from json or have directly in code\nconst contract = Contract(abi).at(contractAddress)\n// creates a request for the user to call the transfer() function on the smart contract\nconst txRequest = tokenContract.transfer(....)\n```\n\nIn your front end use 'uport-connect' to present it to your user either as a QR code or as a uport-button depending on whether they are on a desktop or mobile browser.\n\n```javascript\nconst connect = new uportconnect.Connect('app name')\nconnect.sendTransaction(txRequest).then(txResponse => {\n  // send response back to server\n})\n```\n\nBack in your server code you receive the `txResponse`. This is a standard ethereum transaction object that you can verify.\n\n## Creating Custom Signers for integrating with HSM\n\nYou can easily create custom signers that integrates into your existing signing infrastructure.\n\n```javascript\nfunction sign(data, callback) {\n    const signature = '' // send your data to your back end signer and return DER signed data\n    callback(null, signature)\n}\n```\n","readmeFilename":"README.md","gitHead":"6f9c370a2cef33d1b03d7e0cecbd76d12ada177c","_id":"uport@0.7.0-alpha-minor-19","_npmVersion":"5.3.0","_nodeVersion":"8.4.0","_npmUser":{"name":"zachferland","email":"zachferland@gmail.com"},"dist":{"integrity":"sha512-W+UhORWXmGDH9ukvVvRgOaXNc0V8T+Z9JMq3lmzpvpx9aji7rSSR0ymNkwNG8iIdmdyNhVgyil/DUOVbZMi53g==","shasum":"f06d9fdaeb60e34e315986fadf82470ff8108191","tarball":"https://registry.npmjs.org/uport/-/uport-0.7.0-alpha-minor-19.tgz","fileCount":21,"unpackedSize":1048597,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbWb3+CRA9TVsSAnZWagAA4ucP+wUiFXA+yEc5+HWU2Hs3\nsfNTcGyEvN4fNA6D3FFhrFtQtT5TimC71/pw9InUyFwwwSg1wLwcFrKZvFtv\nMoNl7Hc7lpk8qtNgC4cXjIF6b2BRjNhbIu+oyy/sofyr5DNHvWR9CALm7NTd\netztRcyTTIlyHshW2MnxMhDiaeDwjErS5A72oV9zHTibueNSR9YN4M9aDRx7\n8XGgP7hU16vziMMz1doOzsxUfRO3b0vwIMQxqE3sMoDhZNqT7yM8pwXBGDJI\nTC5cWU46W4y0QHcHZOGU7f9nRFBJ1C+FNCmw3bSBl60Xs6U/w7UTDYcnUt7G\no3aIgMGvQ4JzzTZeInMNAYWxWv44ZPEFG7uxEExoq7cqebF6YEWI8qDuUe5y\nIUiHVKzzFbn6O4Z4FWlUue0Az9VWRNK/b4OwYMLKj+Pza65QoBzEL+Ts2RCP\noXaW/ySsNnqnf4aZwa2hb7FB+crWZYx8vQJiTUZALYJCiytmbXd7Sc+MK1dp\nwOY0wX0OtO6uMa4FZEhNN8LJdJBbiEL4frRRbQpTtZ9FdjTIift8IO3wVfJp\nnx9lu8xjuPxj9EBXVY/Jw7/gn2V4CiPfh8pu/COSRlnRa1i8MvHxDeXhoEmU\nLjd+Oge8Jo80mm6b0y7jC46qx25o8ReWN1FzHdvrR4f9gwXf5ZASI4ELZB3w\nJQVb\r\n=zBfu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDTpe8YdCoqto/JSnK7Cn27a1ct2im63AOQjzttcml4KAiEA6G/WHg/Gaf0dUADcwbnmqvvQcEP0Vs+QIBW3k9RvGMs="}]},"maintainers":[{"email":"levi.strope@gmail.com","name":"localredhead"},{"email":"oed3933@gmail.com","name":"oed"},{"email":"pelleb@gmail.com","name":"pelleb"},{"email":"zachferland@gmail.com","name":"zachferland"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/uport_0.7.0-alpha-minor-19_1532607998495_0.43377223395083586"},"_hasShrinkwrap":false},"0.7.0-alpha-minor-20":{"name":"uport","version":"0.7.0-alpha-minor-20","description":"Library for interacting with uport profiles and attestations","main":"lib/index.js","files":["lib","dist","src","tutorial"],"scripts":{"test":"jest","test:ci":"jest -u --coverage","build:es5":"babel src -d lib","build:browser":"webpack --config webpack.config.js","build":"yarn build:es5 && yarn test:ci && yarn build:browser","build:docs:html":"jsdoc src/* README.md -d docs","build:docs:md":"./node_modules/jsdoc-to-markdown/bin/cli.js -f src/* --template 'template.hbs' -c js2doc.conf > docs/reference/index.md; echo","build:docs":"npm run build:docs:html && npm run build:docs:md","prepublish":"yarn build"},"author":{"name":"Pelle Braendgaard","email":"pelle.braendgaard@consensys.net"},"license":"MIT","dependencies":{"base64url":"^3.0.0","did-jwt":"^0.0.7","did-resolver":"^0.0.4","ethr-did-resolver":"^0.0.7","ethjs-util":"^0.1.3","jsontokens":"^0.7.6","mnid":"^0.1.1","muport-did-resolver":"^0.1.0","nets":"^3.2.0","tweetnacl":"^1.0.0","tweetnacl-util":"^0.15.0","uport-lite":"^1.0.0","uport-core":"^0.0.43","uport-did-resolver":"^0.0.3"},"jest":{"coverageDirectory":"./coverage/","collectCoverage":true,"unmockedModulePathPatterns":["<rootDir>/node_modules/nock"],"testEnvironment":"node"},"devDependencies":{"babel-cli":"^6.26.0","babel-core":"^6.26.0","babel-jest":"^22.4.3","babel-loader":"^7.1.4","babel-plugin-syntax-object-rest-spread":"^6.13.0","babel-plugin-transform-es2015-modules-umd":"^6.24.1","babel-plugin-transform-object-rest-spread":"^6.26.0","babel-plugin-transform-runtime":"^6.23.0","babel-polyfill":"^6.22.0","babel-preset-env":"^1.6.1","body-parser":"^1.17.1","express":"^4.15.2","jest":"^22.4.3","jsdoc":"^3.4.3","jsdoc-to-markdown":"^1.3.7","json-loader":"^0.5.4","mockdate":"^2.0.1","nock":"^9.0.6","webpack":"^4.6.0","webpack-cli":"^2.0.15"},"readme":"# uport-js\n\n## Integrate uPort in your javascript application\n\nuPort provides a simple way for your users to login to your website and provide private credentials such as identity information and contact details to you.\n\nYou can also “attest” credentials they provide to you or that you yourself have about them. This can be shared back to your customers so you can help them build their digital identity.\n\nUport.js provides a simple way for you to integrate uport.js into your javascript application. You can also interact with your uPort users directly in the browser.\n\nWe have an easy to use browser library [uport-connect](https://github.com/uport-project/uport-connect) which can help you do so.\n\n## Setup your uPort application identity\n\nFirst make sure you have your uPort app installed and you've setup your own uPort identity.\n\n### What is a uPort identity?\n\nAn identity in uPort is really just someone or something that can sign data or transactions and also receive signed data about itself.\n\nAn identity has an identifier in the form of an [MNID](https://github.com/uport-project/mnid), a signing key, and a public key stored on the [uPort Registry](https://github.com/uport-project/uport-registry).\n\nAn identity can:\n\n- Sign JWTs (JSON Web Tokens)\n  - [Authenticate themselves to a third party](messages/shareresp.md)\n  - [Disclose private information about themselves](messages/shareresp.md)\n- [Receive requests for disclosure about themselves](messages/sharereq.md)\n- [Receive and store signed third party verifications about themselves](flows/verification.md)\n- [Sign Ethereum transactions](flows/tx.md)\n\nWhen interacting privately with a user you will be interchanging signed JWT([JSON Web Token](https://jwt.io/)). To verify the signature of the JWT you and your users will be fetching your public key from the public profile.\n\nFor details on uPort's underlying architecture, read our [spec repo](https://github.com/uport-project/specs) or check out the [uPort identity contracts] (https://github.com/uport-project/uport-identity).\n\n## Configure your application\n\nIn your application you must first configure your uPort object.\n\n```javascript\nimport { Credentials, SimpleSigner } from 'uport'\n\nconst signer = SimpleSigner(process.env.PRIVATE_KEY)\nconst credentials = new Credentials({\n  appName: 'App Name',\n  address: 'MNID Encoded uPort Address For Your App',\n  signer: signer,\n  networks: networks\n})\n```\n\nGoing forward all uPort application ID addresses must be [MNID encoded](https://github.com/uport-project/mnid). MNID will encode the network with the address. Use of hex encoded addresses is deprecated. Using a hex encoded address will indicated you are on ropsten using our deprecated registry, if you require this use case then continue to pass a hex encoded address. If you are on ropsten but using our latest registry, pass a MNID encoded address with ropsten.\n\nThe networks object includes a set of networks for which JWTs will be verified over. JWT verification includes an on-chain lookup for the public key mapped to the issuers identity, the MIND encoding of the issuer's address defines the network and registry to use for lookup. If you are interested in verifying JWTs over additional networks, pass in a network configs object, defined as follows:\n\n```javascript\n const networks = { id: '0x2a' :\n                      { registry: '0x5f8e9351dc2d238fb878b6ae43aa740d62fc9758',\n                        rpcUrl: 'https://kovan.infura.io' },\n                   id: ....   : { ... }\n                 }\n```\n\nLook in [uport-lite](https://github.com/uport-project/uport-lite) for the default networks and registries which will be queried for JWT verification.\n\n## Requesting information from your users\n\nTo request information from your user you create a Selective Disclosure Request JWT and present it to your user in the web browser.\n\nThe most basic request to get a users public uport identity details:\n\n```javascript\ncredentials.createRequest().then(requestToken => {\n  // send requestToken to browser\n})\n```\n\nYou can ask for specific private data like this:\n\n```javascript\ncredentials.createRequest({\n    requested: ['name','phone','identity_no'],\n    callbackUrl: 'https://....' // URL to send the response of the request to\n  }).then(requestToken => {\n  // send requestToken to browser\n  })\n```\n\nIf you need to know the users address on a specific ethereum network, specify it's `network_id` (currently defaults to ropsten `0x3`). In this case be aware that the `address` returned will be the address on the public network (currently ropsten) for the users profile. The requested network address will be in the `networkAddress` field and will be MNID encoded.\n\n```javascript\ncredentials.createRequest({network_id: '0x4'}).then(requestToken => {\n  // send requestToken to browser\n})\n```\n\nIn your front end use [uport-connect](https://github.com/uport-project/uport-connect) to present it to your user either as a QR code or as a uport-button depending on whether they are on a desktop or mobile browser.\n\n```javascript\nconst connect = new uportconnect.Connect('app name')\nconnect.showRequest(requestToken).then(response => {\n  // send response back to server\n})\n```\n\nBack in your server code you receive the token:\n\n```javascript\ncredentials.receive(responseToken).then(profile => {\n  // Store user profile\n})\n```\nFor more information about the contents of the profile object see the uport-persona documentation.\n\n### Stateless Challenge/Response\n\nTo ensure that the response received was created as a response to your selective disclosure request above, the original request is included in the response from the mobile app.\n\nThe default verification rule is that the issuer of the embedded request must match the clientId in your Credentials object and that the original request has not yet expired.\n\nSome applications that exclusively live in the browser are unable to sign the original request. In those cases the request token verification is ignored.\n\n### Requesting Push notification tokens from your users\n\nAs part of the selective disclosure request you can ask for permission from your users to communicate directly with their app.\n\n```javascript\ncredentials.createRequest({\n  requested:[...],\n  notifications: true\n}).then(requestToken => {\n  // send to browser\n})\n```\n\nPresent it to the user like before. On the server you can receive the push token like this:\n\n```javascript\ncredentials.receive(responseToken).then(profile => {\n  // Store user profile\n  // Store push token securely\n  console.log(profile.pushToken)\n})\n```\n\n## Attesting information about your users\n\nAttesting information about your users helps add real value to your application. Your users will use uport to build up their own digital identity and your business is an important part of this.\n\nIf you're a financial institution you may be able to attest to KYC related information such as national identity numbers. If you're an educational application you may want to attest to your users achievements in a way that they can securely share.\n\n### What are attestations\n\nAttestations are shareable private information that one party can sign about another party. They are designed to be shared privately by you to your users and by them to other users.\n\n### Creating an attestation\n\n```javascript\ncredentials.attest({\n  sub: '0x...', // uport address of user\n  exp: <future timestamp>, // If your information is not permanent make sure to add an expires timestamp\n  claims: {name:'John Smith'}\n}).then(attestation => {\n  // send attestation to user\n})\n```\n\nAs before you will want to send this to your user. You can do this in the browser\n\n```javascript\nconst connect = new uportconnect.Connect('app name')\nconnect.showRequest(attestation) // no response is needed for an attestation\n```\n\nIf you requested a push notification token in the above selective disclosure step you can also send attestations directly to your users app in real time.\n\n```javascript\ncredentials.push(pushToken, `me.uport:add?attestation=${attestationjwt}`, message).then(response => {\n\n})\n```\n\n## Asking users to sign Ethereum transactions\n\nEthereum smart contracts live on the blockchain and at a certain address. The application interface is known as the abi and can be created by the Solidity compiler.\n\nOur Contract class will let you create a javascript object modelling the SmartContract allowing you to create uport uri's that you can send to the user.\n\n```javascript\nimport { Contract } from 'uport'\nconst abi = // import from json or have directly in code\nconst contract = Contract(abi).at(contractAddress)\n// creates a request for the user to call the transfer() function on the smart contract\nconst txRequest = tokenContract.transfer(....)\n```\n\nIn your front end use 'uport-connect' to present it to your user either as a QR code or as a uport-button depending on whether they are on a desktop or mobile browser.\n\n```javascript\nconst connect = new uportconnect.Connect('app name')\nconnect.sendTransaction(txRequest).then(txResponse => {\n  // send response back to server\n})\n```\n\nBack in your server code you receive the `txResponse`. This is a standard ethereum transaction object that you can verify.\n\n## Creating Custom Signers for integrating with HSM\n\nYou can easily create custom signers that integrates into your existing signing infrastructure.\n\n```javascript\nfunction sign(data, callback) {\n    const signature = '' // send your data to your back end signer and return DER signed data\n    callback(null, signature)\n}\n```\n","readmeFilename":"README.md","gitHead":"6f9c370a2cef33d1b03d7e0cecbd76d12ada177c","_id":"uport@0.7.0-alpha-minor-20","_npmVersion":"5.3.0","_nodeVersion":"8.4.0","_npmUser":{"name":"zachferland","email":"zachferland@gmail.com"},"dist":{"integrity":"sha512-uO9lkPAKu9sT5UJHU+tNUpG1oydgNyjVrso1IjBgrlv4ImZZfoC19I1O5xSoWXneH+g4Ck5MM7lBdqh2X/43eg==","shasum":"5d61e93f09a8e164c74504c96e8d734139765724","tarball":"https://registry.npmjs.org/uport/-/uport-0.7.0-alpha-minor-20.tgz","fileCount":21,"unpackedSize":1048600,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbWcyXCRA9TVsSAnZWagAAyBkP/00XaX+Tl1eUwqUQF9H8\nSIaCwOVSZEXxUmuAvDviZt+5gn5vlFr6rTWDFGNKQQJDQCeBuv6CtLNW8V8J\nqpiuVIQvXErHLk6IBibWGSz2Xcjvb9ZDQM35ymoKHL3FYcnBXkzjtZGCS0xX\n6ZHHYf75goZll8YQ1Im1dG5+gTkAVF14jLSI0F8JiD/XDyFpIQtOr/oHlqcJ\nLf/KMwUciFYd2f7ijUNQBajujTdrqbGeRQEZLgomLF8NcSZgmtdBRePV6sar\nEeezv4UwlMp47O3l3Ok6QNJVwoaM8zEHkYSeGrVeIyASKKP573hktfbmqAlG\nq6Cg8rTM4rL7AdQvXJXK17bwGx2hUcRYYPLNoIauFjcqSgntfktCWm7w6Vyw\nmErgQmruVXWJowJkJktV0pWQ3E8xXqMchjNWdhspndOeKcH4B4DUgIXq3Kl9\nxcgJwcn1VtwofdqnidhuocsDDEgINWjT4sPjEcZnTCMVZqE8qSOUpiy6iB5S\nWqgNm02WzcxnfzJlpUtkcWNVd8plCs9dKmaqHFVwmyzlgxseO3dvILjkdQDU\nKgs1/mQQcOZC8WoDbdcRr/XoDNw58IDFeSsuQ7xnhT/59KiaicrCNtHh0lsk\nfsYcYHGqeiQ0CBUW7zt3U90sjBjqZT5DbHTKq76DEBC26qvXsRjhCqCU/MA3\nmdUL\r\n=y2Ql\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBRkIIpy78feCb0MvR0bsd2eYHhMCfOAWyy8poXylCzFAiEAiESmmr0e36s1D+JWV17RRqJomWG4SmkvD0aYXH94PHI="}]},"maintainers":[{"email":"levi.strope@gmail.com","name":"localredhead"},{"email":"oed3933@gmail.com","name":"oed"},{"email":"pelleb@gmail.com","name":"pelleb"},{"email":"zachferland@gmail.com","name":"zachferland"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/uport_0.7.0-alpha-minor-20_1532611734859_0.8413581474135952"},"_hasShrinkwrap":false},"0.6.3":{"name":"uport","version":"0.6.3","description":"Library for interacting with uport profiles and attestations","main":"lib/index.js","files":["lib","dist","src","tutorial"],"scripts":{"test":"jest","test:ci":"jest -u --coverage","build:es5":"babel src -d lib","build:browser":"webpack --config webpack.config.js","build":"yarn build:es5 && yarn test:ci && yarn build:browser","build:docs:html":"jsdoc src/* README.md -d docs","build:docs:md":"./node_modules/jsdoc-to-markdown/bin/cli.js -f src/* --template 'template.hbs' -c js2doc.conf > docs/reference/index.md; echo","build:docs":"npm run build:docs:html && npm run build:docs:md","prepublish":"yarn build"},"author":{"name":"Pelle Braendgaard","email":"pelle.braendgaard@consensys.net"},"license":"MIT","dependencies":{"base64url":"^3.0.0","did-jwt":"^0.0.7","did-resolver":"^0.0.4","ethr-did-resolver":"^0.0.7","ethjs-util":"^0.1.3","jsontokens":"^0.7.6","mnid":"^0.1.1","muport-did-resolver":"^0.1.0","nets":"^3.2.0","tweetnacl":"^1.0.0","tweetnacl-util":"^0.15.0","uport-lite":"^1.0.0","uport-core":"^0.0.43","uport-did-resolver":"^0.0.3"},"jest":{"coverageDirectory":"./coverage/","collectCoverage":true,"unmockedModulePathPatterns":["<rootDir>/node_modules/nock"],"testEnvironment":"node"},"devDependencies":{"babel-cli":"^6.26.0","babel-core":"^6.26.0","babel-jest":"^22.4.3","babel-loader":"^7.1.4","babel-plugin-syntax-object-rest-spread":"^6.13.0","babel-plugin-transform-es2015-modules-umd":"^6.24.1","babel-plugin-transform-object-rest-spread":"^6.26.0","babel-plugin-transform-runtime":"^6.23.0","babel-polyfill":"^6.22.0","babel-preset-env":"^1.6.1","body-parser":"^1.17.1","express":"^4.15.2","jest":"^22.4.3","jsdoc":"^3.4.3","jsdoc-to-markdown":"^1.3.7","json-loader":"^0.5.4","mockdate":"^2.0.1","nock":"^9.0.6","webpack":"^4.6.0","webpack-cli":"^2.0.15"},"gitHead":"80dcc7a7b097d6005f8b539cf6dfa171f696b666","_id":"uport@0.6.3","_npmVersion":"5.3.0","_nodeVersion":"8.4.0","_npmUser":{"name":"zachferland","email":"zachferland@gmail.com"},"dist":{"integrity":"sha512-081f2bK+5lXFmzZM3cD68FnDoz7MeCTwQyJcSVI0MPCtbSAGoSoIH2oh5sgfI12wuvHkoEL+6wB7lDGkI/n3bQ==","shasum":"e93cbc36817e63b548f83a340f92fb2713e3a7bc","tarball":"https://registry.npmjs.org/uport/-/uport-0.6.3.tgz","fileCount":21,"unpackedSize":1048585,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbWjzGCRA9TVsSAnZWagAAsDIP/jRCE/2QTCJ3GgsD697S\nB3BdfRuZIpmf64PjR1I7acveDJs68sKV9zH0bmp/fM0dMnNzROPpbxRPNdeV\n6jpAOXP9UjlWB54WxQYvb0R0X7inQQ1cxWv8SRDQXyzqf68bJsP5ugqT0VwG\n7NewBe8DFFI4VYfXjYG/l/TBDXSJi3Ly6n0pyS1nvuBO4RGQ6A2Hudga1Q17\nSAEz3TzV3zTZG81zDeJb/mgbD4EbrEBP6KX8c3YmQ2ja8NOJbZV+5sX4FdcW\nNP/kC0fhncyRzZyCGKcGwPFeIiIHB3YE6n98AuMdVvgBfCRv5MBqNVMFyY1a\n2lls4C2L1vdoiIVaRxh106YEv0pqHGirDky1dAv5Hj83FM3AeZYPHJVzcaeu\n5RcLGc62LvW6GfguB2qBwRZmR9ToACGbpfE1B1OTXsPrOIw1MSFDX0x5Q0db\n9F6cGzlf+7t1kiJTeBfIBT4AC6jzMTgMrv+aSoTieXXnNSGuYyR2+u3wlISZ\nT+CeVfUy5swnqk+aAJaKUHtNOHaN3jn/VitMwoF0+puffmOyNAuTB/vyPhXE\njvKSgxetOLSQGt8xpv2DNF7DVFItsk5IKmNSsEuhNKYn7TyTfo4Mg33TirZa\ndKzwxM98YTOv72m3PyElPq1Jf1oDcpUjjNbtbu2kdokZMFqAO/xY12f3DaUO\nYIdf\r\n=0IRm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEOgnLrtlKCA8WhC640AW7RnRtmiAQrawMpPDNt+P9OKAiEAnK3VeR8tGtIDnEOGpxGGY068qhBFpQwg1U8XSwVFN+U="}]},"maintainers":[{"email":"levi.strope@gmail.com","name":"localredhead"},{"email":"oed3933@gmail.com","name":"oed"},{"email":"pelleb@gmail.com","name":"pelleb"},{"email":"zachferland@gmail.com","name":"zachferland"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/uport_0.6.3_1532640454609_0.631939337638008"},"_hasShrinkwrap":false},"0.7.0-alpha-6":{"name":"uport","version":"0.7.0-alpha-6","description":"Library for interacting with uport profiles and attestations","main":"lib/index.js","files":["lib","dist","src","tutorial"],"scripts":{"test":"jest","test:ci":"jest -u --coverage","build:es5":"babel src -d lib","build:browser":"webpack --config webpack.config.js","build":"yarn build:es5 && yarn test:ci && yarn build:browser","build:docs:html":"jsdoc src/* README.md -d docs","build:docs:md":"./node_modules/jsdoc-to-markdown/bin/cli.js src/* > DOCS.md","build:docs":"npm run build:docs:html && npm run build:docs:md","prepublish":"yarn build"},"author":{"name":"Pelle Braendgaard","email":"pelle.braendgaard@consensys.net"},"license":"MIT","dependencies":{"did-jwt":"^0.0.7","did-resolver":"^0.0.4","ethjs-util":"^0.1.3","ethr-did-resolver":"^0.0.7","mnid":"^0.1.1","muport-did-resolver":"^0.1.0","uport-did-resolver":"^0.0.2","uport-lite":"^1.0.2"},"jest":{"coverageDirectory":"./coverage/","unmockedModulePathPatterns":["<rootDir>/node_modules/nock"],"testEnvironment":"node"},"devDependencies":{"babel-cli":"^6.26.0","babel-core":"^6.26.0","babel-jest":"^22.4.3","babel-loader":"^7.1.4","babel-plugin-syntax-object-rest-spread":"^6.13.0","babel-plugin-transform-es2015-modules-umd":"^6.24.1","babel-plugin-transform-object-rest-spread":"^6.26.0","babel-plugin-transform-runtime":"^6.23.0","babel-polyfill":"^6.22.0","babel-preset-env":"^1.6.1","body-parser":"^1.17.1","express":"^4.15.2","jest":"^22.4.3","jsdoc":"^3.4.3","jsdoc-to-markdown":"^1.3.7","json-loader":"^0.5.4","mockdate":"^2.0.1","webpack":"^4.6.0","webpack-cli":"^2.0.15"},"readme":"# uport-credentials\n\n## Integrate uPort in your javascript application\n\nuPort provides a simple way for your users to login to your website and provide private credentials such as identity information and contact details to you.\n\nYou can also “attest” credentials they provide to you or that you yourself have about them. This can be shared back to your customers so you can help them build their digital identity.\n\nUport.js provides a simple way for you to integrate uport.js into your javascript application. You can also interact with your uPort users directly in the browser.\n\nWe have an easy to use browser library [uport-connect](https://github.com/uport-project/uport-connect) which can help you do so.\n\n### What is a uPort identity?\n\nAn identity in uPort is really just someone or something that can sign data or transactions and also receive signed data about itself.\n\nAn identity can:\n\n- Sign JWTs (JSON Web Tokens)\n  - [Authenticate themselves to a third party](messages/shareresp.md)\n  - [Disclose private information about themselves](messages/shareresp.md)\n- [Receive requests for disclosure about themselves](messages/sharereq.md)\n- [Receive and store signed third party verifications about themselves](flows/verification.md)\n- [Sign Ethereum transactions](flows/tx.md)\n\nWhen interacting privately with a user you will be interchanging signed JWT([JSON Web Token](https://jwt.io/)). To verify the signature of the JWT you and your users will be fetching your public key from the public profile.\n\nFor details on uPort's underlying architecture, read our [spec repo](https://github.com/uport-project/specs) or check out the [uPort identity contracts] (https://github.com/uport-project/uport-identity).\n\n## Configure your application\n\nIn your application you must first configure your uPort object.\n\n```javascript\nimport { Credentials } from 'uport-credentials'\n\n// For new ethereum based addresses\nconst credentials = new Credentials({\n  appName: 'App Name',\n  did: 'did:ethr:0x....',\n  privateKey: process.env.PRIVATE_KEY\n})\n\n// You can create a new identity\n\nconsole.log(Credentials.createIdentity())\n\n// For legacy application identity created on App Manager\nconst credentials = new Credentials({\n  appName: 'App Name',\n  address: 'MNID Encoded uPort Address For Your App',\n  privateKey: process.env.PRIVATE_KEY\n})\n\n\n```\n\n## Requesting information from your users\n\nTo request information from your user you create a Selective Disclosure Request JWT and present it to your user in the web browser.\n\nThe most basic request to get a users public uport identity details:\n\n```javascript\ncredentials.requestDisclosure().then(requestToken => {\n  // send requestToken to browser\n})\n```\n\nYou can ask for specific private data like this:\n\n```javascript\ncredentials.requestDisclosure({\n    requested: ['name','phone','identity_no'],\n    callbackUrl: 'https://....' // URL to send the response of the request to\n  }.then(requestToken => {\n  // send requestToken to browser\n  })\n```\n\nIf you need to know the users address on a specific ethereum network, specify it's `network_id` (currently defaults to ropsten `0x3`). In this case be aware that the `address` returned will be the address on the public network (currently ropsten) for the users profile. The requested network address will be in the `networkAddress` field and will be MNID encoded.\n\n```javascript\ncredentials.requestDisclosure({network_id: '0x4'}).then(requestToken => {\n  // send requestToken to browser\n})\n```\n\nBack in your server code you receive the token:\n\n```javascript\ncredentials.authenticate(responseToken).then(profile => {\n  // Store user profile\n})\n```\n\n### Stateless Challenge/Response\n\nTo ensure that the response received was created as a response to your selective disclosure request above, the original request is included in the response from the mobile app.\n\nThe default verification rule is that the issuer of the embedded request must match the clientId in your Credentials object and that the original request has not yet expired.\n\nSome applications that exclusively live in the browser are unable to sign the original request. In those cases the request token verification is ignored.\n\n### Requesting Push notification tokens from your users\n\nAs part of the selective disclosure request you can ask for permission from your users to communicate directly with their app.\n\n```javascript\ncredentials.createRequest({\n  requested:[...],\n  notifications: true\n}).then(requestToken => {\n  // send to browser\n})\n```\n\nPresent it to the user like before. On the server you can receive the push token like this:\n\n```javascript\ncredentials.receive(responseToken).then(profile => {\n  // Store user profile\n  // Store push token securely\n  console.log(profile.pushToken)\n})\n```\n\n## Attesting information about your users\n\nAttesting information about your users helps add real value to your application. Your users will use uport to build up their own digital identity and your business is an important part of this.\n\nIf you're a financial institution you may be able to attest to KYC related information such as national identity numbers. If you're an educational application you may want to attest to your users achievements in a way that they can securely share.\n\n### What are attestations\n\nAttestations are shareable private information that one party can sign about another party. They are designed to be shared privately by you to your users and by them to other users.\n\n### Creating an attestation\n\n```javascript\ncredentials.attest({\n  sub: '0x...', // uport address of user\n  exp: <future timestamp>, // If your information is not permanent make sure to add an expires timestamp\n  claims: {name:'John Smith'}\n}).then(attestation => {\n  // send attestation to user\n})\n```\n\nAs before you will want to send this to your user. You can do this in the browser\n\n```javascript\nconst connect = new uportconnect.Connect('app name')\nconnect.showRequest(attestation) // no response is needed for an attestation\n```\n\nIf you requested a push notification token in the above selective disclosure step you can also send attestations directly to your users app in real time.\n\n```javascript\ncredentials.push(pushToken, `me.uport:add?attestation=${attestationjwt}`, message).then(response => {\n\n})\n```\n\n## Asking users to sign Ethereum transactions\n\nEthereum smart contracts live on the blockchain and at a certain address. The application interface is known as the abi and can be created by the Solidity compiler.\n\nOur Contract class will let you create a javascript object modelling the SmartContract allowing you to create uport uri's that you can send to the user.\n\n```javascript\nimport { Contract } from 'uport-credentials'\nconst abi = // import from json or have directly in code\nconst contract = Contract(abi).at(contractAddress)\n// creates a request for the user to call the transfer() function on the smart contract\nconst txRequest = tokenContract.transfer(....)\n```\n\nIn your front end use 'uport-connect' to present it to your user either as a QR code or as a uport-button depending on whether they are on a desktop or mobile browser.\n\n```javascript\nconst connect = new uportconnect.Connect('app name')\nconnect.sendTransaction(txRequest).then(txResponse => {\n  // send response back to server\n})\n```\n\nBack in your server code you receive the `txResponse`. This is a standard ethereum transaction object that you can verify.\n\n","readmeFilename":"README.md","gitHead":"e7cec55311e9693c061cbbd495397d48015a0267","_id":"uport@0.7.0-alpha-6","_npmVersion":"5.3.0","_nodeVersion":"8.4.0","_npmUser":{"name":"zachferland","email":"zachferland@gmail.com"},"dist":{"integrity":"sha512-X+4xyoX7uQwZcQp6iPrmlgtAV6jbL9l03XJUKJB1bL2QZErIvSh9oOVn9f1h1P3SmW8uvfRuU692k4UWIfsqCg==","shasum":"8af0d71bbc0be51c6795cd765efd3531991058f2","tarball":"https://registry.npmjs.org/uport/-/uport-0.7.0-alpha-6.tgz","fileCount":18,"unpackedSize":660074,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbX5UwCRA9TVsSAnZWagAABmUP/RbqebsiNCPLHW8OiKnq\nRAktfk7prLYHKst/TnyhrEJAa6qtu6Sp1D9ZPk/jfcznSUK5p1+Zy30SLNI6\nIm2R6nZfa5z8P5c1mja47QhZxNY48jGBkFwXBb1YnoCv2xR5Kxj3f+9XuAuk\nyRpUFvzwzKZE0O1lD4qNumxlAP1KHfzFaqQ8nsvZD7BpcKmEP5psIwLgwS39\nscwxiVnEoaijQtOw/6CNn5kwuDC68rweIOjdC51IbXGtjTRqDco8Sao2TRHT\nyPMf/IhCF1EoM6l4tOkXDHjNhKqSLnj5KEfJol9QO97Kq4XwRnE8+aDThrPJ\nIIy3AL04Ei4Lxsp20l6H6GfMn/+kIVtRmMS4IItWL5HJYR5sHM3V1TspG4sd\ngw451BJxqqy3l0kJ20fzFCb+akNTps31OcTmBjd8soLVxqYuK5QWOAdNIlrw\n2tAP3PfUdmK1J/sfwP8uegh2Ow7ZR+FQcrC5TGM3UzsGhMbn5+ZE//YhR8dG\ny1tBW2I7exK35m2UR4z+qw/cSK3p2idZ79jUqEeqVt7YmHsNUUxCYPlDBwX8\nuhHs+IZ+109GTQfc8PtJEiPrv2HPZQqSE+9J64nHJCXGgLhki2XTKpUg3OKG\nyBcvAsIPX8Ph8KNTiAUUhkPc0WYcpGurHBEkhYkiPGVcMCZCwmsy9bwOVWem\n/ZbV\r\n=3nPL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAGUjsA7PXlC0JgvFhL1XAwoJKlHK4Hw6aXWi3nmkBGtAiEAzzmu4HyQlyRdjI1or+REGCQ0aYMOoaRZ5H3MdN7bl24="}]},"maintainers":[{"email":"levi.strope@gmail.com","name":"localredhead"},{"email":"oed3933@gmail.com","name":"oed"},{"email":"pelleb@gmail.com","name":"pelleb"},{"email":"zachferland@gmail.com","name":"zachferland"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/uport_0.7.0-alpha-6_1532990767992_0.4765652704859298"},"_hasShrinkwrap":false},"0.7.0-alpha-7":{"name":"uport","version":"0.7.0-alpha-7","description":"Library for interacting with uport profiles and attestations","main":"lib/index.js","files":["lib","dist","src","tutorial"],"scripts":{"test":"jest","test:ci":"jest -u --coverage","build:es5":"babel src -d lib","build:browser":"webpack --config webpack.config.js","build":"yarn build:es5 && yarn test:ci && yarn build:browser","build:docs:html":"jsdoc src/* README.md -d docs","build:docs:md":"./node_modules/jsdoc-to-markdown/bin/cli.js src/* > DOCS.md","build:docs":"npm run build:docs:html && npm run build:docs:md","prepublish":"yarn build"},"author":{"name":"Pelle Braendgaard","email":"pelle.braendgaard@consensys.net"},"license":"MIT","dependencies":{"did-jwt":"^0.0.7","did-resolver":"^0.0.4","ethjs-util":"^0.1.3","ethr-did-resolver":"^0.0.7","mnid":"^0.1.1","muport-did-resolver":"^0.1.0","uport-did-resolver":"^0.0.2","uport-lite":"^1.0.2"},"jest":{"coverageDirectory":"./coverage/","unmockedModulePathPatterns":["<rootDir>/node_modules/nock"],"testEnvironment":"node"},"devDependencies":{"babel-cli":"^6.26.0","babel-core":"^6.26.0","babel-jest":"^22.4.3","babel-loader":"^7.1.4","babel-plugin-syntax-object-rest-spread":"^6.13.0","babel-plugin-transform-es2015-modules-umd":"^6.24.1","babel-plugin-transform-object-rest-spread":"^6.26.0","babel-plugin-transform-runtime":"^6.23.0","babel-polyfill":"^6.22.0","babel-preset-env":"^1.6.1","body-parser":"^1.17.1","express":"^4.15.2","jest":"^22.4.3","jsdoc":"^3.4.3","jsdoc-to-markdown":"^1.3.7","json-loader":"^0.5.4","mockdate":"^2.0.1","webpack":"^4.6.0","webpack-cli":"^2.0.15"},"readme":"# uport-credentials\n\n## Integrate uPort in your javascript application\n\nuPort provides a simple way for your users to login to your website and provide private credentials such as identity information and contact details to you.\n\nYou can also “attest” credentials they provide to you or that you yourself have about them. This can be shared back to your customers so you can help them build their digital identity.\n\nUport.js provides a simple way for you to integrate uport.js into your javascript application. You can also interact with your uPort users directly in the browser.\n\nWe have an easy to use browser library [uport-connect](https://github.com/uport-project/uport-connect) which can help you do so.\n\n### What is a uPort identity?\n\nAn identity in uPort is really just someone or something that can sign data or transactions and also receive signed data about itself.\n\nAn identity can:\n\n- Sign JWTs (JSON Web Tokens)\n  - [Authenticate themselves to a third party](messages/shareresp.md)\n  - [Disclose private information about themselves](messages/shareresp.md)\n- [Receive requests for disclosure about themselves](messages/sharereq.md)\n- [Receive and store signed third party verifications about themselves](flows/verification.md)\n- [Sign Ethereum transactions](flows/tx.md)\n\nWhen interacting privately with a user you will be interchanging signed JWT([JSON Web Token](https://jwt.io/)). To verify the signature of the JWT you and your users will be fetching your public key from the public profile.\n\nFor details on uPort's underlying architecture, read our [spec repo](https://github.com/uport-project/specs) or check out the [uPort identity contracts] (https://github.com/uport-project/uport-identity).\n\n## Configure your application\n\nIn your application you must first configure your uPort object.\n\n```javascript\nimport { Credentials } from 'uport-credentials'\n\n// For new ethereum based addresses\nconst credentials = new Credentials({\n  appName: 'App Name',\n  did: 'did:ethr:0x....',\n  privateKey: process.env.PRIVATE_KEY\n})\n\n// You can create a new identity\n\nconsole.log(Credentials.createIdentity())\n\n// For legacy application identity created on App Manager\nconst credentials = new Credentials({\n  appName: 'App Name',\n  address: 'MNID Encoded uPort Address For Your App',\n  privateKey: process.env.PRIVATE_KEY\n})\n\n\n```\n\n## Requesting information from your users\n\nTo request information from your user you create a Selective Disclosure Request JWT and present it to your user in the web browser.\n\nThe most basic request to get a users public uport identity details:\n\n```javascript\ncredentials.requestDisclosure().then(requestToken => {\n  // send requestToken to browser\n})\n```\n\nYou can ask for specific private data like this:\n\n```javascript\ncredentials.requestDisclosure({\n    requested: ['name','phone','identity_no'],\n    callbackUrl: 'https://....' // URL to send the response of the request to\n  }.then(requestToken => {\n  // send requestToken to browser\n  })\n```\n\nIf you need to know the users address on a specific ethereum network, specify it's `network_id` (currently defaults to ropsten `0x3`). In this case be aware that the `address` returned will be the address on the public network (currently ropsten) for the users profile. The requested network address will be in the `networkAddress` field and will be MNID encoded.\n\n```javascript\ncredentials.requestDisclosure({network_id: '0x4'}).then(requestToken => {\n  // send requestToken to browser\n})\n```\n\nBack in your server code you receive the token:\n\n```javascript\ncredentials.authenticate(responseToken).then(profile => {\n  // Store user profile\n})\n```\n\n### Stateless Challenge/Response\n\nTo ensure that the response received was created as a response to your selective disclosure request above, the original request is included in the response from the mobile app.\n\nThe default verification rule is that the issuer of the embedded request must match the clientId in your Credentials object and that the original request has not yet expired.\n\nSome applications that exclusively live in the browser are unable to sign the original request. In those cases the request token verification is ignored.\n\n### Requesting Push notification tokens from your users\n\nAs part of the selective disclosure request you can ask for permission from your users to communicate directly with their app.\n\n```javascript\ncredentials.createRequest({\n  requested:[...],\n  notifications: true\n}).then(requestToken => {\n  // send to browser\n})\n```\n\nPresent it to the user like before. On the server you can receive the push token like this:\n\n```javascript\ncredentials.receive(responseToken).then(profile => {\n  // Store user profile\n  // Store push token securely\n  console.log(profile.pushToken)\n})\n```\n\n## Attesting information about your users\n\nAttesting information about your users helps add real value to your application. Your users will use uport to build up their own digital identity and your business is an important part of this.\n\nIf you're a financial institution you may be able to attest to KYC related information such as national identity numbers. If you're an educational application you may want to attest to your users achievements in a way that they can securely share.\n\n### What are attestations\n\nAttestations are shareable private information that one party can sign about another party. They are designed to be shared privately by you to your users and by them to other users.\n\n### Creating an attestation\n\n```javascript\ncredentials.attest({\n  sub: '0x...', // uport address of user\n  exp: <future timestamp>, // If your information is not permanent make sure to add an expires timestamp\n  claims: {name:'John Smith'}\n}).then(attestation => {\n  // send attestation to user\n})\n```\n\nAs before you will want to send this to your user. You can do this in the browser\n\n```javascript\nconst connect = new uportconnect.Connect('app name')\nconnect.showRequest(attestation) // no response is needed for an attestation\n```\n\nIf you requested a push notification token in the above selective disclosure step you can also send attestations directly to your users app in real time.\n\n```javascript\ncredentials.push(pushToken, `me.uport:add?attestation=${attestationjwt}`, message).then(response => {\n\n})\n```\n\n## Asking users to sign Ethereum transactions\n\nEthereum smart contracts live on the blockchain and at a certain address. The application interface is known as the abi and can be created by the Solidity compiler.\n\nOur Contract class will let you create a javascript object modelling the SmartContract allowing you to create uport uri's that you can send to the user.\n\n```javascript\nimport { Contract } from 'uport-credentials'\nconst abi = // import from json or have directly in code\nconst contract = Contract(abi).at(contractAddress)\n// creates a request for the user to call the transfer() function on the smart contract\nconst txRequest = tokenContract.transfer(....)\n```\n\nIn your front end use 'uport-connect' to present it to your user either as a QR code or as a uport-button depending on whether they are on a desktop or mobile browser.\n\n```javascript\nconst connect = new uportconnect.Connect('app name')\nconnect.sendTransaction(txRequest).then(txResponse => {\n  // send response back to server\n})\n```\n\nBack in your server code you receive the `txResponse`. This is a standard ethereum transaction object that you can verify.\n\n","readmeFilename":"README.md","gitHead":"b35037f2ead4b33637458c7ed31468269380e734","_id":"uport@0.7.0-alpha-7","_npmVersion":"5.3.0","_nodeVersion":"8.4.0","_npmUser":{"name":"zachferland","email":"zachferland@gmail.com"},"dist":{"integrity":"sha512-OH8Th7Ez4K8rIEAoB4/UuiLxtCryy7+JPxRrxJqqTSsomoMTC49FLgnR4icnu6QJeWu1eu3GejNxna3yv5Y9uA==","shasum":"f1d99c283f93caadc513124896efb0fb5dc7d365","tarball":"https://registry.npmjs.org/uport/-/uport-0.7.0-alpha-7.tgz","fileCount":18,"unpackedSize":660299,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbYKD4CRA9TVsSAnZWagAA/eEQAJa5E0QZdHaK84GNvb72\nXn53Z67Ac3/dRPoQxcRd0iN0P4S+IK3SMrLNrPXVjyDMTBfBNDgo7pKDzefl\nastxbxS7KmQEiMPvKCx+bU49Nwq4C+F3uUW8TuBVYLzDeyCrhocVhSYttCvK\nq5EbBkDYtOa5kEQBGYICn25CCE+b4pRlr4zAyVnwVA5Xdq7w+eFg531HKKxw\nSPH3nR9lANrw1PUqJ55OOBb/XQre1GtLZi81KsLrLgXSR5MKkX9Fco5fGADt\n/y8X9eJ9ZiDJxXsEYZIeUW1K09XD6iirRerrqsgcT+g7KaZzGg2Otut4qvic\nFhURz5uOSDrn9/rRSlGLrVFAOtt8iJPCBlWD/A4sARcPiHJGtyQDOk4SwpQT\nbt6svOJ4IYKTqlItOYUevS9cJz7hAiUE5rDwXBni6JgGRWT/vIZZw7u56/Vl\nmvOfdBJWdJVa45824qWZIQsO5EW/bgurXwCVaEK+R+iQecQdzlsruX81mx4c\nyls70v6nzX7YRXcas+Aoy8feLW+lWqBQXCg+p0PsNZAG/wlhxZD9ufXYtkMz\ngQNpTSApGzICD9FXFrYcY2eCo//vbVjgZ7Vkwxi1oxHdqEntiNJ+nzGgPShK\n0x2dVcRVMjurXBb7Oi8nQXjJ/qAU+aHnHfYzjyJJ04N5MJ9gpOly+RdEPjEA\nDGSf\r\n=qW4A\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGvXs2o+CUiAKMnqpReuWI0w/uGB4b0A/hm0aaxdZEyPAiEA7zc6Y5iab24tZeuSI5dpF4RDhSH25HpGom7NP5aWcC4="}]},"maintainers":[{"email":"levi.strope@gmail.com","name":"localredhead"},{"email":"oed3933@gmail.com","name":"oed"},{"email":"pelleb@gmail.com","name":"pelleb"},{"email":"zachferland@gmail.com","name":"zachferland"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/uport_0.7.0-alpha-7_1533059320092_0.12564596330985744"},"_hasShrinkwrap":false},"0.7.0-alpha-8":{"name":"uport","version":"0.7.0-alpha-8","description":"Library for interacting with uport profiles and attestations","main":"lib/index.js","files":["lib","dist","src","tutorial"],"scripts":{"test":"jest","test:ci":"jest -u --coverage","build:es5":"babel src -d lib","build:browser":"webpack --config webpack.config.js","build":"yarn build:es5 && yarn test:ci && yarn build:browser","build:docs:html":"jsdoc src/* README.md -d docs","build:docs:md":"./node_modules/jsdoc-to-markdown/bin/cli.js src/* > DOCS.md","build:docs":"npm run build:docs:html && npm run build:docs:md","prepublish":"yarn build"},"author":{"name":"Pelle Braendgaard","email":"pelle.braendgaard@consensys.net"},"license":"MIT","dependencies":{"did-jwt":"^0.0.8","did-resolver":"^0.0.4","ethjs-util":"^0.1.6","ethr-did-resolver":"^0.0.8","mnid":"^0.1.1","muport-did-resolver":"^0.1.3","uport-did-resolver":"^0.0.3","uport-lite":"^1.0.2"},"jest":{"coverageDirectory":"./coverage/","unmockedModulePathPatterns":["<rootDir>/node_modules/nock"],"testEnvironment":"node"},"devDependencies":{"babel-cli":"^6.26.0","babel-core":"^6.26.0","babel-jest":"^22.4.3","babel-loader":"^7.1.4","babel-plugin-syntax-object-rest-spread":"^6.13.0","babel-plugin-transform-es2015-modules-umd":"^6.24.1","babel-plugin-transform-object-rest-spread":"^6.26.0","babel-plugin-transform-runtime":"^6.23.0","babel-polyfill":"^6.22.0","babel-preset-env":"^1.6.1","body-parser":"^1.17.1","express":"^4.15.2","jest":"^22.4.3","jsdoc":"^3.4.3","jsdoc-to-markdown":"^1.3.7","json-loader":"^0.5.4","mockdate":"^2.0.1","webpack":"^4.6.0","webpack-cli":"^2.0.15"},"readme":"# uport-credentials\n\n## Integrate uPort in your javascript application\n\nuPort provides a simple way for your users to login to your website and provide private credentials such as identity information and contact details to you.\n\nYou can also “attest” credentials they provide to you or that you yourself have about them. This can be shared back to your customers so you can help them build their digital identity.\n\nUport.js provides a simple way for you to integrate uport.js into your javascript application. You can also interact with your uPort users directly in the browser.\n\nWe have an easy to use browser library [uport-connect](https://github.com/uport-project/uport-connect) which can help you do so.\n\n### What is a uPort identity?\n\nAn identity in uPort is really just someone or something that can sign data or transactions and also receive signed data about itself.\n\nAn identity can:\n\n- Sign JWTs (JSON Web Tokens)\n  - [Authenticate themselves to a third party](messages/shareresp.md)\n  - [Disclose private information about themselves](messages/shareresp.md)\n- [Receive requests for disclosure about themselves](messages/sharereq.md)\n- [Receive and store signed third party verifications about themselves](flows/verification.md)\n- [Sign Ethereum transactions](flows/tx.md)\n\nWhen interacting privately with a user you will be interchanging signed JWT([JSON Web Token](https://jwt.io/)). To verify the signature of the JWT you and your users will be fetching your public key from the public profile.\n\nFor details on uPort's underlying architecture, read our [spec repo](https://github.com/uport-project/specs) or check out the [uPort identity contracts] (https://github.com/uport-project/uport-identity).\n\n## Configure your application\n\nIn your application you must first configure your uPort object.\n\n```javascript\nimport { Credentials } from 'uport-credentials'\n\n// For new ethereum based addresses\nconst credentials = new Credentials({\n  appName: 'App Name',\n  did: 'did:ethr:0x....',\n  privateKey: process.env.PRIVATE_KEY\n})\n\n// You can create a new identity\n\nconsole.log(Credentials.createIdentity())\n\n// For legacy application identity created on App Manager\nconst credentials = new Credentials({\n  appName: 'App Name',\n  address: 'MNID Encoded uPort Address For Your App',\n  privateKey: process.env.PRIVATE_KEY\n})\n\n\n```\n\n## Requesting information from your users\n\nTo request information from your user you create a Selective Disclosure Request JWT and present it to your user in the web browser.\n\nThe most basic request to get a users public uport identity details:\n\n```javascript\ncredentials.requestDisclosure().then(requestToken => {\n  // send requestToken to browser\n})\n```\n\nYou can ask for specific private data like this:\n\n```javascript\ncredentials.requestDisclosure({\n    requested: ['name','phone','identity_no'],\n    callbackUrl: 'https://....' // URL to send the response of the request to\n  }.then(requestToken => {\n  // send requestToken to browser\n  })\n```\n\nIf you need to know the users address on a specific ethereum network, specify it's `network_id` (currently defaults to ropsten `0x3`). In this case be aware that the `address` returned will be the address on the public network (currently ropsten) for the users profile. The requested network address will be in the `networkAddress` field and will be MNID encoded.\n\n```javascript\ncredentials.requestDisclosure({network_id: '0x4'}).then(requestToken => {\n  // send requestToken to browser\n})\n```\n\nBack in your server code you receive the token:\n\n```javascript\ncredentials.authenticate(responseToken).then(profile => {\n  // Store user profile\n})\n```\n\n### Stateless Challenge/Response\n\nTo ensure that the response received was created as a response to your selective disclosure request above, the original request is included in the response from the mobile app.\n\nThe default verification rule is that the issuer of the embedded request must match the clientId in your Credentials object and that the original request has not yet expired.\n\nSome applications that exclusively live in the browser are unable to sign the original request. In those cases the request token verification is ignored.\n\n### Requesting Push notification tokens from your users\n\nAs part of the selective disclosure request you can ask for permission from your users to communicate directly with their app.\n\n```javascript\ncredentials.createRequest({\n  requested:[...],\n  notifications: true\n}).then(requestToken => {\n  // send to browser\n})\n```\n\nPresent it to the user like before. On the server you can receive the push token like this:\n\n```javascript\ncredentials.receive(responseToken).then(profile => {\n  // Store user profile\n  // Store push token securely\n  console.log(profile.pushToken)\n})\n```\n\n## Attesting information about your users\n\nAttesting information about your users helps add real value to your application. Your users will use uport to build up their own digital identity and your business is an important part of this.\n\nIf you're a financial institution you may be able to attest to KYC related information such as national identity numbers. If you're an educational application you may want to attest to your users achievements in a way that they can securely share.\n\n### What are attestations\n\nAttestations are shareable private information that one party can sign about another party. They are designed to be shared privately by you to your users and by them to other users.\n\n### Creating an attestation\n\n```javascript\ncredentials.attest({\n  sub: '0x...', // uport address of user\n  exp: <future timestamp>, // If your information is not permanent make sure to add an expires timestamp\n  claims: {name:'John Smith'}\n}).then(attestation => {\n  // send attestation to user\n})\n```\n\nAs before you will want to send this to your user. You can do this in the browser\n\n```javascript\nconst connect = new uportconnect.Connect('app name')\nconnect.showRequest(attestation) // no response is needed for an attestation\n```\n\nIf you requested a push notification token in the above selective disclosure step you can also send attestations directly to your users app in real time.\n\n```javascript\ncredentials.push(pushToken, `me.uport:add?attestation=${attestationjwt}`, message).then(response => {\n\n})\n```\n\n## Asking users to sign Ethereum transactions\n\nEthereum smart contracts live on the blockchain and at a certain address. The application interface is known as the abi and can be created by the Solidity compiler.\n\nOur Contract class will let you create a javascript object modelling the SmartContract allowing you to create uport uri's that you can send to the user.\n\n```javascript\nimport { Contract } from 'uport-credentials'\nconst abi = // import from json or have directly in code\nconst contract = Contract(abi).at(contractAddress)\n// creates a request for the user to call the transfer() function on the smart contract\nconst txRequest = tokenContract.transfer(....)\n```\n\nIn your front end use 'uport-connect' to present it to your user either as a QR code or as a uport-button depending on whether they are on a desktop or mobile browser.\n\n```javascript\nconst connect = new uportconnect.Connect('app name')\nconnect.sendTransaction(txRequest).then(txResponse => {\n  // send response back to server\n})\n```\n\nBack in your server code you receive the `txResponse`. This is a standard ethereum transaction object that you can verify.\n\n","readmeFilename":"README.md","gitHead":"b35037f2ead4b33637458c7ed31468269380e734","_id":"uport@0.7.0-alpha-8","_npmVersion":"5.3.0","_nodeVersion":"8.4.0","_npmUser":{"name":"zachferland","email":"zachferland@gmail.com"},"dist":{"integrity":"sha512-cLbUcM3CsKJlwYvHgYnGpdRRIvYqFrr9qfHhl4LM/fgKe8VMRTexezawG+k2As200ybZvLh2D15syNmx52XzpQ==","shasum":"3b6921a4649ff3694404c0b369d7c4483652eecd","tarball":"https://registry.npmjs.org/uport/-/uport-0.7.0-alpha-8.tgz","fileCount":18,"unpackedSize":660299,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbYwlWCRA9TVsSAnZWagAAufkP/22EgX6/l0GtIuQlLLIK\nZwTCu0oBPQfymU6pGAyJxSyvKk3dgMyxu0slicTBb2Is9xg8Z36//uuwBhgp\nkHpR6N7NbW52jra+Z842ITLxiF/ad4CQaAccB3x7Wg8hsK9i9k8jwN0x15xU\nwSjNNt42YFP3vWrZXxf2qvg2GjQP45P0HfLeJS3U/arhI8+0p0BXjqrcHfbt\njcLwm54HnUvkh3tVi7fvPyT4SDhuGSWMYmjB0E/PnUvngl3+COg7jsg2u6gi\nAKXRpdfLIykmZ3mqtN4U/NgoWc4CxpG5JVIE+UqtzgFbLnur1x9sH7Aui/H0\nmRs65Pgmst+ipXKRuaSUoxsC6tj6Wyjw/pgZPUvRfRI87GAa0NAS9Od+gWOC\nJOgqCp9BHS9KGMaNbnsL+h+SaBfa/pCVAzbCXLCTS/B1Dr+i0CakyraNB9R0\nHQujmU7uxK15xSSyywIIaILLiuBXjWcjYEEc2X+IBT90qEHJW7PUwKyfkvkj\nLVY8J3hT9syIScbu64eCTcTtOSyUwxXyf86TNF8kE8otKvApUfPvQOrEbowC\nZy97p2vfoImWRLwck9o2Xah5NbOHyWtLA6uvqtn3pQZhjOjQpohbWHRdHqoS\n5xj/M2ZJbVLxMxMtAspdWpeDRra/sxGPvX+pKuEiGa+9zj/gS8cQq9/U1j8F\njIQG\r\n=hFAs\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHh6OwkxUDmpVkPoM3+kK8jPn5O9MrKXtT7rpjX1BU70AiEAhGY+dhNoYYh9DN2VXXwAZsqVFGB4gfw7DDzru1azydk="}]},"maintainers":[{"email":"levi.strope@gmail.com","name":"localredhead"},{"email":"oed3933@gmail.com","name":"oed"},{"email":"pelleb@gmail.com","name":"pelleb"},{"email":"zachferland@gmail.com","name":"zachferland"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/uport_0.7.0-alpha-8_1533217109760_0.49802783751841795"},"_hasShrinkwrap":false},"0.7.0-alpha-9":{"name":"uport","version":"0.7.0-alpha-9","description":"Library for interacting with uport profiles and attestations","main":"lib/index.js","files":["lib","dist","src","tutorial"],"scripts":{"test":"jest","test:ci":"jest -u --coverage","build:es5":"babel src -d lib","build:browser":"webpack --config webpack.config.js","build":"yarn build:es5 && yarn test:ci && yarn build:browser","build:docs:html":"jsdoc src/* README.md -d docs","build:docs:md":"./node_modules/jsdoc-to-markdown/bin/cli.js -f src/* --template \"./template.hbs\" -c js2doc.conf > docs/reference/index.md; echo","build:docs":"npm run build:docs:html && npm run build:docs:md","prepublish":"yarn build"},"author":{"name":"Pelle Braendgaard","email":"pelle.braendgaard@consensys.net"},"license":"Apache-2.0","dependencies":{"did-jwt":"^0.0.8","did-resolver":"^0.0.4","ethjs-util":"^0.1.6","ethr-did-resolver":"^0.1.1","mnid":"^0.1.1","muport-did-resolver":"^0.1.3","uport-did-resolver":"^0.0.3","uport-lite":"^1.0.2"},"jest":{"coverageDirectory":"./coverage/","unmockedModulePathPatterns":["<rootDir>/node_modules/nock"],"testEnvironment":"node"},"devDependencies":{"babel-cli":"^6.26.0","babel-core":"^6.26.3","babel-jest":"^22.4.3","babel-loader":"^7.1.4","babel-plugin-syntax-object-rest-spread":"^6.13.0","babel-plugin-transform-es2015-modules-umd":"^6.24.1","babel-plugin-transform-object-rest-spread":"^6.26.0","babel-plugin-transform-runtime":"^6.23.0","babel-polyfill":"^6.22.0","babel-preset-env":"^1.6.1","body-parser":"^1.18.3","express":"^4.16.3","jest":"^22.4.3","jsdoc-to-markdown":"^4.0.1","json-loader":"^0.5.4","mockdate":"^2.0.1","nock":"^9.4.3","webpack":"^4.16.2","webpack-cli":"^2.0.15"},"readme":"# uport-credentials\n\n## Integrate uPort in your javascript application\n\nuPort provides a simple way for your users to login to your website and provide private credentials such as identity information and contact details to you.\n\nYou can also “attest” credentials they provide to you or that you yourself have about them. This can be shared back to your customers so you can help them build their digital identity.\n\nUport.js provides a simple way for you to integrate uport.js into your javascript application. You can also interact with your uPort users directly in the browser.\n\nWe have an easy to use browser library [uport-connect](https://github.com/uport-project/uport-connect) which can help you do so.\n\n### What is a uPort identity?\n\nAn identity in uPort is really just someone or something that can sign data or transactions and also receive signed data about itself.\n\nAn identity can:\n\n- Sign JWTs (JSON Web Tokens)\n  - [Authenticate themselves to a third party](messages/shareresp.md)\n  - [Disclose private information about themselves](messages/shareresp.md)\n- [Receive requests for disclosure about themselves](messages/sharereq.md)\n- [Receive and store signed third party verifications about themselves](flows/verification.md)\n- [Sign Ethereum transactions](flows/tx.md)\n\nWhen interacting privately with a user you will be interchanging signed JWT([JSON Web Token](https://jwt.io/)). To verify the signature of the JWT you and your users will be fetching your public key from the public profile.\n\nFor details on uPort's underlying architecture, read our [spec repo](https://github.com/uport-project/specs) or check out the [uPort identity contracts] (https://github.com/uport-project/uport-identity).\n\n## Configure your application\n\nIn your application you must first configure your uPort object.\n\n```javascript\nimport { Credentials } from 'uport-credentials'\n\n// For new ethereum based addresses\nconst credentials = new Credentials({\n  appName: 'App Name',\n  did: 'did:ethr:0x....',\n  privateKey: process.env.PRIVATE_KEY\n})\n\n// You can create a new identity\n\nconsole.log(Credentials.createIdentity())\n\n// For legacy application identity created on App Manager\nconst credentials = new Credentials({\n  appName: 'App Name',\n  address: 'MNID Encoded uPort Address For Your App',\n  privateKey: process.env.PRIVATE_KEY\n})\n\n\n```\n\n## Requesting information from your users\n\nTo request information from your user you create a Selective Disclosure Request JWT and present it to your user in the web browser.\n\nThe most basic request to get a users public uport identity details:\n\n```javascript\ncredentials.requestDisclosure().then(requestToken => {\n  // send requestToken to browser\n})\n```\n\nYou can ask for specific private data like this:\n\n```javascript\ncredentials.requestDisclosure({\n    requested: ['name','phone','identity_no'],\n    callbackUrl: 'https://....' // URL to send the response of the request to\n  }.then(requestToken => {\n  // send requestToken to browser\n  })\n```\n\nIf you need to know the users address on a specific ethereum network, specify it's `network_id` (currently defaults to ropsten `0x3`). In this case be aware that the `address` returned will be the address on the public network (currently ropsten) for the users profile. The requested network address will be in the `networkAddress` field and will be MNID encoded.\n\n```javascript\ncredentials.requestDisclosure({network_id: '0x4'}).then(requestToken => {\n  // send requestToken to browser\n})\n```\n\nBack in your server code you receive the token:\n\n```javascript\ncredentials.authenticate(responseToken).then(profile => {\n  // Store user profile\n})\n```\n\n### Stateless Challenge/Response\n\nTo ensure that the response received was created as a response to your selective disclosure request above, the original request is included in the response from the mobile app.\n\nThe default verification rule is that the issuer of the embedded request must match the clientId in your Credentials object and that the original request has not yet expired.\n\nSome applications that exclusively live in the browser are unable to sign the original request. In those cases the request token verification is ignored.\n\n### Requesting Push notification tokens from your users\n\nAs part of the selective disclosure request you can ask for permission from your users to communicate directly with their app.\n\n```javascript\ncredentials.createRequest({\n  requested:[...],\n  notifications: true\n}).then(requestToken => {\n  // send to browser\n})\n```\n\nPresent it to the user like before. On the server you can receive the push token like this:\n\n```javascript\ncredentials.receive(responseToken).then(profile => {\n  // Store user profile\n  // Store push token securely\n  console.log(profile.pushToken)\n})\n```\n\n## Attesting information about your users\n\nAttesting information about your users helps add real value to your application. Your users will use uport to build up their own digital identity and your business is an important part of this.\n\nIf you're a financial institution you may be able to attest to KYC related information such as national identity numbers. If you're an educational application you may want to attest to your users achievements in a way that they can securely share.\n\n### What are attestations\n\nAttestations are shareable private information that one party can sign about another party. They are designed to be shared privately by you to your users and by them to other users.\n\n### Creating an attestation\n\n```javascript\ncredentials.attest({\n  sub: '0x...', // uport address of user\n  exp: <future timestamp>, // If your information is not permanent make sure to add an expires timestamp\n  claims: {name:'John Smith'}\n}).then(attestation => {\n  // send attestation to user\n})\n```\n\nAs before you will want to send this to your user. You can do this in the browser\n\n```javascript\nconst connect = new uportconnect.Connect('app name')\nconnect.showRequest(attestation) // no response is needed for an attestation\n```\n\nIf you requested a push notification token in the above selective disclosure step you can also send attestations directly to your users app in real time.\n\n```javascript\ncredentials.push(pushToken, `me.uport:add?attestation=${attestationjwt}`, message).then(response => {\n\n})\n```\n\n## Asking users to sign Ethereum transactions\n\nEthereum smart contracts live on the blockchain and at a certain address. The application interface is known as the abi and can be created by the Solidity compiler.\n\nOur Contract class will let you create a javascript object modelling the SmartContract allowing you to create uport uri's that you can send to the user.\n\n```javascript\nimport { Contract } from 'uport-credentials'\nconst abi = // import from json or have directly in code\nconst contract = Contract(abi).at(contractAddress)\n// creates a request for the user to call the transfer() function on the smart contract\nconst txRequest = tokenContract.transfer(....)\n```\n\nIn your front end use 'uport-connect' to present it to your user either as a QR code or as a uport-button depending on whether they are on a desktop or mobile browser.\n\n```javascript\nconst connect = new uportconnect.Connect('app name')\nconnect.sendTransaction(txRequest).then(txResponse => {\n  // send response back to server\n})\n```\n\nBack in your server code you receive the `txResponse`. This is a standard ethereum transaction object that you can verify.\n\n","readmeFilename":"README.md","gitHead":"a2fc497ddf2dec1028514b4925e19ac4eebf23ab","_id":"uport@0.7.0-alpha-9","_npmVersion":"5.3.0","_nodeVersion":"8.4.0","_npmUser":{"name":"zachferland","email":"zachferland@gmail.com"},"dist":{"integrity":"sha512-pnqHuyeeAhBXpW8+RAvRqe9G1o5PY4tOCHHo/OjcQaURflnc/FAhQyKNKOYRI91q+V51kTf3t2RuUsIKlmSpEw==","shasum":"732948f6cb40ec653e17d49b34ac17d80246903e","tarball":"https://registry.npmjs.org/uport/-/uport-0.7.0-alpha-9.tgz","fileCount":20,"unpackedSize":1118335,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbfdTeCRA9TVsSAnZWagAAsocP/A0WP7wuhs7rvRXQJXjS\n15/7xbQW1+H5of5OQghWxTWi0bUXj9/4sLjYmlq5cH1evlmkd4G+od/w/tdu\njzZegfSCCpmajV0oYLtLbjcFoKIJDLth1Nq5SRSGb8RsVNStFurDyPKb/Euq\nBUkfcc/Tk7fyG4hPttILSCpkjfHqMfJ7p7anSWWLt28mg7cGj1TDdLhrbJtz\n2NjjAvgVg8tRhY/8G+HKM+jV0QNP42zbXbbKh0Qz7KVVUkxiWKJW2oSO4sS7\nV+BILmROXdXvc3ICmfBwmrgmCbTi4kTJ+wwnBrNZSblKJeMmlihXJbkC2hVb\nbq+ppS57/UvcW4RJLRTER+1yG2q9fsmuKtBfZcgrDP8nFQW3kepNZ8XQNc/g\nuVpLnTThqfxkNFdIGwD8UJqeYZlHnkK+SaYwJVaH29Q4A8ifbxXge6pMqVvj\noKh39VUf85RfN3lcl/YUruXPGijnFAXzFc9pOpZk1/nqPojg3fnGMuzbKRfs\nqtfFFjwiFbCHUUwLDz+R1skTTkeXrD58wp10lOSqq/wxmuE8AVst7Mg0MJ2+\nDvmWCcyAyUpRuttc3oR6xHcmO+6r/BLrg90VAmeDxLs+q1ZvEMMkwI1VzfJe\nkwW27BYc1utQooW8TttWWWH+INQRaLUSXfuxWsGGVDojipQ0KpaisyCEbK2f\nGYLM\r\n=5CDX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDg1RyGMTYh4HoRtI/+yRgEp6w52UlozeVPGpxJlTSxQQIgYtEb2km0YqXNy4xcsaMHRH4RWHrBWlfsdeeNa+nlstI="}]},"maintainers":[{"email":"levi.strope@gmail.com","name":"localredhead"},{"email":"oed3933@gmail.com","name":"oed"},{"email":"pelleb@gmail.com","name":"pelleb"},{"email":"zachferland@gmail.com","name":"zachferland"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/uport_0.7.0-alpha-9_1534973150169_0.6583871490953201"},"_hasShrinkwrap":false},"0.6.4":{"name":"uport","version":"0.6.4","description":"Library for interacting with uport profiles and attestations","main":"lib/index.js","files":["lib","dist","src","tutorial"],"scripts":{"test":"jest","test:ci":"jest -u --coverage","build:es5":"babel src -d lib","build:browser":"webpack --config webpack.config.js","build":"yarn build:es5 && yarn test:ci && yarn build:browser","build:docs:html":"jsdoc src/* README.md -d docs","build:docs:md":"./node_modules/jsdoc-to-markdown/bin/cli.js -f src/* --template 'template.hbs' -c js2doc.conf > docs/reference/index.md; echo","build:docs":"npm run build:docs:html && npm run build:docs:md","prepublish":"yarn build"},"author":{"name":"Pelle Braendgaard","email":"pelle.braendgaard@consensys.net"},"license":"MIT","dependencies":{"base64url":"^3.0.0","did-jwt":"^0.0.7","did-resolver":"^0.0.4","ethjs-util":"^0.1.3","ethr-did-resolver":"^0.1.1","jsontokens":"^0.7.6","mnid":"^0.1.1","muport-did-resolver":"^0.1.0","nets":"^3.2.0","tweetnacl":"^1.0.0","tweetnacl-util":"^0.15.0","uport-core":"^0.0.43","uport-did-resolver":"^0.0.3","uport-lite":"^1.0.0"},"jest":{"coverageDirectory":"./coverage/","collectCoverage":true,"unmockedModulePathPatterns":["<rootDir>/node_modules/nock"],"testEnvironment":"node"},"devDependencies":{"babel-cli":"^6.26.0","babel-core":"^6.26.0","babel-jest":"^22.4.3","babel-loader":"^7.1.4","babel-plugin-syntax-object-rest-spread":"^6.13.0","babel-plugin-transform-es2015-modules-umd":"^6.24.1","babel-plugin-transform-object-rest-spread":"^6.26.0","babel-plugin-transform-runtime":"^6.23.0","babel-polyfill":"^6.22.0","babel-preset-env":"^1.6.1","body-parser":"^1.17.1","express":"^4.15.2","jest":"^22.4.3","jsdoc":"^3.4.3","jsdoc-to-markdown":"^1.3.7","json-loader":"^0.5.4","mockdate":"^2.0.1","nock":"^9.0.6","webpack":"^4.6.0","webpack-cli":"^2.0.15"},"gitHead":"2647132b229e9e3ceb54b512b273e2b5b2dbe2b3","_id":"uport@0.6.4","_npmVersion":"5.3.0","_nodeVersion":"8.4.0","_npmUser":{"name":"zachferland","email":"zachferland@gmail.com"},"dist":{"integrity":"sha512-Z4XP4aVlLws+3HeqJ/bAs0m9ag8n4wzI5w3269HLirKJ6uCaFBn+BHf2Mj896rP+2aMzzQyH8fUN+dSeWElVHA==","shasum":"b71af1e9ff6479ae1ae187d262d2ca5fd098688d","tarball":"https://registry.npmjs.org/uport/-/uport-0.6.4.tgz","fileCount":22,"unpackedSize":1495597,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbfgoUCRA9TVsSAnZWagAApxYP/A4o4xhOR2b8uMrN43H9\nOuMbiUNV3iWJiL+NxVQgh++KKf5tEZPiZLR30Fxdw+pcVqRIYWZpvpqneH2n\n2F2ok5AV3Hf2NZkM6HCqij5F+8oQgwdG7SV8nNQtgOdnITeSyZXQJG7Zu9j9\nJIAdeFj4WJjbRnAtXT8I/5xpqKrdzSz+I1CskCxLc+7shfDceLB7WZJIFrMB\nKC24aI4UhDDIYpuu/MBz8nDY4EySS3bQcH74gPGKXbBIBcVGsVjZ3ChVLlqE\nQamMRDPtbqjScjZHXDST2HDjK9+3z6cAS3PM+Rz2TLzV51sGX41H0F2SdJ3o\nU7urmEz/VRVQaKq1Kgszs+/3PhzSOSWqj9Pw26yqXrAaEh/1xD852XCWph1r\nUjI0/qyzHJTYj8yCO0lZMnTI7+Wdl+hnb1xW+TPzXJJoe32S3figkrHR110o\ngCuhaxSdLdJD61MiFZ/1rptQH0lcuY72NsH4IxEIw7Ge+VXcNccqUZokVW1S\ns1gG5gqETzf9b3ihnSHUAY/gib+1OjUh3GadQp8RbrPZxqiLCCe9193XVjwt\nq+bmInpR+qKotRKH9RSFy1L+977n4Se4TGf0ol8GR0SG6gWeWTMDedFAwKQ5\njtkSnI+RrZLo792N8JrKR/b/JowNFcBEiLN89zUKmUIsgTb8376MDaHt49eY\nyRPN\r\n=SjHt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBJxaVHakzbkBq8zJbkGq9+yiiWMPrw+QC5uQdJyOgbpAiEAqv85yMGXjwQ6jmClDKDBHXDe8Trvdp8qDMz5koVQIjU="}]},"maintainers":[{"email":"levi.strope@gmail.com","name":"localredhead"},{"email":"oed3933@gmail.com","name":"oed"},{"email":"pelleb@gmail.com","name":"pelleb"},{"email":"zachferland@gmail.com","name":"zachferland"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/uport_0.6.4_1534986771672_0.8027144258476018"},"_hasShrinkwrap":false},"0.7.0-alpha-10":{"name":"uport","version":"0.7.0-alpha-10","description":"Library for interacting with uport profiles and attestations","main":"lib/index.js","scripts":{"test":"jest","test:ci":"jest -u --coverage","build:es5":"babel src -d lib","build:browser":"webpack --config webpack.config.js","build":"yarn build:es5 && yarn test:ci && yarn build:browser","build:docs:html":"jsdoc src/* README.md -d docs","build:docs:md":"./node_modules/jsdoc-to-markdown/bin/cli.js -f src/* --template \"./template.hbs\" -c js2doc.conf > docs/reference/index.md; echo","build:docs":"npm run build:docs:html && npm run build:docs:md","prepublish":"yarn build"},"author":{"name":"Pelle Braendgaard","email":"pelle.braendgaard@consensys.net"},"license":"Apache-2.0","dependencies":{"did-jwt":"^0.0.7","did-resolver":"^0.0.4","ethjs-util":"^0.1.3","ethr-did-resolver":"^0.1.1","jsontokens":"^0.7.8","mnid":"^0.1.1","muport-did-resolver":"^0.1.0","uport-did-resolver":"^0.0.2","uport-lite":"^1.0.2"},"jest":{"coverageDirectory":"./coverage/","unmockedModulePathPatterns":["<rootDir>/node_modules/nock"],"testEnvironment":"node"},"devDependencies":{"babel-cli":"^6.26.0","babel-core":"^6.26.3","babel-jest":"^22.4.3","babel-loader":"^7.1.4","babel-plugin-syntax-object-rest-spread":"^6.13.0","babel-plugin-transform-es2015-modules-umd":"^6.24.1","babel-plugin-transform-object-rest-spread":"^6.26.0","babel-plugin-transform-runtime":"^6.23.0","babel-polyfill":"^6.22.0","babel-preset-env":"^1.6.1","body-parser":"^1.18.3","express":"^4.16.3","jest":"^22.4.3","jsdoc-to-markdown":"^4.0.1","json-loader":"^0.5.4","mockdate":"^2.0.1","nock":"^9.4.3","webpack":"^4.16.2","webpack-cli":"^2.0.15"},"readme":"# uport-credentials\n\n## Integrate uPort in your javascript application\n\nuPort provides a set of tools for creating and managing identities that conform to the [decentralized identifier (DID) specification](), and requesting and exchanging verified data between them.  This library simplifies the process of identity creation within javascript applications, and allows apps to easily sign pieces of data and verify data signed by other identities to facilitate secure communication between parties.  These pieces of data take the form of *signed [JSON web tokens](https://jwt.io/introduction/) (JWTs)* with specific fields designed for use with uPort clients, and described in the uPort [specifications](https://github.com/uport-project/specs), collectively referred to as *verifications*.\n\nTo allow maximum flexibility, this library only deals with creation and validation of verifications.  To pass verifications between a javascript application and a user via the uPort mobile app, we have also developed the [uport-transports](https://github.com/uport-project/uport-transports) library, which may be used in conjunction with this one.  For a simpler, out-of-the-box solution for interacting with a uPort mobile wallet from a web application, we have an easy to use browser library [uport-connect](https://github.com/uport-project/uport-connect).\n\n### What is a uPort identity?\n\nAn identity in uPort is really just someone or something that can sign data or transactions and also receive signed data about itself.\n\nAn identity can:\n\n- Sign JWTs (JSON Web Tokens)\n- [Authenticate themselves to a third party](messages/shareresp.md)\n- [Disclose private information about themselves](messages/shareresp.md)\n- [Receive requests for disclosure about themselves](messages/sharereq.md)\n- [Receive and store signed third party verifications about themselves](flows/verification.md)\n- [Sign Ethereum transactions](flows/tx.md)\n\nWhen interacting privately with a user you will be interchanging signed JWT([JSON Web Token](https://jwt.io/)). To verify the signature of the JWT you and your users will be fetching your public key from the public profile.  \n\nFor details on uPort's underlying architecture, read our [spec repo](https://github.com/uport-project/specs) or check out the [uPort identity contracts](https://github.com/uport-project/uport-identity).\n\n## Configure your application\n\nIn your application you must first configure your uPort object with an identifier and a private key (or signer function).  There are several ways to instantiate a credentials object.  The most common approach is to save a DID and private key on a server for your application, and create a credentials instance from your application's unique private key.  Signed JWTs for requests and verifications can then be passed to a client-side application, and presented to a user as a QR code, or sent via a [transport](http://github.com/uport-project/uport-transports).\n\n```javascript\nimport { Credentials } from 'uport-credentials'\n\n// For ethereum based addresses (ethr-did)\nconst credentials = new Credentials({\n  appName: 'App Name',\n  did: 'did:ethr:0x....',\n  privateKey: process.env.PRIVATE_KEY\n})\n```\n\nThere may also be cases where you want identities to be created dynamically, either in the browser or on a server.  This can be accomplished with the static `Credentials.createIdentity()` method, which generates an ethereum keypair, and returns an object containing the associated did and private key.\n```\n// Create a credentials object for a brand new identity\nconst {did, privateKey} = Credentials.createIdentity()\nconst credentials = new Credentials({\n  appName: 'App Name', did, privateKey\n})\n```\n\nFinally, we continue to support older uport identities described by an [MNID](http://github.com/uport-project/mnid)-encoded ethereum address.  These identifiers can be expressed as a did via the 'uport' did method: `did:uport:<mnid>`\n```\n// For legacy application identity created on App Manager\nconst credentials = new Credentials({\n  appName: 'App Name',\n  address: '2nQtiQG...', // MNID Encoded uPort Address For Your App\n  privateKey: process.env.PRIVATE_KEY\n})\n```\n\n## Requesting information from your users\n\nTo request information from your user you create a Selective Disclosure Request JWT.  When this is presented to a user via a QR code or other [transport](https://github.com/uport-project/uport-transports), they will be prompted to approve sharing the request attributes.  All requests will return a user's `did`.\n\n```javascript\ncredentials.createDisclosureRequest().then(requestToken => {\n  // send requestToken to browser\n})\n```\n\nA selective disclosure request JWT can ask for specific private data, and/or provide a URL to which a mobile app should send a response.\n\n```javascript\ncredentials.createDisclosureRequest().then({\n  requested: ['name', 'phone', 'identity_no'],\n  callbackUrl: 'https://....' // URL to send the response of the request to\n}).then(requestToken => {\n  // send requestToken to browser\n})\n```\n\nIf you need to know the users address on a specific ethereum network, specify it's `networkId` (currently defaults to mainnet `0x1`). In this case be aware that the `address` returned will be the address on the public network (currently mainnet) for the users profile. The requested network address will be in the `networkAddress` field and will be MNID encoded.\n\n```javascript\n// Request an address on Rinkeby\ncredentials.requestDisclosure({networkId: '0x4'}).then(requestToken => {\n  // send requestToken to browser\n})\n```\n\nWhen a response JWT is received, it can be parsed and verified via the `verifyDisclosureResponse()` method, which checks the validity of the signature on the JWT, as well as validity of the original dislcosure request, which is expected as part of the response.  \n\n```javascript\ncredentials.verifyDisclosureResponse(responseToken).then(verifiedData => {\n  // Do stuff with verified data\n})\n```\n\n### Stateless Challenge/Response\n\nTo ensure that the response received was created as a response to your selective disclosure request above, the original request is included in the response from the mobile app.\n\nThe verification rule for the Selective Disclosure Response is that the issuer of the embedded request must match the did in your Credentials object and that the original request has not yet expired.  This is to be sure that when requesting data from a user, only a response to your initial request will be accepted as valid.  If you would like to consume an arbitrary signed JWT that is not part of a particular selective disclosure flow, you can use the `verifyDisclosure()` method to skip the challenge/response check.\n\n### Requesting Push notification tokens from your users\n\nAs part of the selective disclosure request you can also ask for permission from your users to communicate directly with their app.  With a push token, you can configure a [transport](https://github.com/uport-project/uport-transports) to send JWTs via push.\n\n```javascript\ncredentials.createRequest({\n  requested:[...],\n  notifications: true\n}).then(requestToken => {\n  // send to browser\n})\n```\nIf the user approves the use of push notifications, the selective disclosure response will contain a `pushToken` field, which can be saved when the response is received and verified.\n\n```javascript\ncredentials.verifyDisclosureResponse(responseToken).then(verifiedData => {\n  // Store push token securely\n  doSomethingWith(verifiedData.pushToken)\n})\n```\n\n## Attesting information about your users\nIn addition to requesting and verifying information, you can also sign new data on behalf of your application and share it with your users in the form of _attestations_, also known as _verifications_.  By presenting an attestation to a user, you are making a claim about them, and are _attesting_ to its truth with your application's signature.  Exactly what information your app should attest to depends the context -- If you're a financial institution you may be able to attest to KYC related information such as national identity numbers. If you're an educational application you may want to attest to your users achievements in a way that they can securely share.  Anyone with access to your application's `did` can verify that a particular attestation came from your app.\n\nAttesting to information about your users helps add real value to your application, and your users will use uPort to build up their own digital identity.\n\n### Creating an attestation\n\n```javascript\ncredentials.createVerification({\n  sub: '0x...', // uport address of user\n  exp: <future timestamp>, // If your information is not permanent make sure to add an expires timestamp\n  claims: {name: 'John Smith'}\n}).then(attestation => {\n  // send attestation to user\n})\n```\nAs with a verification request, you will want to send this JWT to your user. You can do this in the browser via QR, using push with a previously requested pushToken, or via another [transport](https://github.com/uport-project/uport-transports) of your choosing.\n\n## Asking users to sign Ethereum transactions\n\nFinally, as uPort is based in the Ethereum blockchain, uPort Credentials can be used to request that a user call a particular Ethereum smart contract function.  Smart contracts live on the blockchain at a certain address, and expose public functions that can be called according to their ABI.  Using the `Credentials.contract` method, you can create an object from a contract abi that will create transaction request JWTs for each contract method, that can be presented to a user's mobile application like any other JWT described above.  This is just a wrapper around `Credentials.createTxRequest()`, which generates the txObject for a particular contract method call.\n\n```javascript\nimport abi from './myContractAbi.json'\nconst myContract = Credentials.contract(abi).at(contractAddress)\n// creates a request for the user to call the transfer() function on the smart contract\nconst txRequest = myContract.transfer(...).then(txRequestToken => {\n  // send tx request token to user\n})\n```\n---------------------------------------------------\n\nThis library is part of a suite of tools maintained by the uPort Project, a Consensys formation.  For more information on the project, visit [uport.me](https://uport.me)\n\n","readmeFilename":"README.md","gitHead":"997e06f5d1a953431d8a73a74343fc48433e80e7","_id":"uport@0.7.0-alpha-10","_npmVersion":"5.3.0","_nodeVersion":"8.4.0","_npmUser":{"name":"zachferland","email":"zachferland@gmail.com"},"dist":{"integrity":"sha512-hIqvqWhxh5ADUaPFLZGB6B+nmSTzvLxovsWvA2OUtJk5gKwnEmUrjlA6lQGFFol59ZKDhk6W49YZev4+jMG1Kg==","shasum":"5ef60e742b53fe631b3044f15e297cb872e81129","tarball":"https://registry.npmjs.org/uport/-/uport-0.7.0-alpha-10.tgz","fileCount":19,"unpackedSize":991659,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbkUS+CRA9TVsSAnZWagAAVxgP/3X61ZVj7z8ltBXohLnv\nejJtv0SXF2KHRvJvbf8ZQe0LBmpuJ4yNGPUv5CeN8/1OlazRSDnOGFKsrdIu\n3vAxM0Sq0B+IGyEDfbdOLIc6meIewHdiDFdQAsyuoHKbg+GO3W3L4m0JIRe9\n5ft4HdkaNzvgejShjnLT+Ax3V9kzjAeJFxx4nfhlA1vvHcUuLVEvjyocxSWd\nKLJXgF5zdu7khUTuZeOOcgNT4ZeqLVKkL+MiIOgVIVxsasAE/pV35FUYZZp0\nNlR7ifFjFE0ZZaI6xO8RPKxLn2R6LIIjorD/cGjKuoQsazmIyrJHWiMjVMmw\neq1hHNI7Oucy7eiwbGSMDwiNbvqKXK9BDjxX5MNkTjUkxyz8MACRNetZyNP/\nWzki5Umyf0FJba89+8yyXDUj2diXKO1RJGHtRjkwkHCv2OeVvB6ReqxOHvNQ\nBCLVujspNrI+EFgjcUOHXS1UcUMS/YOfcn9tW0QlHLBcaXawmCnpiMSJNrQw\nvQJuUyMtOfSgeUP7v5c6q0PGlgysBxXE0XfWIezWhtCHelIK4whcfVKCyqjb\nsWe7arbYMF+XP2EBb5cvLF9K2ObrlngIaY+s5o3ty7dNU8ULv4yEOp2w+RfW\n6PMJ+Bo6A6CiSm23P20mg+Lt4VUoT1sWPRFj/tj08BygP5qjJ5dnz+PT1Mw6\nkPpS\r\n=jmr5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFegGUV0UzMGVGJDV04vpsCWPSBPV2jfI2JgdCvaVTClAiBF4Z2ydiuP4XPGKQStS1IYyby3gerF4m0M4X6D3dDeXA=="}]},"maintainers":[{"email":"levi.strope@gmail.com","name":"localredhead"},{"email":"oed3933@gmail.com","name":"oed"},{"email":"pelleb@gmail.com","name":"pelleb"},{"email":"zachferland@gmail.com","name":"zachferland"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/uport_0.7.0-alpha-10_1536246973738_0.6269374004191688"},"_hasShrinkwrap":false},"0.7.0-alpha-11":{"name":"uport","version":"0.7.0-alpha-11","description":"Library for interacting with uport profiles and attestations","main":"lib/index.js","scripts":{"test":"jest","test:ci":"jest -u --coverage","build:es5":"babel src -d lib","build:browser":"webpack --config webpack.config.js","build":"yarn build:es5 && yarn test:ci && yarn build:browser","build:docs:html":"jsdoc src/* README.md -d docs","build:docs:md":"./node_modules/jsdoc-to-markdown/bin/cli.js -f src/* --template \"./template.hbs\" -c js2doc.conf > docs/reference/index.md; echo","build:docs":"npm run build:docs:html && npm run build:docs:md","prepublish":"yarn build"},"author":{"name":"Pelle Braendgaard","email":"pelle.braendgaard@consensys.net"},"license":"Apache-2.0","dependencies":{"did-jwt":"^0.0.7","did-resolver":"^0.0.4","ethjs-util":"^0.1.3","ethr-did-resolver":"^0.1.1","mnid":"^0.1.1","muport-did-resolver":"^0.1.0","uport-did-resolver":"^0.0.2","uport-lite":"^1.0.2"},"jest":{"coverageDirectory":"./coverage/","unmockedModulePathPatterns":["<rootDir>/node_modules/nock"],"testEnvironment":"node"},"devDependencies":{"babel-cli":"^6.26.0","babel-core":"^6.26.3","babel-jest":"^22.4.3","babel-loader":"^7.1.4","babel-plugin-syntax-object-rest-spread":"^6.13.0","babel-plugin-transform-es2015-modules-umd":"^6.24.1","babel-plugin-transform-object-rest-spread":"^6.26.0","babel-plugin-transform-runtime":"^6.23.0","babel-polyfill":"^6.22.0","babel-preset-env":"^1.6.1","body-parser":"^1.18.3","express":"^4.16.3","jest":"^22.4.3","jsdoc-to-markdown":"^4.0.1","json-loader":"^0.5.4","mockdate":"^2.0.1","nock":"^9.4.3","webpack":"^4.16.2","webpack-cli":"^2.0.15"},"readme":"# uport-credentials\n\n## Integrate uPort in your javascript application\n\nuPort provides a set of tools for creating and managing identities that conform to the [decentralized identifier (DID) specification](), and requesting and exchanging verified data between them.  This library simplifies the process of identity creation within javascript applications, and allows apps to easily sign pieces of data and verify data signed by other identities to facilitate secure communication between parties.  These pieces of data take the form of *signed [JSON web tokens](https://jwt.io/introduction/) (JWTs)* with specific fields designed for use with uPort clients, and described in the uPort [specifications](https://github.com/uport-project/specs), collectively referred to as *verifications*.\n\nTo allow maximum flexibility, this library only deals with creation and validation of verifications.  To pass verifications between a javascript application and a user via the uPort mobile app, we have also developed the [uport-transports](https://github.com/uport-project/uport-transports) library, which may be used in conjunction with this one.  For a simpler, out-of-the-box solution for interacting with a uPort mobile wallet from a web application, we have an easy to use browser library [uport-connect](https://github.com/uport-project/uport-connect).\n\n### What is a uPort identity?\n\nAn identity in uPort is really just someone or something that can sign data or transactions and also receive signed data about itself.\n\nAn identity can:\n\n- Sign JWTs (JSON Web Tokens)\n- [Authenticate themselves to a third party](messages/shareresp.md)\n- [Disclose private information about themselves](messages/shareresp.md)\n- [Receive requests for disclosure about themselves](messages/sharereq.md)\n- [Receive and store signed third party verifications about themselves](flows/verification.md)\n- [Sign Ethereum transactions](flows/tx.md)\n\nWhen interacting privately with a user you will be interchanging signed JWT([JSON Web Token](https://jwt.io/)). To verify the signature of the JWT you and your users will be fetching your public key from the public profile.  \n\nFor details on uPort's underlying architecture, read our [spec repo](https://github.com/uport-project/specs) or check out the [uPort identity contracts](https://github.com/uport-project/uport-identity).\n\n## Configure your application\n\nIn your application you must first configure your uPort object with an identifier and a private key (or signer function).  There are several ways to instantiate a credentials object.  The most common approach is to save a DID and private key on a server for your application, and create a credentials instance from your application's unique private key.  Signed JWTs for requests and verifications can then be passed to a client-side application, and presented to a user as a QR code, or sent via a [transport](http://github.com/uport-project/uport-transports).\n\n```javascript\nimport { Credentials } from 'uport-credentials'\n\n// For ethereum based addresses (ethr-did)\nconst credentials = new Credentials({\n  appName: 'App Name',\n  did: 'did:ethr:0x....',\n  privateKey: process.env.PRIVATE_KEY\n})\n```\n\nThere may also be cases where you want identities to be created dynamically, either in the browser or on a server.  This can be accomplished with the static `Credentials.createIdentity()` method, which generates an ethereum keypair, and returns an object containing the associated did and private key.\n```\n// Create a credentials object for a brand new identity\nconst {did, privateKey} = Credentials.createIdentity()\nconst credentials = new Credentials({\n  appName: 'App Name', did, privateKey\n})\n```\n\nFinally, we continue to support older uport identities described by an [MNID](http://github.com/uport-project/mnid)-encoded ethereum address.  These identifiers can be expressed as a did via the 'uport' did method: `did:uport:<mnid>`\n```\n// For legacy application identity created on App Manager\nconst credentials = new Credentials({\n  appName: 'App Name',\n  address: '2nQtiQG...', // MNID Encoded uPort Address For Your App\n  privateKey: process.env.PRIVATE_KEY\n})\n```\n\n## Requesting information from your users\n\nTo request information from your user you create a Selective Disclosure Request JWT.  When this is presented to a user via a QR code or other [transport](https://github.com/uport-project/uport-transports), they will be prompted to approve sharing the request attributes.  All requests will return a user's `did`.\n\n```javascript\ncredentials.createDisclosureRequest().then(requestToken => {\n  // send requestToken to browser\n})\n```\n\nA selective disclosure request JWT can ask for specific private data, and/or provide a URL to which a mobile app should send a response.\n\n```javascript\ncredentials.createDisclosureRequest().then({\n  requested: ['name', 'phone', 'identity_no'],\n  callbackUrl: 'https://....' // URL to send the response of the request to\n}).then(requestToken => {\n  // send requestToken to browser\n})\n```\n\nIf you need to know the users address on a specific ethereum network, specify it's `networkId` (currently defaults to mainnet `0x1`). In this case be aware that the `address` returned will be the address on the public network (currently mainnet) for the users profile. The requested network address will be in the `networkAddress` field and will be MNID encoded.\n\n```javascript\n// Request an address on Rinkeby\ncredentials.requestDisclosure({networkId: '0x4'}).then(requestToken => {\n  // send requestToken to browser\n})\n```\n\nWhen a response JWT is received, it can be parsed and verified via the `verifyDisclosureResponse()` method, which checks the validity of the signature on the JWT, as well as validity of the original dislcosure request, which is expected as part of the response.  \n\n```javascript\ncredentials.verifyDisclosureResponse(responseToken).then(verifiedData => {\n  // Do stuff with verified data\n})\n```\n\n### Stateless Challenge/Response\n\nTo ensure that the response received was created as a response to your selective disclosure request above, the original request is included in the response from the mobile app.\n\nThe verification rule for the Selective Disclosure Response is that the issuer of the embedded request must match the did in your Credentials object and that the original request has not yet expired.  This is to be sure that when requesting data from a user, only a response to your initial request will be accepted as valid.  If you would like to consume an arbitrary signed JWT that is not part of a particular selective disclosure flow, you can use the `verifyDisclosure()` method to skip the challenge/response check.\n\n### Requesting Push notification tokens from your users\n\nAs part of the selective disclosure request you can also ask for permission from your users to communicate directly with their app.  With a push token, you can configure a [transport](https://github.com/uport-project/uport-transports) to send JWTs via push.\n\n```javascript\ncredentials.createRequest({\n  requested:[...],\n  notifications: true\n}).then(requestToken => {\n  // send to browser\n})\n```\nIf the user approves the use of push notifications, the selective disclosure response will contain a `pushToken` field, which can be saved when the response is received and verified.\n\n```javascript\ncredentials.verifyDisclosureResponse(responseToken).then(verifiedData => {\n  // Store push token securely\n  doSomethingWith(verifiedData.pushToken)\n})\n```\n\n## Attesting information about your users\nIn addition to requesting and verifying information, you can also sign new data on behalf of your application and share it with your users in the form of _attestations_, also known as _verifications_.  By presenting an attestation to a user, you are making a claim about them, and are _attesting_ to its truth with your application's signature.  Exactly what information your app should attest to depends the context -- If you're a financial institution you may be able to attest to KYC related information such as national identity numbers. If you're an educational application you may want to attest to your users achievements in a way that they can securely share.  Anyone with access to your application's `did` can verify that a particular attestation came from your app.\n\nAttesting to information about your users helps add real value to your application, and your users will use uPort to build up their own digital identity.\n\n### Creating an attestation\n\n```javascript\ncredentials.createVerification({\n  sub: '0x...', // uport address of user\n  exp: <future timestamp>, // If your information is not permanent make sure to add an expires timestamp\n  claims: {name: 'John Smith'}\n}).then(attestation => {\n  // send attestation to user\n})\n```\nAs with a verification request, you will want to send this JWT to your user. You can do this in the browser via QR, using push with a previously requested pushToken, or via another [transport](https://github.com/uport-project/uport-transports) of your choosing.\n\n## Asking users to sign Ethereum transactions\n\nFinally, as uPort is based in the Ethereum blockchain, uPort Credentials can be used to request that a user call a particular Ethereum smart contract function.  Smart contracts live on the blockchain at a certain address, and expose public functions that can be called according to their ABI.  Using the `Credentials.contract` method, you can create an object from a contract abi that will create transaction request JWTs for each contract method, that can be presented to a user's mobile application like any other JWT described above.  This is just a wrapper around `Credentials.createTxRequest()`, which generates the txObject for a particular contract method call.\n\n```javascript\nimport abi from './myContractAbi.json'\nconst myContract = Credentials.contract(abi).at(contractAddress)\n// creates a request for the user to call the transfer() function on the smart contract\nconst txRequest = myContract.transfer(...).then(txRequestToken => {\n  // send tx request token to user\n})\n```\n---------------------------------------------------\n\nThis library is part of a suite of tools maintained by the uPort Project, a Consensys formation.  For more information on the project, visit [uport.me](https://uport.me)\n\n","readmeFilename":"README.md","gitHead":"a66be2993b3064306b259a932a868adc62e9239d","_id":"uport@0.7.0-alpha-11","_npmVersion":"5.3.0","_nodeVersion":"8.4.0","_npmUser":{"name":"zachferland","email":"zachferland@gmail.com"},"dist":{"integrity":"sha512-8eo90fVVKFTe6uNNRcCdPqCCdAKaBDxIipmZMg+kVQt9pOzW4maGQA9njmzuI2MmHkzIqLHYpoHr+MzXYs4+BA==","shasum":"aeeb7864452a4651976da3e8fcaa54eac0ec99f9","tarball":"https://registry.npmjs.org/uport/-/uport-0.7.0-alpha-11.tgz","fileCount":19,"unpackedSize":991741,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJblwF4CRA9TVsSAnZWagAApSIP/0AEuzBRsttP8R13F8dJ\ne6CCL48HshDK0nupxT8D2CGbnDdRM9H1rZAqY2qIpkCWYh12kkQ9FIZUfVNl\nPLDrbizS6oRJmt6B54DzabWiWpXY2gbP/sQ11eRPq2Zvjh77GRuEgptD/h8g\nV2RMwyFhadTW29cISBIQsNOmRu9FtyIeYW7qM175+astwmym/EbDL+CyWgXN\nr1jxbWCTUD5rReSTSA34vEkuSrIcLhHWN04VSaE/4EFdGQRwL7kVH1mi3ljR\nbb0BiBgqpHe6xXMI4A3GHWpP5/wbiFleVrjdT7eMCIhEEW3E4FXDllyJTyca\nhjV7aiRhulD0dh+X8338PXqvI50iaJ9QWt92fvNip3sXVuPNN3DnGQwX5Qr/\n3Xjl3cGrZWOR6iuG04xtMt1FUTHW6ZzL9FG6QsQqwcmWdlsfbgJicHvWFhuE\n8z5jRj9YG7SO78G467OYE/6/svauAlr84BHpUlvVbNaQSAyszqef7wp2pXcv\nSMtlZLUJkHImX4sDygsAwIKdcqbahKvX5l01PuPvfBjVjYsgdTpUnCD6c8qZ\noHxf8UIeo+TBylKO/tBSzcak8Rr967J2OUFdvr5Wr1z9C04IQPLX0s5KqgCf\ngkka0BcMCs3/B22Aji2jLwbHALzO3wA+E7ivAJzYIdN4BlIoyHOkffgCUEOg\ne7Ua\r\n=enXm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC3khv3p9lyI4FuI1NGc2n1khQdlB980u2gRKQsxFFogQIgWS9ewLB6I9mJsNJski3SEo/yNQrCDjblwdcFNJWZLIA="}]},"maintainers":[{"email":"levi.strope@gmail.com","name":"localredhead"},{"email":"oed3933@gmail.com","name":"oed"},{"email":"pelleb@gmail.com","name":"pelleb"},{"email":"zachferland@gmail.com","name":"zachferland"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/uport_0.7.0-alpha-11_1536622967326_0.11379504958478304"},"_hasShrinkwrap":false},"0.7.0-alpha-12":{"name":"uport","version":"0.7.0-alpha-12","description":"Library for interacting with uport profiles and attestations","main":"lib/index.js","scripts":{"test":"jest","test:ci":"jest -u --coverage","build:es5":"babel src -d lib","build:browser":"webpack --config webpack.config.js","build":"yarn build:es5 && yarn test:ci && yarn build:browser","build:docs:html":"jsdoc src/* README.md -d docs","build:docs:md":"./node_modules/jsdoc-to-markdown/bin/cli.js -f src/* --template \"./template.hbs\" -c js2doc.conf > docs/reference/index.md; echo","build:docs":"npm run build:docs:html && npm run build:docs:md","prepublish":"yarn build"},"author":{"name":"Pelle Braendgaard","email":"pelle.braendgaard@consensys.net"},"license":"Apache-2.0","dependencies":{"did-jwt":"^0.0.7","did-resolver":"^0.0.4","ethjs-util":"^0.1.3","ethr-did-resolver":"^0.1.1","mnid":"^0.1.1","muport-did-resolver":"^0.1.0","uport-did-resolver":"^0.0.2","uport-lite":"^1.0.2"},"jest":{"coverageDirectory":"./coverage/","unmockedModulePathPatterns":["<rootDir>/node_modules/nock"],"testEnvironment":"node"},"devDependencies":{"babel-cli":"^6.26.0","babel-core":"^6.26.3","babel-jest":"^22.4.3","babel-loader":"^7.1.4","babel-plugin-syntax-object-rest-spread":"^6.13.0","babel-plugin-transform-es2015-modules-umd":"^6.24.1","babel-plugin-transform-object-rest-spread":"^6.26.0","babel-plugin-transform-runtime":"^6.23.0","babel-polyfill":"^6.22.0","babel-preset-env":"^1.6.1","body-parser":"^1.18.3","express":"^4.16.3","jest":"^22.4.3","jsdoc-to-markdown":"^4.0.1","json-loader":"^0.5.4","mockdate":"^2.0.1","nock":"^9.4.3","webpack":"^4.16.2","webpack-cli":"^2.0.15"},"readme":"# uport-credentials\n\n## Integrate uPort in your javascript application\n\nuPort provides a set of tools for creating and managing identities that conform to the [decentralized identifier (DID) specification](), and requesting and exchanging verified data between them.  This library simplifies the process of identity creation within javascript applications, and allows apps to easily sign pieces of data and verify data signed by other identities to facilitate secure communication between parties.  These pieces of data take the form of *signed [JSON web tokens](https://jwt.io/introduction/) (JWTs)* with specific fields designed for use with uPort clients, and described in the uPort [specifications](https://github.com/uport-project/specs), collectively referred to as *verifications*.\n\nTo allow maximum flexibility, this library only deals with creation and validation of verifications.  To pass verifications between a javascript application and a user via the uPort mobile app, we have also developed the [uport-transports](https://github.com/uport-project/uport-transports) library, which may be used in conjunction with this one.  For a simpler, out-of-the-box solution for interacting with a uPort mobile wallet from a web application, we have an easy to use browser library [uport-connect](https://github.com/uport-project/uport-connect).\n\n### What is a uPort identity?\n\nAn identity in uPort is really just someone or something that can sign data or transactions and also receive signed data about itself.\n\nAn identity can:\n\n- Sign JWTs (JSON Web Tokens)\n- [Authenticate themselves to a third party](messages/shareresp.md)\n- [Disclose private information about themselves](messages/shareresp.md)\n- [Receive requests for disclosure about themselves](messages/sharereq.md)\n- [Receive and store signed third party verifications about themselves](flows/verification.md)\n- [Sign Ethereum transactions](flows/tx.md)\n\nWhen interacting privately with a user you will be interchanging signed JWT([JSON Web Token](https://jwt.io/)). To verify the signature of the JWT you and your users will be fetching your public key from the public profile.  \n\nFor details on uPort's underlying architecture, read our [spec repo](https://github.com/uport-project/specs) or check out the [uPort identity contracts](https://github.com/uport-project/uport-identity).\n\n## Configure your application\n\nIn your application you must first configure your uPort object with an identifier and a private key (or signer function).  There are several ways to instantiate a credentials object.  The most common approach is to save a DID and private key on a server for your application, and create a credentials instance from your application's unique private key.  Signed JWTs for requests and verifications can then be passed to a client-side application, and presented to a user as a QR code, or sent via a [transport](http://github.com/uport-project/uport-transports).\n\n```javascript\nimport { Credentials } from 'uport-credentials'\n\n// For ethereum based addresses (ethr-did)\nconst credentials = new Credentials({\n  appName: 'App Name',\n  did: 'did:ethr:0x....',\n  privateKey: process.env.PRIVATE_KEY\n})\n```\n\nThere may also be cases where you want identities to be created dynamically, either in the browser or on a server.  This can be accomplished with the static `Credentials.createIdentity()` method, which generates an ethereum keypair, and returns an object containing the associated did and private key.\n```\n// Create a credentials object for a brand new identity\nconst {did, privateKey} = Credentials.createIdentity()\nconst credentials = new Credentials({\n  appName: 'App Name', did, privateKey\n})\n```\n\nFinally, we continue to support older uport identities described by an [MNID](http://github.com/uport-project/mnid)-encoded ethereum address.  These identifiers can be expressed as a did via the 'uport' did method: `did:uport:<mnid>`\n```\n// For legacy application identity created on App Manager\nconst credentials = new Credentials({\n  appName: 'App Name',\n  address: '2nQtiQG...', // MNID Encoded uPort Address For Your App\n  privateKey: process.env.PRIVATE_KEY\n})\n```\n\n## Requesting information from your users\n\nTo request information from your user you create a Selective Disclosure Request JWT.  When this is presented to a user via a QR code or other [transport](https://github.com/uport-project/uport-transports), they will be prompted to approve sharing the request attributes.  All requests will return a user's `did`.\n\n```javascript\ncredentials.createDisclosureRequest().then(requestToken => {\n  // send requestToken to browser\n})\n```\n\nA selective disclosure request JWT can ask for specific private data, and/or provide a URL to which a mobile app should send a response.\n\n```javascript\ncredentials.createDisclosureRequest().then({\n  requested: ['name', 'phone', 'identity_no'],\n  callbackUrl: 'https://....' // URL to send the response of the request to\n}).then(requestToken => {\n  // send requestToken to browser\n})\n```\n\nIf you need to know the users address on a specific ethereum network, specify it's `networkId` (currently defaults to mainnet `0x1`). In this case be aware that the `address` returned will be the address on the public network (currently mainnet) for the users profile. The requested network address will be in the `networkAddress` field and will be MNID encoded.\n\n```javascript\n// Request an address on Rinkeby\ncredentials.requestDisclosure({networkId: '0x4'}).then(requestToken => {\n  // send requestToken to browser\n})\n```\n\nWhen a response JWT is received, it can be parsed and verified via the `verifyDisclosureResponse()` method, which checks the validity of the signature on the JWT, as well as validity of the original dislcosure request, which is expected as part of the response.  \n\n```javascript\ncredentials.verifyDisclosureResponse(responseToken).then(verifiedData => {\n  // Do stuff with verified data\n})\n```\n\n### Stateless Challenge/Response\n\nTo ensure that the response received was created as a response to your selective disclosure request above, the original request is included in the response from the mobile app.\n\nThe verification rule for the Selective Disclosure Response is that the issuer of the embedded request must match the did in your Credentials object and that the original request has not yet expired.  This is to be sure that when requesting data from a user, only a response to your initial request will be accepted as valid.  If you would like to consume an arbitrary signed JWT that is not part of a particular selective disclosure flow, you can use the `verifyDisclosure()` method to skip the challenge/response check.\n\n### Requesting Push notification tokens from your users\n\nAs part of the selective disclosure request you can also ask for permission from your users to communicate directly with their app.  With a push token, you can configure a [transport](https://github.com/uport-project/uport-transports) to send JWTs via push.\n\n```javascript\ncredentials.createRequest({\n  requested:[...],\n  notifications: true\n}).then(requestToken => {\n  // send to browser\n})\n```\nIf the user approves the use of push notifications, the selective disclosure response will contain a `pushToken` field, which can be saved when the response is received and verified.\n\n```javascript\ncredentials.verifyDisclosureResponse(responseToken).then(verifiedData => {\n  // Store push token securely\n  doSomethingWith(verifiedData.pushToken)\n})\n```\n\n## Attesting information about your users\nIn addition to requesting and verifying information, you can also sign new data on behalf of your application and share it with your users in the form of _attestations_, also known as _verifications_.  By presenting an attestation to a user, you are making a claim about them, and are _attesting_ to its truth with your application's signature.  Exactly what information your app should attest to depends the context -- If you're a financial institution you may be able to attest to KYC related information such as national identity numbers. If you're an educational application you may want to attest to your users achievements in a way that they can securely share.  Anyone with access to your application's `did` can verify that a particular attestation came from your app.\n\nAttesting to information about your users helps add real value to your application, and your users will use uPort to build up their own digital identity.\n\n### Creating an attestation\n\n```javascript\ncredentials.createVerification({\n  sub: '0x...', // uport address of user\n  exp: <future timestamp>, // If your information is not permanent make sure to add an expires timestamp\n  claims: {name: 'John Smith'}\n}).then(attestation => {\n  // send attestation to user\n})\n```\nAs with a verification request, you will want to send this JWT to your user. You can do this in the browser via QR, using push with a previously requested pushToken, or via another [transport](https://github.com/uport-project/uport-transports) of your choosing.\n\n## Asking users to sign Ethereum transactions\n\nFinally, as uPort is based in the Ethereum blockchain, uPort Credentials can be used to request that a user call a particular Ethereum smart contract function.  Smart contracts live on the blockchain at a certain address, and expose public functions that can be called according to their ABI.  Using the `Credentials.contract` method, you can create an object from a contract abi that will create transaction request JWTs for each contract method, that can be presented to a user's mobile application like any other JWT described above.  This is just a wrapper around `Credentials.createTxRequest()`, which generates the txObject for a particular contract method call.\n\n```javascript\nimport abi from './myContractAbi.json'\nconst myContract = Credentials.contract(abi).at(contractAddress)\n// creates a request for the user to call the transfer() function on the smart contract\nconst txRequest = myContract.transfer(...).then(txRequestToken => {\n  // send tx request token to user\n})\n```\n---------------------------------------------------\n\nThis library is part of a suite of tools maintained by the uPort Project, a Consensys formation.  For more information on the project, visit [uport.me](https://uport.me)\n\n","readmeFilename":"README.md","gitHead":"00ecf8c696ae68e3a04353913a9edfb3b6e710b2","_id":"uport@0.7.0-alpha-12","_npmVersion":"5.3.0","_nodeVersion":"8.4.0","_npmUser":{"name":"zachferland","email":"zachferland@gmail.com"},"dist":{"integrity":"sha512-WoPxXHV8YP0zHWorzDbFjLEurYmH/s/wIvPE2uQLDa3QGfVArLWmxNi1ZudYa807/JSIoyTQyEI2dpnmIYMSYw==","shasum":"6a89e9dedc4da835f2ae520f22c84f10af8e8f5e","tarball":"https://registry.npmjs.org/uport/-/uport-0.7.0-alpha-12.tgz","fileCount":19,"unpackedSize":983199,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbmEbRCRA9TVsSAnZWagAArSQP/ispBGHECVdym4JEw0O/\n/+aKwz4Ej7o2cpnn/3wAtVjuGTQEOhjMU3YqtGSM3LyUP/XwY/ctAVswa1Lp\nETA7CE/J3gNOUl3i/hGKzx8OC4QvhywQq5MlHh71soXLqWrd77b9PmEEuKY+\nbQG/bAfo3EVHxA8pk92qOdZDAY3jJLkwhleh2WrtR1n5kpqRiBmWbZ9Xo0Pq\nUYMpjTsKF8W4yar7AAQrf2iENAbzsBAD14WCuU1RU6gzIW6NF8KIjQRm2CIr\nTQk32Nnybo2oRcXl2pA8lhbZXAiL4IRhMIfWR96B3JKY4TUPt5tYzlmMPaBG\nLeZNClXNQ5BKGGRSFZ9KCWUIAh2mn6oR02ScTEYKGWqq6+pkAQzANSY8jRGX\nEK8N4xEV3ODTGImw6z9vrujnnEUligUlh1N2dCHoiO512NFUow9HH6Uln4qb\nHaWG1Tus80BInusY336EX9XBEgbQOI/fKfKZc+/RSgbJ0ZGZ32Y4o9jPjWVW\nPtvB+dX/r2ZG+Hyo4dS1TWyRG0h+TlVS/Y6SaMK10zd9CpuzQ2snRR0ssf7a\nxJAtLejlceMEmzCWDnDtrX7aEUItLTk+aGutEulUVKiRDjCYJYsL6+uxY4Ft\nBdedoxhoCLldlBwuFiGJkbRiiKYlPTBBcsQ0cQPBVNo0AOKqvyoV1uBI915t\nMLUX\r\n=+H3i\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD2komhgved1l++/juPDaFBJ2dXy1FWZQ4FNdd+kSFJwAIhAMVKDFJxwknNdo16QpbyJ446ZgoDLom1V+Gd5qeCunH4"}]},"maintainers":[{"email":"levi.strope@gmail.com","name":"localredhead"},{"email":"oed3933@gmail.com","name":"oed"},{"email":"pelleb@gmail.com","name":"pelleb"},{"email":"zachferland@gmail.com","name":"zachferland"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/uport_0.7.0-alpha-12_1536706256521_0.7494108085010347"},"_hasShrinkwrap":false},"0.7.0-alpha-13":{"name":"uport","version":"0.7.0-alpha-13","description":"Library for interacting with uport profiles and attestations","main":"lib/index.js","scripts":{"test":"jest","test:ci":"jest -u --coverage","build:es5":"babel src -d lib","build:browser":"webpack --config webpack.config.js","build":"yarn build:es5 && yarn test:ci && yarn build:browser","build:docs:html":"jsdoc src/* README.md -d docs","build:docs:md":"./node_modules/jsdoc-to-markdown/bin/cli.js -f src/* --template \"./template.hbs\" -c js2doc.conf > docs/reference/index.md; echo","build:docs":"npm run build:docs:html && npm run build:docs:md","prepublish":"yarn build"},"author":{"name":"Pelle Braendgaard","email":"pelle.braendgaard@consensys.net"},"license":"Apache-2.0","dependencies":{"did-jwt":"^0.0.7","did-resolver":"^0.0.4","ethjs-util":"^0.1.3","ethr-did-resolver":"^0.1.1","mnid":"^0.1.1","muport-did-resolver":"^0.1.0","uport-did-resolver":"^0.0.2","uport-lite":"^1.0.2"},"jest":{"coverageDirectory":"./coverage/","unmockedModulePathPatterns":["<rootDir>/node_modules/nock"],"testEnvironment":"node"},"devDependencies":{"babel-cli":"^6.26.0","babel-core":"^6.26.3","babel-jest":"^22.4.3","babel-loader":"^7.1.4","babel-plugin-syntax-object-rest-spread":"^6.13.0","babel-plugin-transform-es2015-modules-umd":"^6.24.1","babel-plugin-transform-object-rest-spread":"^6.26.0","babel-plugin-transform-runtime":"^6.23.0","babel-polyfill":"^6.22.0","babel-preset-env":"^1.6.1","body-parser":"^1.18.3","express":"^4.16.3","jest":"^22.4.3","jsdoc-to-markdown":"^4.0.1","json-loader":"^0.5.4","mockdate":"^2.0.1","nock":"^9.4.3","webpack":"^4.16.2","webpack-cli":"^2.0.15"},"readme":"# uport-credentials\n\n## Integrate uPort in your javascript application\n\nuPort provides a set of tools for creating and managing identities that conform to the [decentralized identifier (DID) specification](), and requesting and exchanging verified data between them.  This library simplifies the process of identity creation within javascript applications, and allows apps to easily sign pieces of data and verify data signed by other identities to facilitate secure communication between parties.  These pieces of data take the form of *signed [JSON web tokens](https://jwt.io/introduction/) (JWTs)* with specific fields designed for use with uPort clients, and described in the uPort [specifications](https://github.com/uport-project/specs), collectively referred to as *verifications*.\n\nTo allow maximum flexibility, this library only deals with creation and validation of verifications.  To pass verifications between a javascript application and a user via the uPort mobile app, we have also developed the [uport-transports](https://github.com/uport-project/uport-transports) library, which may be used in conjunction with this one.  For a simpler, out-of-the-box solution for interacting with a uPort mobile wallet from a web application, we have an easy to use browser library [uport-connect](https://github.com/uport-project/uport-connect).\n\n### What is a uPort identity?\n\nAn identity in uPort is really just someone or something that can sign data or transactions and also receive signed data about itself.\n\nAn identity can:\n\n- Sign JWTs (JSON Web Tokens)\n- [Authenticate themselves to a third party](messages/shareresp.md)\n- [Disclose private information about themselves](messages/shareresp.md)\n- [Receive requests for disclosure about themselves](messages/sharereq.md)\n- [Receive and store signed third party verifications about themselves](flows/verification.md)\n- [Sign Ethereum transactions](flows/tx.md)\n\nWhen interacting privately with a user you will be interchanging signed JWT([JSON Web Token](https://jwt.io/)). To verify the signature of the JWT you and your users will be fetching your public key from the public profile.  \n\nFor details on uPort's underlying architecture, read our [spec repo](https://github.com/uport-project/specs) or check out the [uPort identity contracts](https://github.com/uport-project/uport-identity).\n\n## Configure your application\n\nIn your application you must first configure your uPort object with an identifier and a private key (or signer function).  There are several ways to instantiate a credentials object.  The most common approach is to save a DID and private key on a server for your application, and create a credentials instance from your application's unique private key.  Signed JWTs for requests and verifications can then be passed to a client-side application, and presented to a user as a QR code, or sent via a [transport](http://github.com/uport-project/uport-transports).\n\n```javascript\nimport { Credentials } from 'uport-credentials'\n\n// For ethereum based addresses (ethr-did)\nconst credentials = new Credentials({\n  appName: 'App Name',\n  did: 'did:ethr:0x....',\n  privateKey: process.env.PRIVATE_KEY\n})\n```\n\nThere may also be cases where you want identities to be created dynamically, either in the browser or on a server.  This can be accomplished with the static `Credentials.createIdentity()` method, which generates an ethereum keypair, and returns an object containing the associated did and private key.\n```\n// Create a credentials object for a brand new identity\nconst {did, privateKey} = Credentials.createIdentity()\nconst credentials = new Credentials({\n  appName: 'App Name', did, privateKey\n})\n```\n\nFinally, we continue to support older uport identities described by an [MNID](http://github.com/uport-project/mnid)-encoded ethereum address.  These identifiers can be expressed as a did via the 'uport' did method: `did:uport:<mnid>`\n```\n// For legacy application identity created on App Manager\nconst credentials = new Credentials({\n  appName: 'App Name',\n  address: '2nQtiQG...', // MNID Encoded uPort Address For Your App\n  privateKey: process.env.PRIVATE_KEY\n})\n```\n\n## Requesting information from your users\n\nTo request information from your user you create a Selective Disclosure Request JWT.  When this is presented to a user via a QR code or other [transport](https://github.com/uport-project/uport-transports), they will be prompted to approve sharing the request attributes.  All requests will return a user's `did`.\n\n```javascript\ncredentials.createDisclosureRequest().then(requestToken => {\n  // send requestToken to browser\n})\n```\n\nA selective disclosure request JWT can ask for specific private data, and/or provide a URL to which a mobile app should send a response.\n\n```javascript\ncredentials.createDisclosureRequest().then({\n  requested: ['name', 'phone', 'identity_no'],\n  callbackUrl: 'https://....' // URL to send the response of the request to\n}).then(requestToken => {\n  // send requestToken to browser\n})\n```\n\nIf you need to know the users address on a specific ethereum network, specify it's `networkId` (currently defaults to mainnet `0x1`). In this case be aware that the `address` returned will be the address on the public network (currently mainnet) for the users profile. The requested network address will be in the `networkAddress` field and will be MNID encoded.\n\n```javascript\n// Request an address on Rinkeby\ncredentials.requestDisclosure({networkId: '0x4'}).then(requestToken => {\n  // send requestToken to browser\n})\n```\n\nWhen a response JWT is received, it can be parsed and verified via the `verifyDisclosureResponse()` method, which checks the validity of the signature on the JWT, as well as validity of the original dislcosure request, which is expected as part of the response.  \n\n```javascript\ncredentials.verifyDisclosureResponse(responseToken).then(verifiedData => {\n  // Do stuff with verified data\n})\n```\n\n### Stateless Challenge/Response\n\nTo ensure that the response received was created as a response to your selective disclosure request above, the original request is included in the response from the mobile app.\n\nThe verification rule for the Selective Disclosure Response is that the issuer of the embedded request must match the did in your Credentials object and that the original request has not yet expired.  This is to be sure that when requesting data from a user, only a response to your initial request will be accepted as valid.  If you would like to consume an arbitrary signed JWT that is not part of a particular selective disclosure flow, you can use the `verifyDisclosure()` method to skip the challenge/response check.\n\n### Requesting Push notification tokens from your users\n\nAs part of the selective disclosure request you can also ask for permission from your users to communicate directly with their app.  With a push token, you can configure a [transport](https://github.com/uport-project/uport-transports) to send JWTs via push.\n\n```javascript\ncredentials.createRequest({\n  requested:[...],\n  notifications: true\n}).then(requestToken => {\n  // send to browser\n})\n```\nIf the user approves the use of push notifications, the selective disclosure response will contain a `pushToken` field, which can be saved when the response is received and verified.\n\n```javascript\ncredentials.verifyDisclosureResponse(responseToken).then(verifiedData => {\n  // Store push token securely\n  doSomethingWith(verifiedData.pushToken)\n})\n```\n\n## Attesting information about your users\nIn addition to requesting and verifying information, you can also sign new data on behalf of your application and share it with your users in the form of _attestations_, also known as _verifications_.  By presenting an attestation to a user, you are making a claim about them, and are _attesting_ to its truth with your application's signature.  Exactly what information your app should attest to depends the context -- If you're a financial institution you may be able to attest to KYC related information such as national identity numbers. If you're an educational application you may want to attest to your users achievements in a way that they can securely share.  Anyone with access to your application's `did` can verify that a particular attestation came from your app.\n\nAttesting to information about your users helps add real value to your application, and your users will use uPort to build up their own digital identity.\n\n### Creating an attestation\n\n```javascript\ncredentials.createVerification({\n  sub: '0x...', // uport address of user\n  exp: <future timestamp>, // If your information is not permanent make sure to add an expires timestamp\n  claims: {name: 'John Smith'}\n}).then(attestation => {\n  // send attestation to user\n})\n```\nAs with a verification request, you will want to send this JWT to your user. You can do this in the browser via QR, using push with a previously requested pushToken, or via another [transport](https://github.com/uport-project/uport-transports) of your choosing.\n\n## Asking users to sign Ethereum transactions\n\nFinally, as uPort is based in the Ethereum blockchain, uPort Credentials can be used to request that a user call a particular Ethereum smart contract function.  Smart contracts live on the blockchain at a certain address, and expose public functions that can be called according to their ABI.  Using the `Credentials.contract` method, you can create an object from a contract abi that will create transaction request JWTs for each contract method, that can be presented to a user's mobile application like any other JWT described above.  This is just a wrapper around `Credentials.createTxRequest()`, which generates the txObject for a particular contract method call.\n\n```javascript\nimport abi from './myContractAbi.json'\nconst myContract = Credentials.contract(abi).at(contractAddress)\n// creates a request for the user to call the transfer() function on the smart contract\nconst txRequest = myContract.transfer(...).then(txRequestToken => {\n  // send tx request token to user\n})\n```\n---------------------------------------------------\n\nThis library is part of a suite of tools maintained by the uPort Project, a Consensys formation.  For more information on the project, visit [uport.me](https://uport.me)\n\n","readmeFilename":"README.md","gitHead":"00ecf8c696ae68e3a04353913a9edfb3b6e710b2","_id":"uport@0.7.0-alpha-13","_npmVersion":"5.3.0","_nodeVersion":"8.4.0","_npmUser":{"name":"zachferland","email":"zachferland@gmail.com"},"dist":{"integrity":"sha512-BjcdusT/NLcF9ejOqUbRWQd8g58BjoM1op2/XZhu3t3o9GjzehuTT5ahrQDFG4wF8CCzW+A9cb5cBuAfWbjQGQ==","shasum":"a5342d6eedaddeed324c32d3d844b739b4e7c4d0","tarball":"https://registry.npmjs.org/uport/-/uport-0.7.0-alpha-13.tgz","fileCount":19,"unpackedSize":984178,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbmas/CRA9TVsSAnZWagAAVekP/iLRZJgCsABV28MFfsUu\nRbD3OVQ3vD0JXNvOGfTdh2HIDU5QBhD5edmED/V1P/UmUVBERheuoC0r3OGF\noHMHJMMb6Xxi20zkOH5Wp2gX5RgBNXrAAEb0xqbZl6wLiuaHSzIXaVg1Q2N+\nsl0OJJIsrwwhY8B+n8TKP7Fg8PSte8AxSRJna5cAFd7oIRl04mJHA/hguUMj\neT8HrRjoTUrqvxz64H7CBfGZzT4/boZN2NBpoLhXeUmuC1ZKeck/7wtfYbog\nIbf6Vf4fot9SK8CcG5Pc0z3jrx7SBf8/2nimQI/LFGqy9cws9yNmBebCDh+L\nCzOfoFPOTnCkP4l8wHPav8DzigveuJrmaBCw9WVHCCMh7Xd+NaB9wf7uN0Di\nnmobV+F9pxCEEktVSYUzwJEwjmQ0jdrBJnyzFmurFRkGP6EnPb88PmTMSiRJ\njRvm3aZDq8YADFut+G+ZG187/b/GN2sd6re9P6MDK7JOZ3jLm2kjQkBnBX4l\naYXi0H1hOW8GYt4kRJrJLBypsH5wz8QbGTBQ6BcCk6sDqtoj5wc80nsrBSsf\nD9RFX070Fujf/+M9++5F5k5TSm86LNgJG1jocXbfvSkCj+1oav9N9IYRyZej\nItZmbPjqFtaNYOXzGAs+WRYEJkyYX6PlQZ0IZ2hrz/oFYiEVqa8V2xafLxmH\n+j5p\r\n=OfEh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAQM89lz2d8T410EpzuXAz0Aa4xapKn/y5gNeWU0VoFUAiBQiOxWt2cvQo4bz0A4H6Qdabst2Mavd0tE4DxV0aeycQ=="}]},"maintainers":[{"email":"levi.strope@gmail.com","name":"localredhead"},{"email":"oed3933@gmail.com","name":"oed"},{"email":"pelleb@gmail.com","name":"pelleb"},{"email":"zachferland@gmail.com","name":"zachferland"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/uport_0.7.0-alpha-13_1536797503276_0.804254195202055"},"_hasShrinkwrap":false},"0.6.5":{"name":"uport","version":"0.6.5","description":"Library for interacting with uport profiles and attestations","main":"lib/index.js","scripts":{"test":"jest","test:ci":"jest -u --coverage","build:es5":"babel src -d lib","build:browser":"webpack --config webpack.config.js","build":"yarn build:es5 && yarn test:ci && yarn build:browser","build:docs:html":"jsdoc src/* README.md -d docs","build:docs:md":"./node_modules/jsdoc-to-markdown/bin/cli.js -f src/* --template 'template.hbs' -c js2doc.conf > docs/reference/index.md; echo","build:docs":"npm run build:docs:html && npm run build:docs:md","prepublish":"yarn build"},"author":{"name":"Pelle Braendgaard","email":"pelle.braendgaard@consensys.net"},"license":"MIT","dependencies":{"base64url":"^3.0.0","did-jwt":"^0.0.8","did-resolver":"^0.0.4","ethjs-util":"^0.1.3","ethr-did-resolver":"^0.1.1","jsontokens":"^0.7.6","mnid":"^0.1.1","muport-did-resolver":"^0.1.0","nets":"^3.2.0","tweetnacl":"^1.0.0","tweetnacl-util":"^0.15.0","uport-did-resolver":"0.0.3","uport-lite":"^1.0.2"},"jest":{"coverageDirectory":"./coverage/","collectCoverage":true,"unmockedModulePathPatterns":["<rootDir>/node_modules/nock"],"testEnvironment":"node"},"devDependencies":{"babel-cli":"^6.26.0","babel-core":"^6.26.0","babel-jest":"^22.4.3","babel-loader":"^7.1.4","babel-plugin-syntax-object-rest-spread":"^6.13.0","babel-plugin-transform-es2015-modules-umd":"^6.24.1","babel-plugin-transform-object-rest-spread":"^6.26.0","babel-plugin-transform-runtime":"^6.23.0","babel-polyfill":"^6.22.0","babel-preset-env":"^1.6.1","body-parser":"^1.17.1","express":"^4.15.2","jest":"^22.4.3","jsdoc":"^3.4.3","jsdoc-to-markdown":"^1.3.7","json-loader":"^0.5.4","mockdate":"^2.0.1","nock":"^9.0.6","webpack":"^4.6.0","webpack-cli":"^2.0.15"},"gitHead":"0549046f044556d7619e2537da79fcc93aa1d73e","_id":"uport@0.6.5","_npmVersion":"5.3.0","_nodeVersion":"8.4.0","_npmUser":{"name":"zachferland","email":"zachferland@gmail.com"},"dist":{"integrity":"sha512-bFKBizgBpZpI8t/ARk908WTwNuPB4PH5C5cgsvjtL5mTrqmmA9CpvkCGR9P9NalGxpg+JEUWwbTGG0BEbq5rYA==","shasum":"91ffdcd8046367299da54f7c77cfbc328250f2ae","tarball":"https://registry.npmjs.org/uport/-/uport-0.6.5.tgz","fileCount":22,"unpackedSize":1494984,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbqXxpCRA9TVsSAnZWagAANYcP/R3tlx4CCO5nDs+2mCmM\nJi5mhOAW6hgAKTW5VS18b+//xvjKKeLIRP79piEtn7uuSsNeSl1mwDONyd5H\nOBaBGEPNO8kf0PT0VyHDq8ZSaaRsLLuaxGyjq+y4VjRlJDbbh/sEcq3TA945\nkooSFJhO4ODNr2yHPtarxg4xBmjGnfNAh7gqi8iXDmam6bG8g8Ig37a8BJWP\nYTRfgd8rzDY+5RUijwWxAeWgG3UehZYj03hWiEYsa8uY/Uz2NONiO9B81Dfo\nhgErEEf6l8Hg17PIOLD5YH1tJcg36mDWaKqpwAS/vbHTOeScdJ2lNk9FCrGZ\nScZFwZZlfjJ6D7VLsRnsVhjsGz3J+rzFirjWmu6JOM3LfgXc/wCOdlrS6R6V\nBDHdPy7QN9vA/H7cWq/b+fqxXFV0iQrEO0kxfWIZTpSyHGLfQo66aYnA6LRv\nQAuXqhpdU2sdB5myibwuux8/WtuD0ZY+wQELBxHXPEz98w5fmxKjnQjs7bSu\nY/jiMSk+bn3OiJ0g4bekBOZIyPNDBzCYse92PM4zlVDDj9Bh7Iosgj6Z6bcf\nxhM1tZqO8Ith32zDWzBy8HbXfmf44uZh/AeHjKktwsHqOmoV6mVB3njXcS85\n+LkjidrHT+jVIRhDHbyc1Bx2j2PQn9kcRk0b0K0FGKBF860OnQa1Oqs5dh89\ntTzr\r\n=Bw2G\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBq6BsCGQWoi8zJdadxewXOkG8WPgTr7cqHuesQl+M59AiBLW1NPOSLnueNtaXgA57Q9ACNLhTXbyFKlftey3WwrTQ=="}]},"maintainers":[{"email":"levi.strope@gmail.com","name":"localredhead"},{"email":"oed3933@gmail.com","name":"oed"},{"email":"pelleb@gmail.com","name":"pelleb"},{"email":"zachferland@gmail.com","name":"zachferland"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/uport_0.6.5_1537834088387_0.6319014324931647"},"_hasShrinkwrap":false}},"readme":"# uport-js\n**Required Upgrade to v0.6.3 to support new uPort Clients - [View Details](https://github.com/uport-project/uport-js/releases/tag/v0.6.3)**\n## Integrate uPort in your javascript application\n\nuPort provides a simple way for your users to login to your website and provide private credentials such as identity information and contact details to you.\n\nYou can also “attest” credentials they provide to you or that you yourself have about them. This can be shared back to your customers so you can help them build their digital identity.\n\nUport.js provides a simple way for you to integrate uport.js into your javascript application. You can also interact with your uPort users directly in the browser.\n\nWe have an easy to use browser library [uport-connect](https://github.com/uport-project/uport-connect) which can help you do so.\n\n## Setup your uPort application identity\n\nFirst make sure you have your uPort app installed and you've setup your own uPort identity.\n\n### What is a uPort identity?\n\nAn identity in uPort is really just someone or something that can sign data or transactions and also receive signed data about itself.\n\nAn identity has an identifier in the form of an [MNID](https://github.com/uport-project/mnid), a signing key, and a public key stored on the [uPort Registry](https://github.com/uport-project/uport-registry).\n\nAn identity can:\n\n- Sign JWTs (JSON Web Tokens)\n  - [Authenticate themselves to a third party](https://github.com/uport-project/specs/blob/develop/messages/shareresp.md)\n  - [Disclose private information about themselves](https://github.com/uport-project/specs/blob/develop/messages/shareresp.md)\n- [Receive requests for disclosure about themselves](https://github.com/uport-project/specs/blob/develop/messages/sharereq.md)\n- [Receive and store signed third party verifications about themselves](https://github.com/uport-project/specs/blob/develop/flows/verification.md)\n- [Sign Ethereum transactions](https://github.com/uport-project/specs/blob/developflows/tx.md)\n\nWhen interacting privately with a user you will be interchanging signed JWT([JSON Web Token](https://jwt.io/)). To verify the signature of the JWT you and your users will be fetching your public key from the public profile.\n\nFor details on uPort's underlying architecture, read our [spec repo](https://github.com/uport-project/specs) or check out the [uPort identity contracts] (https://github.com/uport-project/uport-identity).\n\n## Configure your application\n\nIn your application you must first configure your uPort object.\n\n```javascript\nimport { Credentials, SimpleSigner } from 'uport'\n\nconst signer = SimpleSigner(process.env.PRIVATE_KEY)\nconst credentials = new Credentials({\n  appName: 'App Name',\n  address: 'MNID Encoded uPort Address For Your App',\n  signer: signer,\n  networks: networks\n})\n```\n\nGoing forward all uPort application ID addresses must be [MNID encoded](https://github.com/uport-project/mnid). MNID will encode the network with the address. Use of hex encoded addresses is deprecated. Using a hex encoded address will indicated you are on ropsten using our deprecated registry, if you require this use case then continue to pass a hex encoded address. If you are on ropsten but using our latest registry, pass a MNID encoded address with ropsten.\n\nThe networks object includes a set of networks for which JWTs will be verified over. JWT verification includes an on-chain lookup for the public key mapped to the issuers identity, the MIND encoding of the issuer's address defines the network and registry to use for lookup. If you are interested in verifying JWTs over additional networks, pass in a network configs object, defined as follows:\n\n```javascript\n const networks = { id: '0x2a' :\n                      { registry: '0x5f8e9351dc2d238fb878b6ae43aa740d62fc9758',\n                        rpcUrl: 'https://kovan.infura.io' },\n                   id: ....   : { ... }\n                 }\n```\n\nLook in [uport-lite](https://github.com/uport-project/uport-lite) for the default networks and registries which will be queried for JWT verification.\n\n## Requesting information from your users\n\nTo request information from your user you create a Selective Disclosure Request JWT and present it to your user in the web browser.\n\nThe most basic request to get a users public uport identity details:\n\n```javascript\ncredentials.createRequest().then(requestToken => {\n  // send requestToken to browser\n})\n```\n\nYou can ask for specific private data like this:\n\n```javascript\ncredentials.createRequest({\n    requested: ['name','phone','identity_no'],\n    callbackUrl: 'https://....' // URL to send the response of the request to\n  }).then(requestToken => {\n  // send requestToken to browser\n  })\n```\n\nIf you need to know the users address on a specific ethereum network, specify it's `network_id` (currently defaults to ropsten `0x3`). In this case be aware that the `address` returned will be the address on the public network (currently ropsten) for the users profile. The requested network address will be in the `networkAddress` field and will be MNID encoded.\n\n```javascript\ncredentials.createRequest({network_id: '0x4'}).then(requestToken => {\n  // send requestToken to browser\n})\n```\n\nIn your front end use [uport-connect](https://github.com/uport-project/uport-connect) to present it to your user either as a QR code or as a uport-button depending on whether they are on a desktop or mobile browser.\n\n```javascript\nconst connect = new uportconnect.Connect('app name')\nconnect.showRequest(requestToken).then(response => {\n  // send response back to server\n})\n```\n\nBack in your server code you receive the token:\n\n```javascript\ncredentials.receive(responseToken).then(profile => {\n  // Store user profile\n})\n```\nFor more information about the contents of the profile object see the uport-persona documentation.\n\n### Stateless Challenge/Response\n\nTo ensure that the response received was created as a response to your selective disclosure request above, the original request is included in the response from the mobile app.\n\nThe default verification rule is that the issuer of the embedded request must match the clientId in your Credentials object and that the original request has not yet expired.\n\nSome applications that exclusively live in the browser are unable to sign the original request. In those cases the request token verification is ignored.\n\n### Requesting Push notification tokens from your users\n\nAs part of the selective disclosure request you can ask for permission from your users to communicate directly with their app.\n\n```javascript\ncredentials.createRequest({\n  requested:[...],\n  notifications: true\n}).then(requestToken => {\n  // send to browser\n})\n```\n\nPresent it to the user like before. On the server you can receive the push token like this:\n\n```javascript\ncredentials.receive(responseToken).then(profile => {\n  // Store user profile\n  // Store push token securely\n  console.log(profile.pushToken)\n})\n```\n\n## Attesting information about your users\n\nAttesting information about your users helps add real value to your application. Your users will use uport to build up their own digital identity and your business is an important part of this.\n\nIf you're a financial institution you may be able to attest to KYC related information such as national identity numbers. If you're an educational application you may want to attest to your users achievements in a way that they can securely share.\n\n### What are attestations\n\nAttestations are shareable private information that one party can sign about another party. They are designed to be shared privately by you to your users and by them to other users.\n\n### Creating an attestation\n\n```javascript\ncredentials.attest({\n  sub: '0x...', // uport address of user\n  exp: <future timestamp>, // If your information is not permanent make sure to add an expires timestamp\n  claims: {name:'John Smith'}\n}).then(attestation => {\n  // send attestation to user\n})\n```\n\nAs before you will want to send this to your user. You can do this in the browser\n\n```javascript\nconst connect = new uportconnect.Connect('app name')\nconnect.showRequest(attestation) // no response is needed for an attestation\n```\n\nIf you requested a push notification token in the above selective disclosure step you can also send attestations directly to your users app in real time.\n\n```javascript\ncredentials.push(pushToken, `me.uport:add?attestation=${attestationjwt}`, message).then(response => {\n\n})\n```\n\n## Asking users to sign Ethereum transactions\n\nEthereum smart contracts live on the blockchain and at a certain address. The application interface is known as the abi and can be created by the Solidity compiler.\n\nOur Contract class will let you create a javascript object modelling the SmartContract allowing you to create uport uri's that you can send to the user.\n\n```javascript\nimport { Contract } from 'uport'\nconst abi = // import from json or have directly in code\nconst contract = Contract(abi).at(contractAddress)\n// creates a request for the user to call the transfer() function on the smart contract\nconst txRequest = tokenContract.transfer(....)\n```\n\nIn your front end use 'uport-connect' to present it to your user either as a QR code or as a uport-button depending on whether they are on a desktop or mobile browser.\n\n```javascript\nconst connect = new uportconnect.Connect('app name')\nconnect.sendTransaction(txRequest).then(txResponse => {\n  // send response back to server\n})\n```\n\nBack in your server code you receive the `txResponse`. This is a standard ethereum transaction object that you can verify.\n\n## Creating Custom Signers for integrating with HSM\n\nYou can easily create custom signers that integrates into your existing signing infrastructure.\n\n```javascript\nfunction sign(data, callback) {\n    const signature = '' // send your data to your back end signer and return DER signed data\n    callback(null, signature)\n}\n```\n","maintainers":[{"email":"simonas@not.cat","name":"simonas-notcat"},{"email":"mirceanis@gmail.com","name":"mirceanis"},{"email":"devops@uport.me","name":"uport-automation-bot"},{"email":"oed@3box.io","name":"oed"},{"email":"zachferland@gmail.com","name":"zachferland"},{"email":"pelleb@gmail.com","name":"pelleb"},{"email":"levi.strope@gmail.com","name":"localredhead"}],"time":{"modified":"2022-07-07T12:05:43.924Z","created":"2017-01-29T23:04:07.764Z","0.1.0":"2017-01-29T23:04:07.764Z","0.1.2":"2017-01-30T00:52:18.065Z","0.1.1":"2017-01-30T00:57:24.669Z","0.1.3":"2017-01-30T04:18:41.641Z","0.2.0":"2017-02-02T21:02:27.116Z","0.2.1":"2017-02-03T15:25:35.497Z","0.2.2":"2017-02-04T00:19:31.623Z","0.3.0":"2017-02-08T17:42:42.467Z","0.3.1":"2017-02-13T05:55:38.989Z","0.3.2":"2017-02-21T02:30:58.742Z","0.3.3":"2017-03-30T14:52:29.492Z","0.4.0-alpha-1":"2017-04-05T21:18:56.843Z","0.4.0":"2017-04-21T17:39:30.795Z","0.4.1":"2017-04-28T03:54:35.821Z","0.4.2":"2017-06-06T15:46:08.983Z","0.5.1":"2017-08-25T20:18:06.295Z","0.5.2":"2017-09-19T03:29:23.562Z","0.5.3":"2017-09-25T15:49:13.992Z","0.5.4":"2017-09-26T22:47:36.170Z","0.6.0-alpha-1":"2017-09-29T14:48:10.705Z","0.6.0-alpha-2":"2017-09-29T22:21:12.244Z","0.6.0-alpha-3":"2017-09-30T22:38:49.699Z","0.6.0-alpha-4":"2017-10-04T15:19:46.480Z","0.6.0-alpha-5":"2017-10-18T17:57:02.567Z","0.6.0-alpha-6":"2017-10-27T18:06:31.216Z","0.6.0":"2017-10-30T18:07:06.530Z","0.6.1":"2018-02-19T19:20:32.323Z","0.6.2":"2018-02-21T23:11:03.975Z","0.7.0-alpha-1":"2018-04-26T03:58:43.588Z","0.7.0-alpha-2":"2018-04-27T15:41:30.721Z","0.7.0-alpha-3":"2018-05-31T18:17:47.221Z","0.7.0-alpha-4":"2018-06-12T13:45:51.621Z","0.7.0-alpha-5":"2018-06-12T17:06:57.162Z","0.7.0-alpha-minor-1":"2018-06-21T18:37:22.349Z","0.7.0-alpha-minor-2":"2018-06-22T19:31:13.986Z","0.7.0-alpha-minor-3":"2018-06-22T19:43:55.347Z","0.7.0-alpha-minor-4":"2018-06-22T20:22:04.439Z","0.7.0-alpha-minor-5":"2018-06-22T20:51:35.203Z","0.7.0-alpha-minor-6":"2018-06-22T21:18:21.133Z","0.7.0-alpha-minor-7":"2018-06-27T12:52:48.698Z","0.7.0-alpha-minor-8":"2018-06-27T12:58:43.451Z","0.7.0-alpha-minor-9":"2018-06-28T18:20:55.110Z","0.7.0-alpha-minor-10":"2018-06-28T18:27:50.051Z","0.7.0-alpha-minor-11":"2018-06-28T19:13:52.917Z","0.7.0-alpha-minor-12":"2018-06-28T22:22:15.228Z","0.7.0-alpha-minor-13":"2018-07-12T17:54:13.186Z","0.7.0-alpha-minor-14":"2018-07-18T17:25:36.754Z","0.7.0-alpha-minor-15":"2018-07-18T19:50:27.777Z","0.7.0-alpha-minor-16":"2018-07-19T21:43:00.502Z","0.7.0-alpha-minor-17":"2018-07-20T12:57:51.772Z","0.7.0-alpha-minor-18":"2018-07-24T19:58:09.851Z","0.7.0-alpha-minor-19":"2018-07-26T12:26:38.657Z","0.7.0-alpha-minor-20":"2018-07-26T13:28:55.006Z","0.6.3":"2018-07-26T21:27:34.699Z","0.7.0-alpha-6":"2018-07-30T22:46:08.169Z","0.7.0-alpha-7":"2018-07-31T17:48:40.229Z","0.7.0-alpha-8":"2018-08-02T13:38:29.922Z","0.7.0-alpha-9":"2018-08-22T21:25:50.351Z","0.6.4":"2018-08-23T01:12:51.803Z","0.7.0-alpha-10":"2018-09-06T15:16:13.941Z","0.7.0-alpha-11":"2018-09-10T23:42:47.508Z","0.7.0-alpha-12":"2018-09-11T22:50:56.718Z","0.7.0-alpha-13":"2018-09-13T00:11:43.440Z","0.6.5":"2018-09-25T00:08:08.872Z"},"author":{"name":"Pelle Braendgaard","email":"pelle.braendgaard@consensys.net"},"license":"MIT","readmeFilename":"README.md"}