# AxiomREPL

You can use [AxiomREPL](https://repl.axiom.xyz) to write a custom query into Axiom and integrate it into your web frontend. These custom circuits can include data queries and arbitrary computation on top of these data queries. The circuit is proven in-browser and can then be sent on-chain to the Axiom V2 prover, which will aggregate the user-supplied compute proof with proofs of the data queries. Once the aggregated proof is posted on-chain, the results of the compute proof are passed to a user-specified callback function for consumption.

{% hint style="info" %}
AxiomREPL has been tested and works as expected in Google Chrome and Safari. AxiomREPL currently does not work in Firefox
{% endhint %}

### Example

[Here](https://repl.axiom.xyz/?gist=83b9708cb8ea5da0130446084fde8a2b) is an example to trustlessly prove the block number at which your account made its first transaction.&#x20;

Circuit Input:

```json
{
    "address": "0x897dDbe14c9C7736EbfDC58461355697FbF70048",
    "claimedBlockNumber": 9173677
}
```

AxiomREPL code:

<pre class="language-typescript"><code class="lang-typescript">// example AxiomREPL circuit to prove the first block an account transacted

// get the previous block number
const prevBlock = sub(claimedBlockNumber, constant(1));

//get the account at the previous block
const accountPrevBlock = getAccount(prevBlock, address);

// get the account nonce at the previous block and assert that it is 0
const prevNonce = accountPrevBlock.nonce().toCircuitValue();
checkEqual(prevNonce, constant(0))

// get the account nonce at the claimed block number
const account = getAccount(claimedBlockNumber, address);
const nonce = account.nonce().toCircuitValue();

//checks that nonce > 0 at the claimed block
checkLessThan(constant(0), nonce)
<strong>
</strong>// add the address and blockNumber to the callback, for it to be passed
// as a result to the callback client contract
addToCallback(address)
addToCallback(claimedBlockNumber);
</code></pre>

Replace the input `address` with your own address and `claimedBlockNumber` to the first block you made a transaction to prove your account age! Notice that if you supply the wrong `claimedBlockNumber`, the circuit will fail run.  See [axiomrepl-reference](https://intrinsic-1.gitbook.io/axiomv2-sdk/sdk-and-repl-reference/axiomrepl-reference "mention") for complete documentation about the functions available in AxiomREPL.
