Context Protocol Docs
Start building
  • PROTOCOL OVERVIEW
    • ✖️About Context Protocol
    • 👾Why Context Protocol?
      • Verified AI-Ready Domains (VARD)
      • Training AI with verified data
      • SaaS Solution
    • 🤖Technology behind Context
    • 📈$TEX Token
      • Multi-chain token
      • Token Utility
      • Governance
      • Allocation
    • 🧐Use Cases and Applications
      • 📢Telegram bot for updates
      • 🔵Basenames integration
      • 🌎dWeb: Descentralized Website
      • 📌Decentralized Link3
  • DEVELOPERS
    • 👨‍💻Why build on Context
    • 🏗️Typescript SDK
      • Initialization
      • Working with Domains
      • Managing Documents
      • Creating Templates
      • Assets
      • Error Handling
    • 📑Example Workflow
    • ✨Create your first Domain
  • COMMUNITY
    • 🪂Community Program
    • 🫂Social Media
  • RESOURCES
    • 🛟Support
    • 🖥️WebApp
Powered by GitBook
On this page
  • Fetch Domain Information
  • Domain Properties

Was this helpful?

  1. DEVELOPERS
  2. Typescript SDK

Working with Domains

Domains represent verified and curated entities, such as companies, projects, or individuals.

Fetch Domain Information

Fetch details of a specific domain or the default domain associated with your API key:

// Fetch your domain
const yourDomain = await ctx.domain();

// Fetch a specific domain.tld
const domain = await ctx.domain("context.startup");

Domain Properties

Access and display properties of a domain:

console.log(domain.data.name);
console.log(domain.data.fullDomain);
console.log(domain.data.tld);
console.log(domain.data.documents);
console.log(domain.data.status);
console.log(domain.data.createdAt);
console.log(domain.data.updatedAt);
PreviousInitializationNextManaging Documents

Last updated 5 months ago

Was this helpful?

🏗️