ZeroDust Sweep API

Sweep execution

GitHub OpenAPI
Pull this API's OpenAPI, operations, scores and pricing into your own code or AI agent with a free APIs.io key — sign in with GitHub, Google or LinkedIn. No form to fill in; signing in shares your email address with us (Privacy).

Operations 6

POST /authorization Create EIP-712 typed data for SweepIntent signing #
POST /authorization/batch Typed data for one signature over several chains (permission quotes) #
POST /sweep Submit signed authorization to execute sweep #
GET /sweep/{sweepId} Get sweep status #
GET /sweeps/{address} List sweeps for a user address #
GET /direct/status Delivery status of a direct sweep from its bridge #

Work with this as data

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/zerodust-xyz:zerodust-xyz-sweep-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 Specification

zerodust-xyz-sweep-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: ZeroDust Sweep API
  description: 'Move a wallet''s entire native gas balance off an EVM chain and leave exactly 0, to any address on the same chain or bridged to another chain. Sign with the wallet''s key (EIP-7702) or through MetaMask Advanced Permissions (ERC-7715, signer=permission). Supported chains change: read GET /chains and GET /direct/chains. Docs: https://zerodust.xyz/docs/api'
  version: 1.0.0
  contact:
    name: ZeroDust
    url: https://zerodust.xyz
servers:
- url: https://api.zerodust.xyz
  description: Production (mainnet)
tags:
- name: sweep
  description: Sweep execution
paths:
  /authorization:
    post:
      summary: Create EIP-712 typed data for SweepIntent signing
      tags:
      - sweep
      description: Returns typed data for signing a sweep intent. Uses user's EOA as verifyingContract (EIP-7702).
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                quoteId:
                  type: string
                  format: uuid
              required:
              - quoteId
        required: true
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  sweepType:
                    type: string
                    enum:
                    - same-chain
                    - cross-chain
                  typedData:
                    type: object
                    additionalProperties: true
                  contractAddress:
                    type: string
                    description: Contract address for EIP-7702 delegation (the permission router for signer=permission quotes)
                  version:
                    type: number
        '400':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
        '404':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
        '500':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
      operationId: postAuthorization
      x-operation-id-source: derived
  /authorization/batch:
    post:
      summary: Typed data for one signature over several chains (permission quotes)
      tags:
      - sweep
      description: Returns the EIP-712 SweepBatch for signer=permission quotes of one wallet, one per chain, in the order given. Sign it once (no chain id in the domain), then POST /sweep for each quote with the same signature and batchQuoteIds in this order.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                quoteIds:
                  type: array
                  items:
                    type: string
                    format: uuid
                  minItems: 1
                  maxItems: 64
              required:
              - quoteIds
        required: true
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  typedData:
                    type: object
                    additionalProperties: true
                  router:
                    type: string
                  entries:
                    type: array
                    items:
                      type: object
                      properties:
                        quoteId:
                          type: string
                        chainId:
                          type: number
                        index:
                          type: number
        '400':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
      operationId: postAuthorizationBatch
      x-operation-id-source: derived
  /sweep:
    post:
      summary: Submit signed authorization to execute sweep
      tags:
      - sweep
      description: Submit EIP-712 SweepIntent signature and EIP-7702 authorization (or, for a signer=permission quote, the MetaMask permission context). Idempotent - returns existing sweep if quoteId already submitted.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                quoteId:
                  type: string
                  format: uuid
                signature:
                  type: string
                  pattern: ^0x[a-fA-F0-9]{128,130}$
                eip7702Authorization:
                  type: object
                  properties:
                    chainId:
                      type: integer
                      minimum: 1
                    contractAddress:
                      type: string
                      pattern: ^0x[a-fA-F0-9]{40}$
                    nonce:
                      type: integer
                      minimum: 0
                    yParity:
                      type: integer
                      enum:
                      - 0
                      - 1
                    r:
                      type: string
                      pattern: ^0x[a-fA-F0-9]{64}$
                    s:
                      type: string
                      pattern: ^0x[a-fA-F0-9]{64}$
                  required:
                  - chainId
                  - contractAddress
                  - nonce
                  - yParity
                  - r
                  - s
                revokeAuthorization:
                  type: object
                  description: 'Required: EIP-7702 authorization revoking the delegation (address(0), same chain, nonce + 1). Its gas is in the quoted fee; a sweep without it is refused (REVOKE_AUTHORIZATION_REQUIRED)'
                  properties:
                    chainId:
                      type: integer
                      minimum: 1
                    contractAddress:
                      type: string
                      pattern: ^0x[a-fA-F0-9]{40}$
                    nonce:
                      type: integer
                      minimum: 0
                    yParity:
                      type: integer
                      enum:
                      - 0
                      - 1
                    r:
                      type: string
                      pattern: ^0x[a-fA-F0-9]{64}$
                    s:
                      type: string
                      pattern: ^0x[a-fA-F0-9]{64}$
                  required:
                  - chainId
                  - contractAddress
                  - nonce
                  - yParity
                  - r
                  - s
                callData:
                  type: string
                  pattern: ^0x[a-fA-F0-9]*$
                  description: Bridge calldata for MODE_CALL
                permissionContext:
                  type: string
                  pattern: ^0x[a-fA-F0-9]+$
                  maxLength: 16386
                  description: 'signer=permission quotes only (instead of the EIP-7702 authorizations): the context MetaMask returned for the native-token-allowance granted to the router'
                batchQuoteIds:
                  type: array
                  items:
                    type: string
                    format: uuid
                  minItems: 1
                  maxItems: 64
                  description: 'signer=permission quotes only: every quote the signature covers, in the order of POST /authorization/batch (default: this quote alone)'
              required:
              - quoteId
              - signature
        required: true
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  sweepId:
                    type: string
                  status:
                    type: string
                  sweepType:
                    type: string
                    enum:
                    - same-chain
                    - cross-chain
                  isExisting:
                    type: boolean
                  version:
                    type: number
        '400':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
        '404':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
        '429':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
        '500':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
      operationId: postSweep
      x-operation-id-source: derived
  /sweep/{sweepId}:
    get:
      summary: Get sweep status
      tags:
      - sweep
      parameters:
      - schema:
          type: string
          format: uuid
        in: path
        name: sweepId
        required: true
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  sweepId:
                    type: string
                  status:
                    type: string
                  sweepType:
                    type: string
                    enum:
                    - same-chain
                    - cross-chain
                  mode:
                    type: number
                  txHash:
                    type: string
                  destinationTxHash:
                    type: string
                  amountSent:
                    type: string
                  destination:
                    type: string
                  fromChainId:
                    type: integer
                  toChainId:
                    type: integer
                  errorMessage:
                    type: string
                  bridgeTrackingUrl:
                    type: string
                  version:
                    type: number
                  createdAt:
                    type: string
                  updatedAt:
                    type: string
                  revokeStatus:
                    type: string
                  revokeTxHash:
                    type: string
                  revokeError:
                    type: string
        '404':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
        '500':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
      operationId: getSweepBySweepId
      x-operation-id-source: derived
  /sweeps/{address}:
    get:
      summary: List sweeps for a user address
      tags:
      - sweep
      parameters:
      - schema:
          type: integer
          default: 20
          maximum: 100
          minimum: 1
        in: query
        name: limit
        required: false
      - schema:
          type: integer
          default: 0
          minimum: 0
        in: query
        name: offset
        required: false
      - schema:
          type: string
          enum:
          - pending
          - simulating
          - executing
          - broadcasted
          - bridging
          - completed
          - failed
        in: query
        name: status
        required: false
      - schema:
          type: string
          pattern: ^0x[a-fA-F0-9]{40}$
        in: path
        name: address
        required: true
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  sweeps:
                    type: array
                    items:
                      type: object
                      properties:
                        sweepId:
                          type: string
                        status:
                          type: string
                        sweepType:
                          type: string
                          enum:
                          - same-chain
                          - cross-chain
                        mode:
                          type: number
                        fromChainId:
                          type: integer
                        toChainId:
                          type: integer
                        amountSent:
                          type: string
                        txHash:
                          type: string
                        version:
                          type: number
                        createdAt:
                          type: string
                  total:
                    type: integer
        '400':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
        '500':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
      operationId: getSweepsByAddress
      x-operation-id-source: derived
  /direct/status:
    get:
      summary: Delivery status of a direct sweep from its bridge
      tags:
      - sweep
      parameters:
      - schema:
          type: string
          enum:
          - gaszip
          - relay
          - across
          - lifi
          - oft
          - meson
          - native
          - transfer
          - burn
          - donate
        in: query
        name: route
        required: true
      - schema:
          type: string
          pattern: ^0x[a-fA-F0-9]{64}$
        in: query
        name: hash
        required: true
      - schema:
          type: string
          pattern: ^0x[a-fA-F0-9]{64}$
        in: query
        name: requestId
        required: false
      - schema:
          type: string
          pattern: ^[1-9][0-9]{0,77}$
        in: query
        name: quoted
        required: false
      - schema:
          type: integer
          minimum: 1
          maximum: 4294967295
        in: query
        name: fromChainId
        required: false
      - schema:
          type: integer
          minimum: 1
          maximum: 4294967295
        in: query
        name: toChainId
        required: false
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  state:
                    type: string
                  destTx:
                    type: string
        '400':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
                  minimumBalanceWei:
                    type: string
      operationId: getDirectStatus
      x-operation-id-source: derived
components:
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: X-API-Key
    bearerAuth:
      type: http
      scheme: bearer