{"_id":"@daemon-land/3id-connect","_rev":"1-909fca738e3aa58147d2a0ea86b519a1","name":"@daemon-land/3id-connect","dist-tags":{"latest":"1.0.0-alpha.15"},"versions":{"1.0.0-alpha.15":{"name":"@daemon-land/3id-connect","version":"1.0.0-alpha.15","description":"Account management for 3ID","main":"lib/index.js","typings":"types/index.d.ts","scripts":{"lint":"eslint src","test:build:app":"webpack --config ./test/env/webpack.config.js --mode=development","test:build:iframe":"CERAMIC_API=http://localhost:7777 webpack --config webpack.config.js --mode=development --output-path ./test/env/build --output-filename iframe.js","test:ceramic":"rm -rf ./test/data && ceramic daemon --port 7777 --pinset-directory ./test/data --network inmemory","test:server":"http-server -c-1 -p 30001 ./test/env/","test:app":"run-p test:build:** test:server","test:run:integration":"jest --config integration.jest.config.js","test:run:unit":"jest --projects src/__tests__ --detectOpenHandles","test":"run-p test:build:** && npm run test:run:integration && npm run test:run:unit","build:prod:es5":"rm -rf ./lib && babel src --out-dir lib --extensions .ts","build:prod:types":"rm -rf ./types && tsc --emitDeclarationOnly --skipLibCheck","build:prod:dist":"webpack --config webpack.config.js --mode=production --output-filename index.js","build:dev:dist":"webpack --config webpack.config.js --mode=production --output-filename index.js --env develop","build":"run-p build:prod:**","build:dev":"run-p build:prod:es5 build:prod:types build:dev:dist","prepublishOnly":"npm run build","dev:iframe:build":"webpack --config webpack.config.js --mode=development --watch","dev:iframe:server:start":"http-server -c-1 -p 30001 ../public","start":"run-p dev:iframe:**","start:testnet":"CERAMIC_API=https://ceramic-clay.3boxlabs.com npm run start","dev:demo:server:start":"http-server -c-1 -p 30000 example","dev:demo:build":"webpack --config ./example/webpack.config.js --mode=development --watch","start:demo":"run-p dev:demo:** start","start:demo:testnet":"CERAMIC_API=https://ceramic-clay.3boxlabs.com run-p dev:demo:** start:testnet"},"repository":{"type":"git","url":"git+https://github.com/3box/3id-connect.git"},"author":{"name":"3box","email":"team@3box.io"},"license":"(Apache-2.0 OR MIT)","bugs":{"url":"https://github.com/3box/3id-connect/issues"},"homepage":"https://github.com/3box/3id-connect#readme","dependencies":{"@babel/runtime":"^7.12.13","@ceramicnetwork/blockchain-utils-linking":"^0.1.0","@ceramicnetwork/common":"^0.15.9","@ceramicnetwork/http-client":"^0.9.6","@ceramicnetwork/rpc-postmessage":"^0.3.0","@ceramicnetwork/rpc-transport":"^0.2.0","@ceramicnetwork/transport-postmessage":"^0.2.0","@ceramicnetwork/transport-subject":"^0.2.0","@ceramicstudio/idx":"^0.8.0","@ceramicstudio/idx-constants":"^0.7.0","@ethersproject/hdnode":"^5.0.8","@stablelib/sha256":"^1.0.0","3id-did-provider":"^0.5.1","caip":"^0.9.2","cross-fetch":"^3.0.6","dag-jose":"^0.3.0","dids":"^1.1.1","errors-utils":"^0.1.0","jest-playwright-jsdom":"^0.0.4","jwt-decode":"^3.1.2","multicodec":"~2.0.0","postmsg-rpc":"^2.4.0","rpc-utils":"^0.3.4","store":"^2.0.12","uint8arrays":"^2.1.2","url-parse":"^1.4.7"},"devDependencies":{"@babel/cli":"^7.12.13","@babel/core":"^7.12.13","@babel/plugin-proposal-class-properties":"^7.12.13","@babel/plugin-proposal-object-rest-spread":"^7.12.13","@babel/plugin-transform-modules-commonjs":"^7.12.13","@babel/plugin-transform-runtime":"^7.12.13","@babel/preset-env":"^7.12.13","@babel/preset-typescript":"^7.12.13","@ceramicnetwork/3id-did-resolver":"^0.6.10","@ceramicnetwork/cli":"^0.20.8","@ceramicstudio/idx-tools":"^0.8.0","@ethersproject/wallet":"^5.0.11","@glif/filecoin-address":"^1.1.0-beta.18","@glif/local-managed-provider":"^1.1.0-beta.18","@polkadot/util":"^5.6.2","@portis/web3":"^2.0.0-beta.57","@smontero/eosio-local-provider":"^0.0.3","@tendermint/sig":"^0.6.0","@types/create-hash":"^1.2.2","@types/store":"^2.0.2","@types/url-parse":"^1.4.3","@walletconnect/web3-provider":"^1.3.4","@zondax/filecoin-signing-tools":"^0.13.0","authereum":"0.0.4-beta.186","babel-core":"7.0.0-bridge.0","babel-loader":"^8.2.2","bip39":"^3.0.2","css-loader":"^2.1.1","css-to-string-loader":"^0.1.3","eosjs-ecc":"^4.0.7","eslint":"^7.19.0","eslint-config-3box":"^0.2.0","eslint-plugin-jest-playwright":"^0.2.1","fortmatic":"^2.2.1","http-server":"^0.12.3","ipfs":"^0.52.3","jest":"^26.6.3","jest-playwright-preset":"^1.4.5","node-sass":"^4.13.1","npm":"^6.14.11","npm-run-all":"^4.1.5","playwright":"^1.7.1","prettier":"^2.2.1","rxjs":"^6.6.6","sass-loader":"^8.0.2","style-loader":"^0.23.1","svg-inline-loader":"^0.8.2","typescript":"^4.1.3","url-loader":"^4.0.0","web3modal":"^1.9.2","webpack":"^4.20.2","webpack-bundle-analyzer":"^3.9.0","webpack-cli":"^3.1.2"},"eslintIgnore":["src/__tests__/"],"_id":"@daemon-land/3id-connect@1.0.0-alpha.15","_nodeVersion":"14.9.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-mv3WDCDQVkrQikcCeuw3SfTMzJ9R/PJ9mZOVH6rSrMw0bY5Apbybveypbzum+VzqCyRm7CImjWJa+Xe7zKVNnQ==","shasum":"c7409c113cdc5820d7bf22749c031e763b209f9a","tarball":"https://registry.npmjs.org/@daemon-land/3id-connect/-/3id-connect-1.0.0-alpha.15.tgz","fileCount":32,"unpackedSize":141337,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgY0ZFCRA9TVsSAnZWagAA2dwP/jmM7dVOB6B9AaSr3821\nezMnkue297UWi8IzONkIY1gZEbMKnxiJyouTvcNnIAg8BEIrlVocTLQD9cPw\nuXnhp4P79ZtPR75NHvfVAVAIlqoZGLny2vgrSOyuMpG5h5HYcfMqK9qdcPrp\nQIxg03zjoB0Zv4WpNdYU+P8RL6VNlM0ArvEgTrU7eIAmVKXoUG7ruqUQyE45\nd+KKMUbhWwYa914BMDMFcHLw2dHaTYeysItvrjEi8Wa9FYZ2tQ5ycldK6JqY\nddsKmEXy512yAWkWZlzdJPwQpDe+xE4LEONoWp9GW8eZGe2d+uEK10mwTgwe\ndGBdSjrWf9uLHdv3gJsPw+XjxxwZI6b4zvMvDmTHHLMHreunS2BFZThKawHp\nLUAYt6qURZJa6TaZ2jEVcnoD7oSPNi4vv36ggr3j+uJHU78zAIS5bEEVVOJN\n7d4jt3b66LvjWgM29e/uL0kvGoe8OXRpyzS0PV+g0JmEABU68AiPwusdlroL\nTOlVoRLIDnz/YtzqkpgDvxeMiQtabTd02Nd8T5YS8YueDj27byxYvEI4Jnt1\nXqS5ZyUVuoiwE0RLp1juyb29PrmERxXJfGPrw8ES673ldl6U+wiodHdYqco2\nSoBG9lXSP6qr/faToM57eQw6bkh8Meu4o2VFHVdp4mjjTDDfBEdeV0FpPmDR\nAkVs\r\n=M3oC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCrNt3t3VBznzlWERLSuSRp4k1sO8ONaxNX1k6TTr0oWwIhANL+/c6vNaSYBQJ9wldILNotKURksXMl6usf8Ksk9WOf"}]},"_npmUser":{"name":"schwartzz8990","email":"jpschwartz2@uwalumni.com"},"directories":{},"maintainers":[{"name":"schwartzz8990","email":"jpschwartz2@uwalumni.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/3id-connect_1.0.0-alpha.15_1617118789075_0.21637336064475843"},"_hasShrinkwrap":false}},"time":{"created":"2021-03-30T15:39:48.854Z","1.0.0-alpha.15":"2021-03-30T15:39:49.240Z","modified":"2022-04-05T02:32:57.397Z"},"maintainers":[{"name":"schwartzz8990","email":"jpschwartz2@uwalumni.com"}],"description":"Account management for 3ID","homepage":"https://github.com/3box/3id-connect#readme","repository":{"type":"git","url":"git+https://github.com/3box/3id-connect.git"},"author":{"name":"3box","email":"team@3box.io"},"bugs":{"url":"https://github.com/3box/3id-connect/issues"},"license":"(Apache-2.0 OR MIT)","readme":"# <a name=\"intro\"></a> 3ID-Connect\n\n3ID user account management in a iframe. An easy way to access a did provider, specifically [ThreeIdProvider](https://github.com/ceramicstudio/js-3id-did-provider) in the browser. It allows users to authenticate, manage, link and permission their 3ID keys to applications. The library [js-3id-did-provider](https://github.com/ceramicstudio/js-3id-did-provider) handles most operations and the parent window (application) communicates with the iframe service over an RPC layer. 3id-connect with Ceramic support is only available at 3id-connect@next and 3idconnect.org at the moment.\n\n## <a name=\"use\"></a> Use\n\n```\nnpm install 3id-connect@next\n```\n\nExample usage with an ethereum provider and related auth provider.\n\n```js\nimport { ThreeIdConnect, EthereumAuthProvider } from '@ceramicstudio/3id-connect'\n\n// assuming ethereum provider available or on window\nconst addresses = await provider.enable()\n\nconst authProvider = new EthereumAuthProvider(provider, addresses[0])\nawait threeIdConnect.connect(authProvider)\n\nconst didProvider = await threeIdConnect.getDidProvider()\n\n// now consume didProvider in ceramic clients, idx, dids libraries, etc\n```\n\n## <a name=\"structure\"></a> Structure\n\n- **/src** - Core logic and consumable interfaces for clients and iframe\n  - **/threeIdConnect.ts** - Application interface (RPC client) to load iframe and return 3ID provider.\n  - **/connectService.ts** - Identity wallet instance and RPC 'server' to handle requests\n  - **/didProviderProxy.ts** - DID provider interface that relays request through RPC layer\n  - **/authProvider** - 3ID connect (client) consumes an auth provider, auth providers can be implemented to support many different blockchain accounts and authentication methods\n    - **/abstractAuthProvider.ts** - Interface used to implement a auth provider\n    - **/ethereumAuthProvider.ts** - Ethereum auth provider, to link and authenticate with ethereum accounts\n- **/iframe** - all html, css, js, design assets for iframe and flow\n- **../public** - build assets deployed for iframe\n\n## <a name=\"development\"></a> Development\n\nClone and install dependencies\n\n#### Run Iframe Locally\n\n```\n$ npm run start\n```\n\nThe iframe will be served locally on port 30001. The iframe service also requires a Ceramic node, by default it will look for a locally running node. The quickest way to run a node is with the Ceramic CLI.\n\n```\n$ npm install -g @ceramicnetwork/cli\n& ceramic daemon\n```\n\nYou can also run the iframe and connect to a remote testnet Ceramic node.\n\n```\n$ npm run start:testnet\n```\n\nAnd lastly connect the iframe to any Ceramic node.\n\n```\n$ CERAMIC_API=https://yourceramicnode:port npm run start\n```\n\n#### Run Demo\n\nThe Demo application is served on port 30000, and connects to a locally running iframe, as described above. Demo application is found in the `/example` folder.\n\n```\n$ npm run start:demo\n```\n\nYou can also pass the same options to the local iframe with similar commands.\n\n```\n$ npm run start:demo:testnet\n// or\n$ CERAMIC_API=https://yourceramicnode:port npm run start:demo\n```\n\n#### Build\n\n```\n$ npm run build\n```\n\n## Maintainers\n\n[@zachferland](https://github.com/zachferland)\n","readmeFilename":"README.md"}