# AGENTS.md: Tidepool

Tidepool is a 1Click-compatible testnet sandbox for NEAR Intents at https://www.usetidepool.tech. Community-built, unaffiliated with NEAR or 1Click. Testnet only; tokens have no value.

## Use

- Same request/response shapes as the 1Click Swap API v0.1.10 for GET /v0/tokens, POST /v0/quote, POST /v0/deposit/submit, GET /v0/status. Spec: https://www.usetidepool.tech/openapi.json
- Asset ids look like nep141:usdc.tidepool-sandbox.testnet. Get them from GET /v0/tokens.
- Amounts are base-unit integer strings. slippageTolerance is basis points.
- Auth optional: any X-API-Key or Bearer token is accepted and lowers fees.
- Test tokens: POST /v0/faucet {"accountId","mode":"wallet"|"intents"}. One per account+mode per hour.

## Swap loop

1. POST /v0/quote with dry=true; check amountOut/minAmountOut.
2. POST /v0/quote with dry=false and a deadline 5-30 min ahead; read quote.depositAddress, quote.amountIn.
3. Deposit amountIn: ft_transfer to depositAddress (ORIGIN_CHAIN, register storage first), or ft_transfer_call to verifier.tidepool-sandbox.testnet with msg=depositAddress, or an intents transfer (INTENTS).
4. POST /v0/deposit/submit {txHash, depositAddress} (optional).
5. Poll GET /v0/status?depositAddress=... every 2-5 s until SUCCESS, REFUNDED or FAILED.

## Don'ts

- Don't send mainnet assets or use mainnet account ids.
- Don't loop the faucet.
- Don't assume ANY_INPUT, CONFIDENTIAL_INTENTS, appFees or /v0/auth exist here; they return 400/404.

## Docs as Markdown

Append .md to any docs URL. Index: https://www.usetidepool.tech/llms.txt
