Before you can interact with Flashnet AMM, you need to set up the Flashnet SDK and initialize a client with your wallet. This guide will walk you through the installation and initialization process.
Create a new instance of the Flashnet client with your Spark wallet:
Copy
Ask AI
import { FlashnetClient } from '@flashnet/sdk';import { SparkWallet } from '@buildonspark/spark-sdk';// Initialize your Spark walletconst { wallet } = await SparkWallet.initialize({ mnemonicOrSeed: process.env.MNEMONIC, options: { network: "REGTEST", },});// Create the Flashnet clientconst client = new FlashnetClient(wallet);await client.initialize();// The client will automatically:// - Authenticate with the AMM service// - Handle all signing and intent generation