Quote in five minutes
Create a client and ask the live devnet pool for a fee.
- Install
- neat3-sdk
- Runtime
- Node ≥ 20.12
- Quote mode
- public
- Pool
- Devnet 1337
The docs for neat3-sdk. Quote a trade, read the fee, and swap, in plain TypeScript and without Solidity.
const q = await client.quote({
tokenIn: dWETH,
amountIn: parseEther("10"),
});Output of the live devnet pool, Nov 6.
The pool sets its fee last. The SDK hands you the numbers and the calldata, and you decide how to send it.
// 1. what will this trade get me?
const q = await client.quote({ tokenIn, amountIn });
// 2. approve + swap, with minOut = q.amountOut and a 10-minute deadline
const calls = client.encodeSwap(q);
// 3. or send both as one atomic frame transaction
const hash = await client.submit(q);npm install neat3-sdk viem. Node 20.12 or newer.
quote() returns the pool's output, its fee and the best venue's output for that exact size.
encodeSwap() builds approve and swap, with minOut set to the quote and a 10-minute deadline.
Send the calls with your wallet, or submit() them as one atomic EIP-8141 frame transaction.
One quickstart to see a fee on screen, then a guide for each thing you can do with it.
Create a client and ask the live devnet pool for a fee.
Install the package, point it at a pool and read a fee. It works in Node with no extras.
Reads over Anon-RPC, so the RPC doesn't learn who asked.
Quoting through a mixnet from a browser: which networks work, how slow they are, and what stays unhidden.
Approve and swap, with a floor on the output and a deadline.
Encode the calls, send them with your wallet or as one frame transaction, and read the pool's reverts by name.
The client, the two optional entry points, and the networks the SDK talks to.
Yes. Run npm install neat3-sdk viem. The current version is 0.1.0.
Yes, with quoteMode set to "public". Private mode needs Anon-RPC, which only runs in a browser. Without anonFetch, a private quote throws instead of falling back to a plain fetch.
The EIP-8141 devnet (chain 1337) is the default target. The Sepolia demo pool is the same contract, but the SDK has not been run against it yet. The Aqua and SwapVM pool is not wrapped.
No. The alt-mempool is public, so anyone can read pending frame transactions. Protection comes from minOut and the atomic batch: if the price moves first, the whole batch reverts and you keep your tokens.
The pool had no fresh competitor quote and used its fallback fee. beatsBestVenue is false in that case. It is the pool failing safe, not an error.
One pip is 1e-6, so 1,000,000 is 100% and 3000 is 0.30%. Divide feePips by 1e4 to get a percentage.