{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amplerun-com/json-schema/amplerun-com-deposit-address-schema.json",
  "title": "DepositAddress",
  "x-generated": "2026-11-01",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amplerun-com-openapi.json#/components/schemas/DepositAddress",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "chain_id",
    "network",
    "address",
    "assets",
    "min_deposit_micro",
    "max_deposit_micro",
    "finalized_block_number",
    "networks",
    "deposits"
  ],
  "properties": {
    "chain_id": {
      "type": "integer",
      "enum": [
        8453
      ]
    },
    "network": {
      "type": "string",
      "enum": [
        "base"
      ]
    },
    "address": {
      "$ref": "#/$defs/EvmAddress"
    },
    "networks": {
      "description": "Every network this address is watched on right now (Base first). The address is the same on each. Stablecoins credit 1:1; the native coin credits in USD at the Chainlink price at finality minus spread_bps.",
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "key",
          "chain_id",
          "caip2",
          "name",
          "native_symbol",
          "explorer_url",
          "assets",
          "native",
          "status",
          "finalized_block_number"
        ],
        "properties": {
          "key": {
            "type": "string",
            "enum": [
              "base",
              "arbitrum",
              "ethereum",
              "optimism",
              "polygon",
              "bnb",
              "avalanche",
              "sei",
              "xlayer",
              "robinhood",
              "arc"
            ]
          },
          "chain_id": {
            "type": "integer"
          },
          "caip2": {
            "type": "string",
            "pattern": "^eip155:[0-9]+$"
          },
          "name": {
            "type": "string"
          },
          "native_symbol": {
            "type": "string"
          },
          "explorer_url": {
            "type": "string",
            "format": "uri"
          },
          "assets": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "asset",
                "contract"
              ],
              "properties": {
                "asset": {
                  "type": "string",
                  "enum": [
                    "USDC",
                    "USDT"
                  ]
                },
                "contract": {
                  "$ref": "#/$defs/EvmAddress"
                }
              }
            }
          },
          "native": {
            "description": "null when the native coin is not credited on this network.",
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "symbol",
                  "spread_bps",
                  "quote_micro_per_coin",
                  "price_updated_at"
                ],
                "properties": {
                  "symbol": {
                    "type": "string"
                  },
                  "spread_bps": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 1000
                  },
                  "quote_micro_per_coin": {
                    "description": "Live quote for one whole coin after the spread (display only; the credit uses the price at finality).",
                    "anyOf": [
                      {
                        "$ref": "#/$defs/MicroAmount"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "price_updated_at": {
                    "anyOf": [
                      {
                        "$ref": "#/$defs/Rfc3339Utc"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "OK",
              "UNAVAILABLE"
            ]
          },
          "finalized_block_number": {
            "anyOf": [
              {
                "$ref": "#/$defs/DecimalString"
              },
              {
                "type": "null"
              }
            ]
          },
          "wallet_add_chain": {
            "description": "EIP-3085 wallet_addEthereumChain parameters (public RPC and explorer), for a wallet that doesn't know this network yet. Read-only; null when no public RPC is known. Absent from older servers.",
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "chainId",
                  "chainName",
                  "nativeCurrency",
                  "rpcUrls",
                  "blockExplorerUrls"
                ],
                "properties": {
                  "chainId": {
                    "type": "string",
                    "pattern": "^0x[0-9a-f]+$"
                  },
                  "chainName": {
                    "type": "string"
                  },
                  "nativeCurrency": {
                    "type": "object",
                    "additionalProperties": false,
                    "required": [
                      "name",
                      "symbol",
                      "decimals"
                    ],
                    "properties": {
                      "name": {
                        "type": "string"
                      },
                      "symbol": {
                        "type": "string"
                      },
                      "decimals": {
                        "type": "integer",
                        "minimum": 0
                      }
                    }
                  },
                  "rpcUrls": {
                    "type": "array",
                    "minItems": 1,
                    "items": {
                      "type": "string",
                      "format": "uri"
                    }
                  },
                  "blockExplorerUrls": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uri"
                    }
                  }
                }
              },
              {
                "type": "null"
              }
            ]
          }
        }
      }
    },
    "assets": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "asset",
          "contract"
        ],
        "properties": {
          "asset": {
            "type": "string",
            "enum": [
              "USDC",
              "USDT"
            ]
          },
          "contract": {
            "$ref": "#/$defs/EvmAddress"
          }
        }
      }
    },
    "min_deposit_micro": {
      "$ref": "#/$defs/MicroAmount"
    },
    "max_deposit_micro": {
      "description": "Room left under the account balance cap; null = no limit.",
      "anyOf": [
        {
          "$ref": "#/$defs/MicroAmount"
        },
        {
          "type": "null"
        }
      ]
    },
    "finalized_block_number": {
      "anyOf": [
        {
          "$ref": "#/$defs/DecimalString"
        },
        {
          "type": "null"
        }
      ]
    },
    "deposits": {
      "type": "array",
      "maxItems": 10,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "chain_id",
          "network",
          "tx_hash",
          "log_index",
          "asset",
          "amount_micro",
          "amount_wei",
          "block_number",
          "state",
          "blocks_to_finality",
          "reason",
          "created_at"
        ],
        "properties": {
          "chain_id": {
            "type": "integer"
          },
          "network": {
            "type": "string"
          },
          "tx_hash": {
            "description": "null for a native-coin credit (credited from the address balance at finality, not per transaction).",
            "anyOf": [
              {
                "type": "string",
                "pattern": "^0x[0-9a-f]{64}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "log_index": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "asset": {
            "type": "string",
            "enum": [
              "USDC",
              "USDT",
              "ETH",
              "POL",
              "BNB",
              "AVAX"
            ]
          },
          "amount_micro": {
            "$ref": "#/$defs/MicroAmount"
          },
          "amount_wei": {
            "description": "Native coins only, in the coin's base unit.",
            "anyOf": [
              {
                "$ref": "#/$defs/DecimalString"
              },
              {
                "type": "null"
              }
            ]
          },
          "block_number": {
            "anyOf": [
              {
                "$ref": "#/$defs/DecimalString"
              },
              {
                "type": "null"
              }
            ]
          },
          "state": {
            "type": "string",
            "enum": [
              "SEEN",
              "CREDITED",
              "HELD"
            ]
          },
          "blocks_to_finality": {
            "anyOf": [
              {
                "$ref": "#/$defs/DecimalString"
              },
              {
                "type": "null"
              }
            ]
          },
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "anyOf": [
              {
                "$ref": "#/$defs/Rfc3339Utc"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      }
    }
  },
  "$defs": {
    "DecimalString": {
      "type": "string",
      "pattern": "^(0|[1-9][0-9]*)$",
      "description": "Unsigned base-10 integer as string; never a float."
    },
    "EvmAddress": {
      "type": "string",
      "pattern": "^0x[0-9a-fA-F]{40}$"
    },
    "MicroAmount": {
      "$ref": "#/$defs/DecimalString",
      "description": "Money in micro-units of the settlement asset as a base-10 integer string (\"5000000\" is 5 USDC). Never a float."
    },
    "Rfc3339Utc": {
      "type": "string",
      "format": "date-time",
      "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\\.[0-9]+)?Z$"
    }
  }
}