One of OrbisDB’s main features is data ownership - each entry in OrbisDB is verifiably owned by the end user, the original author.

Decentralized Identifiers

OrbisDB inherits its data ownership properties from Ceramic, a decentralized event store. Ceramic and OrbisDB share the same account model - Decentralized Identifiers, DID for short.

DIDs have unique properties, they are self-verifiable which allows users to own their data without relying on 3rd parties for verification. No matter which app you use in our ecosystem, you can bring your identity with you - it’s yours.

You can recognize DIDs by their simple format

did:<method>:<data>

DIDs in OrbisDB

DIDs are one of the foundational concepts at OrbisDB, as they allow users to fully own their identity, as well as their data.

Each OrbisDB session is based on a DID.

Every OrbisDB row entry is signed and owned by the original author’s DID. You can verify this by checking the controller field.

However, you don’t need to understand everything about DIDs or how they work. We made sure to simplify the process and abstract all the complexities using our SDK and UI.

Code example (EVM)

With OrbisDB, everything DID-related is handled by a single method - connectUser.

Learn how to initialize OrbisDB (link) and authenticate users (link).

import { OrbisDB } from "@useorbis/db-sdk"
import { OrbisEVMAuth } from "@useorbis/db-sdk/auth"

// Browser provider (ie. Metamask)
const provider = window.ethereum

// Orbis Authenticator
const auth = new OrbisEVMAuth(provider)

// Authenticate the user and persist the session in localStorage
const authResult: OrbisConnectResult = await orbis.connectUser({ auth })

// Log the result
console.log({ authResult })

DID types

DIDs have multiple methods by which they can be created. The ones used by Ceramic and OrbisDB are did:pkh and did:key.

did:pkh

did:pkh is the most commonly used method because it’s simple to derive. It’s based on the public key of the end user, so it’s native to all the web3 EOA wallets.

The DID is derived from an end user’s personal signature, allowing users to authorize apps for specific operations. This helps with the UX as users need to sign once for the duration of the session (3 months is the OrbisDB default).