Skip to main content
Once you’ve signed the intent operations, you can submit them to the Orchestrator for execution. Use the /intent-operations endpoint:
Submit Intent
const baseUrl = "https://v1.orchestrator.rhinestone.dev";
const endpoint = `${baseUrl}/intent-operations`;
const apiKey = "YOUR_RHINESTONE_API_KEY";

const payload = {
  intentOp,
  originSignatures,
  destinationSignature
};

const res = await fetch(endpoint, {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "x-api-key": apiKey,
    Accept: "application/json",
  },
  body: JSON.stringify(payload, (_, value) =>
    typeof value === "bigint" ? value.toString() : value,
  ),
});

if (!res.ok) {
  const errorBody = await res.text().catch(() => "");
  throw new Error(
    `Request failed: ${res.status} ${res.statusText}${errorBody ? ` - ${errorBody}` : ""}`
  );
}

const data = await res.json();
console.log("Result:", data);

Polling for Status

When you submit an intent operation, you receive the operation ID. You can use this ID to track the status of the intent execution. Using the /intent-operation/:id endpoint:
Get Status
const baseUrl = "https://v1.orchestrator.rhinestone.dev";
const operationId = "OPERATION_ID";
const endpoint = `${baseUrl}/intent-operation/${operationId}`;
const apiKey = "YOUR_RHINESTONE_API_KEY";

const res = await fetch(endpoint, {
  method: "GET",
  headers: {
    "x-api-key": apiKey,
    Accept: "application/json",
  },
});

if (!res.ok) {
  const errorBody = await res.text().catch(() => "");
  throw new Error(
    `Request failed: ${res.status} ${res.statusText}${errorBody ? ` - ${errorBody}` : ""}`
  );
}

const data = await res.json();
console.log("Status:", data);
Intent operations can have the following statuses:
  • PENDING — in progress
  • CLAIMED — the source funds have been claimed by the solver, but the intent has not yet been executed on the destination chain
  • COMPLETED — fully completed and executed onchain
  • PRECONFIRMED — confirmed by the solver, but not yet executed onchain
  • FILLED — executed on the destination chain, but the funds have not yet been claimed on the source chain(s)
  • EXPIRED — missed the execution deadline
  • FAILED — failed to execute