SW4P Documentation
Browse documentation
EVM to Solana

EVM to Solana

For EVM-source routes, use estimate() and transfer() on Sw4pClient.

Example

typescript
import { Sw4pClient } from "@sw4p/sdk";

const client = new Sw4pClient({ apiKey: "sk_..." });

const estimate = await client.estimate({
  from: "BASE",
  to: "SOLANA",
  amount: "100.00",
});

const result = await client.transfer({
  from: "BASE",
  to: "SOLANA",
  amount: "100.00",
  recipient: "RecipientSolanaAddress...",
  permit: signedPermit,
});

const status = await client.status(result.intent_id);

Notes

  • The permit is produced outside the SDK and passed into transfer().
  • status() can be polled until the helper surface reports complete or failed.
  • For broader non-helper settlement flows, move to submitIntent() and getIntentStatus() instead of inventing a separate chain-specific client.