Skip to main content
POST
https://api.sw4p.io
/
sdk
/
v1
/
solana
/
build-tx
curl -X POST https://api.sw4p.io/sdk/v1/solana/build-tx \
  -H "Content-Type: application/json" \
  -H "X-API-Key: sk_..." \
  -d '{
    "to": "BASE",
    "amount": "100.00",
    "from_wallet": "5abc...",
    "recipient": "0x..."
  }'
{
  "intent_id": "int_xyz789",
  "transaction": "AQAAAA...",
  "expires_at": "2024-01-01T00:05:00Z"
}
Build a transaction for Solana → EVM transfers.

Request Body

to
string
required
Destination chain: ETH, BASE, ARB, POLYGON
amount
string
required
Amount in USDC
from_wallet
string
required
Sender’s Solana address
recipient
string
required
Recipient’s EVM address

Response

intent_id
string
Intent ID (use when submitting)
transaction
string
Base64-encoded transaction
curl -X POST https://api.sw4p.io/sdk/v1/solana/build-tx \
  -H "Content-Type: application/json" \
  -H "X-API-Key: sk_..." \
  -d '{
    "to": "BASE",
    "amount": "100.00",
    "from_wallet": "5abc...",
    "recipient": "0x..."
  }'
{
  "intent_id": "int_xyz789",
  "transaction": "AQAAAA...",
  "expires_at": "2024-01-01T00:05:00Z"
}