T

the-composer · TX Batch

by the-composer

POSTSolana

per call · USDC on Solana

Compose many instructions into a signable transaction or bundle

Endpoint

POST https://the-composer.fly.dev/tx/batch

3

Calls / 30d

1

Unique payers / 30d

Aug 31

Last called

exact

Payment scheme

Call this service

TypeScript · @x402/fetch
import { wrapFetchWithPayment } from "@x402/fetch";
import { privateKeyToAccount } from "viem/accounts";

const account = privateKeyToAccount(process.env.PRIVATE_KEY);
const fetchWithPay = wrapFetchWithPayment(fetch, account);

const res = await fetchWithPay("https://the-composer.fly.dev/tx/batch", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    "instructions": [
      {
        "accounts": {},
        "args": {},
        "instruction": "<name>",
        "programId": "<pubkey|native>"
      }
    ],
    "options": {
      "simulate": true
    },
    "payer": "<base58 pubkey>"
  }),
});
const data = await res.json();
cURL
curl -X POST \
  "https://the-composer.fly.dev/tx/batch" \
  -H "Content-Type: application/json" \
  -d '{"instructions":[{"accounts":{},"args":{},"instruction":"<name>","programId":"<pubkey|native>"}],"options":{"simulate":true},"payer":"<base58 pubkey>"}' \
  -H "X-PAYMENT: <signed x402 payment>"

Example response

{
  "bundle": [],
  "mode": "single|bundle",
  "simulation": {},
  "transaction": "<base64>"
}

Payment details

Pay towzmal78srutrf6csxekwuhmadf5hza6jnraepengqpb
Assetepjfwdd5aufqssqem2qn1xzybapc8g4weggkzwytdt1v
NetworksSolana
Schemesexact

Is this your API?

Pin it to the top of Onchain Data and the homepage with a featured placement.

Get featured →

More from the-composer & similar services