Application guide
Create a simple applicaton interface
In our applicaton guide we will cover the following:
Creation of an intent
Signing and submission of the intent
Fetching intentpool state
Display intent outcome on the frontend
1. Installation
To include fabriq-sdk
in your project, ensure you have Node.js and yarn installed in your environment and run the following command:
2. Setup
Import fabriq-sdk.js
into your project to begin defining intents:
Usage
1. Initializing the SDK
Create an instance of the IntentBuilder
:
2. Creating and Executing an Intent
To create and execute an intent with the intents.js
SDK, you need to specify the details of the transaction you want to perform. This involves defining the source (from) and destination (to) assets, including their types, addresses, and amounts.
Here's an example of creating and executing a swap intent:
Last updated