Verida Documentation
  • Welcome
  • Network Overview
  • Start Building
  • Verida Wallet
  • Whitepapers
  • Glossary
  • Protocol
    • Core concepts
      • Design Principles
      • Decentralized Identity
      • Confidential Databases
      • Confidential Compute
      • Accounts and Identity
      • Data Storage
      • Application Contexts
      • Messaging
      • Schemas
      • Data Sharing
    • Client SDK
      • Getting Started
      • How It Works
      • Authentication
      • Data
      • Queries
      • Permissions
      • Messaging
      • Account Profiles
      • Events
      • Command Line Tools
      • Configuration
      • React Native
      • Advanced
    • Verida Connect SDK
      • Getting Started
      • WebUser
      • WalletConnect Support
      • Authentication Server
    • Blockchain Bridge
    • Run a Node
      • Database Node
        • Setup
        • Operations
        • FAQ
      • Compute Node
    • Verida Networks
  • Extensions
    • Credentials
      • Verifiable Credentials Developer SDK
      • cheqd Credential Service
      • Privado ID (fmr Polygon ID)
      • zkPass credentials
      • Reclaim Protocol credential
    • Verida URIs
    • Vue Components
Powered by GitBook
On this page

Was this helpful?

  1. Extensions

Verida URIs

PreviousReclaim Protocol credentialNextVue Components

Last updated 7 months ago

Was this helpful?

Verida supports URI's that reference a specific record on the network.

URI helper library

The @verida/helpers library provides tools to create and load Verida URI's.

Installation

yarn add @verida/helpers

Generating a URI

import { buildVeridaUri } from '@verida/helpers'

const did = 'did:vda:polamoy:0x...'
const contextName: 'Verida: Vault'
const databaseName: 'test_db'
const rowId: '123456'

const uri = buildVeridaUri(did, contextName, databaseName, rowId)
console.log(`Generated URI: ${uri}`)

Fetching a URI

import { fetchVeridaUri } from '@verida/helpers'

const context = client.openContext('Verida: Vault')

try {
    const row = fetchVeridaUri(uri, context)
    console.log('Fetched row')
    console.log(row)
} catch (err) {
    // May throw document not found if it doesn't exist
    // or no permission to access
    console.log(err)
}
import { explodeVeridaUri } from '@verida/helpers'

const {
    did,
    contextName,
    dbName,
    id,
    query
} = explodeVeridaUri(uri)

Parsing a URI

​
​
​
​
​