IRONQ

CPI Integration

Integrate IronQ into other Solana programs via Cross-Program Invocation

Other Solana programs can integrate with IronQ via CPI.

Setup

Add IronQ as a dependency with the cpi feature:

# In your program's Cargo.toml
[dependencies]
ironq = { version = "0.1.0", features = ["cpi"] }

Example

// In your instruction handler:
let cpi_ctx = CpiContext::new(
    ironq_program.to_account_info(),
    ironq::cpi::accounts::CreateJob { /* ... */ },
);
ironq::cpi::create_job(
    cpi_ctx,
    reward_amount,
    data_hash,
    priority,
    max_retries,
)?;

Use Cases

  • Oracle network — An oracle program creates jobs when new data feeds are requested, auto-approves when results match.
  • DAO governance — A governance program creates jobs for funded proposals, with the DAO treasury as creator.
  • Compute marketplace — A scheduler dispatches compute tasks as IronQ jobs, with automated result verification via ZK proofs.

IDL

After anchor build, the program generates:

  • IDL: target/idl/ironq.json — full interface definition
  • TypeScript types: target/types/ironq.ts — typed bindings for @coral-xyz/anchor

The IDL works with any Solana client that supports the Anchor IDL format (TypeScript, Python, Rust, Go).