How to Get Started with the iExec SDK

Aug 6, 2021 | Blockchain

The iExec SDK is an essential tool for developers looking to interact with the iExec decentralized marketplace. This SDK allows users to run off-chain computations seamlessly through both a command line interface (CLI) and a JavaScript library. Here, we’ll guide you step-by-step on how to set it up, use it, and troubleshoot common issues you might encounter.

Step 1: Installing the iExec SDK

To get started with the iExec SDK, you can easily install it via npm. Depending on your project needs, you may want to install either the Library or the CLI version.

  • For the JavaScript Library: Use the following command to install it in your frontend or backend project:
  • npm install iexec
  • For the Command Line Interface: Install it globally to enable easy access from your terminal:
  • npm install -g iexec

Step 2: Using the iExec SDK

Once you have installed the SDK, you’re ready to start using it. If you’re utilizing the JavaScript library, you can import it into your project:

import IExec from 'iexec';

For the CLI, you can check available commands by running:

iexec help

Step 3: Contributing to the SDK

If you’re interested in contributing to the iExec SDK, you can do so easily by following these steps:

  • Install Dependencies:
  • npm ci
  • Build the Project:
  • npm run build
  • Running Tests: Start your local dockerized stack first:
  • npm run start-test-stack
  • After starting the test stack, you can run your tests:
  • npm run test
  • Refresh the Test Stack: If you notice the stack becoming desynchronized, simply run:
  • npm run start-test-stack
  • Stop the Test Stack: When you’re done, you can tear down the stack with:
  • npm run stop-test-stack

Troubleshooting

While using the iExec SDK, you may encounter some issues. Here are a few troubleshooting ideas:

  • If you experience problems around the test stack, ensure that it is properly synchronized by running npm run start-test-stack again.
  • If tests relying on RPC API providers fail, check that you’ve set up your environment variables correctly:

For more insights, updates, or to collaborate on AI development projects, stay connected with fxis.ai.

Conclusion

With the iExec SDK, interacting with decentralized computing has never been easier! By following the steps above, you can set up, use, and even contribute to the iExec SDK seamlessly.

At fxis.ai, we believe that such advancements are crucial for the future of AI, as they enable more comprehensive and effective solutions. Our team is continually exploring new methodologies to push the envelope in artificial intelligence, ensuring that our clients benefit from the latest technological innovations.

Stay Informed with the Newest F(x) Insights and Blogs

Tech News and Blog Highlights, Straight to Your Inbox