Skip to content

Symphony Class

The Symphony class is the main entry point for interacting with the Symphony SDK. It provides methods for configuring, route finding, wallet integration and tokens.

Constructor

new Symphony({ walletClient, options })

Parameters

  • walletClient: The wallet client for signing transactions. Its optional when initializing Symphony object and can be later provided using connect.
    • For viem: A viem WalletClient instance
    • For ethers: An ethers Signer instance
  • options (optional): Configuration options for Symphony.

Example

Viem
import { Symphony } from 'symphony-sdk/viem';
const symphony = new Symphony({
  options: { 
    nativeAddress: "0x12345",
    rpcUrl: "https://my-rpc-url.com"
    slippage: "1" //1%
  }
});