IDX: A Devkit for Open Identity

IDX is a brand new SDK for building with decentralized identity and user-centric data from the 3Box Labs team.

IDX: A Devkit for Open Identity

The future of Web3 identity has arrived

IDX is in alpha but if you’d like to start experimenting, join our discord and jump into the docs.

A new era for Web3 development

The Web3 vision for an internet that is open and interoperable, where users control their information requires a decentralized, cross-platform identity system. To this end, IDX is an open source JavaScript/TypeScript library that exposes high-level developer APIs to various meta-protocols and standards for decentralized identity. Not only is IDX powerful and flexible enough to meet all of your user and data management needs, but it wraps everything in an easy-to-use package that makes decentralized identity accessible to all Web3 developers.

Designed to be cross-platform and highly configurable, IDX is compatible with all blockchains, wallets, and a wide variety of user and application data storage options including Ceramic, Textile, OrbitDB, Filecoin, IPFS, Sia, and Secure Data Stores — so you can seamlessly integrate decentralized identity with the rest of your Web3 tech stack. With IDX, developers can now build much more sophisticated and powerful Web3 applications that rival and even exceed what’s currently possible on Web2.

Why decentralized identity?

If you’ve ever asked yourself any of these questions, then you should definitely consider adding a decentralized identity system to your development stack.

  • How can I create a universal identifier to associate data resources from a variety of platforms to a single user?
  • How can I improve my user experience with decentralized social profiles?
  • How can users create a unified Web3 identity that links many different accounts within and across various blockchain platforms?
  • How can users establish trust and reputation by connecting their Web3 identity to existing Web2 social accounts (i.e. Twitter), various anti-sybil systems (i.e. BrightID), domain names (i.e. DNS, ENS, Handshake), and identity verification services (i.e. KYC)?
  • How can users create a universal and portable social graph of followers, friends, and contacts?
  • How can I store user and application data in various centralized and decentralized data storage technologies in a way that isn’t siloed to my application, gives users ultimate control and portability over their data, and works with all of their existing wallets/accounts?
  • How do I discover and import data that a user has created on another application, platform, or network so that I can use it inside my app?

IDX: An open identity framework for Web3


Decentralized identity and user-centric data management are complex, broad-ranging capabilities that touch almost every other aspect of your app architecture. IDX removes the all of the guesswork from implementing these in a scalable and future-proof way.

Build with unified digital identities

Using IDX, all applications can access a shared, globally-available identity layer that contains unified users identities. Built 100% on permissionless protocols, IDX enables users and their most important information to seamlessly flow and interoperate across platforms, while giving users the ownership and control they demand. In a way, the identity capabilities offered by IDX sort of function as a decentralized Keybase but with much greater flexibility and decentralization.

A unified digital footprint!

The core of each identity consists of a decentralized identifier (DID) which acts as a globally-unique ID and an identity index which keeps track of an identity’s information. IDX allows developers to deploy identities as well as create, read, update, and delete a variety of metadata and information related to the identity, including but not limited to:

  • Multiple user profiles for different contexts or applications
  • Portable social graphs, from followers to contacts and family
  • Links to multiple blockchain accounts from different protocols (Ethereum, Bitcoin, Polkadot, NEAR, Flow, etc)
  • Links to existing social accounts (Twitter, Github, Discord, Matrix, etc)
  • Links to domain names (DNS, ENS, Unstoppable, Handshake, etc)

All DIDs, identity indexes, and metadata are securely stored on Ceramic’s permissionless document management network. Because all information is publicly available (but optionally encrypted) and linked via the identity index, any bit of information can be cross-resolved by querying based on any other information. For example you could lookup a user’s profile based on their DID, their Ethereum account, or their Twitter handle; or you could lookup a user’s Filecoin account based on their Polkadot account. We are working with The Graph on indexing these identity structures which will open up many new opportunities in this realm.

Integrate with data storage solutions

Unified identities are the gateway to a world of additional functionality for your application. If you also need a way of storing and managing user data, you have three main options.

  • Use the IDX library to directly store documents on the Ceramic Network and add references to those documents in the user’s index. For this option, no additional software is needed; it works out of the box with IDX.
  • Store data in alternative data storage systems such as Filecoin, IPFS, Sia, Arweave, Textile, OrbitDB, Secure Data Stores, or Ethereum contracts and use IDX to add references to this data in your user’s index. For this option, you would need to separately install these technologies in your app alongside IDX.
  • Use a combination of the different data storage solutions above for your application, each with their own strengths and weaknesses, while mapping everything in your user’s IDX.

Whichever data storage configuration you choose, IDX allows all data to be controlled by the user, discoverable by others, and portable across platforms. This is true regardless of where the data resides (servers or decentralized networks) or which application first created the data.

The identity index contains mappings to various data sources

Share data across applications and silos

As described above, the key aspect of IDX that de-silos information, promotes interoperability, and enables user control is the identity index. It provides a standard interface which allows any application or developer to set and query all available data that belongs to a user so that they might make use of it within their application. The identity index serves as the information root for each user and makes everything discoverable.

To further promote interoperability, the identity index allows developers to:

  • Publish schemas, names, and descriptions for data points they are adding to the index, so others can more easily consume this information
  • Publish endpoints for where this information can be found, whether a DocID on Ceramic, a CID on IPFS/Filecoin, a contract on Ethereum, or an endpoint for a hosted service
  • Request permission to access encrypted data points in the index

Developing with IDX

The following section outlines how to get started building with IDX. For more supporting materials, read the docs.

Installation

First, we’ll need to install the main IDX library and associated dependencies:

npm install @ceramicnetwork/ceramic-http-client @ceramicstudio/idx @ceramicstudio/idx-constants

Query an identity

Then we can use these libraries to connect IDX to a Ceramic network and interact with the documents associated to a given DID. This example shows how to simply query the basic profile for a given user.

import Ceramic from '@ceramicnetwork/ceramic-http-client'
import { IDX } from '@ceramicstudio/idx'
import { definitions } from '@ceramicstudio/idx-constants'
// Use Ceramic devnet
const ceramic = new Ceramic('<https://ceramic.3boxlabs.com>')
// Use IDX-provided definitions aliases
const idx = new IDX({ ceramic, definitions })
// Get the basic profile of a known DID supporting IDX
async function getProfile(did) {
  return await idx.get('basicProfile', did)
}

Save data

More advanced examples involving authentication and setting content can be found in the IDX documentation.

Remember, IDX is still in alpha. If you have any questions, comments, or feedback on what we’ve built or how to use it, please reach out on Discord.

About

IDX is an open source library that is built and maintained with 💜 by the 3Box Labs team, creators of 3Box.js, a leading decentralized identity and data storage solution for Ethereum that has been used by 30,000+ users and 1,000+ projects. IDX is a smarter, mature evolution of 3Box.js. All DIDs and profiles created using 3Box.js will be automatically migrated to IDX once the library goes into production. We are working on various solutions to migrate user data that has been saved in spaces and threads to other IDX compatible data storage systems including Ceramic, Textile, and OrbitDB. If you have questions about this migration process or timeline, please reach out.

Resources

Website
Docs
Discord
Github
Twitter