Collection of connectors for fuels
SDK.
This package enables users to use their wallets to sign transactions on Fuel Network.
Warning This project is under active development.
npm install fuels @fuels/connectors
import { Fuel } from "fuels";
import { FuelWalletConnector } from "@fuels/connectors";
const fuel = new Fuel({
connectors: [
new FuelWalletConnector(),
],
});
await fuel.selectConnector("Fuel Wallet");
const connection = await fuel.connect();
console.log(connection);
pnpm build
The fuel-connectors
project includes comprehensive end-to-end (E2E) tests to ensure robust functionality across all connectors. Follow the steps below to set up and run these tests locally.
Ensure you have the following installed on your system:
- Docker: For running required services.
- Node.js (v20.11.0 or higher): Use the version specified in
.nvmrc
or the project configuration. - PNPM: Version
9.x
or higher. Install it globally if needed:npm install -g pnpm
-
Install Dependencies
Navigate to the project root and install all dependencies:
pnpm install
-
Start the Local Test Node
Bring up the test node services using Docker:
pnpm node:up
-
Run E2E Tests
Run the full E2E test suite:
pnpm test:e2e:local
This script performs the following:
- Deploys required contracts.
- Starts the React and Next.js test servers.
- Executes Playwright tests across all connectors.
- Run Tests for Specific Connectors
To run tests for an individual project:pnpm --filter @e2e-tests/runner test:react-app
React App is faster to build for e2e development.
-
Debug with Playwright UI
Use Playwright's interactive UI for debugging tests:pnpm --filter @e2e-tests/runner test:e2e:ui
-
Stop the Local Test Node
After testing, stop the test node to free up resources:pnpm node:down
- Port Conflicts
If you encounter errors related to ports already in use, ensure no processes are running on the following ports:4000
: Fuel Provider5173
: React App3002
: Next.js App
This repo is licensed under the Apache-2.0
license. See LICENSE
for more information.