When you select the Export > Export TypeScript circuit option in AxiomREPL, a circuit.ts file will be downloaded with all the artifacts specific to your circuit that are required to run the circuit inside your own application. Namely, circuit.ts includes: the circuit size and configuration, default circuit inputs and their types, the circuit verification key, and your circuit code. This is all exported as a singular circuit object.
To add this into a React app, first install @axiom-crypto/react using a package manager such as npm/yarn/pnpm.
Terminal
npminstall@axiom-crypto/react
AxiomCircuitProvider
In order to use this in your Next.js 13 app, you'll need to wrap AxiomCircuitProvider in its own file to ensure that it's only mounted once:
const circuit = useAxiomCircuit();
// you may need to wrap the `setParams` call in a useEffect hook to prevent an
// infinite reload loop
useEffect(() => {
circuit.setParams(inputs, callback);
}, [circuit, inputs, callback]);
const builtQuery = circuit.builtQuery;
// can now use builtQuery to send an on-chain Query to Axiom