Skip to content

FuelLabs/fuels-ts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

817bf13 · Mar 7, 2025
Mar 7, 2025
Dec 11, 2024
Mar 7, 2025
May 10, 2024
Mar 7, 2025
Mar 5, 2025
Mar 7, 2025
Sep 27, 2024
Feb 27, 2025
Jan 28, 2025
Mar 7, 2025
Jan 28, 2025
Jan 30, 2025
Mar 5, 2025
Oct 30, 2024
Feb 27, 2025
Oct 17, 2023
Jun 25, 2024
Jan 26, 2024
Jan 30, 2025
Nov 23, 2024
Aug 8, 2024
May 2, 2023
Jul 11, 2024
Jan 28, 2025
Dec 10, 2021
Jan 7, 2025
Aug 21, 2024
Feb 10, 2024
Feb 8, 2025
Dec 2, 2024
Mar 7, 2025
Aug 22, 2024
Mar 7, 2025
Dec 21, 2023
Nov 18, 2024
Nov 30, 2021
May 4, 2022
Dec 2, 2024
Apr 16, 2024
Jan 29, 2025
Jul 25, 2023
Feb 11, 2025
Jun 28, 2024
Aug 16, 2024
Feb 11, 2025
Dec 13, 2024
Dec 31, 2024
Feb 11, 2025

fuels-ts

Typescript SDK for Fuel.

test docs npm discord

Install (docs)

npm install fuels --save

Connect (docs)

Network URL
Mainnet https://mainnet.fuel.network/v1/graphql
Testnet https://testnet.fuel.network/v1/graphql
Localhost Running a local Fuel node
import { Provider } from 'fuels';

const NETWORK_URL = 'https://mainnet.fuel.network/v1/graphql';

const provider = new Provider(NETWORK_URL);

const chainId = await provider.getChainId();
const gasConfig = await provider.getGasConfig();
const baseAssetId = await provider.getBaseAssetId();

console.log({ chainId, gasConfig, baseAssetId });

Create a new dApp (docs)

$ npm create fuels

◇ What is the name of your project? #
│ my-fuel-project


⚡️ Success! Created a fullstack Fuel dapp at: my-fuel-project.

Enjoy the fuels CLI (docs)

$ npm install fuels --save
$ npm fuels --help

Commands:
  init [options]      Create a sample `fuel.config.ts` file
  build [options]     Build Sway programs and generate Typescript for them
  deploy [options]    Deploy contracts to the Fuel network
  dev [options]       Start a Fuel node with hot-reload capabilities
  node [options]      Start a Fuel node using project configs
  typegen [options]   Generate Typescript from Sway ABI JSON files
  versions [options]  Check for version incompatibilities
  help [command]      Display help for command

In-depth docs:

  • fuels init — Creates a new fuels.config.ts file
  • fuels build — Build forc workspace and generate Typescript types for everything
  • fuels deploy — Deploy workspace contracts and save their IDs to JSON file
  • fuels dev — Start a Fuel node with hot-reload capabilities

Official Docs



Apps & Ecosystem

Get in Touch

Contribute

License

The primary license for this repo is Apache 2.0, see LICENSE.