From d32cb4ac0b5b10a4cd0e947edbf2c00b143005b6 Mon Sep 17 00:00:00 2001 From: gmemez Date: Tue, 4 Feb 2025 19:08:54 +0700 Subject: [PATCH 1/6] add documentation --- bun.lock | 52 +- docs/api-docs.json | 1051 ++++++++++++++++++++++ docs/generate.ts | 127 +++ docs/generateHtml.ts | 213 +++++ docs/generateMethodsDocs.ts | 149 ++++ docs/generateTypesDocs.ts | 186 ++++ docs/serveDocs.ts | 18 + package-lock.json | 1588 --------------------------------- package.json | 12 +- src/client.ts | 145 ++- src/schemas/inscription.ts | 6 +- src/schemas/output.ts | 4 +- src/schemas/rune.ts | 6 +- src/schemas/sat.ts | 10 +- src/test/unit/schemas.test.ts | 38 +- src/types/index.ts | 83 +- 16 files changed, 2032 insertions(+), 1656 deletions(-) create mode 100644 docs/api-docs.json create mode 100644 docs/generate.ts create mode 100644 docs/generateHtml.ts create mode 100644 docs/generateMethodsDocs.ts create mode 100644 docs/generateTypesDocs.ts create mode 100644 docs/serveDocs.ts delete mode 100644 package-lock.json diff --git a/bun.lock b/bun.lock index 7e4240a..58ba2e2 100644 --- a/bun.lock +++ b/bun.lock @@ -9,6 +9,10 @@ }, "devDependencies": { "@types/bun": "^1.2.1", + "@types/react": "^19.0.8", + "@types/react-dom": "^19.0.3", + "react": "^19.0.0", + "react-dom": "^19.0.0", }, }, }, @@ -17,7 +21,7 @@ "@eslint-community/regexpp": ["@eslint-community/regexpp@4.12.1", "", {}, "sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ=="], - "@eslint/config-array": ["@eslint/config-array@0.19.1", "", { "dependencies": { "@eslint/object-schema": "^2.1.5", "debug": "^4.3.1", "minimatch": "^3.1.2" } }, "sha512-fo6Mtm5mWyKjA/Chy1BYTdn5mGJoDNjC7C64ug20ADsRDGrA85bN3uK3MaKbeRkRuuIEAR5N33Jr1pbm411/PA=="], + "@eslint/config-array": ["@eslint/config-array@0.19.2", "", { "dependencies": { "@eslint/object-schema": "^2.1.6", "debug": "^4.3.1", "minimatch": "^3.1.2" } }, "sha512-GNKqxfHG2ySmJOBSHg7LxeUx4xpuCoFjacmlCoYWEbaPXLwvfIjixRI12xCQZeULksQb23uiA8F40w5TojpV7w=="], "@eslint/core": ["@eslint/core@0.10.0", "", { "dependencies": { "@types/json-schema": "^7.0.15" } }, "sha512-gFHJ+xBOo4G3WRlR1e/3G8A6/KZAH6zcE/hkLRCZTi/B9avAG365QhFA8uOGzTMqgTghpn7/fSnscW++dpMSAw=="], @@ -25,7 +29,7 @@ "@eslint/js": ["@eslint/js@9.19.0", "", {}, "sha512-rbq9/g38qjfqFLOVPvwjIvFFdNziEC5S65jmjPw5r6A//QH+W91akh9irMwjDN8zKUTak6W9EsAv4m/7Wnw0UQ=="], - "@eslint/object-schema": ["@eslint/object-schema@2.1.5", "", {}, "sha512-o0bhxnL89h5Bae5T318nFoFzGy+YE5i/gGkoPAgkmTVdRKTiv3p8JHevPiPaMwoloKfEiiaHlawCqaZMqRm+XQ=="], + "@eslint/object-schema": ["@eslint/object-schema@2.1.6", "", {}, "sha512-RBMg5FRL0I0gs51M/guSAj5/e14VQ4tpZnQNWwuDT66P14I43ItmPfIZRhO9fUVIPOAQXU47atlywZ/czoqFPA=="], "@eslint/plugin-kit": ["@eslint/plugin-kit@0.2.5", "", { "dependencies": { "@eslint/core": "^0.10.0", "levn": "^0.4.1" } }, "sha512-lB05FkqEdUg2AA0xEbUz0SnkXT1LcCTa438W4IWTUh4hdOnVbQyOJ81OrDXsJk/LSiJHubgGEFoR5EHq1NsH1A=="], @@ -43,31 +47,35 @@ "@nodelib/fs.walk": ["@nodelib/fs.walk@1.2.8", "", { "dependencies": { "@nodelib/fs.scandir": "2.1.5", "fastq": "^1.6.0" } }, "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg=="], - "@types/bun": ["@types/bun@1.2.1", "", { "dependencies": { "bun-types": "1.2.1" } }, "sha512-iiCeMAKMkft8EPQJxSbpVRD0DKqrh91w40zunNajce3nMNNFd/LnAquVisSZC+UpTMjDwtcdyzbWct08IvEqRA=="], + "@types/bun": ["@types/bun@1.2.2", "", { "dependencies": { "bun-types": "1.2.2" } }, "sha512-tr74gdku+AEDN5ergNiBnplr7hpDp3V1h7fqI2GcR/rsUaM39jpSeKH0TFibRvU0KwniRx5POgaYnaXbk0hU+w=="], "@types/estree": ["@types/estree@1.0.6", "", {}, "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw=="], "@types/json-schema": ["@types/json-schema@7.0.15", "", {}, "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA=="], - "@types/node": ["@types/node@22.12.0", "", { "dependencies": { "undici-types": "~6.20.0" } }, "sha512-Fll2FZ1riMjNmlmJOdAyY5pUbkftXslB5DgEzlIuNaiWhXd00FhWxVC/r4yV/4wBb9JfImTu+jiSvXTkJ7F/gA=="], + "@types/node": ["@types/node@22.13.0", "", { "dependencies": { "undici-types": "~6.20.0" } }, "sha512-ClIbNe36lawluuvq3+YYhnIN2CELi+6q8NpnM7PYp4hBn/TatfboPgVSm2rwKRfnV2M+Ty9GWDFI64KEe+kysA=="], + + "@types/react": ["@types/react@19.0.8", "", { "dependencies": { "csstype": "^3.0.2" } }, "sha512-9P/o1IGdfmQxrujGbIMDyYaaCykhLKc0NGCtYcECNUr9UAaDe4gwvV9bR6tvd5Br1SG0j+PBpbKr2UYY8CwqSw=="], + + "@types/react-dom": ["@types/react-dom@19.0.3", "", { "peerDependencies": { "@types/react": "^19.0.0" } }, "sha512-0Knk+HJiMP/qOZgMyNFamlIjw9OFCsyC2ZbigmEEyXXixgre6IQpm/4V+r3qH4GC1JPvRJKInw+on2rV6YZLeA=="], "@types/ws": ["@types/ws@8.5.14", "", { "dependencies": { "@types/node": "*" } }, "sha512-bd/YFLW+URhBzMXurx7lWByOu+xzU9+kb3RboOteXYDfW+tr+JZa99OyNmPINEGB/ahzKrEuc8rcv4gnpJmxTw=="], - "@typescript-eslint/eslint-plugin": ["@typescript-eslint/eslint-plugin@8.22.0", "", { "dependencies": { "@eslint-community/regexpp": "^4.10.0", "@typescript-eslint/scope-manager": "8.22.0", "@typescript-eslint/type-utils": "8.22.0", "@typescript-eslint/utils": "8.22.0", "@typescript-eslint/visitor-keys": "8.22.0", "graphemer": "^1.4.0", "ignore": "^5.3.1", "natural-compare": "^1.4.0", "ts-api-utils": "^2.0.0" }, "peerDependencies": { "@typescript-eslint/parser": "^8.0.0 || ^8.0.0-alpha.0", "eslint": "^8.57.0 || ^9.0.0", "typescript": ">=4.8.4 <5.8.0" } }, "sha512-4Uta6REnz/xEJMvwf72wdUnC3rr4jAQf5jnTkeRQ9b6soxLxhDEbS/pfMPoJLDfFPNVRdryqWUIV/2GZzDJFZw=="], + "@typescript-eslint/eslint-plugin": ["@typescript-eslint/eslint-plugin@8.23.0", "", { "dependencies": { "@eslint-community/regexpp": "^4.10.0", "@typescript-eslint/scope-manager": "8.23.0", "@typescript-eslint/type-utils": "8.23.0", "@typescript-eslint/utils": "8.23.0", "@typescript-eslint/visitor-keys": "8.23.0", "graphemer": "^1.4.0", "ignore": "^5.3.1", "natural-compare": "^1.4.0", "ts-api-utils": "^2.0.1" }, "peerDependencies": { "@typescript-eslint/parser": "^8.0.0 || ^8.0.0-alpha.0", "eslint": "^8.57.0 || ^9.0.0", "typescript": ">=4.8.4 <5.8.0" } }, "sha512-vBz65tJgRrA1Q5gWlRfvoH+w943dq9K1p1yDBY2pc+a1nbBLZp7fB9+Hk8DaALUbzjqlMfgaqlVPT1REJdkt/w=="], - "@typescript-eslint/parser": ["@typescript-eslint/parser@8.22.0", "", { "dependencies": { "@typescript-eslint/scope-manager": "8.22.0", "@typescript-eslint/types": "8.22.0", "@typescript-eslint/typescript-estree": "8.22.0", "@typescript-eslint/visitor-keys": "8.22.0", "debug": "^4.3.4" }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0", "typescript": ">=4.8.4 <5.8.0" } }, "sha512-MqtmbdNEdoNxTPzpWiWnqNac54h8JDAmkWtJExBVVnSrSmi9z+sZUt0LfKqk9rjqmKOIeRhO4fHHJ1nQIjduIQ=="], + "@typescript-eslint/parser": ["@typescript-eslint/parser@8.23.0", "", { "dependencies": { "@typescript-eslint/scope-manager": "8.23.0", "@typescript-eslint/types": "8.23.0", "@typescript-eslint/typescript-estree": "8.23.0", "@typescript-eslint/visitor-keys": "8.23.0", "debug": "^4.3.4" }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0", "typescript": ">=4.8.4 <5.8.0" } }, "sha512-h2lUByouOXFAlMec2mILeELUbME5SZRN/7R9Cw2RD2lRQQY08MWMM+PmVVKKJNK1aIwqTo9t/0CvOxwPbRIE2Q=="], - "@typescript-eslint/scope-manager": ["@typescript-eslint/scope-manager@8.22.0", "", { "dependencies": { "@typescript-eslint/types": "8.22.0", "@typescript-eslint/visitor-keys": "8.22.0" } }, "sha512-/lwVV0UYgkj7wPSw0o8URy6YI64QmcOdwHuGuxWIYznO6d45ER0wXUbksr9pYdViAofpUCNJx/tAzNukgvaaiQ=="], + "@typescript-eslint/scope-manager": ["@typescript-eslint/scope-manager@8.23.0", "", { "dependencies": { "@typescript-eslint/types": "8.23.0", "@typescript-eslint/visitor-keys": "8.23.0" } }, "sha512-OGqo7+dXHqI7Hfm+WqkZjKjsiRtFUQHPdGMXzk5mYXhJUedO7e/Y7i8AK3MyLMgZR93TX4bIzYrfyVjLC+0VSw=="], - "@typescript-eslint/type-utils": ["@typescript-eslint/type-utils@8.22.0", "", { "dependencies": { "@typescript-eslint/typescript-estree": "8.22.0", "@typescript-eslint/utils": "8.22.0", "debug": "^4.3.4", "ts-api-utils": "^2.0.0" }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0", "typescript": ">=4.8.4 <5.8.0" } }, "sha512-NzE3aB62fDEaGjaAYZE4LH7I1MUwHooQ98Byq0G0y3kkibPJQIXVUspzlFOmOfHhiDLwKzMlWxaNv+/qcZurJA=="], + "@typescript-eslint/type-utils": ["@typescript-eslint/type-utils@8.23.0", "", { "dependencies": { "@typescript-eslint/typescript-estree": "8.23.0", "@typescript-eslint/utils": "8.23.0", "debug": "^4.3.4", "ts-api-utils": "^2.0.1" }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0", "typescript": ">=4.8.4 <5.8.0" } }, "sha512-iIuLdYpQWZKbiH+RkCGc6iu+VwscP5rCtQ1lyQ7TYuKLrcZoeJVpcLiG8DliXVkUxirW/PWlmS+d6yD51L9jvA=="], - "@typescript-eslint/types": ["@typescript-eslint/types@8.22.0", "", {}, "sha512-0S4M4baNzp612zwpD4YOieP3VowOARgK2EkN/GBn95hpyF8E2fbMT55sRHWBq+Huaqk3b3XK+rxxlM8sPgGM6A=="], + "@typescript-eslint/types": ["@typescript-eslint/types@8.23.0", "", {}, "sha512-1sK4ILJbCmZOTt9k4vkoulT6/y5CHJ1qUYxqpF1K/DBAd8+ZUL4LlSCxOssuH5m4rUaaN0uS0HlVPvd45zjduQ=="], - "@typescript-eslint/typescript-estree": ["@typescript-eslint/typescript-estree@8.22.0", "", { "dependencies": { "@typescript-eslint/types": "8.22.0", "@typescript-eslint/visitor-keys": "8.22.0", "debug": "^4.3.4", "fast-glob": "^3.3.2", "is-glob": "^4.0.3", "minimatch": "^9.0.4", "semver": "^7.6.0", "ts-api-utils": "^2.0.0" }, "peerDependencies": { "typescript": ">=4.8.4 <5.8.0" } }, "sha512-SJX99NAS2ugGOzpyhMza/tX+zDwjvwAtQFLsBo3GQxiGcvaKlqGBkmZ+Y1IdiSi9h4Q0Lr5ey+Cp9CGWNY/F/w=="], + "@typescript-eslint/typescript-estree": ["@typescript-eslint/typescript-estree@8.23.0", "", { "dependencies": { "@typescript-eslint/types": "8.23.0", "@typescript-eslint/visitor-keys": "8.23.0", "debug": "^4.3.4", "fast-glob": "^3.3.2", "is-glob": "^4.0.3", "minimatch": "^9.0.4", "semver": "^7.6.0", "ts-api-utils": "^2.0.1" }, "peerDependencies": { "typescript": ">=4.8.4 <5.8.0" } }, "sha512-LcqzfipsB8RTvH8FX24W4UUFk1bl+0yTOf9ZA08XngFwMg4Kj8A+9hwz8Cr/ZS4KwHrmo9PJiLZkOt49vPnuvQ=="], - "@typescript-eslint/utils": ["@typescript-eslint/utils@8.22.0", "", { "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", "@typescript-eslint/scope-manager": "8.22.0", "@typescript-eslint/types": "8.22.0", "@typescript-eslint/typescript-estree": "8.22.0" }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0", "typescript": ">=4.8.4 <5.8.0" } }, "sha512-T8oc1MbF8L+Bk2msAvCUzjxVB2Z2f+vXYfcucE2wOmYs7ZUwco5Ep0fYZw8quNwOiw9K8GYVL+Kgc2pETNTLOg=="], + "@typescript-eslint/utils": ["@typescript-eslint/utils@8.23.0", "", { "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", "@typescript-eslint/scope-manager": "8.23.0", "@typescript-eslint/types": "8.23.0", "@typescript-eslint/typescript-estree": "8.23.0" }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0", "typescript": ">=4.8.4 <5.8.0" } }, "sha512-uB/+PSo6Exu02b5ZEiVtmY6RVYO7YU5xqgzTIVZwTHvvK3HsL8tZZHFaTLFtRG3CsV4A5mhOv+NZx5BlhXPyIA=="], - "@typescript-eslint/visitor-keys": ["@typescript-eslint/visitor-keys@8.22.0", "", { "dependencies": { "@typescript-eslint/types": "8.22.0", "eslint-visitor-keys": "^4.2.0" } }, "sha512-AWpYAXnUgvLNabGTy3uBylkgZoosva/miNd1I8Bz3SjotmQPbVqhO4Cczo8AsZ44XVErEBPr/CRSgaj8sG7g0w=="], + "@typescript-eslint/visitor-keys": ["@typescript-eslint/visitor-keys@8.23.0", "", { "dependencies": { "@typescript-eslint/types": "8.23.0", "eslint-visitor-keys": "^4.2.0" } }, "sha512-oWWhcWDLwDfu++BGTZcmXWqpwtkwb5o7fxUIGksMQQDSdPW9prsSnfIOZMlsj4vBOSrcnjIUZMiIjODgGosFhQ=="], "acorn": ["acorn@8.14.0", "", { "bin": { "acorn": "bin/acorn" } }, "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA=="], @@ -85,7 +93,7 @@ "braces": ["braces@3.0.3", "", { "dependencies": { "fill-range": "^7.1.1" } }, "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA=="], - "bun-types": ["bun-types@1.2.1", "", { "dependencies": { "@types/node": "*", "@types/ws": "~8.5.10" } }, "sha512-p7bmXUWmrPWxhcbFVk7oUXM5jAGt94URaoa3qf4mz43MEhNAo/ot1urzBqctgvuq7y9YxkuN51u+/qm4BiIsHw=="], + "bun-types": ["bun-types@1.2.2", "", { "dependencies": { "@types/node": "*", "@types/ws": "~8.5.10" } }, "sha512-RCbMH5elr9gjgDGDhkTTugA21XtJAy/9jkKe/G3WR2q17VPGhcquf9Sir6uay9iW+7P/BV0CAHA1XlHXMAVKHg=="], "callsites": ["callsites@3.1.0", "", {}, "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ=="], @@ -99,6 +107,8 @@ "cross-spawn": ["cross-spawn@7.0.6", "", { "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", "which": "^2.0.1" } }, "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA=="], + "csstype": ["csstype@3.1.3", "", {}, "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw=="], + "debug": ["debug@4.4.0", "", { "dependencies": { "ms": "^2.1.3" } }, "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA=="], "deep-is": ["deep-is@0.1.4", "", {}, "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ=="], @@ -129,7 +139,7 @@ "fast-levenshtein": ["fast-levenshtein@2.0.6", "", {}, "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw=="], - "fastq": ["fastq@1.18.0", "", { "dependencies": { "reusify": "^1.0.4" } }, "sha512-QKHXPW0hD8g4UET03SdOdunzSouc9N4AuHdsX8XNcTsuz+yYFILVNIX4l9yHABMhiEI9Db0JTTIpu0wB+Y1QQw=="], + "fastq": ["fastq@1.19.0", "", { "dependencies": { "reusify": "^1.0.4" } }, "sha512-7SFSRCNjBQIZH/xZR3iy5iQYR8aGBE0h3VG6/cwlbrpdciNYBMotQav8c1XI3HjHH+NikUpP53nPdlZSdWmFzA=="], "file-entry-cache": ["file-entry-cache@8.0.0", "", { "dependencies": { "flat-cache": "^4.0.0" } }, "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ=="], @@ -151,7 +161,7 @@ "ignore": ["ignore@5.3.2", "", {}, "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g=="], - "import-fresh": ["import-fresh@3.3.0", "", { "dependencies": { "parent-module": "^1.0.0", "resolve-from": "^4.0.0" } }, "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw=="], + "import-fresh": ["import-fresh@3.3.1", "", { "dependencies": { "parent-module": "^1.0.0", "resolve-from": "^4.0.0" } }, "sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ=="], "imurmurhash": ["imurmurhash@0.1.4", "", {}, "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA=="], @@ -209,13 +219,19 @@ "queue-microtask": ["queue-microtask@1.2.3", "", {}, "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A=="], + "react": ["react@19.0.0", "", {}, "sha512-V8AVnmPIICiWpGfm6GLzCR/W5FXLchHop40W4nXBmdlEceh16rCN8O8LNWm5bh5XUX91fh7KpA+W0TgMKmgTpQ=="], + + "react-dom": ["react-dom@19.0.0", "", { "dependencies": { "scheduler": "^0.25.0" }, "peerDependencies": { "react": "^19.0.0" } }, "sha512-4GV5sHFG0e/0AD4X+ySy6UJd3jVl1iNsNHdpad0qhABJ11twS3TTBnseqsKurKcsNqCEFeGL3uLpVChpIO3QfQ=="], + "resolve-from": ["resolve-from@4.0.0", "", {}, "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g=="], "reusify": ["reusify@1.0.4", "", {}, "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw=="], "run-parallel": ["run-parallel@1.2.0", "", { "dependencies": { "queue-microtask": "^1.2.2" } }, "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA=="], - "semver": ["semver@7.6.3", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A=="], + "scheduler": ["scheduler@0.25.0", "", {}, "sha512-xFVuu11jh+xcO7JOAGJNOXld8/TcEHK/4CituBUeUb5hqxJLj9YuemAEuvm9gQ/+pgXYfbQuqAkiYu+u7YEsNA=="], + + "semver": ["semver@7.7.0", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-DrfFnPzblFmNrIZzg5RzHegbiRWg7KMR7btwi2yjHwx06zsUbO5g613sVwEV7FTwmzJu+Io0lJe2GJ3LxqpvBQ=="], "shebang-command": ["shebang-command@2.0.0", "", { "dependencies": { "shebang-regex": "^3.0.0" } }, "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA=="], @@ -227,13 +243,13 @@ "to-regex-range": ["to-regex-range@5.0.1", "", { "dependencies": { "is-number": "^7.0.0" } }, "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ=="], - "ts-api-utils": ["ts-api-utils@2.0.0", "", { "peerDependencies": { "typescript": ">=4.8.4" } }, "sha512-xCt/TOAc+EOHS1XPnijD3/yzpH6qg2xppZO1YDqGoVsNXfQfzHpOdNuXwrwOU8u4ITXJyDCTyt8w5g1sZv9ynQ=="], + "ts-api-utils": ["ts-api-utils@2.0.1", "", { "peerDependencies": { "typescript": ">=4.8.4" } }, "sha512-dnlgjFSVetynI8nzgJ+qF62efpglpWRk8isUEWZGWlJYySCTD6aKvbUDu+zbPeDakk3bg5H4XpitHukgfL1m9w=="], "type-check": ["type-check@0.4.0", "", { "dependencies": { "prelude-ls": "^1.2.1" } }, "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew=="], "typescript": ["typescript@5.7.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw=="], - "typescript-eslint": ["typescript-eslint@8.22.0", "", { "dependencies": { "@typescript-eslint/eslint-plugin": "8.22.0", "@typescript-eslint/parser": "8.22.0", "@typescript-eslint/utils": "8.22.0" }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0", "typescript": ">=4.8.4 <5.8.0" } }, "sha512-Y2rj210FW1Wb6TWXzQc5+P+EWI9/zdS57hLEc0gnyuvdzWo8+Y8brKlbj0muejonhMI/xAZCnZZwjbIfv1CkOw=="], + "typescript-eslint": ["typescript-eslint@8.23.0", "", { "dependencies": { "@typescript-eslint/eslint-plugin": "8.23.0", "@typescript-eslint/parser": "8.23.0", "@typescript-eslint/utils": "8.23.0" }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0", "typescript": ">=4.8.4 <5.8.0" } }, "sha512-/LBRo3HrXr5LxmrdYSOCvoAMm7p2jNizNfbIpCgvG4HMsnoprRUOce/+8VJ9BDYWW68rqIENE/haVLWPeFZBVQ=="], "undici-types": ["undici-types@6.20.0", "", {}, "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg=="], diff --git a/docs/api-docs.json b/docs/api-docs.json new file mode 100644 index 0000000..0cc2fbe --- /dev/null +++ b/docs/api-docs.json @@ -0,0 +1,1051 @@ +{ + "classMethods": [ + { + "name": "getAddressInfo", + "parameters": [ + { + "name": "address", + "type": "string", + "description": "Bitcoin address to query." + } + ], + "description": "Retrieves information about a specific address including its outputs,\ninscriptions, and rune balances.", + "endpoint": "/address/{address}", + "httpMethod": "GET", + "returnType": "Promise", + "responseSchema": "AddressInfoSchema)" + }, + { + "name": "getBlock", + "parameters": [ + { + "name": "heightOrHash", + "type": "number | BlockHash", + "description": "Block height (number) or block hash (string)." + } + ], + "description": "Fetches details about a specific block by its height or hash.", + "endpoint": "/block/{heightOrHash}", + "httpMethod": "GET", + "returnType": "Promise", + "responseSchema": "BlockInfoSchema)" + }, + { + "name": "getBlockCount", + "parameters": [], + "description": "Retrieves the total number of blocks in the blockchain.", + "endpoint": "/blockcount", + "httpMethod": "GET", + "returnType": "Promise", + "responseSchema": "z.number()" + }, + { + "name": "getBlockHashByHeight", + "parameters": [ + { + "name": "height", + "type": "number", + "description": "Block height to get hash for" + } + ], + "description": "Gets the hash of a block at the specified height.", + "endpoint": "/blockhash/{height}", + "httpMethod": "GET", + "returnType": "Promise", + "responseSchema": "BlockHashSchema)" + }, + { + "name": "getLatestBlockHash", + "parameters": [], + "description": "Gets the hash of the latest block.", + "endpoint": "/blockhash", + "httpMethod": "GET", + "returnType": "Promise", + "responseSchema": "BlockHashSchema)" + }, + { + "name": "getLatestBlockHeight", + "parameters": [], + "description": "Gets the height of the latest block.", + "endpoint": "/blockheight", + "httpMethod": "GET", + "returnType": "Promise", + "responseSchema": "z.number()" + }, + { + "name": "getLatestBlocks", + "parameters": [], + "description": "Returns the height of the latest block, the blockhashes of the last 100 blocks, and featured inscriptions from them.", + "endpoint": "/blocks", + "httpMethod": "GET", + "returnType": "Promise", + "responseSchema": "BlocksResponseSchema)" + }, + { + "name": "getLatestBlockTime", + "parameters": [], + "description": "Gets the timestamp of the latest block.", + "endpoint": "/blocktime", + "httpMethod": "GET", + "returnType": "Promise", + "responseSchema": "z.number()" + }, + { + "name": "getInscription", + "parameters": [ + { + "name": "id", + "type": "string", + "description": "Inscription ID" + } + ], + "description": "Retrieves information about a specific inscription by its ID.", + "endpoint": "/inscription/{id}", + "httpMethod": "GET", + "returnType": "Promise", + "responseSchema": "InscriptionInfoSchema)" + }, + { + "name": "getInscriptionChild", + "parameters": [ + { + "name": "id", + "type": "string", + "description": "Parent inscription ID" + }, + { + "name": "child", + "type": "number", + "description": "Index of the child inscription" + } + ], + "description": "Gets a specific child inscription of a parent inscription.", + "endpoint": "/inscription/{id}/{child}", + "httpMethod": "GET", + "returnType": "Promise", + "responseSchema": "child)" + }, + { + "name": "getLatestInscriptions", + "parameters": [], + "description": "Gets a list of the 100 most recent inscriptions.", + "endpoint": "/inscriptions", + "httpMethod": "GET", + "returnType": "Promise", + "responseSchema": "InscriptionsResponseSchema)" + }, + { + "name": "getInscriptionsByIds", + "parameters": [ + { + "name": "ids", + "type": "string[]", + "description": "Array of inscription IDs to fetch" + } + ], + "description": "Retrieves information about multiple inscriptions by their IDs.", + "endpoint": "/inscriptions", + "httpMethod": "POST", + "returnType": "Promise", + "responseSchema": "" + }, + { + "name": "getInscriptionsByPage", + "parameters": [ + { + "name": "page", + "type": "number", + "description": "Page number to fetch" + } + ], + "description": "Gets inscriptions for a specific page number in paginated results.", + "endpoint": "/inscriptions/{page}", + "httpMethod": "GET", + "returnType": "Promise", + "responseSchema": "InscriptionsResponseSchema" + }, + { + "name": "getInscriptionsByBlock", + "parameters": [ + { + "name": "height", + "type": "number", + "description": "Block height to fetch inscriptions from" + } + ], + "description": "Gets all inscriptions in a specific block.", + "endpoint": "/inscriptions/block/{height}", + "httpMethod": "GET", + "returnType": "Promise", + "responseSchema": "InscriptionsResponseSchema" + }, + { + "name": "getOutput", + "parameters": [ + { + "name": "outpoint", + "type": "string", + "description": "Transaction outpoint in format {txid}:{vout}" + } + ], + "description": "Retrieves information about a specific UTXO.", + "endpoint": "/output/{outpoint}", + "httpMethod": "GET", + "returnType": "Promise", + "responseSchema": "OutputInfoSchema)" + }, + { + "name": "getOutputs", + "parameters": [ + { + "name": "outpoints", + "type": "string[]", + "description": "Array of outpoints to fetch" + } + ], + "description": "Gets information about multiple UTXOs.", + "endpoint": "/outputs", + "httpMethod": "POST", + "returnType": "Promise", + "responseSchema": "" + }, + { + "name": "getOutputsByAddress", + "parameters": [ + { + "name": "address", + "type": "string", + "description": "Bitcoin address to get outputs for" + }, + { + "name": "type", + "type": "OutputType", + "description": "" + } + ], + "description": "Gets all UTXOs for a specific address, optionally filtered by type.", + "endpoint": "/outputs/{address}?type={type}", + "httpMethod": "GET", + "returnType": "Promise", + "responseSchema": "type)" + }, + { + "name": "getRune", + "parameters": [ + { + "name": "name", + "type": "string", + "description": "Rune name" + } + ], + "description": "Gets information about a specific rune by name.", + "endpoint": "/rune/{name}", + "httpMethod": "GET", + "returnType": "Promise", + "responseSchema": "RuneResponseSchema)" + }, + { + "name": "getLatestRunes", + "parameters": [], + "description": "Gets a list of the 100 most recent runes.", + "endpoint": "/runes", + "httpMethod": "GET", + "returnType": "Promise", + "responseSchema": "RunesResponseSchema)" + }, + { + "name": "getRunesByPage", + "parameters": [ + { + "name": "page", + "type": "number", + "description": "Page number to fetch" + } + ], + "description": "Gets runes for a specific page number in paginated results.", + "endpoint": "/runes/{page}", + "httpMethod": "GET", + "returnType": "Promise", + "responseSchema": "RunesResponseSchema)" + }, + { + "name": "getSat", + "parameters": [ + { + "name": "number", + "type": "number", + "description": "Satoshi number" + } + ], + "description": "Gets information about a specific satoshi by its number.", + "endpoint": "/sat/{number}", + "httpMethod": "GET", + "returnType": "Promise", + "responseSchema": "SatInfoSchema)" + }, + { + "name": "getTransaction", + "parameters": [ + { + "name": "txId", + "type": "string", + "description": "Transaction ID" + } + ], + "description": "Gets information about a specific transaction.", + "endpoint": "/tx/{txId}", + "httpMethod": "GET", + "returnType": "Promise", + "responseSchema": "TransactionInfoSchema)" + }, + { + "name": "getServerStatus", + "parameters": [], + "description": "Gets the current server status and information.", + "endpoint": "/status", + "httpMethod": "GET", + "returnType": "Promise", + "responseSchema": "ServerStatusSchema)" + } + ], + "exportedTypes": [ + { + "name": "AddressInfo", + "type": "object", + "description": "Comprehensive information about a Bitcoin address including its balance, outputs, inscriptions, and runes balances.", + "properties": [ + { + "name": "inscriptions", + "type": "string[] | null", + "description": "" + }, + { + "name": "outputs", + "type": "string[]", + "description": "" + }, + { + "name": "runes_balances", + "type": "string[][] | null", + "description": "" + }, + { + "name": "sat_balance", + "type": "number", + "description": "" + } + ], + "sourceFile": "address.ts" + }, + { + "name": "BlockInfo", + "type": "object", + "description": "Detailed block information including height, hash, timestamp, transaction list, and inscription data.", + "properties": [ + { + "name": "best_height", + "type": "number", + "description": "" + }, + { + "name": "hash", + "type": "BlockHash", + "description": "" + }, + { + "name": "height", + "type": "number", + "description": "" + }, + { + "name": "inscriptions", + "type": "string[]", + "description": "" + }, + { + "name": "runes", + "type": "string[]", + "description": "" + }, + { + "name": "target", + "type": "string", + "description": "" + }, + { + "name": "transactions", + "type": "Transaction[]", + "description": "" + } + ], + "sourceFile": "block.ts" + }, + { + "name": "BlocksResponse", + "type": "object", + "description": "Paginated response containing a list of recent blocks and metadata.", + "properties": [ + { + "name": "blocks", + "type": "BlockHash[]", + "description": "" + }, + { + "name": "featured_blocks", + "type": "Record", + "description": "" + }, + { + "name": "last", + "type": "number", + "description": "" + } + ], + "sourceFile": "block.ts" + }, + { + "name": "CharmType", + "type": "enum", + "description": "Special characteristics or properties of a sat (e.g. \"cursed\", \"epic\", \"burned\").", + "values": [ + "burned", + "coin", + "cursed", + "epic", + "legendary", + "lost", + "mythic", + "nineball", + "palindrome", + "rare", + "reinscription", + "unbound", + "uncommon", + "vindicated" + ], + "sourceFile": "inscription.ts" + }, + { + "name": "InscriptionInfo", + "type": "object", + "description": "Comprehensive information about an inscription including its content type, genesis data, location and transfer history.", + "properties": [ + { + "name": "address", + "type": "string | null", + "description": "" + }, + { + "name": "charms", + "type": "CharmType[]", + "description": "" + }, + { + "name": "child_count", + "type": "number", + "description": "" + }, + { + "name": "children", + "type": "string[]", + "description": "" + }, + { + "name": "content_length", + "type": "number | null", + "description": "" + }, + { + "name": "content_type", + "type": "string | null", + "description": "" + }, + { + "name": "effective_content_type", + "type": "string | null", + "description": "" + }, + { + "name": "fee", + "type": "number", + "description": "" + }, + { + "name": "height", + "type": "number", + "description": "" + }, + { + "name": "id", + "type": "string", + "description": "" + }, + { + "name": "metaprotocol", + "type": "string | null", + "description": "" + }, + { + "name": "next", + "type": "string | null | null", + "description": "" + }, + { + "name": "number", + "type": "number", + "description": "" + }, + { + "name": "parents", + "type": "string[]", + "description": "" + }, + { + "name": "previous", + "type": "string | null", + "description": "" + }, + { + "name": "rune", + "type": "string | null", + "description": "" + }, + { + "name": "sat", + "type": "number | null", + "description": "" + }, + { + "name": "satpoint", + "type": "string", + "description": "" + }, + { + "name": "timestamp", + "type": "number", + "description": "" + }, + { + "name": "value", + "type": "number | null", + "description": "" + } + ], + "sourceFile": "inscription.ts" + }, + { + "name": "InscriptionsResponse", + "type": "object", + "description": "Paginated response containing a list of inscriptions and metadata.", + "properties": [ + { + "name": "ids", + "type": "string[]", + "description": "" + }, + { + "name": "more", + "type": "boolean", + "description": "" + }, + { + "name": "page_index", + "type": "number", + "description": "" + } + ], + "sourceFile": "inscription.ts" + }, + { + "name": "OutputType", + "type": "enum", + "description": "Type of UTXO output (e.g. \"plain\", \"inscription\", \"rune\").", + "values": [ + "any", + "cardinal", + "inscribed", + "runic" + ], + "sourceFile": "output.ts" + }, + { + "name": "OutputInfo", + "type": "object", + "description": "Detailed information about a UTXO including value, script type, and any inscriptions or runes it contains.", + "properties": [ + { + "name": "address", + "type": "string | null", + "description": "" + }, + { + "name": "indexed", + "type": "boolean", + "description": "" + }, + { + "name": "inscriptions", + "type": "string[] | null", + "description": "" + }, + { + "name": "outpoint", + "type": "string", + "description": "" + }, + { + "name": "runes", + "type": "Record | null", + "description": "" + }, + { + "name": "sat_ranges", + "type": "SatRange[] | null", + "description": "" + }, + { + "name": "script_pubkey", + "type": "string", + "description": "" + }, + { + "name": "spent", + "type": "boolean", + "description": "" + }, + { + "name": "transaction", + "type": "string", + "description": "" + }, + { + "name": "value", + "type": "number", + "description": "" + } + ], + "sourceFile": "output.ts" + }, + { + "name": "RuneInfo", + "type": "object", + "description": "Basic information about a rune including its symbol and supply details.", + "properties": [ + { + "name": "block", + "type": "number", + "description": "" + }, + { + "name": "burned", + "type": "number", + "description": "" + }, + { + "name": "divisibility", + "type": "number", + "description": "" + }, + { + "name": "etching", + "type": "string", + "description": "" + }, + { + "name": "mints", + "type": "number", + "description": "" + }, + { + "name": "number", + "type": "number", + "description": "" + }, + { + "name": "premine", + "type": "number", + "description": "" + }, + { + "name": "spaced_rune", + "type": "string", + "description": "" + }, + { + "name": "symbol", + "type": "string | null", + "description": "" + }, + { + "name": "terms", + "type": "RuneTerms", + "description": "" + }, + { + "name": "timestamp", + "type": "number", + "description": "" + }, + { + "name": "turbo", + "type": "boolean", + "description": "" + } + ], + "sourceFile": "rune.ts" + }, + { + "name": "RuneResponse", + "type": "object", + "description": "Detailed rune information including minting status and parent.", + "properties": [ + { + "name": "entry", + "type": "RuneInfo", + "description": "" + }, + { + "name": "id", + "type": "string", + "description": "" + }, + { + "name": "mintable", + "type": "boolean", + "description": "" + }, + { + "name": "parent", + "type": "string | null", + "description": "" + } + ], + "sourceFile": "rune.ts" + }, + { + "name": "RunesResponse", + "type": "object", + "description": "Paginated response containing a list of runes and metadata.", + "properties": [ + { + "name": "entries", + "type": "[string, RuneInfo][]", + "description": "" + }, + { + "name": "more", + "type": "boolean", + "description": "" + }, + { + "name": "next", + "type": "number | null", + "description": "" + }, + { + "name": "prev", + "type": "number | null", + "description": "" + } + ], + "sourceFile": "rune.ts" + }, + { + "name": "RarityType", + "type": "enum", + "description": "Classification of sat rarity (e.g. \"common\", \"uncommon\", \"rare\", \"epic\", \"legendary\").", + "values": [ + "common", + "epic", + "legendary", + "mythic", + "rare", + "uncommon" + ], + "sourceFile": "sat.ts" + }, + { + "name": "SatInfo", + "type": "object", + "description": "Information about a specific satoshi including its number, timestamp,", + "properties": [ + { + "name": "address", + "type": "string | null", + "description": "" + }, + { + "name": "block", + "type": "number", + "description": "" + }, + { + "name": "charms", + "type": "CharmType[]", + "description": "" + }, + { + "name": "cycle", + "type": "number", + "description": "" + }, + { + "name": "decimal", + "type": "string", + "description": "" + }, + { + "name": "degree", + "type": "string", + "description": "" + }, + { + "name": "epoch", + "type": "number", + "description": "" + }, + { + "name": "inscriptions", + "type": "string[]", + "description": "" + }, + { + "name": "name", + "type": "string", + "description": "" + }, + { + "name": "number", + "type": "number", + "description": "" + }, + { + "name": "offset", + "type": "number", + "description": "" + }, + { + "name": "percentile", + "type": "string", + "description": "" + }, + { + "name": "period", + "type": "number", + "description": "" + }, + { + "name": "rarity", + "type": "RarityType", + "description": "" + }, + { + "name": "satpoint", + "type": "string | null", + "description": "" + }, + { + "name": "timestamp", + "type": "number", + "description": "" + } + ], + "sourceFile": "sat.ts" + }, + { + "name": "ServerStatus", + "type": "object", + "description": "Current status information about the ordinals server including version, height and indexing progress.", + "properties": [ + { + "name": "address_index", + "type": "boolean", + "description": "" + }, + { + "name": "blessed_inscriptions", + "type": "number", + "description": "" + }, + { + "name": "chain", + "type": "string", + "description": "" + }, + { + "name": "cursed_inscriptions", + "type": "number", + "description": "" + }, + { + "name": "height", + "type": "number", + "description": "" + }, + { + "name": "initial_sync_time", + "type": "Time", + "description": "" + }, + { + "name": "inscriptions", + "type": "number", + "description": "" + }, + { + "name": "lost_sats", + "type": "number", + "description": "" + }, + { + "name": "minimum_rune_for_next_block", + "type": "string | null", + "description": "" + }, + { + "name": "rune_index", + "type": "boolean", + "description": "" + }, + { + "name": "runes", + "type": "number", + "description": "" + }, + { + "name": "sat_index", + "type": "boolean", + "description": "" + }, + { + "name": "started", + "type": "string", + "description": "" + }, + { + "name": "transaction_index", + "type": "boolean", + "description": "" + }, + { + "name": "unrecoverably_reorged", + "type": "boolean", + "description": "" + }, + { + "name": "uptime", + "type": "Time", + "description": "" + } + ], + "sourceFile": "status.ts" + }, + { + "name": "Input", + "type": "object", + "description": "Transaction input containing previous output reference and witness data.", + "properties": [ + { + "name": "previous_output", + "type": "string", + "description": "" + }, + { + "name": "script_sig", + "type": "string", + "description": "" + }, + { + "name": "sequence", + "type": "number", + "description": "" + }, + { + "name": "witness", + "type": "string[]", + "description": "" + } + ], + "sourceFile": "transaction.ts" + }, + { + "name": "Output", + "type": "object", + "description": "Transaction output containing value and script pubkey.", + "properties": [ + { + "name": "script_pubkey", + "type": "string", + "description": "" + }, + { + "name": "value", + "type": "number", + "description": "" + } + ], + "sourceFile": "transaction.ts" + }, + { + "name": "Transaction", + "type": "object", + "description": "Bitcoin transaction data including version, locktime, inputs and outputs.", + "properties": [ + { + "name": "input", + "type": "Input[]", + "description": "" + }, + { + "name": "lock_time", + "type": "number", + "description": "" + }, + { + "name": "output", + "type": "Output[]", + "description": "" + }, + { + "name": "version", + "type": "number", + "description": "" + } + ], + "sourceFile": "transaction.ts" + }, + { + "name": "TransactionInfo", + "type": "object", + "description": "Extended transaction information including block details, timestamp and inscription data.", + "properties": [ + { + "name": "chain", + "type": "string", + "description": "" + }, + { + "name": "etching", + "type": "string | null", + "description": "" + }, + { + "name": "inscription_count", + "type": "number", + "description": "" + }, + { + "name": "transaction", + "type": "Transaction", + "description": "" + }, + { + "name": "txid", + "type": "string", + "description": "" + } + ], + "sourceFile": "transaction.ts" + } + ] +} \ No newline at end of file diff --git a/docs/generate.ts b/docs/generate.ts new file mode 100644 index 0000000..1c39f66 --- /dev/null +++ b/docs/generate.ts @@ -0,0 +1,127 @@ +import * as ts from 'typescript'; +import * as fs from 'fs'; +import * as path from 'path'; +import { CustomType, extractZodSchema } from './generateTypesDocs'; +import { getMethodDocs, type MethodDoc } from './generateMethodsDocs'; + +interface Documentation { + classMethods: MethodDoc[]; + exportedTypes: CustomType[]; +} + +function generateDocs(sourceFiles: string[]): Documentation { + const options: ts.CompilerOptions = { + target: ts.ScriptTarget.ESNext, + module: ts.ModuleKind.ESNext, + allowJs: true, + checkJs: true, + noEmit: true, + types: ['node'], + skipLibCheck: true, + }; + + const program = ts.createProgram(sourceFiles, options); + const methods: MethodDoc[] = []; + + // Sort source files by their base names + const sortedFiles = [...sourceFiles].sort((a, b) => + path.basename(a).localeCompare(path.basename(b)) + ); + + // Use OrderedMap to maintain file ordering + const typesByFile = new Map(); + + // First pass: collect types maintaining file order + for (const sourceFile of sortedFiles) { + const fileName = sourceFile; + + if (!fileName.endsWith('.ts') || fileName.includes('node_modules')) { + continue; + } + + const content = fs.readFileSync(fileName, 'utf8'); + + if (content.includes('z.object') || content.includes('z.enum')) { + const extracted = extractZodSchema(content, path.basename(fileName)); + if (extracted.length > 0) { + typesByFile.set(fileName, extracted); + } + } + } + + // Second pass: collect methods + for (const sourceFile of program.getSourceFiles()) { + const fileName = sourceFile.fileName; + + if (!fileName.endsWith('.ts') || fileName.includes('node_modules')) { + continue; + } + + function visit(node: ts.Node) { + if (ts.isClassDeclaration(node)) { + + node.members.forEach(member => { + if (ts.isMethodDeclaration(member)) { + try { + const doc = getMethodDocs(member, sourceFile); + if (doc) { + methods.push(doc); + } + } catch (error) { + console.error('Error processing method:', error); + } + } + }); + } + + ts.forEachChild(node, visit); + } + + visit(sourceFile); + } + + // Combine types in file order + const allTypes: CustomType[] = []; + for (const [file, types] of typesByFile.entries()) { + allTypes.push(...types); + } + + return { + classMethods: methods, + exportedTypes: allTypes + }; +} + +// Ensure the docs directory exists +const docsDir = path.join(process.cwd(), 'docs'); +if (!fs.existsSync(docsDir)) { + fs.mkdirSync(docsDir); +} + +// Generate documentation +const sourceDir = './src'; +const sourceFiles = [ + ...fs.readdirSync(sourceDir) + .filter(file => file.endsWith('.ts')) + .map(file => path.join(sourceDir, file)), + ...getAllFiles(path.join(sourceDir, 'schemas')) + .filter(file => file.endsWith('.ts')) +].sort((a, b) => path.basename(a).localeCompare(path.basename(b))); // Sort all source files + +const docs = generateDocs(sourceFiles); + +fs.writeFileSync( + path.join(docsDir, 'api-docs.json'), + JSON.stringify(docs, null, 2) +); + +function getAllFiles(dir: string): string[] { + if (!fs.existsSync(dir)) { + return []; + } + const files = fs.readdirSync(dir); + return files.flatMap(file => { + const fullPath = path.join(dir, file); + return fs.statSync(fullPath).isDirectory() ? getAllFiles(fullPath) : fullPath; + }); +} \ No newline at end of file diff --git a/docs/generateHtml.ts b/docs/generateHtml.ts new file mode 100644 index 0000000..9c7acd5 --- /dev/null +++ b/docs/generateHtml.ts @@ -0,0 +1,213 @@ +import fs from 'fs'; +import path from 'path'; + +function escapeHtml(text) { + return text + .replace(//g, '>'); + } + + function generateMethodCard(method) { + const parameters = method.parameters?.length > 0 + ? ` +
+
+

Parameters

+
+ ${method.parameters.map(param => ` +
+
+ ${param.name} + ${escapeHtml(param.type)} +
+ ${param.description ? `

${param.description}

` : ''} +
+ `).join('')} +
+
+
+ ` + : ''; + + return ` +
+
+
+

+ ${method.name} +

+ → ${escapeHtml(method.returnType)} +
+ ${method.description ? `

${method.description}

` : ''} +
+ + ${method.httpMethod} + + ${method.endpoint} +
+
+ ${parameters} +
+ `; + } + +function generateTypeCard(type) { + const propertiesSection = type.properties ? ` +
+

Properties

+
+ ${type.properties.map(prop => ` +
+
+ ${prop.name} + ${prop.type} +
+ ${prop.description ? `

${prop.description}

` : ''} +
+ `).join('')} +
+
+ ` : ''; + + const valuesSection = type.values ? ` +
+

Values

+
+ + ${type.values.join(' | ')} + +
+
+ ` : ''; + + return ` +
+
+

+ ${type.name} +

+ ${type.description ? `

${type.description}

` : + `

Type defined in ${type.sourceFile}

`} +
+ ${propertiesSection} + ${valuesSection} +
+ `; +} + +function generateHtml() { + const apiDocs = JSON.parse(fs.readFileSync('docs/api-docs.json', 'utf-8')); + + const htmlTemplate = ` + + + + + OrdAPI Documentation + + + + +
+
+
+
+
+

OrdAPI v0.0.2

+

Simple TypeScript client for ord API.

+
+
+ + + +
+
+
+
+
+ +
+
+ ${apiDocs.classMethods.map(generateMethodCard).join('')} +
+ +
+ + + +`; + + // Create dist directory if it doesn't exist + const distDir = path.join(process.cwd(), 'docs/dist'); + if (!fs.existsSync(distDir)) { + fs.mkdirSync(distDir, { recursive: true }); + } + + // Write the HTML file + fs.writeFileSync( + path.join(distDir, 'index.html'), + htmlTemplate + ); + + console.log('Documentation HTML generated successfully!'); +} + +generateHtml(); \ No newline at end of file diff --git a/docs/generateMethodsDocs.ts b/docs/generateMethodsDocs.ts new file mode 100644 index 0000000..885b547 --- /dev/null +++ b/docs/generateMethodsDocs.ts @@ -0,0 +1,149 @@ +import * as ts from 'typescript'; + +/** + * Represents a method parameter documentation + */ +interface ParameterDoc { + name: string; + type: string; + description: string; +} + +/** + * Represents a method documentation + */ +export interface MethodDoc { + name: string; + parameters: ParameterDoc[]; + description: string; + endpoint: string; + httpMethod: 'GET' | 'POST'; + returnType: string; + responseSchema: string; +} + +/** + * Map of method names to their corresponding API endpoints + */ +const API_MAP = { + getAddressInfo: '/address/{address}', + getBlock: '/block/{heightOrHash}', + getBlockCount: '/blockcount', + getBlockHashByHeight: '/blockhash/{height}', + getLatestBlockHash: '/blockhash', + getLatestBlockHeight: '/blockheight', + getLatestBlocks: '/blocks', + getLatestBlockTime: '/blocktime', + getInscription: '/inscription/{id}', + getInscriptionChild: '/inscription/{id}/{child}', + getLatestInscriptions: '/inscriptions', + getInscriptionsByPage: '/inscriptions/{page}', + getInscriptionsByBlock: '/inscriptions/block/{height}', + getInscriptionsByIds: '/inscriptions', + getOutput: '/output/{outpoint}', + getOutputs: '/outputs', + getOutputsByAddress: '/outputs/{address}?type={type}', + getRune: '/rune/{name}', + getLatestRunes: '/runes', + getRunesByPage: '/runes/{page}', + getSat: '/sat/{number}', + getTransaction: '/tx/{txId}', + getServerStatus: '/status' +}; + +interface ParsedJSDoc { + description: string; + params: Record; + returns?: string; + } + + function parseJSDocComment(comment: string): ParsedJSDoc { + const lines = comment + .replace(/\/\*\*|\*\/|\*/g, '') + .split('\n') + .map(line => line.trim()) + .filter(Boolean); + + const result: ParsedJSDoc = { + description: '', + params: {}, + }; + + let currentSection = 'description'; + + for (const line of lines) { + if (line.startsWith('@param')) { + // Format: @param {type} name - description + const paramMatch = line.match(/@param\s+\{([^}]+)\}\s+(\w+)\s*-?\s*(.*)/); + if (paramMatch) { + const [, , name, description] = paramMatch; + result.params[name] = description; + } + } else if (line.startsWith('@returns')) { + // Format: @returns {type} description + const returnsMatch = line.match(/@returns\s+\{([^}]+)\}\s+(.*)/); + if (returnsMatch) { + const [, , description] = returnsMatch; + result.returns = description; + } + } else if (!line.startsWith('@')) { + if (currentSection === 'description') { + result.description += (result.description ? '\n' : '') + line; + } + } + } + + return result; + } + + function extractJSDocComment(node: ts.Node, sourceFile: ts.SourceFile): string { + const ranges = ts.getLeadingCommentRanges(sourceFile.text, node.pos); + if (!ranges || ranges.length === 0) return ''; + const commentRange = ranges[ranges.length - 1]; + return sourceFile.text.substring(commentRange.pos, commentRange.end); + } + + export function getMethodDocs(node: ts.MethodDeclaration, sourceFile: ts.SourceFile): MethodDoc | null { + const nameIdentifier = node.name as ts.Identifier; + const name = nameIdentifier.escapedText.toString(); + if (!name || name.startsWith('_') || ['fetch', 'fetchPost'].includes(name)) return null; + + const jsDoc = parseJSDocComment(extractJSDocComment(node, sourceFile)); + + const start = node.pos; + const end = node.end; + const methodText = sourceFile.text.slice(start, end); + + return { + name, + parameters: node.parameters.map(param => { + const paramName = (param.name as ts.Identifier).escapedText.toString(); + const paramType = param.type + ? sourceFile.text.slice(param.type.pos, param.type.end).trim() + : 'any'; + + return { + name: paramName, + type: paramType, + description: jsDoc.params[paramName] || '' + }; + }), + description: jsDoc.description, + endpoint: API_MAP[name] || '', + httpMethod: methodText.includes('this.fetchPost') ? 'POST' : 'GET', + returnType: node.type?.getText(sourceFile) || 'Promise', + responseSchema: (() => { + const fetchMatch = methodText.match(/this\.fetch\([^,]+,\s*([\w.()]+)/); + if (!fetchMatch) return ''; + + const schema = fetchMatch[1]; + if (schema.includes('z.array')) { + const arrayMatch = schema.match(/z\.array\((\w+Schema)\)/); + return arrayMatch?.[1] || ''; + } + if (schema.includes('z.number')) return 'z.number()'; + + return schema; + })(), + }; + } \ No newline at end of file diff --git a/docs/generateTypesDocs.ts b/docs/generateTypesDocs.ts new file mode 100644 index 0000000..8c30b78 --- /dev/null +++ b/docs/generateTypesDocs.ts @@ -0,0 +1,186 @@ +import * as fs from 'fs'; +import * as path from 'path'; + +interface Property { + name: string; + type: string; + description: string; +} + +export interface CustomType { + name: string; + type: 'enum' | 'object'; + description: string; + properties?: Property[]; + values?: string[]; + sourceFile: string; +} + +function parseZodType(zodType: string): string { + const typeMap = { + 'z.string()': 'string', + 'z.number()': 'number', + 'z.boolean()': 'boolean' + }; + + const type = zodType.trim(); + + if (type.endsWith('Schema')) { + return type.replace('Schema', ''); + } + + if (type.includes('.nullable()')) { + const baseType = type.replace('.nullable()', ''); + return `${parseZodType(baseType)} | null`; + } + + for (const [key, baseType] of Object.entries(typeMap)) { + if (type.startsWith(key)) { + return baseType; + } + } + + if (type.startsWith('z.array')) { + const innerMatch = type.match(/z\.array\((.*)\)/); + if (!innerMatch) return 'unknown[]'; + return `${parseZodType(innerMatch[1])}[]`; + } + + if (type.startsWith('z.record')) { + const matches = type.match(/z\.record\((.*?),\s*(.*?)\)/); + if (!matches) return 'Record'; + const [_, keyType, valueType] = matches; + return `Record<${parseZodType(keyType)}, ${parseZodType(valueType)}>`; + } + + if (type.startsWith('z.tuple')) { + const innerMatch = type.match(/z\.tuple\(\[(.*)\]\)/); + if (!innerMatch) return '[unknown]'; + const types = innerMatch[1].split(',').map(t => parseZodType(t.trim())); + return `[${types.join(', ')}]`; + } + + if (type.includes('z.enum')) { + return type.match(/\[(.*?)\]/)?.[1] + .split(',') + .map(v => v.trim().replace(/['"]/g, '')) + .join(' | ') || 'enum'; + } + + return type.replace('z.', ''); +} + +function findTypeDescription(typeName: string, typeFileContent: string): string { + // Look for JSDoc comment followed by the type definition + const regex = new RegExp( + `/\\*\\*\\s*\\n\\s*\\*\\s*([^\\n]+)\\s*\\n[^/]*\\*/\\s*export\\s+type\\s+${typeName}\\s*=`, + 'ms' + ); + + const match = regex.exec(typeFileContent); + return match ? match[1].trim() : ''; +} + +export function extractZodSchema(schemaContent: string, filename: string): CustomType[] { + // Try to read types file + let typeFileContent = ''; + try { + const typeFilePath = path.join(process.cwd(), 'src', 'types', 'index.ts'); + if (fs.existsSync(typeFilePath)) { + typeFileContent = fs.readFileSync(typeFilePath, 'utf8'); + } + } catch (error) { + console.warn('Could not read types file:', error); + } + + const schemaRegex = /export\s+const\s+(\w+Schema)\s*=\s*z\.([\s\S]*?);(?=\s*(?:export|$))/g; + const types: CustomType[] = []; + let match; + + while ((match = schemaRegex.exec(schemaContent)) !== null) { + const [fullMatch, schemaName, definition] = match; + const typeName = schemaName.replace('Schema', ''); + const description = findTypeDescription(typeName, typeFileContent); + + if (definition.includes('enum')) { + const enumMatch = fullMatch.match(/\[(.*?)\]/s); + const enumValues = enumMatch ? + enumMatch[1] + .split(',') + .map(v => v.trim().replace(/['"]/g, '')) + .filter(Boolean) + .sort() : []; + + types.push({ + name: typeName, + type: 'enum', + description, + values: enumValues, + sourceFile: filename + }); + } else if (definition.includes('object')) { + const properties: Property[] = []; + const propsMatch = definition.match(/object\(\{([\s\S]*?)\}\)/s); + + if (propsMatch) { + const propsContent = propsMatch[1]; + const propLines = propsContent.split('\n'); + + const props = propLines + .map(line => { + const propMatch = line.match(/^\s*(\w+):\s*(.*?)(?:,\s*$|$)/); + if (propMatch) { + const [_, propName, propType] = propMatch; + if (propName && propType) { + return { + name: propName.trim(), + type: parseZodType(propType.trim()), + description: '' + }; + } + } + return null; + }) + .filter((prop): prop is Property => prop !== null) + .sort((a, b) => a.name.localeCompare(b.name)); + + properties.push(...props); + } + + types.push({ + name: typeName, + type: 'object', + description, + properties, + sourceFile: filename + }); + } + } + + return types; +} + +export function getAllTypesByFiles(files: string[]): CustomType[] { + const sortedFiles = [...files].sort((a, b) => path.basename(a).localeCompare(path.basename(b))); + const typesMap = new Map(); + + for (const file of sortedFiles) { + if (!file.endsWith('.ts')) continue; + + const content = fs.readFileSync(file, 'utf8'); + if (content.includes('z.object') || content.includes('z.enum')) { + const types = extractZodSchema(content, path.basename(file)); + typesMap.set(file, types); + } + } + + const allTypes: CustomType[] = []; + for (const file of sortedFiles) { + const types = typesMap.get(file); + if (types) { + allTypes.push(...types); + } + } + + return allTypes; +} \ No newline at end of file diff --git a/docs/serveDocs.ts b/docs/serveDocs.ts new file mode 100644 index 0000000..f80afe5 --- /dev/null +++ b/docs/serveDocs.ts @@ -0,0 +1,18 @@ +import { serve } from 'bun'; + +const server = serve({ + port: 3000, + fetch(req) { + const url = new URL(req.url); + const filePath = url.pathname === '/' ? '/index.html' : url.pathname; + + try { + const file = Bun.file(`./docs/dist${filePath}`); + return new Response(file); + } catch (error) { + return new Response('Not found', { status: 404 }); + } + }, +}); + +console.log(`Documentation server running at http://localhost:${server.port}`); \ No newline at end of file diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index 9ac186d..0000000 --- a/package-lock.json +++ /dev/null @@ -1,1588 +0,0 @@ -{ - "name": "ordapi", - "version": "0.0.1", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "ordapi", - "version": "0.0.1", - "dependencies": { - "typescript-eslint": "^8.22.0", - "zod": "^3.24.1" - }, - "devDependencies": { - "@types/bun": "^1.2.1" - } - }, - "node_modules/@eslint-community/eslint-utils": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.1.tgz", - "integrity": "sha512-s3O3waFUrMV8P/XaF/+ZTp1X9XBZW1a4B97ZnjQF2KYWaFD2A8KyFBsrsfSjEmjn3RGWAIuvlneuZm3CUK3jbA==", - "license": "MIT", - "dependencies": { - "eslint-visitor-keys": "^3.4.3" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" - } - }, - "node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", - "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", - "license": "Apache-2.0", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/@eslint-community/regexpp": { - "version": "4.12.1", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.1.tgz", - "integrity": "sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==", - "license": "MIT", - "engines": { - "node": "^12.0.0 || ^14.0.0 || >=16.0.0" - } - }, - "node_modules/@eslint/config-array": { - "version": "0.19.1", - "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.19.1.tgz", - "integrity": "sha512-fo6Mtm5mWyKjA/Chy1BYTdn5mGJoDNjC7C64ug20ADsRDGrA85bN3uK3MaKbeRkRuuIEAR5N33Jr1pbm411/PA==", - "license": "Apache-2.0", - "peer": true, - "dependencies": { - "@eslint/object-schema": "^2.1.5", - "debug": "^4.3.1", - "minimatch": "^3.1.2" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, - "node_modules/@eslint/core": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.10.0.tgz", - "integrity": "sha512-gFHJ+xBOo4G3WRlR1e/3G8A6/KZAH6zcE/hkLRCZTi/B9avAG365QhFA8uOGzTMqgTghpn7/fSnscW++dpMSAw==", - "license": "Apache-2.0", - "peer": true, - "dependencies": { - "@types/json-schema": "^7.0.15" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, - "node_modules/@eslint/eslintrc": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.2.0.tgz", - "integrity": "sha512-grOjVNN8P3hjJn/eIETF1wwd12DdnwFDoyceUJLYYdkpbwq3nLi+4fqrTAONx7XDALqlL220wC/RHSC/QTI/0w==", - "license": "MIT", - "peer": true, - "dependencies": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^10.0.1", - "globals": "^14.0.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.1.2", - "strip-json-comments": "^3.1.1" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/@eslint/js": { - "version": "9.19.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.19.0.tgz", - "integrity": "sha512-rbq9/g38qjfqFLOVPvwjIvFFdNziEC5S65jmjPw5r6A//QH+W91akh9irMwjDN8zKUTak6W9EsAv4m/7Wnw0UQ==", - "license": "MIT", - "peer": true, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, - "node_modules/@eslint/object-schema": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.5.tgz", - "integrity": "sha512-o0bhxnL89h5Bae5T318nFoFzGy+YE5i/gGkoPAgkmTVdRKTiv3p8JHevPiPaMwoloKfEiiaHlawCqaZMqRm+XQ==", - "license": "Apache-2.0", - "peer": true, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, - "node_modules/@eslint/plugin-kit": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.2.5.tgz", - "integrity": "sha512-lB05FkqEdUg2AA0xEbUz0SnkXT1LcCTa438W4IWTUh4hdOnVbQyOJ81OrDXsJk/LSiJHubgGEFoR5EHq1NsH1A==", - "license": "Apache-2.0", - "peer": true, - "dependencies": { - "@eslint/core": "^0.10.0", - "levn": "^0.4.1" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, - "node_modules/@humanfs/core": { - "version": "0.19.1", - "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz", - "integrity": "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==", - "license": "Apache-2.0", - "peer": true, - "engines": { - "node": ">=18.18.0" - } - }, - "node_modules/@humanfs/node": { - "version": "0.16.6", - "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.6.tgz", - "integrity": "sha512-YuI2ZHQL78Q5HbhDiBA1X4LmYdXCKCMQIfw0pw7piHJwyREFebJUvrQN4cMssyES6x+vfUbx1CIpaQUKYdQZOw==", - "license": "Apache-2.0", - "peer": true, - "dependencies": { - "@humanfs/core": "^0.19.1", - "@humanwhocodes/retry": "^0.3.0" - }, - "engines": { - "node": ">=18.18.0" - } - }, - "node_modules/@humanfs/node/node_modules/@humanwhocodes/retry": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.3.1.tgz", - "integrity": "sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==", - "license": "Apache-2.0", - "peer": true, - "engines": { - "node": ">=18.18" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } - }, - "node_modules/@humanwhocodes/module-importer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", - "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", - "license": "Apache-2.0", - "peer": true, - "engines": { - "node": ">=12.22" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } - }, - "node_modules/@humanwhocodes/retry": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.1.tgz", - "integrity": "sha512-c7hNEllBlenFTHBky65mhq8WD2kbN9Q6gk0bTk8lSBvc554jpXSkST1iePudpt7+A/AQvuHs9EMqjHDXMY1lrA==", - "license": "Apache-2.0", - "peer": true, - "engines": { - "node": ">=18.18" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } - }, - "node_modules/@nodelib/fs.scandir": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "license": "MIT", - "dependencies": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.stat": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", - "license": "MIT", - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.walk": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", - "license": "MIT", - "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@types/bun": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@types/bun/-/bun-1.2.1.tgz", - "integrity": "sha512-iiCeMAKMkft8EPQJxSbpVRD0DKqrh91w40zunNajce3nMNNFd/LnAquVisSZC+UpTMjDwtcdyzbWct08IvEqRA==", - "dev": true, - "license": "MIT", - "dependencies": { - "bun-types": "1.2.1" - } - }, - "node_modules/@types/estree": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", - "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", - "license": "MIT", - "peer": true - }, - "node_modules/@types/json-schema": { - "version": "7.0.15", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", - "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", - "license": "MIT", - "peer": true - }, - "node_modules/@types/node": { - "version": "22.12.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.12.0.tgz", - "integrity": "sha512-Fll2FZ1riMjNmlmJOdAyY5pUbkftXslB5DgEzlIuNaiWhXd00FhWxVC/r4yV/4wBb9JfImTu+jiSvXTkJ7F/gA==", - "dev": true, - "license": "MIT", - "dependencies": { - "undici-types": "~6.20.0" - } - }, - "node_modules/@types/ws": { - "version": "8.5.14", - "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.14.tgz", - "integrity": "sha512-bd/YFLW+URhBzMXurx7lWByOu+xzU9+kb3RboOteXYDfW+tr+JZa99OyNmPINEGB/ahzKrEuc8rcv4gnpJmxTw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.22.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.22.0.tgz", - "integrity": "sha512-4Uta6REnz/xEJMvwf72wdUnC3rr4jAQf5jnTkeRQ9b6soxLxhDEbS/pfMPoJLDfFPNVRdryqWUIV/2GZzDJFZw==", - "license": "MIT", - "dependencies": { - "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.22.0", - "@typescript-eslint/type-utils": "8.22.0", - "@typescript-eslint/utils": "8.22.0", - "@typescript-eslint/visitor-keys": "8.22.0", - "graphemer": "^1.4.0", - "ignore": "^5.3.1", - "natural-compare": "^1.4.0", - "ts-api-utils": "^2.0.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "@typescript-eslint/parser": "^8.0.0 || ^8.0.0-alpha.0", - "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <5.8.0" - } - }, - "node_modules/@typescript-eslint/parser": { - "version": "8.22.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.22.0.tgz", - "integrity": "sha512-MqtmbdNEdoNxTPzpWiWnqNac54h8JDAmkWtJExBVVnSrSmi9z+sZUt0LfKqk9rjqmKOIeRhO4fHHJ1nQIjduIQ==", - "license": "MIT", - "dependencies": { - "@typescript-eslint/scope-manager": "8.22.0", - "@typescript-eslint/types": "8.22.0", - "@typescript-eslint/typescript-estree": "8.22.0", - "@typescript-eslint/visitor-keys": "8.22.0", - "debug": "^4.3.4" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <5.8.0" - } - }, - "node_modules/@typescript-eslint/scope-manager": { - "version": "8.22.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.22.0.tgz", - "integrity": "sha512-/lwVV0UYgkj7wPSw0o8URy6YI64QmcOdwHuGuxWIYznO6d45ER0wXUbksr9pYdViAofpUCNJx/tAzNukgvaaiQ==", - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "8.22.0", - "@typescript-eslint/visitor-keys": "8.22.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/type-utils": { - "version": "8.22.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.22.0.tgz", - "integrity": "sha512-NzE3aB62fDEaGjaAYZE4LH7I1MUwHooQ98Byq0G0y3kkibPJQIXVUspzlFOmOfHhiDLwKzMlWxaNv+/qcZurJA==", - "license": "MIT", - "dependencies": { - "@typescript-eslint/typescript-estree": "8.22.0", - "@typescript-eslint/utils": "8.22.0", - "debug": "^4.3.4", - "ts-api-utils": "^2.0.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <5.8.0" - } - }, - "node_modules/@typescript-eslint/types": { - "version": "8.22.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.22.0.tgz", - "integrity": "sha512-0S4M4baNzp612zwpD4YOieP3VowOARgK2EkN/GBn95hpyF8E2fbMT55sRHWBq+Huaqk3b3XK+rxxlM8sPgGM6A==", - "license": "MIT", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.22.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.22.0.tgz", - "integrity": "sha512-SJX99NAS2ugGOzpyhMza/tX+zDwjvwAtQFLsBo3GQxiGcvaKlqGBkmZ+Y1IdiSi9h4Q0Lr5ey+Cp9CGWNY/F/w==", - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "8.22.0", - "@typescript-eslint/visitor-keys": "8.22.0", - "debug": "^4.3.4", - "fast-glob": "^3.3.2", - "is-glob": "^4.0.3", - "minimatch": "^9.0.4", - "semver": "^7.6.0", - "ts-api-utils": "^2.0.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "typescript": ">=4.8.4 <5.8.0" - } - }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", - "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/@typescript-eslint/utils": { - "version": "8.22.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.22.0.tgz", - "integrity": "sha512-T8oc1MbF8L+Bk2msAvCUzjxVB2Z2f+vXYfcucE2wOmYs7ZUwco5Ep0fYZw8quNwOiw9K8GYVL+Kgc2pETNTLOg==", - "license": "MIT", - "dependencies": { - "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "8.22.0", - "@typescript-eslint/types": "8.22.0", - "@typescript-eslint/typescript-estree": "8.22.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <5.8.0" - } - }, - "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.22.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.22.0.tgz", - "integrity": "sha512-AWpYAXnUgvLNabGTy3uBylkgZoosva/miNd1I8Bz3SjotmQPbVqhO4Cczo8AsZ44XVErEBPr/CRSgaj8sG7g0w==", - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "8.22.0", - "eslint-visitor-keys": "^4.2.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/acorn": { - "version": "8.14.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz", - "integrity": "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==", - "license": "MIT", - "peer": true, - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/acorn-jsx": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", - "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", - "license": "MIT", - "peer": true, - "peerDependencies": { - "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, - "node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "license": "MIT", - "peer": true, - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "license": "MIT", - "peer": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "license": "Python-2.0", - "peer": true - }, - "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "license": "MIT" - }, - "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "license": "MIT", - "peer": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/braces": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", - "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", - "license": "MIT", - "dependencies": { - "fill-range": "^7.1.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/bun-types": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/bun-types/-/bun-types-1.2.1.tgz", - "integrity": "sha512-p7bmXUWmrPWxhcbFVk7oUXM5jAGt94URaoa3qf4mz43MEhNAo/ot1urzBqctgvuq7y9YxkuN51u+/qm4BiIsHw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*", - "@types/ws": "~8.5.10" - } - }, - "node_modules/callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "license": "MIT", - "peer": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "license": "MIT", - "peer": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "license": "MIT", - "peer": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "license": "MIT", - "peer": true - }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "license": "MIT", - "peer": true - }, - "node_modules/cross-spawn": { - "version": "7.0.6", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", - "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", - "license": "MIT", - "peer": true, - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/debug": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", - "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", - "license": "MIT", - "dependencies": { - "ms": "^2.1.3" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/deep-is": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", - "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", - "license": "MIT", - "peer": true - }, - "node_modules/escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "license": "MIT", - "peer": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/eslint": { - "version": "9.19.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.19.0.tgz", - "integrity": "sha512-ug92j0LepKlbbEv6hD911THhoRHmbdXt2gX+VDABAW/Ir7D3nqKdv5Pf5vtlyY6HQMTEP2skXY43ueqTCWssEA==", - "license": "MIT", - "peer": true, - "dependencies": { - "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.12.1", - "@eslint/config-array": "^0.19.0", - "@eslint/core": "^0.10.0", - "@eslint/eslintrc": "^3.2.0", - "@eslint/js": "9.19.0", - "@eslint/plugin-kit": "^0.2.5", - "@humanfs/node": "^0.16.6", - "@humanwhocodes/module-importer": "^1.0.1", - "@humanwhocodes/retry": "^0.4.1", - "@types/estree": "^1.0.6", - "@types/json-schema": "^7.0.15", - "ajv": "^6.12.4", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.6", - "debug": "^4.3.2", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^8.2.0", - "eslint-visitor-keys": "^4.2.0", - "espree": "^10.3.0", - "esquery": "^1.5.0", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^8.0.0", - "find-up": "^5.0.0", - "glob-parent": "^6.0.2", - "ignore": "^5.2.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "lodash.merge": "^4.6.2", - "minimatch": "^3.1.2", - "natural-compare": "^1.4.0", - "optionator": "^0.9.3" - }, - "bin": { - "eslint": "bin/eslint.js" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://eslint.org/donate" - }, - "peerDependencies": { - "jiti": "*" - }, - "peerDependenciesMeta": { - "jiti": { - "optional": true - } - } - }, - "node_modules/eslint-scope": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.2.0.tgz", - "integrity": "sha512-PHlWUfG6lvPc3yvP5A4PNyBL1W8fkDUccmI21JUu/+GKZBoH/W5u6usENXUrWFRsyoW5ACUjFGgAFQp5gUlb/A==", - "license": "BSD-2-Clause", - "peer": true, - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint-visitor-keys": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", - "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", - "license": "Apache-2.0", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/espree": { - "version": "10.3.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-10.3.0.tgz", - "integrity": "sha512-0QYC8b24HWY8zjRnDTL6RiHfDbAWn63qb4LMj1Z4b076A4une81+z03Kg7l7mn/48PUTqoLptSXez8oknU8Clg==", - "license": "BSD-2-Clause", - "peer": true, - "dependencies": { - "acorn": "^8.14.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^4.2.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/esquery": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", - "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", - "license": "BSD-3-Clause", - "peer": true, - "dependencies": { - "estraverse": "^5.1.0" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/esrecurse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", - "license": "BSD-2-Clause", - "peer": true, - "dependencies": { - "estraverse": "^5.2.0" - }, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "license": "BSD-2-Clause", - "peer": true, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "license": "BSD-2-Clause", - "peer": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "license": "MIT", - "peer": true - }, - "node_modules/fast-glob": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", - "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", - "license": "MIT", - "dependencies": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.8" - }, - "engines": { - "node": ">=8.6.0" - } - }, - "node_modules/fast-glob/node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "license": "MIT", - "peer": true - }, - "node_modules/fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", - "license": "MIT", - "peer": true - }, - "node_modules/fastq": { - "version": "1.18.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.18.0.tgz", - "integrity": "sha512-QKHXPW0hD8g4UET03SdOdunzSouc9N4AuHdsX8XNcTsuz+yYFILVNIX4l9yHABMhiEI9Db0JTTIpu0wB+Y1QQw==", - "license": "ISC", - "dependencies": { - "reusify": "^1.0.4" - } - }, - "node_modules/file-entry-cache": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", - "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", - "license": "MIT", - "peer": true, - "dependencies": { - "flat-cache": "^4.0.0" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/fill-range": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", - "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", - "license": "MIT", - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", - "license": "MIT", - "peer": true, - "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/flat-cache": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", - "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", - "license": "MIT", - "peer": true, - "dependencies": { - "flatted": "^3.2.9", - "keyv": "^4.5.4" - }, - "engines": { - "node": ">=16" - } - }, - "node_modules/flatted": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.2.tgz", - "integrity": "sha512-AiwGJM8YcNOaobumgtng+6NHuOqC3A7MixFeDafM3X9cIUM+xUXoS5Vfgf+OihAYe20fxqNM9yPBXJzRtZ/4eA==", - "license": "ISC", - "peer": true - }, - "node_modules/glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", - "license": "ISC", - "peer": true, - "dependencies": { - "is-glob": "^4.0.3" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/globals": { - "version": "14.0.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", - "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", - "license": "MIT", - "peer": true, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/graphemer": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", - "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", - "license": "MIT" - }, - "node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "license": "MIT", - "peer": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/ignore": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", - "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", - "license": "MIT", - "engines": { - "node": ">= 4" - } - }, - "node_modules/import-fresh": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", - "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", - "license": "MIT", - "peer": true, - "dependencies": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", - "license": "MIT", - "peer": true, - "engines": { - "node": ">=0.8.19" - } - }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "license": "MIT", - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "license": "MIT", - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "license": "ISC", - "peer": true - }, - "node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "license": "MIT", - "peer": true, - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/json-buffer": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", - "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", - "license": "MIT", - "peer": true - }, - "node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "license": "MIT", - "peer": true - }, - "node_modules/json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", - "license": "MIT", - "peer": true - }, - "node_modules/keyv": { - "version": "4.5.4", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", - "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", - "license": "MIT", - "peer": true, - "dependencies": { - "json-buffer": "3.0.1" - } - }, - "node_modules/levn": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", - "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", - "license": "MIT", - "peer": true, - "dependencies": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", - "license": "MIT", - "peer": true, - "dependencies": { - "p-locate": "^5.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/lodash.merge": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", - "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", - "license": "MIT", - "peer": true - }, - "node_modules/merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "license": "MIT", - "engines": { - "node": ">= 8" - } - }, - "node_modules/micromatch": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", - "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", - "license": "MIT", - "dependencies": { - "braces": "^3.0.3", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=8.6" - } - }, - "node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "license": "ISC", - "peer": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "license": "MIT" - }, - "node_modules/natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", - "license": "MIT" - }, - "node_modules/optionator": { - "version": "0.9.4", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", - "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", - "license": "MIT", - "peer": true, - "dependencies": { - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.5" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "license": "MIT", - "peer": true, - "dependencies": { - "yocto-queue": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", - "license": "MIT", - "peer": true, - "dependencies": { - "p-limit": "^3.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/parent-module": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", - "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", - "license": "MIT", - "peer": true, - "dependencies": { - "callsites": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "license": "MIT", - "peer": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "license": "MIT", - "peer": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "license": "MIT", - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/prelude-ls": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", - "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", - "license": "MIT", - "peer": true, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/punycode": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", - "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", - "license": "MIT", - "peer": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/queue-microtask": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "node_modules/resolve-from": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", - "license": "MIT", - "peer": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/reusify": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", - "license": "MIT", - "engines": { - "iojs": ">=1.0.0", - "node": ">=0.10.0" - } - }, - "node_modules/run-parallel": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", - "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", - "dependencies": { - "queue-microtask": "^1.2.2" - } - }, - "node_modules/semver": { - "version": "7.6.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", - "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "license": "MIT", - "peer": true, - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "license": "MIT", - "peer": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "license": "MIT", - "peer": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "license": "MIT", - "peer": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "license": "MIT", - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "node_modules/ts-api-utils": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.0.0.tgz", - "integrity": "sha512-xCt/TOAc+EOHS1XPnijD3/yzpH6qg2xppZO1YDqGoVsNXfQfzHpOdNuXwrwOU8u4ITXJyDCTyt8w5g1sZv9ynQ==", - "license": "MIT", - "engines": { - "node": ">=18.12" - }, - "peerDependencies": { - "typescript": ">=4.8.4" - } - }, - "node_modules/type-check": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", - "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", - "license": "MIT", - "peer": true, - "dependencies": { - "prelude-ls": "^1.2.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/typescript": { - "version": "5.7.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.3.tgz", - "integrity": "sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw==", - "license": "Apache-2.0", - "peer": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" - } - }, - "node_modules/typescript-eslint": { - "version": "8.22.0", - "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.22.0.tgz", - "integrity": "sha512-Y2rj210FW1Wb6TWXzQc5+P+EWI9/zdS57hLEc0gnyuvdzWo8+Y8brKlbj0muejonhMI/xAZCnZZwjbIfv1CkOw==", - "license": "MIT", - "dependencies": { - "@typescript-eslint/eslint-plugin": "8.22.0", - "@typescript-eslint/parser": "8.22.0", - "@typescript-eslint/utils": "8.22.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <5.8.0" - } - }, - "node_modules/undici-types": { - "version": "6.20.0", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.20.0.tgz", - "integrity": "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==", - "dev": true, - "license": "MIT" - }, - "node_modules/uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "license": "BSD-2-Clause", - "peer": true, - "dependencies": { - "punycode": "^2.1.0" - } - }, - "node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "license": "ISC", - "peer": true, - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/word-wrap": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", - "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", - "license": "MIT", - "peer": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/yocto-queue": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", - "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", - "license": "MIT", - "peer": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/zod": { - "version": "3.24.1", - "resolved": "https://registry.npmjs.org/zod/-/zod-3.24.1.tgz", - "integrity": "sha512-muH7gBL9sI1nciMZV67X5fTKKBLtwpZ5VBp1vsOQzj1MhrBZ4wlVCm3gedKZWLp0Oyel8sIGfeiz54Su+OVT+A==", - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/colinhacks" - } - } - } -} diff --git a/package.json b/package.json index fb741dc..955eb7c 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,11 @@ "test": "bun test ./src/test/**/*.test.ts", "format": "prettier --write 'src/**/*.ts'", "lint": "eslint . && tsc -b", - "prepublishOnly": "bun run build" + "prepublishOnly": "bun run build", + "docs:generate": "bun run docs/generate.ts", + "docs:html": "bun run docs/generateHtml.ts", + "docs:serve": "bun run docs/serveDocs.ts", + "docs": "bun run docs:generate && bun run docs:html && bun run docs:serve" }, "exports": { ".": { @@ -23,6 +27,10 @@ "zod": "^3.24.1" }, "devDependencies": { - "@types/bun": "^1.2.1" + "@types/bun": "^1.2.1", + "@types/react": "^19.0.8", + "@types/react-dom": "^19.0.3", + "react": "^19.0.0", + "react-dom": "^19.0.0" } } diff --git a/src/client.ts b/src/client.ts index 9ac5448..d42aba0 100644 --- a/src/client.ts +++ b/src/client.ts @@ -5,12 +5,12 @@ import { BlockHashSchema, AddressInfoSchema, BlocksResponseSchema, - InscriptionSchema, + InscriptionInfoSchema, InscriptionsResponseSchema, OutputInfoSchema, RuneResponseSchema, RunesResponseSchema, - SatSchema, + SatInfoSchema, ServerStatusSchema, TransactionInfoSchema, } from './schemas'; @@ -105,61 +105,135 @@ export class OrdClient { return result.data; } + /** + * Retrieves information about a specific address including its outputs, + * inscriptions, and rune balances. + * + * @param {string} address - Bitcoin address to query. + * @returns {Promise} Address details including outputs and balances. + */ async getAddressInfo(address: string): Promise { return this.fetch(api.address(address), AddressInfoSchema); } + /** + * Fetches details about a specific block by its height or hash. + * + * @param {number | BlockHash} heightOrHash - Block height (number) or block hash (string). + * @returns {Promise} Detailed information about the block. + */ async getBlock(heightOrHash: number | BlockHash): Promise { return this.fetch(api.block(heightOrHash), BlockInfoSchema); } + /** + * Retrieves the total number of blocks in the blockchain. + * + * @returns {Promise} Current block count + */ async getBlockCount(): Promise { return this.fetch(api.blockcount, z.number().int().nonnegative()); } + /** + * Gets the hash of a block at the specified height. + * + * @param {number} height - Block height to get hash for + * @returns {Promise} Block hash + */ async getBlockHashByHeight(height: number): Promise { return this.fetch(api.blockhash.byHeight(height), BlockHashSchema); } + /** + * Gets the hash of the latest block. + * + * @returns {Promise} Latest block hash + */ async getLatestBlockHash(): Promise { return this.fetch(api.blockhash.latest, BlockHashSchema); } + /** + * Gets the height of the latest block. + * + * @returns {Promise} Latest block height + */ async getLatestBlockHeight(): Promise { return this.fetch(api.blockheight, z.number().int().nonnegative()); } + /** + * Returns the height of the latest block, the blockhashes of the last 100 blocks, and featured inscriptions from them. + * + * @returns {Promise} Latest blocks information + */ async getLatestBlocks(): Promise { return this.fetch(api.blocks, BlocksResponseSchema); } + /** + * Gets the timestamp of the latest block. + * + * @returns {Promise} Latest block's Unix timestamp + */ async getLatestBlockTime(): Promise { return this.fetch(api.blocktime, z.number().int()); } + /** + * Retrieves information about a specific inscription by its ID. + * + * @param {string} id - Inscription ID + * @returns {Promise} Detailed information about the inscription + */ async getInscription(id: string): Promise { - return this.fetch(api.inscription(id), InscriptionSchema); + return this.fetch(api.inscription(id), InscriptionInfoSchema); } + /** + * Gets a specific child inscription of a parent inscription. + * + * @param {string} id - Parent inscription ID + * @param {number} child - Index of the child inscription + * @returns {Promise} Child inscription details + */ async getInscriptionChild( id: string, child: number, ): Promise { - return this.fetch(api.inscriptionChild(id, child), InscriptionSchema); + return this.fetch(api.inscriptionChild(id, child), InscriptionInfoSchema); } + /** + * Gets a list of the 100 most recent inscriptions. + * + * @returns {Promise} Latest inscriptions information + */ async getLatestInscriptions(): Promise { return this.fetch(api.inscriptions.latest, InscriptionsResponseSchema); } + /** + * Retrieves information about multiple inscriptions by their IDs. + * + * @param {string[]} ids - Array of inscription IDs to fetch + * @returns {Promise} Array of inscription details + */ async getInscriptionsByIds(ids: string[]): Promise { return this.fetchPost( api.inscriptions.base, ids, - z.array(InscriptionSchema), + z.array(InscriptionInfoSchema), ); } + /** + * Gets inscriptions for a specific page number in paginated results. + * + * @param {number} page - Page number to fetch + * @returns {Promise} Page of inscriptions + */ async getInscriptionsByPage(page: number): Promise { return this.fetch( api.inscriptions.byPage(page), @@ -167,6 +241,12 @@ export class OrdClient { ); } + /** + * Gets all inscriptions in a specific block. + * + * @param {number} height - Block height to fetch inscriptions from + * @returns {Promise} Block's inscriptions + */ async getInscriptionsByBlock(height: number): Promise { return this.fetch( api.inscriptions.byBlock(height), @@ -174,10 +254,22 @@ export class OrdClient { ); } + /** + * Retrieves information about a specific UTXO. + * + * @param {string} outpoint - Transaction outpoint in format {txid}:{vout} + * @returns {Promise} UTXO details + */ async getOutput(outpoint: string): Promise { return this.fetch(api.output(outpoint), OutputInfoSchema); } + /** + * Gets information about multiple UTXOs. + * + * @param {string[]} outpoints - Array of outpoints to fetch + * @returns {Promise} Array of UTXO details + */ async getOutputs(outpoints: string[]): Promise { return this.fetchPost( api.outputs.base, @@ -186,6 +278,13 @@ export class OrdClient { ); } + /** + * Gets all UTXOs for a specific address, optionally filtered by type. + * + * @param {string} address - Bitcoin address to get outputs for + * @param {OutputType} [type] - Optional filter for specific output types + * @returns {Promise} Array of address's UTXOs + */ async getOutputsByAddress( address: string, type?: OutputType, @@ -196,26 +295,60 @@ export class OrdClient { ); } + /** + * Gets information about a specific rune by name. + * + * @param {string} name - Rune name + * @returns {Promise} Rune details + */ async getRune(name: string): Promise { return this.fetch(api.rune(name), RuneResponseSchema); } + /** + * Gets a list of the 100 most recent runes. + * + * @returns {Promise} Latest runes information + */ async getLatestRunes(): Promise { return this.fetch(api.runes.latest, RunesResponseSchema); } + /** + * Gets runes for a specific page number in paginated results. + * + * @param {number} page - Page number to fetch + * @returns {Promise} Page of runes + */ async getRunesByPage(page: number): Promise { return this.fetch(api.runes.byPage(page), RunesResponseSchema); } + /** + * Gets information about a specific satoshi by its number. + * + * @param {number} number - Satoshi number + * @returns {Promise} Satoshi details + */ async getSat(number: number): Promise { - return this.fetch(api.sat(number), SatSchema); + return this.fetch(api.sat(number), SatInfoSchema); } + /** + * Gets information about a specific transaction. + * + * @param {string} txId - Transaction ID + * @returns {Promise} Transaction details + */ async getTransaction(txId: string): Promise { return this.fetch(api.tx(txId), TransactionInfoSchema); } + /** + * Gets the current server status and information. + * + * @returns {Promise} Server status details + */ async getServerStatus(): Promise { return this.fetch(api.status, ServerStatusSchema); } diff --git a/src/schemas/inscription.ts b/src/schemas/inscription.ts index d332f34..c317073 100644 --- a/src/schemas/inscription.ts +++ b/src/schemas/inscription.ts @@ -1,6 +1,6 @@ import { z } from 'zod'; -export const CharmSchema = z.enum([ +export const CharmTypeSchema = z.enum([ 'burned', 'coin', 'cursed', @@ -17,9 +17,9 @@ export const CharmSchema = z.enum([ 'vindicated', ]); -export const InscriptionSchema = z.object({ +export const InscriptionInfoSchema = z.object({ address: z.string().nullable(), - charms: z.array(CharmSchema), + charms: z.array(CharmTypeSchema), child_count: z.number().int().nonnegative(), children: z.array(z.string()), content_length: z.number().int().nonnegative().nullable(), diff --git a/src/schemas/output.ts b/src/schemas/output.ts index 9e0c589..d7f2dc2 100644 --- a/src/schemas/output.ts +++ b/src/schemas/output.ts @@ -12,7 +12,7 @@ const SatRangeSchema = z.tuple([ z.number().int().nonnegative(), ]); -const RuneSchema = z.object({ +const RuneInfoSchema = z.object({ amount: z.number().int().nonnegative(), divisibility: z.number().int().nonnegative(), symbol: z.string(), @@ -23,7 +23,7 @@ export const OutputInfoSchema = z.object({ indexed: z.boolean(), inscriptions: z.array(z.string()).nullable(), outpoint: z.string(), - runes: z.record(z.string(), RuneSchema).nullable(), + runes: z.record(z.string(), RuneInfoSchema).nullable(), sat_ranges: z.array(SatRangeSchema).nullable(), script_pubkey: z.string(), spent: z.boolean(), diff --git a/src/schemas/rune.ts b/src/schemas/rune.ts index 257ff1d..97f5d02 100644 --- a/src/schemas/rune.ts +++ b/src/schemas/rune.ts @@ -9,7 +9,7 @@ export const RuneTermsSchema = z }) .nullable(); -export const RuneSchema = z.object({ +export const RuneInfoSchema = z.object({ block: z.number().int().nonnegative(), burned: z.number().int().nonnegative(), divisibility: z.number().int().nonnegative(), @@ -25,14 +25,14 @@ export const RuneSchema = z.object({ }); export const RuneResponseSchema = z.object({ - entry: RuneSchema, + entry: RuneInfoSchema, id: z.string(), mintable: z.boolean(), parent: z.string().nullable(), }); export const RunesResponseSchema = z.object({ - entries: z.array(z.tuple([z.string(), RuneSchema])), + entries: z.array(z.tuple([z.string(), RuneInfoSchema])), more: z.boolean(), prev: z.number().nullable(), next: z.number().nullable(), diff --git a/src/schemas/sat.ts b/src/schemas/sat.ts index f8a29ba..862942a 100644 --- a/src/schemas/sat.ts +++ b/src/schemas/sat.ts @@ -1,7 +1,7 @@ import { z } from 'zod'; -import { CharmSchema } from './inscription'; +import { CharmTypeSchema } from './inscription'; -export const RaritySchema = z.enum([ +export const RarityTypeSchema = z.enum([ 'common', 'uncommon', 'rare', @@ -10,10 +10,10 @@ export const RaritySchema = z.enum([ 'mythic', ]); -export const SatSchema = z.object({ +export const SatInfoSchema = z.object({ address: z.string().nullable(), block: z.number().int().nonnegative(), - charms: z.array(CharmSchema), + charms: z.array(CharmTypeSchema), cycle: z.number().int().nonnegative(), decimal: z.string(), degree: z.string(), @@ -24,7 +24,7 @@ export const SatSchema = z.object({ offset: z.number().int().nonnegative(), percentile: z.string(), period: z.number().int().nonnegative(), - rarity: RaritySchema, + rarity: RarityTypeSchema, satpoint: z.string().nullable(), timestamp: z.number().int(), }); diff --git a/src/test/unit/schemas.test.ts b/src/test/unit/schemas.test.ts index 5f11a27..91a1378 100644 --- a/src/test/unit/schemas.test.ts +++ b/src/test/unit/schemas.test.ts @@ -11,12 +11,12 @@ import { TransactionSchema, } from '../../schemas/transaction'; import { - InscriptionSchema, + InscriptionInfoSchema, InscriptionsResponseSchema, } from '../../schemas/inscription'; import { OutputInfoSchema } from '../../schemas/output'; -import { RuneSchema, RunesResponseSchema } from '../../schemas/rune'; -import { SatSchema } from '../../schemas/sat'; +import { RuneInfoSchema, RunesResponseSchema } from '../../schemas/rune'; +import { SatInfoSchema } from '../../schemas/sat'; import { ServerStatusSchema } from '../../schemas/status'; import { GENESIS_BLOCK, @@ -216,9 +216,9 @@ describe('Schema Validation', () => { }); describe('Inscription Schemas', () => { - describe('InscriptionSchema', () => { + describe('InscriptionInfoSchema', () => { test('validates valid inscription', () => { - const result = InscriptionSchema.safeParse(SAMPLE_INSCRIPTION); + const result = InscriptionInfoSchema.safeParse(SAMPLE_INSCRIPTION); expect(result.success).toBe(true); }); @@ -227,7 +227,7 @@ describe('Schema Validation', () => { ...SAMPLE_INSCRIPTION, charms: ['invalid_charm'], }; - const result = InscriptionSchema.safeParse(inscriptionWithInvalidCharm); + const result = InscriptionInfoSchema.safeParse(inscriptionWithInvalidCharm); expect(result.success).toBe(false); }); @@ -238,7 +238,7 @@ describe('Schema Validation', () => { children: [], parents: [], }; - const result = InscriptionSchema.safeParse(inscriptionWithEmptyArrays); + const result = InscriptionInfoSchema.safeParse(inscriptionWithEmptyArrays); expect(result.success).toBe(true); }); @@ -252,7 +252,7 @@ describe('Schema Validation', () => { sat: null, metaprotocol: null, }; - const result = InscriptionSchema.safeParse(nullableInscription); + const result = InscriptionInfoSchema.safeParse(nullableInscription); expect(result.success).toBe(true); }); @@ -263,7 +263,7 @@ describe('Schema Validation', () => { fee: -1, value: -1, }; - const result = InscriptionSchema.safeParse(inscriptionWithNegatives); + const result = InscriptionInfoSchema.safeParse(inscriptionWithNegatives); expect(result.success).toBe(false); }); }); @@ -338,9 +338,9 @@ describe('Schema Validation', () => { }); describe('Rune Schemas', () => { - describe('RuneSchema', () => { + describe('RuneInfoSchema', () => { test('validates valid rune', () => { - const result = RuneSchema.safeParse(SAMPLE_RUNE); + const result = RuneInfoSchema.safeParse(SAMPLE_RUNE); expect(result.success).toBe(true); }); @@ -349,7 +349,7 @@ describe('Schema Validation', () => { ...SAMPLE_RUNE, symbol: null, }; - const result = RuneSchema.safeParse(runeWithNullSymbol); + const result = RuneInfoSchema.safeParse(runeWithNullSymbol); expect(result.success).toBe(true); }); @@ -360,7 +360,7 @@ describe('Schema Validation', () => { burned: -1, mints: -1, }; - const result = RuneSchema.safeParse(invalidRune); + const result = RuneInfoSchema.safeParse(invalidRune); expect(result.success).toBe(false); }); @@ -389,9 +389,9 @@ describe('Schema Validation', () => { }); describe('Sat Schema', () => { - describe('SatSchema', () => { + describe('SatInfoSchema', () => { test('validates valid sat', () => { - const result = SatSchema.safeParse(SAMPLE_SAT); + const result = SatInfoSchema.safeParse(SAMPLE_SAT); expect(result.success).toBe(true); }); @@ -401,7 +401,7 @@ describe('Schema Validation', () => { address: null, satpoint: null, }; - const result = SatSchema.safeParse(satWithNullSatpoint); + const result = SatInfoSchema.safeParse(satWithNullSatpoint); expect(result.success).toBe(true); }); @@ -410,7 +410,7 @@ describe('Schema Validation', () => { ...SAMPLE_SAT, charms: ['invalid_charm'], }; - const result = SatSchema.safeParse(satWithInvalidCharm); + const result = SatInfoSchema.safeParse(satWithInvalidCharm); expect(result.success).toBe(false); }); @@ -419,7 +419,7 @@ describe('Schema Validation', () => { ...SAMPLE_SAT, rarity: 'invalid_rarity', }; - const result = SatSchema.safeParse(satWithInvalidRarity); + const result = SatInfoSchema.safeParse(satWithInvalidRarity); expect(result.success).toBe(false); }); @@ -430,7 +430,7 @@ describe('Schema Validation', () => { offset: -1, period: -1, }; - const result = SatSchema.safeParse(satWithNegatives); + const result = SatInfoSchema.safeParse(satWithNegatives); expect(result.success).toBe(false); }); }); diff --git a/src/types/index.ts b/src/types/index.ts index 29166ca..26f6faa 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -6,42 +6,105 @@ import type { TransactionSchema, InputSchema, AddressInfoSchema, - InscriptionSchema, - CharmSchema, + InscriptionInfoSchema, + CharmTypeSchema, InscriptionsResponseSchema, OutputInfoSchema, - RuneSchema, + RuneInfoSchema, RunesResponseSchema, - SatSchema, + SatInfoSchema, ServerStatusSchema, RuneResponseSchema, TransactionInfoSchema, - RaritySchema, + RarityTypeSchema, OutputSchema, OutputTypeSchema, } from '../schemas'; +/** + * Comprehensive information about a Bitcoin address including its balance, outputs, inscriptions, and runes balances. + * + */ export type AddressInfo = z.infer; +/** + * Detailed block information including height, hash, timestamp, transaction list, and inscription data. + * + */ export type BlockInfo = z.infer; +/** + * A Bitcoin block hash represented as a hex string. + */ export type BlockHash = z.infer; +/** + * Paginated response containing a list of recent blocks and metadata. + */ export type BlocksResponse = z.infer; +/** + * Bitcoin transaction data including version, locktime, inputs and outputs. + */ export type Transaction = z.infer; +/** + * Extended transaction information including block details, timestamp and inscription data. + */ export type TransactionInfo = z.infer; +/** + * Transaction input containing previous output reference and witness data. + */ export type Input = z.infer; +/** + * Transaction output containing value and script pubkey. + */ export type Output = z.infer; -export type SatInfo = z.infer; -export type CharmType = z.infer; -export type RarityType = z.infer; +/** + * Information about a specific satoshi including its number, timestamp, + * and rarity classification. + */ +export type SatInfo = z.infer; +/** + * Special characteristics or properties of a sat (e.g. "cursed", "epic", "burned"). + */ +export type CharmType = z.infer; +/** + * Classification of sat rarity (e.g. "common", "uncommon", "rare", "epic", "legendary"). + */ +export type RarityType = z.infer; +/** + * Type of UTXO output (e.g. "plain", "inscription", "rune"). + */ export type OutputType = z.infer; +/** + * Detailed information about a UTXO including value, script type, and any inscriptions or runes it contains. + * + */ export type OutputInfo = z.infer; -export type InscriptionInfo = z.infer; +/** + * Comprehensive information about an inscription including its content type, genesis data, location and transfer history. + * + */ +export type InscriptionInfo = z.infer; +/** + * Paginated response containing a list of inscriptions and metadata. + */ export type InscriptionsResponse = z.infer; -export type RuneInfo = z.infer; +/** + * Basic information about a rune including its symbol and supply details. + */ +export type RuneInfo = z.infer; +/** + * Detailed rune information including minting status and parent. + */ export type RuneResponse = z.infer; +/** + * Paginated response containing a list of runes and metadata. + */ export type RunesResponse = z.infer; +/** + * Current status information about the ordinals server including version, height and indexing progress. + * + */ export type ServerStatus = z.infer; From 9fa2cecc09db21ff5b5219cf7818a5d795a8dee2 Mon Sep 17 00:00:00 2001 From: raphjaph Date: Tue, 4 Feb 2025 13:21:41 +0100 Subject: [PATCH 2/6] Amend --- justfile | 3 +++ package.json | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/justfile b/justfile index 4e2e273..0449ce8 100644 --- a/justfile +++ b/justfile @@ -13,6 +13,9 @@ fmt: install lint: install bun run lint +docs: + bun run docs + ci: install lint test publish: diff --git a/package.json b/package.json index c0bf8ad..4d77f99 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,6 @@ "test": "bun test ./src/test/**/*.test.ts", "format": "prettier --write 'src/**/*.ts'", "lint": "eslint . && tsc -b", - "prepublishOnly": "bun run build", "docs:generate": "bun run docs/generate.ts", "docs:html": "bun run docs/generateHtml.ts", "docs:serve": "bun run docs/serveDocs.ts", From 6c2404c306c81a284e585eab69ac762575e97a5f Mon Sep 17 00:00:00 2001 From: raphjaph Date: Tue, 4 Feb 2025 13:29:03 +0100 Subject: [PATCH 3/6] Add docs workflow --- .github/workflows/static.yaml | 48 +++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .github/workflows/static.yaml diff --git a/.github/workflows/static.yaml b/.github/workflows/static.yaml new file mode 100644 index 0000000..f94510e --- /dev/null +++ b/.github/workflows/static.yaml @@ -0,0 +1,48 @@ +on: + push: + branches: ["master"] + +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: "pages" + cancel-in-progress: true + +jobs: + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Bun + uses: oven-sh/setup-bun@v2 + with: + bun-version: latest + + - name: Install dependencies + run: bun install + + - name: Generate JSON + run: bun run docs:generate + + - name: Generate HTML + run: bun run docs:html + + - name: Setup Pages + uses: actions/configure-pages@v5 + + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + path: "./docs/dist" + + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 From d2e943db6f2ca8e49971c4d4f96ca9dedd5ec881 Mon Sep 17 00:00:00 2001 From: raphjaph Date: Tue, 4 Feb 2025 13:30:06 +0100 Subject: [PATCH 4/6] Amend --- .github/workflows/static.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/static.yaml b/.github/workflows/static.yaml index f94510e..07468e3 100644 --- a/.github/workflows/static.yaml +++ b/.github/workflows/static.yaml @@ -1,6 +1,10 @@ on: push: - branches: ["master"] + branches: + - master + pull_request: + branches: + - master permissions: contents: read From 4c02f2b69884b8b88c74ca60b0a03b6e22c80185 Mon Sep 17 00:00:00 2001 From: raphjaph Date: Tue, 4 Feb 2025 13:32:26 +0100 Subject: [PATCH 5/6] Amend --- .github/workflows/static.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/static.yaml b/.github/workflows/static.yaml index 07468e3..bafc74c 100644 --- a/.github/workflows/static.yaml +++ b/.github/workflows/static.yaml @@ -2,9 +2,6 @@ on: push: branches: - master - pull_request: - branches: - - master permissions: contents: read From c8d75614a2eb3daadcf9a91eff4281c5bf2352a8 Mon Sep 17 00:00:00 2001 From: raphjaph Date: Tue, 4 Feb 2025 13:33:40 +0100 Subject: [PATCH 6/6] Amend --- docs/api-docs.json | 1051 -------------------------------------------- 1 file changed, 1051 deletions(-) delete mode 100644 docs/api-docs.json diff --git a/docs/api-docs.json b/docs/api-docs.json deleted file mode 100644 index 0cc2fbe..0000000 --- a/docs/api-docs.json +++ /dev/null @@ -1,1051 +0,0 @@ -{ - "classMethods": [ - { - "name": "getAddressInfo", - "parameters": [ - { - "name": "address", - "type": "string", - "description": "Bitcoin address to query." - } - ], - "description": "Retrieves information about a specific address including its outputs,\ninscriptions, and rune balances.", - "endpoint": "/address/{address}", - "httpMethod": "GET", - "returnType": "Promise", - "responseSchema": "AddressInfoSchema)" - }, - { - "name": "getBlock", - "parameters": [ - { - "name": "heightOrHash", - "type": "number | BlockHash", - "description": "Block height (number) or block hash (string)." - } - ], - "description": "Fetches details about a specific block by its height or hash.", - "endpoint": "/block/{heightOrHash}", - "httpMethod": "GET", - "returnType": "Promise", - "responseSchema": "BlockInfoSchema)" - }, - { - "name": "getBlockCount", - "parameters": [], - "description": "Retrieves the total number of blocks in the blockchain.", - "endpoint": "/blockcount", - "httpMethod": "GET", - "returnType": "Promise", - "responseSchema": "z.number()" - }, - { - "name": "getBlockHashByHeight", - "parameters": [ - { - "name": "height", - "type": "number", - "description": "Block height to get hash for" - } - ], - "description": "Gets the hash of a block at the specified height.", - "endpoint": "/blockhash/{height}", - "httpMethod": "GET", - "returnType": "Promise", - "responseSchema": "BlockHashSchema)" - }, - { - "name": "getLatestBlockHash", - "parameters": [], - "description": "Gets the hash of the latest block.", - "endpoint": "/blockhash", - "httpMethod": "GET", - "returnType": "Promise", - "responseSchema": "BlockHashSchema)" - }, - { - "name": "getLatestBlockHeight", - "parameters": [], - "description": "Gets the height of the latest block.", - "endpoint": "/blockheight", - "httpMethod": "GET", - "returnType": "Promise", - "responseSchema": "z.number()" - }, - { - "name": "getLatestBlocks", - "parameters": [], - "description": "Returns the height of the latest block, the blockhashes of the last 100 blocks, and featured inscriptions from them.", - "endpoint": "/blocks", - "httpMethod": "GET", - "returnType": "Promise", - "responseSchema": "BlocksResponseSchema)" - }, - { - "name": "getLatestBlockTime", - "parameters": [], - "description": "Gets the timestamp of the latest block.", - "endpoint": "/blocktime", - "httpMethod": "GET", - "returnType": "Promise", - "responseSchema": "z.number()" - }, - { - "name": "getInscription", - "parameters": [ - { - "name": "id", - "type": "string", - "description": "Inscription ID" - } - ], - "description": "Retrieves information about a specific inscription by its ID.", - "endpoint": "/inscription/{id}", - "httpMethod": "GET", - "returnType": "Promise", - "responseSchema": "InscriptionInfoSchema)" - }, - { - "name": "getInscriptionChild", - "parameters": [ - { - "name": "id", - "type": "string", - "description": "Parent inscription ID" - }, - { - "name": "child", - "type": "number", - "description": "Index of the child inscription" - } - ], - "description": "Gets a specific child inscription of a parent inscription.", - "endpoint": "/inscription/{id}/{child}", - "httpMethod": "GET", - "returnType": "Promise", - "responseSchema": "child)" - }, - { - "name": "getLatestInscriptions", - "parameters": [], - "description": "Gets a list of the 100 most recent inscriptions.", - "endpoint": "/inscriptions", - "httpMethod": "GET", - "returnType": "Promise", - "responseSchema": "InscriptionsResponseSchema)" - }, - { - "name": "getInscriptionsByIds", - "parameters": [ - { - "name": "ids", - "type": "string[]", - "description": "Array of inscription IDs to fetch" - } - ], - "description": "Retrieves information about multiple inscriptions by their IDs.", - "endpoint": "/inscriptions", - "httpMethod": "POST", - "returnType": "Promise", - "responseSchema": "" - }, - { - "name": "getInscriptionsByPage", - "parameters": [ - { - "name": "page", - "type": "number", - "description": "Page number to fetch" - } - ], - "description": "Gets inscriptions for a specific page number in paginated results.", - "endpoint": "/inscriptions/{page}", - "httpMethod": "GET", - "returnType": "Promise", - "responseSchema": "InscriptionsResponseSchema" - }, - { - "name": "getInscriptionsByBlock", - "parameters": [ - { - "name": "height", - "type": "number", - "description": "Block height to fetch inscriptions from" - } - ], - "description": "Gets all inscriptions in a specific block.", - "endpoint": "/inscriptions/block/{height}", - "httpMethod": "GET", - "returnType": "Promise", - "responseSchema": "InscriptionsResponseSchema" - }, - { - "name": "getOutput", - "parameters": [ - { - "name": "outpoint", - "type": "string", - "description": "Transaction outpoint in format {txid}:{vout}" - } - ], - "description": "Retrieves information about a specific UTXO.", - "endpoint": "/output/{outpoint}", - "httpMethod": "GET", - "returnType": "Promise", - "responseSchema": "OutputInfoSchema)" - }, - { - "name": "getOutputs", - "parameters": [ - { - "name": "outpoints", - "type": "string[]", - "description": "Array of outpoints to fetch" - } - ], - "description": "Gets information about multiple UTXOs.", - "endpoint": "/outputs", - "httpMethod": "POST", - "returnType": "Promise", - "responseSchema": "" - }, - { - "name": "getOutputsByAddress", - "parameters": [ - { - "name": "address", - "type": "string", - "description": "Bitcoin address to get outputs for" - }, - { - "name": "type", - "type": "OutputType", - "description": "" - } - ], - "description": "Gets all UTXOs for a specific address, optionally filtered by type.", - "endpoint": "/outputs/{address}?type={type}", - "httpMethod": "GET", - "returnType": "Promise", - "responseSchema": "type)" - }, - { - "name": "getRune", - "parameters": [ - { - "name": "name", - "type": "string", - "description": "Rune name" - } - ], - "description": "Gets information about a specific rune by name.", - "endpoint": "/rune/{name}", - "httpMethod": "GET", - "returnType": "Promise", - "responseSchema": "RuneResponseSchema)" - }, - { - "name": "getLatestRunes", - "parameters": [], - "description": "Gets a list of the 100 most recent runes.", - "endpoint": "/runes", - "httpMethod": "GET", - "returnType": "Promise", - "responseSchema": "RunesResponseSchema)" - }, - { - "name": "getRunesByPage", - "parameters": [ - { - "name": "page", - "type": "number", - "description": "Page number to fetch" - } - ], - "description": "Gets runes for a specific page number in paginated results.", - "endpoint": "/runes/{page}", - "httpMethod": "GET", - "returnType": "Promise", - "responseSchema": "RunesResponseSchema)" - }, - { - "name": "getSat", - "parameters": [ - { - "name": "number", - "type": "number", - "description": "Satoshi number" - } - ], - "description": "Gets information about a specific satoshi by its number.", - "endpoint": "/sat/{number}", - "httpMethod": "GET", - "returnType": "Promise", - "responseSchema": "SatInfoSchema)" - }, - { - "name": "getTransaction", - "parameters": [ - { - "name": "txId", - "type": "string", - "description": "Transaction ID" - } - ], - "description": "Gets information about a specific transaction.", - "endpoint": "/tx/{txId}", - "httpMethod": "GET", - "returnType": "Promise", - "responseSchema": "TransactionInfoSchema)" - }, - { - "name": "getServerStatus", - "parameters": [], - "description": "Gets the current server status and information.", - "endpoint": "/status", - "httpMethod": "GET", - "returnType": "Promise", - "responseSchema": "ServerStatusSchema)" - } - ], - "exportedTypes": [ - { - "name": "AddressInfo", - "type": "object", - "description": "Comprehensive information about a Bitcoin address including its balance, outputs, inscriptions, and runes balances.", - "properties": [ - { - "name": "inscriptions", - "type": "string[] | null", - "description": "" - }, - { - "name": "outputs", - "type": "string[]", - "description": "" - }, - { - "name": "runes_balances", - "type": "string[][] | null", - "description": "" - }, - { - "name": "sat_balance", - "type": "number", - "description": "" - } - ], - "sourceFile": "address.ts" - }, - { - "name": "BlockInfo", - "type": "object", - "description": "Detailed block information including height, hash, timestamp, transaction list, and inscription data.", - "properties": [ - { - "name": "best_height", - "type": "number", - "description": "" - }, - { - "name": "hash", - "type": "BlockHash", - "description": "" - }, - { - "name": "height", - "type": "number", - "description": "" - }, - { - "name": "inscriptions", - "type": "string[]", - "description": "" - }, - { - "name": "runes", - "type": "string[]", - "description": "" - }, - { - "name": "target", - "type": "string", - "description": "" - }, - { - "name": "transactions", - "type": "Transaction[]", - "description": "" - } - ], - "sourceFile": "block.ts" - }, - { - "name": "BlocksResponse", - "type": "object", - "description": "Paginated response containing a list of recent blocks and metadata.", - "properties": [ - { - "name": "blocks", - "type": "BlockHash[]", - "description": "" - }, - { - "name": "featured_blocks", - "type": "Record", - "description": "" - }, - { - "name": "last", - "type": "number", - "description": "" - } - ], - "sourceFile": "block.ts" - }, - { - "name": "CharmType", - "type": "enum", - "description": "Special characteristics or properties of a sat (e.g. \"cursed\", \"epic\", \"burned\").", - "values": [ - "burned", - "coin", - "cursed", - "epic", - "legendary", - "lost", - "mythic", - "nineball", - "palindrome", - "rare", - "reinscription", - "unbound", - "uncommon", - "vindicated" - ], - "sourceFile": "inscription.ts" - }, - { - "name": "InscriptionInfo", - "type": "object", - "description": "Comprehensive information about an inscription including its content type, genesis data, location and transfer history.", - "properties": [ - { - "name": "address", - "type": "string | null", - "description": "" - }, - { - "name": "charms", - "type": "CharmType[]", - "description": "" - }, - { - "name": "child_count", - "type": "number", - "description": "" - }, - { - "name": "children", - "type": "string[]", - "description": "" - }, - { - "name": "content_length", - "type": "number | null", - "description": "" - }, - { - "name": "content_type", - "type": "string | null", - "description": "" - }, - { - "name": "effective_content_type", - "type": "string | null", - "description": "" - }, - { - "name": "fee", - "type": "number", - "description": "" - }, - { - "name": "height", - "type": "number", - "description": "" - }, - { - "name": "id", - "type": "string", - "description": "" - }, - { - "name": "metaprotocol", - "type": "string | null", - "description": "" - }, - { - "name": "next", - "type": "string | null | null", - "description": "" - }, - { - "name": "number", - "type": "number", - "description": "" - }, - { - "name": "parents", - "type": "string[]", - "description": "" - }, - { - "name": "previous", - "type": "string | null", - "description": "" - }, - { - "name": "rune", - "type": "string | null", - "description": "" - }, - { - "name": "sat", - "type": "number | null", - "description": "" - }, - { - "name": "satpoint", - "type": "string", - "description": "" - }, - { - "name": "timestamp", - "type": "number", - "description": "" - }, - { - "name": "value", - "type": "number | null", - "description": "" - } - ], - "sourceFile": "inscription.ts" - }, - { - "name": "InscriptionsResponse", - "type": "object", - "description": "Paginated response containing a list of inscriptions and metadata.", - "properties": [ - { - "name": "ids", - "type": "string[]", - "description": "" - }, - { - "name": "more", - "type": "boolean", - "description": "" - }, - { - "name": "page_index", - "type": "number", - "description": "" - } - ], - "sourceFile": "inscription.ts" - }, - { - "name": "OutputType", - "type": "enum", - "description": "Type of UTXO output (e.g. \"plain\", \"inscription\", \"rune\").", - "values": [ - "any", - "cardinal", - "inscribed", - "runic" - ], - "sourceFile": "output.ts" - }, - { - "name": "OutputInfo", - "type": "object", - "description": "Detailed information about a UTXO including value, script type, and any inscriptions or runes it contains.", - "properties": [ - { - "name": "address", - "type": "string | null", - "description": "" - }, - { - "name": "indexed", - "type": "boolean", - "description": "" - }, - { - "name": "inscriptions", - "type": "string[] | null", - "description": "" - }, - { - "name": "outpoint", - "type": "string", - "description": "" - }, - { - "name": "runes", - "type": "Record | null", - "description": "" - }, - { - "name": "sat_ranges", - "type": "SatRange[] | null", - "description": "" - }, - { - "name": "script_pubkey", - "type": "string", - "description": "" - }, - { - "name": "spent", - "type": "boolean", - "description": "" - }, - { - "name": "transaction", - "type": "string", - "description": "" - }, - { - "name": "value", - "type": "number", - "description": "" - } - ], - "sourceFile": "output.ts" - }, - { - "name": "RuneInfo", - "type": "object", - "description": "Basic information about a rune including its symbol and supply details.", - "properties": [ - { - "name": "block", - "type": "number", - "description": "" - }, - { - "name": "burned", - "type": "number", - "description": "" - }, - { - "name": "divisibility", - "type": "number", - "description": "" - }, - { - "name": "etching", - "type": "string", - "description": "" - }, - { - "name": "mints", - "type": "number", - "description": "" - }, - { - "name": "number", - "type": "number", - "description": "" - }, - { - "name": "premine", - "type": "number", - "description": "" - }, - { - "name": "spaced_rune", - "type": "string", - "description": "" - }, - { - "name": "symbol", - "type": "string | null", - "description": "" - }, - { - "name": "terms", - "type": "RuneTerms", - "description": "" - }, - { - "name": "timestamp", - "type": "number", - "description": "" - }, - { - "name": "turbo", - "type": "boolean", - "description": "" - } - ], - "sourceFile": "rune.ts" - }, - { - "name": "RuneResponse", - "type": "object", - "description": "Detailed rune information including minting status and parent.", - "properties": [ - { - "name": "entry", - "type": "RuneInfo", - "description": "" - }, - { - "name": "id", - "type": "string", - "description": "" - }, - { - "name": "mintable", - "type": "boolean", - "description": "" - }, - { - "name": "parent", - "type": "string | null", - "description": "" - } - ], - "sourceFile": "rune.ts" - }, - { - "name": "RunesResponse", - "type": "object", - "description": "Paginated response containing a list of runes and metadata.", - "properties": [ - { - "name": "entries", - "type": "[string, RuneInfo][]", - "description": "" - }, - { - "name": "more", - "type": "boolean", - "description": "" - }, - { - "name": "next", - "type": "number | null", - "description": "" - }, - { - "name": "prev", - "type": "number | null", - "description": "" - } - ], - "sourceFile": "rune.ts" - }, - { - "name": "RarityType", - "type": "enum", - "description": "Classification of sat rarity (e.g. \"common\", \"uncommon\", \"rare\", \"epic\", \"legendary\").", - "values": [ - "common", - "epic", - "legendary", - "mythic", - "rare", - "uncommon" - ], - "sourceFile": "sat.ts" - }, - { - "name": "SatInfo", - "type": "object", - "description": "Information about a specific satoshi including its number, timestamp,", - "properties": [ - { - "name": "address", - "type": "string | null", - "description": "" - }, - { - "name": "block", - "type": "number", - "description": "" - }, - { - "name": "charms", - "type": "CharmType[]", - "description": "" - }, - { - "name": "cycle", - "type": "number", - "description": "" - }, - { - "name": "decimal", - "type": "string", - "description": "" - }, - { - "name": "degree", - "type": "string", - "description": "" - }, - { - "name": "epoch", - "type": "number", - "description": "" - }, - { - "name": "inscriptions", - "type": "string[]", - "description": "" - }, - { - "name": "name", - "type": "string", - "description": "" - }, - { - "name": "number", - "type": "number", - "description": "" - }, - { - "name": "offset", - "type": "number", - "description": "" - }, - { - "name": "percentile", - "type": "string", - "description": "" - }, - { - "name": "period", - "type": "number", - "description": "" - }, - { - "name": "rarity", - "type": "RarityType", - "description": "" - }, - { - "name": "satpoint", - "type": "string | null", - "description": "" - }, - { - "name": "timestamp", - "type": "number", - "description": "" - } - ], - "sourceFile": "sat.ts" - }, - { - "name": "ServerStatus", - "type": "object", - "description": "Current status information about the ordinals server including version, height and indexing progress.", - "properties": [ - { - "name": "address_index", - "type": "boolean", - "description": "" - }, - { - "name": "blessed_inscriptions", - "type": "number", - "description": "" - }, - { - "name": "chain", - "type": "string", - "description": "" - }, - { - "name": "cursed_inscriptions", - "type": "number", - "description": "" - }, - { - "name": "height", - "type": "number", - "description": "" - }, - { - "name": "initial_sync_time", - "type": "Time", - "description": "" - }, - { - "name": "inscriptions", - "type": "number", - "description": "" - }, - { - "name": "lost_sats", - "type": "number", - "description": "" - }, - { - "name": "minimum_rune_for_next_block", - "type": "string | null", - "description": "" - }, - { - "name": "rune_index", - "type": "boolean", - "description": "" - }, - { - "name": "runes", - "type": "number", - "description": "" - }, - { - "name": "sat_index", - "type": "boolean", - "description": "" - }, - { - "name": "started", - "type": "string", - "description": "" - }, - { - "name": "transaction_index", - "type": "boolean", - "description": "" - }, - { - "name": "unrecoverably_reorged", - "type": "boolean", - "description": "" - }, - { - "name": "uptime", - "type": "Time", - "description": "" - } - ], - "sourceFile": "status.ts" - }, - { - "name": "Input", - "type": "object", - "description": "Transaction input containing previous output reference and witness data.", - "properties": [ - { - "name": "previous_output", - "type": "string", - "description": "" - }, - { - "name": "script_sig", - "type": "string", - "description": "" - }, - { - "name": "sequence", - "type": "number", - "description": "" - }, - { - "name": "witness", - "type": "string[]", - "description": "" - } - ], - "sourceFile": "transaction.ts" - }, - { - "name": "Output", - "type": "object", - "description": "Transaction output containing value and script pubkey.", - "properties": [ - { - "name": "script_pubkey", - "type": "string", - "description": "" - }, - { - "name": "value", - "type": "number", - "description": "" - } - ], - "sourceFile": "transaction.ts" - }, - { - "name": "Transaction", - "type": "object", - "description": "Bitcoin transaction data including version, locktime, inputs and outputs.", - "properties": [ - { - "name": "input", - "type": "Input[]", - "description": "" - }, - { - "name": "lock_time", - "type": "number", - "description": "" - }, - { - "name": "output", - "type": "Output[]", - "description": "" - }, - { - "name": "version", - "type": "number", - "description": "" - } - ], - "sourceFile": "transaction.ts" - }, - { - "name": "TransactionInfo", - "type": "object", - "description": "Extended transaction information including block details, timestamp and inscription data.", - "properties": [ - { - "name": "chain", - "type": "string", - "description": "" - }, - { - "name": "etching", - "type": "string | null", - "description": "" - }, - { - "name": "inscription_count", - "type": "number", - "description": "" - }, - { - "name": "transaction", - "type": "Transaction", - "description": "" - }, - { - "name": "txid", - "type": "string", - "description": "" - } - ], - "sourceFile": "transaction.ts" - } - ] -} \ No newline at end of file