Solana to EVM
Solana-source transfers use a two-step helper flow:
solanaBuildTx()- have the user sign the returned transaction
solanaSubmit()
Example
typescript
import { Sw4pClient } from "@sw4p/sdk";
const client = new Sw4pClient({ apiKey: "sk_..." });
const build = await client.solanaBuildTx({
to: "BASE",
amount: "100.00",
from_wallet: publicKey.toBase58(),
recipient: "0xRecipientAddress...",
});
const validation = await client.solanaValidateGasless({
to: "BASE",
amount: "100.00",
from_wallet: publicKey.toBase58(),
recipient: "0xRecipientAddress...",
});
const submit = await client.solanaSubmit({
intent_id: build.intent_id,
signed_transaction: signedTransactionBase64,
});
const status = await client.status(submit.intent_id);
Notes
solanaValidateGasless()checks the sponsorship path before submission.- The SDK returns a base64 transaction; your Solana wallet adapter is still responsible for signing it.
- Track the final helper outcome with
status().