Skip to main content

What Is FuseBox?

FuseBox is an Open Source Wallet-as-a-Service platform based on Account Abstraction. It is ERC-4337 compliant and provides developers the ability to use a Bundler for collecting UserOperations, and also a Paymaster to sponsor gas payments for their users to provide a gasless experience. FuseBox is required for building applications on the Fuse Network. It provides a set of features that are available to developers via SDKs (TypeScript & Dart), thus making it easier for developers to interact with the Fuse blockchain without the need to make direct RPC calls, and eliminating the need to use a node service provider.

FuseBox Backend is developed with the NestJS framework. It relies on ERC-4337 Smart Contracts, Paymaster, Bundler, and additional API endpoints written in NodeJS.

In the following sections, we will cover how to get started with FuseBox, an overview of its Architecture, and the various Tools. If you have any questions or feedback, please get in touch with our support team at support@****fuse.io.

Obtain an API Key

To use the FuseBox SDK, you need to create an API KEY using the Fuse Console Tool by following the steps outlined in this guide. Console is where developers and non-developers can get all the tools and services required to start their journey on Fuse blockchain.

This Guide is for developers building Account Abstraction apps with Paymaster functionality and low gas fees. We will walk through the steps to setting up an Operator Account and getting an API Key to start building on Fuse.

Pre-requisites:

  • Understanding of Fuse blockchain
  • A Wallet Service Provider such as MetaMask or Coinbase
  • Fuse Tokens in your Externally Owned Account (EOA). You can buy Fuse Tokens in the Console / You can also use the Bridge to move over assets from other blockchains.

This guide assumes you have basic knowledge of building apps and you want to build your apps on Fuse using the FuseBox Flutter or JavaScript SDKS.

Step 1: Go to console.fuse.io

Step 2: Click the button “Connect Wallet”

It prompts you to sign a message to connect your EOA using MetaMask or Coinbase wallet. Then it redirects you to your Dashboard, where you can see the menu items: Wallet, Build, Bridge and Staking

You can also see the Native Token Balance in your Wallet.

Step 3: Click the Button “Become an Operator”.

It redirects you to the Build section of Fuse Console. Operator Accounts are Developer Accounts. Here, developers can get an API Key to build their Applications on Fuse using the FuseBox Flutter or JS SDK.

The Operator Account is needed by developers in order to be able to fund a Paymaster for Sponsored Transactions using the ERC-4337 standard, and in soon to come updates, pay for Premium subscriptions. Operators can freely deposit and withdraw any tokens available on the Fuse Network.

Sponsored transactions are a feature allowing you to pay your customers' gas fees. Since the gas cost in the Fuse Network is very low, your customers will not have to solve the gas issue on their own; you can easily take on these very small costs yourself.

Click the button “Create your project”

Step 4: Click the button “Create Operator Wallet”

Sign the message prompt from your Wallet Service Provider.

Fill in your details.

You have successfully created an Operator Account! Congratulations.

Step 5: Fund the Operator Account

Click the button “Add funds”. Copy the Operator Account Address. Note: The Operator Account Address is a Smart Contract Wallet, and as such it can be used for ERC-4337 functions such as Batch Transaction requests.

After you have funded the Operator Account with at least 10 Fuse Tokens, you can then access the API Key.

Set up Paymaster

Your Paymaster is pre-funded with 1 FUSE and you can set up your application for a Gasless experience by parsing a 3rd argument when initializing the FuseBox SDK.

Initialize the SDK with Paymaster With FuseSDK, you can create User Operations for ERC-4337 Etherspot Smart Accounts, Bundler services, or Paymasters. Ensure you replace YOUR_FUSEBOX_API_KEY with your actual API key:

const apiKey = "YOUR_FUSEBOX_API_KEY";
const credentials = new ethers.Wallet(privateKey);
const fuseSDK = await FuseSDK.init(apiKey, credentials, {
withPaymaster: true,
});

Congratulations, you have successfully created an API Key, funded it with Fuse Tokens, and initialized an application with Paymaster for a Gas experience. You can start calling other FuseBox SDK methods to transfer tokens, call particular methods in a contract, and carry out other on-chain transactions.