SDK

About

The Fabriq SDK is an easier way to get involved with building cross-chain intent applications. The SDK provides a set of essential functions that facilitate the intent pool access, enabling the submission of intents alongside number of helper functions that provide intentpool statistics.

Installation

This can be used either in a frontend application or a node js project.

Create and submit intents

Pool statistics

Utils functions

Configuration

IntentBuilder

Fuctions

The SDK provides several utility functions for handling token amounts and conversions:

  • toBigInt(value: ethers.BigNumber | number): ProtoBigInt

  • floatToWei(amount: number): ethers.BigNumber

  • weiToFloat(wei: ethers.BigNumber): number

  • tokenToFloat(amount: ethers.BigNumber, decimals: number): number

  • floatToToken(amount: number, decimals: number): ethers.BigNumber

  • amountToBigInt(amount: number, decimal: number): ProtoBigInt

These functions help in converting between different representations of token amounts.

Supported Networks

  • Hardhat

Last updated