EVM to EVM
Use Sw4pClient.transfer() for the current EVM-source helper flow.
Example
typescript
import { Sw4pClient } from "@sw4p/sdk";
const client = new Sw4pClient({ apiKey: "sk_..." });
const estimate = await client.estimate({
from: "BASE",
to: "POLYGON",
amount: "100.00",
});
const result = await client.transfer({
from: "BASE",
to: "POLYGON",
amount: "100.00",
recipient: "0xRecipientAddress...",
permit: signedPermit,
});
const status = await client.status(result.intent_id);
Notes
- The SDK does not currently generate permit typed data for you.
- Produce the ERC-2612 permit through your own wallet flow, then pass the
signed permit object into
transfer(). - Use
estimate()before transfer andstatus()after submission.