{
  "openapi": "3.0.3",
  "info": {
    "title": "Sparkscan API",
    "description": "API for Sparkscan - a Spark wallet explorer",
    "version": "3.4.0"
  },
  "servers": [
    {
      "url": "https://api.sparkscan.io",
      "description": "Production"
    }
  ],
  "tags": [
    {
      "name": "Tx",
      "description": "Operations related to transactions"
    },
    {
      "name": "Address",
      "description": "Operations related to addresses"
    },
    {
      "name": "Token",
      "description": "Operations related to tokens"
    },
    {
      "name": "Sats",
      "description": "Operations related to sats"
    },
    {
      "name": "Historical",
      "description": "Operations related to historical data"
    },
    {
      "name": "Stats",
      "description": "Network statistics and leaderboards"
    }
  ],
  "paths": {
    "/v1/tx/latest": {
      "get": {
        "tags": [
          "Tx"
        ],
        "description": "Get the latest network transactions across all addresses.",
        "parameters": [
          {
            "name": "network",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "MAINNET",
                "REGTEST"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "minimum": 1,
              "description": "Maximum number of transactions to return (default: 10, max: 250).",
              "anyOf": [
                {
                  "format": "numeric",
                  "default": 0,
                  "type": "string"
                },
                {
                  "minimum": 1,
                  "description": "Maximum number of transactions to return (default: 10, max: 250).",
                  "type": "number"
                }
              ]
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "minimum": 0,
              "description": "Number of transactions to skip.",
              "anyOf": [
                {
                  "format": "numeric",
                  "default": 0,
                  "type": "string"
                },
                {
                  "minimum": 0,
                  "description": "Number of transactions to skip.",
                  "type": "number"
                }
              ]
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "created_at",
                "updated_at"
              ]
            }
          },
          {
            "name": "order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ]
            }
          },
          {
            "name": "from_timestamp",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Filter transactions created after this ISO 8601 timestamp.",
              "type": "string"
            }
          },
          {
            "name": "to_timestamp",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Filter transactions created before this ISO 8601 timestamp.",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "status",
                      "valueUsd"
                    ],
                    "properties": {
                      "id": {
                        "description": "Spark transaction ID",
                        "type": "string"
                      },
                      "type": {
                        "type": "string",
                        "enum": [
                          "bitcoin_deposit",
                          "bitcoin_withdrawal",
                          "spark_transfer",
                          "lightning_payment",
                          "token_mint",
                          "token_transfer",
                          "token_burn",
                          "token_multi_transfer",
                          "unknown_token_op",
                          "unknown_transfer"
                        ]
                      },
                      "status": {
                        "type": "string",
                        "enum": [
                          "confirmed",
                          "pending",
                          "sent",
                          "failed",
                          "expired"
                        ]
                      },
                      "amountSats": {
                        "nullable": true,
                        "anyOf": [
                          {
                            "description": "Amount in sats",
                            "type": "integer"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "tokenAmount": {
                        "nullable": true,
                        "anyOf": [
                          {
                            "description": "Token amount as a decimal string",
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "tokenMetadata": {
                        "nullable": true,
                        "anyOf": [
                          {
                            "type": "object",
                            "required": [
                              "tokenIdentifier",
                              "tokenAddress",
                              "name",
                              "ticker",
                              "decimals",
                              "issuerPublicKey"
                            ],
                            "properties": {
                              "tokenIdentifier": {
                                "description": "Unique token identifier (hex)",
                                "type": "string"
                              },
                              "tokenAddress": {
                                "description": "Token bech32 address",
                                "type": "string"
                              },
                              "name": {
                                "description": "Token display name",
                                "type": "string"
                              },
                              "ticker": {
                                "description": "Token ticker symbol",
                                "type": "string"
                              },
                              "decimals": {
                                "description": "Token decimal places",
                                "type": "integer"
                              },
                              "issuerPublicKey": {
                                "description": "Public key of the token issuer",
                                "type": "string"
                              },
                              "maxSupply": {
                                "nullable": true,
                                "anyOf": [
                                  {
                                    "description": "Maximum token supply, if capped",
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "isFreezable": {
                                "nullable": true,
                                "anyOf": [
                                  {
                                    "description": "Whether the token can be frozen by the issuer",
                                    "type": "boolean"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            }
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "multiIoDetails": {
                        "nullable": true,
                        "anyOf": [
                          {
                            "type": "object",
                            "required": [
                              "inputs",
                              "outputs",
                              "totalInputAmount",
                              "totalOutputAmount"
                            ],
                            "properties": {
                              "inputs": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "required": [
                                    "address",
                                    "pubkey",
                                    "amount"
                                  ],
                                  "properties": {
                                    "address": {
                                      "description": "Spark address",
                                      "type": "string"
                                    },
                                    "pubkey": {
                                      "description": "Public key hex",
                                      "type": "string"
                                    },
                                    "amount": {
                                      "description": "Token amount as a decimal string",
                                      "type": "string"
                                    }
                                  }
                                }
                              },
                              "outputs": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "required": [
                                    "address",
                                    "pubkey",
                                    "amount"
                                  ],
                                  "properties": {
                                    "address": {
                                      "description": "Spark address",
                                      "type": "string"
                                    },
                                    "pubkey": {
                                      "description": "Public key hex",
                                      "type": "string"
                                    },
                                    "amount": {
                                      "description": "Token amount as a decimal string",
                                      "type": "string"
                                    }
                                  }
                                }
                              },
                              "totalInputAmount": {
                                "description": "Sum of all input amounts",
                                "type": "string"
                              },
                              "totalOutputAmount": {
                                "description": "Sum of all output amounts",
                                "type": "string"
                              }
                            }
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "from": {
                        "nullable": true,
                        "anyOf": [
                          {
                            "type": "object",
                            "required": [
                              "type",
                              "identifier"
                            ],
                            "properties": {
                              "type": {
                                "description": "Type of transaction party",
                                "anyOf": [
                                  {
                                    "const": "spark",
                                    "type": "string"
                                  },
                                  {
                                    "const": "lightning",
                                    "type": "string"
                                  },
                                  {
                                    "const": "bitcoin",
                                    "type": "string"
                                  },
                                  {
                                    "const": "issuer",
                                    "type": "string"
                                  },
                                  {
                                    "const": "burn_address",
                                    "type": "string"
                                  },
                                  {
                                    "const": "unknown",
                                    "type": "string"
                                  }
                                ]
                              },
                              "identifier": {
                                "description": "Party address or identifier",
                                "type": "string"
                              },
                              "pubkey": {
                                "nullable": true,
                                "anyOf": [
                                  {
                                    "description": "Public key hex, if available",
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            }
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "to": {
                        "nullable": true,
                        "anyOf": [
                          {
                            "type": "object",
                            "required": [
                              "type",
                              "identifier"
                            ],
                            "properties": {
                              "type": {
                                "description": "Type of transaction party",
                                "anyOf": [
                                  {
                                    "const": "spark",
                                    "type": "string"
                                  },
                                  {
                                    "const": "lightning",
                                    "type": "string"
                                  },
                                  {
                                    "const": "bitcoin",
                                    "type": "string"
                                  },
                                  {
                                    "const": "issuer",
                                    "type": "string"
                                  },
                                  {
                                    "const": "burn_address",
                                    "type": "string"
                                  },
                                  {
                                    "const": "unknown",
                                    "type": "string"
                                  }
                                ]
                              },
                              "identifier": {
                                "description": "Party address or identifier",
                                "type": "string"
                              },
                              "pubkey": {
                                "nullable": true,
                                "anyOf": [
                                  {
                                    "description": "Public key hex, if available",
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            }
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "bitcoinTxid": {
                        "nullable": true,
                        "anyOf": [
                          {
                            "description": "Bitcoin transaction ID",
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "valueUsd": {
                        "description": "USD value",
                        "type": "number"
                      },
                      "createdAt": {
                        "nullable": true,
                        "anyOf": [
                          {
                            "format": "date-time",
                            "description": "Creation timestamp",
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "updatedAt": {
                        "nullable": true,
                        "anyOf": [
                          {
                            "format": "date-time",
                            "description": "Last update timestamp",
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "expiredTime": {
                        "nullable": true,
                        "anyOf": [
                          {
                            "format": "date-time",
                            "description": "When the transaction expired",
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "swapId": {
                        "nullable": true,
                        "anyOf": [
                          {
                            "description": "Associated swap ID",
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "Response for status 500",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "operationId": "getV1TxLatest"
      }
    },
    "/v1/tx/{txid}": {
      "get": {
        "tags": [
          "Tx"
        ],
        "description": "Get a transaction by its ID. Returns a sats transaction or token transaction depending on the type.",
        "parameters": [
          {
            "name": "txid",
            "in": "path",
            "required": true,
            "schema": {
              "description": "The Spark transaction ID.",
              "type": "string"
            }
          },
          {
            "name": "network",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "MAINNET",
                "REGTEST"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "required": [
                        "id",
                        "type",
                        "status",
                        "amountSats",
                        "valueUsd"
                      ],
                      "properties": {
                        "id": {
                          "description": "Spark transaction ID",
                          "type": "string"
                        },
                        "type": {
                          "description": "Transaction type",
                          "type": "string"
                        },
                        "status": {
                          "description": "Transaction status",
                          "anyOf": [
                            {
                              "const": "confirmed",
                              "type": "string"
                            },
                            {
                              "const": "pending",
                              "type": "string"
                            },
                            {
                              "const": "sent",
                              "type": "string"
                            },
                            {
                              "const": "failed",
                              "type": "string"
                            },
                            {
                              "const": "expired",
                              "type": "string"
                            }
                          ]
                        },
                        "createdAt": {
                          "nullable": true,
                          "anyOf": [
                            {
                              "format": "date-time",
                              "description": "Creation timestamp",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "updatedAt": {
                          "nullable": true,
                          "anyOf": [
                            {
                              "format": "date-time",
                              "description": "Last update timestamp",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "expiredTime": {
                          "nullable": true,
                          "anyOf": [
                            {
                              "format": "date-time",
                              "description": "When the transaction expired",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "from": {
                          "nullable": true,
                          "anyOf": [
                            {
                              "type": "object",
                              "required": [
                                "type",
                                "identifier"
                              ],
                              "properties": {
                                "type": {
                                  "description": "Type of transaction party",
                                  "anyOf": [
                                    {
                                      "const": "spark",
                                      "type": "string"
                                    },
                                    {
                                      "const": "lightning",
                                      "type": "string"
                                    },
                                    {
                                      "const": "bitcoin",
                                      "type": "string"
                                    },
                                    {
                                      "const": "issuer",
                                      "type": "string"
                                    },
                                    {
                                      "const": "burn_address",
                                      "type": "string"
                                    },
                                    {
                                      "const": "unknown",
                                      "type": "string"
                                    }
                                  ]
                                },
                                "identifier": {
                                  "description": "Party address or identifier",
                                  "type": "string"
                                },
                                "pubkey": {
                                  "nullable": true,
                                  "anyOf": [
                                    {
                                      "description": "Public key hex, if available",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              }
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "to": {
                          "nullable": true,
                          "anyOf": [
                            {
                              "type": "object",
                              "required": [
                                "type",
                                "identifier"
                              ],
                              "properties": {
                                "type": {
                                  "description": "Type of transaction party",
                                  "anyOf": [
                                    {
                                      "const": "spark",
                                      "type": "string"
                                    },
                                    {
                                      "const": "lightning",
                                      "type": "string"
                                    },
                                    {
                                      "const": "bitcoin",
                                      "type": "string"
                                    },
                                    {
                                      "const": "issuer",
                                      "type": "string"
                                    },
                                    {
                                      "const": "burn_address",
                                      "type": "string"
                                    },
                                    {
                                      "const": "unknown",
                                      "type": "string"
                                    }
                                  ]
                                },
                                "identifier": {
                                  "description": "Party address or identifier",
                                  "type": "string"
                                },
                                "pubkey": {
                                  "nullable": true,
                                  "anyOf": [
                                    {
                                      "description": "Public key hex, if available",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              }
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "amountSats": {
                          "description": "Amount in sats",
                          "type": "integer"
                        },
                        "valueUsd": {
                          "description": "USD value at time of transaction",
                          "type": "number"
                        },
                        "timeTakenSeconds": {
                          "nullable": true,
                          "anyOf": [
                            {
                              "description": "Time taken to complete in seconds",
                              "type": "number"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "txid": {
                          "nullable": true,
                          "anyOf": [
                            {
                              "description": "Bitcoin transaction ID, if applicable",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "bitcoinTxData": {
                          "nullable": true,
                          "anyOf": [
                            {
                              "type": "object",
                              "required": [
                                "txid",
                                "vin",
                                "vout",
                                "status",
                                "fee"
                              ],
                              "properties": {
                                "txid": {
                                  "description": "Bitcoin transaction ID",
                                  "type": "string"
                                },
                                "vin": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "prevout": {},
                                      "witness": {
                                        "type": "array",
                                        "items": {
                                          "type": "string"
                                        }
                                      },
                                      "value": {
                                        "description": "Input value in sats",
                                        "type": "integer"
                                      }
                                    }
                                  }
                                },
                                "vout": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "required": [
                                      "value"
                                    ],
                                    "properties": {
                                      "scriptpubkey_address": {
                                        "nullable": true,
                                        "anyOf": [
                                          {
                                            "description": "Output address",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "value": {
                                        "description": "Output value in sats",
                                        "type": "integer"
                                      }
                                    }
                                  }
                                },
                                "status": {
                                  "type": "object",
                                  "required": [
                                    "confirmed"
                                  ],
                                  "properties": {
                                    "confirmed": {
                                      "description": "Whether the transaction is confirmed on-chain",
                                      "type": "boolean"
                                    },
                                    "block_height": {
                                      "nullable": true,
                                      "anyOf": [
                                        {
                                          "description": "Block height if confirmed",
                                          "type": "integer"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "block_time": {
                                      "nullable": true,
                                      "anyOf": [
                                        {
                                          "description": "Block timestamp if confirmed (unix seconds)",
                                          "type": "integer"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  }
                                },
                                "fee": {
                                  "description": "Transaction fee in sats",
                                  "type": "integer"
                                }
                              }
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "swapId": {
                          "nullable": true,
                          "anyOf": [
                            {
                              "description": "Associated swap ID",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      }
                    },
                    {
                      "type": "object",
                      "required": [
                        "id",
                        "type",
                        "status",
                        "amount",
                        "valueUsd"
                      ],
                      "properties": {
                        "id": {
                          "description": "Spark transaction ID",
                          "type": "string"
                        },
                        "type": {
                          "description": "Transaction type",
                          "type": "string"
                        },
                        "status": {
                          "description": "Transaction status",
                          "anyOf": [
                            {
                              "const": "confirmed",
                              "type": "string"
                            },
                            {
                              "const": "pending",
                              "type": "string"
                            },
                            {
                              "const": "sent",
                              "type": "string"
                            },
                            {
                              "const": "failed",
                              "type": "string"
                            },
                            {
                              "const": "expired",
                              "type": "string"
                            }
                          ]
                        },
                        "createdAt": {
                          "nullable": true,
                          "anyOf": [
                            {
                              "format": "date-time",
                              "description": "Creation timestamp",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "updatedAt": {
                          "nullable": true,
                          "anyOf": [
                            {
                              "format": "date-time",
                              "description": "Last update timestamp",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "expiredTime": {
                          "nullable": true,
                          "anyOf": [
                            {
                              "format": "date-time",
                              "description": "When the transaction expired",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "from": {
                          "nullable": true,
                          "anyOf": [
                            {
                              "type": "object",
                              "required": [
                                "type",
                                "identifier"
                              ],
                              "properties": {
                                "type": {
                                  "description": "Type of transaction party",
                                  "anyOf": [
                                    {
                                      "const": "spark",
                                      "type": "string"
                                    },
                                    {
                                      "const": "lightning",
                                      "type": "string"
                                    },
                                    {
                                      "const": "bitcoin",
                                      "type": "string"
                                    },
                                    {
                                      "const": "issuer",
                                      "type": "string"
                                    },
                                    {
                                      "const": "burn_address",
                                      "type": "string"
                                    },
                                    {
                                      "const": "unknown",
                                      "type": "string"
                                    }
                                  ]
                                },
                                "identifier": {
                                  "description": "Party address or identifier",
                                  "type": "string"
                                },
                                "pubkey": {
                                  "nullable": true,
                                  "anyOf": [
                                    {
                                      "description": "Public key hex, if available",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              }
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "to": {
                          "nullable": true,
                          "anyOf": [
                            {
                              "type": "object",
                              "required": [
                                "type",
                                "identifier"
                              ],
                              "properties": {
                                "type": {
                                  "description": "Type of transaction party",
                                  "anyOf": [
                                    {
                                      "const": "spark",
                                      "type": "string"
                                    },
                                    {
                                      "const": "lightning",
                                      "type": "string"
                                    },
                                    {
                                      "const": "bitcoin",
                                      "type": "string"
                                    },
                                    {
                                      "const": "issuer",
                                      "type": "string"
                                    },
                                    {
                                      "const": "burn_address",
                                      "type": "string"
                                    },
                                    {
                                      "const": "unknown",
                                      "type": "string"
                                    }
                                  ]
                                },
                                "identifier": {
                                  "description": "Party address or identifier",
                                  "type": "string"
                                },
                                "pubkey": {
                                  "nullable": true,
                                  "anyOf": [
                                    {
                                      "description": "Public key hex, if available",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              }
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "amount": {
                          "description": "Token amount as a decimal string",
                          "type": "string"
                        },
                        "valueUsd": {
                          "description": "USD value at time of transaction",
                          "type": "number"
                        },
                        "tokenMetadata": {
                          "nullable": true,
                          "anyOf": [
                            {
                              "type": "object",
                              "required": [
                                "tokenIdentifier",
                                "tokenAddress",
                                "name",
                                "ticker",
                                "decimals",
                                "issuerPublicKey"
                              ],
                              "properties": {
                                "tokenIdentifier": {
                                  "description": "Unique token identifier (hex)",
                                  "type": "string"
                                },
                                "tokenAddress": {
                                  "description": "Token bech32 address",
                                  "type": "string"
                                },
                                "name": {
                                  "description": "Token display name",
                                  "type": "string"
                                },
                                "ticker": {
                                  "description": "Token ticker symbol",
                                  "type": "string"
                                },
                                "decimals": {
                                  "description": "Token decimal places",
                                  "type": "integer"
                                },
                                "issuerPublicKey": {
                                  "description": "Public key of the token issuer",
                                  "type": "string"
                                },
                                "maxSupply": {
                                  "nullable": true,
                                  "anyOf": [
                                    {
                                      "description": "Maximum token supply, if capped",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "isFreezable": {
                                  "nullable": true,
                                  "anyOf": [
                                    {
                                      "description": "Whether the token can be frozen by the issuer",
                                      "type": "boolean"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              }
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "multiIoDetails": {
                          "nullable": true,
                          "anyOf": [
                            {
                              "type": "object",
                              "required": [
                                "inputs",
                                "outputs",
                                "totalInputAmount",
                                "totalOutputAmount"
                              ],
                              "properties": {
                                "inputs": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "required": [
                                      "address",
                                      "pubkey",
                                      "amount"
                                    ],
                                    "properties": {
                                      "address": {
                                        "description": "Spark address",
                                        "type": "string"
                                      },
                                      "pubkey": {
                                        "description": "Public key hex",
                                        "type": "string"
                                      },
                                      "amount": {
                                        "description": "Token amount as a decimal string",
                                        "type": "string"
                                      }
                                    }
                                  }
                                },
                                "outputs": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "required": [
                                      "address",
                                      "pubkey",
                                      "amount"
                                    ],
                                    "properties": {
                                      "address": {
                                        "description": "Spark address",
                                        "type": "string"
                                      },
                                      "pubkey": {
                                        "description": "Public key hex",
                                        "type": "string"
                                      },
                                      "amount": {
                                        "description": "Token amount as a decimal string",
                                        "type": "string"
                                      }
                                    }
                                  }
                                },
                                "totalInputAmount": {
                                  "description": "Sum of all input amounts",
                                  "type": "string"
                                },
                                "totalOutputAmount": {
                                  "description": "Sum of all output amounts",
                                  "type": "string"
                                }
                              }
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "swapId": {
                          "nullable": true,
                          "anyOf": [
                            {
                              "description": "Associated swap ID",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "Response for status 500",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "operationId": "getV1TxByTxid"
      }
    },
    "/v1/address/{address}": {
      "get": {
        "tags": [
          "Address"
        ],
        "description": "Get a summary for a Spark address including balances, token count, and transaction count.",
        "parameters": [
          {
            "name": "address",
            "in": "path",
            "required": true,
            "schema": {
              "description": "The Spark address or public key hex",
              "type": "string"
            }
          },
          {
            "name": "network",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "MAINNET",
                "REGTEST"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "sparkAddress",
                    "publicKey",
                    "balance",
                    "totalValueUsd",
                    "transactionCount",
                    "tokenCount"
                  ],
                  "properties": {
                    "sparkAddress": {
                      "description": "The Spark bech32 address",
                      "type": "string"
                    },
                    "publicKey": {
                      "description": "The public key hex",
                      "type": "string"
                    },
                    "balance": {
                      "type": "object",
                      "required": [
                        "btcSoftBalanceSats",
                        "btcHardBalanceSats",
                        "btcValueUsdHard",
                        "btcValueUsdSoft",
                        "totalTokenValueUsd"
                      ],
                      "properties": {
                        "btcSoftBalanceSats": {
                          "description": "Soft BTC balance in sats (pending + confirmed)",
                          "type": "integer"
                        },
                        "btcHardBalanceSats": {
                          "description": "Hard BTC balance in sats (confirmed only)",
                          "type": "integer"
                        },
                        "btcValueUsdHard": {
                          "description": "USD value of hard balance",
                          "type": "number"
                        },
                        "btcValueUsdSoft": {
                          "description": "USD value of soft balance",
                          "type": "number"
                        },
                        "totalTokenValueUsd": {
                          "description": "Total USD value of all tokens held",
                          "type": "number"
                        }
                      }
                    },
                    "totalValueUsd": {
                      "description": "Total portfolio value in USD",
                      "type": "number"
                    },
                    "transactionCount": {
                      "description": "Total number of transactions",
                      "type": "integer"
                    },
                    "tokenCount": {
                      "description": "Number of distinct tokens held",
                      "type": "integer"
                    },
                    "tokens": {
                      "nullable": true,
                      "anyOf": [
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "required": [
                              "tokenIdentifier",
                              "tokenAddress",
                              "name",
                              "ticker",
                              "decimals",
                              "balance",
                              "valueUsd",
                              "issuerPublicKey"
                            ],
                            "properties": {
                              "tokenIdentifier": {
                                "description": "Unique token identifier (hex)",
                                "type": "string"
                              },
                              "tokenAddress": {
                                "description": "Token bech32 address",
                                "type": "string"
                              },
                              "name": {
                                "description": "Token display name",
                                "type": "string"
                              },
                              "ticker": {
                                "description": "Token ticker symbol",
                                "type": "string"
                              },
                              "decimals": {
                                "description": "Token decimal places",
                                "type": "integer"
                              },
                              "balance": {
                                "description": "Token balance as a decimal string",
                                "type": "string"
                              },
                              "valueUsd": {
                                "description": "USD value of the balance",
                                "type": "number"
                              },
                              "issuerPublicKey": {
                                "description": "Public key of the token issuer",
                                "type": "string"
                              },
                              "maxSupply": {
                                "nullable": true,
                                "anyOf": [
                                  {
                                    "description": "Maximum token supply, if capped",
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "isFreezable": {
                                "nullable": true,
                                "anyOf": [
                                  {
                                    "description": "Whether the token can be frozen by the issuer",
                                    "type": "boolean"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            }
                          }
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "Response for status 500",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "operationId": "getV1AddressByAddress"
      }
    },
    "/v1/address/{address}/transactions": {
      "get": {
        "tags": [
          "Address",
          "Tx"
        ],
        "description": "Get paginated transactions for an address using offset-based pagination. For better performance on addresses with many transactions, use the v2 cursor-based endpoint.",
        "parameters": [
          {
            "name": "address",
            "in": "path",
            "required": true,
            "schema": {
              "description": "The Spark address or public key hex",
              "type": "string"
            }
          },
          {
            "name": "network",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "MAINNET",
                "REGTEST"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "minimum": 1,
              "maximum": 100,
              "description": "Number of transactions per page (default: 25, max: 100)",
              "anyOf": [
                {
                  "format": "numeric",
                  "default": 0,
                  "type": "string"
                },
                {
                  "minimum": 1,
                  "maximum": 100,
                  "description": "Number of transactions per page (default: 25, max: 100)",
                  "type": "number"
                }
              ]
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "minimum": 0,
              "description": "Number of transactions to skip.",
              "anyOf": [
                {
                  "format": "numeric",
                  "default": 0,
                  "type": "string"
                },
                {
                  "minimum": 0,
                  "description": "Number of transactions to skip.",
                  "type": "number"
                }
              ]
            }
          },
          {
            "name": "asset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "created_at",
                "updated_at"
              ]
            }
          },
          {
            "name": "order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ]
            }
          },
          {
            "name": "from_timestamp",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Filter transactions created after this ISO 8601 timestamp.",
              "type": "string"
            }
          },
          {
            "name": "to_timestamp",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Filter transactions created before this ISO 8601 timestamp.",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "meta",
                    "data"
                  ],
                  "properties": {
                    "meta": {
                      "type": "object",
                      "required": [
                        "totalItems",
                        "limit",
                        "offset"
                      ],
                      "properties": {
                        "totalItems": {
                          "description": "Total number of items matching the query",
                          "type": "integer"
                        },
                        "limit": {
                          "description": "Page size used",
                          "type": "integer"
                        },
                        "offset": {
                          "description": "Number of items skipped",
                          "type": "integer"
                        }
                      }
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "type",
                          "direction",
                          "counterparty",
                          "valueUsd",
                          "status"
                        ],
                        "properties": {
                          "id": {
                            "description": "Spark transaction ID",
                            "type": "string"
                          },
                          "type": {
                            "type": "string",
                            "enum": [
                              "spark_transfer",
                              "lightning_payment",
                              "bitcoin_deposit",
                              "bitcoin_withdrawal",
                              "token_transfer",
                              "token_mint",
                              "token_burn",
                              "token_multi_transfer",
                              "unknown_token_op",
                              "unknown_transfer"
                            ]
                          },
                          "direction": {
                            "type": "string",
                            "enum": [
                              "incoming",
                              "outgoing",
                              "creation",
                              "destruction",
                              "transfer",
                              "deposit",
                              "withdrawal",
                              "payment",
                              "settlement",
                              "unknown"
                            ]
                          },
                          "counterparty": {
                            "type": "object",
                            "required": [
                              "type",
                              "identifier"
                            ],
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "spark",
                                  "lightning",
                                  "bitcoin",
                                  "token"
                                ]
                              },
                              "identifier": {
                                "description": "Counterparty address or identifier",
                                "type": "string"
                              },
                              "tokenMetadata": {
                                "nullable": true,
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "required": [
                                      "tokenIdentifier",
                                      "tokenAddress",
                                      "name",
                                      "ticker",
                                      "decimals",
                                      "issuerPublicKey"
                                    ],
                                    "properties": {
                                      "tokenIdentifier": {
                                        "description": "Unique token identifier (hex)",
                                        "type": "string"
                                      },
                                      "tokenAddress": {
                                        "description": "Token bech32 address",
                                        "type": "string"
                                      },
                                      "name": {
                                        "description": "Token display name",
                                        "type": "string"
                                      },
                                      "ticker": {
                                        "description": "Token ticker symbol",
                                        "type": "string"
                                      },
                                      "decimals": {
                                        "description": "Token decimal places",
                                        "type": "integer"
                                      },
                                      "issuerPublicKey": {
                                        "description": "Public key of the token issuer",
                                        "type": "string"
                                      },
                                      "maxSupply": {
                                        "nullable": true,
                                        "anyOf": [
                                          {
                                            "description": "Maximum token supply, if capped",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "isFreezable": {
                                        "nullable": true,
                                        "anyOf": [
                                          {
                                            "description": "Whether the token can be frozen by the issuer",
                                            "type": "boolean"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    }
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            }
                          },
                          "amountSats": {
                            "nullable": true,
                            "anyOf": [
                              {
                                "description": "Amount in sats, for BTC transactions",
                                "type": "integer"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "tokenAmount": {
                            "nullable": true,
                            "anyOf": [
                              {
                                "description": "Token amount as a decimal string, for token transactions",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "valueUsd": {
                            "description": "USD value at time of transaction",
                            "type": "number"
                          },
                          "createdAt": {
                            "nullable": true,
                            "anyOf": [
                              {
                                "format": "date-time",
                                "description": "Creation timestamp",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "updatedAt": {
                            "nullable": true,
                            "anyOf": [
                              {
                                "format": "date-time",
                                "description": "Last update timestamp",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "confirmed",
                              "pending",
                              "sent",
                              "failed",
                              "expired"
                            ]
                          },
                          "txid": {
                            "nullable": true,
                            "anyOf": [
                              {
                                "description": "Bitcoin transaction ID, if applicable",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "tokenMetadata": {
                            "nullable": true,
                            "anyOf": [
                              {
                                "type": "object",
                                "required": [
                                  "tokenIdentifier",
                                  "tokenAddress",
                                  "name",
                                  "ticker",
                                  "decimals",
                                  "issuerPublicKey"
                                ],
                                "properties": {
                                  "tokenIdentifier": {
                                    "description": "Unique token identifier (hex)",
                                    "type": "string"
                                  },
                                  "tokenAddress": {
                                    "description": "Token bech32 address",
                                    "type": "string"
                                  },
                                  "name": {
                                    "description": "Token display name",
                                    "type": "string"
                                  },
                                  "ticker": {
                                    "description": "Token ticker symbol",
                                    "type": "string"
                                  },
                                  "decimals": {
                                    "description": "Token decimal places",
                                    "type": "integer"
                                  },
                                  "issuerPublicKey": {
                                    "description": "Public key of the token issuer",
                                    "type": "string"
                                  },
                                  "maxSupply": {
                                    "nullable": true,
                                    "anyOf": [
                                      {
                                        "description": "Maximum token supply, if capped",
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "isFreezable": {
                                    "nullable": true,
                                    "anyOf": [
                                      {
                                        "description": "Whether the token can be frozen by the issuer",
                                        "type": "boolean"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                }
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "multiIoDetails": {
                            "nullable": true,
                            "anyOf": [
                              {
                                "type": "object",
                                "required": [
                                  "inputs",
                                  "outputs",
                                  "totalInputAmount",
                                  "totalOutputAmount"
                                ],
                                "properties": {
                                  "inputs": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "required": [
                                        "address",
                                        "pubkey",
                                        "amount"
                                      ],
                                      "properties": {
                                        "address": {
                                          "description": "Spark address",
                                          "type": "string"
                                        },
                                        "pubkey": {
                                          "description": "Public key hex",
                                          "type": "string"
                                        },
                                        "amount": {
                                          "description": "Token amount as a decimal string",
                                          "type": "string"
                                        }
                                      }
                                    }
                                  },
                                  "outputs": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "required": [
                                        "address",
                                        "pubkey",
                                        "amount"
                                      ],
                                      "properties": {
                                        "address": {
                                          "description": "Spark address",
                                          "type": "string"
                                        },
                                        "pubkey": {
                                          "description": "Public key hex",
                                          "type": "string"
                                        },
                                        "amount": {
                                          "description": "Token amount as a decimal string",
                                          "type": "string"
                                        }
                                      }
                                    }
                                  },
                                  "totalInputAmount": {
                                    "description": "Sum of all input amounts",
                                    "type": "string"
                                  },
                                  "totalOutputAmount": {
                                    "description": "Sum of all output amounts",
                                    "type": "string"
                                  }
                                }
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "swapId": {
                            "nullable": true,
                            "anyOf": [
                              {
                                "description": "Associated swap ID, if part of a swap",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "expiredTime": {
                            "nullable": true,
                            "anyOf": [
                              {
                                "format": "date-time",
                                "description": "When the transaction expired",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "Response for status 500",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "operationId": "getV1AddressByAddressTransactions"
      }
    },
    "/v1/address/{address}/tokens": {
      "get": {
        "tags": [
          "Address",
          "Token"
        ],
        "description": "Get all tokens held by an address with their balances and USD values.",
        "parameters": [
          {
            "name": "address",
            "in": "path",
            "required": true,
            "schema": {
              "description": "The Spark address or public key hex",
              "type": "string"
            }
          },
          {
            "name": "network",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "MAINNET",
                "REGTEST"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "tokens",
                    "tokenCount",
                    "totalTokenValueUsd"
                  ],
                  "properties": {
                    "tokens": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "tokenIdentifier",
                          "tokenAddress",
                          "name",
                          "ticker",
                          "decimals",
                          "balance",
                          "valueUsd",
                          "issuerPublicKey",
                          "iconUrl"
                        ],
                        "properties": {
                          "tokenIdentifier": {
                            "type": "string"
                          },
                          "tokenAddress": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "ticker": {
                            "type": "string"
                          },
                          "decimals": {
                            "anyOf": [
                              {
                                "format": "integer",
                                "default": 0,
                                "type": "string"
                              },
                              {
                                "type": "integer"
                              }
                            ]
                          },
                          "balance": {
                            "type": "string"
                          },
                          "valueUsd": {
                            "type": "number"
                          },
                          "issuerPublicKey": {
                            "type": "string"
                          },
                          "iconUrl": {
                            "type": "string"
                          },
                          "maxSupply": {
                            "nullable": true,
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "isFreezable": {
                            "nullable": true,
                            "anyOf": [
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        }
                      }
                    },
                    "tokenCount": {
                      "anyOf": [
                        {
                          "format": "integer",
                          "default": 0,
                          "type": "string"
                        },
                        {
                          "type": "integer"
                        }
                      ]
                    },
                    "totalTokenValueUsd": {
                      "type": "number"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "Response for status 500",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "operationId": "getV1AddressByAddressTokens"
      }
    },
    "/v1/tokens/metadata/batch": {
      "post": {
        "tags": [
          "Token"
        ],
        "description": "Fetch metadata for multiple tokens in a single request. Accepts 1-100 token addresses.",
        "parameters": [
          {
            "name": "network",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "MAINNET",
                "REGTEST"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "token_addresses"
                ],
                "properties": {
                  "token_addresses": {
                    "minItems": 1,
                    "maxItems": 100,
                    "description": "Array of token addresses to look up (1-100).",
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "token_addresses"
                ],
                "properties": {
                  "token_addresses": {
                    "minItems": 1,
                    "maxItems": 100,
                    "description": "Array of token addresses to look up (1-100).",
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "token_addresses"
                ],
                "properties": {
                  "token_addresses": {
                    "minItems": 1,
                    "maxItems": 100,
                    "description": "Array of token addresses to look up (1-100).",
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "metadata",
                    "total_count"
                  ],
                  "properties": {
                    "metadata": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "tokenIdentifier",
                          "tokenAddress",
                          "name",
                          "ticker",
                          "decimals",
                          "issuerPublicKey",
                          "iconUrl",
                          "holderCount",
                          "priceUsd",
                          "totalSupply",
                          "marketCapUsd"
                        ],
                        "properties": {
                          "tokenIdentifier": {
                            "description": "Unique token identifier (hex)",
                            "type": "string"
                          },
                          "tokenAddress": {
                            "description": "Token bech32 address",
                            "type": "string"
                          },
                          "name": {
                            "description": "Token display name",
                            "type": "string"
                          },
                          "ticker": {
                            "description": "Token ticker symbol",
                            "type": "string"
                          },
                          "decimals": {
                            "description": "Token decimal places",
                            "type": "integer"
                          },
                          "issuerPublicKey": {
                            "description": "Public key of the token issuer",
                            "type": "string"
                          },
                          "iconUrl": {
                            "description": "URL to the token icon",
                            "type": "string"
                          },
                          "holderCount": {
                            "description": "Number of unique holders",
                            "type": "integer"
                          },
                          "priceUsd": {
                            "description": "Current token price in USD",
                            "type": "number"
                          },
                          "maxSupply": {
                            "nullable": true,
                            "anyOf": [
                              {
                                "description": "Maximum token supply, if capped",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "isFreezable": {
                            "nullable": true,
                            "anyOf": [
                              {
                                "description": "Whether the token can be frozen by the issuer",
                                "type": "boolean"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "createdAt": {
                            "nullable": true,
                            "anyOf": [
                              {
                                "format": "date-time",
                                "description": "Creation timestamp",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "updatedAt": {
                            "nullable": true,
                            "anyOf": [
                              {
                                "format": "date-time",
                                "description": "Last update timestamp",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "totalSupply": {
                            "description": "Current total supply as a decimal string",
                            "type": "string"
                          },
                          "marketCapUsd": {
                            "description": "Market cap in USD",
                            "type": "number"
                          }
                        }
                      }
                    },
                    "total_count": {
                      "description": "Total number of tokens returned",
                      "type": "integer"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Response for status 500",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "postV1TokensMetadataBatch"
      }
    },
    "/v1/tokens/issuer-lookup": {
      "post": {
        "tags": [
          "Token"
        ],
        "deprecated": true,
        "description": "Look up token issuer information by public keys or token identifiers.",
        "parameters": [
          {
            "name": "network",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "MAINNET",
                "REGTEST"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "pubkeys": {
                    "maxItems": 100,
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "tokens": {
                    "maxItems": 100,
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "pubkeys": {
                    "maxItems": 100,
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "tokens": {
                    "maxItems": 100,
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "pubkeys": {
                    "maxItems": 100,
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "tokens": {
                    "maxItems": 100,
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "results"
                  ],
                  "properties": {
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "pubkey": {
                            "type": "string"
                          },
                          "tokenIdentifier": {
                            "type": "string"
                          },
                          "tokenAddress": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Response for status 500",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "postV1TokensIssuer-lookup"
      }
    },
    "/v1/tokens/{identifier}": {
      "get": {
        "tags": [
          "Token"
        ],
        "description": "Get token details by identifier/address, or search tokens by name/ticker. Returns TokenDetailsResponse for exact matches and TokenMetadata[] for search queries.",
        "parameters": [
          {
            "name": "identifier",
            "in": "path",
            "required": true,
            "schema": {
              "description": "Token identifier (64-char hex), token address (bech32 btk...), or search query string.",
              "type": "string"
            }
          },
          {
            "name": "network",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "MAINNET",
                "REGTEST"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "minimum": 1,
              "description": "Maximum number of tokens to return. Limit is 50.",
              "anyOf": [
                {
                  "format": "numeric",
                  "default": 0,
                  "type": "string"
                },
                {
                  "minimum": 1,
                  "description": "Maximum number of tokens to return. Limit is 50.",
                  "type": "number"
                }
              ]
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Number of results to skip.",
              "anyOf": [
                {
                  "format": "numeric",
                  "default": 0,
                  "type": "string"
                },
                {
                  "description": "Number of results to skip.",
                  "type": "number"
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "required": [
                        "metadata",
                        "totalSupply",
                        "marketCapUsd",
                        "volume24hUsd"
                      ],
                      "properties": {
                        "metadata": {
                          "type": "object",
                          "required": [
                            "tokenIdentifier",
                            "tokenAddress",
                            "name",
                            "ticker",
                            "decimals",
                            "issuerPublicKey",
                            "iconUrl",
                            "holderCount",
                            "priceUsd"
                          ],
                          "properties": {
                            "tokenIdentifier": {
                              "description": "Unique token identifier (hex)",
                              "type": "string"
                            },
                            "tokenAddress": {
                              "description": "Token bech32 address",
                              "type": "string"
                            },
                            "name": {
                              "description": "Token display name",
                              "type": "string"
                            },
                            "ticker": {
                              "description": "Token ticker symbol",
                              "type": "string"
                            },
                            "decimals": {
                              "description": "Token decimal places",
                              "type": "integer"
                            },
                            "issuerPublicKey": {
                              "description": "Public key of the token issuer",
                              "type": "string"
                            },
                            "iconUrl": {
                              "description": "URL to the token icon",
                              "type": "string"
                            },
                            "holderCount": {
                              "description": "Number of unique holders",
                              "type": "integer"
                            },
                            "priceUsd": {
                              "description": "Current token price in USD",
                              "type": "number"
                            },
                            "maxSupply": {
                              "nullable": true,
                              "anyOf": [
                                {
                                  "description": "Maximum token supply, if capped",
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "isFreezable": {
                              "nullable": true,
                              "anyOf": [
                                {
                                  "description": "Whether the token can be frozen by the issuer",
                                  "type": "boolean"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "createdAt": {
                              "nullable": true,
                              "anyOf": [
                                {
                                  "format": "date-time",
                                  "description": "Creation timestamp",
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "updatedAt": {
                              "nullable": true,
                              "anyOf": [
                                {
                                  "format": "date-time",
                                  "description": "Last update timestamp",
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          }
                        },
                        "totalSupply": {
                          "description": "Current total supply as a decimal string",
                          "type": "string"
                        },
                        "marketCapUsd": {
                          "description": "Market cap in USD",
                          "type": "number"
                        },
                        "volume24hUsd": {
                          "description": "24-hour trading volume in USD",
                          "type": "number"
                        }
                      }
                    },
                    {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "tokenIdentifier",
                          "tokenAddress",
                          "name",
                          "ticker",
                          "decimals",
                          "issuerPublicKey",
                          "iconUrl",
                          "holderCount",
                          "priceUsd"
                        ],
                        "properties": {
                          "tokenIdentifier": {
                            "description": "Unique token identifier (hex)",
                            "type": "string"
                          },
                          "tokenAddress": {
                            "description": "Token bech32 address",
                            "type": "string"
                          },
                          "name": {
                            "description": "Token display name",
                            "type": "string"
                          },
                          "ticker": {
                            "description": "Token ticker symbol",
                            "type": "string"
                          },
                          "decimals": {
                            "description": "Token decimal places",
                            "type": "integer"
                          },
                          "issuerPublicKey": {
                            "description": "Public key of the token issuer",
                            "type": "string"
                          },
                          "iconUrl": {
                            "description": "URL to the token icon",
                            "type": "string"
                          },
                          "holderCount": {
                            "description": "Number of unique holders",
                            "type": "integer"
                          },
                          "priceUsd": {
                            "description": "Current token price in USD",
                            "type": "number"
                          },
                          "maxSupply": {
                            "nullable": true,
                            "anyOf": [
                              {
                                "description": "Maximum token supply, if capped",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "isFreezable": {
                            "nullable": true,
                            "anyOf": [
                              {
                                "description": "Whether the token can be frozen by the issuer",
                                "type": "boolean"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "createdAt": {
                            "nullable": true,
                            "anyOf": [
                              {
                                "format": "date-time",
                                "description": "Creation timestamp",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "updatedAt": {
                            "nullable": true,
                            "anyOf": [
                              {
                                "format": "date-time",
                                "description": "Last update timestamp",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Response for status 500",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "getV1TokensByIdentifier"
      }
    },
    "/v1/tokens/{identifier}/holders": {
      "get": {
        "tags": [
          "Token"
        ],
        "description": "Get the top holders of a token sorted by balance descending.",
        "parameters": [
          {
            "name": "identifier",
            "in": "path",
            "required": true,
            "schema": {
              "description": "Token identifier (hex) or token address (bech32).",
              "type": "string"
            }
          },
          {
            "name": "network",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "MAINNET",
                "REGTEST"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "minimum": 1,
              "description": "Maximum number of holders to return. Limit is 75.",
              "anyOf": [
                {
                  "format": "numeric",
                  "default": 0,
                  "type": "string"
                },
                {
                  "minimum": 1,
                  "description": "Maximum number of holders to return. Limit is 75.",
                  "type": "number"
                }
              ]
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Number of results to skip.",
              "anyOf": [
                {
                  "format": "numeric",
                  "default": 0,
                  "type": "string"
                },
                {
                  "description": "Number of results to skip.",
                  "type": "number"
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "meta",
                    "data"
                  ],
                  "properties": {
                    "meta": {
                      "type": "object",
                      "required": [
                        "totalItems",
                        "limit",
                        "offset"
                      ],
                      "properties": {
                        "totalItems": {
                          "description": "Total number of items matching the query",
                          "type": "integer"
                        },
                        "limit": {
                          "description": "Page size used",
                          "type": "integer"
                        },
                        "offset": {
                          "description": "Number of items skipped",
                          "type": "integer"
                        }
                      }
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "address",
                          "pubkey",
                          "balance",
                          "valueUsd",
                          "percentage"
                        ],
                        "properties": {
                          "address": {
                            "description": "Holder's Spark address",
                            "type": "string"
                          },
                          "pubkey": {
                            "description": "Holder's public key hex",
                            "type": "string"
                          },
                          "balance": {
                            "description": "Token balance as a decimal string",
                            "type": "string"
                          },
                          "valueUsd": {
                            "description": "USD value of the balance",
                            "type": "number"
                          },
                          "percentage": {
                            "description": "Percentage of total supply held",
                            "type": "number"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Response for status 500",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "getV1TokensByIdentifierHolders"
      }
    },
    "/v1/tokens/{identifier}/transactions": {
      "get": {
        "tags": [
          "Token",
          "Tx"
        ],
        "description": "Get paginated transactions for a specific token.",
        "parameters": [
          {
            "name": "identifier",
            "in": "path",
            "required": true,
            "schema": {
              "description": "Token identifier (hex) or token address (bech32).",
              "type": "string"
            }
          },
          {
            "name": "network",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "MAINNET",
                "REGTEST"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Maximum number of transactions to return (default: 25, max: 100).",
              "anyOf": [
                {
                  "format": "numeric",
                  "default": 0,
                  "type": "string"
                },
                {
                  "description": "Maximum number of transactions to return (default: 25, max: 100).",
                  "type": "number"
                }
              ]
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Number of results to skip.",
              "anyOf": [
                {
                  "format": "numeric",
                  "default": 0,
                  "type": "string"
                },
                {
                  "description": "Number of results to skip.",
                  "type": "number"
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "meta",
                    "data"
                  ],
                  "properties": {
                    "meta": {
                      "type": "object",
                      "required": [
                        "totalItems",
                        "limit",
                        "offset"
                      ],
                      "properties": {
                        "totalItems": {
                          "description": "Total number of items matching the query",
                          "type": "integer"
                        },
                        "limit": {
                          "description": "Page size used",
                          "type": "integer"
                        },
                        "offset": {
                          "description": "Number of items skipped",
                          "type": "integer"
                        }
                      }
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "type",
                          "status",
                          "amount",
                          "valueUsd"
                        ],
                        "properties": {
                          "id": {
                            "description": "Spark transaction ID",
                            "type": "string"
                          },
                          "type": {
                            "description": "Transaction type",
                            "type": "string"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "confirmed",
                              "pending",
                              "sent",
                              "failed",
                              "expired"
                            ]
                          },
                          "createdAt": {
                            "nullable": true,
                            "anyOf": [
                              {
                                "format": "date-time",
                                "description": "Creation timestamp",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "updatedAt": {
                            "nullable": true,
                            "anyOf": [
                              {
                                "format": "date-time",
                                "description": "Last update timestamp",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "expiredTime": {
                            "nullable": true,
                            "anyOf": [
                              {
                                "format": "date-time",
                                "description": "When the transaction expired",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "from": {
                            "nullable": true,
                            "anyOf": [
                              {
                                "type": "object",
                                "required": [
                                  "type",
                                  "identifier"
                                ],
                                "properties": {
                                  "type": {
                                    "description": "Type of transaction party",
                                    "anyOf": [
                                      {
                                        "const": "spark",
                                        "type": "string"
                                      },
                                      {
                                        "const": "lightning",
                                        "type": "string"
                                      },
                                      {
                                        "const": "bitcoin",
                                        "type": "string"
                                      },
                                      {
                                        "const": "issuer",
                                        "type": "string"
                                      },
                                      {
                                        "const": "burn_address",
                                        "type": "string"
                                      },
                                      {
                                        "const": "unknown",
                                        "type": "string"
                                      }
                                    ]
                                  },
                                  "identifier": {
                                    "description": "Party address or identifier",
                                    "type": "string"
                                  },
                                  "pubkey": {
                                    "nullable": true,
                                    "anyOf": [
                                      {
                                        "description": "Public key hex, if available",
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                }
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "to": {
                            "nullable": true,
                            "anyOf": [
                              {
                                "type": "object",
                                "required": [
                                  "type",
                                  "identifier"
                                ],
                                "properties": {
                                  "type": {
                                    "description": "Type of transaction party",
                                    "anyOf": [
                                      {
                                        "const": "spark",
                                        "type": "string"
                                      },
                                      {
                                        "const": "lightning",
                                        "type": "string"
                                      },
                                      {
                                        "const": "bitcoin",
                                        "type": "string"
                                      },
                                      {
                                        "const": "issuer",
                                        "type": "string"
                                      },
                                      {
                                        "const": "burn_address",
                                        "type": "string"
                                      },
                                      {
                                        "const": "unknown",
                                        "type": "string"
                                      }
                                    ]
                                  },
                                  "identifier": {
                                    "description": "Party address or identifier",
                                    "type": "string"
                                  },
                                  "pubkey": {
                                    "nullable": true,
                                    "anyOf": [
                                      {
                                        "description": "Public key hex, if available",
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                }
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "amount": {
                            "description": "Token amount as a decimal string",
                            "type": "string"
                          },
                          "valueUsd": {
                            "description": "USD value at time of transaction",
                            "type": "number"
                          },
                          "tokenMetadata": {
                            "nullable": true,
                            "anyOf": [
                              {
                                "type": "object",
                                "required": [
                                  "tokenIdentifier",
                                  "tokenAddress",
                                  "name",
                                  "ticker",
                                  "decimals",
                                  "issuerPublicKey"
                                ],
                                "properties": {
                                  "tokenIdentifier": {
                                    "description": "Unique token identifier (hex)",
                                    "type": "string"
                                  },
                                  "tokenAddress": {
                                    "description": "Token bech32 address",
                                    "type": "string"
                                  },
                                  "name": {
                                    "description": "Token display name",
                                    "type": "string"
                                  },
                                  "ticker": {
                                    "description": "Token ticker symbol",
                                    "type": "string"
                                  },
                                  "decimals": {
                                    "description": "Token decimal places",
                                    "type": "integer"
                                  },
                                  "issuerPublicKey": {
                                    "description": "Public key of the token issuer",
                                    "type": "string"
                                  },
                                  "maxSupply": {
                                    "nullable": true,
                                    "anyOf": [
                                      {
                                        "description": "Maximum token supply, if capped",
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "isFreezable": {
                                    "nullable": true,
                                    "anyOf": [
                                      {
                                        "description": "Whether the token can be frozen by the issuer",
                                        "type": "boolean"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                }
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "multiIoDetails": {
                            "nullable": true,
                            "anyOf": [
                              {
                                "type": "object",
                                "required": [
                                  "inputs",
                                  "outputs",
                                  "totalInputAmount",
                                  "totalOutputAmount"
                                ],
                                "properties": {
                                  "inputs": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "required": [
                                        "address",
                                        "pubkey",
                                        "amount"
                                      ],
                                      "properties": {
                                        "address": {
                                          "description": "Spark address",
                                          "type": "string"
                                        },
                                        "pubkey": {
                                          "description": "Public key hex",
                                          "type": "string"
                                        },
                                        "amount": {
                                          "description": "Token amount as a decimal string",
                                          "type": "string"
                                        }
                                      }
                                    }
                                  },
                                  "outputs": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "required": [
                                        "address",
                                        "pubkey",
                                        "amount"
                                      ],
                                      "properties": {
                                        "address": {
                                          "description": "Spark address",
                                          "type": "string"
                                        },
                                        "pubkey": {
                                          "description": "Public key hex",
                                          "type": "string"
                                        },
                                        "amount": {
                                          "description": "Token amount as a decimal string",
                                          "type": "string"
                                        }
                                      }
                                    }
                                  },
                                  "totalInputAmount": {
                                    "description": "Sum of all input amounts",
                                    "type": "string"
                                  },
                                  "totalOutputAmount": {
                                    "description": "Sum of all output amounts",
                                    "type": "string"
                                  }
                                }
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "swapId": {
                            "nullable": true,
                            "anyOf": [
                              {
                                "description": "Associated swap ID",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Response for status 500",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "getV1TokensByIdentifierTransactions"
      }
    },
    "/v2/address/{address}/transactions": {
      "get": {
        "tags": [
          "Address"
        ],
        "description": "Fetch transactions for an address using efficient cursor-based pagination. Much faster than v1 for addresses with many transactions. Includes swap information if the transaction is part of a swap.",
        "parameters": [
          {
            "name": "address",
            "in": "path",
            "required": true,
            "schema": {
              "description": "The Spark address or public key hex",
              "type": "string"
            }
          },
          {
            "name": "network",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "MAINNET",
                "REGTEST"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "minimum": 1,
              "maximum": 100,
              "description": "Number of transactions per page (default: 25, max: 100)",
              "default": 25,
              "type": "number"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Pagination cursor. Use nextCursor from previous response to get next page.",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "nextCursor"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "object",
                            "required": [
                              "id",
                              "type",
                              "direction",
                              "counterparty",
                              "valueUsd",
                              "status"
                            ],
                            "properties": {
                              "id": {
                                "description": "Spark transaction ID",
                                "type": "string"
                              },
                              "type": {
                                "description": "Transaction type",
                                "anyOf": [
                                  {
                                    "const": "spark_transfer",
                                    "type": "string"
                                  },
                                  {
                                    "const": "lightning_payment",
                                    "type": "string"
                                  },
                                  {
                                    "const": "bitcoin_deposit",
                                    "type": "string"
                                  },
                                  {
                                    "const": "bitcoin_withdrawal",
                                    "type": "string"
                                  },
                                  {
                                    "const": "token_transfer",
                                    "type": "string"
                                  },
                                  {
                                    "const": "token_mint",
                                    "type": "string"
                                  },
                                  {
                                    "const": "token_burn",
                                    "type": "string"
                                  },
                                  {
                                    "const": "token_multi_transfer",
                                    "type": "string"
                                  },
                                  {
                                    "const": "unknown_token_op",
                                    "type": "string"
                                  },
                                  {
                                    "const": "unknown_transfer",
                                    "type": "string"
                                  }
                                ]
                              },
                              "direction": {
                                "description": "Direction relative to the queried address",
                                "anyOf": [
                                  {
                                    "const": "incoming",
                                    "type": "string"
                                  },
                                  {
                                    "const": "outgoing",
                                    "type": "string"
                                  },
                                  {
                                    "const": "creation",
                                    "type": "string"
                                  },
                                  {
                                    "const": "destruction",
                                    "type": "string"
                                  },
                                  {
                                    "const": "transfer",
                                    "type": "string"
                                  },
                                  {
                                    "const": "deposit",
                                    "type": "string"
                                  },
                                  {
                                    "const": "withdrawal",
                                    "type": "string"
                                  },
                                  {
                                    "const": "payment",
                                    "type": "string"
                                  },
                                  {
                                    "const": "settlement",
                                    "type": "string"
                                  },
                                  {
                                    "const": "unknown",
                                    "type": "string"
                                  }
                                ]
                              },
                              "counterparty": {
                                "type": "object",
                                "required": [
                                  "type",
                                  "identifier"
                                ],
                                "properties": {
                                  "type": {
                                    "description": "Type of counterparty",
                                    "anyOf": [
                                      {
                                        "const": "spark",
                                        "type": "string"
                                      },
                                      {
                                        "const": "lightning",
                                        "type": "string"
                                      },
                                      {
                                        "const": "bitcoin",
                                        "type": "string"
                                      },
                                      {
                                        "const": "token",
                                        "type": "string"
                                      }
                                    ]
                                  },
                                  "identifier": {
                                    "description": "Counterparty address or identifier",
                                    "type": "string"
                                  },
                                  "tokenMetadata": {
                                    "nullable": true,
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "required": [
                                          "tokenIdentifier",
                                          "tokenAddress",
                                          "name",
                                          "ticker",
                                          "decimals",
                                          "issuerPublicKey"
                                        ],
                                        "properties": {
                                          "tokenIdentifier": {
                                            "description": "Unique token identifier (hex)",
                                            "type": "string"
                                          },
                                          "tokenAddress": {
                                            "description": "Token bech32 address",
                                            "type": "string"
                                          },
                                          "name": {
                                            "description": "Token display name",
                                            "type": "string"
                                          },
                                          "ticker": {
                                            "description": "Token ticker symbol",
                                            "type": "string"
                                          },
                                          "decimals": {
                                            "description": "Token decimal places",
                                            "type": "integer"
                                          },
                                          "issuerPublicKey": {
                                            "description": "Public key of the token issuer",
                                            "type": "string"
                                          },
                                          "maxSupply": {
                                            "nullable": true,
                                            "anyOf": [
                                              {
                                                "description": "Maximum token supply, if capped",
                                                "type": "string"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "isFreezable": {
                                            "nullable": true,
                                            "anyOf": [
                                              {
                                                "description": "Whether the token can be frozen by the issuer",
                                                "type": "boolean"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          }
                                        }
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                }
                              },
                              "amountSats": {
                                "nullable": true,
                                "anyOf": [
                                  {
                                    "description": "Amount in sats, for BTC transactions",
                                    "type": "integer"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "tokenAmount": {
                                "nullable": true,
                                "anyOf": [
                                  {
                                    "description": "Token amount as a decimal string, for token transactions",
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "valueUsd": {
                                "description": "USD value at time of transaction",
                                "type": "number"
                              },
                              "createdAt": {
                                "nullable": true,
                                "anyOf": [
                                  {
                                    "format": "date-time",
                                    "description": "Creation timestamp",
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "updatedAt": {
                                "nullable": true,
                                "anyOf": [
                                  {
                                    "format": "date-time",
                                    "description": "Last update timestamp",
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "status": {
                                "description": "Transaction status",
                                "anyOf": [
                                  {
                                    "const": "confirmed",
                                    "type": "string"
                                  },
                                  {
                                    "const": "pending",
                                    "type": "string"
                                  },
                                  {
                                    "const": "sent",
                                    "type": "string"
                                  },
                                  {
                                    "const": "failed",
                                    "type": "string"
                                  },
                                  {
                                    "const": "expired",
                                    "type": "string"
                                  }
                                ]
                              },
                              "txid": {
                                "nullable": true,
                                "anyOf": [
                                  {
                                    "description": "Bitcoin transaction ID, if applicable",
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "tokenMetadata": {
                                "nullable": true,
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "required": [
                                      "tokenIdentifier",
                                      "tokenAddress",
                                      "name",
                                      "ticker",
                                      "decimals",
                                      "issuerPublicKey"
                                    ],
                                    "properties": {
                                      "tokenIdentifier": {
                                        "description": "Unique token identifier (hex)",
                                        "type": "string"
                                      },
                                      "tokenAddress": {
                                        "description": "Token bech32 address",
                                        "type": "string"
                                      },
                                      "name": {
                                        "description": "Token display name",
                                        "type": "string"
                                      },
                                      "ticker": {
                                        "description": "Token ticker symbol",
                                        "type": "string"
                                      },
                                      "decimals": {
                                        "description": "Token decimal places",
                                        "type": "integer"
                                      },
                                      "issuerPublicKey": {
                                        "description": "Public key of the token issuer",
                                        "type": "string"
                                      },
                                      "maxSupply": {
                                        "nullable": true,
                                        "anyOf": [
                                          {
                                            "description": "Maximum token supply, if capped",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "isFreezable": {
                                        "nullable": true,
                                        "anyOf": [
                                          {
                                            "description": "Whether the token can be frozen by the issuer",
                                            "type": "boolean"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    }
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "multiIoDetails": {
                                "nullable": true,
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "required": [
                                      "inputs",
                                      "outputs",
                                      "totalInputAmount",
                                      "totalOutputAmount"
                                    ],
                                    "properties": {
                                      "inputs": {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "required": [
                                            "address",
                                            "pubkey",
                                            "amount"
                                          ],
                                          "properties": {
                                            "address": {
                                              "description": "Spark address",
                                              "type": "string"
                                            },
                                            "pubkey": {
                                              "description": "Public key hex",
                                              "type": "string"
                                            },
                                            "amount": {
                                              "description": "Token amount as a decimal string",
                                              "type": "string"
                                            }
                                          }
                                        }
                                      },
                                      "outputs": {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "required": [
                                            "address",
                                            "pubkey",
                                            "amount"
                                          ],
                                          "properties": {
                                            "address": {
                                              "description": "Spark address",
                                              "type": "string"
                                            },
                                            "pubkey": {
                                              "description": "Public key hex",
                                              "type": "string"
                                            },
                                            "amount": {
                                              "description": "Token amount as a decimal string",
                                              "type": "string"
                                            }
                                          }
                                        }
                                      },
                                      "totalInputAmount": {
                                        "description": "Sum of all input amounts",
                                        "type": "string"
                                      },
                                      "totalOutputAmount": {
                                        "description": "Sum of all output amounts",
                                        "type": "string"
                                      }
                                    }
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "swapId": {
                                "nullable": true,
                                "anyOf": [
                                  {
                                    "description": "Associated swap ID, if part of a swap",
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "expiredTime": {
                                "nullable": true,
                                "anyOf": [
                                  {
                                    "format": "date-time",
                                    "description": "When the transaction expired",
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            }
                          },
                          {
                            "type": "object",
                            "required": [
                              "id",
                              "type",
                              "poolLpPublicKey",
                              "in",
                              "out",
                              "price",
                              "timestamp",
                              "feePaid"
                            ],
                            "properties": {
                              "id": {
                                "description": "Swap ID",
                                "type": "string"
                              },
                              "type": {
                                "const": "swap",
                                "type": "string"
                              },
                              "poolLpPublicKey": {
                                "description": "LP pool public key",
                                "type": "string"
                              },
                              "in": {
                                "type": "object",
                                "required": [
                                  "amount",
                                  "address"
                                ],
                                "properties": {
                                  "amount": {
                                    "description": "Input amount as a decimal string",
                                    "type": "string"
                                  },
                                  "address": {
                                    "description": "Input address",
                                    "type": "string"
                                  },
                                  "tx": {
                                    "type": "object",
                                    "required": [
                                      "id",
                                      "type",
                                      "direction",
                                      "counterparty",
                                      "valueUsd",
                                      "status"
                                    ],
                                    "properties": {
                                      "id": {
                                        "description": "Spark transaction ID",
                                        "type": "string"
                                      },
                                      "type": {
                                        "description": "Transaction type",
                                        "anyOf": [
                                          {
                                            "const": "spark_transfer",
                                            "type": "string"
                                          },
                                          {
                                            "const": "lightning_payment",
                                            "type": "string"
                                          },
                                          {
                                            "const": "bitcoin_deposit",
                                            "type": "string"
                                          },
                                          {
                                            "const": "bitcoin_withdrawal",
                                            "type": "string"
                                          },
                                          {
                                            "const": "token_transfer",
                                            "type": "string"
                                          },
                                          {
                                            "const": "token_mint",
                                            "type": "string"
                                          },
                                          {
                                            "const": "token_burn",
                                            "type": "string"
                                          },
                                          {
                                            "const": "token_multi_transfer",
                                            "type": "string"
                                          },
                                          {
                                            "const": "unknown_token_op",
                                            "type": "string"
                                          },
                                          {
                                            "const": "unknown_transfer",
                                            "type": "string"
                                          }
                                        ]
                                      },
                                      "direction": {
                                        "description": "Direction relative to the queried address",
                                        "anyOf": [
                                          {
                                            "const": "incoming",
                                            "type": "string"
                                          },
                                          {
                                            "const": "outgoing",
                                            "type": "string"
                                          },
                                          {
                                            "const": "creation",
                                            "type": "string"
                                          },
                                          {
                                            "const": "destruction",
                                            "type": "string"
                                          },
                                          {
                                            "const": "transfer",
                                            "type": "string"
                                          },
                                          {
                                            "const": "deposit",
                                            "type": "string"
                                          },
                                          {
                                            "const": "withdrawal",
                                            "type": "string"
                                          },
                                          {
                                            "const": "payment",
                                            "type": "string"
                                          },
                                          {
                                            "const": "settlement",
                                            "type": "string"
                                          },
                                          {
                                            "const": "unknown",
                                            "type": "string"
                                          }
                                        ]
                                      },
                                      "counterparty": {
                                        "type": "object",
                                        "required": [
                                          "type",
                                          "identifier"
                                        ],
                                        "properties": {
                                          "type": {
                                            "description": "Type of counterparty",
                                            "anyOf": [
                                              {
                                                "const": "spark",
                                                "type": "string"
                                              },
                                              {
                                                "const": "lightning",
                                                "type": "string"
                                              },
                                              {
                                                "const": "bitcoin",
                                                "type": "string"
                                              },
                                              {
                                                "const": "token",
                                                "type": "string"
                                              }
                                            ]
                                          },
                                          "identifier": {
                                            "description": "Counterparty address or identifier",
                                            "type": "string"
                                          },
                                          "tokenMetadata": {
                                            "nullable": true,
                                            "anyOf": [
                                              {
                                                "type": "object",
                                                "required": [
                                                  "tokenIdentifier",
                                                  "tokenAddress",
                                                  "name",
                                                  "ticker",
                                                  "decimals",
                                                  "issuerPublicKey"
                                                ],
                                                "properties": {
                                                  "tokenIdentifier": {
                                                    "description": "Unique token identifier (hex)",
                                                    "type": "string"
                                                  },
                                                  "tokenAddress": {
                                                    "description": "Token bech32 address",
                                                    "type": "string"
                                                  },
                                                  "name": {
                                                    "description": "Token display name",
                                                    "type": "string"
                                                  },
                                                  "ticker": {
                                                    "description": "Token ticker symbol",
                                                    "type": "string"
                                                  },
                                                  "decimals": {
                                                    "description": "Token decimal places",
                                                    "type": "integer"
                                                  },
                                                  "issuerPublicKey": {
                                                    "description": "Public key of the token issuer",
                                                    "type": "string"
                                                  },
                                                  "maxSupply": {
                                                    "nullable": true,
                                                    "anyOf": [
                                                      {
                                                        "description": "Maximum token supply, if capped",
                                                        "type": "string"
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  },
                                                  "isFreezable": {
                                                    "nullable": true,
                                                    "anyOf": [
                                                      {
                                                        "description": "Whether the token can be frozen by the issuer",
                                                        "type": "boolean"
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  }
                                                }
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          }
                                        }
                                      },
                                      "amountSats": {
                                        "nullable": true,
                                        "anyOf": [
                                          {
                                            "description": "Amount in sats, for BTC transactions",
                                            "type": "integer"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "tokenAmount": {
                                        "nullable": true,
                                        "anyOf": [
                                          {
                                            "description": "Token amount as a decimal string, for token transactions",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "valueUsd": {
                                        "description": "USD value at time of transaction",
                                        "type": "number"
                                      },
                                      "createdAt": {
                                        "nullable": true,
                                        "anyOf": [
                                          {
                                            "format": "date-time",
                                            "description": "Creation timestamp",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "updatedAt": {
                                        "nullable": true,
                                        "anyOf": [
                                          {
                                            "format": "date-time",
                                            "description": "Last update timestamp",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "status": {
                                        "description": "Transaction status",
                                        "anyOf": [
                                          {
                                            "const": "confirmed",
                                            "type": "string"
                                          },
                                          {
                                            "const": "pending",
                                            "type": "string"
                                          },
                                          {
                                            "const": "sent",
                                            "type": "string"
                                          },
                                          {
                                            "const": "failed",
                                            "type": "string"
                                          },
                                          {
                                            "const": "expired",
                                            "type": "string"
                                          }
                                        ]
                                      },
                                      "txid": {
                                        "nullable": true,
                                        "anyOf": [
                                          {
                                            "description": "Bitcoin transaction ID, if applicable",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "tokenMetadata": {
                                        "nullable": true,
                                        "anyOf": [
                                          {
                                            "type": "object",
                                            "required": [
                                              "tokenIdentifier",
                                              "tokenAddress",
                                              "name",
                                              "ticker",
                                              "decimals",
                                              "issuerPublicKey"
                                            ],
                                            "properties": {
                                              "tokenIdentifier": {
                                                "description": "Unique token identifier (hex)",
                                                "type": "string"
                                              },
                                              "tokenAddress": {
                                                "description": "Token bech32 address",
                                                "type": "string"
                                              },
                                              "name": {
                                                "description": "Token display name",
                                                "type": "string"
                                              },
                                              "ticker": {
                                                "description": "Token ticker symbol",
                                                "type": "string"
                                              },
                                              "decimals": {
                                                "description": "Token decimal places",
                                                "type": "integer"
                                              },
                                              "issuerPublicKey": {
                                                "description": "Public key of the token issuer",
                                                "type": "string"
                                              },
                                              "maxSupply": {
                                                "nullable": true,
                                                "anyOf": [
                                                  {
                                                    "description": "Maximum token supply, if capped",
                                                    "type": "string"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              },
                                              "isFreezable": {
                                                "nullable": true,
                                                "anyOf": [
                                                  {
                                                    "description": "Whether the token can be frozen by the issuer",
                                                    "type": "boolean"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              }
                                            }
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "multiIoDetails": {
                                        "nullable": true,
                                        "anyOf": [
                                          {
                                            "type": "object",
                                            "required": [
                                              "inputs",
                                              "outputs",
                                              "totalInputAmount",
                                              "totalOutputAmount"
                                            ],
                                            "properties": {
                                              "inputs": {
                                                "type": "array",
                                                "items": {
                                                  "type": "object",
                                                  "required": [
                                                    "address",
                                                    "pubkey",
                                                    "amount"
                                                  ],
                                                  "properties": {
                                                    "address": {
                                                      "description": "Spark address",
                                                      "type": "string"
                                                    },
                                                    "pubkey": {
                                                      "description": "Public key hex",
                                                      "type": "string"
                                                    },
                                                    "amount": {
                                                      "description": "Token amount as a decimal string",
                                                      "type": "string"
                                                    }
                                                  }
                                                }
                                              },
                                              "outputs": {
                                                "type": "array",
                                                "items": {
                                                  "type": "object",
                                                  "required": [
                                                    "address",
                                                    "pubkey",
                                                    "amount"
                                                  ],
                                                  "properties": {
                                                    "address": {
                                                      "description": "Spark address",
                                                      "type": "string"
                                                    },
                                                    "pubkey": {
                                                      "description": "Public key hex",
                                                      "type": "string"
                                                    },
                                                    "amount": {
                                                      "description": "Token amount as a decimal string",
                                                      "type": "string"
                                                    }
                                                  }
                                                }
                                              },
                                              "totalInputAmount": {
                                                "description": "Sum of all input amounts",
                                                "type": "string"
                                              },
                                              "totalOutputAmount": {
                                                "description": "Sum of all output amounts",
                                                "type": "string"
                                              }
                                            }
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "swapId": {
                                        "nullable": true,
                                        "anyOf": [
                                          {
                                            "description": "Associated swap ID, if part of a swap",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "expiredTime": {
                                        "nullable": true,
                                        "anyOf": [
                                          {
                                            "format": "date-time",
                                            "description": "When the transaction expired",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    }
                                  }
                                }
                              },
                              "out": {
                                "type": "object",
                                "required": [
                                  "amount",
                                  "address"
                                ],
                                "properties": {
                                  "amount": {
                                    "description": "Output amount as a decimal string",
                                    "type": "string"
                                  },
                                  "address": {
                                    "description": "Output address",
                                    "type": "string"
                                  },
                                  "tx": {
                                    "type": "object",
                                    "required": [
                                      "id",
                                      "type",
                                      "direction",
                                      "counterparty",
                                      "valueUsd",
                                      "status"
                                    ],
                                    "properties": {
                                      "id": {
                                        "description": "Spark transaction ID",
                                        "type": "string"
                                      },
                                      "type": {
                                        "description": "Transaction type",
                                        "anyOf": [
                                          {
                                            "const": "spark_transfer",
                                            "type": "string"
                                          },
                                          {
                                            "const": "lightning_payment",
                                            "type": "string"
                                          },
                                          {
                                            "const": "bitcoin_deposit",
                                            "type": "string"
                                          },
                                          {
                                            "const": "bitcoin_withdrawal",
                                            "type": "string"
                                          },
                                          {
                                            "const": "token_transfer",
                                            "type": "string"
                                          },
                                          {
                                            "const": "token_mint",
                                            "type": "string"
                                          },
                                          {
                                            "const": "token_burn",
                                            "type": "string"
                                          },
                                          {
                                            "const": "token_multi_transfer",
                                            "type": "string"
                                          },
                                          {
                                            "const": "unknown_token_op",
                                            "type": "string"
                                          },
                                          {
                                            "const": "unknown_transfer",
                                            "type": "string"
                                          }
                                        ]
                                      },
                                      "direction": {
                                        "description": "Direction relative to the queried address",
                                        "anyOf": [
                                          {
                                            "const": "incoming",
                                            "type": "string"
                                          },
                                          {
                                            "const": "outgoing",
                                            "type": "string"
                                          },
                                          {
                                            "const": "creation",
                                            "type": "string"
                                          },
                                          {
                                            "const": "destruction",
                                            "type": "string"
                                          },
                                          {
                                            "const": "transfer",
                                            "type": "string"
                                          },
                                          {
                                            "const": "deposit",
                                            "type": "string"
                                          },
                                          {
                                            "const": "withdrawal",
                                            "type": "string"
                                          },
                                          {
                                            "const": "payment",
                                            "type": "string"
                                          },
                                          {
                                            "const": "settlement",
                                            "type": "string"
                                          },
                                          {
                                            "const": "unknown",
                                            "type": "string"
                                          }
                                        ]
                                      },
                                      "counterparty": {
                                        "type": "object",
                                        "required": [
                                          "type",
                                          "identifier"
                                        ],
                                        "properties": {
                                          "type": {
                                            "description": "Type of counterparty",
                                            "anyOf": [
                                              {
                                                "const": "spark",
                                                "type": "string"
                                              },
                                              {
                                                "const": "lightning",
                                                "type": "string"
                                              },
                                              {
                                                "const": "bitcoin",
                                                "type": "string"
                                              },
                                              {
                                                "const": "token",
                                                "type": "string"
                                              }
                                            ]
                                          },
                                          "identifier": {
                                            "description": "Counterparty address or identifier",
                                            "type": "string"
                                          },
                                          "tokenMetadata": {
                                            "nullable": true,
                                            "anyOf": [
                                              {
                                                "type": "object",
                                                "required": [
                                                  "tokenIdentifier",
                                                  "tokenAddress",
                                                  "name",
                                                  "ticker",
                                                  "decimals",
                                                  "issuerPublicKey"
                                                ],
                                                "properties": {
                                                  "tokenIdentifier": {
                                                    "description": "Unique token identifier (hex)",
                                                    "type": "string"
                                                  },
                                                  "tokenAddress": {
                                                    "description": "Token bech32 address",
                                                    "type": "string"
                                                  },
                                                  "name": {
                                                    "description": "Token display name",
                                                    "type": "string"
                                                  },
                                                  "ticker": {
                                                    "description": "Token ticker symbol",
                                                    "type": "string"
                                                  },
                                                  "decimals": {
                                                    "description": "Token decimal places",
                                                    "type": "integer"
                                                  },
                                                  "issuerPublicKey": {
                                                    "description": "Public key of the token issuer",
                                                    "type": "string"
                                                  },
                                                  "maxSupply": {
                                                    "nullable": true,
                                                    "anyOf": [
                                                      {
                                                        "description": "Maximum token supply, if capped",
                                                        "type": "string"
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  },
                                                  "isFreezable": {
                                                    "nullable": true,
                                                    "anyOf": [
                                                      {
                                                        "description": "Whether the token can be frozen by the issuer",
                                                        "type": "boolean"
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  }
                                                }
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          }
                                        }
                                      },
                                      "amountSats": {
                                        "nullable": true,
                                        "anyOf": [
                                          {
                                            "description": "Amount in sats, for BTC transactions",
                                            "type": "integer"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "tokenAmount": {
                                        "nullable": true,
                                        "anyOf": [
                                          {
                                            "description": "Token amount as a decimal string, for token transactions",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "valueUsd": {
                                        "description": "USD value at time of transaction",
                                        "type": "number"
                                      },
                                      "createdAt": {
                                        "nullable": true,
                                        "anyOf": [
                                          {
                                            "format": "date-time",
                                            "description": "Creation timestamp",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "updatedAt": {
                                        "nullable": true,
                                        "anyOf": [
                                          {
                                            "format": "date-time",
                                            "description": "Last update timestamp",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "status": {
                                        "description": "Transaction status",
                                        "anyOf": [
                                          {
                                            "const": "confirmed",
                                            "type": "string"
                                          },
                                          {
                                            "const": "pending",
                                            "type": "string"
                                          },
                                          {
                                            "const": "sent",
                                            "type": "string"
                                          },
                                          {
                                            "const": "failed",
                                            "type": "string"
                                          },
                                          {
                                            "const": "expired",
                                            "type": "string"
                                          }
                                        ]
                                      },
                                      "txid": {
                                        "nullable": true,
                                        "anyOf": [
                                          {
                                            "description": "Bitcoin transaction ID, if applicable",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "tokenMetadata": {
                                        "nullable": true,
                                        "anyOf": [
                                          {
                                            "type": "object",
                                            "required": [
                                              "tokenIdentifier",
                                              "tokenAddress",
                                              "name",
                                              "ticker",
                                              "decimals",
                                              "issuerPublicKey"
                                            ],
                                            "properties": {
                                              "tokenIdentifier": {
                                                "description": "Unique token identifier (hex)",
                                                "type": "string"
                                              },
                                              "tokenAddress": {
                                                "description": "Token bech32 address",
                                                "type": "string"
                                              },
                                              "name": {
                                                "description": "Token display name",
                                                "type": "string"
                                              },
                                              "ticker": {
                                                "description": "Token ticker symbol",
                                                "type": "string"
                                              },
                                              "decimals": {
                                                "description": "Token decimal places",
                                                "type": "integer"
                                              },
                                              "issuerPublicKey": {
                                                "description": "Public key of the token issuer",
                                                "type": "string"
                                              },
                                              "maxSupply": {
                                                "nullable": true,
                                                "anyOf": [
                                                  {
                                                    "description": "Maximum token supply, if capped",
                                                    "type": "string"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              },
                                              "isFreezable": {
                                                "nullable": true,
                                                "anyOf": [
                                                  {
                                                    "description": "Whether the token can be frozen by the issuer",
                                                    "type": "boolean"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              }
                                            }
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "multiIoDetails": {
                                        "nullable": true,
                                        "anyOf": [
                                          {
                                            "type": "object",
                                            "required": [
                                              "inputs",
                                              "outputs",
                                              "totalInputAmount",
                                              "totalOutputAmount"
                                            ],
                                            "properties": {
                                              "inputs": {
                                                "type": "array",
                                                "items": {
                                                  "type": "object",
                                                  "required": [
                                                    "address",
                                                    "pubkey",
                                                    "amount"
                                                  ],
                                                  "properties": {
                                                    "address": {
                                                      "description": "Spark address",
                                                      "type": "string"
                                                    },
                                                    "pubkey": {
                                                      "description": "Public key hex",
                                                      "type": "string"
                                                    },
                                                    "amount": {
                                                      "description": "Token amount as a decimal string",
                                                      "type": "string"
                                                    }
                                                  }
                                                }
                                              },
                                              "outputs": {
                                                "type": "array",
                                                "items": {
                                                  "type": "object",
                                                  "required": [
                                                    "address",
                                                    "pubkey",
                                                    "amount"
                                                  ],
                                                  "properties": {
                                                    "address": {
                                                      "description": "Spark address",
                                                      "type": "string"
                                                    },
                                                    "pubkey": {
                                                      "description": "Public key hex",
                                                      "type": "string"
                                                    },
                                                    "amount": {
                                                      "description": "Token amount as a decimal string",
                                                      "type": "string"
                                                    }
                                                  }
                                                }
                                              },
                                              "totalInputAmount": {
                                                "description": "Sum of all input amounts",
                                                "type": "string"
                                              },
                                              "totalOutputAmount": {
                                                "description": "Sum of all output amounts",
                                                "type": "string"
                                              }
                                            }
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "swapId": {
                                        "nullable": true,
                                        "anyOf": [
                                          {
                                            "description": "Associated swap ID, if part of a swap",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "expiredTime": {
                                        "nullable": true,
                                        "anyOf": [
                                          {
                                            "format": "date-time",
                                            "description": "When the transaction expired",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    }
                                  }
                                }
                              },
                              "price": {
                                "description": "Swap price",
                                "type": "string"
                              },
                              "timestamp": {
                                "format": "date-time",
                                "description": "Swap timestamp",
                                "type": "string"
                              },
                              "feePaid": {
                                "description": "Fee paid as a decimal string",
                                "type": "string"
                              }
                            }
                          }
                        ]
                      }
                    },
                    "nextCursor": {
                      "description": "Cursor for the next page, or null if no more pages",
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "Response for status 500",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "operationId": "getV2AddressByAddressTransactions"
      }
    },
    "/v2/tokens/list": {
      "get": {
        "tags": [
          "Token"
        ],
        "description": "List tokens with cursor-based pagination, sorting, and filtering. Supports filtering by icon availability, holder address, and minimum holder count.",
        "parameters": [
          {
            "name": "network",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "MAINNET",
                "REGTEST"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "minimum": 1,
              "maximum": 50,
              "description": "The number of tokens to return per page. If not provided, the default limit of 25 will be used.",
              "examples": [
                10,
                50
              ],
              "default": 25,
              "type": "number"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "description": "The cursor to paginate the tokens by. If not provided, the first page of tokens will be returned.",
              "type": "string"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "holders",
                "updated_at",
                "created_at",
                "supply"
              ]
            }
          },
          {
            "name": "sortDirection",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ]
            }
          },
          {
            "name": "hasIcon",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Whether to filter for tokens with icons. If not provided, all tokens will be returned.",
              "examples": [
                true,
                false
              ],
              "type": "boolean"
            }
          },
          {
            "name": "holderAddress",
            "in": "query",
            "required": false,
            "schema": {
              "description": "The public key hex of the holder to filter for. If not provided, all tokens will be returned.",
              "type": "string"
            }
          },
          {
            "name": "minHolders",
            "in": "query",
            "required": false,
            "schema": {
              "minimum": 0,
              "description": "The minimum number of holders to filter for. If not provided, all tokens will be returned.",
              "examples": [
                5,
                100,
                2500
              ],
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "tokens",
                    "totalTokens",
                    "nextCursor"
                  ],
                  "properties": {
                    "tokens": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "tokenIdentifier",
                          "tokenAddress",
                          "issuerPublicKey",
                          "name",
                          "ticker",
                          "decimals",
                          "iconUrl",
                          "holderCount",
                          "totalSupply"
                        ],
                        "properties": {
                          "tokenIdentifier": {
                            "description": "Unique token identifier (hex)",
                            "type": "string"
                          },
                          "tokenAddress": {
                            "description": "Token bech32 address",
                            "type": "string"
                          },
                          "issuerPublicKey": {
                            "description": "Public key of the token issuer",
                            "type": "string"
                          },
                          "name": {
                            "description": "Token display name",
                            "type": "string"
                          },
                          "ticker": {
                            "description": "Token ticker symbol",
                            "type": "string"
                          },
                          "decimals": {
                            "description": "Token decimal places",
                            "type": "integer"
                          },
                          "iconUrl": {
                            "description": "URL to the token icon",
                            "type": "string"
                          },
                          "holderCount": {
                            "description": "Number of unique holders",
                            "type": "integer"
                          },
                          "totalSupply": {
                            "description": "Current total supply as a decimal string",
                            "type": "string"
                          },
                          "maxSupply": {
                            "nullable": true,
                            "anyOf": [
                              {
                                "description": "Maximum token supply, if capped",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "isFreezable": {
                            "nullable": true,
                            "anyOf": [
                              {
                                "description": "Whether the token can be frozen by the issuer",
                                "type": "boolean"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "createdAt": {
                            "nullable": true,
                            "anyOf": [
                              {
                                "format": "date-time",
                                "description": "Creation timestamp",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "updatedAt": {
                            "nullable": true,
                            "anyOf": [
                              {
                                "format": "date-time",
                                "description": "Last update timestamp",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        }
                      }
                    },
                    "totalTokens": {
                      "description": "Total number of tokens matching the query",
                      "type": "integer"
                    },
                    "nextCursor": {
                      "description": "Cursor for the next page, or null if no more pages",
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "Response for status 500",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "operationId": "getV2TokensList"
      }
    },
    "/v2/historical/sats/balances/{address}": {
      "get": {
        "description": "Fetches the hourly sats balances for an address. Currently available on the free plan but will be limited to enterprise users in the future.",
        "tags": [
          "Historical",
          "Sats"
        ],
        "parameters": [
          {
            "name": "address",
            "in": "path",
            "required": true,
            "schema": {
              "description": "The address to fetch the sats balances for.",
              "type": "string"
            }
          },
          {
            "name": "network",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "MAINNET",
                "REGTEST"
              ]
            }
          },
          {
            "name": "direction",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "forward",
                "backward"
              ]
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "description": "The start date to fetch the data from.",
              "anyOf": [
                {
                  "description": "The start date to fetch the data from.",
                  "type": "Date"
                },
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "format": "date",
                  "type": "string"
                },
                {
                  "type": "number"
                }
              ]
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "description": "The end date to fetch the data to.",
              "anyOf": [
                {
                  "description": "The end date to fetch the data to.",
                  "type": "Date"
                },
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "format": "date",
                  "type": "string"
                },
                {
                  "type": "number"
                }
              ]
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Pagination cursor from previous response.",
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "minimum": 1,
              "maximum": 48,
              "description": "Number of results per page (default: 12, max: 48).",
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "nextCursor"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "t",
                          "b"
                        ],
                        "properties": {
                          "t": {
                            "minimum": 0,
                            "description": "Unix timestamp in seconds",
                            "type": "integer"
                          },
                          "b": {
                            "description": "Balance as a decimal string",
                            "type": "string"
                          }
                        }
                      }
                    },
                    "nextCursor": {
                      "description": "Cursor for the next page, or null if no more pages",
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "Response for status 500",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "operationId": "getV2HistoricalSatsBalancesByAddress"
      }
    },
    "/v2/historical/tokens/balances/{address}/{tokenIdentifier}": {
      "get": {
        "description": "Fetches the hourly tokens balances for an address and token identifier. Currently available on the free plan but will be limited to enterprise users in the future.",
        "tags": [
          "Historical",
          "Token"
        ],
        "parameters": [
          {
            "name": "address",
            "in": "path",
            "required": true,
            "schema": {
              "description": "The address to fetch the tokens balances for.",
              "type": "string"
            }
          },
          {
            "name": "tokenIdentifier",
            "in": "path",
            "required": true,
            "schema": {
              "description": "The token identifier to fetch the tokens balances for.",
              "type": "string"
            }
          },
          {
            "name": "network",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "MAINNET",
                "REGTEST"
              ]
            }
          },
          {
            "name": "direction",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "forward",
                "backward"
              ]
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "Date"
                },
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "format": "date",
                  "type": "string"
                },
                {
                  "type": "number"
                }
              ]
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "Date"
                },
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "format": "date",
                  "type": "string"
                },
                {
                  "type": "number"
                }
              ]
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Pagination cursor from previous response.",
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "minimum": 1,
              "maximum": 48,
              "description": "Number of results per page (default: 12, max: 48).",
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "nextCursor"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "t",
                          "b"
                        ],
                        "properties": {
                          "t": {
                            "minimum": 0,
                            "description": "Unix timestamp in seconds",
                            "type": "integer"
                          },
                          "b": {
                            "description": "Balance as a decimal string",
                            "type": "string"
                          }
                        }
                      }
                    },
                    "nextCursor": {
                      "description": "Cursor for the next page, or null if no more pages",
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "Response for status 500",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "operationId": "getV2HistoricalTokensBalancesByAddressByTokenIdentifier"
      }
    },
    "/v2/historical/net-worth/{address}": {
      "get": {
        "description": "Fetches the net worth snapshots (total USD balance) for an address. Snapshots are taken every 15 minutes.",
        "tags": [
          "Historical",
          "Net Worth"
        ],
        "parameters": [
          {
            "name": "address",
            "in": "path",
            "required": true,
            "schema": {
              "description": "The address to fetch the net worth for.",
              "type": "string"
            }
          },
          {
            "name": "network",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "MAINNET",
                "REGTEST"
              ]
            }
          },
          {
            "name": "direction",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "forward",
                "backward"
              ]
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "description": "The start date to fetch the data from.",
              "anyOf": [
                {
                  "description": "The start date to fetch the data from.",
                  "type": "Date"
                },
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "format": "date",
                  "type": "string"
                },
                {
                  "type": "number"
                }
              ]
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "description": "The end date to fetch the data to.",
              "anyOf": [
                {
                  "description": "The end date to fetch the data to.",
                  "type": "Date"
                },
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "format": "date",
                  "type": "string"
                },
                {
                  "type": "number"
                }
              ]
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Pagination cursor from previous response.",
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "minimum": 1,
              "maximum": 192,
              "description": "Number of results per page (default: 48, max: 192).",
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "nextCursor"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "t",
                          "nw"
                        ],
                        "properties": {
                          "t": {
                            "minimum": 0,
                            "type": "integer"
                          },
                          "nw": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "nextCursor": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "Response for status 500",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "operationId": "getV2HistoricalNet-worthByAddress"
      }
    },
    "/v2/tx/latest": {
      "get": {
        "tags": [
          "Tx"
        ],
        "description": "Get the latest network transactions. Includes expiredTime field for expired transactions.",
        "parameters": [
          {
            "name": "network",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "MAINNET",
                "REGTEST"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "minimum": 1,
              "description": "Maximum number of transactions to return (default: 10, max: 350).",
              "anyOf": [
                {
                  "format": "numeric",
                  "default": 0,
                  "type": "string"
                },
                {
                  "minimum": 1,
                  "description": "Maximum number of transactions to return (default: 10, max: 350).",
                  "type": "number"
                }
              ]
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "minimum": 0,
              "description": "Number of transactions to skip.",
              "anyOf": [
                {
                  "format": "numeric",
                  "default": 0,
                  "type": "string"
                },
                {
                  "minimum": 0,
                  "description": "Number of transactions to skip.",
                  "type": "number"
                }
              ]
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "created_at",
                "updated_at"
              ]
            }
          },
          {
            "name": "order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ]
            }
          },
          {
            "name": "from_timestamp",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Filter transactions created after this ISO 8601 timestamp.",
              "type": "string"
            }
          },
          {
            "name": "to_timestamp",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Filter transactions created before this ISO 8601 timestamp.",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "status",
                      "valueUsd"
                    ],
                    "properties": {
                      "id": {
                        "description": "Spark transaction ID",
                        "type": "string"
                      },
                      "type": {
                        "type": "string",
                        "enum": [
                          "bitcoin_deposit",
                          "bitcoin_withdrawal",
                          "spark_transfer",
                          "lightning_payment",
                          "token_mint",
                          "token_transfer",
                          "token_burn",
                          "token_multi_transfer",
                          "unknown_token_op",
                          "unknown_transfer"
                        ]
                      },
                      "status": {
                        "type": "string",
                        "enum": [
                          "confirmed",
                          "pending",
                          "sent",
                          "failed",
                          "expired"
                        ]
                      },
                      "amountSats": {
                        "nullable": true,
                        "anyOf": [
                          {
                            "description": "Amount in sats",
                            "type": "integer"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "tokenAmount": {
                        "nullable": true,
                        "anyOf": [
                          {
                            "description": "Token amount as a decimal string",
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "tokenMetadata": {
                        "nullable": true,
                        "anyOf": [
                          {
                            "type": "object",
                            "required": [
                              "tokenIdentifier",
                              "tokenAddress",
                              "name",
                              "ticker",
                              "decimals",
                              "issuerPublicKey"
                            ],
                            "properties": {
                              "tokenIdentifier": {
                                "description": "Unique token identifier (hex)",
                                "type": "string"
                              },
                              "tokenAddress": {
                                "description": "Token bech32 address",
                                "type": "string"
                              },
                              "name": {
                                "description": "Token display name",
                                "type": "string"
                              },
                              "ticker": {
                                "description": "Token ticker symbol",
                                "type": "string"
                              },
                              "decimals": {
                                "description": "Token decimal places",
                                "type": "integer"
                              },
                              "issuerPublicKey": {
                                "description": "Public key of the token issuer",
                                "type": "string"
                              },
                              "maxSupply": {
                                "nullable": true,
                                "anyOf": [
                                  {
                                    "description": "Maximum token supply, if capped",
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "isFreezable": {
                                "nullable": true,
                                "anyOf": [
                                  {
                                    "description": "Whether the token can be frozen by the issuer",
                                    "type": "boolean"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            }
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "multiIoDetails": {
                        "nullable": true,
                        "anyOf": [
                          {
                            "type": "object",
                            "required": [
                              "inputs",
                              "outputs",
                              "totalInputAmount",
                              "totalOutputAmount"
                            ],
                            "properties": {
                              "inputs": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "required": [
                                    "address",
                                    "pubkey",
                                    "amount"
                                  ],
                                  "properties": {
                                    "address": {
                                      "description": "Spark address",
                                      "type": "string"
                                    },
                                    "pubkey": {
                                      "description": "Public key hex",
                                      "type": "string"
                                    },
                                    "amount": {
                                      "description": "Token amount as a decimal string",
                                      "type": "string"
                                    }
                                  }
                                }
                              },
                              "outputs": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "required": [
                                    "address",
                                    "pubkey",
                                    "amount"
                                  ],
                                  "properties": {
                                    "address": {
                                      "description": "Spark address",
                                      "type": "string"
                                    },
                                    "pubkey": {
                                      "description": "Public key hex",
                                      "type": "string"
                                    },
                                    "amount": {
                                      "description": "Token amount as a decimal string",
                                      "type": "string"
                                    }
                                  }
                                }
                              },
                              "totalInputAmount": {
                                "description": "Sum of all input amounts",
                                "type": "string"
                              },
                              "totalOutputAmount": {
                                "description": "Sum of all output amounts",
                                "type": "string"
                              }
                            }
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "from": {
                        "nullable": true,
                        "anyOf": [
                          {
                            "type": "object",
                            "required": [
                              "type",
                              "identifier"
                            ],
                            "properties": {
                              "type": {
                                "description": "Type of transaction party",
                                "anyOf": [
                                  {
                                    "const": "spark",
                                    "type": "string"
                                  },
                                  {
                                    "const": "lightning",
                                    "type": "string"
                                  },
                                  {
                                    "const": "bitcoin",
                                    "type": "string"
                                  },
                                  {
                                    "const": "issuer",
                                    "type": "string"
                                  },
                                  {
                                    "const": "burn_address",
                                    "type": "string"
                                  },
                                  {
                                    "const": "unknown",
                                    "type": "string"
                                  }
                                ]
                              },
                              "identifier": {
                                "description": "Party address or identifier",
                                "type": "string"
                              },
                              "pubkey": {
                                "nullable": true,
                                "anyOf": [
                                  {
                                    "description": "Public key hex, if available",
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            }
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "to": {
                        "nullable": true,
                        "anyOf": [
                          {
                            "type": "object",
                            "required": [
                              "type",
                              "identifier"
                            ],
                            "properties": {
                              "type": {
                                "description": "Type of transaction party",
                                "anyOf": [
                                  {
                                    "const": "spark",
                                    "type": "string"
                                  },
                                  {
                                    "const": "lightning",
                                    "type": "string"
                                  },
                                  {
                                    "const": "bitcoin",
                                    "type": "string"
                                  },
                                  {
                                    "const": "issuer",
                                    "type": "string"
                                  },
                                  {
                                    "const": "burn_address",
                                    "type": "string"
                                  },
                                  {
                                    "const": "unknown",
                                    "type": "string"
                                  }
                                ]
                              },
                              "identifier": {
                                "description": "Party address or identifier",
                                "type": "string"
                              },
                              "pubkey": {
                                "nullable": true,
                                "anyOf": [
                                  {
                                    "description": "Public key hex, if available",
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            }
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "bitcoinTxid": {
                        "nullable": true,
                        "anyOf": [
                          {
                            "description": "Bitcoin transaction ID",
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "valueUsd": {
                        "description": "USD value",
                        "type": "number"
                      },
                      "createdAt": {
                        "nullable": true,
                        "anyOf": [
                          {
                            "format": "date-time",
                            "description": "Creation timestamp",
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "updatedAt": {
                        "nullable": true,
                        "anyOf": [
                          {
                            "format": "date-time",
                            "description": "Last update timestamp",
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "expiredTime": {
                        "nullable": true,
                        "anyOf": [
                          {
                            "format": "date-time",
                            "description": "When the transaction expired",
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "swapId": {
                        "nullable": true,
                        "anyOf": [
                          {
                            "description": "Associated swap ID",
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "Response for status 500",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "operationId": "getV2TxLatest"
      }
    },
    "/v2/tx/{txid}": {
      "get": {
        "tags": [
          "Tx"
        ],
        "description": "Get a transaction by its ID. Returns a sats transaction or token transaction depending on the type.",
        "parameters": [
          {
            "name": "txid",
            "in": "path",
            "required": true,
            "schema": {
              "description": "The Spark transaction ID.",
              "type": "string"
            }
          },
          {
            "name": "network",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "MAINNET",
                "REGTEST"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "required": [
                        "id",
                        "type",
                        "status",
                        "amountSats",
                        "valueUsd"
                      ],
                      "properties": {
                        "id": {
                          "description": "Spark transaction ID",
                          "type": "string"
                        },
                        "type": {
                          "description": "Transaction type",
                          "type": "string"
                        },
                        "status": {
                          "description": "Transaction status",
                          "anyOf": [
                            {
                              "const": "confirmed",
                              "type": "string"
                            },
                            {
                              "const": "pending",
                              "type": "string"
                            },
                            {
                              "const": "sent",
                              "type": "string"
                            },
                            {
                              "const": "failed",
                              "type": "string"
                            },
                            {
                              "const": "expired",
                              "type": "string"
                            }
                          ]
                        },
                        "createdAt": {
                          "nullable": true,
                          "anyOf": [
                            {
                              "format": "date-time",
                              "description": "Creation timestamp",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "updatedAt": {
                          "nullable": true,
                          "anyOf": [
                            {
                              "format": "date-time",
                              "description": "Last update timestamp",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "expiredTime": {
                          "nullable": true,
                          "anyOf": [
                            {
                              "format": "date-time",
                              "description": "When the transaction expired",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "from": {
                          "nullable": true,
                          "anyOf": [
                            {
                              "type": "object",
                              "required": [
                                "type",
                                "identifier"
                              ],
                              "properties": {
                                "type": {
                                  "description": "Type of transaction party",
                                  "anyOf": [
                                    {
                                      "const": "spark",
                                      "type": "string"
                                    },
                                    {
                                      "const": "lightning",
                                      "type": "string"
                                    },
                                    {
                                      "const": "bitcoin",
                                      "type": "string"
                                    },
                                    {
                                      "const": "issuer",
                                      "type": "string"
                                    },
                                    {
                                      "const": "burn_address",
                                      "type": "string"
                                    },
                                    {
                                      "const": "unknown",
                                      "type": "string"
                                    }
                                  ]
                                },
                                "identifier": {
                                  "description": "Party address or identifier",
                                  "type": "string"
                                },
                                "pubkey": {
                                  "nullable": true,
                                  "anyOf": [
                                    {
                                      "description": "Public key hex, if available",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              }
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "to": {
                          "nullable": true,
                          "anyOf": [
                            {
                              "type": "object",
                              "required": [
                                "type",
                                "identifier"
                              ],
                              "properties": {
                                "type": {
                                  "description": "Type of transaction party",
                                  "anyOf": [
                                    {
                                      "const": "spark",
                                      "type": "string"
                                    },
                                    {
                                      "const": "lightning",
                                      "type": "string"
                                    },
                                    {
                                      "const": "bitcoin",
                                      "type": "string"
                                    },
                                    {
                                      "const": "issuer",
                                      "type": "string"
                                    },
                                    {
                                      "const": "burn_address",
                                      "type": "string"
                                    },
                                    {
                                      "const": "unknown",
                                      "type": "string"
                                    }
                                  ]
                                },
                                "identifier": {
                                  "description": "Party address or identifier",
                                  "type": "string"
                                },
                                "pubkey": {
                                  "nullable": true,
                                  "anyOf": [
                                    {
                                      "description": "Public key hex, if available",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              }
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "amountSats": {
                          "description": "Amount in sats",
                          "type": "integer"
                        },
                        "valueUsd": {
                          "description": "USD value at time of transaction",
                          "type": "number"
                        },
                        "timeTakenSeconds": {
                          "nullable": true,
                          "anyOf": [
                            {
                              "description": "Time taken to complete in seconds",
                              "type": "number"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "txid": {
                          "nullable": true,
                          "anyOf": [
                            {
                              "description": "Bitcoin transaction ID, if applicable",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "bitcoinTxData": {
                          "nullable": true,
                          "anyOf": [
                            {
                              "type": "object",
                              "required": [
                                "txid",
                                "vin",
                                "vout",
                                "status",
                                "fee"
                              ],
                              "properties": {
                                "txid": {
                                  "description": "Bitcoin transaction ID",
                                  "type": "string"
                                },
                                "vin": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "prevout": {},
                                      "witness": {
                                        "type": "array",
                                        "items": {
                                          "type": "string"
                                        }
                                      },
                                      "value": {
                                        "description": "Input value in sats",
                                        "type": "integer"
                                      }
                                    }
                                  }
                                },
                                "vout": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "required": [
                                      "value"
                                    ],
                                    "properties": {
                                      "scriptpubkey_address": {
                                        "nullable": true,
                                        "anyOf": [
                                          {
                                            "description": "Output address",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "value": {
                                        "description": "Output value in sats",
                                        "type": "integer"
                                      }
                                    }
                                  }
                                },
                                "status": {
                                  "type": "object",
                                  "required": [
                                    "confirmed"
                                  ],
                                  "properties": {
                                    "confirmed": {
                                      "description": "Whether the transaction is confirmed on-chain",
                                      "type": "boolean"
                                    },
                                    "block_height": {
                                      "nullable": true,
                                      "anyOf": [
                                        {
                                          "description": "Block height if confirmed",
                                          "type": "integer"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "block_time": {
                                      "nullable": true,
                                      "anyOf": [
                                        {
                                          "description": "Block timestamp if confirmed (unix seconds)",
                                          "type": "integer"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  }
                                },
                                "fee": {
                                  "description": "Transaction fee in sats",
                                  "type": "integer"
                                }
                              }
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "swapId": {
                          "nullable": true,
                          "anyOf": [
                            {
                              "description": "Associated swap ID",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      }
                    },
                    {
                      "type": "object",
                      "required": [
                        "id",
                        "type",
                        "status",
                        "amount",
                        "valueUsd"
                      ],
                      "properties": {
                        "id": {
                          "description": "Spark transaction ID",
                          "type": "string"
                        },
                        "type": {
                          "description": "Transaction type",
                          "type": "string"
                        },
                        "status": {
                          "description": "Transaction status",
                          "anyOf": [
                            {
                              "const": "confirmed",
                              "type": "string"
                            },
                            {
                              "const": "pending",
                              "type": "string"
                            },
                            {
                              "const": "sent",
                              "type": "string"
                            },
                            {
                              "const": "failed",
                              "type": "string"
                            },
                            {
                              "const": "expired",
                              "type": "string"
                            }
                          ]
                        },
                        "createdAt": {
                          "nullable": true,
                          "anyOf": [
                            {
                              "format": "date-time",
                              "description": "Creation timestamp",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "updatedAt": {
                          "nullable": true,
                          "anyOf": [
                            {
                              "format": "date-time",
                              "description": "Last update timestamp",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "expiredTime": {
                          "nullable": true,
                          "anyOf": [
                            {
                              "format": "date-time",
                              "description": "When the transaction expired",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "from": {
                          "nullable": true,
                          "anyOf": [
                            {
                              "type": "object",
                              "required": [
                                "type",
                                "identifier"
                              ],
                              "properties": {
                                "type": {
                                  "description": "Type of transaction party",
                                  "anyOf": [
                                    {
                                      "const": "spark",
                                      "type": "string"
                                    },
                                    {
                                      "const": "lightning",
                                      "type": "string"
                                    },
                                    {
                                      "const": "bitcoin",
                                      "type": "string"
                                    },
                                    {
                                      "const": "issuer",
                                      "type": "string"
                                    },
                                    {
                                      "const": "burn_address",
                                      "type": "string"
                                    },
                                    {
                                      "const": "unknown",
                                      "type": "string"
                                    }
                                  ]
                                },
                                "identifier": {
                                  "description": "Party address or identifier",
                                  "type": "string"
                                },
                                "pubkey": {
                                  "nullable": true,
                                  "anyOf": [
                                    {
                                      "description": "Public key hex, if available",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              }
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "to": {
                          "nullable": true,
                          "anyOf": [
                            {
                              "type": "object",
                              "required": [
                                "type",
                                "identifier"
                              ],
                              "properties": {
                                "type": {
                                  "description": "Type of transaction party",
                                  "anyOf": [
                                    {
                                      "const": "spark",
                                      "type": "string"
                                    },
                                    {
                                      "const": "lightning",
                                      "type": "string"
                                    },
                                    {
                                      "const": "bitcoin",
                                      "type": "string"
                                    },
                                    {
                                      "const": "issuer",
                                      "type": "string"
                                    },
                                    {
                                      "const": "burn_address",
                                      "type": "string"
                                    },
                                    {
                                      "const": "unknown",
                                      "type": "string"
                                    }
                                  ]
                                },
                                "identifier": {
                                  "description": "Party address or identifier",
                                  "type": "string"
                                },
                                "pubkey": {
                                  "nullable": true,
                                  "anyOf": [
                                    {
                                      "description": "Public key hex, if available",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              }
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "amount": {
                          "description": "Token amount as a decimal string",
                          "type": "string"
                        },
                        "valueUsd": {
                          "description": "USD value at time of transaction",
                          "type": "number"
                        },
                        "tokenMetadata": {
                          "nullable": true,
                          "anyOf": [
                            {
                              "type": "object",
                              "required": [
                                "tokenIdentifier",
                                "tokenAddress",
                                "name",
                                "ticker",
                                "decimals",
                                "issuerPublicKey"
                              ],
                              "properties": {
                                "tokenIdentifier": {
                                  "description": "Unique token identifier (hex)",
                                  "type": "string"
                                },
                                "tokenAddress": {
                                  "description": "Token bech32 address",
                                  "type": "string"
                                },
                                "name": {
                                  "description": "Token display name",
                                  "type": "string"
                                },
                                "ticker": {
                                  "description": "Token ticker symbol",
                                  "type": "string"
                                },
                                "decimals": {
                                  "description": "Token decimal places",
                                  "type": "integer"
                                },
                                "issuerPublicKey": {
                                  "description": "Public key of the token issuer",
                                  "type": "string"
                                },
                                "maxSupply": {
                                  "nullable": true,
                                  "anyOf": [
                                    {
                                      "description": "Maximum token supply, if capped",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "isFreezable": {
                                  "nullable": true,
                                  "anyOf": [
                                    {
                                      "description": "Whether the token can be frozen by the issuer",
                                      "type": "boolean"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              }
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "multiIoDetails": {
                          "nullable": true,
                          "anyOf": [
                            {
                              "type": "object",
                              "required": [
                                "inputs",
                                "outputs",
                                "totalInputAmount",
                                "totalOutputAmount"
                              ],
                              "properties": {
                                "inputs": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "required": [
                                      "address",
                                      "pubkey",
                                      "amount"
                                    ],
                                    "properties": {
                                      "address": {
                                        "description": "Spark address",
                                        "type": "string"
                                      },
                                      "pubkey": {
                                        "description": "Public key hex",
                                        "type": "string"
                                      },
                                      "amount": {
                                        "description": "Token amount as a decimal string",
                                        "type": "string"
                                      }
                                    }
                                  }
                                },
                                "outputs": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "required": [
                                      "address",
                                      "pubkey",
                                      "amount"
                                    ],
                                    "properties": {
                                      "address": {
                                        "description": "Spark address",
                                        "type": "string"
                                      },
                                      "pubkey": {
                                        "description": "Public key hex",
                                        "type": "string"
                                      },
                                      "amount": {
                                        "description": "Token amount as a decimal string",
                                        "type": "string"
                                      }
                                    }
                                  }
                                },
                                "totalInputAmount": {
                                  "description": "Sum of all input amounts",
                                  "type": "string"
                                },
                                "totalOutputAmount": {
                                  "description": "Sum of all output amounts",
                                  "type": "string"
                                }
                              }
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "swapId": {
                          "nullable": true,
                          "anyOf": [
                            {
                              "description": "Associated swap ID",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "Response for status 500",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "operationId": "getV2TxByTxid"
      }
    },
    "/v2/stats/summary": {
      "get": {
        "tags": [
          "Stats"
        ],
        "description": "Get current network stats & summary.\nIncludes:\n\t- Total value locked in sats\n\t- Total value locked in USD\n\t- Active accounts\n\t- Transactions in the last 24 hours\n\t- Current BTC price in USD",
        "parameters": [
          {
            "name": "network",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "MAINNET",
                "REGTEST"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "totalValueLockedSats",
                    "totalValueLockedUsd",
                    "activeAccounts",
                    "transactions24h",
                    "currentBtcPriceUsd"
                  ],
                  "properties": {
                    "totalValueLockedSats": {
                      "description": "Total value locked on the network in sats",
                      "type": "integer"
                    },
                    "totalValueLockedUsd": {
                      "description": "Total value locked in USD",
                      "type": "number"
                    },
                    "activeAccounts": {
                      "description": "Number of active accounts",
                      "type": "integer"
                    },
                    "transactions24h": {
                      "description": "Number of transactions in the last 24 hours",
                      "type": "integer"
                    },
                    "currentBtcPriceUsd": {
                      "description": "Current BTC price in USD",
                      "type": "number"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Response for status 500",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "operationId": "getV2StatsSummary"
      }
    },
    "/v2/stats/tpv": {
      "get": {
        "tags": [
          "Stats"
        ],
        "description": "Get TPV stats for a given network and period.\nIncludes:\n\t- TPV in sats\n\t- TPV in USD\n\t- Start time\n\t- End time",
        "parameters": [
          {
            "name": "network",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "MAINNET",
                "REGTEST"
              ]
            }
          },
          {
            "name": "period",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "24h",
                "7d",
                "30d",
                "all"
              ]
            }
          },
          {
            "name": "include_stables",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "period",
                    "tpvSats",
                    "tpvUsd",
                    "startTime",
                    "endTime"
                  ],
                  "properties": {
                    "period": {
                      "type": "string",
                      "enum": [
                        "24h",
                        "7d",
                        "30d",
                        "all"
                      ]
                    },
                    "tpvSats": {
                      "description": "Total payment volume in sats",
                      "type": "integer"
                    },
                    "tpvUsd": {
                      "description": "Total payment volume in USD",
                      "type": "number"
                    },
                    "startTime": {
                      "format": "date-time",
                      "description": "Period start timestamp",
                      "type": "string"
                    },
                    "endTime": {
                      "format": "date-time",
                      "description": "Period end timestamp",
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "Response for status 500",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "operationId": "getV2StatsTpv"
      }
    },
    "/eos/address/{address}": {
      "get": {
        "tags": [
          "EoS"
        ],
        "description": "Get address summary bypassing privacy checks. Requires EoS API key.",
        "parameters": [
          {
            "name": "address",
            "in": "path",
            "required": true,
            "schema": {
              "description": "The Spark address or public key hex",
              "type": "string"
            }
          },
          {
            "name": "eos_key",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "network",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "MAINNET",
                "REGTEST"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "sparkAddress",
                    "publicKey",
                    "balance",
                    "totalValueUsd",
                    "transactionCount",
                    "tokenCount"
                  ],
                  "properties": {
                    "sparkAddress": {
                      "description": "The Spark bech32 address",
                      "type": "string"
                    },
                    "publicKey": {
                      "description": "The public key hex",
                      "type": "string"
                    },
                    "balance": {
                      "type": "object",
                      "required": [
                        "btcSoftBalanceSats",
                        "btcHardBalanceSats",
                        "btcValueUsdHard",
                        "btcValueUsdSoft",
                        "totalTokenValueUsd"
                      ],
                      "properties": {
                        "btcSoftBalanceSats": {
                          "description": "Soft BTC balance in sats (pending + confirmed)",
                          "type": "integer"
                        },
                        "btcHardBalanceSats": {
                          "description": "Hard BTC balance in sats (confirmed only)",
                          "type": "integer"
                        },
                        "btcValueUsdHard": {
                          "description": "USD value of hard balance",
                          "type": "number"
                        },
                        "btcValueUsdSoft": {
                          "description": "USD value of soft balance",
                          "type": "number"
                        },
                        "totalTokenValueUsd": {
                          "description": "Total USD value of all tokens held",
                          "type": "number"
                        }
                      }
                    },
                    "totalValueUsd": {
                      "description": "Total portfolio value in USD",
                      "type": "number"
                    },
                    "transactionCount": {
                      "description": "Total number of transactions",
                      "type": "integer"
                    },
                    "tokenCount": {
                      "description": "Number of distinct tokens held",
                      "type": "integer"
                    },
                    "tokens": {
                      "nullable": true,
                      "anyOf": [
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "required": [
                              "tokenIdentifier",
                              "tokenAddress",
                              "name",
                              "ticker",
                              "decimals",
                              "balance",
                              "valueUsd",
                              "issuerPublicKey"
                            ],
                            "properties": {
                              "tokenIdentifier": {
                                "description": "Unique token identifier (hex)",
                                "type": "string"
                              },
                              "tokenAddress": {
                                "description": "Token bech32 address",
                                "type": "string"
                              },
                              "name": {
                                "description": "Token display name",
                                "type": "string"
                              },
                              "ticker": {
                                "description": "Token ticker symbol",
                                "type": "string"
                              },
                              "decimals": {
                                "description": "Token decimal places",
                                "type": "integer"
                              },
                              "balance": {
                                "description": "Token balance as a decimal string",
                                "type": "string"
                              },
                              "valueUsd": {
                                "description": "USD value of the balance",
                                "type": "number"
                              },
                              "issuerPublicKey": {
                                "description": "Public key of the token issuer",
                                "type": "string"
                              },
                              "maxSupply": {
                                "nullable": true,
                                "anyOf": [
                                  {
                                    "description": "Maximum token supply, if capped",
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "isFreezable": {
                                "nullable": true,
                                "anyOf": [
                                  {
                                    "description": "Whether the token can be frozen by the issuer",
                                    "type": "boolean"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            }
                          }
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "Response for status 500",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "operationId": "getEosAddressByAddress"
      }
    },
    "/eos/address/{address}/transactions": {
      "get": {
        "tags": [
          "EoS"
        ],
        "description": "Get address transactions bypassing privacy checks. Uses cursor-based pagination. Requires EoS API key.",
        "parameters": [
          {
            "name": "address",
            "in": "path",
            "required": true,
            "schema": {
              "description": "The Spark address or public key hex",
              "type": "string"
            }
          },
          {
            "name": "eos_key",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "network",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "MAINNET",
                "REGTEST"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "minimum": 1,
              "maximum": 100,
              "description": "Number of transactions per page (default: 25, max: 100)",
              "default": 25,
              "type": "number"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Pagination cursor. Use nextCursor from previous response to get next page.",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "nextCursor"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "object",
                            "required": [
                              "id",
                              "type",
                              "direction",
                              "counterparty",
                              "valueUsd",
                              "status"
                            ],
                            "properties": {
                              "id": {
                                "description": "Spark transaction ID",
                                "type": "string"
                              },
                              "type": {
                                "description": "Transaction type",
                                "anyOf": [
                                  {
                                    "const": "spark_transfer",
                                    "type": "string"
                                  },
                                  {
                                    "const": "lightning_payment",
                                    "type": "string"
                                  },
                                  {
                                    "const": "bitcoin_deposit",
                                    "type": "string"
                                  },
                                  {
                                    "const": "bitcoin_withdrawal",
                                    "type": "string"
                                  },
                                  {
                                    "const": "token_transfer",
                                    "type": "string"
                                  },
                                  {
                                    "const": "token_mint",
                                    "type": "string"
                                  },
                                  {
                                    "const": "token_burn",
                                    "type": "string"
                                  },
                                  {
                                    "const": "token_multi_transfer",
                                    "type": "string"
                                  },
                                  {
                                    "const": "unknown_token_op",
                                    "type": "string"
                                  },
                                  {
                                    "const": "unknown_transfer",
                                    "type": "string"
                                  }
                                ]
                              },
                              "direction": {
                                "description": "Direction relative to the queried address",
                                "anyOf": [
                                  {
                                    "const": "incoming",
                                    "type": "string"
                                  },
                                  {
                                    "const": "outgoing",
                                    "type": "string"
                                  },
                                  {
                                    "const": "creation",
                                    "type": "string"
                                  },
                                  {
                                    "const": "destruction",
                                    "type": "string"
                                  },
                                  {
                                    "const": "transfer",
                                    "type": "string"
                                  },
                                  {
                                    "const": "deposit",
                                    "type": "string"
                                  },
                                  {
                                    "const": "withdrawal",
                                    "type": "string"
                                  },
                                  {
                                    "const": "payment",
                                    "type": "string"
                                  },
                                  {
                                    "const": "settlement",
                                    "type": "string"
                                  },
                                  {
                                    "const": "unknown",
                                    "type": "string"
                                  }
                                ]
                              },
                              "counterparty": {
                                "type": "object",
                                "required": [
                                  "type",
                                  "identifier"
                                ],
                                "properties": {
                                  "type": {
                                    "description": "Type of counterparty",
                                    "anyOf": [
                                      {
                                        "const": "spark",
                                        "type": "string"
                                      },
                                      {
                                        "const": "lightning",
                                        "type": "string"
                                      },
                                      {
                                        "const": "bitcoin",
                                        "type": "string"
                                      },
                                      {
                                        "const": "token",
                                        "type": "string"
                                      }
                                    ]
                                  },
                                  "identifier": {
                                    "description": "Counterparty address or identifier",
                                    "type": "string"
                                  },
                                  "tokenMetadata": {
                                    "nullable": true,
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "required": [
                                          "tokenIdentifier",
                                          "tokenAddress",
                                          "name",
                                          "ticker",
                                          "decimals",
                                          "issuerPublicKey"
                                        ],
                                        "properties": {
                                          "tokenIdentifier": {
                                            "description": "Unique token identifier (hex)",
                                            "type": "string"
                                          },
                                          "tokenAddress": {
                                            "description": "Token bech32 address",
                                            "type": "string"
                                          },
                                          "name": {
                                            "description": "Token display name",
                                            "type": "string"
                                          },
                                          "ticker": {
                                            "description": "Token ticker symbol",
                                            "type": "string"
                                          },
                                          "decimals": {
                                            "description": "Token decimal places",
                                            "type": "integer"
                                          },
                                          "issuerPublicKey": {
                                            "description": "Public key of the token issuer",
                                            "type": "string"
                                          },
                                          "maxSupply": {
                                            "nullable": true,
                                            "anyOf": [
                                              {
                                                "description": "Maximum token supply, if capped",
                                                "type": "string"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "isFreezable": {
                                            "nullable": true,
                                            "anyOf": [
                                              {
                                                "description": "Whether the token can be frozen by the issuer",
                                                "type": "boolean"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          }
                                        }
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                }
                              },
                              "amountSats": {
                                "nullable": true,
                                "anyOf": [
                                  {
                                    "description": "Amount in sats, for BTC transactions",
                                    "type": "integer"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "tokenAmount": {
                                "nullable": true,
                                "anyOf": [
                                  {
                                    "description": "Token amount as a decimal string, for token transactions",
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "valueUsd": {
                                "description": "USD value at time of transaction",
                                "type": "number"
                              },
                              "createdAt": {
                                "nullable": true,
                                "anyOf": [
                                  {
                                    "format": "date-time",
                                    "description": "Creation timestamp",
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "updatedAt": {
                                "nullable": true,
                                "anyOf": [
                                  {
                                    "format": "date-time",
                                    "description": "Last update timestamp",
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "status": {
                                "description": "Transaction status",
                                "anyOf": [
                                  {
                                    "const": "confirmed",
                                    "type": "string"
                                  },
                                  {
                                    "const": "pending",
                                    "type": "string"
                                  },
                                  {
                                    "const": "sent",
                                    "type": "string"
                                  },
                                  {
                                    "const": "failed",
                                    "type": "string"
                                  },
                                  {
                                    "const": "expired",
                                    "type": "string"
                                  }
                                ]
                              },
                              "txid": {
                                "nullable": true,
                                "anyOf": [
                                  {
                                    "description": "Bitcoin transaction ID, if applicable",
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "tokenMetadata": {
                                "nullable": true,
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "required": [
                                      "tokenIdentifier",
                                      "tokenAddress",
                                      "name",
                                      "ticker",
                                      "decimals",
                                      "issuerPublicKey"
                                    ],
                                    "properties": {
                                      "tokenIdentifier": {
                                        "description": "Unique token identifier (hex)",
                                        "type": "string"
                                      },
                                      "tokenAddress": {
                                        "description": "Token bech32 address",
                                        "type": "string"
                                      },
                                      "name": {
                                        "description": "Token display name",
                                        "type": "string"
                                      },
                                      "ticker": {
                                        "description": "Token ticker symbol",
                                        "type": "string"
                                      },
                                      "decimals": {
                                        "description": "Token decimal places",
                                        "type": "integer"
                                      },
                                      "issuerPublicKey": {
                                        "description": "Public key of the token issuer",
                                        "type": "string"
                                      },
                                      "maxSupply": {
                                        "nullable": true,
                                        "anyOf": [
                                          {
                                            "description": "Maximum token supply, if capped",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "isFreezable": {
                                        "nullable": true,
                                        "anyOf": [
                                          {
                                            "description": "Whether the token can be frozen by the issuer",
                                            "type": "boolean"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    }
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "multiIoDetails": {
                                "nullable": true,
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "required": [
                                      "inputs",
                                      "outputs",
                                      "totalInputAmount",
                                      "totalOutputAmount"
                                    ],
                                    "properties": {
                                      "inputs": {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "required": [
                                            "address",
                                            "pubkey",
                                            "amount"
                                          ],
                                          "properties": {
                                            "address": {
                                              "description": "Spark address",
                                              "type": "string"
                                            },
                                            "pubkey": {
                                              "description": "Public key hex",
                                              "type": "string"
                                            },
                                            "amount": {
                                              "description": "Token amount as a decimal string",
                                              "type": "string"
                                            }
                                          }
                                        }
                                      },
                                      "outputs": {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "required": [
                                            "address",
                                            "pubkey",
                                            "amount"
                                          ],
                                          "properties": {
                                            "address": {
                                              "description": "Spark address",
                                              "type": "string"
                                            },
                                            "pubkey": {
                                              "description": "Public key hex",
                                              "type": "string"
                                            },
                                            "amount": {
                                              "description": "Token amount as a decimal string",
                                              "type": "string"
                                            }
                                          }
                                        }
                                      },
                                      "totalInputAmount": {
                                        "description": "Sum of all input amounts",
                                        "type": "string"
                                      },
                                      "totalOutputAmount": {
                                        "description": "Sum of all output amounts",
                                        "type": "string"
                                      }
                                    }
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "swapId": {
                                "nullable": true,
                                "anyOf": [
                                  {
                                    "description": "Associated swap ID, if part of a swap",
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "expiredTime": {
                                "nullable": true,
                                "anyOf": [
                                  {
                                    "format": "date-time",
                                    "description": "When the transaction expired",
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            }
                          },
                          {
                            "type": "object",
                            "required": [
                              "id",
                              "type",
                              "poolLpPublicKey",
                              "in",
                              "out",
                              "price",
                              "timestamp",
                              "feePaid"
                            ],
                            "properties": {
                              "id": {
                                "description": "Swap ID",
                                "type": "string"
                              },
                              "type": {
                                "const": "swap",
                                "type": "string"
                              },
                              "poolLpPublicKey": {
                                "description": "LP pool public key",
                                "type": "string"
                              },
                              "in": {
                                "type": "object",
                                "required": [
                                  "amount",
                                  "address"
                                ],
                                "properties": {
                                  "amount": {
                                    "description": "Input amount as a decimal string",
                                    "type": "string"
                                  },
                                  "address": {
                                    "description": "Input address",
                                    "type": "string"
                                  },
                                  "tx": {
                                    "type": "object",
                                    "required": [
                                      "id",
                                      "type",
                                      "direction",
                                      "counterparty",
                                      "valueUsd",
                                      "status"
                                    ],
                                    "properties": {
                                      "id": {
                                        "description": "Spark transaction ID",
                                        "type": "string"
                                      },
                                      "type": {
                                        "description": "Transaction type",
                                        "anyOf": [
                                          {
                                            "const": "spark_transfer",
                                            "type": "string"
                                          },
                                          {
                                            "const": "lightning_payment",
                                            "type": "string"
                                          },
                                          {
                                            "const": "bitcoin_deposit",
                                            "type": "string"
                                          },
                                          {
                                            "const": "bitcoin_withdrawal",
                                            "type": "string"
                                          },
                                          {
                                            "const": "token_transfer",
                                            "type": "string"
                                          },
                                          {
                                            "const": "token_mint",
                                            "type": "string"
                                          },
                                          {
                                            "const": "token_burn",
                                            "type": "string"
                                          },
                                          {
                                            "const": "token_multi_transfer",
                                            "type": "string"
                                          },
                                          {
                                            "const": "unknown_token_op",
                                            "type": "string"
                                          },
                                          {
                                            "const": "unknown_transfer",
                                            "type": "string"
                                          }
                                        ]
                                      },
                                      "direction": {
                                        "description": "Direction relative to the queried address",
                                        "anyOf": [
                                          {
                                            "const": "incoming",
                                            "type": "string"
                                          },
                                          {
                                            "const": "outgoing",
                                            "type": "string"
                                          },
                                          {
                                            "const": "creation",
                                            "type": "string"
                                          },
                                          {
                                            "const": "destruction",
                                            "type": "string"
                                          },
                                          {
                                            "const": "transfer",
                                            "type": "string"
                                          },
                                          {
                                            "const": "deposit",
                                            "type": "string"
                                          },
                                          {
                                            "const": "withdrawal",
                                            "type": "string"
                                          },
                                          {
                                            "const": "payment",
                                            "type": "string"
                                          },
                                          {
                                            "const": "settlement",
                                            "type": "string"
                                          },
                                          {
                                            "const": "unknown",
                                            "type": "string"
                                          }
                                        ]
                                      },
                                      "counterparty": {
                                        "type": "object",
                                        "required": [
                                          "type",
                                          "identifier"
                                        ],
                                        "properties": {
                                          "type": {
                                            "description": "Type of counterparty",
                                            "anyOf": [
                                              {
                                                "const": "spark",
                                                "type": "string"
                                              },
                                              {
                                                "const": "lightning",
                                                "type": "string"
                                              },
                                              {
                                                "const": "bitcoin",
                                                "type": "string"
                                              },
                                              {
                                                "const": "token",
                                                "type": "string"
                                              }
                                            ]
                                          },
                                          "identifier": {
                                            "description": "Counterparty address or identifier",
                                            "type": "string"
                                          },
                                          "tokenMetadata": {
                                            "nullable": true,
                                            "anyOf": [
                                              {
                                                "type": "object",
                                                "required": [
                                                  "tokenIdentifier",
                                                  "tokenAddress",
                                                  "name",
                                                  "ticker",
                                                  "decimals",
                                                  "issuerPublicKey"
                                                ],
                                                "properties": {
                                                  "tokenIdentifier": {
                                                    "description": "Unique token identifier (hex)",
                                                    "type": "string"
                                                  },
                                                  "tokenAddress": {
                                                    "description": "Token bech32 address",
                                                    "type": "string"
                                                  },
                                                  "name": {
                                                    "description": "Token display name",
                                                    "type": "string"
                                                  },
                                                  "ticker": {
                                                    "description": "Token ticker symbol",
                                                    "type": "string"
                                                  },
                                                  "decimals": {
                                                    "description": "Token decimal places",
                                                    "type": "integer"
                                                  },
                                                  "issuerPublicKey": {
                                                    "description": "Public key of the token issuer",
                                                    "type": "string"
                                                  },
                                                  "maxSupply": {
                                                    "nullable": true,
                                                    "anyOf": [
                                                      {
                                                        "description": "Maximum token supply, if capped",
                                                        "type": "string"
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  },
                                                  "isFreezable": {
                                                    "nullable": true,
                                                    "anyOf": [
                                                      {
                                                        "description": "Whether the token can be frozen by the issuer",
                                                        "type": "boolean"
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  }
                                                }
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          }
                                        }
                                      },
                                      "amountSats": {
                                        "nullable": true,
                                        "anyOf": [
                                          {
                                            "description": "Amount in sats, for BTC transactions",
                                            "type": "integer"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "tokenAmount": {
                                        "nullable": true,
                                        "anyOf": [
                                          {
                                            "description": "Token amount as a decimal string, for token transactions",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "valueUsd": {
                                        "description": "USD value at time of transaction",
                                        "type": "number"
                                      },
                                      "createdAt": {
                                        "nullable": true,
                                        "anyOf": [
                                          {
                                            "format": "date-time",
                                            "description": "Creation timestamp",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "updatedAt": {
                                        "nullable": true,
                                        "anyOf": [
                                          {
                                            "format": "date-time",
                                            "description": "Last update timestamp",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "status": {
                                        "description": "Transaction status",
                                        "anyOf": [
                                          {
                                            "const": "confirmed",
                                            "type": "string"
                                          },
                                          {
                                            "const": "pending",
                                            "type": "string"
                                          },
                                          {
                                            "const": "sent",
                                            "type": "string"
                                          },
                                          {
                                            "const": "failed",
                                            "type": "string"
                                          },
                                          {
                                            "const": "expired",
                                            "type": "string"
                                          }
                                        ]
                                      },
                                      "txid": {
                                        "nullable": true,
                                        "anyOf": [
                                          {
                                            "description": "Bitcoin transaction ID, if applicable",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "tokenMetadata": {
                                        "nullable": true,
                                        "anyOf": [
                                          {
                                            "type": "object",
                                            "required": [
                                              "tokenIdentifier",
                                              "tokenAddress",
                                              "name",
                                              "ticker",
                                              "decimals",
                                              "issuerPublicKey"
                                            ],
                                            "properties": {
                                              "tokenIdentifier": {
                                                "description": "Unique token identifier (hex)",
                                                "type": "string"
                                              },
                                              "tokenAddress": {
                                                "description": "Token bech32 address",
                                                "type": "string"
                                              },
                                              "name": {
                                                "description": "Token display name",
                                                "type": "string"
                                              },
                                              "ticker": {
                                                "description": "Token ticker symbol",
                                                "type": "string"
                                              },
                                              "decimals": {
                                                "description": "Token decimal places",
                                                "type": "integer"
                                              },
                                              "issuerPublicKey": {
                                                "description": "Public key of the token issuer",
                                                "type": "string"
                                              },
                                              "maxSupply": {
                                                "nullable": true,
                                                "anyOf": [
                                                  {
                                                    "description": "Maximum token supply, if capped",
                                                    "type": "string"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              },
                                              "isFreezable": {
                                                "nullable": true,
                                                "anyOf": [
                                                  {
                                                    "description": "Whether the token can be frozen by the issuer",
                                                    "type": "boolean"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              }
                                            }
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "multiIoDetails": {
                                        "nullable": true,
                                        "anyOf": [
                                          {
                                            "type": "object",
                                            "required": [
                                              "inputs",
                                              "outputs",
                                              "totalInputAmount",
                                              "totalOutputAmount"
                                            ],
                                            "properties": {
                                              "inputs": {
                                                "type": "array",
                                                "items": {
                                                  "type": "object",
                                                  "required": [
                                                    "address",
                                                    "pubkey",
                                                    "amount"
                                                  ],
                                                  "properties": {
                                                    "address": {
                                                      "description": "Spark address",
                                                      "type": "string"
                                                    },
                                                    "pubkey": {
                                                      "description": "Public key hex",
                                                      "type": "string"
                                                    },
                                                    "amount": {
                                                      "description": "Token amount as a decimal string",
                                                      "type": "string"
                                                    }
                                                  }
                                                }
                                              },
                                              "outputs": {
                                                "type": "array",
                                                "items": {
                                                  "type": "object",
                                                  "required": [
                                                    "address",
                                                    "pubkey",
                                                    "amount"
                                                  ],
                                                  "properties": {
                                                    "address": {
                                                      "description": "Spark address",
                                                      "type": "string"
                                                    },
                                                    "pubkey": {
                                                      "description": "Public key hex",
                                                      "type": "string"
                                                    },
                                                    "amount": {
                                                      "description": "Token amount as a decimal string",
                                                      "type": "string"
                                                    }
                                                  }
                                                }
                                              },
                                              "totalInputAmount": {
                                                "description": "Sum of all input amounts",
                                                "type": "string"
                                              },
                                              "totalOutputAmount": {
                                                "description": "Sum of all output amounts",
                                                "type": "string"
                                              }
                                            }
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "swapId": {
                                        "nullable": true,
                                        "anyOf": [
                                          {
                                            "description": "Associated swap ID, if part of a swap",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "expiredTime": {
                                        "nullable": true,
                                        "anyOf": [
                                          {
                                            "format": "date-time",
                                            "description": "When the transaction expired",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    }
                                  }
                                }
                              },
                              "out": {
                                "type": "object",
                                "required": [
                                  "amount",
                                  "address"
                                ],
                                "properties": {
                                  "amount": {
                                    "description": "Output amount as a decimal string",
                                    "type": "string"
                                  },
                                  "address": {
                                    "description": "Output address",
                                    "type": "string"
                                  },
                                  "tx": {
                                    "type": "object",
                                    "required": [
                                      "id",
                                      "type",
                                      "direction",
                                      "counterparty",
                                      "valueUsd",
                                      "status"
                                    ],
                                    "properties": {
                                      "id": {
                                        "description": "Spark transaction ID",
                                        "type": "string"
                                      },
                                      "type": {
                                        "description": "Transaction type",
                                        "anyOf": [
                                          {
                                            "const": "spark_transfer",
                                            "type": "string"
                                          },
                                          {
                                            "const": "lightning_payment",
                                            "type": "string"
                                          },
                                          {
                                            "const": "bitcoin_deposit",
                                            "type": "string"
                                          },
                                          {
                                            "const": "bitcoin_withdrawal",
                                            "type": "string"
                                          },
                                          {
                                            "const": "token_transfer",
                                            "type": "string"
                                          },
                                          {
                                            "const": "token_mint",
                                            "type": "string"
                                          },
                                          {
                                            "const": "token_burn",
                                            "type": "string"
                                          },
                                          {
                                            "const": "token_multi_transfer",
                                            "type": "string"
                                          },
                                          {
                                            "const": "unknown_token_op",
                                            "type": "string"
                                          },
                                          {
                                            "const": "unknown_transfer",
                                            "type": "string"
                                          }
                                        ]
                                      },
                                      "direction": {
                                        "description": "Direction relative to the queried address",
                                        "anyOf": [
                                          {
                                            "const": "incoming",
                                            "type": "string"
                                          },
                                          {
                                            "const": "outgoing",
                                            "type": "string"
                                          },
                                          {
                                            "const": "creation",
                                            "type": "string"
                                          },
                                          {
                                            "const": "destruction",
                                            "type": "string"
                                          },
                                          {
                                            "const": "transfer",
                                            "type": "string"
                                          },
                                          {
                                            "const": "deposit",
                                            "type": "string"
                                          },
                                          {
                                            "const": "withdrawal",
                                            "type": "string"
                                          },
                                          {
                                            "const": "payment",
                                            "type": "string"
                                          },
                                          {
                                            "const": "settlement",
                                            "type": "string"
                                          },
                                          {
                                            "const": "unknown",
                                            "type": "string"
                                          }
                                        ]
                                      },
                                      "counterparty": {
                                        "type": "object",
                                        "required": [
                                          "type",
                                          "identifier"
                                        ],
                                        "properties": {
                                          "type": {
                                            "description": "Type of counterparty",
                                            "anyOf": [
                                              {
                                                "const": "spark",
                                                "type": "string"
                                              },
                                              {
                                                "const": "lightning",
                                                "type": "string"
                                              },
                                              {
                                                "const": "bitcoin",
                                                "type": "string"
                                              },
                                              {
                                                "const": "token",
                                                "type": "string"
                                              }
                                            ]
                                          },
                                          "identifier": {
                                            "description": "Counterparty address or identifier",
                                            "type": "string"
                                          },
                                          "tokenMetadata": {
                                            "nullable": true,
                                            "anyOf": [
                                              {
                                                "type": "object",
                                                "required": [
                                                  "tokenIdentifier",
                                                  "tokenAddress",
                                                  "name",
                                                  "ticker",
                                                  "decimals",
                                                  "issuerPublicKey"
                                                ],
                                                "properties": {
                                                  "tokenIdentifier": {
                                                    "description": "Unique token identifier (hex)",
                                                    "type": "string"
                                                  },
                                                  "tokenAddress": {
                                                    "description": "Token bech32 address",
                                                    "type": "string"
                                                  },
                                                  "name": {
                                                    "description": "Token display name",
                                                    "type": "string"
                                                  },
                                                  "ticker": {
                                                    "description": "Token ticker symbol",
                                                    "type": "string"
                                                  },
                                                  "decimals": {
                                                    "description": "Token decimal places",
                                                    "type": "integer"
                                                  },
                                                  "issuerPublicKey": {
                                                    "description": "Public key of the token issuer",
                                                    "type": "string"
                                                  },
                                                  "maxSupply": {
                                                    "nullable": true,
                                                    "anyOf": [
                                                      {
                                                        "description": "Maximum token supply, if capped",
                                                        "type": "string"
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  },
                                                  "isFreezable": {
                                                    "nullable": true,
                                                    "anyOf": [
                                                      {
                                                        "description": "Whether the token can be frozen by the issuer",
                                                        "type": "boolean"
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  }
                                                }
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          }
                                        }
                                      },
                                      "amountSats": {
                                        "nullable": true,
                                        "anyOf": [
                                          {
                                            "description": "Amount in sats, for BTC transactions",
                                            "type": "integer"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "tokenAmount": {
                                        "nullable": true,
                                        "anyOf": [
                                          {
                                            "description": "Token amount as a decimal string, for token transactions",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "valueUsd": {
                                        "description": "USD value at time of transaction",
                                        "type": "number"
                                      },
                                      "createdAt": {
                                        "nullable": true,
                                        "anyOf": [
                                          {
                                            "format": "date-time",
                                            "description": "Creation timestamp",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "updatedAt": {
                                        "nullable": true,
                                        "anyOf": [
                                          {
                                            "format": "date-time",
                                            "description": "Last update timestamp",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "status": {
                                        "description": "Transaction status",
                                        "anyOf": [
                                          {
                                            "const": "confirmed",
                                            "type": "string"
                                          },
                                          {
                                            "const": "pending",
                                            "type": "string"
                                          },
                                          {
                                            "const": "sent",
                                            "type": "string"
                                          },
                                          {
                                            "const": "failed",
                                            "type": "string"
                                          },
                                          {
                                            "const": "expired",
                                            "type": "string"
                                          }
                                        ]
                                      },
                                      "txid": {
                                        "nullable": true,
                                        "anyOf": [
                                          {
                                            "description": "Bitcoin transaction ID, if applicable",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "tokenMetadata": {
                                        "nullable": true,
                                        "anyOf": [
                                          {
                                            "type": "object",
                                            "required": [
                                              "tokenIdentifier",
                                              "tokenAddress",
                                              "name",
                                              "ticker",
                                              "decimals",
                                              "issuerPublicKey"
                                            ],
                                            "properties": {
                                              "tokenIdentifier": {
                                                "description": "Unique token identifier (hex)",
                                                "type": "string"
                                              },
                                              "tokenAddress": {
                                                "description": "Token bech32 address",
                                                "type": "string"
                                              },
                                              "name": {
                                                "description": "Token display name",
                                                "type": "string"
                                              },
                                              "ticker": {
                                                "description": "Token ticker symbol",
                                                "type": "string"
                                              },
                                              "decimals": {
                                                "description": "Token decimal places",
                                                "type": "integer"
                                              },
                                              "issuerPublicKey": {
                                                "description": "Public key of the token issuer",
                                                "type": "string"
                                              },
                                              "maxSupply": {
                                                "nullable": true,
                                                "anyOf": [
                                                  {
                                                    "description": "Maximum token supply, if capped",
                                                    "type": "string"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              },
                                              "isFreezable": {
                                                "nullable": true,
                                                "anyOf": [
                                                  {
                                                    "description": "Whether the token can be frozen by the issuer",
                                                    "type": "boolean"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              }
                                            }
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "multiIoDetails": {
                                        "nullable": true,
                                        "anyOf": [
                                          {
                                            "type": "object",
                                            "required": [
                                              "inputs",
                                              "outputs",
                                              "totalInputAmount",
                                              "totalOutputAmount"
                                            ],
                                            "properties": {
                                              "inputs": {
                                                "type": "array",
                                                "items": {
                                                  "type": "object",
                                                  "required": [
                                                    "address",
                                                    "pubkey",
                                                    "amount"
                                                  ],
                                                  "properties": {
                                                    "address": {
                                                      "description": "Spark address",
                                                      "type": "string"
                                                    },
                                                    "pubkey": {
                                                      "description": "Public key hex",
                                                      "type": "string"
                                                    },
                                                    "amount": {
                                                      "description": "Token amount as a decimal string",
                                                      "type": "string"
                                                    }
                                                  }
                                                }
                                              },
                                              "outputs": {
                                                "type": "array",
                                                "items": {
                                                  "type": "object",
                                                  "required": [
                                                    "address",
                                                    "pubkey",
                                                    "amount"
                                                  ],
                                                  "properties": {
                                                    "address": {
                                                      "description": "Spark address",
                                                      "type": "string"
                                                    },
                                                    "pubkey": {
                                                      "description": "Public key hex",
                                                      "type": "string"
                                                    },
                                                    "amount": {
                                                      "description": "Token amount as a decimal string",
                                                      "type": "string"
                                                    }
                                                  }
                                                }
                                              },
                                              "totalInputAmount": {
                                                "description": "Sum of all input amounts",
                                                "type": "string"
                                              },
                                              "totalOutputAmount": {
                                                "description": "Sum of all output amounts",
                                                "type": "string"
                                              }
                                            }
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "swapId": {
                                        "nullable": true,
                                        "anyOf": [
                                          {
                                            "description": "Associated swap ID, if part of a swap",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "expiredTime": {
                                        "nullable": true,
                                        "anyOf": [
                                          {
                                            "format": "date-time",
                                            "description": "When the transaction expired",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    }
                                  }
                                }
                              },
                              "price": {
                                "description": "Swap price",
                                "type": "string"
                              },
                              "timestamp": {
                                "format": "date-time",
                                "description": "Swap timestamp",
                                "type": "string"
                              },
                              "feePaid": {
                                "description": "Fee paid as a decimal string",
                                "type": "string"
                              }
                            }
                          }
                        ]
                      }
                    },
                    "nextCursor": {
                      "description": "Cursor for the next page, or null if no more pages",
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "Response for status 500",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "operationId": "getEosAddressByAddressTransactions"
      }
    },
    "/eos/address/{address}/tokens": {
      "get": {
        "tags": [
          "EoS"
        ],
        "description": "Get all token holdings for a wallet with balances and USD values.",
        "parameters": [
          {
            "name": "address",
            "in": "path",
            "required": true,
            "schema": {
              "description": "The Spark address or public key hex",
              "type": "string"
            }
          },
          {
            "name": "eos_key",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "network",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "MAINNET",
                "REGTEST"
              ]
            }
          }
        ],
        "responses": {
          "400": {
            "description": "Response for status 400",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "Response for status 500",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "operationId": "getEosAddressByAddressTokens"
      }
    },
    "/eos/tx/{txid}": {
      "get": {
        "tags": [
          "EoS"
        ],
        "description": "Get transaction by ID bypassing privacy checks. Requires EoS API key.",
        "parameters": [
          {
            "name": "txid",
            "in": "path",
            "required": true,
            "schema": {
              "description": "The Spark transaction ID.",
              "type": "string"
            }
          },
          {
            "name": "eos_key",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "network",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "MAINNET",
                "REGTEST"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "required": [
                        "id",
                        "type",
                        "status",
                        "amountSats",
                        "valueUsd"
                      ],
                      "properties": {
                        "id": {
                          "description": "Spark transaction ID",
                          "type": "string"
                        },
                        "type": {
                          "description": "Transaction type",
                          "type": "string"
                        },
                        "status": {
                          "description": "Transaction status",
                          "anyOf": [
                            {
                              "const": "confirmed",
                              "type": "string"
                            },
                            {
                              "const": "pending",
                              "type": "string"
                            },
                            {
                              "const": "sent",
                              "type": "string"
                            },
                            {
                              "const": "failed",
                              "type": "string"
                            },
                            {
                              "const": "expired",
                              "type": "string"
                            }
                          ]
                        },
                        "createdAt": {
                          "nullable": true,
                          "anyOf": [
                            {
                              "format": "date-time",
                              "description": "Creation timestamp",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "updatedAt": {
                          "nullable": true,
                          "anyOf": [
                            {
                              "format": "date-time",
                              "description": "Last update timestamp",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "expiredTime": {
                          "nullable": true,
                          "anyOf": [
                            {
                              "format": "date-time",
                              "description": "When the transaction expired",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "from": {
                          "nullable": true,
                          "anyOf": [
                            {
                              "type": "object",
                              "required": [
                                "type",
                                "identifier"
                              ],
                              "properties": {
                                "type": {
                                  "description": "Type of transaction party",
                                  "anyOf": [
                                    {
                                      "const": "spark",
                                      "type": "string"
                                    },
                                    {
                                      "const": "lightning",
                                      "type": "string"
                                    },
                                    {
                                      "const": "bitcoin",
                                      "type": "string"
                                    },
                                    {
                                      "const": "issuer",
                                      "type": "string"
                                    },
                                    {
                                      "const": "burn_address",
                                      "type": "string"
                                    },
                                    {
                                      "const": "unknown",
                                      "type": "string"
                                    }
                                  ]
                                },
                                "identifier": {
                                  "description": "Party address or identifier",
                                  "type": "string"
                                },
                                "pubkey": {
                                  "nullable": true,
                                  "anyOf": [
                                    {
                                      "description": "Public key hex, if available",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              }
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "to": {
                          "nullable": true,
                          "anyOf": [
                            {
                              "type": "object",
                              "required": [
                                "type",
                                "identifier"
                              ],
                              "properties": {
                                "type": {
                                  "description": "Type of transaction party",
                                  "anyOf": [
                                    {
                                      "const": "spark",
                                      "type": "string"
                                    },
                                    {
                                      "const": "lightning",
                                      "type": "string"
                                    },
                                    {
                                      "const": "bitcoin",
                                      "type": "string"
                                    },
                                    {
                                      "const": "issuer",
                                      "type": "string"
                                    },
                                    {
                                      "const": "burn_address",
                                      "type": "string"
                                    },
                                    {
                                      "const": "unknown",
                                      "type": "string"
                                    }
                                  ]
                                },
                                "identifier": {
                                  "description": "Party address or identifier",
                                  "type": "string"
                                },
                                "pubkey": {
                                  "nullable": true,
                                  "anyOf": [
                                    {
                                      "description": "Public key hex, if available",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              }
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "amountSats": {
                          "description": "Amount in sats",
                          "type": "integer"
                        },
                        "valueUsd": {
                          "description": "USD value at time of transaction",
                          "type": "number"
                        },
                        "timeTakenSeconds": {
                          "nullable": true,
                          "anyOf": [
                            {
                              "description": "Time taken to complete in seconds",
                              "type": "number"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "txid": {
                          "nullable": true,
                          "anyOf": [
                            {
                              "description": "Bitcoin transaction ID, if applicable",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "bitcoinTxData": {
                          "nullable": true,
                          "anyOf": [
                            {
                              "type": "object",
                              "required": [
                                "txid",
                                "vin",
                                "vout",
                                "status",
                                "fee"
                              ],
                              "properties": {
                                "txid": {
                                  "description": "Bitcoin transaction ID",
                                  "type": "string"
                                },
                                "vin": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "prevout": {},
                                      "witness": {
                                        "type": "array",
                                        "items": {
                                          "type": "string"
                                        }
                                      },
                                      "value": {
                                        "description": "Input value in sats",
                                        "type": "integer"
                                      }
                                    }
                                  }
                                },
                                "vout": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "required": [
                                      "value"
                                    ],
                                    "properties": {
                                      "scriptpubkey_address": {
                                        "nullable": true,
                                        "anyOf": [
                                          {
                                            "description": "Output address",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "value": {
                                        "description": "Output value in sats",
                                        "type": "integer"
                                      }
                                    }
                                  }
                                },
                                "status": {
                                  "type": "object",
                                  "required": [
                                    "confirmed"
                                  ],
                                  "properties": {
                                    "confirmed": {
                                      "description": "Whether the transaction is confirmed on-chain",
                                      "type": "boolean"
                                    },
                                    "block_height": {
                                      "nullable": true,
                                      "anyOf": [
                                        {
                                          "description": "Block height if confirmed",
                                          "type": "integer"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "block_time": {
                                      "nullable": true,
                                      "anyOf": [
                                        {
                                          "description": "Block timestamp if confirmed (unix seconds)",
                                          "type": "integer"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  }
                                },
                                "fee": {
                                  "description": "Transaction fee in sats",
                                  "type": "integer"
                                }
                              }
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "swapId": {
                          "nullable": true,
                          "anyOf": [
                            {
                              "description": "Associated swap ID",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      }
                    },
                    {
                      "type": "object",
                      "required": [
                        "id",
                        "type",
                        "status",
                        "amount",
                        "valueUsd"
                      ],
                      "properties": {
                        "id": {
                          "description": "Spark transaction ID",
                          "type": "string"
                        },
                        "type": {
                          "description": "Transaction type",
                          "type": "string"
                        },
                        "status": {
                          "description": "Transaction status",
                          "anyOf": [
                            {
                              "const": "confirmed",
                              "type": "string"
                            },
                            {
                              "const": "pending",
                              "type": "string"
                            },
                            {
                              "const": "sent",
                              "type": "string"
                            },
                            {
                              "const": "failed",
                              "type": "string"
                            },
                            {
                              "const": "expired",
                              "type": "string"
                            }
                          ]
                        },
                        "createdAt": {
                          "nullable": true,
                          "anyOf": [
                            {
                              "format": "date-time",
                              "description": "Creation timestamp",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "updatedAt": {
                          "nullable": true,
                          "anyOf": [
                            {
                              "format": "date-time",
                              "description": "Last update timestamp",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "expiredTime": {
                          "nullable": true,
                          "anyOf": [
                            {
                              "format": "date-time",
                              "description": "When the transaction expired",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "from": {
                          "nullable": true,
                          "anyOf": [
                            {
                              "type": "object",
                              "required": [
                                "type",
                                "identifier"
                              ],
                              "properties": {
                                "type": {
                                  "description": "Type of transaction party",
                                  "anyOf": [
                                    {
                                      "const": "spark",
                                      "type": "string"
                                    },
                                    {
                                      "const": "lightning",
                                      "type": "string"
                                    },
                                    {
                                      "const": "bitcoin",
                                      "type": "string"
                                    },
                                    {
                                      "const": "issuer",
                                      "type": "string"
                                    },
                                    {
                                      "const": "burn_address",
                                      "type": "string"
                                    },
                                    {
                                      "const": "unknown",
                                      "type": "string"
                                    }
                                  ]
                                },
                                "identifier": {
                                  "description": "Party address or identifier",
                                  "type": "string"
                                },
                                "pubkey": {
                                  "nullable": true,
                                  "anyOf": [
                                    {
                                      "description": "Public key hex, if available",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              }
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "to": {
                          "nullable": true,
                          "anyOf": [
                            {
                              "type": "object",
                              "required": [
                                "type",
                                "identifier"
                              ],
                              "properties": {
                                "type": {
                                  "description": "Type of transaction party",
                                  "anyOf": [
                                    {
                                      "const": "spark",
                                      "type": "string"
                                    },
                                    {
                                      "const": "lightning",
                                      "type": "string"
                                    },
                                    {
                                      "const": "bitcoin",
                                      "type": "string"
                                    },
                                    {
                                      "const": "issuer",
                                      "type": "string"
                                    },
                                    {
                                      "const": "burn_address",
                                      "type": "string"
                                    },
                                    {
                                      "const": "unknown",
                                      "type": "string"
                                    }
                                  ]
                                },
                                "identifier": {
                                  "description": "Party address or identifier",
                                  "type": "string"
                                },
                                "pubkey": {
                                  "nullable": true,
                                  "anyOf": [
                                    {
                                      "description": "Public key hex, if available",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              }
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "amount": {
                          "description": "Token amount as a decimal string",
                          "type": "string"
                        },
                        "valueUsd": {
                          "description": "USD value at time of transaction",
                          "type": "number"
                        },
                        "tokenMetadata": {
                          "nullable": true,
                          "anyOf": [
                            {
                              "type": "object",
                              "required": [
                                "tokenIdentifier",
                                "tokenAddress",
                                "name",
                                "ticker",
                                "decimals",
                                "issuerPublicKey"
                              ],
                              "properties": {
                                "tokenIdentifier": {
                                  "description": "Unique token identifier (hex)",
                                  "type": "string"
                                },
                                "tokenAddress": {
                                  "description": "Token bech32 address",
                                  "type": "string"
                                },
                                "name": {
                                  "description": "Token display name",
                                  "type": "string"
                                },
                                "ticker": {
                                  "description": "Token ticker symbol",
                                  "type": "string"
                                },
                                "decimals": {
                                  "description": "Token decimal places",
                                  "type": "integer"
                                },
                                "issuerPublicKey": {
                                  "description": "Public key of the token issuer",
                                  "type": "string"
                                },
                                "maxSupply": {
                                  "nullable": true,
                                  "anyOf": [
                                    {
                                      "description": "Maximum token supply, if capped",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "isFreezable": {
                                  "nullable": true,
                                  "anyOf": [
                                    {
                                      "description": "Whether the token can be frozen by the issuer",
                                      "type": "boolean"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              }
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "multiIoDetails": {
                          "nullable": true,
                          "anyOf": [
                            {
                              "type": "object",
                              "required": [
                                "inputs",
                                "outputs",
                                "totalInputAmount",
                                "totalOutputAmount"
                              ],
                              "properties": {
                                "inputs": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "required": [
                                      "address",
                                      "pubkey",
                                      "amount"
                                    ],
                                    "properties": {
                                      "address": {
                                        "description": "Spark address",
                                        "type": "string"
                                      },
                                      "pubkey": {
                                        "description": "Public key hex",
                                        "type": "string"
                                      },
                                      "amount": {
                                        "description": "Token amount as a decimal string",
                                        "type": "string"
                                      }
                                    }
                                  }
                                },
                                "outputs": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "required": [
                                      "address",
                                      "pubkey",
                                      "amount"
                                    ],
                                    "properties": {
                                      "address": {
                                        "description": "Spark address",
                                        "type": "string"
                                      },
                                      "pubkey": {
                                        "description": "Public key hex",
                                        "type": "string"
                                      },
                                      "amount": {
                                        "description": "Token amount as a decimal string",
                                        "type": "string"
                                      }
                                    }
                                  }
                                },
                                "totalInputAmount": {
                                  "description": "Sum of all input amounts",
                                  "type": "string"
                                },
                                "totalOutputAmount": {
                                  "description": "Sum of all output amounts",
                                  "type": "string"
                                }
                              }
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "swapId": {
                          "nullable": true,
                          "anyOf": [
                            {
                              "description": "Associated swap ID",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "Response for status 500",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "operationId": "getEosTxByTxid"
      }
    },
    "/eos/stats/summary": {
      "get": {
        "tags": [
          "EoS"
        ],
        "description": "Get network stats without privacy filtering. Includes all wallets in TVL, active accounts, and transaction counts.",
        "parameters": [
          {
            "name": "eos_key",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "network",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "MAINNET",
                "REGTEST"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "totalValueLockedSats",
                    "totalValueLockedUsd",
                    "activeAccounts",
                    "transactions24h",
                    "currentBtcPriceUsd"
                  ],
                  "properties": {
                    "totalValueLockedSats": {
                      "description": "Total value locked on the network in sats",
                      "type": "integer"
                    },
                    "totalValueLockedUsd": {
                      "description": "Total value locked in USD",
                      "type": "number"
                    },
                    "activeAccounts": {
                      "description": "Number of active accounts",
                      "type": "integer"
                    },
                    "transactions24h": {
                      "description": "Number of transactions in the last 24 hours",
                      "type": "integer"
                    },
                    "currentBtcPriceUsd": {
                      "description": "Current BTC price in USD",
                      "type": "number"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "Response for status 500",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "operationId": "getEosStatsSummary"
      }
    },
    "/eos/stats/tpv": {
      "get": {
        "tags": [
          "EoS"
        ],
        "description": "Get transaction processing volume without privacy filtering.",
        "parameters": [
          {
            "name": "eos_key",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "network",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "MAINNET",
                "REGTEST"
              ]
            }
          },
          {
            "name": "period",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "24h",
                "7d",
                "30d",
                "all"
              ]
            }
          },
          {
            "name": "include_stables",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "period",
                    "tpvSats",
                    "tpvUsd",
                    "startTime",
                    "endTime"
                  ],
                  "properties": {
                    "period": {
                      "type": "string",
                      "enum": [
                        "24h",
                        "7d",
                        "30d",
                        "all"
                      ]
                    },
                    "tpvSats": {
                      "description": "Total payment volume in sats",
                      "type": "integer"
                    },
                    "tpvUsd": {
                      "description": "Total payment volume in USD",
                      "type": "number"
                    },
                    "startTime": {
                      "format": "date-time",
                      "description": "Period start timestamp",
                      "type": "string"
                    },
                    "endTime": {
                      "format": "date-time",
                      "description": "Period end timestamp",
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "Response for status 500",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "operationId": "getEosStatsTpv"
      }
    },
    "/eos/stats/leaderboard/wallets": {
      "get": {
        "tags": [
          "EoS"
        ],
        "description": "Get wallet leaderboard without privacy filtering. Shows all wallets including private ones.",
        "parameters": [
          {
            "name": "eos_key",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "network",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "MAINNET",
                "REGTEST"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "minimum": 1,
              "maximum": 100,
              "anyOf": [
                {
                  "format": "numeric",
                  "default": 0,
                  "type": "string"
                },
                {
                  "minimum": 1,
                  "maximum": 100,
                  "type": "number"
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "leaderboard",
                    "currentBtcPriceUsd"
                  ],
                  "properties": {
                    "leaderboard": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "rank",
                          "sparkAddress",
                          "pubkey",
                          "totalValueSats",
                          "totalValueUsd"
                        ],
                        "properties": {
                          "rank": {
                            "description": "Leaderboard rank",
                            "type": "integer"
                          },
                          "sparkAddress": {
                            "description": "Spark bech32 address",
                            "type": "string"
                          },
                          "pubkey": {
                            "description": "Public key hex",
                            "type": "string"
                          },
                          "totalValueSats": {
                            "description": "Total value held in sats",
                            "type": "integer"
                          },
                          "totalValueUsd": {
                            "default": 0,
                            "description": "Total value held in USD",
                            "type": "number"
                          }
                        }
                      }
                    },
                    "currentBtcPriceUsd": {
                      "default": 0,
                      "description": "Current BTC price in USD",
                      "type": "number"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "Response for status 500",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "operationId": "getEosStatsLeaderboardWallets"
      }
    },
    "/eos/stats/leaderboard/tokens": {
      "get": {
        "tags": [
          "EoS"
        ],
        "description": "Get token leaderboard.",
        "parameters": [
          {
            "name": "eos_key",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "network",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "MAINNET",
                "REGTEST"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "minimum": 1,
              "maximum": 100,
              "anyOf": [
                {
                  "format": "numeric",
                  "default": 0,
                  "type": "string"
                },
                {
                  "minimum": 1,
                  "maximum": 100,
                  "type": "number"
                }
              ]
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "minimum": 0,
              "anyOf": [
                {
                  "format": "numeric",
                  "default": 0,
                  "type": "string"
                },
                {
                  "minimum": 0,
                  "type": "number"
                }
              ]
            }
          },
          {
            "name": "afterUpdatedAt",
            "in": "query",
            "required": false,
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "holders",
                "updated_at"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "leaderboard",
                    "totalTokens"
                  ],
                  "properties": {
                    "leaderboard": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "rank",
                          "tokenIdentifier",
                          "tokenAddress",
                          "issuerPublicKey",
                          "name",
                          "ticker",
                          "decimals",
                          "iconUrl",
                          "holderCount",
                          "priceUsd",
                          "totalSupply",
                          "marketCapUsd",
                          "volume24hUsd"
                        ],
                        "properties": {
                          "rank": {
                            "description": "Leaderboard rank",
                            "type": "integer"
                          },
                          "tokenIdentifier": {
                            "description": "Unique token identifier (hex)",
                            "type": "string"
                          },
                          "tokenAddress": {
                            "description": "Token bech32 address",
                            "type": "string"
                          },
                          "issuerPublicKey": {
                            "description": "Public key of the token issuer",
                            "type": "string"
                          },
                          "name": {
                            "description": "Token display name",
                            "type": "string"
                          },
                          "ticker": {
                            "description": "Token ticker symbol",
                            "type": "string"
                          },
                          "decimals": {
                            "description": "Token decimal places",
                            "type": "integer"
                          },
                          "iconUrl": {
                            "description": "URL to the token icon",
                            "type": "string"
                          },
                          "holderCount": {
                            "description": "Number of unique holders",
                            "type": "integer"
                          },
                          "priceUsd": {
                            "description": "Current token price in USD",
                            "type": "number"
                          },
                          "totalSupply": {
                            "description": "Current total supply as a decimal string",
                            "type": "string"
                          },
                          "marketCapUsd": {
                            "description": "Market cap in USD",
                            "type": "number"
                          },
                          "volume24hUsd": {
                            "description": "24-hour trading volume in USD",
                            "type": "number"
                          },
                          "maxSupply": {
                            "nullable": true,
                            "anyOf": [
                              {
                                "description": "Maximum token supply, if capped",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "isFreezable": {
                            "nullable": true,
                            "anyOf": [
                              {
                                "description": "Whether the token can be frozen by the issuer",
                                "type": "boolean"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "createdAt": {
                            "nullable": true,
                            "anyOf": [
                              {
                                "format": "date-time",
                                "description": "Creation timestamp",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "updatedAt": {
                            "nullable": true,
                            "anyOf": [
                              {
                                "format": "date-time",
                                "description": "Last update timestamp",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        }
                      }
                    },
                    "totalTokens": {
                      "description": "Total number of tokens",
                      "type": "integer"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "Response for status 500",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "operationId": "getEosStatsLeaderboardTokens"
      }
    },
    "/eos/tokens/{identifier}/holders": {
      "get": {
        "tags": [
          "EoS"
        ],
        "description": "Get token holders with balances and percentages. Useful for bubblemaps visualization (nodes).",
        "parameters": [
          {
            "name": "identifier",
            "in": "path",
            "required": true,
            "schema": {
              "description": "Token identifier (hex) or token address (bech32)",
              "type": "string"
            }
          },
          {
            "name": "eos_key",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "network",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "MAINNET",
                "REGTEST"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "minimum": 1,
              "maximum": 100,
              "anyOf": [
                {
                  "format": "numeric",
                  "default": 0,
                  "type": "string"
                },
                {
                  "minimum": 1,
                  "maximum": 100,
                  "type": "number"
                }
              ]
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "minimum": 0,
              "anyOf": [
                {
                  "format": "numeric",
                  "default": 0,
                  "type": "string"
                },
                {
                  "minimum": 0,
                  "type": "number"
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "meta",
                    "data"
                  ],
                  "properties": {
                    "meta": {
                      "type": "object",
                      "required": [
                        "totalItems",
                        "limit",
                        "offset"
                      ],
                      "properties": {
                        "totalItems": {
                          "description": "Total number of items matching the query",
                          "type": "integer"
                        },
                        "limit": {
                          "description": "Page size used",
                          "type": "integer"
                        },
                        "offset": {
                          "description": "Number of items skipped",
                          "type": "integer"
                        }
                      }
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "address",
                          "pubkey",
                          "balance",
                          "valueUsd",
                          "percentage"
                        ],
                        "properties": {
                          "address": {
                            "description": "Holder's Spark address",
                            "type": "string"
                          },
                          "pubkey": {
                            "description": "Holder's public key hex",
                            "type": "string"
                          },
                          "balance": {
                            "description": "Token balance as a decimal string",
                            "type": "string"
                          },
                          "valueUsd": {
                            "description": "USD value of the balance",
                            "type": "number"
                          },
                          "percentage": {
                            "description": "Percentage of total supply held",
                            "type": "number"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "Response for status 500",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "operationId": "getEosTokensByIdentifierHolders"
      }
    },
    "/eos/tokens/{identifier}/transactions": {
      "get": {
        "tags": [
          "EoS"
        ],
        "description": "Get token transfer history. Useful for bubblemaps visualization (edges showing wallet-to-wallet token flow).",
        "parameters": [
          {
            "name": "identifier",
            "in": "path",
            "required": true,
            "schema": {
              "description": "Token identifier (hex) or token address (bech32)",
              "type": "string"
            }
          },
          {
            "name": "eos_key",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "network",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "MAINNET",
                "REGTEST"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "minimum": 1,
              "maximum": 100,
              "anyOf": [
                {
                  "format": "numeric",
                  "default": 0,
                  "type": "string"
                },
                {
                  "minimum": 1,
                  "maximum": 100,
                  "type": "number"
                }
              ]
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "minimum": 0,
              "anyOf": [
                {
                  "format": "numeric",
                  "default": 0,
                  "type": "string"
                },
                {
                  "minimum": 0,
                  "type": "number"
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "meta",
                    "data"
                  ],
                  "properties": {
                    "meta": {
                      "type": "object",
                      "required": [
                        "totalItems",
                        "limit",
                        "offset"
                      ],
                      "properties": {
                        "totalItems": {
                          "description": "Total number of items matching the query",
                          "type": "integer"
                        },
                        "limit": {
                          "description": "Page size used",
                          "type": "integer"
                        },
                        "offset": {
                          "description": "Number of items skipped",
                          "type": "integer"
                        }
                      }
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "type",
                          "status",
                          "amount",
                          "valueUsd"
                        ],
                        "properties": {
                          "id": {
                            "description": "Spark transaction ID",
                            "type": "string"
                          },
                          "type": {
                            "description": "Transaction type",
                            "type": "string"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "confirmed",
                              "pending",
                              "sent",
                              "failed",
                              "expired"
                            ]
                          },
                          "createdAt": {
                            "nullable": true,
                            "anyOf": [
                              {
                                "format": "date-time",
                                "description": "Creation timestamp",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "updatedAt": {
                            "nullable": true,
                            "anyOf": [
                              {
                                "format": "date-time",
                                "description": "Last update timestamp",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "expiredTime": {
                            "nullable": true,
                            "anyOf": [
                              {
                                "format": "date-time",
                                "description": "When the transaction expired",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "from": {
                            "nullable": true,
                            "anyOf": [
                              {
                                "type": "object",
                                "required": [
                                  "type",
                                  "identifier"
                                ],
                                "properties": {
                                  "type": {
                                    "description": "Type of transaction party",
                                    "anyOf": [
                                      {
                                        "const": "spark",
                                        "type": "string"
                                      },
                                      {
                                        "const": "lightning",
                                        "type": "string"
                                      },
                                      {
                                        "const": "bitcoin",
                                        "type": "string"
                                      },
                                      {
                                        "const": "issuer",
                                        "type": "string"
                                      },
                                      {
                                        "const": "burn_address",
                                        "type": "string"
                                      },
                                      {
                                        "const": "unknown",
                                        "type": "string"
                                      }
                                    ]
                                  },
                                  "identifier": {
                                    "description": "Party address or identifier",
                                    "type": "string"
                                  },
                                  "pubkey": {
                                    "nullable": true,
                                    "anyOf": [
                                      {
                                        "description": "Public key hex, if available",
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                }
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "to": {
                            "nullable": true,
                            "anyOf": [
                              {
                                "type": "object",
                                "required": [
                                  "type",
                                  "identifier"
                                ],
                                "properties": {
                                  "type": {
                                    "description": "Type of transaction party",
                                    "anyOf": [
                                      {
                                        "const": "spark",
                                        "type": "string"
                                      },
                                      {
                                        "const": "lightning",
                                        "type": "string"
                                      },
                                      {
                                        "const": "bitcoin",
                                        "type": "string"
                                      },
                                      {
                                        "const": "issuer",
                                        "type": "string"
                                      },
                                      {
                                        "const": "burn_address",
                                        "type": "string"
                                      },
                                      {
                                        "const": "unknown",
                                        "type": "string"
                                      }
                                    ]
                                  },
                                  "identifier": {
                                    "description": "Party address or identifier",
                                    "type": "string"
                                  },
                                  "pubkey": {
                                    "nullable": true,
                                    "anyOf": [
                                      {
                                        "description": "Public key hex, if available",
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                }
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "amount": {
                            "description": "Token amount as a decimal string",
                            "type": "string"
                          },
                          "valueUsd": {
                            "description": "USD value at time of transaction",
                            "type": "number"
                          },
                          "tokenMetadata": {
                            "nullable": true,
                            "anyOf": [
                              {
                                "type": "object",
                                "required": [
                                  "tokenIdentifier",
                                  "tokenAddress",
                                  "name",
                                  "ticker",
                                  "decimals",
                                  "issuerPublicKey"
                                ],
                                "properties": {
                                  "tokenIdentifier": {
                                    "description": "Unique token identifier (hex)",
                                    "type": "string"
                                  },
                                  "tokenAddress": {
                                    "description": "Token bech32 address",
                                    "type": "string"
                                  },
                                  "name": {
                                    "description": "Token display name",
                                    "type": "string"
                                  },
                                  "ticker": {
                                    "description": "Token ticker symbol",
                                    "type": "string"
                                  },
                                  "decimals": {
                                    "description": "Token decimal places",
                                    "type": "integer"
                                  },
                                  "issuerPublicKey": {
                                    "description": "Public key of the token issuer",
                                    "type": "string"
                                  },
                                  "maxSupply": {
                                    "nullable": true,
                                    "anyOf": [
                                      {
                                        "description": "Maximum token supply, if capped",
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "isFreezable": {
                                    "nullable": true,
                                    "anyOf": [
                                      {
                                        "description": "Whether the token can be frozen by the issuer",
                                        "type": "boolean"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                }
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "multiIoDetails": {
                            "nullable": true,
                            "anyOf": [
                              {
                                "type": "object",
                                "required": [
                                  "inputs",
                                  "outputs",
                                  "totalInputAmount",
                                  "totalOutputAmount"
                                ],
                                "properties": {
                                  "inputs": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "required": [
                                        "address",
                                        "pubkey",
                                        "amount"
                                      ],
                                      "properties": {
                                        "address": {
                                          "description": "Spark address",
                                          "type": "string"
                                        },
                                        "pubkey": {
                                          "description": "Public key hex",
                                          "type": "string"
                                        },
                                        "amount": {
                                          "description": "Token amount as a decimal string",
                                          "type": "string"
                                        }
                                      }
                                    }
                                  },
                                  "outputs": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "required": [
                                        "address",
                                        "pubkey",
                                        "amount"
                                      ],
                                      "properties": {
                                        "address": {
                                          "description": "Spark address",
                                          "type": "string"
                                        },
                                        "pubkey": {
                                          "description": "Public key hex",
                                          "type": "string"
                                        },
                                        "amount": {
                                          "description": "Token amount as a decimal string",
                                          "type": "string"
                                        }
                                      }
                                    }
                                  },
                                  "totalInputAmount": {
                                    "description": "Sum of all input amounts",
                                    "type": "string"
                                  },
                                  "totalOutputAmount": {
                                    "description": "Sum of all output amounts",
                                    "type": "string"
                                  }
                                }
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "swapId": {
                            "nullable": true,
                            "anyOf": [
                              {
                                "description": "Associated swap ID",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "Response for status 500",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "operationId": "getEosTokensByIdentifierTransactions"
      }
    },
    "/eos/swaps/{address}": {
      "get": {
        "tags": [
          "EoS"
        ],
        "description": "Get swap history for a wallet with filters (pool, asset, time range, amounts).",
        "parameters": [
          {
            "name": "address",
            "in": "path",
            "required": true,
            "schema": {
              "description": "The Spark address or public key hex",
              "type": "string"
            }
          },
          {
            "name": "eos_key",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "network",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "MAINNET",
                "REGTEST"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "minimum": 1,
              "maximum": 100,
              "anyOf": [
                {
                  "format": "numeric",
                  "default": 0,
                  "type": "string"
                },
                {
                  "minimum": 1,
                  "maximum": 100,
                  "type": "number"
                }
              ]
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "minimum": 0,
              "anyOf": [
                {
                  "format": "numeric",
                  "default": 0,
                  "type": "string"
                },
                {
                  "minimum": 0,
                  "type": "number"
                }
              ]
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "timestampDesc",
                "timestampAsc",
                "amountInDesc",
                "amountInAsc",
                "amountOutDesc",
                "amountOutAsc"
              ]
            }
          },
          {
            "name": "poolLpPubkey",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "assetInAddress",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "assetOutAddress",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "minAmountIn",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "numeric",
                  "default": 0,
                  "type": "string"
                },
                {
                  "type": "number"
                }
              ]
            }
          },
          {
            "name": "maxAmountIn",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "numeric",
                  "default": 0,
                  "type": "string"
                },
                {
                  "type": "number"
                }
              ]
            }
          },
          {
            "name": "startTime",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "endTime",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "getEosSwapsByAddress"
      }
    },
    "/eos/historical/sats/balances/{address}": {
      "get": {
        "tags": [
          "EoS"
        ],
        "description": "Hourly BTC balance history without privacy filtering. Higher limits than public API.",
        "parameters": [
          {
            "name": "address",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "eos_key",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "network",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "MAINNET",
                "REGTEST"
              ]
            }
          },
          {
            "name": "direction",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "forward",
                "backward"
              ]
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "minimum": 1,
              "maximum": 500,
              "anyOf": [
                {
                  "format": "numeric",
                  "default": 0,
                  "type": "string"
                },
                {
                  "minimum": 1,
                  "maximum": 500,
                  "type": "number"
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "nextCursor"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "t",
                          "b"
                        ],
                        "properties": {
                          "t": {
                            "minimum": 0,
                            "description": "Unix timestamp in seconds",
                            "type": "integer"
                          },
                          "b": {
                            "description": "Balance as a decimal string",
                            "type": "string"
                          }
                        }
                      }
                    },
                    "nextCursor": {
                      "description": "Cursor for the next page, or null if no more pages",
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "Response for status 500",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "operationId": "getEosHistoricalSatsBalancesByAddress"
      }
    },
    "/eos/historical/tokens/balances/{address}/{tokenIdentifier}": {
      "get": {
        "tags": [
          "EoS"
        ],
        "description": "Hourly token balance history. Higher limits than public API.",
        "parameters": [
          {
            "name": "address",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tokenIdentifier",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "eos_key",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "network",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "MAINNET",
                "REGTEST"
              ]
            }
          },
          {
            "name": "direction",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "forward",
                "backward"
              ]
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "minimum": 1,
              "maximum": 500,
              "anyOf": [
                {
                  "format": "numeric",
                  "default": 0,
                  "type": "string"
                },
                {
                  "minimum": 1,
                  "maximum": 500,
                  "type": "number"
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "nextCursor"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "t",
                          "b"
                        ],
                        "properties": {
                          "t": {
                            "minimum": 0,
                            "description": "Unix timestamp in seconds",
                            "type": "integer"
                          },
                          "b": {
                            "description": "Balance as a decimal string",
                            "type": "string"
                          }
                        }
                      }
                    },
                    "nextCursor": {
                      "description": "Cursor for the next page, or null if no more pages",
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "Response for status 500",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "operationId": "getEosHistoricalTokensBalancesByAddressByTokenIdentifier"
      }
    },
    "/eos/historical/net-worth/{address}": {
      "get": {
        "tags": [
          "EoS"
        ],
        "description": "Net worth snapshots without privacy filtering. Higher limits than public API.",
        "parameters": [
          {
            "name": "address",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "eos_key",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "network",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "MAINNET",
                "REGTEST"
              ]
            }
          },
          {
            "name": "direction",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "forward",
                "backward"
              ]
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "minimum": 1,
              "maximum": 1000,
              "anyOf": [
                {
                  "format": "numeric",
                  "default": 0,
                  "type": "string"
                },
                {
                  "minimum": 1,
                  "maximum": 1000,
                  "type": "number"
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "nextCursor"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "t",
                          "nw"
                        ],
                        "properties": {
                          "t": {
                            "minimum": 0,
                            "type": "integer"
                          },
                          "nw": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "nextCursor": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "Response for status 500",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "operationId": "getEosHistoricalNet-worthByAddress"
      }
    },
    "/eos/graph/token-flow/{identifier}": {
      "get": {
        "tags": [
          "EoS"
        ],
        "description": "Get token transfer edge list for graph/bubblemaps analysis. Returns all transfers as sender→receiver edges.",
        "parameters": [
          {
            "name": "identifier",
            "in": "path",
            "required": true,
            "schema": {
              "description": "Token identifier (hex)",
              "type": "string"
            }
          },
          {
            "name": "eos_key",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "network",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "MAINNET",
                "REGTEST"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "minimum": 1,
              "maximum": 1000,
              "anyOf": [
                {
                  "format": "numeric",
                  "default": 0,
                  "type": "string"
                },
                {
                  "minimum": 1,
                  "maximum": 1000,
                  "type": "number"
                }
              ]
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "minimum": 0,
              "anyOf": [
                {
                  "format": "numeric",
                  "default": 0,
                  "type": "string"
                },
                {
                  "minimum": 0,
                  "type": "number"
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "edges",
                    "totalCount"
                  ],
                  "properties": {
                    "edges": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "sender",
                          "receiver",
                          "amount",
                          "timestamp",
                          "txId"
                        ],
                        "properties": {
                          "sender": {
                            "description": "Sender pubkey hex",
                            "type": "string"
                          },
                          "receiver": {
                            "description": "Receiver pubkey hex",
                            "type": "string"
                          },
                          "amount": {
                            "description": "Transfer amount as decimal string",
                            "type": "string"
                          },
                          "timestamp": {
                            "description": "ISO timestamp",
                            "type": "string"
                          },
                          "txId": {
                            "description": "Transaction ID",
                            "type": "string"
                          }
                        }
                      }
                    },
                    "totalCount": {
                      "minimum": 0,
                      "type": "integer"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "Response for status 500",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "operationId": "getEosGraphToken-flowByIdentifier"
      }
    },
    "/eos/graph/wallet-interactions/{address}": {
      "get": {
        "tags": [
          "EoS"
        ],
        "description": "Get wallet interaction graph showing all unique counterparties with aggregate volumes and counts.",
        "parameters": [
          {
            "name": "address",
            "in": "path",
            "required": true,
            "schema": {
              "description": "Wallet address (Spark address or hex pubkey)",
              "type": "string"
            }
          },
          {
            "name": "eos_key",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "network",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "MAINNET",
                "REGTEST"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "minimum": 1,
              "maximum": 100,
              "anyOf": [
                {
                  "format": "numeric",
                  "default": 0,
                  "type": "string"
                },
                {
                  "minimum": 1,
                  "maximum": 100,
                  "type": "number"
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "interactions"
                  ],
                  "properties": {
                    "interactions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "counterparty",
                          "totalSats",
                          "totalTokenTransfers",
                          "txCount",
                          "lastInteraction"
                        ],
                        "properties": {
                          "counterparty": {
                            "description": "Counterparty pubkey hex",
                            "type": "string"
                          },
                          "totalSats": {
                            "description": "Total sats transacted",
                            "type": "string"
                          },
                          "totalTokenTransfers": {
                            "minimum": 0,
                            "type": "integer"
                          },
                          "txCount": {
                            "minimum": 0,
                            "type": "integer"
                          },
                          "lastInteraction": {
                            "description": "ISO timestamp of last interaction",
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "Response for status 500",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "operationId": "getEosGraphWallet-interactionsByAddress"
      }
    }
  },
  "components": {
    "schemas": {}
  }
}
