CORD.js is a JavaScript library that provides a collection of classes and methods to interact with the Cord network.
To build the SDK and see changes, follow these steps:
-
Clone this repository to your local machine:
git clone <repository_url> cd <repository_directory>
-
Install dependencies using yarn:
yarn
-
Build the SDK:
yarn build
Once the SDK is built, you can experiment with the provided methods.
To experiment the SDK locally, a connection is required a existing CORD network. It is also possible to run a CORD network locally. Please follow the documentation mentioned at CORD repository.
The demo-statement
method allows you to interact with statement-related functionalities.
To run the statement demo, execute the following command:
yarn demo-statement
The demo-network-score
method demonstrates methods related to network scores.
To run the network score demo, execute the following command:
yarn demo-network-score
The demo-asset
method showcases methods related to assets.
To run the asset demo, execute the following command:
yarn demo-asset
Registry & Entries modules are part of the Decentralised Directory (DeDi).
The demo-registry
method showcases methods related to registry.
To run the registry demo, execute the following command:
yarn demo-registry
The demo-registry-entries
method showcases methods related to entries.
To run the asset demo, execute the following command:
yarn demo-registry-entries
The output of each demo script will demonstrate the functionality of the corresponding method. For a detailed structure of the demo scripts, refer to the source code.
To use the SDK in your project, follow these steps:
-
Navigate to your project directory.
-
Install the SDK using npm or yarn:
npm install @cord.network/sdk
Or with yarn:
yarn add @cord.network/sdk
Once installed, you can import and utilize the SDK in your project as needed.