Catalog npm
Back to packageRELEASE DETAILS

1.0.0-alpha.7

npm

3id-connect

Account management for 3ID

Published18 Dec 2020
Direct dependencies51
Transitive dependenciesNot calculated

README

Version 1.0.0-alpha.7 documentation

ceramicnetwork Twitter

3ID-Connect

3ID Connect Image

3ID user account management in a iframe. An easy way to access a did provider, specifically ThreeIdProvider in the browser. It allows users to authenticate, manage, link and permission their 3ID keys to applications. The library 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.

Use

npm install 3id-connect@next

Example usage with an ethereum provider and related auth provider.

import { ThreeIdConnect,  EthereumAuthProvider } from '@ceramicstudio/3id-connect'

// assuming ethereum provider available or on window
const addresses = await provider.enable()

const authProvider = new EthereumAuthProvider(provider, addresses[0])
await threeIdConnect.connect(authProvider)

const didProvider = await threeIdConnect.getDidProvider()

// now consume didProvider in ceramic clients, idx, dids libraries, etc

Structure

  • /src - Core logic and consumable interfaces for clients and iframe
    • /threeIdConnect.ts - Application interface (RPC client) to load iframe and return 3ID provider.
    • /connectService.ts - Identity wallet instance and RPC 'server' to handle requests
    • /didProviderProxy.ts - DID provider interface that relays request through RPC layer
    • /authProvider - 3ID connect (client) consumes an auth provider, auth providers can be implemented to support many different blockchain accounts and authentication methods
      • /abstractAuthProvider.ts - Interface used to implement a auth provider
      • /ethereumAuthProvider.ts - Ethereum auth provider, to link and authenticate with ethereum accounts
  • /iframe - all html, css, js, design assets for iframe and flow
  • /public - build assets deployed for iframe

Development

Clone and install dependencies

Run Iframe Locally

$ npm run start

The 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.

$ npm install -g @ceramicnetwork/cli
& ceramic daemon

You can also run the iframe and connect to a remote testnet Ceramic node.

$ npm run start:testnet

And lastly connect the iframe to any Ceramic node.

$ CERAMIC_API=https://yourceramicnode:port npm run start

Run Demo

The 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.

$ npm run start:demo

You can also pass the same options to the local iframe with similar commands.

$ npm run start:demo:testnet
// or 
$ CERAMIC_API=https://yourceramicnode:port npm run start:demo

Build

$ npm run build

Maintainers

@zachferland

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 51

Native requirements
51 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
@babel/runtime
Environment
{
  "local_name": "@babel/runtime",
  "alias": false,
  "peer_metadata": null
}
^7.12.5runtime
@ceramicnetwork/http-client
Environment
{
  "local_name": "@ceramicnetwork/http-client",
  "alias": false,
  "peer_metadata": null
}
^0.8.8runtime
@ceramicstudio/idx
Environment
{
  "local_name": "@ceramicstudio/idx",
  "alias": false,
  "peer_metadata": null
}
^0.5.0runtime
@ethersproject/hdnode
Environment
{
  "local_name": "@ethersproject/hdnode",
  "alias": false,
  "peer_metadata": null
}
^5.0.7runtime
3id-blockchain-utils
Environment
{
  "local_name": "3id-blockchain-utils",
  "alias": false,
  "peer_metadata": null
}
^1.3.1runtime
3id-did-provider
Environment
{
  "local_name": "3id-did-provider",
  "alias": false,
  "peer_metadata": null
}
^0.2.0runtime
caip
Environment
{
  "local_name": "caip",
  "alias": false,
  "peer_metadata": null
}
^0.9.2runtime
dag-jose
Environment
{
  "local_name": "dag-jose",
  "alias": false,
  "peer_metadata": null
}
^0.3.0runtime
dids
Environment
{
  "local_name": "dids",
  "alias": false,
  "peer_metadata": null
}
^1.1.0runtime
errors-utils
Environment
{
  "local_name": "errors-utils",
  "alias": false,
  "peer_metadata": null
}
^0.1.0runtime
postmsg-rpc
Environment
{
  "local_name": "postmsg-rpc",
  "alias": false,
  "peer_metadata": null
}
^2.4.0runtime
rpc-utils
Environment
{
  "local_name": "rpc-utils",
  "alias": false,
  "peer_metadata": null
}
^0.2.0runtime
store
Environment
{
  "local_name": "store",
  "alias": false,
  "peer_metadata": null
}
^2.0.12runtime
url-parse
Environment
{
  "local_name": "url-parse",
  "alias": false,
  "peer_metadata": null
}
^1.4.7runtime
@babel/cli
Environment
{
  "local_name": "@babel/cli",
  "alias": false,
  "peer_metadata": null
}
^7.12.10development
@babel/core
Environment
{
  "local_name": "@babel/core",
  "alias": false,
  "peer_metadata": null
}
^7.12.10development
@babel/plugin-proposal-class-properties
Environment
{
  "local_name": "@babel/plugin-proposal-class-properties",
  "alias": false,
  "peer_metadata": null
}
^7.12.1development
@babel/plugin-proposal-object-rest-spread
Environment
{
  "local_name": "@babel/plugin-proposal-object-rest-spread",
  "alias": false,
  "peer_metadata": null
}
^7.12.1development
@babel/plugin-transform-modules-commonjs
Environment
{
  "local_name": "@babel/plugin-transform-modules-commonjs",
  "alias": false,
  "peer_metadata": null
}
^7.12.1development
@babel/plugin-transform-runtime
Environment
{
  "local_name": "@babel/plugin-transform-runtime",
  "alias": false,
  "peer_metadata": null
}
^7.12.10development
@babel/preset-env
Environment
{
  "local_name": "@babel/preset-env",
  "alias": false,
  "peer_metadata": null
}
^7.12.11development
@babel/preset-typescript
Environment
{
  "local_name": "@babel/preset-typescript",
  "alias": false,
  "peer_metadata": null
}
^7.12.7development
@ceramicnetwork/3id-did-resolver
Environment
{
  "local_name": "@ceramicnetwork/3id-did-resolver",
  "alias": false,
  "peer_metadata": null
}
^0.6.0-alpha.0development
@portis/web3
Environment
{
  "local_name": "@portis/web3",
  "alias": false,
  "peer_metadata": null
}
^2.0.0-beta.57development
@types/store
Environment
{
  "local_name": "@types/store",
  "alias": false,
  "peer_metadata": null
}
^2.0.2development
@types/url-parse
Environment
{
  "local_name": "@types/url-parse",
  "alias": false,
  "peer_metadata": null
}
^1.4.3development
@walletconnect/web3-provider
Environment
{
  "local_name": "@walletconnect/web3-provider",
  "alias": false,
  "peer_metadata": null
}
^1.2.1development
authereum
Environment
{
  "local_name": "authereum",
  "alias": false,
  "peer_metadata": null
}
0.0.4-beta.186development
babel-core
Environment
{
  "local_name": "babel-core",
  "alias": false,
  "peer_metadata": null
}
7.0.0-bridge.0development
babel-loader
Environment
{
  "local_name": "babel-loader",
  "alias": false,
  "peer_metadata": null
}
^8.2.2development
css-loader
Environment
{
  "local_name": "css-loader",
  "alias": false,
  "peer_metadata": null
}
^2.1.1development
css-to-string-loader
Environment
{
  "local_name": "css-to-string-loader",
  "alias": false,
  "peer_metadata": null
}
^0.1.3development
eslint
Environment
{
  "local_name": "eslint",
  "alias": false,
  "peer_metadata": null
}
^7.15.0development
eslint-config-3box
Environment
{
  "local_name": "eslint-config-3box",
  "alias": false,
  "peer_metadata": null
}
^0.2.0development
fortmatic
Environment
{
  "local_name": "fortmatic",
  "alias": false,
  "peer_metadata": null
}
^2.2.1development
http-server
Environment
{
  "local_name": "http-server",
  "alias": false,
  "peer_metadata": null
}
^0.12.3development
ipfs
Environment
{
  "local_name": "ipfs",
  "alias": false,
  "peer_metadata": null
}
^0.52.3development
jest
Environment
{
  "local_name": "jest",
  "alias": false,
  "peer_metadata": null
}
^26.6.3development
node-sass
Environment
{
  "local_name": "node-sass",
  "alias": false,
  "peer_metadata": null
}
^4.13.1development
npm
Environment
{
  "local_name": "npm",
  "alias": false,
  "peer_metadata": null
}
^6.14.9development
npm-run-all
Environment
{
  "local_name": "npm-run-all",
  "alias": false,
  "peer_metadata": null
}
^4.1.5development
prettier
Environment
{
  "local_name": "prettier",
  "alias": false,
  "peer_metadata": null
}
^2.2.1development
sass-loader
Environment
{
  "local_name": "sass-loader",
  "alias": false,
  "peer_metadata": null
}
^8.0.2development
style-loader
Environment
{
  "local_name": "style-loader",
  "alias": false,
  "peer_metadata": null
}
^0.23.1development
svg-inline-loader
Environment
{
  "local_name": "svg-inline-loader",
  "alias": false,
  "peer_metadata": null
}
^0.8.2development
typescript
Environment
{
  "local_name": "typescript",
  "alias": false,
  "peer_metadata": null
}
^4.1.3development
url-loader
Environment
{
  "local_name": "url-loader",
  "alias": false,
  "peer_metadata": null
}
^4.0.0development
web3modal
Environment
{
  "local_name": "web3modal",
  "alias": false,
  "peer_metadata": null
}
^1.9.2development
webpack
Environment
{
  "local_name": "webpack",
  "alias": false,
  "peer_metadata": null
}
^4.20.2development
webpack-bundle-analyzer
Environment
{
  "local_name": "webpack-bundle-analyzer",
  "alias": false,
  "peer_metadata": null
}
^3.9.0development
webpack-cli
Environment
{
  "local_name": "webpack-cli",
  "alias": false,
  "peer_metadata": null
}
^3.1.2development

Distribution files

1 collected
Distribution 1

Source distribution

Source file
Checksums from source
{
  "integrity": "sha512-f2slnjZUgyG/UP/+4gpEYXH1I9Lz6XA93me8dcUXh/cW4JarftIciw7RrfZT/L9F9f1l/FxFSgd/7M/pzeRSww==",
  "shasum": "cb2802642d45d700ea984ce46faee5f69b40b304",
  "tarball": "https://registry.npmjs.org/3id-connect/-/3id-connect-1.0.0-alpha.7.tgz",
  "fileCount": 4,
  "unpackedSize": 16948,
  "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf3BXICRA9TVsSAnZWagAARlEP/0L8k4RWc/Bs8sFZd8Kw\nhYy+qmTKMWrP4EZseiftydw/pWk+jdtUU2OcZNJ22uNF8zp1TfCi4SWhR+9C\n4/iIM3XsVSBiI14GgH/QsybDev6I6aY7Ll2CJ4ll60LJwM34eiEvLy/8T1Fh\nnU47XDlcmyH98Tv0J96SS32Vy8LvZEThWAijeE1wF8k/HwsQHunFxxbvRM8f\nIPLKINdKpPe/tPzQw70msmU+lukWBiXBQLMe9PTTcknhEFw3vDC8sY6YodYn\nsINn8ZqCJAZVuvxmVXO9rMoUAk0ORH9xtT2PFJ7/LlmyVZd7aR007giA7gLQ\nDcfy/WXsgip74x1OxPIlnEc2i6Qjbgm3agBUCZz3yMeGFYfFhxwZRYiKtyn7\nu8Cl4fOGPzOn3YsX4pjfbCecwseHEDka5zKSVR2ePykC4+2/S9JAjpGZ0Ddd\n+jj4w/YKKAtzm48Qj2P2nEPeDUzKM4F5U9TINjLPzVlpx2He2JJfLaS3oL5s\ndi8qm7+Y/HJnRsWXKvh4rNPL6aX6/Xa2LPwW3IUWUjV3FFSo0iBP2GgsiSZA\nRFLvCjge8I/u+OPhmdQtQgNBJHdf5KD+yy1n1faUk5aOmj4ezlogeU10SV5N\n3covtiXw0yfkQVA6Z/grtRfxA+fkoC2oyWcLTvm1fgpd2Q41cNT7CmmXrPPh\nMOtN\r\n=7Esw\r\n-----END PGP SIGNATURE-----\r\n",
  "signatures": [
    {
      "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
      "sig": "MEUCIF0iJnOk0fd4tmYNKcYjfG09h2BWCec27g5C39SsaS3IAiEArv0/ZFSzh0NX1bIOwJg5+28FZOImUykTugMj3jlwnqk="
    }
  ]
}

Repository

PENDING
3box/3id-connect

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 19:45 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:fd48cf0c488abfc78e6b1d9e5782ab6686fd4fde7fc3acea1def4fd7114dd018

Other collected versions

1.0.0-beta.1523 Mar1.0.0-alpha.1521 Jan1.0.0-alpha.1421 Jan1.0.0-alpha.1319 Jan1.0.0-alpha.1215 Jan1.0.0-alpha.1115 JanView all collected versions →