Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@chromia/ft4

Package Overview
Dependencies
Maintainers
0
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@chromia/ft4

FT4 Library is a library for Rell modules (Chromia smart contract language). It can be imported and used as a token provider and manager. It allows several operations, among them: creation of different assets (type of tokens), allocation of tokens, transf

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

FT4 Library: Asset and Account Management for Chromia's Rell and TypeScript Environments

Introduction

The FT4 library is a toolkit to help dApp developers build real world applications within the Chromia ecosystem by providing out of the box support for things such as account creation and access management and interaction with external signature solutions already familiar to the user. It also provides asset management. Allowing issuance, allocation and transfers and tracing of asset activities, both within a chain as well as across other chains within the Chromia ecosystem.

Features

  • Asset Management: Facilitate the creation, allocation, and management of assets.
  • Asset Allocation and Transfers: Perform secure and efficient asset transfers.
  • Cross-Chain Transfers: Enable the movement of assets between distinct blockchains.
  • Account Registration and Management: Create and oversee user accounts independently of asset activities.

A full documentation on how to use the various features of the library can be found on the official docs page.

Repository Overview

This repository contains the FT4 library and a comprehensive suite of tests written in Node.js and Jest. The current testing setup serves as a temporary measure, as a Rell-based testing suite is in development.

Getting Started

Prerequisites

  • Node.js
  • Chromia CLI
  • Docker
  • [Optional] PostgreSQL for database sessions

Installation

Clone the repository and install the dependencies:

git clone git@gitlab.com:chromaway/ft4-lib.git
cd ft4-lib
npm install
chr install

Build

Build TypeScript library into dist/:

npm run build

How to Run Tests

Comprehensive Test Suite

Run the complete set of Rell and TypeScript tests:

npm run test

Run only Rell or TypeScript tests:

npm run test:rell
npm run test:js

The TypeScript tests can be run with even more granularity:

npm run test:js-unit # does not make any calls to a real blockchain
npm run test:js-integration # stars a single blockchain which it interacts with
npm run test:js-multichain # Stars a cluster of chains which it interacts with

Running Specific Rell Tests

To execute particular tests in Rell, use the --tests or -t option:

npm run test:rell -- --tests=test1,test2
npm run test:rell -- -t=test1,test2

Running Specific Jest Tests

Execute specific Jest tests by string matching:

npm run test:js 'string matching test(s)'

Examples:

npm run test:js 'user'
npm run test:js 'rate|sso'

Running End-to-End Tests with Cypress

Interactive Mode

Run e2e tests interactively:

npm run test:e2e

Headless Mode

Run e2e tests in headless mode:

npm run test:e2e:headless

Changelog

Update changelog in doc/release-notes/, then run ./scripts/compile-changelog.sh script to assemble changelog.md and rell-changelog.md. Do not update changelog.md or rell-changelog.md directly.

License

This project is licensed under the Apache License, Version 2.0. For more details, see the LICENSE file in the repository or visit Apache License, Version 2.0.

FAQs

Package last updated on 03 Sep 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc