Every API here is available over the APIs.io API and to AI agents over MCP.
MCP server
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
Tools for apis
7 MCP tools reach this
find_apisBrowse and filter every API in the catalog.
get_api_artifactsOne API's artifacts, grouped by type.
get_openapiThe primary OpenAPI for this API.
find_similar_apisAPIs that look like this one.
apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
resolveTurn a domain, URL or GitHub org into the provider it belongs to.
find_cohortsEvery scored population of providers in the catalog.
All 92 tools →
Call it yourself
curl for this page
This API
curl "https://apis.io/api/v1/apis/layerhop-com:layerhop-com-recover-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. By signing up you are subscribing to the APIs.io and API Evangelist
newsletters — you can unsubscribe from any issue. See our
Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Layerhop Com Recover API
version: 0.1.0
contact:
name: LayerHop
url: https://docs.layerhop.com
description: 'Operations tagged Recover across 2 of this provider''s published API definitions: layerhop-com-openapi.yaml, openapi.yaml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api.layerhop.com
description: Hosted API (production)
- url: http://localhost:8787
description: Local API (`pnpm --filter @layerhop/api dev`)
security:
- {}
- ApiKey: []
tags:
- name: Recover
description: 'Stuck native-bridge withdrawals: Arbitrum One / Nova and OP Stack withdrawals to Ethereum whose
second step (Arbitrum: claim; OP Stack: prove, then finalize) was never sent. Scan an address or
look up one withdrawal, then build the next transaction for the user''s own wallet to sign. Every
step is eth_call-simulated before it is returned. Public, no key; read-only.'
paths:
/v1/recover/chains:
get:
tags:
- Recover
operationId: listRecoverChains
summary: List chains Recover covers
description: 'The L2s whose native-bridge withdrawals Recover finds and finishes, with the steps each needs and
how far back an address scan reaches (`history: full`, or `recent` where public explorers can''t
serve the whole history: Base and Zora scan about the last two days; look older withdrawals up
by transaction hash).'
responses:
'200':
description: Supported chains.
headers:
x-request-id:
$ref: '#/components/headers/RequestId'
content:
application/json:
schema:
type: object
required:
- chains
properties:
chains:
type: array
items:
$ref: '#/components/schemas/RecoverChain'
example:
chains:
- chainId: 42161
slug: arbitrum
name: Arbitrum One
bridge: arbitrum
bridgeName: Arbitrum Bridge
bridgeUrl: https://portal.arbitrum.io/bridge?sourceChain=arbitrum-one&destinationChain=ethereum
challengeSeconds: 552960
history: full
steps:
- claim
- chainId: 8453
slug: base
name: Base
bridge: op-stack
bridgeName: Superbridge
bridgeUrl: https://superbridge.app/base
challengeSeconds: 86400
history: recent
steps:
- prove
- finalize
servers:
- url: https://api.layerhop.com
description: Hosted API (production)
- url: http://localhost:8787
description: Local API (`pnpm --filter @layerhop/api dev`)
/v1/recover/withdrawals:
get:
tags:
- Recover
operationId: scanRecoverWithdrawals
summary: Scan an address for stuck withdrawals
description: 'Finds the address''s native-bridge withdrawals on every supported chain (or one, with `chain`) and
reads each one''s state on Ethereum. Arbitrum: ETH withdrawals and token withdrawals through the
standard, custom, WETH and DAI gateways paying out to the address (Nitro, since Aug 2022). OP Stack:
standard-bridge withdrawals sent from the address, ETH bridged to it, and direct portal
withdrawals. Up to 40 withdrawal transactions per chain, newest first. `coverage` says per chain
whether the whole history was scanned; a chain that couldn''t be scanned has `error: true` instead
of failing the request. Actionable withdrawals sort first. Cached for 5 minutes; at most 2 scans
per IP per minute (cached answers are free), within a per-minute budget shared by all clients.'
parameters:
- name: address
in: query
required: true
description: EVM address to scan.
schema:
type: string
pattern: ^0x[0-9a-fA-F]{40}$
example: '0xa5BA6e62e9a2CBDeac73F675C26257C75A3FE401'
- name: chain
in: query
required: false
description: Scan only this chain (id or slug).
schema:
type: string
example: arbitrum
responses:
'200':
description: Withdrawals found and how complete the scan was.
headers:
x-request-id:
$ref: '#/components/headers/RequestId'
content:
application/json:
schema:
$ref: '#/components/schemas/RecoverScan'
example:
address: '0xa5ba6e62e9a2cbdeac73f675c26257c75a3fe401'
withdrawals:
- id: 42161:0x397ea01fc089ed8b89bbdf6eb588755996dc6b90ce1eb641369cc05f3659c1c6:0
bridge: arbitrum
chainId: 42161
l2TxHash: '0x397ea01fc089ed8b89bbdf6eb588755996dc6b90ce1eb641369cc05f3659c1c6'
initiatedAt: 1676124519
from: '0xa5ba6e62e9a2cbdeac73f675c26257c75a3fe401'
to: '0xa5ba6e62e9a2cbdeac73f675c26257c75a3fe401'
token:
address: '0x0000000000000000000000000000000000000000'
symbol: ETH
decimals: 18
amount: '500000000000000'
state: ready
step: execute
bridgeName: Arbitrum Bridge
bridgeUrl: https://portal.arbitrum.io/bridge?sourceChain=arbitrum-one&destinationChain=ethereum
coverage:
- chainId: 42161
name: Arbitrum One
complete: true
fromBlock: 22207817
source: rpc
scannedAt: 1793035889
'400':
$ref: '#/components/responses/BadRequest'
'429':
$ref: '#/components/responses/TooManyRequests'
servers:
- url: https://api.layerhop.com
description: Hosted API (production)
- url: http://localhost:8787
description: Local API (`pnpm --filter @layerhop/api dev`)
/v1/recover/withdrawals/{chain}/{txHash}:
get:
tags:
- Recover
operationId: getRecoverWithdrawals
summary: Look up the withdrawals in one transaction
description: The native-bridge withdrawals started by one L2 transaction, with their state. Works for any age, including withdrawals an address scan can't reach. Cached for a minute.
parameters:
- name: chain
in: path
required: true
description: The L2 (id or slug) the withdrawal started on.
schema:
type: string
example: arbitrum
- name: txHash
in: path
required: true
description: The withdrawal's L2 transaction hash.
schema:
type: string
pattern: ^0x[0-9a-fA-F]{64}$
example: '0x397ea01fc089ed8b89bbdf6eb588755996dc6b90ce1eb641369cc05f3659c1c6'
responses:
'200':
description: The withdrawals in the transaction.
headers:
x-request-id:
$ref: '#/components/headers/RequestId'
content:
application/json:
schema:
type: object
required:
- withdrawals
properties:
withdrawals:
type: array
items:
$ref: '#/components/schemas/StuckWithdrawal'
'400':
$ref: '#/components/responses/BadRequest'
'404':
$ref: '#/components/responses/NotFound'
'429':
$ref: '#/components/responses/TooManyRequests'
servers:
- url: https://api.layerhop.com
description: Hosted API (production)
- url: http://localhost:8787
description: Local API (`pnpm --filter @layerhop/api dev`)
/v1/recover/claim:
get:
tags:
- Recover
operationId: buildRecoverClaim
summary: Build the next step of a withdrawal
description: 'The withdrawal''s current state and, when it is actionable, the transaction for its next step on
Ethereum: `execute` (Arbitrum `Outbox.executeTransaction` with a proof against the latest
confirmed send root), `prove` (OP Stack `proveWithdrawalTransaction` against the latest dispute
game, offered only when the game proves output roots and our proof matches its root claim) or
`finalize` (`finalizeWithdrawalTransactionExternalProof`). The transaction is simulated with
`eth_call` from `sender`; a `prove` that doesn''t simulate is never returned (the withdrawal comes
back as `prove_elsewhere`), and an `execute` or `finalize` that doesn''t simulate comes back
without `tx` (`simulation.ok: false` with the error). Anyone may send a claim: the funds always
go to the withdrawal''s recipient. Without an actionable step `tx`, `step` and `simulation` are
absent. At most 30 lookups per IP per minute, within a budget shared by all clients.'
parameters:
- name: chain
in: query
required: true
description: The L2 (id or slug).
schema:
type: string
example: arbitrum
- name: txHash
in: query
required: true
description: The withdrawal's L2 transaction hash.
schema:
type: string
pattern: ^0x[0-9a-fA-F]{64}$
example: '0x397ea01fc089ed8b89bbdf6eb588755996dc6b90ce1eb641369cc05f3659c1c6'
- name: index
in: query
required: false
description: Which withdrawal in the transaction (the last part of `StuckWithdrawal.id`).
schema:
type: integer
minimum: 0
maximum: 255
default: 0
- name: sender
in: query
required: true
description: The wallet that will send the transaction (for the simulation).
schema:
type: string
pattern: ^0x[0-9a-fA-F]{40}$
example: '0xa5BA6e62e9a2CBDeac73F675C26257C75A3FE401'
responses:
'200':
description: The withdrawal and, when actionable, its next transaction.
headers:
x-request-id:
$ref: '#/components/headers/RequestId'
content:
application/json:
schema:
$ref: '#/components/schemas/RecoverClaim'
'400':
$ref: '#/components/responses/BadRequest'
'404':
$ref: '#/components/responses/NotFound'
'429':
$ref: '#/components/responses/TooManyRequests'
servers:
- url: https://api.layerhop.com
description: Hosted API (production)
- url: http://localhost:8787
description: Local API (`pnpm --filter @layerhop/api dev`)
components:
schemas:
EvmCall:
type: object
required:
- to
- data
- value
properties:
to:
type: string
data:
type: string
description: Hex calldata.
value:
type: string
pattern: ^\d+$
description: Native value in wei.
RecoverScan:
type: object
required:
- address
- withdrawals
- coverage
- scannedAt
properties:
address:
type: string
withdrawals:
type: array
items:
$ref: '#/components/schemas/StuckWithdrawal'
coverage:
type: array
items:
$ref: '#/components/schemas/RecoverCoverage'
scannedAt:
type: integer
RecoverClaim:
type: object
required:
- withdrawal
properties:
withdrawal:
$ref: '#/components/schemas/StuckWithdrawal'
step:
type: string
enum:
- execute
- prove
- finalize
tx:
$ref: '#/components/schemas/EvmTx'
simulation:
type: object
required:
- ok
properties:
ok:
type: boolean
error:
type: string
RouteLeg:
type: object
description: One quotable leg, in the same terms as a quote request. Amounts are base units.
required:
- srcChain
- srcToken
- amount
- dstChain
- dstToken
properties:
srcChain:
type: integer
description: Source chain id.
srcToken:
type: string
description: 'Source token address or mint (native coin: the zero address; SOL: the system program id).'
amount:
type: string
pattern: ^\d+$
description: Input in base units of `srcToken`.
dstChain:
type: integer
description: Destination chain id.
dstToken:
type: string
dstAmount:
type: string
pattern: ^\d+$
description: Estimated output in base units of `dstToken` (from the check quote; scaled when served from cache).
RecoverChain:
type: object
required:
- chainId
- name
- bridge
- bridgeName
- bridgeUrl
- challengeSeconds
- history
- steps
properties:
chainId:
type: integer
description: The L2 the withdrawal starts on.
slug:
type: string
name:
type: string
bridge:
type: string
enum:
- arbitrum
- op-stack
bridgeName:
type: string
description: Bridge UI that can also finish withdrawals (Arbitrum Bridge, Superbridge).
bridgeUrl:
type: string
format: uri
challengeSeconds:
type: number
description: Usual wait before the claim (seconds).
history:
type: string
enum:
- full
- recent
description: '`recent`: an address scan reaches only about two days back.'
steps:
type: array
items:
type: string
Error:
type: object
description: Every non-2xx response has this body.
required:
- error
properties:
error:
type: object
required:
- code
- message
- requestId
- docsUrl
properties:
code:
$ref: '#/components/schemas/ErrorCode'
message:
type: string
description: Human-readable detail. Do not parse it.
requestId:
type: string
format: uuid
description: Same value as the `x-request-id` header.
docsUrl:
type: string
format: uri
description: Error catalog page, `https://docs.layerhop.com/errors/{code}`.
details:
type: object
description: 'Extra structured data, only on some errors. `NO_ROUTE` (and `AMOUNT_TOO_SMALL` /
`AMOUNT_TOO_LARGE` decided from the providers'' answers) on a quote carry `errors`: why
each provider returned no quote, the same entries a successful response lists in `errors`.
`AMOUNT_TOO_SMALL` on a quote may also carry the route''s minimum (D-036): `minAmount`,
`minAmountUsd`, `minAmountApprox`. `NO_ROUTE` on a live quote (and `UNSUPPORTED_CHAIN`
into a route-restricted chain such as Blast) may carry `suggestions` (D-053).
'
properties:
errors:
type: array
items:
$ref: '#/components/schemas/ProviderError'
suggestions:
type: array
maxItems: 4
description: '`NO_ROUTE` / `UNSUPPORTED_CHAIN` on a live quote: alternatives that quoted, best first (D-053).'
items:
$ref: '#/components/schemas/RouteSuggestion'
minAmount:
type: string
pattern: ^\d+$
description: '`AMOUNT_TOO_SMALL`: smallest input known to quote on this route, base units of `srcToken`.'
minAmountUsd:
type: number
description: '`AMOUNT_TOO_SMALL`: `minAmount` in USD, when the token has a price.'
minAmountApprox:
type: boolean
description: '`AMOUNT_TOO_SMALL`: `true` when `minAmount` was found by probing larger amounts ($10 / $25 / $50), so the true minimum is at most this; `false` when a provider reported it.'
ErrorCode:
type: string
description: Stable error code. Each has a page at `https://docs.layerhop.com/errors/{code}`.
enum:
- INVALID_PARAMS
- UNSUPPORTED_CHAIN
- UNSUPPORTED_TOKEN
- AMOUNT_TOO_SMALL
- AMOUNT_TOO_LARGE
- CALLS_REVERTED
- LAUNCH_IMAGE_INVALID
- NO_ROUTE
- ROUTE_EXCLUDED
- QUOTE_NOT_FOUND
- QUOTE_EXPIRED
- ORDER_NOT_FOUND
- PROVIDER_ERROR
- PROVIDER_TIMEOUT
- RATE_LIMITED
- QUOTA_EXCEEDED
- UNAUTHORIZED
- FORBIDDEN
- ADDRESS_SANCTIONED
- NOT_FOUND
- CONFLICT
- GASLESS_PENDING
- GASLESS_FAILED
- MARKET_UNAVAILABLE
- LIMIT_ORDER_REJECTED
- INTERNAL
ProviderError:
type: object
description: A provider that failed while the request as a whole succeeded.
required:
- provider
- code
- message
properties:
provider:
$ref: '#/components/schemas/ProviderId'
code:
$ref: '#/components/schemas/ErrorCode'
message:
type: string
RouteSuggestion:
description: 'An alternative to a route that returned no quote (D-053). `dst_token`: same payment, another
destination token. `src_token`: same destination token, paid with another source token worth the
same. `via_hub`: two signed steps through `hub` (`steps[0]` then `steps[1]`, each its own quote,
order and signature); the top-level fields describe the whole trip.
'
allOf:
- $ref: '#/components/schemas/RouteLeg'
- type: object
required:
- kind
- message
properties:
kind:
type: string
enum:
- dst_token
- src_token
- via_hub
message:
type: string
description: Short text for a button, e.g. "Receive USDC on Ethereum instead".
symbol:
type: string
description: 'The token that changed: the new source or destination token, or the hub token.'
hub:
type: object
description: '`via_hub` only: the token between the two steps.'
required:
- chainId
- token
- symbol
- decimals
properties:
chainId:
type: integer
token:
type: string
symbol:
type: string
decimals:
type: integer
steps:
type: array
description: '`via_hub` only: the two legs in order.'
minItems: 2
maxItems: 2
items:
$ref: '#/components/schemas/RouteLeg'
ProviderId:
type: string
description: 'Liquidity provider. Loaded by default: `jupiter`, `relay`, `debridge`, `zerox`, `kyberswap`, `lifi`, `mayan`,
`blast-native` (Blast''s canonical bridge: ETH on Ethereum → ETH on Blast only, no LayerHop fee).
`across` (Across Protocol, cross-chain EVM ↔ EVM), `baltex` (Baltex exchanges and DEX swaps), `routefun`
(Route, same-chain), `bebop` (Bebop RFQ and Aggregation, same-chain), `near-intents` (NEAR Intents 1Click),
`thorchain` and `chainflip` (native BTC and other non-EVM routes) `layerhop-solver` (LayerHop''s own solver: USDC between Base,
Arbitrum and OP Mainnet, filled from our inventory) and `layerhop-router` (LayerHop''s own same-chain
router on Robinhood Chain and Berachain) are built but not loaded by default.
`odos` is shut down; `mock` exists only in local
development (`LAYERHOP_ENABLE_MOCK=1`). `sandbox` serves every request made with an `lh_test_` key.
`direct` is a plain token transfer, used by checkout when the payer already holds the settlement token.
'
enum:
- jupiter
- relay
- debridge
- mayan
- zerox
- kyberswap
- odos
- lifi
- blast-native
- across
- baltex
- routefun
- bebop
- near-intents
- thorchain
- chainflip
- layerhop-router
- layerhop-solver
- mock
- sandbox
- direct
RecoverCoverage:
type: object
required:
- chainId
- name
- complete
- source
properties:
chainId:
type: integer
name:
type: string
complete:
type: boolean
description: false when only part of the history was scanned or the scan failed.
fromBlock:
type: integer
description: First L2 block scanned.
source:
type: string
enum:
- rpc
- indexer
note:
type: string
error:
type: boolean
description: The chain couldn't be scanned right now.
EvmTx:
type: object
required:
- vm
- chainId
- to
- data
- value
properties:
vm:
type: string
const: evm
chainId:
type: integer
to:
type: string
data:
type: string
description: Hex calldata.
value:
type: string
pattern: ^\d+$
description: Native value in wei.
approval:
$ref: '#/components/schemas/Approval'
extraTxs:
type: array
description: 'Further calls to send from the same wallet after the main transaction, in order. Today only
same-token checkout payments carry one: LayerHop''s fee transfer (an ERC-20 `transfer` to
LayerHop''s fee wallet). Wallets with EIP-5792 `wallet_sendCalls` may batch them with the main
call. Report the main transaction''s hash.
'
items:
$ref: '#/components/schemas/EvmCall'
sandbox:
type: boolean
const: true
description: 'Test mode only: a placeholder that moves no funds. Never broadcast it.'
Approval:
type: object
description: An ERC-20 `approve(spender, amount)` on `token` that must be mined before the main transaction.
required:
- token
- spender
- amount
properties:
token:
type: string
description: ERC-20 contract to call `approve` on.
spender:
type: string
amount:
type: string
pattern: ^\d+$
description: Base units.
StuckWithdrawal:
type: object
required:
- id
- bridge
- chainId
- l2TxHash
- to
- token
- amount
- state
- bridgeName
- bridgeUrl
properties:
id:
type: string
description: '`<l2ChainId>:<l2TxHash>:<n>`; n is the withdrawal''s index in that transaction (`index` of `GET /v1/recover/claim`).'
bridge:
type: string
enum:
- arbitrum
- op-stack
chainId:
type: integer
l2TxHash:
type: string
initiatedAt:
type: integer
description: Unix seconds.
from:
type: string
to:
type: string
description: Who receives the funds on Ethereum.
token:
type: object
required:
- address
properties:
address:
type: string
description: Token on Ethereum; `0x0000…0000` for ETH.
symbol:
type: string
decimals:
type: integer
amount:
type: string
pattern: ^\d+$
description: Base units.
state:
type: string
enum:
- waiting
- ready_to_prove
- ready
- prove_elsewhere
- claimed
- unknown
description: '`ready`: the final step can be sent now (`step`). `ready_to_prove`: OP Stack step 1 of 2.
`waiting`: inside the challenge / proof window (`readyAt`). `prove_elsewhere`: needs a proof
we don''t build for this chain (super-root games); prove on `bridgeUrl`, finalize here later.
`claimed`: done. `unknown`: couldn''t read its state right now.
'
step:
type: string
enum:
- execute
- prove
- finalize
readyAt:
type: integer
description: '`waiting`: unix seconds when the next step opens.'
readyAtEstimated:
type: boolean
bridgeName:
type: string
bridgeUrl:
type: string
format: uri
note:
type: string
description: Plain-language detail for the user.
responses:
NotFound:
description: The resource does not exist or belongs to another account (`NOT_FOUND`).
headers:
x-request-id:
$ref: '#/components/headers/RequestId'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
error:
code: NOT_FOUND
message: API key not found
requestId: 0d5e1f6a-3b2c-4d1e-8f9a-7b6c5d4e3f21
docsUrl: https://docs.layerhop.com/errors/NOT_FOUND
BadRequest:
description: 'Invalid request (`INVALID_PARAMS`, `UNSUPPORTED_CHAIN`, `UNSUPPORTED_TOKEN`,
`AMOUNT_TOO_SMALL`, `AMOUNT_TOO_LARGE`).
'
headers:
x-request-id:
$ref: '#/components/headers/RequestId'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
error:
code: INVALID_PARAMS
message: 'amount: amount must be an integer string in base units'
requestId: 0d5e1f6a-3b2c-4d1e-8f9a-7b6c5d4e3f21
docsUrl: https://docs.layerhop.com/errors/INVALID_PARAMS
TooManyRequests:
description: 'Over your rate limit (`RATE_LIMITED`): the key''s `rateLimitRpm`, or `ANON_RATE_LIMIT_RPM` per IP
without a key. Wait `retry-after` seconds.
'
headers:
x-request-id:
$ref: '#/components/headers/RequestId'
retry-after:
description: Seconds until a request will be accepted.
schema:
type: integer
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
error:
code: RATE_LIMITED
message: Rate limit of 120 requests/minute exceeded; retry in 1s
requestId: 0d5e1f6a-3b2c-4d1e-8f9a-7b6c5d4e3f21
docsUrl: https://docs.layerhop.com/errors/RATE_LIMITED
headers:
RequestId:
description: Unique id for this request. Quote it when you report a problem.
schema:
type: string
format: uuid
securitySchemes:
ApiKey:
type: apiKey
in: header
name: x-api-key
description: 'Optional. An `lh_live_…` key from the dashboard attributes requests and orders to your account
and raises your rate limit (per key, default 120 requests/minute; without a key the limit is
per IP). An invalid or revoked key is rejected with `UNAUTHORIZED`. If your account has an
active partner profile, the key selects your partner fee and allows `integratorFeeBps`.
An `lh_test_…` key switches every request to **test mode**: quotes come from the `sandbox`
provider (priced from live USD prices), built transactions are placeholders that move no funds
(`tx.sandbox: true`), and reported orders run a simulated lifecycle (pending, then filled in about
10 seconds) with webhooks sent to your test endpoints only. Amounts ending in `4001` refund,
`4002` fail and `4004` return `NO_ROUTE`. Test and live data never mix: a quote, order or
webhook of one mode is invisible to the other.
'
Session:
type: apiKey
in: cookie
name: lh_session
description: 'Dashboard session cookie set by `POST /v1/auth/verify` (HttpOnly, Secure, SameSite=Lax,
7 days). Auth and Dashboard routes only.
'
AdminBearer:
type: http
scheme: bearer
description: Operator `ADMIN_TOKEN`. Admin routes only.
AdminSession:
type: apiKey
in: cookie
name: lh_admin
description: Owner sign-in cookie set by `POST /v1/admin/login` (12 hours). Admin routes only.
x-refined-from:
- layerhop-com-openapi.yaml
- openapi.yaml