Skip to main content

Introduction

Environment setup supplies the RPC connection, deployment addresses, and signer used by the SDK examples.
  • Use when: you are connecting an application to Swig for the first time or changing networks.
  • For: developers consuming the source-available EVM SDK.

How it works

  1. Install your language SDK from Overview.
  2. Obtain the network RPC and a compatible factory address from your deployment operator.
  3. Create a read client and, for writes, connect an application-owned signer.
  4. Use the config address for wallet operations and the vault address for asset balances.

Configuration

Obtain deployment details from your operator or contact Swig. Match the SDK’s contract revision; these guides do not assume a public factory address.

SDK example

The TypeScript examples use Viem and import the source SDK from ../src/index.js. Save example files under evm/typescript/examples in the checkout and run them with bun run examples/<file>.ts. Create clients from an existing signer; keep its key management in your application:
  • Read-only calls need only the public client.
  • Direct writes need gas in the signer’s EOA. Funding the vault does not fund that EOA.
  • Sponsored writes additionally need a compatible bundler and paymaster; follow Sponsored transfers.