Documentation Index
Fetch the complete documentation index at: https://docs.fuse.io/llms.txt
Use this file to discover all available pages before exploring further.
Introduction
In this tutorial, you will learn how to submit your first transaction using a smart contract wallet. You’ll be guided through setting up the necessary client with @fuseio/fusebox-web-sdk, creating a user operation, obtaining sponsorship from FuseBox’s verifying paymaster, and finally submitting it on-chain using FuseBox’s bundler.Obtain an API Key
To begin, navigate to our Operator Dashboard and generate an API key. This key is essential for accessing our services.Clone the FuseBox Tutorial Template Repository
To facilitate your start, we’ve prepared a FuseBox tutorial template repository equipped with Typescript, viem, and @fuseio/fusebox-web-sdk. Follow these steps to clone the repository and set up your environment:index.ts file. Test your setup by running:
Hello world! printed in the console.
Generate a Private Key
Generate a private key and store it securely. Use the following code snippet inindex.ts:
Initialize the SDK
FuseSDK enables the creation of User Operations for ERC-4337 Etherspot Smart Account, Bundler service, or Paymaster. It’s open source and MIT licensed, offering flexibility and no lock-in. ReplaceYOUR_FUSEBOX_API_KEY with your actual API key:
Create a smart contract wallet
Initialize the SDK with the previously generated private key to create the Etherspot Smart Account:Submit a Transaction
Now, let’s submit a transaction from the smart account. We’ll send a transaction to0xd8da6bf26964af9d7eed9e03e53415d37aa96045 (vitalik.eth) with 0x1234 as example call data. FuseSDK will handle the operations (but you need to fund the account with some FUSE yourself first):