Nexera-Fi SDK

Nexera-Fi SDK Installation Guide

This section provides detailed instructions for installing the Nexera-Fi SDK in your preferred programming language, either TypeScript or Python.

TypeScript SDK Installation

To start using the Nexera-Fi SDK in your TypeScript project, follow the installation instructions presented below.

Prerequisites

  • Node.js: Ensure you have Node.js installed on your system. You can download it from https://nodejs.org/

  • Typescript Compiler: Ensure you have installed the TypeScript compiler on your system.

You can install it globally using NPM which is pre-installed with Node.js. On your terminal execute the following command:

npm install -g typescript

Create and Initialize a TypeScript Project

Navigate to your project's root directory and initialize it by executing the following two commands:

# This will generate a package.json file in your root directory
npm init -y
# This will generate a tsconfig.json file in your root directory
tsc --init

Install Nexera-Fi SDK

  • First create a .npmrc file inside your project's root directory, and paste the following content inside it:
# .npmrc
registry=https://registry.yarnpkg.com/
//npm.pkg.github.com/:_authToken=<GITHUB_PERSONAL_ACCESS_TOKEN>
@nexeraprotocol:registry=https://npm.pkg.github.com
always-auth=true
auto-install-peers=true

Make sure to replace <GITHUB_PERSONAL_ACCESS_TOKEN> with your Github PAT that should be configured with at least read-only access to the Nexera-Fi repo.

  • Install the Nexera-Fi TypeScript SDK as a dependency in your project by running the following command:
npm install @nexeraprotocol/nexera-fi-sdk

Python SDK Installation

To start using the Nexera-Fi SDK in your Python project, follow the installation instructions presented below.

Prerequisites

  • Python: Ensure you have Python >= 3.7.2 installed on your system. You can download it from https://www.python.org/

Create and Initialize a Python Project

Navigate to your project's root directory and initialize it by executing the following command on you terminal

On Windows OS:

# Create a virtual environment
python -m venv .venv

On Unix-based OS:

# You may need to run `sudo apt-get install python3-venv` first
python3 -m venv .venv

Activate Virtual Environment

Inside your project's root directory on your terminal execute the following command

On Windows OS:

.\.venv\Scripts\activate 

On Unix-based OS:

source .venv/bin/activate

Install Nexera-Fi SDK

Copy the following code snippet and execute it inside your project's root directory.

pip install "git+https://<GITHUB_PERSONAL_ACCESS_TOKEN>@github.com/NexeraProtocol/Nexera-FI.git@main#egg=nexera.fi_sdk&subdirectory=sdk_python"

Make sure to replace <GITHUB_PERSONAL_ACCESS_TOKEN> with your Github PAT that should be configured with at least read-only access to the Nexera-Fi repo.

On this page