Getting started
Create your first Context Document
Introduction
The Context SDK provides a powerful and flexible way to interact with Context, enabling developers to manage domains and documents programmatically. With this SDK, you can create, modify, and manage domains and their associated documents using Context's API.
Installation
To start using the Context SDK in your TypeScript project, install it via npm:
Quick Start
This section walks you through setting up a basic connection and performing common operations with the Context SDK.
Setting Up Your Connection
First, import the SDK and create an instance of the Context:
Initialising the SDK
Firstly, please register at https://app.ctx.xyz and create an API key. Once you have obtained your API key, you will be able to initialize the SDK using this key.
Domains
To get information about a domain:
To get information about a domain:
Domain properties
Documents
Retrieve all documents within a domain or a specific document:
Retriving the document data:
Retrieving a document version list:
Get a specific version of a document:
Document properties
Creating a document in a domain
Steps to create a new document under a domain:
Create a data object.
Create a new document under the domain:
Adding a template to a document
Adding a template to a document:
Creating a template
Context uses JSON schemas to validate the documents. You can generate your schema using a Typescript interface as follows:
Public Methods
Domain
Retrieving all Domain Information
Document
Retrieving all documents from public API
Create your first Domain
We are scheduled to launch on Mainnet in the coming weeks. If you are interested in becoming one of our early users, we encourage you to create your initial domain on Testnet using our application.
For inquiries about creating a premium and verified domain, please contact us at support@ctx.xyz
Last updated