{"openapi":"3.1.0","info":{"title":"Lineage Explorer API","version":"1.0.0","description":"Read-only public REST API for the Lineage block explorer."},"servers":[{"url":"/"}],"components":{"schemas":{"BlockSummary":{"type":"object","properties":{"num":{"type":"integer"},"hash":{"type":"string"},"previousHash":{"type":["string","null"]},"timestamp":{"type":["string","null"],"format":"date-time"},"version":{"type":"integer"},"nbTx":{"type":["integer","null"]}},"required":["num","hash","previousHash","timestamp","version","nbTx"]},"Pagination":{"type":"object","properties":{"total":{"type":"integer"},"limit":{"type":"integer"},"offset":{"type":"integer"},"hasMore":{"type":"boolean"}},"required":["total","limit","offset","hasMore"]},"BlockList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/BlockSummary"}},"pagination":{"$ref":"#/components/schemas/Pagination"}},"required":["data","pagination"]},"Block":{"allOf":[{"$ref":"#/components/schemas/BlockSummary"},{"type":"object","properties":{"merkleRootHash":{"type":["string","null"]},"bits":{"type":["string","null"]}},"required":["merkleRootHash","bits"]}]},"Problem":{"type":"object","properties":{"type":{"type":"string","example":"about:blank"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status"]},"BlockTransaction":{"type":"object","properties":{"hash":{"type":"string"},"blockHash":{"type":"string"},"version":{"type":"integer"},"timestamp":{"type":["string","null"],"format":"date-time"},"type":{"type":"string","enum":["token","item","coinbase","unknown"]},"coinbase":{"type":"boolean"}},"required":["hash","blockHash","version","timestamp","type","coinbase"]},"BlockTransactionList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/BlockTransaction"}}},"required":["data"]},"TransactionSummary":{"type":"object","properties":{"hash":{"type":"string"},"blockHash":{"type":"string"},"version":{"type":"integer"},"timestamp":{"type":["string","null"],"format":"date-time"},"type":{"type":"string","enum":["token","item","coinbase","unknown"]}},"required":["hash","blockHash","version","timestamp","type"]},"TransactionList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/TransactionSummary"}},"pagination":{"$ref":"#/components/schemas/Pagination"}},"required":["data","pagination"]},"Transaction":{"type":"object","properties":{"hash":{"type":"string"},"blockHash":{"type":"string"},"version":{"type":"integer"},"timestamp":{"type":["string","null"],"format":"date-time"},"type":{"type":"string","enum":["token","item","coinbase","unknown"]},"inputs":{"type":"array","items":{"type":"object","properties":{"fromAddress":{"type":["string","null"]},"amount":{"type":["string","null"]},"amountLngx":{"type":["string","null"]},"previousOutTxHash":{"type":["string","null"]},"previousOutTxN":{"type":["integer","null"]}},"required":["fromAddress","amount","amountLngx","previousOutTxHash","previousOutTxN"]}},"outputs":{"type":"array","items":{"type":"object","properties":{"n":{"type":"integer"},"valueType":{"type":"string"},"amount":{"type":["string","null"]},"amountLngx":{"type":["string","null"]},"address":{"type":["string","null"]},"locktime":{"type":"string"},"genesisHash":{"type":["string","null"]},"itemMetadata":{"type":["string","null"]}},"required":["n","valueType","amount","amountLngx","address","locktime","genesisHash","itemMetadata"]}}},"required":["hash","blockHash","version","timestamp","type","inputs","outputs"]},"Address":{"type":"object","properties":{"address":{"type":"string"},"balance":{"type":"string"},"balanceLngx":{"type":"string"}},"required":["address","balance","balanceLngx"]},"AddressTransaction":{"allOf":[{"$ref":"#/components/schemas/Transaction"},{"type":"object","properties":{"blockNum":{"type":"integer"},"balanceAfter":{"type":"string"},"balanceAfterLngx":{"type":"string"}},"required":["blockNum","balanceAfter","balanceAfterLngx"]}]},"AddressTransactionList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AddressTransaction"}},"pagination":{"$ref":"#/components/schemas/Pagination"}},"required":["data","pagination"]},"ItemOutput":{"type":"object","properties":{"genesisHash":{"type":["string","null"]},"metadata":{"type":["string","null"]},"address":{"type":["string","null"]},"amount":{"type":["string","null"]},"amountLngx":{"type":["string","null"]},"spent":{"type":"boolean"},"txHash":{"type":"string"},"n":{"type":"integer"},"blockNum":{"type":"integer"},"blockHash":{"type":"string"},"timestamp":{"type":["string","null"],"format":"date-time"}},"required":["genesisHash","metadata","address","amount","amountLngx","spent","txHash","n","blockNum","blockHash","timestamp"]},"ItemList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ItemOutput"}},"pagination":{"$ref":"#/components/schemas/Pagination"}},"required":["data","pagination"]},"Supply":{"type":"object","properties":{"circulating":{"type":"string"},"circulatingLngx":{"type":"string"},"total":{"type":["string","null"]},"totalLngx":{"type":["string","null"]},"ticker":{"type":"string"}},"required":["circulating","circulatingLngx","total","totalLngx","ticker"]},"Status":{"type":"object","properties":{"network":{"type":"string"},"ticker":{"type":"string"},"height":{"type":["integer","null"]},"blocks":{"type":"integer"},"transactions":{"type":"integer"}},"required":["network","ticker","height","blocks","transactions"]}},"parameters":{}},"paths":{"/api/v1/blocks":{"get":{"tags":["Blocks"],"summary":"List blocks","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25},"required":false,"name":"limit","in":"query"},{"schema":{"type":["integer","null"],"minimum":0,"maximum":100000,"default":0},"required":false,"name":"offset","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"default":"desc"},"required":false,"name":"order","in":"query"}],"responses":{"200":{"description":"A page of blocks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlockList"}}}}}}},"/api/v1/blocks/{id}":{"get":{"tags":["Blocks"],"summary":"Get a block by height or hash","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128,"example":"1"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"A block","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Block"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/api/v1/blocks/{id}/transactions":{"get":{"tags":["Blocks"],"summary":"List a block's transactions","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128,"example":"1"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The block's transactions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlockTransactionList"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/api/v1/transactions":{"get":{"tags":["Transactions"],"summary":"List transactions (excludes coinbase)","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25},"required":false,"name":"limit","in":"query"},{"schema":{"type":["integer","null"],"minimum":0,"maximum":100000,"default":0},"required":false,"name":"offset","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"default":"desc"},"required":false,"name":"order","in":"query"}],"responses":{"200":{"description":"A page of transactions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionList"}}}}}}},"/api/v1/transactions/{hash}":{"get":{"tags":["Transactions"],"summary":"Get a transaction by hash","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128,"example":"tx_2"},"required":true,"name":"hash","in":"path"}],"responses":{"200":{"description":"A transaction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Transaction"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/api/v1/addresses/{address}":{"get":{"tags":["Addresses"],"summary":"Get an address balance","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128,"example":"addr_1"},"required":true,"name":"address","in":"path"}],"responses":{"200":{"description":"The address balance","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Address"}}}}}}},"/api/v1/addresses/{address}/transactions":{"get":{"tags":["Addresses"],"summary":"List an address's transactions","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128,"example":"addr_1"},"required":true,"name":"address","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25},"required":false,"name":"limit","in":"query"},{"schema":{"type":["integer","null"],"minimum":0,"maximum":100000,"default":0},"required":false,"name":"offset","in":"query"}],"responses":{"200":{"description":"A page of the address's transactions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddressTransactionList"}}}}}}},"/api/v1/items":{"get":{"tags":["Items"],"summary":"Search minted items by metadata substring and/or genesis hash","description":"Returns item outputs (mints and transfers). Provide `q` for a case-insensitive metadata substring match, `genesis` for an exact item-class filter, or both. At least one is required.","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25},"required":false,"name":"limit","in":"query"},{"schema":{"type":["integer","null"],"minimum":0,"maximum":100000,"default":0},"required":false,"name":"offset","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":128,"example":"sword"},"required":false,"name":"q","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":128,"example":"g7f3c2a8"},"required":false,"name":"genesis","in":"query"}],"responses":{"200":{"description":"A page of item outputs","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemList"}}}}}}},"/api/v1/supply":{"get":{"tags":["Chain"],"summary":"Circulating and total supply","responses":{"200":{"description":"Supply figures","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Supply"}}}}}}},"/api/v1/status":{"get":{"tags":["Chain"],"summary":"Chain and indexer status","responses":{"200":{"description":"Chain status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}}}}}},"webhooks":{}}