From 39d5d49aebd996bb2c604f87008b59981c5e3ae5 Mon Sep 17 00:00:00 2001 From: Vardominator Date: Wed, 11 Dec 2024 20:44:06 +0000 Subject: [PATCH 01/22] feat: Maestro adapater --- .prettierignore | 2 + .prettierrc | 5 +- examples/maestro-adapter-example.ts | 0 package-lock.json | 8142 ++++++++++++++++++++ package.json | 4 +- src/adapters/adapter.ts | 204 + src/{adapter.ts => adapters/blockfrost.ts} | 386 +- src/adapters/maestro.ts | 161 + src/dex-v2.ts | 96 +- src/index.ts | 2 +- 10 files changed, 8670 insertions(+), 332 deletions(-) create mode 100644 examples/maestro-adapter-example.ts create mode 100644 package-lock.json create mode 100644 src/adapters/adapter.ts rename src/{adapter.ts => adapters/blockfrost.ts} (77%) create mode 100644 src/adapters/maestro.ts diff --git a/.prettierignore b/.prettierignore index 378eac2..1b8ac88 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1 +1,3 @@ +# Ignore artifacts: build +coverage diff --git a/.prettierrc b/.prettierrc index 7197da8..0967ef4 100644 --- a/.prettierrc +++ b/.prettierrc @@ -1,4 +1 @@ -{ - "singleQuote": false, - "trailingComma": "es5" -} +{} diff --git a/examples/maestro-adapter-example.ts b/examples/maestro-adapter-example.ts new file mode 100644 index 0000000..e69de29 diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..f88b7bd --- /dev/null +++ b/package-lock.json @@ -0,0 +1,8142 @@ +{ + "name": "@minswap/sdk", + "version": "0.3.4", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "@minswap/sdk", + "version": "0.3.4", + "hasInstallScript": true, + "license": "MIT", + "dependencies": { + "@blockfrost/blockfrost-js": "^5.5.0", + "@cardano-ogmios/client": "^6.5.0", + "@cardano-ogmios/schema": "^6.5.0", + "@minswap/lucid-cardano": "0.10.10-minswap.4", + "@minswap/tiny-invariant": "^1.2.0", + "big.js": "^6.2.1", + "bignumber.js": "^9.1.2", + "exponential-backoff": "^3.1.1", + "ioredis": "^5.4.1", + "remeda": "^2.12.1", + "sha3": "^2.1.4" + }, + "devDependencies": { + "@eslint/compat": "^1.1.1", + "@eslint/js": "^9.9.1", + "@jest/globals": "^29.7.0", + "@prisma/client": "^6.0.1", + "@types/big.js": "^6.2.2", + "@types/eslint__js": "^8.42.3", + "@types/jest": "^29.5.12", + "@types/json-bigint": "^1.0.4", + "@types/node": "^20.9.2", + "esbuild": "^0.23.1", + "eslint": "^9.9.1", + "eslint-plugin-simple-import-sort": "^12.1.1", + "eslint-plugin-unicorn": "^55.0.0", + "eslint-plugin-unused-imports": "^4.1.3", + "jest": "^29.7.0", + "json-bigint": "^1.0.0", + "prettier": "3.3.3", + "prisma": "^6.0.1", + "rimraf": "^6.0.1", + "rollup": "^4.21.2", + "rollup-plugin-dts": "^6.1.1", + "rollup-plugin-esbuild": "^6.1.1", + "ts-jest": "^29.2.5", + "ts-node": "^10.9.2", + "tsx": "^4.19.2", + "typescript": "^5.5.4", + "typescript-eslint": "^8.4.0" + }, + "engines": { + "node": ">=20.17 <21" + }, + "optionalDependencies": { + "@rollup/rollup-linux-x64-gnu": "4.21.2" + } + }, + "node_modules/@ampproject/remapping": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", + "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.26.2", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.26.2.tgz", + "integrity": "sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-validator-identifier": "^7.25.9", + "js-tokens": "^4.0.0", + "picocolors": "^1.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/compat-data": { + "version": "7.26.3", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.26.3.tgz", + "integrity": "sha512-nHIxvKPniQXpmQLb0vhY3VaFb3S0YrTAwpOWJZh1wn3oJPjJk9Asva204PsBdmAE8vpzfHudT8DB0scYvy9q0g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/core": { + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.26.0.tgz", + "integrity": "sha512-i1SLeK+DzNnQ3LL/CswPCa/E5u4lh1k6IAEphON8F+cXt0t9euTshDru0q7/IqMa1PMPz5RnHuHscF8/ZJsStg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@ampproject/remapping": "^2.2.0", + "@babel/code-frame": "^7.26.0", + "@babel/generator": "^7.26.0", + "@babel/helper-compilation-targets": "^7.25.9", + "@babel/helper-module-transforms": "^7.26.0", + "@babel/helpers": "^7.26.0", + "@babel/parser": "^7.26.0", + "@babel/template": "^7.25.9", + "@babel/traverse": "^7.25.9", + "@babel/types": "^7.26.0", + "convert-source-map": "^2.0.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.3", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + } + }, + "node_modules/@babel/core/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@babel/generator": { + "version": "7.26.3", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.26.3.tgz", + "integrity": "sha512-6FF/urZvD0sTeO7k6/B15pMLC4CHUv1426lzr3N01aHJTl046uCAh9LXW/fzeXXjPNCJ6iABW5XaWOsIZB93aQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.26.3", + "@babel/types": "^7.26.3", + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25", + "jsesc": "^3.0.2" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-compilation-targets": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.25.9.tgz", + "integrity": "sha512-j9Db8Suy6yV/VHa4qzrj9yZfZxhLWQdVnRlXxmKLYlhWUVB1sB2G5sxuWYXk/whHD9iW76PmNzxZ4UCnTQTVEQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/compat-data": "^7.25.9", + "@babel/helper-validator-option": "^7.25.9", + "browserslist": "^4.24.0", + "lru-cache": "^5.1.1", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-compilation-targets/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@babel/helper-module-imports": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.25.9.tgz", + "integrity": "sha512-tnUA4RsrmflIM6W6RFTLFSXITtl0wKjgpnLgXyowocVPrbYrLUXSBXDgTs8BlbmIzIdlBySRQjINYs2BAkiLtw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/traverse": "^7.25.9", + "@babel/types": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-transforms": { + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.26.0.tgz", + "integrity": "sha512-xO+xu6B5K2czEnQye6BHA7DolFFmS3LB7stHZFaOLb1pAwO1HWLS8fXA+eh0A2yIvltPVmx3eNNDBJA2SLHXFw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-module-imports": "^7.25.9", + "@babel/helper-validator-identifier": "^7.25.9", + "@babel/traverse": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-plugin-utils": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.25.9.tgz", + "integrity": "sha512-kSMlyUVdWe25rEsRGviIgOWnoT/nfABVWlqt9N19/dIPWViAOW2s9wznP5tURbs/IDuNk4gPy3YdYRgH3uxhBw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-string-parser": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.25.9.tgz", + "integrity": "sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz", + "integrity": "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-option": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.25.9.tgz", + "integrity": "sha512-e/zv1co8pp55dNdEcCynfj9X7nyUKUXoUEwfXqaZt0omVOmDe9oOTdKStH4GmAw6zxMFs50ZayuMfHDKlO7Tfw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helpers": { + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.26.0.tgz", + "integrity": "sha512-tbhNuIxNcVb21pInl3ZSjksLCvgdZy9KwJ8brv993QtIVKJBBkYXz4q4ZbAv31GdnC+R90np23L5FbEBlthAEw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/template": "^7.25.9", + "@babel/types": "^7.26.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/parser": { + "version": "7.26.3", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.3.tgz", + "integrity": "sha512-WJ/CvmY8Mea8iDXo6a7RK2wbmJITT5fN3BEkRuFlxVyNx8jOKIIhmC4fSkTcPcf8JyavbBwIe6OpiCOBXt/IcA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.26.3" + }, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/plugin-syntax-async-generators": { + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", + "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-bigint": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz", + "integrity": "sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-class-properties": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", + "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.12.13" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-class-static-block": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz", + "integrity": "sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-import-attributes": { + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.26.0.tgz", + "integrity": "sha512-e2dttdsJ1ZTpi3B9UYGLw41hifAubg19AtCu/2I/F1QNVclOBr1dYpTdmdyZ84Xiz43BS/tCUkMAZNLv12Pi+A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-import-meta": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", + "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-json-strings": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", + "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-jsx": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.25.9.tgz", + "integrity": "sha512-ld6oezHQMZsZfp6pWtbjaNDF2tiiCYYDqQszHt5VV437lewP9aSi2Of99CK0D0XB21k7FLgnLcmQKyKzynfeAA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-logical-assignment-operators": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", + "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-nullish-coalescing-operator": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", + "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-numeric-separator": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", + "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-object-rest-spread": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", + "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-optional-catch-binding": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", + "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-optional-chaining": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", + "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-private-property-in-object": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz", + "integrity": "sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-top-level-await": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", + "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-typescript": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.25.9.tgz", + "integrity": "sha512-hjMgRy5hb8uJJjUcdWunWVcoi9bGpJp8p5Ol1229PoN6aytsLwNMgmdftO23wnCLMfVmTwZDWMPNq/D1SY60JQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/template": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.25.9.tgz", + "integrity": "sha512-9DGttpmPvIxBb/2uwpVo3dqJ+O6RooAFOS+lB+xDqoE2PVCE8nfoHMdZLpfCQRLwvohzXISPZcgxt80xLfsuwg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.25.9", + "@babel/parser": "^7.25.9", + "@babel/types": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse": { + "version": "7.26.4", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.26.4.tgz", + "integrity": "sha512-fH+b7Y4p3yqvApJALCPJcwb0/XaOSgtK4pzV6WVjPR5GLFQBRI7pfoX2V2iM48NXvX07NUxxm1Vw98YjqTcU5w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.26.2", + "@babel/generator": "^7.26.3", + "@babel/parser": "^7.26.3", + "@babel/template": "^7.25.9", + "@babel/types": "^7.26.3", + "debug": "^4.3.1", + "globals": "^11.1.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse/node_modules/globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/types": { + "version": "7.26.3", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.3.tgz", + "integrity": "sha512-vN5p+1kl59GVKMvTHt55NzzmYVxprfJD+ql7U9NFIfKCBkYE55LYtS+WtPlaYOyzydrKI8Nezd+aZextrd+FMA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-string-parser": "^7.25.9", + "@babel/helper-validator-identifier": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@bcoe/v8-coverage": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", + "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@blockfrost/blockfrost-js": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@blockfrost/blockfrost-js/-/blockfrost-js-5.7.0.tgz", + "integrity": "sha512-Rzw+Ya+LlKJNv9k5g7xW0uM33Xf6Lt3MXANtuwtm7+R9xuMFc7iKocwHSgrGUTTZ1EKou4n4Znai18MdvqG2bw==", + "license": "Apache-2.0", + "dependencies": { + "@blockfrost/openapi": "0.1.70-beta.0", + "@emurgo/cardano-serialization-lib-nodejs": "^11.5.0", + "@emurgo/cip14-js": "3.0.1", + "bottleneck": "^2.19.5", + "form-data": "^4.0.0", + "got": "^11.8.6", + "json-bigint": "^1.0.0" + }, + "engines": { + "node": ">=16" + } + }, + "node_modules/@blockfrost/openapi": { + "version": "0.1.70-beta.0", + "resolved": "https://registry.npmjs.org/@blockfrost/openapi/-/openapi-0.1.70-beta.0.tgz", + "integrity": "sha512-js+ZpOWJHRHE+C1bVTDRen/MKVuaA8Bygjlil8O55bN3MzWfwQ0jzzZCYOAHhkbgEwE+j6ziCbP2+1xwFmtR+Q==", + "dependencies": { + "ajv": "^8.12.0", + "cbor": "^9.0.1", + "rimraf": "6.0.1", + "yaml": "^2.3.4" + }, + "engines": { + "node": ">=20" + } + }, + "node_modules/@cardano-ogmios/client": { + "version": "6.9.0", + "resolved": "https://registry.npmjs.org/@cardano-ogmios/client/-/client-6.9.0.tgz", + "integrity": "sha512-IsoUVsaMXiYyhWrdVKYOA5PDlX0EZ2gaq4lfk4JelRw6mcWVxemUrMaU2ndvugO9LQ3SCM1nESPgMIU0xe5FWw==", + "license": "MPL-2.0", + "dependencies": { + "@cardano-ogmios/schema": "6.9.0", + "@cardanosolutions/json-bigint": "^1.0.1", + "@types/json-bigint": "^1.0.1", + "bech32": "^2.0.0", + "cross-fetch": "^3.1.4", + "fastq": "^1.11.0", + "isomorphic-ws": "^4.0.1", + "nanoid": "^3.1.31", + "ts-custom-error": "^3.2.0", + "ws": "^7.5.10" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/@cardano-ogmios/schema": { + "version": "6.9.0", + "resolved": "https://registry.npmjs.org/@cardano-ogmios/schema/-/schema-6.9.0.tgz", + "integrity": "sha512-e7QVLF+dQMIv9p+p5CWQjMfBmkERYRa2wK2AjyehQZCJnecZ0gvTbRqewdX5VW4mVXf6KUfFyphsxWK46Pg6LA==", + "license": "MPL-2.0", + "engines": { + "node": ">=14" + } + }, + "node_modules/@cardanosolutions/json-bigint": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@cardanosolutions/json-bigint/-/json-bigint-1.0.1.tgz", + "integrity": "sha512-mbYL6jtHqMFCZnTFhmkmoeDzHMBino0gMiGQnOJE7CwzZzkK2HCpH0MTBk+84QDadMEGX7iFt7uB+levm1a+bQ==", + "license": "MIT", + "dependencies": { + "bignumber.js": "^9.0.0" + } + }, + "node_modules/@cspotcode/source-map-support": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", + "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/trace-mapping": "0.3.9" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@cspotcode/source-map-support/node_modules/@jridgewell/trace-mapping": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, + "node_modules/@emurgo/cardano-serialization-lib-nodejs": { + "version": "11.5.0", + "resolved": "https://registry.npmjs.org/@emurgo/cardano-serialization-lib-nodejs/-/cardano-serialization-lib-nodejs-11.5.0.tgz", + "integrity": "sha512-IlVABlRgo9XaTR1NunwZpWcxnfEv04ba2l1vkUz4S1W7Jt36F4CtffP+jPeqBZGnAe+fnUwo0XjIJC3ZTNToNQ==", + "license": "MIT" + }, + "node_modules/@emurgo/cip14-js": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@emurgo/cip14-js/-/cip14-js-3.0.1.tgz", + "integrity": "sha512-u0XobeajNSlmeGBmY3ntA+NE/Vns7hKP0xrFzWyAO7YubETOifTjUddJN4gpvXE4S08DPUcNBVe3sx1m5GPIOg==", + "license": "Apache-2.0 OR MIT", + "dependencies": { + "bech32": "2.0.0", + "blake2b": "2.1.3" + } + }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.23.1.tgz", + "integrity": "sha512-6VhYk1diRqrhBAqpJEdjASR/+WVRtfjpqKuNw11cLiaWpAT/Uu+nokB+UJnevzy/P9C/ty6AOe0dwueMrGh/iQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.23.1.tgz", + "integrity": "sha512-uz6/tEy2IFm9RYOyvKl88zdzZfwEfKZmnX9Cj1BHjeSGNuGLuMD1kR8y5bteYmwqKm1tj8m4cb/aKEorr6fHWQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.23.1.tgz", + "integrity": "sha512-xw50ipykXcLstLeWH7WRdQuysJqejuAGPd30vd1i5zSyKK3WE+ijzHmLKxdiCMtH1pHz78rOg0BKSYOSB/2Khw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.23.1.tgz", + "integrity": "sha512-nlN9B69St9BwUoB+jkyU090bru8L0NA3yFvAd7k8dNsVH8bi9a8cUAUSEcEEgTp2z3dbEDGJGfP6VUnkQnlReg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.23.1.tgz", + "integrity": "sha512-YsS2e3Wtgnw7Wq53XXBLcV6JhRsEq8hkfg91ESVadIrzr9wO6jJDMZnCQbHm1Guc5t/CdDiFSSfWP58FNuvT3Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.23.1.tgz", + "integrity": "sha512-aClqdgTDVPSEGgoCS8QDG37Gu8yc9lTHNAQlsztQ6ENetKEO//b8y31MMu2ZaPbn4kVsIABzVLXYLhCGekGDqw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.23.1.tgz", + "integrity": "sha512-h1k6yS8/pN/NHlMl5+v4XPfikhJulk4G+tKGFIOwURBSFzE8bixw1ebjluLOjfwtLqY0kewfjLSrO6tN2MgIhA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.23.1.tgz", + "integrity": "sha512-lK1eJeyk1ZX8UklqFd/3A60UuZ/6UVfGT2LuGo3Wp4/z7eRTRYY+0xOu2kpClP+vMTi9wKOfXi2vjUpO1Ro76g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.23.1.tgz", + "integrity": "sha512-CXXkzgn+dXAPs3WBwE+Kvnrf4WECwBdfjfeYHpMeVxWE0EceB6vhWGShs6wi0IYEqMSIzdOF1XjQ/Mkm5d7ZdQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.23.1.tgz", + "integrity": "sha512-/93bf2yxencYDnItMYV/v116zff6UyTjo4EtEQjUBeGiVpMmffDNUyD9UN2zV+V3LRV3/on4xdZ26NKzn6754g==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.23.1.tgz", + "integrity": "sha512-VTN4EuOHwXEkXzX5nTvVY4s7E/Krz7COC8xkftbbKRYAl96vPiUssGkeMELQMOnLOJ8k3BY1+ZY52tttZnHcXQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.23.1.tgz", + "integrity": "sha512-Vx09LzEoBa5zDnieH8LSMRToj7ir/Jeq0Gu6qJ/1GcBq9GkfoEAoXvLiW1U9J1qE/Y/Oyaq33w5p2ZWrNNHNEw==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.23.1.tgz", + "integrity": "sha512-nrFzzMQ7W4WRLNUOU5dlWAqa6yVeI0P78WKGUo7lg2HShq/yx+UYkeNSE0SSfSure0SqgnsxPvmAUu/vu0E+3Q==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.23.1.tgz", + "integrity": "sha512-dKN8fgVqd0vUIjxuJI6P/9SSSe/mB9rvA98CSH2sJnlZ/OCZWO1DJvxj8jvKTfYUdGfcq2dDxoKaC6bHuTlgcw==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.23.1.tgz", + "integrity": "sha512-5AV4Pzp80fhHL83JM6LoA6pTQVWgB1HovMBsLQ9OZWLDqVY8MVobBXNSmAJi//Csh6tcY7e7Lny2Hg1tElMjIA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.23.1.tgz", + "integrity": "sha512-9ygs73tuFCe6f6m/Tb+9LtYxWR4c9yg7zjt2cYkjDbDpV/xVn+68cQxMXCjUpYwEkze2RcU/rMnfIXNRFmSoDw==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.23.1.tgz", + "integrity": "sha512-EV6+ovTsEXCPAp58g2dD68LxoP/wK5pRvgy0J/HxPGB009omFPv3Yet0HiaqvrIrgPTBuC6wCH1LTOY91EO5hQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.23.1.tgz", + "integrity": "sha512-aevEkCNu7KlPRpYLjwmdcuNz6bDFiE7Z8XC4CPqExjTvrHugh28QzUXVOZtiYghciKUacNktqxdpymplil1beA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.23.1.tgz", + "integrity": "sha512-3x37szhLexNA4bXhLrCC/LImN/YtWis6WXr1VESlfVtVeoFJBRINPJ3f0a/6LV8zpikqoUg4hyXw0sFBt5Cr+Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.23.1.tgz", + "integrity": "sha512-aY2gMmKmPhxfU+0EdnN+XNtGbjfQgwZj43k8G3fyrDM/UdZww6xrWxmDkuz2eCZchqVeABjV5BpildOrUbBTqA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.23.1.tgz", + "integrity": "sha512-RBRT2gqEl0IKQABT4XTj78tpk9v7ehp+mazn2HbUeZl1YMdaGAQqhapjGTCe7uw7y0frDi4gS0uHzhvpFuI1sA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.23.1.tgz", + "integrity": "sha512-4O+gPR5rEBe2FpKOVyiJ7wNDPA8nGzDuJ6gN4okSA1gEOYZ67N8JPk58tkWtdtPeLz7lBnY6I5L3jdsr3S+A6A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.23.1.tgz", + "integrity": "sha512-BcaL0Vn6QwCwre3Y717nVHZbAa4UBEigzFm6VdsVdT/MbZ38xoj1X9HPkZhbmaBGUD1W8vxAfffbDe8bA6AKnQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.23.1.tgz", + "integrity": "sha512-BHpFFeslkWrXWyUPnbKm+xYYVYruCinGcftSBaa8zoF9hZO4BcSCFUvHVTtzpIY6YzUnYtuEhZ+C9iEXjxnasg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "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==", + "dev": true, + "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==", + "dev": true, + "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==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "node_modules/@eslint/compat": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@eslint/compat/-/compat-1.2.4.tgz", + "integrity": "sha512-S8ZdQj/N69YAtuqFt7653jwcvuUj131+6qGLUyDqfDg1OIoBQ66OCuXC473YQfO2AaxITTutiRQiDwoo7ZLYyg==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "peerDependencies": { + "eslint": "^9.10.0" + }, + "peerDependenciesMeta": { + "eslint": { + "optional": true + } + } + }, + "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==", + "dev": true, + "license": "Apache-2.0", + "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.9.1", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.9.1.tgz", + "integrity": "sha512-GuUdqkyyzQI5RMIWkHhvTWLCyLo1jNK3vzkSyaExH5kHPDHcuL2VOpHjmMY+y3+NC69qAKToBqldTBgYeLSr9Q==", + "dev": true, + "license": "Apache-2.0", + "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==", + "dev": true, + "license": "MIT", + "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/eslintrc/node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "license": "MIT", + "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/@eslint/eslintrc/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==", + "dev": true, + "license": "MIT" + }, + "node_modules/@eslint/js": { + "version": "9.16.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.16.0.tgz", + "integrity": "sha512-tw2HxzQkrbeuvyj1tG2Yqq+0H9wGoI2IMk4EOsQeX+vmd75FtJAzf+gTA69WF+baUKRYQ3x2kbLE08js5OsTVg==", + "dev": true, + "license": "MIT", + "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==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/plugin-kit": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.2.4.tgz", + "integrity": "sha512-zSkKow6H5Kdm0ZUQUB2kV5JIXqoG0+uH5YADhaEHswm664N9Db8dXSi0nMJpacpMf+MyyglF1vnZohpEg5yUtg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "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==", + "dev": true, + "license": "Apache-2.0", + "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==", + "dev": true, + "license": "Apache-2.0", + "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==", + "dev": true, + "license": "Apache-2.0", + "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==", + "dev": true, + "license": "Apache-2.0", + "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==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@ioredis/commands": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@ioredis/commands/-/commands-1.2.0.tgz", + "integrity": "sha512-Sx1pU8EM64o2BrqNpEO1CNLtKQwyhuXuqyfH7oGKCk+1a33d2r5saW8zNwm3j6BTExtjrv2BxTgzzkMwts6vGg==", + "license": "MIT" + }, + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "license": "ISC", + "dependencies": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-regex": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", + "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "license": "MIT" + }, + "node_modules/@isaacs/cliui/node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "license": "MIT", + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@isaacs/cliui/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "license": "MIT", + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/@istanbuljs/load-nyc-config": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", + "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "camelcase": "^5.3.1", + "find-up": "^4.1.0", + "get-package-type": "^0.1.0", + "js-yaml": "^3.13.1", + "resolve-from": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "license": "MIT", + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/schema": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", + "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/@jest/console": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.7.0.tgz", + "integrity": "sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", + "slash": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/core": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.7.0.tgz", + "integrity": "sha512-n7aeXWKMnGtDA48y8TLWJPJmLmmZ642Ceo78cYWEpiD7FzDgmNDV/GCVRorPABdXLJZ/9wzzgZAlHjXjxDHGsg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/console": "^29.7.0", + "@jest/reporters": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "jest-changed-files": "^29.7.0", + "jest-config": "^29.7.0", + "jest-haste-map": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-resolve-dependencies": "^29.7.0", + "jest-runner": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "jest-watcher": "^29.7.0", + "micromatch": "^4.0.4", + "pretty-format": "^29.7.0", + "slash": "^3.0.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/@jest/core/node_modules/ci-info": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz", + "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/sibiraj-s" + } + ], + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/@jest/environment": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.7.0.tgz", + "integrity": "sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/fake-timers": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "jest-mock": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/expect": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.7.0.tgz", + "integrity": "sha512-8uMeAMycttpva3P1lBHB8VciS9V0XAr3GymPpipdyQXbBcuhkLQOSe8E/p92RyAdToS6ZD1tFkX+CkhoECE0dQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "expect": "^29.7.0", + "jest-snapshot": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/expect-utils": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.7.0.tgz", + "integrity": "sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA==", + "dev": true, + "license": "MIT", + "dependencies": { + "jest-get-type": "^29.6.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/fake-timers": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.7.0.tgz", + "integrity": "sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "@sinonjs/fake-timers": "^10.0.2", + "@types/node": "*", + "jest-message-util": "^29.7.0", + "jest-mock": "^29.7.0", + "jest-util": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/globals": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.7.0.tgz", + "integrity": "sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/environment": "^29.7.0", + "@jest/expect": "^29.7.0", + "@jest/types": "^29.6.3", + "jest-mock": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/reporters": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.7.0.tgz", + "integrity": "sha512-DApq0KJbJOEzAFYjHADNNxAE3KbhxQB1y5Kplb5Waqw6zVbuWatSnMjE5gs8FUgEPmNsnZA3NCWl9NG0ia04Pg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@bcoe/v8-coverage": "^0.2.3", + "@jest/console": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@jridgewell/trace-mapping": "^0.3.18", + "@types/node": "*", + "chalk": "^4.0.0", + "collect-v8-coverage": "^1.0.0", + "exit": "^0.1.2", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "istanbul-lib-coverage": "^3.0.0", + "istanbul-lib-instrument": "^6.0.0", + "istanbul-lib-report": "^3.0.0", + "istanbul-lib-source-maps": "^4.0.0", + "istanbul-reports": "^3.1.3", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", + "jest-worker": "^29.7.0", + "slash": "^3.0.0", + "string-length": "^4.0.1", + "strip-ansi": "^6.0.0", + "v8-to-istanbul": "^9.0.1" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/@jest/schemas": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", + "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@sinclair/typebox": "^0.27.8" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/source-map": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-29.6.3.tgz", + "integrity": "sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.18", + "callsites": "^3.0.0", + "graceful-fs": "^4.2.9" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/test-result": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.7.0.tgz", + "integrity": "sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/console": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "collect-v8-coverage": "^1.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/test-sequencer": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.7.0.tgz", + "integrity": "sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/test-result": "^29.7.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "slash": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/transform": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.7.0.tgz", + "integrity": "sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/core": "^7.11.6", + "@jest/types": "^29.6.3", + "@jridgewell/trace-mapping": "^0.3.18", + "babel-plugin-istanbul": "^6.1.1", + "chalk": "^4.0.0", + "convert-source-map": "^2.0.0", + "fast-json-stable-stringify": "^2.1.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-util": "^29.7.0", + "micromatch": "^4.0.4", + "pirates": "^4.0.4", + "slash": "^3.0.0", + "write-file-atomic": "^4.0.2" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/types": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.6.3.tgz", + "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/schemas": "^29.6.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.8.tgz", + "integrity": "sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/set-array": "^1.2.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.24" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/set-array": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", + "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", + "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.25", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", + "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@minswap/lucid-cardano": { + "version": "0.10.10-minswap.4", + "resolved": "https://registry.npmjs.org/@minswap/lucid-cardano/-/lucid-cardano-0.10.10-minswap.4.tgz", + "integrity": "sha512-LFBm2F4ZuLC4z5ktXwQQPeyi9l2P2ypBu/5ZZr+b/ievYw6lDnwhYk6ju0zxjXYk5FG3wlQjW4Qpwqsy0ZlsKA==", + "license": "MIT", + "dependencies": { + "@peculiar/webcrypto": "^1.4.0", + "node-fetch": "^3.2.3", + "ws": "^8.10.0" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/@minswap/lucid-cardano/node_modules/ws": { + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz", + "integrity": "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==", + "license": "MIT", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/@minswap/tiny-invariant": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@minswap/tiny-invariant/-/tiny-invariant-1.2.0.tgz", + "integrity": "sha512-m4CMTsZ4MDB2WLND6rV0eti+f2WcMPhKvXf9ZHXlQMqvNmgoX1z//84FpEX0D1vVTPfJtNS8XIoIQ9pm6X590A==", + "license": "MIT" + }, + "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==", + "dev": true, + "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==", + "dev": true, + "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==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@peculiar/asn1-schema": { + "version": "2.3.13", + "resolved": "https://registry.npmjs.org/@peculiar/asn1-schema/-/asn1-schema-2.3.13.tgz", + "integrity": "sha512-3Xq3a01WkHRZL8X04Zsfg//mGaA21xlL4tlVn4v2xGT0JStiztATRkMwa5b+f/HXmY2smsiLXYK46Gwgzvfg3g==", + "license": "MIT", + "dependencies": { + "asn1js": "^3.0.5", + "pvtsutils": "^1.3.5", + "tslib": "^2.6.2" + } + }, + "node_modules/@peculiar/json-schema": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/@peculiar/json-schema/-/json-schema-1.1.12.tgz", + "integrity": "sha512-coUfuoMeIB7B8/NMekxaDzLhaYmp0HZNPEjYRm9goRou8UZIC3z21s0sL9AWoCw4EG876QyO3kYrc61WNF9B/w==", + "license": "MIT", + "dependencies": { + "tslib": "^2.0.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/@peculiar/webcrypto": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@peculiar/webcrypto/-/webcrypto-1.5.0.tgz", + "integrity": "sha512-BRs5XUAwiyCDQMsVA9IDvDa7UBR9gAvPHgugOeGng3YN6vJ9JYonyDc0lNczErgtCWtucjR5N7VtaonboD/ezg==", + "license": "MIT", + "dependencies": { + "@peculiar/asn1-schema": "^2.3.8", + "@peculiar/json-schema": "^1.1.12", + "pvtsutils": "^1.3.5", + "tslib": "^2.6.2", + "webcrypto-core": "^1.8.0" + }, + "engines": { + "node": ">=10.12.0" + } + }, + "node_modules/@prisma/client": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/@prisma/client/-/client-6.0.1.tgz", + "integrity": "sha512-60w7kL6bUxz7M6Gs/V+OWMhwy94FshpngVmOY05TmGD0Lhk+Ac0ZgtjlL6Wll9TD4G03t4Sq1wZekNVy+Xdlbg==", + "dev": true, + "hasInstallScript": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18" + }, + "peerDependencies": { + "prisma": "*" + }, + "peerDependenciesMeta": { + "prisma": { + "optional": true + } + } + }, + "node_modules/@prisma/debug": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/@prisma/debug/-/debug-6.0.1.tgz", + "integrity": "sha512-jQylgSOf7ibTVxqBacnAlVGvek6fQxJIYCQOeX2KexsfypNzXjJQSS2o5s+Mjj2Np93iSOQUaw6TvPj8syhG4w==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/@prisma/engines": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/@prisma/engines/-/engines-6.0.1.tgz", + "integrity": "sha512-4hxzI+YQIR2uuDyVsDooFZGu5AtixbvM2psp+iayDZ4hRrAHo/YwgA17N23UWq7G6gRu18NvuNMb48qjP3DPQw==", + "dev": true, + "hasInstallScript": true, + "license": "Apache-2.0", + "dependencies": { + "@prisma/debug": "6.0.1", + "@prisma/engines-version": "5.23.0-27.5dbef10bdbfb579e07d35cc85fb1518d357cb99e", + "@prisma/fetch-engine": "6.0.1", + "@prisma/get-platform": "6.0.1" + } + }, + "node_modules/@prisma/engines-version": { + "version": "5.23.0-27.5dbef10bdbfb579e07d35cc85fb1518d357cb99e", + "resolved": "https://registry.npmjs.org/@prisma/engines-version/-/engines-version-5.23.0-27.5dbef10bdbfb579e07d35cc85fb1518d357cb99e.tgz", + "integrity": "sha512-JmIds0Q2/vsOmnuTJYxY4LE+sajqjYKhLtdOT6y4imojqv5d/aeVEfbBGC74t8Be1uSp0OP8lxIj2OqoKbLsfQ==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/@prisma/fetch-engine": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/@prisma/fetch-engine/-/fetch-engine-6.0.1.tgz", + "integrity": "sha512-T36bWFVGeGYYSyYOj9d+O9G3sBC+pAyMC+jc45iSL63/Haq1GrYjQPgPMxrEj9m739taXrupoysRedQ+VyvM/Q==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@prisma/debug": "6.0.1", + "@prisma/engines-version": "5.23.0-27.5dbef10bdbfb579e07d35cc85fb1518d357cb99e", + "@prisma/get-platform": "6.0.1" + } + }, + "node_modules/@prisma/get-platform": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/@prisma/get-platform/-/get-platform-6.0.1.tgz", + "integrity": "sha512-zspC9vlxAqx4E6epMPMLLBMED2VD8axDe8sPnquZ8GOsn6tiacWK0oxrGK4UAHYzYUVuMVUApJbdXB2dFpLhvg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@prisma/debug": "6.0.1" + } + }, + "node_modules/@rollup/pluginutils": { + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.1.3.tgz", + "integrity": "sha512-Pnsb6f32CD2W3uCaLZIzDmeFyQ2b8UWMFI7xtwUezpcGBDVDW6y9XgAWIlARiGAo6eNF5FK5aQTr0LFyNyqq5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.0", + "estree-walker": "^2.0.2", + "picomatch": "^4.0.2" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } + } + }, + "node_modules/@rollup/pluginutils/node_modules/picomatch": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz", + "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.28.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.28.1.tgz", + "integrity": "sha512-2aZp8AES04KI2dy3Ss6/MDjXbwBzj+i0GqKtWXgw2/Ma6E4jJvujryO6gJAghIRVz7Vwr9Gtl/8na3nDUKpraQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.28.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.28.1.tgz", + "integrity": "sha512-EbkK285O+1YMrg57xVA+Dp0tDBRB93/BZKph9XhMjezf6F4TpYjaUSuPt5J0fZXlSag0LmZAsTmdGGqPp4pQFA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.28.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.28.1.tgz", + "integrity": "sha512-prduvrMKU6NzMq6nxzQw445zXgaDBbMQvmKSJaxpaZ5R1QDM8w+eGxo6Y/jhT/cLoCvnZI42oEqf9KQNYz1fqQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.28.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.28.1.tgz", + "integrity": "sha512-WsvbOunsUk0wccO/TV4o7IKgloJ942hVFK1CLatwv6TJspcCZb9umQkPdvB7FihmdxgaKR5JyxDjWpCOp4uZlQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-freebsd-arm64": { + "version": "4.28.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.28.1.tgz", + "integrity": "sha512-HTDPdY1caUcU4qK23FeeGxCdJF64cKkqajU0iBnTVxS8F7H/7BewvYoG+va1KPSL63kQ1PGNyiwKOfReavzvNA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-freebsd-x64": { + "version": "4.28.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.28.1.tgz", + "integrity": "sha512-m/uYasxkUevcFTeRSM9TeLyPe2QDuqtjkeoTpP9SW0XxUWfcYrGDMkO/m2tTw+4NMAF9P2fU3Mw4ahNvo7QmsQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.28.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.28.1.tgz", + "integrity": "sha512-QAg11ZIt6mcmzpNE6JZBpKfJaKkqTm1A9+y9O+frdZJEuhQxiugM05gnCWiANHj4RmbgeVJpTdmKRmH/a+0QbA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.28.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.28.1.tgz", + "integrity": "sha512-dRP9PEBfolq1dmMcFqbEPSd9VlRuVWEGSmbxVEfiq2cs2jlZAl0YNxFzAQS2OrQmsLBLAATDMb3Z6MFv5vOcXg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.28.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.28.1.tgz", + "integrity": "sha512-uGr8khxO+CKT4XU8ZUH1TTEUtlktK6Kgtv0+6bIFSeiSlnGJHG1tSFSjm41uQ9sAO/5ULx9mWOz70jYLyv1QkA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.28.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.28.1.tgz", + "integrity": "sha512-QF54q8MYGAqMLrX2t7tNpi01nvq5RI59UBNx+3+37zoKX5KViPo/gk2QLhsuqok05sSCRluj0D00LzCwBikb0A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loongarch64-gnu": { + "version": "4.28.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.28.1.tgz", + "integrity": "sha512-vPul4uodvWvLhRco2w0GcyZcdyBfpfDRgNKU+p35AWEbJ/HPs1tOUrkSueVbBS0RQHAf/A+nNtDpvw95PeVKOA==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { + "version": "4.28.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.28.1.tgz", + "integrity": "sha512-pTnTdBuC2+pt1Rmm2SV7JWRqzhYpEILML4PKODqLz+C7Ou2apEV52h19CR7es+u04KlqplggmN9sqZlekg3R1A==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.28.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.28.1.tgz", + "integrity": "sha512-vWXy1Nfg7TPBSuAncfInmAI/WZDd5vOklyLJDdIRKABcZWojNDY0NJwruY2AcnCLnRJKSaBgf/GiJfauu8cQZA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.28.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.28.1.tgz", + "integrity": "sha512-/yqC2Y53oZjb0yz8PVuGOQQNOTwxcizudunl/tFs1aLvObTclTwZ0JhXF2XcPT/zuaymemCDSuuUPXJJyqeDOg==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.21.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.21.2.tgz", + "integrity": "sha512-B90tYAUoLhU22olrafY3JQCFLnT3NglazdwkHyxNDYF/zAxJt5fJUB/yBoWFoIQ7SQj+KLe3iL4BhOMa9fzgpw==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.28.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.28.1.tgz", + "integrity": "sha512-xQTDVzSGiMlSshpJCtudbWyRfLaNiVPXt1WgdWTwWz9n0U12cI2ZVtWe/Jgwyv/6wjL7b66uu61Vg0POWVfz4g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.28.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.28.1.tgz", + "integrity": "sha512-wSXmDRVupJstFP7elGMgv+2HqXelQhuNf+IS4V+nUpNVi/GUiBgDmfwD0UGN3pcAnWsgKG3I52wMOBnk1VHr/A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.28.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.28.1.tgz", + "integrity": "sha512-ZkyTJ/9vkgrE/Rk9vhMXhf8l9D+eAhbAVbsGsXKy2ohmJaWg0LPQLnIxRdRp/bKyr8tXuPlXhIoGlEB5XpJnGA==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.28.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.28.1.tgz", + "integrity": "sha512-ZvK2jBafvttJjoIdKm/Q/Bh7IJ1Ose9IBOwpOXcOvW3ikGTQGmKDgxTC6oCAzW6PynbkKP8+um1du81XJHZ0JA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@sinclair/typebox": { + "version": "0.27.8", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", + "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@sindresorhus/is": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.6.0.tgz", + "integrity": "sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==", + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/is?sponsor=1" + } + }, + "node_modules/@sinonjs/commons": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.1.tgz", + "integrity": "sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "type-detect": "4.0.8" + } + }, + "node_modules/@sinonjs/fake-timers": { + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz", + "integrity": "sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@sinonjs/commons": "^3.0.0" + } + }, + "node_modules/@szmarczak/http-timer": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-4.0.6.tgz", + "integrity": "sha512-4BAffykYOgO+5nzBWYwE3W90sBgLJoUPRWWcL8wlyiM8IB8ipJz3UMJ9KXQd1RKQXpKp8Tutn80HZtWsu2u76w==", + "license": "MIT", + "dependencies": { + "defer-to-connect": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@tsconfig/node10": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.11.tgz", + "integrity": "sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@tsconfig/node12": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", + "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", + "dev": true, + "license": "MIT" + }, + "node_modules/@tsconfig/node14": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", + "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", + "dev": true, + "license": "MIT" + }, + "node_modules/@tsconfig/node16": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", + "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/babel__core": { + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", + "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.20.7", + "@babel/types": "^7.20.7", + "@types/babel__generator": "*", + "@types/babel__template": "*", + "@types/babel__traverse": "*" + } + }, + "node_modules/@types/babel__generator": { + "version": "7.6.8", + "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.8.tgz", + "integrity": "sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__template": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz", + "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.1.0", + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__traverse": { + "version": "7.20.6", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.6.tgz", + "integrity": "sha512-r1bzfrm0tomOI8g1SzvCaQHo6Lcv6zu0EA+W2kHrt8dyrHQxGzBBL4kdkzIS+jBMV+EYcMAEAqXqYaLJq5rOZg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.20.7" + } + }, + "node_modules/@types/big.js": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/@types/big.js/-/big.js-6.2.2.tgz", + "integrity": "sha512-e2cOW9YlVzFY2iScnGBBkplKsrn2CsObHQ2Hiw4V1sSyiGbgWL8IyqE3zFi1Pt5o1pdAtYkDAIsF3KKUPjdzaA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/cacheable-request": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/@types/cacheable-request/-/cacheable-request-6.0.3.tgz", + "integrity": "sha512-IQ3EbTzGxIigb1I3qPZc1rWJnH0BmSKv5QYTalEwweFvyBDLSAe24zP0le/hyi7ecGfZVlIVAg4BZqb8WBwKqw==", + "license": "MIT", + "dependencies": { + "@types/http-cache-semantics": "*", + "@types/keyv": "^3.1.4", + "@types/node": "*", + "@types/responselike": "^1.0.0" + } + }, + "node_modules/@types/eslint": { + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-9.6.1.tgz", + "integrity": "sha512-FXx2pKgId/WyYo2jXw63kk7/+TY7u7AziEJxJAnSFzHlqTAS3Ync6SvgYAN/k4/PQpnnVuzoMuVnByKK2qp0ag==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "*", + "@types/json-schema": "*" + } + }, + "node_modules/@types/eslint__js": { + "version": "8.42.3", + "resolved": "https://registry.npmjs.org/@types/eslint__js/-/eslint__js-8.42.3.tgz", + "integrity": "sha512-alfG737uhmPdnvkrLdZLcEKJ/B8s9Y4hrZ+YAdzUeoArBlSUERA2E87ROfOaS4jd/C45fzOoZzidLc1IPwLqOw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/eslint": "*" + } + }, + "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==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/graceful-fs": { + "version": "4.1.9", + "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.9.tgz", + "integrity": "sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/http-cache-semantics": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.4.tgz", + "integrity": "sha512-1m0bIFVc7eJWyve9S0RnuRgcQqF/Xd5QsUZAZeQFr1Q3/p9JWoQQEqmVy+DPTNpGXwhgIetAoYF8JSc33q29QA==", + "license": "MIT" + }, + "node_modules/@types/istanbul-lib-coverage": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", + "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/istanbul-lib-report": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.3.tgz", + "integrity": "sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/istanbul-lib-coverage": "*" + } + }, + "node_modules/@types/istanbul-reports": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.4.tgz", + "integrity": "sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/istanbul-lib-report": "*" + } + }, + "node_modules/@types/jest": { + "version": "29.5.14", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.14.tgz", + "integrity": "sha512-ZN+4sdnLUbo8EVvVc2ao0GFW6oVrQRPn4K2lglySj7APvSrgzxHiNNK99us4WDMi57xxA2yggblIAMNhXOotLQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "expect": "^29.0.0", + "pretty-format": "^29.0.0" + } + }, + "node_modules/@types/json-bigint": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@types/json-bigint/-/json-bigint-1.0.4.tgz", + "integrity": "sha512-ydHooXLbOmxBbubnA7Eh+RpBzuaIiQjh8WGJYQB50JFGFrdxW7JzVlyEV7fAXw0T2sqJ1ysTneJbiyNLqZRAag==", + "license": "MIT" + }, + "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==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/keyv": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/@types/keyv/-/keyv-3.1.4.tgz", + "integrity": "sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==", + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/node": { + "version": "20.17.10", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.10.tgz", + "integrity": "sha512-/jrvh5h6NXhEauFFexRin69nA0uHJ5gwk4iDivp/DeoEua3uwCUto6PC86IpRITBOs4+6i2I56K5x5b6WYGXHA==", + "license": "MIT", + "dependencies": { + "undici-types": "~6.19.2" + } + }, + "node_modules/@types/normalize-package-data": { + "version": "2.4.4", + "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.4.tgz", + "integrity": "sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/responselike": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@types/responselike/-/responselike-1.0.3.tgz", + "integrity": "sha512-H/+L+UkTV33uf49PH5pCAUBVPNj2nDBXTN+qS1dOwyyg24l3CcicicCA7ca+HMvJBZcFgl5r8e+RR6elsb4Lyw==", + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/stack-utils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.3.tgz", + "integrity": "sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/yargs": { + "version": "17.0.33", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.33.tgz", + "integrity": "sha512-WpxBCKWPLr4xSsHgz511rFJAM+wS28w2zEO1QDNY5zM/S8ok70NNfztH0xwhqKyaK0OHCbN98LDAZuy1ctxDkA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/yargs-parser": "*" + } + }, + "node_modules/@types/yargs-parser": { + "version": "21.0.3", + "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.3.tgz", + "integrity": "sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.18.0.tgz", + "integrity": "sha512-NR2yS7qUqCL7AIxdJUQf2MKKNDVNaig/dEB0GBLU7D+ZdHgK1NoH/3wsgO3OnPVipn51tG3MAwaODEGil70WEw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/regexpp": "^4.10.0", + "@typescript-eslint/scope-manager": "8.18.0", + "@typescript-eslint/type-utils": "8.18.0", + "@typescript-eslint/utils": "8.18.0", + "@typescript-eslint/visitor-keys": "8.18.0", + "graphemer": "^1.4.0", + "ignore": "^5.3.1", + "natural-compare": "^1.4.0", + "ts-api-utils": "^1.3.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.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.18.0.tgz", + "integrity": "sha512-hgUZ3kTEpVzKaK3uNibExUYm6SKKOmTU2BOxBSvOYwtJEPdVQ70kZJpPjstlnhCHcuc2WGfSbpKlb/69ttyN5Q==", + "dev": true, + "license": "MITClause", + "dependencies": { + "@typescript-eslint/scope-manager": "8.18.0", + "@typescript-eslint/types": "8.18.0", + "@typescript-eslint/typescript-estree": "8.18.0", + "@typescript-eslint/visitor-keys": "8.18.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.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.18.0.tgz", + "integrity": "sha512-PNGcHop0jkK2WVYGotk/hxj+UFLhXtGPiGtiaWgVBVP1jhMoMCHlTyJA+hEj4rszoSdLTK3fN4oOatrL0Cp+Xw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.18.0", + "@typescript-eslint/visitor-keys": "8.18.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.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.18.0.tgz", + "integrity": "sha512-er224jRepVAVLnMF2Q7MZJCq5CsdH2oqjP4dT7K6ij09Kyd+R21r7UVJrF0buMVdZS5QRhDzpvzAxHxabQadow==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/typescript-estree": "8.18.0", + "@typescript-eslint/utils": "8.18.0", + "debug": "^4.3.4", + "ts-api-utils": "^1.3.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.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.18.0.tgz", + "integrity": "sha512-FNYxgyTCAnFwTrzpBGq+zrnoTO4x0c1CKYY5MuUTzpScqmY5fmsh2o3+57lqdI3NZucBDCzDgdEbIaNfAjAHQA==", + "dev": true, + "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.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.18.0.tgz", + "integrity": "sha512-rqQgFRu6yPkauz+ms3nQpohwejS8bvgbPyIDq13cgEDbkXt4LH4OkDMT0/fN1RUtzG8e8AKJyDBoocuQh8qNeg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.18.0", + "@typescript-eslint/visitor-keys": "8.18.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": "^1.3.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==", + "dev": true, + "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==", + "dev": true, + "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.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.18.0.tgz", + "integrity": "sha512-p6GLdY383i7h5b0Qrfbix3Vc3+J2k6QWw6UMUeY5JGfm3C5LbZ4QIZzJNoNOfgyRe0uuYKjvVOsO/jD4SJO+xg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.4.0", + "@typescript-eslint/scope-manager": "8.18.0", + "@typescript-eslint/types": "8.18.0", + "@typescript-eslint/typescript-estree": "8.18.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.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.18.0.tgz", + "integrity": "sha512-pCh/qEA8Lb1wVIqNvBke8UaRjJ6wrAWkJO5yyIbs8Yx6TNGYyfNjOo61tLv+WwLvoLPp4BQ8B7AHKijl8NGUfw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.18.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==", + "dev": true, + "license": "MIT", + "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==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/acorn-walk": { + "version": "8.3.4", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.4.tgz", + "integrity": "sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==", + "dev": true, + "license": "MIT", + "dependencies": { + "acorn": "^8.11.0" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/ajv": { + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", + "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ansi-escapes": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "type-fest": "^0.21.3" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "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", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, + "license": "ISC", + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/arg": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", + "dev": true, + "license": "MIT" + }, + "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==", + "dev": true, + "license": "Python-2.0" + }, + "node_modules/asn1js": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/asn1js/-/asn1js-3.0.5.tgz", + "integrity": "sha512-FVnvrKJwpt9LP2lAMl8qZswRNm3T4q9CON+bxldk2iwk3FFpuwhx2FfinyitizWHsVYyaY+y5JzDR0rCMV5yTQ==", + "license": "BSD-3-Clause", + "dependencies": { + "pvtsutils": "^1.3.2", + "pvutils": "^1.1.3", + "tslib": "^2.4.0" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/async": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.6.tgz", + "integrity": "sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==", + "dev": true, + "license": "MIT" + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "license": "MIT" + }, + "node_modules/babel-jest": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.7.0.tgz", + "integrity": "sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/transform": "^29.7.0", + "@types/babel__core": "^7.1.14", + "babel-plugin-istanbul": "^6.1.1", + "babel-preset-jest": "^29.6.3", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "slash": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "@babel/core": "^7.8.0" + } + }, + "node_modules/babel-plugin-istanbul": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz", + "integrity": "sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@babel/helper-plugin-utils": "^7.0.0", + "@istanbuljs/load-nyc-config": "^1.0.0", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-instrument": "^5.0.4", + "test-exclude": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/babel-plugin-istanbul/node_modules/istanbul-lib-instrument": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz", + "integrity": "sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@babel/core": "^7.12.3", + "@babel/parser": "^7.14.7", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-coverage": "^3.2.0", + "semver": "^6.3.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/babel-plugin-istanbul/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/babel-plugin-jest-hoist": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.6.3.tgz", + "integrity": "sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/template": "^7.3.3", + "@babel/types": "^7.3.3", + "@types/babel__core": "^7.1.14", + "@types/babel__traverse": "^7.0.6" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/babel-preset-current-node-syntax": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.1.0.tgz", + "integrity": "sha512-ldYss8SbBlWva1bs28q78Ju5Zq1F+8BrqBZZ0VFhLBvhh6lCpC2o3gDJi/5DRLs9FgYZCnmPYIVFU4lRXCkyUw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/plugin-syntax-async-generators": "^7.8.4", + "@babel/plugin-syntax-bigint": "^7.8.3", + "@babel/plugin-syntax-class-properties": "^7.12.13", + "@babel/plugin-syntax-class-static-block": "^7.14.5", + "@babel/plugin-syntax-import-attributes": "^7.24.7", + "@babel/plugin-syntax-import-meta": "^7.10.4", + "@babel/plugin-syntax-json-strings": "^7.8.3", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", + "@babel/plugin-syntax-numeric-separator": "^7.10.4", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", + "@babel/plugin-syntax-optional-chaining": "^7.8.3", + "@babel/plugin-syntax-private-property-in-object": "^7.14.5", + "@babel/plugin-syntax-top-level-await": "^7.14.5" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/babel-preset-jest": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.6.3.tgz", + "integrity": "sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA==", + "dev": true, + "license": "MIT", + "dependencies": { + "babel-plugin-jest-hoist": "^29.6.3", + "babel-preset-current-node-syntax": "^1.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "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/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "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/bech32": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/bech32/-/bech32-2.0.0.tgz", + "integrity": "sha512-LcknSilhIGatDAsY1ak2I8VtGaHNhgMSYVxFrGLXv+xLHytaKZKcaUJJUE7qmBr7h33o5YQwP55pMI0xmkpJwg==", + "license": "MIT" + }, + "node_modules/big.js": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/big.js/-/big.js-6.2.2.tgz", + "integrity": "sha512-y/ie+Faknx7sZA5MfGA2xKlu0GDv8RWrXGsmlteyJQ2lvoKv9GBK/fpRMc2qlSoBAgNxrixICFCBefIq8WCQpQ==", + "license": "MIT", + "engines": { + "node": "*" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/bigjs" + } + }, + "node_modules/bignumber.js": { + "version": "9.1.2", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.2.tgz", + "integrity": "sha512-2/mKyZH9K85bzOEfhXDBFZTGd1CTs+5IHpeFQo9luiBG7hghdC851Pj2WAhb6E3R6b9tZj/XKhbg4fum+Kepug==", + "license": "MIT", + "engines": { + "node": "*" + } + }, + "node_modules/blake2b": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/blake2b/-/blake2b-2.1.3.tgz", + "integrity": "sha512-pkDss4xFVbMb4270aCyGD3qLv92314Et+FsKzilCLxDz5DuZ2/1g3w4nmBbu6nKApPspnjG7JcwTjGZnduB1yg==", + "license": "ISC", + "dependencies": { + "blake2b-wasm": "^1.1.0", + "nanoassert": "^1.0.0" + } + }, + "node_modules/blake2b-wasm": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/blake2b-wasm/-/blake2b-wasm-1.1.7.tgz", + "integrity": "sha512-oFIHvXhlz/DUgF0kq5B1CqxIDjIJwh9iDeUUGQUcvgiGz7Wdw03McEO7CfLBy7QKGdsydcMCgO9jFNBAFCtFcA==", + "license": "MIT", + "dependencies": { + "nanoassert": "^1.0.0" + } + }, + "node_modules/bottleneck": { + "version": "2.19.5", + "resolved": "https://registry.npmjs.org/bottleneck/-/bottleneck-2.19.5.tgz", + "integrity": "sha512-VHiNCbI1lKdl44tGrhNfU3lup0Tj/ZBMJB5/2ZbNXRCPuRCO7ed2mgcK4r17y+KB2EfuYuRaVlwNbAeaWGSpbw==", + "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==", + "dev": true, + "license": "MIT", + "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==", + "dev": true, + "license": "MIT", + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/browserslist": { + "version": "4.24.2", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.2.tgz", + "integrity": "sha512-ZIc+Q62revdMcqC6aChtW4jz3My3klmCO1fEmINZY/8J3EpBg5/A/D0AKmBveUh6pgoeycoMkVMko84tuYS+Gg==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "caniuse-lite": "^1.0.30001669", + "electron-to-chromium": "^1.5.41", + "node-releases": "^2.0.18", + "update-browserslist-db": "^1.1.1" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, + "node_modules/bs-logger": { + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/bs-logger/-/bs-logger-0.2.6.tgz", + "integrity": "sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-json-stable-stringify": "2.x" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/bser": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz", + "integrity": "sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "node-int64": "^0.4.0" + } + }, + "node_modules/buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "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": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + }, + "node_modules/buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/builtin-modules": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.3.0.tgz", + "integrity": "sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cacheable-lookup": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz", + "integrity": "sha512-2/kNscPhpcxrOigMZzbiWF7dz8ilhb/nIHU3EyZiXWXpeq/au8qJ8VhdftMkty3n7Gj6HIGalQG8oiBNB3AJgA==", + "license": "MIT", + "engines": { + "node": ">=10.6.0" + } + }, + "node_modules/cacheable-request": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-7.0.4.tgz", + "integrity": "sha512-v+p6ongsrp0yTGbJXjgxPow2+DL93DASP4kXCDKb8/bwRtt9OEF3whggkkDkGNzgcWy2XaF4a8nZglC7uElscg==", + "license": "MIT", + "dependencies": { + "clone-response": "^1.0.2", + "get-stream": "^5.1.0", + "http-cache-semantics": "^4.0.0", + "keyv": "^4.0.0", + "lowercase-keys": "^2.0.0", + "normalize-url": "^6.0.1", + "responselike": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001687", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001687.tgz", + "integrity": "sha512-0S/FDhf4ZiqrTUiQ39dKeUjYRjkv7lOZU1Dgif2rIqrTzX/1wV2hfKu9TOm1IHkdSijfLswxTFzl/cvir+SLSQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "CC-BY-4.0" + }, + "node_modules/cbor": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/cbor/-/cbor-9.0.2.tgz", + "integrity": "sha512-JPypkxsB10s9QOWwa6zwPzqE1Md3vqpPc+cai4sAecuCsRyAtAl/pMyhPlMbT/xtPnm2dznJZYRLui57qiRhaQ==", + "license": "MIT", + "dependencies": { + "nofilter": "^3.1.0" + }, + "engines": { + "node": ">=16" + } + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "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/char-regex": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz", + "integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/ci-info": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-4.1.0.tgz", + "integrity": "sha512-HutrvTNsF48wnxkzERIXOe5/mlcfFcbfCmwcg6CJnizbSue78AbDt+1cgl26zwn61WFxhcPykPfZrbqjGmBb4A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/sibiraj-s" + } + ], + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/cjs-module-lexer": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.4.1.tgz", + "integrity": "sha512-cuSVIHi9/9E/+821Qjdvngor+xpnlwnuwIyZOaLmHBVdXL+gP+I6QQB9VkO7RI77YIcTV+S1W9AreJ5eN63JBA==", + "dev": true, + "license": "MIT" + }, + "node_modules/clean-regexp": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/clean-regexp/-/clean-regexp-1.0.0.tgz", + "integrity": "sha512-GfisEZEJvzKrmGWkvfhgzcz/BllN1USeqD2V6tg14OAOgaCD2Z/PUEuxnAZ/nPvmaHRG7a8y77p1T/IRQ4D1Hw==", + "dev": true, + "license": "MIT", + "dependencies": { + "escape-string-regexp": "^1.0.5" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/clean-regexp/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/clone-response": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.3.tgz", + "integrity": "sha512-ROoL94jJH2dUVML2Y/5PEDNaSHgeOdSDicUyS7izcF63G6sTc/FTjLub4b8Il9S8S0beOfYt0TaA5qvFK+w0wA==", + "license": "MIT", + "dependencies": { + "mimic-response": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cluster-key-slot": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/cluster-key-slot/-/cluster-key-slot-1.1.2.tgz", + "integrity": "sha512-RMr0FhtfXemyinomL4hrWcYJxmX6deFdCxpJzhDttxgO1+bcCnkk+9drydLVDmAMG7NE6aN/fl4F7ucU/90gAA==", + "license": "Apache-2.0", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==", + "dev": true, + "license": "MIT", + "engines": { + "iojs": ">= 1.0.0", + "node": ">= 0.12.0" + } + }, + "node_modules/collect-v8-coverage": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz", + "integrity": "sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q==", + "dev": true, + "license": "MIT" + }, + "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", + "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" + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "license": "MIT", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true, + "license": "MIT" + }, + "node_modules/convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true, + "license": "MIT" + }, + "node_modules/core-js-compat": { + "version": "3.39.0", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.39.0.tgz", + "integrity": "sha512-VgEUx3VwlExr5no0tXlBt+silBvhTryPwCXRI2Id1PN8WTKu7MreethvddqOubrYxkFdv/RnYrqlv1sFNAUelw==", + "dev": true, + "license": "MIT", + "dependencies": { + "browserslist": "^4.24.2" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/core-js" + } + }, + "node_modules/create-jest": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/create-jest/-/create-jest-29.7.0.tgz", + "integrity": "sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "chalk": "^4.0.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "jest-config": "^29.7.0", + "jest-util": "^29.7.0", + "prompts": "^2.0.1" + }, + "bin": { + "create-jest": "bin/create-jest.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/create-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", + "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/cross-fetch": { + "version": "3.1.8", + "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.8.tgz", + "integrity": "sha512-cvA+JwZoU0Xq+h6WkMvAUqPEYy92Obet6UdKLfW60qn99ftItKjB5T+BkyWOFWe2pUyfQ+IJHmpOTznqk1M6Kg==", + "license": "MIT", + "dependencies": { + "node-fetch": "^2.6.12" + } + }, + "node_modules/cross-fetch/node_modules/node-fetch": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", + "license": "MIT", + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": 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", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/data-uri-to-buffer": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz", + "integrity": "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==", + "license": "MIT", + "engines": { + "node": ">= 12" + } + }, + "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/decompress-response": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", + "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", + "license": "MIT", + "dependencies": { + "mimic-response": "^3.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/decompress-response/node_modules/mimic-response": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", + "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/dedent": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.5.3.tgz", + "integrity": "sha512-NHQtfOOW68WD8lgypbLA5oT+Bt0xXJhiYvoR6SmmNXZfpzOGXwdKWmcwG8N7PwVVWV3eF/68nmD9BaJSsTBhyQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "babel-plugin-macros": "^3.1.0" + }, + "peerDependenciesMeta": { + "babel-plugin-macros": { + "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==", + "dev": true, + "license": "MIT" + }, + "node_modules/deepmerge": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", + "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/defer-to-connect": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-2.0.1.tgz", + "integrity": "sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==", + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "license": "MIT", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/denque": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/denque/-/denque-2.1.0.tgz", + "integrity": "sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw==", + "license": "Apache-2.0", + "engines": { + "node": ">=0.10" + } + }, + "node_modules/detect-newline": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", + "integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/diff-sequences": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz", + "integrity": "sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", + "license": "MIT" + }, + "node_modules/ejs": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.10.tgz", + "integrity": "sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "jake": "^10.8.5" + }, + "bin": { + "ejs": "bin/cli.js" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/electron-to-chromium": { + "version": "1.5.72", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.72.tgz", + "integrity": "sha512-ZpSAUOZ2Izby7qnZluSrAlGgGQzucmFbN0n64dYzocYxnxV5ufurpj3VgEe4cUp7ir9LmeLxNYo8bVnlM8bQHw==", + "dev": true, + "license": "ISC" + }, + "node_modules/emittery": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.13.1.tgz", + "integrity": "sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sindresorhus/emittery?sponsor=1" + } + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "license": "MIT" + }, + "node_modules/end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "license": "MIT", + "dependencies": { + "once": "^1.4.0" + } + }, + "node_modules/error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-arrayish": "^0.2.1" + } + }, + "node_modules/es-module-lexer": { + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.5.4.tgz", + "integrity": "sha512-MVNK56NiMrOwitFB7cqDwq0CQutbw+0BvLshJSse0MUNU+y1FC3bUS/AQg7oUng+/wKrrki7JfmwtVHkVfPLlw==", + "dev": true, + "license": "MIT" + }, + "node_modules/esbuild": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.23.1.tgz", + "integrity": "sha512-VVNz/9Sa0bs5SELtn3f7qhJCDPCF5oMEl5cO9/SSinpE9hbPVvxbd572HH5AKiP7WD8INO53GgfDDhRjkylHEg==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.23.1", + "@esbuild/android-arm": "0.23.1", + "@esbuild/android-arm64": "0.23.1", + "@esbuild/android-x64": "0.23.1", + "@esbuild/darwin-arm64": "0.23.1", + "@esbuild/darwin-x64": "0.23.1", + "@esbuild/freebsd-arm64": "0.23.1", + "@esbuild/freebsd-x64": "0.23.1", + "@esbuild/linux-arm": "0.23.1", + "@esbuild/linux-arm64": "0.23.1", + "@esbuild/linux-ia32": "0.23.1", + "@esbuild/linux-loong64": "0.23.1", + "@esbuild/linux-mips64el": "0.23.1", + "@esbuild/linux-ppc64": "0.23.1", + "@esbuild/linux-riscv64": "0.23.1", + "@esbuild/linux-s390x": "0.23.1", + "@esbuild/linux-x64": "0.23.1", + "@esbuild/netbsd-x64": "0.23.1", + "@esbuild/openbsd-arm64": "0.23.1", + "@esbuild/openbsd-x64": "0.23.1", + "@esbuild/sunos-x64": "0.23.1", + "@esbuild/win32-arm64": "0.23.1", + "@esbuild/win32-ia32": "0.23.1", + "@esbuild/win32-x64": "0.23.1" + } + }, + "node_modules/escalade": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "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==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint": { + "version": "9.16.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.16.0.tgz", + "integrity": "sha512-whp8mSQI4C8VXd+fLgSM0lh3UlmcFtVwUQjyKCFfsp+2ItAIYhlq/hqGahGqHE6cv9unM41VlqKk2VtKYR2TaA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.12.1", + "@eslint/config-array": "^0.19.0", + "@eslint/core": "^0.9.0", + "@eslint/eslintrc": "^3.2.0", + "@eslint/js": "9.16.0", + "@eslint/plugin-kit": "^0.2.3", + "@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.5", + "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-plugin-simple-import-sort": { + "version": "12.1.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-simple-import-sort/-/eslint-plugin-simple-import-sort-12.1.1.tgz", + "integrity": "sha512-6nuzu4xwQtE3332Uz0to+TxDQYRLTKRESSc2hefVT48Zc8JthmN23Gx9lnYhu0FtkRSL1oxny3kJ2aveVhmOVA==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "eslint": ">=5.0.0" + } + }, + "node_modules/eslint-plugin-unicorn": { + "version": "55.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-55.0.0.tgz", + "integrity": "sha512-n3AKiVpY2/uDcGrS3+QsYDkjPfaOrNrsfQxU9nt5nitd9KuvVXrfAvgCO9DYPSfap+Gqjw9EOrXIsBp5tlHZjA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-validator-identifier": "^7.24.5", + "@eslint-community/eslint-utils": "^4.4.0", + "ci-info": "^4.0.0", + "clean-regexp": "^1.0.0", + "core-js-compat": "^3.37.0", + "esquery": "^1.5.0", + "globals": "^15.7.0", + "indent-string": "^4.0.0", + "is-builtin-module": "^3.2.1", + "jsesc": "^3.0.2", + "pluralize": "^8.0.0", + "read-pkg-up": "^7.0.1", + "regexp-tree": "^0.1.27", + "regjsparser": "^0.10.0", + "semver": "^7.6.1", + "strip-indent": "^3.0.0" + }, + "engines": { + "node": ">=18.18" + }, + "funding": { + "url": "https://github.com/sindresorhus/eslint-plugin-unicorn?sponsor=1" + }, + "peerDependencies": { + "eslint": ">=8.56.0" + } + }, + "node_modules/eslint-plugin-unicorn/node_modules/globals": { + "version": "15.13.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-15.13.0.tgz", + "integrity": "sha512-49TewVEz0UxZjr1WYYsWpPrhyC/B/pA8Bq0fUmet2n+eR7yn0IvNzNaoBwnK6mdkzcN+se7Ez9zUgULTz2QH4g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint-plugin-unused-imports": { + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/eslint-plugin-unused-imports/-/eslint-plugin-unused-imports-4.1.4.tgz", + "integrity": "sha512-YptD6IzQjDardkl0POxnnRBhU1OEePMV0nd6siHaRBbd+lyh6NAhFEobiznKU7kTsSsDeSD62Pe7kAM1b7dAZQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "@typescript-eslint/eslint-plugin": "^8.0.0-0 || ^7.0.0 || ^6.0.0 || ^5.0.0", + "eslint": "^9.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "@typescript-eslint/eslint-plugin": { + "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==", + "dev": true, + "license": "BSD-2-Clause", + "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==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint/node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "license": "MIT", + "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/eslint/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==", + "dev": true, + "license": "MIT" + }, + "node_modules/espree": { + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-10.3.0.tgz", + "integrity": "sha512-0QYC8b24HWY8zjRnDTL6RiHfDbAWn63qb4LMj1Z4b076A4une81+z03Kg7l7mn/48PUTqoLptSXez8oknU8Clg==", + "dev": true, + "license": "BSD-2-Clause", + "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/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true, + "license": "BSD-2-Clause", + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/esquery": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", + "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", + "dev": true, + "license": "BSD-3-Clause", + "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==", + "dev": true, + "license": "BSD-2-Clause", + "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==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estree-walker": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", + "dev": true, + "license": "MIT" + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "dev": true, + "license": "MIT", + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/execa/node_modules/get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/exit": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", + "integrity": "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/expect": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/expect/-/expect-29.7.0.tgz", + "integrity": "sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/expect-utils": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/exponential-backoff": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/exponential-backoff/-/exponential-backoff-3.1.1.tgz", + "integrity": "sha512-dX7e/LHVJ6W3DE1MHWi9S1EYzDESENfLrYohG2G++ovZrYOkm4Knwa0mc1cn84xJOR4KEU0WSchhLbd0UklbHw==", + "license": "Apache-2.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" + }, + "node_modules/fast-glob": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", + "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", + "dev": true, + "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.4" + }, + "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==", + "dev": true, + "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==", + "dev": true, + "license": "MIT" + }, + "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==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-uri": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.0.3.tgz", + "integrity": "sha512-aLrHthzCjH5He4Z2H9YZ+v6Ujb9ocRuW6ZzkJQOrTxleEijANq4v1TsaPaVG1PZcuurEzrLcWRyYBYXD5cEiaw==", + "license": "BSD-3-Clause" + }, + "node_modules/fastq": { + "version": "1.17.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", + "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", + "license": "ISC", + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/fb-watchman": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.2.tgz", + "integrity": "sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "bser": "2.1.1" + } + }, + "node_modules/fetch-blob": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz", + "integrity": "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/jimmywarting" + }, + { + "type": "paypal", + "url": "https://paypal.me/jimmywarting" + } + ], + "license": "MIT", + "dependencies": { + "node-domexception": "^1.0.0", + "web-streams-polyfill": "^3.0.3" + }, + "engines": { + "node": "^12.20 || >= 14.13" + } + }, + "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==", + "dev": true, + "license": "MIT", + "dependencies": { + "flat-cache": "^4.0.0" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/filelist": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/filelist/-/filelist-1.0.4.tgz", + "integrity": "sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "minimatch": "^5.0.1" + } + }, + "node_modules/filelist/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==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/filelist/node_modules/minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, + "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==", + "dev": true, + "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==", + "dev": true, + "license": "MIT", + "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==", + "dev": true, + "license": "MIT", + "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==", + "dev": true, + "license": "ISC" + }, + "node_modules/foreground-child": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.0.tgz", + "integrity": "sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg==", + "license": "ISC", + "dependencies": { + "cross-spawn": "^7.0.0", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/foreground-child/node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "license": "ISC", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/form-data": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.1.tgz", + "integrity": "sha512-tzN8e4TX8+kkxGPK8D5u0FNmjPUjw3lwC9lSLxxoB/+GtsJG91CO8bSWy73APlgAZzZbXEYZJuxjkHH2w+Ezhw==", + "license": "MIT", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/formdata-polyfill": { + "version": "4.0.10", + "resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz", + "integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==", + "license": "MIT", + "dependencies": { + "fetch-blob": "^3.1.2" + }, + "engines": { + "node": ">=12.20.0" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true, + "license": "ISC" + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "license": "ISC", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/get-package-type": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", + "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/get-stream": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", + "license": "MIT", + "dependencies": { + "pump": "^3.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/get-tsconfig": { + "version": "4.8.1", + "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.8.1.tgz", + "integrity": "sha512-k9PN+cFBmaLWtVz29SkUoqU5O0slLuHJXt/2P+tMVFT+phsSGXGkp9t3rQIqdz0e+06EHNGs3oM6ZX1s2zHxRg==", + "dev": true, + "license": "MIT", + "dependencies": { + "resolve-pkg-maps": "^1.0.0" + }, + "funding": { + "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" + } + }, + "node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "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==", + "dev": true, + "license": "ISC", + "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==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/got": { + "version": "11.8.6", + "resolved": "https://registry.npmjs.org/got/-/got-11.8.6.tgz", + "integrity": "sha512-6tfZ91bOr7bOXnK7PRDCGBLa1H4U080YHNaAQ2KsMGlLEzRbk44nsZF2E1IeRc3vtJHPVbKCYgdFbaGO2ljd8g==", + "license": "MIT", + "dependencies": { + "@sindresorhus/is": "^4.0.0", + "@szmarczak/http-timer": "^4.0.5", + "@types/cacheable-request": "^6.0.1", + "@types/responselike": "^1.0.0", + "cacheable-lookup": "^5.0.3", + "cacheable-request": "^7.0.2", + "decompress-response": "^6.0.0", + "http2-wrapper": "^1.0.0-beta.5.2", + "lowercase-keys": "^2.0.0", + "p-cancelable": "^2.0.0", + "responselike": "^2.0.0" + }, + "engines": { + "node": ">=10.19.0" + }, + "funding": { + "url": "https://github.com/sindresorhus/got?sponsor=1" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "dev": true, + "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==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/hosted-git-info": { + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", + "dev": true, + "license": "ISC" + }, + "node_modules/html-escaper": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", + "dev": true, + "license": "MIT" + }, + "node_modules/http-cache-semantics": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz", + "integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==", + "license": "BSD-2-Clause" + }, + "node_modules/http2-wrapper": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-1.0.3.tgz", + "integrity": "sha512-V+23sDMr12Wnz7iTcDeJr3O6AIxlnvT/bmaAAAP/Xda35C90p9599p0F1eHR/N1KILWSoWVAiOMFjBBXaXSMxg==", + "license": "MIT", + "dependencies": { + "quick-lru": "^5.1.1", + "resolve-alpn": "^1.0.0" + }, + "engines": { + "node": ">=10.19.0" + } + }, + "node_modules/human-signals": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=10.17.0" + } + }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "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": "BSD-3-Clause" + }, + "node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "dev": true, + "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==", + "dev": true, + "license": "MIT", + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/import-local": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.2.0.tgz", + "integrity": "sha512-2SPlun1JUPWoM6t3F0dw0FkCF/jWY8kttcY4f599GLTSjh2OCuuhdTkJQsEcZzBqbXZGKMK2OqW1oZsjtf/gQA==", + "dev": true, + "license": "MIT", + "dependencies": { + "pkg-dir": "^4.2.0", + "resolve-cwd": "^3.0.0" + }, + "bin": { + "import-local-fixture": "fixtures/cli.js" + }, + "engines": { + "node": ">=8" + }, + "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==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/indent-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", + "dev": true, + "license": "ISC", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/ioredis": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/ioredis/-/ioredis-5.4.1.tgz", + "integrity": "sha512-2YZsvl7jopIa1gaePkeMtd9rAcSjOOjPtpcLlOeusyO+XH2SK5ZcT+UCrElPP+WVIInh2TzeI4XW9ENaSLVVHA==", + "license": "MIT", + "dependencies": { + "@ioredis/commands": "^1.1.1", + "cluster-key-slot": "^1.1.0", + "debug": "^4.3.4", + "denque": "^2.1.0", + "lodash.defaults": "^4.2.0", + "lodash.isarguments": "^3.1.0", + "redis-errors": "^1.2.0", + "redis-parser": "^3.0.0", + "standard-as-callback": "^2.1.0" + }, + "engines": { + "node": ">=12.22.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/ioredis" + } + }, + "node_modules/is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", + "dev": true, + "license": "MIT" + }, + "node_modules/is-builtin-module": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-3.2.1.tgz", + "integrity": "sha512-BSLE3HnV2syZ0FK0iMA/yUGplUeMmNz4AW5fnTunbCIqZi4vG3WjJT9FHMy5D69xmAYBHXQhJdALdpwVxV501A==", + "dev": true, + "license": "MIT", + "dependencies": { + "builtin-modules": "^3.3.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-core-module": { + "version": "2.15.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.1.tgz", + "integrity": "sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-generator-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.1.0.tgz", + "integrity": "sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "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==", + "dev": true, + "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==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "license": "ISC" + }, + "node_modules/isomorphic-ws": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/isomorphic-ws/-/isomorphic-ws-4.0.1.tgz", + "integrity": "sha512-BhBvN2MBpWTaSHdWRb/bwdZJ1WaehQ2L1KngkCkfLUGF0mAWAT1sQUQacEmQ0jXkFw/czDXPNQSL5u2/Krsz1w==", + "license": "MIT", + "peerDependencies": { + "ws": "*" + } + }, + "node_modules/istanbul-lib-coverage": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz", + "integrity": "sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-instrument": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.3.tgz", + "integrity": "sha512-Vtgk7L/R2JHyyGW07spoFlB8/lpjiOLTjMdms6AFMraYt3BaJauod/NGrfnVG/y4Ix1JEuMRPDPEj2ua+zz1/Q==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@babel/core": "^7.23.9", + "@babel/parser": "^7.23.9", + "@istanbuljs/schema": "^0.1.3", + "istanbul-lib-coverage": "^3.2.0", + "semver": "^7.5.4" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-lib-report": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", + "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "istanbul-lib-coverage": "^3.0.0", + "make-dir": "^4.0.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-lib-source-maps": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", + "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "debug": "^4.1.1", + "istanbul-lib-coverage": "^3.0.0", + "source-map": "^0.6.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-reports": { + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.7.tgz", + "integrity": "sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "html-escaper": "^2.0.0", + "istanbul-lib-report": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/jackspeak": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-4.0.2.tgz", + "integrity": "sha512-bZsjR/iRjl1Nk1UkjGpAzLNfQtzuijhn2g+pbZb98HQ1Gk8vM9hfbxeMBP+M2/UUdwj0RqGG3mlvk2MsAqwvEw==", + "license": "BlueOak-1.0.0", + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/jake": { + "version": "10.9.2", + "resolved": "https://registry.npmjs.org/jake/-/jake-10.9.2.tgz", + "integrity": "sha512-2P4SQ0HrLQ+fw6llpLnOaGAvN2Zu6778SJMrCUwns4fOoG9ayrTiZk3VV8sCPkVZF8ab0zksVpS8FDY5pRCNBA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "async": "^3.2.3", + "chalk": "^4.0.2", + "filelist": "^1.0.4", + "minimatch": "^3.1.2" + }, + "bin": { + "jake": "bin/cli.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/jest": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest/-/jest-29.7.0.tgz", + "integrity": "sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/core": "^29.7.0", + "@jest/types": "^29.6.3", + "import-local": "^3.0.2", + "jest-cli": "^29.7.0" + }, + "bin": { + "jest": "bin/jest.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/jest-changed-files": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-29.7.0.tgz", + "integrity": "sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w==", + "dev": true, + "license": "MIT", + "dependencies": { + "execa": "^5.0.0", + "jest-util": "^29.7.0", + "p-limit": "^3.1.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-circus": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.7.0.tgz", + "integrity": "sha512-3E1nCMgipcTkCocFwM90XXQab9bS+GMsjdpmPrlelaxwD93Ad8iVEjX/vvHPdLPnFf+L40u+5+iutRdA1N9myw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/environment": "^29.7.0", + "@jest/expect": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "co": "^4.6.0", + "dedent": "^1.0.0", + "is-generator-fn": "^2.0.0", + "jest-each": "^29.7.0", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "p-limit": "^3.1.0", + "pretty-format": "^29.7.0", + "pure-rand": "^6.0.0", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-cli": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.7.0.tgz", + "integrity": "sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/core": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", + "chalk": "^4.0.0", + "create-jest": "^29.7.0", + "exit": "^0.1.2", + "import-local": "^3.0.2", + "jest-config": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "yargs": "^17.3.1" + }, + "bin": { + "jest": "bin/jest.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/jest-config": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.7.0.tgz", + "integrity": "sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/core": "^7.11.6", + "@jest/test-sequencer": "^29.7.0", + "@jest/types": "^29.6.3", + "babel-jest": "^29.7.0", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "deepmerge": "^4.2.2", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "jest-circus": "^29.7.0", + "jest-environment-node": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-runner": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "micromatch": "^4.0.4", + "parse-json": "^5.2.0", + "pretty-format": "^29.7.0", + "slash": "^3.0.0", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "@types/node": "*", + "ts-node": ">=9.0.0" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "ts-node": { + "optional": true + } + } + }, + "node_modules/jest-config/node_modules/ci-info": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz", + "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/sibiraj-s" + } + ], + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/jest-diff": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.7.0.tgz", + "integrity": "sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.0.0", + "diff-sequences": "^29.6.3", + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-docblock": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.7.0.tgz", + "integrity": "sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g==", + "dev": true, + "license": "MIT", + "dependencies": { + "detect-newline": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-each": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.7.0.tgz", + "integrity": "sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "chalk": "^4.0.0", + "jest-get-type": "^29.6.3", + "jest-util": "^29.7.0", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-environment-node": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.7.0.tgz", + "integrity": "sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/environment": "^29.7.0", + "@jest/fake-timers": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "jest-mock": "^29.7.0", + "jest-util": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-get-type": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.6.3.tgz", + "integrity": "sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-haste-map": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.7.0.tgz", + "integrity": "sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "@types/graceful-fs": "^4.1.3", + "@types/node": "*", + "anymatch": "^3.0.3", + "fb-watchman": "^2.0.0", + "graceful-fs": "^4.2.9", + "jest-regex-util": "^29.6.3", + "jest-util": "^29.7.0", + "jest-worker": "^29.7.0", + "micromatch": "^4.0.4", + "walker": "^1.0.8" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "optionalDependencies": { + "fsevents": "^2.3.2" + } + }, + "node_modules/jest-leak-detector": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.7.0.tgz", + "integrity": "sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw==", + "dev": true, + "license": "MIT", + "dependencies": { + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-matcher-utils": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.7.0.tgz", + "integrity": "sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.0.0", + "jest-diff": "^29.7.0", + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-message-util": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.7.0.tgz", + "integrity": "sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.12.13", + "@jest/types": "^29.6.3", + "@types/stack-utils": "^2.0.0", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "micromatch": "^4.0.4", + "pretty-format": "^29.7.0", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-mock": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.7.0.tgz", + "integrity": "sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "@types/node": "*", + "jest-util": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-pnp-resolver": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz", + "integrity": "sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + }, + "peerDependencies": { + "jest-resolve": "*" + }, + "peerDependenciesMeta": { + "jest-resolve": { + "optional": true + } + } + }, + "node_modules/jest-regex-util": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.6.3.tgz", + "integrity": "sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-resolve": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.7.0.tgz", + "integrity": "sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "jest-pnp-resolver": "^1.2.2", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "resolve": "^1.20.0", + "resolve.exports": "^2.0.0", + "slash": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-resolve-dependencies": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.7.0.tgz", + "integrity": "sha512-un0zD/6qxJ+S0et7WxeI3H5XSe9lTBBR7bOHCHXkKR6luG5mwDDlIzVQ0V5cZCuoTgEdcdwzTghYkTWfubi+nA==", + "dev": true, + "license": "MIT", + "dependencies": { + "jest-regex-util": "^29.6.3", + "jest-snapshot": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-runner": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.7.0.tgz", + "integrity": "sha512-fsc4N6cPCAahybGBfTRcq5wFR6fpLznMg47sY5aDpsoejOcVYFb07AHuSnR0liMcPTgBsA3ZJL6kFOjPdoNipQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/console": "^29.7.0", + "@jest/environment": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "emittery": "^0.13.1", + "graceful-fs": "^4.2.9", + "jest-docblock": "^29.7.0", + "jest-environment-node": "^29.7.0", + "jest-haste-map": "^29.7.0", + "jest-leak-detector": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-resolve": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-util": "^29.7.0", + "jest-watcher": "^29.7.0", + "jest-worker": "^29.7.0", + "p-limit": "^3.1.0", + "source-map-support": "0.5.13" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-runtime": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.7.0.tgz", + "integrity": "sha512-gUnLjgwdGqW7B4LvOIkbKs9WGbn+QLqRQQ9juC6HndeDiezIwhDP+mhMwHWCEcfQ5RUXa6OPnFF8BJh5xegwwQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/environment": "^29.7.0", + "@jest/fake-timers": "^29.7.0", + "@jest/globals": "^29.7.0", + "@jest/source-map": "^29.6.3", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "cjs-module-lexer": "^1.0.0", + "collect-v8-coverage": "^1.0.0", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-mock": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "slash": "^3.0.0", + "strip-bom": "^4.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-snapshot": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.7.0.tgz", + "integrity": "sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/core": "^7.11.6", + "@babel/generator": "^7.7.2", + "@babel/plugin-syntax-jsx": "^7.7.2", + "@babel/plugin-syntax-typescript": "^7.7.2", + "@babel/types": "^7.3.3", + "@jest/expect-utils": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "babel-preset-current-node-syntax": "^1.0.0", + "chalk": "^4.0.0", + "expect": "^29.7.0", + "graceful-fs": "^4.2.9", + "jest-diff": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", + "natural-compare": "^1.4.0", + "pretty-format": "^29.7.0", + "semver": "^7.5.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-util": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.7.0.tgz", + "integrity": "sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-util/node_modules/ci-info": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz", + "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/sibiraj-s" + } + ], + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/jest-validate": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.7.0.tgz", + "integrity": "sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "camelcase": "^6.2.0", + "chalk": "^4.0.0", + "jest-get-type": "^29.6.3", + "leven": "^3.1.0", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-validate/node_modules/camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/jest-watcher": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.7.0.tgz", + "integrity": "sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "emittery": "^0.13.1", + "jest-util": "^29.7.0", + "string-length": "^4.0.1" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-worker": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.7.0.tgz", + "integrity": "sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*", + "jest-util": "^29.7.0", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-worker/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true, + "license": "MIT" + }, + "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==", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/jsesc": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", + "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==", + "dev": true, + "license": "MIT", + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/json-bigint": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-bigint/-/json-bigint-1.0.0.tgz", + "integrity": "sha512-SiPv/8VpZuWbvLSMtTDU8hEfrZWg/mH/nV/b4o0CYbSxu1UIQPLdwKOCIyLQX+VIPO5vrLX3i8qtqFyhdPSUSQ==", + "license": "MIT", + "dependencies": { + "bignumber.js": "^9.0.0" + } + }, + "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" + }, + "node_modules/json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "license": "MIT" + }, + "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==", + "dev": true, + "license": "MIT" + }, + "node_modules/json5": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "dev": true, + "license": "MIT", + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "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", + "dependencies": { + "json-buffer": "3.0.1" + } + }, + "node_modules/kleur": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", + "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/leven": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", + "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "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==", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "dev": true, + "license": "MIT" + }, + "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==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lodash.defaults": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-4.2.0.tgz", + "integrity": "sha512-qjxPLHd3r5DnsdGacqOMU6pb/avJzdh9tFX2ymgoZE27BmjXrNy/y4LoaiTeAb+O3gL8AfpJGtqfX/ae2leYYQ==", + "license": "MIT" + }, + "node_modules/lodash.isarguments": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz", + "integrity": "sha512-chi4NHZlZqZD18a0imDHnZPrDeBbTtVN7GXMwuGdRH9qotxAjYs3aVLKc7zNOG9eddR5Ksd8rvFEBc9SsggPpg==", + "license": "MIT" + }, + "node_modules/lodash.memoize": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", + "integrity": "sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==", + "dev": true, + "license": "MIT" + }, + "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==", + "dev": true, + "license": "MIT" + }, + "node_modules/lowercase-keys": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", + "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, + "license": "ISC", + "dependencies": { + "yallist": "^3.0.2" + } + }, + "node_modules/magic-string": { + "version": "0.30.15", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.15.tgz", + "integrity": "sha512-zXeaYRgZ6ldS1RJJUrMrYgNJ4fdwnyI6tVqoiIhyCyv5IVTK9BU8Ic2l253GGETQHxI4HNUwhJ3fjDhKqEoaAw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0" + } + }, + "node_modules/make-dir": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", + "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", + "dev": true, + "license": "MIT", + "dependencies": { + "semver": "^7.5.3" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "dev": true, + "license": "ISC" + }, + "node_modules/makeerror": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz", + "integrity": "sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "tmpl": "1.0.5" + } + }, + "node_modules/merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true, + "license": "MIT" + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "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==", + "dev": true, + "license": "MIT", + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "license": "MIT", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/mimic-response": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", + "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/min-indent": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz", + "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "license": "ISC", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "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/nanoassert": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/nanoassert/-/nanoassert-1.1.0.tgz", + "integrity": "sha512-C40jQ3NzfkP53NsO8kEOFd79p4b9kDXQMwgiY1z8ZwrDZgUyom0AHwGegF4Dm99L+YoYhuaB0ceerUcXmqr1rQ==", + "license": "ISC" + }, + "node_modules/nanoid": { + "version": "3.3.8", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.8.tgz", + "integrity": "sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true, + "license": "MIT" + }, + "node_modules/node-domexception": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz", + "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/jimmywarting" + }, + { + "type": "github", + "url": "https://paypal.me/jimmywarting" + } + ], + "license": "MIT", + "engines": { + "node": ">=10.5.0" + } + }, + "node_modules/node-fetch": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.2.tgz", + "integrity": "sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==", + "license": "MIT", + "dependencies": { + "data-uri-to-buffer": "^4.0.0", + "fetch-blob": "^3.1.4", + "formdata-polyfill": "^4.0.10" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/node-fetch" + } + }, + "node_modules/node-int64": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", + "integrity": "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==", + "dev": true, + "license": "MIT" + }, + "node_modules/node-releases": { + "version": "2.0.19", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.19.tgz", + "integrity": "sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw==", + "dev": true, + "license": "MIT" + }, + "node_modules/nofilter": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/nofilter/-/nofilter-3.1.0.tgz", + "integrity": "sha512-l2NNj07e9afPnhAhvgVrCD/oy2Ai1yfLpuo3EpiO1jFTsB4sFz6oIfAfSZyQzVpkZQ9xS8ZS5g1jCBgq4Hwo0g==", + "license": "MIT", + "engines": { + "node": ">=12.19" + } + }, + "node_modules/normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "node_modules/normalize-package-data/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/normalize-url": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-6.1.0.tgz", + "integrity": "sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==", + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "mimic-fn": "^2.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/optionator": { + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", + "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", + "dev": true, + "license": "MIT", + "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-cancelable": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-2.1.1.tgz", + "integrity": "sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "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==", + "dev": true, + "license": "MIT", + "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==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/package-json-from-dist": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", + "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", + "license": "BlueOak-1.0.0" + }, + "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==", + "dev": true, + "license": "MIT", + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "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==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "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", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true, + "license": "MIT" + }, + "node_modules/path-scurry": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.0.tgz", + "integrity": "sha512-ypGJsmGtdXUOeM5u93TyeIEfEhM6s+ljAhrk5vAvSx8uyY/02OvrZnA0YNGUrPXfpJMgI1ODd3nwz8Npx4O4cg==", + "license": "BlueOak-1.0.0", + "dependencies": { + "lru-cache": "^11.0.0", + "minipass": "^7.1.2" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/path-scurry/node_modules/lru-cache": { + "version": "11.0.2", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.0.2.tgz", + "integrity": "sha512-123qHRfJBmo2jXDbo/a5YOQrJoHF/GNQTLzQ5+IdK5pWpceK17yRc6ozlWd25FxvGKQbIUs91fDFkXmDHTKcyA==", + "license": "ISC", + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true, + "license": "ISC" + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pirates": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.6.tgz", + "integrity": "sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 6" + } + }, + "node_modules/pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "find-up": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/pkg-dir/node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/pkg-dir/node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/pkg-dir/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/pkg-dir/node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/pluralize": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-8.0.0.tgz", + "integrity": "sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "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==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/prettier": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.3.tgz", + "integrity": "sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==", + "dev": true, + "license": "MIT", + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "node_modules/pretty-format": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", + "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/schemas": "^29.6.3", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/pretty-format/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/prisma": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/prisma/-/prisma-6.0.1.tgz", + "integrity": "sha512-CaMNFHkf+DDq8zq3X/JJsQ4Koy7dyWwwtOKibkT/Am9j/tDxcfbg7+lB1Dzhx18G/+RQCMgjPYB61bhRqteNBQ==", + "dev": true, + "hasInstallScript": true, + "license": "Apache-2.0", + "dependencies": { + "@prisma/engines": "6.0.1" + }, + "bin": { + "prisma": "build/index.js" + }, + "engines": { + "node": ">=18.18" + }, + "optionalDependencies": { + "fsevents": "2.3.3" + } + }, + "node_modules/prompts": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", + "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "kleur": "^3.0.3", + "sisteransi": "^1.0.5" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/pump": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.2.tgz", + "integrity": "sha512-tUPXtzlGM8FE3P0ZL6DVs/3P58k9nk8/jZeQCurTJylQA8qFYzHFfhBJkuqyE0FifOsQ0uKWekiZ5g8wtr28cw==", + "license": "MIT", + "dependencies": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/pure-rand": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-6.1.0.tgz", + "integrity": "sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/dubzzz" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fast-check" + } + ], + "license": "MIT" + }, + "node_modules/pvtsutils": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/pvtsutils/-/pvtsutils-1.3.6.tgz", + "integrity": "sha512-PLgQXQ6H2FWCaeRak8vvk1GW462lMxB5s3Jm673N82zI4vqtVUPuZdffdZbPDFRoU8kAhItWFtPCWiPpp4/EDg==", + "license": "MIT", + "dependencies": { + "tslib": "^2.8.1" + } + }, + "node_modules/pvutils": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/pvutils/-/pvutils-1.1.3.tgz", + "integrity": "sha512-pMpnA0qRdFp32b1sJl1wOJNxZLQ2cbQx+k6tjNtZ8CpvVhNqEPRgivZ2WOUev2YMajecdH7ctUPDvEe87nariQ==", + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "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==", + "dev": true, + "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/quick-lru": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz", + "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==", + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/react-is": { + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", + "dev": true, + "license": "MIT" + }, + "node_modules/read-pkg": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", + "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/normalize-package-data": "^2.4.0", + "normalize-package-data": "^2.5.0", + "parse-json": "^5.0.0", + "type-fest": "^0.6.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/read-pkg-up": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", + "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", + "dev": true, + "license": "MIT", + "dependencies": { + "find-up": "^4.1.0", + "read-pkg": "^5.2.0", + "type-fest": "^0.8.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/read-pkg-up/node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/read-pkg-up/node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/read-pkg-up/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/read-pkg-up/node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/read-pkg-up/node_modules/type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=8" + } + }, + "node_modules/read-pkg/node_modules/type-fest": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", + "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=8" + } + }, + "node_modules/redis-errors": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/redis-errors/-/redis-errors-1.2.0.tgz", + "integrity": "sha512-1qny3OExCf0UvUV/5wpYKf2YwPcOqXzkwKKSmKHiE6ZMQs5heeE/c8eXK+PNllPvmjgAbfnsbpkGZWy8cBpn9w==", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/redis-parser": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/redis-parser/-/redis-parser-3.0.0.tgz", + "integrity": "sha512-DJnGAeenTdpMEH6uAJRK/uiyEIH9WVsUmoLwzudwGJUwZPp80PDBWPHXSAGNPwNvIXAbe7MSUB1zQFugFml66A==", + "license": "MIT", + "dependencies": { + "redis-errors": "^1.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/regexp-tree": { + "version": "0.1.27", + "resolved": "https://registry.npmjs.org/regexp-tree/-/regexp-tree-0.1.27.tgz", + "integrity": "sha512-iETxpjK6YoRWJG5o6hXLwvjYAoW+FEZn9os0PD/b6AP6xQwsa/Y7lCVgIixBbUPMfhu+i2LtdeAqVTgGlQarfA==", + "dev": true, + "license": "MIT", + "bin": { + "regexp-tree": "bin/regexp-tree" + } + }, + "node_modules/regjsparser": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.10.0.tgz", + "integrity": "sha512-qx+xQGZVsy55CH0a1hiVwHmqjLryfh7wQyF5HO07XJ9f7dQMY/gPQHhlyDkIzJKC+x2fUCpCcUODUUUFrm7SHA==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "jsesc": "~0.5.0" + }, + "bin": { + "regjsparser": "bin/parser" + } + }, + "node_modules/regjsparser/node_modules/jsesc": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", + "integrity": "sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA==", + "dev": true, + "bin": { + "jsesc": "bin/jsesc" + } + }, + "node_modules/remeda": { + "version": "2.17.4", + "resolved": "https://registry.npmjs.org/remeda/-/remeda-2.17.4.tgz", + "integrity": "sha512-pviU2Ag7Qx9mOCAKO4voxDx/scfLzdhp3v85qDO4xxntQsU76uE9sgrAAdK1ATn4zzaOJqCXYMMNRP+O9F4Wiw==", + "license": "MIT", + "dependencies": { + "type-fest": "^4.27.0" + } + }, + "node_modules/remeda/node_modules/type-fest": { + "version": "4.30.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.30.0.tgz", + "integrity": "sha512-G6zXWS1dLj6eagy6sVhOMQiLtJdxQBHIA9Z6HFUNLOlr6MFOgzV8wvmidtPONfPtEUv0uZsy77XJNzTAfwPDaA==", + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/resolve": { + "version": "1.22.8", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", + "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-core-module": "^2.13.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve-alpn": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/resolve-alpn/-/resolve-alpn-1.2.1.tgz", + "integrity": "sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==", + "license": "MIT" + }, + "node_modules/resolve-cwd": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", + "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "resolve-from": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/resolve-cwd/node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "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==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/resolve-pkg-maps": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", + "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" + } + }, + "node_modules/resolve.exports": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.3.tgz", + "integrity": "sha512-OcXjMsGdhL4XnbShKpAcSqPMzQoYkYyhbEaeSko47MjRP9NfEQMhZkXL1DoFlt9LWQn4YttrdnV6X2OiyzBi+A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/responselike": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/responselike/-/responselike-2.0.1.tgz", + "integrity": "sha512-4gl03wn3hj1HP3yzgdI7d3lCkF95F21Pz4BPGvKHinyQzALR5CapwC8yIi0Rh58DEMQ/SguC03wFj2k0M/mHhw==", + "license": "MIT", + "dependencies": { + "lowercase-keys": "^2.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "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/rimraf": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-6.0.1.tgz", + "integrity": "sha512-9dkvaxAsk/xNXSJzMgFqqMCuFgt2+KsOFek3TMLfo8NCPfWpBmqwyNn5Y+NX56QUYfCtsyhF3ayiboEoUmJk/A==", + "license": "ISC", + "dependencies": { + "glob": "^11.0.0", + "package-json-from-dist": "^1.0.0" + }, + "bin": { + "rimraf": "dist/esm/bin.mjs" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/rimraf/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/rimraf/node_modules/glob": { + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-11.0.0.tgz", + "integrity": "sha512-9UiX/Bl6J2yaBbxKoEBRm4Cipxgok8kQYcOPEhScPwebu2I0HoQOuYdIO6S3hLuWoZgpDpwQZMzTFxgpkyT76g==", + "license": "ISC", + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^4.0.1", + "minimatch": "^10.0.0", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^2.0.0" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/rimraf/node_modules/minimatch": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.0.1.tgz", + "integrity": "sha512-ethXTt3SGGR+95gudmqJ1eNhRO7eGEGIgYA9vnPatK4/etz2MEVDno5GMCibdMTuBMyElzIlgxMna3K94XDIDQ==", + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/rollup": { + "version": "4.28.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.28.1.tgz", + "integrity": "sha512-61fXYl/qNVinKmGSTHAZ6Yy8I3YIJC/r2m9feHo6SwVAVcLT5MPwOUFe7EuURA/4m0NR8lXG4BBXuo/IZEsjMg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "1.0.6" + }, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "@rollup/rollup-android-arm-eabi": "4.28.1", + "@rollup/rollup-android-arm64": "4.28.1", + "@rollup/rollup-darwin-arm64": "4.28.1", + "@rollup/rollup-darwin-x64": "4.28.1", + "@rollup/rollup-freebsd-arm64": "4.28.1", + "@rollup/rollup-freebsd-x64": "4.28.1", + "@rollup/rollup-linux-arm-gnueabihf": "4.28.1", + "@rollup/rollup-linux-arm-musleabihf": "4.28.1", + "@rollup/rollup-linux-arm64-gnu": "4.28.1", + "@rollup/rollup-linux-arm64-musl": "4.28.1", + "@rollup/rollup-linux-loongarch64-gnu": "4.28.1", + "@rollup/rollup-linux-powerpc64le-gnu": "4.28.1", + "@rollup/rollup-linux-riscv64-gnu": "4.28.1", + "@rollup/rollup-linux-s390x-gnu": "4.28.1", + "@rollup/rollup-linux-x64-gnu": "4.28.1", + "@rollup/rollup-linux-x64-musl": "4.28.1", + "@rollup/rollup-win32-arm64-msvc": "4.28.1", + "@rollup/rollup-win32-ia32-msvc": "4.28.1", + "@rollup/rollup-win32-x64-msvc": "4.28.1", + "fsevents": "~2.3.2" + } + }, + "node_modules/rollup-plugin-dts": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/rollup-plugin-dts/-/rollup-plugin-dts-6.1.1.tgz", + "integrity": "sha512-aSHRcJ6KG2IHIioYlvAOcEq6U99sVtqDDKVhnwt70rW6tsz3tv5OSjEiWcgzfsHdLyGXZ/3b/7b/+Za3Y6r1XA==", + "dev": true, + "license": "LGPL-3.0-only", + "dependencies": { + "magic-string": "^0.30.10" + }, + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/Swatinem" + }, + "optionalDependencies": { + "@babel/code-frame": "^7.24.2" + }, + "peerDependencies": { + "rollup": "^3.29.4 || ^4", + "typescript": "^4.5 || ^5.0" + } + }, + "node_modules/rollup-plugin-esbuild": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/rollup-plugin-esbuild/-/rollup-plugin-esbuild-6.1.1.tgz", + "integrity": "sha512-CehMY9FAqJD5OUaE/Mi1r5z0kNeYxItmRO2zG4Qnv2qWKF09J2lTy5GUzjJR354ZPrLkCj4fiBN41lo8PzBUhw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@rollup/pluginutils": "^5.0.5", + "debug": "^4.3.4", + "es-module-lexer": "^1.3.1", + "get-tsconfig": "^4.7.2" + }, + "engines": { + "node": ">=14.18.0" + }, + "peerDependencies": { + "esbuild": ">=0.18.0", + "rollup": "^1.20.0 || ^2.0.0 || ^3.0.0 || ^4.0.0" + } + }, + "node_modules/rollup/node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.28.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.28.1.tgz", + "integrity": "sha512-fzgeABz7rrAlKYB0y2kSEiURrI0691CSL0+KXwKwhxvj92VULEDQLpBYLHpF49MSiPG4sq5CK3qHMnb9tlCjBw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "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==", + "dev": true, + "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==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/sha3": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/sha3/-/sha3-2.1.4.tgz", + "integrity": "sha512-S8cNxbyb0UGUM2VhRD4Poe5N58gJnJsLJ5vC7FYWGUmGhcsj4++WaIOBFVDxlG0W3To6xBuiRh+i0Qp2oNCOtg==", + "license": "MIT", + "dependencies": { + "buffer": "6.0.3" + } + }, + "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", + "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", + "engines": { + "node": ">=8" + } + }, + "node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/sisteransi": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", + "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", + "dev": true, + "license": "MIT" + }, + "node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-support": { + "version": "0.5.13", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", + "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/spdx-correct": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz", + "integrity": "sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-exceptions": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.5.0.tgz", + "integrity": "sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==", + "dev": true, + "license": "CC-BY-3.0" + }, + "node_modules/spdx-expression-parse": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-license-ids": { + "version": "3.0.20", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.20.tgz", + "integrity": "sha512-jg25NiDV/1fLtSgEgyvVyDunvaNHbuwF9lfNV17gSmPFAlYzdfNBlLtLzXTevwkPj7DhGbmN9VnmJIgLnhvaBw==", + "dev": true, + "license": "CC0-1.0" + }, + "node_modules/sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/stack-utils": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz", + "integrity": "sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "escape-string-regexp": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/stack-utils/node_modules/escape-string-regexp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", + "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/standard-as-callback": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/standard-as-callback/-/standard-as-callback-2.1.0.tgz", + "integrity": "sha512-qoRRSyROncaz1z0mvYqIE4lCd9p2R90i6GxW3uZv5ucSu8tU7B5HXUP1gG8pVZsYNVaXjk8ClXHPttLyxAL48A==", + "license": "MIT" + }, + "node_modules/string-length": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", + "integrity": "sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "char-regex": "^1.0.2", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width-cjs": { + "name": "string-width", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-bom": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", + "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/strip-indent": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz", + "integrity": "sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "min-indent": "^1.0.0" + }, + "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==", + "dev": true, + "license": "MIT", + "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==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/test-exclude": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", + "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", + "dev": true, + "license": "ISC", + "dependencies": { + "@istanbuljs/schema": "^0.1.2", + "glob": "^7.1.4", + "minimatch": "^3.0.4" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/tmpl": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", + "integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==", + "dev": true, + "license": "BSD-3-Clause" + }, + "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==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", + "license": "MIT" + }, + "node_modules/ts-api-utils": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.4.3.tgz", + "integrity": "sha512-i3eMG77UTMD0hZhgRS562pv83RC6ukSAC2GMNWc+9dieh/+jDM5u5YG+NHX6VNDRHQcHwmsTHctP9LhbC3WxVw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=16" + }, + "peerDependencies": { + "typescript": ">=4.2.0" + } + }, + "node_modules/ts-custom-error": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/ts-custom-error/-/ts-custom-error-3.3.1.tgz", + "integrity": "sha512-5OX1tzOjxWEgsr/YEUWSuPrQ00deKLh6D7OTWcvNHm12/7QPyRh8SYpyWvA4IZv8H/+GQWQEh/kwo95Q9OVW1A==", + "license": "MIT", + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/ts-jest": { + "version": "29.2.5", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.2.5.tgz", + "integrity": "sha512-KD8zB2aAZrcKIdGk4OwpJggeLcH1FgrICqDSROWqlnJXGCXK4Mn6FcdK2B6670Xr73lHMG1kHw8R87A0ecZ+vA==", + "dev": true, + "license": "MIT", + "dependencies": { + "bs-logger": "^0.2.6", + "ejs": "^3.1.10", + "fast-json-stable-stringify": "^2.1.0", + "jest-util": "^29.0.0", + "json5": "^2.2.3", + "lodash.memoize": "^4.1.2", + "make-error": "^1.3.6", + "semver": "^7.6.3", + "yargs-parser": "^21.1.1" + }, + "bin": { + "ts-jest": "cli.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0" + }, + "peerDependencies": { + "@babel/core": ">=7.0.0-beta.0 <8", + "@jest/transform": "^29.0.0", + "@jest/types": "^29.0.0", + "babel-jest": "^29.0.0", + "jest": "^29.0.0", + "typescript": ">=4.3 <6" + }, + "peerDependenciesMeta": { + "@babel/core": { + "optional": true + }, + "@jest/transform": { + "optional": true + }, + "@jest/types": { + "optional": true + }, + "babel-jest": { + "optional": true + }, + "esbuild": { + "optional": true + } + } + }, + "node_modules/ts-node": { + "version": "10.9.2", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", + "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@cspotcode/source-map-support": "^0.8.0", + "@tsconfig/node10": "^1.0.7", + "@tsconfig/node12": "^1.0.7", + "@tsconfig/node14": "^1.0.0", + "@tsconfig/node16": "^1.0.2", + "acorn": "^8.4.1", + "acorn-walk": "^8.1.1", + "arg": "^4.1.0", + "create-require": "^1.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "v8-compile-cache-lib": "^3.0.1", + "yn": "3.1.1" + }, + "bin": { + "ts-node": "dist/bin.js", + "ts-node-cwd": "dist/bin-cwd.js", + "ts-node-esm": "dist/bin-esm.js", + "ts-node-script": "dist/bin-script.js", + "ts-node-transpile-only": "dist/bin-transpile.js", + "ts-script": "dist/bin-script-deprecated.js" + }, + "peerDependencies": { + "@swc/core": ">=1.2.50", + "@swc/wasm": ">=1.2.50", + "@types/node": "*", + "typescript": ">=2.7" + }, + "peerDependenciesMeta": { + "@swc/core": { + "optional": true + }, + "@swc/wasm": { + "optional": true + } + } + }, + "node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" + }, + "node_modules/tsx": { + "version": "4.19.2", + "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.19.2.tgz", + "integrity": "sha512-pOUl6Vo2LUq/bSa8S5q7b91cgNSjctn9ugq/+Mvow99qW6x/UZYwzxy/3NmqoT66eHYfCVvFvACC58UBPFf28g==", + "dev": true, + "license": "MIT", + "dependencies": { + "esbuild": "~0.23.0", + "get-tsconfig": "^4.7.5" + }, + "bin": { + "tsx": "dist/cli.mjs" + }, + "engines": { + "node": ">=18.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + } + }, + "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==", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/type-fest": { + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/typescript": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.2.tgz", + "integrity": "sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/typescript-eslint": { + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.18.0.tgz", + "integrity": "sha512-Xq2rRjn6tzVpAyHr3+nmSg1/9k9aIHnJ2iZeOH7cfGOWqTkXTm3kwpQglEuLGdNrYvPF+2gtAs+/KF5rjVo+WQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/eslint-plugin": "8.18.0", + "@typescript-eslint/parser": "8.18.0", + "@typescript-eslint/utils": "8.18.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.19.8", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", + "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==", + "license": "MIT" + }, + "node_modules/update-browserslist-db": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.1.tgz", + "integrity": "sha512-R8UzCaa9Az+38REPiJ1tXlImTJXlVfgHZsglwBD/k6nj76ctsH1E3q4doGrukiLQd3sGQYu56r5+lo5r94l29A==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "escalade": "^3.2.0", + "picocolors": "^1.1.0" + }, + "bin": { + "update-browserslist-db": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" + } + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/v8-compile-cache-lib": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", + "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", + "dev": true, + "license": "MIT" + }, + "node_modules/v8-to-istanbul": { + "version": "9.3.0", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.3.0.tgz", + "integrity": "sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA==", + "dev": true, + "license": "ISC", + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.12", + "@types/istanbul-lib-coverage": "^2.0.1", + "convert-source-map": "^2.0.0" + }, + "engines": { + "node": ">=10.12.0" + } + }, + "node_modules/validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "node_modules/walker": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz", + "integrity": "sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "makeerror": "1.0.12" + } + }, + "node_modules/web-streams-polyfill": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.3.3.tgz", + "integrity": "sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw==", + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/webcrypto-core": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/webcrypto-core/-/webcrypto-core-1.8.1.tgz", + "integrity": "sha512-P+x1MvlNCXlKbLSOY4cYrdreqPG5hbzkmawbcXLKN/mf6DZW0SdNNkZ+sjwsqVkI4A4Ko2sPZmkZtCKY58w83A==", + "license": "MIT", + "dependencies": { + "@peculiar/asn1-schema": "^2.3.13", + "@peculiar/json-schema": "^1.1.12", + "asn1js": "^3.0.5", + "pvtsutils": "^1.3.5", + "tslib": "^2.7.0" + } + }, + "node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", + "license": "BSD-2-Clause" + }, + "node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "license": "MIT", + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.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", + "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==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "license": "ISC" + }, + "node_modules/write-file-atomic": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.2.tgz", + "integrity": "sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==", + "dev": true, + "license": "ISC", + "dependencies": { + "imurmurhash": "^0.1.4", + "signal-exit": "^3.0.7" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/ws": { + "version": "7.5.10", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz", + "integrity": "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==", + "license": "MIT", + "engines": { + "node": ">=8.3.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "node_modules/yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true, + "license": "ISC" + }, + "node_modules/yaml": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.6.1.tgz", + "integrity": "sha512-7r0XPzioN/Q9kXBro/XPnA6kznR73DHq+GXh5ON7ZozRO6aMjbmiBuKste2wslTFkC5d1dw0GooOCepZXJ2SAg==", + "license": "ISC", + "bin": { + "yaml": "bin.mjs" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "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==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + } + } +} diff --git a/package.json b/package.json index 3384f3a..9e82c4f 100644 --- a/package.json +++ b/package.json @@ -64,7 +64,7 @@ "@eslint/compat": "^1.1.1", "@eslint/js": "^9.9.1", "@jest/globals": "^29.7.0", - "@prisma/client": "^5.19.1", + "@prisma/client": "^6.0.1", "@types/big.js": "^6.2.2", "@types/eslint__js": "^8.42.3", "@types/jest": "^29.5.12", @@ -78,7 +78,7 @@ "jest": "^29.7.0", "json-bigint": "^1.0.0", "prettier": "3.3.3", - "prisma": "^5.19.1", + "prisma": "^6.0.1", "rimraf": "^6.0.1", "rollup": "^4.21.2", "rollup-plugin-dts": "^6.1.1", diff --git a/src/adapters/adapter.ts b/src/adapters/adapter.ts new file mode 100644 index 0000000..18b8560 --- /dev/null +++ b/src/adapters/adapter.ts @@ -0,0 +1,204 @@ +import { Address } from "@minswap/lucid-cardano"; +import Big from "big.js"; +import { Asset } from "../types/asset"; +import { FactoryV2 } from "../types/factory"; +import { LbeV2Types } from "../types/lbe-v2"; +import { PoolV1, PoolV2, StablePool } from "../types/pool"; +import { TxHistory } from "../types/tx.internal"; + +export type GetPoolInTxParams = { + txHash: string; +}; + +export type GetPoolByIdParams = { + id: string; +}; + +export type GetPoolsParams = { + page: number; +}; + +export type GetV1PoolHistoryParams = { + id: string; +}; + +export type GetV2PoolHistoryParams = + | { + assetA: Asset; + assetB: Asset; + } + | { + lpAsset: Asset; + }; + +export type GetPoolPriceParams = { + pool: PoolV1.State; + decimalsA?: number; + decimalsB?: number; +}; + +export type GetV2PoolPriceParams = { + pool: PoolV2.State; + decimalsA?: number; + decimalsB?: number; +}; + +export type GetStablePoolHistoryParams = { + lpAsset: Asset; +}; + +export type GetStablePoolPriceParams = { + pool: StablePool.State; + assetAIndex: number; + assetBIndex: number; +}; + +export interface Adapter { + getAssetDecimals(asset: string): Promise; + + getDatumByDatumHash(datumHash: string): Promise; + + currentSlot(): Promise; + + /** + * Get pool state in a transaction. + * @param {Object} params - The parameters. + * @param {string} params.txHash - The transaction hash containing pool output. One of the way to acquire is by calling getPoolHistory. + * @returns {PoolV1.State} - Returns the pool state or null if the transaction doesn't contain pool. + */ + getV1PoolInTx({ txHash }: GetPoolInTxParams): Promise; + + /** + * Get a specific pool by its ID. + * @param {Object} params - The parameters. + * @param {string} params.pool - The pool ID. This is the asset name of a pool's NFT and LP tokens. It can also be acquired by calling pool.id. + * @returns {PoolV1.State | null} - Returns the pool or null if not found. + */ + getV1PoolById({ id }: GetPoolByIdParams): Promise; + + /** + * @returns The latest pools or empty array if current page is after last page + */ + getV1Pools(params: GetPoolsParams): Promise; + + getV1PoolHistory(params: GetV1PoolHistoryParams): Promise; + + /** + * Get pool price. + * @param {Object} params - The parameters to calculate pool price. + * @param {string} params.pool - The pool we want to get price. + * @param {string} [params.decimalsA] - The decimals of assetA in pool, if undefined then query from the adapter. + * @param {string} [params.decimalsB] - The decimals of assetB in pool, if undefined then query from the adapter. + * @returns {[string, string]} - Returns a pair of asset A/B price and B/A price, adjusted to decimals. + */ + getV1PoolPrice(params: GetPoolPriceParams): Promise<[Big, Big]>; + + getAllV2Pools(): Promise<{ pools: PoolV2.State[]; errors: unknown[] }>; + + getV2Pools( + params: GetPoolsParams, + ): Promise<{ pools: PoolV2.State[]; errors: unknown[] }>; + + getV2PoolByPair(assetA: Asset, assetB: Asset): Promise; + + getV2PoolByLp(lpAsset: Asset): Promise; + + getV2PoolHistory(params: GetV2PoolHistoryParams): Promise; + + /** + * Get pool price. + * @param {Object} params - The parameters to calculate pool price. + * @param {string} params.pool - The pool we want to get price. + * @param {string} [params.decimalsA] - The decimals of assetA in pool, if undefined then query from the adapter. + * @param {string} [params.decimalsB] - The decimals of assetB in pool, if undefined then query from the adapter. + * @returns {[string, string]} - Returns a pair of asset A/B price and B/A price, adjusted to decimals. + */ + getV2PoolPrice(params: GetV2PoolPriceParams): Promise<[Big, Big]>; + + getAllFactoriesV2(): Promise<{ + factories: FactoryV2.State[]; + errors: unknown[]; + }>; + + getFactoryV2ByPair( + assetA: Asset, + assetB: Asset, + ): Promise; + + getAllStablePools(): Promise<{ + pools: StablePool.State[]; + errors: unknown[]; + }>; + + getStablePoolByLpAsset(lpAsset: Asset): Promise; + + getStablePoolByNFT(nft: Asset): Promise; + + getStablePoolHistory( + params: GetStablePoolHistoryParams, + ): Promise; + + /** + * Get stable pool price. + * + * A Stable Pool can contain more than two assets, so we need to specify which assets we want to retrieve the price against by using assetAIndex and assetBIndex. + * @param {Object} params - The parameters to calculate pool price. + * @param {string} params.pool - The pool we want to get price. + * @param {number} params.assetAIndex + * @param {number} params.assetBIndex + * @returns {[string, string]} - Returns price of @assetA agains @assetB + */ + getStablePoolPrice(params: GetStablePoolPriceParams): Big; + + getAllLbeV2Factories(): Promise<{ + factories: LbeV2Types.FactoryState[]; + errors: unknown[]; + }>; + + getLbeV2Factory( + baseAsset: Asset, + raiseAsset: Asset, + ): Promise; + + getLbeV2HeadAndTailFactory(lbeId: string): Promise<{ + head: LbeV2Types.FactoryState; + tail: LbeV2Types.FactoryState; + } | null>; + + getAllLbeV2Treasuries(): Promise<{ + treasuries: LbeV2Types.TreasuryState[]; + errors: unknown[]; + }>; + + getLbeV2TreasuryByLbeId( + lbeId: string, + ): Promise; + + getAllLbeV2Managers(): Promise<{ + managers: LbeV2Types.ManagerState[]; + errors: unknown[]; + }>; + + getLbeV2ManagerByLbeId( + lbeId: string, + ): Promise; + + getAllLbeV2Sellers(): Promise<{ + sellers: LbeV2Types.SellerState[]; + errors: unknown[]; + }>; + + getLbeV2SellerByLbeId(lbeId: string): Promise; + + getAllLbeV2Orders(): Promise<{ + orders: LbeV2Types.OrderState[]; + errors: unknown[]; + }>; + + getLbeV2OrdersByLbeId(lbeId: string): Promise; + + getLbeV2OrdersByLbeIdAndOwner( + lbeId: string, + owner: Address, + ): Promise; +} diff --git a/src/adapter.ts b/src/adapters/blockfrost.ts similarity index 77% rename from src/adapter.ts rename to src/adapters/blockfrost.ts index 9fabb77..fb182c5 100644 --- a/src/adapter.ts +++ b/src/adapters/blockfrost.ts @@ -16,37 +16,37 @@ import * as Prisma from "@prisma/client"; import Big from "big.js"; import JSONBig from "json-bigint"; -import { StableswapCalculation } from "./calculate"; -import { PostgresRepositoryReader } from "./syncer/repository/postgres-repository"; -import { Asset } from "./types/asset"; +import { StableswapCalculation } from "../calculate"; +import { PostgresRepositoryReader } from "../syncer/repository/postgres-repository"; +import { Asset } from "../types/asset"; import { DexV1Constant, DexV2Constant, LbeV2Constant, StableswapConstant, -} from "./types/constants"; -import { FactoryV2 } from "./types/factory"; -import { LbeV2Types } from "./types/lbe-v2"; -import { NetworkEnvironment, NetworkId } from "./types/network"; -import { OrderV2 } from "./types/order"; -import { PoolV1, PoolV2, StablePool } from "./types/pool"; +} from "../types/constants"; +import { FactoryV2 } from "../types/factory"; +import { LbeV2Types } from "../types/lbe-v2"; +import { NetworkEnvironment, NetworkId } from "../types/network"; +import { OrderV2 } from "../types/order"; +import { PoolV1, PoolV2, StablePool } from "../types/pool"; import { checkValidPoolOutput, isValidPoolOutput, normalizeAssets, -} from "./types/pool.internal"; -import { StringUtils } from "./types/string"; -import { TxHistory, TxIn, Value } from "./types/tx.internal"; -import { getScriptHashFromAddress } from "./utils/address-utils.internal"; -import { networkEnvToLucidNetwork } from "./utils/network.internal"; - -export type GetPoolInTxParams = { - txHash: string; -}; - -export type GetPoolByIdParams = { - id: string; -}; +} from "../types/pool.internal"; +import { StringUtils } from "../types/string"; +import { TxHistory, TxIn, Value } from "../types/tx.internal"; +import { getScriptHashFromAddress } from "../utils/address-utils.internal"; +import { networkEnvToLucidNetwork } from "../utils/network.internal"; +import { + Adapter, + GetPoolInTxParams, + GetPoolByIdParams, + GetV2PoolPriceParams, + GetPoolPriceParams, + GetStablePoolPriceParams, +} from "./adapter"; export type GetPoolsParams = Omit & { page: number; @@ -67,178 +67,10 @@ export type GetV2PoolHistoryParams = PaginationOptions & } ); -export type GetPoolPriceParams = { - pool: PoolV1.State; - decimalsA?: number; - decimalsB?: number; -}; - -export type GetV2PoolPriceParams = { - pool: PoolV2.State; - decimalsA?: number; - decimalsB?: number; -}; - export type GetStablePoolHistoryParams = PaginationOptions & { lpAsset: Asset; }; -export type GetStablePoolPriceParams = { - pool: StablePool.State; - assetAIndex: number; - assetBIndex: number; -}; - -interface Adapter { - getAssetDecimals(asset: string): Promise; - - getDatumByDatumHash(datumHash: string): Promise; - - currentSlot(): Promise; - - /** - * Get pool state in a transaction. - * @param {Object} params - The parameters. - * @param {string} params.txHash - The transaction hash containing pool output. One of the way to acquire is by calling getPoolHistory. - * @returns {PoolV1.State} - Returns the pool state or null if the transaction doesn't contain pool. - */ - getV1PoolInTx({ txHash }: GetPoolInTxParams): Promise; - - /** - * Get a specific pool by its ID. - * @param {Object} params - The parameters. - * @param {string} params.pool - The pool ID. This is the asset name of a pool's NFT and LP tokens. It can also be acquired by calling pool.id. - * @returns {PoolV1.State | null} - Returns the pool or null if not found. - */ - getV1PoolById({ id }: GetPoolByIdParams): Promise; - - /** - * @returns The latest pools or empty array if current page is after last page - */ - getV1Pools(params: GetPoolsParams): Promise; - - getV1PoolHistory(params: GetV1PoolHistoryParams): Promise; - - /** - * Get pool price. - * @param {Object} params - The parameters to calculate pool price. - * @param {string} params.pool - The pool we want to get price. - * @param {string} [params.decimalsA] - The decimals of assetA in pool, if undefined then query from Blockfrost. - * @param {string} [params.decimalsB] - The decimals of assetB in pool, if undefined then query from Blockfrost. - * @returns {[string, string]} - Returns a pair of asset A/B price and B/A price, adjusted to decimals. - */ - getV1PoolPrice(params: GetPoolPriceParams): Promise<[Big, Big]>; - - getAllV2Pools(): Promise<{ pools: PoolV2.State[]; errors: unknown[] }>; - - getV2Pools( - params: GetPoolsParams - ): Promise<{ pools: PoolV2.State[]; errors: unknown[] }>; - - getV2PoolByPair(assetA: Asset, assetB: Asset): Promise; - - getV2PoolByLp(lpAsset: Asset): Promise; - - getV2PoolHistory(params: GetV2PoolHistoryParams): Promise; - - /** - * Get pool price. - * @param {Object} params - The parameters to calculate pool price. - * @param {string} params.pool - The pool we want to get price. - * @param {string} [params.decimalsA] - The decimals of assetA in pool, if undefined then query from Blockfrost. - * @param {string} [params.decimalsB] - The decimals of assetB in pool, if undefined then query from Blockfrost. - * @returns {[string, string]} - Returns a pair of asset A/B price and B/A price, adjusted to decimals. - */ - getV2PoolPrice(params: GetV2PoolPriceParams): Promise<[Big, Big]>; - - getAllFactoriesV2(): Promise<{ - factories: FactoryV2.State[]; - errors: unknown[]; - }>; - - getFactoryV2ByPair( - assetA: Asset, - assetB: Asset - ): Promise; - - getAllStablePools(): Promise<{ - pools: StablePool.State[]; - errors: unknown[]; - }>; - - getStablePoolByLpAsset(lpAsset: Asset): Promise; - - getStablePoolByNFT(nft: Asset): Promise; - - getStablePoolHistory( - params: GetStablePoolHistoryParams - ): Promise; - - /** - * Get stable pool price. - * - * A Stable Pool can contain more than two assets, so we need to specify which assets we want to retrieve the price against by using assetAIndex and assetBIndex. - * @param {Object} params - The parameters to calculate pool price. - * @param {string} params.pool - The pool we want to get price. - * @param {number} params.assetAIndex - * @param {number} params.assetBIndex - * @returns {[string, string]} - Returns price of @assetA agains @assetB - */ - getStablePoolPrice(params: GetStablePoolPriceParams): Big; - - getAllLbeV2Factories(): Promise<{ - factories: LbeV2Types.FactoryState[]; - errors: unknown[]; - }>; - - getLbeV2Factory( - baseAsset: Asset, - raiseAsset: Asset - ): Promise; - - getLbeV2HeadAndTailFactory(lbeId: string): Promise<{ - head: LbeV2Types.FactoryState; - tail: LbeV2Types.FactoryState; - } | null>; - - getAllLbeV2Treasuries(): Promise<{ - treasuries: LbeV2Types.TreasuryState[]; - errors: unknown[]; - }>; - - getLbeV2TreasuryByLbeId( - lbeId: string - ): Promise; - - getAllLbeV2Managers(): Promise<{ - managers: LbeV2Types.ManagerState[]; - errors: unknown[]; - }>; - - getLbeV2ManagerByLbeId( - lbeId: string - ): Promise; - - getAllLbeV2Sellers(): Promise<{ - sellers: LbeV2Types.SellerState[]; - errors: unknown[]; - }>; - - getLbeV2SellerByLbeId(lbeId: string): Promise; - - getAllLbeV2Orders(): Promise<{ - orders: LbeV2Types.OrderState[]; - errors: unknown[]; - }>; - - getLbeV2OrdersByLbeId(lbeId: string): Promise; - - getLbeV2OrdersByLbeIdAndOwner( - lbeId: string, - owner: Address - ): Promise; -} - export class BlockfrostAdapter implements Adapter { protected readonly networkId: NetworkId; private readonly blockFrostApi: BlockFrostAPI; @@ -280,7 +112,7 @@ export class BlockfrostAdapter implements Adapter { const poolTx = await this.blockFrostApi.txsUtxos(txHash); const poolUtxo = poolTx.outputs.find( (o: (typeof poolTx.outputs)[number]) => - getScriptHashFromAddress(o.address) === DexV1Constant.POOL_SCRIPT_HASH + getScriptHashFromAddress(o.address) === DexV1Constant.POOL_SCRIPT_HASH, ); if (!poolUtxo) { return null; @@ -289,7 +121,7 @@ export class BlockfrostAdapter implements Adapter { checkValidPoolOutput(poolUtxo.address, poolUtxo.amount, poolUtxo.data_hash); invariant( poolUtxo.data_hash, - `expect pool to have datum hash, got ${poolUtxo.data_hash}` + `expect pool to have datum hash, got ${poolUtxo.data_hash}`, ); const txIn: TxIn = { txHash: txHash, index: poolUtxo.output_index }; @@ -297,7 +129,7 @@ export class BlockfrostAdapter implements Adapter { poolUtxo.address, txIn, poolUtxo.amount, - poolUtxo.data_hash + poolUtxo.data_hash, ); } @@ -323,23 +155,23 @@ export class BlockfrostAdapter implements Adapter { }: GetPoolsParams): Promise { const utxos = await this.blockFrostApi.addressesUtxos( DexV1Constant.POOL_SCRIPT_HASH, - { count, order, page } + { count, order, page }, ); return utxos .filter((utxo: (typeof utxos)[number]) => - isValidPoolOutput(utxo.address, utxo.amount, utxo.data_hash) + isValidPoolOutput(utxo.address, utxo.amount, utxo.data_hash), ) .map((utxo: (typeof utxos)[number]) => { invariant( utxo.data_hash, - `expect pool to have datum hash, got ${utxo.data_hash}` + `expect pool to have datum hash, got ${utxo.data_hash}`, ); const txIn: TxIn = { txHash: utxo.tx_hash, index: utxo.output_index }; return new PoolV1.State( utxo.address, txIn, utxo.amount, - utxo.data_hash + utxo.data_hash, ); }); } @@ -362,7 +194,7 @@ export class BlockfrostAdapter implements Adapter { txIndex: tx.tx_index, blockHeight: tx.block_height, time: new Date(Number(tx.block_time) * 1000), - }) + }), ); } @@ -378,10 +210,10 @@ export class BlockfrostAdapter implements Adapter { decimalsB = await this.getAssetDecimals(pool.assetB); } const adjustedReserveA = Big(pool.reserveA.toString()).div( - Big(10).pow(decimalsA) + Big(10).pow(decimalsA), ); const adjustedReserveB = Big(pool.reserveB.toString()).div( - Big(10).pow(decimalsB) + Big(10).pow(decimalsB), ); const priceAB = adjustedReserveA.div(adjustedReserveB); const priceBA = adjustedReserveB.div(adjustedReserveA); @@ -396,7 +228,7 @@ export class BlockfrostAdapter implements Adapter { const v2Config = DexV2Constant.CONFIG[this.networkId]; const utxos = await this.blockFrostApi.addressesUtxosAssetAll( v2Config.poolScriptHashBech32, - v2Config.poolAuthenAsset + v2Config.poolAuthenAsset, ); const pools: PoolV2.State[] = []; @@ -411,7 +243,7 @@ export class BlockfrostAdapter implements Adapter { utxo.address, { txHash: utxo.tx_hash, index: utxo.output_index }, utxo.amount, - utxo.inline_datum + utxo.inline_datum, ); pools.push(pool); } catch (err) { @@ -436,7 +268,7 @@ export class BlockfrostAdapter implements Adapter { const utxos = await this.blockFrostApi.addressesUtxosAsset( v2Config.poolScriptHashBech32, v2Config.poolAuthenAsset, - { count, order, page } + { count, order, page }, ); const pools: PoolV2.State[] = []; @@ -451,7 +283,7 @@ export class BlockfrostAdapter implements Adapter { utxo.address, { txHash: utxo.tx_hash, index: utxo.output_index }, utxo.amount, - utxo.inline_datum + utxo.inline_datum, ); pools.push(pool); } catch (err) { @@ -466,17 +298,17 @@ export class BlockfrostAdapter implements Adapter { public async getV2PoolByPair( assetA: Asset, - assetB: Asset + assetB: Asset, ): Promise { const [normalizedAssetA, normalizedAssetB] = normalizeAssets( Asset.toString(assetA), - Asset.toString(assetB) + Asset.toString(assetB), ); const { pools: allPools } = await this.getAllV2Pools(); return ( allPools.find( (pool) => - pool.assetA === normalizedAssetA && pool.assetB === normalizedAssetB + pool.assetA === normalizedAssetA && pool.assetB === normalizedAssetB, ) ?? null ); } @@ -490,7 +322,7 @@ export class BlockfrostAdapter implements Adapter { } public async getV2PoolHistory( - _params: GetV2PoolHistoryParams + _params: GetV2PoolHistoryParams, ): Promise { throw Error("Not supported yet. Please use MinswapAdapter"); } @@ -507,10 +339,10 @@ export class BlockfrostAdapter implements Adapter { decimalsB = await this.getAssetDecimals(pool.assetB); } const adjustedReserveA = Big(pool.reserveA.toString()).div( - Big(10).pow(decimalsA) + Big(10).pow(decimalsA), ); const adjustedReserveB = Big(pool.reserveB.toString()).div( - Big(10).pow(decimalsB) + Big(10).pow(decimalsB), ); const priceAB = adjustedReserveA.div(adjustedReserveB); const priceBA = adjustedReserveB.div(adjustedReserveA); @@ -524,7 +356,7 @@ export class BlockfrostAdapter implements Adapter { const v2Config = DexV2Constant.CONFIG[this.networkId]; const utxos = await this.blockFrostApi.addressesUtxosAssetAll( v2Config.factoryScriptHashBech32, - v2Config.factoryAsset + v2Config.factoryAsset, ); const factories: FactoryV2.State[] = []; @@ -533,7 +365,7 @@ export class BlockfrostAdapter implements Adapter { try { if (!utxo.inline_datum) { throw new Error( - `Cannot find datum of Factory V2, tx: ${utxo.tx_hash}` + `Cannot find datum of Factory V2, tx: ${utxo.tx_hash}`, ); } const factory = new FactoryV2.State( @@ -541,7 +373,7 @@ export class BlockfrostAdapter implements Adapter { utxo.address, { txHash: utxo.tx_hash, index: utxo.output_index }, utxo.amount, - utxo.inline_datum + utxo.inline_datum, ); factories.push(factory); } catch (err) { @@ -556,7 +388,7 @@ export class BlockfrostAdapter implements Adapter { public async getFactoryV2ByPair( assetA: Asset, - assetB: Asset + assetB: Asset, ): Promise { const factoryIdent = PoolV2.computeLPAssetName(assetA, assetB); const { factories: allFactories } = await this.getAllFactoriesV2(); @@ -578,7 +410,7 @@ export class BlockfrostAdapter implements Adapter { }> { const v2Config = DexV2Constant.CONFIG[this.networkId]; const utxos = await this.blockFrostApi.addressesUtxosAll( - v2Config.orderScriptHashBech32 + v2Config.orderScriptHashBech32, ); const orders: OrderV2.State[] = []; @@ -592,18 +424,18 @@ export class BlockfrostAdapter implements Adapter { utxo.address, { txHash: utxo.tx_hash, index: utxo.output_index }, utxo.amount, - utxo.inline_datum + utxo.inline_datum, ); } else if (utxo.data_hash !== null) { const orderDatum = await this.blockFrostApi.scriptsDatumCbor( - utxo.data_hash + utxo.data_hash, ); order = new OrderV2.State( this.networkId, utxo.address, { txHash: utxo.tx_hash, index: utxo.output_index }, utxo.amount, - orderDatum.cbor + orderDatum.cbor, ); } @@ -624,7 +456,7 @@ export class BlockfrostAdapter implements Adapter { // MARK: STABLESWAP private async parseStablePoolState( - utxo: Responses["address_utxo_content"][0] + utxo: Responses["address_utxo_content"][0], ): Promise { let datum: string; if (utxo.inline_datum) { @@ -639,7 +471,7 @@ export class BlockfrostAdapter implements Adapter { utxo.address, { txHash: utxo.tx_hash, index: utxo.output_index }, utxo.amount, - datum + datum, ); return pool; } @@ -649,7 +481,7 @@ export class BlockfrostAdapter implements Adapter { errors: unknown[]; }> { const poolAddresses = StableswapConstant.CONFIG[this.networkId].map( - (cfg) => cfg.poolAddress + (cfg) => cfg.poolAddress, ); const pools: StablePool.State[] = []; const errors: unknown[] = []; @@ -672,20 +504,20 @@ export class BlockfrostAdapter implements Adapter { } public async getStablePoolByLpAsset( - lpAsset: Asset + lpAsset: Asset, ): Promise { const config = StableswapConstant.CONFIG[this.networkId].find( - (cfg) => cfg.lpAsset === Asset.toString(lpAsset) + (cfg) => cfg.lpAsset === Asset.toString(lpAsset), ); invariant( config, `getStablePoolByLpAsset: Can not find stableswap config by LP Asset ${Asset.toString( - lpAsset - )}` + lpAsset, + )}`, ); const poolUtxos = await this.blockFrostApi.addressesUtxosAssetAll( config.poolAddress, - config.nftAsset + config.nftAsset, ); if (poolUtxos.length === 1) { const poolUtxo = poolUtxos[0]; @@ -695,19 +527,19 @@ export class BlockfrostAdapter implements Adapter { } public async getStablePoolByNFT( - nft: Asset + nft: Asset, ): Promise { const poolAddress = StableswapConstant.CONFIG[this.networkId].find( - (cfg) => cfg.nftAsset === Asset.toString(nft) + (cfg) => cfg.nftAsset === Asset.toString(nft), )?.poolAddress; if (!poolAddress) { throw new Error( - `Cannot find Stable Pool having NFT ${Asset.toString(nft)}` + `Cannot find Stable Pool having NFT ${Asset.toString(nft)}`, ); } const poolUtxos = await this.blockFrostApi.addressesUtxosAssetAll( poolAddress, - Asset.toString(nft) + Asset.toString(nft), ); if (poolUtxos.length === 1) { const poolUtxo = poolUtxos[0]; @@ -717,7 +549,7 @@ export class BlockfrostAdapter implements Adapter { } getStablePoolHistory( - _params: GetStablePoolHistoryParams + _params: GetStablePoolHistoryParams, ): Promise { throw Error("Not supported yet. Please use MinswapAdapter"); } @@ -733,7 +565,7 @@ export class BlockfrostAdapter implements Adapter { config.multiples, pool.amp, assetAIndex, - assetBIndex + assetBIndex, ); return Big(priceNum.toString()).div(priceDen.toString()); @@ -747,7 +579,7 @@ export class BlockfrostAdapter implements Adapter { const config = LbeV2Constant.CONFIG[this.networkId]; const utxos = await this.blockFrostApi.addressesUtxosAssetAll( config.factoryHashBech32, - config.factoryAsset + config.factoryAsset, ); const factories: LbeV2Types.FactoryState[] = []; @@ -756,7 +588,7 @@ export class BlockfrostAdapter implements Adapter { try { if (!utxo.inline_datum) { throw new Error( - `Cannot find datum of LBE V2 Factory, tx: ${utxo.tx_hash}` + `Cannot find datum of LBE V2 Factory, tx: ${utxo.tx_hash}`, ); } @@ -765,7 +597,7 @@ export class BlockfrostAdapter implements Adapter { utxo.address, { txHash: utxo.tx_hash, index: utxo.output_index }, utxo.amount, - utxo.inline_datum + utxo.inline_datum, ); factories.push(factory); } catch (err) { @@ -780,7 +612,7 @@ export class BlockfrostAdapter implements Adapter { public async getLbeV2Factory( baseAsset: Asset, - raiseAsset: Asset + raiseAsset: Asset, ): Promise { const factoryIdent = PoolV2.computeLPAssetName(baseAsset, raiseAsset); const { factories: allFactories } = await this.getAllLbeV2Factories(); @@ -824,7 +656,7 @@ export class BlockfrostAdapter implements Adapter { const config = LbeV2Constant.CONFIG[this.networkId]; const utxos = await this.blockFrostApi.addressesUtxosAssetAll( config.treasuryHashBech32, - config.treasuryAsset + config.treasuryAsset, ); const treasuries: LbeV2Types.TreasuryState[] = []; @@ -833,7 +665,7 @@ export class BlockfrostAdapter implements Adapter { try { if (!utxo.inline_datum) { throw new Error( - `Cannot find datum of LBE V2 Treasury, tx: ${utxo.tx_hash}` + `Cannot find datum of LBE V2 Treasury, tx: ${utxo.tx_hash}`, ); } @@ -842,7 +674,7 @@ export class BlockfrostAdapter implements Adapter { utxo.address, { txHash: utxo.tx_hash, index: utxo.output_index }, utxo.amount, - utxo.inline_datum + utxo.inline_datum, ); treasuries.push(treasury); } catch (err) { @@ -856,7 +688,7 @@ export class BlockfrostAdapter implements Adapter { } public async getLbeV2TreasuryByLbeId( - lbeId: string + lbeId: string, ): Promise { const { treasuries: allTreasuries } = await this.getAllLbeV2Treasuries(); for (const treasury of allTreasuries) { @@ -874,7 +706,7 @@ export class BlockfrostAdapter implements Adapter { const config = LbeV2Constant.CONFIG[this.networkId]; const utxos = await this.blockFrostApi.addressesUtxosAssetAll( config.managerHashBech32, - config.managerAsset + config.managerAsset, ); const managers: LbeV2Types.ManagerState[] = []; @@ -883,7 +715,7 @@ export class BlockfrostAdapter implements Adapter { try { if (!utxo.inline_datum) { throw new Error( - `Cannot find datum of Lbe V2 Manager, tx: ${utxo.tx_hash}` + `Cannot find datum of Lbe V2 Manager, tx: ${utxo.tx_hash}`, ); } @@ -892,7 +724,7 @@ export class BlockfrostAdapter implements Adapter { utxo.address, { txHash: utxo.tx_hash, index: utxo.output_index }, utxo.amount, - utxo.inline_datum + utxo.inline_datum, ); managers.push(manager); } catch (err) { @@ -906,7 +738,7 @@ export class BlockfrostAdapter implements Adapter { } public async getLbeV2ManagerByLbeId( - lbeId: string + lbeId: string, ): Promise { const { managers } = await this.getAllLbeV2Managers(); for (const manager of managers) { @@ -924,7 +756,7 @@ export class BlockfrostAdapter implements Adapter { const config = LbeV2Constant.CONFIG[this.networkId]; const utxos = await this.blockFrostApi.addressesUtxosAssetAll( config.sellerHashBech32, - config.sellerAsset + config.sellerAsset, ); const sellers: LbeV2Types.SellerState[] = []; @@ -933,7 +765,7 @@ export class BlockfrostAdapter implements Adapter { try { if (!utxo.inline_datum) { throw new Error( - `Cannot find datum of Lbe V2 Seller, tx: ${utxo.tx_hash}` + `Cannot find datum of Lbe V2 Seller, tx: ${utxo.tx_hash}`, ); } @@ -942,7 +774,7 @@ export class BlockfrostAdapter implements Adapter { utxo.address, { txHash: utxo.tx_hash, index: utxo.output_index }, utxo.amount, - utxo.inline_datum + utxo.inline_datum, ); sellers.push(seller); } catch (err) { @@ -956,7 +788,7 @@ export class BlockfrostAdapter implements Adapter { } public async getLbeV2SellerByLbeId( - lbeId: string + lbeId: string, ): Promise { const { sellers } = await this.getAllLbeV2Sellers(); for (const seller of sellers) { @@ -974,7 +806,7 @@ export class BlockfrostAdapter implements Adapter { const config = LbeV2Constant.CONFIG[this.networkId]; const utxos = await this.blockFrostApi.addressesUtxosAssetAll( config.orderHashBech32, - config.orderAsset + config.orderAsset, ); const orders: LbeV2Types.OrderState[] = []; const errors: unknown[] = []; @@ -982,7 +814,7 @@ export class BlockfrostAdapter implements Adapter { try { if (!utxo.inline_datum) { throw new Error( - `Cannot find datum of Lbe V2 Order, tx: ${utxo.tx_hash}` + `Cannot find datum of Lbe V2 Order, tx: ${utxo.tx_hash}`, ); } @@ -991,7 +823,7 @@ export class BlockfrostAdapter implements Adapter { utxo.address, { txHash: utxo.tx_hash, index: utxo.output_index }, utxo.amount, - utxo.inline_datum + utxo.inline_datum, ); orders.push(order); } catch (err) { @@ -1005,7 +837,7 @@ export class BlockfrostAdapter implements Adapter { } public async getLbeV2OrdersByLbeId( - lbeId: string + lbeId: string, ): Promise { const { orders: allOrders } = await this.getAllLbeV2Orders(); const orders: LbeV2Types.OrderState[] = []; @@ -1019,7 +851,7 @@ export class BlockfrostAdapter implements Adapter { public async getLbeV2OrdersByLbeIdAndOwner( lbeId: string, - owner: Address + owner: Address, ): Promise { const { orders: allOrders } = await this.getAllLbeV2Orders(); const orders: LbeV2Types.OrderState[] = []; @@ -1065,7 +897,7 @@ export class MinswapAdapter extends BlockfrostAdapter { useNativeBigInt: true, }).parse(prismaPool.value); const datumHash = C.hash_plutus_data( - C.PlutusData.from_bytes(fromHex(prismaPool.raw_datum)) + C.PlutusData.from_bytes(fromHex(prismaPool.raw_datum)), ).to_hex(); return new PoolV1.State(address, txIn, value, datumHash); } @@ -1099,7 +931,7 @@ export class MinswapAdapter extends BlockfrostAdapter { const prismaPools = await this.repository.getLastPoolV1State( page - 1, count, - order + order, ); if (prismaPools.length === 0) { return []; @@ -1118,7 +950,7 @@ export class MinswapAdapter extends BlockfrostAdapter { lpAsset, page - 1, count, - order + order, ); if (prismaPools.length === 0) { return []; @@ -1133,10 +965,10 @@ export class MinswapAdapter extends BlockfrostAdapter { time: new Date( slotToBeginUnixTime( Number(prismaPool.slot), - SLOT_CONFIG_NETWORK[network] - ) + SLOT_CONFIG_NETWORK[network], + ), ), - }) + }), ); } @@ -1154,7 +986,7 @@ export class MinswapAdapter extends BlockfrostAdapter { prismaPool.pool_address, txIn, value, - prismaPool.raw_datum + prismaPool.raw_datum, ); } @@ -1180,7 +1012,7 @@ export class MinswapAdapter extends BlockfrostAdapter { const prismaPools = await this.repository.getLastPoolV2State( page - 1, count, - order + order, ); return { pools: prismaPools.map((pool) => this.prismaPoolV2ToPoolV2State(pool)), @@ -1190,7 +1022,7 @@ export class MinswapAdapter extends BlockfrostAdapter { override async getV2PoolByPair( assetA: Asset, - assetB: Asset + assetB: Asset, ): Promise { const prismaPool = await this.repository.getPoolV2ByPair(assetA, assetB); if (!prismaPool) { @@ -1208,7 +1040,7 @@ export class MinswapAdapter extends BlockfrostAdapter { } override async getV2PoolHistory( - options: GetV2PoolHistoryParams + options: GetV2PoolHistoryParams, ): Promise { const { page = 1, count = 100, order = "desc" } = options; let lpAsset: string; @@ -1221,7 +1053,7 @@ export class MinswapAdapter extends BlockfrostAdapter { lpAsset, page - 1, count, - order + order, ); if (prismaPools.length === 0) { return []; @@ -1231,7 +1063,7 @@ export class MinswapAdapter extends BlockfrostAdapter { } private prismaStablePoolToStablePoolState( - prismaPool: Prisma.StablePool + prismaPool: Prisma.StablePool, ): StablePool.State { const txIn: TxIn = { txHash: prismaPool.created_tx_id, @@ -1246,7 +1078,7 @@ export class MinswapAdapter extends BlockfrostAdapter { prismaPool.pool_address, txIn, value, - prismaPool.raw_datum + prismaPool.raw_datum, ); } @@ -1257,26 +1089,26 @@ export class MinswapAdapter extends BlockfrostAdapter { const prismaPools = await this.repository.getAllLastStablePoolState(); return { pools: prismaPools.map((pool) => - this.prismaStablePoolToStablePoolState(pool) + this.prismaStablePoolToStablePoolState(pool), ), errors: [], }; } override async getStablePoolByNFT( - nft: Asset + nft: Asset, ): Promise { const config = StableswapConstant.CONFIG[this.networkId].find( - (cfg) => cfg.nftAsset === Asset.toString(nft) + (cfg) => cfg.nftAsset === Asset.toString(nft), ); if (!config) { throw new Error( - `Cannot find Stable Pool having NFT ${Asset.toString(nft)}` + `Cannot find Stable Pool having NFT ${Asset.toString(nft)}`, ); } const prismaStablePool = await this.repository.getStablePoolByLpAsset( - config.lpAsset + config.lpAsset, ); if (!prismaStablePool) { return null; @@ -1285,19 +1117,19 @@ export class MinswapAdapter extends BlockfrostAdapter { } override async getStablePoolByLpAsset( - lpAsset: Asset + lpAsset: Asset, ): Promise { const config = StableswapConstant.CONFIG[this.networkId].find( - (cfg) => cfg.lpAsset === Asset.toString(lpAsset) + (cfg) => cfg.lpAsset === Asset.toString(lpAsset), ); if (!config) { throw new Error( - `Cannot find Stable Pool having NFT ${Asset.toString(lpAsset)}` + `Cannot find Stable Pool having NFT ${Asset.toString(lpAsset)}`, ); } const prismaStablePool = await this.repository.getStablePoolByLpAsset( - config.lpAsset + config.lpAsset, ); if (!prismaStablePool) { return null; @@ -1315,14 +1147,14 @@ export class MinswapAdapter extends BlockfrostAdapter { Asset.toString(lpAsset), page - 1, count, - order + order, ); if (prismaPools.length === 0) { return []; } return prismaPools.map((pool) => - this.prismaStablePoolToStablePoolState(pool) + this.prismaStablePoolToStablePoolState(pool), ); } } diff --git a/src/adapters/maestro.ts b/src/adapters/maestro.ts new file mode 100644 index 0000000..2cdeb7f --- /dev/null +++ b/src/adapters/maestro.ts @@ -0,0 +1,161 @@ +import { Address } from "@minswap/lucid-cardano"; +import { PoolV1, PoolV2, StablePool } from ".."; +import { Asset } from "../types/asset"; +import { FactoryV2 } from "../types/factory"; +import { LbeV2Types } from "../types/lbe-v2"; +import { TxHistory } from "../types/tx.internal"; +import { + Adapter, + GetPoolByIdParams, + GetPoolInTxParams, + GetPoolPriceParams, + GetPoolsParams, + GetStablePoolHistoryParams, + GetStablePoolPriceParams, + GetV1PoolHistoryParams, + GetV2PoolHistoryParams, + GetV2PoolPriceParams, +} from "./adapter"; + +export class MaestroAdapter implements Adapter { + getAssetDecimals(asset: string): Promise { + throw new Error("Method not implemented."); + } + getDatumByDatumHash(datumHash: string): Promise { + throw new Error("Method not implemented."); + } + currentSlot(): Promise { + throw new Error("Method not implemented."); + } + getV1PoolInTx({ txHash }: GetPoolInTxParams): Promise { + throw new Error("Method not implemented."); + } + getV1PoolById({ id }: GetPoolByIdParams): Promise { + throw new Error("Method not implemented."); + } + getV1Pools(params: GetPoolsParams): Promise { + throw new Error("Method not implemented."); + } + getV1PoolHistory(params: GetV1PoolHistoryParams): Promise { + throw new Error("Method not implemented."); + } + getV1PoolPrice(params: GetPoolPriceParams): Promise<[Big, Big]> { + throw new Error("Method not implemented."); + } + getAllV2Pools(): Promise<{ pools: PoolV2.State[]; errors: unknown[] }> { + throw new Error("Method not implemented."); + } + getV2Pools( + params: GetPoolsParams, + ): Promise<{ pools: PoolV2.State[]; errors: unknown[] }> { + throw new Error("Method not implemented."); + } + getV2PoolByPair(assetA: Asset, assetB: Asset): Promise { + throw new Error("Method not implemented."); + } + getV2PoolByLp(lpAsset: Asset): Promise { + throw new Error("Method not implemented."); + } + getV2PoolHistory(params: GetV2PoolHistoryParams): Promise { + throw new Error("Method not implemented."); + } + getV2PoolPrice(params: GetV2PoolPriceParams): Promise<[Big, Big]> { + throw new Error("Method not implemented."); + } + getAllFactoriesV2(): Promise<{ + factories: FactoryV2.State[]; + errors: unknown[]; + }> { + throw new Error("Method not implemented."); + } + getFactoryV2ByPair( + assetA: Asset, + assetB: Asset, + ): Promise { + throw new Error("Method not implemented."); + } + getAllStablePools(): Promise<{ + pools: StablePool.State[]; + errors: unknown[]; + }> { + throw new Error("Method not implemented."); + } + getStablePoolByLpAsset(lpAsset: Asset): Promise { + throw new Error("Method not implemented."); + } + getStablePoolByNFT(nft: Asset): Promise { + throw new Error("Method not implemented."); + } + getStablePoolHistory( + params: GetStablePoolHistoryParams, + ): Promise { + throw new Error("Method not implemented."); + } + getStablePoolPrice(params: GetStablePoolPriceParams): Big { + throw new Error("Method not implemented."); + } + getAllLbeV2Factories(): Promise<{ + factories: LbeV2Types.FactoryState[]; + errors: unknown[]; + }> { + throw new Error("Method not implemented."); + } + getLbeV2Factory( + baseAsset: Asset, + raiseAsset: Asset, + ): Promise { + throw new Error("Method not implemented."); + } + getLbeV2HeadAndTailFactory(lbeId: string): Promise<{ + head: LbeV2Types.FactoryState; + tail: LbeV2Types.FactoryState; + } | null> { + throw new Error("Method not implemented."); + } + getAllLbeV2Treasuries(): Promise<{ + treasuries: LbeV2Types.TreasuryState[]; + errors: unknown[]; + }> { + throw new Error("Method not implemented."); + } + getLbeV2TreasuryByLbeId( + lbeId: string, + ): Promise { + throw new Error("Method not implemented."); + } + getAllLbeV2Managers(): Promise<{ + managers: LbeV2Types.ManagerState[]; + errors: unknown[]; + }> { + throw new Error("Method not implemented."); + } + getLbeV2ManagerByLbeId( + lbeId: string, + ): Promise { + throw new Error("Method not implemented."); + } + getAllLbeV2Sellers(): Promise<{ + sellers: LbeV2Types.SellerState[]; + errors: unknown[]; + }> { + throw new Error("Method not implemented."); + } + getLbeV2SellerByLbeId(lbeId: string): Promise { + throw new Error("Method not implemented."); + } + getAllLbeV2Orders(): Promise<{ + orders: LbeV2Types.OrderState[]; + errors: unknown[]; + }> { + throw new Error("Method not implemented."); + } + getLbeV2OrdersByLbeId(lbeId: string): Promise { + throw new Error("Method not implemented."); + } + getLbeV2OrdersByLbeIdAndOwner( + lbeId: string, + owner: Address, + ): Promise { + throw new Error("Method not implemented."); + } +} diff --git a/src/dex-v2.ts b/src/dex-v2.ts index a94f05c..41bad36 100644 --- a/src/dex-v2.ts +++ b/src/dex-v2.ts @@ -15,7 +15,6 @@ import invariant from "@minswap/tiny-invariant"; import { Asset, - BlockfrostAdapter, compareUtxo, DexV2Calculation, DexV2Constant, @@ -24,6 +23,7 @@ import { OrderV2, PoolV2, } from "."; +import { BlockfrostAdapter } from "./adapters/blockfrost"; import { BatcherFee } from "./batcher-fee-reduction/calculate"; import { DexVersion } from "./batcher-fee-reduction/configs.internal"; import { FactoryV2 } from "./types/factory"; @@ -229,11 +229,11 @@ export class DexV2 { const factory = await this.adapter.getFactoryV2ByPair( sortedAssetA, - sortedAssetB + sortedAssetB, ); invariant( factory, - `cannot find available Factory V2 Utxo, the liquidity pool might be created before` + `cannot find available Factory V2 Utxo, the liquidity pool might be created before`, ); const initialLiquidity = DexV2Calculation.calculateInitialLiquidity({ @@ -248,11 +248,11 @@ export class DexV2 { tokenName: lpAssetName, }; const poolBatchingStakeCredential = this.lucid.utils.getAddressDetails( - config.poolBatchingAddress + config.poolBatchingAddress, )?.stakeCredential; invariant( poolBatchingStakeCredential, - `cannot parse Liquidity Pool batching address` + `cannot parse Liquidity Pool batching address`, ); const poolDatum: PoolV2.Datum = { poolBatchingStakeCredential: poolBatchingStakeCredential, @@ -292,13 +292,13 @@ export class DexV2 { ]); invariant( factoryRefs.length === 1, - "cannot find deployed script for Factory Validator" + "cannot find deployed script for Factory Validator", ); const factoryRef = factoryRefs[0]; const authenRefs = await this.lucid.utxosByOutRef([deployedScripts.authen]); invariant( authenRefs.length === 1, - "cannot find deployed script for Authen Minting Policy" + "cannot find deployed script for Authen Minting Policy", ); const authenRef = authenRefs[0]; const factoryUtxos = await this.lucid.utxosByOutRef([ @@ -329,14 +329,14 @@ export class DexV2 { .readFrom([factoryRef, authenRef]) .collectFrom( [factoryUtxo], - Data.to(FactoryV2.Redeemer.toPlutusData(factoryRedeemer)) + Data.to(FactoryV2.Redeemer.toPlutusData(factoryRedeemer)), ) .payToContract( config.poolCreationAddress, { inline: Data.to(PoolV2.Datum.toPlutusData(poolDatum)), }, - poolValue + poolValue, ) .payToContract( config.factoryAddress, @@ -345,7 +345,7 @@ export class DexV2 { }, { [config.factoryAsset]: 1n, - } + }, ) .payToContract( config.factoryAddress, @@ -354,7 +354,7 @@ export class DexV2 { }, { [config.factoryAsset]: 1n, - } + }, ) .mintAssets( { @@ -362,7 +362,7 @@ export class DexV2 { [config.factoryAsset]: 1n, [config.poolAuthenAsset]: 1n, }, - Data.to(new Constr(1, [])) + Data.to(new Constr(1, [])), ) .attachMetadata(674, { msg: [MetadataMessage.CREATE_POOL] }) .complete(); @@ -375,11 +375,11 @@ export class DexV2 { const { assetA, assetB, amountA, amountB, minimumLPReceived } = options; invariant( amountA >= 0n && amountB >= 0n && amountA + amountB > 0n, - "amount must be positive" + "amount must be positive", ); invariant( minimumLPReceived > 0n, - "minimum LP received must be positive" + "minimum LP received must be positive", ); orderAssets[Asset.toString(assetA)] = amountA; orderAssets[Asset.toString(assetB)] = amountB; @@ -395,7 +395,7 @@ export class DexV2 { invariant(lpAmount > 0n, "LP amount must be positive"); invariant( minimumAssetAReceived > 0n && minimumAssetBReceived > 0n, - "minimum asset received must be positive" + "minimum asset received must be positive", ); orderAssets[Asset.toString(lpAsset)] = lpAmount; break; @@ -444,7 +444,7 @@ export class DexV2 { invariant( expectedInOutRatioNumerator > 0n && expectedInOutRatioDenominator > 0n, - "expected input and output ratio must be positive" + "expected input and output ratio must be positive", ); orderAssets[Asset.toString(assetIn)] = amountIn; break; @@ -455,7 +455,7 @@ export class DexV2 { invariant(lpAmount > 0n, "LP amount must be positive"); invariant( ratioAssetA > 0n && ratioAssetB > 0n && minimumAssetA > 0n, - "minimum asset and ratio received must be positive" + "minimum asset and ratio received must be positive", ); orderAssets[Asset.toString(lpAsset)] = lpAmount; break; @@ -481,11 +481,11 @@ export class DexV2 { const { amountA, amountB, minimumLPReceived, killOnFailed } = options; invariant( amountA >= 0n && amountB >= 0n && amountA + amountB > 0n, - "amount must be positive" + "amount must be positive", ); invariant( minimumLPReceived > 0n, - "minimum LP received must be positive" + "minimum LP received must be positive", ); const orderStep: OrderV2.Step = { type: OrderV2.StepType.DEPOSIT, @@ -511,7 +511,7 @@ export class DexV2 { invariant(lpAmount > 0n, "LP amount must be positive"); invariant( minimumAssetAReceived > 0n && minimumAssetBReceived > 0n, - "minimum asset received must be positive" + "minimum asset received must be positive", ); const orderStep: OrderV2.Step = { type: OrderV2.StepType.WITHDRAW, @@ -628,7 +628,7 @@ export class DexV2 { invariant( expectedInOutRatioNumerator > 0n && expectedInOutRatioDenominator > 0n, - "expected input and output ratio must be positive" + "expected input and output ratio must be positive", ); const orderStep: OrderV2.Step = { type: OrderV2.StepType.PARTIAL_SWAP, @@ -653,7 +653,7 @@ export class DexV2 { invariant(lpAmount > 0n, "LP amount must be positive"); invariant( ratioAssetA > 0n && ratioAssetB > 0n && minimumAssetA > 0n, - "minimum asset and ratio received must be positive" + "minimum asset and ratio received must be positive", ); const orderStep: OrderV2.Step = { type: OrderV2.StepType.WITHDRAW_IMBALANCE, @@ -694,11 +694,11 @@ export class DexV2 { this.lucid.utils.getAddressDetails(orderAddress).paymentCredential; invariant( orderAddressPaymentCred, - "order address payment credentials not found" + "order address payment credentials not found", ); return this.lucid.utils.credentialToAddress( orderAddressPaymentCred, - senderAddressStakeCred + senderAddressStakeCred, ); } @@ -805,7 +805,7 @@ export class DexV2 { this.lucid.utils.getAddressDetails(sender).paymentCredential; invariant( senderPaymentCred, - "sender address payment credentials not found" + "sender address payment credentials not found", ); const canceller = authorizationMethodType @@ -841,7 +841,7 @@ export class DexV2 { }; } else { const datumHash = this.lucid.utils.datumToHash( - customSuccessReceiverDatum.datum + customSuccessReceiverDatum.datum, ); successReceiverDatum = { type: customSuccessReceiverDatum.type, @@ -858,7 +858,7 @@ export class DexV2 { }; } else { const datumHash = this.lucid.utils.datumToHash( - customRefundReceiverDatum.datum + customRefundReceiverDatum.datum, ); refundReceiverDatum = { type: customRefundReceiverDatum.type, @@ -895,7 +895,7 @@ export class DexV2 { { inline: Data.to(OrderV2.Datum.toPlutusData(orderDatum)), }, - orderAssets + orderAssets, ); } @@ -920,13 +920,13 @@ export class DexV2 { this.lucid, sender, necessaryExtraDatum.receiver, - necessaryExtraDatum.datum + necessaryExtraDatum.datum, ); if (utxoForStoringDatum) { lucidTx.payToAddressWithData( utxoForStoringDatum.address, utxoForStoringDatum.outputData, - utxoForStoringDatum.assets + utxoForStoringDatum.assets, ); } } @@ -947,7 +947,7 @@ export class DexV2 { ]); invariant( orderRefs.length === 1, - "cannot find deployed script for V2 Order" + "cannot find deployed script for V2 Order", ); const orderRef = orderRefs[0]; @@ -960,24 +960,24 @@ export class DexV2 { orderScriptPaymentCred?.type === "Script" && orderScriptPaymentCred.hash === DexV2Constant.CONFIG[this.networkId].orderScriptHash, - `Utxo is not belonged Minswap's order address, utxo: ${utxo.txHash}` + `Utxo is not belonged Minswap's order address, utxo: ${utxo.txHash}`, ); let datum: OrderV2.Datum; if (utxo.datum) { const rawDatum = utxo.datum; datum = OrderV2.Datum.fromPlutusData( this.networkId, - Data.from(rawDatum) + Data.from(rawDatum), ); } else if (utxo.datumHash) { const rawDatum = await this.lucid.datumOf(utxo); datum = OrderV2.Datum.fromPlutusData( this.networkId, - rawDatum as Constr + rawDatum as Constr, ); } else { throw new Error( - "Utxo without Datum Hash or Inline Datum can not be spent" + "Utxo without Datum Hash or Inline Datum can not be spent", ); } @@ -985,7 +985,7 @@ export class DexV2 { requiredPubKeyHashSet.add(datum.canceller.hash); } const redeemer = Data.to( - new Constr(OrderV2.Redeemer.CANCEL_ORDER_BY_OWNER, []) + new Constr(OrderV2.Redeemer.CANCEL_ORDER_BY_OWNER, []), ); lucidTx.collectFrom(orderUtxos, redeemer); @@ -1013,14 +1013,14 @@ export class DexV2 { const currentTime = this.lucid.utils.slotToUnixTime(currentSlot); invariant( refScript.length === 2, - "cannot find deployed script for V2 Order or Expired Order Cancellation" + "cannot find deployed script for V2 Order or Expired Order Cancellation", ); const sortedOrderUtxos = [...orderUtxos].sort(compareUtxo); const lucidTx = this.lucid.newTx().readFrom(refScript); lucidTx.collectFrom( sortedOrderUtxos, - Data.to(new Constr(OrderV2.Redeemer.CANCEL_EXPIRED_ORDER_BY_ANYONE, [])) + Data.to(new Constr(OrderV2.Redeemer.CANCEL_EXPIRED_ORDER_BY_ANYONE, [])), ); for (const orderUtxo of sortedOrderUtxos) { const orderAddr = orderUtxo.address; @@ -1030,35 +1030,35 @@ export class DexV2 { orderScriptPaymentCred?.type === "Script" && orderScriptPaymentCred.hash === DexV2Constant.CONFIG[this.networkId].orderScriptHash, - `Utxo is not belonged Minswap's order address, utxo: ${orderUtxo.txHash}` + `Utxo is not belonged Minswap's order address, utxo: ${orderUtxo.txHash}`, ); let datum: OrderV2.Datum; if (orderUtxo.datum) { const rawDatum = orderUtxo.datum; datum = OrderV2.Datum.fromPlutusData( this.networkId, - Data.from(rawDatum) + Data.from(rawDatum), ); } else if (orderUtxo.datumHash) { const rawDatum = await this.lucid.datumOf(orderUtxo); datum = OrderV2.Datum.fromPlutusData( this.networkId, - rawDatum as Constr + rawDatum as Constr, ); } else { throw new Error( - "Utxo without Datum Hash or Inline Datum can not be spent" + "Utxo without Datum Hash or Inline Datum can not be spent", ); } const expiryOptions = datum.expiredOptions; invariant(expiryOptions !== undefined, "Order must have expiry options"); invariant( expiryOptions.maxCancellationTip >= DexV2Constant.DEFAULT_CANCEL_TIPS, - "Cancel tip is too low" + "Cancel tip is too low", ); invariant( expiryOptions.expiredTime < BigInt(currentTime), - "Order is not expired" + "Order is not expired", ); const refundDatum = datum.refundReceiverDatum; const outAssets = { ...orderUtxo.assets }; @@ -1074,19 +1074,19 @@ export class DexV2 { refundDatum.hash in extraDatumMap ? { asHash: extraDatumMap[refundDatum.hash] } : { hash: refundDatum.hash }, - outAssets + outAssets, ); break; } case OrderV2.ExtraDatumType.INLINE_DATUM: { invariant( refundDatum.hash in extraDatumMap, - `Can not find refund datum of order ${orderUtxo.txHash}#${orderUtxo.outputIndex}` + `Can not find refund datum of order ${orderUtxo.txHash}#${orderUtxo.outputIndex}`, ); lucidTx.payToAddressWithData( datum.refundReceiver, { inline: extraDatumMap[refundDatum.hash] }, - outAssets + outAssets, ); break; } @@ -1096,7 +1096,7 @@ export class DexV2 { .withdraw( DexV2Constant.CONFIG[this.networkId].expiredOrderCancelAddress, 0n, - Data.to(0n) + Data.to(0n), ) .validFrom(currentTime) .validTo(currentTime + 3 * 60 * 60 * 1000) diff --git a/src/index.ts b/src/index.ts index f975a77..6c1aaf4 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,4 +1,4 @@ -export * from "./adapter"; +export * from "./adapters/adapter"; export * from "./calculate"; export * from "./dex"; export * from "./dex-v2"; From 1945e21c2dab0268978f9fabc2d9a05de000999d Mon Sep 17 00:00:00 2001 From: Vardominator Date: Wed, 11 Dec 2024 20:45:14 +0000 Subject: [PATCH 02/22] ignore --- .gitignore | 2 + package-lock.json | 8142 --------------------------------------------- 2 files changed, 2 insertions(+), 8142 deletions(-) delete mode 100644 package-lock.json diff --git a/.gitignore b/.gitignore index 2de0fae..d62e772 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,5 @@ build build-tsc coverage .idea + +package-lock.json \ No newline at end of file diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index f88b7bd..0000000 --- a/package-lock.json +++ /dev/null @@ -1,8142 +0,0 @@ -{ - "name": "@minswap/sdk", - "version": "0.3.4", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "@minswap/sdk", - "version": "0.3.4", - "hasInstallScript": true, - "license": "MIT", - "dependencies": { - "@blockfrost/blockfrost-js": "^5.5.0", - "@cardano-ogmios/client": "^6.5.0", - "@cardano-ogmios/schema": "^6.5.0", - "@minswap/lucid-cardano": "0.10.10-minswap.4", - "@minswap/tiny-invariant": "^1.2.0", - "big.js": "^6.2.1", - "bignumber.js": "^9.1.2", - "exponential-backoff": "^3.1.1", - "ioredis": "^5.4.1", - "remeda": "^2.12.1", - "sha3": "^2.1.4" - }, - "devDependencies": { - "@eslint/compat": "^1.1.1", - "@eslint/js": "^9.9.1", - "@jest/globals": "^29.7.0", - "@prisma/client": "^6.0.1", - "@types/big.js": "^6.2.2", - "@types/eslint__js": "^8.42.3", - "@types/jest": "^29.5.12", - "@types/json-bigint": "^1.0.4", - "@types/node": "^20.9.2", - "esbuild": "^0.23.1", - "eslint": "^9.9.1", - "eslint-plugin-simple-import-sort": "^12.1.1", - "eslint-plugin-unicorn": "^55.0.0", - "eslint-plugin-unused-imports": "^4.1.3", - "jest": "^29.7.0", - "json-bigint": "^1.0.0", - "prettier": "3.3.3", - "prisma": "^6.0.1", - "rimraf": "^6.0.1", - "rollup": "^4.21.2", - "rollup-plugin-dts": "^6.1.1", - "rollup-plugin-esbuild": "^6.1.1", - "ts-jest": "^29.2.5", - "ts-node": "^10.9.2", - "tsx": "^4.19.2", - "typescript": "^5.5.4", - "typescript-eslint": "^8.4.0" - }, - "engines": { - "node": ">=20.17 <21" - }, - "optionalDependencies": { - "@rollup/rollup-linux-x64-gnu": "4.21.2" - } - }, - "node_modules/@ampproject/remapping": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", - "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.24" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@babel/code-frame": { - "version": "7.26.2", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.26.2.tgz", - "integrity": "sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-validator-identifier": "^7.25.9", - "js-tokens": "^4.0.0", - "picocolors": "^1.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/compat-data": { - "version": "7.26.3", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.26.3.tgz", - "integrity": "sha512-nHIxvKPniQXpmQLb0vhY3VaFb3S0YrTAwpOWJZh1wn3oJPjJk9Asva204PsBdmAE8vpzfHudT8DB0scYvy9q0g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/core": { - "version": "7.26.0", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.26.0.tgz", - "integrity": "sha512-i1SLeK+DzNnQ3LL/CswPCa/E5u4lh1k6IAEphON8F+cXt0t9euTshDru0q7/IqMa1PMPz5RnHuHscF8/ZJsStg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@ampproject/remapping": "^2.2.0", - "@babel/code-frame": "^7.26.0", - "@babel/generator": "^7.26.0", - "@babel/helper-compilation-targets": "^7.25.9", - "@babel/helper-module-transforms": "^7.26.0", - "@babel/helpers": "^7.26.0", - "@babel/parser": "^7.26.0", - "@babel/template": "^7.25.9", - "@babel/traverse": "^7.25.9", - "@babel/types": "^7.26.0", - "convert-source-map": "^2.0.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.2", - "json5": "^2.2.3", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/babel" - } - }, - "node_modules/@babel/core/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/@babel/generator": { - "version": "7.26.3", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.26.3.tgz", - "integrity": "sha512-6FF/urZvD0sTeO7k6/B15pMLC4CHUv1426lzr3N01aHJTl046uCAh9LXW/fzeXXjPNCJ6iABW5XaWOsIZB93aQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/parser": "^7.26.3", - "@babel/types": "^7.26.3", - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.25", - "jsesc": "^3.0.2" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-compilation-targets": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.25.9.tgz", - "integrity": "sha512-j9Db8Suy6yV/VHa4qzrj9yZfZxhLWQdVnRlXxmKLYlhWUVB1sB2G5sxuWYXk/whHD9iW76PmNzxZ4UCnTQTVEQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/compat-data": "^7.25.9", - "@babel/helper-validator-option": "^7.25.9", - "browserslist": "^4.24.0", - "lru-cache": "^5.1.1", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-compilation-targets/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/@babel/helper-module-imports": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.25.9.tgz", - "integrity": "sha512-tnUA4RsrmflIM6W6RFTLFSXITtl0wKjgpnLgXyowocVPrbYrLUXSBXDgTs8BlbmIzIdlBySRQjINYs2BAkiLtw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/traverse": "^7.25.9", - "@babel/types": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-module-transforms": { - "version": "7.26.0", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.26.0.tgz", - "integrity": "sha512-xO+xu6B5K2czEnQye6BHA7DolFFmS3LB7stHZFaOLb1pAwO1HWLS8fXA+eh0A2yIvltPVmx3eNNDBJA2SLHXFw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-module-imports": "^7.25.9", - "@babel/helper-validator-identifier": "^7.25.9", - "@babel/traverse": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/helper-plugin-utils": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.25.9.tgz", - "integrity": "sha512-kSMlyUVdWe25rEsRGviIgOWnoT/nfABVWlqt9N19/dIPWViAOW2s9wznP5tURbs/IDuNk4gPy3YdYRgH3uxhBw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-string-parser": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.25.9.tgz", - "integrity": "sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-validator-identifier": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz", - "integrity": "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-validator-option": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.25.9.tgz", - "integrity": "sha512-e/zv1co8pp55dNdEcCynfj9X7nyUKUXoUEwfXqaZt0omVOmDe9oOTdKStH4GmAw6zxMFs50ZayuMfHDKlO7Tfw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helpers": { - "version": "7.26.0", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.26.0.tgz", - "integrity": "sha512-tbhNuIxNcVb21pInl3ZSjksLCvgdZy9KwJ8brv993QtIVKJBBkYXz4q4ZbAv31GdnC+R90np23L5FbEBlthAEw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/template": "^7.25.9", - "@babel/types": "^7.26.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/parser": { - "version": "7.26.3", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.3.tgz", - "integrity": "sha512-WJ/CvmY8Mea8iDXo6a7RK2wbmJITT5fN3BEkRuFlxVyNx8jOKIIhmC4fSkTcPcf8JyavbBwIe6OpiCOBXt/IcA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.26.3" - }, - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@babel/plugin-syntax-async-generators": { - "version": "7.8.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", - "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-bigint": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz", - "integrity": "sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-class-properties": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", - "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.12.13" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-class-static-block": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz", - "integrity": "sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-import-attributes": { - "version": "7.26.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.26.0.tgz", - "integrity": "sha512-e2dttdsJ1ZTpi3B9UYGLw41hifAubg19AtCu/2I/F1QNVclOBr1dYpTdmdyZ84Xiz43BS/tCUkMAZNLv12Pi+A==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-import-meta": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", - "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-json-strings": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", - "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-jsx": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.25.9.tgz", - "integrity": "sha512-ld6oezHQMZsZfp6pWtbjaNDF2tiiCYYDqQszHt5VV437lewP9aSi2Of99CK0D0XB21k7FLgnLcmQKyKzynfeAA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-logical-assignment-operators": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", - "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-nullish-coalescing-operator": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", - "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-numeric-separator": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", - "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-object-rest-spread": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", - "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-optional-catch-binding": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", - "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-optional-chaining": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", - "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-private-property-in-object": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz", - "integrity": "sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-top-level-await": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", - "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-typescript": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.25.9.tgz", - "integrity": "sha512-hjMgRy5hb8uJJjUcdWunWVcoi9bGpJp8p5Ol1229PoN6aytsLwNMgmdftO23wnCLMfVmTwZDWMPNq/D1SY60JQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/template": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.25.9.tgz", - "integrity": "sha512-9DGttpmPvIxBb/2uwpVo3dqJ+O6RooAFOS+lB+xDqoE2PVCE8nfoHMdZLpfCQRLwvohzXISPZcgxt80xLfsuwg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.25.9", - "@babel/parser": "^7.25.9", - "@babel/types": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/traverse": { - "version": "7.26.4", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.26.4.tgz", - "integrity": "sha512-fH+b7Y4p3yqvApJALCPJcwb0/XaOSgtK4pzV6WVjPR5GLFQBRI7pfoX2V2iM48NXvX07NUxxm1Vw98YjqTcU5w==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.26.2", - "@babel/generator": "^7.26.3", - "@babel/parser": "^7.26.3", - "@babel/template": "^7.25.9", - "@babel/types": "^7.26.3", - "debug": "^4.3.1", - "globals": "^11.1.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/traverse/node_modules/globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/types": { - "version": "7.26.3", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.3.tgz", - "integrity": "sha512-vN5p+1kl59GVKMvTHt55NzzmYVxprfJD+ql7U9NFIfKCBkYE55LYtS+WtPlaYOyzydrKI8Nezd+aZextrd+FMA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.25.9", - "@babel/helper-validator-identifier": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@bcoe/v8-coverage": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", - "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", - "dev": true, - "license": "MIT" - }, - "node_modules/@blockfrost/blockfrost-js": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@blockfrost/blockfrost-js/-/blockfrost-js-5.7.0.tgz", - "integrity": "sha512-Rzw+Ya+LlKJNv9k5g7xW0uM33Xf6Lt3MXANtuwtm7+R9xuMFc7iKocwHSgrGUTTZ1EKou4n4Znai18MdvqG2bw==", - "license": "Apache-2.0", - "dependencies": { - "@blockfrost/openapi": "0.1.70-beta.0", - "@emurgo/cardano-serialization-lib-nodejs": "^11.5.0", - "@emurgo/cip14-js": "3.0.1", - "bottleneck": "^2.19.5", - "form-data": "^4.0.0", - "got": "^11.8.6", - "json-bigint": "^1.0.0" - }, - "engines": { - "node": ">=16" - } - }, - "node_modules/@blockfrost/openapi": { - "version": "0.1.70-beta.0", - "resolved": "https://registry.npmjs.org/@blockfrost/openapi/-/openapi-0.1.70-beta.0.tgz", - "integrity": "sha512-js+ZpOWJHRHE+C1bVTDRen/MKVuaA8Bygjlil8O55bN3MzWfwQ0jzzZCYOAHhkbgEwE+j6ziCbP2+1xwFmtR+Q==", - "dependencies": { - "ajv": "^8.12.0", - "cbor": "^9.0.1", - "rimraf": "6.0.1", - "yaml": "^2.3.4" - }, - "engines": { - "node": ">=20" - } - }, - "node_modules/@cardano-ogmios/client": { - "version": "6.9.0", - "resolved": "https://registry.npmjs.org/@cardano-ogmios/client/-/client-6.9.0.tgz", - "integrity": "sha512-IsoUVsaMXiYyhWrdVKYOA5PDlX0EZ2gaq4lfk4JelRw6mcWVxemUrMaU2ndvugO9LQ3SCM1nESPgMIU0xe5FWw==", - "license": "MPL-2.0", - "dependencies": { - "@cardano-ogmios/schema": "6.9.0", - "@cardanosolutions/json-bigint": "^1.0.1", - "@types/json-bigint": "^1.0.1", - "bech32": "^2.0.0", - "cross-fetch": "^3.1.4", - "fastq": "^1.11.0", - "isomorphic-ws": "^4.0.1", - "nanoid": "^3.1.31", - "ts-custom-error": "^3.2.0", - "ws": "^7.5.10" - }, - "engines": { - "node": ">=14" - } - }, - "node_modules/@cardano-ogmios/schema": { - "version": "6.9.0", - "resolved": "https://registry.npmjs.org/@cardano-ogmios/schema/-/schema-6.9.0.tgz", - "integrity": "sha512-e7QVLF+dQMIv9p+p5CWQjMfBmkERYRa2wK2AjyehQZCJnecZ0gvTbRqewdX5VW4mVXf6KUfFyphsxWK46Pg6LA==", - "license": "MPL-2.0", - "engines": { - "node": ">=14" - } - }, - "node_modules/@cardanosolutions/json-bigint": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@cardanosolutions/json-bigint/-/json-bigint-1.0.1.tgz", - "integrity": "sha512-mbYL6jtHqMFCZnTFhmkmoeDzHMBino0gMiGQnOJE7CwzZzkK2HCpH0MTBk+84QDadMEGX7iFt7uB+levm1a+bQ==", - "license": "MIT", - "dependencies": { - "bignumber.js": "^9.0.0" - } - }, - "node_modules/@cspotcode/source-map-support": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", - "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/trace-mapping": "0.3.9" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/@cspotcode/source-map-support/node_modules/@jridgewell/trace-mapping": { - "version": "0.3.9", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", - "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/resolve-uri": "^3.0.3", - "@jridgewell/sourcemap-codec": "^1.4.10" - } - }, - "node_modules/@emurgo/cardano-serialization-lib-nodejs": { - "version": "11.5.0", - "resolved": "https://registry.npmjs.org/@emurgo/cardano-serialization-lib-nodejs/-/cardano-serialization-lib-nodejs-11.5.0.tgz", - "integrity": "sha512-IlVABlRgo9XaTR1NunwZpWcxnfEv04ba2l1vkUz4S1W7Jt36F4CtffP+jPeqBZGnAe+fnUwo0XjIJC3ZTNToNQ==", - "license": "MIT" - }, - "node_modules/@emurgo/cip14-js": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@emurgo/cip14-js/-/cip14-js-3.0.1.tgz", - "integrity": "sha512-u0XobeajNSlmeGBmY3ntA+NE/Vns7hKP0xrFzWyAO7YubETOifTjUddJN4gpvXE4S08DPUcNBVe3sx1m5GPIOg==", - "license": "Apache-2.0 OR MIT", - "dependencies": { - "bech32": "2.0.0", - "blake2b": "2.1.3" - } - }, - "node_modules/@esbuild/aix-ppc64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.23.1.tgz", - "integrity": "sha512-6VhYk1diRqrhBAqpJEdjASR/+WVRtfjpqKuNw11cLiaWpAT/Uu+nokB+UJnevzy/P9C/ty6AOe0dwueMrGh/iQ==", - "cpu": [ - "ppc64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "aix" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/android-arm": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.23.1.tgz", - "integrity": "sha512-uz6/tEy2IFm9RYOyvKl88zdzZfwEfKZmnX9Cj1BHjeSGNuGLuMD1kR8y5bteYmwqKm1tj8m4cb/aKEorr6fHWQ==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/android-arm64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.23.1.tgz", - "integrity": "sha512-xw50ipykXcLstLeWH7WRdQuysJqejuAGPd30vd1i5zSyKK3WE+ijzHmLKxdiCMtH1pHz78rOg0BKSYOSB/2Khw==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/android-x64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.23.1.tgz", - "integrity": "sha512-nlN9B69St9BwUoB+jkyU090bru8L0NA3yFvAd7k8dNsVH8bi9a8cUAUSEcEEgTp2z3dbEDGJGfP6VUnkQnlReg==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/darwin-arm64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.23.1.tgz", - "integrity": "sha512-YsS2e3Wtgnw7Wq53XXBLcV6JhRsEq8hkfg91ESVadIrzr9wO6jJDMZnCQbHm1Guc5t/CdDiFSSfWP58FNuvT3Q==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/darwin-x64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.23.1.tgz", - "integrity": "sha512-aClqdgTDVPSEGgoCS8QDG37Gu8yc9lTHNAQlsztQ6ENetKEO//b8y31MMu2ZaPbn4kVsIABzVLXYLhCGekGDqw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/freebsd-arm64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.23.1.tgz", - "integrity": "sha512-h1k6yS8/pN/NHlMl5+v4XPfikhJulk4G+tKGFIOwURBSFzE8bixw1ebjluLOjfwtLqY0kewfjLSrO6tN2MgIhA==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/freebsd-x64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.23.1.tgz", - "integrity": "sha512-lK1eJeyk1ZX8UklqFd/3A60UuZ/6UVfGT2LuGo3Wp4/z7eRTRYY+0xOu2kpClP+vMTi9wKOfXi2vjUpO1Ro76g==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-arm": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.23.1.tgz", - "integrity": "sha512-CXXkzgn+dXAPs3WBwE+Kvnrf4WECwBdfjfeYHpMeVxWE0EceB6vhWGShs6wi0IYEqMSIzdOF1XjQ/Mkm5d7ZdQ==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-arm64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.23.1.tgz", - "integrity": "sha512-/93bf2yxencYDnItMYV/v116zff6UyTjo4EtEQjUBeGiVpMmffDNUyD9UN2zV+V3LRV3/on4xdZ26NKzn6754g==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-ia32": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.23.1.tgz", - "integrity": "sha512-VTN4EuOHwXEkXzX5nTvVY4s7E/Krz7COC8xkftbbKRYAl96vPiUssGkeMELQMOnLOJ8k3BY1+ZY52tttZnHcXQ==", - "cpu": [ - "ia32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-loong64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.23.1.tgz", - "integrity": "sha512-Vx09LzEoBa5zDnieH8LSMRToj7ir/Jeq0Gu6qJ/1GcBq9GkfoEAoXvLiW1U9J1qE/Y/Oyaq33w5p2ZWrNNHNEw==", - "cpu": [ - "loong64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-mips64el": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.23.1.tgz", - "integrity": "sha512-nrFzzMQ7W4WRLNUOU5dlWAqa6yVeI0P78WKGUo7lg2HShq/yx+UYkeNSE0SSfSure0SqgnsxPvmAUu/vu0E+3Q==", - "cpu": [ - "mips64el" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-ppc64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.23.1.tgz", - "integrity": "sha512-dKN8fgVqd0vUIjxuJI6P/9SSSe/mB9rvA98CSH2sJnlZ/OCZWO1DJvxj8jvKTfYUdGfcq2dDxoKaC6bHuTlgcw==", - "cpu": [ - "ppc64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-riscv64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.23.1.tgz", - "integrity": "sha512-5AV4Pzp80fhHL83JM6LoA6pTQVWgB1HovMBsLQ9OZWLDqVY8MVobBXNSmAJi//Csh6tcY7e7Lny2Hg1tElMjIA==", - "cpu": [ - "riscv64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-s390x": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.23.1.tgz", - "integrity": "sha512-9ygs73tuFCe6f6m/Tb+9LtYxWR4c9yg7zjt2cYkjDbDpV/xVn+68cQxMXCjUpYwEkze2RcU/rMnfIXNRFmSoDw==", - "cpu": [ - "s390x" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-x64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.23.1.tgz", - "integrity": "sha512-EV6+ovTsEXCPAp58g2dD68LxoP/wK5pRvgy0J/HxPGB009omFPv3Yet0HiaqvrIrgPTBuC6wCH1LTOY91EO5hQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/netbsd-x64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.23.1.tgz", - "integrity": "sha512-aevEkCNu7KlPRpYLjwmdcuNz6bDFiE7Z8XC4CPqExjTvrHugh28QzUXVOZtiYghciKUacNktqxdpymplil1beA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "netbsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/openbsd-arm64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.23.1.tgz", - "integrity": "sha512-3x37szhLexNA4bXhLrCC/LImN/YtWis6WXr1VESlfVtVeoFJBRINPJ3f0a/6LV8zpikqoUg4hyXw0sFBt5Cr+Q==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/openbsd-x64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.23.1.tgz", - "integrity": "sha512-aY2gMmKmPhxfU+0EdnN+XNtGbjfQgwZj43k8G3fyrDM/UdZww6xrWxmDkuz2eCZchqVeABjV5BpildOrUbBTqA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/sunos-x64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.23.1.tgz", - "integrity": "sha512-RBRT2gqEl0IKQABT4XTj78tpk9v7ehp+mazn2HbUeZl1YMdaGAQqhapjGTCe7uw7y0frDi4gS0uHzhvpFuI1sA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "sunos" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/win32-arm64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.23.1.tgz", - "integrity": "sha512-4O+gPR5rEBe2FpKOVyiJ7wNDPA8nGzDuJ6gN4okSA1gEOYZ67N8JPk58tkWtdtPeLz7lBnY6I5L3jdsr3S+A6A==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/win32-ia32": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.23.1.tgz", - "integrity": "sha512-BcaL0Vn6QwCwre3Y717nVHZbAa4UBEigzFm6VdsVdT/MbZ38xoj1X9HPkZhbmaBGUD1W8vxAfffbDe8bA6AKnQ==", - "cpu": [ - "ia32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/win32-x64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.23.1.tgz", - "integrity": "sha512-BHpFFeslkWrXWyUPnbKm+xYYVYruCinGcftSBaa8zoF9hZO4BcSCFUvHVTtzpIY6YzUnYtuEhZ+C9iEXjxnasg==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=18" - } - }, - "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==", - "dev": true, - "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==", - "dev": true, - "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==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.0.0 || ^14.0.0 || >=16.0.0" - } - }, - "node_modules/@eslint/compat": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/@eslint/compat/-/compat-1.2.4.tgz", - "integrity": "sha512-S8ZdQj/N69YAtuqFt7653jwcvuUj131+6qGLUyDqfDg1OIoBQ66OCuXC473YQfO2AaxITTutiRQiDwoo7ZLYyg==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "peerDependencies": { - "eslint": "^9.10.0" - }, - "peerDependenciesMeta": { - "eslint": { - "optional": true - } - } - }, - "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==", - "dev": true, - "license": "Apache-2.0", - "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.9.1", - "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.9.1.tgz", - "integrity": "sha512-GuUdqkyyzQI5RMIWkHhvTWLCyLo1jNK3vzkSyaExH5kHPDHcuL2VOpHjmMY+y3+NC69qAKToBqldTBgYeLSr9Q==", - "dev": true, - "license": "Apache-2.0", - "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==", - "dev": true, - "license": "MIT", - "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/eslintrc/node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "license": "MIT", - "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/@eslint/eslintrc/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==", - "dev": true, - "license": "MIT" - }, - "node_modules/@eslint/js": { - "version": "9.16.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.16.0.tgz", - "integrity": "sha512-tw2HxzQkrbeuvyj1tG2Yqq+0H9wGoI2IMk4EOsQeX+vmd75FtJAzf+gTA69WF+baUKRYQ3x2kbLE08js5OsTVg==", - "dev": true, - "license": "MIT", - "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==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, - "node_modules/@eslint/plugin-kit": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.2.4.tgz", - "integrity": "sha512-zSkKow6H5Kdm0ZUQUB2kV5JIXqoG0+uH5YADhaEHswm664N9Db8dXSi0nMJpacpMf+MyyglF1vnZohpEg5yUtg==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "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==", - "dev": true, - "license": "Apache-2.0", - "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==", - "dev": true, - "license": "Apache-2.0", - "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==", - "dev": true, - "license": "Apache-2.0", - "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==", - "dev": true, - "license": "Apache-2.0", - "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==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=18.18" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } - }, - "node_modules/@ioredis/commands": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@ioredis/commands/-/commands-1.2.0.tgz", - "integrity": "sha512-Sx1pU8EM64o2BrqNpEO1CNLtKQwyhuXuqyfH7oGKCk+1a33d2r5saW8zNwm3j6BTExtjrv2BxTgzzkMwts6vGg==", - "license": "MIT" - }, - "node_modules/@isaacs/cliui": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", - "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", - "license": "ISC", - "dependencies": { - "string-width": "^5.1.2", - "string-width-cjs": "npm:string-width@^4.2.0", - "strip-ansi": "^7.0.1", - "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", - "wrap-ansi": "^8.1.0", - "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/@isaacs/cliui/node_modules/ansi-regex": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", - "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/@isaacs/cliui/node_modules/ansi-styles": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", - "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/@isaacs/cliui/node_modules/emoji-regex": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", - "license": "MIT" - }, - "node_modules/@isaacs/cliui/node_modules/string-width": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", - "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", - "license": "MIT", - "dependencies": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@isaacs/cliui/node_modules/strip-ansi": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", - "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", - "license": "MIT", - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, - "node_modules/@isaacs/cliui/node_modules/wrap-ansi": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", - "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", - "license": "MIT", - "dependencies": { - "ansi-styles": "^6.1.0", - "string-width": "^5.0.1", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/@istanbuljs/load-nyc-config": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", - "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", - "dev": true, - "license": "ISC", - "dependencies": { - "camelcase": "^5.3.1", - "find-up": "^4.1.0", - "get-package-type": "^0.1.0", - "js-yaml": "^3.13.1", - "resolve-from": "^5.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "license": "MIT", - "dependencies": { - "sprintf-js": "~1.0.2" - } - }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/resolve-from": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/@istanbuljs/schema": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", - "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/@jest/console": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.7.0.tgz", - "integrity": "sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^29.6.3", - "@types/node": "*", - "chalk": "^4.0.0", - "jest-message-util": "^29.7.0", - "jest-util": "^29.7.0", - "slash": "^3.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/core": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.7.0.tgz", - "integrity": "sha512-n7aeXWKMnGtDA48y8TLWJPJmLmmZ642Ceo78cYWEpiD7FzDgmNDV/GCVRorPABdXLJZ/9wzzgZAlHjXjxDHGsg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/console": "^29.7.0", - "@jest/reporters": "^29.7.0", - "@jest/test-result": "^29.7.0", - "@jest/transform": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/node": "*", - "ansi-escapes": "^4.2.1", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "exit": "^0.1.2", - "graceful-fs": "^4.2.9", - "jest-changed-files": "^29.7.0", - "jest-config": "^29.7.0", - "jest-haste-map": "^29.7.0", - "jest-message-util": "^29.7.0", - "jest-regex-util": "^29.6.3", - "jest-resolve": "^29.7.0", - "jest-resolve-dependencies": "^29.7.0", - "jest-runner": "^29.7.0", - "jest-runtime": "^29.7.0", - "jest-snapshot": "^29.7.0", - "jest-util": "^29.7.0", - "jest-validate": "^29.7.0", - "jest-watcher": "^29.7.0", - "micromatch": "^4.0.4", - "pretty-format": "^29.7.0", - "slash": "^3.0.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } - } - }, - "node_modules/@jest/core/node_modules/ci-info": { - "version": "3.9.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz", - "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/sibiraj-s" - } - ], - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/@jest/environment": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.7.0.tgz", - "integrity": "sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/fake-timers": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/node": "*", - "jest-mock": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/expect": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.7.0.tgz", - "integrity": "sha512-8uMeAMycttpva3P1lBHB8VciS9V0XAr3GymPpipdyQXbBcuhkLQOSe8E/p92RyAdToS6ZD1tFkX+CkhoECE0dQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "expect": "^29.7.0", - "jest-snapshot": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/expect-utils": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.7.0.tgz", - "integrity": "sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA==", - "dev": true, - "license": "MIT", - "dependencies": { - "jest-get-type": "^29.6.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/fake-timers": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.7.0.tgz", - "integrity": "sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^29.6.3", - "@sinonjs/fake-timers": "^10.0.2", - "@types/node": "*", - "jest-message-util": "^29.7.0", - "jest-mock": "^29.7.0", - "jest-util": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/globals": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.7.0.tgz", - "integrity": "sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/environment": "^29.7.0", - "@jest/expect": "^29.7.0", - "@jest/types": "^29.6.3", - "jest-mock": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/reporters": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.7.0.tgz", - "integrity": "sha512-DApq0KJbJOEzAFYjHADNNxAE3KbhxQB1y5Kplb5Waqw6zVbuWatSnMjE5gs8FUgEPmNsnZA3NCWl9NG0ia04Pg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@bcoe/v8-coverage": "^0.2.3", - "@jest/console": "^29.7.0", - "@jest/test-result": "^29.7.0", - "@jest/transform": "^29.7.0", - "@jest/types": "^29.6.3", - "@jridgewell/trace-mapping": "^0.3.18", - "@types/node": "*", - "chalk": "^4.0.0", - "collect-v8-coverage": "^1.0.0", - "exit": "^0.1.2", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "istanbul-lib-coverage": "^3.0.0", - "istanbul-lib-instrument": "^6.0.0", - "istanbul-lib-report": "^3.0.0", - "istanbul-lib-source-maps": "^4.0.0", - "istanbul-reports": "^3.1.3", - "jest-message-util": "^29.7.0", - "jest-util": "^29.7.0", - "jest-worker": "^29.7.0", - "slash": "^3.0.0", - "string-length": "^4.0.1", - "strip-ansi": "^6.0.0", - "v8-to-istanbul": "^9.0.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } - } - }, - "node_modules/@jest/schemas": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", - "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@sinclair/typebox": "^0.27.8" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/source-map": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-29.6.3.tgz", - "integrity": "sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/trace-mapping": "^0.3.18", - "callsites": "^3.0.0", - "graceful-fs": "^4.2.9" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/test-result": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.7.0.tgz", - "integrity": "sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/console": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "collect-v8-coverage": "^1.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/test-sequencer": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.7.0.tgz", - "integrity": "sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/test-result": "^29.7.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.7.0", - "slash": "^3.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/transform": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.7.0.tgz", - "integrity": "sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/core": "^7.11.6", - "@jest/types": "^29.6.3", - "@jridgewell/trace-mapping": "^0.3.18", - "babel-plugin-istanbul": "^6.1.1", - "chalk": "^4.0.0", - "convert-source-map": "^2.0.0", - "fast-json-stable-stringify": "^2.1.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.7.0", - "jest-regex-util": "^29.6.3", - "jest-util": "^29.7.0", - "micromatch": "^4.0.4", - "pirates": "^4.0.4", - "slash": "^3.0.0", - "write-file-atomic": "^4.0.2" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/types": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.6.3.tgz", - "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/schemas": "^29.6.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.8", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.8.tgz", - "integrity": "sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/set-array": "^1.2.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.24" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", - "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/set-array": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", - "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", - "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.25", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", - "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/resolve-uri": "^3.1.0", - "@jridgewell/sourcemap-codec": "^1.4.14" - } - }, - "node_modules/@minswap/lucid-cardano": { - "version": "0.10.10-minswap.4", - "resolved": "https://registry.npmjs.org/@minswap/lucid-cardano/-/lucid-cardano-0.10.10-minswap.4.tgz", - "integrity": "sha512-LFBm2F4ZuLC4z5ktXwQQPeyi9l2P2ypBu/5ZZr+b/ievYw6lDnwhYk6ju0zxjXYk5FG3wlQjW4Qpwqsy0ZlsKA==", - "license": "MIT", - "dependencies": { - "@peculiar/webcrypto": "^1.4.0", - "node-fetch": "^3.2.3", - "ws": "^8.10.0" - }, - "engines": { - "node": ">=14" - } - }, - "node_modules/@minswap/lucid-cardano/node_modules/ws": { - "version": "8.18.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz", - "integrity": "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==", - "license": "MIT", - "engines": { - "node": ">=10.0.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": ">=5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } - } - }, - "node_modules/@minswap/tiny-invariant": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@minswap/tiny-invariant/-/tiny-invariant-1.2.0.tgz", - "integrity": "sha512-m4CMTsZ4MDB2WLND6rV0eti+f2WcMPhKvXf9ZHXlQMqvNmgoX1z//84FpEX0D1vVTPfJtNS8XIoIQ9pm6X590A==", - "license": "MIT" - }, - "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==", - "dev": true, - "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==", - "dev": true, - "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==", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@peculiar/asn1-schema": { - "version": "2.3.13", - "resolved": "https://registry.npmjs.org/@peculiar/asn1-schema/-/asn1-schema-2.3.13.tgz", - "integrity": "sha512-3Xq3a01WkHRZL8X04Zsfg//mGaA21xlL4tlVn4v2xGT0JStiztATRkMwa5b+f/HXmY2smsiLXYK46Gwgzvfg3g==", - "license": "MIT", - "dependencies": { - "asn1js": "^3.0.5", - "pvtsutils": "^1.3.5", - "tslib": "^2.6.2" - } - }, - "node_modules/@peculiar/json-schema": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/@peculiar/json-schema/-/json-schema-1.1.12.tgz", - "integrity": "sha512-coUfuoMeIB7B8/NMekxaDzLhaYmp0HZNPEjYRm9goRou8UZIC3z21s0sL9AWoCw4EG876QyO3kYrc61WNF9B/w==", - "license": "MIT", - "dependencies": { - "tslib": "^2.0.0" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/@peculiar/webcrypto": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@peculiar/webcrypto/-/webcrypto-1.5.0.tgz", - "integrity": "sha512-BRs5XUAwiyCDQMsVA9IDvDa7UBR9gAvPHgugOeGng3YN6vJ9JYonyDc0lNczErgtCWtucjR5N7VtaonboD/ezg==", - "license": "MIT", - "dependencies": { - "@peculiar/asn1-schema": "^2.3.8", - "@peculiar/json-schema": "^1.1.12", - "pvtsutils": "^1.3.5", - "tslib": "^2.6.2", - "webcrypto-core": "^1.8.0" - }, - "engines": { - "node": ">=10.12.0" - } - }, - "node_modules/@prisma/client": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/@prisma/client/-/client-6.0.1.tgz", - "integrity": "sha512-60w7kL6bUxz7M6Gs/V+OWMhwy94FshpngVmOY05TmGD0Lhk+Ac0ZgtjlL6Wll9TD4G03t4Sq1wZekNVy+Xdlbg==", - "dev": true, - "hasInstallScript": true, - "license": "Apache-2.0", - "engines": { - "node": ">=18.18" - }, - "peerDependencies": { - "prisma": "*" - }, - "peerDependenciesMeta": { - "prisma": { - "optional": true - } - } - }, - "node_modules/@prisma/debug": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/@prisma/debug/-/debug-6.0.1.tgz", - "integrity": "sha512-jQylgSOf7ibTVxqBacnAlVGvek6fQxJIYCQOeX2KexsfypNzXjJQSS2o5s+Mjj2Np93iSOQUaw6TvPj8syhG4w==", - "dev": true, - "license": "Apache-2.0" - }, - "node_modules/@prisma/engines": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/@prisma/engines/-/engines-6.0.1.tgz", - "integrity": "sha512-4hxzI+YQIR2uuDyVsDooFZGu5AtixbvM2psp+iayDZ4hRrAHo/YwgA17N23UWq7G6gRu18NvuNMb48qjP3DPQw==", - "dev": true, - "hasInstallScript": true, - "license": "Apache-2.0", - "dependencies": { - "@prisma/debug": "6.0.1", - "@prisma/engines-version": "5.23.0-27.5dbef10bdbfb579e07d35cc85fb1518d357cb99e", - "@prisma/fetch-engine": "6.0.1", - "@prisma/get-platform": "6.0.1" - } - }, - "node_modules/@prisma/engines-version": { - "version": "5.23.0-27.5dbef10bdbfb579e07d35cc85fb1518d357cb99e", - "resolved": "https://registry.npmjs.org/@prisma/engines-version/-/engines-version-5.23.0-27.5dbef10bdbfb579e07d35cc85fb1518d357cb99e.tgz", - "integrity": "sha512-JmIds0Q2/vsOmnuTJYxY4LE+sajqjYKhLtdOT6y4imojqv5d/aeVEfbBGC74t8Be1uSp0OP8lxIj2OqoKbLsfQ==", - "dev": true, - "license": "Apache-2.0" - }, - "node_modules/@prisma/fetch-engine": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/@prisma/fetch-engine/-/fetch-engine-6.0.1.tgz", - "integrity": "sha512-T36bWFVGeGYYSyYOj9d+O9G3sBC+pAyMC+jc45iSL63/Haq1GrYjQPgPMxrEj9m739taXrupoysRedQ+VyvM/Q==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@prisma/debug": "6.0.1", - "@prisma/engines-version": "5.23.0-27.5dbef10bdbfb579e07d35cc85fb1518d357cb99e", - "@prisma/get-platform": "6.0.1" - } - }, - "node_modules/@prisma/get-platform": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/@prisma/get-platform/-/get-platform-6.0.1.tgz", - "integrity": "sha512-zspC9vlxAqx4E6epMPMLLBMED2VD8axDe8sPnquZ8GOsn6tiacWK0oxrGK4UAHYzYUVuMVUApJbdXB2dFpLhvg==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@prisma/debug": "6.0.1" - } - }, - "node_modules/@rollup/pluginutils": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.1.3.tgz", - "integrity": "sha512-Pnsb6f32CD2W3uCaLZIzDmeFyQ2b8UWMFI7xtwUezpcGBDVDW6y9XgAWIlARiGAo6eNF5FK5aQTr0LFyNyqq5A==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/estree": "^1.0.0", - "estree-walker": "^2.0.2", - "picomatch": "^4.0.2" - }, - "engines": { - "node": ">=14.0.0" - }, - "peerDependencies": { - "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" - }, - "peerDependenciesMeta": { - "rollup": { - "optional": true - } - } - }, - "node_modules/@rollup/pluginutils/node_modules/picomatch": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz", - "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.28.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.28.1.tgz", - "integrity": "sha512-2aZp8AES04KI2dy3Ss6/MDjXbwBzj+i0GqKtWXgw2/Ma6E4jJvujryO6gJAghIRVz7Vwr9Gtl/8na3nDUKpraQ==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ] - }, - "node_modules/@rollup/rollup-android-arm64": { - "version": "4.28.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.28.1.tgz", - "integrity": "sha512-EbkK285O+1YMrg57xVA+Dp0tDBRB93/BZKph9XhMjezf6F4TpYjaUSuPt5J0fZXlSag0LmZAsTmdGGqPp4pQFA==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ] - }, - "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.28.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.28.1.tgz", - "integrity": "sha512-prduvrMKU6NzMq6nxzQw445zXgaDBbMQvmKSJaxpaZ5R1QDM8w+eGxo6Y/jhT/cLoCvnZI42oEqf9KQNYz1fqQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ] - }, - "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.28.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.28.1.tgz", - "integrity": "sha512-WsvbOunsUk0wccO/TV4o7IKgloJ942hVFK1CLatwv6TJspcCZb9umQkPdvB7FihmdxgaKR5JyxDjWpCOp4uZlQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ] - }, - "node_modules/@rollup/rollup-freebsd-arm64": { - "version": "4.28.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.28.1.tgz", - "integrity": "sha512-HTDPdY1caUcU4qK23FeeGxCdJF64cKkqajU0iBnTVxS8F7H/7BewvYoG+va1KPSL63kQ1PGNyiwKOfReavzvNA==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ] - }, - "node_modules/@rollup/rollup-freebsd-x64": { - "version": "4.28.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.28.1.tgz", - "integrity": "sha512-m/uYasxkUevcFTeRSM9TeLyPe2QDuqtjkeoTpP9SW0XxUWfcYrGDMkO/m2tTw+4NMAF9P2fU3Mw4ahNvo7QmsQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ] - }, - "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.28.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.28.1.tgz", - "integrity": "sha512-QAg11ZIt6mcmzpNE6JZBpKfJaKkqTm1A9+y9O+frdZJEuhQxiugM05gnCWiANHj4RmbgeVJpTdmKRmH/a+0QbA==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.28.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.28.1.tgz", - "integrity": "sha512-dRP9PEBfolq1dmMcFqbEPSd9VlRuVWEGSmbxVEfiq2cs2jlZAl0YNxFzAQS2OrQmsLBLAATDMb3Z6MFv5vOcXg==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.28.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.28.1.tgz", - "integrity": "sha512-uGr8khxO+CKT4XU8ZUH1TTEUtlktK6Kgtv0+6bIFSeiSlnGJHG1tSFSjm41uQ9sAO/5ULx9mWOz70jYLyv1QkA==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.28.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.28.1.tgz", - "integrity": "sha512-QF54q8MYGAqMLrX2t7tNpi01nvq5RI59UBNx+3+37zoKX5KViPo/gk2QLhsuqok05sSCRluj0D00LzCwBikb0A==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-loongarch64-gnu": { - "version": "4.28.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.28.1.tgz", - "integrity": "sha512-vPul4uodvWvLhRco2w0GcyZcdyBfpfDRgNKU+p35AWEbJ/HPs1tOUrkSueVbBS0RQHAf/A+nNtDpvw95PeVKOA==", - "cpu": [ - "loong64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { - "version": "4.28.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.28.1.tgz", - "integrity": "sha512-pTnTdBuC2+pt1Rmm2SV7JWRqzhYpEILML4PKODqLz+C7Ou2apEV52h19CR7es+u04KlqplggmN9sqZlekg3R1A==", - "cpu": [ - "ppc64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.28.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.28.1.tgz", - "integrity": "sha512-vWXy1Nfg7TPBSuAncfInmAI/WZDd5vOklyLJDdIRKABcZWojNDY0NJwruY2AcnCLnRJKSaBgf/GiJfauu8cQZA==", - "cpu": [ - "riscv64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.28.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.28.1.tgz", - "integrity": "sha512-/yqC2Y53oZjb0yz8PVuGOQQNOTwxcizudunl/tFs1aLvObTclTwZ0JhXF2XcPT/zuaymemCDSuuUPXJJyqeDOg==", - "cpu": [ - "s390x" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.21.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.21.2.tgz", - "integrity": "sha512-B90tYAUoLhU22olrafY3JQCFLnT3NglazdwkHyxNDYF/zAxJt5fJUB/yBoWFoIQ7SQj+KLe3iL4BhOMa9fzgpw==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.28.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.28.1.tgz", - "integrity": "sha512-xQTDVzSGiMlSshpJCtudbWyRfLaNiVPXt1WgdWTwWz9n0U12cI2ZVtWe/Jgwyv/6wjL7b66uu61Vg0POWVfz4g==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.28.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.28.1.tgz", - "integrity": "sha512-wSXmDRVupJstFP7elGMgv+2HqXelQhuNf+IS4V+nUpNVi/GUiBgDmfwD0UGN3pcAnWsgKG3I52wMOBnk1VHr/A==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.28.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.28.1.tgz", - "integrity": "sha512-ZkyTJ/9vkgrE/Rk9vhMXhf8l9D+eAhbAVbsGsXKy2ohmJaWg0LPQLnIxRdRp/bKyr8tXuPlXhIoGlEB5XpJnGA==", - "cpu": [ - "ia32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.28.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.28.1.tgz", - "integrity": "sha512-ZvK2jBafvttJjoIdKm/Q/Bh7IJ1Ose9IBOwpOXcOvW3ikGTQGmKDgxTC6oCAzW6PynbkKP8+um1du81XJHZ0JA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@sinclair/typebox": { - "version": "0.27.8", - "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", - "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==", - "dev": true, - "license": "MIT" - }, - "node_modules/@sindresorhus/is": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.6.0.tgz", - "integrity": "sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==", - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sindresorhus/is?sponsor=1" - } - }, - "node_modules/@sinonjs/commons": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.1.tgz", - "integrity": "sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "type-detect": "4.0.8" - } - }, - "node_modules/@sinonjs/fake-timers": { - "version": "10.3.0", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz", - "integrity": "sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "@sinonjs/commons": "^3.0.0" - } - }, - "node_modules/@szmarczak/http-timer": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-4.0.6.tgz", - "integrity": "sha512-4BAffykYOgO+5nzBWYwE3W90sBgLJoUPRWWcL8wlyiM8IB8ipJz3UMJ9KXQd1RKQXpKp8Tutn80HZtWsu2u76w==", - "license": "MIT", - "dependencies": { - "defer-to-connect": "^2.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/@tsconfig/node10": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.11.tgz", - "integrity": "sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==", - "dev": true, - "license": "MIT" - }, - "node_modules/@tsconfig/node12": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", - "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", - "dev": true, - "license": "MIT" - }, - "node_modules/@tsconfig/node14": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", - "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", - "dev": true, - "license": "MIT" - }, - "node_modules/@tsconfig/node16": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", - "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/babel__core": { - "version": "7.20.5", - "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", - "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/parser": "^7.20.7", - "@babel/types": "^7.20.7", - "@types/babel__generator": "*", - "@types/babel__template": "*", - "@types/babel__traverse": "*" - } - }, - "node_modules/@types/babel__generator": { - "version": "7.6.8", - "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.8.tgz", - "integrity": "sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.0.0" - } - }, - "node_modules/@types/babel__template": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz", - "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/parser": "^7.1.0", - "@babel/types": "^7.0.0" - } - }, - "node_modules/@types/babel__traverse": { - "version": "7.20.6", - "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.6.tgz", - "integrity": "sha512-r1bzfrm0tomOI8g1SzvCaQHo6Lcv6zu0EA+W2kHrt8dyrHQxGzBBL4kdkzIS+jBMV+EYcMAEAqXqYaLJq5rOZg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.20.7" - } - }, - "node_modules/@types/big.js": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/@types/big.js/-/big.js-6.2.2.tgz", - "integrity": "sha512-e2cOW9YlVzFY2iScnGBBkplKsrn2CsObHQ2Hiw4V1sSyiGbgWL8IyqE3zFi1Pt5o1pdAtYkDAIsF3KKUPjdzaA==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/cacheable-request": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/@types/cacheable-request/-/cacheable-request-6.0.3.tgz", - "integrity": "sha512-IQ3EbTzGxIigb1I3qPZc1rWJnH0BmSKv5QYTalEwweFvyBDLSAe24zP0le/hyi7ecGfZVlIVAg4BZqb8WBwKqw==", - "license": "MIT", - "dependencies": { - "@types/http-cache-semantics": "*", - "@types/keyv": "^3.1.4", - "@types/node": "*", - "@types/responselike": "^1.0.0" - } - }, - "node_modules/@types/eslint": { - "version": "9.6.1", - "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-9.6.1.tgz", - "integrity": "sha512-FXx2pKgId/WyYo2jXw63kk7/+TY7u7AziEJxJAnSFzHlqTAS3Ync6SvgYAN/k4/PQpnnVuzoMuVnByKK2qp0ag==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/estree": "*", - "@types/json-schema": "*" - } - }, - "node_modules/@types/eslint__js": { - "version": "8.42.3", - "resolved": "https://registry.npmjs.org/@types/eslint__js/-/eslint__js-8.42.3.tgz", - "integrity": "sha512-alfG737uhmPdnvkrLdZLcEKJ/B8s9Y4hrZ+YAdzUeoArBlSUERA2E87ROfOaS4jd/C45fzOoZzidLc1IPwLqOw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/eslint": "*" - } - }, - "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==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/graceful-fs": { - "version": "4.1.9", - "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.9.tgz", - "integrity": "sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/http-cache-semantics": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.4.tgz", - "integrity": "sha512-1m0bIFVc7eJWyve9S0RnuRgcQqF/Xd5QsUZAZeQFr1Q3/p9JWoQQEqmVy+DPTNpGXwhgIetAoYF8JSc33q29QA==", - "license": "MIT" - }, - "node_modules/@types/istanbul-lib-coverage": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", - "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/istanbul-lib-report": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.3.tgz", - "integrity": "sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/istanbul-lib-coverage": "*" - } - }, - "node_modules/@types/istanbul-reports": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.4.tgz", - "integrity": "sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/istanbul-lib-report": "*" - } - }, - "node_modules/@types/jest": { - "version": "29.5.14", - "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.14.tgz", - "integrity": "sha512-ZN+4sdnLUbo8EVvVc2ao0GFW6oVrQRPn4K2lglySj7APvSrgzxHiNNK99us4WDMi57xxA2yggblIAMNhXOotLQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "expect": "^29.0.0", - "pretty-format": "^29.0.0" - } - }, - "node_modules/@types/json-bigint": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@types/json-bigint/-/json-bigint-1.0.4.tgz", - "integrity": "sha512-ydHooXLbOmxBbubnA7Eh+RpBzuaIiQjh8WGJYQB50JFGFrdxW7JzVlyEV7fAXw0T2sqJ1ysTneJbiyNLqZRAag==", - "license": "MIT" - }, - "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==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/keyv": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/@types/keyv/-/keyv-3.1.4.tgz", - "integrity": "sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==", - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/node": { - "version": "20.17.10", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.10.tgz", - "integrity": "sha512-/jrvh5h6NXhEauFFexRin69nA0uHJ5gwk4iDivp/DeoEua3uwCUto6PC86IpRITBOs4+6i2I56K5x5b6WYGXHA==", - "license": "MIT", - "dependencies": { - "undici-types": "~6.19.2" - } - }, - "node_modules/@types/normalize-package-data": { - "version": "2.4.4", - "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.4.tgz", - "integrity": "sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/responselike": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@types/responselike/-/responselike-1.0.3.tgz", - "integrity": "sha512-H/+L+UkTV33uf49PH5pCAUBVPNj2nDBXTN+qS1dOwyyg24l3CcicicCA7ca+HMvJBZcFgl5r8e+RR6elsb4Lyw==", - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/stack-utils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.3.tgz", - "integrity": "sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/yargs": { - "version": "17.0.33", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.33.tgz", - "integrity": "sha512-WpxBCKWPLr4xSsHgz511rFJAM+wS28w2zEO1QDNY5zM/S8ok70NNfztH0xwhqKyaK0OHCbN98LDAZuy1ctxDkA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/yargs-parser": "*" - } - }, - "node_modules/@types/yargs-parser": { - "version": "21.0.3", - "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.3.tgz", - "integrity": "sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.18.0.tgz", - "integrity": "sha512-NR2yS7qUqCL7AIxdJUQf2MKKNDVNaig/dEB0GBLU7D+ZdHgK1NoH/3wsgO3OnPVipn51tG3MAwaODEGil70WEw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.18.0", - "@typescript-eslint/type-utils": "8.18.0", - "@typescript-eslint/utils": "8.18.0", - "@typescript-eslint/visitor-keys": "8.18.0", - "graphemer": "^1.4.0", - "ignore": "^5.3.1", - "natural-compare": "^1.4.0", - "ts-api-utils": "^1.3.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.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.18.0.tgz", - "integrity": "sha512-hgUZ3kTEpVzKaK3uNibExUYm6SKKOmTU2BOxBSvOYwtJEPdVQ70kZJpPjstlnhCHcuc2WGfSbpKlb/69ttyN5Q==", - "dev": true, - "license": "MITClause", - "dependencies": { - "@typescript-eslint/scope-manager": "8.18.0", - "@typescript-eslint/types": "8.18.0", - "@typescript-eslint/typescript-estree": "8.18.0", - "@typescript-eslint/visitor-keys": "8.18.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.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.18.0.tgz", - "integrity": "sha512-PNGcHop0jkK2WVYGotk/hxj+UFLhXtGPiGtiaWgVBVP1jhMoMCHlTyJA+hEj4rszoSdLTK3fN4oOatrL0Cp+Xw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "8.18.0", - "@typescript-eslint/visitor-keys": "8.18.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.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.18.0.tgz", - "integrity": "sha512-er224jRepVAVLnMF2Q7MZJCq5CsdH2oqjP4dT7K6ij09Kyd+R21r7UVJrF0buMVdZS5QRhDzpvzAxHxabQadow==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/typescript-estree": "8.18.0", - "@typescript-eslint/utils": "8.18.0", - "debug": "^4.3.4", - "ts-api-utils": "^1.3.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.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.18.0.tgz", - "integrity": "sha512-FNYxgyTCAnFwTrzpBGq+zrnoTO4x0c1CKYY5MuUTzpScqmY5fmsh2o3+57lqdI3NZucBDCzDgdEbIaNfAjAHQA==", - "dev": true, - "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.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.18.0.tgz", - "integrity": "sha512-rqQgFRu6yPkauz+ms3nQpohwejS8bvgbPyIDq13cgEDbkXt4LH4OkDMT0/fN1RUtzG8e8AKJyDBoocuQh8qNeg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "8.18.0", - "@typescript-eslint/visitor-keys": "8.18.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": "^1.3.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==", - "dev": true, - "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==", - "dev": true, - "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.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.18.0.tgz", - "integrity": "sha512-p6GLdY383i7h5b0Qrfbix3Vc3+J2k6QWw6UMUeY5JGfm3C5LbZ4QIZzJNoNOfgyRe0uuYKjvVOsO/jD4SJO+xg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "8.18.0", - "@typescript-eslint/types": "8.18.0", - "@typescript-eslint/typescript-estree": "8.18.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.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.18.0.tgz", - "integrity": "sha512-pCh/qEA8Lb1wVIqNvBke8UaRjJ6wrAWkJO5yyIbs8Yx6TNGYyfNjOo61tLv+WwLvoLPp4BQ8B7AHKijl8NGUfw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "8.18.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==", - "dev": true, - "license": "MIT", - "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==", - "dev": true, - "license": "MIT", - "peerDependencies": { - "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, - "node_modules/acorn-walk": { - "version": "8.3.4", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.4.tgz", - "integrity": "sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==", - "dev": true, - "license": "MIT", - "dependencies": { - "acorn": "^8.11.0" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/ajv": { - "version": "8.17.1", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", - "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.3", - "fast-uri": "^3.0.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/ansi-escapes": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", - "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "type-fest": "^0.21.3" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "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", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/anymatch": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", - "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", - "dev": true, - "license": "ISC", - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/arg": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", - "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", - "dev": true, - "license": "MIT" - }, - "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==", - "dev": true, - "license": "Python-2.0" - }, - "node_modules/asn1js": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/asn1js/-/asn1js-3.0.5.tgz", - "integrity": "sha512-FVnvrKJwpt9LP2lAMl8qZswRNm3T4q9CON+bxldk2iwk3FFpuwhx2FfinyitizWHsVYyaY+y5JzDR0rCMV5yTQ==", - "license": "BSD-3-Clause", - "dependencies": { - "pvtsutils": "^1.3.2", - "pvutils": "^1.1.3", - "tslib": "^2.4.0" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/async": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/async/-/async-3.2.6.tgz", - "integrity": "sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==", - "dev": true, - "license": "MIT" - }, - "node_modules/asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", - "license": "MIT" - }, - "node_modules/babel-jest": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.7.0.tgz", - "integrity": "sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/transform": "^29.7.0", - "@types/babel__core": "^7.1.14", - "babel-plugin-istanbul": "^6.1.1", - "babel-preset-jest": "^29.6.3", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "slash": "^3.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "@babel/core": "^7.8.0" - } - }, - "node_modules/babel-plugin-istanbul": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz", - "integrity": "sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "@babel/helper-plugin-utils": "^7.0.0", - "@istanbuljs/load-nyc-config": "^1.0.0", - "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-instrument": "^5.0.4", - "test-exclude": "^6.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/babel-plugin-istanbul/node_modules/istanbul-lib-instrument": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz", - "integrity": "sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "@babel/core": "^7.12.3", - "@babel/parser": "^7.14.7", - "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-coverage": "^3.2.0", - "semver": "^6.3.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/babel-plugin-istanbul/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/babel-plugin-jest-hoist": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.6.3.tgz", - "integrity": "sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/template": "^7.3.3", - "@babel/types": "^7.3.3", - "@types/babel__core": "^7.1.14", - "@types/babel__traverse": "^7.0.6" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/babel-preset-current-node-syntax": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.1.0.tgz", - "integrity": "sha512-ldYss8SbBlWva1bs28q78Ju5Zq1F+8BrqBZZ0VFhLBvhh6lCpC2o3gDJi/5DRLs9FgYZCnmPYIVFU4lRXCkyUw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/plugin-syntax-async-generators": "^7.8.4", - "@babel/plugin-syntax-bigint": "^7.8.3", - "@babel/plugin-syntax-class-properties": "^7.12.13", - "@babel/plugin-syntax-class-static-block": "^7.14.5", - "@babel/plugin-syntax-import-attributes": "^7.24.7", - "@babel/plugin-syntax-import-meta": "^7.10.4", - "@babel/plugin-syntax-json-strings": "^7.8.3", - "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", - "@babel/plugin-syntax-numeric-separator": "^7.10.4", - "@babel/plugin-syntax-object-rest-spread": "^7.8.3", - "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", - "@babel/plugin-syntax-optional-chaining": "^7.8.3", - "@babel/plugin-syntax-private-property-in-object": "^7.14.5", - "@babel/plugin-syntax-top-level-await": "^7.14.5" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/babel-preset-jest": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.6.3.tgz", - "integrity": "sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA==", - "dev": true, - "license": "MIT", - "dependencies": { - "babel-plugin-jest-hoist": "^29.6.3", - "babel-preset-current-node-syntax": "^1.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "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/base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", - "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/bech32": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/bech32/-/bech32-2.0.0.tgz", - "integrity": "sha512-LcknSilhIGatDAsY1ak2I8VtGaHNhgMSYVxFrGLXv+xLHytaKZKcaUJJUE7qmBr7h33o5YQwP55pMI0xmkpJwg==", - "license": "MIT" - }, - "node_modules/big.js": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/big.js/-/big.js-6.2.2.tgz", - "integrity": "sha512-y/ie+Faknx7sZA5MfGA2xKlu0GDv8RWrXGsmlteyJQ2lvoKv9GBK/fpRMc2qlSoBAgNxrixICFCBefIq8WCQpQ==", - "license": "MIT", - "engines": { - "node": "*" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/bigjs" - } - }, - "node_modules/bignumber.js": { - "version": "9.1.2", - "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.2.tgz", - "integrity": "sha512-2/mKyZH9K85bzOEfhXDBFZTGd1CTs+5IHpeFQo9luiBG7hghdC851Pj2WAhb6E3R6b9tZj/XKhbg4fum+Kepug==", - "license": "MIT", - "engines": { - "node": "*" - } - }, - "node_modules/blake2b": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/blake2b/-/blake2b-2.1.3.tgz", - "integrity": "sha512-pkDss4xFVbMb4270aCyGD3qLv92314Et+FsKzilCLxDz5DuZ2/1g3w4nmBbu6nKApPspnjG7JcwTjGZnduB1yg==", - "license": "ISC", - "dependencies": { - "blake2b-wasm": "^1.1.0", - "nanoassert": "^1.0.0" - } - }, - "node_modules/blake2b-wasm": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/blake2b-wasm/-/blake2b-wasm-1.1.7.tgz", - "integrity": "sha512-oFIHvXhlz/DUgF0kq5B1CqxIDjIJwh9iDeUUGQUcvgiGz7Wdw03McEO7CfLBy7QKGdsydcMCgO9jFNBAFCtFcA==", - "license": "MIT", - "dependencies": { - "nanoassert": "^1.0.0" - } - }, - "node_modules/bottleneck": { - "version": "2.19.5", - "resolved": "https://registry.npmjs.org/bottleneck/-/bottleneck-2.19.5.tgz", - "integrity": "sha512-VHiNCbI1lKdl44tGrhNfU3lup0Tj/ZBMJB5/2ZbNXRCPuRCO7ed2mgcK4r17y+KB2EfuYuRaVlwNbAeaWGSpbw==", - "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==", - "dev": true, - "license": "MIT", - "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==", - "dev": true, - "license": "MIT", - "dependencies": { - "fill-range": "^7.1.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/browserslist": { - "version": "4.24.2", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.2.tgz", - "integrity": "sha512-ZIc+Q62revdMcqC6aChtW4jz3My3klmCO1fEmINZY/8J3EpBg5/A/D0AKmBveUh6pgoeycoMkVMko84tuYS+Gg==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "dependencies": { - "caniuse-lite": "^1.0.30001669", - "electron-to-chromium": "^1.5.41", - "node-releases": "^2.0.18", - "update-browserslist-db": "^1.1.1" - }, - "bin": { - "browserslist": "cli.js" - }, - "engines": { - "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" - } - }, - "node_modules/bs-logger": { - "version": "0.2.6", - "resolved": "https://registry.npmjs.org/bs-logger/-/bs-logger-0.2.6.tgz", - "integrity": "sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog==", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-json-stable-stringify": "2.x" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/bser": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz", - "integrity": "sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "node-int64": "^0.4.0" - } - }, - "node_modules/buffer": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", - "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", - "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": { - "base64-js": "^1.3.1", - "ieee754": "^1.2.1" - } - }, - "node_modules/buffer-from": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/builtin-modules": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.3.0.tgz", - "integrity": "sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/cacheable-lookup": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz", - "integrity": "sha512-2/kNscPhpcxrOigMZzbiWF7dz8ilhb/nIHU3EyZiXWXpeq/au8qJ8VhdftMkty3n7Gj6HIGalQG8oiBNB3AJgA==", - "license": "MIT", - "engines": { - "node": ">=10.6.0" - } - }, - "node_modules/cacheable-request": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-7.0.4.tgz", - "integrity": "sha512-v+p6ongsrp0yTGbJXjgxPow2+DL93DASP4kXCDKb8/bwRtt9OEF3whggkkDkGNzgcWy2XaF4a8nZglC7uElscg==", - "license": "MIT", - "dependencies": { - "clone-response": "^1.0.2", - "get-stream": "^5.1.0", - "http-cache-semantics": "^4.0.0", - "keyv": "^4.0.0", - "lowercase-keys": "^2.0.0", - "normalize-url": "^6.0.1", - "responselike": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/caniuse-lite": { - "version": "1.0.30001687", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001687.tgz", - "integrity": "sha512-0S/FDhf4ZiqrTUiQ39dKeUjYRjkv7lOZU1Dgif2rIqrTzX/1wV2hfKu9TOm1IHkdSijfLswxTFzl/cvir+SLSQ==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/caniuse-lite" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "CC-BY-4.0" - }, - "node_modules/cbor": { - "version": "9.0.2", - "resolved": "https://registry.npmjs.org/cbor/-/cbor-9.0.2.tgz", - "integrity": "sha512-JPypkxsB10s9QOWwa6zwPzqE1Md3vqpPc+cai4sAecuCsRyAtAl/pMyhPlMbT/xtPnm2dznJZYRLui57qiRhaQ==", - "license": "MIT", - "dependencies": { - "nofilter": "^3.1.0" - }, - "engines": { - "node": ">=16" - } - }, - "node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "license": "MIT", - "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/char-regex": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz", - "integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - } - }, - "node_modules/ci-info": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-4.1.0.tgz", - "integrity": "sha512-HutrvTNsF48wnxkzERIXOe5/mlcfFcbfCmwcg6CJnizbSue78AbDt+1cgl26zwn61WFxhcPykPfZrbqjGmBb4A==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/sibiraj-s" - } - ], - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/cjs-module-lexer": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.4.1.tgz", - "integrity": "sha512-cuSVIHi9/9E/+821Qjdvngor+xpnlwnuwIyZOaLmHBVdXL+gP+I6QQB9VkO7RI77YIcTV+S1W9AreJ5eN63JBA==", - "dev": true, - "license": "MIT" - }, - "node_modules/clean-regexp": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/clean-regexp/-/clean-regexp-1.0.0.tgz", - "integrity": "sha512-GfisEZEJvzKrmGWkvfhgzcz/BllN1USeqD2V6tg14OAOgaCD2Z/PUEuxnAZ/nPvmaHRG7a8y77p1T/IRQ4D1Hw==", - "dev": true, - "license": "MIT", - "dependencies": { - "escape-string-regexp": "^1.0.5" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/clean-regexp/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/cliui": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", - "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", - "dev": true, - "license": "ISC", - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/clone-response": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.3.tgz", - "integrity": "sha512-ROoL94jJH2dUVML2Y/5PEDNaSHgeOdSDicUyS7izcF63G6sTc/FTjLub4b8Il9S8S0beOfYt0TaA5qvFK+w0wA==", - "license": "MIT", - "dependencies": { - "mimic-response": "^1.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/cluster-key-slot": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/cluster-key-slot/-/cluster-key-slot-1.1.2.tgz", - "integrity": "sha512-RMr0FhtfXemyinomL4hrWcYJxmX6deFdCxpJzhDttxgO1+bcCnkk+9drydLVDmAMG7NE6aN/fl4F7ucU/90gAA==", - "license": "Apache-2.0", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/co": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "integrity": "sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==", - "dev": true, - "license": "MIT", - "engines": { - "iojs": ">= 1.0.0", - "node": ">= 0.12.0" - } - }, - "node_modules/collect-v8-coverage": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz", - "integrity": "sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q==", - "dev": true, - "license": "MIT" - }, - "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", - "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" - }, - "node_modules/combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "license": "MIT", - "dependencies": { - "delayed-stream": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true, - "license": "MIT" - }, - "node_modules/convert-source-map": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", - "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", - "dev": true, - "license": "MIT" - }, - "node_modules/core-js-compat": { - "version": "3.39.0", - "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.39.0.tgz", - "integrity": "sha512-VgEUx3VwlExr5no0tXlBt+silBvhTryPwCXRI2Id1PN8WTKu7MreethvddqOubrYxkFdv/RnYrqlv1sFNAUelw==", - "dev": true, - "license": "MIT", - "dependencies": { - "browserslist": "^4.24.2" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/core-js" - } - }, - "node_modules/create-jest": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/create-jest/-/create-jest-29.7.0.tgz", - "integrity": "sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^29.6.3", - "chalk": "^4.0.0", - "exit": "^0.1.2", - "graceful-fs": "^4.2.9", - "jest-config": "^29.7.0", - "jest-util": "^29.7.0", - "prompts": "^2.0.1" - }, - "bin": { - "create-jest": "bin/create-jest.js" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/create-require": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", - "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/cross-fetch": { - "version": "3.1.8", - "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.8.tgz", - "integrity": "sha512-cvA+JwZoU0Xq+h6WkMvAUqPEYy92Obet6UdKLfW60qn99ftItKjB5T+BkyWOFWe2pUyfQ+IJHmpOTznqk1M6Kg==", - "license": "MIT", - "dependencies": { - "node-fetch": "^2.6.12" - } - }, - "node_modules/cross-fetch/node_modules/node-fetch": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", - "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", - "license": "MIT", - "dependencies": { - "whatwg-url": "^5.0.0" - }, - "engines": { - "node": "4.x || >=6.0.0" - }, - "peerDependencies": { - "encoding": "^0.1.0" - }, - "peerDependenciesMeta": { - "encoding": { - "optional": 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", - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/data-uri-to-buffer": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz", - "integrity": "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==", - "license": "MIT", - "engines": { - "node": ">= 12" - } - }, - "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/decompress-response": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", - "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", - "license": "MIT", - "dependencies": { - "mimic-response": "^3.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/decompress-response/node_modules/mimic-response": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", - "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/dedent": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.5.3.tgz", - "integrity": "sha512-NHQtfOOW68WD8lgypbLA5oT+Bt0xXJhiYvoR6SmmNXZfpzOGXwdKWmcwG8N7PwVVWV3eF/68nmD9BaJSsTBhyQ==", - "dev": true, - "license": "MIT", - "peerDependencies": { - "babel-plugin-macros": "^3.1.0" - }, - "peerDependenciesMeta": { - "babel-plugin-macros": { - "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==", - "dev": true, - "license": "MIT" - }, - "node_modules/deepmerge": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", - "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/defer-to-connect": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-2.0.1.tgz", - "integrity": "sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==", - "license": "MIT", - "engines": { - "node": ">=10" - } - }, - "node_modules/delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", - "license": "MIT", - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/denque": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/denque/-/denque-2.1.0.tgz", - "integrity": "sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw==", - "license": "Apache-2.0", - "engines": { - "node": ">=0.10" - } - }, - "node_modules/detect-newline": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", - "integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/diff": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", - "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.3.1" - } - }, - "node_modules/diff-sequences": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz", - "integrity": "sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/eastasianwidth": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", - "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", - "license": "MIT" - }, - "node_modules/ejs": { - "version": "3.1.10", - "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.10.tgz", - "integrity": "sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "jake": "^10.8.5" - }, - "bin": { - "ejs": "bin/cli.js" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/electron-to-chromium": { - "version": "1.5.72", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.72.tgz", - "integrity": "sha512-ZpSAUOZ2Izby7qnZluSrAlGgGQzucmFbN0n64dYzocYxnxV5ufurpj3VgEe4cUp7ir9LmeLxNYo8bVnlM8bQHw==", - "dev": true, - "license": "ISC" - }, - "node_modules/emittery": { - "version": "0.13.1", - "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.13.1.tgz", - "integrity": "sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sindresorhus/emittery?sponsor=1" - } - }, - "node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "license": "MIT" - }, - "node_modules/end-of-stream": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", - "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", - "license": "MIT", - "dependencies": { - "once": "^1.4.0" - } - }, - "node_modules/error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-arrayish": "^0.2.1" - } - }, - "node_modules/es-module-lexer": { - "version": "1.5.4", - "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.5.4.tgz", - "integrity": "sha512-MVNK56NiMrOwitFB7cqDwq0CQutbw+0BvLshJSse0MUNU+y1FC3bUS/AQg7oUng+/wKrrki7JfmwtVHkVfPLlw==", - "dev": true, - "license": "MIT" - }, - "node_modules/esbuild": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.23.1.tgz", - "integrity": "sha512-VVNz/9Sa0bs5SELtn3f7qhJCDPCF5oMEl5cO9/SSinpE9hbPVvxbd572HH5AKiP7WD8INO53GgfDDhRjkylHEg==", - "dev": true, - "hasInstallScript": true, - "license": "MIT", - "bin": { - "esbuild": "bin/esbuild" - }, - "engines": { - "node": ">=18" - }, - "optionalDependencies": { - "@esbuild/aix-ppc64": "0.23.1", - "@esbuild/android-arm": "0.23.1", - "@esbuild/android-arm64": "0.23.1", - "@esbuild/android-x64": "0.23.1", - "@esbuild/darwin-arm64": "0.23.1", - "@esbuild/darwin-x64": "0.23.1", - "@esbuild/freebsd-arm64": "0.23.1", - "@esbuild/freebsd-x64": "0.23.1", - "@esbuild/linux-arm": "0.23.1", - "@esbuild/linux-arm64": "0.23.1", - "@esbuild/linux-ia32": "0.23.1", - "@esbuild/linux-loong64": "0.23.1", - "@esbuild/linux-mips64el": "0.23.1", - "@esbuild/linux-ppc64": "0.23.1", - "@esbuild/linux-riscv64": "0.23.1", - "@esbuild/linux-s390x": "0.23.1", - "@esbuild/linux-x64": "0.23.1", - "@esbuild/netbsd-x64": "0.23.1", - "@esbuild/openbsd-arm64": "0.23.1", - "@esbuild/openbsd-x64": "0.23.1", - "@esbuild/sunos-x64": "0.23.1", - "@esbuild/win32-arm64": "0.23.1", - "@esbuild/win32-ia32": "0.23.1", - "@esbuild/win32-x64": "0.23.1" - } - }, - "node_modules/escalade": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", - "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "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==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/eslint": { - "version": "9.16.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.16.0.tgz", - "integrity": "sha512-whp8mSQI4C8VXd+fLgSM0lh3UlmcFtVwUQjyKCFfsp+2ItAIYhlq/hqGahGqHE6cv9unM41VlqKk2VtKYR2TaA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.12.1", - "@eslint/config-array": "^0.19.0", - "@eslint/core": "^0.9.0", - "@eslint/eslintrc": "^3.2.0", - "@eslint/js": "9.16.0", - "@eslint/plugin-kit": "^0.2.3", - "@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.5", - "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-plugin-simple-import-sort": { - "version": "12.1.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-simple-import-sort/-/eslint-plugin-simple-import-sort-12.1.1.tgz", - "integrity": "sha512-6nuzu4xwQtE3332Uz0to+TxDQYRLTKRESSc2hefVT48Zc8JthmN23Gx9lnYhu0FtkRSL1oxny3kJ2aveVhmOVA==", - "dev": true, - "license": "MIT", - "peerDependencies": { - "eslint": ">=5.0.0" - } - }, - "node_modules/eslint-plugin-unicorn": { - "version": "55.0.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-55.0.0.tgz", - "integrity": "sha512-n3AKiVpY2/uDcGrS3+QsYDkjPfaOrNrsfQxU9nt5nitd9KuvVXrfAvgCO9DYPSfap+Gqjw9EOrXIsBp5tlHZjA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-validator-identifier": "^7.24.5", - "@eslint-community/eslint-utils": "^4.4.0", - "ci-info": "^4.0.0", - "clean-regexp": "^1.0.0", - "core-js-compat": "^3.37.0", - "esquery": "^1.5.0", - "globals": "^15.7.0", - "indent-string": "^4.0.0", - "is-builtin-module": "^3.2.1", - "jsesc": "^3.0.2", - "pluralize": "^8.0.0", - "read-pkg-up": "^7.0.1", - "regexp-tree": "^0.1.27", - "regjsparser": "^0.10.0", - "semver": "^7.6.1", - "strip-indent": "^3.0.0" - }, - "engines": { - "node": ">=18.18" - }, - "funding": { - "url": "https://github.com/sindresorhus/eslint-plugin-unicorn?sponsor=1" - }, - "peerDependencies": { - "eslint": ">=8.56.0" - } - }, - "node_modules/eslint-plugin-unicorn/node_modules/globals": { - "version": "15.13.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-15.13.0.tgz", - "integrity": "sha512-49TewVEz0UxZjr1WYYsWpPrhyC/B/pA8Bq0fUmet2n+eR7yn0IvNzNaoBwnK6mdkzcN+se7Ez9zUgULTz2QH4g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/eslint-plugin-unused-imports": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/eslint-plugin-unused-imports/-/eslint-plugin-unused-imports-4.1.4.tgz", - "integrity": "sha512-YptD6IzQjDardkl0POxnnRBhU1OEePMV0nd6siHaRBbd+lyh6NAhFEobiznKU7kTsSsDeSD62Pe7kAM1b7dAZQ==", - "dev": true, - "license": "MIT", - "peerDependencies": { - "@typescript-eslint/eslint-plugin": "^8.0.0-0 || ^7.0.0 || ^6.0.0 || ^5.0.0", - "eslint": "^9.0.0 || ^8.0.0" - }, - "peerDependenciesMeta": { - "@typescript-eslint/eslint-plugin": { - "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==", - "dev": true, - "license": "BSD-2-Clause", - "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==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint/node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "license": "MIT", - "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/eslint/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==", - "dev": true, - "license": "MIT" - }, - "node_modules/espree": { - "version": "10.3.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-10.3.0.tgz", - "integrity": "sha512-0QYC8b24HWY8zjRnDTL6RiHfDbAWn63qb4LMj1Z4b076A4une81+z03Kg7l7mn/48PUTqoLptSXez8oknU8Clg==", - "dev": true, - "license": "BSD-2-Clause", - "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/esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true, - "license": "BSD-2-Clause", - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/esquery": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", - "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", - "dev": true, - "license": "BSD-3-Clause", - "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==", - "dev": true, - "license": "BSD-2-Clause", - "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==", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, - "node_modules/estree-walker": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", - "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", - "dev": true, - "license": "MIT" - }, - "node_modules/esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/execa": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", - "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", - "dev": true, - "license": "MIT", - "dependencies": { - "cross-spawn": "^7.0.3", - "get-stream": "^6.0.0", - "human-signals": "^2.1.0", - "is-stream": "^2.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^4.0.1", - "onetime": "^5.1.2", - "signal-exit": "^3.0.3", - "strip-final-newline": "^2.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sindresorhus/execa?sponsor=1" - } - }, - "node_modules/execa/node_modules/get-stream": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", - "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/exit": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", - "integrity": "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==", - "dev": true, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/expect": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/expect/-/expect-29.7.0.tgz", - "integrity": "sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/expect-utils": "^29.7.0", - "jest-get-type": "^29.6.3", - "jest-matcher-utils": "^29.7.0", - "jest-message-util": "^29.7.0", - "jest-util": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/exponential-backoff": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/exponential-backoff/-/exponential-backoff-3.1.1.tgz", - "integrity": "sha512-dX7e/LHVJ6W3DE1MHWi9S1EYzDESENfLrYohG2G++ovZrYOkm4Knwa0mc1cn84xJOR4KEU0WSchhLbd0UklbHw==", - "license": "Apache-2.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" - }, - "node_modules/fast-glob": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", - "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", - "dev": true, - "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.4" - }, - "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==", - "dev": true, - "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==", - "dev": true, - "license": "MIT" - }, - "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==", - "dev": true, - "license": "MIT" - }, - "node_modules/fast-uri": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.0.3.tgz", - "integrity": "sha512-aLrHthzCjH5He4Z2H9YZ+v6Ujb9ocRuW6ZzkJQOrTxleEijANq4v1TsaPaVG1PZcuurEzrLcWRyYBYXD5cEiaw==", - "license": "BSD-3-Clause" - }, - "node_modules/fastq": { - "version": "1.17.1", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", - "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", - "license": "ISC", - "dependencies": { - "reusify": "^1.0.4" - } - }, - "node_modules/fb-watchman": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.2.tgz", - "integrity": "sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "bser": "2.1.1" - } - }, - "node_modules/fetch-blob": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz", - "integrity": "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/jimmywarting" - }, - { - "type": "paypal", - "url": "https://paypal.me/jimmywarting" - } - ], - "license": "MIT", - "dependencies": { - "node-domexception": "^1.0.0", - "web-streams-polyfill": "^3.0.3" - }, - "engines": { - "node": "^12.20 || >= 14.13" - } - }, - "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==", - "dev": true, - "license": "MIT", - "dependencies": { - "flat-cache": "^4.0.0" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/filelist": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/filelist/-/filelist-1.0.4.tgz", - "integrity": "sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "minimatch": "^5.0.1" - } - }, - "node_modules/filelist/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==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/filelist/node_modules/minimatch": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", - "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=10" - } - }, - "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==", - "dev": true, - "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==", - "dev": true, - "license": "MIT", - "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==", - "dev": true, - "license": "MIT", - "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==", - "dev": true, - "license": "ISC" - }, - "node_modules/foreground-child": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.0.tgz", - "integrity": "sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg==", - "license": "ISC", - "dependencies": { - "cross-spawn": "^7.0.0", - "signal-exit": "^4.0.1" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/foreground-child/node_modules/signal-exit": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", - "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", - "license": "ISC", - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/form-data": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.1.tgz", - "integrity": "sha512-tzN8e4TX8+kkxGPK8D5u0FNmjPUjw3lwC9lSLxxoB/+GtsJG91CO8bSWy73APlgAZzZbXEYZJuxjkHH2w+Ezhw==", - "license": "MIT", - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/formdata-polyfill": { - "version": "4.0.10", - "resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz", - "integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==", - "license": "MIT", - "dependencies": { - "fetch-blob": "^3.1.2" - }, - "engines": { - "node": ">=12.20.0" - } - }, - "node_modules/fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true, - "license": "ISC" - }, - "node_modules/fsevents": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", - "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", - "dev": true, - "hasInstallScript": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, - "node_modules/function-bind": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", - "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/gensync": { - "version": "1.0.0-beta.2", - "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", - "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true, - "license": "ISC", - "engines": { - "node": "6.* || 8.* || >= 10.*" - } - }, - "node_modules/get-package-type": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", - "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/get-stream": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", - "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", - "license": "MIT", - "dependencies": { - "pump": "^3.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/get-tsconfig": { - "version": "4.8.1", - "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.8.1.tgz", - "integrity": "sha512-k9PN+cFBmaLWtVz29SkUoqU5O0slLuHJXt/2P+tMVFT+phsSGXGkp9t3rQIqdz0e+06EHNGs3oM6ZX1s2zHxRg==", - "dev": true, - "license": "MIT", - "dependencies": { - "resolve-pkg-maps": "^1.0.0" - }, - "funding": { - "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" - } - }, - "node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "deprecated": "Glob versions prior to v9 are no longer supported", - "dev": true, - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "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==", - "dev": true, - "license": "ISC", - "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==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/got": { - "version": "11.8.6", - "resolved": "https://registry.npmjs.org/got/-/got-11.8.6.tgz", - "integrity": "sha512-6tfZ91bOr7bOXnK7PRDCGBLa1H4U080YHNaAQ2KsMGlLEzRbk44nsZF2E1IeRc3vtJHPVbKCYgdFbaGO2ljd8g==", - "license": "MIT", - "dependencies": { - "@sindresorhus/is": "^4.0.0", - "@szmarczak/http-timer": "^4.0.5", - "@types/cacheable-request": "^6.0.1", - "@types/responselike": "^1.0.0", - "cacheable-lookup": "^5.0.3", - "cacheable-request": "^7.0.2", - "decompress-response": "^6.0.0", - "http2-wrapper": "^1.0.0-beta.5.2", - "lowercase-keys": "^2.0.0", - "p-cancelable": "^2.0.0", - "responselike": "^2.0.0" - }, - "engines": { - "node": ">=10.19.0" - }, - "funding": { - "url": "https://github.com/sindresorhus/got?sponsor=1" - } - }, - "node_modules/graceful-fs": { - "version": "4.2.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", - "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", - "dev": true, - "license": "ISC" - }, - "node_modules/graphemer": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", - "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", - "dev": true, - "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==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/hasown": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", - "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "function-bind": "^1.1.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/hosted-git-info": { - "version": "2.8.9", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", - "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", - "dev": true, - "license": "ISC" - }, - "node_modules/html-escaper": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", - "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", - "dev": true, - "license": "MIT" - }, - "node_modules/http-cache-semantics": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz", - "integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==", - "license": "BSD-2-Clause" - }, - "node_modules/http2-wrapper": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-1.0.3.tgz", - "integrity": "sha512-V+23sDMr12Wnz7iTcDeJr3O6AIxlnvT/bmaAAAP/Xda35C90p9599p0F1eHR/N1KILWSoWVAiOMFjBBXaXSMxg==", - "license": "MIT", - "dependencies": { - "quick-lru": "^5.1.1", - "resolve-alpn": "^1.0.0" - }, - "engines": { - "node": ">=10.19.0" - } - }, - "node_modules/human-signals": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", - "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=10.17.0" - } - }, - "node_modules/ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", - "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": "BSD-3-Clause" - }, - "node_modules/ignore": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", - "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", - "dev": true, - "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==", - "dev": true, - "license": "MIT", - "dependencies": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/import-local": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.2.0.tgz", - "integrity": "sha512-2SPlun1JUPWoM6t3F0dw0FkCF/jWY8kttcY4f599GLTSjh2OCuuhdTkJQsEcZzBqbXZGKMK2OqW1oZsjtf/gQA==", - "dev": true, - "license": "MIT", - "dependencies": { - "pkg-dir": "^4.2.0", - "resolve-cwd": "^3.0.0" - }, - "bin": { - "import-local-fixture": "fixtures/cli.js" - }, - "engines": { - "node": ">=8" - }, - "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==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.19" - } - }, - "node_modules/indent-string": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", - "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", - "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", - "dev": true, - "license": "ISC", - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true, - "license": "ISC" - }, - "node_modules/ioredis": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/ioredis/-/ioredis-5.4.1.tgz", - "integrity": "sha512-2YZsvl7jopIa1gaePkeMtd9rAcSjOOjPtpcLlOeusyO+XH2SK5ZcT+UCrElPP+WVIInh2TzeI4XW9ENaSLVVHA==", - "license": "MIT", - "dependencies": { - "@ioredis/commands": "^1.1.1", - "cluster-key-slot": "^1.1.0", - "debug": "^4.3.4", - "denque": "^2.1.0", - "lodash.defaults": "^4.2.0", - "lodash.isarguments": "^3.1.0", - "redis-errors": "^1.2.0", - "redis-parser": "^3.0.0", - "standard-as-callback": "^2.1.0" - }, - "engines": { - "node": ">=12.22.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/ioredis" - } - }, - "node_modules/is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", - "dev": true, - "license": "MIT" - }, - "node_modules/is-builtin-module": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-3.2.1.tgz", - "integrity": "sha512-BSLE3HnV2syZ0FK0iMA/yUGplUeMmNz4AW5fnTunbCIqZi4vG3WjJT9FHMy5D69xmAYBHXQhJdALdpwVxV501A==", - "dev": true, - "license": "MIT", - "dependencies": { - "builtin-modules": "^3.3.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-core-module": { - "version": "2.15.1", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.1.tgz", - "integrity": "sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "hasown": "^2.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/is-generator-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.1.0.tgz", - "integrity": "sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "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==", - "dev": true, - "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==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/is-stream": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", - "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "license": "ISC" - }, - "node_modules/isomorphic-ws": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/isomorphic-ws/-/isomorphic-ws-4.0.1.tgz", - "integrity": "sha512-BhBvN2MBpWTaSHdWRb/bwdZJ1WaehQ2L1KngkCkfLUGF0mAWAT1sQUQacEmQ0jXkFw/czDXPNQSL5u2/Krsz1w==", - "license": "MIT", - "peerDependencies": { - "ws": "*" - } - }, - "node_modules/istanbul-lib-coverage": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz", - "integrity": "sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=8" - } - }, - "node_modules/istanbul-lib-instrument": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.3.tgz", - "integrity": "sha512-Vtgk7L/R2JHyyGW07spoFlB8/lpjiOLTjMdms6AFMraYt3BaJauod/NGrfnVG/y4Ix1JEuMRPDPEj2ua+zz1/Q==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "@babel/core": "^7.23.9", - "@babel/parser": "^7.23.9", - "@istanbuljs/schema": "^0.1.3", - "istanbul-lib-coverage": "^3.2.0", - "semver": "^7.5.4" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/istanbul-lib-report": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", - "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "istanbul-lib-coverage": "^3.0.0", - "make-dir": "^4.0.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/istanbul-lib-source-maps": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", - "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "debug": "^4.1.1", - "istanbul-lib-coverage": "^3.0.0", - "source-map": "^0.6.1" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/istanbul-reports": { - "version": "3.1.7", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.7.tgz", - "integrity": "sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "html-escaper": "^2.0.0", - "istanbul-lib-report": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/jackspeak": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-4.0.2.tgz", - "integrity": "sha512-bZsjR/iRjl1Nk1UkjGpAzLNfQtzuijhn2g+pbZb98HQ1Gk8vM9hfbxeMBP+M2/UUdwj0RqGG3mlvk2MsAqwvEw==", - "license": "BlueOak-1.0.0", - "dependencies": { - "@isaacs/cliui": "^8.0.2" - }, - "engines": { - "node": "20 || >=22" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/jake": { - "version": "10.9.2", - "resolved": "https://registry.npmjs.org/jake/-/jake-10.9.2.tgz", - "integrity": "sha512-2P4SQ0HrLQ+fw6llpLnOaGAvN2Zu6778SJMrCUwns4fOoG9ayrTiZk3VV8sCPkVZF8ab0zksVpS8FDY5pRCNBA==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "async": "^3.2.3", - "chalk": "^4.0.2", - "filelist": "^1.0.4", - "minimatch": "^3.1.2" - }, - "bin": { - "jake": "bin/cli.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/jest": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest/-/jest-29.7.0.tgz", - "integrity": "sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/core": "^29.7.0", - "@jest/types": "^29.6.3", - "import-local": "^3.0.2", - "jest-cli": "^29.7.0" - }, - "bin": { - "jest": "bin/jest.js" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } - } - }, - "node_modules/jest-changed-files": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-29.7.0.tgz", - "integrity": "sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w==", - "dev": true, - "license": "MIT", - "dependencies": { - "execa": "^5.0.0", - "jest-util": "^29.7.0", - "p-limit": "^3.1.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-circus": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.7.0.tgz", - "integrity": "sha512-3E1nCMgipcTkCocFwM90XXQab9bS+GMsjdpmPrlelaxwD93Ad8iVEjX/vvHPdLPnFf+L40u+5+iutRdA1N9myw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/environment": "^29.7.0", - "@jest/expect": "^29.7.0", - "@jest/test-result": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/node": "*", - "chalk": "^4.0.0", - "co": "^4.6.0", - "dedent": "^1.0.0", - "is-generator-fn": "^2.0.0", - "jest-each": "^29.7.0", - "jest-matcher-utils": "^29.7.0", - "jest-message-util": "^29.7.0", - "jest-runtime": "^29.7.0", - "jest-snapshot": "^29.7.0", - "jest-util": "^29.7.0", - "p-limit": "^3.1.0", - "pretty-format": "^29.7.0", - "pure-rand": "^6.0.0", - "slash": "^3.0.0", - "stack-utils": "^2.0.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-cli": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.7.0.tgz", - "integrity": "sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/core": "^29.7.0", - "@jest/test-result": "^29.7.0", - "@jest/types": "^29.6.3", - "chalk": "^4.0.0", - "create-jest": "^29.7.0", - "exit": "^0.1.2", - "import-local": "^3.0.2", - "jest-config": "^29.7.0", - "jest-util": "^29.7.0", - "jest-validate": "^29.7.0", - "yargs": "^17.3.1" - }, - "bin": { - "jest": "bin/jest.js" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } - } - }, - "node_modules/jest-config": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.7.0.tgz", - "integrity": "sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/core": "^7.11.6", - "@jest/test-sequencer": "^29.7.0", - "@jest/types": "^29.6.3", - "babel-jest": "^29.7.0", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "deepmerge": "^4.2.2", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "jest-circus": "^29.7.0", - "jest-environment-node": "^29.7.0", - "jest-get-type": "^29.6.3", - "jest-regex-util": "^29.6.3", - "jest-resolve": "^29.7.0", - "jest-runner": "^29.7.0", - "jest-util": "^29.7.0", - "jest-validate": "^29.7.0", - "micromatch": "^4.0.4", - "parse-json": "^5.2.0", - "pretty-format": "^29.7.0", - "slash": "^3.0.0", - "strip-json-comments": "^3.1.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "@types/node": "*", - "ts-node": ">=9.0.0" - }, - "peerDependenciesMeta": { - "@types/node": { - "optional": true - }, - "ts-node": { - "optional": true - } - } - }, - "node_modules/jest-config/node_modules/ci-info": { - "version": "3.9.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz", - "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/sibiraj-s" - } - ], - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-diff": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.7.0.tgz", - "integrity": "sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw==", - "dev": true, - "license": "MIT", - "dependencies": { - "chalk": "^4.0.0", - "diff-sequences": "^29.6.3", - "jest-get-type": "^29.6.3", - "pretty-format": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-docblock": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.7.0.tgz", - "integrity": "sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g==", - "dev": true, - "license": "MIT", - "dependencies": { - "detect-newline": "^3.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-each": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.7.0.tgz", - "integrity": "sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^29.6.3", - "chalk": "^4.0.0", - "jest-get-type": "^29.6.3", - "jest-util": "^29.7.0", - "pretty-format": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-environment-node": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.7.0.tgz", - "integrity": "sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/environment": "^29.7.0", - "@jest/fake-timers": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/node": "*", - "jest-mock": "^29.7.0", - "jest-util": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-get-type": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.6.3.tgz", - "integrity": "sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-haste-map": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.7.0.tgz", - "integrity": "sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^29.6.3", - "@types/graceful-fs": "^4.1.3", - "@types/node": "*", - "anymatch": "^3.0.3", - "fb-watchman": "^2.0.0", - "graceful-fs": "^4.2.9", - "jest-regex-util": "^29.6.3", - "jest-util": "^29.7.0", - "jest-worker": "^29.7.0", - "micromatch": "^4.0.4", - "walker": "^1.0.8" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "optionalDependencies": { - "fsevents": "^2.3.2" - } - }, - "node_modules/jest-leak-detector": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.7.0.tgz", - "integrity": "sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw==", - "dev": true, - "license": "MIT", - "dependencies": { - "jest-get-type": "^29.6.3", - "pretty-format": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-matcher-utils": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.7.0.tgz", - "integrity": "sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g==", - "dev": true, - "license": "MIT", - "dependencies": { - "chalk": "^4.0.0", - "jest-diff": "^29.7.0", - "jest-get-type": "^29.6.3", - "pretty-format": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-message-util": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.7.0.tgz", - "integrity": "sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.12.13", - "@jest/types": "^29.6.3", - "@types/stack-utils": "^2.0.0", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "micromatch": "^4.0.4", - "pretty-format": "^29.7.0", - "slash": "^3.0.0", - "stack-utils": "^2.0.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-mock": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.7.0.tgz", - "integrity": "sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^29.6.3", - "@types/node": "*", - "jest-util": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-pnp-resolver": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz", - "integrity": "sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - }, - "peerDependencies": { - "jest-resolve": "*" - }, - "peerDependenciesMeta": { - "jest-resolve": { - "optional": true - } - } - }, - "node_modules/jest-regex-util": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.6.3.tgz", - "integrity": "sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-resolve": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.7.0.tgz", - "integrity": "sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA==", - "dev": true, - "license": "MIT", - "dependencies": { - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.7.0", - "jest-pnp-resolver": "^1.2.2", - "jest-util": "^29.7.0", - "jest-validate": "^29.7.0", - "resolve": "^1.20.0", - "resolve.exports": "^2.0.0", - "slash": "^3.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-resolve-dependencies": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.7.0.tgz", - "integrity": "sha512-un0zD/6qxJ+S0et7WxeI3H5XSe9lTBBR7bOHCHXkKR6luG5mwDDlIzVQ0V5cZCuoTgEdcdwzTghYkTWfubi+nA==", - "dev": true, - "license": "MIT", - "dependencies": { - "jest-regex-util": "^29.6.3", - "jest-snapshot": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-runner": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.7.0.tgz", - "integrity": "sha512-fsc4N6cPCAahybGBfTRcq5wFR6fpLznMg47sY5aDpsoejOcVYFb07AHuSnR0liMcPTgBsA3ZJL6kFOjPdoNipQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/console": "^29.7.0", - "@jest/environment": "^29.7.0", - "@jest/test-result": "^29.7.0", - "@jest/transform": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/node": "*", - "chalk": "^4.0.0", - "emittery": "^0.13.1", - "graceful-fs": "^4.2.9", - "jest-docblock": "^29.7.0", - "jest-environment-node": "^29.7.0", - "jest-haste-map": "^29.7.0", - "jest-leak-detector": "^29.7.0", - "jest-message-util": "^29.7.0", - "jest-resolve": "^29.7.0", - "jest-runtime": "^29.7.0", - "jest-util": "^29.7.0", - "jest-watcher": "^29.7.0", - "jest-worker": "^29.7.0", - "p-limit": "^3.1.0", - "source-map-support": "0.5.13" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-runtime": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.7.0.tgz", - "integrity": "sha512-gUnLjgwdGqW7B4LvOIkbKs9WGbn+QLqRQQ9juC6HndeDiezIwhDP+mhMwHWCEcfQ5RUXa6OPnFF8BJh5xegwwQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/environment": "^29.7.0", - "@jest/fake-timers": "^29.7.0", - "@jest/globals": "^29.7.0", - "@jest/source-map": "^29.6.3", - "@jest/test-result": "^29.7.0", - "@jest/transform": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/node": "*", - "chalk": "^4.0.0", - "cjs-module-lexer": "^1.0.0", - "collect-v8-coverage": "^1.0.0", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.7.0", - "jest-message-util": "^29.7.0", - "jest-mock": "^29.7.0", - "jest-regex-util": "^29.6.3", - "jest-resolve": "^29.7.0", - "jest-snapshot": "^29.7.0", - "jest-util": "^29.7.0", - "slash": "^3.0.0", - "strip-bom": "^4.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-snapshot": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.7.0.tgz", - "integrity": "sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/core": "^7.11.6", - "@babel/generator": "^7.7.2", - "@babel/plugin-syntax-jsx": "^7.7.2", - "@babel/plugin-syntax-typescript": "^7.7.2", - "@babel/types": "^7.3.3", - "@jest/expect-utils": "^29.7.0", - "@jest/transform": "^29.7.0", - "@jest/types": "^29.6.3", - "babel-preset-current-node-syntax": "^1.0.0", - "chalk": "^4.0.0", - "expect": "^29.7.0", - "graceful-fs": "^4.2.9", - "jest-diff": "^29.7.0", - "jest-get-type": "^29.6.3", - "jest-matcher-utils": "^29.7.0", - "jest-message-util": "^29.7.0", - "jest-util": "^29.7.0", - "natural-compare": "^1.4.0", - "pretty-format": "^29.7.0", - "semver": "^7.5.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-util": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.7.0.tgz", - "integrity": "sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^29.6.3", - "@types/node": "*", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "graceful-fs": "^4.2.9", - "picomatch": "^2.2.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-util/node_modules/ci-info": { - "version": "3.9.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz", - "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/sibiraj-s" - } - ], - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-validate": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.7.0.tgz", - "integrity": "sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^29.6.3", - "camelcase": "^6.2.0", - "chalk": "^4.0.0", - "jest-get-type": "^29.6.3", - "leven": "^3.1.0", - "pretty-format": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-validate/node_modules/camelcase": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", - "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/jest-watcher": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.7.0.tgz", - "integrity": "sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/test-result": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/node": "*", - "ansi-escapes": "^4.2.1", - "chalk": "^4.0.0", - "emittery": "^0.13.1", - "jest-util": "^29.7.0", - "string-length": "^4.0.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-worker": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.7.0.tgz", - "integrity": "sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*", - "jest-util": "^29.7.0", - "merge-stream": "^2.0.0", - "supports-color": "^8.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-worker/node_modules/supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" - } - }, - "node_modules/js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true, - "license": "MIT" - }, - "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==", - "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/jsesc": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", - "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==", - "dev": true, - "license": "MIT", - "bin": { - "jsesc": "bin/jsesc" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/json-bigint": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-bigint/-/json-bigint-1.0.0.tgz", - "integrity": "sha512-SiPv/8VpZuWbvLSMtTDU8hEfrZWg/mH/nV/b4o0CYbSxu1UIQPLdwKOCIyLQX+VIPO5vrLX3i8qtqFyhdPSUSQ==", - "license": "MIT", - "dependencies": { - "bignumber.js": "^9.0.0" - } - }, - "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" - }, - "node_modules/json-parse-even-better-errors": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", - "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", - "dev": true, - "license": "MIT" - }, - "node_modules/json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "license": "MIT" - }, - "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==", - "dev": true, - "license": "MIT" - }, - "node_modules/json5": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", - "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", - "dev": true, - "license": "MIT", - "bin": { - "json5": "lib/cli.js" - }, - "engines": { - "node": ">=6" - } - }, - "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", - "dependencies": { - "json-buffer": "3.0.1" - } - }, - "node_modules/kleur": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", - "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/leven": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", - "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "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==", - "dev": true, - "license": "MIT", - "dependencies": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/lines-and-columns": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", - "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", - "dev": true, - "license": "MIT" - }, - "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==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^5.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/lodash.defaults": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-4.2.0.tgz", - "integrity": "sha512-qjxPLHd3r5DnsdGacqOMU6pb/avJzdh9tFX2ymgoZE27BmjXrNy/y4LoaiTeAb+O3gL8AfpJGtqfX/ae2leYYQ==", - "license": "MIT" - }, - "node_modules/lodash.isarguments": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz", - "integrity": "sha512-chi4NHZlZqZD18a0imDHnZPrDeBbTtVN7GXMwuGdRH9qotxAjYs3aVLKc7zNOG9eddR5Ksd8rvFEBc9SsggPpg==", - "license": "MIT" - }, - "node_modules/lodash.memoize": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", - "integrity": "sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==", - "dev": true, - "license": "MIT" - }, - "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==", - "dev": true, - "license": "MIT" - }, - "node_modules/lowercase-keys": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", - "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", - "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^3.0.2" - } - }, - "node_modules/magic-string": { - "version": "0.30.15", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.15.tgz", - "integrity": "sha512-zXeaYRgZ6ldS1RJJUrMrYgNJ4fdwnyI6tVqoiIhyCyv5IVTK9BU8Ic2l253GGETQHxI4HNUwhJ3fjDhKqEoaAw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/sourcemap-codec": "^1.5.0" - } - }, - "node_modules/make-dir": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", - "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", - "dev": true, - "license": "MIT", - "dependencies": { - "semver": "^7.5.3" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/make-error": { - "version": "1.3.6", - "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", - "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", - "dev": true, - "license": "ISC" - }, - "node_modules/makeerror": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz", - "integrity": "sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "tmpl": "1.0.5" - } - }, - "node_modules/merge-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", - "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", - "dev": true, - "license": "MIT" - }, - "node_modules/merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "dev": true, - "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==", - "dev": true, - "license": "MIT", - "dependencies": { - "braces": "^3.0.3", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=8.6" - } - }, - "node_modules/mime-db": { - "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "license": "MIT", - "dependencies": { - "mime-db": "1.52.0" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/mimic-response": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", - "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==", - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/min-indent": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz", - "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/minipass": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", - "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", - "license": "ISC", - "engines": { - "node": ">=16 || 14 >=14.17" - } - }, - "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/nanoassert": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/nanoassert/-/nanoassert-1.1.0.tgz", - "integrity": "sha512-C40jQ3NzfkP53NsO8kEOFd79p4b9kDXQMwgiY1z8ZwrDZgUyom0AHwGegF4Dm99L+YoYhuaB0ceerUcXmqr1rQ==", - "license": "ISC" - }, - "node_modules/nanoid": { - "version": "3.3.8", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.8.tgz", - "integrity": "sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } - }, - "node_modules/natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", - "dev": true, - "license": "MIT" - }, - "node_modules/node-domexception": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz", - "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/jimmywarting" - }, - { - "type": "github", - "url": "https://paypal.me/jimmywarting" - } - ], - "license": "MIT", - "engines": { - "node": ">=10.5.0" - } - }, - "node_modules/node-fetch": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.2.tgz", - "integrity": "sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==", - "license": "MIT", - "dependencies": { - "data-uri-to-buffer": "^4.0.0", - "fetch-blob": "^3.1.4", - "formdata-polyfill": "^4.0.10" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/node-fetch" - } - }, - "node_modules/node-int64": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", - "integrity": "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==", - "dev": true, - "license": "MIT" - }, - "node_modules/node-releases": { - "version": "2.0.19", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.19.tgz", - "integrity": "sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw==", - "dev": true, - "license": "MIT" - }, - "node_modules/nofilter": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/nofilter/-/nofilter-3.1.0.tgz", - "integrity": "sha512-l2NNj07e9afPnhAhvgVrCD/oy2Ai1yfLpuo3EpiO1jFTsB4sFz6oIfAfSZyQzVpkZQ9xS8ZS5g1jCBgq4Hwo0g==", - "license": "MIT", - "engines": { - "node": ">=12.19" - } - }, - "node_modules/normalize-package-data": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", - "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "hosted-git-info": "^2.1.4", - "resolve": "^1.10.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - } - }, - "node_modules/normalize-package-data/node_modules/semver": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", - "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver" - } - }, - "node_modules/normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/normalize-url": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-6.1.0.tgz", - "integrity": "sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==", - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/npm-run-path": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", - "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", - "dev": true, - "license": "MIT", - "dependencies": { - "path-key": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "license": "ISC", - "dependencies": { - "wrappy": "1" - } - }, - "node_modules/onetime": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", - "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", - "dev": true, - "license": "MIT", - "dependencies": { - "mimic-fn": "^2.1.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/optionator": { - "version": "0.9.4", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", - "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", - "dev": true, - "license": "MIT", - "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-cancelable": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-2.1.1.tgz", - "integrity": "sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg==", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "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==", - "dev": true, - "license": "MIT", - "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==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^3.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/package-json-from-dist": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", - "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", - "license": "BlueOak-1.0.0" - }, - "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==", - "dev": true, - "license": "MIT", - "dependencies": { - "callsites": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/parse-json": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", - "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.0.0", - "error-ex": "^1.3.1", - "json-parse-even-better-errors": "^2.3.0", - "lines-and-columns": "^1.1.6" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "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==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "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", - "engines": { - "node": ">=8" - } - }, - "node_modules/path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true, - "license": "MIT" - }, - "node_modules/path-scurry": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.0.tgz", - "integrity": "sha512-ypGJsmGtdXUOeM5u93TyeIEfEhM6s+ljAhrk5vAvSx8uyY/02OvrZnA0YNGUrPXfpJMgI1ODd3nwz8Npx4O4cg==", - "license": "BlueOak-1.0.0", - "dependencies": { - "lru-cache": "^11.0.0", - "minipass": "^7.1.2" - }, - "engines": { - "node": "20 || >=22" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/path-scurry/node_modules/lru-cache": { - "version": "11.0.2", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.0.2.tgz", - "integrity": "sha512-123qHRfJBmo2jXDbo/a5YOQrJoHF/GNQTLzQ5+IdK5pWpceK17yRc6ozlWd25FxvGKQbIUs91fDFkXmDHTKcyA==", - "license": "ISC", - "engines": { - "node": "20 || >=22" - } - }, - "node_modules/picocolors": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", - "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", - "dev": true, - "license": "ISC" - }, - "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/pirates": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.6.tgz", - "integrity": "sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 6" - } - }, - "node_modules/pkg-dir": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", - "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "find-up": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/pkg-dir/node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/pkg-dir/node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/pkg-dir/node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/pkg-dir/node_modules/p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/pluralize": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-8.0.0.tgz", - "integrity": "sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "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==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/prettier": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.3.tgz", - "integrity": "sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==", - "dev": true, - "license": "MIT", - "bin": { - "prettier": "bin/prettier.cjs" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/prettier/prettier?sponsor=1" - } - }, - "node_modules/pretty-format": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", - "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/schemas": "^29.6.3", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/pretty-format/node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/prisma": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/prisma/-/prisma-6.0.1.tgz", - "integrity": "sha512-CaMNFHkf+DDq8zq3X/JJsQ4Koy7dyWwwtOKibkT/Am9j/tDxcfbg7+lB1Dzhx18G/+RQCMgjPYB61bhRqteNBQ==", - "dev": true, - "hasInstallScript": true, - "license": "Apache-2.0", - "dependencies": { - "@prisma/engines": "6.0.1" - }, - "bin": { - "prisma": "build/index.js" - }, - "engines": { - "node": ">=18.18" - }, - "optionalDependencies": { - "fsevents": "2.3.3" - } - }, - "node_modules/prompts": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", - "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "kleur": "^3.0.3", - "sisteransi": "^1.0.5" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/pump": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.2.tgz", - "integrity": "sha512-tUPXtzlGM8FE3P0ZL6DVs/3P58k9nk8/jZeQCurTJylQA8qFYzHFfhBJkuqyE0FifOsQ0uKWekiZ5g8wtr28cw==", - "license": "MIT", - "dependencies": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, - "node_modules/punycode": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", - "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/pure-rand": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-6.1.0.tgz", - "integrity": "sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA==", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://github.com/sponsors/dubzzz" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/fast-check" - } - ], - "license": "MIT" - }, - "node_modules/pvtsutils": { - "version": "1.3.6", - "resolved": "https://registry.npmjs.org/pvtsutils/-/pvtsutils-1.3.6.tgz", - "integrity": "sha512-PLgQXQ6H2FWCaeRak8vvk1GW462lMxB5s3Jm673N82zI4vqtVUPuZdffdZbPDFRoU8kAhItWFtPCWiPpp4/EDg==", - "license": "MIT", - "dependencies": { - "tslib": "^2.8.1" - } - }, - "node_modules/pvutils": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/pvutils/-/pvutils-1.1.3.tgz", - "integrity": "sha512-pMpnA0qRdFp32b1sJl1wOJNxZLQ2cbQx+k6tjNtZ8CpvVhNqEPRgivZ2WOUev2YMajecdH7ctUPDvEe87nariQ==", - "license": "MIT", - "engines": { - "node": ">=6.0.0" - } - }, - "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==", - "dev": true, - "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/quick-lru": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz", - "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==", - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/react-is": { - "version": "18.3.1", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", - "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", - "dev": true, - "license": "MIT" - }, - "node_modules/read-pkg": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", - "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/normalize-package-data": "^2.4.0", - "normalize-package-data": "^2.5.0", - "parse-json": "^5.0.0", - "type-fest": "^0.6.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/read-pkg-up": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", - "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", - "dev": true, - "license": "MIT", - "dependencies": { - "find-up": "^4.1.0", - "read-pkg": "^5.2.0", - "type-fest": "^0.8.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/read-pkg-up/node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/read-pkg-up/node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/read-pkg-up/node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/read-pkg-up/node_modules/p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/read-pkg-up/node_modules/type-fest": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=8" - } - }, - "node_modules/read-pkg/node_modules/type-fest": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", - "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=8" - } - }, - "node_modules/redis-errors": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/redis-errors/-/redis-errors-1.2.0.tgz", - "integrity": "sha512-1qny3OExCf0UvUV/5wpYKf2YwPcOqXzkwKKSmKHiE6ZMQs5heeE/c8eXK+PNllPvmjgAbfnsbpkGZWy8cBpn9w==", - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/redis-parser": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/redis-parser/-/redis-parser-3.0.0.tgz", - "integrity": "sha512-DJnGAeenTdpMEH6uAJRK/uiyEIH9WVsUmoLwzudwGJUwZPp80PDBWPHXSAGNPwNvIXAbe7MSUB1zQFugFml66A==", - "license": "MIT", - "dependencies": { - "redis-errors": "^1.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/regexp-tree": { - "version": "0.1.27", - "resolved": "https://registry.npmjs.org/regexp-tree/-/regexp-tree-0.1.27.tgz", - "integrity": "sha512-iETxpjK6YoRWJG5o6hXLwvjYAoW+FEZn9os0PD/b6AP6xQwsa/Y7lCVgIixBbUPMfhu+i2LtdeAqVTgGlQarfA==", - "dev": true, - "license": "MIT", - "bin": { - "regexp-tree": "bin/regexp-tree" - } - }, - "node_modules/regjsparser": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.10.0.tgz", - "integrity": "sha512-qx+xQGZVsy55CH0a1hiVwHmqjLryfh7wQyF5HO07XJ9f7dQMY/gPQHhlyDkIzJKC+x2fUCpCcUODUUUFrm7SHA==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "jsesc": "~0.5.0" - }, - "bin": { - "regjsparser": "bin/parser" - } - }, - "node_modules/regjsparser/node_modules/jsesc": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", - "integrity": "sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA==", - "dev": true, - "bin": { - "jsesc": "bin/jsesc" - } - }, - "node_modules/remeda": { - "version": "2.17.4", - "resolved": "https://registry.npmjs.org/remeda/-/remeda-2.17.4.tgz", - "integrity": "sha512-pviU2Ag7Qx9mOCAKO4voxDx/scfLzdhp3v85qDO4xxntQsU76uE9sgrAAdK1ATn4zzaOJqCXYMMNRP+O9F4Wiw==", - "license": "MIT", - "dependencies": { - "type-fest": "^4.27.0" - } - }, - "node_modules/remeda/node_modules/type-fest": { - "version": "4.30.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.30.0.tgz", - "integrity": "sha512-G6zXWS1dLj6eagy6sVhOMQiLtJdxQBHIA9Z6HFUNLOlr6MFOgzV8wvmidtPONfPtEUv0uZsy77XJNzTAfwPDaA==", - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/require-from-string": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", - "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/resolve": { - "version": "1.22.8", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", - "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-core-module": "^2.13.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/resolve-alpn": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/resolve-alpn/-/resolve-alpn-1.2.1.tgz", - "integrity": "sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==", - "license": "MIT" - }, - "node_modules/resolve-cwd": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", - "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", - "dev": true, - "license": "MIT", - "dependencies": { - "resolve-from": "^5.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/resolve-cwd/node_modules/resolve-from": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "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==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/resolve-pkg-maps": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", - "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" - } - }, - "node_modules/resolve.exports": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.3.tgz", - "integrity": "sha512-OcXjMsGdhL4XnbShKpAcSqPMzQoYkYyhbEaeSko47MjRP9NfEQMhZkXL1DoFlt9LWQn4YttrdnV6X2OiyzBi+A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - } - }, - "node_modules/responselike": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/responselike/-/responselike-2.0.1.tgz", - "integrity": "sha512-4gl03wn3hj1HP3yzgdI7d3lCkF95F21Pz4BPGvKHinyQzALR5CapwC8yIi0Rh58DEMQ/SguC03wFj2k0M/mHhw==", - "license": "MIT", - "dependencies": { - "lowercase-keys": "^2.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "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/rimraf": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-6.0.1.tgz", - "integrity": "sha512-9dkvaxAsk/xNXSJzMgFqqMCuFgt2+KsOFek3TMLfo8NCPfWpBmqwyNn5Y+NX56QUYfCtsyhF3ayiboEoUmJk/A==", - "license": "ISC", - "dependencies": { - "glob": "^11.0.0", - "package-json-from-dist": "^1.0.0" - }, - "bin": { - "rimraf": "dist/esm/bin.mjs" - }, - "engines": { - "node": "20 || >=22" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/rimraf/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/rimraf/node_modules/glob": { - "version": "11.0.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-11.0.0.tgz", - "integrity": "sha512-9UiX/Bl6J2yaBbxKoEBRm4Cipxgok8kQYcOPEhScPwebu2I0HoQOuYdIO6S3hLuWoZgpDpwQZMzTFxgpkyT76g==", - "license": "ISC", - "dependencies": { - "foreground-child": "^3.1.0", - "jackspeak": "^4.0.1", - "minimatch": "^10.0.0", - "minipass": "^7.1.2", - "package-json-from-dist": "^1.0.0", - "path-scurry": "^2.0.0" - }, - "bin": { - "glob": "dist/esm/bin.mjs" - }, - "engines": { - "node": "20 || >=22" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/rimraf/node_modules/minimatch": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.0.1.tgz", - "integrity": "sha512-ethXTt3SGGR+95gudmqJ1eNhRO7eGEGIgYA9vnPatK4/etz2MEVDno5GMCibdMTuBMyElzIlgxMna3K94XDIDQ==", - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": "20 || >=22" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/rollup": { - "version": "4.28.1", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.28.1.tgz", - "integrity": "sha512-61fXYl/qNVinKmGSTHAZ6Yy8I3YIJC/r2m9feHo6SwVAVcLT5MPwOUFe7EuURA/4m0NR8lXG4BBXuo/IZEsjMg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/estree": "1.0.6" - }, - "bin": { - "rollup": "dist/bin/rollup" - }, - "engines": { - "node": ">=18.0.0", - "npm": ">=8.0.0" - }, - "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.28.1", - "@rollup/rollup-android-arm64": "4.28.1", - "@rollup/rollup-darwin-arm64": "4.28.1", - "@rollup/rollup-darwin-x64": "4.28.1", - "@rollup/rollup-freebsd-arm64": "4.28.1", - "@rollup/rollup-freebsd-x64": "4.28.1", - "@rollup/rollup-linux-arm-gnueabihf": "4.28.1", - "@rollup/rollup-linux-arm-musleabihf": "4.28.1", - "@rollup/rollup-linux-arm64-gnu": "4.28.1", - "@rollup/rollup-linux-arm64-musl": "4.28.1", - "@rollup/rollup-linux-loongarch64-gnu": "4.28.1", - "@rollup/rollup-linux-powerpc64le-gnu": "4.28.1", - "@rollup/rollup-linux-riscv64-gnu": "4.28.1", - "@rollup/rollup-linux-s390x-gnu": "4.28.1", - "@rollup/rollup-linux-x64-gnu": "4.28.1", - "@rollup/rollup-linux-x64-musl": "4.28.1", - "@rollup/rollup-win32-arm64-msvc": "4.28.1", - "@rollup/rollup-win32-ia32-msvc": "4.28.1", - "@rollup/rollup-win32-x64-msvc": "4.28.1", - "fsevents": "~2.3.2" - } - }, - "node_modules/rollup-plugin-dts": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/rollup-plugin-dts/-/rollup-plugin-dts-6.1.1.tgz", - "integrity": "sha512-aSHRcJ6KG2IHIioYlvAOcEq6U99sVtqDDKVhnwt70rW6tsz3tv5OSjEiWcgzfsHdLyGXZ/3b/7b/+Za3Y6r1XA==", - "dev": true, - "license": "LGPL-3.0-only", - "dependencies": { - "magic-string": "^0.30.10" - }, - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/Swatinem" - }, - "optionalDependencies": { - "@babel/code-frame": "^7.24.2" - }, - "peerDependencies": { - "rollup": "^3.29.4 || ^4", - "typescript": "^4.5 || ^5.0" - } - }, - "node_modules/rollup-plugin-esbuild": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/rollup-plugin-esbuild/-/rollup-plugin-esbuild-6.1.1.tgz", - "integrity": "sha512-CehMY9FAqJD5OUaE/Mi1r5z0kNeYxItmRO2zG4Qnv2qWKF09J2lTy5GUzjJR354ZPrLkCj4fiBN41lo8PzBUhw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@rollup/pluginutils": "^5.0.5", - "debug": "^4.3.4", - "es-module-lexer": "^1.3.1", - "get-tsconfig": "^4.7.2" - }, - "engines": { - "node": ">=14.18.0" - }, - "peerDependencies": { - "esbuild": ">=0.18.0", - "rollup": "^1.20.0 || ^2.0.0 || ^3.0.0 || ^4.0.0" - } - }, - "node_modules/rollup/node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.28.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.28.1.tgz", - "integrity": "sha512-fzgeABz7rrAlKYB0y2kSEiURrI0691CSL0+KXwKwhxvj92VULEDQLpBYLHpF49MSiPG4sq5CK3qHMnb9tlCjBw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "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==", - "dev": true, - "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==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/sha3": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/sha3/-/sha3-2.1.4.tgz", - "integrity": "sha512-S8cNxbyb0UGUM2VhRD4Poe5N58gJnJsLJ5vC7FYWGUmGhcsj4++WaIOBFVDxlG0W3To6xBuiRh+i0Qp2oNCOtg==", - "license": "MIT", - "dependencies": { - "buffer": "6.0.3" - } - }, - "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", - "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", - "engines": { - "node": ">=8" - } - }, - "node_modules/signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", - "dev": true, - "license": "ISC" - }, - "node_modules/sisteransi": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", - "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", - "dev": true, - "license": "MIT" - }, - "node_modules/slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/source-map-support": { - "version": "0.5.13", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", - "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==", - "dev": true, - "license": "MIT", - "dependencies": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, - "node_modules/spdx-correct": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz", - "integrity": "sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" - } - }, - "node_modules/spdx-exceptions": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.5.0.tgz", - "integrity": "sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==", - "dev": true, - "license": "CC-BY-3.0" - }, - "node_modules/spdx-expression-parse": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", - "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" - } - }, - "node_modules/spdx-license-ids": { - "version": "3.0.20", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.20.tgz", - "integrity": "sha512-jg25NiDV/1fLtSgEgyvVyDunvaNHbuwF9lfNV17gSmPFAlYzdfNBlLtLzXTevwkPj7DhGbmN9VnmJIgLnhvaBw==", - "dev": true, - "license": "CC0-1.0" - }, - "node_modules/sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", - "dev": true, - "license": "BSD-3-Clause" - }, - "node_modules/stack-utils": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz", - "integrity": "sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "escape-string-regexp": "^2.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/stack-utils/node_modules/escape-string-regexp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", - "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/standard-as-callback": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/standard-as-callback/-/standard-as-callback-2.1.0.tgz", - "integrity": "sha512-qoRRSyROncaz1z0mvYqIE4lCd9p2R90i6GxW3uZv5ucSu8tU7B5HXUP1gG8pVZsYNVaXjk8ClXHPttLyxAL48A==", - "license": "MIT" - }, - "node_modules/string-length": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", - "integrity": "sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "char-regex": "^1.0.2", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/string-width-cjs": { - "name": "string-width", - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-ansi-cjs": { - "name": "strip-ansi", - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-bom": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", - "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-final-newline": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", - "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/strip-indent": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz", - "integrity": "sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "min-indent": "^1.0.0" - }, - "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==", - "dev": true, - "license": "MIT", - "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==", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/supports-preserve-symlinks-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", - "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/test-exclude": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", - "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", - "dev": true, - "license": "ISC", - "dependencies": { - "@istanbuljs/schema": "^0.1.2", - "glob": "^7.1.4", - "minimatch": "^3.0.4" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/tmpl": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", - "integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==", - "dev": true, - "license": "BSD-3-Clause" - }, - "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==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "node_modules/tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", - "license": "MIT" - }, - "node_modules/ts-api-utils": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.4.3.tgz", - "integrity": "sha512-i3eMG77UTMD0hZhgRS562pv83RC6ukSAC2GMNWc+9dieh/+jDM5u5YG+NHX6VNDRHQcHwmsTHctP9LhbC3WxVw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=16" - }, - "peerDependencies": { - "typescript": ">=4.2.0" - } - }, - "node_modules/ts-custom-error": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/ts-custom-error/-/ts-custom-error-3.3.1.tgz", - "integrity": "sha512-5OX1tzOjxWEgsr/YEUWSuPrQ00deKLh6D7OTWcvNHm12/7QPyRh8SYpyWvA4IZv8H/+GQWQEh/kwo95Q9OVW1A==", - "license": "MIT", - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/ts-jest": { - "version": "29.2.5", - "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.2.5.tgz", - "integrity": "sha512-KD8zB2aAZrcKIdGk4OwpJggeLcH1FgrICqDSROWqlnJXGCXK4Mn6FcdK2B6670Xr73lHMG1kHw8R87A0ecZ+vA==", - "dev": true, - "license": "MIT", - "dependencies": { - "bs-logger": "^0.2.6", - "ejs": "^3.1.10", - "fast-json-stable-stringify": "^2.1.0", - "jest-util": "^29.0.0", - "json5": "^2.2.3", - "lodash.memoize": "^4.1.2", - "make-error": "^1.3.6", - "semver": "^7.6.3", - "yargs-parser": "^21.1.1" - }, - "bin": { - "ts-jest": "cli.js" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0" - }, - "peerDependencies": { - "@babel/core": ">=7.0.0-beta.0 <8", - "@jest/transform": "^29.0.0", - "@jest/types": "^29.0.0", - "babel-jest": "^29.0.0", - "jest": "^29.0.0", - "typescript": ">=4.3 <6" - }, - "peerDependenciesMeta": { - "@babel/core": { - "optional": true - }, - "@jest/transform": { - "optional": true - }, - "@jest/types": { - "optional": true - }, - "babel-jest": { - "optional": true - }, - "esbuild": { - "optional": true - } - } - }, - "node_modules/ts-node": { - "version": "10.9.2", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", - "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@cspotcode/source-map-support": "^0.8.0", - "@tsconfig/node10": "^1.0.7", - "@tsconfig/node12": "^1.0.7", - "@tsconfig/node14": "^1.0.0", - "@tsconfig/node16": "^1.0.2", - "acorn": "^8.4.1", - "acorn-walk": "^8.1.1", - "arg": "^4.1.0", - "create-require": "^1.1.0", - "diff": "^4.0.1", - "make-error": "^1.1.1", - "v8-compile-cache-lib": "^3.0.1", - "yn": "3.1.1" - }, - "bin": { - "ts-node": "dist/bin.js", - "ts-node-cwd": "dist/bin-cwd.js", - "ts-node-esm": "dist/bin-esm.js", - "ts-node-script": "dist/bin-script.js", - "ts-node-transpile-only": "dist/bin-transpile.js", - "ts-script": "dist/bin-script-deprecated.js" - }, - "peerDependencies": { - "@swc/core": ">=1.2.50", - "@swc/wasm": ">=1.2.50", - "@types/node": "*", - "typescript": ">=2.7" - }, - "peerDependenciesMeta": { - "@swc/core": { - "optional": true - }, - "@swc/wasm": { - "optional": true - } - } - }, - "node_modules/tslib": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", - "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", - "license": "0BSD" - }, - "node_modules/tsx": { - "version": "4.19.2", - "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.19.2.tgz", - "integrity": "sha512-pOUl6Vo2LUq/bSa8S5q7b91cgNSjctn9ugq/+Mvow99qW6x/UZYwzxy/3NmqoT66eHYfCVvFvACC58UBPFf28g==", - "dev": true, - "license": "MIT", - "dependencies": { - "esbuild": "~0.23.0", - "get-tsconfig": "^4.7.5" - }, - "bin": { - "tsx": "dist/cli.mjs" - }, - "engines": { - "node": ">=18.0.0" - }, - "optionalDependencies": { - "fsevents": "~2.3.3" - } - }, - "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==", - "dev": true, - "license": "MIT", - "dependencies": { - "prelude-ls": "^1.2.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/type-detect": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/type-fest": { - "version": "0.21.3", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", - "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/typescript": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.2.tgz", - "integrity": "sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==", - "dev": true, - "license": "Apache-2.0", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" - } - }, - "node_modules/typescript-eslint": { - "version": "8.18.0", - "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.18.0.tgz", - "integrity": "sha512-Xq2rRjn6tzVpAyHr3+nmSg1/9k9aIHnJ2iZeOH7cfGOWqTkXTm3kwpQglEuLGdNrYvPF+2gtAs+/KF5rjVo+WQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/eslint-plugin": "8.18.0", - "@typescript-eslint/parser": "8.18.0", - "@typescript-eslint/utils": "8.18.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.19.8", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", - "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==", - "license": "MIT" - }, - "node_modules/update-browserslist-db": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.1.tgz", - "integrity": "sha512-R8UzCaa9Az+38REPiJ1tXlImTJXlVfgHZsglwBD/k6nj76ctsH1E3q4doGrukiLQd3sGQYu56r5+lo5r94l29A==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "dependencies": { - "escalade": "^3.2.0", - "picocolors": "^1.1.0" - }, - "bin": { - "update-browserslist-db": "cli.js" - }, - "peerDependencies": { - "browserslist": ">= 4.21.0" - } - }, - "node_modules/uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "punycode": "^2.1.0" - } - }, - "node_modules/v8-compile-cache-lib": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", - "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", - "dev": true, - "license": "MIT" - }, - "node_modules/v8-to-istanbul": { - "version": "9.3.0", - "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.3.0.tgz", - "integrity": "sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA==", - "dev": true, - "license": "ISC", - "dependencies": { - "@jridgewell/trace-mapping": "^0.3.12", - "@types/istanbul-lib-coverage": "^2.0.1", - "convert-source-map": "^2.0.0" - }, - "engines": { - "node": ">=10.12.0" - } - }, - "node_modules/validate-npm-package-license": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", - "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" - } - }, - "node_modules/walker": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz", - "integrity": "sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "makeerror": "1.0.12" - } - }, - "node_modules/web-streams-polyfill": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.3.3.tgz", - "integrity": "sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw==", - "license": "MIT", - "engines": { - "node": ">= 8" - } - }, - "node_modules/webcrypto-core": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/webcrypto-core/-/webcrypto-core-1.8.1.tgz", - "integrity": "sha512-P+x1MvlNCXlKbLSOY4cYrdreqPG5hbzkmawbcXLKN/mf6DZW0SdNNkZ+sjwsqVkI4A4Ko2sPZmkZtCKY58w83A==", - "license": "MIT", - "dependencies": { - "@peculiar/asn1-schema": "^2.3.13", - "@peculiar/json-schema": "^1.1.12", - "asn1js": "^3.0.5", - "pvtsutils": "^1.3.5", - "tslib": "^2.7.0" - } - }, - "node_modules/webidl-conversions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", - "license": "BSD-2-Clause" - }, - "node_modules/whatwg-url": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", - "license": "MIT", - "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.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", - "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==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/wrap-ansi-cjs": { - "name": "wrap-ansi", - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "license": "ISC" - }, - "node_modules/write-file-atomic": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.2.tgz", - "integrity": "sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==", - "dev": true, - "license": "ISC", - "dependencies": { - "imurmurhash": "^0.1.4", - "signal-exit": "^3.0.7" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/ws": { - "version": "7.5.10", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz", - "integrity": "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==", - "license": "MIT", - "engines": { - "node": ">=8.3.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": "^5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } - } - }, - "node_modules/y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=10" - } - }, - "node_modules/yallist": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", - "dev": true, - "license": "ISC" - }, - "node_modules/yaml": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.6.1.tgz", - "integrity": "sha512-7r0XPzioN/Q9kXBro/XPnA6kznR73DHq+GXh5ON7ZozRO6aMjbmiBuKste2wslTFkC5d1dw0GooOCepZXJ2SAg==", - "license": "ISC", - "bin": { - "yaml": "bin.mjs" - }, - "engines": { - "node": ">= 14" - } - }, - "node_modules/yargs": { - "version": "17.7.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", - "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", - "dev": true, - "license": "MIT", - "dependencies": { - "cliui": "^8.0.1", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.1.1" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/yargs-parser": { - "version": "21.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", - "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=12" - } - }, - "node_modules/yn": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", - "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "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==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - } - } -} From b6524a98120a57866d6f4ed5bb6ff02a0f2f2085 Mon Sep 17 00:00:00 2001 From: Vardominator Date: Fri, 13 Dec 2024 05:15:45 +0000 Subject: [PATCH 03/22] some progress --- package.json | 1 + src/adapters/maestro.ts | 65 +++++++++++++++++++++++++++++++++++++---- 2 files changed, 60 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 9e82c4f..d3d0a70 100644 --- a/package.json +++ b/package.json @@ -51,6 +51,7 @@ "@blockfrost/blockfrost-js": "^5.5.0", "@cardano-ogmios/client": "^6.5.0", "@cardano-ogmios/schema": "^6.5.0", + "@maestro-org/typescript-sdk": "^1.6.1", "@minswap/lucid-cardano": "0.10.10-minswap.4", "@minswap/tiny-invariant": "^1.2.0", "big.js": "^6.2.1", diff --git a/src/adapters/maestro.ts b/src/adapters/maestro.ts index 2cdeb7f..595f317 100644 --- a/src/adapters/maestro.ts +++ b/src/adapters/maestro.ts @@ -4,6 +4,9 @@ import { Asset } from "../types/asset"; import { FactoryV2 } from "../types/factory"; import { LbeV2Types } from "../types/lbe-v2"; import { TxHistory } from "../types/tx.internal"; +import { DexV1Constant } from "../types/constants"; +import { checkValidPoolOutput } from "../types/pool.internal"; +import invariant from "@minswap/tiny-invariant"; import { Adapter, GetPoolByIdParams, @@ -16,29 +19,79 @@ import { GetV2PoolHistoryParams, GetV2PoolPriceParams, } from "./adapter"; +import { getScriptHashFromAddress } from "../utils/address-utils.internal"; +import { NetworkId } from "../types/network"; +import { MaestroClient } from "@maestro-org/typescript-sdk"; + +export declare class MaestroServerError { + code: number; + error: string; + message: string; +} export class MaestroAdapter implements Adapter { - getAssetDecimals(asset: string): Promise { - throw new Error("Method not implemented."); + protected readonly networkId: NetworkId; + private readonly maestroClient: MaestroClient; + + constructor(networkId: NetworkId, maestroClient: MaestroClient) { + this.networkId = networkId; + this.maestroClient = maestroClient; } - getDatumByDatumHash(datumHash: string): Promise { - throw new Error("Method not implemented."); + + public async getAssetDecimals(asset: string): Promise { + if (asset === "lovelace") { + return 6; + } + try { + const assetAInfo = await this.maestroClient.assets.assetInfo(asset); + return assetAInfo.data.token_registry_metadata?.decimals ?? 0; + } catch (err) { + if (err instanceof MaestroServerError && err.code === 400) { + return 0; + } + throw err; + } + } + + public async getDatumByDatumHash(datumHash: string): Promise { + const scriptsDatum = await this.maestroClient.datum.lookupDatum(datumHash); + return scriptsDatum.data.bytes; } - currentSlot(): Promise { + + public async currentSlot(): Promise { + // TODO: implement latest block handler in typescript-sdk throw new Error("Method not implemented."); } - getV1PoolInTx({ txHash }: GetPoolInTxParams): Promise { + + public async getV1PoolInTx({ + txHash, + }: GetPoolInTxParams): Promise { + const poolTx = await this.maestroClient.transactions.txInfo(txHash); + const poolUtxo = poolTx.data.outputs.find( + (o: (typeof poolTx.data.outputs)[number]) => + getScriptHashFromAddress(o.address) === DexV1Constant.POOL_SCRIPT_HASH, + ); + if (!poolUtxo) { + return null; + } + + // TODO + throw new Error("Method not implemented."); } + getV1PoolById({ id }: GetPoolByIdParams): Promise { throw new Error("Method not implemented."); } + getV1Pools(params: GetPoolsParams): Promise { throw new Error("Method not implemented."); } + getV1PoolHistory(params: GetV1PoolHistoryParams): Promise { throw new Error("Method not implemented."); } + getV1PoolPrice(params: GetPoolPriceParams): Promise<[Big, Big]> { throw new Error("Method not implemented."); } From b50fae4b8382bd86dfbae48c497cf65f38643976 Mon Sep 17 00:00:00 2001 From: Vardominator Date: Fri, 13 Dec 2024 05:28:37 +0000 Subject: [PATCH 04/22] one more --- src/adapters/maestro.ts | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/src/adapters/maestro.ts b/src/adapters/maestro.ts index 595f317..3e4b886 100644 --- a/src/adapters/maestro.ts +++ b/src/adapters/maestro.ts @@ -1,12 +1,12 @@ import { Address } from "@minswap/lucid-cardano"; -import { PoolV1, PoolV2, StablePool } from ".."; +import { MaestroClient } from "@maestro-org/typescript-sdk"; +import { DexV1Constant } from "../types/constants"; import { Asset } from "../types/asset"; import { FactoryV2 } from "../types/factory"; import { LbeV2Types } from "../types/lbe-v2"; +import { NetworkId } from "../types/network"; +import { PoolV1, PoolV2, StablePool } from ".."; import { TxHistory } from "../types/tx.internal"; -import { DexV1Constant } from "../types/constants"; -import { checkValidPoolOutput } from "../types/pool.internal"; -import invariant from "@minswap/tiny-invariant"; import { Adapter, GetPoolByIdParams, @@ -20,8 +20,6 @@ import { GetV2PoolPriceParams, } from "./adapter"; import { getScriptHashFromAddress } from "../utils/address-utils.internal"; -import { NetworkId } from "../types/network"; -import { MaestroClient } from "@maestro-org/typescript-sdk"; export declare class MaestroServerError { code: number; @@ -63,6 +61,7 @@ export class MaestroAdapter implements Adapter { throw new Error("Method not implemented."); } + // TODO public async getV1PoolInTx({ txHash, }: GetPoolInTxParams): Promise { @@ -80,8 +79,18 @@ export class MaestroAdapter implements Adapter { throw new Error("Method not implemented."); } - getV1PoolById({ id }: GetPoolByIdParams): Promise { - throw new Error("Method not implemented."); + public async getV1PoolById({ + id, + }: GetPoolByIdParams): Promise { + const nft = `${DexV1Constant.POOL_NFT_POLICY_ID}${id}`; + const nftTxs = await this.maestroClient.assets.assetTxs(nft, { + count: 1, + order: "desc", + }); + if (nftTxs.data.length === 0) { + return null; + } + return this.getV1PoolInTx({ txHash: nftTxs.data[0].tx_hash }); } getV1Pools(params: GetPoolsParams): Promise { From 57311deca55cce1abd9125a4d558eafde42b4af2 Mon Sep 17 00:00:00 2001 From: Vardominator Date: Fri, 13 Dec 2024 20:40:54 +0000 Subject: [PATCH 05/22] brain hurts --- .prettierrc | 11 +- ...ample.ts => blockfrost-adapter-example.ts} | 355 +++++++++--------- examples/maestro-adapter-example.ts | 30 ++ package.json | 1 + src/adapters/adapter.ts | 17 +- src/adapters/blockfrost.ts | 83 ++-- src/adapters/maestro.ts | 159 +++++--- src/utils/lucid.ts | 34 +- 8 files changed, 416 insertions(+), 274 deletions(-) rename examples/{example.ts => blockfrost-adapter-example.ts} (81%) diff --git a/.prettierrc b/.prettierrc index 0967ef4..531bb26 100644 --- a/.prettierrc +++ b/.prettierrc @@ -1 +1,10 @@ -{} +{ + "printWidth": 80, + "tabWidth": 2, + "trailingComma": "all", + "singleQuote": true, + "semi": true, + "importOrder": ["^@core/(.*)$", "^@server/(.*)$", "^@ui/(.*)$", "^[./]"], + "importOrderSeparation": true, + "importOrderSortSpecifiers": true +} diff --git a/examples/example.ts b/examples/blockfrost-adapter-example.ts similarity index 81% rename from examples/example.ts rename to examples/blockfrost-adapter-example.ts index e1d4f5c..f9f4330 100644 --- a/examples/example.ts +++ b/examples/blockfrost-adapter-example.ts @@ -1,4 +1,4 @@ -import { BlockFrostAPI } from "@blockfrost/blockfrost-js"; +import { BlockFrostAPI } from '@blockfrost/blockfrost-js'; import { Address, Blockfrost, @@ -9,14 +9,13 @@ import { OutRef, TxComplete, UTxO, -} from "@minswap/lucid-cardano"; -import invariant from "@minswap/tiny-invariant"; -import BigNumber from "bignumber.js"; +} from '@minswap/lucid-cardano'; +import invariant from '@minswap/tiny-invariant'; +import BigNumber from 'bignumber.js'; import { ADA, Asset, - BlockfrostAdapter, calculateDeposit, calculateSwapExactIn, calculateSwapExactOut, @@ -32,47 +31,49 @@ import { StableOrder, StableswapCalculation, StableswapConstant, -} from "../src"; -import { LbeV2 } from "../src/lbe-v2/lbe-v2"; -import { Stableswap } from "../src/stableswap"; -import { LbeV2Types } from "../src/types/lbe-v2"; -import { getBackendLucidInstance } from "../src/utils/lucid"; -import { Slippage } from "../src/utils/slippage.internal"; +} from '../src'; + +import { BlockfrostAdapter } from '../src/adapters/blockfrost'; +import { LbeV2 } from '../src/lbe-v2/lbe-v2'; +import { Stableswap } from '../src/stableswap'; +import { LbeV2Types } from '../src/types/lbe-v2'; +import { getBackendLucidInstance } from '../src/utils/lucid'; +import { Slippage } from '../src/utils/slippage.internal'; const MIN: Asset = { - policyId: "e16c2dc8ae937e8d3790c7fd7168d7b994621ba14ca11415f39fed72", - tokenName: "4d494e", + policyId: 'e16c2dc8ae937e8d3790c7fd7168d7b994621ba14ca11415f39fed72', + tokenName: '4d494e', }; async function main(): Promise { - const network: Network = "Preprod"; - const blockfrostProjectId = ""; - const blockfrostUrl = "https://cardano-preprod.blockfrost.io/api/v0"; + const network: Network = 'Preprod'; + const blockfrostProjectId = ''; + const blockfrostUrl = 'https://cardano-preprod.blockfrost.io/api/v0'; const address = - "addr_test1qqf2dhk96l2kq4xh2fkhwksv0h49vy9exw383eshppn863jereuqgh2zwxsedytve5gp9any9jwc5hz98sd47rwfv40stc26fr"; + 'addr_test1qqf2dhk96l2kq4xh2fkhwksv0h49vy9exw383eshppn863jereuqgh2zwxsedytve5gp9any9jwc5hz98sd47rwfv40stc26fr'; const lucid = await getBackendLucidInstance( network, blockfrostProjectId, blockfrostUrl, - address + address, ); const blockfrostAdapter = new BlockfrostAdapter( NetworkId.TESTNET, new BlockFrostAPI({ projectId: blockfrostProjectId, - network: "preprod", - }) + network: 'preprod', + }), ); const txComplete = await _lbeV2DepositOrderExample( lucid, address, - blockfrostAdapter + blockfrostAdapter, ); const signedTx = await txComplete - .signWithPrivateKey("") + .signWithPrivateKey('') .complete(); const txId = await signedTx.submit(); @@ -82,7 +83,7 @@ async function main(): Promise { async function getPoolById( network: Network, blockfrostAdapter: BlockfrostAdapter, - poolId: string + poolId: string, ): Promise<{ poolState: PoolV1.State; poolDatum: PoolV1.Datum }> { const pool = await blockfrostAdapter.getV1PoolById({ id: poolId, @@ -92,11 +93,11 @@ async function getPoolById( } const rawRoolDatum = await blockfrostAdapter.getDatumByDatumHash( - pool.datumHash + pool.datumHash, ); const poolDatum = PoolV1.Datum.fromPlutusData( - network === "Mainnet" ? NetworkId.MAINNET : NetworkId.TESTNET, - Data.from(rawRoolDatum) as Constr + network === 'Mainnet' ? NetworkId.MAINNET : NetworkId.TESTNET, + Data.from(rawRoolDatum) as Constr, ); return { poolState: pool, @@ -110,16 +111,16 @@ async function _depositTxExample( lucid: Lucid, blockfrostAdapter: BlockfrostAdapter, address: Address, - availableUtxos: UTxO[] + availableUtxos: UTxO[], ): Promise { // ID of ADA-MIN Pool on Testnet Preprod const poolId = - "3bb0079303c57812462dec9de8fb867cef8fd3768de7f12c77f6f0dd80381d0d"; + '3bb0079303c57812462dec9de8fb867cef8fd3768de7f12c77f6f0dd80381d0d'; const { poolState, poolDatum } = await getPoolById( network, blockfrostAdapter, - poolId + poolId, ); const depositedAmountA = 10_000_000n; @@ -154,16 +155,16 @@ async function _swapExactInTxExample( lucid: Lucid, blockfrostAdapter: BlockfrostAdapter, address: Address, - availableUtxos: UTxO[] + availableUtxos: UTxO[], ): Promise { // ID of ADA-MIN Pool on Testnet Preprod const poolId = - "3bb0079303c57812462dec9de8fb867cef8fd3768de7f12c77f6f0dd80381d0d"; + '3bb0079303c57812462dec9de8fb867cef8fd3768de7f12c77f6f0dd80381d0d'; const { poolState, poolDatum } = await getPoolById( network, blockfrostAdapter, - poolId + poolId, ); const swapAmountADA = 10_000_000n; @@ -195,16 +196,16 @@ async function _swapExactOutTxExample( lucid: Lucid, blockfrostAdapter: BlockfrostAdapter, address: Address, - availableUtxos: UTxO[] + availableUtxos: UTxO[], ): Promise { // ID of ADA-MIN Pool on Testnet Preprod const poolId = - "3bb0079303c57812462dec9de8fb867cef8fd3768de7f12c77f6f0dd80381d0d"; + '3bb0079303c57812462dec9de8fb867cef8fd3768de7f12c77f6f0dd80381d0d'; const { poolState, poolDatum } = await getPoolById( network, blockfrostAdapter, - poolId + poolId, ); const exactAmountOut = 10_000n; @@ -235,11 +236,11 @@ async function _swapLimitExample( lucid: Lucid, blockfrostAdapter: BlockfrostAdapter, address: Address, - availableUtxos: UTxO[] + availableUtxos: UTxO[], ): Promise { // ID of ADA-MIN Pool on Testnet Preprod const poolId = - "3bb0079303c57812462dec9de8fb867cef8fd3768de7f12c77f6f0dd80381d0d"; + '3bb0079303c57812462dec9de8fb867cef8fd3768de7f12c77f6f0dd80381d0d'; const { poolDatum } = await getPoolById(network, blockfrostAdapter, poolId); @@ -266,16 +267,16 @@ async function _withdrawTxExample( lucid: Lucid, blockfrostAdapter: BlockfrostAdapter, address: Address, - availableUtxos: UTxO[] + availableUtxos: UTxO[], ): Promise { // ID of ADA-MIN Pool on Testnet Preprod const poolId = - "3bb0079303c57812462dec9de8fb867cef8fd3768de7f12c77f6f0dd80381d0d"; + '3bb0079303c57812462dec9de8fb867cef8fd3768de7f12c77f6f0dd80381d0d'; const { poolState, poolDatum } = await getPoolById( network, blockfrostAdapter, - poolId + poolId, ); const lpAsset = Asset.fromString(poolState.assetLP); @@ -311,16 +312,16 @@ async function _zapTxExample( lucid: Lucid, blockfrostAdapter: BlockfrostAdapter, address: Address, - availableUtxos: UTxO[] + availableUtxos: UTxO[], ): Promise { // ID of ADA-MIN Pool on Testnet Preprod const poolId = - "3bb0079303c57812462dec9de8fb867cef8fd3768de7f12c77f6f0dd80381d0d"; + '3bb0079303c57812462dec9de8fb867cef8fd3768de7f12c77f6f0dd80381d0d'; const { poolState, poolDatum } = await getPoolById( network, blockfrostAdapter, - poolId + poolId, ); const zapAmount = 10_000_000n; @@ -351,12 +352,12 @@ async function _cancelTxExample( lucid: Lucid, blockFrostAdapter: BlockfrostAdapter, address: Address, - orderOutRef: OutRef + orderOutRef: OutRef, ): Promise { const orderUtxo = (await lucid.utxosByOutRef([orderOutRef]))[0]; - invariant(orderUtxo.datumHash, "order utxo missing datum hash"); + invariant(orderUtxo.datumHash, 'order utxo missing datum hash'); orderUtxo.datum = await blockFrostAdapter.getDatumByDatumHash( - orderUtxo.datumHash + orderUtxo.datumHash, ); const dex = new Dex(lucid); return dex.buildCancelOrder({ @@ -368,14 +369,14 @@ async function _cancelTxExample( // MARK: DEX V2 async function _createPoolV2( lucid: Lucid, - blockFrostAdapter: BlockfrostAdapter + blockFrostAdapter: BlockfrostAdapter, ): Promise { const dexV2 = new DexV2(lucid, blockFrostAdapter); const txComplete = await dexV2.createPoolTx({ assetA: ADA, assetB: { - policyId: "e16c2dc8ae937e8d3790c7fd7168d7b994621ba14ca11415f39fed72", - tokenName: "434d", + policyId: 'e16c2dc8ae937e8d3790c7fd7168d7b994621ba14ca11415f39fed72', + tokenName: '434d', }, amountA: 10_000000n, amountB: 300_000000n, @@ -389,13 +390,13 @@ async function _swapExactInV2TxExample( lucid: Lucid, blockfrostAdapter: BlockfrostAdapter, address: Address, - availableUtxos: UTxO[] + availableUtxos: UTxO[], ): Promise { const assetA = ADA; const assetB = MIN; const pool = await blockfrostAdapter.getV2PoolByPair(assetA, assetB); - invariant(pool, "could not find pool"); + invariant(pool, 'could not find pool'); const swapAmount = 5_000_000n; const amountOut = DexV2Calculation.calculateAmountOut({ @@ -409,7 +410,7 @@ async function _swapExactInV2TxExample( const acceptedAmountOut = Slippage.apply({ slippage: slippageTolerance, amount: amountOut, - type: "down", + type: 'down', }); return new DexV2(lucid, blockfrostAdapter).createBulkOrdersTx({ @@ -434,14 +435,14 @@ async function _swapExactOutV2TxExample( lucid: Lucid, blockfrostAdapter: BlockfrostAdapter, address: Address, - availableUtxos: UTxO[] + availableUtxos: UTxO[], ): Promise { const assetA = ADA; const assetB = MIN; const swapAmount = 10_000n; const pool = await blockfrostAdapter.getV2PoolByPair(assetA, assetB); - invariant(pool, "could not find pool"); + invariant(pool, 'could not find pool'); const amountIn = DexV2Calculation.calculateAmountIn({ reserveIn: pool.reserveA, @@ -455,7 +456,7 @@ async function _swapExactOutV2TxExample( const maximumAmountIn = Slippage.apply({ slippage: slippageTolerance, amount: amountIn, - type: "up", + type: 'up', }); return new DexV2(lucid, blockfrostAdapter).createBulkOrdersTx({ sender: address, @@ -478,7 +479,7 @@ async function _depositV2TxExample( lucid: Lucid, blockFrostAdapter: BlockfrostAdapter, address: Address, - availableUtxos: UTxO[] + availableUtxos: UTxO[], ): Promise { const assetA = ADA; const assetB = MIN; @@ -487,7 +488,7 @@ async function _depositV2TxExample( const amountB = 10_000n; const pool = await blockFrostAdapter.getV2PoolByPair(assetA, assetB); - invariant(pool, "Pool not found"); + invariant(pool, 'Pool not found'); const lpAmount = DexV2Calculation.calculateDepositAmount({ amountA, @@ -499,7 +500,7 @@ async function _depositV2TxExample( const acceptableLPAmount = Slippage.apply({ slippage: slippageTolerance, amount: lpAmount, - type: "down", + type: 'down', }); return new DexV2(lucid, blockFrostAdapter).createBulkOrdersTx({ @@ -524,17 +525,17 @@ async function _withdrawV2TxExample( lucid: Lucid, blockFrostAdapter: BlockfrostAdapter, address: Address, - availableUtxos: UTxO[] + availableUtxos: UTxO[], ): Promise { // ADA-MIN Lp Asset const lpAsset = { - policyId: "d6aae2059baee188f74917493cf7637e679cd219bdfbbf4dcbeb1d0b", + policyId: 'd6aae2059baee188f74917493cf7637e679cd219bdfbbf4dcbeb1d0b', tokenName: - "6c3ea488e6ff940bb6fb1b18fd605b5931d9fefde6440117015ba484cf321200", + '6c3ea488e6ff940bb6fb1b18fd605b5931d9fefde6440117015ba484cf321200', }; const lpAmount = 20_000n; const pool = await blockFrostAdapter.getV2PoolByLp(lpAsset); - invariant(pool, "Pool not found"); + invariant(pool, 'Pool not found'); const { withdrawalA, withdrawalB } = await DexV2Calculation.calculateWithdrawAmount({ withdrawalLPAmount: lpAmount, @@ -546,12 +547,12 @@ async function _withdrawV2TxExample( const acceptableAmountAReceive = Slippage.apply({ slippage: slippageTolerance, amount: withdrawalA, - type: "down", + type: 'down', }); const acceptableAmountBReceive = Slippage.apply({ slippage: slippageTolerance, amount: withdrawalB, - type: "down", + type: 'down', }); return new DexV2(lucid, blockFrostAdapter).createBulkOrdersTx({ sender: address, @@ -573,14 +574,14 @@ async function _stopV2TxExample( lucid: Lucid, blockFrostAdapter: BlockfrostAdapter, address: Address, - availableUtxos: UTxO[] + availableUtxos: UTxO[], ): Promise { const assetA = ADA; const assetB = MIN; const amountA = 10_000n; const pool = await blockFrostAdapter.getV2PoolByPair(assetA, assetB); - invariant(pool, "pool not found"); + invariant(pool, 'pool not found'); const amountOut = DexV2Calculation.calculateAmountOut({ reserveIn: pool.reserveA, reserveOut: pool.reserveB, @@ -592,7 +593,7 @@ async function _stopV2TxExample( const stopAmount = Slippage.apply({ slippage: new BigNumber(10).div(100), amount: amountOut, - type: "down", + type: 'down', }); return new DexV2(lucid, blockFrostAdapter).createBulkOrdersTx({ @@ -615,14 +616,14 @@ async function _ocoV2TxExample( lucid: Lucid, blockFrostAdapter: BlockfrostAdapter, address: Address, - availableUtxos: UTxO[] + availableUtxos: UTxO[], ): Promise { const assetA = ADA; const assetB = MIN; const amountA = 10_000n; const pool = await blockFrostAdapter.getV2PoolByPair(assetA, assetB); - invariant(pool, "Pool not found"); + invariant(pool, 'Pool not found'); const amountOut = DexV2Calculation.calculateAmountOut({ reserveIn: pool.reserveA, @@ -633,12 +634,12 @@ async function _ocoV2TxExample( const limitAmount = Slippage.apply({ slippage: new BigNumber(20).div(100), amount: amountOut, - type: "up", + type: 'up', }); const stopAmount = Slippage.apply({ slippage: new BigNumber(20).div(100), amount: amountOut, - type: "down", + type: 'down', }); return new DexV2(lucid, blockFrostAdapter).createBulkOrdersTx({ sender: address, @@ -661,17 +662,17 @@ async function _zapOutV2TxExample( lucid: Lucid, blockFrostAdapter: BlockfrostAdapter, address: Address, - availableUtxos: UTxO[] + availableUtxos: UTxO[], ): Promise { // ADA-MIN Lp Asset const lpAsset = { - policyId: "d6aae2059baee188f74917493cf7637e679cd219bdfbbf4dcbeb1d0b", + policyId: 'd6aae2059baee188f74917493cf7637e679cd219bdfbbf4dcbeb1d0b', tokenName: - "6c3ea488e6ff940bb6fb1b18fd605b5931d9fefde6440117015ba484cf321200", + '6c3ea488e6ff940bb6fb1b18fd605b5931d9fefde6440117015ba484cf321200', }; const lpAmount = 10_000n; const pool = await blockFrostAdapter.getV2PoolByLp(lpAsset); - invariant(pool, "Pool not found"); + invariant(pool, 'Pool not found'); const zapAmountOut = DexV2Calculation.calculateZapOutAmount({ withdrawalLPAmount: lpAmount, direction: OrderV2.Direction.B_TO_A, @@ -682,7 +683,7 @@ async function _zapOutV2TxExample( const acceptableZapOutAmount = Slippage.apply({ slippage: slippageTolerance, amount: zapAmountOut, - type: "down", + type: 'down', }); return new DexV2(lucid, blockFrostAdapter).createBulkOrdersTx({ @@ -705,13 +706,13 @@ async function _partialSwapV2TxExample( lucid: Lucid, blockFrostAdapter: BlockfrostAdapter, address: Address, - availableUtxos: UTxO[] + availableUtxos: UTxO[], ): Promise { const assetA = ADA; const assetB = MIN; const amountA = 10_000n; const pool = await blockFrostAdapter.getV2PoolByPair(assetA, assetB); - invariant(pool, "Pool not found"); + invariant(pool, 'Pool not found'); const amountOut = DexV2Calculation.calculateAmountOut({ reserveIn: pool.reserveA, @@ -723,7 +724,7 @@ async function _partialSwapV2TxExample( const limitAmount = Slippage.apply({ slippage: new BigNumber(20).div(100), amount: amountOut, - type: "up", + type: 'up', }); const gcd = calculateGcd(amountA, limitAmount); @@ -744,7 +745,7 @@ async function _partialSwapV2TxExample( new BigNumber(getMinimumTradePercent(maximumSwaps)) .div(100) .multipliedBy(amountA.toString()) - .toFixed(0) + .toFixed(0), ), lpAsset: pool.lpAsset, }, @@ -756,22 +757,22 @@ async function _multiRoutingTxExample( lucid: Lucid, blockFrostAdapter: BlockfrostAdapter, address: Address, - availableUtxos: UTxO[] + availableUtxos: UTxO[], ): Promise { const assetA = MIN; const amountA = 10_000n; // ADA-MIN Lp Asset const lpAssetA = { - policyId: "d6aae2059baee188f74917493cf7637e679cd219bdfbbf4dcbeb1d0b", + policyId: 'd6aae2059baee188f74917493cf7637e679cd219bdfbbf4dcbeb1d0b', tokenName: - "6c3ea488e6ff940bb6fb1b18fd605b5931d9fefde6440117015ba484cf321200", + '6c3ea488e6ff940bb6fb1b18fd605b5931d9fefde6440117015ba484cf321200', }; // ADA-MileCoin Lp Asset const lpAssetB = { - policyId: "d6aae2059baee188f74917493cf7637e679cd219bdfbbf4dcbeb1d0b", + policyId: 'd6aae2059baee188f74917493cf7637e679cd219bdfbbf4dcbeb1d0b', tokenName: - "976edd2e047eedcd0d707df19155b9298d68020b8a68c2b27223539c4df57d3d", + '976edd2e047eedcd0d707df19155b9298d68020b8a68c2b27223539c4df57d3d', }; const routings = [ { @@ -784,15 +785,15 @@ async function _multiRoutingTxExample( }, ]; const pools = await Promise.all( - routings.map(({ lpAsset }) => blockFrostAdapter.getV2PoolByLp(lpAsset)) + routings.map(({ lpAsset }) => blockFrostAdapter.getV2PoolByLp(lpAsset)), ); - invariant(pools.length === routings.length, "pools not found"); + invariant(pools.length === routings.length, 'pools not found'); let lastAmountIn = amountA; for (let i = 0; i < routings.length; i++) { const pool = pools[i]; const routing = routings[i]; - invariant(pool, "Pool not found"); + invariant(pool, 'Pool not found'); const amountOut = DexV2Calculation.calculateAmountOut({ reserveIn: pool.reserveA, reserveOut: pool.reserveB, @@ -809,7 +810,7 @@ async function _multiRoutingTxExample( const acceptableOutputAmount = Slippage.apply({ slippage: slippageTolerance, amount: lastAmountIn, - type: "down", + type: 'down', }); return new DexV2(lucid, blockFrostAdapter).createBulkOrdersTx({ @@ -839,13 +840,13 @@ async function _multiRoutingTxExample( async function _cancelV2TxExample( lucid: Lucid, - blockFrostAdapter: BlockfrostAdapter + blockFrostAdapter: BlockfrostAdapter, ): Promise { return new DexV2(lucid, blockFrostAdapter).cancelOrder({ orderOutRefs: [ { txHash: - "83e22abd3fad8525b02bf2fd1c8e8d0dbc37dbbe09384d666699081ee3e6f282", + '83e22abd3fad8525b02bf2fd1c8e8d0dbc37dbbe09384d666699081ee3e6f282', outputIndex: 0, }, ], @@ -857,14 +858,14 @@ async function _swapStableExample( lucid: Lucid, blockfrostAdapter: BlockfrostAdapter, address: Address, - availableUtxos: UTxO[] + availableUtxos: UTxO[], ): Promise { const lpAsset = Asset.fromString( - "d16339238c9e1fb4d034b6a48facb2f97794a9cdb7bc049dd7c49f54646a65642d697573642d76312e342d6c70" + 'd16339238c9e1fb4d034b6a48facb2f97794a9cdb7bc049dd7c49f54646a65642d697573642d76312e342d6c70', ); const config = StableswapConstant.getConfigByLpAsset( lpAsset, - NetworkId.TESTNET + NetworkId.TESTNET, ); const pool = await blockfrostAdapter.getStablePoolByLpAsset(lpAsset); @@ -908,14 +909,14 @@ async function _depositStableExample( lucid: Lucid, blockfrostAdapter: BlockfrostAdapter, address: Address, - availableUtxos: UTxO[] + availableUtxos: UTxO[], ): Promise { const lpAsset = Asset.fromString( - "d16339238c9e1fb4d034b6a48facb2f97794a9cdb7bc049dd7c49f54646a65642d697573642d76312e342d6c70" + 'd16339238c9e1fb4d034b6a48facb2f97794a9cdb7bc049dd7c49f54646a65642d697573642d76312e342d6c70', ); const config = StableswapConstant.getConfigByLpAsset( lpAsset, - NetworkId.TESTNET + NetworkId.TESTNET, ); const pool = await blockfrostAdapter.getStablePoolByLpAsset(lpAsset); @@ -959,14 +960,14 @@ async function _withdrawStableExample( lucid: Lucid, blockfrostAdapter: BlockfrostAdapter, address: Address, - availableUtxos: UTxO[] + availableUtxos: UTxO[], ): Promise { const lpAsset = Asset.fromString( - "d16339238c9e1fb4d034b6a48facb2f97794a9cdb7bc049dd7c49f54646a65642d697573642d76312e342d6c70" + 'd16339238c9e1fb4d034b6a48facb2f97794a9cdb7bc049dd7c49f54646a65642d697573642d76312e342d6c70', ); const config = StableswapConstant.getConfigByLpAsset( lpAsset, - NetworkId.TESTNET + NetworkId.TESTNET, ); const pool = await blockfrostAdapter.getStablePoolByLpAsset(lpAsset); @@ -1000,14 +1001,14 @@ async function _withdrawImbalanceStableExample( lucid: Lucid, blockfrostAdapter: BlockfrostAdapter, address: Address, - availableUtxos: UTxO[] + availableUtxos: UTxO[], ): Promise { const lpAsset = Asset.fromString( - "d16339238c9e1fb4d034b6a48facb2f97794a9cdb7bc049dd7c49f54646a65642d697573642d76312e342d6c70" + 'd16339238c9e1fb4d034b6a48facb2f97794a9cdb7bc049dd7c49f54646a65642d697573642d76312e342d6c70', ); const config = StableswapConstant.getConfigByLpAsset( lpAsset, - NetworkId.TESTNET + NetworkId.TESTNET, ); const pool = await blockfrostAdapter.getStablePoolByLpAsset(lpAsset); @@ -1047,14 +1048,14 @@ async function _zapOutStableExample( lucid: Lucid, blockfrostAdapter: BlockfrostAdapter, address: Address, - availableUtxos: UTxO[] + availableUtxos: UTxO[], ): Promise { const lpAsset = Asset.fromString( - "d16339238c9e1fb4d034b6a48facb2f97794a9cdb7bc049dd7c49f54646a65642d697573642d76312e342d6c70" + 'd16339238c9e1fb4d034b6a48facb2f97794a9cdb7bc049dd7c49f54646a65642d697573642d76312e342d6c70', ); const config = StableswapConstant.getConfigByLpAsset( lpAsset, - NetworkId.TESTNET + NetworkId.TESTNET, ); const pool = await blockfrostAdapter.getStablePoolByLpAsset(lpAsset); @@ -1095,10 +1096,10 @@ async function _zapOutStableExample( async function _bulkOrderStableExample( lucid: Lucid, address: Address, - availableUtxos: UTxO[] + availableUtxos: UTxO[], ): Promise { const lpAsset = Asset.fromString( - "d16339238c9e1fb4d034b6a48facb2f97794a9cdb7bc049dd7c49f54646a65642d697573642d76312e342d6c70" + 'd16339238c9e1fb4d034b6a48facb2f97794a9cdb7bc049dd7c49f54646a65642d697573642d76312e342d6c70', ); const lpAmount = 12345n; const outIndex = 0; @@ -1130,16 +1131,16 @@ async function _cancelStableExample(lucid: Lucid): Promise { const orderUtxos = await lucid.utxosByOutRef([ { txHash: - "c3ad8e0aa159a22a14088474908e5c23ba6772a6aa82f8250e7e8eaa1016b2d8", + 'c3ad8e0aa159a22a14088474908e5c23ba6772a6aa82f8250e7e8eaa1016b2d8', outputIndex: 0, }, { txHash: - "72e57a1fd90bf0b9291a6fa8e04793099d51df7844813689dde67ce3eea03c1f", + '72e57a1fd90bf0b9291a6fa8e04793099d51df7844813689dde67ce3eea03c1f', outputIndex: 0, }, ]); - invariant(orderUtxos.length === 2, "Can not find order to cancel"); + invariant(orderUtxos.length === 2, 'Can not find order to cancel'); return new Stableswap(lucid).buildCancelOrdersTx({ orderUtxos: orderUtxos, }); @@ -1154,10 +1155,10 @@ const _ONE_DAY_IN_MS = 1000 * 60 * 60 * 24; async function _createLbeV2EventExample( lucid: Lucid, address: Address, - blockfrostAdapter: BlockfrostAdapter + blockfrostAdapter: BlockfrostAdapter, ): Promise { const baseAsset = Asset.fromString( - "d6aae2059baee188f74917493cf7637e679cd219bdfbbf4dcbeb1d0bfdfc61f25b3065a310ba3e352159125910b947b7aee704728318949933127cdc" + 'd6aae2059baee188f74917493cf7637e679cd219bdfbbf4dcbeb1d0bfdfc61f25b3065a310ba3e352159125910b947b7aee704728318949933127cdc', ); const curSlot = lucid.currentSlot(); const curDate = lucid.utils.slotToUnixTime(curSlot); @@ -1175,7 +1176,7 @@ async function _createLbeV2EventExample( maximumRaise: 100_000_000n, penaltyConfig: { penaltyStartTime: BigInt( - curDate + ONE_HOUR_IN_MS + 20 * ONE_MINUTE_IN_MS + curDate + ONE_HOUR_IN_MS + 20 * ONE_MINUTE_IN_MS, ), percent: 20n, }, @@ -1184,30 +1185,30 @@ async function _createLbeV2EventExample( }; const factory = await blockfrostAdapter.getLbeV2Factory( lbeV2Parameters.baseAsset, - lbeV2Parameters.raiseAsset + lbeV2Parameters.raiseAsset, ); - invariant(factory !== null, "Can not find factory"); + invariant(factory !== null, 'Can not find factory'); const factoryUtxos = await lucid.utxosByOutRef([ { outputIndex: factory.txIn.index, txHash: factory.txIn.txHash }, ]); - invariant(factoryUtxos.length !== 0, "Can not find factory utxo"); + invariant(factoryUtxos.length !== 0, 'Can not find factory utxo'); const projectDetails = { - eventName: "TEST SDK", - description: "test lbe v2 in public sdk", + eventName: 'TEST SDK', + description: 'test lbe v2 in public sdk', socialLinks: { - twitter: "https://x.com/MinswapDEX", - telegram: "https://t.me/MinswapMafia", - discord: "https://discord.gg/minswap", - website: "https://minswap.org/", + twitter: 'https://x.com/MinswapDEX', + telegram: 'https://t.me/MinswapMafia', + discord: 'https://discord.gg/minswap', + website: 'https://minswap.org/', }, tokenomics: [ { - tag: "admin", - percentage: "70", + tag: 'admin', + percentage: '70', }, { - tag: "LBE", - percentage: "30", + tag: 'LBE', + percentage: '30', }, ], }; @@ -1226,10 +1227,10 @@ async function _createLbeV2EventExample( async function _updateLbeV2EventExample( lucid: Lucid, address: Address, - blockfrostAdapter: BlockfrostAdapter + blockfrostAdapter: BlockfrostAdapter, ): Promise { const baseAsset = Asset.fromString( - "d6aae2059baee188f74917493cf7637e679cd219bdfbbf4dcbeb1d0ba547d1ae595c49041570991a1c33729106e635f20643b99e3ddb1e77dc439586" + 'd6aae2059baee188f74917493cf7637e679cd219bdfbbf4dcbeb1d0ba547d1ae595c49041570991a1c33729106e635f20643b99e3ddb1e77dc439586', ); const curSlot = lucid.currentSlot(); const curDate = lucid.utils.slotToUnixTime(curSlot); @@ -1247,7 +1248,7 @@ async function _updateLbeV2EventExample( maximumRaise: 100_000_000n, penaltyConfig: { penaltyStartTime: BigInt( - curDate + _ONE_DAY_IN_MS * 20 + 10 * ONE_MINUTE_IN_MS + curDate + _ONE_DAY_IN_MS * 20 + 10 * ONE_MINUTE_IN_MS, ), percent: 20n, }, @@ -1255,33 +1256,33 @@ async function _updateLbeV2EventExample( poolBaseFee: 30n, }; const projectDetails = { - eventName: "TEST SDK hiiiiiiii", - description: "test lbe v2 in public sdk", + eventName: 'TEST SDK hiiiiiiii', + description: 'test lbe v2 in public sdk', socialLinks: { - twitter: "https://x.com/MinswapDEX", - telegram: "https://t.me/MinswapMafia", - discord: "https://discord.gg/minswap", - website: "https://app.minswap.org/", + twitter: 'https://x.com/MinswapDEX', + telegram: 'https://t.me/MinswapMafia', + discord: 'https://discord.gg/minswap', + website: 'https://app.minswap.org/', }, tokenomics: [ { - tag: "admin", - percentage: "70", + tag: 'admin', + percentage: '70', }, { - tag: "LBE", - percentage: "30", + tag: 'LBE', + percentage: '30', }, ], }; const currentSlot = await blockfrostAdapter.currentSlot(); const lbeId = PoolV2.computeLPAssetName(baseAsset, ADA); const treasury = await blockfrostAdapter.getLbeV2TreasuryByLbeId(lbeId); - invariant(treasury !== null, "Event is not created"); + invariant(treasury !== null, 'Event is not created'); const treasuryUtxos = await lucid.utxosByOutRef([ { outputIndex: treasury.txIn.index, txHash: treasury.txIn.txHash }, ]); - invariant(treasuryUtxos.length !== 0, "Can not find factory utxo"); + invariant(treasuryUtxos.length !== 0, 'Can not find factory utxo'); return new LbeV2(lucid).updateEvent({ owner: await lucid.wallet.address(), treasuryUtxo: treasuryUtxos[0], @@ -1295,12 +1296,12 @@ async function _updateLbeV2EventExample( async function _lbeV2AddMoreSellersExample( lucid: Lucid, address: Address, - blockfrostAdapter: BlockfrostAdapter + blockfrostAdapter: BlockfrostAdapter, ): Promise { const baseAsset = Asset.fromString( - "e16c2dc8ae937e8d3790c7fd7168d7b994621ba14ca11415f39fed7243414b45" + 'e16c2dc8ae937e8d3790c7fd7168d7b994621ba14ca11415f39fed7243414b45', ); - const raiseAsset = Asset.fromString("lovelace"); + const raiseAsset = Asset.fromString('lovelace'); const lbeId = PoolV2.computeLPAssetName(baseAsset, raiseAsset); const treasury = await blockfrostAdapter.getLbeV2TreasuryByLbeId(lbeId); @@ -1308,14 +1309,14 @@ async function _lbeV2AddMoreSellersExample( const treasuryUtxos = await lucid.utxosByOutRef([ { txHash: treasury.txIn.txHash, outputIndex: treasury.txIn.index }, ]); - invariant(treasuryUtxos.length === 1, "Can not find treasury Utxo"); + invariant(treasuryUtxos.length === 1, 'Can not find treasury Utxo'); const manager = await blockfrostAdapter.getLbeV2ManagerByLbeId(lbeId); invariant(manager !== null, `Can not find manager by lbeId ${lbeId}`); const managerUtxos = await lucid.utxosByOutRef([ { txHash: manager.txIn.txHash, outputIndex: manager.txIn.index }, ]); - invariant(managerUtxos.length === 1, "Can not find manager Utxo"); + invariant(managerUtxos.length === 1, 'Can not find manager Utxo'); return new LbeV2(lucid).addSellers({ treasuryUtxo: treasuryUtxos[0], @@ -1330,12 +1331,12 @@ async function _lbeV2AddMoreSellersExample( async function _cancelLbeV2EventByOwnerExample( lucid: Lucid, address: Address, - blockfrostAdapter: BlockfrostAdapter + blockfrostAdapter: BlockfrostAdapter, ): Promise { const baseAsset = Asset.fromString( - "e4214b7cce62ac6fbba385d164df48e157eae5863521b4b67ca71d865190718981e4e7fab3eb80963f14148714d7a7847652d4017d0fb744db075027" + 'e4214b7cce62ac6fbba385d164df48e157eae5863521b4b67ca71d865190718981e4e7fab3eb80963f14148714d7a7847652d4017d0fb744db075027', ); - const raiseAsset = Asset.fromString("lovelace"); + const raiseAsset = Asset.fromString('lovelace'); const lbeId = PoolV2.computeLPAssetName(baseAsset, raiseAsset); const treasury = await blockfrostAdapter.getLbeV2TreasuryByLbeId(lbeId); @@ -1343,7 +1344,7 @@ async function _cancelLbeV2EventByOwnerExample( const treasuryUtxos = await lucid.utxosByOutRef([ { txHash: treasury.txIn.txHash, outputIndex: treasury.txIn.index }, ]); - invariant(treasuryUtxos.length === 1, "Can not find treasury Utxo"); + invariant(treasuryUtxos.length === 1, 'Can not find treasury Utxo'); return new LbeV2(lucid).cancelEvent({ treasuryUtxo: treasuryUtxos[0], @@ -1356,12 +1357,12 @@ async function _cancelLbeV2EventByOwnerExample( async function _lbeV2DepositOrderExample( lucid: Lucid, address: Address, - blockfrostAdapter: BlockfrostAdapter + blockfrostAdapter: BlockfrostAdapter, ): Promise { const baseAsset = Asset.fromString( - "e16c2dc8ae937e8d3790c7fd7168d7b994621ba14ca11415f39fed7243414b45" + 'e16c2dc8ae937e8d3790c7fd7168d7b994621ba14ca11415f39fed7243414b45', ); - const raiseAsset = Asset.fromString("lovelace"); + const raiseAsset = Asset.fromString('lovelace'); const lbeId = PoolV2.computeLPAssetName(baseAsset, raiseAsset); const treasury = await blockfrostAdapter.getLbeV2TreasuryByLbeId(lbeId); @@ -1369,18 +1370,18 @@ async function _lbeV2DepositOrderExample( const treasuryUtxos = await lucid.utxosByOutRef([ { txHash: treasury.txIn.txHash, outputIndex: treasury.txIn.index }, ]); - invariant(treasuryUtxos.length === 1, "Can not find treasury Utxo"); + invariant(treasuryUtxos.length === 1, 'Can not find treasury Utxo'); const seller = await blockfrostAdapter.getLbeV2SellerByLbeId(lbeId); invariant(seller !== null, `Can not find seller by lbeId ${lbeId}`); const sellerUtxos = await lucid.utxosByOutRef([ { txHash: seller.txIn.txHash, outputIndex: seller.txIn.index }, ]); - invariant(sellerUtxos.length === 1, "Can not find seller Utxo"); + invariant(sellerUtxos.length === 1, 'Can not find seller Utxo'); const orders = await blockfrostAdapter.getLbeV2OrdersByLbeIdAndOwner( lbeId, - address + address, ); const orderUtxos = orders.length > 0 @@ -1388,13 +1389,13 @@ async function _lbeV2DepositOrderExample( orders.map((o) => ({ txHash: o.txIn.txHash, outputIndex: o.txIn.index, - })) + })), ) : []; invariant( orderUtxos.length === orders.length, - "Can not find enough order Utxos" + 'Can not find enough order Utxos', ); const currentSlot = await blockfrostAdapter.currentSlot(); @@ -1404,7 +1405,7 @@ async function _lbeV2DepositOrderExample( treasuryUtxo: treasuryUtxos[0], sellerUtxo: sellerUtxos[0], owner: address, - action: { type: "deposit", additionalAmount: 1_000_000n }, + action: { type: 'deposit', additionalAmount: 1_000_000n }, }); } @@ -1412,12 +1413,12 @@ async function _lbeV2DepositOrderExample( async function _lbeV2WithdrawOrderExample( lucid: Lucid, address: Address, - blockfrostAdapter: BlockfrostAdapter + blockfrostAdapter: BlockfrostAdapter, ): Promise { const baseAsset = Asset.fromString( - "e16c2dc8ae937e8d3790c7fd7168d7b994621ba14ca11415f39fed7243414b45" + 'e16c2dc8ae937e8d3790c7fd7168d7b994621ba14ca11415f39fed7243414b45', ); - const raiseAsset = Asset.fromString("lovelace"); + const raiseAsset = Asset.fromString('lovelace'); const lbeId = PoolV2.computeLPAssetName(baseAsset, raiseAsset); const treasury = await blockfrostAdapter.getLbeV2TreasuryByLbeId(lbeId); @@ -1425,18 +1426,18 @@ async function _lbeV2WithdrawOrderExample( const treasuryUtxos = await lucid.utxosByOutRef([ { txHash: treasury.txIn.txHash, outputIndex: treasury.txIn.index }, ]); - invariant(treasuryUtxos.length === 1, "Can not find treasury Utxo"); + invariant(treasuryUtxos.length === 1, 'Can not find treasury Utxo'); const seller = await blockfrostAdapter.getLbeV2SellerByLbeId(lbeId); invariant(seller !== null, `Can not find seller by lbeId ${lbeId}`); const sellerUtxos = await lucid.utxosByOutRef([ { txHash: seller.txIn.txHash, outputIndex: seller.txIn.index }, ]); - invariant(sellerUtxos.length === 1, "Can not find seller Utxo"); + invariant(sellerUtxos.length === 1, 'Can not find seller Utxo'); const orders = await blockfrostAdapter.getLbeV2OrdersByLbeIdAndOwner( lbeId, - address + address, ); const orderUtxos = orders.length > 0 @@ -1444,13 +1445,13 @@ async function _lbeV2WithdrawOrderExample( orders.map((o) => ({ txHash: o.txIn.txHash, outputIndex: o.txIn.index, - })) + })), ) : []; invariant( orderUtxos.length === orders.length, - "Can not find enough order Utxos" + 'Can not find enough order Utxos', ); const currentSlot = await blockfrostAdapter.currentSlot(); @@ -1460,7 +1461,7 @@ async function _lbeV2WithdrawOrderExample( treasuryUtxo: treasuryUtxos[0], sellerUtxo: sellerUtxos[0], owner: address, - action: { type: "withdraw", withdrawalAmount: 1_000_000n }, + action: { type: 'withdraw', withdrawalAmount: 1_000_000n }, }); } @@ -1468,12 +1469,12 @@ async function _lbeV2WithdrawOrderExample( async function _lbeV2CloseEventExample( lucid: Lucid, address: Address, - blockfrostAdapter: BlockfrostAdapter + blockfrostAdapter: BlockfrostAdapter, ): Promise { const baseAsset = Asset.fromString( - "d6aae2059baee188f74917493cf7637e679cd219bdfbbf4dcbeb1d0bfdfc61f25b3065a310ba3e352159125910b947b7aee704728318949933127cdc" + 'd6aae2059baee188f74917493cf7637e679cd219bdfbbf4dcbeb1d0bfdfc61f25b3065a310ba3e352159125910b947b7aee704728318949933127cdc', ); - const raiseAsset = Asset.fromString("lovelace"); + const raiseAsset = Asset.fromString('lovelace'); const lbeId = PoolV2.computeLPAssetName(baseAsset, raiseAsset); const treasury = await blockfrostAdapter.getLbeV2TreasuryByLbeId(lbeId); @@ -1482,25 +1483,25 @@ async function _lbeV2CloseEventExample( await blockfrostAdapter.getLbeV2HeadAndTailFactory(lbeId); invariant( headAndTailFactory, - `Can not find head and tail factory by lbeId ${lbeId}` + `Can not find head and tail factory by lbeId ${lbeId}`, ); const { head: headFactory, tail: tailFactory } = headAndTailFactory; const treasuryUtxos = await lucid.utxosByOutRef([ { txHash: treasury.txIn.txHash, outputIndex: treasury.txIn.index }, ]); - invariant(treasuryUtxos.length !== 0, "Can not find treasury Utxo"); + invariant(treasuryUtxos.length !== 0, 'Can not find treasury Utxo'); const headFactoryUtxos = await lucid.utxosByOutRef([ { txHash: headFactory.txIn.txHash, outputIndex: headFactory.txIn.index }, ]); - invariant(headFactoryUtxos.length !== 0, "Can not find head factory Utxo"); + invariant(headFactoryUtxos.length !== 0, 'Can not find head factory Utxo'); const tailFactoryUtxos = await lucid.utxosByOutRef([ { txHash: tailFactory.txIn.txHash, outputIndex: tailFactory.txIn.index }, ]); - invariant(tailFactoryUtxos.length !== 0, "Can not find tail factory Utxo"); + invariant(tailFactoryUtxos.length !== 0, 'Can not find tail factory Utxo'); const currentSlot = await blockfrostAdapter.currentSlot(); return new LbeV2(lucid).closeEventTx({ @@ -1522,7 +1523,7 @@ async function _lbeV2CloseEventExample( async function _getBrowserLucidInstance( network: Network, projectId: string, - blockfrostUrl: string + blockfrostUrl: string, ): Promise { const provider = new Blockfrost(blockfrostUrl, projectId); const lucid = await Lucid.new(provider, network); diff --git a/examples/maestro-adapter-example.ts b/examples/maestro-adapter-example.ts index e69de29..bbc33a9 100644 --- a/examples/maestro-adapter-example.ts +++ b/examples/maestro-adapter-example.ts @@ -0,0 +1,30 @@ +import { MaestroClient, Configuration } from '@maestro-org/typescript-sdk'; +import { Network } from '@minswap/lucid-cardano'; +import { getBackendMasestroLucidInstance } from '../src/utils/lucid'; +import { MaestroAdapter } from '../src/adapters/maestro'; +import { NetworkId } from '../src'; + +async function main(): Promise { + const cardanoNetwork: Network = 'Preprod'; + const maestroApiKey = ''; + + const address = + 'addr_test1qqf2dhk96l2kq4xh2fkhwksv0h49vy9exw383eshppn863jereuqgh2zwxsedytve5gp9any9jwc5hz98sd47rwfv40stc26fr'; + + const lucid = await getBackendMasestroLucidInstance( + cardanoNetwork, + maestroApiKey, + address, + ); + + const maestroClient = new MaestroClient( + new Configuration({ + apiKey: maestroApiKey, + network: cardanoNetwork, + }), + ); + + const maestroAdapter = new MaestroAdapter(NetworkId.TESTNET, maestroClient); + + // TODO +} diff --git a/package.json b/package.json index d3d0a70..29fde62 100644 --- a/package.json +++ b/package.json @@ -66,6 +66,7 @@ "@eslint/js": "^9.9.1", "@jest/globals": "^29.7.0", "@prisma/client": "^6.0.1", + "@trivago/prettier-plugin-sort-imports": "^5.2.0", "@types/big.js": "^6.2.2", "@types/eslint__js": "^8.42.3", "@types/jest": "^29.5.12", diff --git a/src/adapters/adapter.ts b/src/adapters/adapter.ts index 18b8560..37b9e1d 100644 --- a/src/adapters/adapter.ts +++ b/src/adapters/adapter.ts @@ -1,10 +1,10 @@ -import { Address } from "@minswap/lucid-cardano"; -import Big from "big.js"; -import { Asset } from "../types/asset"; -import { FactoryV2 } from "../types/factory"; -import { LbeV2Types } from "../types/lbe-v2"; -import { PoolV1, PoolV2, StablePool } from "../types/pool"; -import { TxHistory } from "../types/tx.internal"; +import { Address } from '@minswap/lucid-cardano'; +import Big from 'big.js'; +import { Asset } from '../types/asset'; +import { FactoryV2 } from '../types/factory'; +import { LbeV2Types } from '../types/lbe-v2'; +import { PoolV1, PoolV2, StablePool } from '../types/pool'; +import { TxHistory } from '../types/tx.internal'; export type GetPoolInTxParams = { txHash: string; @@ -15,7 +15,8 @@ export type GetPoolByIdParams = { }; export type GetPoolsParams = { - page: number; + page?: number; + cursor?: string; }; export type GetV1PoolHistoryParams = { diff --git a/src/adapters/blockfrost.ts b/src/adapters/blockfrost.ts index fb182c5..63e1e0e 100644 --- a/src/adapters/blockfrost.ts +++ b/src/adapters/blockfrost.ts @@ -2,43 +2,43 @@ import { BlockFrostAPI, BlockfrostServerError, Responses, -} from "@blockfrost/blockfrost-js"; -import { PaginationOptions } from "@blockfrost/blockfrost-js/lib/types"; +} from '@blockfrost/blockfrost-js'; +import { PaginationOptions } from '@blockfrost/blockfrost-js/lib/types'; import { Address, C, fromHex, SLOT_CONFIG_NETWORK, slotToBeginUnixTime, -} from "@minswap/lucid-cardano"; -import invariant from "@minswap/tiny-invariant"; -import * as Prisma from "@prisma/client"; -import Big from "big.js"; -import JSONBig from "json-bigint"; - -import { StableswapCalculation } from "../calculate"; -import { PostgresRepositoryReader } from "../syncer/repository/postgres-repository"; -import { Asset } from "../types/asset"; +} from '@minswap/lucid-cardano'; +import invariant from '@minswap/tiny-invariant'; +import * as Prisma from '@prisma/client'; +import Big from 'big.js'; +import JSONBig from 'json-bigint'; + +import { StableswapCalculation } from '../calculate'; +import { PostgresRepositoryReader } from '../syncer/repository/postgres-repository'; +import { Asset } from '../types/asset'; import { DexV1Constant, DexV2Constant, LbeV2Constant, StableswapConstant, -} from "../types/constants"; -import { FactoryV2 } from "../types/factory"; -import { LbeV2Types } from "../types/lbe-v2"; -import { NetworkEnvironment, NetworkId } from "../types/network"; -import { OrderV2 } from "../types/order"; -import { PoolV1, PoolV2, StablePool } from "../types/pool"; +} from '../types/constants'; +import { FactoryV2 } from '../types/factory'; +import { LbeV2Types } from '../types/lbe-v2'; +import { NetworkEnvironment, NetworkId } from '../types/network'; +import { OrderV2 } from '../types/order'; +import { PoolV1, PoolV2, StablePool } from '../types/pool'; import { checkValidPoolOutput, isValidPoolOutput, normalizeAssets, -} from "../types/pool.internal"; -import { StringUtils } from "../types/string"; -import { TxHistory, TxIn, Value } from "../types/tx.internal"; -import { getScriptHashFromAddress } from "../utils/address-utils.internal"; -import { networkEnvToLucidNetwork } from "../utils/network.internal"; +} from '../types/pool.internal'; +import { StringUtils } from '../types/string'; +import { TxHistory, TxIn, Value } from '../types/tx.internal'; +import { getScriptHashFromAddress } from '../utils/address-utils.internal'; +import { networkEnvToLucidNetwork } from '../utils/network.internal'; import { Adapter, GetPoolInTxParams, @@ -46,9 +46,9 @@ import { GetV2PoolPriceParams, GetPoolPriceParams, GetStablePoolPriceParams, -} from "./adapter"; +} from './adapter'; -export type GetPoolsParams = Omit & { +export type GetPoolsParams = Omit & { page: number; }; @@ -81,7 +81,7 @@ export class BlockfrostAdapter implements Adapter { } public async getAssetDecimals(asset: string): Promise { - if (asset === "lovelace") { + if (asset === 'lovelace') { return 6; } try { @@ -140,7 +140,7 @@ export class BlockfrostAdapter implements Adapter { const nftTxs = await this.blockFrostApi.assetsTransactions(nft, { count: 1, page: 1, - order: "desc", + order: 'desc', }); if (nftTxs.length === 0) { return null; @@ -151,7 +151,7 @@ export class BlockfrostAdapter implements Adapter { public async getV1Pools({ page, count = 100, - order = "asc", + order = 'asc', }: GetPoolsParams): Promise { const utxos = await this.blockFrostApi.addressesUtxos( DexV1Constant.POOL_SCRIPT_HASH, @@ -166,7 +166,10 @@ export class BlockfrostAdapter implements Adapter { utxo.data_hash, `expect pool to have datum hash, got ${utxo.data_hash}`, ); - const txIn: TxIn = { txHash: utxo.tx_hash, index: utxo.output_index }; + const txIn: TxIn = { + txHash: utxo.tx_hash, + index: utxo.output_index, + }; return new PoolV1.State( utxo.address, txIn, @@ -180,7 +183,7 @@ export class BlockfrostAdapter implements Adapter { id, page = 1, count = 100, - order = "desc", + order = 'desc', }: GetV1PoolHistoryParams): Promise { const nft = `${DexV1Constant.POOL_NFT_POLICY_ID}${id}`; const nftTxs = await this.blockFrostApi.assetsTransactions(nft, { @@ -259,7 +262,7 @@ export class BlockfrostAdapter implements Adapter { public async getV2Pools({ page, count = 100, - order = "asc", + order = 'asc', }: GetPoolsParams): Promise<{ pools: PoolV2.State[]; errors: unknown[]; @@ -324,7 +327,7 @@ export class BlockfrostAdapter implements Adapter { public async getV2PoolHistory( _params: GetV2PoolHistoryParams, ): Promise { - throw Error("Not supported yet. Please use MinswapAdapter"); + throw Error('Not supported yet. Please use MinswapAdapter'); } public async getV2PoolPrice({ @@ -456,7 +459,7 @@ export class BlockfrostAdapter implements Adapter { // MARK: STABLESWAP private async parseStablePoolState( - utxo: Responses["address_utxo_content"][0], + utxo: Responses['address_utxo_content'][0], ): Promise { let datum: string; if (utxo.inline_datum) { @@ -464,7 +467,7 @@ export class BlockfrostAdapter implements Adapter { } else if (utxo.data_hash) { datum = await this.getDatumByDatumHash(utxo.data_hash); } else { - throw new Error("Cannot find datum of Stable Pool"); + throw new Error('Cannot find datum of Stable Pool'); } const pool = new StablePool.State( this.networkId, @@ -551,7 +554,7 @@ export class BlockfrostAdapter implements Adapter { getStablePoolHistory( _params: GetStablePoolHistoryParams, ): Promise { - throw Error("Not supported yet. Please use MinswapAdapter"); + throw Error('Not supported yet. Please use MinswapAdapter'); } public getStablePoolPrice({ @@ -926,7 +929,7 @@ export class MinswapAdapter extends BlockfrostAdapter { override async getV1Pools({ page, count = 100, - order = "asc", + order = 'asc', }: GetPoolsParams): Promise { const prismaPools = await this.repository.getLastPoolV1State( page - 1, @@ -943,7 +946,7 @@ export class MinswapAdapter extends BlockfrostAdapter { id, page = 1, count = 100, - order = "desc", + order = 'desc', }: GetV1PoolHistoryParams): Promise { const lpAsset = `${DexV1Constant.LP_POLICY_ID}${id}`; const prismaPools = await this.repository.getHistoricalPoolV1ByLpAsset( @@ -1004,7 +1007,7 @@ export class MinswapAdapter extends BlockfrostAdapter { override async getV2Pools({ page, count = 100, - order = "asc", + order = 'asc', }: GetPoolsParams): Promise<{ pools: PoolV2.State[]; errors: unknown[]; @@ -1042,9 +1045,9 @@ export class MinswapAdapter extends BlockfrostAdapter { override async getV2PoolHistory( options: GetV2PoolHistoryParams, ): Promise { - const { page = 1, count = 100, order = "desc" } = options; + const { page = 1, count = 100, order = 'desc' } = options; let lpAsset: string; - if ("lpAsset" in options) { + if ('lpAsset' in options) { lpAsset = Asset.toString(options.lpAsset); } else { lpAsset = PoolV2.computeLPAssetName(options.assetA, options.assetB); @@ -1141,7 +1144,7 @@ export class MinswapAdapter extends BlockfrostAdapter { lpAsset, page = 1, count = 100, - order = "desc", + order = 'desc', }: GetStablePoolHistoryParams): Promise { const prismaPools = await this.repository.getHistoricalStablePoolsByLpAsset( Asset.toString(lpAsset), diff --git a/src/adapters/maestro.ts b/src/adapters/maestro.ts index 3e4b886..46926fd 100644 --- a/src/adapters/maestro.ts +++ b/src/adapters/maestro.ts @@ -1,25 +1,32 @@ -import { Address } from "@minswap/lucid-cardano"; -import { MaestroClient } from "@maestro-org/typescript-sdk"; -import { DexV1Constant } from "../types/constants"; -import { Asset } from "../types/asset"; -import { FactoryV2 } from "../types/factory"; -import { LbeV2Types } from "../types/lbe-v2"; -import { NetworkId } from "../types/network"; -import { PoolV1, PoolV2, StablePool } from ".."; -import { TxHistory } from "../types/tx.internal"; +import { Address } from '@minswap/lucid-cardano'; +import { + MaestroClient, + Asset as MaestroUtxoAsset, +} from '@maestro-org/typescript-sdk'; +import { DexV1Constant } from '../types/constants'; +import { Asset } from '../types/asset'; +import { FactoryV2 } from '../types/factory'; +import { LbeV2Types } from '../types/lbe-v2'; +import { NetworkId } from '../types/network'; +import { PoolV1, PoolV2, StablePool } from '..'; +import { TxHistory, TxIn, Value } from '../types/tx.internal'; import { Adapter, GetPoolByIdParams, GetPoolInTxParams, GetPoolPriceParams, - GetPoolsParams, GetStablePoolHistoryParams, GetStablePoolPriceParams, GetV1PoolHistoryParams, GetV2PoolHistoryParams, GetV2PoolPriceParams, -} from "./adapter"; -import { getScriptHashFromAddress } from "../utils/address-utils.internal"; +} from './adapter'; +import { getScriptHashFromAddress } from '../utils/address-utils.internal'; +import { + checkValidPoolOutput, + isValidPoolOutput, +} from '../types/pool.internal'; +import invariant from '@minswap/tiny-invariant'; export declare class MaestroServerError { code: number; @@ -27,6 +34,16 @@ export declare class MaestroServerError { message: string; } +export type MaestroPaginationOptions = { + count?: number; + cursor?: string; + order?: 'asc' | 'desc'; +}; + +export type GetPoolsParams = Omit & { + cursor: string; +}; + export class MaestroAdapter implements Adapter { protected readonly networkId: NetworkId; private readonly maestroClient: MaestroClient; @@ -36,8 +53,15 @@ export class MaestroAdapter implements Adapter { this.maestroClient = maestroClient; } + private mapMaestroAssetToValue(assets: MaestroUtxoAsset[]): Value { + return assets.map((asset) => ({ + unit: asset.unit, + quantity: asset.amount, + })); + } + public async getAssetDecimals(asset: string): Promise { - if (asset === "lovelace") { + if (asset === 'lovelace') { return 6; } try { @@ -58,7 +82,7 @@ export class MaestroAdapter implements Adapter { public async currentSlot(): Promise { // TODO: implement latest block handler in typescript-sdk - throw new Error("Method not implemented."); + throw new Error('Method not implemented.'); } // TODO @@ -74,9 +98,22 @@ export class MaestroAdapter implements Adapter { return null; } - // TODO + const poolUtxoAmount = this.mapMaestroAssetToValue(poolUtxo.assets); + const poolUtxoDatumHash = poolUtxo.datum?.hash ?? ''; - throw new Error("Method not implemented."); + checkValidPoolOutput(poolUtxo.address, poolUtxoAmount, poolUtxoDatumHash); + invariant( + poolUtxoDatumHash, + `expect pool to have datum hash, got ${poolUtxoDatumHash}`, + ); + + const txIn: TxIn = { txHash: txHash, index: poolUtxo.index }; + return new PoolV1.State( + poolUtxo.address, + txIn, + poolUtxoAmount, + poolUtxoDatumHash, + ); } public async getV1PoolById({ @@ -85,7 +122,7 @@ export class MaestroAdapter implements Adapter { const nft = `${DexV1Constant.POOL_NFT_POLICY_ID}${id}`; const nftTxs = await this.maestroClient.assets.assetTxs(nft, { count: 1, - order: "desc", + order: 'desc', }); if (nftTxs.data.length === 0) { return null; @@ -93,131 +130,161 @@ export class MaestroAdapter implements Adapter { return this.getV1PoolInTx({ txHash: nftTxs.data[0].tx_hash }); } - getV1Pools(params: GetPoolsParams): Promise { - throw new Error("Method not implemented."); + // TODO + public async getV1Pools({ + cursor, + count = 100, + order = 'asc', + }: GetPoolsParams): Promise { + const utxosResponse = await this.maestroClient.addresses.utxosByAddress( + DexV1Constant.POOL_SCRIPT_HASH, + { cursor, count, order }, + ); + const utxos = utxosResponse.data; + return utxos + .filter((utxo: (typeof utxos)[number]) => + isValidPoolOutput( + utxo.address, + this.mapMaestroAssetToValue(utxo.assets), + utxo.datum?.hash ?? '', + ), + ) + .map((utxo: (typeof utxos)[number]) => { + invariant( + utxo.datum?.hash, + `expect pool to have datum hash, got ${utxo.datum?.hash}`, + ); + const txIn: TxIn = { txHash: utxo.tx_hash, index: utxo.index }; + return new PoolV1.State( + utxo.address, + txIn, + this.mapMaestroAssetToValue(utxo.assets), + utxo.datum?.hash, + ); + }); } getV1PoolHistory(params: GetV1PoolHistoryParams): Promise { - throw new Error("Method not implemented."); + throw new Error('Method not implemented.'); } getV1PoolPrice(params: GetPoolPriceParams): Promise<[Big, Big]> { - throw new Error("Method not implemented."); + throw new Error('Method not implemented.'); } getAllV2Pools(): Promise<{ pools: PoolV2.State[]; errors: unknown[] }> { - throw new Error("Method not implemented."); + throw new Error('Method not implemented.'); } getV2Pools( params: GetPoolsParams, ): Promise<{ pools: PoolV2.State[]; errors: unknown[] }> { - throw new Error("Method not implemented."); + throw new Error('Method not implemented.'); } getV2PoolByPair(assetA: Asset, assetB: Asset): Promise { - throw new Error("Method not implemented."); + throw new Error('Method not implemented.'); } getV2PoolByLp(lpAsset: Asset): Promise { - throw new Error("Method not implemented."); + throw new Error('Method not implemented.'); } getV2PoolHistory(params: GetV2PoolHistoryParams): Promise { - throw new Error("Method not implemented."); + throw new Error('Method not implemented.'); } getV2PoolPrice(params: GetV2PoolPriceParams): Promise<[Big, Big]> { - throw new Error("Method not implemented."); + throw new Error('Method not implemented.'); } getAllFactoriesV2(): Promise<{ factories: FactoryV2.State[]; errors: unknown[]; }> { - throw new Error("Method not implemented."); + throw new Error('Method not implemented.'); } getFactoryV2ByPair( assetA: Asset, assetB: Asset, ): Promise { - throw new Error("Method not implemented."); + throw new Error('Method not implemented.'); } getAllStablePools(): Promise<{ pools: StablePool.State[]; errors: unknown[]; }> { - throw new Error("Method not implemented."); + throw new Error('Method not implemented.'); } getStablePoolByLpAsset(lpAsset: Asset): Promise { - throw new Error("Method not implemented."); + throw new Error('Method not implemented.'); } getStablePoolByNFT(nft: Asset): Promise { - throw new Error("Method not implemented."); + throw new Error('Method not implemented.'); } getStablePoolHistory( params: GetStablePoolHistoryParams, ): Promise { - throw new Error("Method not implemented."); + throw new Error('Method not implemented.'); } getStablePoolPrice(params: GetStablePoolPriceParams): Big { - throw new Error("Method not implemented."); + throw new Error('Method not implemented.'); } getAllLbeV2Factories(): Promise<{ factories: LbeV2Types.FactoryState[]; errors: unknown[]; }> { - throw new Error("Method not implemented."); + throw new Error('Method not implemented.'); } getLbeV2Factory( baseAsset: Asset, raiseAsset: Asset, ): Promise { - throw new Error("Method not implemented."); + throw new Error('Method not implemented.'); } getLbeV2HeadAndTailFactory(lbeId: string): Promise<{ head: LbeV2Types.FactoryState; tail: LbeV2Types.FactoryState; } | null> { - throw new Error("Method not implemented."); + throw new Error('Method not implemented.'); } getAllLbeV2Treasuries(): Promise<{ treasuries: LbeV2Types.TreasuryState[]; errors: unknown[]; }> { - throw new Error("Method not implemented."); + throw new Error('Method not implemented.'); } getLbeV2TreasuryByLbeId( lbeId: string, ): Promise { - throw new Error("Method not implemented."); + throw new Error('Method not implemented.'); } getAllLbeV2Managers(): Promise<{ managers: LbeV2Types.ManagerState[]; errors: unknown[]; }> { - throw new Error("Method not implemented."); + throw new Error('Method not implemented.'); } getLbeV2ManagerByLbeId( lbeId: string, ): Promise { - throw new Error("Method not implemented."); + throw new Error('Method not implemented.'); } getAllLbeV2Sellers(): Promise<{ sellers: LbeV2Types.SellerState[]; errors: unknown[]; }> { - throw new Error("Method not implemented."); + throw new Error('Method not implemented.'); } getLbeV2SellerByLbeId(lbeId: string): Promise { - throw new Error("Method not implemented."); + throw new Error('Method not implemented.'); } getAllLbeV2Orders(): Promise<{ orders: LbeV2Types.OrderState[]; errors: unknown[]; }> { - throw new Error("Method not implemented."); + throw new Error('Method not implemented.'); } getLbeV2OrdersByLbeId(lbeId: string): Promise { - throw new Error("Method not implemented."); + throw new Error('Method not implemented.'); } getLbeV2OrdersByLbeIdAndOwner( lbeId: string, owner: Address, ): Promise { - throw new Error("Method not implemented."); + throw new Error('Method not implemented.'); } } diff --git a/src/utils/lucid.ts b/src/utils/lucid.ts index 18d5471..da8faf9 100644 --- a/src/utils/lucid.ts +++ b/src/utils/lucid.ts @@ -1,4 +1,11 @@ -import { Address, Blockfrost, Lucid, Network } from "@minswap/lucid-cardano"; +import { + Address, + Blockfrost, + Lucid, + Maestro, + MaestroSupportedNetworks, + Network, +} from "@minswap/lucid-cardano"; /** * Initialize Lucid Instance for Backend Environment @@ -12,7 +19,7 @@ export async function getBackendLucidInstance( network: Network, projectId: string, blockfrostUrl: string, - address: Address + address: Address, ): Promise { const provider = new Blockfrost(blockfrostUrl, projectId); const lucid = await Lucid.new(provider, network); @@ -21,3 +28,26 @@ export async function getBackendLucidInstance( }); return lucid; } + +/** + * Initialize Lucid Maestro Instance for Backend Environment + * @param network Network you're working on + * @param apiKey Maestro API KEY + * @param address Your own address + * @returns + */ +export async function getBackendMasestroLucidInstance( + network: MaestroSupportedNetworks, + apiKey: string, + address: Address, +): Promise { + const provider = new Maestro({ + network: network, + apiKey: apiKey, + }); + const lucid = await Lucid.new(provider, network); + lucid.selectWalletFrom({ + address: address, + }); + return lucid; +} From fa897305807d91d42bf6c0c4fbccc58daf149d22 Mon Sep 17 00:00:00 2001 From: Vardominator Date: Fri, 13 Dec 2024 22:03:43 +0000 Subject: [PATCH 06/22] bump maestro ts-sdk --- package.json | 2 +- src/adapters/maestro.ts | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/package.json b/package.json index 29fde62..bb21bf1 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ "@blockfrost/blockfrost-js": "^5.5.0", "@cardano-ogmios/client": "^6.5.0", "@cardano-ogmios/schema": "^6.5.0", - "@maestro-org/typescript-sdk": "^1.6.1", + "@maestro-org/typescript-sdk": "^1.6.3", "@minswap/lucid-cardano": "0.10.10-minswap.4", "@minswap/tiny-invariant": "^1.2.0", "big.js": "^6.2.1", diff --git a/src/adapters/maestro.ts b/src/adapters/maestro.ts index 46926fd..7c11094 100644 --- a/src/adapters/maestro.ts +++ b/src/adapters/maestro.ts @@ -85,7 +85,6 @@ export class MaestroAdapter implements Adapter { throw new Error('Method not implemented.'); } - // TODO public async getV1PoolInTx({ txHash, }: GetPoolInTxParams): Promise { @@ -130,7 +129,6 @@ export class MaestroAdapter implements Adapter { return this.getV1PoolInTx({ txHash: nftTxs.data[0].tx_hash }); } - // TODO public async getV1Pools({ cursor, count = 100, From 2dbc0f37e2a4ef1d85ec21ba4cf8f9cf840eeb07 Mon Sep 17 00:00:00 2001 From: Vardominator Date: Fri, 13 Dec 2024 22:31:03 +0000 Subject: [PATCH 07/22] done for today --- src/adapters/maestro.ts | 203 ++++++++++++++++++++++++++++++++++++---- 1 file changed, 184 insertions(+), 19 deletions(-) diff --git a/src/adapters/maestro.ts b/src/adapters/maestro.ts index 7c11094..366d3a1 100644 --- a/src/adapters/maestro.ts +++ b/src/adapters/maestro.ts @@ -1,9 +1,9 @@ -import { Address } from '@minswap/lucid-cardano'; +import { Address, Tx } from '@minswap/lucid-cardano'; import { MaestroClient, Asset as MaestroUtxoAsset, } from '@maestro-org/typescript-sdk'; -import { DexV1Constant } from '../types/constants'; +import { DexV1Constant, DexV2Constant } from '../types/constants'; import { Asset } from '../types/asset'; import { FactoryV2 } from '../types/factory'; import { LbeV2Types } from '../types/lbe-v2'; @@ -17,7 +17,6 @@ import { GetPoolPriceParams, GetStablePoolHistoryParams, GetStablePoolPriceParams, - GetV1PoolHistoryParams, GetV2PoolHistoryParams, GetV2PoolPriceParams, } from './adapter'; @@ -25,8 +24,11 @@ import { getScriptHashFromAddress } from '../utils/address-utils.internal'; import { checkValidPoolOutput, isValidPoolOutput, + normalizeAssets, } from '../types/pool.internal'; import invariant from '@minswap/tiny-invariant'; +import Big from 'big.js'; +import { StringUtils } from '../types/string'; export declare class MaestroServerError { code: number; @@ -44,6 +46,10 @@ export type GetPoolsParams = Omit & { cursor: string; }; +export type GetV1PoolHistoryParams = MaestroPaginationOptions & { + id: string; +}; + export class MaestroAdapter implements Adapter { protected readonly networkId: NetworkId; private readonly maestroClient: MaestroClient; @@ -81,8 +87,9 @@ export class MaestroAdapter implements Adapter { } public async currentSlot(): Promise { - // TODO: implement latest block handler in typescript-sdk - throw new Error('Method not implemented.'); + const latestBlock = (await this.maestroClient.blocks.blockLatest()).data + .absolute_slot; + return latestBlock ?? 0; } public async getV1PoolInTx({ @@ -162,123 +169,281 @@ export class MaestroAdapter implements Adapter { }); } - getV1PoolHistory(params: GetV1PoolHistoryParams): Promise { - throw new Error('Method not implemented.'); + // TODO + public async getV1PoolHistory({ + id, + count = 100, + order = 'desc', + }: GetV1PoolHistoryParams): Promise { + const nft = `${DexV1Constant.POOL_NFT_POLICY_ID}${id}`; + const nftTxs = await this.maestroClient.assets.assetTxs(nft, { + count, + order, + }); + const nftTxsData = nftTxs.data; + return nftTxsData.map( + (tx: (typeof nftTxsData)[number]): TxHistory => ({ + txHash: tx.tx_hash, + txIndex: 0, // TBD if this works: Maestro Asset Txs doesn't return index + blockHeight: tx.slot, + time: new Date(tx.timestamp), + }), + ); } - getV1PoolPrice(params: GetPoolPriceParams): Promise<[Big, Big]> { - throw new Error('Method not implemented.'); + public async getV1PoolPrice({ + pool, + decimalsA, + decimalsB, + }: GetPoolPriceParams): Promise<[Big, Big]> { + if (decimalsA === undefined) { + decimalsA = await this.getAssetDecimals(pool.assetA); + } + if (decimalsB === undefined) { + decimalsB = await this.getAssetDecimals(pool.assetB); + } + const adjustedReserveA = Big(pool.reserveA.toString()).div( + Big(10).pow(decimalsA), + ); + const adjustedReserveB = Big(pool.reserveB.toString()).div( + Big(10).pow(decimalsB), + ); + const priceAB = adjustedReserveA.div(adjustedReserveB); + const priceBA = adjustedReserveB.div(adjustedReserveA); + return [priceAB, priceBA]; } - getAllV2Pools(): Promise<{ pools: PoolV2.State[]; errors: unknown[] }> { - throw new Error('Method not implemented.'); + + public async getAllV2Pools(): Promise<{ + pools: PoolV2.State[]; + errors: unknown[]; + }> { + const v2Config = DexV2Constant.CONFIG[this.networkId]; + const utxos = await this.maestroClient.addresses.utxosByAddress( + v2Config.poolScriptHashBech32, + ); + const utxosData = utxos.data; + + const pools: PoolV2.State[] = []; + const errors: unknown[] = []; + for (const utxo of utxosData) { + try { + if (!utxo.datum) { + throw new Error(`Cannot find datum of Pool V2, tx: ${utxo.tx_hash}`); + } + const pool = new PoolV2.State( + this.networkId, + utxo.address, + { txHash: utxo.tx_hash, index: utxo.index }, + this.mapMaestroAssetToValue(utxo.assets), + utxo.datum.hash, + ); + pools.push(pool); + } catch (err) { + errors.push(err); + } + } + return { + pools: pools, + errors: errors, + }; } + + // TODO getV2Pools( params: GetPoolsParams, ): Promise<{ pools: PoolV2.State[]; errors: unknown[] }> { throw new Error('Method not implemented.'); } - getV2PoolByPair(assetA: Asset, assetB: Asset): Promise { - throw new Error('Method not implemented.'); + + public async getV2PoolByPair( + assetA: Asset, + assetB: Asset, + ): Promise { + const [normalizedAssetA, normalizedAssetB] = normalizeAssets( + Asset.toString(assetA), + Asset.toString(assetB), + ); + const { pools: allPools } = await this.getAllV2Pools(); + return ( + allPools.find( + (pool) => + pool.assetA === normalizedAssetA && pool.assetB === normalizedAssetB, + ) ?? null + ); } - getV2PoolByLp(lpAsset: Asset): Promise { - throw new Error('Method not implemented.'); + + public async getV2PoolByLp(lpAsset: Asset): Promise { + const { pools: allPools } = await this.getAllV2Pools(); + return ( + allPools.find((pool) => Asset.compare(pool.lpAsset, lpAsset) === 0) ?? + null + ); } + + // TODO getV2PoolHistory(params: GetV2PoolHistoryParams): Promise { throw new Error('Method not implemented.'); } - getV2PoolPrice(params: GetV2PoolPriceParams): Promise<[Big, Big]> { - throw new Error('Method not implemented.'); + + public async getV2PoolPrice({ + pool, + decimalsA, + decimalsB, + }: GetV2PoolPriceParams): Promise<[Big, Big]> { + if (decimalsA === undefined) { + decimalsA = await this.getAssetDecimals(pool.assetA); + } + if (decimalsB === undefined) { + decimalsB = await this.getAssetDecimals(pool.assetB); + } + const adjustedReserveA = Big(pool.reserveA.toString()).div( + Big(10).pow(decimalsA), + ); + const adjustedReserveB = Big(pool.reserveB.toString()).div( + Big(10).pow(decimalsB), + ); + const priceAB = adjustedReserveA.div(adjustedReserveB); + const priceBA = adjustedReserveB.div(adjustedReserveA); + return [priceAB, priceBA]; } + + // TODO getAllFactoriesV2(): Promise<{ factories: FactoryV2.State[]; errors: unknown[]; }> { throw new Error('Method not implemented.'); } - getFactoryV2ByPair( + + public async getFactoryV2ByPair( assetA: Asset, assetB: Asset, ): Promise { - throw new Error('Method not implemented.'); + const factoryIdent = PoolV2.computeLPAssetName(assetA, assetB); + const { factories: allFactories } = await this.getAllFactoriesV2(); + for (const factory of allFactories) { + if ( + StringUtils.compare(factory.head, factoryIdent) < 0 && + StringUtils.compare(factoryIdent, factory.tail) < 0 + ) { + return factory; + } + } + + return null; } + + // TODO getAllStablePools(): Promise<{ pools: StablePool.State[]; errors: unknown[]; }> { throw new Error('Method not implemented.'); } + + // TODO getStablePoolByLpAsset(lpAsset: Asset): Promise { throw new Error('Method not implemented.'); } + + // TODO getStablePoolByNFT(nft: Asset): Promise { throw new Error('Method not implemented.'); } + + // TODO getStablePoolHistory( params: GetStablePoolHistoryParams, ): Promise { throw new Error('Method not implemented.'); } + + // TODO getStablePoolPrice(params: GetStablePoolPriceParams): Big { throw new Error('Method not implemented.'); } + + // TODO getAllLbeV2Factories(): Promise<{ factories: LbeV2Types.FactoryState[]; errors: unknown[]; }> { throw new Error('Method not implemented.'); } + + // TODO getLbeV2Factory( baseAsset: Asset, raiseAsset: Asset, ): Promise { throw new Error('Method not implemented.'); } + + // TODO getLbeV2HeadAndTailFactory(lbeId: string): Promise<{ head: LbeV2Types.FactoryState; tail: LbeV2Types.FactoryState; } | null> { throw new Error('Method not implemented.'); } + + // TODO getAllLbeV2Treasuries(): Promise<{ treasuries: LbeV2Types.TreasuryState[]; errors: unknown[]; }> { throw new Error('Method not implemented.'); } + + // TODO getLbeV2TreasuryByLbeId( lbeId: string, ): Promise { throw new Error('Method not implemented.'); } + + // TODO getAllLbeV2Managers(): Promise<{ managers: LbeV2Types.ManagerState[]; errors: unknown[]; }> { throw new Error('Method not implemented.'); } + + // TODO getLbeV2ManagerByLbeId( lbeId: string, ): Promise { throw new Error('Method not implemented.'); } + + // TODO getAllLbeV2Sellers(): Promise<{ sellers: LbeV2Types.SellerState[]; errors: unknown[]; }> { throw new Error('Method not implemented.'); } + + // TODO getLbeV2SellerByLbeId(lbeId: string): Promise { throw new Error('Method not implemented.'); } + + // TODO getAllLbeV2Orders(): Promise<{ orders: LbeV2Types.OrderState[]; errors: unknown[]; }> { throw new Error('Method not implemented.'); } + + // TODO getLbeV2OrdersByLbeId(lbeId: string): Promise { throw new Error('Method not implemented.'); } + + // TODO getLbeV2OrdersByLbeIdAndOwner( lbeId: string, owner: Address, From 5ff81f09f4ea58822a3c834c79d4b0a67e343ff4 Mon Sep 17 00:00:00 2001 From: Vardominator Date: Sat, 14 Dec 2024 06:12:49 +0000 Subject: [PATCH 08/22] done --- examples/expired-order-monitor-example.ts | 26 +- examples/lbe-v2-worker-example.ts | 28 +- examples/maestro-adapter-example.ts | 78 +++- src/adapters/adapter.ts | 1 + src/adapters/blockfrost.ts | 4 +- src/adapters/maestro.ts | 546 +++++++++++++++++++--- src/calculate.ts | 92 ++-- src/dex-v2.ts | 146 +++--- src/dex.ts | 98 ++-- src/expired-order-monitor.ts | 20 +- src/index.ts | 18 +- src/stableswap.ts | 100 ++-- test/adapter.test.ts | 70 +-- test/address.test.ts | 62 +-- test/batcher-fee.test.ts | 44 +- test/order.test.ts | 154 +++--- test/pool.test.ts | 72 +-- 17 files changed, 1012 insertions(+), 547 deletions(-) diff --git a/examples/expired-order-monitor-example.ts b/examples/expired-order-monitor-example.ts index 3b85155..6b8fb10 100644 --- a/examples/expired-order-monitor-example.ts +++ b/examples/expired-order-monitor-example.ts @@ -1,36 +1,36 @@ -import { BlockFrostAPI } from "@blockfrost/blockfrost-js"; -import { Network } from "@minswap/lucid-cardano"; +import { BlockFrostAPI } from '@blockfrost/blockfrost-js'; +import { Network } from '@minswap/lucid-cardano'; -import { BlockfrostAdapter, NetworkId } from "../src"; -import { ExpiredOrderMonitor } from "../src/expired-order-monitor"; -import { getBackendLucidInstance } from "../src/utils/lucid"; +import { BlockfrostAdapter, NetworkId } from '../src'; +import { ExpiredOrderMonitor } from '../src/expired-order-monitor'; +import { getBackendLucidInstance } from '../src/utils/lucid'; async function main(): Promise { - const network: Network = "Preprod"; - const blockfrostProjectId = ""; - const blockfrostUrl = "https://cardano-preprod.blockfrost.io/api/v0"; + const network: Network = 'Preprod'; + const blockfrostProjectId = ''; + const blockfrostUrl = 'https://cardano-preprod.blockfrost.io/api/v0'; const address = - "addr_test1qqf2dhk96l2kq4xh2fkhwksv0h49vy9exw383eshppn863jereuqgh2zwxsedytve5gp9any9jwc5hz98sd47rwfv40stc26fr"; + 'addr_test1qqf2dhk96l2kq4xh2fkhwksv0h49vy9exw383eshppn863jereuqgh2zwxsedytve5gp9any9jwc5hz98sd47rwfv40stc26fr'; const lucid = await getBackendLucidInstance( network, blockfrostProjectId, blockfrostUrl, - address + address, ); const blockfrostAdapter = new BlockfrostAdapter( NetworkId.TESTNET, new BlockFrostAPI({ projectId: blockfrostProjectId, - network: "preprod", - }) + network: 'preprod', + }), ); const monitor = new ExpiredOrderMonitor({ lucid, blockfrostAdapter, - privateKey: "", + privateKey: '', }); await monitor.start(); diff --git a/examples/lbe-v2-worker-example.ts b/examples/lbe-v2-worker-example.ts index 5681f17..b2507f1 100644 --- a/examples/lbe-v2-worker-example.ts +++ b/examples/lbe-v2-worker-example.ts @@ -1,31 +1,31 @@ -import { BlockFrostAPI } from "@blockfrost/blockfrost-js"; -import { Network } from "@minswap/lucid-cardano"; +import { BlockFrostAPI } from '@blockfrost/blockfrost-js'; +import { Network } from '@minswap/lucid-cardano'; -import { BlockfrostAdapter, NetworkId } from "../src"; -import { LbeV2Worker } from "../src/lbe-v2-worker/worker"; -import { NetworkEnvironment } from "../src/types/network"; -import { getBackendLucidInstance } from "../src/utils/lucid"; +import { BlockfrostAdapter, NetworkId } from '../src'; +import { LbeV2Worker } from '../src/lbe-v2-worker/worker'; +import { NetworkEnvironment } from '../src/types/network'; +import { getBackendLucidInstance } from '../src/utils/lucid'; async function main(): Promise { - const network: Network = "Preprod"; - const blockfrostProjectId = ""; - const blockfrostUrl = "https://cardano-preprod.blockfrost.io/api/v0"; + const network: Network = 'Preprod'; + const blockfrostProjectId = ''; + const blockfrostUrl = 'https://cardano-preprod.blockfrost.io/api/v0'; const address = - "addr_test1vrd9v47japxwp8540vsrh4grz4u9urfpfawwy7sf6r0vxqgm7wdxh"; + 'addr_test1vrd9v47japxwp8540vsrh4grz4u9urfpfawwy7sf6r0vxqgm7wdxh'; const lucid = await getBackendLucidInstance( network, blockfrostProjectId, blockfrostUrl, - address + address, ); const blockfrostAdapter = new BlockfrostAdapter( NetworkId.TESTNET, new BlockFrostAPI({ projectId: blockfrostProjectId, - network: "preprod", - }) + network: 'preprod', + }), ); const worker = new LbeV2Worker({ @@ -33,7 +33,7 @@ async function main(): Promise { networkId: NetworkId.TESTNET, lucid, blockfrostAdapter, - privateKey: "", + privateKey: '', }); await worker.start(); diff --git a/examples/maestro-adapter-example.ts b/examples/maestro-adapter-example.ts index bbc33a9..f104ef7 100644 --- a/examples/maestro-adapter-example.ts +++ b/examples/maestro-adapter-example.ts @@ -1,8 +1,10 @@ -import { MaestroClient, Configuration } from '@maestro-org/typescript-sdk'; -import { Network } from '@minswap/lucid-cardano'; +import { Address, Lucid, Network, TxComplete } from '@minswap/lucid-cardano'; +import { Asset, NetworkId, PoolV2 } from '../src'; import { getBackendMasestroLucidInstance } from '../src/utils/lucid'; +import { LbeV2 } from '../src/lbe-v2/lbe-v2'; import { MaestroAdapter } from '../src/adapters/maestro'; -import { NetworkId } from '../src'; +import { MaestroClient, Configuration } from '@maestro-org/typescript-sdk'; +import invariant from '@minswap/tiny-invariant'; async function main(): Promise { const cardanoNetwork: Network = 'Preprod'; @@ -26,5 +28,73 @@ async function main(): Promise { const maestroAdapter = new MaestroAdapter(NetworkId.TESTNET, maestroClient); - // TODO + const txComplete = await _lbeV2DepositOrderExample( + lucid, + address, + maestroAdapter, + ); + const signedTx = await txComplete + .signWithPrivateKey('') + .complete(); + + const txId = await signedTx.submit(); + console.info(`Transaction submitted successfully: ${txId}`); } + +// Example Tx: 7af5ea80b6a4a587e2c6cfce383367829f0cb68c90b65656c8198a72afc3f419 +async function _lbeV2DepositOrderExample( + lucid: Lucid, + address: Address, + maestroAdapter: MaestroAdapter, +): Promise { + const baseAsset = Asset.fromString( + 'e16c2dc8ae937e8d3790c7fd7168d7b994621ba14ca11415f39fed7243414b45', + ); + const raiseAsset = Asset.fromString('lovelace'); + + const lbeId = PoolV2.computeLPAssetName(baseAsset, raiseAsset); + const treasury = await maestroAdapter.getLbeV2TreasuryByLbeId(lbeId); + invariant(treasury !== null, `Can not find treasury by lbeId ${lbeId}`); + const treasuryUtxos = await lucid.utxosByOutRef([ + { txHash: treasury.txIn.txHash, outputIndex: treasury.txIn.index }, + ]); + invariant(treasuryUtxos.length === 1, 'Can not find treasury Utxo'); + + const seller = await maestroAdapter.getLbeV2SellerByLbeId(lbeId); + invariant(seller !== null, `Can not find seller by lbeId ${lbeId}`); + const sellerUtxos = await lucid.utxosByOutRef([ + { txHash: seller.txIn.txHash, outputIndex: seller.txIn.index }, + ]); + invariant(sellerUtxos.length === 1, 'Can not find seller Utxo'); + + const orders = await maestroAdapter.getLbeV2OrdersByLbeIdAndOwner( + lbeId, + address, + ); + const orderUtxos = + orders.length > 0 + ? await lucid.utxosByOutRef( + orders.map((o) => ({ + txHash: o.txIn.txHash, + outputIndex: o.txIn.index, + })), + ) + : []; + + invariant( + orderUtxos.length === orders.length, + 'Can not find enough order Utxos', + ); + + const currentSlot = await maestroAdapter.currentSlot(); + return new LbeV2(lucid).depositOrWithdrawOrder({ + currentSlot: currentSlot, + existingOrderUtxos: orderUtxos, + treasuryUtxo: treasuryUtxos[0], + sellerUtxo: sellerUtxos[0], + owner: address, + action: { type: 'deposit', additionalAmount: 1_000_000n }, + }); +} + +void main(); diff --git a/src/adapters/adapter.ts b/src/adapters/adapter.ts index 37b9e1d..de09785 100644 --- a/src/adapters/adapter.ts +++ b/src/adapters/adapter.ts @@ -1,5 +1,6 @@ import { Address } from '@minswap/lucid-cardano'; import Big from 'big.js'; + import { Asset } from '../types/asset'; import { FactoryV2 } from '../types/factory'; import { LbeV2Types } from '../types/lbe-v2'; diff --git a/src/adapters/blockfrost.ts b/src/adapters/blockfrost.ts index 63e1e0e..eb838bd 100644 --- a/src/adapters/blockfrost.ts +++ b/src/adapters/blockfrost.ts @@ -41,11 +41,11 @@ import { getScriptHashFromAddress } from '../utils/address-utils.internal'; import { networkEnvToLucidNetwork } from '../utils/network.internal'; import { Adapter, - GetPoolInTxParams, GetPoolByIdParams, - GetV2PoolPriceParams, + GetPoolInTxParams, GetPoolPriceParams, GetStablePoolPriceParams, + GetV2PoolPriceParams, } from './adapter'; export type GetPoolsParams = Omit & { diff --git a/src/adapters/maestro.ts b/src/adapters/maestro.ts index 366d3a1..b1159aa 100644 --- a/src/adapters/maestro.ts +++ b/src/adapters/maestro.ts @@ -1,15 +1,32 @@ -import { Address, Tx } from '@minswap/lucid-cardano'; import { - MaestroClient, Asset as MaestroUtxoAsset, + MaestroClient, + UtxoWithSlot, } from '@maestro-org/typescript-sdk'; -import { DexV1Constant, DexV2Constant } from '../types/constants'; +import { Address } from '@minswap/lucid-cardano'; +import invariant from '@minswap/tiny-invariant'; +import Big from 'big.js'; + +import { PoolV1, PoolV2, StablePool } from '..'; +import { StableswapCalculation } from '../calculate'; import { Asset } from '../types/asset'; +import { + DexV1Constant, + DexV2Constant, + LbeV2Constant, + StableswapConstant, +} from '../types/constants'; import { FactoryV2 } from '../types/factory'; import { LbeV2Types } from '../types/lbe-v2'; import { NetworkId } from '../types/network'; -import { PoolV1, PoolV2, StablePool } from '..'; +import { + checkValidPoolOutput, + isValidPoolOutput, + normalizeAssets, +} from '../types/pool.internal'; +import { StringUtils } from '../types/string'; import { TxHistory, TxIn, Value } from '../types/tx.internal'; +import { getScriptHashFromAddress } from '../utils/address-utils.internal'; import { Adapter, GetPoolByIdParams, @@ -20,15 +37,6 @@ import { GetV2PoolHistoryParams, GetV2PoolPriceParams, } from './adapter'; -import { getScriptHashFromAddress } from '../utils/address-utils.internal'; -import { - checkValidPoolOutput, - isValidPoolOutput, - normalizeAssets, -} from '../types/pool.internal'; -import invariant from '@minswap/tiny-invariant'; -import Big from 'big.js'; -import { StringUtils } from '../types/string'; export declare class MaestroServerError { code: number; @@ -169,7 +177,6 @@ export class MaestroAdapter implements Adapter { }); } - // TODO public async getV1PoolHistory({ id, count = 100, @@ -248,11 +255,46 @@ export class MaestroAdapter implements Adapter { }; } - // TODO - getV2Pools( - params: GetPoolsParams, - ): Promise<{ pools: PoolV2.State[]; errors: unknown[] }> { - throw new Error('Method not implemented.'); + public async getV2Pools({ + cursor, + count = 100, + order = 'asc', + }: GetPoolsParams): Promise<{ pools: PoolV2.State[]; errors: unknown[] }> { + const v2Config = DexV2Constant.CONFIG[this.networkId]; + const utxos = await this.maestroClient.addresses.utxosByAddress( + v2Config.poolScriptHashBech32, + { + asset: v2Config.poolAuthenAsset, + cursor, + count, + order, + }, + ); + const utxosData = utxos.data; + + const pools: PoolV2.State[] = []; + const errors: unknown[] = []; + for (const utxo of utxosData) { + try { + if (!utxo.datum) { + throw new Error(`Cannot find datum of Pool V2, tx: ${utxo.tx_hash}`); + } + const pool = new PoolV2.State( + this.networkId, + utxo.address, + { txHash: utxo.tx_hash, index: utxo.index }, + this.mapMaestroAssetToValue(utxo.assets), + utxo.datum.hash, + ); + pools.push(pool); + } catch (err) { + errors.push(err); + } + } + return { + pools: pools, + errors: errors, + }; } public async getV2PoolByPair( @@ -280,9 +322,10 @@ export class MaestroAdapter implements Adapter { ); } - // TODO - getV2PoolHistory(params: GetV2PoolHistoryParams): Promise { - throw new Error('Method not implemented.'); + public async getV2PoolHistory( + _params: GetV2PoolHistoryParams, + ): Promise { + throw Error('Not supported yet. Please use MinswapAdapter'); } public async getV2PoolPrice({ @@ -307,12 +350,44 @@ export class MaestroAdapter implements Adapter { return [priceAB, priceBA]; } - // TODO - getAllFactoriesV2(): Promise<{ + public async getAllFactoriesV2(): Promise<{ factories: FactoryV2.State[]; errors: unknown[]; }> { - throw new Error('Method not implemented.'); + const v2Config = DexV2Constant.CONFIG[this.networkId]; + const utxos = await this.maestroClient.addresses.utxosByAddress( + v2Config.factoryScriptHashBech32, + { + asset: v2Config.factoryAsset, + }, + ); + const utxosData = utxos.data; + + const factories: FactoryV2.State[] = []; + const errors: unknown[] = []; + for (const utxo of utxosData) { + try { + if (!utxo.datum) { + throw new Error( + `Cannot find datum of Factory V2, tx: ${utxo.tx_hash}`, + ); + } + const factory = new FactoryV2.State( + this.networkId, + utxo.address, + { txHash: utxo.tx_hash, index: utxo.index }, + this.mapMaestroAssetToValue(utxo.assets), + utxo.datum.hash, + ); + factories.push(factory); + } catch (err) { + errors.push(err); + } + } + return { + factories: factories, + errors: errors, + }; } public async getFactoryV2ByPair( @@ -333,121 +408,440 @@ export class MaestroAdapter implements Adapter { return null; } - // TODO - getAllStablePools(): Promise<{ + private async parseStablePoolState( + utxo: UtxoWithSlot, + ): Promise { + let datum: string; + if (utxo.datum?.hash) { + datum = utxo.datum.hash; + } else if (utxo.datum?.hash) { + datum = await this.getDatumByDatumHash(utxo.datum.hash); + } else { + throw new Error('Cannot find datum of Stable Pool'); + } + const pool = new StablePool.State( + this.networkId, + utxo.address, + { txHash: utxo.tx_hash, index: utxo.index }, + this.mapMaestroAssetToValue(utxo.assets), + datum, + ); + return pool; + } + + public async getAllStablePools(): Promise<{ pools: StablePool.State[]; errors: unknown[]; }> { - throw new Error('Method not implemented.'); + const poolAddresses = StableswapConstant.CONFIG[this.networkId].map( + (cfg) => cfg.poolAddress, + ); + const pools: StablePool.State[] = []; + const errors: unknown[] = []; + for (const poolAddr of poolAddresses) { + const utxos = await this.maestroClient.addresses.utxosByAddress(poolAddr); + const utxosData = utxos.data; + try { + for (const utxo of utxosData) { + const pool = await this.parseStablePoolState(utxo); + pools.push(pool); + } + } catch (err) { + errors.push(err); + } + } + + return { + pools: pools, + errors: errors, + }; } - // TODO - getStablePoolByLpAsset(lpAsset: Asset): Promise { - throw new Error('Method not implemented.'); + public async getStablePoolByLpAsset( + lpAsset: Asset, + ): Promise { + const config = StableswapConstant.CONFIG[this.networkId].find( + (cfg) => cfg.lpAsset === Asset.toString(lpAsset), + ); + invariant( + config, + `getStablePoolByLpAsset: Can not find stableswap config by LP Asset ${Asset.toString( + lpAsset, + )}`, + ); + const utxos = await this.maestroClient.addresses.utxosByAddress( + config.poolAddress, + { + asset: config.nftAsset, + }, + ); + const utxosData = utxos.data; + + if (utxosData.length === 1) { + const poolUtxo = utxosData[0]; + return await this.parseStablePoolState(poolUtxo); + } + return null; } - // TODO - getStablePoolByNFT(nft: Asset): Promise { - throw new Error('Method not implemented.'); + public async getStablePoolByNFT( + nft: Asset, + ): Promise { + const poolAddress = StableswapConstant.CONFIG[this.networkId].find( + (cfg) => cfg.nftAsset === Asset.toString(nft), + )?.poolAddress; + if (!poolAddress) { + throw new Error( + `Cannot find Stable Pool having NFT ${Asset.toString(nft)}`, + ); + } + + const utxos = await this.maestroClient.addresses.utxosByAddress( + poolAddress, + { + asset: Asset.toString(nft), + }, + ); + const utxosData = utxos.data; + + if (utxosData.length === 1) { + const poolUtxo = utxosData[0]; + return await this.parseStablePoolState(poolUtxo); + } + return null; } - // TODO getStablePoolHistory( - params: GetStablePoolHistoryParams, + _params: GetStablePoolHistoryParams, ): Promise { - throw new Error('Method not implemented.'); + throw Error('Not supported yet. Please use MinswapAdapter'); } - // TODO - getStablePoolPrice(params: GetStablePoolPriceParams): Big { - throw new Error('Method not implemented.'); + public getStablePoolPrice({ + pool, + assetAIndex, + assetBIndex, + }: GetStablePoolPriceParams): Big { + const config = pool.config; + const [priceNum, priceDen] = StableswapCalculation.getPrice( + pool.datum.balances, + config.multiples, + pool.amp, + assetAIndex, + assetBIndex, + ); + + return Big(priceNum.toString()).div(priceDen.toString()); } - // TODO - getAllLbeV2Factories(): Promise<{ + public async getAllLbeV2Factories(): Promise<{ factories: LbeV2Types.FactoryState[]; errors: unknown[]; }> { - throw new Error('Method not implemented.'); + const config = LbeV2Constant.CONFIG[this.networkId]; + const utxos = await this.maestroClient.addresses.utxosByAddress( + config.factoryHashBech32, + { + asset: config.factoryAsset, + }, + ); + const utxosData = utxos.data; + + const factories: LbeV2Types.FactoryState[] = []; + const errors: unknown[] = []; + for (const utxo of utxosData) { + try { + if (!utxo.datum) { + throw new Error( + `Cannot find datum of LBE V2 Factory, tx: ${utxo.tx_hash}`, + ); + } + + const factory = new LbeV2Types.FactoryState( + this.networkId, + utxo.address, + { txHash: utxo.tx_hash, index: utxo.index }, + this.mapMaestroAssetToValue(utxo.assets), + utxo.datum.hash, + ); + factories.push(factory); + } catch (err) { + errors.push(err); + } + } + return { + factories: factories, + errors: errors, + }; } - // TODO - getLbeV2Factory( + public async getLbeV2Factory( baseAsset: Asset, raiseAsset: Asset, ): Promise { - throw new Error('Method not implemented.'); + const factoryIdent = PoolV2.computeLPAssetName(baseAsset, raiseAsset); + const { factories: allFactories } = await this.getAllLbeV2Factories(); + for (const factory of allFactories) { + if ( + StringUtils.compare(factory.head, factoryIdent) < 0 && + StringUtils.compare(factoryIdent, factory.tail) < 0 + ) { + return factory; + } + } + + return null; } - // TODO - getLbeV2HeadAndTailFactory(lbeId: string): Promise<{ + public async getLbeV2HeadAndTailFactory(lbeId: string): Promise<{ head: LbeV2Types.FactoryState; tail: LbeV2Types.FactoryState; } | null> { - throw new Error('Method not implemented.'); + const { factories: allFactories } = await this.getAllLbeV2Factories(); + let head: LbeV2Types.FactoryState | undefined = undefined; + let tail: LbeV2Types.FactoryState | undefined = undefined; + for (const factory of allFactories) { + if (factory.head === lbeId) { + tail = factory; + } + if (factory.tail === lbeId) { + head = factory; + } + } + if (head === undefined || tail === undefined) { + return null; + } + return { head, tail }; } - // TODO - getAllLbeV2Treasuries(): Promise<{ + public async getAllLbeV2Treasuries(): Promise<{ treasuries: LbeV2Types.TreasuryState[]; errors: unknown[]; }> { - throw new Error('Method not implemented.'); + const config = LbeV2Constant.CONFIG[this.networkId]; + + const utxos = await this.maestroClient.addresses.utxosByAddress( + config.treasuryHashBech32, + { + asset: config.treasuryAsset, + }, + ); + const utxosData = utxos.data; + + const treasuries: LbeV2Types.TreasuryState[] = []; + const errors: unknown[] = []; + for (const utxo of utxosData) { + try { + if (!utxo.datum) { + throw new Error( + `Cannot find datum of LBE V2 Treasury, tx: ${utxo.tx_hash}`, + ); + } + + const treasury = new LbeV2Types.TreasuryState( + this.networkId, + utxo.address, + { txHash: utxo.tx_hash, index: utxo.index }, + this.mapMaestroAssetToValue(utxo.assets), + utxo.datum.hash, + ); + treasuries.push(treasury); + } catch (err) { + errors.push(err); + } + } + return { + treasuries: treasuries, + errors: errors, + }; } - // TODO - getLbeV2TreasuryByLbeId( + public async getLbeV2TreasuryByLbeId( lbeId: string, ): Promise { - throw new Error('Method not implemented.'); + const { treasuries: allTreasuries } = await this.getAllLbeV2Treasuries(); + for (const treasury of allTreasuries) { + if (treasury.lbeId === lbeId) { + return treasury; + } + } + return null; } - // TODO - getAllLbeV2Managers(): Promise<{ + public async getAllLbeV2Managers(): Promise<{ managers: LbeV2Types.ManagerState[]; errors: unknown[]; }> { - throw new Error('Method not implemented.'); + const config = LbeV2Constant.CONFIG[this.networkId]; + + const utxos = await this.maestroClient.addresses.utxosByAddress( + config.managerHashBech32, + { + asset: config.managerAsset, + }, + ); + const utxosData = utxos.data; + + const managers: LbeV2Types.ManagerState[] = []; + const errors: unknown[] = []; + for (const utxo of utxosData) { + try { + if (!utxo.datum) { + throw new Error( + `Cannot find datum of Lbe V2 Manager, tx: ${utxo.tx_hash}`, + ); + } + + const manager = new LbeV2Types.ManagerState( + this.networkId, + utxo.address, + { txHash: utxo.tx_hash, index: utxo.index }, + this.mapMaestroAssetToValue(utxo.assets), + utxo.datum.hash, + ); + managers.push(manager); + } catch (err) { + errors.push(err); + } + } + return { + managers: managers, + errors: errors, + }; } - // TODO - getLbeV2ManagerByLbeId( + public async getLbeV2ManagerByLbeId( lbeId: string, ): Promise { - throw new Error('Method not implemented.'); + const { managers } = await this.getAllLbeV2Managers(); + for (const manager of managers) { + if (manager.lbeId === lbeId) { + return manager; + } + } + return null; } - // TODO - getAllLbeV2Sellers(): Promise<{ + public async getAllLbeV2Sellers(): Promise<{ sellers: LbeV2Types.SellerState[]; errors: unknown[]; }> { - throw new Error('Method not implemented.'); + const config = LbeV2Constant.CONFIG[this.networkId]; + + const utxos = await this.maestroClient.addresses.utxosByAddress( + config.sellerHashBech32, + { + asset: config.sellerAsset, + }, + ); + const utxosData = utxos.data; + + const sellers: LbeV2Types.SellerState[] = []; + const errors: unknown[] = []; + for (const utxo of utxosData) { + try { + if (!utxo.datum) { + throw new Error( + `Cannot find datum of Lbe V2 Seller, tx: ${utxo.tx_hash}`, + ); + } + + const seller = new LbeV2Types.SellerState( + this.networkId, + utxo.address, + { txHash: utxo.tx_hash, index: utxo.index }, + this.mapMaestroAssetToValue(utxo.assets), + utxo.datum.hash, + ); + sellers.push(seller); + } catch (err) { + errors.push(err); + } + } + return { + sellers: sellers, + errors: errors, + }; } - // TODO - getLbeV2SellerByLbeId(lbeId: string): Promise { - throw new Error('Method not implemented.'); + public async getLbeV2SellerByLbeId( + lbeId: string, + ): Promise { + const { sellers } = await this.getAllLbeV2Sellers(); + for (const seller of sellers) { + if (seller.lbeId === lbeId) { + return seller; + } + } + return null; } - // TODO - getAllLbeV2Orders(): Promise<{ + public async getAllLbeV2Orders(): Promise<{ orders: LbeV2Types.OrderState[]; errors: unknown[]; }> { - throw new Error('Method not implemented.'); + const config = LbeV2Constant.CONFIG[this.networkId]; + + const utxos = await this.maestroClient.addresses.utxosByAddress( + config.orderHashBech32, + { + asset: config.orderAsset, + }, + ); + const utxosData = utxos.data; + + const orders: LbeV2Types.OrderState[] = []; + const errors: unknown[] = []; + for (const utxo of utxosData) { + try { + if (!utxo.datum) { + throw new Error( + `Cannot find datum of Lbe V2 Order, tx: ${utxo.tx_hash}`, + ); + } + + const order = new LbeV2Types.OrderState( + this.networkId, + utxo.address, + { txHash: utxo.tx_hash, index: utxo.index }, + this.mapMaestroAssetToValue(utxo.assets), + utxo.datum.hash, + ); + orders.push(order); + } catch (err) { + errors.push(err); + } + } + return { + orders: orders, + errors: errors, + }; } - // TODO - getLbeV2OrdersByLbeId(lbeId: string): Promise { - throw new Error('Method not implemented.'); + public async getLbeV2OrdersByLbeId( + lbeId: string, + ): Promise { + const { orders: allOrders } = await this.getAllLbeV2Orders(); + const orders: LbeV2Types.OrderState[] = []; + for (const order of allOrders) { + if (order.lbeId === lbeId) { + orders.push(order); + } + } + return orders; } - // TODO - getLbeV2OrdersByLbeIdAndOwner( + public async getLbeV2OrdersByLbeIdAndOwner( lbeId: string, owner: Address, ): Promise { - throw new Error('Method not implemented.'); + const { orders: allOrders } = await this.getAllLbeV2Orders(); + const orders: LbeV2Types.OrderState[] = []; + for (const order of allOrders) { + if (order.lbeId === lbeId && order.owner === owner) { + orders.push(order); + } + } + return orders; } } diff --git a/src/calculate.ts b/src/calculate.ts index 7db51c4..c4ca5a6 100644 --- a/src/calculate.ts +++ b/src/calculate.ts @@ -1,11 +1,11 @@ -import { UTxO } from "@minswap/lucid-cardano"; -import invariant from "@minswap/tiny-invariant"; -import Big from "big.js"; -import { zipWith } from "remeda"; +import { UTxO } from '@minswap/lucid-cardano'; +import invariant from '@minswap/tiny-invariant'; +import Big from 'big.js'; +import { zipWith } from 'remeda'; -import { OrderV2 } from "./types/order"; -import { PoolV2 } from "./types/pool"; -import { sqrt } from "./utils/sqrt.internal"; +import { OrderV2 } from './types/order'; +import { PoolV2 } from './types/pool'; +import { sqrt } from './utils/sqrt.internal'; /** * Options to calculate Amount Out & Price Impact while swapping exact in @@ -191,7 +191,7 @@ export function calculateZapIn(options: CalculateZapInOptions): bigint { const { amountIn, reserveIn, reserveOut, totalLiquidity } = options; const swapAmountIn = (sqrt( - 1997n ** 2n * reserveIn ** 2n + 4n * 997n * 1000n * amountIn * reserveIn + 1997n ** 2n * reserveIn ** 2n + 4n * 997n * 1000n * amountIn * reserveIn, ) - 1997n * reserveIn) / (2n * 997n); @@ -321,7 +321,7 @@ export namespace DexV2Calculation { tradingFeeNumerator, }: CalculateAmountInOptions): bigint { if (amountOut >= reserveOut) { - throw new Error("Amount Out must be less than Reserve Out"); + throw new Error('Amount Out must be less than Reserve Out'); } const diff = PoolV2.DEFAULT_TRADING_FEE_DENOMINATOR - tradingFeeNumerator; const numerator = @@ -406,7 +406,7 @@ export namespace DexV2Calculation { const a = bigIntPow(x) * bigIntPow( - 2n * PoolV2.DEFAULT_TRADING_FEE_DENOMINATOR - tradingFeeNumerator + 2n * PoolV2.DEFAULT_TRADING_FEE_DENOMINATOR - tradingFeeNumerator, ) - y * PoolV2.DEFAULT_TRADING_FEE_DENOMINATOR * @@ -481,7 +481,7 @@ export namespace StableswapCalculation { export function getD(mulBalances: bigint[], amp: bigint): bigint { const sumMulBalances = mulBalances.reduce( (sum, balance) => sum + balance, - 0n + 0n, ); if (sumMulBalances === 0n) { return 0n; @@ -519,11 +519,11 @@ export namespace StableswapCalculation { j: number, x: bigint, xp: bigint[], - amp: bigint + amp: bigint, ): bigint { if (i === j || i < 0 || j < 0 || i >= xp.length || j >= xp.length) { throw Error( - `getY failed: i and j must be different and less than length of xp` + `getY failed: i and j must be different and less than length of xp`, ); } const length = BigInt(xp.length); @@ -569,12 +569,12 @@ export namespace StableswapCalculation { i: number, xp: bigint[], amp: bigint, - d: bigint + d: bigint, ): bigint { const length = BigInt(xp.length); invariant( 0 <= i && i < xp.length, - `getYD failed: i must be less than length of xp` + `getYD failed: i must be less than length of xp`, ); let c = d; let s = 0n; @@ -613,7 +613,7 @@ export namespace StableswapCalculation { export function getDMem( balances: bigint[], multiples: bigint[], - amp: bigint + amp: bigint, ): bigint { const mulBalances = zipWith(balances, multiples, (a, b) => a * b); return getD(mulBalances, amp); @@ -652,7 +652,7 @@ export namespace StableswapCalculation { export type StableswapCalculateWithdrawOptions = Omit< CommonStableswapCalculationOptions, - "amp" | "fee" | "adminFee" | "feeDenominator" + 'amp' | 'fee' | 'adminFee' | 'feeDenominator' > & { withdrawalLPAmount: bigint; totalLiquidity: bigint; @@ -697,19 +697,19 @@ export namespace StableswapCalculation { const length = multiples.length; invariant( amountIn > 0, - `calculateExchange error: amountIn ${amountIn} must be positive.` + `calculateExchange error: amountIn ${amountIn} must be positive.`, ); invariant( 0 <= inIndex && inIndex < length, `calculateExchange error: inIndex ${inIndex} is not valid, must be within 0-${ length - 1 - }` + }`, ); invariant( 0 <= outIndex && outIndex < length, `calculateExchange error: outIndex ${outIndex} is not valid, must be within 0-${ length - 1 - }` + }`, ); invariant(inIndex !== outIndex, `inIndex must be different from outIndex`); const mulBalances = zipWith(tempDatumBalances, multiples, (a, b) => a * b); @@ -726,11 +726,11 @@ export namespace StableswapCalculation { invariant( amountOut > 0, - `calculateExchange error: amountIn is too small, amountOut (${amountOut}) must be positive.` + `calculateExchange error: amountIn is too small, amountOut (${amountOut}) must be positive.`, ); invariant( newDatumBalanceOut > 0, - `calculateExchange error: newDatumBalanceOut (${newDatumBalanceOut}) must be positive.` + `calculateExchange error: newDatumBalanceOut (${newDatumBalanceOut}) must be positive.`, ); return amountOut; } @@ -753,7 +753,7 @@ export namespace StableswapCalculation { const length = multiples.length; invariant( amountIns.length === length, - `calculateDeposit error: amountIns's length ${amountIns.length} is invalid, amountIns's length must be ${length}` + `calculateDeposit error: amountIns's length ${amountIns.length} is invalid, amountIns's length must be ${length}`, ); let newDatumBalances: bigint[] = []; @@ -762,14 +762,14 @@ export namespace StableswapCalculation { for (let i = 0; i < length; ++i) { invariant( amountIns[i] > 0n, - `calculateDeposit error: amount index ${i} must be positive in case totalLiquidity = 0` + `calculateDeposit error: amount index ${i} must be positive in case totalLiquidity = 0`, ); } newDatumBalances = zipWith(tempDatumBalances, amountIns, (a, b) => a + b); const d1 = getDMem(newDatumBalances, multiples, amp); invariant( d1 > 0, - `calculateDeposit: d1 must be greater than 0 in case totalLiquidity = 0` + `calculateDeposit: d1 must be greater than 0 in case totalLiquidity = 0`, ); lpAmount = d1; } else { @@ -778,20 +778,20 @@ export namespace StableswapCalculation { if (amountIns[i] < 0n) { invariant( amountIns[i] > 0n, - `calculateDeposit error: amountIns index ${i} must be non-negative` + `calculateDeposit error: amountIns index ${i} must be non-negative`, ); } sumIns += amountIns[i]; } invariant( sumIns > 0, - `calculateDeposit error: sum of amountIns must be positive` + `calculateDeposit error: sum of amountIns must be positive`, ); const newDatumBalanceWithoutFee = zipWith( tempDatumBalances, amountIns, - (a, b) => a + b + (a, b) => a + b, ); const d0 = getDMem(tempDatumBalances, multiples, amp); @@ -799,7 +799,7 @@ export namespace StableswapCalculation { invariant( d1 > d0, - `calculateDeposit: d1 must be greater than d0 in case totalLiquidity > 0, d1: ${d1}, d0: ${d0}` + `calculateDeposit: d1 must be greater than d0 in case totalLiquidity > 0, d1: ${d1}, d0: ${d0}`, ); const specialFee = (fee * BigInt(length)) / (4n * (BigInt(length) - 1n)); @@ -825,7 +825,7 @@ export namespace StableswapCalculation { for (let i = 0; i < length; ++i) { invariant( newDatBalancesWithTradingFee[i] > 0, - `calculateDeposit error: deposit amount is too small, newDatBalancesWithTradingFee must be positive` + `calculateDeposit error: deposit amount is too small, newDatBalancesWithTradingFee must be positive`, ); } const d2 = getDMem(newDatBalancesWithTradingFee, multiples, amp); @@ -834,7 +834,7 @@ export namespace StableswapCalculation { invariant( lpAmount > 0, - `calculateDeposit error: deposit amount is too small, lpAmountOut ${lpAmount} must be positive` + `calculateDeposit error: deposit amount is too small, lpAmountOut ${lpAmount} must be positive`, ); return lpAmount; } @@ -853,22 +853,22 @@ export namespace StableswapCalculation { const length = multiples.length; invariant( withdrawalLPAmount > 0, - `calculateWithdraw error: withdrawalLPAmount must be positive` + `calculateWithdraw error: withdrawalLPAmount must be positive`, ); const amountOuts = tempDatumBalances.map( - (balance) => (balance * withdrawalLPAmount) / totalLiquidity + (balance) => (balance * withdrawalLPAmount) / totalLiquidity, ); let sumOuts = 0n; for (let i = 0; i < length; ++i) { invariant( amountOuts[i] >= 0n, - `calculateWithdraw error: amountOuts must be non-negative` + `calculateWithdraw error: amountOuts must be non-negative`, ); sumOuts += amountOuts[i]; } invariant( sumOuts > 0n, - `calculateWithdraw error: sum of amountOuts must be positive` + `calculateWithdraw error: sum of amountOuts must be positive`, ); return amountOuts; @@ -892,21 +892,21 @@ export namespace StableswapCalculation { invariant( withdrawAmounts.length === length, - `calculateWithdrawImbalance error: withdrawAmounts's length ${withdrawAmounts.length} is invalid, withdrawAmounts's length must be ${length}` + `calculateWithdrawImbalance error: withdrawAmounts's length ${withdrawAmounts.length} is invalid, withdrawAmounts's length must be ${length}`, ); let sumOuts = 0n; for (let i = 0; i < length; ++i) { invariant( withdrawAmounts[i] >= 0n, - `calculateDeposit error: amountIns must be non-negative` + `calculateDeposit error: amountIns must be non-negative`, ); sumOuts += withdrawAmounts[i]; } invariant( sumOuts > 0n, - `calculateWithdrawImbalance error: sum of withdrawAmounts must be positive` + `calculateWithdrawImbalance error: sum of withdrawAmounts must be positive`, ); const specialFee = (fee * BigInt(length)) / (4n * (BigInt(length) - 1n)); @@ -914,12 +914,12 @@ export namespace StableswapCalculation { const newDatBalancesWithoutFee = zipWith( tempDatumBalances, withdrawAmounts, - (a, b) => a - b + (a, b) => a - b, ); for (let i = 0; i < length; ++i) { invariant( newDatBalancesWithoutFee[i] > 0n, - `calculateWithdrawImbalance error: not enough asset index ${i}` + `calculateWithdrawImbalance error: not enough asset index ${i}`, ); } const d0 = getDMem(tempDatumBalances, multiples, amp); @@ -936,13 +936,13 @@ export namespace StableswapCalculation { } const tradingFeeAmount = (specialFee * different) / feeDenominator; newDatBalancesWithTradingFee.push( - newDatBalancesWithoutFee[i] - tradingFeeAmount + newDatBalancesWithoutFee[i] - tradingFeeAmount, ); } for (let i = 0; i < length; ++i) { invariant( newDatBalancesWithTradingFee[i] > 0n, - `calculateWithdrawImbalance error: not enough asset index ${i}` + `calculateWithdrawImbalance error: not enough asset index ${i}`, ); } @@ -951,7 +951,7 @@ export namespace StableswapCalculation { invariant( lpAmount > 0n, - `calculateWithdrawImbalance error: required lpAmount ${lpAmount} must be positive` + `calculateWithdrawImbalance error: required lpAmount ${lpAmount} must be positive`, ); lpAmount += 1n; @@ -977,14 +977,14 @@ export namespace StableswapCalculation { const length = multiples.length; invariant( amountLpIn > 0, - `calculateZapOut error: amountLpIn ${amountLpIn} must be positive.` + `calculateZapOut error: amountLpIn ${amountLpIn} must be positive.`, ); invariant( 0 <= outIndex && outIndex < length, `calculateZapOut error: outIndex ${outIndex} is not valid, must be within 0-${ length - 1 - }` + }`, ); const mulBalances = zipWith(tempDatumBalances, multiples, (a, b) => a * b); @@ -1018,7 +1018,7 @@ export namespace StableswapCalculation { multiples: bigint[], amp: bigint, assetAIndex: number, - assetBIndex: number + assetBIndex: number, ): [bigint, bigint] { const mulBalances = zipWith(balances, multiples, (a, b) => a * b); const length = BigInt(mulBalances.length); diff --git a/src/dex-v2.ts b/src/dex-v2.ts index 41bad36..1d4a0c4 100644 --- a/src/dex-v2.ts +++ b/src/dex-v2.ts @@ -10,8 +10,8 @@ import { TxComplete, UnixTime, UTxO, -} from "@minswap/lucid-cardano"; -import invariant from "@minswap/tiny-invariant"; +} from '@minswap/lucid-cardano'; +import invariant from '@minswap/tiny-invariant'; import { Asset, @@ -22,14 +22,14 @@ import { MetadataMessage, OrderV2, PoolV2, -} from "."; -import { BlockfrostAdapter } from "./adapters/blockfrost"; -import { BatcherFee } from "./batcher-fee-reduction/calculate"; -import { DexVersion } from "./batcher-fee-reduction/configs.internal"; -import { FactoryV2 } from "./types/factory"; -import { NetworkEnvironment, NetworkId } from "./types/network"; -import { lucidToNetworkEnv } from "./utils/network.internal"; -import { buildUtxoToStoreDatum } from "./utils/tx.internal"; +} from '.'; +import { BlockfrostAdapter } from './adapters/blockfrost'; +import { BatcherFee } from './batcher-fee-reduction/calculate'; +import { DexVersion } from './batcher-fee-reduction/configs.internal'; +import { FactoryV2 } from './types/factory'; +import { NetworkEnvironment, NetworkId } from './types/network'; +import { lucidToNetworkEnv } from './utils/network.internal'; +import { buildUtxoToStoreDatum } from './utils/tx.internal'; export type V2CustomReceiver = { refundReceiver: Address; @@ -208,7 +208,7 @@ export class DexV2 { constructor(lucid: Lucid, adapter: BlockfrostAdapter) { this.lucid = lucid; this.networkId = - lucid.network === "Mainnet" ? NetworkId.MAINNET : NetworkId.TESTNET; + lucid.network === 'Mainnet' ? NetworkId.MAINNET : NetworkId.TESTNET; this.adapter = adapter; this.networkEnv = lucidToNetworkEnv(lucid.network); } @@ -292,13 +292,13 @@ export class DexV2 { ]); invariant( factoryRefs.length === 1, - "cannot find deployed script for Factory Validator", + 'cannot find deployed script for Factory Validator', ); const factoryRef = factoryRefs[0]; const authenRefs = await this.lucid.utxosByOutRef([deployedScripts.authen]); invariant( authenRefs.length === 1, - "cannot find deployed script for Authen Minting Policy", + 'cannot find deployed script for Authen Minting Policy', ); const authenRef = authenRefs[0]; const factoryUtxos = await this.lucid.utxosByOutRef([ @@ -307,7 +307,7 @@ export class DexV2 { outputIndex: factory.txIn.index, }, ]); - invariant(factoryUtxos.length === 1, "cannot find Utxo of Factory"); + invariant(factoryUtxos.length === 1, 'cannot find Utxo of Factory'); const factoryUtxo = factoryUtxos[0]; const factoryRedeemer: FactoryV2.Redeemer = { @@ -375,11 +375,11 @@ export class DexV2 { const { assetA, assetB, amountA, amountB, minimumLPReceived } = options; invariant( amountA >= 0n && amountB >= 0n && amountA + amountB > 0n, - "amount must be positive", + 'amount must be positive', ); invariant( minimumLPReceived > 0n, - "minimum LP received must be positive", + 'minimum LP received must be positive', ); orderAssets[Asset.toString(assetA)] = amountA; orderAssets[Asset.toString(assetB)] = amountB; @@ -392,59 +392,59 @@ export class DexV2 { minimumAssetAReceived, minimumAssetBReceived, } = options; - invariant(lpAmount > 0n, "LP amount must be positive"); + invariant(lpAmount > 0n, 'LP amount must be positive'); invariant( minimumAssetAReceived > 0n && minimumAssetBReceived > 0n, - "minimum asset received must be positive", + 'minimum asset received must be positive', ); orderAssets[Asset.toString(lpAsset)] = lpAmount; break; } case OrderV2.StepType.SWAP_EXACT_IN: { const { assetIn, amountIn, minimumAmountOut } = options; - invariant(amountIn > 0n, "amount in must be positive"); - invariant(minimumAmountOut > 0n, "minimum amount out must be positive"); + invariant(amountIn > 0n, 'amount in must be positive'); + invariant(minimumAmountOut > 0n, 'minimum amount out must be positive'); orderAssets[Asset.toString(assetIn)] = amountIn; break; } case OrderV2.StepType.SWAP_EXACT_OUT: { const { assetIn, maximumAmountIn, expectedReceived } = options; - invariant(maximumAmountIn > 0n, "amount in must be positive"); - invariant(expectedReceived > 0n, "minimum amount out must be positive"); + invariant(maximumAmountIn > 0n, 'amount in must be positive'); + invariant(expectedReceived > 0n, 'minimum amount out must be positive'); orderAssets[Asset.toString(assetIn)] = maximumAmountIn; break; } case OrderV2.StepType.STOP: { const { assetIn, amountIn, stopAmount } = options; - invariant(amountIn > 0n, "amount in must be positive"); - invariant(stopAmount > 0n, "stop amount out must be positive"); + invariant(amountIn > 0n, 'amount in must be positive'); + invariant(stopAmount > 0n, 'stop amount out must be positive'); orderAssets[Asset.toString(assetIn)] = amountIn; break; } case OrderV2.StepType.OCO: { const { assetIn, amountIn, stopAmount, limitAmount } = options; - invariant(amountIn > 0n, "amount in must be positive"); - invariant(stopAmount > 0n, "stop amount out must be positive"); - invariant(limitAmount > 0n, "limit amount out must be positive"); + invariant(amountIn > 0n, 'amount in must be positive'); + invariant(stopAmount > 0n, 'stop amount out must be positive'); + invariant(limitAmount > 0n, 'limit amount out must be positive'); orderAssets[Asset.toString(assetIn)] = amountIn; break; } case OrderV2.StepType.ZAP_OUT: { const { lpAsset, lpAmount, minimumReceived } = options; - invariant(lpAmount > 0n, "lp amount in must be positive"); - invariant(minimumReceived > 0n, "minimum amount out must be positive"); + invariant(lpAmount > 0n, 'lp amount in must be positive'); + invariant(minimumReceived > 0n, 'minimum amount out must be positive'); orderAssets[Asset.toString(lpAsset)] = lpAmount; break; } case OrderV2.StepType.PARTIAL_SWAP: { const { assetIn, amountIn, expectedInOutRatio } = options; - invariant(amountIn > 0n, "amount in must be positive"); + invariant(amountIn > 0n, 'amount in must be positive'); const [expectedInOutRatioNumerator, expectedInOutRatioDenominator] = expectedInOutRatio; invariant( expectedInOutRatioNumerator > 0n && expectedInOutRatioDenominator > 0n, - "expected input and output ratio must be positive", + 'expected input and output ratio must be positive', ); orderAssets[Asset.toString(assetIn)] = amountIn; break; @@ -452,25 +452,25 @@ export class DexV2 { case OrderV2.StepType.WITHDRAW_IMBALANCE: { const { lpAsset, lpAmount, ratioAssetA, ratioAssetB, minimumAssetA } = options; - invariant(lpAmount > 0n, "LP amount must be positive"); + invariant(lpAmount > 0n, 'LP amount must be positive'); invariant( ratioAssetA > 0n && ratioAssetB > 0n && minimumAssetA > 0n, - "minimum asset and ratio received must be positive", + 'minimum asset and ratio received must be positive', ); orderAssets[Asset.toString(lpAsset)] = lpAmount; break; } case OrderV2.StepType.SWAP_ROUTING: { const { assetIn, amountIn } = options; - invariant(amountIn > 0n, "Amount must be positive"); + invariant(amountIn > 0n, 'Amount must be positive'); orderAssets[Asset.toString(assetIn)] = amountIn; break; } } - if ("lovelace" in orderAssets) { - orderAssets["lovelace"] += FIXED_DEPOSIT_ADA; + if ('lovelace' in orderAssets) { + orderAssets['lovelace'] += FIXED_DEPOSIT_ADA; } else { - orderAssets["lovelace"] = FIXED_DEPOSIT_ADA; + orderAssets['lovelace'] = FIXED_DEPOSIT_ADA; } return orderAssets; } @@ -481,11 +481,11 @@ export class DexV2 { const { amountA, amountB, minimumLPReceived, killOnFailed } = options; invariant( amountA >= 0n && amountB >= 0n && amountA + amountB > 0n, - "amount must be positive", + 'amount must be positive', ); invariant( minimumLPReceived > 0n, - "minimum LP received must be positive", + 'minimum LP received must be positive', ); const orderStep: OrderV2.Step = { type: OrderV2.StepType.DEPOSIT, @@ -508,10 +508,10 @@ export class DexV2 { minimumAssetBReceived, killOnFailed, } = options; - invariant(lpAmount > 0n, "LP amount must be positive"); + invariant(lpAmount > 0n, 'LP amount must be positive'); invariant( minimumAssetAReceived > 0n && minimumAssetBReceived > 0n, - "minimum asset received must be positive", + 'minimum asset received must be positive', ); const orderStep: OrderV2.Step = { type: OrderV2.StepType.WITHDRAW, @@ -529,8 +529,8 @@ export class DexV2 { } case OrderV2.StepType.SWAP_EXACT_IN: { const { amountIn, direction, minimumAmountOut, killOnFailed } = options; - invariant(amountIn > 0n, "amount in must be positive"); - invariant(minimumAmountOut > 0n, "minimum amount out must be positive"); + invariant(amountIn > 0n, 'amount in must be positive'); + invariant(minimumAmountOut > 0n, 'minimum amount out must be positive'); const orderStep: OrderV2.Step = { type: OrderV2.StepType.SWAP_EXACT_IN, direction: direction, @@ -548,8 +548,8 @@ export class DexV2 { case OrderV2.StepType.SWAP_EXACT_OUT: { const { maximumAmountIn, expectedReceived, direction, killOnFailed } = options; - invariant(maximumAmountIn > 0n, "amount in must be positive"); - invariant(expectedReceived > 0n, "minimum amount out must be positive"); + invariant(maximumAmountIn > 0n, 'amount in must be positive'); + invariant(expectedReceived > 0n, 'minimum amount out must be positive'); const orderStep: OrderV2.Step = { type: OrderV2.StepType.SWAP_EXACT_OUT, direction: direction, @@ -566,8 +566,8 @@ export class DexV2 { } case OrderV2.StepType.STOP: { const { amountIn, direction, stopAmount } = options; - invariant(amountIn > 0n, "amount in must be positive"); - invariant(stopAmount > 0n, "stop amount out must be positive"); + invariant(amountIn > 0n, 'amount in must be positive'); + invariant(stopAmount > 0n, 'stop amount out must be positive'); const orderStep: OrderV2.Step = { type: OrderV2.StepType.STOP, direction: direction, @@ -581,9 +581,9 @@ export class DexV2 { } case OrderV2.StepType.OCO: { const { amountIn, direction, stopAmount, limitAmount } = options; - invariant(amountIn > 0n, "amount in must be positive"); - invariant(stopAmount > 0n, "stop amount out must be positive"); - invariant(limitAmount > 0n, "limit amount out must be positive"); + invariant(amountIn > 0n, 'amount in must be positive'); + invariant(stopAmount > 0n, 'stop amount out must be positive'); + invariant(limitAmount > 0n, 'limit amount out must be positive'); const orderStep: OrderV2.Step = { type: OrderV2.StepType.OCO, direction: direction, @@ -598,8 +598,8 @@ export class DexV2 { } case OrderV2.StepType.ZAP_OUT: { const { lpAmount, minimumReceived, direction, killOnFailed } = options; - invariant(lpAmount > 0n, "lp amount in must be positive"); - invariant(minimumReceived > 0n, "minimum amount out must be positive"); + invariant(lpAmount > 0n, 'lp amount in must be positive'); + invariant(minimumReceived > 0n, 'minimum amount out must be positive'); const orderStep: OrderV2.Step = { type: OrderV2.StepType.ZAP_OUT, direction: direction, @@ -622,13 +622,13 @@ export class DexV2 { maximumSwapTime, minimumSwapAmountRequired, } = options; - invariant(amountIn > 0n, "amount in must be positive"); + invariant(amountIn > 0n, 'amount in must be positive'); const [expectedInOutRatioNumerator, expectedInOutRatioDenominator] = expectedInOutRatio; invariant( expectedInOutRatioNumerator > 0n && expectedInOutRatioDenominator > 0n, - "expected input and output ratio must be positive", + 'expected input and output ratio must be positive', ); const orderStep: OrderV2.Step = { type: OrderV2.StepType.PARTIAL_SWAP, @@ -650,10 +650,10 @@ export class DexV2 { minimumAssetA, killOnFailed, } = options; - invariant(lpAmount > 0n, "LP amount must be positive"); + invariant(lpAmount > 0n, 'LP amount must be positive'); invariant( ratioAssetA > 0n && ratioAssetB > 0n && minimumAssetA > 0n, - "minimum asset and ratio received must be positive", + 'minimum asset and ratio received must be positive', ); const orderStep: OrderV2.Step = { type: OrderV2.StepType.WITHDRAW_IMBALANCE, @@ -672,7 +672,7 @@ export class DexV2 { } case OrderV2.StepType.SWAP_ROUTING: { const { amountIn, routings, minimumReceived } = options; - invariant(amountIn > 0n, "Amount must be positive"); + invariant(amountIn > 0n, 'Amount must be positive'); const orderStep: OrderV2.Step = { type: OrderV2.StepType.SWAP_ROUTING, routings: routings, @@ -694,7 +694,7 @@ export class DexV2 { this.lucid.utils.getAddressDetails(orderAddress).paymentCredential; invariant( orderAddressPaymentCred, - "order address payment credentials not found", + 'order address payment credentials not found', ); return this.lucid.utils.credentialToAddress( orderAddressPaymentCred, @@ -795,17 +795,17 @@ export class DexV2 { } else { totalBatcherFee = batcherFee; } - if ("lovelace" in orderAssets) { - orderAssets["lovelace"] += totalBatcherFee; + if ('lovelace' in orderAssets) { + orderAssets['lovelace'] += totalBatcherFee; } else { - orderAssets["lovelace"] = totalBatcherFee; + orderAssets['lovelace'] = totalBatcherFee; } const senderPaymentCred = this.lucid.utils.getAddressDetails(sender).paymentCredential; invariant( senderPaymentCred, - "sender address payment credentials not found", + 'sender address payment credentials not found', ); const canceller = authorizationMethodType @@ -939,7 +939,7 @@ export class DexV2 { }: CancelBulkOrdersOptions): Promise { const orderUtxos = await this.lucid.utxosByOutRef(orderOutRefs); if (orderUtxos.length === 0) { - throw new Error("Order Utxos are empty"); + throw new Error('Order Utxos are empty'); } const requiredPubKeyHashSet = new Set(); const orderRefs = await this.lucid.utxosByOutRef([ @@ -947,7 +947,7 @@ export class DexV2 { ]); invariant( orderRefs.length === 1, - "cannot find deployed script for V2 Order", + 'cannot find deployed script for V2 Order', ); const orderRef = orderRefs[0]; @@ -957,7 +957,7 @@ export class DexV2 { const orderScriptPaymentCred = this.lucid.utils.getAddressDetails(orderAddr).paymentCredential; invariant( - orderScriptPaymentCred?.type === "Script" && + orderScriptPaymentCred?.type === 'Script' && orderScriptPaymentCred.hash === DexV2Constant.CONFIG[this.networkId].orderScriptHash, `Utxo is not belonged Minswap's order address, utxo: ${utxo.txHash}`, @@ -977,7 +977,7 @@ export class DexV2 { ); } else { throw new Error( - "Utxo without Datum Hash or Inline Datum can not be spent", + 'Utxo without Datum Hash or Inline Datum can not be spent', ); } @@ -1013,7 +1013,7 @@ export class DexV2 { const currentTime = this.lucid.utils.slotToUnixTime(currentSlot); invariant( refScript.length === 2, - "cannot find deployed script for V2 Order or Expired Order Cancellation", + 'cannot find deployed script for V2 Order or Expired Order Cancellation', ); const sortedOrderUtxos = [...orderUtxos].sort(compareUtxo); @@ -1027,7 +1027,7 @@ export class DexV2 { const orderScriptPaymentCred = this.lucid.utils.getAddressDetails(orderAddr).paymentCredential; invariant( - orderScriptPaymentCred?.type === "Script" && + orderScriptPaymentCred?.type === 'Script' && orderScriptPaymentCred.hash === DexV2Constant.CONFIG[this.networkId].orderScriptHash, `Utxo is not belonged Minswap's order address, utxo: ${orderUtxo.txHash}`, @@ -1047,22 +1047,22 @@ export class DexV2 { ); } else { throw new Error( - "Utxo without Datum Hash or Inline Datum can not be spent", + 'Utxo without Datum Hash or Inline Datum can not be spent', ); } const expiryOptions = datum.expiredOptions; - invariant(expiryOptions !== undefined, "Order must have expiry options"); + invariant(expiryOptions !== undefined, 'Order must have expiry options'); invariant( expiryOptions.maxCancellationTip >= DexV2Constant.DEFAULT_CANCEL_TIPS, - "Cancel tip is too low", + 'Cancel tip is too low', ); invariant( expiryOptions.expiredTime < BigInt(currentTime), - "Order is not expired", + 'Order is not expired', ); const refundDatum = datum.refundReceiverDatum; const outAssets = { ...orderUtxo.assets }; - outAssets["lovelace"] -= expiryOptions.maxCancellationTip; + outAssets['lovelace'] -= expiryOptions.maxCancellationTip; switch (refundDatum.type) { case OrderV2.ExtraDatumType.NO_DATUM: { lucidTx.payToAddress(datum.refundReceiver, outAssets); diff --git a/src/dex.ts b/src/dex.ts index 0314996..91bd62f 100644 --- a/src/dex.ts +++ b/src/dex.ts @@ -7,21 +7,21 @@ import { SpendingValidator, TxComplete, UTxO, -} from "@minswap/lucid-cardano"; -import invariant from "@minswap/tiny-invariant"; +} from '@minswap/lucid-cardano'; +import invariant from '@minswap/tiny-invariant'; -import { BatcherFee } from "./batcher-fee-reduction/calculate"; -import { DexVersion } from "./batcher-fee-reduction/configs.internal"; -import { Asset } from "./types/asset"; +import { BatcherFee } from './batcher-fee-reduction/calculate'; +import { DexVersion } from './batcher-fee-reduction/configs.internal'; +import { Asset } from './types/asset'; import { DexV1Constant, FIXED_DEPOSIT_ADA, MetadataMessage, -} from "./types/constants"; -import { NetworkEnvironment, NetworkId } from "./types/network"; -import { OrderV1 } from "./types/order"; -import { lucidToNetworkEnv } from "./utils/network.internal"; -import { buildUtxoToStoreDatum } from "./utils/tx.internal"; +} from './types/constants'; +import { NetworkEnvironment, NetworkId } from './types/network'; +import { OrderV1 } from './types/order'; +import { lucidToNetworkEnv } from './utils/network.internal'; +import { buildUtxoToStoreDatum } from './utils/tx.internal'; export type V1AndStableswapCustomReceiver = { receiver: Address; @@ -135,12 +135,12 @@ export class Dex { constructor(lucid: Lucid) { this.lucid = lucid; this.networkId = - lucid.network === "Mainnet" ? NetworkId.MAINNET : NetworkId.TESTNET; + lucid.network === 'Mainnet' ? NetworkId.MAINNET : NetworkId.TESTNET; this.networkEnv = lucidToNetworkEnv(lucid.network); } async buildSwapExactInTx( - options: BuildSwapExactInTxOptions + options: BuildSwapExactInTxOptions, ): Promise { const { sender, @@ -152,8 +152,8 @@ export class Dex { isLimitOrder, availableUtxos, } = options; - invariant(amountIn > 0n, "amount in must be positive"); - invariant(minimumAmountOut > 0n, "minimum amount out must be positive"); + invariant(amountIn > 0n, 'amount in must be positive'); + invariant(minimumAmountOut > 0n, 'minimum amount out must be positive'); const orderAssets: Assets = { [Asset.toString(assetIn)]: amountIn }; const { batcherFee, reductionAssets } = BatcherFee.finalizeFee({ utxos: availableUtxos, @@ -162,10 +162,10 @@ export class Dex { networkEnv: this.networkEnv, dexVersion: this.dexVersion, }); - if (orderAssets["lovelace"]) { - orderAssets["lovelace"] += FIXED_DEPOSIT_ADA + batcherFee; + if (orderAssets['lovelace']) { + orderAssets['lovelace'] += FIXED_DEPOSIT_ADA + batcherFee; } else { - orderAssets["lovelace"] = FIXED_DEPOSIT_ADA + batcherFee; + orderAssets['lovelace'] = FIXED_DEPOSIT_ADA + batcherFee; } const datum: OrderV1.Datum = { sender: sender, @@ -184,7 +184,7 @@ export class Dex { .payToContract( DexV1Constant.ORDER_BASE_ADDRESS[this.networkId], Data.to(OrderV1.Datum.toPlutusData(datum)), - orderAssets + orderAssets, ) .addSigner(sender); if (Object.keys(reductionAssets).length !== 0) { @@ -202,13 +202,13 @@ export class Dex { this.lucid, sender, customReceiver.receiver, - customReceiver.receiverDatum.datum + customReceiver.receiverDatum.datum, ); if (utxoForStoringDatum) { tx.payToAddressWithData( utxoForStoringDatum.address, utxoForStoringDatum.outputData, - utxoForStoringDatum.assets + utxoForStoringDatum.assets, ); } } @@ -216,7 +216,7 @@ export class Dex { } async buildSwapExactOutTx( - options: BuildSwapExactOutTxOptions + options: BuildSwapExactOutTxOptions, ): Promise { const { sender, @@ -229,7 +229,7 @@ export class Dex { } = options; invariant( maximumAmountIn > 0n && expectedAmountOut > 0n, - "amount in and out must be positive" + 'amount in and out must be positive', ); const orderAssets: Assets = { [Asset.toString(assetIn)]: maximumAmountIn }; const { batcherFee, reductionAssets } = BatcherFee.finalizeFee({ @@ -239,10 +239,10 @@ export class Dex { dexVersion: this.dexVersion, currentDate: new Date(), }); - if (orderAssets["lovelace"]) { - orderAssets["lovelace"] += FIXED_DEPOSIT_ADA + batcherFee; + if (orderAssets['lovelace']) { + orderAssets['lovelace'] += FIXED_DEPOSIT_ADA + batcherFee; } else { - orderAssets["lovelace"] = FIXED_DEPOSIT_ADA + batcherFee; + orderAssets['lovelace'] = FIXED_DEPOSIT_ADA + batcherFee; } const datum: OrderV1.Datum = { sender: sender, @@ -262,7 +262,7 @@ export class Dex { .payToContract( DexV1Constant.ORDER_BASE_ADDRESS[this.networkId], Data.to(OrderV1.Datum.toPlutusData(datum)), - orderAssets + orderAssets, ) .payToAddress(sender, reductionAssets) .addSigner(sender) @@ -273,13 +273,13 @@ export class Dex { this.lucid, sender, customReceiver.receiver, - customReceiver.receiverDatum.datum + customReceiver.receiverDatum.datum, ); if (utxoForStoringDatum) { tx.payToAddressWithData( utxoForStoringDatum.address, utxoForStoringDatum.outputData, - utxoForStoringDatum.assets + utxoForStoringDatum.assets, ); } } @@ -296,10 +296,10 @@ export class Dex { minimumAssetBReceived, availableUtxos, } = options; - invariant(lpAmount > 0n, "LP amount must be positive"); + invariant(lpAmount > 0n, 'LP amount must be positive'); invariant( minimumAssetAReceived > 0n && minimumAssetBReceived > 0n, - "minimum asset received must be positive" + 'minimum asset received must be positive', ); const orderAssets: Assets = { [Asset.toString(lpAsset)]: lpAmount }; const { batcherFee, reductionAssets } = BatcherFee.finalizeFee({ @@ -309,10 +309,10 @@ export class Dex { dexVersion: this.dexVersion, currentDate: new Date(), }); - if (orderAssets["lovelace"]) { - orderAssets["lovelace"] += FIXED_DEPOSIT_ADA + batcherFee; + if (orderAssets['lovelace']) { + orderAssets['lovelace'] += FIXED_DEPOSIT_ADA + batcherFee; } else { - orderAssets["lovelace"] = FIXED_DEPOSIT_ADA + batcherFee; + orderAssets['lovelace'] = FIXED_DEPOSIT_ADA + batcherFee; } const datum: OrderV1.Datum = { sender: sender, @@ -331,7 +331,7 @@ export class Dex { .payToContract( DexV1Constant.ORDER_BASE_ADDRESS[this.networkId], Data.to(OrderV1.Datum.toPlutusData(datum)), - orderAssets + orderAssets, ) .payToAddress(sender, reductionAssets) .addSigner(sender) @@ -348,8 +348,8 @@ export class Dex { minimumLPReceived, availableUtxos, } = options; - invariant(amountIn > 0n, "amount in must be positive"); - invariant(minimumLPReceived > 0n, "minimum LP received must be positive"); + invariant(amountIn > 0n, 'amount in must be positive'); + invariant(minimumLPReceived > 0n, 'minimum LP received must be positive'); const orderAssets: Assets = { [Asset.toString(assetIn)]: amountIn }; const { batcherFee, reductionAssets } = BatcherFee.finalizeFee({ utxos: availableUtxos, @@ -358,10 +358,10 @@ export class Dex { dexVersion: this.dexVersion, currentDate: new Date(), }); - if (orderAssets["lovelace"]) { - orderAssets["lovelace"] += FIXED_DEPOSIT_ADA + batcherFee; + if (orderAssets['lovelace']) { + orderAssets['lovelace'] += FIXED_DEPOSIT_ADA + batcherFee; } else { - orderAssets["lovelace"] = FIXED_DEPOSIT_ADA + batcherFee; + orderAssets['lovelace'] = FIXED_DEPOSIT_ADA + batcherFee; } const datum: OrderV1.Datum = { sender: sender, @@ -381,7 +381,7 @@ export class Dex { .payToContract( DexV1Constant.ORDER_BASE_ADDRESS[this.networkId], Data.to(OrderV1.Datum.toPlutusData(datum)), - orderAssets + orderAssets, ) .payToAddress(sender, reductionAssets) .addSigner(sender) @@ -399,8 +399,8 @@ export class Dex { minimumLPReceived, availableUtxos, } = options; - invariant(amountA > 0n && amountB > 0n, "amount must be positive"); - invariant(minimumLPReceived > 0n, "minimum LP received must be positive"); + invariant(amountA > 0n && amountB > 0n, 'amount must be positive'); + invariant(minimumLPReceived > 0n, 'minimum LP received must be positive'); const orderAssets = { [Asset.toString(assetA)]: amountA, [Asset.toString(assetB)]: amountB, @@ -412,10 +412,10 @@ export class Dex { dexVersion: this.dexVersion, currentDate: new Date(), }); - if (orderAssets["lovelace"]) { - orderAssets["lovelace"] += FIXED_DEPOSIT_ADA + batcherFee; + if (orderAssets['lovelace']) { + orderAssets['lovelace'] += FIXED_DEPOSIT_ADA + batcherFee; } else { - orderAssets["lovelace"] = FIXED_DEPOSIT_ADA + batcherFee; + orderAssets['lovelace'] = FIXED_DEPOSIT_ADA + batcherFee; } const datum: OrderV1.Datum = { sender: sender, @@ -433,7 +433,7 @@ export class Dex { .payToContract( DexV1Constant.ORDER_BASE_ADDRESS[this.networkId], Data.to(OrderV1.Datum.toPlutusData(datum)), - orderAssets + orderAssets, ) .payToAddress(sender, reductionAssets) .addSigner(sender) @@ -442,18 +442,18 @@ export class Dex { } async buildCancelOrder( - options: BuildCancelOrderOptions + options: BuildCancelOrderOptions, ): Promise { const { orderUtxo } = options; const redeemer = Data.to(new Constr(OrderV1.Redeemer.CANCEL_ORDER, [])); const rawDatum = orderUtxo.datum; invariant( rawDatum, - `Cancel Order requires Order UTxOs along with its CBOR Datum` + `Cancel Order requires Order UTxOs along with its CBOR Datum`, ); const orderDatum = OrderV1.Datum.fromPlutusData( this.networkId, - Data.from(rawDatum) as Constr + Data.from(rawDatum) as Constr, ); return await this.lucid .newTx() diff --git a/src/expired-order-monitor.ts b/src/expired-order-monitor.ts index 98ec277..574a5aa 100644 --- a/src/expired-order-monitor.ts +++ b/src/expired-order-monitor.ts @@ -1,7 +1,7 @@ -import { Lucid } from "@minswap/lucid-cardano"; +import { Lucid } from '@minswap/lucid-cardano'; -import { BlockfrostAdapter, DexV2, DexV2Constant, OrderV2 } from "."; -import { runRecurringJob } from "./utils/job"; +import { BlockfrostAdapter, DexV2, DexV2Constant, OrderV2 } from '.'; +import { runRecurringJob } from './utils/job'; type DexV2WorkerConstructor = { lucid: Lucid; @@ -26,14 +26,14 @@ export class ExpiredOrderMonitor { async start(): Promise { await runRecurringJob({ - name: "lbe v2 batcher", + name: 'lbe v2 batcher', interval: 1000 * 30, // 30s job: () => this.runWorker(), }); } async runWorker(): Promise { - console.info("start run dex v2 worker"); + console.info('start run dex v2 worker'); const { orders: allOrders } = await this.blockfrostAdapter.getAllV2Orders(); const currentSlot = await this.blockfrostAdapter.currentSlot(); const currentTime = this.lucid.utils.slotToUnixTime(currentSlot); @@ -61,7 +61,7 @@ export class ExpiredOrderMonitor { ) { try { rawDatum = await this.blockfrostAdapter.getDatumByDatumHash( - receiverDatum.hash + receiverDatum.hash, ); mapDatum[receiverDatum.hash] = rawDatum; // eslint-disable-next-line unused-imports/no-unused-vars @@ -88,7 +88,7 @@ export class ExpiredOrderMonitor { orders.map((order) => ({ txHash: order.txIn.txHash, outputIndex: order.txIn.index, - })) + })), ); if (orderUtxos.length === 0) { console.info(`SKIP | Can not find any order utxos.`); @@ -97,7 +97,7 @@ export class ExpiredOrderMonitor { try { const txComplete = await new DexV2( this.lucid, - this.blockfrostAdapter + this.blockfrostAdapter, ).cancelExpiredOrders({ orderUtxos: orderUtxos, currentSlot, @@ -111,8 +111,8 @@ export class ExpiredOrderMonitor { console.info(`Transaction submitted successfully: ${txId}`); } catch (_err) { console.error( - `Error when the worker runs: orders ${orders.map((order) => `${order.txIn.txHash}#${order.txIn.index}`).join(", ")}`, - _err + `Error when the worker runs: orders ${orders.map((order) => `${order.txIn.txHash}#${order.txIn.index}`).join(', ')}`, + _err, ); } } diff --git a/src/index.ts b/src/index.ts index 6c1aaf4..e70b130 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,9 +1,9 @@ -export * from "./adapters/adapter"; -export * from "./calculate"; -export * from "./dex"; -export * from "./dex-v2"; -export * from "./types/asset"; -export * from "./types/constants"; -export * from "./types/network"; -export * from "./types/order"; -export * from "./types/pool"; +export * from './adapters/adapter'; +export * from './calculate'; +export * from './dex'; +export * from './dex-v2'; +export * from './types/asset'; +export * from './types/constants'; +export * from './types/network'; +export * from './types/order'; +export * from './types/pool'; diff --git a/src/stableswap.ts b/src/stableswap.ts index 5805754..3b711a0 100644 --- a/src/stableswap.ts +++ b/src/stableswap.ts @@ -6,8 +6,8 @@ import { Lucid, TxComplete, UTxO, -} from "@minswap/lucid-cardano"; -import invariant from "@minswap/tiny-invariant"; +} from '@minswap/lucid-cardano'; +import invariant from '@minswap/tiny-invariant'; import { FIXED_DEPOSIT_ADA, @@ -15,13 +15,13 @@ import { StableOrder, StableswapConstant, V1AndStableswapCustomReceiver, -} from "."; -import { BatcherFee } from "./batcher-fee-reduction/calculate"; -import { DexVersion } from "./batcher-fee-reduction/configs.internal"; -import { Asset } from "./types/asset"; -import { NetworkEnvironment, NetworkId } from "./types/network"; -import { lucidToNetworkEnv } from "./utils/network.internal"; -import { buildUtxoToStoreDatum } from "./utils/tx.internal"; +} from '.'; +import { BatcherFee } from './batcher-fee-reduction/calculate'; +import { DexVersion } from './batcher-fee-reduction/configs.internal'; +import { Asset } from './types/asset'; +import { NetworkEnvironment, NetworkId } from './types/network'; +import { lucidToNetworkEnv } from './utils/network.internal'; +import { buildUtxoToStoreDatum } from './utils/tx.internal'; /** * @property {bigint} assetInIndex - Index of asset you want to swap in config assets @@ -94,7 +94,7 @@ export class Stableswap { constructor(lucid: Lucid) { this.lucid = lucid; this.networkId = - lucid.network === "Mainnet" ? NetworkId.MAINNET : NetworkId.TESTNET; + lucid.network === 'Mainnet' ? NetworkId.MAINNET : NetworkId.TESTNET; this.networkEnv = lucidToNetworkEnv(lucid.network); } @@ -106,33 +106,33 @@ export class Stableswap { const { minimumLPReceived, assetsAmount, totalLiquidity } = option; invariant( minimumLPReceived > 0n, - "minimum LP received must be non-negative" + 'minimum LP received must be non-negative', ); let sumAmount = 0n; for (const [asset, amount] of assetsAmount) { if (totalLiquidity === 0n) { invariant( amount > 0n, - "amount must be positive when total liquidity = 0" + 'amount must be positive when total liquidity = 0', ); } else { - invariant(amount >= 0n, "amount must be non-negative"); + invariant(amount >= 0n, 'amount must be non-negative'); } if (amount > 0n) { orderAssets[Asset.toString(asset)] = amount; } sumAmount += amount; } - invariant(sumAmount > 0n, "sum of amount must be positive"); + invariant(sumAmount > 0n, 'sum of amount must be positive'); break; } case StableOrder.StepType.SWAP: { const { assetInAmount, assetInIndex, lpAsset } = option; const poolConfig = StableswapConstant.getConfigByLpAsset( lpAsset, - this.networkId + this.networkId, ); - invariant(assetInAmount > 0n, "asset in amount must be positive"); + invariant(assetInAmount > 0n, 'asset in amount must be positive'); orderAssets[poolConfig.assets[Number(assetInIndex)]] = assetInAmount; break; } @@ -140,16 +140,16 @@ export class Stableswap { case StableOrder.StepType.WITHDRAW_IMBALANCE: case StableOrder.StepType.ZAP_OUT: { const { lpAmount, lpAsset } = option; - invariant(lpAmount > 0n, "Lp amount must be positive number"); + invariant(lpAmount > 0n, 'Lp amount must be positive number'); orderAssets[Asset.toString(lpAsset)] = lpAmount; break; } } - if ("lovelace" in orderAssets) { - orderAssets["lovelace"] += FIXED_DEPOSIT_ADA; + if ('lovelace' in orderAssets) { + orderAssets['lovelace'] += FIXED_DEPOSIT_ADA; } else { - orderAssets["lovelace"] = FIXED_DEPOSIT_ADA; + orderAssets['lovelace'] = FIXED_DEPOSIT_ADA; } return orderAssets; } @@ -160,7 +160,7 @@ export class Stableswap { const { minimumLPReceived } = option; invariant( minimumLPReceived > 0n, - "minimum LP received must be non-negative" + 'minimum LP received must be non-negative', ); return { type: StableOrder.StepType.DEPOSIT, @@ -171,10 +171,10 @@ export class Stableswap { const { minimumAmounts } = option; let sumAmount = 0n; for (const amount of minimumAmounts) { - invariant(amount >= 0n, "minimum amount must be non-negative"); + invariant(amount >= 0n, 'minimum amount must be non-negative'); sumAmount += amount; } - invariant(sumAmount > 0n, "sum of withdaw amount must be positive"); + invariant(sumAmount > 0n, 'sum of withdaw amount must be positive'); return { type: StableOrder.StepType.WITHDRAW, minimumAmounts: minimumAmounts, @@ -185,28 +185,28 @@ export class Stableswap { option; const poolConfig = StableswapConstant.getConfigByLpAsset( lpAsset, - this.networkId + this.networkId, ); invariant( poolConfig, - `Not found Stableswap config matching with LP Asset ${lpAsset.toString()}` + `Not found Stableswap config matching with LP Asset ${lpAsset.toString()}`, ); const assetLength = BigInt(poolConfig.assets.length); invariant( assetInIndex >= 0n && assetInIndex < assetLength, - `Invalid amountInIndex, must be between 0-${assetLength - 1n}` + `Invalid amountInIndex, must be between 0-${assetLength - 1n}`, ); invariant( assetOutIndex >= 0n && assetOutIndex < assetLength, - `Invalid assetOutIndex, must be between 0-${assetLength - 1n}` + `Invalid assetOutIndex, must be between 0-${assetLength - 1n}`, ); invariant( assetInIndex !== assetOutIndex, - `assetOutIndex and amountInIndex must be different` + `assetOutIndex and amountInIndex must be different`, ); invariant( minimumAssetOut > 0n, - "minimum asset out amount must be positive" + 'minimum asset out amount must be positive', ); return { type: StableOrder.StepType.SWAP, @@ -219,10 +219,10 @@ export class Stableswap { const { withdrawAmounts } = option; let sum = 0n; for (const amount of withdrawAmounts) { - invariant(amount >= 0n, "withdraw amount must be unsigned number"); + invariant(amount >= 0n, 'withdraw amount must be unsigned number'); sum += amount; } - invariant(sum > 0n, "sum of withdraw amount must be positive"); + invariant(sum > 0n, 'sum of withdraw amount must be positive'); return { type: StableOrder.StepType.WITHDRAW_IMBALANCE, withdrawAmounts: withdrawAmounts, @@ -232,20 +232,20 @@ export class Stableswap { const { assetOutIndex, minimumAssetOut, lpAsset } = option; const poolConfig = StableswapConstant.getConfigByLpAsset( lpAsset, - this.networkId + this.networkId, ); invariant( poolConfig, - `Not found Stableswap config matching with LP Asset ${lpAsset.toString()}` + `Not found Stableswap config matching with LP Asset ${lpAsset.toString()}`, ); const assetLength = BigInt(poolConfig.assets.length); invariant( minimumAssetOut > 0n, - "Minimum amount out must be positive number" + 'Minimum amount out must be positive number', ); invariant( assetOutIndex >= 0n && assetOutIndex < assetLength, - `Invalid assetOutIndex, must be between 0-${assetLength - 1n}` + `Invalid assetOutIndex, must be between 0-${assetLength - 1n}`, ); return { type: StableOrder.StepType.ZAP_OUT, @@ -291,7 +291,7 @@ export class Stableswap { invariant( orderOptions.length > 0, - "Stableswap.buildCreateTx: Need at least 1 order to build" + 'Stableswap.buildCreateTx: Need at least 1 order to build', ); // calculate total order value const totalOrderAssets: Record = {}; @@ -319,15 +319,15 @@ export class Stableswap { for (const orderOption of orderOptions) { const config = StableswapConstant.getConfigByLpAsset( orderOption.lpAsset, - this.networkId + this.networkId, ); const { customReceiver } = orderOption; const orderAssets = this.buildOrderValue(orderOption); const step = this.buildOrderStep(orderOption); - if ("lovelace" in orderAssets) { - orderAssets["lovelace"] += batcherFee; + if ('lovelace' in orderAssets) { + orderAssets['lovelace'] += batcherFee; } else { - orderAssets["lovelace"] = batcherFee; + orderAssets['lovelace'] = batcherFee; } const datum: StableOrder.Datum = { sender: sender, @@ -342,7 +342,7 @@ export class Stableswap { { inline: Data.to(StableOrder.Datum.toPlutusData(datum)), }, - orderAssets + orderAssets, ); if (customReceiver && customReceiver.receiverDatum) { @@ -350,13 +350,13 @@ export class Stableswap { this.lucid, sender, customReceiver.receiver, - customReceiver.receiverDatum.datum + customReceiver.receiverDatum.datum, ); if (utxoForStoringDatum) { tx.payToAddressWithData( utxoForStoringDatum.address, utxoForStoringDatum.outputData, - utxoForStoringDatum.assets + utxoForStoringDatum.assets, ); } } @@ -375,7 +375,7 @@ export class Stableswap { } async buildCancelOrdersTx( - options: BuildCancelOrderOptions + options: BuildCancelOrderOptions, ): Promise { const tx = this.lucid.newTx(); @@ -383,28 +383,28 @@ export class Stableswap { for (const utxo of options.orderUtxos) { const config = StableswapConstant.getConfigFromStableswapOrderAddress( utxo.address, - this.networkId + this.networkId, ); const referencesScript = StableswapConstant.getStableswapReferencesScript( Asset.fromString(config.nftAsset), - this.networkId + this.networkId, ); let datum: StableOrder.Datum; if (utxo.datum) { const rawDatum = utxo.datum; datum = StableOrder.Datum.fromPlutusData( this.networkId, - Data.from(rawDatum) + Data.from(rawDatum), ); } else if (utxo.datumHash) { const rawDatum = await this.lucid.datumOf(utxo); datum = StableOrder.Datum.fromPlutusData( this.networkId, - rawDatum as Constr + rawDatum as Constr, ); } else { throw new Error( - "Utxo without Datum Hash or Inline Datum can not be spent" + 'Utxo without Datum Hash or Inline Datum can not be spent', ); } @@ -413,7 +413,7 @@ export class Stableswap { ]); invariant( orderRefs.length === 1, - "cannot find deployed script for V2 Order" + 'cannot find deployed script for V2 Order', ); const orderRef = orderRefs[0]; diff --git a/test/adapter.test.ts b/test/adapter.test.ts index 7d06918..0c19065 100644 --- a/test/adapter.test.ts +++ b/test/adapter.test.ts @@ -1,4 +1,4 @@ -import { BlockFrostAPI } from "@blockfrost/blockfrost-js"; +import { BlockFrostAPI } from '@blockfrost/blockfrost-js'; import { ADA, @@ -6,7 +6,7 @@ import { BlockfrostAdapter, NetworkId, StableswapConstant, -} from "../src"; +} from '../src'; function mustGetEnv(key: string): string { const val = process.env[key]; @@ -17,13 +17,13 @@ function mustGetEnv(key: string): string { } const MIN_TESTNET = - "e16c2dc8ae937e8d3790c7fd7168d7b994621ba14ca11415f39fed724d494e"; + 'e16c2dc8ae937e8d3790c7fd7168d7b994621ba14ca11415f39fed724d494e'; const MIN_MAINNET = - "29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c64d494e"; + '29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c64d494e'; const MIN_ADA_POOL_V1_ID_TESTNET = - "3bb0079303c57812462dec9de8fb867cef8fd3768de7f12c77f6f0dd80381d0d"; + '3bb0079303c57812462dec9de8fb867cef8fd3768de7f12c77f6f0dd80381d0d'; const MIN_ADA_POOL_V1_ID_MAINNET = - "6aa2153e1ae896a95539c9d62f76cedcdabdcdf144e564b8955f609d660cf6a2"; + '6aa2153e1ae896a95539c9d62f76cedcdabdcdf144e564b8955f609d660cf6a2'; let adapterTestnet: BlockfrostAdapter; let adapterMainnet: BlockfrostAdapter; @@ -32,23 +32,23 @@ beforeAll(() => { adapterTestnet = new BlockfrostAdapter( NetworkId.TESTNET, new BlockFrostAPI({ - projectId: mustGetEnv("BLOCKFROST_PROJECT_ID_TESTNET"), - network: "preprod", - }) + projectId: mustGetEnv('BLOCKFROST_PROJECT_ID_TESTNET'), + network: 'preprod', + }), ); adapterMainnet = new BlockfrostAdapter( NetworkId.MAINNET, new BlockFrostAPI({ - projectId: mustGetEnv("BLOCKFROST_PROJECT_ID_MAINNET"), - network: "mainnet", - }) + projectId: mustGetEnv('BLOCKFROST_PROJECT_ID_MAINNET'), + network: 'mainnet', + }), ); }); -test("getAssetDecimals", async () => { - expect(await adapterTestnet.getAssetDecimals("lovelace")).toBe(6); +test('getAssetDecimals', async () => { + expect(await adapterTestnet.getAssetDecimals('lovelace')).toBe(6); expect(await adapterTestnet.getAssetDecimals(MIN_TESTNET)).toBe(0); - expect(await adapterMainnet.getAssetDecimals("lovelace")).toBe(6); + expect(await adapterMainnet.getAssetDecimals('lovelace')).toBe(6); expect(await adapterMainnet.getAssetDecimals(MIN_MAINNET)).toBe(6); }); @@ -65,35 +65,35 @@ async function testPoolPrice(adapter: BlockfrostAdapter): Promise { // product of 2 prices must be approximately equal to 1 // abs(priceAB * priceBA - 1) <= epsilon expect(priceAB.mul(priceBA).sub(1).abs().toNumber()).toBeLessThanOrEqual( - 1e-6 + 1e-6, ); } } -test("getPoolPrice", async () => { +test('getPoolPrice', async () => { await testPoolPrice(adapterTestnet); await testPoolPrice(adapterMainnet); }, 10000); -test("getV1PoolById", async () => { +test('getV1PoolById', async () => { const adaMINTestnet = await adapterTestnet.getV1PoolById({ id: MIN_ADA_POOL_V1_ID_TESTNET, }); expect(adaMINTestnet).not.toBeNull(); - expect(adaMINTestnet?.assetA).toEqual("lovelace"); + expect(adaMINTestnet?.assetA).toEqual('lovelace'); expect(adaMINTestnet?.assetB).toEqual(MIN_TESTNET); const adaMINMainnet = await adapterMainnet.getV1PoolById({ id: MIN_ADA_POOL_V1_ID_MAINNET, }); expect(adaMINMainnet).not.toBeNull(); - expect(adaMINMainnet?.assetA).toEqual("lovelace"); + expect(adaMINMainnet?.assetA).toEqual('lovelace'); expect(adaMINMainnet?.assetB).toEqual(MIN_MAINNET); }); async function testPriceHistory( adapter: BlockfrostAdapter, - id: string + id: string, ): Promise { const history = await adapter.getV1PoolHistory({ id: id }); for (let i = 0; i < Math.min(5, history.length); i++) { @@ -102,34 +102,34 @@ async function testPriceHistory( } } -test("get prices of last 5 states of MIN/ADA pool", async () => { +test('get prices of last 5 states of MIN/ADA pool', async () => { await testPriceHistory(adapterTestnet, MIN_ADA_POOL_V1_ID_TESTNET); await testPriceHistory(adapterMainnet, MIN_ADA_POOL_V1_ID_MAINNET); }); -test("getV2PoolByPair", async () => { +test('getV2PoolByPair', async () => { const pool = await adapterTestnet.getV2PoolByPair(ADA, { - policyId: "e16c2dc8ae937e8d3790c7fd7168d7b994621ba14ca11415f39fed72", - tokenName: "4d494e", + policyId: 'e16c2dc8ae937e8d3790c7fd7168d7b994621ba14ca11415f39fed72', + tokenName: '4d494e', }); expect(pool).not.toBeNull(); - expect(pool?.assetA).toEqual("lovelace"); + expect(pool?.assetA).toEqual('lovelace'); expect(pool?.assetB).toEqual(MIN_TESTNET); }); -test("getAllV2Pools", async () => { +test('getAllV2Pools', async () => { const { pools } = await adapterTestnet.getAllV2Pools(); expect(pools.length > 0); }); -test("getV2Pools", async () => { +test('getV2Pools', async () => { const { pools } = await adapterTestnet.getV2Pools({ page: 1, }); expect(pools.length > 0); }); -test("getAllStablePools", async () => { +test('getAllStablePools', async () => { const numberOfStablePoolsTestnet = StableswapConstant.CONFIG[NetworkId.TESTNET].length; const numberOfStablePoolsMainnet = @@ -141,13 +141,13 @@ test("getAllStablePools", async () => { expect(mainnetPools.length === numberOfStablePoolsMainnet); }); -test("getStablePoolByLPAsset", async () => { +test('getStablePoolByLPAsset', async () => { const testnetCfgs = StableswapConstant.CONFIG[NetworkId.TESTNET]; const mainnetCfgs = StableswapConstant.CONFIG[NetworkId.MAINNET]; for (const cfg of testnetCfgs) { const pool = await adapterTestnet.getStablePoolByLpAsset( - Asset.fromString(cfg.lpAsset) + Asset.fromString(cfg.lpAsset), ); expect(pool).not.toBeNull(); expect(pool?.nft).toEqual(cfg.nftAsset); @@ -156,7 +156,7 @@ test("getStablePoolByLPAsset", async () => { for (const cfg of mainnetCfgs) { const pool = await adapterMainnet.getStablePoolByLpAsset( - Asset.fromString(cfg.lpAsset) + Asset.fromString(cfg.lpAsset), ); expect(pool).not.toBeNull(); expect(pool?.nft).toEqual(cfg.nftAsset); @@ -164,13 +164,13 @@ test("getStablePoolByLPAsset", async () => { } }); -test("getStablePoolByNFT", async () => { +test('getStablePoolByNFT', async () => { const testnetCfgs = StableswapConstant.CONFIG[NetworkId.TESTNET]; const mainnetCfgs = StableswapConstant.CONFIG[NetworkId.MAINNET]; for (const cfg of testnetCfgs) { const pool = await adapterTestnet.getStablePoolByNFT( - Asset.fromString(cfg.nftAsset) + Asset.fromString(cfg.nftAsset), ); expect(pool).not.toBeNull(); expect(pool?.nft).toEqual(cfg.nftAsset); @@ -179,7 +179,7 @@ test("getStablePoolByNFT", async () => { for (const cfg of mainnetCfgs) { const pool = await adapterMainnet.getStablePoolByNFT( - Asset.fromString(cfg.nftAsset) + Asset.fromString(cfg.nftAsset), ); expect(pool).not.toBeNull(); expect(pool?.nft).toEqual(cfg.nftAsset); diff --git a/test/address.test.ts b/test/address.test.ts index afd6395..9cce667 100644 --- a/test/address.test.ts +++ b/test/address.test.ts @@ -1,66 +1,66 @@ -import { Credential, Data } from "@minswap/lucid-cardano"; +import { Credential, Data } from '@minswap/lucid-cardano'; import { AddressPlutusData, LucidCredential, -} from "../src/types/address.internal"; -import { NetworkId } from "../src/types/network"; -import { getScriptHashFromAddress } from "../src/utils/address-utils.internal"; +} from '../src/types/address.internal'; +import { NetworkId } from '../src/types/network'; +import { getScriptHashFromAddress } from '../src/utils/address-utils.internal'; -test("Lucid Credential to PlutusData Converter", () => { - const dummyHash = "b8b912cdbcc998f3f0c18e951928ca179de85735c4fc2d82e8d10777"; +test('Lucid Credential to PlutusData Converter', () => { + const dummyHash = 'b8b912cdbcc998f3f0c18e951928ca179de85735c4fc2d82e8d10777'; const pubKeyCredential: Credential = { - type: "Key", + type: 'Key', hash: dummyHash, }; const scriptCredential: Credential = { - type: "Script", + type: 'Script', hash: dummyHash, }; const convertedPubKeyCredential = LucidCredential.fromPlutusData( - Data.from(Data.to(LucidCredential.toPlutusData(pubKeyCredential))) + Data.from(Data.to(LucidCredential.toPlutusData(pubKeyCredential))), ); const convertedScriptCredential = LucidCredential.fromPlutusData( - Data.from(Data.to(LucidCredential.toPlutusData(scriptCredential))) + Data.from(Data.to(LucidCredential.toPlutusData(scriptCredential))), ); expect(JSON.stringify(convertedPubKeyCredential)).toEqual( - JSON.stringify(pubKeyCredential) + JSON.stringify(pubKeyCredential), ); expect(JSON.stringify(convertedScriptCredential)).toEqual( - JSON.stringify(scriptCredential) + JSON.stringify(scriptCredential), ); }); -test("Address to PlutusData Converter", () => { +test('Address to PlutusData Converter', () => { const networkId = NetworkId.TESTNET; const pubkeyEnterpriseAddress = - "addr_test1vzutjykdhnye3ulscx8f2xfgegtem6zhxhz0ctvzargswac99alhg"; + 'addr_test1vzutjykdhnye3ulscx8f2xfgegtem6zhxhz0ctvzargswac99alhg'; const pubKeyBaseAddress = - "addr_test1qpssc0r090a9u0pyvdr9y76sm2xzx04n6d4j0y5hukcx6rxz4dtgkhfdynadkea0qezv99wljdl076xkg2krm96nn8jszmh3w7"; + 'addr_test1qpssc0r090a9u0pyvdr9y76sm2xzx04n6d4j0y5hukcx6rxz4dtgkhfdynadkea0qezv99wljdl076xkg2krm96nn8jszmh3w7'; const scriptEnterpriseAddress = - "addr_test1wzn9efv2f6w82hagxqtn62ju4m293tqvw0uhmdl64ch8uwc5lpd8w"; + 'addr_test1wzn9efv2f6w82hagxqtn62ju4m293tqvw0uhmdl64ch8uwc5lpd8w'; const scriptBaseAddress = - "addr_test1zzn9efv2f6w82hagxqtn62ju4m293tqvw0uhmdl64ch8uwurajt8r8wqtygrfduwgukk73m5gcnplmztc5tl5ngy0upq932hcy"; + 'addr_test1zzn9efv2f6w82hagxqtn62ju4m293tqvw0uhmdl64ch8uwurajt8r8wqtygrfduwgukk73m5gcnplmztc5tl5ngy0upq932hcy'; const convertedPubkeyEnterpriseAddress = AddressPlutusData.fromPlutusData( networkId, - Data.from(Data.to(AddressPlutusData.toPlutusData(pubkeyEnterpriseAddress))) + Data.from(Data.to(AddressPlutusData.toPlutusData(pubkeyEnterpriseAddress))), ); const convertedPubKeyBaseAddress = AddressPlutusData.fromPlutusData( networkId, - Data.from(Data.to(AddressPlutusData.toPlutusData(pubKeyBaseAddress))) + Data.from(Data.to(AddressPlutusData.toPlutusData(pubKeyBaseAddress))), ); const convertedScriptEnterpriseAddress = AddressPlutusData.fromPlutusData( networkId, - Data.from(Data.to(AddressPlutusData.toPlutusData(scriptEnterpriseAddress))) + Data.from(Data.to(AddressPlutusData.toPlutusData(scriptEnterpriseAddress))), ); const convertedScriptBaseAddress = AddressPlutusData.fromPlutusData( networkId, - Data.from(Data.to(AddressPlutusData.toPlutusData(scriptBaseAddress))) + Data.from(Data.to(AddressPlutusData.toPlutusData(scriptBaseAddress))), ); expect(pubkeyEnterpriseAddress).toEqual(convertedPubkeyEnterpriseAddress); @@ -69,19 +69,19 @@ test("Address to PlutusData Converter", () => { expect(scriptBaseAddress).toEqual(convertedScriptBaseAddress); }); -describe("Address utils", () => { - test("getScriptHashFromAddress", () => { +describe('Address utils', () => { + test('getScriptHashFromAddress', () => { for (const a of [ - "addr_test1zrsnz7c4974vzdpxu65ruphl3zjdvtxw8strf2c2tmqnxzvrajt8r8wqtygrfduwgukk73m5gcnplmztc5tl5ngy0upqs8q93k", - "addr1z8snz7c4974vzdpxu65ruphl3zjdvtxw8strf2c2tmqnxz2j2c79gy9l76sdg0xwhd7r0c0kna0tycz4y5s6mlenh8pq0xmsha", - "addr1z8snz7c4974vzdpxu65ruphl3zjdvtxw8strf2c2tmqnxzfgf0jgfz5xdvg2pges20usxhw8zwnkggheqrxwmxd6huuqss46eh", - "addr1z8snz7c4974vzdpxu65ruphl3zjdvtxw8strf2c2tmqnxzwccf8ywaly0m99ngq68lus48lmafut7ku9geawu8u6k49suv42qq", - "addr1z8snz7c4974vzdpxu65ruphl3zjdvtxw8strf2c2tmqnxz02znpd777wgl9wwpk0dvdzuxn93mqh82q7vv6s9jn25rws52z94g", - "addr1z8snz7c4974vzdpxu65ruphl3zjdvtxw8strf2c2tmqnxz2jyskd3y6etkv8ye450545xu6q4jfq5hv4e0uxwkpf8lsq048y90", - "addr1z8snz7c4974vzdpxu65ruphl3zjdvtxw8strf2c2tmqnxztnqm37tpj0q63s0qns5wfe4flqzqqg55760472n7yt4v8skpaj3k", + 'addr_test1zrsnz7c4974vzdpxu65ruphl3zjdvtxw8strf2c2tmqnxzvrajt8r8wqtygrfduwgukk73m5gcnplmztc5tl5ngy0upqs8q93k', + 'addr1z8snz7c4974vzdpxu65ruphl3zjdvtxw8strf2c2tmqnxz2j2c79gy9l76sdg0xwhd7r0c0kna0tycz4y5s6mlenh8pq0xmsha', + 'addr1z8snz7c4974vzdpxu65ruphl3zjdvtxw8strf2c2tmqnxzfgf0jgfz5xdvg2pges20usxhw8zwnkggheqrxwmxd6huuqss46eh', + 'addr1z8snz7c4974vzdpxu65ruphl3zjdvtxw8strf2c2tmqnxzwccf8ywaly0m99ngq68lus48lmafut7ku9geawu8u6k49suv42qq', + 'addr1z8snz7c4974vzdpxu65ruphl3zjdvtxw8strf2c2tmqnxz02znpd777wgl9wwpk0dvdzuxn93mqh82q7vv6s9jn25rws52z94g', + 'addr1z8snz7c4974vzdpxu65ruphl3zjdvtxw8strf2c2tmqnxz2jyskd3y6etkv8ye450545xu6q4jfq5hv4e0uxwkpf8lsq048y90', + 'addr1z8snz7c4974vzdpxu65ruphl3zjdvtxw8strf2c2tmqnxztnqm37tpj0q63s0qns5wfe4flqzqqg55760472n7yt4v8skpaj3k', ]) expect(getScriptHashFromAddress(a)).toEqual( - "script1uychk9f04tqngfhx4qlqdlug5ntzen3uzc62kzj7cyesjk0d9me" + 'script1uychk9f04tqngfhx4qlqdlug5ntzen3uzc62kzj7cyesjk0d9me', ); }); }); diff --git a/test/batcher-fee.test.ts b/test/batcher-fee.test.ts index d3e640c..6d74195 100644 --- a/test/batcher-fee.test.ts +++ b/test/batcher-fee.test.ts @@ -1,11 +1,11 @@ -import invariant from "@minswap/tiny-invariant"; -import { NetworkEnvironment } from "../src"; -import { BatcherFee } from "../src/batcher-fee-reduction/calculate"; +import invariant from '@minswap/tiny-invariant'; +import { NetworkEnvironment } from '../src'; +import { BatcherFee } from '../src/batcher-fee-reduction/calculate'; import { BatcherFeeConfig, DexVersion, -} from "../src/batcher-fee-reduction/configs.internal"; -import { Assets } from "@minswap/lucid-cardano"; +} from '../src/batcher-fee-reduction/configs.internal'; +import { Assets } from '@minswap/lucid-cardano'; function compareAssets(a1: Assets, a2: Assets): boolean { if (Object.keys(a1).length !== Object.keys(a2).length) { @@ -27,9 +27,9 @@ function compareAssets(a1: Assets, a2: Assets): boolean { return isEqual; } -test("Batcher Fee reduction test", () => { +test('Batcher Fee reduction test', () => { for (const [networkEnvStr, batcherFeeMap] of Object.entries( - BatcherFeeConfig.CONFIG + BatcherFeeConfig.CONFIG, )) { let networkEnv: NetworkEnvironment; switch (networkEnvStr) { @@ -46,11 +46,11 @@ test("Batcher Fee reduction test", () => { break; } default: { - throw new Error("Unexpected Network"); + throw new Error('Unexpected Network'); } } for (const [dexVersionStr, batcherFeeConfig] of Object.entries( - batcherFeeMap + batcherFeeMap, )) { let dexVersion: DexVersion; switch (dexVersionStr) { @@ -61,7 +61,7 @@ test("Batcher Fee reduction test", () => { break; } default: { - throw new Error("Unexpected DEX version"); + throw new Error('Unexpected DEX version'); } } for (const reduction of batcherFeeConfig.reduction) { @@ -86,10 +86,10 @@ test("Batcher Fee reduction test", () => { utxos: [ { txHash: - "73fe9271c8e2b11430d76bfe4b0dad4816c326d08e63439130c863b0a1932649", + '73fe9271c8e2b11430d76bfe4b0dad4816c326d08e63439130c863b0a1932649', outputIndex: 0, address: - "addr_test1qz09ls06gtsnws8dhquh273tnzj0avf8fumakgmdc40cwazvh204krl8rn5cvnepdzn5zj55wk4uy8nnzwklhzcvtyws67g5de", + 'addr_test1qz09ls06gtsnws8dhquh273tnzj0avf8fumakgmdc40cwazvh204krl8rn5cvnepdzn5zj55wk4uy8nnzwklhzcvtyws67g5de', assets: { lovelace: 10_000000n, [asset]: maximumAmount, @@ -106,10 +106,10 @@ test("Batcher Fee reduction test", () => { utxos: [ { txHash: - "73fe9271c8e2b11430d76bfe4b0dad4816c326d08e63439130c863b0a1932649", + '73fe9271c8e2b11430d76bfe4b0dad4816c326d08e63439130c863b0a1932649', outputIndex: 0, address: - "addr_test1qz09ls06gtsnws8dhquh273tnzj0avf8fumakgmdc40cwazvh204krl8rn5cvnepdzn5zj55wk4uy8nnzwklhzcvtyws67g5de", + 'addr_test1qz09ls06gtsnws8dhquh273tnzj0avf8fumakgmdc40cwazvh204krl8rn5cvnepdzn5zj55wk4uy8nnzwklhzcvtyws67g5de', assets: { lovelace: 10_000000n, [asset]: maximumAmount * 2n, @@ -126,12 +126,12 @@ test("Batcher Fee reduction test", () => { invariant( compareAssets(discountFee1.reductionAssets, { [asset]: maximumAmount, - }) + }), ); invariant( compareAssets(discountFee2.reductionAssets, { [asset]: maximumAmount, - }) + }), ); } @@ -144,10 +144,10 @@ test("Batcher Fee reduction test", () => { utxos: [ { txHash: - "73fe9271c8e2b11430d76bfe4b0dad4816c326d08e63439130c863b0a1932649", + '73fe9271c8e2b11430d76bfe4b0dad4816c326d08e63439130c863b0a1932649', outputIndex: 0, address: - "addr_test1qz09ls06gtsnws8dhquh273tnzj0avf8fumakgmdc40cwazvh204krl8rn5cvnepdzn5zj55wk4uy8nnzwklhzcvtyws67g5de", + 'addr_test1qz09ls06gtsnws8dhquh273tnzj0avf8fumakgmdc40cwazvh204krl8rn5cvnepdzn5zj55wk4uy8nnzwklhzcvtyws67g5de', assets: { lovelace: 10_000000n, [asset]: maximumAmount / 2n, @@ -163,10 +163,10 @@ test("Batcher Fee reduction test", () => { utxos: [ { txHash: - "73fe9271c8e2b11430d76bfe4b0dad4816c326d08e63439130c863b0a1932649", + '73fe9271c8e2b11430d76bfe4b0dad4816c326d08e63439130c863b0a1932649', outputIndex: 0, address: - "addr_test1qz09ls06gtsnws8dhquh273tnzj0avf8fumakgmdc40cwazvh204krl8rn5cvnepdzn5zj55wk4uy8nnzwklhzcvtyws67g5de", + 'addr_test1qz09ls06gtsnws8dhquh273tnzj0avf8fumakgmdc40cwazvh204krl8rn5cvnepdzn5zj55wk4uy8nnzwklhzcvtyws67g5de', assets: { lovelace: 10_000000n, [asset]: maximumAmount, @@ -186,12 +186,12 @@ test("Batcher Fee reduction test", () => { invariant( compareAssets(discountFee1.reductionAssets, { [asset]: maximumAmount / 2n, - }) + }), ); invariant( compareAssets(discountFee2.reductionAssets, { [asset]: maximumAmount / 2n, - }) + }), ); } } diff --git a/test/order.test.ts b/test/order.test.ts index 9f577ee..af21c9c 100644 --- a/test/order.test.ts +++ b/test/order.test.ts @@ -1,11 +1,11 @@ -import invariant from "@minswap/tiny-invariant"; -import { Address, Data, getAddressDetails } from "@minswap/lucid-cardano"; +import invariant from '@minswap/tiny-invariant'; +import { Address, Data, getAddressDetails } from '@minswap/lucid-cardano'; -import { FIXED_BATCHER_FEE } from "../src/batcher-fee-reduction/configs.internal"; -import { Asset } from "../src/types/asset"; -import { FIXED_DEPOSIT_ADA } from "../src/types/constants"; -import { NetworkId } from "../src/types/network"; -import { OrderV1, OrderV2, StableOrder } from "../src/types/order"; +import { FIXED_BATCHER_FEE } from '../src/batcher-fee-reduction/configs.internal'; +import { Asset } from '../src/types/asset'; +import { FIXED_DEPOSIT_ADA } from '../src/types/constants'; +import { NetworkId } from '../src/types/network'; +import { OrderV1, OrderV2, StableOrder } from '../src/types/order'; let testSender: Address; let testSenderPkh: string; @@ -15,24 +15,24 @@ let testAsset: Asset; let networkId: NetworkId; beforeAll(() => { testSender = - "addr_test1qpssc0r090a9u0pyvdr9y76sm2xzx04n6d4j0y5hukcx6rxz4dtgkhfdynadkea0qezv99wljdl076xkg2krm96nn8jszmh3w7"; + 'addr_test1qpssc0r090a9u0pyvdr9y76sm2xzx04n6d4j0y5hukcx6rxz4dtgkhfdynadkea0qezv99wljdl076xkg2krm96nn8jszmh3w7'; const senderPkh = getAddressDetails(testSender).paymentCredential?.hash; invariant(senderPkh); testSenderPkh = senderPkh; testReceiver = - "addr_test1wqq9fn7ynjzx3kfddmnsjn69tgm8hrr333adhvw0sfx30lqy38kcs"; + 'addr_test1wqq9fn7ynjzx3kfddmnsjn69tgm8hrr333adhvw0sfx30lqy38kcs'; testReceiverDatumHash = - "b8b912cdbcc998f3f0c18e951928ca179de85735c4fc2d82e8d10777"; + 'b8b912cdbcc998f3f0c18e951928ca179de85735c4fc2d82e8d10777'; testAsset = { - policyId: "e16c2dc8ae937e8d3790c7fd7168d7b994621ba14ca11415f39fed72", - tokenName: "4d494e", + policyId: 'e16c2dc8ae937e8d3790c7fd7168d7b994621ba14ca11415f39fed72', + tokenName: '4d494e', }; networkId = NetworkId.TESTNET; }); function buildCommonV1Datum(): Omit< OrderV1.Datum, - "receiverDatumHash" | "step" + 'receiverDatumHash' | 'step' > { return { sender: testSender, @@ -42,7 +42,7 @@ function buildCommonV1Datum(): Omit< }; } -test("V1: SwapExactIn Order to PlutusData Converter", () => { +test('V1: SwapExactIn Order to PlutusData Converter', () => { const order1: OrderV1.Datum = { ...buildCommonV1Datum(), receiverDatumHash: testReceiverDatumHash, @@ -65,17 +65,17 @@ test("V1: SwapExactIn Order to PlutusData Converter", () => { const convertedOrder1 = OrderV1.Datum.fromPlutusData( networkId, - Data.from(Data.to(OrderV1.Datum.toPlutusData(order1))) + Data.from(Data.to(OrderV1.Datum.toPlutusData(order1))), ); const convertedOrder2 = OrderV1.Datum.fromPlutusData( networkId, - Data.from(Data.to(OrderV1.Datum.toPlutusData(order2))) + Data.from(Data.to(OrderV1.Datum.toPlutusData(order2))), ); expect(order1).toEqual(convertedOrder1); expect(order2).toEqual(convertedOrder2); }); -test("V1: SwapExactOut Order to PlutusData Converter", () => { +test('V1: SwapExactOut Order to PlutusData Converter', () => { const order1: OrderV1.Datum = { ...buildCommonV1Datum(), receiverDatumHash: testReceiverDatumHash, @@ -98,17 +98,17 @@ test("V1: SwapExactOut Order to PlutusData Converter", () => { const convertedOrder1 = OrderV1.Datum.fromPlutusData( networkId, - Data.from(Data.to(OrderV1.Datum.toPlutusData(order1))) + Data.from(Data.to(OrderV1.Datum.toPlutusData(order1))), ); const convertedOrder2 = OrderV1.Datum.fromPlutusData( networkId, - Data.from(Data.to(OrderV1.Datum.toPlutusData(order2))) + Data.from(Data.to(OrderV1.Datum.toPlutusData(order2))), ); expect(order1).toEqual(convertedOrder1); expect(order2).toEqual(convertedOrder2); }); -test("V1: Deposit Order to PlutusData Converter", () => { +test('V1: Deposit Order to PlutusData Converter', () => { const order1: OrderV1.Datum = { ...buildCommonV1Datum(), receiverDatumHash: testReceiverDatumHash, @@ -129,17 +129,17 @@ test("V1: Deposit Order to PlutusData Converter", () => { const convertedOrder1 = OrderV1.Datum.fromPlutusData( networkId, - Data.from(Data.to(OrderV1.Datum.toPlutusData(order1))) + Data.from(Data.to(OrderV1.Datum.toPlutusData(order1))), ); const convertedOrder2 = OrderV1.Datum.fromPlutusData( networkId, - Data.from(Data.to(OrderV1.Datum.toPlutusData(order2))) + Data.from(Data.to(OrderV1.Datum.toPlutusData(order2))), ); expect(order1).toEqual(convertedOrder1); expect(order2).toEqual(convertedOrder2); }); -test("V1: Withdraw Order to PlutusData Converter", () => { +test('V1: Withdraw Order to PlutusData Converter', () => { const order1: OrderV1.Datum = { ...buildCommonV1Datum(), receiverDatumHash: testReceiverDatumHash, @@ -162,17 +162,17 @@ test("V1: Withdraw Order to PlutusData Converter", () => { const convertedOrder1 = OrderV1.Datum.fromPlutusData( networkId, - Data.from(Data.to(OrderV1.Datum.toPlutusData(order1))) + Data.from(Data.to(OrderV1.Datum.toPlutusData(order1))), ); const convertedOrder2 = OrderV1.Datum.fromPlutusData( networkId, - Data.from(Data.to(OrderV1.Datum.toPlutusData(order2))) + Data.from(Data.to(OrderV1.Datum.toPlutusData(order2))), ); expect(order1).toEqual(convertedOrder1); expect(order2).toEqual(convertedOrder2); }); -test("V1: Zap Order to PlutusData Converter", () => { +test('V1: Zap Order to PlutusData Converter', () => { const order1: OrderV1.Datum = { ...buildCommonV1Datum(), receiverDatumHash: testReceiverDatumHash, @@ -195,17 +195,17 @@ test("V1: Zap Order to PlutusData Converter", () => { const convertedOrder1 = OrderV1.Datum.fromPlutusData( networkId, - Data.from(Data.to(OrderV1.Datum.toPlutusData(order1))) + Data.from(Data.to(OrderV1.Datum.toPlutusData(order1))), ); const convertedOrder2 = OrderV1.Datum.fromPlutusData( networkId, - Data.from(Data.to(OrderV1.Datum.toPlutusData(order2))) + Data.from(Data.to(OrderV1.Datum.toPlutusData(order2))), ); expect(order1).toEqual(convertedOrder1); expect(order2).toEqual(convertedOrder2); }); -test("Stableswap: Swap Order to PlutusData Converter", () => { +test('Stableswap: Swap Order to PlutusData Converter', () => { const order1: StableOrder.Datum = { ...buildCommonV1Datum(), receiverDatumHash: testReceiverDatumHash, @@ -230,17 +230,17 @@ test("Stableswap: Swap Order to PlutusData Converter", () => { const convertedOrder1 = StableOrder.Datum.fromPlutusData( networkId, - Data.from(Data.to(StableOrder.Datum.toPlutusData(order1))) + Data.from(Data.to(StableOrder.Datum.toPlutusData(order1))), ); const convertedOrder2 = StableOrder.Datum.fromPlutusData( networkId, - Data.from(Data.to(StableOrder.Datum.toPlutusData(order2))) + Data.from(Data.to(StableOrder.Datum.toPlutusData(order2))), ); expect(order1).toEqual(convertedOrder1); expect(order2).toEqual(convertedOrder2); }); -test("Stableswap: Deposit Order to PlutusData Converter", () => { +test('Stableswap: Deposit Order to PlutusData Converter', () => { const order1: StableOrder.Datum = { ...buildCommonV1Datum(), receiverDatumHash: testReceiverDatumHash, @@ -261,17 +261,17 @@ test("Stableswap: Deposit Order to PlutusData Converter", () => { const convertedOrder1 = StableOrder.Datum.fromPlutusData( networkId, - Data.from(Data.to(StableOrder.Datum.toPlutusData(order1))) + Data.from(Data.to(StableOrder.Datum.toPlutusData(order1))), ); const convertedOrder2 = StableOrder.Datum.fromPlutusData( networkId, - Data.from(Data.to(StableOrder.Datum.toPlutusData(order2))) + Data.from(Data.to(StableOrder.Datum.toPlutusData(order2))), ); expect(order1).toEqual(convertedOrder1); expect(order2).toEqual(convertedOrder2); }); -test("Stableswap: Withdraw Order to PlutusData Converter", () => { +test('Stableswap: Withdraw Order to PlutusData Converter', () => { const order1: StableOrder.Datum = { ...buildCommonV1Datum(), receiverDatumHash: testReceiverDatumHash, @@ -292,17 +292,17 @@ test("Stableswap: Withdraw Order to PlutusData Converter", () => { const convertedOrder1 = StableOrder.Datum.fromPlutusData( networkId, - Data.from(Data.to(StableOrder.Datum.toPlutusData(order1))) + Data.from(Data.to(StableOrder.Datum.toPlutusData(order1))), ); const convertedOrder2 = StableOrder.Datum.fromPlutusData( networkId, - Data.from(Data.to(StableOrder.Datum.toPlutusData(order2))) + Data.from(Data.to(StableOrder.Datum.toPlutusData(order2))), ); expect(order1).toEqual(convertedOrder1); expect(order2).toEqual(convertedOrder2); }); -test("Stableswap: Withdraw Imbalance Order to PlutusData Converter", () => { +test('Stableswap: Withdraw Imbalance Order to PlutusData Converter', () => { const order1: StableOrder.Datum = { ...buildCommonV1Datum(), receiverDatumHash: testReceiverDatumHash, @@ -323,17 +323,17 @@ test("Stableswap: Withdraw Imbalance Order to PlutusData Converter", () => { const convertedOrder1 = StableOrder.Datum.fromPlutusData( networkId, - Data.from(Data.to(StableOrder.Datum.toPlutusData(order1))) + Data.from(Data.to(StableOrder.Datum.toPlutusData(order1))), ); const convertedOrder2 = StableOrder.Datum.fromPlutusData( networkId, - Data.from(Data.to(StableOrder.Datum.toPlutusData(order2))) + Data.from(Data.to(StableOrder.Datum.toPlutusData(order2))), ); expect(order1).toEqual(convertedOrder1); expect(order2).toEqual(convertedOrder2); }); -test("Stableswap: Zap Out Order to PlutusData Converter", () => { +test('Stableswap: Zap Out Order to PlutusData Converter', () => { const order1: StableOrder.Datum = { ...buildCommonV1Datum(), receiverDatumHash: testReceiverDatumHash, @@ -354,11 +354,11 @@ test("Stableswap: Zap Out Order to PlutusData Converter", () => { const convertedOrder1 = StableOrder.Datum.fromPlutusData( networkId, - Data.from(Data.to(StableOrder.Datum.toPlutusData(order1))) + Data.from(Data.to(StableOrder.Datum.toPlutusData(order1))), ); const convertedOrder2 = StableOrder.Datum.fromPlutusData( networkId, - Data.from(Data.to(StableOrder.Datum.toPlutusData(order2))) + Data.from(Data.to(StableOrder.Datum.toPlutusData(order2))), ); expect(order1).toEqual(convertedOrder1); expect(order2).toEqual(convertedOrder2); @@ -381,9 +381,9 @@ function buildV2Datums(step: OrderV2.Step): OrderV2.Datum[] { }, step: step, lpAsset: { - policyId: "d6aae2059baee188f74917493cf7637e679cd219bdfbbf4dcbeb1d0b", + policyId: 'd6aae2059baee188f74917493cf7637e679cd219bdfbbf4dcbeb1d0b', tokenName: - "e08460587b08cca542bd2856b8d5e1d23bf3f63f9916fb81f6d95fda0910bf69", + 'e08460587b08cca542bd2856b8d5e1d23bf3f63f9916fb81f6d95fda0910bf69', }, maxBatcherFee: FIXED_BATCHER_FEE, expiredOptions: undefined, @@ -405,9 +405,9 @@ function buildV2Datums(step: OrderV2.Step): OrderV2.Datum[] { }, step: step, lpAsset: { - policyId: "d6aae2059baee188f74917493cf7637e679cd219bdfbbf4dcbeb1d0b", + policyId: 'd6aae2059baee188f74917493cf7637e679cd219bdfbbf4dcbeb1d0b', tokenName: - "e08460587b08cca542bd2856b8d5e1d23bf3f63f9916fb81f6d95fda0910bf69", + 'e08460587b08cca542bd2856b8d5e1d23bf3f63f9916fb81f6d95fda0910bf69', }, maxBatcherFee: FIXED_BATCHER_FEE, expiredOptions: undefined, @@ -429,9 +429,9 @@ function buildV2Datums(step: OrderV2.Step): OrderV2.Datum[] { }, step: step, lpAsset: { - policyId: "d6aae2059baee188f74917493cf7637e679cd219bdfbbf4dcbeb1d0b", + policyId: 'd6aae2059baee188f74917493cf7637e679cd219bdfbbf4dcbeb1d0b', tokenName: - "e08460587b08cca542bd2856b8d5e1d23bf3f63f9916fb81f6d95fda0910bf69", + 'e08460587b08cca542bd2856b8d5e1d23bf3f63f9916fb81f6d95fda0910bf69', }, maxBatcherFee: FIXED_BATCHER_FEE, expiredOptions: undefined, @@ -451,9 +451,9 @@ function buildV2Datums(step: OrderV2.Step): OrderV2.Datum[] { }, step: step, lpAsset: { - policyId: "d6aae2059baee188f74917493cf7637e679cd219bdfbbf4dcbeb1d0b", + policyId: 'd6aae2059baee188f74917493cf7637e679cd219bdfbbf4dcbeb1d0b', tokenName: - "e08460587b08cca542bd2856b8d5e1d23bf3f63f9916fb81f6d95fda0910bf69", + 'e08460587b08cca542bd2856b8d5e1d23bf3f63f9916fb81f6d95fda0910bf69', }, maxBatcherFee: FIXED_BATCHER_FEE, expiredOptions: { @@ -464,7 +464,7 @@ function buildV2Datums(step: OrderV2.Step): OrderV2.Datum[] { ]; } -test("V2: Swap Exact In Order to PlutusData Converter", () => { +test('V2: Swap Exact In Order to PlutusData Converter', () => { const step1: OrderV2.Step = { type: OrderV2.StepType.SWAP_EXACT_IN, swapAmount: { @@ -492,14 +492,14 @@ test("V2: Swap Exact In Order to PlutusData Converter", () => { for (const datum of datums) { const convertedDatum = OrderV2.Datum.fromPlutusData( networkId, - Data.from(Data.to(OrderV2.Datum.toPlutusData(datum))) + Data.from(Data.to(OrderV2.Datum.toPlutusData(datum))), ); expect(datum).toEqual(convertedDatum); } }); -test("V2: Stop Order to PlutusData Converter", () => { +test('V2: Stop Order to PlutusData Converter', () => { const step1: OrderV2.Step = { type: OrderV2.StepType.STOP, swapAmount: { @@ -525,14 +525,14 @@ test("V2: Stop Order to PlutusData Converter", () => { for (const datum of datums) { const convertedDatum = OrderV2.Datum.fromPlutusData( networkId, - Data.from(Data.to(OrderV2.Datum.toPlutusData(datum))) + Data.from(Data.to(OrderV2.Datum.toPlutusData(datum))), ); expect(datum).toEqual(convertedDatum); } }); -test("V2: OCO Order to PlutusData Converter", () => { +test('V2: OCO Order to PlutusData Converter', () => { const step1: OrderV2.Step = { type: OrderV2.StepType.OCO, swapAmount: { @@ -560,14 +560,14 @@ test("V2: OCO Order to PlutusData Converter", () => { for (const datum of datums) { const convertedDatum = OrderV2.Datum.fromPlutusData( networkId, - Data.from(Data.to(OrderV2.Datum.toPlutusData(datum))) + Data.from(Data.to(OrderV2.Datum.toPlutusData(datum))), ); expect(datum).toEqual(convertedDatum); } }); -test("V2: Swap Exact Out Order to PlutusData Converter", () => { +test('V2: Swap Exact Out Order to PlutusData Converter', () => { const step1: OrderV2.Step = { type: OrderV2.StepType.SWAP_EXACT_OUT, maximumSwapAmount: { @@ -595,14 +595,14 @@ test("V2: Swap Exact Out Order to PlutusData Converter", () => { for (const datum of datums) { const convertedDatum = OrderV2.Datum.fromPlutusData( networkId, - Data.from(Data.to(OrderV2.Datum.toPlutusData(datum))) + Data.from(Data.to(OrderV2.Datum.toPlutusData(datum))), ); expect(datum).toEqual(convertedDatum); } }); -test("V2: Deposit Order to PlutusData Converter", () => { +test('V2: Deposit Order to PlutusData Converter', () => { const step1: OrderV2.Step = { type: OrderV2.StepType.DEPOSIT, depositAmount: { @@ -630,14 +630,14 @@ test("V2: Deposit Order to PlutusData Converter", () => { for (const datum of datums) { const convertedDatum = OrderV2.Datum.fromPlutusData( networkId, - Data.from(Data.to(OrderV2.Datum.toPlutusData(datum))) + Data.from(Data.to(OrderV2.Datum.toPlutusData(datum))), ); expect(datum).toEqual(convertedDatum); } }); -test("V2: Withdraw Order to PlutusData Converter", () => { +test('V2: Withdraw Order to PlutusData Converter', () => { const step1: OrderV2.Step = { type: OrderV2.StepType.WITHDRAW, withdrawalAmount: { @@ -665,14 +665,14 @@ test("V2: Withdraw Order to PlutusData Converter", () => { for (const datum of datums) { const convertedDatum = OrderV2.Datum.fromPlutusData( networkId, - Data.from(Data.to(OrderV2.Datum.toPlutusData(datum))) + Data.from(Data.to(OrderV2.Datum.toPlutusData(datum))), ); expect(datum).toEqual(convertedDatum); } }); -test("V2: Zap Out Order to PlutusData Converter", () => { +test('V2: Zap Out Order to PlutusData Converter', () => { const step1: OrderV2.Step = { type: OrderV2.StepType.ZAP_OUT, withdrawalAmount: { @@ -700,14 +700,14 @@ test("V2: Zap Out Order to PlutusData Converter", () => { for (const datum of datums) { const convertedDatum = OrderV2.Datum.fromPlutusData( networkId, - Data.from(Data.to(OrderV2.Datum.toPlutusData(datum))) + Data.from(Data.to(OrderV2.Datum.toPlutusData(datum))), ); expect(datum).toEqual(convertedDatum); } }); -test("V2: Partial Swap Order to PlutusData Converter", () => { +test('V2: Partial Swap Order to PlutusData Converter', () => { const step1: OrderV2.Step = { type: OrderV2.StepType.PARTIAL_SWAP, totalSwapAmount: 10000n, @@ -735,14 +735,14 @@ test("V2: Partial Swap Order to PlutusData Converter", () => { for (const datum of datums) { const convertedDatum = OrderV2.Datum.fromPlutusData( networkId, - Data.from(Data.to(OrderV2.Datum.toPlutusData(datum))) + Data.from(Data.to(OrderV2.Datum.toPlutusData(datum))), ); expect(datum).toEqual(convertedDatum); } }); -test("V2: Withdraw Imbalance Order to PlutusData Converter", () => { +test('V2: Withdraw Imbalance Order to PlutusData Converter', () => { const step1: OrderV2.Step = { type: OrderV2.StepType.WITHDRAW_IMBALANCE, withdrawalAmount: { @@ -772,14 +772,14 @@ test("V2: Withdraw Imbalance Order to PlutusData Converter", () => { for (const datum of datums) { const convertedDatum = OrderV2.Datum.fromPlutusData( networkId, - Data.from(Data.to(OrderV2.Datum.toPlutusData(datum))) + Data.from(Data.to(OrderV2.Datum.toPlutusData(datum))), ); expect(datum).toEqual(convertedDatum); } }); -test("V2: Routing Order to PlutusData Converter", () => { +test('V2: Routing Order to PlutusData Converter', () => { const step: OrderV2.Step = { type: OrderV2.StepType.SWAP_ROUTING, swapAmount: { @@ -791,17 +791,17 @@ test("V2: Routing Order to PlutusData Converter", () => { { direction: OrderV2.Direction.A_TO_B, lpAsset: { - policyId: "f5808c2c990d86da54bfc97d89cee6efa20cd8461616359478d96b4c", + policyId: 'f5808c2c990d86da54bfc97d89cee6efa20cd8461616359478d96b4c', tokenName: - "ef4530398e53eea75ee3d02a982e87a5c680776904b5d610e63bf6970c528a12", + 'ef4530398e53eea75ee3d02a982e87a5c680776904b5d610e63bf6970c528a12', }, }, { direction: OrderV2.Direction.B_TO_A, lpAsset: { - policyId: "f5808c2c990d86da54bfc97d89cee6efa20cd8461616359478d96b4c", + policyId: 'f5808c2c990d86da54bfc97d89cee6efa20cd8461616359478d96b4c', tokenName: - "eebaae50fe9a09938558096cfebe0aec7dd2728dedadb3d96f02f19e756ca9b8", + 'eebaae50fe9a09938558096cfebe0aec7dd2728dedadb3d96f02f19e756ca9b8', }, }, ], @@ -810,14 +810,14 @@ test("V2: Routing Order to PlutusData Converter", () => { for (const datum of datums) { const convertedDatum = OrderV2.Datum.fromPlutusData( networkId, - Data.from(Data.to(OrderV2.Datum.toPlutusData(datum))) + Data.from(Data.to(OrderV2.Datum.toPlutusData(datum))), ); expect(datum).toEqual(convertedDatum); } }); -test("V2: Donation Order to PlutusData Converter", () => { +test('V2: Donation Order to PlutusData Converter', () => { const step: OrderV2.Step = { type: OrderV2.StepType.DONATION, }; @@ -825,7 +825,7 @@ test("V2: Donation Order to PlutusData Converter", () => { for (const datum of datums) { const convertedDatum = OrderV2.Datum.fromPlutusData( networkId, - Data.from(Data.to(OrderV2.Datum.toPlutusData(datum))) + Data.from(Data.to(OrderV2.Datum.toPlutusData(datum))), ); expect(datum).toEqual(convertedDatum); diff --git a/test/pool.test.ts b/test/pool.test.ts index 2c56ed7..06817d6 100644 --- a/test/pool.test.ts +++ b/test/pool.test.ts @@ -1,78 +1,78 @@ -import JSONBig from "json-bigint"; -import { Data } from "@minswap/lucid-cardano"; +import JSONBig from 'json-bigint'; +import { Data } from '@minswap/lucid-cardano'; -import { NetworkId } from "../src"; -import { ADA, Asset } from "../src/types/asset"; -import { PoolV1 } from "../src/types/pool"; -import { isValidPoolOutput, PoolFeeSharing } from "../src/types/pool.internal"; -import { TxIn, Value } from "../src/types/tx.internal"; +import { NetworkId } from '../src'; +import { ADA, Asset } from '../src/types/asset'; +import { PoolV1 } from '../src/types/pool'; +import { isValidPoolOutput, PoolFeeSharing } from '../src/types/pool.internal'; +import { TxIn, Value } from '../src/types/tx.internal'; const PREPROD_POOL_ADDRESS = - "addr_test1zrsnz7c4974vzdpxu65ruphl3zjdvtxw8strf2c2tmqnxzvrajt8r8wqtygrfduwgukk73m5gcnplmztc5tl5ngy0upqs8q93k"; + 'addr_test1zrsnz7c4974vzdpxu65ruphl3zjdvtxw8strf2c2tmqnxzvrajt8r8wqtygrfduwgukk73m5gcnplmztc5tl5ngy0upqs8q93k'; -test("can handle pool with one side being LP tokens", () => { +test('can handle pool with one side being LP tokens', () => { const txIn: TxIn = { - txHash: "8626060cf100c9b777546808e0ad20c099fe35cfcaee8de0079aa6c6931d345b", + txHash: '8626060cf100c9b777546808e0ad20c099fe35cfcaee8de0079aa6c6931d345b', index: 3, }; const value: Value = [ - { unit: "lovelace", quantity: "111990389" }, + { unit: 'lovelace', quantity: '111990389' }, { - unit: "0be55d262b29f564998ff81efe21bdc0022621c12f15af08d0f2ddb13e4a0451d432d1e4dbd6c5c6aebfbd0b995a72d52be4d3e2d184e4b1081d3b13", - quantity: "1", + unit: '0be55d262b29f564998ff81efe21bdc0022621c12f15af08d0f2ddb13e4a0451d432d1e4dbd6c5c6aebfbd0b995a72d52be4d3e2d184e4b1081d3b13', + quantity: '1', }, { - unit: "13aa2accf2e1561723aa26871e071fdf32c867cff7e7d50ad470d62f4d494e53574150", - quantity: "1", + unit: '13aa2accf2e1561723aa26871e071fdf32c867cff7e7d50ad470d62f4d494e53574150', + quantity: '1', }, { - unit: "e4214b7cce62ac6fbba385d164df48e157eae5863521b4b67ca71d866aa2153e1ae896a95539c9d62f76cedcdabdcdf144e564b8955f609d660cf6a2", - quantity: "212939798", + unit: 'e4214b7cce62ac6fbba385d164df48e157eae5863521b4b67ca71d866aa2153e1ae896a95539c9d62f76cedcdabdcdf144e564b8955f609d660cf6a2', + quantity: '212939798', }, ]; const datumHash = - "421d71a088b55789301a403994760d1f2854444b0380fc3df8970f8e212b3f30"; + '421d71a088b55789301a403994760d1f2854444b0380fc3df8970f8e212b3f30'; expect( - isValidPoolOutput(PREPROD_POOL_ADDRESS, value, datumHash) + isValidPoolOutput(PREPROD_POOL_ADDRESS, value, datumHash), ).toBeTruthy(); expect( - new PoolV1.State(PREPROD_POOL_ADDRESS, txIn, value, datumHash) + new PoolV1.State(PREPROD_POOL_ADDRESS, txIn, value, datumHash), ).toBeInstanceOf(PoolV1.State); }); -test("Fee Sharing to PlutusData Converter", () => { +test('Fee Sharing to PlutusData Converter', () => { const feeSharing1: PoolFeeSharing = { - feeTo: "addr_test1wqq9fn7ynjzx3kfddmnsjn69tgm8hrr333adhvw0sfx30lqy38kcs", - feeToDatumHash: "b8b912cdbcc998f3f0c18e951928ca179de85735c4fc2d82e8d10777", + feeTo: 'addr_test1wqq9fn7ynjzx3kfddmnsjn69tgm8hrr333adhvw0sfx30lqy38kcs', + feeToDatumHash: 'b8b912cdbcc998f3f0c18e951928ca179de85735c4fc2d82e8d10777', }; const feeSharing2: PoolFeeSharing = { feeTo: - "addr_test1qp7e4l2z307kjsashtgl2l373hd06jumuspl0qn2fklc6tlf6dsm8jwtvdltnax4fl7uu8w9mh2u8f420ul5vp8q3jas7yep6y", + 'addr_test1qp7e4l2z307kjsashtgl2l373hd06jumuspl0qn2fklc6tlf6dsm8jwtvdltnax4fl7uu8w9mh2u8f420ul5vp8q3jas7yep6y', feeToDatumHash: undefined, }; const convertedFeeSharing1 = PoolFeeSharing.fromPlutusData( NetworkId.TESTNET, - Data.from(Data.to(PoolFeeSharing.toPlutusData(feeSharing1))) + Data.from(Data.to(PoolFeeSharing.toPlutusData(feeSharing1))), ); const convertedFeeSharing2 = PoolFeeSharing.fromPlutusData( NetworkId.TESTNET, - Data.from(Data.to(PoolFeeSharing.toPlutusData(feeSharing2))) + Data.from(Data.to(PoolFeeSharing.toPlutusData(feeSharing2))), ); expect(JSONBig.stringify(feeSharing1)).toEqual( - JSONBig.stringify(convertedFeeSharing1) + JSONBig.stringify(convertedFeeSharing1), ); expect(JSONBig.stringify(feeSharing2)).toEqual( - JSONBig.stringify(convertedFeeSharing2) + JSONBig.stringify(convertedFeeSharing2), ); }); -test("Pool Datum to PlutusData Converter", () => { +test('Pool Datum to PlutusData Converter', () => { const assetA = ADA; const assetB: Asset = { - policyId: "e16c2dc8ae937e8d3790c7fd7168d7b994621ba14ca11415f39fed72", - tokenName: "4d494e", + policyId: 'e16c2dc8ae937e8d3790c7fd7168d7b994621ba14ca11415f39fed72', + tokenName: '4d494e', }; const poolDatum1: PoolV1.Datum = { assetA: assetA, @@ -81,7 +81,7 @@ test("Pool Datum to PlutusData Converter", () => { rootKLast: 10000n, feeSharing: { feeTo: - "addr_test1qp7e4l2z307kjsashtgl2l373hd06jumuspl0qn2fklc6tlf6dsm8jwtvdltnax4fl7uu8w9mh2u8f420ul5vp8q3jas7yep6y", + 'addr_test1qp7e4l2z307kjsashtgl2l373hd06jumuspl0qn2fklc6tlf6dsm8jwtvdltnax4fl7uu8w9mh2u8f420ul5vp8q3jas7yep6y', feeToDatumHash: undefined, }, }; @@ -96,17 +96,17 @@ test("Pool Datum to PlutusData Converter", () => { const convertedPoolDatum1 = PoolV1.Datum.fromPlutusData( NetworkId.TESTNET, - Data.from(Data.to(PoolV1.Datum.toPlutusData(poolDatum1))) + Data.from(Data.to(PoolV1.Datum.toPlutusData(poolDatum1))), ); const convertedPoolDatum2 = PoolV1.Datum.fromPlutusData( NetworkId.TESTNET, - Data.from(Data.to(PoolV1.Datum.toPlutusData(poolDatum2))) + Data.from(Data.to(PoolV1.Datum.toPlutusData(poolDatum2))), ); expect(JSONBig.stringify(poolDatum1)).toEqual( - JSONBig.stringify(convertedPoolDatum1) + JSONBig.stringify(convertedPoolDatum1), ); expect(JSONBig.stringify(poolDatum2)).toEqual( - JSONBig.stringify(convertedPoolDatum2) + JSONBig.stringify(convertedPoolDatum2), ); }); From 7da1eeea94e1d6676fd966dc81db723b8087f9d6 Mon Sep 17 00:00:00 2001 From: Vardominator Date: Sun, 15 Dec 2024 14:52:14 +0000 Subject: [PATCH 09/22] upstream formatting --- .prettierignore | 4 +- .prettierrc | 10 +- examples/blockfrost-adapter-example.ts | 354 +++++++++++----------- examples/expired-order-monitor-example.ts | 26 +- examples/lbe-v2-worker-example.ts | 28 +- examples/maestro-adapter-example.ts | 46 +-- src/calculate.ts | 92 +++--- src/dex-v2.ts | 200 ++++++------ src/dex.ts | 98 +++--- src/expired-order-monitor.ts | 20 +- src/index.ts | 18 +- src/stableswap.ts | 100 +++--- test/adapter.test.ts | 70 ++--- test/address.test.ts | 62 ++-- test/batcher-fee.test.ts | 44 +-- test/order.test.ts | 154 +++++----- test/pool.test.ts | 72 ++--- 17 files changed, 695 insertions(+), 703 deletions(-) diff --git a/.prettierignore b/.prettierignore index 1b8ac88..c795b05 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,3 +1 @@ -# Ignore artifacts: -build -coverage +build \ No newline at end of file diff --git a/.prettierrc b/.prettierrc index 531bb26..7197da8 100644 --- a/.prettierrc +++ b/.prettierrc @@ -1,10 +1,4 @@ { - "printWidth": 80, - "tabWidth": 2, - "trailingComma": "all", - "singleQuote": true, - "semi": true, - "importOrder": ["^@core/(.*)$", "^@server/(.*)$", "^@ui/(.*)$", "^[./]"], - "importOrderSeparation": true, - "importOrderSortSpecifiers": true + "singleQuote": false, + "trailingComma": "es5" } diff --git a/examples/blockfrost-adapter-example.ts b/examples/blockfrost-adapter-example.ts index f9f4330..607a071 100644 --- a/examples/blockfrost-adapter-example.ts +++ b/examples/blockfrost-adapter-example.ts @@ -1,4 +1,4 @@ -import { BlockFrostAPI } from '@blockfrost/blockfrost-js'; +import { BlockFrostAPI } from "@blockfrost/blockfrost-js"; import { Address, Blockfrost, @@ -9,9 +9,9 @@ import { OutRef, TxComplete, UTxO, -} from '@minswap/lucid-cardano'; -import invariant from '@minswap/tiny-invariant'; -import BigNumber from 'bignumber.js'; +} from "@minswap/lucid-cardano"; +import invariant from "@minswap/tiny-invariant"; +import BigNumber from "bignumber.js"; import { ADA, @@ -31,49 +31,49 @@ import { StableOrder, StableswapCalculation, StableswapConstant, -} from '../src'; +} from "../src"; -import { BlockfrostAdapter } from '../src/adapters/blockfrost'; -import { LbeV2 } from '../src/lbe-v2/lbe-v2'; -import { Stableswap } from '../src/stableswap'; -import { LbeV2Types } from '../src/types/lbe-v2'; -import { getBackendLucidInstance } from '../src/utils/lucid'; -import { Slippage } from '../src/utils/slippage.internal'; +import { BlockfrostAdapter } from "../src/adapters/blockfrost"; +import { LbeV2 } from "../src/lbe-v2/lbe-v2"; +import { Stableswap } from "../src/stableswap"; +import { LbeV2Types } from "../src/types/lbe-v2"; +import { getBackendLucidInstance } from "../src/utils/lucid"; +import { Slippage } from "../src/utils/slippage.internal"; const MIN: Asset = { - policyId: 'e16c2dc8ae937e8d3790c7fd7168d7b994621ba14ca11415f39fed72', - tokenName: '4d494e', + policyId: "e16c2dc8ae937e8d3790c7fd7168d7b994621ba14ca11415f39fed72", + tokenName: "4d494e", }; async function main(): Promise { - const network: Network = 'Preprod'; - const blockfrostProjectId = ''; - const blockfrostUrl = 'https://cardano-preprod.blockfrost.io/api/v0'; + const network: Network = "Preprod"; + const blockfrostProjectId = ""; + const blockfrostUrl = "https://cardano-preprod.blockfrost.io/api/v0"; const address = - 'addr_test1qqf2dhk96l2kq4xh2fkhwksv0h49vy9exw383eshppn863jereuqgh2zwxsedytve5gp9any9jwc5hz98sd47rwfv40stc26fr'; + "addr_test1qqf2dhk96l2kq4xh2fkhwksv0h49vy9exw383eshppn863jereuqgh2zwxsedytve5gp9any9jwc5hz98sd47rwfv40stc26fr"; const lucid = await getBackendLucidInstance( network, blockfrostProjectId, blockfrostUrl, - address, + address ); const blockfrostAdapter = new BlockfrostAdapter( NetworkId.TESTNET, new BlockFrostAPI({ projectId: blockfrostProjectId, - network: 'preprod', - }), + network: "preprod", + }) ); const txComplete = await _lbeV2DepositOrderExample( lucid, address, - blockfrostAdapter, + blockfrostAdapter ); const signedTx = await txComplete - .signWithPrivateKey('') + .signWithPrivateKey("") .complete(); const txId = await signedTx.submit(); @@ -83,7 +83,7 @@ async function main(): Promise { async function getPoolById( network: Network, blockfrostAdapter: BlockfrostAdapter, - poolId: string, + poolId: string ): Promise<{ poolState: PoolV1.State; poolDatum: PoolV1.Datum }> { const pool = await blockfrostAdapter.getV1PoolById({ id: poolId, @@ -93,11 +93,11 @@ async function getPoolById( } const rawRoolDatum = await blockfrostAdapter.getDatumByDatumHash( - pool.datumHash, + pool.datumHash ); const poolDatum = PoolV1.Datum.fromPlutusData( - network === 'Mainnet' ? NetworkId.MAINNET : NetworkId.TESTNET, - Data.from(rawRoolDatum) as Constr, + network === "Mainnet" ? NetworkId.MAINNET : NetworkId.TESTNET, + Data.from(rawRoolDatum) as Constr ); return { poolState: pool, @@ -111,16 +111,16 @@ async function _depositTxExample( lucid: Lucid, blockfrostAdapter: BlockfrostAdapter, address: Address, - availableUtxos: UTxO[], + availableUtxos: UTxO[] ): Promise { // ID of ADA-MIN Pool on Testnet Preprod const poolId = - '3bb0079303c57812462dec9de8fb867cef8fd3768de7f12c77f6f0dd80381d0d'; + "3bb0079303c57812462dec9de8fb867cef8fd3768de7f12c77f6f0dd80381d0d"; const { poolState, poolDatum } = await getPoolById( network, blockfrostAdapter, - poolId, + poolId ); const depositedAmountA = 10_000_000n; @@ -155,16 +155,16 @@ async function _swapExactInTxExample( lucid: Lucid, blockfrostAdapter: BlockfrostAdapter, address: Address, - availableUtxos: UTxO[], + availableUtxos: UTxO[] ): Promise { // ID of ADA-MIN Pool on Testnet Preprod const poolId = - '3bb0079303c57812462dec9de8fb867cef8fd3768de7f12c77f6f0dd80381d0d'; + "3bb0079303c57812462dec9de8fb867cef8fd3768de7f12c77f6f0dd80381d0d"; const { poolState, poolDatum } = await getPoolById( network, blockfrostAdapter, - poolId, + poolId ); const swapAmountADA = 10_000_000n; @@ -196,16 +196,16 @@ async function _swapExactOutTxExample( lucid: Lucid, blockfrostAdapter: BlockfrostAdapter, address: Address, - availableUtxos: UTxO[], + availableUtxos: UTxO[] ): Promise { // ID of ADA-MIN Pool on Testnet Preprod const poolId = - '3bb0079303c57812462dec9de8fb867cef8fd3768de7f12c77f6f0dd80381d0d'; + "3bb0079303c57812462dec9de8fb867cef8fd3768de7f12c77f6f0dd80381d0d"; const { poolState, poolDatum } = await getPoolById( network, blockfrostAdapter, - poolId, + poolId ); const exactAmountOut = 10_000n; @@ -236,11 +236,11 @@ async function _swapLimitExample( lucid: Lucid, blockfrostAdapter: BlockfrostAdapter, address: Address, - availableUtxos: UTxO[], + availableUtxos: UTxO[] ): Promise { // ID of ADA-MIN Pool on Testnet Preprod const poolId = - '3bb0079303c57812462dec9de8fb867cef8fd3768de7f12c77f6f0dd80381d0d'; + "3bb0079303c57812462dec9de8fb867cef8fd3768de7f12c77f6f0dd80381d0d"; const { poolDatum } = await getPoolById(network, blockfrostAdapter, poolId); @@ -267,16 +267,16 @@ async function _withdrawTxExample( lucid: Lucid, blockfrostAdapter: BlockfrostAdapter, address: Address, - availableUtxos: UTxO[], + availableUtxos: UTxO[] ): Promise { // ID of ADA-MIN Pool on Testnet Preprod const poolId = - '3bb0079303c57812462dec9de8fb867cef8fd3768de7f12c77f6f0dd80381d0d'; + "3bb0079303c57812462dec9de8fb867cef8fd3768de7f12c77f6f0dd80381d0d"; const { poolState, poolDatum } = await getPoolById( network, blockfrostAdapter, - poolId, + poolId ); const lpAsset = Asset.fromString(poolState.assetLP); @@ -312,16 +312,16 @@ async function _zapTxExample( lucid: Lucid, blockfrostAdapter: BlockfrostAdapter, address: Address, - availableUtxos: UTxO[], + availableUtxos: UTxO[] ): Promise { // ID of ADA-MIN Pool on Testnet Preprod const poolId = - '3bb0079303c57812462dec9de8fb867cef8fd3768de7f12c77f6f0dd80381d0d'; + "3bb0079303c57812462dec9de8fb867cef8fd3768de7f12c77f6f0dd80381d0d"; const { poolState, poolDatum } = await getPoolById( network, blockfrostAdapter, - poolId, + poolId ); const zapAmount = 10_000_000n; @@ -352,12 +352,12 @@ async function _cancelTxExample( lucid: Lucid, blockFrostAdapter: BlockfrostAdapter, address: Address, - orderOutRef: OutRef, + orderOutRef: OutRef ): Promise { const orderUtxo = (await lucid.utxosByOutRef([orderOutRef]))[0]; - invariant(orderUtxo.datumHash, 'order utxo missing datum hash'); + invariant(orderUtxo.datumHash, "order utxo missing datum hash"); orderUtxo.datum = await blockFrostAdapter.getDatumByDatumHash( - orderUtxo.datumHash, + orderUtxo.datumHash ); const dex = new Dex(lucid); return dex.buildCancelOrder({ @@ -369,14 +369,14 @@ async function _cancelTxExample( // MARK: DEX V2 async function _createPoolV2( lucid: Lucid, - blockFrostAdapter: BlockfrostAdapter, + blockFrostAdapter: BlockfrostAdapter ): Promise { const dexV2 = new DexV2(lucid, blockFrostAdapter); const txComplete = await dexV2.createPoolTx({ assetA: ADA, assetB: { - policyId: 'e16c2dc8ae937e8d3790c7fd7168d7b994621ba14ca11415f39fed72', - tokenName: '434d', + policyId: "e16c2dc8ae937e8d3790c7fd7168d7b994621ba14ca11415f39fed72", + tokenName: "434d", }, amountA: 10_000000n, amountB: 300_000000n, @@ -390,13 +390,13 @@ async function _swapExactInV2TxExample( lucid: Lucid, blockfrostAdapter: BlockfrostAdapter, address: Address, - availableUtxos: UTxO[], + availableUtxos: UTxO[] ): Promise { const assetA = ADA; const assetB = MIN; const pool = await blockfrostAdapter.getV2PoolByPair(assetA, assetB); - invariant(pool, 'could not find pool'); + invariant(pool, "could not find pool"); const swapAmount = 5_000_000n; const amountOut = DexV2Calculation.calculateAmountOut({ @@ -410,7 +410,7 @@ async function _swapExactInV2TxExample( const acceptedAmountOut = Slippage.apply({ slippage: slippageTolerance, amount: amountOut, - type: 'down', + type: "down", }); return new DexV2(lucid, blockfrostAdapter).createBulkOrdersTx({ @@ -435,14 +435,14 @@ async function _swapExactOutV2TxExample( lucid: Lucid, blockfrostAdapter: BlockfrostAdapter, address: Address, - availableUtxos: UTxO[], + availableUtxos: UTxO[] ): Promise { const assetA = ADA; const assetB = MIN; const swapAmount = 10_000n; const pool = await blockfrostAdapter.getV2PoolByPair(assetA, assetB); - invariant(pool, 'could not find pool'); + invariant(pool, "could not find pool"); const amountIn = DexV2Calculation.calculateAmountIn({ reserveIn: pool.reserveA, @@ -456,7 +456,7 @@ async function _swapExactOutV2TxExample( const maximumAmountIn = Slippage.apply({ slippage: slippageTolerance, amount: amountIn, - type: 'up', + type: "up", }); return new DexV2(lucid, blockfrostAdapter).createBulkOrdersTx({ sender: address, @@ -479,7 +479,7 @@ async function _depositV2TxExample( lucid: Lucid, blockFrostAdapter: BlockfrostAdapter, address: Address, - availableUtxos: UTxO[], + availableUtxos: UTxO[] ): Promise { const assetA = ADA; const assetB = MIN; @@ -488,7 +488,7 @@ async function _depositV2TxExample( const amountB = 10_000n; const pool = await blockFrostAdapter.getV2PoolByPair(assetA, assetB); - invariant(pool, 'Pool not found'); + invariant(pool, "Pool not found"); const lpAmount = DexV2Calculation.calculateDepositAmount({ amountA, @@ -500,7 +500,7 @@ async function _depositV2TxExample( const acceptableLPAmount = Slippage.apply({ slippage: slippageTolerance, amount: lpAmount, - type: 'down', + type: "down", }); return new DexV2(lucid, blockFrostAdapter).createBulkOrdersTx({ @@ -525,17 +525,17 @@ async function _withdrawV2TxExample( lucid: Lucid, blockFrostAdapter: BlockfrostAdapter, address: Address, - availableUtxos: UTxO[], + availableUtxos: UTxO[] ): Promise { // ADA-MIN Lp Asset const lpAsset = { - policyId: 'd6aae2059baee188f74917493cf7637e679cd219bdfbbf4dcbeb1d0b', + policyId: "d6aae2059baee188f74917493cf7637e679cd219bdfbbf4dcbeb1d0b", tokenName: - '6c3ea488e6ff940bb6fb1b18fd605b5931d9fefde6440117015ba484cf321200', + "6c3ea488e6ff940bb6fb1b18fd605b5931d9fefde6440117015ba484cf321200", }; const lpAmount = 20_000n; const pool = await blockFrostAdapter.getV2PoolByLp(lpAsset); - invariant(pool, 'Pool not found'); + invariant(pool, "Pool not found"); const { withdrawalA, withdrawalB } = await DexV2Calculation.calculateWithdrawAmount({ withdrawalLPAmount: lpAmount, @@ -547,12 +547,12 @@ async function _withdrawV2TxExample( const acceptableAmountAReceive = Slippage.apply({ slippage: slippageTolerance, amount: withdrawalA, - type: 'down', + type: "down", }); const acceptableAmountBReceive = Slippage.apply({ slippage: slippageTolerance, amount: withdrawalB, - type: 'down', + type: "down", }); return new DexV2(lucid, blockFrostAdapter).createBulkOrdersTx({ sender: address, @@ -574,14 +574,14 @@ async function _stopV2TxExample( lucid: Lucid, blockFrostAdapter: BlockfrostAdapter, address: Address, - availableUtxos: UTxO[], + availableUtxos: UTxO[] ): Promise { const assetA = ADA; const assetB = MIN; const amountA = 10_000n; const pool = await blockFrostAdapter.getV2PoolByPair(assetA, assetB); - invariant(pool, 'pool not found'); + invariant(pool, "pool not found"); const amountOut = DexV2Calculation.calculateAmountOut({ reserveIn: pool.reserveA, reserveOut: pool.reserveB, @@ -593,7 +593,7 @@ async function _stopV2TxExample( const stopAmount = Slippage.apply({ slippage: new BigNumber(10).div(100), amount: amountOut, - type: 'down', + type: "down", }); return new DexV2(lucid, blockFrostAdapter).createBulkOrdersTx({ @@ -616,14 +616,14 @@ async function _ocoV2TxExample( lucid: Lucid, blockFrostAdapter: BlockfrostAdapter, address: Address, - availableUtxos: UTxO[], + availableUtxos: UTxO[] ): Promise { const assetA = ADA; const assetB = MIN; const amountA = 10_000n; const pool = await blockFrostAdapter.getV2PoolByPair(assetA, assetB); - invariant(pool, 'Pool not found'); + invariant(pool, "Pool not found"); const amountOut = DexV2Calculation.calculateAmountOut({ reserveIn: pool.reserveA, @@ -634,12 +634,12 @@ async function _ocoV2TxExample( const limitAmount = Slippage.apply({ slippage: new BigNumber(20).div(100), amount: amountOut, - type: 'up', + type: "up", }); const stopAmount = Slippage.apply({ slippage: new BigNumber(20).div(100), amount: amountOut, - type: 'down', + type: "down", }); return new DexV2(lucid, blockFrostAdapter).createBulkOrdersTx({ sender: address, @@ -662,17 +662,17 @@ async function _zapOutV2TxExample( lucid: Lucid, blockFrostAdapter: BlockfrostAdapter, address: Address, - availableUtxos: UTxO[], + availableUtxos: UTxO[] ): Promise { // ADA-MIN Lp Asset const lpAsset = { - policyId: 'd6aae2059baee188f74917493cf7637e679cd219bdfbbf4dcbeb1d0b', + policyId: "d6aae2059baee188f74917493cf7637e679cd219bdfbbf4dcbeb1d0b", tokenName: - '6c3ea488e6ff940bb6fb1b18fd605b5931d9fefde6440117015ba484cf321200', + "6c3ea488e6ff940bb6fb1b18fd605b5931d9fefde6440117015ba484cf321200", }; const lpAmount = 10_000n; const pool = await blockFrostAdapter.getV2PoolByLp(lpAsset); - invariant(pool, 'Pool not found'); + invariant(pool, "Pool not found"); const zapAmountOut = DexV2Calculation.calculateZapOutAmount({ withdrawalLPAmount: lpAmount, direction: OrderV2.Direction.B_TO_A, @@ -683,7 +683,7 @@ async function _zapOutV2TxExample( const acceptableZapOutAmount = Slippage.apply({ slippage: slippageTolerance, amount: zapAmountOut, - type: 'down', + type: "down", }); return new DexV2(lucid, blockFrostAdapter).createBulkOrdersTx({ @@ -706,13 +706,13 @@ async function _partialSwapV2TxExample( lucid: Lucid, blockFrostAdapter: BlockfrostAdapter, address: Address, - availableUtxos: UTxO[], + availableUtxos: UTxO[] ): Promise { const assetA = ADA; const assetB = MIN; const amountA = 10_000n; const pool = await blockFrostAdapter.getV2PoolByPair(assetA, assetB); - invariant(pool, 'Pool not found'); + invariant(pool, "Pool not found"); const amountOut = DexV2Calculation.calculateAmountOut({ reserveIn: pool.reserveA, @@ -724,7 +724,7 @@ async function _partialSwapV2TxExample( const limitAmount = Slippage.apply({ slippage: new BigNumber(20).div(100), amount: amountOut, - type: 'up', + type: "up", }); const gcd = calculateGcd(amountA, limitAmount); @@ -745,7 +745,7 @@ async function _partialSwapV2TxExample( new BigNumber(getMinimumTradePercent(maximumSwaps)) .div(100) .multipliedBy(amountA.toString()) - .toFixed(0), + .toFixed(0) ), lpAsset: pool.lpAsset, }, @@ -757,22 +757,22 @@ async function _multiRoutingTxExample( lucid: Lucid, blockFrostAdapter: BlockfrostAdapter, address: Address, - availableUtxos: UTxO[], + availableUtxos: UTxO[] ): Promise { const assetA = MIN; const amountA = 10_000n; // ADA-MIN Lp Asset const lpAssetA = { - policyId: 'd6aae2059baee188f74917493cf7637e679cd219bdfbbf4dcbeb1d0b', + policyId: "d6aae2059baee188f74917493cf7637e679cd219bdfbbf4dcbeb1d0b", tokenName: - '6c3ea488e6ff940bb6fb1b18fd605b5931d9fefde6440117015ba484cf321200', + "6c3ea488e6ff940bb6fb1b18fd605b5931d9fefde6440117015ba484cf321200", }; // ADA-MileCoin Lp Asset const lpAssetB = { - policyId: 'd6aae2059baee188f74917493cf7637e679cd219bdfbbf4dcbeb1d0b', + policyId: "d6aae2059baee188f74917493cf7637e679cd219bdfbbf4dcbeb1d0b", tokenName: - '976edd2e047eedcd0d707df19155b9298d68020b8a68c2b27223539c4df57d3d', + "976edd2e047eedcd0d707df19155b9298d68020b8a68c2b27223539c4df57d3d", }; const routings = [ { @@ -785,15 +785,15 @@ async function _multiRoutingTxExample( }, ]; const pools = await Promise.all( - routings.map(({ lpAsset }) => blockFrostAdapter.getV2PoolByLp(lpAsset)), + routings.map(({ lpAsset }) => blockFrostAdapter.getV2PoolByLp(lpAsset)) ); - invariant(pools.length === routings.length, 'pools not found'); + invariant(pools.length === routings.length, "pools not found"); let lastAmountIn = amountA; for (let i = 0; i < routings.length; i++) { const pool = pools[i]; const routing = routings[i]; - invariant(pool, 'Pool not found'); + invariant(pool, "Pool not found"); const amountOut = DexV2Calculation.calculateAmountOut({ reserveIn: pool.reserveA, reserveOut: pool.reserveB, @@ -810,7 +810,7 @@ async function _multiRoutingTxExample( const acceptableOutputAmount = Slippage.apply({ slippage: slippageTolerance, amount: lastAmountIn, - type: 'down', + type: "down", }); return new DexV2(lucid, blockFrostAdapter).createBulkOrdersTx({ @@ -840,13 +840,13 @@ async function _multiRoutingTxExample( async function _cancelV2TxExample( lucid: Lucid, - blockFrostAdapter: BlockfrostAdapter, + blockFrostAdapter: BlockfrostAdapter ): Promise { return new DexV2(lucid, blockFrostAdapter).cancelOrder({ orderOutRefs: [ { txHash: - '83e22abd3fad8525b02bf2fd1c8e8d0dbc37dbbe09384d666699081ee3e6f282', + "83e22abd3fad8525b02bf2fd1c8e8d0dbc37dbbe09384d666699081ee3e6f282", outputIndex: 0, }, ], @@ -858,14 +858,14 @@ async function _swapStableExample( lucid: Lucid, blockfrostAdapter: BlockfrostAdapter, address: Address, - availableUtxos: UTxO[], + availableUtxos: UTxO[] ): Promise { const lpAsset = Asset.fromString( - 'd16339238c9e1fb4d034b6a48facb2f97794a9cdb7bc049dd7c49f54646a65642d697573642d76312e342d6c70', + "d16339238c9e1fb4d034b6a48facb2f97794a9cdb7bc049dd7c49f54646a65642d697573642d76312e342d6c70" ); const config = StableswapConstant.getConfigByLpAsset( lpAsset, - NetworkId.TESTNET, + NetworkId.TESTNET ); const pool = await blockfrostAdapter.getStablePoolByLpAsset(lpAsset); @@ -909,14 +909,14 @@ async function _depositStableExample( lucid: Lucid, blockfrostAdapter: BlockfrostAdapter, address: Address, - availableUtxos: UTxO[], + availableUtxos: UTxO[] ): Promise { const lpAsset = Asset.fromString( - 'd16339238c9e1fb4d034b6a48facb2f97794a9cdb7bc049dd7c49f54646a65642d697573642d76312e342d6c70', + "d16339238c9e1fb4d034b6a48facb2f97794a9cdb7bc049dd7c49f54646a65642d697573642d76312e342d6c70" ); const config = StableswapConstant.getConfigByLpAsset( lpAsset, - NetworkId.TESTNET, + NetworkId.TESTNET ); const pool = await blockfrostAdapter.getStablePoolByLpAsset(lpAsset); @@ -960,14 +960,14 @@ async function _withdrawStableExample( lucid: Lucid, blockfrostAdapter: BlockfrostAdapter, address: Address, - availableUtxos: UTxO[], + availableUtxos: UTxO[] ): Promise { const lpAsset = Asset.fromString( - 'd16339238c9e1fb4d034b6a48facb2f97794a9cdb7bc049dd7c49f54646a65642d697573642d76312e342d6c70', + "d16339238c9e1fb4d034b6a48facb2f97794a9cdb7bc049dd7c49f54646a65642d697573642d76312e342d6c70" ); const config = StableswapConstant.getConfigByLpAsset( lpAsset, - NetworkId.TESTNET, + NetworkId.TESTNET ); const pool = await blockfrostAdapter.getStablePoolByLpAsset(lpAsset); @@ -1001,14 +1001,14 @@ async function _withdrawImbalanceStableExample( lucid: Lucid, blockfrostAdapter: BlockfrostAdapter, address: Address, - availableUtxos: UTxO[], + availableUtxos: UTxO[] ): Promise { const lpAsset = Asset.fromString( - 'd16339238c9e1fb4d034b6a48facb2f97794a9cdb7bc049dd7c49f54646a65642d697573642d76312e342d6c70', + "d16339238c9e1fb4d034b6a48facb2f97794a9cdb7bc049dd7c49f54646a65642d697573642d76312e342d6c70" ); const config = StableswapConstant.getConfigByLpAsset( lpAsset, - NetworkId.TESTNET, + NetworkId.TESTNET ); const pool = await blockfrostAdapter.getStablePoolByLpAsset(lpAsset); @@ -1048,14 +1048,14 @@ async function _zapOutStableExample( lucid: Lucid, blockfrostAdapter: BlockfrostAdapter, address: Address, - availableUtxos: UTxO[], + availableUtxos: UTxO[] ): Promise { const lpAsset = Asset.fromString( - 'd16339238c9e1fb4d034b6a48facb2f97794a9cdb7bc049dd7c49f54646a65642d697573642d76312e342d6c70', + "d16339238c9e1fb4d034b6a48facb2f97794a9cdb7bc049dd7c49f54646a65642d697573642d76312e342d6c70" ); const config = StableswapConstant.getConfigByLpAsset( lpAsset, - NetworkId.TESTNET, + NetworkId.TESTNET ); const pool = await blockfrostAdapter.getStablePoolByLpAsset(lpAsset); @@ -1096,10 +1096,10 @@ async function _zapOutStableExample( async function _bulkOrderStableExample( lucid: Lucid, address: Address, - availableUtxos: UTxO[], + availableUtxos: UTxO[] ): Promise { const lpAsset = Asset.fromString( - 'd16339238c9e1fb4d034b6a48facb2f97794a9cdb7bc049dd7c49f54646a65642d697573642d76312e342d6c70', + "d16339238c9e1fb4d034b6a48facb2f97794a9cdb7bc049dd7c49f54646a65642d697573642d76312e342d6c70" ); const lpAmount = 12345n; const outIndex = 0; @@ -1131,16 +1131,16 @@ async function _cancelStableExample(lucid: Lucid): Promise { const orderUtxos = await lucid.utxosByOutRef([ { txHash: - 'c3ad8e0aa159a22a14088474908e5c23ba6772a6aa82f8250e7e8eaa1016b2d8', + "c3ad8e0aa159a22a14088474908e5c23ba6772a6aa82f8250e7e8eaa1016b2d8", outputIndex: 0, }, { txHash: - '72e57a1fd90bf0b9291a6fa8e04793099d51df7844813689dde67ce3eea03c1f', + "72e57a1fd90bf0b9291a6fa8e04793099d51df7844813689dde67ce3eea03c1f", outputIndex: 0, }, ]); - invariant(orderUtxos.length === 2, 'Can not find order to cancel'); + invariant(orderUtxos.length === 2, "Can not find order to cancel"); return new Stableswap(lucid).buildCancelOrdersTx({ orderUtxos: orderUtxos, }); @@ -1155,10 +1155,10 @@ const _ONE_DAY_IN_MS = 1000 * 60 * 60 * 24; async function _createLbeV2EventExample( lucid: Lucid, address: Address, - blockfrostAdapter: BlockfrostAdapter, + blockfrostAdapter: BlockfrostAdapter ): Promise { const baseAsset = Asset.fromString( - 'd6aae2059baee188f74917493cf7637e679cd219bdfbbf4dcbeb1d0bfdfc61f25b3065a310ba3e352159125910b947b7aee704728318949933127cdc', + "d6aae2059baee188f74917493cf7637e679cd219bdfbbf4dcbeb1d0bfdfc61f25b3065a310ba3e352159125910b947b7aee704728318949933127cdc" ); const curSlot = lucid.currentSlot(); const curDate = lucid.utils.slotToUnixTime(curSlot); @@ -1176,7 +1176,7 @@ async function _createLbeV2EventExample( maximumRaise: 100_000_000n, penaltyConfig: { penaltyStartTime: BigInt( - curDate + ONE_HOUR_IN_MS + 20 * ONE_MINUTE_IN_MS, + curDate + ONE_HOUR_IN_MS + 20 * ONE_MINUTE_IN_MS ), percent: 20n, }, @@ -1185,30 +1185,30 @@ async function _createLbeV2EventExample( }; const factory = await blockfrostAdapter.getLbeV2Factory( lbeV2Parameters.baseAsset, - lbeV2Parameters.raiseAsset, + lbeV2Parameters.raiseAsset ); - invariant(factory !== null, 'Can not find factory'); + invariant(factory !== null, "Can not find factory"); const factoryUtxos = await lucid.utxosByOutRef([ { outputIndex: factory.txIn.index, txHash: factory.txIn.txHash }, ]); - invariant(factoryUtxos.length !== 0, 'Can not find factory utxo'); + invariant(factoryUtxos.length !== 0, "Can not find factory utxo"); const projectDetails = { - eventName: 'TEST SDK', - description: 'test lbe v2 in public sdk', + eventName: "TEST SDK", + description: "test lbe v2 in public sdk", socialLinks: { - twitter: 'https://x.com/MinswapDEX', - telegram: 'https://t.me/MinswapMafia', - discord: 'https://discord.gg/minswap', - website: 'https://minswap.org/', + twitter: "https://x.com/MinswapDEX", + telegram: "https://t.me/MinswapMafia", + discord: "https://discord.gg/minswap", + website: "https://minswap.org/", }, tokenomics: [ { - tag: 'admin', - percentage: '70', + tag: "admin", + percentage: "70", }, { - tag: 'LBE', - percentage: '30', + tag: "LBE", + percentage: "30", }, ], }; @@ -1227,10 +1227,10 @@ async function _createLbeV2EventExample( async function _updateLbeV2EventExample( lucid: Lucid, address: Address, - blockfrostAdapter: BlockfrostAdapter, + blockfrostAdapter: BlockfrostAdapter ): Promise { const baseAsset = Asset.fromString( - 'd6aae2059baee188f74917493cf7637e679cd219bdfbbf4dcbeb1d0ba547d1ae595c49041570991a1c33729106e635f20643b99e3ddb1e77dc439586', + "d6aae2059baee188f74917493cf7637e679cd219bdfbbf4dcbeb1d0ba547d1ae595c49041570991a1c33729106e635f20643b99e3ddb1e77dc439586" ); const curSlot = lucid.currentSlot(); const curDate = lucid.utils.slotToUnixTime(curSlot); @@ -1248,7 +1248,7 @@ async function _updateLbeV2EventExample( maximumRaise: 100_000_000n, penaltyConfig: { penaltyStartTime: BigInt( - curDate + _ONE_DAY_IN_MS * 20 + 10 * ONE_MINUTE_IN_MS, + curDate + _ONE_DAY_IN_MS * 20 + 10 * ONE_MINUTE_IN_MS ), percent: 20n, }, @@ -1256,33 +1256,33 @@ async function _updateLbeV2EventExample( poolBaseFee: 30n, }; const projectDetails = { - eventName: 'TEST SDK hiiiiiiii', - description: 'test lbe v2 in public sdk', + eventName: "TEST SDK hiiiiiiii", + description: "test lbe v2 in public sdk", socialLinks: { - twitter: 'https://x.com/MinswapDEX', - telegram: 'https://t.me/MinswapMafia', - discord: 'https://discord.gg/minswap', - website: 'https://app.minswap.org/', + twitter: "https://x.com/MinswapDEX", + telegram: "https://t.me/MinswapMafia", + discord: "https://discord.gg/minswap", + website: "https://app.minswap.org/", }, tokenomics: [ { - tag: 'admin', - percentage: '70', + tag: "admin", + percentage: "70", }, { - tag: 'LBE', - percentage: '30', + tag: "LBE", + percentage: "30", }, ], }; const currentSlot = await blockfrostAdapter.currentSlot(); const lbeId = PoolV2.computeLPAssetName(baseAsset, ADA); const treasury = await blockfrostAdapter.getLbeV2TreasuryByLbeId(lbeId); - invariant(treasury !== null, 'Event is not created'); + invariant(treasury !== null, "Event is not created"); const treasuryUtxos = await lucid.utxosByOutRef([ { outputIndex: treasury.txIn.index, txHash: treasury.txIn.txHash }, ]); - invariant(treasuryUtxos.length !== 0, 'Can not find factory utxo'); + invariant(treasuryUtxos.length !== 0, "Can not find factory utxo"); return new LbeV2(lucid).updateEvent({ owner: await lucid.wallet.address(), treasuryUtxo: treasuryUtxos[0], @@ -1296,12 +1296,12 @@ async function _updateLbeV2EventExample( async function _lbeV2AddMoreSellersExample( lucid: Lucid, address: Address, - blockfrostAdapter: BlockfrostAdapter, + blockfrostAdapter: BlockfrostAdapter ): Promise { const baseAsset = Asset.fromString( - 'e16c2dc8ae937e8d3790c7fd7168d7b994621ba14ca11415f39fed7243414b45', + "e16c2dc8ae937e8d3790c7fd7168d7b994621ba14ca11415f39fed7243414b45" ); - const raiseAsset = Asset.fromString('lovelace'); + const raiseAsset = Asset.fromString("lovelace"); const lbeId = PoolV2.computeLPAssetName(baseAsset, raiseAsset); const treasury = await blockfrostAdapter.getLbeV2TreasuryByLbeId(lbeId); @@ -1309,14 +1309,14 @@ async function _lbeV2AddMoreSellersExample( const treasuryUtxos = await lucid.utxosByOutRef([ { txHash: treasury.txIn.txHash, outputIndex: treasury.txIn.index }, ]); - invariant(treasuryUtxos.length === 1, 'Can not find treasury Utxo'); + invariant(treasuryUtxos.length === 1, "Can not find treasury Utxo"); const manager = await blockfrostAdapter.getLbeV2ManagerByLbeId(lbeId); invariant(manager !== null, `Can not find manager by lbeId ${lbeId}`); const managerUtxos = await lucid.utxosByOutRef([ { txHash: manager.txIn.txHash, outputIndex: manager.txIn.index }, ]); - invariant(managerUtxos.length === 1, 'Can not find manager Utxo'); + invariant(managerUtxos.length === 1, "Can not find manager Utxo"); return new LbeV2(lucid).addSellers({ treasuryUtxo: treasuryUtxos[0], @@ -1331,12 +1331,12 @@ async function _lbeV2AddMoreSellersExample( async function _cancelLbeV2EventByOwnerExample( lucid: Lucid, address: Address, - blockfrostAdapter: BlockfrostAdapter, + blockfrostAdapter: BlockfrostAdapter ): Promise { const baseAsset = Asset.fromString( - 'e4214b7cce62ac6fbba385d164df48e157eae5863521b4b67ca71d865190718981e4e7fab3eb80963f14148714d7a7847652d4017d0fb744db075027', + "e4214b7cce62ac6fbba385d164df48e157eae5863521b4b67ca71d865190718981e4e7fab3eb80963f14148714d7a7847652d4017d0fb744db075027" ); - const raiseAsset = Asset.fromString('lovelace'); + const raiseAsset = Asset.fromString("lovelace"); const lbeId = PoolV2.computeLPAssetName(baseAsset, raiseAsset); const treasury = await blockfrostAdapter.getLbeV2TreasuryByLbeId(lbeId); @@ -1344,7 +1344,7 @@ async function _cancelLbeV2EventByOwnerExample( const treasuryUtxos = await lucid.utxosByOutRef([ { txHash: treasury.txIn.txHash, outputIndex: treasury.txIn.index }, ]); - invariant(treasuryUtxos.length === 1, 'Can not find treasury Utxo'); + invariant(treasuryUtxos.length === 1, "Can not find treasury Utxo"); return new LbeV2(lucid).cancelEvent({ treasuryUtxo: treasuryUtxos[0], @@ -1357,12 +1357,12 @@ async function _cancelLbeV2EventByOwnerExample( async function _lbeV2DepositOrderExample( lucid: Lucid, address: Address, - blockfrostAdapter: BlockfrostAdapter, + blockfrostAdapter: BlockfrostAdapter ): Promise { const baseAsset = Asset.fromString( - 'e16c2dc8ae937e8d3790c7fd7168d7b994621ba14ca11415f39fed7243414b45', + "e16c2dc8ae937e8d3790c7fd7168d7b994621ba14ca11415f39fed7243414b45" ); - const raiseAsset = Asset.fromString('lovelace'); + const raiseAsset = Asset.fromString("lovelace"); const lbeId = PoolV2.computeLPAssetName(baseAsset, raiseAsset); const treasury = await blockfrostAdapter.getLbeV2TreasuryByLbeId(lbeId); @@ -1370,18 +1370,18 @@ async function _lbeV2DepositOrderExample( const treasuryUtxos = await lucid.utxosByOutRef([ { txHash: treasury.txIn.txHash, outputIndex: treasury.txIn.index }, ]); - invariant(treasuryUtxos.length === 1, 'Can not find treasury Utxo'); + invariant(treasuryUtxos.length === 1, "Can not find treasury Utxo"); const seller = await blockfrostAdapter.getLbeV2SellerByLbeId(lbeId); invariant(seller !== null, `Can not find seller by lbeId ${lbeId}`); const sellerUtxos = await lucid.utxosByOutRef([ { txHash: seller.txIn.txHash, outputIndex: seller.txIn.index }, ]); - invariant(sellerUtxos.length === 1, 'Can not find seller Utxo'); + invariant(sellerUtxos.length === 1, "Can not find seller Utxo"); const orders = await blockfrostAdapter.getLbeV2OrdersByLbeIdAndOwner( lbeId, - address, + address ); const orderUtxos = orders.length > 0 @@ -1389,13 +1389,13 @@ async function _lbeV2DepositOrderExample( orders.map((o) => ({ txHash: o.txIn.txHash, outputIndex: o.txIn.index, - })), + })) ) : []; invariant( orderUtxos.length === orders.length, - 'Can not find enough order Utxos', + "Can not find enough order Utxos" ); const currentSlot = await blockfrostAdapter.currentSlot(); @@ -1405,7 +1405,7 @@ async function _lbeV2DepositOrderExample( treasuryUtxo: treasuryUtxos[0], sellerUtxo: sellerUtxos[0], owner: address, - action: { type: 'deposit', additionalAmount: 1_000_000n }, + action: { type: "deposit", additionalAmount: 1_000_000n }, }); } @@ -1413,12 +1413,12 @@ async function _lbeV2DepositOrderExample( async function _lbeV2WithdrawOrderExample( lucid: Lucid, address: Address, - blockfrostAdapter: BlockfrostAdapter, + blockfrostAdapter: BlockfrostAdapter ): Promise { const baseAsset = Asset.fromString( - 'e16c2dc8ae937e8d3790c7fd7168d7b994621ba14ca11415f39fed7243414b45', + "e16c2dc8ae937e8d3790c7fd7168d7b994621ba14ca11415f39fed7243414b45" ); - const raiseAsset = Asset.fromString('lovelace'); + const raiseAsset = Asset.fromString("lovelace"); const lbeId = PoolV2.computeLPAssetName(baseAsset, raiseAsset); const treasury = await blockfrostAdapter.getLbeV2TreasuryByLbeId(lbeId); @@ -1426,18 +1426,18 @@ async function _lbeV2WithdrawOrderExample( const treasuryUtxos = await lucid.utxosByOutRef([ { txHash: treasury.txIn.txHash, outputIndex: treasury.txIn.index }, ]); - invariant(treasuryUtxos.length === 1, 'Can not find treasury Utxo'); + invariant(treasuryUtxos.length === 1, "Can not find treasury Utxo"); const seller = await blockfrostAdapter.getLbeV2SellerByLbeId(lbeId); invariant(seller !== null, `Can not find seller by lbeId ${lbeId}`); const sellerUtxos = await lucid.utxosByOutRef([ { txHash: seller.txIn.txHash, outputIndex: seller.txIn.index }, ]); - invariant(sellerUtxos.length === 1, 'Can not find seller Utxo'); + invariant(sellerUtxos.length === 1, "Can not find seller Utxo"); const orders = await blockfrostAdapter.getLbeV2OrdersByLbeIdAndOwner( lbeId, - address, + address ); const orderUtxos = orders.length > 0 @@ -1445,13 +1445,13 @@ async function _lbeV2WithdrawOrderExample( orders.map((o) => ({ txHash: o.txIn.txHash, outputIndex: o.txIn.index, - })), + })) ) : []; invariant( orderUtxos.length === orders.length, - 'Can not find enough order Utxos', + "Can not find enough order Utxos" ); const currentSlot = await blockfrostAdapter.currentSlot(); @@ -1461,7 +1461,7 @@ async function _lbeV2WithdrawOrderExample( treasuryUtxo: treasuryUtxos[0], sellerUtxo: sellerUtxos[0], owner: address, - action: { type: 'withdraw', withdrawalAmount: 1_000_000n }, + action: { type: "withdraw", withdrawalAmount: 1_000_000n }, }); } @@ -1469,12 +1469,12 @@ async function _lbeV2WithdrawOrderExample( async function _lbeV2CloseEventExample( lucid: Lucid, address: Address, - blockfrostAdapter: BlockfrostAdapter, + blockfrostAdapter: BlockfrostAdapter ): Promise { const baseAsset = Asset.fromString( - 'd6aae2059baee188f74917493cf7637e679cd219bdfbbf4dcbeb1d0bfdfc61f25b3065a310ba3e352159125910b947b7aee704728318949933127cdc', + "d6aae2059baee188f74917493cf7637e679cd219bdfbbf4dcbeb1d0bfdfc61f25b3065a310ba3e352159125910b947b7aee704728318949933127cdc" ); - const raiseAsset = Asset.fromString('lovelace'); + const raiseAsset = Asset.fromString("lovelace"); const lbeId = PoolV2.computeLPAssetName(baseAsset, raiseAsset); const treasury = await blockfrostAdapter.getLbeV2TreasuryByLbeId(lbeId); @@ -1483,25 +1483,25 @@ async function _lbeV2CloseEventExample( await blockfrostAdapter.getLbeV2HeadAndTailFactory(lbeId); invariant( headAndTailFactory, - `Can not find head and tail factory by lbeId ${lbeId}`, + `Can not find head and tail factory by lbeId ${lbeId}` ); const { head: headFactory, tail: tailFactory } = headAndTailFactory; const treasuryUtxos = await lucid.utxosByOutRef([ { txHash: treasury.txIn.txHash, outputIndex: treasury.txIn.index }, ]); - invariant(treasuryUtxos.length !== 0, 'Can not find treasury Utxo'); + invariant(treasuryUtxos.length !== 0, "Can not find treasury Utxo"); const headFactoryUtxos = await lucid.utxosByOutRef([ { txHash: headFactory.txIn.txHash, outputIndex: headFactory.txIn.index }, ]); - invariant(headFactoryUtxos.length !== 0, 'Can not find head factory Utxo'); + invariant(headFactoryUtxos.length !== 0, "Can not find head factory Utxo"); const tailFactoryUtxos = await lucid.utxosByOutRef([ { txHash: tailFactory.txIn.txHash, outputIndex: tailFactory.txIn.index }, ]); - invariant(tailFactoryUtxos.length !== 0, 'Can not find tail factory Utxo'); + invariant(tailFactoryUtxos.length !== 0, "Can not find tail factory Utxo"); const currentSlot = await blockfrostAdapter.currentSlot(); return new LbeV2(lucid).closeEventTx({ @@ -1523,7 +1523,7 @@ async function _lbeV2CloseEventExample( async function _getBrowserLucidInstance( network: Network, projectId: string, - blockfrostUrl: string, + blockfrostUrl: string ): Promise { const provider = new Blockfrost(blockfrostUrl, projectId); const lucid = await Lucid.new(provider, network); diff --git a/examples/expired-order-monitor-example.ts b/examples/expired-order-monitor-example.ts index 6b8fb10..3b85155 100644 --- a/examples/expired-order-monitor-example.ts +++ b/examples/expired-order-monitor-example.ts @@ -1,36 +1,36 @@ -import { BlockFrostAPI } from '@blockfrost/blockfrost-js'; -import { Network } from '@minswap/lucid-cardano'; +import { BlockFrostAPI } from "@blockfrost/blockfrost-js"; +import { Network } from "@minswap/lucid-cardano"; -import { BlockfrostAdapter, NetworkId } from '../src'; -import { ExpiredOrderMonitor } from '../src/expired-order-monitor'; -import { getBackendLucidInstance } from '../src/utils/lucid'; +import { BlockfrostAdapter, NetworkId } from "../src"; +import { ExpiredOrderMonitor } from "../src/expired-order-monitor"; +import { getBackendLucidInstance } from "../src/utils/lucid"; async function main(): Promise { - const network: Network = 'Preprod'; - const blockfrostProjectId = ''; - const blockfrostUrl = 'https://cardano-preprod.blockfrost.io/api/v0'; + const network: Network = "Preprod"; + const blockfrostProjectId = ""; + const blockfrostUrl = "https://cardano-preprod.blockfrost.io/api/v0"; const address = - 'addr_test1qqf2dhk96l2kq4xh2fkhwksv0h49vy9exw383eshppn863jereuqgh2zwxsedytve5gp9any9jwc5hz98sd47rwfv40stc26fr'; + "addr_test1qqf2dhk96l2kq4xh2fkhwksv0h49vy9exw383eshppn863jereuqgh2zwxsedytve5gp9any9jwc5hz98sd47rwfv40stc26fr"; const lucid = await getBackendLucidInstance( network, blockfrostProjectId, blockfrostUrl, - address, + address ); const blockfrostAdapter = new BlockfrostAdapter( NetworkId.TESTNET, new BlockFrostAPI({ projectId: blockfrostProjectId, - network: 'preprod', - }), + network: "preprod", + }) ); const monitor = new ExpiredOrderMonitor({ lucid, blockfrostAdapter, - privateKey: '', + privateKey: "", }); await monitor.start(); diff --git a/examples/lbe-v2-worker-example.ts b/examples/lbe-v2-worker-example.ts index b2507f1..5681f17 100644 --- a/examples/lbe-v2-worker-example.ts +++ b/examples/lbe-v2-worker-example.ts @@ -1,31 +1,31 @@ -import { BlockFrostAPI } from '@blockfrost/blockfrost-js'; -import { Network } from '@minswap/lucid-cardano'; +import { BlockFrostAPI } from "@blockfrost/blockfrost-js"; +import { Network } from "@minswap/lucid-cardano"; -import { BlockfrostAdapter, NetworkId } from '../src'; -import { LbeV2Worker } from '../src/lbe-v2-worker/worker'; -import { NetworkEnvironment } from '../src/types/network'; -import { getBackendLucidInstance } from '../src/utils/lucid'; +import { BlockfrostAdapter, NetworkId } from "../src"; +import { LbeV2Worker } from "../src/lbe-v2-worker/worker"; +import { NetworkEnvironment } from "../src/types/network"; +import { getBackendLucidInstance } from "../src/utils/lucid"; async function main(): Promise { - const network: Network = 'Preprod'; - const blockfrostProjectId = ''; - const blockfrostUrl = 'https://cardano-preprod.blockfrost.io/api/v0'; + const network: Network = "Preprod"; + const blockfrostProjectId = ""; + const blockfrostUrl = "https://cardano-preprod.blockfrost.io/api/v0"; const address = - 'addr_test1vrd9v47japxwp8540vsrh4grz4u9urfpfawwy7sf6r0vxqgm7wdxh'; + "addr_test1vrd9v47japxwp8540vsrh4grz4u9urfpfawwy7sf6r0vxqgm7wdxh"; const lucid = await getBackendLucidInstance( network, blockfrostProjectId, blockfrostUrl, - address, + address ); const blockfrostAdapter = new BlockfrostAdapter( NetworkId.TESTNET, new BlockFrostAPI({ projectId: blockfrostProjectId, - network: 'preprod', - }), + network: "preprod", + }) ); const worker = new LbeV2Worker({ @@ -33,7 +33,7 @@ async function main(): Promise { networkId: NetworkId.TESTNET, lucid, blockfrostAdapter, - privateKey: '', + privateKey: "", }); await worker.start(); diff --git a/examples/maestro-adapter-example.ts b/examples/maestro-adapter-example.ts index f104ef7..8f96a08 100644 --- a/examples/maestro-adapter-example.ts +++ b/examples/maestro-adapter-example.ts @@ -1,29 +1,29 @@ -import { Address, Lucid, Network, TxComplete } from '@minswap/lucid-cardano'; -import { Asset, NetworkId, PoolV2 } from '../src'; -import { getBackendMasestroLucidInstance } from '../src/utils/lucid'; -import { LbeV2 } from '../src/lbe-v2/lbe-v2'; -import { MaestroAdapter } from '../src/adapters/maestro'; -import { MaestroClient, Configuration } from '@maestro-org/typescript-sdk'; -import invariant from '@minswap/tiny-invariant'; +import { Address, Lucid, Network, TxComplete } from "@minswap/lucid-cardano"; +import { Asset, NetworkId, PoolV2 } from "../src"; +import { getBackendMasestroLucidInstance } from "../src/utils/lucid"; +import { LbeV2 } from "../src/lbe-v2/lbe-v2"; +import { MaestroAdapter } from "../src/adapters/maestro"; +import { MaestroClient, Configuration } from "@maestro-org/typescript-sdk"; +import invariant from "@minswap/tiny-invariant"; async function main(): Promise { - const cardanoNetwork: Network = 'Preprod'; - const maestroApiKey = ''; + const cardanoNetwork: Network = "Preprod"; + const maestroApiKey = ""; const address = - 'addr_test1qqf2dhk96l2kq4xh2fkhwksv0h49vy9exw383eshppn863jereuqgh2zwxsedytve5gp9any9jwc5hz98sd47rwfv40stc26fr'; + "addr_test1qqf2dhk96l2kq4xh2fkhwksv0h49vy9exw383eshppn863jereuqgh2zwxsedytve5gp9any9jwc5hz98sd47rwfv40stc26fr"; const lucid = await getBackendMasestroLucidInstance( cardanoNetwork, maestroApiKey, - address, + address ); const maestroClient = new MaestroClient( new Configuration({ apiKey: maestroApiKey, network: cardanoNetwork, - }), + }) ); const maestroAdapter = new MaestroAdapter(NetworkId.TESTNET, maestroClient); @@ -31,10 +31,10 @@ async function main(): Promise { const txComplete = await _lbeV2DepositOrderExample( lucid, address, - maestroAdapter, + maestroAdapter ); const signedTx = await txComplete - .signWithPrivateKey('') + .signWithPrivateKey("") .complete(); const txId = await signedTx.submit(); @@ -45,12 +45,12 @@ async function main(): Promise { async function _lbeV2DepositOrderExample( lucid: Lucid, address: Address, - maestroAdapter: MaestroAdapter, + maestroAdapter: MaestroAdapter ): Promise { const baseAsset = Asset.fromString( - 'e16c2dc8ae937e8d3790c7fd7168d7b994621ba14ca11415f39fed7243414b45', + "e16c2dc8ae937e8d3790c7fd7168d7b994621ba14ca11415f39fed7243414b45" ); - const raiseAsset = Asset.fromString('lovelace'); + const raiseAsset = Asset.fromString("lovelace"); const lbeId = PoolV2.computeLPAssetName(baseAsset, raiseAsset); const treasury = await maestroAdapter.getLbeV2TreasuryByLbeId(lbeId); @@ -58,18 +58,18 @@ async function _lbeV2DepositOrderExample( const treasuryUtxos = await lucid.utxosByOutRef([ { txHash: treasury.txIn.txHash, outputIndex: treasury.txIn.index }, ]); - invariant(treasuryUtxos.length === 1, 'Can not find treasury Utxo'); + invariant(treasuryUtxos.length === 1, "Can not find treasury Utxo"); const seller = await maestroAdapter.getLbeV2SellerByLbeId(lbeId); invariant(seller !== null, `Can not find seller by lbeId ${lbeId}`); const sellerUtxos = await lucid.utxosByOutRef([ { txHash: seller.txIn.txHash, outputIndex: seller.txIn.index }, ]); - invariant(sellerUtxos.length === 1, 'Can not find seller Utxo'); + invariant(sellerUtxos.length === 1, "Can not find seller Utxo"); const orders = await maestroAdapter.getLbeV2OrdersByLbeIdAndOwner( lbeId, - address, + address ); const orderUtxos = orders.length > 0 @@ -77,13 +77,13 @@ async function _lbeV2DepositOrderExample( orders.map((o) => ({ txHash: o.txIn.txHash, outputIndex: o.txIn.index, - })), + })) ) : []; invariant( orderUtxos.length === orders.length, - 'Can not find enough order Utxos', + "Can not find enough order Utxos" ); const currentSlot = await maestroAdapter.currentSlot(); @@ -93,7 +93,7 @@ async function _lbeV2DepositOrderExample( treasuryUtxo: treasuryUtxos[0], sellerUtxo: sellerUtxos[0], owner: address, - action: { type: 'deposit', additionalAmount: 1_000_000n }, + action: { type: "deposit", additionalAmount: 1_000_000n }, }); } diff --git a/src/calculate.ts b/src/calculate.ts index c4ca5a6..7db51c4 100644 --- a/src/calculate.ts +++ b/src/calculate.ts @@ -1,11 +1,11 @@ -import { UTxO } from '@minswap/lucid-cardano'; -import invariant from '@minswap/tiny-invariant'; -import Big from 'big.js'; -import { zipWith } from 'remeda'; +import { UTxO } from "@minswap/lucid-cardano"; +import invariant from "@minswap/tiny-invariant"; +import Big from "big.js"; +import { zipWith } from "remeda"; -import { OrderV2 } from './types/order'; -import { PoolV2 } from './types/pool'; -import { sqrt } from './utils/sqrt.internal'; +import { OrderV2 } from "./types/order"; +import { PoolV2 } from "./types/pool"; +import { sqrt } from "./utils/sqrt.internal"; /** * Options to calculate Amount Out & Price Impact while swapping exact in @@ -191,7 +191,7 @@ export function calculateZapIn(options: CalculateZapInOptions): bigint { const { amountIn, reserveIn, reserveOut, totalLiquidity } = options; const swapAmountIn = (sqrt( - 1997n ** 2n * reserveIn ** 2n + 4n * 997n * 1000n * amountIn * reserveIn, + 1997n ** 2n * reserveIn ** 2n + 4n * 997n * 1000n * amountIn * reserveIn ) - 1997n * reserveIn) / (2n * 997n); @@ -321,7 +321,7 @@ export namespace DexV2Calculation { tradingFeeNumerator, }: CalculateAmountInOptions): bigint { if (amountOut >= reserveOut) { - throw new Error('Amount Out must be less than Reserve Out'); + throw new Error("Amount Out must be less than Reserve Out"); } const diff = PoolV2.DEFAULT_TRADING_FEE_DENOMINATOR - tradingFeeNumerator; const numerator = @@ -406,7 +406,7 @@ export namespace DexV2Calculation { const a = bigIntPow(x) * bigIntPow( - 2n * PoolV2.DEFAULT_TRADING_FEE_DENOMINATOR - tradingFeeNumerator, + 2n * PoolV2.DEFAULT_TRADING_FEE_DENOMINATOR - tradingFeeNumerator ) - y * PoolV2.DEFAULT_TRADING_FEE_DENOMINATOR * @@ -481,7 +481,7 @@ export namespace StableswapCalculation { export function getD(mulBalances: bigint[], amp: bigint): bigint { const sumMulBalances = mulBalances.reduce( (sum, balance) => sum + balance, - 0n, + 0n ); if (sumMulBalances === 0n) { return 0n; @@ -519,11 +519,11 @@ export namespace StableswapCalculation { j: number, x: bigint, xp: bigint[], - amp: bigint, + amp: bigint ): bigint { if (i === j || i < 0 || j < 0 || i >= xp.length || j >= xp.length) { throw Error( - `getY failed: i and j must be different and less than length of xp`, + `getY failed: i and j must be different and less than length of xp` ); } const length = BigInt(xp.length); @@ -569,12 +569,12 @@ export namespace StableswapCalculation { i: number, xp: bigint[], amp: bigint, - d: bigint, + d: bigint ): bigint { const length = BigInt(xp.length); invariant( 0 <= i && i < xp.length, - `getYD failed: i must be less than length of xp`, + `getYD failed: i must be less than length of xp` ); let c = d; let s = 0n; @@ -613,7 +613,7 @@ export namespace StableswapCalculation { export function getDMem( balances: bigint[], multiples: bigint[], - amp: bigint, + amp: bigint ): bigint { const mulBalances = zipWith(balances, multiples, (a, b) => a * b); return getD(mulBalances, amp); @@ -652,7 +652,7 @@ export namespace StableswapCalculation { export type StableswapCalculateWithdrawOptions = Omit< CommonStableswapCalculationOptions, - 'amp' | 'fee' | 'adminFee' | 'feeDenominator' + "amp" | "fee" | "adminFee" | "feeDenominator" > & { withdrawalLPAmount: bigint; totalLiquidity: bigint; @@ -697,19 +697,19 @@ export namespace StableswapCalculation { const length = multiples.length; invariant( amountIn > 0, - `calculateExchange error: amountIn ${amountIn} must be positive.`, + `calculateExchange error: amountIn ${amountIn} must be positive.` ); invariant( 0 <= inIndex && inIndex < length, `calculateExchange error: inIndex ${inIndex} is not valid, must be within 0-${ length - 1 - }`, + }` ); invariant( 0 <= outIndex && outIndex < length, `calculateExchange error: outIndex ${outIndex} is not valid, must be within 0-${ length - 1 - }`, + }` ); invariant(inIndex !== outIndex, `inIndex must be different from outIndex`); const mulBalances = zipWith(tempDatumBalances, multiples, (a, b) => a * b); @@ -726,11 +726,11 @@ export namespace StableswapCalculation { invariant( amountOut > 0, - `calculateExchange error: amountIn is too small, amountOut (${amountOut}) must be positive.`, + `calculateExchange error: amountIn is too small, amountOut (${amountOut}) must be positive.` ); invariant( newDatumBalanceOut > 0, - `calculateExchange error: newDatumBalanceOut (${newDatumBalanceOut}) must be positive.`, + `calculateExchange error: newDatumBalanceOut (${newDatumBalanceOut}) must be positive.` ); return amountOut; } @@ -753,7 +753,7 @@ export namespace StableswapCalculation { const length = multiples.length; invariant( amountIns.length === length, - `calculateDeposit error: amountIns's length ${amountIns.length} is invalid, amountIns's length must be ${length}`, + `calculateDeposit error: amountIns's length ${amountIns.length} is invalid, amountIns's length must be ${length}` ); let newDatumBalances: bigint[] = []; @@ -762,14 +762,14 @@ export namespace StableswapCalculation { for (let i = 0; i < length; ++i) { invariant( amountIns[i] > 0n, - `calculateDeposit error: amount index ${i} must be positive in case totalLiquidity = 0`, + `calculateDeposit error: amount index ${i} must be positive in case totalLiquidity = 0` ); } newDatumBalances = zipWith(tempDatumBalances, amountIns, (a, b) => a + b); const d1 = getDMem(newDatumBalances, multiples, amp); invariant( d1 > 0, - `calculateDeposit: d1 must be greater than 0 in case totalLiquidity = 0`, + `calculateDeposit: d1 must be greater than 0 in case totalLiquidity = 0` ); lpAmount = d1; } else { @@ -778,20 +778,20 @@ export namespace StableswapCalculation { if (amountIns[i] < 0n) { invariant( amountIns[i] > 0n, - `calculateDeposit error: amountIns index ${i} must be non-negative`, + `calculateDeposit error: amountIns index ${i} must be non-negative` ); } sumIns += amountIns[i]; } invariant( sumIns > 0, - `calculateDeposit error: sum of amountIns must be positive`, + `calculateDeposit error: sum of amountIns must be positive` ); const newDatumBalanceWithoutFee = zipWith( tempDatumBalances, amountIns, - (a, b) => a + b, + (a, b) => a + b ); const d0 = getDMem(tempDatumBalances, multiples, amp); @@ -799,7 +799,7 @@ export namespace StableswapCalculation { invariant( d1 > d0, - `calculateDeposit: d1 must be greater than d0 in case totalLiquidity > 0, d1: ${d1}, d0: ${d0}`, + `calculateDeposit: d1 must be greater than d0 in case totalLiquidity > 0, d1: ${d1}, d0: ${d0}` ); const specialFee = (fee * BigInt(length)) / (4n * (BigInt(length) - 1n)); @@ -825,7 +825,7 @@ export namespace StableswapCalculation { for (let i = 0; i < length; ++i) { invariant( newDatBalancesWithTradingFee[i] > 0, - `calculateDeposit error: deposit amount is too small, newDatBalancesWithTradingFee must be positive`, + `calculateDeposit error: deposit amount is too small, newDatBalancesWithTradingFee must be positive` ); } const d2 = getDMem(newDatBalancesWithTradingFee, multiples, amp); @@ -834,7 +834,7 @@ export namespace StableswapCalculation { invariant( lpAmount > 0, - `calculateDeposit error: deposit amount is too small, lpAmountOut ${lpAmount} must be positive`, + `calculateDeposit error: deposit amount is too small, lpAmountOut ${lpAmount} must be positive` ); return lpAmount; } @@ -853,22 +853,22 @@ export namespace StableswapCalculation { const length = multiples.length; invariant( withdrawalLPAmount > 0, - `calculateWithdraw error: withdrawalLPAmount must be positive`, + `calculateWithdraw error: withdrawalLPAmount must be positive` ); const amountOuts = tempDatumBalances.map( - (balance) => (balance * withdrawalLPAmount) / totalLiquidity, + (balance) => (balance * withdrawalLPAmount) / totalLiquidity ); let sumOuts = 0n; for (let i = 0; i < length; ++i) { invariant( amountOuts[i] >= 0n, - `calculateWithdraw error: amountOuts must be non-negative`, + `calculateWithdraw error: amountOuts must be non-negative` ); sumOuts += amountOuts[i]; } invariant( sumOuts > 0n, - `calculateWithdraw error: sum of amountOuts must be positive`, + `calculateWithdraw error: sum of amountOuts must be positive` ); return amountOuts; @@ -892,21 +892,21 @@ export namespace StableswapCalculation { invariant( withdrawAmounts.length === length, - `calculateWithdrawImbalance error: withdrawAmounts's length ${withdrawAmounts.length} is invalid, withdrawAmounts's length must be ${length}`, + `calculateWithdrawImbalance error: withdrawAmounts's length ${withdrawAmounts.length} is invalid, withdrawAmounts's length must be ${length}` ); let sumOuts = 0n; for (let i = 0; i < length; ++i) { invariant( withdrawAmounts[i] >= 0n, - `calculateDeposit error: amountIns must be non-negative`, + `calculateDeposit error: amountIns must be non-negative` ); sumOuts += withdrawAmounts[i]; } invariant( sumOuts > 0n, - `calculateWithdrawImbalance error: sum of withdrawAmounts must be positive`, + `calculateWithdrawImbalance error: sum of withdrawAmounts must be positive` ); const specialFee = (fee * BigInt(length)) / (4n * (BigInt(length) - 1n)); @@ -914,12 +914,12 @@ export namespace StableswapCalculation { const newDatBalancesWithoutFee = zipWith( tempDatumBalances, withdrawAmounts, - (a, b) => a - b, + (a, b) => a - b ); for (let i = 0; i < length; ++i) { invariant( newDatBalancesWithoutFee[i] > 0n, - `calculateWithdrawImbalance error: not enough asset index ${i}`, + `calculateWithdrawImbalance error: not enough asset index ${i}` ); } const d0 = getDMem(tempDatumBalances, multiples, amp); @@ -936,13 +936,13 @@ export namespace StableswapCalculation { } const tradingFeeAmount = (specialFee * different) / feeDenominator; newDatBalancesWithTradingFee.push( - newDatBalancesWithoutFee[i] - tradingFeeAmount, + newDatBalancesWithoutFee[i] - tradingFeeAmount ); } for (let i = 0; i < length; ++i) { invariant( newDatBalancesWithTradingFee[i] > 0n, - `calculateWithdrawImbalance error: not enough asset index ${i}`, + `calculateWithdrawImbalance error: not enough asset index ${i}` ); } @@ -951,7 +951,7 @@ export namespace StableswapCalculation { invariant( lpAmount > 0n, - `calculateWithdrawImbalance error: required lpAmount ${lpAmount} must be positive`, + `calculateWithdrawImbalance error: required lpAmount ${lpAmount} must be positive` ); lpAmount += 1n; @@ -977,14 +977,14 @@ export namespace StableswapCalculation { const length = multiples.length; invariant( amountLpIn > 0, - `calculateZapOut error: amountLpIn ${amountLpIn} must be positive.`, + `calculateZapOut error: amountLpIn ${amountLpIn} must be positive.` ); invariant( 0 <= outIndex && outIndex < length, `calculateZapOut error: outIndex ${outIndex} is not valid, must be within 0-${ length - 1 - }`, + }` ); const mulBalances = zipWith(tempDatumBalances, multiples, (a, b) => a * b); @@ -1018,7 +1018,7 @@ export namespace StableswapCalculation { multiples: bigint[], amp: bigint, assetAIndex: number, - assetBIndex: number, + assetBIndex: number ): [bigint, bigint] { const mulBalances = zipWith(balances, multiples, (a, b) => a * b); const length = BigInt(mulBalances.length); diff --git a/src/dex-v2.ts b/src/dex-v2.ts index 1d4a0c4..c30dff1 100644 --- a/src/dex-v2.ts +++ b/src/dex-v2.ts @@ -10,8 +10,8 @@ import { TxComplete, UnixTime, UTxO, -} from '@minswap/lucid-cardano'; -import invariant from '@minswap/tiny-invariant'; +} from "@minswap/lucid-cardano"; +import invariant from "@minswap/tiny-invariant"; import { Asset, @@ -22,14 +22,14 @@ import { MetadataMessage, OrderV2, PoolV2, -} from '.'; -import { BlockfrostAdapter } from './adapters/blockfrost'; -import { BatcherFee } from './batcher-fee-reduction/calculate'; -import { DexVersion } from './batcher-fee-reduction/configs.internal'; -import { FactoryV2 } from './types/factory'; -import { NetworkEnvironment, NetworkId } from './types/network'; -import { lucidToNetworkEnv } from './utils/network.internal'; -import { buildUtxoToStoreDatum } from './utils/tx.internal'; +} from "."; +import { BlockfrostAdapter } from "./adapters/blockfrost"; +import { BatcherFee } from "./batcher-fee-reduction/calculate"; +import { DexVersion } from "./batcher-fee-reduction/configs.internal"; +import { FactoryV2 } from "./types/factory"; +import { NetworkEnvironment, NetworkId } from "./types/network"; +import { lucidToNetworkEnv } from "./utils/network.internal"; +import { buildUtxoToStoreDatum } from "./utils/tx.internal"; export type V2CustomReceiver = { refundReceiver: Address; @@ -208,7 +208,7 @@ export class DexV2 { constructor(lucid: Lucid, adapter: BlockfrostAdapter) { this.lucid = lucid; this.networkId = - lucid.network === 'Mainnet' ? NetworkId.MAINNET : NetworkId.TESTNET; + lucid.network === "Mainnet" ? NetworkId.MAINNET : NetworkId.TESTNET; this.adapter = adapter; this.networkEnv = lucidToNetworkEnv(lucid.network); } @@ -229,11 +229,11 @@ export class DexV2 { const factory = await this.adapter.getFactoryV2ByPair( sortedAssetA, - sortedAssetB, + sortedAssetB ); invariant( factory, - `cannot find available Factory V2 Utxo, the liquidity pool might be created before`, + `cannot find available Factory V2 Utxo, the liquidity pool might be created before` ); const initialLiquidity = DexV2Calculation.calculateInitialLiquidity({ @@ -248,11 +248,11 @@ export class DexV2 { tokenName: lpAssetName, }; const poolBatchingStakeCredential = this.lucid.utils.getAddressDetails( - config.poolBatchingAddress, + config.poolBatchingAddress )?.stakeCredential; invariant( poolBatchingStakeCredential, - `cannot parse Liquidity Pool batching address`, + `cannot parse Liquidity Pool batching address` ); const poolDatum: PoolV2.Datum = { poolBatchingStakeCredential: poolBatchingStakeCredential, @@ -292,13 +292,13 @@ export class DexV2 { ]); invariant( factoryRefs.length === 1, - 'cannot find deployed script for Factory Validator', + "cannot find deployed script for Factory Validator" ); const factoryRef = factoryRefs[0]; const authenRefs = await this.lucid.utxosByOutRef([deployedScripts.authen]); invariant( authenRefs.length === 1, - 'cannot find deployed script for Authen Minting Policy', + "cannot find deployed script for Authen Minting Policy" ); const authenRef = authenRefs[0]; const factoryUtxos = await this.lucid.utxosByOutRef([ @@ -307,7 +307,7 @@ export class DexV2 { outputIndex: factory.txIn.index, }, ]); - invariant(factoryUtxos.length === 1, 'cannot find Utxo of Factory'); + invariant(factoryUtxos.length === 1, "cannot find Utxo of Factory"); const factoryUtxo = factoryUtxos[0]; const factoryRedeemer: FactoryV2.Redeemer = { @@ -329,14 +329,14 @@ export class DexV2 { .readFrom([factoryRef, authenRef]) .collectFrom( [factoryUtxo], - Data.to(FactoryV2.Redeemer.toPlutusData(factoryRedeemer)), + Data.to(FactoryV2.Redeemer.toPlutusData(factoryRedeemer)) ) .payToContract( config.poolCreationAddress, { inline: Data.to(PoolV2.Datum.toPlutusData(poolDatum)), }, - poolValue, + poolValue ) .payToContract( config.factoryAddress, @@ -345,7 +345,7 @@ export class DexV2 { }, { [config.factoryAsset]: 1n, - }, + } ) .payToContract( config.factoryAddress, @@ -354,7 +354,7 @@ export class DexV2 { }, { [config.factoryAsset]: 1n, - }, + } ) .mintAssets( { @@ -362,7 +362,7 @@ export class DexV2 { [config.factoryAsset]: 1n, [config.poolAuthenAsset]: 1n, }, - Data.to(new Constr(1, [])), + Data.to(new Constr(1, [])) ) .attachMetadata(674, { msg: [MetadataMessage.CREATE_POOL] }) .complete(); @@ -375,11 +375,11 @@ export class DexV2 { const { assetA, assetB, amountA, amountB, minimumLPReceived } = options; invariant( amountA >= 0n && amountB >= 0n && amountA + amountB > 0n, - 'amount must be positive', + "amount must be positive" ); invariant( minimumLPReceived > 0n, - 'minimum LP received must be positive', + "minimum LP received must be positive" ); orderAssets[Asset.toString(assetA)] = amountA; orderAssets[Asset.toString(assetB)] = amountB; @@ -392,59 +392,59 @@ export class DexV2 { minimumAssetAReceived, minimumAssetBReceived, } = options; - invariant(lpAmount > 0n, 'LP amount must be positive'); + invariant(lpAmount > 0n, "LP amount must be positive"); invariant( minimumAssetAReceived > 0n && minimumAssetBReceived > 0n, - 'minimum asset received must be positive', + "minimum asset received must be positive" ); orderAssets[Asset.toString(lpAsset)] = lpAmount; break; } case OrderV2.StepType.SWAP_EXACT_IN: { const { assetIn, amountIn, minimumAmountOut } = options; - invariant(amountIn > 0n, 'amount in must be positive'); - invariant(minimumAmountOut > 0n, 'minimum amount out must be positive'); + invariant(amountIn > 0n, "amount in must be positive"); + invariant(minimumAmountOut > 0n, "minimum amount out must be positive"); orderAssets[Asset.toString(assetIn)] = amountIn; break; } case OrderV2.StepType.SWAP_EXACT_OUT: { const { assetIn, maximumAmountIn, expectedReceived } = options; - invariant(maximumAmountIn > 0n, 'amount in must be positive'); - invariant(expectedReceived > 0n, 'minimum amount out must be positive'); + invariant(maximumAmountIn > 0n, "amount in must be positive"); + invariant(expectedReceived > 0n, "minimum amount out must be positive"); orderAssets[Asset.toString(assetIn)] = maximumAmountIn; break; } case OrderV2.StepType.STOP: { const { assetIn, amountIn, stopAmount } = options; - invariant(amountIn > 0n, 'amount in must be positive'); - invariant(stopAmount > 0n, 'stop amount out must be positive'); + invariant(amountIn > 0n, "amount in must be positive"); + invariant(stopAmount > 0n, "stop amount out must be positive"); orderAssets[Asset.toString(assetIn)] = amountIn; break; } case OrderV2.StepType.OCO: { const { assetIn, amountIn, stopAmount, limitAmount } = options; - invariant(amountIn > 0n, 'amount in must be positive'); - invariant(stopAmount > 0n, 'stop amount out must be positive'); - invariant(limitAmount > 0n, 'limit amount out must be positive'); + invariant(amountIn > 0n, "amount in must be positive"); + invariant(stopAmount > 0n, "stop amount out must be positive"); + invariant(limitAmount > 0n, "limit amount out must be positive"); orderAssets[Asset.toString(assetIn)] = amountIn; break; } case OrderV2.StepType.ZAP_OUT: { const { lpAsset, lpAmount, minimumReceived } = options; - invariant(lpAmount > 0n, 'lp amount in must be positive'); - invariant(minimumReceived > 0n, 'minimum amount out must be positive'); + invariant(lpAmount > 0n, "lp amount in must be positive"); + invariant(minimumReceived > 0n, "minimum amount out must be positive"); orderAssets[Asset.toString(lpAsset)] = lpAmount; break; } case OrderV2.StepType.PARTIAL_SWAP: { const { assetIn, amountIn, expectedInOutRatio } = options; - invariant(amountIn > 0n, 'amount in must be positive'); + invariant(amountIn > 0n, "amount in must be positive"); const [expectedInOutRatioNumerator, expectedInOutRatioDenominator] = expectedInOutRatio; invariant( expectedInOutRatioNumerator > 0n && expectedInOutRatioDenominator > 0n, - 'expected input and output ratio must be positive', + "expected input and output ratio must be positive" ); orderAssets[Asset.toString(assetIn)] = amountIn; break; @@ -452,25 +452,25 @@ export class DexV2 { case OrderV2.StepType.WITHDRAW_IMBALANCE: { const { lpAsset, lpAmount, ratioAssetA, ratioAssetB, minimumAssetA } = options; - invariant(lpAmount > 0n, 'LP amount must be positive'); + invariant(lpAmount > 0n, "LP amount must be positive"); invariant( ratioAssetA > 0n && ratioAssetB > 0n && minimumAssetA > 0n, - 'minimum asset and ratio received must be positive', + "minimum asset and ratio received must be positive" ); orderAssets[Asset.toString(lpAsset)] = lpAmount; break; } case OrderV2.StepType.SWAP_ROUTING: { const { assetIn, amountIn } = options; - invariant(amountIn > 0n, 'Amount must be positive'); + invariant(amountIn > 0n, "Amount must be positive"); orderAssets[Asset.toString(assetIn)] = amountIn; break; } } - if ('lovelace' in orderAssets) { - orderAssets['lovelace'] += FIXED_DEPOSIT_ADA; + if ("lovelace" in orderAssets) { + orderAssets["lovelace"] += FIXED_DEPOSIT_ADA; } else { - orderAssets['lovelace'] = FIXED_DEPOSIT_ADA; + orderAssets["lovelace"] = FIXED_DEPOSIT_ADA; } return orderAssets; } @@ -481,11 +481,11 @@ export class DexV2 { const { amountA, amountB, minimumLPReceived, killOnFailed } = options; invariant( amountA >= 0n && amountB >= 0n && amountA + amountB > 0n, - 'amount must be positive', + "amount must be positive" ); invariant( minimumLPReceived > 0n, - 'minimum LP received must be positive', + "minimum LP received must be positive" ); const orderStep: OrderV2.Step = { type: OrderV2.StepType.DEPOSIT, @@ -508,10 +508,10 @@ export class DexV2 { minimumAssetBReceived, killOnFailed, } = options; - invariant(lpAmount > 0n, 'LP amount must be positive'); + invariant(lpAmount > 0n, "LP amount must be positive"); invariant( minimumAssetAReceived > 0n && minimumAssetBReceived > 0n, - 'minimum asset received must be positive', + "minimum asset received must be positive" ); const orderStep: OrderV2.Step = { type: OrderV2.StepType.WITHDRAW, @@ -529,8 +529,8 @@ export class DexV2 { } case OrderV2.StepType.SWAP_EXACT_IN: { const { amountIn, direction, minimumAmountOut, killOnFailed } = options; - invariant(amountIn > 0n, 'amount in must be positive'); - invariant(minimumAmountOut > 0n, 'minimum amount out must be positive'); + invariant(amountIn > 0n, "amount in must be positive"); + invariant(minimumAmountOut > 0n, "minimum amount out must be positive"); const orderStep: OrderV2.Step = { type: OrderV2.StepType.SWAP_EXACT_IN, direction: direction, @@ -548,8 +548,8 @@ export class DexV2 { case OrderV2.StepType.SWAP_EXACT_OUT: { const { maximumAmountIn, expectedReceived, direction, killOnFailed } = options; - invariant(maximumAmountIn > 0n, 'amount in must be positive'); - invariant(expectedReceived > 0n, 'minimum amount out must be positive'); + invariant(maximumAmountIn > 0n, "amount in must be positive"); + invariant(expectedReceived > 0n, "minimum amount out must be positive"); const orderStep: OrderV2.Step = { type: OrderV2.StepType.SWAP_EXACT_OUT, direction: direction, @@ -566,8 +566,8 @@ export class DexV2 { } case OrderV2.StepType.STOP: { const { amountIn, direction, stopAmount } = options; - invariant(amountIn > 0n, 'amount in must be positive'); - invariant(stopAmount > 0n, 'stop amount out must be positive'); + invariant(amountIn > 0n, "amount in must be positive"); + invariant(stopAmount > 0n, "stop amount out must be positive"); const orderStep: OrderV2.Step = { type: OrderV2.StepType.STOP, direction: direction, @@ -581,9 +581,9 @@ export class DexV2 { } case OrderV2.StepType.OCO: { const { amountIn, direction, stopAmount, limitAmount } = options; - invariant(amountIn > 0n, 'amount in must be positive'); - invariant(stopAmount > 0n, 'stop amount out must be positive'); - invariant(limitAmount > 0n, 'limit amount out must be positive'); + invariant(amountIn > 0n, "amount in must be positive"); + invariant(stopAmount > 0n, "stop amount out must be positive"); + invariant(limitAmount > 0n, "limit amount out must be positive"); const orderStep: OrderV2.Step = { type: OrderV2.StepType.OCO, direction: direction, @@ -598,8 +598,8 @@ export class DexV2 { } case OrderV2.StepType.ZAP_OUT: { const { lpAmount, minimumReceived, direction, killOnFailed } = options; - invariant(lpAmount > 0n, 'lp amount in must be positive'); - invariant(minimumReceived > 0n, 'minimum amount out must be positive'); + invariant(lpAmount > 0n, "lp amount in must be positive"); + invariant(minimumReceived > 0n, "minimum amount out must be positive"); const orderStep: OrderV2.Step = { type: OrderV2.StepType.ZAP_OUT, direction: direction, @@ -622,13 +622,13 @@ export class DexV2 { maximumSwapTime, minimumSwapAmountRequired, } = options; - invariant(amountIn > 0n, 'amount in must be positive'); + invariant(amountIn > 0n, "amount in must be positive"); const [expectedInOutRatioNumerator, expectedInOutRatioDenominator] = expectedInOutRatio; invariant( expectedInOutRatioNumerator > 0n && expectedInOutRatioDenominator > 0n, - 'expected input and output ratio must be positive', + "expected input and output ratio must be positive" ); const orderStep: OrderV2.Step = { type: OrderV2.StepType.PARTIAL_SWAP, @@ -650,10 +650,10 @@ export class DexV2 { minimumAssetA, killOnFailed, } = options; - invariant(lpAmount > 0n, 'LP amount must be positive'); + invariant(lpAmount > 0n, "LP amount must be positive"); invariant( ratioAssetA > 0n && ratioAssetB > 0n && minimumAssetA > 0n, - 'minimum asset and ratio received must be positive', + "minimum asset and ratio received must be positive" ); const orderStep: OrderV2.Step = { type: OrderV2.StepType.WITHDRAW_IMBALANCE, @@ -672,7 +672,7 @@ export class DexV2 { } case OrderV2.StepType.SWAP_ROUTING: { const { amountIn, routings, minimumReceived } = options; - invariant(amountIn > 0n, 'Amount must be positive'); + invariant(amountIn > 0n, "Amount must be positive"); const orderStep: OrderV2.Step = { type: OrderV2.StepType.SWAP_ROUTING, routings: routings, @@ -694,11 +694,11 @@ export class DexV2 { this.lucid.utils.getAddressDetails(orderAddress).paymentCredential; invariant( orderAddressPaymentCred, - 'order address payment credentials not found', + "order address payment credentials not found" ); return this.lucid.utils.credentialToAddress( orderAddressPaymentCred, - senderAddressStakeCred, + senderAddressStakeCred ); } @@ -795,17 +795,17 @@ export class DexV2 { } else { totalBatcherFee = batcherFee; } - if ('lovelace' in orderAssets) { - orderAssets['lovelace'] += totalBatcherFee; + if ("lovelace" in orderAssets) { + orderAssets["lovelace"] += totalBatcherFee; } else { - orderAssets['lovelace'] = totalBatcherFee; + orderAssets["lovelace"] = totalBatcherFee; } const senderPaymentCred = this.lucid.utils.getAddressDetails(sender).paymentCredential; invariant( senderPaymentCred, - 'sender address payment credentials not found', + "sender address payment credentials not found" ); const canceller = authorizationMethodType @@ -841,7 +841,7 @@ export class DexV2 { }; } else { const datumHash = this.lucid.utils.datumToHash( - customSuccessReceiverDatum.datum, + customSuccessReceiverDatum.datum ); successReceiverDatum = { type: customSuccessReceiverDatum.type, @@ -858,7 +858,7 @@ export class DexV2 { }; } else { const datumHash = this.lucid.utils.datumToHash( - customRefundReceiverDatum.datum, + customRefundReceiverDatum.datum ); refundReceiverDatum = { type: customRefundReceiverDatum.type, @@ -895,7 +895,7 @@ export class DexV2 { { inline: Data.to(OrderV2.Datum.toPlutusData(orderDatum)), }, - orderAssets, + orderAssets ); } @@ -920,13 +920,13 @@ export class DexV2 { this.lucid, sender, necessaryExtraDatum.receiver, - necessaryExtraDatum.datum, + necessaryExtraDatum.datum ); if (utxoForStoringDatum) { lucidTx.payToAddressWithData( utxoForStoringDatum.address, utxoForStoringDatum.outputData, - utxoForStoringDatum.assets, + utxoForStoringDatum.assets ); } } @@ -939,7 +939,7 @@ export class DexV2 { }: CancelBulkOrdersOptions): Promise { const orderUtxos = await this.lucid.utxosByOutRef(orderOutRefs); if (orderUtxos.length === 0) { - throw new Error('Order Utxos are empty'); + throw new Error("Order Utxos are empty"); } const requiredPubKeyHashSet = new Set(); const orderRefs = await this.lucid.utxosByOutRef([ @@ -947,7 +947,7 @@ export class DexV2 { ]); invariant( orderRefs.length === 1, - 'cannot find deployed script for V2 Order', + "cannot find deployed script for V2 Order" ); const orderRef = orderRefs[0]; @@ -957,27 +957,27 @@ export class DexV2 { const orderScriptPaymentCred = this.lucid.utils.getAddressDetails(orderAddr).paymentCredential; invariant( - orderScriptPaymentCred?.type === 'Script' && + orderScriptPaymentCred?.type === "Script" && orderScriptPaymentCred.hash === DexV2Constant.CONFIG[this.networkId].orderScriptHash, - `Utxo is not belonged Minswap's order address, utxo: ${utxo.txHash}`, + `Utxo is not belonged Minswap's order address, utxo: ${utxo.txHash}` ); let datum: OrderV2.Datum; if (utxo.datum) { const rawDatum = utxo.datum; datum = OrderV2.Datum.fromPlutusData( this.networkId, - Data.from(rawDatum), + Data.from(rawDatum) ); } else if (utxo.datumHash) { const rawDatum = await this.lucid.datumOf(utxo); datum = OrderV2.Datum.fromPlutusData( this.networkId, - rawDatum as Constr, + rawDatum as Constr ); } else { throw new Error( - 'Utxo without Datum Hash or Inline Datum can not be spent', + "Utxo without Datum Hash or Inline Datum can not be spent" ); } @@ -985,7 +985,7 @@ export class DexV2 { requiredPubKeyHashSet.add(datum.canceller.hash); } const redeemer = Data.to( - new Constr(OrderV2.Redeemer.CANCEL_ORDER_BY_OWNER, []), + new Constr(OrderV2.Redeemer.CANCEL_ORDER_BY_OWNER, []) ); lucidTx.collectFrom(orderUtxos, redeemer); @@ -1013,56 +1013,56 @@ export class DexV2 { const currentTime = this.lucid.utils.slotToUnixTime(currentSlot); invariant( refScript.length === 2, - 'cannot find deployed script for V2 Order or Expired Order Cancellation', + "cannot find deployed script for V2 Order or Expired Order Cancellation" ); const sortedOrderUtxos = [...orderUtxos].sort(compareUtxo); const lucidTx = this.lucid.newTx().readFrom(refScript); lucidTx.collectFrom( sortedOrderUtxos, - Data.to(new Constr(OrderV2.Redeemer.CANCEL_EXPIRED_ORDER_BY_ANYONE, [])), + Data.to(new Constr(OrderV2.Redeemer.CANCEL_EXPIRED_ORDER_BY_ANYONE, [])) ); for (const orderUtxo of sortedOrderUtxos) { const orderAddr = orderUtxo.address; const orderScriptPaymentCred = this.lucid.utils.getAddressDetails(orderAddr).paymentCredential; invariant( - orderScriptPaymentCred?.type === 'Script' && + orderScriptPaymentCred?.type === "Script" && orderScriptPaymentCred.hash === DexV2Constant.CONFIG[this.networkId].orderScriptHash, - `Utxo is not belonged Minswap's order address, utxo: ${orderUtxo.txHash}`, + `Utxo is not belonged Minswap's order address, utxo: ${orderUtxo.txHash}` ); let datum: OrderV2.Datum; if (orderUtxo.datum) { const rawDatum = orderUtxo.datum; datum = OrderV2.Datum.fromPlutusData( this.networkId, - Data.from(rawDatum), + Data.from(rawDatum) ); } else if (orderUtxo.datumHash) { const rawDatum = await this.lucid.datumOf(orderUtxo); datum = OrderV2.Datum.fromPlutusData( this.networkId, - rawDatum as Constr, + rawDatum as Constr ); } else { throw new Error( - 'Utxo without Datum Hash or Inline Datum can not be spent', + "Utxo without Datum Hash or Inline Datum can not be spent" ); } const expiryOptions = datum.expiredOptions; - invariant(expiryOptions !== undefined, 'Order must have expiry options'); + invariant(expiryOptions !== undefined, "Order must have expiry options"); invariant( expiryOptions.maxCancellationTip >= DexV2Constant.DEFAULT_CANCEL_TIPS, - 'Cancel tip is too low', + "Cancel tip is too low" ); invariant( expiryOptions.expiredTime < BigInt(currentTime), - 'Order is not expired', + "Order is not expired" ); const refundDatum = datum.refundReceiverDatum; const outAssets = { ...orderUtxo.assets }; - outAssets['lovelace'] -= expiryOptions.maxCancellationTip; + outAssets["lovelace"] -= expiryOptions.maxCancellationTip; switch (refundDatum.type) { case OrderV2.ExtraDatumType.NO_DATUM: { lucidTx.payToAddress(datum.refundReceiver, outAssets); @@ -1074,19 +1074,19 @@ export class DexV2 { refundDatum.hash in extraDatumMap ? { asHash: extraDatumMap[refundDatum.hash] } : { hash: refundDatum.hash }, - outAssets, + outAssets ); break; } case OrderV2.ExtraDatumType.INLINE_DATUM: { invariant( refundDatum.hash in extraDatumMap, - `Can not find refund datum of order ${orderUtxo.txHash}#${orderUtxo.outputIndex}`, + `Can not find refund datum of order ${orderUtxo.txHash}#${orderUtxo.outputIndex}` ); lucidTx.payToAddressWithData( datum.refundReceiver, { inline: extraDatumMap[refundDatum.hash] }, - outAssets, + outAssets ); break; } @@ -1096,7 +1096,7 @@ export class DexV2 { .withdraw( DexV2Constant.CONFIG[this.networkId].expiredOrderCancelAddress, 0n, - Data.to(0n), + Data.to(0n) ) .validFrom(currentTime) .validTo(currentTime + 3 * 60 * 60 * 1000) diff --git a/src/dex.ts b/src/dex.ts index 91bd62f..0314996 100644 --- a/src/dex.ts +++ b/src/dex.ts @@ -7,21 +7,21 @@ import { SpendingValidator, TxComplete, UTxO, -} from '@minswap/lucid-cardano'; -import invariant from '@minswap/tiny-invariant'; +} from "@minswap/lucid-cardano"; +import invariant from "@minswap/tiny-invariant"; -import { BatcherFee } from './batcher-fee-reduction/calculate'; -import { DexVersion } from './batcher-fee-reduction/configs.internal'; -import { Asset } from './types/asset'; +import { BatcherFee } from "./batcher-fee-reduction/calculate"; +import { DexVersion } from "./batcher-fee-reduction/configs.internal"; +import { Asset } from "./types/asset"; import { DexV1Constant, FIXED_DEPOSIT_ADA, MetadataMessage, -} from './types/constants'; -import { NetworkEnvironment, NetworkId } from './types/network'; -import { OrderV1 } from './types/order'; -import { lucidToNetworkEnv } from './utils/network.internal'; -import { buildUtxoToStoreDatum } from './utils/tx.internal'; +} from "./types/constants"; +import { NetworkEnvironment, NetworkId } from "./types/network"; +import { OrderV1 } from "./types/order"; +import { lucidToNetworkEnv } from "./utils/network.internal"; +import { buildUtxoToStoreDatum } from "./utils/tx.internal"; export type V1AndStableswapCustomReceiver = { receiver: Address; @@ -135,12 +135,12 @@ export class Dex { constructor(lucid: Lucid) { this.lucid = lucid; this.networkId = - lucid.network === 'Mainnet' ? NetworkId.MAINNET : NetworkId.TESTNET; + lucid.network === "Mainnet" ? NetworkId.MAINNET : NetworkId.TESTNET; this.networkEnv = lucidToNetworkEnv(lucid.network); } async buildSwapExactInTx( - options: BuildSwapExactInTxOptions, + options: BuildSwapExactInTxOptions ): Promise { const { sender, @@ -152,8 +152,8 @@ export class Dex { isLimitOrder, availableUtxos, } = options; - invariant(amountIn > 0n, 'amount in must be positive'); - invariant(minimumAmountOut > 0n, 'minimum amount out must be positive'); + invariant(amountIn > 0n, "amount in must be positive"); + invariant(minimumAmountOut > 0n, "minimum amount out must be positive"); const orderAssets: Assets = { [Asset.toString(assetIn)]: amountIn }; const { batcherFee, reductionAssets } = BatcherFee.finalizeFee({ utxos: availableUtxos, @@ -162,10 +162,10 @@ export class Dex { networkEnv: this.networkEnv, dexVersion: this.dexVersion, }); - if (orderAssets['lovelace']) { - orderAssets['lovelace'] += FIXED_DEPOSIT_ADA + batcherFee; + if (orderAssets["lovelace"]) { + orderAssets["lovelace"] += FIXED_DEPOSIT_ADA + batcherFee; } else { - orderAssets['lovelace'] = FIXED_DEPOSIT_ADA + batcherFee; + orderAssets["lovelace"] = FIXED_DEPOSIT_ADA + batcherFee; } const datum: OrderV1.Datum = { sender: sender, @@ -184,7 +184,7 @@ export class Dex { .payToContract( DexV1Constant.ORDER_BASE_ADDRESS[this.networkId], Data.to(OrderV1.Datum.toPlutusData(datum)), - orderAssets, + orderAssets ) .addSigner(sender); if (Object.keys(reductionAssets).length !== 0) { @@ -202,13 +202,13 @@ export class Dex { this.lucid, sender, customReceiver.receiver, - customReceiver.receiverDatum.datum, + customReceiver.receiverDatum.datum ); if (utxoForStoringDatum) { tx.payToAddressWithData( utxoForStoringDatum.address, utxoForStoringDatum.outputData, - utxoForStoringDatum.assets, + utxoForStoringDatum.assets ); } } @@ -216,7 +216,7 @@ export class Dex { } async buildSwapExactOutTx( - options: BuildSwapExactOutTxOptions, + options: BuildSwapExactOutTxOptions ): Promise { const { sender, @@ -229,7 +229,7 @@ export class Dex { } = options; invariant( maximumAmountIn > 0n && expectedAmountOut > 0n, - 'amount in and out must be positive', + "amount in and out must be positive" ); const orderAssets: Assets = { [Asset.toString(assetIn)]: maximumAmountIn }; const { batcherFee, reductionAssets } = BatcherFee.finalizeFee({ @@ -239,10 +239,10 @@ export class Dex { dexVersion: this.dexVersion, currentDate: new Date(), }); - if (orderAssets['lovelace']) { - orderAssets['lovelace'] += FIXED_DEPOSIT_ADA + batcherFee; + if (orderAssets["lovelace"]) { + orderAssets["lovelace"] += FIXED_DEPOSIT_ADA + batcherFee; } else { - orderAssets['lovelace'] = FIXED_DEPOSIT_ADA + batcherFee; + orderAssets["lovelace"] = FIXED_DEPOSIT_ADA + batcherFee; } const datum: OrderV1.Datum = { sender: sender, @@ -262,7 +262,7 @@ export class Dex { .payToContract( DexV1Constant.ORDER_BASE_ADDRESS[this.networkId], Data.to(OrderV1.Datum.toPlutusData(datum)), - orderAssets, + orderAssets ) .payToAddress(sender, reductionAssets) .addSigner(sender) @@ -273,13 +273,13 @@ export class Dex { this.lucid, sender, customReceiver.receiver, - customReceiver.receiverDatum.datum, + customReceiver.receiverDatum.datum ); if (utxoForStoringDatum) { tx.payToAddressWithData( utxoForStoringDatum.address, utxoForStoringDatum.outputData, - utxoForStoringDatum.assets, + utxoForStoringDatum.assets ); } } @@ -296,10 +296,10 @@ export class Dex { minimumAssetBReceived, availableUtxos, } = options; - invariant(lpAmount > 0n, 'LP amount must be positive'); + invariant(lpAmount > 0n, "LP amount must be positive"); invariant( minimumAssetAReceived > 0n && minimumAssetBReceived > 0n, - 'minimum asset received must be positive', + "minimum asset received must be positive" ); const orderAssets: Assets = { [Asset.toString(lpAsset)]: lpAmount }; const { batcherFee, reductionAssets } = BatcherFee.finalizeFee({ @@ -309,10 +309,10 @@ export class Dex { dexVersion: this.dexVersion, currentDate: new Date(), }); - if (orderAssets['lovelace']) { - orderAssets['lovelace'] += FIXED_DEPOSIT_ADA + batcherFee; + if (orderAssets["lovelace"]) { + orderAssets["lovelace"] += FIXED_DEPOSIT_ADA + batcherFee; } else { - orderAssets['lovelace'] = FIXED_DEPOSIT_ADA + batcherFee; + orderAssets["lovelace"] = FIXED_DEPOSIT_ADA + batcherFee; } const datum: OrderV1.Datum = { sender: sender, @@ -331,7 +331,7 @@ export class Dex { .payToContract( DexV1Constant.ORDER_BASE_ADDRESS[this.networkId], Data.to(OrderV1.Datum.toPlutusData(datum)), - orderAssets, + orderAssets ) .payToAddress(sender, reductionAssets) .addSigner(sender) @@ -348,8 +348,8 @@ export class Dex { minimumLPReceived, availableUtxos, } = options; - invariant(amountIn > 0n, 'amount in must be positive'); - invariant(minimumLPReceived > 0n, 'minimum LP received must be positive'); + invariant(amountIn > 0n, "amount in must be positive"); + invariant(minimumLPReceived > 0n, "minimum LP received must be positive"); const orderAssets: Assets = { [Asset.toString(assetIn)]: amountIn }; const { batcherFee, reductionAssets } = BatcherFee.finalizeFee({ utxos: availableUtxos, @@ -358,10 +358,10 @@ export class Dex { dexVersion: this.dexVersion, currentDate: new Date(), }); - if (orderAssets['lovelace']) { - orderAssets['lovelace'] += FIXED_DEPOSIT_ADA + batcherFee; + if (orderAssets["lovelace"]) { + orderAssets["lovelace"] += FIXED_DEPOSIT_ADA + batcherFee; } else { - orderAssets['lovelace'] = FIXED_DEPOSIT_ADA + batcherFee; + orderAssets["lovelace"] = FIXED_DEPOSIT_ADA + batcherFee; } const datum: OrderV1.Datum = { sender: sender, @@ -381,7 +381,7 @@ export class Dex { .payToContract( DexV1Constant.ORDER_BASE_ADDRESS[this.networkId], Data.to(OrderV1.Datum.toPlutusData(datum)), - orderAssets, + orderAssets ) .payToAddress(sender, reductionAssets) .addSigner(sender) @@ -399,8 +399,8 @@ export class Dex { minimumLPReceived, availableUtxos, } = options; - invariant(amountA > 0n && amountB > 0n, 'amount must be positive'); - invariant(minimumLPReceived > 0n, 'minimum LP received must be positive'); + invariant(amountA > 0n && amountB > 0n, "amount must be positive"); + invariant(minimumLPReceived > 0n, "minimum LP received must be positive"); const orderAssets = { [Asset.toString(assetA)]: amountA, [Asset.toString(assetB)]: amountB, @@ -412,10 +412,10 @@ export class Dex { dexVersion: this.dexVersion, currentDate: new Date(), }); - if (orderAssets['lovelace']) { - orderAssets['lovelace'] += FIXED_DEPOSIT_ADA + batcherFee; + if (orderAssets["lovelace"]) { + orderAssets["lovelace"] += FIXED_DEPOSIT_ADA + batcherFee; } else { - orderAssets['lovelace'] = FIXED_DEPOSIT_ADA + batcherFee; + orderAssets["lovelace"] = FIXED_DEPOSIT_ADA + batcherFee; } const datum: OrderV1.Datum = { sender: sender, @@ -433,7 +433,7 @@ export class Dex { .payToContract( DexV1Constant.ORDER_BASE_ADDRESS[this.networkId], Data.to(OrderV1.Datum.toPlutusData(datum)), - orderAssets, + orderAssets ) .payToAddress(sender, reductionAssets) .addSigner(sender) @@ -442,18 +442,18 @@ export class Dex { } async buildCancelOrder( - options: BuildCancelOrderOptions, + options: BuildCancelOrderOptions ): Promise { const { orderUtxo } = options; const redeemer = Data.to(new Constr(OrderV1.Redeemer.CANCEL_ORDER, [])); const rawDatum = orderUtxo.datum; invariant( rawDatum, - `Cancel Order requires Order UTxOs along with its CBOR Datum`, + `Cancel Order requires Order UTxOs along with its CBOR Datum` ); const orderDatum = OrderV1.Datum.fromPlutusData( this.networkId, - Data.from(rawDatum) as Constr, + Data.from(rawDatum) as Constr ); return await this.lucid .newTx() diff --git a/src/expired-order-monitor.ts b/src/expired-order-monitor.ts index 574a5aa..98ec277 100644 --- a/src/expired-order-monitor.ts +++ b/src/expired-order-monitor.ts @@ -1,7 +1,7 @@ -import { Lucid } from '@minswap/lucid-cardano'; +import { Lucid } from "@minswap/lucid-cardano"; -import { BlockfrostAdapter, DexV2, DexV2Constant, OrderV2 } from '.'; -import { runRecurringJob } from './utils/job'; +import { BlockfrostAdapter, DexV2, DexV2Constant, OrderV2 } from "."; +import { runRecurringJob } from "./utils/job"; type DexV2WorkerConstructor = { lucid: Lucid; @@ -26,14 +26,14 @@ export class ExpiredOrderMonitor { async start(): Promise { await runRecurringJob({ - name: 'lbe v2 batcher', + name: "lbe v2 batcher", interval: 1000 * 30, // 30s job: () => this.runWorker(), }); } async runWorker(): Promise { - console.info('start run dex v2 worker'); + console.info("start run dex v2 worker"); const { orders: allOrders } = await this.blockfrostAdapter.getAllV2Orders(); const currentSlot = await this.blockfrostAdapter.currentSlot(); const currentTime = this.lucid.utils.slotToUnixTime(currentSlot); @@ -61,7 +61,7 @@ export class ExpiredOrderMonitor { ) { try { rawDatum = await this.blockfrostAdapter.getDatumByDatumHash( - receiverDatum.hash, + receiverDatum.hash ); mapDatum[receiverDatum.hash] = rawDatum; // eslint-disable-next-line unused-imports/no-unused-vars @@ -88,7 +88,7 @@ export class ExpiredOrderMonitor { orders.map((order) => ({ txHash: order.txIn.txHash, outputIndex: order.txIn.index, - })), + })) ); if (orderUtxos.length === 0) { console.info(`SKIP | Can not find any order utxos.`); @@ -97,7 +97,7 @@ export class ExpiredOrderMonitor { try { const txComplete = await new DexV2( this.lucid, - this.blockfrostAdapter, + this.blockfrostAdapter ).cancelExpiredOrders({ orderUtxos: orderUtxos, currentSlot, @@ -111,8 +111,8 @@ export class ExpiredOrderMonitor { console.info(`Transaction submitted successfully: ${txId}`); } catch (_err) { console.error( - `Error when the worker runs: orders ${orders.map((order) => `${order.txIn.txHash}#${order.txIn.index}`).join(', ')}`, - _err, + `Error when the worker runs: orders ${orders.map((order) => `${order.txIn.txHash}#${order.txIn.index}`).join(", ")}`, + _err ); } } diff --git a/src/index.ts b/src/index.ts index e70b130..6c1aaf4 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,9 +1,9 @@ -export * from './adapters/adapter'; -export * from './calculate'; -export * from './dex'; -export * from './dex-v2'; -export * from './types/asset'; -export * from './types/constants'; -export * from './types/network'; -export * from './types/order'; -export * from './types/pool'; +export * from "./adapters/adapter"; +export * from "./calculate"; +export * from "./dex"; +export * from "./dex-v2"; +export * from "./types/asset"; +export * from "./types/constants"; +export * from "./types/network"; +export * from "./types/order"; +export * from "./types/pool"; diff --git a/src/stableswap.ts b/src/stableswap.ts index 3b711a0..5805754 100644 --- a/src/stableswap.ts +++ b/src/stableswap.ts @@ -6,8 +6,8 @@ import { Lucid, TxComplete, UTxO, -} from '@minswap/lucid-cardano'; -import invariant from '@minswap/tiny-invariant'; +} from "@minswap/lucid-cardano"; +import invariant from "@minswap/tiny-invariant"; import { FIXED_DEPOSIT_ADA, @@ -15,13 +15,13 @@ import { StableOrder, StableswapConstant, V1AndStableswapCustomReceiver, -} from '.'; -import { BatcherFee } from './batcher-fee-reduction/calculate'; -import { DexVersion } from './batcher-fee-reduction/configs.internal'; -import { Asset } from './types/asset'; -import { NetworkEnvironment, NetworkId } from './types/network'; -import { lucidToNetworkEnv } from './utils/network.internal'; -import { buildUtxoToStoreDatum } from './utils/tx.internal'; +} from "."; +import { BatcherFee } from "./batcher-fee-reduction/calculate"; +import { DexVersion } from "./batcher-fee-reduction/configs.internal"; +import { Asset } from "./types/asset"; +import { NetworkEnvironment, NetworkId } from "./types/network"; +import { lucidToNetworkEnv } from "./utils/network.internal"; +import { buildUtxoToStoreDatum } from "./utils/tx.internal"; /** * @property {bigint} assetInIndex - Index of asset you want to swap in config assets @@ -94,7 +94,7 @@ export class Stableswap { constructor(lucid: Lucid) { this.lucid = lucid; this.networkId = - lucid.network === 'Mainnet' ? NetworkId.MAINNET : NetworkId.TESTNET; + lucid.network === "Mainnet" ? NetworkId.MAINNET : NetworkId.TESTNET; this.networkEnv = lucidToNetworkEnv(lucid.network); } @@ -106,33 +106,33 @@ export class Stableswap { const { minimumLPReceived, assetsAmount, totalLiquidity } = option; invariant( minimumLPReceived > 0n, - 'minimum LP received must be non-negative', + "minimum LP received must be non-negative" ); let sumAmount = 0n; for (const [asset, amount] of assetsAmount) { if (totalLiquidity === 0n) { invariant( amount > 0n, - 'amount must be positive when total liquidity = 0', + "amount must be positive when total liquidity = 0" ); } else { - invariant(amount >= 0n, 'amount must be non-negative'); + invariant(amount >= 0n, "amount must be non-negative"); } if (amount > 0n) { orderAssets[Asset.toString(asset)] = amount; } sumAmount += amount; } - invariant(sumAmount > 0n, 'sum of amount must be positive'); + invariant(sumAmount > 0n, "sum of amount must be positive"); break; } case StableOrder.StepType.SWAP: { const { assetInAmount, assetInIndex, lpAsset } = option; const poolConfig = StableswapConstant.getConfigByLpAsset( lpAsset, - this.networkId, + this.networkId ); - invariant(assetInAmount > 0n, 'asset in amount must be positive'); + invariant(assetInAmount > 0n, "asset in amount must be positive"); orderAssets[poolConfig.assets[Number(assetInIndex)]] = assetInAmount; break; } @@ -140,16 +140,16 @@ export class Stableswap { case StableOrder.StepType.WITHDRAW_IMBALANCE: case StableOrder.StepType.ZAP_OUT: { const { lpAmount, lpAsset } = option; - invariant(lpAmount > 0n, 'Lp amount must be positive number'); + invariant(lpAmount > 0n, "Lp amount must be positive number"); orderAssets[Asset.toString(lpAsset)] = lpAmount; break; } } - if ('lovelace' in orderAssets) { - orderAssets['lovelace'] += FIXED_DEPOSIT_ADA; + if ("lovelace" in orderAssets) { + orderAssets["lovelace"] += FIXED_DEPOSIT_ADA; } else { - orderAssets['lovelace'] = FIXED_DEPOSIT_ADA; + orderAssets["lovelace"] = FIXED_DEPOSIT_ADA; } return orderAssets; } @@ -160,7 +160,7 @@ export class Stableswap { const { minimumLPReceived } = option; invariant( minimumLPReceived > 0n, - 'minimum LP received must be non-negative', + "minimum LP received must be non-negative" ); return { type: StableOrder.StepType.DEPOSIT, @@ -171,10 +171,10 @@ export class Stableswap { const { minimumAmounts } = option; let sumAmount = 0n; for (const amount of minimumAmounts) { - invariant(amount >= 0n, 'minimum amount must be non-negative'); + invariant(amount >= 0n, "minimum amount must be non-negative"); sumAmount += amount; } - invariant(sumAmount > 0n, 'sum of withdaw amount must be positive'); + invariant(sumAmount > 0n, "sum of withdaw amount must be positive"); return { type: StableOrder.StepType.WITHDRAW, minimumAmounts: minimumAmounts, @@ -185,28 +185,28 @@ export class Stableswap { option; const poolConfig = StableswapConstant.getConfigByLpAsset( lpAsset, - this.networkId, + this.networkId ); invariant( poolConfig, - `Not found Stableswap config matching with LP Asset ${lpAsset.toString()}`, + `Not found Stableswap config matching with LP Asset ${lpAsset.toString()}` ); const assetLength = BigInt(poolConfig.assets.length); invariant( assetInIndex >= 0n && assetInIndex < assetLength, - `Invalid amountInIndex, must be between 0-${assetLength - 1n}`, + `Invalid amountInIndex, must be between 0-${assetLength - 1n}` ); invariant( assetOutIndex >= 0n && assetOutIndex < assetLength, - `Invalid assetOutIndex, must be between 0-${assetLength - 1n}`, + `Invalid assetOutIndex, must be between 0-${assetLength - 1n}` ); invariant( assetInIndex !== assetOutIndex, - `assetOutIndex and amountInIndex must be different`, + `assetOutIndex and amountInIndex must be different` ); invariant( minimumAssetOut > 0n, - 'minimum asset out amount must be positive', + "minimum asset out amount must be positive" ); return { type: StableOrder.StepType.SWAP, @@ -219,10 +219,10 @@ export class Stableswap { const { withdrawAmounts } = option; let sum = 0n; for (const amount of withdrawAmounts) { - invariant(amount >= 0n, 'withdraw amount must be unsigned number'); + invariant(amount >= 0n, "withdraw amount must be unsigned number"); sum += amount; } - invariant(sum > 0n, 'sum of withdraw amount must be positive'); + invariant(sum > 0n, "sum of withdraw amount must be positive"); return { type: StableOrder.StepType.WITHDRAW_IMBALANCE, withdrawAmounts: withdrawAmounts, @@ -232,20 +232,20 @@ export class Stableswap { const { assetOutIndex, minimumAssetOut, lpAsset } = option; const poolConfig = StableswapConstant.getConfigByLpAsset( lpAsset, - this.networkId, + this.networkId ); invariant( poolConfig, - `Not found Stableswap config matching with LP Asset ${lpAsset.toString()}`, + `Not found Stableswap config matching with LP Asset ${lpAsset.toString()}` ); const assetLength = BigInt(poolConfig.assets.length); invariant( minimumAssetOut > 0n, - 'Minimum amount out must be positive number', + "Minimum amount out must be positive number" ); invariant( assetOutIndex >= 0n && assetOutIndex < assetLength, - `Invalid assetOutIndex, must be between 0-${assetLength - 1n}`, + `Invalid assetOutIndex, must be between 0-${assetLength - 1n}` ); return { type: StableOrder.StepType.ZAP_OUT, @@ -291,7 +291,7 @@ export class Stableswap { invariant( orderOptions.length > 0, - 'Stableswap.buildCreateTx: Need at least 1 order to build', + "Stableswap.buildCreateTx: Need at least 1 order to build" ); // calculate total order value const totalOrderAssets: Record = {}; @@ -319,15 +319,15 @@ export class Stableswap { for (const orderOption of orderOptions) { const config = StableswapConstant.getConfigByLpAsset( orderOption.lpAsset, - this.networkId, + this.networkId ); const { customReceiver } = orderOption; const orderAssets = this.buildOrderValue(orderOption); const step = this.buildOrderStep(orderOption); - if ('lovelace' in orderAssets) { - orderAssets['lovelace'] += batcherFee; + if ("lovelace" in orderAssets) { + orderAssets["lovelace"] += batcherFee; } else { - orderAssets['lovelace'] = batcherFee; + orderAssets["lovelace"] = batcherFee; } const datum: StableOrder.Datum = { sender: sender, @@ -342,7 +342,7 @@ export class Stableswap { { inline: Data.to(StableOrder.Datum.toPlutusData(datum)), }, - orderAssets, + orderAssets ); if (customReceiver && customReceiver.receiverDatum) { @@ -350,13 +350,13 @@ export class Stableswap { this.lucid, sender, customReceiver.receiver, - customReceiver.receiverDatum.datum, + customReceiver.receiverDatum.datum ); if (utxoForStoringDatum) { tx.payToAddressWithData( utxoForStoringDatum.address, utxoForStoringDatum.outputData, - utxoForStoringDatum.assets, + utxoForStoringDatum.assets ); } } @@ -375,7 +375,7 @@ export class Stableswap { } async buildCancelOrdersTx( - options: BuildCancelOrderOptions, + options: BuildCancelOrderOptions ): Promise { const tx = this.lucid.newTx(); @@ -383,28 +383,28 @@ export class Stableswap { for (const utxo of options.orderUtxos) { const config = StableswapConstant.getConfigFromStableswapOrderAddress( utxo.address, - this.networkId, + this.networkId ); const referencesScript = StableswapConstant.getStableswapReferencesScript( Asset.fromString(config.nftAsset), - this.networkId, + this.networkId ); let datum: StableOrder.Datum; if (utxo.datum) { const rawDatum = utxo.datum; datum = StableOrder.Datum.fromPlutusData( this.networkId, - Data.from(rawDatum), + Data.from(rawDatum) ); } else if (utxo.datumHash) { const rawDatum = await this.lucid.datumOf(utxo); datum = StableOrder.Datum.fromPlutusData( this.networkId, - rawDatum as Constr, + rawDatum as Constr ); } else { throw new Error( - 'Utxo without Datum Hash or Inline Datum can not be spent', + "Utxo without Datum Hash or Inline Datum can not be spent" ); } @@ -413,7 +413,7 @@ export class Stableswap { ]); invariant( orderRefs.length === 1, - 'cannot find deployed script for V2 Order', + "cannot find deployed script for V2 Order" ); const orderRef = orderRefs[0]; diff --git a/test/adapter.test.ts b/test/adapter.test.ts index 0c19065..7d06918 100644 --- a/test/adapter.test.ts +++ b/test/adapter.test.ts @@ -1,4 +1,4 @@ -import { BlockFrostAPI } from '@blockfrost/blockfrost-js'; +import { BlockFrostAPI } from "@blockfrost/blockfrost-js"; import { ADA, @@ -6,7 +6,7 @@ import { BlockfrostAdapter, NetworkId, StableswapConstant, -} from '../src'; +} from "../src"; function mustGetEnv(key: string): string { const val = process.env[key]; @@ -17,13 +17,13 @@ function mustGetEnv(key: string): string { } const MIN_TESTNET = - 'e16c2dc8ae937e8d3790c7fd7168d7b994621ba14ca11415f39fed724d494e'; + "e16c2dc8ae937e8d3790c7fd7168d7b994621ba14ca11415f39fed724d494e"; const MIN_MAINNET = - '29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c64d494e'; + "29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c64d494e"; const MIN_ADA_POOL_V1_ID_TESTNET = - '3bb0079303c57812462dec9de8fb867cef8fd3768de7f12c77f6f0dd80381d0d'; + "3bb0079303c57812462dec9de8fb867cef8fd3768de7f12c77f6f0dd80381d0d"; const MIN_ADA_POOL_V1_ID_MAINNET = - '6aa2153e1ae896a95539c9d62f76cedcdabdcdf144e564b8955f609d660cf6a2'; + "6aa2153e1ae896a95539c9d62f76cedcdabdcdf144e564b8955f609d660cf6a2"; let adapterTestnet: BlockfrostAdapter; let adapterMainnet: BlockfrostAdapter; @@ -32,23 +32,23 @@ beforeAll(() => { adapterTestnet = new BlockfrostAdapter( NetworkId.TESTNET, new BlockFrostAPI({ - projectId: mustGetEnv('BLOCKFROST_PROJECT_ID_TESTNET'), - network: 'preprod', - }), + projectId: mustGetEnv("BLOCKFROST_PROJECT_ID_TESTNET"), + network: "preprod", + }) ); adapterMainnet = new BlockfrostAdapter( NetworkId.MAINNET, new BlockFrostAPI({ - projectId: mustGetEnv('BLOCKFROST_PROJECT_ID_MAINNET'), - network: 'mainnet', - }), + projectId: mustGetEnv("BLOCKFROST_PROJECT_ID_MAINNET"), + network: "mainnet", + }) ); }); -test('getAssetDecimals', async () => { - expect(await adapterTestnet.getAssetDecimals('lovelace')).toBe(6); +test("getAssetDecimals", async () => { + expect(await adapterTestnet.getAssetDecimals("lovelace")).toBe(6); expect(await adapterTestnet.getAssetDecimals(MIN_TESTNET)).toBe(0); - expect(await adapterMainnet.getAssetDecimals('lovelace')).toBe(6); + expect(await adapterMainnet.getAssetDecimals("lovelace")).toBe(6); expect(await adapterMainnet.getAssetDecimals(MIN_MAINNET)).toBe(6); }); @@ -65,35 +65,35 @@ async function testPoolPrice(adapter: BlockfrostAdapter): Promise { // product of 2 prices must be approximately equal to 1 // abs(priceAB * priceBA - 1) <= epsilon expect(priceAB.mul(priceBA).sub(1).abs().toNumber()).toBeLessThanOrEqual( - 1e-6, + 1e-6 ); } } -test('getPoolPrice', async () => { +test("getPoolPrice", async () => { await testPoolPrice(adapterTestnet); await testPoolPrice(adapterMainnet); }, 10000); -test('getV1PoolById', async () => { +test("getV1PoolById", async () => { const adaMINTestnet = await adapterTestnet.getV1PoolById({ id: MIN_ADA_POOL_V1_ID_TESTNET, }); expect(adaMINTestnet).not.toBeNull(); - expect(adaMINTestnet?.assetA).toEqual('lovelace'); + expect(adaMINTestnet?.assetA).toEqual("lovelace"); expect(adaMINTestnet?.assetB).toEqual(MIN_TESTNET); const adaMINMainnet = await adapterMainnet.getV1PoolById({ id: MIN_ADA_POOL_V1_ID_MAINNET, }); expect(adaMINMainnet).not.toBeNull(); - expect(adaMINMainnet?.assetA).toEqual('lovelace'); + expect(adaMINMainnet?.assetA).toEqual("lovelace"); expect(adaMINMainnet?.assetB).toEqual(MIN_MAINNET); }); async function testPriceHistory( adapter: BlockfrostAdapter, - id: string, + id: string ): Promise { const history = await adapter.getV1PoolHistory({ id: id }); for (let i = 0; i < Math.min(5, history.length); i++) { @@ -102,34 +102,34 @@ async function testPriceHistory( } } -test('get prices of last 5 states of MIN/ADA pool', async () => { +test("get prices of last 5 states of MIN/ADA pool", async () => { await testPriceHistory(adapterTestnet, MIN_ADA_POOL_V1_ID_TESTNET); await testPriceHistory(adapterMainnet, MIN_ADA_POOL_V1_ID_MAINNET); }); -test('getV2PoolByPair', async () => { +test("getV2PoolByPair", async () => { const pool = await adapterTestnet.getV2PoolByPair(ADA, { - policyId: 'e16c2dc8ae937e8d3790c7fd7168d7b994621ba14ca11415f39fed72', - tokenName: '4d494e', + policyId: "e16c2dc8ae937e8d3790c7fd7168d7b994621ba14ca11415f39fed72", + tokenName: "4d494e", }); expect(pool).not.toBeNull(); - expect(pool?.assetA).toEqual('lovelace'); + expect(pool?.assetA).toEqual("lovelace"); expect(pool?.assetB).toEqual(MIN_TESTNET); }); -test('getAllV2Pools', async () => { +test("getAllV2Pools", async () => { const { pools } = await adapterTestnet.getAllV2Pools(); expect(pools.length > 0); }); -test('getV2Pools', async () => { +test("getV2Pools", async () => { const { pools } = await adapterTestnet.getV2Pools({ page: 1, }); expect(pools.length > 0); }); -test('getAllStablePools', async () => { +test("getAllStablePools", async () => { const numberOfStablePoolsTestnet = StableswapConstant.CONFIG[NetworkId.TESTNET].length; const numberOfStablePoolsMainnet = @@ -141,13 +141,13 @@ test('getAllStablePools', async () => { expect(mainnetPools.length === numberOfStablePoolsMainnet); }); -test('getStablePoolByLPAsset', async () => { +test("getStablePoolByLPAsset", async () => { const testnetCfgs = StableswapConstant.CONFIG[NetworkId.TESTNET]; const mainnetCfgs = StableswapConstant.CONFIG[NetworkId.MAINNET]; for (const cfg of testnetCfgs) { const pool = await adapterTestnet.getStablePoolByLpAsset( - Asset.fromString(cfg.lpAsset), + Asset.fromString(cfg.lpAsset) ); expect(pool).not.toBeNull(); expect(pool?.nft).toEqual(cfg.nftAsset); @@ -156,7 +156,7 @@ test('getStablePoolByLPAsset', async () => { for (const cfg of mainnetCfgs) { const pool = await adapterMainnet.getStablePoolByLpAsset( - Asset.fromString(cfg.lpAsset), + Asset.fromString(cfg.lpAsset) ); expect(pool).not.toBeNull(); expect(pool?.nft).toEqual(cfg.nftAsset); @@ -164,13 +164,13 @@ test('getStablePoolByLPAsset', async () => { } }); -test('getStablePoolByNFT', async () => { +test("getStablePoolByNFT", async () => { const testnetCfgs = StableswapConstant.CONFIG[NetworkId.TESTNET]; const mainnetCfgs = StableswapConstant.CONFIG[NetworkId.MAINNET]; for (const cfg of testnetCfgs) { const pool = await adapterTestnet.getStablePoolByNFT( - Asset.fromString(cfg.nftAsset), + Asset.fromString(cfg.nftAsset) ); expect(pool).not.toBeNull(); expect(pool?.nft).toEqual(cfg.nftAsset); @@ -179,7 +179,7 @@ test('getStablePoolByNFT', async () => { for (const cfg of mainnetCfgs) { const pool = await adapterMainnet.getStablePoolByNFT( - Asset.fromString(cfg.nftAsset), + Asset.fromString(cfg.nftAsset) ); expect(pool).not.toBeNull(); expect(pool?.nft).toEqual(cfg.nftAsset); diff --git a/test/address.test.ts b/test/address.test.ts index 9cce667..afd6395 100644 --- a/test/address.test.ts +++ b/test/address.test.ts @@ -1,66 +1,66 @@ -import { Credential, Data } from '@minswap/lucid-cardano'; +import { Credential, Data } from "@minswap/lucid-cardano"; import { AddressPlutusData, LucidCredential, -} from '../src/types/address.internal'; -import { NetworkId } from '../src/types/network'; -import { getScriptHashFromAddress } from '../src/utils/address-utils.internal'; +} from "../src/types/address.internal"; +import { NetworkId } from "../src/types/network"; +import { getScriptHashFromAddress } from "../src/utils/address-utils.internal"; -test('Lucid Credential to PlutusData Converter', () => { - const dummyHash = 'b8b912cdbcc998f3f0c18e951928ca179de85735c4fc2d82e8d10777'; +test("Lucid Credential to PlutusData Converter", () => { + const dummyHash = "b8b912cdbcc998f3f0c18e951928ca179de85735c4fc2d82e8d10777"; const pubKeyCredential: Credential = { - type: 'Key', + type: "Key", hash: dummyHash, }; const scriptCredential: Credential = { - type: 'Script', + type: "Script", hash: dummyHash, }; const convertedPubKeyCredential = LucidCredential.fromPlutusData( - Data.from(Data.to(LucidCredential.toPlutusData(pubKeyCredential))), + Data.from(Data.to(LucidCredential.toPlutusData(pubKeyCredential))) ); const convertedScriptCredential = LucidCredential.fromPlutusData( - Data.from(Data.to(LucidCredential.toPlutusData(scriptCredential))), + Data.from(Data.to(LucidCredential.toPlutusData(scriptCredential))) ); expect(JSON.stringify(convertedPubKeyCredential)).toEqual( - JSON.stringify(pubKeyCredential), + JSON.stringify(pubKeyCredential) ); expect(JSON.stringify(convertedScriptCredential)).toEqual( - JSON.stringify(scriptCredential), + JSON.stringify(scriptCredential) ); }); -test('Address to PlutusData Converter', () => { +test("Address to PlutusData Converter", () => { const networkId = NetworkId.TESTNET; const pubkeyEnterpriseAddress = - 'addr_test1vzutjykdhnye3ulscx8f2xfgegtem6zhxhz0ctvzargswac99alhg'; + "addr_test1vzutjykdhnye3ulscx8f2xfgegtem6zhxhz0ctvzargswac99alhg"; const pubKeyBaseAddress = - 'addr_test1qpssc0r090a9u0pyvdr9y76sm2xzx04n6d4j0y5hukcx6rxz4dtgkhfdynadkea0qezv99wljdl076xkg2krm96nn8jszmh3w7'; + "addr_test1qpssc0r090a9u0pyvdr9y76sm2xzx04n6d4j0y5hukcx6rxz4dtgkhfdynadkea0qezv99wljdl076xkg2krm96nn8jszmh3w7"; const scriptEnterpriseAddress = - 'addr_test1wzn9efv2f6w82hagxqtn62ju4m293tqvw0uhmdl64ch8uwc5lpd8w'; + "addr_test1wzn9efv2f6w82hagxqtn62ju4m293tqvw0uhmdl64ch8uwc5lpd8w"; const scriptBaseAddress = - 'addr_test1zzn9efv2f6w82hagxqtn62ju4m293tqvw0uhmdl64ch8uwurajt8r8wqtygrfduwgukk73m5gcnplmztc5tl5ngy0upq932hcy'; + "addr_test1zzn9efv2f6w82hagxqtn62ju4m293tqvw0uhmdl64ch8uwurajt8r8wqtygrfduwgukk73m5gcnplmztc5tl5ngy0upq932hcy"; const convertedPubkeyEnterpriseAddress = AddressPlutusData.fromPlutusData( networkId, - Data.from(Data.to(AddressPlutusData.toPlutusData(pubkeyEnterpriseAddress))), + Data.from(Data.to(AddressPlutusData.toPlutusData(pubkeyEnterpriseAddress))) ); const convertedPubKeyBaseAddress = AddressPlutusData.fromPlutusData( networkId, - Data.from(Data.to(AddressPlutusData.toPlutusData(pubKeyBaseAddress))), + Data.from(Data.to(AddressPlutusData.toPlutusData(pubKeyBaseAddress))) ); const convertedScriptEnterpriseAddress = AddressPlutusData.fromPlutusData( networkId, - Data.from(Data.to(AddressPlutusData.toPlutusData(scriptEnterpriseAddress))), + Data.from(Data.to(AddressPlutusData.toPlutusData(scriptEnterpriseAddress))) ); const convertedScriptBaseAddress = AddressPlutusData.fromPlutusData( networkId, - Data.from(Data.to(AddressPlutusData.toPlutusData(scriptBaseAddress))), + Data.from(Data.to(AddressPlutusData.toPlutusData(scriptBaseAddress))) ); expect(pubkeyEnterpriseAddress).toEqual(convertedPubkeyEnterpriseAddress); @@ -69,19 +69,19 @@ test('Address to PlutusData Converter', () => { expect(scriptBaseAddress).toEqual(convertedScriptBaseAddress); }); -describe('Address utils', () => { - test('getScriptHashFromAddress', () => { +describe("Address utils", () => { + test("getScriptHashFromAddress", () => { for (const a of [ - 'addr_test1zrsnz7c4974vzdpxu65ruphl3zjdvtxw8strf2c2tmqnxzvrajt8r8wqtygrfduwgukk73m5gcnplmztc5tl5ngy0upqs8q93k', - 'addr1z8snz7c4974vzdpxu65ruphl3zjdvtxw8strf2c2tmqnxz2j2c79gy9l76sdg0xwhd7r0c0kna0tycz4y5s6mlenh8pq0xmsha', - 'addr1z8snz7c4974vzdpxu65ruphl3zjdvtxw8strf2c2tmqnxzfgf0jgfz5xdvg2pges20usxhw8zwnkggheqrxwmxd6huuqss46eh', - 'addr1z8snz7c4974vzdpxu65ruphl3zjdvtxw8strf2c2tmqnxzwccf8ywaly0m99ngq68lus48lmafut7ku9geawu8u6k49suv42qq', - 'addr1z8snz7c4974vzdpxu65ruphl3zjdvtxw8strf2c2tmqnxz02znpd777wgl9wwpk0dvdzuxn93mqh82q7vv6s9jn25rws52z94g', - 'addr1z8snz7c4974vzdpxu65ruphl3zjdvtxw8strf2c2tmqnxz2jyskd3y6etkv8ye450545xu6q4jfq5hv4e0uxwkpf8lsq048y90', - 'addr1z8snz7c4974vzdpxu65ruphl3zjdvtxw8strf2c2tmqnxztnqm37tpj0q63s0qns5wfe4flqzqqg55760472n7yt4v8skpaj3k', + "addr_test1zrsnz7c4974vzdpxu65ruphl3zjdvtxw8strf2c2tmqnxzvrajt8r8wqtygrfduwgukk73m5gcnplmztc5tl5ngy0upqs8q93k", + "addr1z8snz7c4974vzdpxu65ruphl3zjdvtxw8strf2c2tmqnxz2j2c79gy9l76sdg0xwhd7r0c0kna0tycz4y5s6mlenh8pq0xmsha", + "addr1z8snz7c4974vzdpxu65ruphl3zjdvtxw8strf2c2tmqnxzfgf0jgfz5xdvg2pges20usxhw8zwnkggheqrxwmxd6huuqss46eh", + "addr1z8snz7c4974vzdpxu65ruphl3zjdvtxw8strf2c2tmqnxzwccf8ywaly0m99ngq68lus48lmafut7ku9geawu8u6k49suv42qq", + "addr1z8snz7c4974vzdpxu65ruphl3zjdvtxw8strf2c2tmqnxz02znpd777wgl9wwpk0dvdzuxn93mqh82q7vv6s9jn25rws52z94g", + "addr1z8snz7c4974vzdpxu65ruphl3zjdvtxw8strf2c2tmqnxz2jyskd3y6etkv8ye450545xu6q4jfq5hv4e0uxwkpf8lsq048y90", + "addr1z8snz7c4974vzdpxu65ruphl3zjdvtxw8strf2c2tmqnxztnqm37tpj0q63s0qns5wfe4flqzqqg55760472n7yt4v8skpaj3k", ]) expect(getScriptHashFromAddress(a)).toEqual( - 'script1uychk9f04tqngfhx4qlqdlug5ntzen3uzc62kzj7cyesjk0d9me', + "script1uychk9f04tqngfhx4qlqdlug5ntzen3uzc62kzj7cyesjk0d9me" ); }); }); diff --git a/test/batcher-fee.test.ts b/test/batcher-fee.test.ts index 6d74195..d3e640c 100644 --- a/test/batcher-fee.test.ts +++ b/test/batcher-fee.test.ts @@ -1,11 +1,11 @@ -import invariant from '@minswap/tiny-invariant'; -import { NetworkEnvironment } from '../src'; -import { BatcherFee } from '../src/batcher-fee-reduction/calculate'; +import invariant from "@minswap/tiny-invariant"; +import { NetworkEnvironment } from "../src"; +import { BatcherFee } from "../src/batcher-fee-reduction/calculate"; import { BatcherFeeConfig, DexVersion, -} from '../src/batcher-fee-reduction/configs.internal'; -import { Assets } from '@minswap/lucid-cardano'; +} from "../src/batcher-fee-reduction/configs.internal"; +import { Assets } from "@minswap/lucid-cardano"; function compareAssets(a1: Assets, a2: Assets): boolean { if (Object.keys(a1).length !== Object.keys(a2).length) { @@ -27,9 +27,9 @@ function compareAssets(a1: Assets, a2: Assets): boolean { return isEqual; } -test('Batcher Fee reduction test', () => { +test("Batcher Fee reduction test", () => { for (const [networkEnvStr, batcherFeeMap] of Object.entries( - BatcherFeeConfig.CONFIG, + BatcherFeeConfig.CONFIG )) { let networkEnv: NetworkEnvironment; switch (networkEnvStr) { @@ -46,11 +46,11 @@ test('Batcher Fee reduction test', () => { break; } default: { - throw new Error('Unexpected Network'); + throw new Error("Unexpected Network"); } } for (const [dexVersionStr, batcherFeeConfig] of Object.entries( - batcherFeeMap, + batcherFeeMap )) { let dexVersion: DexVersion; switch (dexVersionStr) { @@ -61,7 +61,7 @@ test('Batcher Fee reduction test', () => { break; } default: { - throw new Error('Unexpected DEX version'); + throw new Error("Unexpected DEX version"); } } for (const reduction of batcherFeeConfig.reduction) { @@ -86,10 +86,10 @@ test('Batcher Fee reduction test', () => { utxos: [ { txHash: - '73fe9271c8e2b11430d76bfe4b0dad4816c326d08e63439130c863b0a1932649', + "73fe9271c8e2b11430d76bfe4b0dad4816c326d08e63439130c863b0a1932649", outputIndex: 0, address: - 'addr_test1qz09ls06gtsnws8dhquh273tnzj0avf8fumakgmdc40cwazvh204krl8rn5cvnepdzn5zj55wk4uy8nnzwklhzcvtyws67g5de', + "addr_test1qz09ls06gtsnws8dhquh273tnzj0avf8fumakgmdc40cwazvh204krl8rn5cvnepdzn5zj55wk4uy8nnzwklhzcvtyws67g5de", assets: { lovelace: 10_000000n, [asset]: maximumAmount, @@ -106,10 +106,10 @@ test('Batcher Fee reduction test', () => { utxos: [ { txHash: - '73fe9271c8e2b11430d76bfe4b0dad4816c326d08e63439130c863b0a1932649', + "73fe9271c8e2b11430d76bfe4b0dad4816c326d08e63439130c863b0a1932649", outputIndex: 0, address: - 'addr_test1qz09ls06gtsnws8dhquh273tnzj0avf8fumakgmdc40cwazvh204krl8rn5cvnepdzn5zj55wk4uy8nnzwklhzcvtyws67g5de', + "addr_test1qz09ls06gtsnws8dhquh273tnzj0avf8fumakgmdc40cwazvh204krl8rn5cvnepdzn5zj55wk4uy8nnzwklhzcvtyws67g5de", assets: { lovelace: 10_000000n, [asset]: maximumAmount * 2n, @@ -126,12 +126,12 @@ test('Batcher Fee reduction test', () => { invariant( compareAssets(discountFee1.reductionAssets, { [asset]: maximumAmount, - }), + }) ); invariant( compareAssets(discountFee2.reductionAssets, { [asset]: maximumAmount, - }), + }) ); } @@ -144,10 +144,10 @@ test('Batcher Fee reduction test', () => { utxos: [ { txHash: - '73fe9271c8e2b11430d76bfe4b0dad4816c326d08e63439130c863b0a1932649', + "73fe9271c8e2b11430d76bfe4b0dad4816c326d08e63439130c863b0a1932649", outputIndex: 0, address: - 'addr_test1qz09ls06gtsnws8dhquh273tnzj0avf8fumakgmdc40cwazvh204krl8rn5cvnepdzn5zj55wk4uy8nnzwklhzcvtyws67g5de', + "addr_test1qz09ls06gtsnws8dhquh273tnzj0avf8fumakgmdc40cwazvh204krl8rn5cvnepdzn5zj55wk4uy8nnzwklhzcvtyws67g5de", assets: { lovelace: 10_000000n, [asset]: maximumAmount / 2n, @@ -163,10 +163,10 @@ test('Batcher Fee reduction test', () => { utxos: [ { txHash: - '73fe9271c8e2b11430d76bfe4b0dad4816c326d08e63439130c863b0a1932649', + "73fe9271c8e2b11430d76bfe4b0dad4816c326d08e63439130c863b0a1932649", outputIndex: 0, address: - 'addr_test1qz09ls06gtsnws8dhquh273tnzj0avf8fumakgmdc40cwazvh204krl8rn5cvnepdzn5zj55wk4uy8nnzwklhzcvtyws67g5de', + "addr_test1qz09ls06gtsnws8dhquh273tnzj0avf8fumakgmdc40cwazvh204krl8rn5cvnepdzn5zj55wk4uy8nnzwklhzcvtyws67g5de", assets: { lovelace: 10_000000n, [asset]: maximumAmount, @@ -186,12 +186,12 @@ test('Batcher Fee reduction test', () => { invariant( compareAssets(discountFee1.reductionAssets, { [asset]: maximumAmount / 2n, - }), + }) ); invariant( compareAssets(discountFee2.reductionAssets, { [asset]: maximumAmount / 2n, - }), + }) ); } } diff --git a/test/order.test.ts b/test/order.test.ts index af21c9c..9f577ee 100644 --- a/test/order.test.ts +++ b/test/order.test.ts @@ -1,11 +1,11 @@ -import invariant from '@minswap/tiny-invariant'; -import { Address, Data, getAddressDetails } from '@minswap/lucid-cardano'; +import invariant from "@minswap/tiny-invariant"; +import { Address, Data, getAddressDetails } from "@minswap/lucid-cardano"; -import { FIXED_BATCHER_FEE } from '../src/batcher-fee-reduction/configs.internal'; -import { Asset } from '../src/types/asset'; -import { FIXED_DEPOSIT_ADA } from '../src/types/constants'; -import { NetworkId } from '../src/types/network'; -import { OrderV1, OrderV2, StableOrder } from '../src/types/order'; +import { FIXED_BATCHER_FEE } from "../src/batcher-fee-reduction/configs.internal"; +import { Asset } from "../src/types/asset"; +import { FIXED_DEPOSIT_ADA } from "../src/types/constants"; +import { NetworkId } from "../src/types/network"; +import { OrderV1, OrderV2, StableOrder } from "../src/types/order"; let testSender: Address; let testSenderPkh: string; @@ -15,24 +15,24 @@ let testAsset: Asset; let networkId: NetworkId; beforeAll(() => { testSender = - 'addr_test1qpssc0r090a9u0pyvdr9y76sm2xzx04n6d4j0y5hukcx6rxz4dtgkhfdynadkea0qezv99wljdl076xkg2krm96nn8jszmh3w7'; + "addr_test1qpssc0r090a9u0pyvdr9y76sm2xzx04n6d4j0y5hukcx6rxz4dtgkhfdynadkea0qezv99wljdl076xkg2krm96nn8jszmh3w7"; const senderPkh = getAddressDetails(testSender).paymentCredential?.hash; invariant(senderPkh); testSenderPkh = senderPkh; testReceiver = - 'addr_test1wqq9fn7ynjzx3kfddmnsjn69tgm8hrr333adhvw0sfx30lqy38kcs'; + "addr_test1wqq9fn7ynjzx3kfddmnsjn69tgm8hrr333adhvw0sfx30lqy38kcs"; testReceiverDatumHash = - 'b8b912cdbcc998f3f0c18e951928ca179de85735c4fc2d82e8d10777'; + "b8b912cdbcc998f3f0c18e951928ca179de85735c4fc2d82e8d10777"; testAsset = { - policyId: 'e16c2dc8ae937e8d3790c7fd7168d7b994621ba14ca11415f39fed72', - tokenName: '4d494e', + policyId: "e16c2dc8ae937e8d3790c7fd7168d7b994621ba14ca11415f39fed72", + tokenName: "4d494e", }; networkId = NetworkId.TESTNET; }); function buildCommonV1Datum(): Omit< OrderV1.Datum, - 'receiverDatumHash' | 'step' + "receiverDatumHash" | "step" > { return { sender: testSender, @@ -42,7 +42,7 @@ function buildCommonV1Datum(): Omit< }; } -test('V1: SwapExactIn Order to PlutusData Converter', () => { +test("V1: SwapExactIn Order to PlutusData Converter", () => { const order1: OrderV1.Datum = { ...buildCommonV1Datum(), receiverDatumHash: testReceiverDatumHash, @@ -65,17 +65,17 @@ test('V1: SwapExactIn Order to PlutusData Converter', () => { const convertedOrder1 = OrderV1.Datum.fromPlutusData( networkId, - Data.from(Data.to(OrderV1.Datum.toPlutusData(order1))), + Data.from(Data.to(OrderV1.Datum.toPlutusData(order1))) ); const convertedOrder2 = OrderV1.Datum.fromPlutusData( networkId, - Data.from(Data.to(OrderV1.Datum.toPlutusData(order2))), + Data.from(Data.to(OrderV1.Datum.toPlutusData(order2))) ); expect(order1).toEqual(convertedOrder1); expect(order2).toEqual(convertedOrder2); }); -test('V1: SwapExactOut Order to PlutusData Converter', () => { +test("V1: SwapExactOut Order to PlutusData Converter", () => { const order1: OrderV1.Datum = { ...buildCommonV1Datum(), receiverDatumHash: testReceiverDatumHash, @@ -98,17 +98,17 @@ test('V1: SwapExactOut Order to PlutusData Converter', () => { const convertedOrder1 = OrderV1.Datum.fromPlutusData( networkId, - Data.from(Data.to(OrderV1.Datum.toPlutusData(order1))), + Data.from(Data.to(OrderV1.Datum.toPlutusData(order1))) ); const convertedOrder2 = OrderV1.Datum.fromPlutusData( networkId, - Data.from(Data.to(OrderV1.Datum.toPlutusData(order2))), + Data.from(Data.to(OrderV1.Datum.toPlutusData(order2))) ); expect(order1).toEqual(convertedOrder1); expect(order2).toEqual(convertedOrder2); }); -test('V1: Deposit Order to PlutusData Converter', () => { +test("V1: Deposit Order to PlutusData Converter", () => { const order1: OrderV1.Datum = { ...buildCommonV1Datum(), receiverDatumHash: testReceiverDatumHash, @@ -129,17 +129,17 @@ test('V1: Deposit Order to PlutusData Converter', () => { const convertedOrder1 = OrderV1.Datum.fromPlutusData( networkId, - Data.from(Data.to(OrderV1.Datum.toPlutusData(order1))), + Data.from(Data.to(OrderV1.Datum.toPlutusData(order1))) ); const convertedOrder2 = OrderV1.Datum.fromPlutusData( networkId, - Data.from(Data.to(OrderV1.Datum.toPlutusData(order2))), + Data.from(Data.to(OrderV1.Datum.toPlutusData(order2))) ); expect(order1).toEqual(convertedOrder1); expect(order2).toEqual(convertedOrder2); }); -test('V1: Withdraw Order to PlutusData Converter', () => { +test("V1: Withdraw Order to PlutusData Converter", () => { const order1: OrderV1.Datum = { ...buildCommonV1Datum(), receiverDatumHash: testReceiverDatumHash, @@ -162,17 +162,17 @@ test('V1: Withdraw Order to PlutusData Converter', () => { const convertedOrder1 = OrderV1.Datum.fromPlutusData( networkId, - Data.from(Data.to(OrderV1.Datum.toPlutusData(order1))), + Data.from(Data.to(OrderV1.Datum.toPlutusData(order1))) ); const convertedOrder2 = OrderV1.Datum.fromPlutusData( networkId, - Data.from(Data.to(OrderV1.Datum.toPlutusData(order2))), + Data.from(Data.to(OrderV1.Datum.toPlutusData(order2))) ); expect(order1).toEqual(convertedOrder1); expect(order2).toEqual(convertedOrder2); }); -test('V1: Zap Order to PlutusData Converter', () => { +test("V1: Zap Order to PlutusData Converter", () => { const order1: OrderV1.Datum = { ...buildCommonV1Datum(), receiverDatumHash: testReceiverDatumHash, @@ -195,17 +195,17 @@ test('V1: Zap Order to PlutusData Converter', () => { const convertedOrder1 = OrderV1.Datum.fromPlutusData( networkId, - Data.from(Data.to(OrderV1.Datum.toPlutusData(order1))), + Data.from(Data.to(OrderV1.Datum.toPlutusData(order1))) ); const convertedOrder2 = OrderV1.Datum.fromPlutusData( networkId, - Data.from(Data.to(OrderV1.Datum.toPlutusData(order2))), + Data.from(Data.to(OrderV1.Datum.toPlutusData(order2))) ); expect(order1).toEqual(convertedOrder1); expect(order2).toEqual(convertedOrder2); }); -test('Stableswap: Swap Order to PlutusData Converter', () => { +test("Stableswap: Swap Order to PlutusData Converter", () => { const order1: StableOrder.Datum = { ...buildCommonV1Datum(), receiverDatumHash: testReceiverDatumHash, @@ -230,17 +230,17 @@ test('Stableswap: Swap Order to PlutusData Converter', () => { const convertedOrder1 = StableOrder.Datum.fromPlutusData( networkId, - Data.from(Data.to(StableOrder.Datum.toPlutusData(order1))), + Data.from(Data.to(StableOrder.Datum.toPlutusData(order1))) ); const convertedOrder2 = StableOrder.Datum.fromPlutusData( networkId, - Data.from(Data.to(StableOrder.Datum.toPlutusData(order2))), + Data.from(Data.to(StableOrder.Datum.toPlutusData(order2))) ); expect(order1).toEqual(convertedOrder1); expect(order2).toEqual(convertedOrder2); }); -test('Stableswap: Deposit Order to PlutusData Converter', () => { +test("Stableswap: Deposit Order to PlutusData Converter", () => { const order1: StableOrder.Datum = { ...buildCommonV1Datum(), receiverDatumHash: testReceiverDatumHash, @@ -261,17 +261,17 @@ test('Stableswap: Deposit Order to PlutusData Converter', () => { const convertedOrder1 = StableOrder.Datum.fromPlutusData( networkId, - Data.from(Data.to(StableOrder.Datum.toPlutusData(order1))), + Data.from(Data.to(StableOrder.Datum.toPlutusData(order1))) ); const convertedOrder2 = StableOrder.Datum.fromPlutusData( networkId, - Data.from(Data.to(StableOrder.Datum.toPlutusData(order2))), + Data.from(Data.to(StableOrder.Datum.toPlutusData(order2))) ); expect(order1).toEqual(convertedOrder1); expect(order2).toEqual(convertedOrder2); }); -test('Stableswap: Withdraw Order to PlutusData Converter', () => { +test("Stableswap: Withdraw Order to PlutusData Converter", () => { const order1: StableOrder.Datum = { ...buildCommonV1Datum(), receiverDatumHash: testReceiverDatumHash, @@ -292,17 +292,17 @@ test('Stableswap: Withdraw Order to PlutusData Converter', () => { const convertedOrder1 = StableOrder.Datum.fromPlutusData( networkId, - Data.from(Data.to(StableOrder.Datum.toPlutusData(order1))), + Data.from(Data.to(StableOrder.Datum.toPlutusData(order1))) ); const convertedOrder2 = StableOrder.Datum.fromPlutusData( networkId, - Data.from(Data.to(StableOrder.Datum.toPlutusData(order2))), + Data.from(Data.to(StableOrder.Datum.toPlutusData(order2))) ); expect(order1).toEqual(convertedOrder1); expect(order2).toEqual(convertedOrder2); }); -test('Stableswap: Withdraw Imbalance Order to PlutusData Converter', () => { +test("Stableswap: Withdraw Imbalance Order to PlutusData Converter", () => { const order1: StableOrder.Datum = { ...buildCommonV1Datum(), receiverDatumHash: testReceiverDatumHash, @@ -323,17 +323,17 @@ test('Stableswap: Withdraw Imbalance Order to PlutusData Converter', () => { const convertedOrder1 = StableOrder.Datum.fromPlutusData( networkId, - Data.from(Data.to(StableOrder.Datum.toPlutusData(order1))), + Data.from(Data.to(StableOrder.Datum.toPlutusData(order1))) ); const convertedOrder2 = StableOrder.Datum.fromPlutusData( networkId, - Data.from(Data.to(StableOrder.Datum.toPlutusData(order2))), + Data.from(Data.to(StableOrder.Datum.toPlutusData(order2))) ); expect(order1).toEqual(convertedOrder1); expect(order2).toEqual(convertedOrder2); }); -test('Stableswap: Zap Out Order to PlutusData Converter', () => { +test("Stableswap: Zap Out Order to PlutusData Converter", () => { const order1: StableOrder.Datum = { ...buildCommonV1Datum(), receiverDatumHash: testReceiverDatumHash, @@ -354,11 +354,11 @@ test('Stableswap: Zap Out Order to PlutusData Converter', () => { const convertedOrder1 = StableOrder.Datum.fromPlutusData( networkId, - Data.from(Data.to(StableOrder.Datum.toPlutusData(order1))), + Data.from(Data.to(StableOrder.Datum.toPlutusData(order1))) ); const convertedOrder2 = StableOrder.Datum.fromPlutusData( networkId, - Data.from(Data.to(StableOrder.Datum.toPlutusData(order2))), + Data.from(Data.to(StableOrder.Datum.toPlutusData(order2))) ); expect(order1).toEqual(convertedOrder1); expect(order2).toEqual(convertedOrder2); @@ -381,9 +381,9 @@ function buildV2Datums(step: OrderV2.Step): OrderV2.Datum[] { }, step: step, lpAsset: { - policyId: 'd6aae2059baee188f74917493cf7637e679cd219bdfbbf4dcbeb1d0b', + policyId: "d6aae2059baee188f74917493cf7637e679cd219bdfbbf4dcbeb1d0b", tokenName: - 'e08460587b08cca542bd2856b8d5e1d23bf3f63f9916fb81f6d95fda0910bf69', + "e08460587b08cca542bd2856b8d5e1d23bf3f63f9916fb81f6d95fda0910bf69", }, maxBatcherFee: FIXED_BATCHER_FEE, expiredOptions: undefined, @@ -405,9 +405,9 @@ function buildV2Datums(step: OrderV2.Step): OrderV2.Datum[] { }, step: step, lpAsset: { - policyId: 'd6aae2059baee188f74917493cf7637e679cd219bdfbbf4dcbeb1d0b', + policyId: "d6aae2059baee188f74917493cf7637e679cd219bdfbbf4dcbeb1d0b", tokenName: - 'e08460587b08cca542bd2856b8d5e1d23bf3f63f9916fb81f6d95fda0910bf69', + "e08460587b08cca542bd2856b8d5e1d23bf3f63f9916fb81f6d95fda0910bf69", }, maxBatcherFee: FIXED_BATCHER_FEE, expiredOptions: undefined, @@ -429,9 +429,9 @@ function buildV2Datums(step: OrderV2.Step): OrderV2.Datum[] { }, step: step, lpAsset: { - policyId: 'd6aae2059baee188f74917493cf7637e679cd219bdfbbf4dcbeb1d0b', + policyId: "d6aae2059baee188f74917493cf7637e679cd219bdfbbf4dcbeb1d0b", tokenName: - 'e08460587b08cca542bd2856b8d5e1d23bf3f63f9916fb81f6d95fda0910bf69', + "e08460587b08cca542bd2856b8d5e1d23bf3f63f9916fb81f6d95fda0910bf69", }, maxBatcherFee: FIXED_BATCHER_FEE, expiredOptions: undefined, @@ -451,9 +451,9 @@ function buildV2Datums(step: OrderV2.Step): OrderV2.Datum[] { }, step: step, lpAsset: { - policyId: 'd6aae2059baee188f74917493cf7637e679cd219bdfbbf4dcbeb1d0b', + policyId: "d6aae2059baee188f74917493cf7637e679cd219bdfbbf4dcbeb1d0b", tokenName: - 'e08460587b08cca542bd2856b8d5e1d23bf3f63f9916fb81f6d95fda0910bf69', + "e08460587b08cca542bd2856b8d5e1d23bf3f63f9916fb81f6d95fda0910bf69", }, maxBatcherFee: FIXED_BATCHER_FEE, expiredOptions: { @@ -464,7 +464,7 @@ function buildV2Datums(step: OrderV2.Step): OrderV2.Datum[] { ]; } -test('V2: Swap Exact In Order to PlutusData Converter', () => { +test("V2: Swap Exact In Order to PlutusData Converter", () => { const step1: OrderV2.Step = { type: OrderV2.StepType.SWAP_EXACT_IN, swapAmount: { @@ -492,14 +492,14 @@ test('V2: Swap Exact In Order to PlutusData Converter', () => { for (const datum of datums) { const convertedDatum = OrderV2.Datum.fromPlutusData( networkId, - Data.from(Data.to(OrderV2.Datum.toPlutusData(datum))), + Data.from(Data.to(OrderV2.Datum.toPlutusData(datum))) ); expect(datum).toEqual(convertedDatum); } }); -test('V2: Stop Order to PlutusData Converter', () => { +test("V2: Stop Order to PlutusData Converter", () => { const step1: OrderV2.Step = { type: OrderV2.StepType.STOP, swapAmount: { @@ -525,14 +525,14 @@ test('V2: Stop Order to PlutusData Converter', () => { for (const datum of datums) { const convertedDatum = OrderV2.Datum.fromPlutusData( networkId, - Data.from(Data.to(OrderV2.Datum.toPlutusData(datum))), + Data.from(Data.to(OrderV2.Datum.toPlutusData(datum))) ); expect(datum).toEqual(convertedDatum); } }); -test('V2: OCO Order to PlutusData Converter', () => { +test("V2: OCO Order to PlutusData Converter", () => { const step1: OrderV2.Step = { type: OrderV2.StepType.OCO, swapAmount: { @@ -560,14 +560,14 @@ test('V2: OCO Order to PlutusData Converter', () => { for (const datum of datums) { const convertedDatum = OrderV2.Datum.fromPlutusData( networkId, - Data.from(Data.to(OrderV2.Datum.toPlutusData(datum))), + Data.from(Data.to(OrderV2.Datum.toPlutusData(datum))) ); expect(datum).toEqual(convertedDatum); } }); -test('V2: Swap Exact Out Order to PlutusData Converter', () => { +test("V2: Swap Exact Out Order to PlutusData Converter", () => { const step1: OrderV2.Step = { type: OrderV2.StepType.SWAP_EXACT_OUT, maximumSwapAmount: { @@ -595,14 +595,14 @@ test('V2: Swap Exact Out Order to PlutusData Converter', () => { for (const datum of datums) { const convertedDatum = OrderV2.Datum.fromPlutusData( networkId, - Data.from(Data.to(OrderV2.Datum.toPlutusData(datum))), + Data.from(Data.to(OrderV2.Datum.toPlutusData(datum))) ); expect(datum).toEqual(convertedDatum); } }); -test('V2: Deposit Order to PlutusData Converter', () => { +test("V2: Deposit Order to PlutusData Converter", () => { const step1: OrderV2.Step = { type: OrderV2.StepType.DEPOSIT, depositAmount: { @@ -630,14 +630,14 @@ test('V2: Deposit Order to PlutusData Converter', () => { for (const datum of datums) { const convertedDatum = OrderV2.Datum.fromPlutusData( networkId, - Data.from(Data.to(OrderV2.Datum.toPlutusData(datum))), + Data.from(Data.to(OrderV2.Datum.toPlutusData(datum))) ); expect(datum).toEqual(convertedDatum); } }); -test('V2: Withdraw Order to PlutusData Converter', () => { +test("V2: Withdraw Order to PlutusData Converter", () => { const step1: OrderV2.Step = { type: OrderV2.StepType.WITHDRAW, withdrawalAmount: { @@ -665,14 +665,14 @@ test('V2: Withdraw Order to PlutusData Converter', () => { for (const datum of datums) { const convertedDatum = OrderV2.Datum.fromPlutusData( networkId, - Data.from(Data.to(OrderV2.Datum.toPlutusData(datum))), + Data.from(Data.to(OrderV2.Datum.toPlutusData(datum))) ); expect(datum).toEqual(convertedDatum); } }); -test('V2: Zap Out Order to PlutusData Converter', () => { +test("V2: Zap Out Order to PlutusData Converter", () => { const step1: OrderV2.Step = { type: OrderV2.StepType.ZAP_OUT, withdrawalAmount: { @@ -700,14 +700,14 @@ test('V2: Zap Out Order to PlutusData Converter', () => { for (const datum of datums) { const convertedDatum = OrderV2.Datum.fromPlutusData( networkId, - Data.from(Data.to(OrderV2.Datum.toPlutusData(datum))), + Data.from(Data.to(OrderV2.Datum.toPlutusData(datum))) ); expect(datum).toEqual(convertedDatum); } }); -test('V2: Partial Swap Order to PlutusData Converter', () => { +test("V2: Partial Swap Order to PlutusData Converter", () => { const step1: OrderV2.Step = { type: OrderV2.StepType.PARTIAL_SWAP, totalSwapAmount: 10000n, @@ -735,14 +735,14 @@ test('V2: Partial Swap Order to PlutusData Converter', () => { for (const datum of datums) { const convertedDatum = OrderV2.Datum.fromPlutusData( networkId, - Data.from(Data.to(OrderV2.Datum.toPlutusData(datum))), + Data.from(Data.to(OrderV2.Datum.toPlutusData(datum))) ); expect(datum).toEqual(convertedDatum); } }); -test('V2: Withdraw Imbalance Order to PlutusData Converter', () => { +test("V2: Withdraw Imbalance Order to PlutusData Converter", () => { const step1: OrderV2.Step = { type: OrderV2.StepType.WITHDRAW_IMBALANCE, withdrawalAmount: { @@ -772,14 +772,14 @@ test('V2: Withdraw Imbalance Order to PlutusData Converter', () => { for (const datum of datums) { const convertedDatum = OrderV2.Datum.fromPlutusData( networkId, - Data.from(Data.to(OrderV2.Datum.toPlutusData(datum))), + Data.from(Data.to(OrderV2.Datum.toPlutusData(datum))) ); expect(datum).toEqual(convertedDatum); } }); -test('V2: Routing Order to PlutusData Converter', () => { +test("V2: Routing Order to PlutusData Converter", () => { const step: OrderV2.Step = { type: OrderV2.StepType.SWAP_ROUTING, swapAmount: { @@ -791,17 +791,17 @@ test('V2: Routing Order to PlutusData Converter', () => { { direction: OrderV2.Direction.A_TO_B, lpAsset: { - policyId: 'f5808c2c990d86da54bfc97d89cee6efa20cd8461616359478d96b4c', + policyId: "f5808c2c990d86da54bfc97d89cee6efa20cd8461616359478d96b4c", tokenName: - 'ef4530398e53eea75ee3d02a982e87a5c680776904b5d610e63bf6970c528a12', + "ef4530398e53eea75ee3d02a982e87a5c680776904b5d610e63bf6970c528a12", }, }, { direction: OrderV2.Direction.B_TO_A, lpAsset: { - policyId: 'f5808c2c990d86da54bfc97d89cee6efa20cd8461616359478d96b4c', + policyId: "f5808c2c990d86da54bfc97d89cee6efa20cd8461616359478d96b4c", tokenName: - 'eebaae50fe9a09938558096cfebe0aec7dd2728dedadb3d96f02f19e756ca9b8', + "eebaae50fe9a09938558096cfebe0aec7dd2728dedadb3d96f02f19e756ca9b8", }, }, ], @@ -810,14 +810,14 @@ test('V2: Routing Order to PlutusData Converter', () => { for (const datum of datums) { const convertedDatum = OrderV2.Datum.fromPlutusData( networkId, - Data.from(Data.to(OrderV2.Datum.toPlutusData(datum))), + Data.from(Data.to(OrderV2.Datum.toPlutusData(datum))) ); expect(datum).toEqual(convertedDatum); } }); -test('V2: Donation Order to PlutusData Converter', () => { +test("V2: Donation Order to PlutusData Converter", () => { const step: OrderV2.Step = { type: OrderV2.StepType.DONATION, }; @@ -825,7 +825,7 @@ test('V2: Donation Order to PlutusData Converter', () => { for (const datum of datums) { const convertedDatum = OrderV2.Datum.fromPlutusData( networkId, - Data.from(Data.to(OrderV2.Datum.toPlutusData(datum))), + Data.from(Data.to(OrderV2.Datum.toPlutusData(datum))) ); expect(datum).toEqual(convertedDatum); diff --git a/test/pool.test.ts b/test/pool.test.ts index 06817d6..2c56ed7 100644 --- a/test/pool.test.ts +++ b/test/pool.test.ts @@ -1,78 +1,78 @@ -import JSONBig from 'json-bigint'; -import { Data } from '@minswap/lucid-cardano'; +import JSONBig from "json-bigint"; +import { Data } from "@minswap/lucid-cardano"; -import { NetworkId } from '../src'; -import { ADA, Asset } from '../src/types/asset'; -import { PoolV1 } from '../src/types/pool'; -import { isValidPoolOutput, PoolFeeSharing } from '../src/types/pool.internal'; -import { TxIn, Value } from '../src/types/tx.internal'; +import { NetworkId } from "../src"; +import { ADA, Asset } from "../src/types/asset"; +import { PoolV1 } from "../src/types/pool"; +import { isValidPoolOutput, PoolFeeSharing } from "../src/types/pool.internal"; +import { TxIn, Value } from "../src/types/tx.internal"; const PREPROD_POOL_ADDRESS = - 'addr_test1zrsnz7c4974vzdpxu65ruphl3zjdvtxw8strf2c2tmqnxzvrajt8r8wqtygrfduwgukk73m5gcnplmztc5tl5ngy0upqs8q93k'; + "addr_test1zrsnz7c4974vzdpxu65ruphl3zjdvtxw8strf2c2tmqnxzvrajt8r8wqtygrfduwgukk73m5gcnplmztc5tl5ngy0upqs8q93k"; -test('can handle pool with one side being LP tokens', () => { +test("can handle pool with one side being LP tokens", () => { const txIn: TxIn = { - txHash: '8626060cf100c9b777546808e0ad20c099fe35cfcaee8de0079aa6c6931d345b', + txHash: "8626060cf100c9b777546808e0ad20c099fe35cfcaee8de0079aa6c6931d345b", index: 3, }; const value: Value = [ - { unit: 'lovelace', quantity: '111990389' }, + { unit: "lovelace", quantity: "111990389" }, { - unit: '0be55d262b29f564998ff81efe21bdc0022621c12f15af08d0f2ddb13e4a0451d432d1e4dbd6c5c6aebfbd0b995a72d52be4d3e2d184e4b1081d3b13', - quantity: '1', + unit: "0be55d262b29f564998ff81efe21bdc0022621c12f15af08d0f2ddb13e4a0451d432d1e4dbd6c5c6aebfbd0b995a72d52be4d3e2d184e4b1081d3b13", + quantity: "1", }, { - unit: '13aa2accf2e1561723aa26871e071fdf32c867cff7e7d50ad470d62f4d494e53574150', - quantity: '1', + unit: "13aa2accf2e1561723aa26871e071fdf32c867cff7e7d50ad470d62f4d494e53574150", + quantity: "1", }, { - unit: 'e4214b7cce62ac6fbba385d164df48e157eae5863521b4b67ca71d866aa2153e1ae896a95539c9d62f76cedcdabdcdf144e564b8955f609d660cf6a2', - quantity: '212939798', + unit: "e4214b7cce62ac6fbba385d164df48e157eae5863521b4b67ca71d866aa2153e1ae896a95539c9d62f76cedcdabdcdf144e564b8955f609d660cf6a2", + quantity: "212939798", }, ]; const datumHash = - '421d71a088b55789301a403994760d1f2854444b0380fc3df8970f8e212b3f30'; + "421d71a088b55789301a403994760d1f2854444b0380fc3df8970f8e212b3f30"; expect( - isValidPoolOutput(PREPROD_POOL_ADDRESS, value, datumHash), + isValidPoolOutput(PREPROD_POOL_ADDRESS, value, datumHash) ).toBeTruthy(); expect( - new PoolV1.State(PREPROD_POOL_ADDRESS, txIn, value, datumHash), + new PoolV1.State(PREPROD_POOL_ADDRESS, txIn, value, datumHash) ).toBeInstanceOf(PoolV1.State); }); -test('Fee Sharing to PlutusData Converter', () => { +test("Fee Sharing to PlutusData Converter", () => { const feeSharing1: PoolFeeSharing = { - feeTo: 'addr_test1wqq9fn7ynjzx3kfddmnsjn69tgm8hrr333adhvw0sfx30lqy38kcs', - feeToDatumHash: 'b8b912cdbcc998f3f0c18e951928ca179de85735c4fc2d82e8d10777', + feeTo: "addr_test1wqq9fn7ynjzx3kfddmnsjn69tgm8hrr333adhvw0sfx30lqy38kcs", + feeToDatumHash: "b8b912cdbcc998f3f0c18e951928ca179de85735c4fc2d82e8d10777", }; const feeSharing2: PoolFeeSharing = { feeTo: - 'addr_test1qp7e4l2z307kjsashtgl2l373hd06jumuspl0qn2fklc6tlf6dsm8jwtvdltnax4fl7uu8w9mh2u8f420ul5vp8q3jas7yep6y', + "addr_test1qp7e4l2z307kjsashtgl2l373hd06jumuspl0qn2fklc6tlf6dsm8jwtvdltnax4fl7uu8w9mh2u8f420ul5vp8q3jas7yep6y", feeToDatumHash: undefined, }; const convertedFeeSharing1 = PoolFeeSharing.fromPlutusData( NetworkId.TESTNET, - Data.from(Data.to(PoolFeeSharing.toPlutusData(feeSharing1))), + Data.from(Data.to(PoolFeeSharing.toPlutusData(feeSharing1))) ); const convertedFeeSharing2 = PoolFeeSharing.fromPlutusData( NetworkId.TESTNET, - Data.from(Data.to(PoolFeeSharing.toPlutusData(feeSharing2))), + Data.from(Data.to(PoolFeeSharing.toPlutusData(feeSharing2))) ); expect(JSONBig.stringify(feeSharing1)).toEqual( - JSONBig.stringify(convertedFeeSharing1), + JSONBig.stringify(convertedFeeSharing1) ); expect(JSONBig.stringify(feeSharing2)).toEqual( - JSONBig.stringify(convertedFeeSharing2), + JSONBig.stringify(convertedFeeSharing2) ); }); -test('Pool Datum to PlutusData Converter', () => { +test("Pool Datum to PlutusData Converter", () => { const assetA = ADA; const assetB: Asset = { - policyId: 'e16c2dc8ae937e8d3790c7fd7168d7b994621ba14ca11415f39fed72', - tokenName: '4d494e', + policyId: "e16c2dc8ae937e8d3790c7fd7168d7b994621ba14ca11415f39fed72", + tokenName: "4d494e", }; const poolDatum1: PoolV1.Datum = { assetA: assetA, @@ -81,7 +81,7 @@ test('Pool Datum to PlutusData Converter', () => { rootKLast: 10000n, feeSharing: { feeTo: - 'addr_test1qp7e4l2z307kjsashtgl2l373hd06jumuspl0qn2fklc6tlf6dsm8jwtvdltnax4fl7uu8w9mh2u8f420ul5vp8q3jas7yep6y', + "addr_test1qp7e4l2z307kjsashtgl2l373hd06jumuspl0qn2fklc6tlf6dsm8jwtvdltnax4fl7uu8w9mh2u8f420ul5vp8q3jas7yep6y", feeToDatumHash: undefined, }, }; @@ -96,17 +96,17 @@ test('Pool Datum to PlutusData Converter', () => { const convertedPoolDatum1 = PoolV1.Datum.fromPlutusData( NetworkId.TESTNET, - Data.from(Data.to(PoolV1.Datum.toPlutusData(poolDatum1))), + Data.from(Data.to(PoolV1.Datum.toPlutusData(poolDatum1))) ); const convertedPoolDatum2 = PoolV1.Datum.fromPlutusData( NetworkId.TESTNET, - Data.from(Data.to(PoolV1.Datum.toPlutusData(poolDatum2))), + Data.from(Data.to(PoolV1.Datum.toPlutusData(poolDatum2))) ); expect(JSONBig.stringify(poolDatum1)).toEqual( - JSONBig.stringify(convertedPoolDatum1), + JSONBig.stringify(convertedPoolDatum1) ); expect(JSONBig.stringify(poolDatum2)).toEqual( - JSONBig.stringify(convertedPoolDatum2), + JSONBig.stringify(convertedPoolDatum2) ); }); From a0c27ded470588d3cb77a98ba1db879d0543e993 Mon Sep 17 00:00:00 2001 From: Vardominator Date: Sun, 15 Dec 2024 15:21:53 +0000 Subject: [PATCH 10/22] fix inline datum check --- src/adapters/maestro.ts | 246 ++++++++++++++++++++++++---------------- 1 file changed, 149 insertions(+), 97 deletions(-) diff --git a/src/adapters/maestro.ts b/src/adapters/maestro.ts index b1159aa..5006464 100644 --- a/src/adapters/maestro.ts +++ b/src/adapters/maestro.ts @@ -2,31 +2,32 @@ import { Asset as MaestroUtxoAsset, MaestroClient, UtxoWithSlot, -} from '@maestro-org/typescript-sdk'; -import { Address } from '@minswap/lucid-cardano'; -import invariant from '@minswap/tiny-invariant'; -import Big from 'big.js'; - -import { PoolV1, PoolV2, StablePool } from '..'; -import { StableswapCalculation } from '../calculate'; -import { Asset } from '../types/asset'; +} from "@maestro-org/typescript-sdk"; +import { Address } from "@minswap/lucid-cardano"; +import invariant from "@minswap/tiny-invariant"; +import Big from "big.js"; + +import { PoolV1, PoolV2, StablePool } from ".."; +import { StableswapCalculation } from "../calculate"; +import { Asset } from "../types/asset"; import { DexV1Constant, DexV2Constant, LbeV2Constant, StableswapConstant, -} from '../types/constants'; -import { FactoryV2 } from '../types/factory'; -import { LbeV2Types } from '../types/lbe-v2'; -import { NetworkId } from '../types/network'; +} from "../types/constants"; +import { FactoryV2 } from "../types/factory"; +import { LbeV2Types } from "../types/lbe-v2"; +import { NetworkId } from "../types/network"; +import { OrderV2 } from "../types/order"; import { checkValidPoolOutput, isValidPoolOutput, normalizeAssets, -} from '../types/pool.internal'; -import { StringUtils } from '../types/string'; -import { TxHistory, TxIn, Value } from '../types/tx.internal'; -import { getScriptHashFromAddress } from '../utils/address-utils.internal'; +} from "../types/pool.internal"; +import { StringUtils } from "../types/string"; +import { TxHistory, TxIn, Value } from "../types/tx.internal"; +import { getScriptHashFromAddress } from "../utils/address-utils.internal"; import { Adapter, GetPoolByIdParams, @@ -36,7 +37,7 @@ import { GetStablePoolPriceParams, GetV2PoolHistoryParams, GetV2PoolPriceParams, -} from './adapter'; +} from "./adapter"; export declare class MaestroServerError { code: number; @@ -47,10 +48,10 @@ export declare class MaestroServerError { export type MaestroPaginationOptions = { count?: number; cursor?: string; - order?: 'asc' | 'desc'; + order?: "asc" | "desc"; }; -export type GetPoolsParams = Omit & { +export type GetPoolsParams = Omit & { cursor: string; }; @@ -75,7 +76,7 @@ export class MaestroAdapter implements Adapter { } public async getAssetDecimals(asset: string): Promise { - if (asset === 'lovelace') { + if (asset === "lovelace") { return 6; } try { @@ -106,19 +107,19 @@ export class MaestroAdapter implements Adapter { const poolTx = await this.maestroClient.transactions.txInfo(txHash); const poolUtxo = poolTx.data.outputs.find( (o: (typeof poolTx.data.outputs)[number]) => - getScriptHashFromAddress(o.address) === DexV1Constant.POOL_SCRIPT_HASH, + getScriptHashFromAddress(o.address) === DexV1Constant.POOL_SCRIPT_HASH ); if (!poolUtxo) { return null; } const poolUtxoAmount = this.mapMaestroAssetToValue(poolUtxo.assets); - const poolUtxoDatumHash = poolUtxo.datum?.hash ?? ''; + const poolUtxoDatumHash = poolUtxo.datum?.hash ?? ""; checkValidPoolOutput(poolUtxo.address, poolUtxoAmount, poolUtxoDatumHash); invariant( poolUtxoDatumHash, - `expect pool to have datum hash, got ${poolUtxoDatumHash}`, + `expect pool to have datum hash, got ${poolUtxoDatumHash}` ); const txIn: TxIn = { txHash: txHash, index: poolUtxo.index }; @@ -126,7 +127,7 @@ export class MaestroAdapter implements Adapter { poolUtxo.address, txIn, poolUtxoAmount, - poolUtxoDatumHash, + poolUtxoDatumHash ); } @@ -136,7 +137,7 @@ export class MaestroAdapter implements Adapter { const nft = `${DexV1Constant.POOL_NFT_POLICY_ID}${id}`; const nftTxs = await this.maestroClient.assets.assetTxs(nft, { count: 1, - order: 'desc', + order: "desc", }); if (nftTxs.data.length === 0) { return null; @@ -147,11 +148,11 @@ export class MaestroAdapter implements Adapter { public async getV1Pools({ cursor, count = 100, - order = 'asc', + order = "asc", }: GetPoolsParams): Promise { const utxosResponse = await this.maestroClient.addresses.utxosByAddress( DexV1Constant.POOL_SCRIPT_HASH, - { cursor, count, order }, + { cursor, count, order } ); const utxos = utxosResponse.data; return utxos @@ -159,20 +160,20 @@ export class MaestroAdapter implements Adapter { isValidPoolOutput( utxo.address, this.mapMaestroAssetToValue(utxo.assets), - utxo.datum?.hash ?? '', - ), + utxo.datum?.hash ?? "" + ) ) .map((utxo: (typeof utxos)[number]) => { invariant( utxo.datum?.hash, - `expect pool to have datum hash, got ${utxo.datum?.hash}`, + `expect pool to have datum hash, got ${utxo.datum?.hash}` ); const txIn: TxIn = { txHash: utxo.tx_hash, index: utxo.index }; return new PoolV1.State( utxo.address, txIn, this.mapMaestroAssetToValue(utxo.assets), - utxo.datum?.hash, + utxo.datum?.hash ); }); } @@ -180,7 +181,7 @@ export class MaestroAdapter implements Adapter { public async getV1PoolHistory({ id, count = 100, - order = 'desc', + order = "desc", }: GetV1PoolHistoryParams): Promise { const nft = `${DexV1Constant.POOL_NFT_POLICY_ID}${id}`; const nftTxs = await this.maestroClient.assets.assetTxs(nft, { @@ -194,7 +195,7 @@ export class MaestroAdapter implements Adapter { txIndex: 0, // TBD if this works: Maestro Asset Txs doesn't return index blockHeight: tx.slot, time: new Date(tx.timestamp), - }), + }) ); } @@ -210,10 +211,10 @@ export class MaestroAdapter implements Adapter { decimalsB = await this.getAssetDecimals(pool.assetB); } const adjustedReserveA = Big(pool.reserveA.toString()).div( - Big(10).pow(decimalsA), + Big(10).pow(decimalsA) ); const adjustedReserveB = Big(pool.reserveB.toString()).div( - Big(10).pow(decimalsB), + Big(10).pow(decimalsB) ); const priceAB = adjustedReserveA.div(adjustedReserveB); const priceBA = adjustedReserveB.div(adjustedReserveA); @@ -226,7 +227,7 @@ export class MaestroAdapter implements Adapter { }> { const v2Config = DexV2Constant.CONFIG[this.networkId]; const utxos = await this.maestroClient.addresses.utxosByAddress( - v2Config.poolScriptHashBech32, + v2Config.poolScriptHashBech32 ); const utxosData = utxos.data; @@ -234,7 +235,7 @@ export class MaestroAdapter implements Adapter { const errors: unknown[] = []; for (const utxo of utxosData) { try { - if (!utxo.datum) { + if (utxo.datum?.type != "inline") { throw new Error(`Cannot find datum of Pool V2, tx: ${utxo.tx_hash}`); } const pool = new PoolV2.State( @@ -242,7 +243,7 @@ export class MaestroAdapter implements Adapter { utxo.address, { txHash: utxo.tx_hash, index: utxo.index }, this.mapMaestroAssetToValue(utxo.assets), - utxo.datum.hash, + utxo.datum.hash ); pools.push(pool); } catch (err) { @@ -258,7 +259,7 @@ export class MaestroAdapter implements Adapter { public async getV2Pools({ cursor, count = 100, - order = 'asc', + order = "asc", }: GetPoolsParams): Promise<{ pools: PoolV2.State[]; errors: unknown[] }> { const v2Config = DexV2Constant.CONFIG[this.networkId]; const utxos = await this.maestroClient.addresses.utxosByAddress( @@ -268,7 +269,7 @@ export class MaestroAdapter implements Adapter { cursor, count, order, - }, + } ); const utxosData = utxos.data; @@ -276,7 +277,7 @@ export class MaestroAdapter implements Adapter { const errors: unknown[] = []; for (const utxo of utxosData) { try { - if (!utxo.datum) { + if (utxo.datum?.type != "inline") { throw new Error(`Cannot find datum of Pool V2, tx: ${utxo.tx_hash}`); } const pool = new PoolV2.State( @@ -284,7 +285,7 @@ export class MaestroAdapter implements Adapter { utxo.address, { txHash: utxo.tx_hash, index: utxo.index }, this.mapMaestroAssetToValue(utxo.assets), - utxo.datum.hash, + utxo.datum.hash ); pools.push(pool); } catch (err) { @@ -299,17 +300,17 @@ export class MaestroAdapter implements Adapter { public async getV2PoolByPair( assetA: Asset, - assetB: Asset, + assetB: Asset ): Promise { const [normalizedAssetA, normalizedAssetB] = normalizeAssets( Asset.toString(assetA), - Asset.toString(assetB), + Asset.toString(assetB) ); const { pools: allPools } = await this.getAllV2Pools(); return ( allPools.find( (pool) => - pool.assetA === normalizedAssetA && pool.assetB === normalizedAssetB, + pool.assetA === normalizedAssetA && pool.assetB === normalizedAssetB ) ?? null ); } @@ -323,9 +324,9 @@ export class MaestroAdapter implements Adapter { } public async getV2PoolHistory( - _params: GetV2PoolHistoryParams, + _params: GetV2PoolHistoryParams ): Promise { - throw Error('Not supported yet. Please use MinswapAdapter'); + throw Error("Not supported yet. Please use MinswapAdapter"); } public async getV2PoolPrice({ @@ -340,10 +341,10 @@ export class MaestroAdapter implements Adapter { decimalsB = await this.getAssetDecimals(pool.assetB); } const adjustedReserveA = Big(pool.reserveA.toString()).div( - Big(10).pow(decimalsA), + Big(10).pow(decimalsA) ); const adjustedReserveB = Big(pool.reserveB.toString()).div( - Big(10).pow(decimalsB), + Big(10).pow(decimalsB) ); const priceAB = adjustedReserveA.div(adjustedReserveB); const priceBA = adjustedReserveB.div(adjustedReserveA); @@ -359,7 +360,7 @@ export class MaestroAdapter implements Adapter { v2Config.factoryScriptHashBech32, { asset: v2Config.factoryAsset, - }, + } ); const utxosData = utxos.data; @@ -367,9 +368,9 @@ export class MaestroAdapter implements Adapter { const errors: unknown[] = []; for (const utxo of utxosData) { try { - if (!utxo.datum) { + if (utxo.datum?.type != "inline") { throw new Error( - `Cannot find datum of Factory V2, tx: ${utxo.tx_hash}`, + `Cannot find datum of Factory V2, tx: ${utxo.tx_hash}` ); } const factory = new FactoryV2.State( @@ -377,7 +378,7 @@ export class MaestroAdapter implements Adapter { utxo.address, { txHash: utxo.tx_hash, index: utxo.index }, this.mapMaestroAssetToValue(utxo.assets), - utxo.datum.hash, + utxo.datum.hash ); factories.push(factory); } catch (err) { @@ -392,7 +393,7 @@ export class MaestroAdapter implements Adapter { public async getFactoryV2ByPair( assetA: Asset, - assetB: Asset, + assetB: Asset ): Promise { const factoryIdent = PoolV2.computeLPAssetName(assetA, assetB); const { factories: allFactories } = await this.getAllFactoriesV2(); @@ -408,23 +409,74 @@ export class MaestroAdapter implements Adapter { return null; } + public async getAllV2Orders(): Promise<{ + orders: OrderV2.State[]; + errors: unknown[]; + }> { + const v2Config = DexV2Constant.CONFIG[this.networkId]; + const utxos = await this.maestroClient.addresses.utxosByAddress( + v2Config.orderScriptHashBech32 + ); + + const utxosData = utxos.data; + const orders: OrderV2.State[] = []; + const errors: unknown[] = []; + for (const utxo of utxosData) { + try { + let order: OrderV2.State | undefined = undefined; + if (utxo.datum?.type === "inline") { + order = new OrderV2.State( + this.networkId, + utxo.address, + { txHash: utxo.tx_hash, index: utxo.index }, + this.mapMaestroAssetToValue(utxo.assets), + utxo.datum.hash + ); + } else if (utxo.datum?.hash !== null) { + const orderDatumHash = utxo.datum?.hash ?? ""; + const orderDatum = + await this.maestroClient.datum.lookupDatum(orderDatumHash); + order = new OrderV2.State( + this.networkId, + utxo.address, + { txHash: utxo.tx_hash, index: utxo.index }, + this.mapMaestroAssetToValue(utxo.assets), + orderDatum.data.bytes + ); + } + + if (order === undefined) { + throw new Error(`Cannot find datum of Order V2, tx: ${utxo.tx_hash}`); + } + + orders.push(order); + } catch (err) { + errors.push(err); + } + } + return { + orders: orders, + errors: errors, + }; + } + private async parseStablePoolState( - utxo: UtxoWithSlot, + utxo: UtxoWithSlot ): Promise { let datum: string; - if (utxo.datum?.hash) { + if (utxo.datum?.type === "inline") { datum = utxo.datum.hash; } else if (utxo.datum?.hash) { datum = await this.getDatumByDatumHash(utxo.datum.hash); } else { - throw new Error('Cannot find datum of Stable Pool'); + throw new Error("Cannot find datum of Stable Pool"); } const pool = new StablePool.State( this.networkId, utxo.address, { txHash: utxo.tx_hash, index: utxo.index }, this.mapMaestroAssetToValue(utxo.assets), - datum, + datum ); return pool; } @@ -434,7 +486,7 @@ export class MaestroAdapter implements Adapter { errors: unknown[]; }> { const poolAddresses = StableswapConstant.CONFIG[this.networkId].map( - (cfg) => cfg.poolAddress, + (cfg) => cfg.poolAddress ); const pools: StablePool.State[] = []; const errors: unknown[] = []; @@ -458,22 +510,22 @@ export class MaestroAdapter implements Adapter { } public async getStablePoolByLpAsset( - lpAsset: Asset, + lpAsset: Asset ): Promise { const config = StableswapConstant.CONFIG[this.networkId].find( - (cfg) => cfg.lpAsset === Asset.toString(lpAsset), + (cfg) => cfg.lpAsset === Asset.toString(lpAsset) ); invariant( config, `getStablePoolByLpAsset: Can not find stableswap config by LP Asset ${Asset.toString( - lpAsset, - )}`, + lpAsset + )}` ); const utxos = await this.maestroClient.addresses.utxosByAddress( config.poolAddress, { asset: config.nftAsset, - }, + } ); const utxosData = utxos.data; @@ -485,14 +537,14 @@ export class MaestroAdapter implements Adapter { } public async getStablePoolByNFT( - nft: Asset, + nft: Asset ): Promise { const poolAddress = StableswapConstant.CONFIG[this.networkId].find( - (cfg) => cfg.nftAsset === Asset.toString(nft), + (cfg) => cfg.nftAsset === Asset.toString(nft) )?.poolAddress; if (!poolAddress) { throw new Error( - `Cannot find Stable Pool having NFT ${Asset.toString(nft)}`, + `Cannot find Stable Pool having NFT ${Asset.toString(nft)}` ); } @@ -500,7 +552,7 @@ export class MaestroAdapter implements Adapter { poolAddress, { asset: Asset.toString(nft), - }, + } ); const utxosData = utxos.data; @@ -512,9 +564,9 @@ export class MaestroAdapter implements Adapter { } getStablePoolHistory( - _params: GetStablePoolHistoryParams, + _params: GetStablePoolHistoryParams ): Promise { - throw Error('Not supported yet. Please use MinswapAdapter'); + throw Error("Not supported yet. Please use MinswapAdapter"); } public getStablePoolPrice({ @@ -528,7 +580,7 @@ export class MaestroAdapter implements Adapter { config.multiples, pool.amp, assetAIndex, - assetBIndex, + assetBIndex ); return Big(priceNum.toString()).div(priceDen.toString()); @@ -543,7 +595,7 @@ export class MaestroAdapter implements Adapter { config.factoryHashBech32, { asset: config.factoryAsset, - }, + } ); const utxosData = utxos.data; @@ -551,9 +603,9 @@ export class MaestroAdapter implements Adapter { const errors: unknown[] = []; for (const utxo of utxosData) { try { - if (!utxo.datum) { + if (utxo.datum?.type != "inline") { throw new Error( - `Cannot find datum of LBE V2 Factory, tx: ${utxo.tx_hash}`, + `Cannot find datum of LBE V2 Factory, tx: ${utxo.tx_hash}` ); } @@ -562,7 +614,7 @@ export class MaestroAdapter implements Adapter { utxo.address, { txHash: utxo.tx_hash, index: utxo.index }, this.mapMaestroAssetToValue(utxo.assets), - utxo.datum.hash, + utxo.datum.hash ); factories.push(factory); } catch (err) { @@ -577,7 +629,7 @@ export class MaestroAdapter implements Adapter { public async getLbeV2Factory( baseAsset: Asset, - raiseAsset: Asset, + raiseAsset: Asset ): Promise { const factoryIdent = PoolV2.computeLPAssetName(baseAsset, raiseAsset); const { factories: allFactories } = await this.getAllLbeV2Factories(); @@ -624,7 +676,7 @@ export class MaestroAdapter implements Adapter { config.treasuryHashBech32, { asset: config.treasuryAsset, - }, + } ); const utxosData = utxos.data; @@ -632,9 +684,9 @@ export class MaestroAdapter implements Adapter { const errors: unknown[] = []; for (const utxo of utxosData) { try { - if (!utxo.datum) { + if (utxo.datum?.type != "inline") { throw new Error( - `Cannot find datum of LBE V2 Treasury, tx: ${utxo.tx_hash}`, + `Cannot find datum of LBE V2 Treasury, tx: ${utxo.tx_hash}` ); } @@ -643,7 +695,7 @@ export class MaestroAdapter implements Adapter { utxo.address, { txHash: utxo.tx_hash, index: utxo.index }, this.mapMaestroAssetToValue(utxo.assets), - utxo.datum.hash, + utxo.datum.hash ); treasuries.push(treasury); } catch (err) { @@ -657,7 +709,7 @@ export class MaestroAdapter implements Adapter { } public async getLbeV2TreasuryByLbeId( - lbeId: string, + lbeId: string ): Promise { const { treasuries: allTreasuries } = await this.getAllLbeV2Treasuries(); for (const treasury of allTreasuries) { @@ -678,7 +730,7 @@ export class MaestroAdapter implements Adapter { config.managerHashBech32, { asset: config.managerAsset, - }, + } ); const utxosData = utxos.data; @@ -686,9 +738,9 @@ export class MaestroAdapter implements Adapter { const errors: unknown[] = []; for (const utxo of utxosData) { try { - if (!utxo.datum) { + if (utxo.datum?.type != "inline") { throw new Error( - `Cannot find datum of Lbe V2 Manager, tx: ${utxo.tx_hash}`, + `Cannot find datum of Lbe V2 Manager, tx: ${utxo.tx_hash}` ); } @@ -697,7 +749,7 @@ export class MaestroAdapter implements Adapter { utxo.address, { txHash: utxo.tx_hash, index: utxo.index }, this.mapMaestroAssetToValue(utxo.assets), - utxo.datum.hash, + utxo.datum.hash ); managers.push(manager); } catch (err) { @@ -711,7 +763,7 @@ export class MaestroAdapter implements Adapter { } public async getLbeV2ManagerByLbeId( - lbeId: string, + lbeId: string ): Promise { const { managers } = await this.getAllLbeV2Managers(); for (const manager of managers) { @@ -732,7 +784,7 @@ export class MaestroAdapter implements Adapter { config.sellerHashBech32, { asset: config.sellerAsset, - }, + } ); const utxosData = utxos.data; @@ -740,9 +792,9 @@ export class MaestroAdapter implements Adapter { const errors: unknown[] = []; for (const utxo of utxosData) { try { - if (!utxo.datum) { + if (utxo.datum?.type != "inline") { throw new Error( - `Cannot find datum of Lbe V2 Seller, tx: ${utxo.tx_hash}`, + `Cannot find datum of Lbe V2 Seller, tx: ${utxo.tx_hash}` ); } @@ -751,7 +803,7 @@ export class MaestroAdapter implements Adapter { utxo.address, { txHash: utxo.tx_hash, index: utxo.index }, this.mapMaestroAssetToValue(utxo.assets), - utxo.datum.hash, + utxo.datum.hash ); sellers.push(seller); } catch (err) { @@ -765,7 +817,7 @@ export class MaestroAdapter implements Adapter { } public async getLbeV2SellerByLbeId( - lbeId: string, + lbeId: string ): Promise { const { sellers } = await this.getAllLbeV2Sellers(); for (const seller of sellers) { @@ -786,7 +838,7 @@ export class MaestroAdapter implements Adapter { config.orderHashBech32, { asset: config.orderAsset, - }, + } ); const utxosData = utxos.data; @@ -794,9 +846,9 @@ export class MaestroAdapter implements Adapter { const errors: unknown[] = []; for (const utxo of utxosData) { try { - if (!utxo.datum) { + if (utxo.datum?.type != "inline") { throw new Error( - `Cannot find datum of Lbe V2 Order, tx: ${utxo.tx_hash}`, + `Cannot find datum of Lbe V2 Order, tx: ${utxo.tx_hash}` ); } @@ -805,7 +857,7 @@ export class MaestroAdapter implements Adapter { utxo.address, { txHash: utxo.tx_hash, index: utxo.index }, this.mapMaestroAssetToValue(utxo.assets), - utxo.datum.hash, + utxo.datum.hash ); orders.push(order); } catch (err) { @@ -819,7 +871,7 @@ export class MaestroAdapter implements Adapter { } public async getLbeV2OrdersByLbeId( - lbeId: string, + lbeId: string ): Promise { const { orders: allOrders } = await this.getAllLbeV2Orders(); const orders: LbeV2Types.OrderState[] = []; @@ -833,7 +885,7 @@ export class MaestroAdapter implements Adapter { public async getLbeV2OrdersByLbeIdAndOwner( lbeId: string, - owner: Address, + owner: Address ): Promise { const { orders: allOrders } = await this.getAllLbeV2Orders(); const orders: LbeV2Types.OrderState[] = []; From 94e52b6d8f6adb50c0d9b4ffa08f85bc63969e6c Mon Sep 17 00:00:00 2001 From: Vardominator Date: Sun, 15 Dec 2024 15:30:10 +0000 Subject: [PATCH 11/22] update readme --- README.md | 67 +++++++--- src/adapters/adapter.ts | 64 +++++----- src/adapters/blockfrost.ts | 250 ++++++++++++++++++------------------- test/adapter.test.ts | 10 +- 4 files changed, 211 insertions(+), 180 deletions(-) diff --git a/README.md b/README.md index a256453..6fae989 100644 --- a/README.md +++ b/README.md @@ -11,9 +11,11 @@ The Minswap open-source providing a comprehensive suite of off-chain tools price - [x] Create orders and submit with Lucid - [x] Syncer to sync minswap's liquidity pool data -We provide two adapter `BlockfrostAdapter` and `MinswapAdapter` to get the price and liquidity pool information. +We provide multiple adapters to get the price and liquidity pool information. + - `BlockfrostAdapter`: use [Blockfrost](https://blockfrost.dev) to query the data. - `MinswapAdapter`: use Syncer to query the data. If you want to use `MinswapAdapter` you need to run syncer by yourself. +- `MaestroAdapter`: use [Maestro](https://www.gomaestro.org/) to query the data. ## Install @@ -29,6 +31,7 @@ This package depends on `lucid-cardano`, which is an ESM package, so it's also a Create an adapter using either `BlockfrostAdapter` or `MinswapAdapter`: ### BlockfrostAdapter: + ```ts import { BlockFrostAPI } from "@blockfrost/blockfrost-js"; import { BlockfrostAdapter, NetworkId } from "@minswap/sdk"; @@ -36,15 +39,16 @@ import { BlockfrostAdapter, NetworkId } from "@minswap/sdk"; const blockFrostApi = new BlockFrostAPI({ projectId: "", network: "mainnet", -}) +}); const blockfrostAdapter = new BlockfrostAdapter( NetworkId.MAINNET, blockFrostApi -) +); ``` ### MinswapAdapter: + - [Install docker compose](https://docs.docker.com/compose/install). - Update the `.env` file to specify the exact network you want to sync. - Run the command: `docker compose -f docker-compose.yaml up --build -d` to build. @@ -52,31 +56,57 @@ const blockfrostAdapter = new BlockfrostAdapter( ```ts import { BlockFrostAPI } from "@blockfrost/blockfrost-js"; -import { BlockfrostAdapter, MinswapAdapter, NetworkEnvironment, NetworkId, newPrismaClient, PostgresRepositoryReader } from "@minswap/sdk"; +import { + BlockfrostAdapter, + MinswapAdapter, + NetworkEnvironment, + NetworkId, + newPrismaClient, + PostgresRepositoryReader, +} from "@minswap/sdk"; const blockFrostApi = new BlockFrostAPI({ projectId: "", network: "mainnet", -}) +}); -const prismaClient = await newPrismaClient("postgresql://postgres:minswap@postgres:5432/syncer?schema=public&connection_limit=5") +const prismaClient = await newPrismaClient( + "postgresql://postgres:minswap@postgres:5432/syncer?schema=public&connection_limit=5" +); const repositoryReader = new PostgresRepositoryReader( NetworkEnvironment.MAINNET, prismaClient -) +); const minswapAdapter = new MinswapAdapter({ networkId: NetworkId.MAINNET, networkEnv: NetworkEnvironment.MAINNET, blockFrostApi: blockFrostApi, - repository: repositoryReader -}) + repository: repositoryReader, +}); +``` + +### Maestro Adapter: + +```ts +import { MaestroAdapter } from "@minswap/sdk"; +import { MaestroClient, Configuration } from "@maestro-org/typescript-sdk"; + +const maestroClient = new MaestroClient( + new Configuration({ + apiKey: maestroApiKey, + network: cardanoNetwork, + }) +); + +const maestroAdapter = new MaestroAdapter(NetworkId.TESTNET, maestroClient); ``` ### Example 1: Get current price of MIN/ADA pool #### MIN/ADA pool v1: + ```ts for (let i = 1; ; i++) { const pools = await adapter.getV1Pools({ @@ -90,7 +120,7 @@ for (let i = 1; ; i++) { (p) => p.assetA === "lovelace" && p.assetB === - "29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c64d494e" + "29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c64d494e" ); if (minAdaPool) { const [price0, price1] = await adapter.getV1PoolPrice({ pool: minAdaPool }); @@ -105,23 +135,25 @@ for (let i = 1; ; i++) { ``` #### MIN/ADA pool v2: + ```ts const minAdaPool = await adapter.getV2PoolByPair( Asset.fromString("lovelace"), - Asset.fromString("29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c64d494e") -) + Asset.fromString( + "29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c64d494e" + ) +); if (minAdaPool) { const [a, b] = await adapter.getV2PoolPrice({ pool: minAdaPool }); - console.log( - `ADA/MIN price: ${a.toString()}; MIN/ADA price: ${b.toString()}` - ); + console.log(`ADA/MIN price: ${a.toString()}; MIN/ADA price: ${b.toString()}`); } ``` ### Example 2: Get historical prices of MIN/ADA pool #### MIN/ADA pool v1: + ```ts const MIN_ADA_POOL_ID = "6aa2153e1ae896a95539c9d62f76cedcdabdcdf144e564b8955f609d660cf6a2"; @@ -138,11 +170,14 @@ for (const historyPoint of history) { ``` #### MIN/ADA pool v2: + ```ts for (let i = 1; ; i++) { const pools = await adapter.getV2PoolHistory({ assetA: Asset.fromString("lovelace"), - assetB: Asset.fromString("29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c64d494e"), + assetB: Asset.fromString( + "29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c64d494e" + ), page: i, }); if (pools.length === 0) { diff --git a/src/adapters/adapter.ts b/src/adapters/adapter.ts index de09785..fac7be0 100644 --- a/src/adapters/adapter.ts +++ b/src/adapters/adapter.ts @@ -1,18 +1,24 @@ -import { Address } from '@minswap/lucid-cardano'; -import Big from 'big.js'; +import Big from "big.js"; +import { Address } from "@minswap/lucid-cardano"; -import { Asset } from '../types/asset'; -import { FactoryV2 } from '../types/factory'; -import { LbeV2Types } from '../types/lbe-v2'; -import { PoolV1, PoolV2, StablePool } from '../types/pool'; -import { TxHistory } from '../types/tx.internal'; +import { Asset } from "../types/asset"; +import { FactoryV2 } from "../types/factory"; +import { LbeV2Types } from "../types/lbe-v2"; +import { PoolV1, PoolV2, StablePool } from "../types/pool"; +import { TxHistory } from "../types/tx.internal"; + +export type GetPoolByIdParams = { + id: string; +}; export type GetPoolInTxParams = { txHash: string; }; -export type GetPoolByIdParams = { - id: string; +export type GetPoolPriceParams = { + pool: PoolV1.State; + decimalsA?: number; + decimalsB?: number; }; export type GetPoolsParams = { @@ -20,6 +26,16 @@ export type GetPoolsParams = { cursor?: string; }; +export type GetStablePoolHistoryParams = { + lpAsset: Asset; +}; + +export type GetStablePoolPriceParams = { + pool: StablePool.State; + assetAIndex: number; + assetBIndex: number; +}; + export type GetV1PoolHistoryParams = { id: string; }; @@ -33,28 +49,12 @@ export type GetV2PoolHistoryParams = lpAsset: Asset; }; -export type GetPoolPriceParams = { - pool: PoolV1.State; - decimalsA?: number; - decimalsB?: number; -}; - export type GetV2PoolPriceParams = { pool: PoolV2.State; decimalsA?: number; decimalsB?: number; }; -export type GetStablePoolHistoryParams = { - lpAsset: Asset; -}; - -export type GetStablePoolPriceParams = { - pool: StablePool.State; - assetAIndex: number; - assetBIndex: number; -}; - export interface Adapter { getAssetDecimals(asset: string): Promise; @@ -98,7 +98,7 @@ export interface Adapter { getAllV2Pools(): Promise<{ pools: PoolV2.State[]; errors: unknown[] }>; getV2Pools( - params: GetPoolsParams, + params: GetPoolsParams ): Promise<{ pools: PoolV2.State[]; errors: unknown[] }>; getV2PoolByPair(assetA: Asset, assetB: Asset): Promise; @@ -124,7 +124,7 @@ export interface Adapter { getFactoryV2ByPair( assetA: Asset, - assetB: Asset, + assetB: Asset ): Promise; getAllStablePools(): Promise<{ @@ -137,7 +137,7 @@ export interface Adapter { getStablePoolByNFT(nft: Asset): Promise; getStablePoolHistory( - params: GetStablePoolHistoryParams, + params: GetStablePoolHistoryParams ): Promise; /** @@ -159,7 +159,7 @@ export interface Adapter { getLbeV2Factory( baseAsset: Asset, - raiseAsset: Asset, + raiseAsset: Asset ): Promise; getLbeV2HeadAndTailFactory(lbeId: string): Promise<{ @@ -173,7 +173,7 @@ export interface Adapter { }>; getLbeV2TreasuryByLbeId( - lbeId: string, + lbeId: string ): Promise; getAllLbeV2Managers(): Promise<{ @@ -182,7 +182,7 @@ export interface Adapter { }>; getLbeV2ManagerByLbeId( - lbeId: string, + lbeId: string ): Promise; getAllLbeV2Sellers(): Promise<{ @@ -201,6 +201,6 @@ export interface Adapter { getLbeV2OrdersByLbeIdAndOwner( lbeId: string, - owner: Address, + owner: Address ): Promise; } diff --git a/src/adapters/blockfrost.ts b/src/adapters/blockfrost.ts index eb838bd..676395c 100644 --- a/src/adapters/blockfrost.ts +++ b/src/adapters/blockfrost.ts @@ -2,43 +2,43 @@ import { BlockFrostAPI, BlockfrostServerError, Responses, -} from '@blockfrost/blockfrost-js'; -import { PaginationOptions } from '@blockfrost/blockfrost-js/lib/types'; +} from "@blockfrost/blockfrost-js"; +import { PaginationOptions } from "@blockfrost/blockfrost-js/lib/types"; import { Address, C, fromHex, SLOT_CONFIG_NETWORK, slotToBeginUnixTime, -} from '@minswap/lucid-cardano'; -import invariant from '@minswap/tiny-invariant'; -import * as Prisma from '@prisma/client'; -import Big from 'big.js'; -import JSONBig from 'json-bigint'; - -import { StableswapCalculation } from '../calculate'; -import { PostgresRepositoryReader } from '../syncer/repository/postgres-repository'; -import { Asset } from '../types/asset'; +} from "@minswap/lucid-cardano"; +import invariant from "@minswap/tiny-invariant"; +import * as Prisma from "@prisma/client"; +import Big from "big.js"; +import JSONBig from "json-bigint"; + +import { StableswapCalculation } from "../calculate"; +import { PostgresRepositoryReader } from "../syncer/repository/postgres-repository"; +import { Asset } from "../types/asset"; import { DexV1Constant, DexV2Constant, LbeV2Constant, StableswapConstant, -} from '../types/constants'; -import { FactoryV2 } from '../types/factory'; -import { LbeV2Types } from '../types/lbe-v2'; -import { NetworkEnvironment, NetworkId } from '../types/network'; -import { OrderV2 } from '../types/order'; -import { PoolV1, PoolV2, StablePool } from '../types/pool'; +} from "../types/constants"; +import { FactoryV2 } from "../types/factory"; +import { LbeV2Types } from "../types/lbe-v2"; +import { NetworkEnvironment, NetworkId } from "../types/network"; +import { OrderV2 } from "../types/order"; +import { PoolV1, PoolV2, StablePool } from "../types/pool"; import { checkValidPoolOutput, isValidPoolOutput, normalizeAssets, -} from '../types/pool.internal'; -import { StringUtils } from '../types/string'; -import { TxHistory, TxIn, Value } from '../types/tx.internal'; -import { getScriptHashFromAddress } from '../utils/address-utils.internal'; -import { networkEnvToLucidNetwork } from '../utils/network.internal'; +} from "../types/pool.internal"; +import { StringUtils } from "../types/string"; +import { TxHistory, TxIn, Value } from "../types/tx.internal"; +import { getScriptHashFromAddress } from "../utils/address-utils.internal"; +import { networkEnvToLucidNetwork } from "../utils/network.internal"; import { Adapter, GetPoolByIdParams, @@ -46,9 +46,9 @@ import { GetPoolPriceParams, GetStablePoolPriceParams, GetV2PoolPriceParams, -} from './adapter'; +} from "./adapter"; -export type GetPoolsParams = Omit & { +export type GetPoolsParams = Omit & { page: number; }; @@ -81,7 +81,7 @@ export class BlockfrostAdapter implements Adapter { } public async getAssetDecimals(asset: string): Promise { - if (asset === 'lovelace') { + if (asset === "lovelace") { return 6; } try { @@ -112,7 +112,7 @@ export class BlockfrostAdapter implements Adapter { const poolTx = await this.blockFrostApi.txsUtxos(txHash); const poolUtxo = poolTx.outputs.find( (o: (typeof poolTx.outputs)[number]) => - getScriptHashFromAddress(o.address) === DexV1Constant.POOL_SCRIPT_HASH, + getScriptHashFromAddress(o.address) === DexV1Constant.POOL_SCRIPT_HASH ); if (!poolUtxo) { return null; @@ -121,7 +121,7 @@ export class BlockfrostAdapter implements Adapter { checkValidPoolOutput(poolUtxo.address, poolUtxo.amount, poolUtxo.data_hash); invariant( poolUtxo.data_hash, - `expect pool to have datum hash, got ${poolUtxo.data_hash}`, + `expect pool to have datum hash, got ${poolUtxo.data_hash}` ); const txIn: TxIn = { txHash: txHash, index: poolUtxo.output_index }; @@ -129,7 +129,7 @@ export class BlockfrostAdapter implements Adapter { poolUtxo.address, txIn, poolUtxo.amount, - poolUtxo.data_hash, + poolUtxo.data_hash ); } @@ -140,7 +140,7 @@ export class BlockfrostAdapter implements Adapter { const nftTxs = await this.blockFrostApi.assetsTransactions(nft, { count: 1, page: 1, - order: 'desc', + order: "desc", }); if (nftTxs.length === 0) { return null; @@ -151,20 +151,20 @@ export class BlockfrostAdapter implements Adapter { public async getV1Pools({ page, count = 100, - order = 'asc', + order = "asc", }: GetPoolsParams): Promise { const utxos = await this.blockFrostApi.addressesUtxos( DexV1Constant.POOL_SCRIPT_HASH, - { count, order, page }, + { count, order, page } ); return utxos .filter((utxo: (typeof utxos)[number]) => - isValidPoolOutput(utxo.address, utxo.amount, utxo.data_hash), + isValidPoolOutput(utxo.address, utxo.amount, utxo.data_hash) ) .map((utxo: (typeof utxos)[number]) => { invariant( utxo.data_hash, - `expect pool to have datum hash, got ${utxo.data_hash}`, + `expect pool to have datum hash, got ${utxo.data_hash}` ); const txIn: TxIn = { txHash: utxo.tx_hash, @@ -174,7 +174,7 @@ export class BlockfrostAdapter implements Adapter { utxo.address, txIn, utxo.amount, - utxo.data_hash, + utxo.data_hash ); }); } @@ -183,7 +183,7 @@ export class BlockfrostAdapter implements Adapter { id, page = 1, count = 100, - order = 'desc', + order = "desc", }: GetV1PoolHistoryParams): Promise { const nft = `${DexV1Constant.POOL_NFT_POLICY_ID}${id}`; const nftTxs = await this.blockFrostApi.assetsTransactions(nft, { @@ -197,7 +197,7 @@ export class BlockfrostAdapter implements Adapter { txIndex: tx.tx_index, blockHeight: tx.block_height, time: new Date(Number(tx.block_time) * 1000), - }), + }) ); } @@ -213,10 +213,10 @@ export class BlockfrostAdapter implements Adapter { decimalsB = await this.getAssetDecimals(pool.assetB); } const adjustedReserveA = Big(pool.reserveA.toString()).div( - Big(10).pow(decimalsA), + Big(10).pow(decimalsA) ); const adjustedReserveB = Big(pool.reserveB.toString()).div( - Big(10).pow(decimalsB), + Big(10).pow(decimalsB) ); const priceAB = adjustedReserveA.div(adjustedReserveB); const priceBA = adjustedReserveB.div(adjustedReserveA); @@ -231,7 +231,7 @@ export class BlockfrostAdapter implements Adapter { const v2Config = DexV2Constant.CONFIG[this.networkId]; const utxos = await this.blockFrostApi.addressesUtxosAssetAll( v2Config.poolScriptHashBech32, - v2Config.poolAuthenAsset, + v2Config.poolAuthenAsset ); const pools: PoolV2.State[] = []; @@ -246,7 +246,7 @@ export class BlockfrostAdapter implements Adapter { utxo.address, { txHash: utxo.tx_hash, index: utxo.output_index }, utxo.amount, - utxo.inline_datum, + utxo.inline_datum ); pools.push(pool); } catch (err) { @@ -262,7 +262,7 @@ export class BlockfrostAdapter implements Adapter { public async getV2Pools({ page, count = 100, - order = 'asc', + order = "asc", }: GetPoolsParams): Promise<{ pools: PoolV2.State[]; errors: unknown[]; @@ -271,7 +271,7 @@ export class BlockfrostAdapter implements Adapter { const utxos = await this.blockFrostApi.addressesUtxosAsset( v2Config.poolScriptHashBech32, v2Config.poolAuthenAsset, - { count, order, page }, + { count, order, page } ); const pools: PoolV2.State[] = []; @@ -286,7 +286,7 @@ export class BlockfrostAdapter implements Adapter { utxo.address, { txHash: utxo.tx_hash, index: utxo.output_index }, utxo.amount, - utxo.inline_datum, + utxo.inline_datum ); pools.push(pool); } catch (err) { @@ -301,17 +301,17 @@ export class BlockfrostAdapter implements Adapter { public async getV2PoolByPair( assetA: Asset, - assetB: Asset, + assetB: Asset ): Promise { const [normalizedAssetA, normalizedAssetB] = normalizeAssets( Asset.toString(assetA), - Asset.toString(assetB), + Asset.toString(assetB) ); const { pools: allPools } = await this.getAllV2Pools(); return ( allPools.find( (pool) => - pool.assetA === normalizedAssetA && pool.assetB === normalizedAssetB, + pool.assetA === normalizedAssetA && pool.assetB === normalizedAssetB ) ?? null ); } @@ -325,9 +325,9 @@ export class BlockfrostAdapter implements Adapter { } public async getV2PoolHistory( - _params: GetV2PoolHistoryParams, + _params: GetV2PoolHistoryParams ): Promise { - throw Error('Not supported yet. Please use MinswapAdapter'); + throw Error("Not supported yet. Please use MinswapAdapter"); } public async getV2PoolPrice({ @@ -342,10 +342,10 @@ export class BlockfrostAdapter implements Adapter { decimalsB = await this.getAssetDecimals(pool.assetB); } const adjustedReserveA = Big(pool.reserveA.toString()).div( - Big(10).pow(decimalsA), + Big(10).pow(decimalsA) ); const adjustedReserveB = Big(pool.reserveB.toString()).div( - Big(10).pow(decimalsB), + Big(10).pow(decimalsB) ); const priceAB = adjustedReserveA.div(adjustedReserveB); const priceBA = adjustedReserveB.div(adjustedReserveA); @@ -359,7 +359,7 @@ export class BlockfrostAdapter implements Adapter { const v2Config = DexV2Constant.CONFIG[this.networkId]; const utxos = await this.blockFrostApi.addressesUtxosAssetAll( v2Config.factoryScriptHashBech32, - v2Config.factoryAsset, + v2Config.factoryAsset ); const factories: FactoryV2.State[] = []; @@ -368,7 +368,7 @@ export class BlockfrostAdapter implements Adapter { try { if (!utxo.inline_datum) { throw new Error( - `Cannot find datum of Factory V2, tx: ${utxo.tx_hash}`, + `Cannot find datum of Factory V2, tx: ${utxo.tx_hash}` ); } const factory = new FactoryV2.State( @@ -376,7 +376,7 @@ export class BlockfrostAdapter implements Adapter { utxo.address, { txHash: utxo.tx_hash, index: utxo.output_index }, utxo.amount, - utxo.inline_datum, + utxo.inline_datum ); factories.push(factory); } catch (err) { @@ -391,7 +391,7 @@ export class BlockfrostAdapter implements Adapter { public async getFactoryV2ByPair( assetA: Asset, - assetB: Asset, + assetB: Asset ): Promise { const factoryIdent = PoolV2.computeLPAssetName(assetA, assetB); const { factories: allFactories } = await this.getAllFactoriesV2(); @@ -413,7 +413,7 @@ export class BlockfrostAdapter implements Adapter { }> { const v2Config = DexV2Constant.CONFIG[this.networkId]; const utxos = await this.blockFrostApi.addressesUtxosAll( - v2Config.orderScriptHashBech32, + v2Config.orderScriptHashBech32 ); const orders: OrderV2.State[] = []; @@ -427,18 +427,18 @@ export class BlockfrostAdapter implements Adapter { utxo.address, { txHash: utxo.tx_hash, index: utxo.output_index }, utxo.amount, - utxo.inline_datum, + utxo.inline_datum ); } else if (utxo.data_hash !== null) { const orderDatum = await this.blockFrostApi.scriptsDatumCbor( - utxo.data_hash, + utxo.data_hash ); order = new OrderV2.State( this.networkId, utxo.address, { txHash: utxo.tx_hash, index: utxo.output_index }, utxo.amount, - orderDatum.cbor, + orderDatum.cbor ); } @@ -459,7 +459,7 @@ export class BlockfrostAdapter implements Adapter { // MARK: STABLESWAP private async parseStablePoolState( - utxo: Responses['address_utxo_content'][0], + utxo: Responses["address_utxo_content"][0] ): Promise { let datum: string; if (utxo.inline_datum) { @@ -467,14 +467,14 @@ export class BlockfrostAdapter implements Adapter { } else if (utxo.data_hash) { datum = await this.getDatumByDatumHash(utxo.data_hash); } else { - throw new Error('Cannot find datum of Stable Pool'); + throw new Error("Cannot find datum of Stable Pool"); } const pool = new StablePool.State( this.networkId, utxo.address, { txHash: utxo.tx_hash, index: utxo.output_index }, utxo.amount, - datum, + datum ); return pool; } @@ -484,7 +484,7 @@ export class BlockfrostAdapter implements Adapter { errors: unknown[]; }> { const poolAddresses = StableswapConstant.CONFIG[this.networkId].map( - (cfg) => cfg.poolAddress, + (cfg) => cfg.poolAddress ); const pools: StablePool.State[] = []; const errors: unknown[] = []; @@ -507,20 +507,20 @@ export class BlockfrostAdapter implements Adapter { } public async getStablePoolByLpAsset( - lpAsset: Asset, + lpAsset: Asset ): Promise { const config = StableswapConstant.CONFIG[this.networkId].find( - (cfg) => cfg.lpAsset === Asset.toString(lpAsset), + (cfg) => cfg.lpAsset === Asset.toString(lpAsset) ); invariant( config, `getStablePoolByLpAsset: Can not find stableswap config by LP Asset ${Asset.toString( - lpAsset, - )}`, + lpAsset + )}` ); const poolUtxos = await this.blockFrostApi.addressesUtxosAssetAll( config.poolAddress, - config.nftAsset, + config.nftAsset ); if (poolUtxos.length === 1) { const poolUtxo = poolUtxos[0]; @@ -530,19 +530,19 @@ export class BlockfrostAdapter implements Adapter { } public async getStablePoolByNFT( - nft: Asset, + nft: Asset ): Promise { const poolAddress = StableswapConstant.CONFIG[this.networkId].find( - (cfg) => cfg.nftAsset === Asset.toString(nft), + (cfg) => cfg.nftAsset === Asset.toString(nft) )?.poolAddress; if (!poolAddress) { throw new Error( - `Cannot find Stable Pool having NFT ${Asset.toString(nft)}`, + `Cannot find Stable Pool having NFT ${Asset.toString(nft)}` ); } const poolUtxos = await this.blockFrostApi.addressesUtxosAssetAll( poolAddress, - Asset.toString(nft), + Asset.toString(nft) ); if (poolUtxos.length === 1) { const poolUtxo = poolUtxos[0]; @@ -552,9 +552,9 @@ export class BlockfrostAdapter implements Adapter { } getStablePoolHistory( - _params: GetStablePoolHistoryParams, + _params: GetStablePoolHistoryParams ): Promise { - throw Error('Not supported yet. Please use MinswapAdapter'); + throw Error("Not supported yet. Please use MinswapAdapter"); } public getStablePoolPrice({ @@ -568,7 +568,7 @@ export class BlockfrostAdapter implements Adapter { config.multiples, pool.amp, assetAIndex, - assetBIndex, + assetBIndex ); return Big(priceNum.toString()).div(priceDen.toString()); @@ -582,7 +582,7 @@ export class BlockfrostAdapter implements Adapter { const config = LbeV2Constant.CONFIG[this.networkId]; const utxos = await this.blockFrostApi.addressesUtxosAssetAll( config.factoryHashBech32, - config.factoryAsset, + config.factoryAsset ); const factories: LbeV2Types.FactoryState[] = []; @@ -591,7 +591,7 @@ export class BlockfrostAdapter implements Adapter { try { if (!utxo.inline_datum) { throw new Error( - `Cannot find datum of LBE V2 Factory, tx: ${utxo.tx_hash}`, + `Cannot find datum of LBE V2 Factory, tx: ${utxo.tx_hash}` ); } @@ -600,7 +600,7 @@ export class BlockfrostAdapter implements Adapter { utxo.address, { txHash: utxo.tx_hash, index: utxo.output_index }, utxo.amount, - utxo.inline_datum, + utxo.inline_datum ); factories.push(factory); } catch (err) { @@ -615,7 +615,7 @@ export class BlockfrostAdapter implements Adapter { public async getLbeV2Factory( baseAsset: Asset, - raiseAsset: Asset, + raiseAsset: Asset ): Promise { const factoryIdent = PoolV2.computeLPAssetName(baseAsset, raiseAsset); const { factories: allFactories } = await this.getAllLbeV2Factories(); @@ -659,7 +659,7 @@ export class BlockfrostAdapter implements Adapter { const config = LbeV2Constant.CONFIG[this.networkId]; const utxos = await this.blockFrostApi.addressesUtxosAssetAll( config.treasuryHashBech32, - config.treasuryAsset, + config.treasuryAsset ); const treasuries: LbeV2Types.TreasuryState[] = []; @@ -668,7 +668,7 @@ export class BlockfrostAdapter implements Adapter { try { if (!utxo.inline_datum) { throw new Error( - `Cannot find datum of LBE V2 Treasury, tx: ${utxo.tx_hash}`, + `Cannot find datum of LBE V2 Treasury, tx: ${utxo.tx_hash}` ); } @@ -677,7 +677,7 @@ export class BlockfrostAdapter implements Adapter { utxo.address, { txHash: utxo.tx_hash, index: utxo.output_index }, utxo.amount, - utxo.inline_datum, + utxo.inline_datum ); treasuries.push(treasury); } catch (err) { @@ -691,7 +691,7 @@ export class BlockfrostAdapter implements Adapter { } public async getLbeV2TreasuryByLbeId( - lbeId: string, + lbeId: string ): Promise { const { treasuries: allTreasuries } = await this.getAllLbeV2Treasuries(); for (const treasury of allTreasuries) { @@ -709,7 +709,7 @@ export class BlockfrostAdapter implements Adapter { const config = LbeV2Constant.CONFIG[this.networkId]; const utxos = await this.blockFrostApi.addressesUtxosAssetAll( config.managerHashBech32, - config.managerAsset, + config.managerAsset ); const managers: LbeV2Types.ManagerState[] = []; @@ -718,7 +718,7 @@ export class BlockfrostAdapter implements Adapter { try { if (!utxo.inline_datum) { throw new Error( - `Cannot find datum of Lbe V2 Manager, tx: ${utxo.tx_hash}`, + `Cannot find datum of Lbe V2 Manager, tx: ${utxo.tx_hash}` ); } @@ -727,7 +727,7 @@ export class BlockfrostAdapter implements Adapter { utxo.address, { txHash: utxo.tx_hash, index: utxo.output_index }, utxo.amount, - utxo.inline_datum, + utxo.inline_datum ); managers.push(manager); } catch (err) { @@ -741,7 +741,7 @@ export class BlockfrostAdapter implements Adapter { } public async getLbeV2ManagerByLbeId( - lbeId: string, + lbeId: string ): Promise { const { managers } = await this.getAllLbeV2Managers(); for (const manager of managers) { @@ -759,7 +759,7 @@ export class BlockfrostAdapter implements Adapter { const config = LbeV2Constant.CONFIG[this.networkId]; const utxos = await this.blockFrostApi.addressesUtxosAssetAll( config.sellerHashBech32, - config.sellerAsset, + config.sellerAsset ); const sellers: LbeV2Types.SellerState[] = []; @@ -768,7 +768,7 @@ export class BlockfrostAdapter implements Adapter { try { if (!utxo.inline_datum) { throw new Error( - `Cannot find datum of Lbe V2 Seller, tx: ${utxo.tx_hash}`, + `Cannot find datum of Lbe V2 Seller, tx: ${utxo.tx_hash}` ); } @@ -777,7 +777,7 @@ export class BlockfrostAdapter implements Adapter { utxo.address, { txHash: utxo.tx_hash, index: utxo.output_index }, utxo.amount, - utxo.inline_datum, + utxo.inline_datum ); sellers.push(seller); } catch (err) { @@ -791,7 +791,7 @@ export class BlockfrostAdapter implements Adapter { } public async getLbeV2SellerByLbeId( - lbeId: string, + lbeId: string ): Promise { const { sellers } = await this.getAllLbeV2Sellers(); for (const seller of sellers) { @@ -809,7 +809,7 @@ export class BlockfrostAdapter implements Adapter { const config = LbeV2Constant.CONFIG[this.networkId]; const utxos = await this.blockFrostApi.addressesUtxosAssetAll( config.orderHashBech32, - config.orderAsset, + config.orderAsset ); const orders: LbeV2Types.OrderState[] = []; const errors: unknown[] = []; @@ -817,7 +817,7 @@ export class BlockfrostAdapter implements Adapter { try { if (!utxo.inline_datum) { throw new Error( - `Cannot find datum of Lbe V2 Order, tx: ${utxo.tx_hash}`, + `Cannot find datum of Lbe V2 Order, tx: ${utxo.tx_hash}` ); } @@ -826,7 +826,7 @@ export class BlockfrostAdapter implements Adapter { utxo.address, { txHash: utxo.tx_hash, index: utxo.output_index }, utxo.amount, - utxo.inline_datum, + utxo.inline_datum ); orders.push(order); } catch (err) { @@ -840,7 +840,7 @@ export class BlockfrostAdapter implements Adapter { } public async getLbeV2OrdersByLbeId( - lbeId: string, + lbeId: string ): Promise { const { orders: allOrders } = await this.getAllLbeV2Orders(); const orders: LbeV2Types.OrderState[] = []; @@ -854,7 +854,7 @@ export class BlockfrostAdapter implements Adapter { public async getLbeV2OrdersByLbeIdAndOwner( lbeId: string, - owner: Address, + owner: Address ): Promise { const { orders: allOrders } = await this.getAllLbeV2Orders(); const orders: LbeV2Types.OrderState[] = []; @@ -900,7 +900,7 @@ export class MinswapAdapter extends BlockfrostAdapter { useNativeBigInt: true, }).parse(prismaPool.value); const datumHash = C.hash_plutus_data( - C.PlutusData.from_bytes(fromHex(prismaPool.raw_datum)), + C.PlutusData.from_bytes(fromHex(prismaPool.raw_datum)) ).to_hex(); return new PoolV1.State(address, txIn, value, datumHash); } @@ -929,12 +929,12 @@ export class MinswapAdapter extends BlockfrostAdapter { override async getV1Pools({ page, count = 100, - order = 'asc', + order = "asc", }: GetPoolsParams): Promise { const prismaPools = await this.repository.getLastPoolV1State( page - 1, count, - order, + order ); if (prismaPools.length === 0) { return []; @@ -946,14 +946,14 @@ export class MinswapAdapter extends BlockfrostAdapter { id, page = 1, count = 100, - order = 'desc', + order = "desc", }: GetV1PoolHistoryParams): Promise { const lpAsset = `${DexV1Constant.LP_POLICY_ID}${id}`; const prismaPools = await this.repository.getHistoricalPoolV1ByLpAsset( lpAsset, page - 1, count, - order, + order ); if (prismaPools.length === 0) { return []; @@ -968,10 +968,10 @@ export class MinswapAdapter extends BlockfrostAdapter { time: new Date( slotToBeginUnixTime( Number(prismaPool.slot), - SLOT_CONFIG_NETWORK[network], - ), + SLOT_CONFIG_NETWORK[network] + ) ), - }), + }) ); } @@ -989,7 +989,7 @@ export class MinswapAdapter extends BlockfrostAdapter { prismaPool.pool_address, txIn, value, - prismaPool.raw_datum, + prismaPool.raw_datum ); } @@ -1007,7 +1007,7 @@ export class MinswapAdapter extends BlockfrostAdapter { override async getV2Pools({ page, count = 100, - order = 'asc', + order = "asc", }: GetPoolsParams): Promise<{ pools: PoolV2.State[]; errors: unknown[]; @@ -1015,7 +1015,7 @@ export class MinswapAdapter extends BlockfrostAdapter { const prismaPools = await this.repository.getLastPoolV2State( page - 1, count, - order, + order ); return { pools: prismaPools.map((pool) => this.prismaPoolV2ToPoolV2State(pool)), @@ -1025,7 +1025,7 @@ export class MinswapAdapter extends BlockfrostAdapter { override async getV2PoolByPair( assetA: Asset, - assetB: Asset, + assetB: Asset ): Promise { const prismaPool = await this.repository.getPoolV2ByPair(assetA, assetB); if (!prismaPool) { @@ -1043,11 +1043,11 @@ export class MinswapAdapter extends BlockfrostAdapter { } override async getV2PoolHistory( - options: GetV2PoolHistoryParams, + options: GetV2PoolHistoryParams ): Promise { - const { page = 1, count = 100, order = 'desc' } = options; + const { page = 1, count = 100, order = "desc" } = options; let lpAsset: string; - if ('lpAsset' in options) { + if ("lpAsset" in options) { lpAsset = Asset.toString(options.lpAsset); } else { lpAsset = PoolV2.computeLPAssetName(options.assetA, options.assetB); @@ -1056,7 +1056,7 @@ export class MinswapAdapter extends BlockfrostAdapter { lpAsset, page - 1, count, - order, + order ); if (prismaPools.length === 0) { return []; @@ -1066,7 +1066,7 @@ export class MinswapAdapter extends BlockfrostAdapter { } private prismaStablePoolToStablePoolState( - prismaPool: Prisma.StablePool, + prismaPool: Prisma.StablePool ): StablePool.State { const txIn: TxIn = { txHash: prismaPool.created_tx_id, @@ -1081,7 +1081,7 @@ export class MinswapAdapter extends BlockfrostAdapter { prismaPool.pool_address, txIn, value, - prismaPool.raw_datum, + prismaPool.raw_datum ); } @@ -1092,26 +1092,26 @@ export class MinswapAdapter extends BlockfrostAdapter { const prismaPools = await this.repository.getAllLastStablePoolState(); return { pools: prismaPools.map((pool) => - this.prismaStablePoolToStablePoolState(pool), + this.prismaStablePoolToStablePoolState(pool) ), errors: [], }; } override async getStablePoolByNFT( - nft: Asset, + nft: Asset ): Promise { const config = StableswapConstant.CONFIG[this.networkId].find( - (cfg) => cfg.nftAsset === Asset.toString(nft), + (cfg) => cfg.nftAsset === Asset.toString(nft) ); if (!config) { throw new Error( - `Cannot find Stable Pool having NFT ${Asset.toString(nft)}`, + `Cannot find Stable Pool having NFT ${Asset.toString(nft)}` ); } const prismaStablePool = await this.repository.getStablePoolByLpAsset( - config.lpAsset, + config.lpAsset ); if (!prismaStablePool) { return null; @@ -1120,19 +1120,19 @@ export class MinswapAdapter extends BlockfrostAdapter { } override async getStablePoolByLpAsset( - lpAsset: Asset, + lpAsset: Asset ): Promise { const config = StableswapConstant.CONFIG[this.networkId].find( - (cfg) => cfg.lpAsset === Asset.toString(lpAsset), + (cfg) => cfg.lpAsset === Asset.toString(lpAsset) ); if (!config) { throw new Error( - `Cannot find Stable Pool having NFT ${Asset.toString(lpAsset)}`, + `Cannot find Stable Pool having NFT ${Asset.toString(lpAsset)}` ); } const prismaStablePool = await this.repository.getStablePoolByLpAsset( - config.lpAsset, + config.lpAsset ); if (!prismaStablePool) { return null; @@ -1144,20 +1144,20 @@ export class MinswapAdapter extends BlockfrostAdapter { lpAsset, page = 1, count = 100, - order = 'desc', + order = "desc", }: GetStablePoolHistoryParams): Promise { const prismaPools = await this.repository.getHistoricalStablePoolsByLpAsset( Asset.toString(lpAsset), page - 1, count, - order, + order ); if (prismaPools.length === 0) { return []; } return prismaPools.map((pool) => - this.prismaStablePoolToStablePoolState(pool), + this.prismaStablePoolToStablePoolState(pool) ); } } diff --git a/test/adapter.test.ts b/test/adapter.test.ts index 7d06918..dd197c7 100644 --- a/test/adapter.test.ts +++ b/test/adapter.test.ts @@ -1,12 +1,8 @@ import { BlockFrostAPI } from "@blockfrost/blockfrost-js"; -import { - ADA, - Asset, - BlockfrostAdapter, - NetworkId, - StableswapConstant, -} from "../src"; +import { ADA, Asset, NetworkId, StableswapConstant } from "../src"; + +import { BlockfrostAdapter } from "../src/adapters/blockfrost"; function mustGetEnv(key: string): string { const val = process.env[key]; From f6ec6403e805ddeada057ffe3b1e38d9655f86a4 Mon Sep 17 00:00:00 2001 From: Vardominator Date: Sun, 15 Dec 2024 15:38:15 +0000 Subject: [PATCH 12/22] add maestro adapter tests --- test/adapter.test.ts | 277 +++++++++++++++++++++++-------------------- 1 file changed, 150 insertions(+), 127 deletions(-) diff --git a/test/adapter.test.ts b/test/adapter.test.ts index dd197c7..09ef953 100644 --- a/test/adapter.test.ts +++ b/test/adapter.test.ts @@ -1,8 +1,9 @@ import { BlockFrostAPI } from "@blockfrost/blockfrost-js"; - import { ADA, Asset, NetworkId, StableswapConstant } from "../src"; - import { BlockfrostAdapter } from "../src/adapters/blockfrost"; +import { MaestroAdapter } from "../src/adapters/maestro"; +import { MaestroClient, Configuration } from "@maestro-org/typescript-sdk"; +import { Network } from "@minswap/lucid-cardano"; function mustGetEnv(key: string): string { const val = process.env[key]; @@ -21,164 +22,186 @@ const MIN_ADA_POOL_V1_ID_TESTNET = const MIN_ADA_POOL_V1_ID_MAINNET = "6aa2153e1ae896a95539c9d62f76cedcdabdcdf144e564b8955f609d660cf6a2"; -let adapterTestnet: BlockfrostAdapter; -let adapterMainnet: BlockfrostAdapter; +let blockfrostAdapterTestnet: BlockfrostAdapter; +let blockfrostAdapterMainnet: BlockfrostAdapter; +let maestroAdapterTestnet: MaestroAdapter; +let maestroAdapterMainnet: MaestroAdapter; beforeAll(() => { - adapterTestnet = new BlockfrostAdapter( + blockfrostAdapterTestnet = new BlockfrostAdapter( NetworkId.TESTNET, new BlockFrostAPI({ projectId: mustGetEnv("BLOCKFROST_PROJECT_ID_TESTNET"), network: "preprod", }) ); - adapterMainnet = new BlockfrostAdapter( + blockfrostAdapterMainnet = new BlockfrostAdapter( NetworkId.MAINNET, new BlockFrostAPI({ projectId: mustGetEnv("BLOCKFROST_PROJECT_ID_MAINNET"), network: "mainnet", }) ); + const cardanoNetworkPreprod: Network = "Preprod"; + maestroAdapterTestnet = new MaestroAdapter( + NetworkId.TESTNET, + new MaestroClient( + new Configuration({ + apiKey: "MAESTRO_API_KEY_TESTNET", + network: cardanoNetworkPreprod, + }) + ) + ); + const cardanoNetworkMainnet: Network = "Mainnet"; + maestroAdapterMainnet = new MaestroAdapter( + NetworkId.MAINNET, + new MaestroClient( + new Configuration({ + apiKey: "MAESTRO_API_KEY_MAINNET", + network: cardanoNetworkMainnet, + }) + ) + ); }); -test("getAssetDecimals", async () => { - expect(await adapterTestnet.getAssetDecimals("lovelace")).toBe(6); - expect(await adapterTestnet.getAssetDecimals(MIN_TESTNET)).toBe(0); - expect(await adapterMainnet.getAssetDecimals("lovelace")).toBe(6); - expect(await adapterMainnet.getAssetDecimals(MIN_MAINNET)).toBe(6); -}); - -async function testPoolPrice(adapter: BlockfrostAdapter): Promise { - const pools = await adapter.getV1Pools({ - page: 1, +async function runTests(adapterTestnet: any, adapterMainnet: any) { + test("getAssetDecimals", async () => { + expect(await adapterTestnet.getAssetDecimals("lovelace")).toBe(6); + expect(await adapterTestnet.getAssetDecimals(MIN_TESTNET)).toBe(0); + expect(await adapterMainnet.getAssetDecimals("lovelace")).toBe(6); + expect(await adapterMainnet.getAssetDecimals(MIN_MAINNET)).toBe(6); }); - expect(pools.length).toBeGreaterThan(0); - // check random 5 pools - for (let i = 0; i < 5; i++) { - const idx = Math.floor(Math.random() * pools.length); - const pool = pools[idx]; - const [priceAB, priceBA] = await adapter.getV1PoolPrice({ pool }); - // product of 2 prices must be approximately equal to 1 - // abs(priceAB * priceBA - 1) <= epsilon - expect(priceAB.mul(priceBA).sub(1).abs().toNumber()).toBeLessThanOrEqual( - 1e-6 - ); - } -} -test("getPoolPrice", async () => { - await testPoolPrice(adapterTestnet); - await testPoolPrice(adapterMainnet); -}, 10000); + async function testPoolPrice(adapter: any): Promise { + const pools = await adapter.getV1Pools({ page: 1 }); + expect(pools.length).toBeGreaterThan(0); + for (let i = 0; i < 5; i++) { + const idx = Math.floor(Math.random() * pools.length); + const pool = pools[idx]; + const [priceAB, priceBA] = await adapter.getV1PoolPrice({ pool }); + expect(priceAB.mul(priceBA).sub(1).abs().toNumber()).toBeLessThanOrEqual( + 1e-6 + ); + } + } -test("getV1PoolById", async () => { - const adaMINTestnet = await adapterTestnet.getV1PoolById({ - id: MIN_ADA_POOL_V1_ID_TESTNET, + test("getPoolPrice", async () => { + await testPoolPrice(adapterTestnet); + await testPoolPrice(adapterMainnet); + }, 10000); + + test("getV1PoolById", async () => { + const adaMINTestnet = await adapterTestnet.getV1PoolById({ + id: MIN_ADA_POOL_V1_ID_TESTNET, + }); + expect(adaMINTestnet).not.toBeNull(); + expect(adaMINTestnet?.assetA).toEqual("lovelace"); + expect(adaMINTestnet?.assetB).toEqual(MIN_TESTNET); + + const adaMINMainnet = await adapterMainnet.getV1PoolById({ + id: MIN_ADA_POOL_V1_ID_MAINNET, + }); + expect(adaMINMainnet).not.toBeNull(); + expect(adaMINMainnet?.assetA).toEqual("lovelace"); + expect(adaMINMainnet?.assetB).toEqual(MIN_MAINNET); }); - expect(adaMINTestnet).not.toBeNull(); - expect(adaMINTestnet?.assetA).toEqual("lovelace"); - expect(adaMINTestnet?.assetB).toEqual(MIN_TESTNET); - const adaMINMainnet = await adapterMainnet.getV1PoolById({ - id: MIN_ADA_POOL_V1_ID_MAINNET, - }); - expect(adaMINMainnet).not.toBeNull(); - expect(adaMINMainnet?.assetA).toEqual("lovelace"); - expect(adaMINMainnet?.assetB).toEqual(MIN_MAINNET); -}); - -async function testPriceHistory( - adapter: BlockfrostAdapter, - id: string -): Promise { - const history = await adapter.getV1PoolHistory({ id: id }); - for (let i = 0; i < Math.min(5, history.length); i++) { - const pool = await adapter.getV1PoolInTx({ txHash: history[i].txHash }); - expect(pool?.txIn.txHash).toEqual(history[i].txHash); + async function testPriceHistory(adapter: any, id: string): Promise { + const history = await adapter.getV1PoolHistory({ id }); + for (let i = 0; i < Math.min(5, history.length); i++) { + const pool = await adapter.getV1PoolInTx({ txHash: history[i].txHash }); + expect(pool?.txIn.txHash).toEqual(history[i].txHash); + } } -} -test("get prices of last 5 states of MIN/ADA pool", async () => { - await testPriceHistory(adapterTestnet, MIN_ADA_POOL_V1_ID_TESTNET); - await testPriceHistory(adapterMainnet, MIN_ADA_POOL_V1_ID_MAINNET); -}); + test("get prices of last 5 states of MIN/ADA pool", async () => { + await testPriceHistory(adapterTestnet, MIN_ADA_POOL_V1_ID_TESTNET); + await testPriceHistory(adapterMainnet, MIN_ADA_POOL_V1_ID_MAINNET); + }); -test("getV2PoolByPair", async () => { - const pool = await adapterTestnet.getV2PoolByPair(ADA, { - policyId: "e16c2dc8ae937e8d3790c7fd7168d7b994621ba14ca11415f39fed72", - tokenName: "4d494e", + test("getV2PoolByPair", async () => { + const pool = await adapterTestnet.getV2PoolByPair(ADA, { + policyId: "e16c2dc8ae937e8d3790c7fd7168d7b994621ba14ca11415f39fed72", + tokenName: "4d494e", + }); + expect(pool).not.toBeNull(); + expect(pool?.assetA).toEqual("lovelace"); + expect(pool?.assetB).toEqual(MIN_TESTNET); }); - expect(pool).not.toBeNull(); - expect(pool?.assetA).toEqual("lovelace"); - expect(pool?.assetB).toEqual(MIN_TESTNET); -}); -test("getAllV2Pools", async () => { - const { pools } = await adapterTestnet.getAllV2Pools(); - expect(pools.length > 0); -}); + test("getAllV2Pools", async () => { + const { pools } = await adapterTestnet.getAllV2Pools(); + expect(pools.length > 0); + }); -test("getV2Pools", async () => { - const { pools } = await adapterTestnet.getV2Pools({ - page: 1, + test("getV2Pools", async () => { + const { pools } = await adapterTestnet.getV2Pools({ page: 1 }); + expect(pools.length > 0); }); - expect(pools.length > 0); -}); -test("getAllStablePools", async () => { - const numberOfStablePoolsTestnet = - StableswapConstant.CONFIG[NetworkId.TESTNET].length; - const numberOfStablePoolsMainnet = - StableswapConstant.CONFIG[NetworkId.MAINNET].length; - const { pools: testnetPools } = await adapterTestnet.getAllStablePools(); - expect(testnetPools.length === numberOfStablePoolsTestnet); + test("getAllStablePools", async () => { + const numberOfStablePoolsTestnet = + StableswapConstant.CONFIG[NetworkId.TESTNET].length; + const numberOfStablePoolsMainnet = + StableswapConstant.CONFIG[NetworkId.MAINNET].length; + const { pools: testnetPools } = await adapterTestnet.getAllStablePools(); + expect(testnetPools.length === numberOfStablePoolsTestnet); - const { pools: mainnetPools } = await adapterMainnet.getAllStablePools(); - expect(mainnetPools.length === numberOfStablePoolsMainnet); -}); + const { pools: mainnetPools } = await adapterMainnet.getAllStablePools(); + expect(mainnetPools.length === numberOfStablePoolsMainnet); + }); -test("getStablePoolByLPAsset", async () => { - const testnetCfgs = StableswapConstant.CONFIG[NetworkId.TESTNET]; - const mainnetCfgs = StableswapConstant.CONFIG[NetworkId.MAINNET]; + test("getStablePoolByLPAsset", async () => { + const testnetCfgs = StableswapConstant.CONFIG[NetworkId.TESTNET]; + const mainnetCfgs = StableswapConstant.CONFIG[NetworkId.MAINNET]; + + for (const cfg of testnetCfgs) { + const pool = await adapterTestnet.getStablePoolByLpAsset( + Asset.fromString(cfg.lpAsset) + ); + expect(pool).not.toBeNull(); + expect(pool?.nft).toEqual(cfg.nftAsset); + expect(pool?.assets).toEqual(cfg.assets); + } + + for (const cfg of mainnetCfgs) { + const pool = await adapterMainnet.getStablePoolByLpAsset( + Asset.fromString(cfg.lpAsset) + ); + expect(pool).not.toBeNull(); + expect(pool?.nft).toEqual(cfg.nftAsset); + expect(pool?.assets).toEqual(cfg.assets); + } + }); - for (const cfg of testnetCfgs) { - const pool = await adapterTestnet.getStablePoolByLpAsset( - Asset.fromString(cfg.lpAsset) - ); - expect(pool).not.toBeNull(); - expect(pool?.nft).toEqual(cfg.nftAsset); - expect(pool?.assets).toEqual(cfg.assets); - } + test("getStablePoolByNFT", async () => { + const testnetCfgs = StableswapConstant.CONFIG[NetworkId.TESTNET]; + const mainnetCfgs = StableswapConstant.CONFIG[NetworkId.MAINNET]; + + for (const cfg of testnetCfgs) { + const pool = await adapterTestnet.getStablePoolByNFT( + Asset.fromString(cfg.nftAsset) + ); + expect(pool).not.toBeNull(); + expect(pool?.nft).toEqual(cfg.nftAsset); + expect(pool?.assets).toEqual(cfg.assets); + } + + for (const cfg of mainnetCfgs) { + const pool = await adapterMainnet.getStablePoolByNFT( + Asset.fromString(cfg.nftAsset) + ); + expect(pool).not.toBeNull(); + expect(pool?.nft).toEqual(cfg.nftAsset); + expect(pool?.assets).toEqual(cfg.assets); + } + }); +} - for (const cfg of mainnetCfgs) { - const pool = await adapterMainnet.getStablePoolByLpAsset( - Asset.fromString(cfg.lpAsset) - ); - expect(pool).not.toBeNull(); - expect(pool?.nft).toEqual(cfg.nftAsset); - expect(pool?.assets).toEqual(cfg.assets); - } +describe("BlockfrostAdapter Tests", () => { + runTests(blockfrostAdapterTestnet, blockfrostAdapterMainnet); }); -test("getStablePoolByNFT", async () => { - const testnetCfgs = StableswapConstant.CONFIG[NetworkId.TESTNET]; - const mainnetCfgs = StableswapConstant.CONFIG[NetworkId.MAINNET]; - - for (const cfg of testnetCfgs) { - const pool = await adapterTestnet.getStablePoolByNFT( - Asset.fromString(cfg.nftAsset) - ); - expect(pool).not.toBeNull(); - expect(pool?.nft).toEqual(cfg.nftAsset); - expect(pool?.assets).toEqual(cfg.assets); - } - - for (const cfg of mainnetCfgs) { - const pool = await adapterMainnet.getStablePoolByNFT( - Asset.fromString(cfg.nftAsset) - ); - expect(pool).not.toBeNull(); - expect(pool?.nft).toEqual(cfg.nftAsset); - expect(pool?.assets).toEqual(cfg.assets); - } +describe("MaestroAdapter Tests", () => { + runTests(maestroAdapterTestnet, maestroAdapterMainnet); }); From f9465655b0e64b3334d08ee571be49dc14c556e8 Mon Sep 17 00:00:00 2001 From: Vardominator Date: Fri, 3 Jan 2025 16:14:00 +0000 Subject: [PATCH 13/22] fix typos so far --- examples/maestro-adapter-example.ts | 4 ++-- package.json | 1 - src/adapters/index.ts | 0 src/utils/lucid.ts | 2 +- test/adapter.test.ts | 6 +++--- 5 files changed, 6 insertions(+), 7 deletions(-) create mode 100644 src/adapters/index.ts diff --git a/examples/maestro-adapter-example.ts b/examples/maestro-adapter-example.ts index 8f96a08..61a411d 100644 --- a/examples/maestro-adapter-example.ts +++ b/examples/maestro-adapter-example.ts @@ -1,6 +1,6 @@ import { Address, Lucid, Network, TxComplete } from "@minswap/lucid-cardano"; import { Asset, NetworkId, PoolV2 } from "../src"; -import { getBackendMasestroLucidInstance } from "../src/utils/lucid"; +import { getBackendMaestroLucidInstance } from "../src/utils/lucid"; import { LbeV2 } from "../src/lbe-v2/lbe-v2"; import { MaestroAdapter } from "../src/adapters/maestro"; import { MaestroClient, Configuration } from "@maestro-org/typescript-sdk"; @@ -13,7 +13,7 @@ async function main(): Promise { const address = "addr_test1qqf2dhk96l2kq4xh2fkhwksv0h49vy9exw383eshppn863jereuqgh2zwxsedytve5gp9any9jwc5hz98sd47rwfv40stc26fr"; - const lucid = await getBackendMasestroLucidInstance( + const lucid = await getBackendMaestroLucidInstance( cardanoNetwork, maestroApiKey, address diff --git a/package.json b/package.json index bb21bf1..6d0a579 100644 --- a/package.json +++ b/package.json @@ -66,7 +66,6 @@ "@eslint/js": "^9.9.1", "@jest/globals": "^29.7.0", "@prisma/client": "^6.0.1", - "@trivago/prettier-plugin-sort-imports": "^5.2.0", "@types/big.js": "^6.2.2", "@types/eslint__js": "^8.42.3", "@types/jest": "^29.5.12", diff --git a/src/adapters/index.ts b/src/adapters/index.ts new file mode 100644 index 0000000..e69de29 diff --git a/src/utils/lucid.ts b/src/utils/lucid.ts index da8faf9..d06f3ff 100644 --- a/src/utils/lucid.ts +++ b/src/utils/lucid.ts @@ -36,7 +36,7 @@ export async function getBackendLucidInstance( * @param address Your own address * @returns */ -export async function getBackendMasestroLucidInstance( +export async function getBackendMaestroLucidInstance( network: MaestroSupportedNetworks, apiKey: string, address: Address, diff --git a/test/adapter.test.ts b/test/adapter.test.ts index 09ef953..22a6f3a 100644 --- a/test/adapter.test.ts +++ b/test/adapter.test.ts @@ -1,5 +1,5 @@ import { BlockFrostAPI } from "@blockfrost/blockfrost-js"; -import { ADA, Asset, NetworkId, StableswapConstant } from "../src"; +import { ADA, Adapter, Asset, NetworkId, StableswapConstant } from "../src"; import { BlockfrostAdapter } from "../src/adapters/blockfrost"; import { MaestroAdapter } from "../src/adapters/maestro"; import { MaestroClient, Configuration } from "@maestro-org/typescript-sdk"; @@ -64,7 +64,7 @@ beforeAll(() => { ); }); -async function runTests(adapterTestnet: any, adapterMainnet: any) { +async function runTests(adapterTestnet: Adapter, adapterMainnet: Adapter) { test("getAssetDecimals", async () => { expect(await adapterTestnet.getAssetDecimals("lovelace")).toBe(6); expect(await adapterTestnet.getAssetDecimals(MIN_TESTNET)).toBe(0); @@ -72,7 +72,7 @@ async function runTests(adapterTestnet: any, adapterMainnet: any) { expect(await adapterMainnet.getAssetDecimals(MIN_MAINNET)).toBe(6); }); - async function testPoolPrice(adapter: any): Promise { + async function testPoolPrice(adapter: Adapter): Promise { const pools = await adapter.getV1Pools({ page: 1 }); expect(pools.length).toBeGreaterThan(0); for (let i = 0; i < 5; i++) { From 1b9bd4f85af8bb2d3c6cb61c6a32787012282423 Mon Sep 17 00:00:00 2001 From: Vardominator Date: Fri, 3 Jan 2025 22:00:07 +0000 Subject: [PATCH 14/22] address pr comments and fix cicular deps --- .github/workflows/ci.yml | 2 ++ src/adapters/index.ts | 1 + src/dex-v2.ts | 11 +++++------ src/index.ts | 2 +- src/types/constants.ts | 2 +- test/adapter.test.ts | 4 ++-- 6 files changed, 12 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c099559..a3d426e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,5 +30,7 @@ jobs: env: BLOCKFROST_PROJECT_ID_MAINNET: ${{ secrets.BLOCKFROST_PROJECT_ID_MAINNET }} BLOCKFROST_PROJECT_ID_TESTNET: ${{ secrets.BLOCKFROST_PROJECT_ID_TESTNET }} + MAESTRO_API_KEY_MAINNET: ${{ secrets.MAESTRO_API_KEY_MAINNET }} + MAESTRO_API_KEY_TESTNET: ${{ secrets.MAESTRO_API_KEY_TESTNET }} - name: Check format & lint run: pnpm run check-format diff --git a/src/adapters/index.ts b/src/adapters/index.ts index e69de29..631bd0f 100644 --- a/src/adapters/index.ts +++ b/src/adapters/index.ts @@ -0,0 +1 @@ +export * from "./adapter"; diff --git a/src/dex-v2.ts b/src/dex-v2.ts index c30dff1..199214c 100644 --- a/src/dex-v2.ts +++ b/src/dex-v2.ts @@ -13,16 +13,15 @@ import { } from "@minswap/lucid-cardano"; import invariant from "@minswap/tiny-invariant"; +import { Asset } from "./types/asset"; +import { OrderV2 } from "./types/order"; +import { PoolV2 } from "./types/pool"; +import { compareUtxo, DexV2Calculation } from "./calculate"; import { - Asset, - compareUtxo, - DexV2Calculation, DexV2Constant, FIXED_DEPOSIT_ADA, MetadataMessage, - OrderV2, - PoolV2, -} from "."; +} from "./types/constants"; import { BlockfrostAdapter } from "./adapters/blockfrost"; import { BatcherFee } from "./batcher-fee-reduction/calculate"; import { DexVersion } from "./batcher-fee-reduction/configs.internal"; diff --git a/src/index.ts b/src/index.ts index 6c1aaf4..47aa7c4 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,4 +1,4 @@ -export * from "./adapters/adapter"; +export * from "./adapters"; export * from "./calculate"; export * from "./dex"; export * from "./dex-v2"; diff --git a/src/types/constants.ts b/src/types/constants.ts index 7c73380..f5eab20 100644 --- a/src/types/constants.ts +++ b/src/types/constants.ts @@ -1,7 +1,7 @@ import { Address, OutRef, Script } from "@minswap/lucid-cardano"; import invariant from "@minswap/tiny-invariant"; -import { Asset } from ".."; +import { Asset } from "./asset"; import { NetworkEnvironment, NetworkId } from "./network"; export namespace DexV1Constant { diff --git a/test/adapter.test.ts b/test/adapter.test.ts index 22a6f3a..d6c3376 100644 --- a/test/adapter.test.ts +++ b/test/adapter.test.ts @@ -47,7 +47,7 @@ beforeAll(() => { NetworkId.TESTNET, new MaestroClient( new Configuration({ - apiKey: "MAESTRO_API_KEY_TESTNET", + apiKey: mustGetEnv("MAESTRO_API_KEY_TESTNET"), network: cardanoNetworkPreprod, }) ) @@ -57,7 +57,7 @@ beforeAll(() => { NetworkId.MAINNET, new MaestroClient( new Configuration({ - apiKey: "MAESTRO_API_KEY_MAINNET", + apiKey: mustGetEnv("MAESTRO_API_KEY_MAINNET"), network: cardanoNetworkMainnet, }) ) From 6919278db254d172e984b40cb2f0b755d910d2e8 Mon Sep 17 00:00:00 2001 From: Vardominator Date: Sat, 4 Jan 2025 06:30:15 +0000 Subject: [PATCH 15/22] restore test comments --- test/adapter.test.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/adapter.test.ts b/test/adapter.test.ts index d6c3376..4af2662 100644 --- a/test/adapter.test.ts +++ b/test/adapter.test.ts @@ -75,10 +75,13 @@ async function runTests(adapterTestnet: Adapter, adapterMainnet: Adapter) { async function testPoolPrice(adapter: Adapter): Promise { const pools = await adapter.getV1Pools({ page: 1 }); expect(pools.length).toBeGreaterThan(0); + // check random 5 pools for (let i = 0; i < 5; i++) { const idx = Math.floor(Math.random() * pools.length); const pool = pools[idx]; const [priceAB, priceBA] = await adapter.getV1PoolPrice({ pool }); + // product of 2 prices must be approximately equal to 1 + // abs(priceAB * priceBA - 1) <= epsilon expect(priceAB.mul(priceBA).sub(1).abs().toNumber()).toBeLessThanOrEqual( 1e-6 ); From ce7e91214f081a56833fe16ede40d686d617aa3a Mon Sep 17 00:00:00 2001 From: Vardominator Date: Sat, 4 Jan 2025 16:43:25 +0000 Subject: [PATCH 16/22] update lock --- pnpm-lock.yaml | 113 +++++++++++++++++++++++++++++++++---------------- 1 file changed, 76 insertions(+), 37 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e2306cf..160e77b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -17,6 +17,9 @@ importers: '@cardano-ogmios/schema': specifier: ^6.5.0 version: 6.9.0 + '@maestro-org/typescript-sdk': + specifier: ^1.6.3 + version: 1.6.3 '@minswap/lucid-cardano': specifier: 0.10.10-minswap.4 version: 0.10.10-minswap.4 @@ -56,8 +59,8 @@ importers: specifier: ^29.7.0 version: 29.7.0 '@prisma/client': - specifier: ^5.19.1 - version: 5.22.0(prisma@5.22.0) + specifier: ^6.0.1 + version: 6.1.0(prisma@6.1.0) '@types/big.js': specifier: ^6.2.2 version: 6.2.2 @@ -98,8 +101,8 @@ importers: specifier: 3.3.3 version: 3.3.3 prisma: - specifier: ^5.19.1 - version: 5.22.0 + specifier: ^6.0.1 + version: 6.1.0 rimraf: specifier: ^6.0.1 version: 6.0.1 @@ -633,6 +636,9 @@ packages: '@jridgewell/trace-mapping@0.3.9': resolution: {integrity: sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==} + '@maestro-org/typescript-sdk@1.6.3': + resolution: {integrity: sha512-iN0eb4ccyRj16XybNm0BRRPQbi7MMUkLA1zeUKqad5ynNnDAFLt6+3/wRe12Te9fhKgsT5Xsgk7JlTnjlUZLHA==} + '@minswap/lucid-cardano@0.10.10-minswap.4': resolution: {integrity: sha512-LFBm2F4ZuLC4z5ktXwQQPeyi9l2P2ypBu/5ZZr+b/ievYw6lDnwhYk6ju0zxjXYk5FG3wlQjW4Qpwqsy0ZlsKA==} engines: {node: '>=14'} @@ -663,29 +669,29 @@ packages: resolution: {integrity: sha512-BRs5XUAwiyCDQMsVA9IDvDa7UBR9gAvPHgugOeGng3YN6vJ9JYonyDc0lNczErgtCWtucjR5N7VtaonboD/ezg==} engines: {node: '>=10.12.0'} - '@prisma/client@5.22.0': - resolution: {integrity: sha512-M0SVXfyHnQREBKxCgyo7sffrKttwE6R8PMq330MIUF0pTwjUhLbW84pFDlf06B27XyCR++VtjugEnIHdr07SVA==} - engines: {node: '>=16.13'} + '@prisma/client@6.1.0': + resolution: {integrity: sha512-AbQYc5+EJKm1Ydfq3KxwcGiy7wIbm4/QbjCKWWoNROtvy7d6a3gmAGkKjK0iUCzh+rHV8xDhD5Cge8ke/kiy5Q==} + engines: {node: '>=18.18'} peerDependencies: prisma: '*' peerDependenciesMeta: prisma: optional: true - '@prisma/debug@5.22.0': - resolution: {integrity: sha512-AUt44v3YJeggO2ZU5BkXI7M4hu9BF2zzH2iF2V5pyXT/lRTyWiElZ7It+bRH1EshoMRxHgpYg4VB6rCM+mG5jQ==} + '@prisma/debug@6.1.0': + resolution: {integrity: sha512-0himsvcM4DGBTtvXkd2Tggv6sl2JyUYLzEGXXleFY+7Kp6rZeSS3hiTW9mwtUlXrwYbJP6pwlVNB7jYElrjWUg==} - '@prisma/engines-version@5.22.0-44.605197351a3c8bdd595af2d2a9bc3025bca48ea2': - resolution: {integrity: sha512-2PTmxFR2yHW/eB3uqWtcgRcgAbG1rwG9ZriSvQw+nnb7c4uCr3RAcGMb6/zfE88SKlC1Nj2ziUvc96Z379mHgQ==} + '@prisma/engines-version@6.1.0-21.11f085a2012c0f4778414c8db2651556ee0ef959': + resolution: {integrity: sha512-PdJqmYM2Fd8K0weOOtQThWylwjsDlTig+8Pcg47/jszMuLL9iLIaygC3cjWJLda69siRW4STlCTMSgOjZzvKPQ==} - '@prisma/engines@5.22.0': - resolution: {integrity: sha512-UNjfslWhAt06kVL3CjkuYpHAWSO6L4kDCVPegV6itt7nD1kSJavd3vhgAEhjglLJJKEdJ7oIqDJ+yHk6qO8gPA==} + '@prisma/engines@6.1.0': + resolution: {integrity: sha512-GnYJbCiep3Vyr1P/415ReYrgJUjP79fBNc1wCo7NP6Eia0CzL2Ot9vK7Infczv3oK7JLrCcawOSAxFxNFsAERQ==} - '@prisma/fetch-engine@5.22.0': - resolution: {integrity: sha512-bkrD/Mc2fSvkQBV5EpoFcZ87AvOgDxbG99488a5cexp5Ccny+UM6MAe/UFkUC0wLYD9+9befNOqGiIJhhq+HbA==} + '@prisma/fetch-engine@6.1.0': + resolution: {integrity: sha512-asdFi7TvPlEZ8CzSZ/+Du5wZ27q6OJbRSXh+S8ISZguu+S9KtS/gP7NeXceZyb1Jv1SM1S5YfiCv+STDsG6rrg==} - '@prisma/get-platform@5.22.0': - resolution: {integrity: sha512-pHhpQdr1UPFpt+zFfnPazhulaZYCUqeIcPpJViYoq9R+D/yw4fjE+CtnsnKzPYm0ddUbeXUzjGVGIRVgPDCk4Q==} + '@prisma/get-platform@6.1.0': + resolution: {integrity: sha512-ia8bNjboBoHkmKGGaWtqtlgQOhCi7+f85aOkPJKgNwWvYrT6l78KgojLekE8zMhVk0R9lWcifV0Pf8l3/15V0Q==} '@rollup/pluginutils@5.1.3': resolution: {integrity: sha512-Pnsb6f32CD2W3uCaLZIzDmeFyQ2b8UWMFI7xtwUezpcGBDVDW6y9XgAWIlARiGAo6eNF5FK5aQTr0LFyNyqq5A==} @@ -1021,6 +1027,9 @@ packages: asynckit@0.4.0: resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==} + axios@1.7.9: + resolution: {integrity: sha512-LhLcE7Hbiryz8oMDdDptSrWowmB4Bl6RCt6sIJKpRB4XtVf0iEgewX3au/pJqm+Py1kCASkb/FFKjxQaLtxJvw==} + babel-jest@29.7.0: resolution: {integrity: sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -1449,6 +1458,15 @@ packages: flatted@3.3.2: resolution: {integrity: sha512-AiwGJM8YcNOaobumgtng+6NHuOqC3A7MixFeDafM3X9cIUM+xUXoS5Vfgf+OihAYe20fxqNM9yPBXJzRtZ/4eA==} + follow-redirects@1.15.9: + resolution: {integrity: sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==} + engines: {node: '>=4.0'} + peerDependencies: + debug: '*' + peerDependenciesMeta: + debug: + optional: true + foreground-child@3.3.0: resolution: {integrity: sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg==} engines: {node: '>=14'} @@ -2115,15 +2133,18 @@ packages: resolution: {integrity: sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - prisma@5.22.0: - resolution: {integrity: sha512-vtpjW3XuYCSnMsNVBjLMNkTj6OZbudcPPTPYHqX0CJfpcdWciI1dM8uHETwmDxxiqEwCIE6WvXucWUetJgfu/A==} - engines: {node: '>=16.13'} + prisma@6.1.0: + resolution: {integrity: sha512-aFI3Yi+ApUxkwCJJwyQSwpyzUX7YX3ihzuHNHOyv4GJg3X5tQsmRaJEnZ+ZyfHpMtnyahhmXVfbTZ+lS8ZtfKw==} + engines: {node: '>=18.18'} hasBin: true prompts@2.4.2: resolution: {integrity: sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==} engines: {node: '>= 6'} + proxy-from-env@1.1.0: + resolution: {integrity: sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==} + pump@3.0.2: resolution: {integrity: sha512-tUPXtzlGM8FE3P0ZL6DVs/3P58k9nk8/jZeQCurTJylQA8qFYzHFfhBJkuqyE0FifOsQ0uKWekiZ5g8wtr28cw==} @@ -3162,6 +3183,12 @@ snapshots: '@jridgewell/resolve-uri': 3.1.2 '@jridgewell/sourcemap-codec': 1.5.0 + '@maestro-org/typescript-sdk@1.6.3': + dependencies: + axios: 1.7.9 + transitivePeerDependencies: + - debug + '@minswap/lucid-cardano@0.10.10-minswap.4': dependencies: '@peculiar/webcrypto': 1.5.0 @@ -3203,30 +3230,30 @@ snapshots: tslib: 2.8.1 webcrypto-core: 1.8.1 - '@prisma/client@5.22.0(prisma@5.22.0)': + '@prisma/client@6.1.0(prisma@6.1.0)': optionalDependencies: - prisma: 5.22.0 + prisma: 6.1.0 - '@prisma/debug@5.22.0': {} + '@prisma/debug@6.1.0': {} - '@prisma/engines-version@5.22.0-44.605197351a3c8bdd595af2d2a9bc3025bca48ea2': {} + '@prisma/engines-version@6.1.0-21.11f085a2012c0f4778414c8db2651556ee0ef959': {} - '@prisma/engines@5.22.0': + '@prisma/engines@6.1.0': dependencies: - '@prisma/debug': 5.22.0 - '@prisma/engines-version': 5.22.0-44.605197351a3c8bdd595af2d2a9bc3025bca48ea2 - '@prisma/fetch-engine': 5.22.0 - '@prisma/get-platform': 5.22.0 + '@prisma/debug': 6.1.0 + '@prisma/engines-version': 6.1.0-21.11f085a2012c0f4778414c8db2651556ee0ef959 + '@prisma/fetch-engine': 6.1.0 + '@prisma/get-platform': 6.1.0 - '@prisma/fetch-engine@5.22.0': + '@prisma/fetch-engine@6.1.0': dependencies: - '@prisma/debug': 5.22.0 - '@prisma/engines-version': 5.22.0-44.605197351a3c8bdd595af2d2a9bc3025bca48ea2 - '@prisma/get-platform': 5.22.0 + '@prisma/debug': 6.1.0 + '@prisma/engines-version': 6.1.0-21.11f085a2012c0f4778414c8db2651556ee0ef959 + '@prisma/get-platform': 6.1.0 - '@prisma/get-platform@5.22.0': + '@prisma/get-platform@6.1.0': dependencies: - '@prisma/debug': 5.22.0 + '@prisma/debug': 6.1.0 '@rollup/pluginutils@5.1.3(rollup@4.27.4)': dependencies: @@ -3550,6 +3577,14 @@ snapshots: asynckit@0.4.0: {} + axios@1.7.9: + dependencies: + follow-redirects: 1.15.9 + form-data: 4.0.1 + proxy-from-env: 1.1.0 + transitivePeerDependencies: + - debug + babel-jest@29.7.0(@babel/core@7.26.0): dependencies: '@babel/core': 7.26.0 @@ -4036,6 +4071,8 @@ snapshots: flatted@3.3.2: {} + follow-redirects@1.15.9: {} + foreground-child@3.3.0: dependencies: cross-spawn: 7.0.6 @@ -4826,9 +4863,9 @@ snapshots: ansi-styles: 5.2.0 react-is: 18.3.1 - prisma@5.22.0: + prisma@6.1.0: dependencies: - '@prisma/engines': 5.22.0 + '@prisma/engines': 6.1.0 optionalDependencies: fsevents: 2.3.3 @@ -4837,6 +4874,8 @@ snapshots: kleur: 3.0.3 sisteransi: 1.0.5 + proxy-from-env@1.1.0: {} + pump@3.0.2: dependencies: end-of-stream: 1.4.4 From 033333cf51d7a5a772908ef1d3d729c25396f7f8 Mon Sep 17 00:00:00 2001 From: Khanh Le Date: Tue, 7 Jan 2025 17:48:42 +0700 Subject: [PATCH 17/22] fix tests --- examples/expired-order-monitor-example.ts | 3 +- examples/lbe-v2-worker-example.ts | 3 +- package.json | 3 +- src/adapters/adapter.ts | 2 +- src/dex-v2.ts | 12 +-- src/expired-order-monitor.ts | 3 +- src/lbe-v2-worker/worker.ts | 3 +- test/adapter.test.ts | 101 ++++++++++++---------- 8 files changed, 71 insertions(+), 59 deletions(-) diff --git a/examples/expired-order-monitor-example.ts b/examples/expired-order-monitor-example.ts index 3b85155..137e900 100644 --- a/examples/expired-order-monitor-example.ts +++ b/examples/expired-order-monitor-example.ts @@ -1,7 +1,8 @@ import { BlockFrostAPI } from "@blockfrost/blockfrost-js"; import { Network } from "@minswap/lucid-cardano"; -import { BlockfrostAdapter, NetworkId } from "../src"; +import { NetworkId } from "../src"; +import { BlockfrostAdapter } from "../src/adapters/blockfrost"; import { ExpiredOrderMonitor } from "../src/expired-order-monitor"; import { getBackendLucidInstance } from "../src/utils/lucid"; diff --git a/examples/lbe-v2-worker-example.ts b/examples/lbe-v2-worker-example.ts index 5681f17..f0bb52e 100644 --- a/examples/lbe-v2-worker-example.ts +++ b/examples/lbe-v2-worker-example.ts @@ -1,7 +1,8 @@ import { BlockFrostAPI } from "@blockfrost/blockfrost-js"; import { Network } from "@minswap/lucid-cardano"; -import { BlockfrostAdapter, NetworkId } from "../src"; +import { NetworkId } from "../src"; +import { BlockfrostAdapter } from "../src/adapters/blockfrost"; import { LbeV2Worker } from "../src/lbe-v2-worker/worker"; import { NetworkEnvironment } from "../src/types/network"; import { getBackendLucidInstance } from "../src/utils/lucid"; diff --git a/package.json b/package.json index 6d0a579..60388d6 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,8 @@ "prisma:dbpull": "prisma db pull", "prisma:generate": "prisma generate", "postinstall": "prisma generate", - "syncer:start": "node --no-warnings=ExperimentalWarning --loader ts-node/esm src/syncer/main.ts" + "syncer:start": "node --no-warnings=ExperimentalWarning --loader ts-node/esm src/syncer/main.ts", + "type-check": "tsc --noEmit" }, "keywords": [ "minswap", diff --git a/src/adapters/adapter.ts b/src/adapters/adapter.ts index fac7be0..b3d8dbd 100644 --- a/src/adapters/adapter.ts +++ b/src/adapters/adapter.ts @@ -1,5 +1,5 @@ -import Big from "big.js"; import { Address } from "@minswap/lucid-cardano"; +import Big from "big.js"; import { Asset } from "../types/asset"; import { FactoryV2 } from "../types/factory"; diff --git a/src/dex-v2.ts b/src/dex-v2.ts index 199214c..9b4efee 100644 --- a/src/dex-v2.ts +++ b/src/dex-v2.ts @@ -13,20 +13,20 @@ import { } from "@minswap/lucid-cardano"; import invariant from "@minswap/tiny-invariant"; -import { Asset } from "./types/asset"; -import { OrderV2 } from "./types/order"; -import { PoolV2 } from "./types/pool"; +import { BlockfrostAdapter } from "./adapters/blockfrost"; +import { BatcherFee } from "./batcher-fee-reduction/calculate"; +import { DexVersion } from "./batcher-fee-reduction/configs.internal"; import { compareUtxo, DexV2Calculation } from "./calculate"; +import { Asset } from "./types/asset"; import { DexV2Constant, FIXED_DEPOSIT_ADA, MetadataMessage, } from "./types/constants"; -import { BlockfrostAdapter } from "./adapters/blockfrost"; -import { BatcherFee } from "./batcher-fee-reduction/calculate"; -import { DexVersion } from "./batcher-fee-reduction/configs.internal"; import { FactoryV2 } from "./types/factory"; import { NetworkEnvironment, NetworkId } from "./types/network"; +import { OrderV2 } from "./types/order"; +import { PoolV2 } from "./types/pool"; import { lucidToNetworkEnv } from "./utils/network.internal"; import { buildUtxoToStoreDatum } from "./utils/tx.internal"; diff --git a/src/expired-order-monitor.ts b/src/expired-order-monitor.ts index 98ec277..2d3360d 100644 --- a/src/expired-order-monitor.ts +++ b/src/expired-order-monitor.ts @@ -1,6 +1,7 @@ import { Lucid } from "@minswap/lucid-cardano"; -import { BlockfrostAdapter, DexV2, DexV2Constant, OrderV2 } from "."; +import { DexV2, DexV2Constant, OrderV2 } from "."; +import { BlockfrostAdapter } from "./adapters/blockfrost"; import { runRecurringJob } from "./utils/job"; type DexV2WorkerConstructor = { diff --git a/src/lbe-v2-worker/worker.ts b/src/lbe-v2-worker/worker.ts index 3624edc..fa80c77 100644 --- a/src/lbe-v2-worker/worker.ts +++ b/src/lbe-v2-worker/worker.ts @@ -1,7 +1,8 @@ import { Data, Lucid, UnixTime, UTxO } from "@minswap/lucid-cardano"; import invariant from "@minswap/tiny-invariant"; -import { BlockfrostAdapter, LbeV2Constant, PoolV2 } from ".."; +import { LbeV2Constant, PoolV2 } from ".."; +import { BlockfrostAdapter } from "../adapters/blockfrost"; import { LbeV2 } from "../lbe-v2/lbe-v2"; import { LbeV2Types } from "../types/lbe-v2"; import { NetworkEnvironment, NetworkId } from "../types/network"; diff --git a/test/adapter.test.ts b/test/adapter.test.ts index 4af2662..d3e5bd1 100644 --- a/test/adapter.test.ts +++ b/test/adapter.test.ts @@ -1,9 +1,13 @@ import { BlockFrostAPI } from "@blockfrost/blockfrost-js"; -import { ADA, Adapter, Asset, NetworkId, StableswapConstant } from "../src"; +import { Configuration, MaestroClient } from "@maestro-org/typescript-sdk"; +import { Network } from "@minswap/lucid-cardano"; + +import { Adapter } from "../src/adapters"; import { BlockfrostAdapter } from "../src/adapters/blockfrost"; import { MaestroAdapter } from "../src/adapters/maestro"; -import { MaestroClient, Configuration } from "@maestro-org/typescript-sdk"; -import { Network } from "@minswap/lucid-cardano"; +import { ADA, Asset } from "../src/types/asset"; +import { StableswapConstant } from "../src/types/constants"; +import { NetworkId } from "../src/types/network"; function mustGetEnv(key: string): string { const val = process.env[key]; @@ -22,49 +26,14 @@ const MIN_ADA_POOL_V1_ID_TESTNET = const MIN_ADA_POOL_V1_ID_MAINNET = "6aa2153e1ae896a95539c9d62f76cedcdabdcdf144e564b8955f609d660cf6a2"; -let blockfrostAdapterTestnet: BlockfrostAdapter; -let blockfrostAdapterMainnet: BlockfrostAdapter; -let maestroAdapterTestnet: MaestroAdapter; -let maestroAdapterMainnet: MaestroAdapter; - -beforeAll(() => { - blockfrostAdapterTestnet = new BlockfrostAdapter( - NetworkId.TESTNET, - new BlockFrostAPI({ - projectId: mustGetEnv("BLOCKFROST_PROJECT_ID_TESTNET"), - network: "preprod", - }) - ); - blockfrostAdapterMainnet = new BlockfrostAdapter( - NetworkId.MAINNET, - new BlockFrostAPI({ - projectId: mustGetEnv("BLOCKFROST_PROJECT_ID_MAINNET"), - network: "mainnet", - }) - ); - const cardanoNetworkPreprod: Network = "Preprod"; - maestroAdapterTestnet = new MaestroAdapter( - NetworkId.TESTNET, - new MaestroClient( - new Configuration({ - apiKey: mustGetEnv("MAESTRO_API_KEY_TESTNET"), - network: cardanoNetworkPreprod, - }) - ) - ); - const cardanoNetworkMainnet: Network = "Mainnet"; - maestroAdapterMainnet = new MaestroAdapter( - NetworkId.MAINNET, - new MaestroClient( - new Configuration({ - apiKey: mustGetEnv("MAESTRO_API_KEY_MAINNET"), - network: cardanoNetworkMainnet, - }) - ) - ); -}); +async function runTests(getAdapters: () => [Adapter, Adapter]) { + let adapterTestnet: Adapter; + let adapterMainnet: Adapter; + + beforeAll(() => { + [adapterTestnet, adapterMainnet] = getAdapters(); + }); -async function runTests(adapterTestnet: Adapter, adapterMainnet: Adapter) { test("getAssetDecimals", async () => { expect(await adapterTestnet.getAssetDecimals("lovelace")).toBe(6); expect(await adapterTestnet.getAssetDecimals(MIN_TESTNET)).toBe(0); @@ -202,9 +171,47 @@ async function runTests(adapterTestnet: Adapter, adapterMainnet: Adapter) { } describe("BlockfrostAdapter Tests", () => { - runTests(blockfrostAdapterTestnet, blockfrostAdapterMainnet); + runTests(() => { + const blockfrostAdapterTestnet = new BlockfrostAdapter( + NetworkId.TESTNET, + new BlockFrostAPI({ + projectId: mustGetEnv("BLOCKFROST_PROJECT_ID_TESTNET"), + network: "preprod", + }) + ); + const blockfrostAdapterMainnet = new BlockfrostAdapter( + NetworkId.MAINNET, + new BlockFrostAPI({ + projectId: mustGetEnv("BLOCKFROST_PROJECT_ID_MAINNET"), + network: "mainnet", + }) + ); + return [blockfrostAdapterTestnet, blockfrostAdapterMainnet]; + }); }); describe("MaestroAdapter Tests", () => { - runTests(maestroAdapterTestnet, maestroAdapterMainnet); + runTests(() => { + const cardanoNetworkPreprod: Network = "Preprod"; + const maestroAdapterTestnet = new MaestroAdapter( + NetworkId.TESTNET, + new MaestroClient( + new Configuration({ + apiKey: mustGetEnv("MAESTRO_API_KEY_TESTNET"), + network: cardanoNetworkPreprod, + }) + ) + ); + const cardanoNetworkMainnet: Network = "Mainnet"; + const maestroAdapterMainnet = new MaestroAdapter( + NetworkId.MAINNET, + new MaestroClient( + new Configuration({ + apiKey: mustGetEnv("MAESTRO_API_KEY_MAINNET"), + network: cardanoNetworkMainnet, + }) + ) + ); + return [maestroAdapterTestnet, maestroAdapterMainnet]; + }); }); From 1e015ee0b37805dcc819d85f5dbe4c52c71a0b98 Mon Sep 17 00:00:00 2001 From: Khanh Le Date: Tue, 7 Jan 2025 18:08:52 +0700 Subject: [PATCH 18/22] fix tests --- test/adapter.test.ts | 96 ++++++++++++++++++++------------------------ 1 file changed, 44 insertions(+), 52 deletions(-) diff --git a/test/adapter.test.ts b/test/adapter.test.ts index d3e5bd1..4efb38f 100644 --- a/test/adapter.test.ts +++ b/test/adapter.test.ts @@ -26,14 +26,52 @@ const MIN_ADA_POOL_V1_ID_TESTNET = const MIN_ADA_POOL_V1_ID_MAINNET = "6aa2153e1ae896a95539c9d62f76cedcdabdcdf144e564b8955f609d660cf6a2"; -async function runTests(getAdapters: () => [Adapter, Adapter]) { - let adapterTestnet: Adapter; - let adapterMainnet: Adapter; +function getBlockfrostAdapters(): [Adapter, Adapter] { + const blockfrostAdapterTestnet = new BlockfrostAdapter( + NetworkId.TESTNET, + new BlockFrostAPI({ + projectId: mustGetEnv("BLOCKFROST_PROJECT_ID_TESTNET"), + network: "preprod", + }) + ); + const blockfrostAdapterMainnet = new BlockfrostAdapter( + NetworkId.MAINNET, + new BlockFrostAPI({ + projectId: mustGetEnv("BLOCKFROST_PROJECT_ID_MAINNET"), + network: "mainnet", + }) + ); + return [blockfrostAdapterTestnet, blockfrostAdapterMainnet]; +} - beforeAll(() => { - [adapterTestnet, adapterMainnet] = getAdapters(); - }); +function getMaestroAdapters(): [Adapter, Adapter] { + const cardanoNetworkPreprod: Network = "Preprod"; + const maestroAdapterTestnet = new MaestroAdapter( + NetworkId.TESTNET, + new MaestroClient( + new Configuration({ + apiKey: mustGetEnv("MAESTRO_API_KEY_TESTNET"), + network: cardanoNetworkPreprod, + }) + ) + ); + const cardanoNetworkMainnet: Network = "Mainnet"; + const maestroAdapterMainnet = new MaestroAdapter( + NetworkId.MAINNET, + new MaestroClient( + new Configuration({ + apiKey: mustGetEnv("MAESTRO_API_KEY_MAINNET"), + network: cardanoNetworkMainnet, + }) + ) + ); + return [maestroAdapterTestnet, maestroAdapterMainnet]; +} +describe.each([ + ["Blockfrost", ...getBlockfrostAdapters()], + ["Maestro", ...getMaestroAdapters()], +])("Run test with %s adapter", (_name, adapterTestnet, adapterMainnet) => { test("getAssetDecimals", async () => { expect(await adapterTestnet.getAssetDecimals("lovelace")).toBe(6); expect(await adapterTestnet.getAssetDecimals(MIN_TESTNET)).toBe(0); @@ -168,50 +206,4 @@ async function runTests(getAdapters: () => [Adapter, Adapter]) { expect(pool?.assets).toEqual(cfg.assets); } }); -} - -describe("BlockfrostAdapter Tests", () => { - runTests(() => { - const blockfrostAdapterTestnet = new BlockfrostAdapter( - NetworkId.TESTNET, - new BlockFrostAPI({ - projectId: mustGetEnv("BLOCKFROST_PROJECT_ID_TESTNET"), - network: "preprod", - }) - ); - const blockfrostAdapterMainnet = new BlockfrostAdapter( - NetworkId.MAINNET, - new BlockFrostAPI({ - projectId: mustGetEnv("BLOCKFROST_PROJECT_ID_MAINNET"), - network: "mainnet", - }) - ); - return [blockfrostAdapterTestnet, blockfrostAdapterMainnet]; - }); -}); - -describe("MaestroAdapter Tests", () => { - runTests(() => { - const cardanoNetworkPreprod: Network = "Preprod"; - const maestroAdapterTestnet = new MaestroAdapter( - NetworkId.TESTNET, - new MaestroClient( - new Configuration({ - apiKey: mustGetEnv("MAESTRO_API_KEY_TESTNET"), - network: cardanoNetworkPreprod, - }) - ) - ); - const cardanoNetworkMainnet: Network = "Mainnet"; - const maestroAdapterMainnet = new MaestroAdapter( - NetworkId.MAINNET, - new MaestroClient( - new Configuration({ - apiKey: mustGetEnv("MAESTRO_API_KEY_MAINNET"), - network: cardanoNetworkMainnet, - }) - ) - ); - return [maestroAdapterTestnet, maestroAdapterMainnet]; - }); }); From 284b10df754447327efc92b4ade66e2f6fe8d0ea Mon Sep 17 00:00:00 2001 From: Vardominator Date: Wed, 8 Jan 2025 09:29:09 +0000 Subject: [PATCH 19/22] all tests passing --- src/adapters/maestro.ts | 45 +++-- test/adapter.test.js | 371 ++++++++++++++++++++++++++++++++++++++++ test/adapter.test.ts | 2 +- 3 files changed, 402 insertions(+), 16 deletions(-) create mode 100644 test/adapter.test.js diff --git a/src/adapters/maestro.ts b/src/adapters/maestro.ts index 5006464..246a20b 100644 --- a/src/adapters/maestro.ts +++ b/src/adapters/maestro.ts @@ -70,8 +70,8 @@ export class MaestroAdapter implements Adapter { private mapMaestroAssetToValue(assets: MaestroUtxoAsset[]): Value { return assets.map((asset) => ({ - unit: asset.unit, - quantity: asset.amount, + unit: asset.unit.toString(), + quantity: asset.amount.toString(), })); } @@ -83,10 +83,7 @@ export class MaestroAdapter implements Adapter { const assetAInfo = await this.maestroClient.assets.assetInfo(asset); return assetAInfo.data.token_registry_metadata?.decimals ?? 0; } catch (err) { - if (err instanceof MaestroServerError && err.code === 400) { - return 0; - } - throw err; + return 0; } } @@ -150,7 +147,7 @@ export class MaestroAdapter implements Adapter { count = 100, order = "asc", }: GetPoolsParams): Promise { - const utxosResponse = await this.maestroClient.addresses.utxosByAddress( + const utxosResponse = await this.maestroClient.addresses.utxosByPaymentCred( DexV1Constant.POOL_SCRIPT_HASH, { cursor, count, order } ); @@ -226,16 +223,34 @@ export class MaestroAdapter implements Adapter { errors: unknown[]; }> { const v2Config = DexV2Constant.CONFIG[this.networkId]; - const utxos = await this.maestroClient.addresses.utxosByAddress( - v2Config.poolScriptHashBech32 + const utxos = await this.maestroClient.addresses.utxosByPaymentCred( + v2Config.poolScriptHashBech32, + { + asset: v2Config.poolAuthenAsset, + } ); - const utxosData = utxos.data; + + let utxosData: UtxoWithSlot[] = utxos.data; + let nextCursor: string | null = utxos.next_cursor ?? null; + + while (nextCursor) { + const utxosResponse = + await this.maestroClient.addresses.utxosByPaymentCred( + v2Config.poolScriptHashBech32, + { + asset: v2Config.poolAuthenAsset, + cursor: nextCursor, + } + ); + utxosData = utxosData.concat(utxosResponse.data); + nextCursor = utxosResponse.next_cursor ?? null; + } const pools: PoolV2.State[] = []; const errors: unknown[] = []; for (const utxo of utxosData) { try { - if (utxo.datum?.type != "inline") { + if (utxo.datum?.type) { throw new Error(`Cannot find datum of Pool V2, tx: ${utxo.tx_hash}`); } const pool = new PoolV2.State( @@ -243,7 +258,7 @@ export class MaestroAdapter implements Adapter { utxo.address, { txHash: utxo.tx_hash, index: utxo.index }, this.mapMaestroAssetToValue(utxo.assets), - utxo.datum.hash + utxo.datum?.bytes ?? "" ); pools.push(pool); } catch (err) { @@ -262,7 +277,7 @@ export class MaestroAdapter implements Adapter { order = "asc", }: GetPoolsParams): Promise<{ pools: PoolV2.State[]; errors: unknown[] }> { const v2Config = DexV2Constant.CONFIG[this.networkId]; - const utxos = await this.maestroClient.addresses.utxosByAddress( + const utxos = await this.maestroClient.addresses.utxosByPaymentCred( v2Config.poolScriptHashBech32, { asset: v2Config.poolAuthenAsset, @@ -464,8 +479,8 @@ export class MaestroAdapter implements Adapter { utxo: UtxoWithSlot ): Promise { let datum: string; - if (utxo.datum?.type === "inline") { - datum = utxo.datum.hash; + if (utxo.datum?.type) { + datum = utxo.datum.bytes ?? ""; } else if (utxo.datum?.hash) { datum = await this.getDatumByDatumHash(utxo.datum.hash); } else { diff --git a/test/adapter.test.js b/test/adapter.test.js new file mode 100644 index 0000000..7a59f07 --- /dev/null +++ b/test/adapter.test.js @@ -0,0 +1,371 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (g && (g = 0, op[0] && (_ = 0)), _) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { + if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { + if (ar || !(i in from)) { + if (!ar) ar = Array.prototype.slice.call(from, 0, i); + ar[i] = from[i]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var typescript_sdk_1 = require("@maestro-org/typescript-sdk"); +var maestro_1 = require("../src/adapters/maestro"); +var asset_1 = require("../src/types/asset"); +var constants_1 = require("../src/types/constants"); +var network_1 = require("../src/types/network"); +function mustGetEnv(key) { + var val = process.env[key]; + if (!val) { + throw new Error("".concat(key, " not found")); + } + return val; +} +var MIN_TESTNET = "e16c2dc8ae937e8d3790c7fd7168d7b994621ba14ca11415f39fed724d494e"; +var MIN_MAINNET = "29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c64d494e"; +var MIN_ADA_POOL_V1_ID_TESTNET = "3bb0079303c57812462dec9de8fb867cef8fd3768de7f12c77f6f0dd80381d0d"; +var MIN_ADA_POOL_V1_ID_MAINNET = "6aa2153e1ae896a95539c9d62f76cedcdabdcdf144e564b8955f609d660cf6a2"; +// function getBlockfrostAdapters(): [Adapter, Adapter] { +// const blockfrostAdapterTestnet = new BlockfrostAdapter( +// NetworkId.TESTNET, +// new BlockFrostAPI({ +// projectId: mustGetEnv("BLOCKFROST_PROJECT_ID_TESTNET"), +// network: "preprod", +// }) +// ); +// const blockfrostAdapterMainnet = new BlockfrostAdapter( +// NetworkId.MAINNET, +// new BlockFrostAPI({ +// projectId: mustGetEnv("BLOCKFROST_PROJECT_ID_MAINNET"), +// network: "mainnet", +// }) +// ); +// return [blockfrostAdapterTestnet, blockfrostAdapterMainnet]; +// } +function getMaestroAdapters() { + var cardanoNetworkPreprod = "Preprod"; + var maestroAdapterTestnet = new maestro_1.MaestroAdapter(network_1.NetworkId.TESTNET, new typescript_sdk_1.MaestroClient(new typescript_sdk_1.Configuration({ + apiKey: mustGetEnv("MAESTRO_API_KEY_TESTNET"), + network: cardanoNetworkPreprod, + }))); + var cardanoNetworkMainnet = "Mainnet"; + var maestroAdapterMainnet = new maestro_1.MaestroAdapter(network_1.NetworkId.MAINNET, new typescript_sdk_1.MaestroClient(new typescript_sdk_1.Configuration({ + apiKey: mustGetEnv("MAESTRO_API_KEY_MAINNET"), + network: cardanoNetworkMainnet, + }))); + return [maestroAdapterTestnet, maestroAdapterMainnet]; +} +describe.each([ + __spreadArray(["Maestro"], getMaestroAdapters(), true), +])("Run test with %s adapter", function (_name, adapterTestnet, adapterMainnet) { + test("getAssetDecimals", function () { return __awaiter(void 0, void 0, void 0, function () { + var _a, _b, _c, _d; + return __generator(this, function (_e) { + switch (_e.label) { + case 0: + _a = expect; + return [4 /*yield*/, adapterTestnet.getAssetDecimals("lovelace")]; + case 1: + _a.apply(void 0, [_e.sent()]).toBe(6); + _b = expect; + return [4 /*yield*/, adapterTestnet.getAssetDecimals(MIN_TESTNET)]; + case 2: + _b.apply(void 0, [_e.sent()]).toBe(0); + _c = expect; + return [4 /*yield*/, adapterMainnet.getAssetDecimals("lovelace")]; + case 3: + _c.apply(void 0, [_e.sent()]).toBe(6); + _d = expect; + return [4 /*yield*/, adapterMainnet.getAssetDecimals(MIN_MAINNET)]; + case 4: + _d.apply(void 0, [_e.sent()]).toBe(6); + return [2 /*return*/]; + } + }); + }); }); + function testPoolPrice(adapter) { + return __awaiter(this, void 0, void 0, function () { + var pools, i, idx, pool, _a, priceAB, priceBA; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: return [4 /*yield*/, adapter.getV1Pools({ page: 1 })]; + case 1: + pools = _b.sent(); + expect(pools.length).toBeGreaterThan(0); + i = 0; + _b.label = 2; + case 2: + if (!(i < 5)) return [3 /*break*/, 5]; + idx = Math.floor(Math.random() * pools.length); + pool = pools[idx]; + return [4 /*yield*/, adapter.getV1PoolPrice({ pool: pool })]; + case 3: + _a = _b.sent(), priceAB = _a[0], priceBA = _a[1]; + // product of 2 prices must be approximately equal to 1 + // abs(priceAB * priceBA - 1) <= epsilon + expect(priceAB.mul(priceBA).sub(1).abs().toNumber()).toBeLessThanOrEqual(1e-6); + _b.label = 4; + case 4: + i++; + return [3 /*break*/, 2]; + case 5: return [2 /*return*/]; + } + }); + }); + } + test("getPoolPrice", function () { return __awaiter(void 0, void 0, void 0, function () { + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, testPoolPrice(adapterTestnet)]; + case 1: + _a.sent(); + return [4 /*yield*/, testPoolPrice(adapterMainnet)]; + case 2: + _a.sent(); + return [2 /*return*/]; + } + }); + }); }, 10000); + test("getV1PoolById", function () { return __awaiter(void 0, void 0, void 0, function () { + var adaMINTestnet, adaMINMainnet; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, adapterTestnet.getV1PoolById({ + id: MIN_ADA_POOL_V1_ID_TESTNET, + })]; + case 1: + adaMINTestnet = _a.sent(); + expect(adaMINTestnet).not.toBeNull(); + expect(adaMINTestnet === null || adaMINTestnet === void 0 ? void 0 : adaMINTestnet.assetA).toEqual("lovelace"); + expect(adaMINTestnet === null || adaMINTestnet === void 0 ? void 0 : adaMINTestnet.assetB).toEqual(MIN_TESTNET); + return [4 /*yield*/, adapterMainnet.getV1PoolById({ + id: MIN_ADA_POOL_V1_ID_MAINNET, + })]; + case 2: + adaMINMainnet = _a.sent(); + expect(adaMINMainnet).not.toBeNull(); + expect(adaMINMainnet === null || adaMINMainnet === void 0 ? void 0 : adaMINMainnet.assetA).toEqual("lovelace"); + expect(adaMINMainnet === null || adaMINMainnet === void 0 ? void 0 : adaMINMainnet.assetB).toEqual(MIN_MAINNET); + return [2 /*return*/]; + } + }); + }); }); + function testPriceHistory(adapter, id) { + return __awaiter(this, void 0, void 0, function () { + var history, i, pool; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, adapter.getV1PoolHistory({ id: id })]; + case 1: + history = _a.sent(); + i = 0; + _a.label = 2; + case 2: + if (!(i < Math.min(5, history.length))) return [3 /*break*/, 5]; + return [4 /*yield*/, adapter.getV1PoolInTx({ txHash: history[i].txHash })]; + case 3: + pool = _a.sent(); + expect(pool === null || pool === void 0 ? void 0 : pool.txIn.txHash).toEqual(history[i].txHash); + _a.label = 4; + case 4: + i++; + return [3 /*break*/, 2]; + case 5: return [2 /*return*/]; + } + }); + }); + } + test("get prices of last 5 states of MIN/ADA pool", function () { return __awaiter(void 0, void 0, void 0, function () { + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, testPriceHistory(adapterTestnet, MIN_ADA_POOL_V1_ID_TESTNET)]; + case 1: + _a.sent(); + return [4 /*yield*/, testPriceHistory(adapterMainnet, MIN_ADA_POOL_V1_ID_MAINNET)]; + case 2: + _a.sent(); + return [2 /*return*/]; + } + }); + }); }); + test("getV2PoolByPair", function () { return __awaiter(void 0, void 0, void 0, function () { + var pool; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, adapterTestnet.getV2PoolByPair(asset_1.ADA, { + policyId: "e16c2dc8ae937e8d3790c7fd7168d7b994621ba14ca11415f39fed72", + tokenName: "4d494e", + })]; + case 1: + pool = _a.sent(); + expect(pool).not.toBeNull(); + expect(pool === null || pool === void 0 ? void 0 : pool.assetA).toEqual("lovelace"); + expect(pool === null || pool === void 0 ? void 0 : pool.assetB).toEqual(MIN_TESTNET); + return [2 /*return*/]; + } + }); + }); }); + test("getAllV2Pools", function () { return __awaiter(void 0, void 0, void 0, function () { + var pools; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, adapterTestnet.getAllV2Pools()]; + case 1: + pools = (_a.sent()).pools; + expect(pools.length > 0); + return [2 /*return*/]; + } + }); + }); }); + test("getV2Pools", function () { return __awaiter(void 0, void 0, void 0, function () { + var pools; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, adapterTestnet.getV2Pools({ page: 1 })]; + case 1: + pools = (_a.sent()).pools; + expect(pools.length > 0); + return [2 /*return*/]; + } + }); + }); }); + test("getAllStablePools", function () { return __awaiter(void 0, void 0, void 0, function () { + var numberOfStablePoolsTestnet, numberOfStablePoolsMainnet, testnetPools, mainnetPools; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + numberOfStablePoolsTestnet = constants_1.StableswapConstant.CONFIG[network_1.NetworkId.TESTNET].length; + numberOfStablePoolsMainnet = constants_1.StableswapConstant.CONFIG[network_1.NetworkId.MAINNET].length; + return [4 /*yield*/, adapterTestnet.getAllStablePools()]; + case 1: + testnetPools = (_a.sent()).pools; + expect(testnetPools.length === numberOfStablePoolsTestnet); + return [4 /*yield*/, adapterMainnet.getAllStablePools()]; + case 2: + mainnetPools = (_a.sent()).pools; + expect(mainnetPools.length === numberOfStablePoolsMainnet); + return [2 /*return*/]; + } + }); + }); }); + test("getStablePoolByLPAsset", function () { return __awaiter(void 0, void 0, void 0, function () { + var testnetCfgs, mainnetCfgs, _i, testnetCfgs_1, cfg, pool, _a, mainnetCfgs_1, cfg, pool; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + testnetCfgs = constants_1.StableswapConstant.CONFIG[network_1.NetworkId.TESTNET]; + mainnetCfgs = constants_1.StableswapConstant.CONFIG[network_1.NetworkId.MAINNET]; + _i = 0, testnetCfgs_1 = testnetCfgs; + _b.label = 1; + case 1: + if (!(_i < testnetCfgs_1.length)) return [3 /*break*/, 4]; + cfg = testnetCfgs_1[_i]; + return [4 /*yield*/, adapterTestnet.getStablePoolByLpAsset(asset_1.Asset.fromString(cfg.lpAsset))]; + case 2: + pool = _b.sent(); + expect(pool).not.toBeNull(); + expect(pool === null || pool === void 0 ? void 0 : pool.nft).toEqual(cfg.nftAsset); + expect(pool === null || pool === void 0 ? void 0 : pool.assets).toEqual(cfg.assets); + _b.label = 3; + case 3: + _i++; + return [3 /*break*/, 1]; + case 4: + _a = 0, mainnetCfgs_1 = mainnetCfgs; + _b.label = 5; + case 5: + if (!(_a < mainnetCfgs_1.length)) return [3 /*break*/, 8]; + cfg = mainnetCfgs_1[_a]; + return [4 /*yield*/, adapterMainnet.getStablePoolByLpAsset(asset_1.Asset.fromString(cfg.lpAsset))]; + case 6: + pool = _b.sent(); + expect(pool).not.toBeNull(); + expect(pool === null || pool === void 0 ? void 0 : pool.nft).toEqual(cfg.nftAsset); + expect(pool === null || pool === void 0 ? void 0 : pool.assets).toEqual(cfg.assets); + _b.label = 7; + case 7: + _a++; + return [3 /*break*/, 5]; + case 8: return [2 /*return*/]; + } + }); + }); }); + test("getStablePoolByNFT", function () { return __awaiter(void 0, void 0, void 0, function () { + var testnetCfgs, mainnetCfgs, _i, testnetCfgs_2, cfg, pool, _a, mainnetCfgs_2, cfg, pool; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + testnetCfgs = constants_1.StableswapConstant.CONFIG[network_1.NetworkId.TESTNET]; + mainnetCfgs = constants_1.StableswapConstant.CONFIG[network_1.NetworkId.MAINNET]; + _i = 0, testnetCfgs_2 = testnetCfgs; + _b.label = 1; + case 1: + if (!(_i < testnetCfgs_2.length)) return [3 /*break*/, 4]; + cfg = testnetCfgs_2[_i]; + return [4 /*yield*/, adapterTestnet.getStablePoolByNFT(asset_1.Asset.fromString(cfg.nftAsset))]; + case 2: + pool = _b.sent(); + expect(pool).not.toBeNull(); + expect(pool === null || pool === void 0 ? void 0 : pool.nft).toEqual(cfg.nftAsset); + expect(pool === null || pool === void 0 ? void 0 : pool.assets).toEqual(cfg.assets); + _b.label = 3; + case 3: + _i++; + return [3 /*break*/, 1]; + case 4: + _a = 0, mainnetCfgs_2 = mainnetCfgs; + _b.label = 5; + case 5: + if (!(_a < mainnetCfgs_2.length)) return [3 /*break*/, 8]; + cfg = mainnetCfgs_2[_a]; + return [4 /*yield*/, adapterMainnet.getStablePoolByNFT(asset_1.Asset.fromString(cfg.nftAsset))]; + case 6: + pool = _b.sent(); + expect(pool).not.toBeNull(); + expect(pool === null || pool === void 0 ? void 0 : pool.nft).toEqual(cfg.nftAsset); + expect(pool === null || pool === void 0 ? void 0 : pool.assets).toEqual(cfg.assets); + _b.label = 7; + case 7: + _a++; + return [3 /*break*/, 5]; + case 8: return [2 /*return*/]; + } + }); + }); }); +}); diff --git a/test/adapter.test.ts b/test/adapter.test.ts index 4efb38f..40c8d03 100644 --- a/test/adapter.test.ts +++ b/test/adapter.test.ts @@ -80,7 +80,7 @@ describe.each([ }); async function testPoolPrice(adapter: Adapter): Promise { - const pools = await adapter.getV1Pools({ page: 1 }); + const pools = await adapter.getV1Pools({}); expect(pools.length).toBeGreaterThan(0); // check random 5 pools for (let i = 0; i < 5; i++) { From 879f5677e68743cff77708c6be9587aee299b50f Mon Sep 17 00:00:00 2001 From: Vardominator Date: Wed, 8 Jan 2025 09:36:35 +0000 Subject: [PATCH 20/22] try again --- src/adapters/maestro.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/adapters/maestro.ts b/src/adapters/maestro.ts index 246a20b..41269aa 100644 --- a/src/adapters/maestro.ts +++ b/src/adapters/maestro.ts @@ -250,7 +250,7 @@ export class MaestroAdapter implements Adapter { const errors: unknown[] = []; for (const utxo of utxosData) { try { - if (utxo.datum?.type) { + if (!utxo.datum?.type) { throw new Error(`Cannot find datum of Pool V2, tx: ${utxo.tx_hash}`); } const pool = new PoolV2.State( From d6607fa7cc47532830282f44c03e641c7981a52d Mon Sep 17 00:00:00 2001 From: Khanh Le Date: Wed, 8 Jan 2025 17:49:36 +0700 Subject: [PATCH 21/22] remove unused js file --- package.json | 2 +- test/adapter.test.js | 371 ------------------------------------------- 2 files changed, 1 insertion(+), 372 deletions(-) delete mode 100644 test/adapter.test.js diff --git a/package.json b/package.json index 60388d6..d2b1f8f 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ ], "scripts": { "build": "rimraf build && rollup -c rollup.config.js", - "test": "NODE_OPTIONS=--experimental-vm-modules jest && tsc", + "test": "NODE_OPTIONS=--experimental-vm-modules jest --detectOpenHandles", "lint": "eslint src", "format": "prettier --write **/*.ts && eslint src --fix", "check-format": "prettier --check **/*.ts && eslint src", diff --git a/test/adapter.test.js b/test/adapter.test.js deleted file mode 100644 index 7a59f07..0000000 --- a/test/adapter.test.js +++ /dev/null @@ -1,371 +0,0 @@ -"use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); - return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_ = 0)), _) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { - if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { - if (ar || !(i in from)) { - if (!ar) ar = Array.prototype.slice.call(from, 0, i); - ar[i] = from[i]; - } - } - return to.concat(ar || Array.prototype.slice.call(from)); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -var typescript_sdk_1 = require("@maestro-org/typescript-sdk"); -var maestro_1 = require("../src/adapters/maestro"); -var asset_1 = require("../src/types/asset"); -var constants_1 = require("../src/types/constants"); -var network_1 = require("../src/types/network"); -function mustGetEnv(key) { - var val = process.env[key]; - if (!val) { - throw new Error("".concat(key, " not found")); - } - return val; -} -var MIN_TESTNET = "e16c2dc8ae937e8d3790c7fd7168d7b994621ba14ca11415f39fed724d494e"; -var MIN_MAINNET = "29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c64d494e"; -var MIN_ADA_POOL_V1_ID_TESTNET = "3bb0079303c57812462dec9de8fb867cef8fd3768de7f12c77f6f0dd80381d0d"; -var MIN_ADA_POOL_V1_ID_MAINNET = "6aa2153e1ae896a95539c9d62f76cedcdabdcdf144e564b8955f609d660cf6a2"; -// function getBlockfrostAdapters(): [Adapter, Adapter] { -// const blockfrostAdapterTestnet = new BlockfrostAdapter( -// NetworkId.TESTNET, -// new BlockFrostAPI({ -// projectId: mustGetEnv("BLOCKFROST_PROJECT_ID_TESTNET"), -// network: "preprod", -// }) -// ); -// const blockfrostAdapterMainnet = new BlockfrostAdapter( -// NetworkId.MAINNET, -// new BlockFrostAPI({ -// projectId: mustGetEnv("BLOCKFROST_PROJECT_ID_MAINNET"), -// network: "mainnet", -// }) -// ); -// return [blockfrostAdapterTestnet, blockfrostAdapterMainnet]; -// } -function getMaestroAdapters() { - var cardanoNetworkPreprod = "Preprod"; - var maestroAdapterTestnet = new maestro_1.MaestroAdapter(network_1.NetworkId.TESTNET, new typescript_sdk_1.MaestroClient(new typescript_sdk_1.Configuration({ - apiKey: mustGetEnv("MAESTRO_API_KEY_TESTNET"), - network: cardanoNetworkPreprod, - }))); - var cardanoNetworkMainnet = "Mainnet"; - var maestroAdapterMainnet = new maestro_1.MaestroAdapter(network_1.NetworkId.MAINNET, new typescript_sdk_1.MaestroClient(new typescript_sdk_1.Configuration({ - apiKey: mustGetEnv("MAESTRO_API_KEY_MAINNET"), - network: cardanoNetworkMainnet, - }))); - return [maestroAdapterTestnet, maestroAdapterMainnet]; -} -describe.each([ - __spreadArray(["Maestro"], getMaestroAdapters(), true), -])("Run test with %s adapter", function (_name, adapterTestnet, adapterMainnet) { - test("getAssetDecimals", function () { return __awaiter(void 0, void 0, void 0, function () { - var _a, _b, _c, _d; - return __generator(this, function (_e) { - switch (_e.label) { - case 0: - _a = expect; - return [4 /*yield*/, adapterTestnet.getAssetDecimals("lovelace")]; - case 1: - _a.apply(void 0, [_e.sent()]).toBe(6); - _b = expect; - return [4 /*yield*/, adapterTestnet.getAssetDecimals(MIN_TESTNET)]; - case 2: - _b.apply(void 0, [_e.sent()]).toBe(0); - _c = expect; - return [4 /*yield*/, adapterMainnet.getAssetDecimals("lovelace")]; - case 3: - _c.apply(void 0, [_e.sent()]).toBe(6); - _d = expect; - return [4 /*yield*/, adapterMainnet.getAssetDecimals(MIN_MAINNET)]; - case 4: - _d.apply(void 0, [_e.sent()]).toBe(6); - return [2 /*return*/]; - } - }); - }); }); - function testPoolPrice(adapter) { - return __awaiter(this, void 0, void 0, function () { - var pools, i, idx, pool, _a, priceAB, priceBA; - return __generator(this, function (_b) { - switch (_b.label) { - case 0: return [4 /*yield*/, adapter.getV1Pools({ page: 1 })]; - case 1: - pools = _b.sent(); - expect(pools.length).toBeGreaterThan(0); - i = 0; - _b.label = 2; - case 2: - if (!(i < 5)) return [3 /*break*/, 5]; - idx = Math.floor(Math.random() * pools.length); - pool = pools[idx]; - return [4 /*yield*/, adapter.getV1PoolPrice({ pool: pool })]; - case 3: - _a = _b.sent(), priceAB = _a[0], priceBA = _a[1]; - // product of 2 prices must be approximately equal to 1 - // abs(priceAB * priceBA - 1) <= epsilon - expect(priceAB.mul(priceBA).sub(1).abs().toNumber()).toBeLessThanOrEqual(1e-6); - _b.label = 4; - case 4: - i++; - return [3 /*break*/, 2]; - case 5: return [2 /*return*/]; - } - }); - }); - } - test("getPoolPrice", function () { return __awaiter(void 0, void 0, void 0, function () { - return __generator(this, function (_a) { - switch (_a.label) { - case 0: return [4 /*yield*/, testPoolPrice(adapterTestnet)]; - case 1: - _a.sent(); - return [4 /*yield*/, testPoolPrice(adapterMainnet)]; - case 2: - _a.sent(); - return [2 /*return*/]; - } - }); - }); }, 10000); - test("getV1PoolById", function () { return __awaiter(void 0, void 0, void 0, function () { - var adaMINTestnet, adaMINMainnet; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: return [4 /*yield*/, adapterTestnet.getV1PoolById({ - id: MIN_ADA_POOL_V1_ID_TESTNET, - })]; - case 1: - adaMINTestnet = _a.sent(); - expect(adaMINTestnet).not.toBeNull(); - expect(adaMINTestnet === null || adaMINTestnet === void 0 ? void 0 : adaMINTestnet.assetA).toEqual("lovelace"); - expect(adaMINTestnet === null || adaMINTestnet === void 0 ? void 0 : adaMINTestnet.assetB).toEqual(MIN_TESTNET); - return [4 /*yield*/, adapterMainnet.getV1PoolById({ - id: MIN_ADA_POOL_V1_ID_MAINNET, - })]; - case 2: - adaMINMainnet = _a.sent(); - expect(adaMINMainnet).not.toBeNull(); - expect(adaMINMainnet === null || adaMINMainnet === void 0 ? void 0 : adaMINMainnet.assetA).toEqual("lovelace"); - expect(adaMINMainnet === null || adaMINMainnet === void 0 ? void 0 : adaMINMainnet.assetB).toEqual(MIN_MAINNET); - return [2 /*return*/]; - } - }); - }); }); - function testPriceHistory(adapter, id) { - return __awaiter(this, void 0, void 0, function () { - var history, i, pool; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: return [4 /*yield*/, adapter.getV1PoolHistory({ id: id })]; - case 1: - history = _a.sent(); - i = 0; - _a.label = 2; - case 2: - if (!(i < Math.min(5, history.length))) return [3 /*break*/, 5]; - return [4 /*yield*/, adapter.getV1PoolInTx({ txHash: history[i].txHash })]; - case 3: - pool = _a.sent(); - expect(pool === null || pool === void 0 ? void 0 : pool.txIn.txHash).toEqual(history[i].txHash); - _a.label = 4; - case 4: - i++; - return [3 /*break*/, 2]; - case 5: return [2 /*return*/]; - } - }); - }); - } - test("get prices of last 5 states of MIN/ADA pool", function () { return __awaiter(void 0, void 0, void 0, function () { - return __generator(this, function (_a) { - switch (_a.label) { - case 0: return [4 /*yield*/, testPriceHistory(adapterTestnet, MIN_ADA_POOL_V1_ID_TESTNET)]; - case 1: - _a.sent(); - return [4 /*yield*/, testPriceHistory(adapterMainnet, MIN_ADA_POOL_V1_ID_MAINNET)]; - case 2: - _a.sent(); - return [2 /*return*/]; - } - }); - }); }); - test("getV2PoolByPair", function () { return __awaiter(void 0, void 0, void 0, function () { - var pool; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: return [4 /*yield*/, adapterTestnet.getV2PoolByPair(asset_1.ADA, { - policyId: "e16c2dc8ae937e8d3790c7fd7168d7b994621ba14ca11415f39fed72", - tokenName: "4d494e", - })]; - case 1: - pool = _a.sent(); - expect(pool).not.toBeNull(); - expect(pool === null || pool === void 0 ? void 0 : pool.assetA).toEqual("lovelace"); - expect(pool === null || pool === void 0 ? void 0 : pool.assetB).toEqual(MIN_TESTNET); - return [2 /*return*/]; - } - }); - }); }); - test("getAllV2Pools", function () { return __awaiter(void 0, void 0, void 0, function () { - var pools; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: return [4 /*yield*/, adapterTestnet.getAllV2Pools()]; - case 1: - pools = (_a.sent()).pools; - expect(pools.length > 0); - return [2 /*return*/]; - } - }); - }); }); - test("getV2Pools", function () { return __awaiter(void 0, void 0, void 0, function () { - var pools; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: return [4 /*yield*/, adapterTestnet.getV2Pools({ page: 1 })]; - case 1: - pools = (_a.sent()).pools; - expect(pools.length > 0); - return [2 /*return*/]; - } - }); - }); }); - test("getAllStablePools", function () { return __awaiter(void 0, void 0, void 0, function () { - var numberOfStablePoolsTestnet, numberOfStablePoolsMainnet, testnetPools, mainnetPools; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - numberOfStablePoolsTestnet = constants_1.StableswapConstant.CONFIG[network_1.NetworkId.TESTNET].length; - numberOfStablePoolsMainnet = constants_1.StableswapConstant.CONFIG[network_1.NetworkId.MAINNET].length; - return [4 /*yield*/, adapterTestnet.getAllStablePools()]; - case 1: - testnetPools = (_a.sent()).pools; - expect(testnetPools.length === numberOfStablePoolsTestnet); - return [4 /*yield*/, adapterMainnet.getAllStablePools()]; - case 2: - mainnetPools = (_a.sent()).pools; - expect(mainnetPools.length === numberOfStablePoolsMainnet); - return [2 /*return*/]; - } - }); - }); }); - test("getStablePoolByLPAsset", function () { return __awaiter(void 0, void 0, void 0, function () { - var testnetCfgs, mainnetCfgs, _i, testnetCfgs_1, cfg, pool, _a, mainnetCfgs_1, cfg, pool; - return __generator(this, function (_b) { - switch (_b.label) { - case 0: - testnetCfgs = constants_1.StableswapConstant.CONFIG[network_1.NetworkId.TESTNET]; - mainnetCfgs = constants_1.StableswapConstant.CONFIG[network_1.NetworkId.MAINNET]; - _i = 0, testnetCfgs_1 = testnetCfgs; - _b.label = 1; - case 1: - if (!(_i < testnetCfgs_1.length)) return [3 /*break*/, 4]; - cfg = testnetCfgs_1[_i]; - return [4 /*yield*/, adapterTestnet.getStablePoolByLpAsset(asset_1.Asset.fromString(cfg.lpAsset))]; - case 2: - pool = _b.sent(); - expect(pool).not.toBeNull(); - expect(pool === null || pool === void 0 ? void 0 : pool.nft).toEqual(cfg.nftAsset); - expect(pool === null || pool === void 0 ? void 0 : pool.assets).toEqual(cfg.assets); - _b.label = 3; - case 3: - _i++; - return [3 /*break*/, 1]; - case 4: - _a = 0, mainnetCfgs_1 = mainnetCfgs; - _b.label = 5; - case 5: - if (!(_a < mainnetCfgs_1.length)) return [3 /*break*/, 8]; - cfg = mainnetCfgs_1[_a]; - return [4 /*yield*/, adapterMainnet.getStablePoolByLpAsset(asset_1.Asset.fromString(cfg.lpAsset))]; - case 6: - pool = _b.sent(); - expect(pool).not.toBeNull(); - expect(pool === null || pool === void 0 ? void 0 : pool.nft).toEqual(cfg.nftAsset); - expect(pool === null || pool === void 0 ? void 0 : pool.assets).toEqual(cfg.assets); - _b.label = 7; - case 7: - _a++; - return [3 /*break*/, 5]; - case 8: return [2 /*return*/]; - } - }); - }); }); - test("getStablePoolByNFT", function () { return __awaiter(void 0, void 0, void 0, function () { - var testnetCfgs, mainnetCfgs, _i, testnetCfgs_2, cfg, pool, _a, mainnetCfgs_2, cfg, pool; - return __generator(this, function (_b) { - switch (_b.label) { - case 0: - testnetCfgs = constants_1.StableswapConstant.CONFIG[network_1.NetworkId.TESTNET]; - mainnetCfgs = constants_1.StableswapConstant.CONFIG[network_1.NetworkId.MAINNET]; - _i = 0, testnetCfgs_2 = testnetCfgs; - _b.label = 1; - case 1: - if (!(_i < testnetCfgs_2.length)) return [3 /*break*/, 4]; - cfg = testnetCfgs_2[_i]; - return [4 /*yield*/, adapterTestnet.getStablePoolByNFT(asset_1.Asset.fromString(cfg.nftAsset))]; - case 2: - pool = _b.sent(); - expect(pool).not.toBeNull(); - expect(pool === null || pool === void 0 ? void 0 : pool.nft).toEqual(cfg.nftAsset); - expect(pool === null || pool === void 0 ? void 0 : pool.assets).toEqual(cfg.assets); - _b.label = 3; - case 3: - _i++; - return [3 /*break*/, 1]; - case 4: - _a = 0, mainnetCfgs_2 = mainnetCfgs; - _b.label = 5; - case 5: - if (!(_a < mainnetCfgs_2.length)) return [3 /*break*/, 8]; - cfg = mainnetCfgs_2[_a]; - return [4 /*yield*/, adapterMainnet.getStablePoolByNFT(asset_1.Asset.fromString(cfg.nftAsset))]; - case 6: - pool = _b.sent(); - expect(pool).not.toBeNull(); - expect(pool === null || pool === void 0 ? void 0 : pool.nft).toEqual(cfg.nftAsset); - expect(pool === null || pool === void 0 ? void 0 : pool.assets).toEqual(cfg.assets); - _b.label = 7; - case 7: - _a++; - return [3 /*break*/, 5]; - case 8: return [2 /*return*/]; - } - }); - }); }); -}); From cb5fdd0e85869243c7d4ef08fd8cedb75fffda09 Mon Sep 17 00:00:00 2001 From: Khanh Le Date: Wed, 8 Jan 2025 17:51:09 +0700 Subject: [PATCH 22/22] fix linter --- package.json | 2 +- src/adapters/maestro.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index d2b1f8f..60388d6 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ ], "scripts": { "build": "rimraf build && rollup -c rollup.config.js", - "test": "NODE_OPTIONS=--experimental-vm-modules jest --detectOpenHandles", + "test": "NODE_OPTIONS=--experimental-vm-modules jest && tsc", "lint": "eslint src", "format": "prettier --write **/*.ts && eslint src --fix", "check-format": "prettier --check **/*.ts && eslint src", diff --git a/src/adapters/maestro.ts b/src/adapters/maestro.ts index 41269aa..8ddc1d6 100644 --- a/src/adapters/maestro.ts +++ b/src/adapters/maestro.ts @@ -82,7 +82,7 @@ export class MaestroAdapter implements Adapter { try { const assetAInfo = await this.maestroClient.assets.assetInfo(asset); return assetAInfo.data.token_registry_metadata?.decimals ?? 0; - } catch (err) { + } catch { return 0; } }