T-Rex SDK

Interface for blockchain operations on the T-Rex

The T-REX SDK is a JavaScript library that provides developers with a way to manipulate and explore the blockchain and ensures the standards defined by T-REX.

Installation

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 --scope=@tokenyico

Important Note To be able to download the package, you need to have read access to the repository of the TREX SDK.

Additional info here
https://help.github.com/en/articles/configuring-npm-for-use-with-github-package-registry#authenticating-to-github-package-registry

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 require()

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