{
  "openapi": "3.0.1",
  "info": {
    "title": "BonGreenhouse — Chia API",
    "description": "HTTP bridge from user API requests to the Chia blockchain. See API_PLAN.md and CLAUDE.md.",
    "version": "v1"
  },
  "paths": {
    "/api/v1/health": {
      "get": {
        "tags": [
          "Health"
        ],
        "summary": "Liveness probe for the BonGreenhouse API.",
        "description": "Returns a static OK response. Use this to confirm routing, OpenAPI, and problem-details wiring without touching Chia RPC.",
        "operationId": "GetHealth",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/asset-id/normalize": {
      "post": {
        "tags": [
          "Address"
        ],
        "summary": "Normalize a CAT asset ID to canonical lowercase hex.",
        "description": "Strips an optional `0x` prefix, validates that the input is 64 hex characters, and returns the lowercase form.",
        "operationId": "NormalizeAssetId",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AssetIdNormalizeRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AssetIdNormalizeResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/node/status": {
      "get": {
        "tags": [
          "Node"
        ],
        "summary": "Local Chia full node connectivity check.",
        "description": "Returns whether the configured Chia full node RPC endpoint is reachable, plus the network name and peak height when available.",
        "operationId": "GetNodeStatus",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NodeStatusResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/node/state": {
      "get": {
        "tags": [
          "Node"
        ],
        "summary": "Current blockchain peak, difficulty, and mempool size.",
        "description": "Aggregated snapshot of the local full node's view of the chain. Cached for a few seconds to take pressure off the node RPC under burst load.",
        "operationId": "GetBlockchainState",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BlockchainStateResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/coins/{coinId}": {
      "get": {
        "tags": [
          "Coins"
        ],
        "summary": "Look up a coin by its 32-byte coin ID.",
        "description": "Accepts a 64-character hex coin ID (with or without 0x prefix). Returns the coin record or 404 if the node does not know about that coin.",
        "operationId": "GetCoinById",
        "parameters": [
          {
            "name": "coinId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/coins/by-puzzle-hash/{addressOrHash}": {
      "get": {
        "tags": [
          "Coins"
        ],
        "summary": "Look up coin records by xch1… address or raw puzzle hash.",
        "description": "Accepts a bech32m address or a 64-character hex puzzle hash. Includes spent and unspent coins. Use `limit` and `cursor` for pagination; `limit` defaults to 100 and is capped at 1000.",
        "operationId": "GetCoinsByPuzzleHash",
        "parameters": [
          {
            "name": "addressOrHash",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CoinSearchResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/coins/by-hint/{hintHex}": {
      "get": {
        "tags": [
          "Coins"
        ],
        "summary": "Look up coin records by hint.",
        "description": "Accepts a 64-character hex hint. Includes spent and unspent coins. Use `limit` and `cursor` for pagination.",
        "operationId": "GetCoinsByHint",
        "parameters": [
          {
            "name": "hintHex",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CoinSearchResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/address/decode": {
      "post": {
        "tags": [
          "Address"
        ],
        "summary": "Convert a bech32m Chia address to its puzzle hash.",
        "description": "Accepts `xch1…`, `txch1…`, or any other Chia bech32m address. Returns the 64-character lowercase puzzle hash and the human-readable prefix that was decoded.",
        "operationId": "DecodeAddress",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddressDecodeRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AddressDecodeResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/address/encode": {
      "post": {
        "tags": [
          "Address"
        ],
        "summary": "Encode a puzzle hash as a bech32m Chia address.",
        "description": "Accepts a 64-character hex puzzle hash (with or without 0x prefix). Default human-readable prefix is `xch`; pass `txch` for testnet11 or another HRP as needed.",
        "operationId": "EncodeAddress",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddressEncodeRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AddressEncodeResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/offers/inspect": {
      "post": {
        "tags": [
          "Offers"
        ],
        "summary": "Summarize a Chia offer file.",
        "description": "Accepts raw offer text (the `offer1…` bech32m blob) in the request body. Returns the offered and requested assets, the fee, and a validity flag. Bypasses the library's path-reading helper for security.",
        "operationId": "InspectOffer",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OfferInspectRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OfferInspectionResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/offers/validate": {
      "post": {
        "tags": [
          "Offers"
        ],
        "summary": "Check whether an offer is still valid.",
        "description": "Lightweight check that returns whether the wallet RPC considers the offer text valid right now (coins still unspent, signatures intact).",
        "operationId": "ValidateOffer",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OfferInspectRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OfferValidateResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/security/entropy-failure": {
      "get": {
        "tags": [
          "Security"
        ],
        "summary": "Educational leakage report about weak or biased entropy.",
        "description": "Static teaching content. Useful for onboarding developers to the threat model around seed and key generation.",
        "operationId": "GetEntropyFailureReport",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LeakageReport"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/security/bls-hazards": {
      "get": {
        "tags": [
          "Security"
        ],
        "summary": "Educational leakage report about unsafe BLS implementations.",
        "description": "Static teaching content covering common pitfalls in BLS key handling, serialization, and aggregation.",
        "operationId": "GetBlsHazardsReport",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LeakageReport"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/security/bundle-exclusion": {
      "get": {
        "tags": [
          "Security"
        ],
        "summary": "Educational teaching report about partial-bundle manipulation.",
        "description": "Walks through three illustrative spend-bundle scenarios and assigns verdicts to subset-exclusion attacks. Pure in-memory content.",
        "operationId": "GetBundleExclusionReport",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BundleExclusionTeachingReport"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/mint/upload-asset": {
      "post": {
        "tags": [
          "Mint"
        ],
        "summary": "Pin a media asset to IPFS and return its CID, SHA-256, and gateway URIs.",
        "description": "Accepts multipart/form-data with a single 'file' field. Hard cap 10 MB. No wallet involvement. The SHA-256 returned is the value the browser passes as 'hash' to chia_mintNFT.",
        "operationId": "UploadMintAsset",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PinResultResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/mint/build-metadata": {
      "post": {
        "tags": [
          "Mint"
        ],
        "summary": "Build a CHIP-0007 metadata JSON, pin it, and return its meta_uris + meta_hash.",
        "description": "Accepts the human-readable NFT fields. The server canonicalizes them as CHIP-0007 JSON and pins to IPFS. The SHA-256 returned is the value the browser passes as 'metaHash' to chia_mintNFT.",
        "operationId": "BuildMintMetadata",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MintMetadataRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MintMetadataResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/mint/plan": {
      "post": {
        "tags": [
          "Mint"
        ],
        "summary": "Compose a chia_mintNFT parameter object from pinned asset + metadata + royalty/edition.",
        "description": "Pure function: combines a previously-pinned asset reference and metadata reference into the exact parameter shape the browser passes to the Sage WalletConnect chia_mintNFT call. Mojo fees are emitted as decimal strings.",
        "operationId": "BuildMintPlan",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MintPlanRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MintPlanResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/wallet/fingerprint": {
      "get": {
        "tags": [
          "Admin"
        ],
        "summary": "Currently logged-in wallet fingerprint.",
        "description": "Returns the fingerprint of the wallet daemon's active key. Reveals operator-side state — anonymous in development; gated by the OperatorOnly policy at launch.",
        "operationId": "GetWalletFingerprint",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WalletFingerprintResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/wallets": {
      "get": {
        "tags": [
          "Admin"
        ],
        "summary": "List wallets registered on the local wallet daemon.",
        "description": "Includes wallet id, name, numeric type, type name, and CAT asset id where exposed.",
        "operationId": "ListWallets",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/WalletDescriptorResponse"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/wallets/{walletId}/balance": {
      "get": {
        "tags": [
          "Admin"
        ],
        "summary": "Spendable balance for a wallet on the local daemon.",
        "description": "Mojo fields are emitted as decimal strings to avoid JavaScript precision loss.",
        "operationId": "GetWalletBalance",
        "parameters": [
          {
            "name": "walletId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WalletBalanceResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/wallets/cat": {
      "get": {
        "tags": [
          "Admin"
        ],
        "summary": "All CAT wallets known to the local wallet daemon.",
        "operationId": "ListCatWallets",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CatWalletReportResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/wallets/cat/{assetId}": {
      "get": {
        "tags": [
          "Admin"
        ],
        "summary": "CAT wallet filtered to a single asset id.",
        "description": "Asset id is normalized server-side; accepts hex with or without the 0x prefix.",
        "operationId": "GetCatWalletByAssetId",
        "parameters": [
          {
            "name": "assetId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CatWalletReportResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/sweep/plan": {
      "post": {
        "tags": [
          "Admin"
        ],
        "summary": "Compute a sweep plan without submitting any transaction.",
        "description": "Returns the destination, balances, fee, and resulting sweep amount. This endpoint never executes the sweep — execution lives in the CLI by design.",
        "operationId": "PlanWalletSweep",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SweepPlanRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SweepPlanResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/mempool/watch": {
      "post": {
        "tags": [
          "Admin"
        ],
        "summary": "Snapshot of mempool activity for a list of addresses.",
        "description": "Accepts a list of bech32m addresses or 64-character hex puzzle hashes. Returns the current mempool matches. Public-key-derived watch is intentionally unavailable over HTTP.",
        "operationId": "WatchMempoolAddresses",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MempoolWatchRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MempoolWatchResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AddressDecodeRequest": {
        "required": [
          "address"
        ],
        "type": "object",
        "properties": {
          "address": {
            "type": "string"
          }
        }
      },
      "AddressDecodeResponse": {
        "required": [
          "puzzleHash",
          "hrp"
        ],
        "type": "object",
        "properties": {
          "puzzleHash": {
            "type": "string"
          },
          "hrp": {
            "type": "string"
          }
        }
      },
      "AddressEncodeRequest": {
        "required": [
          "puzzleHash"
        ],
        "type": "object",
        "properties": {
          "puzzleHash": {
            "type": "string"
          },
          "hrp": {
            "type": "string",
            "default": null,
            "nullable": true
          }
        }
      },
      "AddressEncodeResponse": {
        "required": [
          "address",
          "hrp"
        ],
        "type": "object",
        "properties": {
          "address": {
            "type": "string"
          },
          "hrp": {
            "type": "string"
          }
        }
      },
      "AssetIdNormalizeRequest": {
        "required": [
          "assetId"
        ],
        "type": "object",
        "properties": {
          "assetId": {
            "type": "string"
          }
        }
      },
      "AssetIdNormalizeResponse": {
        "required": [
          "assetId"
        ],
        "type": "object",
        "properties": {
          "assetId": {
            "type": "string"
          }
        }
      },
      "BlockchainStateResponse": {
        "required": [
          "endpoint",
          "connected",
          "networkName",
          "synced",
          "peakHeight",
          "peakHash",
          "difficulty",
          "mempoolSize",
          "notes"
        ],
        "type": "object",
        "properties": {
          "endpoint": {
            "type": "string"
          },
          "connected": {
            "type": "boolean"
          },
          "networkName": {
            "type": "string"
          },
          "synced": {
            "type": "boolean"
          },
          "peakHeight": {
            "type": "integer",
            "format": "uint64",
            "nullable": true
          },
          "peakHash": {
            "type": "string",
            "nullable": true
          },
          "difficulty": {
            "type": "integer",
            "format": "uint64",
            "nullable": true
          },
          "mempoolSize": {
            "type": "integer",
            "format": "uint64",
            "nullable": true
          },
          "notes": {
            "type": "string"
          }
        }
      },
      "BundleExclusionScenarioAssessment": {
        "required": [
          "title",
          "description",
          "intendedLesson",
          "priorSubsetSignatureObserved",
          "signatureSubtractionConcern",
          "spends",
          "subsetAssessments",
          "overallVerdict",
          "summary"
        ],
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "intendedLesson": {
            "type": "string"
          },
          "priorSubsetSignatureObserved": {
            "type": "boolean"
          },
          "signatureSubtractionConcern": {
            "type": "boolean"
          },
          "spends": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BundleSpendTeachingCase"
            }
          },
          "subsetAssessments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BundleSubsetAssessment"
            }
          },
          "overallVerdict": {
            "$ref": "#/components/schemas/BundleExclusionVerdict"
          },
          "summary": {
            "type": "string"
          }
        }
      },
      "BundleExclusionTeachingReport": {
        "required": [
          "title",
          "summary",
          "scenarios"
        ],
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "summary": {
            "type": "string"
          },
          "scenarios": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BundleExclusionScenarioAssessment"
            }
          }
        }
      },
      "BundleExclusionVerdict": {
        "type": "integer"
      },
      "BundleSignatureMode": {
        "type": "integer"
      },
      "BundleSpendTeachingCase": {
        "required": [
          "spendId",
          "role",
          "signatureMode",
          "atomicWithPeers",
          "teachingNote"
        ],
        "type": "object",
        "properties": {
          "spendId": {
            "type": "string"
          },
          "role": {
            "type": "string"
          },
          "signatureMode": {
            "$ref": "#/components/schemas/BundleSignatureMode"
          },
          "atomicWithPeers": {
            "type": "boolean"
          },
          "teachingNote": {
            "type": "string"
          }
        }
      },
      "BundleSubsetAssessment": {
        "required": [
          "removedSpendId",
          "remainingSpendIds",
          "verdict",
          "reasoning"
        ],
        "type": "object",
        "properties": {
          "removedSpendId": {
            "type": "string"
          },
          "remainingSpendIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "verdict": {
            "$ref": "#/components/schemas/BundleExclusionVerdict"
          },
          "reasoning": {
            "type": "string"
          }
        }
      },
      "CatWalletReportResponse": {
        "required": [
          "assetIdFilter",
          "wallets",
          "walletCount",
          "totalSpendableBalanceMojos",
          "totalMaxSendAmountMojos",
          "notes"
        ],
        "type": "object",
        "properties": {
          "assetIdFilter": {
            "type": "string",
            "nullable": true
          },
          "wallets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CatWalletSummaryResponse"
            }
          },
          "walletCount": {
            "type": "integer",
            "format": "int32"
          },
          "totalSpendableBalanceMojos": {
            "type": "string"
          },
          "totalMaxSendAmountMojos": {
            "type": "string"
          },
          "notes": {
            "type": "string"
          }
        }
      },
      "CatWalletSummaryResponse": {
        "required": [
          "walletId",
          "walletName",
          "walletType",
          "walletTypeName",
          "assetId",
          "spendableBalanceMojos",
          "maxSendAmountMojos",
          "unspentCoinCount",
          "notes"
        ],
        "type": "object",
        "properties": {
          "walletId": {
            "type": "integer",
            "format": "int32"
          },
          "walletName": {
            "type": "string"
          },
          "walletType": {
            "type": "integer",
            "format": "int32"
          },
          "walletTypeName": {
            "type": "string",
            "nullable": true
          },
          "assetId": {
            "type": "string",
            "nullable": true
          },
          "spendableBalanceMojos": {
            "type": "string"
          },
          "maxSendAmountMojos": {
            "type": "string"
          },
          "unspentCoinCount": {
            "type": "integer",
            "format": "uint32"
          },
          "notes": {
            "type": "string"
          }
        }
      },
      "CoinRecordResponse": {
        "required": [
          "coinId",
          "parentCoinInfo",
          "puzzleHash",
          "amountMojos",
          "confirmedBlockIndex",
          "spent",
          "spentBlockIndex",
          "coinbase",
          "timestampSeconds",
          "timestamp"
        ],
        "type": "object",
        "properties": {
          "coinId": {
            "type": "string",
            "nullable": true
          },
          "parentCoinInfo": {
            "type": "string"
          },
          "puzzleHash": {
            "type": "string"
          },
          "amountMojos": {
            "type": "string"
          },
          "confirmedBlockIndex": {
            "type": "integer",
            "format": "uint32"
          },
          "spent": {
            "type": "boolean"
          },
          "spentBlockIndex": {
            "type": "integer",
            "format": "uint32",
            "nullable": true
          },
          "coinbase": {
            "type": "boolean"
          },
          "timestampSeconds": {
            "type": "integer",
            "format": "uint64",
            "nullable": true
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        }
      },
      "CoinSearchResponse": {
        "required": [
          "queryType",
          "queryValue",
          "items",
          "totalItems",
          "totalAmountMojos",
          "totalUnspentAmountMojos",
          "nextCursor",
          "notes"
        ],
        "type": "object",
        "properties": {
          "queryType": {
            "type": "string"
          },
          "queryValue": {
            "type": "string"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CoinRecordResponse"
            }
          },
          "totalItems": {
            "type": "integer",
            "format": "int32"
          },
          "totalAmountMojos": {
            "type": "string"
          },
          "totalUnspentAmountMojos": {
            "type": "string"
          },
          "nextCursor": {
            "type": "string",
            "nullable": true
          },
          "notes": {
            "type": "string"
          }
        }
      },
      "LeakageFinding": {
        "required": [
          "category",
          "informationLeaked",
          "whyItMatters",
          "example"
        ],
        "type": "object",
        "properties": {
          "category": {
            "type": "string"
          },
          "informationLeaked": {
            "type": "string"
          },
          "whyItMatters": {
            "type": "string"
          },
          "example": {
            "type": "string"
          }
        }
      },
      "LeakageReport": {
        "required": [
          "title",
          "summary",
          "findings"
        ],
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "summary": {
            "type": "string"
          },
          "findings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LeakageFinding"
            }
          }
        }
      },
      "MempoolAddressMatchResponse": {
        "required": [
          "transactionId",
          "matchType",
          "displayName",
          "puzzleHash",
          "amountMojos",
          "parentCoinInfo",
          "feeMojos",
          "cost"
        ],
        "type": "object",
        "properties": {
          "transactionId": {
            "type": "string"
          },
          "matchType": {
            "type": "string"
          },
          "displayName": {
            "type": "string"
          },
          "puzzleHash": {
            "type": "string"
          },
          "amountMojos": {
            "type": "string"
          },
          "parentCoinInfo": {
            "type": "string"
          },
          "feeMojos": {
            "type": "string"
          },
          "cost": {
            "type": "integer",
            "format": "uint64"
          }
        }
      },
      "MempoolWatchedAddressResponse": {
        "required": [
          "source",
          "displayName",
          "address",
          "puzzleHash",
          "hdPath",
          "addressIndex"
        ],
        "type": "object",
        "properties": {
          "source": {
            "type": "string"
          },
          "displayName": {
            "type": "string"
          },
          "address": {
            "type": "string",
            "nullable": true
          },
          "puzzleHash": {
            "type": "string"
          },
          "hdPath": {
            "type": "string",
            "nullable": true
          },
          "addressIndex": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          }
        }
      },
      "MempoolWatchRequest": {
        "required": [
          "addresses"
        ],
        "type": "object",
        "properties": {
          "addresses": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "MempoolWatchResponse": {
        "required": [
          "addressesWatched",
          "matchedTransactionCount",
          "matchCount",
          "watchedAddresses",
          "matches",
          "limitations"
        ],
        "type": "object",
        "properties": {
          "addressesWatched": {
            "type": "integer",
            "format": "int32"
          },
          "matchedTransactionCount": {
            "type": "integer",
            "format": "int32"
          },
          "matchCount": {
            "type": "integer",
            "format": "int32"
          },
          "watchedAddresses": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MempoolWatchedAddressResponse"
            }
          },
          "matches": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MempoolAddressMatchResponse"
            }
          },
          "limitations": {
            "type": "string"
          }
        }
      },
      "MintAssetReferenceRequest": {
        "required": [
          "cid",
          "sha256Hex",
          "sizeBytes",
          "contentType",
          "uris"
        ],
        "type": "object",
        "properties": {
          "cid": {
            "type": "string"
          },
          "sha256Hex": {
            "type": "string"
          },
          "sizeBytes": {
            "type": "integer",
            "format": "int64"
          },
          "contentType": {
            "type": "string"
          },
          "uris": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          }
        }
      },
      "MintAttributeRequest": {
        "required": [
          "traitType",
          "value"
        ],
        "type": "object",
        "properties": {
          "traitType": {
            "type": "string"
          },
          "value": {
            "type": "string"
          },
          "minValue": {
            "type": "integer",
            "format": "int32",
            "default": null,
            "nullable": true
          },
          "maxValue": {
            "type": "integer",
            "format": "int32",
            "default": null,
            "nullable": true
          }
        }
      },
      "MintCollectionRequest": {
        "required": [
          "id",
          "name"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "attributes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/#/properties/attributes/items"
            },
            "default": null,
            "nullable": true
          }
        },
        "default": null,
        "nullable": true
      },
      "MintLicenseRequest": {
        "required": [
          "uris",
          "sha256Hex"
        ],
        "type": "object",
        "properties": {
          "uris": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "sha256Hex": {
            "type": "string",
            "nullable": true
          }
        },
        "default": null,
        "nullable": true
      },
      "MintMetadataReferenceRequest": {
        "required": [
          "cid",
          "sha256Hex",
          "sizeBytes",
          "uris"
        ],
        "type": "object",
        "properties": {
          "cid": {
            "type": "string"
          },
          "sha256Hex": {
            "type": "string"
          },
          "sizeBytes": {
            "type": "integer",
            "format": "int64"
          },
          "uris": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          }
        }
      },
      "MintMetadataRequest": {
        "required": [
          "name",
          "description"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "mintingTool": {
            "type": "string",
            "default": null,
            "nullable": true
          },
          "sensitiveContent": {
            "type": "boolean",
            "default": null,
            "nullable": true
          },
          "seriesNumber": {
            "type": "integer",
            "format": "int32",
            "default": null,
            "nullable": true
          },
          "seriesTotal": {
            "type": "integer",
            "format": "int32",
            "default": null,
            "nullable": true
          },
          "attributes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MintAttributeRequest"
            },
            "default": null,
            "nullable": true
          },
          "collection": {
            "$ref": "#/components/schemas/MintCollectionRequest"
          }
        }
      },
      "MintMetadataResponse": {
        "required": [
          "cid",
          "sha256Hex",
          "sizeBytes",
          "uris",
          "json"
        ],
        "type": "object",
        "properties": {
          "cid": {
            "type": "string"
          },
          "sha256Hex": {
            "type": "string"
          },
          "sizeBytes": {
            "type": "string"
          },
          "uris": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "json": {
            "type": "string"
          }
        }
      },
      "MintPlanRequest": {
        "required": [
          "walletId",
          "asset",
          "metadata",
          "royaltyPercentage",
          "editionNumber",
          "editionTotal"
        ],
        "type": "object",
        "properties": {
          "walletId": {
            "type": "integer",
            "format": "int32"
          },
          "asset": {
            "$ref": "#/components/schemas/MintAssetReferenceRequest"
          },
          "metadata": {
            "$ref": "#/components/schemas/MintMetadataReferenceRequest"
          },
          "royaltyPercentage": {
            "type": "integer",
            "format": "int32"
          },
          "editionNumber": {
            "type": "integer",
            "format": "int32"
          },
          "editionTotal": {
            "type": "integer",
            "format": "int32"
          },
          "royaltyAddress": {
            "type": "string",
            "default": null,
            "nullable": true
          },
          "license": {
            "$ref": "#/components/schemas/MintLicenseRequest"
          },
          "didId": {
            "type": "string",
            "default": null,
            "nullable": true
          },
          "targetAddress": {
            "type": "string",
            "default": null,
            "nullable": true
          },
          "feeMojos": {
            "type": "integer",
            "format": "uint64",
            "default": null,
            "nullable": true
          }
        }
      },
      "MintPlanResponse": {
        "required": [
          "walletId",
          "royaltyAddress",
          "royaltyPercentage",
          "targetAddress",
          "uris",
          "hash",
          "metaUris",
          "metaHash",
          "licenseUris",
          "licenseHash",
          "editionNumber",
          "editionTotal",
          "didId",
          "feeMojos"
        ],
        "type": "object",
        "properties": {
          "walletId": {
            "type": "integer",
            "format": "int32"
          },
          "royaltyAddress": {
            "type": "string"
          },
          "royaltyPercentage": {
            "type": "integer",
            "format": "int32"
          },
          "targetAddress": {
            "type": "string",
            "nullable": true
          },
          "uris": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "hash": {
            "type": "string"
          },
          "metaUris": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "metaHash": {
            "type": "string"
          },
          "licenseUris": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "licenseHash": {
            "type": "string",
            "nullable": true
          },
          "editionNumber": {
            "type": "integer",
            "format": "int32"
          },
          "editionTotal": {
            "type": "integer",
            "format": "int32"
          },
          "didId": {
            "type": "string",
            "nullable": true
          },
          "feeMojos": {
            "type": "string"
          }
        }
      },
      "NodeStatusResponse": {
        "required": [
          "endpoint",
          "connected",
          "networkName",
          "peakHeight",
          "notes"
        ],
        "type": "object",
        "properties": {
          "endpoint": {
            "type": "string"
          },
          "connected": {
            "type": "boolean"
          },
          "networkName": {
            "type": "string"
          },
          "peakHeight": {
            "type": "integer",
            "format": "uint64",
            "nullable": true
          },
          "notes": {
            "type": "string"
          }
        }
      },
      "OfferAssetAmountResponse": {
        "required": [
          "assetId",
          "amountMojos"
        ],
        "type": "object",
        "properties": {
          "assetId": {
            "type": "string"
          },
          "amountMojos": {
            "type": "string"
          }
        }
      },
      "OfferInspectionResponse": {
        "required": [
          "valid",
          "feeMojos",
          "offeredAssets",
          "requestedAssets",
          "notes"
        ],
        "type": "object",
        "properties": {
          "valid": {
            "type": "boolean"
          },
          "feeMojos": {
            "type": "string"
          },
          "offeredAssets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OfferAssetAmountResponse"
            }
          },
          "requestedAssets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/#/properties/offeredAssets/items"
            }
          },
          "notes": {
            "type": "string"
          }
        }
      },
      "OfferInspectRequest": {
        "required": [
          "offer"
        ],
        "type": "object",
        "properties": {
          "offer": {
            "type": "string"
          }
        }
      },
      "OfferValidateResponse": {
        "required": [
          "valid"
        ],
        "type": "object",
        "properties": {
          "valid": {
            "type": "boolean"
          }
        }
      },
      "PinResultResponse": {
        "required": [
          "cid",
          "sha256Hex",
          "sizeBytes",
          "contentType",
          "uris"
        ],
        "type": "object",
        "properties": {
          "cid": {
            "type": "string"
          },
          "sha256Hex": {
            "type": "string"
          },
          "sizeBytes": {
            "type": "string"
          },
          "contentType": {
            "type": "string"
          },
          "uris": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "SweepPlanRequest": {
        "required": [
          "destinationAddress"
        ],
        "type": "object",
        "properties": {
          "destinationAddress": {
            "type": "string"
          },
          "walletId": {
            "type": "integer",
            "format": "int32",
            "default": null,
            "nullable": true
          },
          "feeMojos": {
            "type": "integer",
            "format": "uint64",
            "default": null,
            "nullable": true
          }
        }
      },
      "SweepPlanResponse": {
        "required": [
          "fingerprint",
          "walletId",
          "walletName",
          "walletType",
          "destinationAddress",
          "destinationPuzzleHash",
          "spendableBalanceMojos",
          "maxSendAmountMojos",
          "unspentCoinCount",
          "feeMojos",
          "sweepAmountMojos",
          "limitations"
        ],
        "type": "object",
        "properties": {
          "fingerprint": {
            "type": "integer",
            "format": "uint32"
          },
          "walletId": {
            "type": "integer",
            "format": "int32"
          },
          "walletName": {
            "type": "string"
          },
          "walletType": {
            "type": "integer",
            "format": "int32"
          },
          "destinationAddress": {
            "type": "string"
          },
          "destinationPuzzleHash": {
            "type": "string"
          },
          "spendableBalanceMojos": {
            "type": "string"
          },
          "maxSendAmountMojos": {
            "type": "string"
          },
          "unspentCoinCount": {
            "type": "integer",
            "format": "uint32"
          },
          "feeMojos": {
            "type": "string"
          },
          "sweepAmountMojos": {
            "type": "string"
          },
          "limitations": {
            "type": "string"
          }
        }
      },
      "WalletBalanceResponse": {
        "required": [
          "walletId",
          "spendableBalanceMojos",
          "maxSendAmountMojos",
          "unspentCoinCount"
        ],
        "type": "object",
        "properties": {
          "walletId": {
            "type": "integer",
            "format": "int32"
          },
          "spendableBalanceMojos": {
            "type": "string"
          },
          "maxSendAmountMojos": {
            "type": "string"
          },
          "unspentCoinCount": {
            "type": "integer",
            "format": "uint32"
          }
        }
      },
      "WalletDescriptorResponse": {
        "required": [
          "walletId",
          "name",
          "type",
          "walletTypeName",
          "assetId"
        ],
        "type": "object",
        "properties": {
          "walletId": {
            "type": "integer",
            "format": "int32"
          },
          "name": {
            "type": "string"
          },
          "type": {
            "type": "integer",
            "format": "int32"
          },
          "walletTypeName": {
            "type": "string",
            "nullable": true
          },
          "assetId": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "WalletFingerprintResponse": {
        "required": [
          "fingerprint"
        ],
        "type": "object",
        "properties": {
          "fingerprint": {
            "type": "integer",
            "format": "uint32"
          }
        }
      }
    }
  },
  "tags": [
    {
      "name": "Health"
    },
    {
      "name": "Address"
    },
    {
      "name": "Node"
    },
    {
      "name": "Coins"
    },
    {
      "name": "Offers"
    },
    {
      "name": "Security"
    },
    {
      "name": "Mint"
    },
    {
      "name": "Admin"
    }
  ]
}