The T-REX SDK is available via GitHub packages.
First, you will need to authenticate with the GitHub registry. To do this, you will need to run the following command.
npm login --registry=https://npm.pkg.github.com [email protected]
Important Note To be able to download the package, you need to have read access to the repository of the TREX SDK.
It will prompt you for the GitHub username and password which is, in fact, a personal access token.
After having authenticated with GitHub, you can install the library.
npm install @tokenyico/trex-sdk
Or if you would prefer to use yarn
npm add @tokenyico/trex-sdk
You can then import the library into your project using
const TREX = require('@tokenyico/trex-sdk');
Or as an ES6 import:
import TREX from "@tokenyico/trex-sdk";
The SDK comes with type definitions if you wish to use TypeScript in your project
Updated over 2 years ago