diff --git a/bun.lockb b/bun.lockb index e766eb8..b934852 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/lib/gluon-gold-sdk/.gitignore b/lib/gluon-gold-sdk/.gitignore deleted file mode 100644 index e388170..0000000 --- a/lib/gluon-gold-sdk/.gitignore +++ /dev/null @@ -1,56 +0,0 @@ -# compiled output -/dist -/node_modules -/build - -# Logs -logs -*.log -npm-debug.log* -pnpm-debug.log* -yarn-debug.log* -yarn-error.log* -lerna-debug.log* - -# OS -.DS_Store - -# Tests -/coverage -/.nyc_output - -# IDEs and editors -/.idea -.project -.classpath -.c9/ -*.launch -.settings/ -*.sublime-workspace - -# IDE - VSCode -.vscode/* -!.vscode/settings.json -!.vscode/tasks.json -!.vscode/launch.json -!.vscode/extensions.json - -# dotenv environment variable files -.env -.env.development.local -.env.test.local -.env.production.local -.env.local - -# temp directory -.temp -.tmp - -# Runtime data -pids -*.pid -*.seed -*.pid.lock - -# Diagnostic reports (https://nodejs.org/api/report.html) -report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json \ No newline at end of file diff --git a/lib/gluon-gold-sdk/.npmignore b/lib/gluon-gold-sdk/.npmignore deleted file mode 100644 index d7d45dd..0000000 --- a/lib/gluon-gold-sdk/.npmignore +++ /dev/null @@ -1,5 +0,0 @@ -src -tsconfig.json -.eslintrc.js -.prettierrc -jest.config.js diff --git a/lib/gluon-gold-sdk/README.md b/lib/gluon-gold-sdk/README.md deleted file mode 100644 index c46e7ca..0000000 --- a/lib/gluon-gold-sdk/README.md +++ /dev/null @@ -1,119 +0,0 @@ -## Gluon Gold SDK - -This SDK is meant to facilitate the interaction with the Gluon protocol. - -### Installation - -```bash -npm install gluon-gold-sdk -``` - -### Implemented Features - -- [x] Get Gold oracle box -- [x] Get Gluon box -- [x] Calculate amount of Neutrons and Protons user will receive when input `x` amount of ERGs -- [x] Calculate amount of Neutrons and Protons user will need to input to receive `x` amount of ERGs -- [x] Fission transaction: input ERGs and receive Neutrons and Protons -- [x] Fusion transaction: input Neutrons and Protons and receive ERGs -- [x] Transmuting to Gold (The user sends Protons to the reactor and receives Neutrons) -- [x] Transmuting from Gold (The user sends Neutrons to the reactor and receives Protons) -- [x] Fusion Ratio -- [x] Volume -- [x] GAU Price -- [x] GAUC Price -- [x] Needed fee for all 4 kinds of transactions -- [x] Gold Oracle Price - -### Usage - -```javascript -// all values, including ERG, Neutron and Proton amounts, prices, etc. are without decimals applied - -// the following example creates a fission transaction for 5 ERGs. Similar approach could be used for fusion transaction -const gluon = new Gluon() -const ergToFission = Number(5e9) -const userBoxesJs = [...] -const oracleBox = await gluon.getGoldOracleBox() -const gluonBox = await gluon.getGluonBox() - -// Fission -// the following is an instance of UnsignedTransaction which could be used to get reduced tx or for any use cases -const unsignedTx = await gluon.fission(gluonBox, oracleBox, userBoxesJs, ergToFission) -// the following is an unsigned transaction in JSON which could be used to sign using Nautilus or similar wallets without needing any chagnes -const eip12Tx = await gluon.fissionForEip12(gluonBox, oracleBox, userBoxesJs, ergToFission) - -// Fusion -const ergToFusion = Number(5e9) -const unsignedTx = await gluon.fusion(gluonBox, oracleBox, userBoxesJs, ergToFusion) -const eip12Tx = await gluon.fusionForEip12(gluonBox, oracleBox, userBoxesJs, ergToFusion) - -// Transmuting to Gold -const height = ... // network height that can be gotten from a NodeService instance (see test.ts) -const oracleBuyBackJs = await gluon.getOracleBuyBackBoxJs() -const protonsToTransmute = 5000000 -const eip12Tx = await gluon.transmuteToGoldForEip12(gluonBox, oracleBox, userBoxesJs, oracleBuyBackJs, protonsToTransmute, height) - -// Transmuting from Gold -const neutronsToTransmute = 5000000 -const eip12Tx = await gluon.transmuteFromGoldForEip12(gluonBox, oracleBox, userBoxesJs, oracleBuyBackJs, neutronsToTransmute, height) - - -// Gold price -const goldPrice = await oracleBox.getPrice() // in kg -const goldPriceGram = await oracleBox.getPricePerGram() // in grams - -// GAU price -const gauPrice = await gluon.neutronPrice(oracleBox) // in nanoErgs - -// GAUC price -const gaucPrice = await gluon.protonPrice(oracleBox) // in nanoErgs - -// 2 day volume of protons to neutrons -const volume = await gluon.accumulateVolumeProtonsToNeutrons(2) - -// 2 day volume of neutrons to protons -const volume = await gluon.accumulateVolumeNeutronsToProtons(2) - -// 10 day volume of protons to neutrons -const volume = await gluon.accumulateVolumeProtonsToNeutrons(10) - -// 10 day volume of neutrons to protons -const volume = await gluon.accumulateVolumeNeutronsToProtons(10) - -// 14 day volume of protons to neutrons -const volume = await gluon.accumulateVolumeProtonsToNeutrons() - -// 14 day volume of neutrons to protons -const volume = await gluon.accumulateVolumeNeutronsToProtons() - -// volume of protons to neutrons for the last 14 days -const volumeArray = await gluon.get14DaysVolumeProtonsToNeutrons() // an array with 14 elements for 14 days - -// volume of neutrons to protons for the last 14 days -const volumeArray = await gluon.get14DaysVolumeNeutronsToProtons() // an array with 14 elements for 14 days - -// fusion ratio -const fusionRatio = await gluon.fusionRatio(oracleBox) - -// For each of the 4 operations (fission, fusion, transmute to gold, transmute from gold) there is a method to get the required fees -// In addition to that, there are methods to get the percentage of the fee for the total amount of ERG or Neutron/Proton that is sent/transmuted -const fees = await gluon.getTotalFeeAmountFusion(gluonBox, ergToFusion) -const feesPercentage = await gluon.getFeePercentageFusion(gluonBox, ergToFusion) -console.log(fees.devFee, fees.uiFee, fees.oracleFee, fees.totalFee) -console.log(feesPercentage.devFee, feesPercentage.uiFee, feesPercentage.oracleFee, feesPercentage.totalFee) -// fission is similar - -// similarly for transmute to gold -const fees = await gluon.getTotalFeeAmountTransmuteToGold(gluonBox, oracleBox, protonsToTransmute) -const feesPercentage = await gluon.getFeePercentageTransmuteToGold(gluonBox, oracleBox, protonsToTransmute) -console.log(fees.devFee, fees.uiFee, fees.oracleFee, fees.totalFee) -console.log(feesPercentage.devFee, feesPercentage.uiFee, feesPercentage.oracleFee, feesPercentage.totalFee) -// transmute from gold is similar - -// TVL (total value locked) in nanoERG -const tvl = await gluon.getTVL(gluonBox, oracleBox) - -// Reserve ratio in percentage -const reserveRatio = await gluon.getReserveRatio(gluonBox, oracleBox) -``` diff --git a/lib/gluon-gold-sdk/blog.md b/lib/gluon-gold-sdk/blog.md deleted file mode 100644 index 209ea28..0000000 --- a/lib/gluon-gold-sdk/blog.md +++ /dev/null @@ -1,200 +0,0 @@ -# Building a Website with the Gluon Gold SDK - -## Introduction - -The Gluon Gold SDK is a powerful tool designed to facilitate interaction with the Gluon protocol, which operates on the Ergo blockchain. This SDK allows developers to perform complex operations easily such as fission, fusion, and transmutations of Neutrons and Protons, using ERGs (Ergo's native cryptocurrency). The SDK is particularly useful for developers looking to integrate these functionalities into web applications, bots, etc. This enables users to interact with the Gluon protocol directly from their browsers. - -In this blog post, we will explore how to use the Gluon Gold SDK to in a website that interacts with the Gluon protocol. We will focus on utilizing the SDK's functionalities to perform the four main operations: fission, fusion, transmuting to gold, and transmuting from gold. Additionally, we will discuss how to display relevant Gluon Gold data, such as fusion ratio, prices, fees, etc. to users. - -## Getting Started with the Gluon Gold SDK - -### Installation - -To begin, install the Gluon Gold SDK using npm: - -```bash -npm install gluon-gold-sdk@1.0.0 -``` - -### Importing the SDK in the Browser - -To use the SDK in a browser environment, you can dynamically import it as follows: - -```javascript -if (typeof window !== "undefined") { - gluon = import("gluon-gold-sdk"); -} -``` - -### Creating an Instance of the SDK - -```javascript -const resolvedGluon = await gluon; -const gluonInstance = new resolvedGluon.Gluon(); -``` - -### Adjusting the Gluon Gold SDK Constant Parameters - -Before you start performing operations with the Gluon Gold SDK, it's important to configure the SDK with the appropriate parameters. This ensures that the SDK operates correctly within your desired network environment and with the specified fees. - -To adjust the constant parameters, you can create a new instance of the `Config` class and set the necessary properties. Here's an example of how to do this: - -```javascript -// Create a new configuration instance -const config = new Config(); - -// Set the network to the desired environment (e.g., 'mainnet' or 'testnet') -config.NETWORK = "mainnet"; // or 'testnet' - -// Set the miner fee (in nanoERGs) -config.MINER_FEE = 1000000; // Example: 0.001 ERG - -// Set the UI fee (in nanoERGs), where 1000 nanoERGs represent 1% -config.UI_FEE = 1000; // Example: 1% fee - -// Set the node URL for connecting to the Ergo blockchain -config.NODE_URL = "https://ergo-node.example.com"; - -// Set the UI tree, which is used for specific UI-related operations -config.UI_TREE = "your-ui-tree-value-here"; -``` - -By configuring these parameters, you ensure that the SDK is tailored to your application's requirements, allowing for seamless interaction with the Gluon protocol. Adjust these values according to your specific needs and the environment in which your application will operate. - -### Setting Up the Environment - -To perform operations with the Gluon Gold SDK, it's crucial to first obtain the necessary boxes from the Gluon protocol. These boxes represent specific states on the blockchain and are essential for executing transactions like fission, fusion, and transmutation. - -The Gluon protocol operates on the Ergo blockchain, and to interact with it, your application needs to fetch the latest state of these boxes. This is done by connecting to a node, which acts as a gateway to the blockchain, providing access to the most recent data. - -Here's how you can set up the environment by fetching the required boxes: - -```javascript -// Fetch the current unspent Gold Oracle Box -const oracleBoxJs = await gluonInstance.getGoldOracleBox(); - -// Fetch the current unspent Gluon Box -const gluonBoxJs = await gluonInstance.getGluonBox(); -``` - -**Why Refresh the Boxes?** - -The state of the blockchain is dynamic, with transactions occurring continuously. By periodically refreshing these boxes, you ensure that your application is working with the most up-to-date information. These boxes are updated whenever a transaction is made or the oracle price is updated, so it's important to keep them updated to avoid using stale data. - -### User Interaction with Nautilus Wallet - -You can use any approach to get the user's boxes. One of the most common approaches is to use the `ergo.get_utxos` to fetch the user's boxes from the Nautilus wallet. - -```javascript -const userBoxes = await ergo.get_utxos(); -``` - -## Performing Operations with the SDK - -### Fission - -Fission is the process of converting ERGs into Neutrons and Protons. Here's how you can perform a fission operation: - -```javascript -const amountToFission = ... // amount in nanoERGs -const unsignedTransaction = await gluonInstance.fissionForEip12(gluonBoxJs, oracleBoxJs, userBoxes, amountToFission); -``` - -### Fusion - -Fusion is the reverse process, where Neutrons and Protons are converted back into ERGs: - -```javascript -const amountToFusion = ... // amount in nanoERGs -const unsignedTransaction = await gluonInstance.fusionForEip12(gluonBoxJs, oracleBoxJs, userBoxes, amountToFusion); -``` - -### Transmuting to Gold - -This operation involves sending Protons to the reactor to receive Neutrons: - -```javascript -const protonsToTransmute = 5000000; // Example amount -const height = await nodeService.getNetworkHeight(); // Get current network height -const oracleBuyBackJs = await gluonInstance.getOracleBuyBackBoxJs(); -const unsignedTransaction = await gluonInstance.transmuteToGoldForEip12(gluonBoxJs, oracleBoxJs, userBoxes, oracleBuyBackJs, protonsToTransmute, height); -``` - -### Transmuting from Gold - -This operation involves sending Neutrons to the reactor to receive Protons: - -```javascript -const neutronsToDecay = 2700000; // Example amount -const unsignedTransaction = await gluonInstance.transmuteFromGoldForEip12(gluonBoxJs, oracleBoxJs, userBoxes, oracleBuyBackJs, neutronsToDecay, height); -``` - -### Signing the Transaction - -You can use any method to sign the transaction. One of the most common methods is to use the `sign_tx` method provided by the Nautilus wallet. - -```javascript -const signedTransaction = await ergo.sign_tx(unsignedTransaction); -``` - -The signed transaction can then be submitted to the network using the `submit_tx` method provided by the Nautilus wallet. - -```javascript -const txId = await ergo.submit_tx(signedTransaction); -``` - -It is important to catch any errors that may occur during the transaction signing and submission process and display them to the user. - -## Displaying Gluon Gold Data - -To provide users with detailed information about the Gluon Gold protocol, such as fusion ratio, prices, fees, etc., you can use the SDK's methods to calculate and display these values: - -### Calculating Fees - -For each operation, you can calculate the total fees and their breakdown: - -```javascript -const fees = await gluonInstance.getTotalFeeAmountFission(gluonBoxJs, amountToFission); -console.log(`Developer Fee: ${fees.devFee}, UI Fee: ${fees.uiFee}, Oracle Fee: ${fees.oracleFee}, Total Fee: ${fees.totalFee}`); -``` - -These fees can be shown to the user in the UI so they know what to expect in terms of costs for the operation. These fees are in nanoERGs. - -### Displaying Prices - -You can also display the current prices of Neutrons and Protons: - -```javascript -const neutronPrice = await gluonInstance.neutronPrice(oracleBoxJs); -const protonPrice = await gluonInstance.protonPrice(oracleBoxJs); -const oracleGoldPricePerKg = await oracleBoxJs.getPrice(); -const oracleGoldPricePerGram = await oracleBoxJs.getPricePerGram(); - -console.log(`Neutron Price: ${neutronPrice}, Proton Price: ${protonPrice}, Gold Price: ${oracleGoldPricePerKg}, Gold Price Per Gram: ${oracleGoldPricePerGram}`); -``` - -These values should be displayed in the website to users so they know what the current price of the assets are. They can easily be called with the updated oracle box to get the latest price periodically. - -### N-Day Volume Calculation - -The SDK provides methods to calculate the operation volumes over a specified number of days (up to 14 days). You can calculate the volume of protons to neutrons or neutrons to protons. - -```javascript -// Calculate the n-day volume of protons to neutrons -const n = 7; // specify the number of days -const volumeProtonsToNeutrons = await gluon.accumulateVolumeProtonsToNeutrons(n); - -// Calculate the n-day volume of neutrons to protons -const volumeNeutronsToProtons = await gluon.accumulateVolumeNeutronsToProtons(n); - -console.log(`Volume of protons to neutrons over ${n} days:`, volumeProtonsToNeutrons); -console.log(`Volume of neutrons to protons over ${n} days:`, volumeNeutronsToProtons); -``` - -Displaying these to the user will give them a good idea of the trend of the protocol. - -## Conclusion - -The Gluon Gold SDK provides a comprehensive set of tools for interacting with the Gluon protocol on the Ergo blockchain. By integrating this SDK into your website, you can offer users the ability to perform complex financial operations directly from their browsers. Whether it's fission, fusion, or transmutation, the SDK simplifies these processes and provides detailed transaction data to enhance user experience. - -By following the steps outlined in this blog post, you can effectively leverage the Gluon Gold SDK to build a robust web application that interacts seamlessly with the Gluon protocol. diff --git a/lib/gluon-gold-sdk/desktop.ini b/lib/gluon-gold-sdk/desktop.ini deleted file mode 100644 index d957fd1..0000000 --- a/lib/gluon-gold-sdk/desktop.ini +++ /dev/null @@ -1,4 +0,0 @@ -[ViewState] -Mode= -Vid= -FolderType=Generic diff --git a/lib/gluon-gold-sdk/next.config.js b/lib/gluon-gold-sdk/next.config.js deleted file mode 100644 index b6a79db..0000000 --- a/lib/gluon-gold-sdk/next.config.js +++ /dev/null @@ -1,28 +0,0 @@ -/** @type {import('next').NextConfig} */ -const nextConfig = { - reactStrictMode: true, - webpack: (config, { isServer }) => { - if (!isServer) { - config.resolve.fallback = { - ...config.resolve.fallback, - fs: false, - net: false, - tls: false, - }; - } - - config.module.rules.push({ - test: /\.wasm$/, - type: "javascript/auto", - use: [ - { - loader: "wasm-loader", - }, - ], - }); - - return config; - }, -}; - -module.exports = nextConfig; diff --git a/lib/gluon-gold-sdk/package-lock.json b/lib/gluon-gold-sdk/package-lock.json deleted file mode 100644 index 6166d24..0000000 --- a/lib/gluon-gold-sdk/package-lock.json +++ /dev/null @@ -1,2769 +0,0 @@ -{ - "name": "gluon-gold-sdk", - "version": "1.0.0", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "gluon-gold-sdk", - "version": "1.0.0", - "license": "ISC", - "dependencies": { - "@types/json-bigint": "^1.0.4", - "axios": "^1.7.3", - "ergo-lib-wasm-browser": "^0.23.0", - "ergo-lib-wasm-nodejs": "^0.23.0", - "json-bigint": "^1.0.0" - }, - "devDependencies": { - "@nautilus-js/eip12-types": "^0.1.9", - "@types/json-bigint": "^1.0.4", - "@types/node": "^20.14.12", - "@typescript-eslint/eslint-plugin": "^7.17.0", - "@typescript-eslint/parser": "^7.17.0", - "axios": "^1.7.3", - "eslint": "^8.57.0", - "eslint-config-prettier": "^9.1.0", - "eslint-plugin-prettier": "^5.2.1", - "prettier": "^3.3.3", - "ts-node": "^10.9.2", - "typescript": "^5.5.4", - "wasm-loader": "^1.3.0" - } - }, - "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, - "dependencies": { - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.24" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@ampproject/remapping/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, - "dependencies": { - "@jridgewell/resolve-uri": "^3.1.0", - "@jridgewell/sourcemap-codec": "^1.4.14" - } - }, - "node_modules/@babel/code-frame": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.25.7.tgz", - "integrity": "sha512-0xZJFNE5XMpENsgfHYTw8FbX4kv53mFLn2i3XPoq69LyhYSCBJtitaHx9QnsVTrsogI4Z3+HtEfZ2/GFPOtf5g==", - "dev": true, - "dependencies": { - "@babel/highlight": "^7.25.7", - "picocolors": "^1.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/compat-data": { - "version": "7.25.8", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.25.8.tgz", - "integrity": "sha512-ZsysZyXY4Tlx+Q53XdnOFmqwfB9QDTHYxaZYajWRoBLuLEAwI2UIbtxOjWh/cFaa9IKUlcB+DDuoskLuKu56JA==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/core": { - "version": "7.25.8", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.25.8.tgz", - "integrity": "sha512-Oixnb+DzmRT30qu9d3tJSQkxuygWm32DFykT4bRoORPa9hZ/L4KhVB/XiRm6KG+roIEM7DBQlmg27kw2HZkdZg==", - "dev": true, - "dependencies": { - "@ampproject/remapping": "^2.2.0", - "@babel/code-frame": "^7.25.7", - "@babel/generator": "^7.25.7", - "@babel/helper-compilation-targets": "^7.25.7", - "@babel/helper-module-transforms": "^7.25.7", - "@babel/helpers": "^7.25.7", - "@babel/parser": "^7.25.8", - "@babel/template": "^7.25.7", - "@babel/traverse": "^7.25.7", - "@babel/types": "^7.25.8", - "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/json5": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", - "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", - "dev": true, - "bin": { - "json5": "lib/cli.js" - }, - "engines": { - "node": ">=6" - } - }, - "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, - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/@babel/generator": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.25.7.tgz", - "integrity": "sha512-5Dqpl5fyV9pIAD62yK9P7fcA768uVPUyrQmqpqstHWgMma4feF1x/oFysBCVZLY5wJ2GkMUCdsNDnGZrPoR6rA==", - "dev": true, - "dependencies": { - "@babel/types": "^7.25.7", - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.25", - "jsesc": "^3.0.2" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/generator/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, - "dependencies": { - "@jridgewell/resolve-uri": "^3.1.0", - "@jridgewell/sourcemap-codec": "^1.4.14" - } - }, - "node_modules/@babel/helper-compilation-targets": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.25.7.tgz", - "integrity": "sha512-DniTEax0sv6isaw6qSQSfV4gVRNtw2rte8HHM45t9ZR0xILaufBRNkpMifCRiAPyvL4ACD6v0gfCwCmtOQaV4A==", - "dev": true, - "dependencies": { - "@babel/compat-data": "^7.25.7", - "@babel/helper-validator-option": "^7.25.7", - "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, - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/@babel/helper-module-imports": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.25.7.tgz", - "integrity": "sha512-o0xCgpNmRohmnoWKQ0Ij8IdddjyBFE4T2kagL/x6M3+4zUgc+4qTOUBoNe4XxDskt1HPKO007ZPiMgLDq2s7Kw==", - "dev": true, - "dependencies": { - "@babel/traverse": "^7.25.7", - "@babel/types": "^7.25.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-module-transforms": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.25.7.tgz", - "integrity": "sha512-k/6f8dKG3yDz/qCwSM+RKovjMix563SLxQFo0UhRNo239SP6n9u5/eLtKD6EAjwta2JHJ49CsD8pms2HdNiMMQ==", - "dev": true, - "dependencies": { - "@babel/helper-module-imports": "^7.25.7", - "@babel/helper-simple-access": "^7.25.7", - "@babel/helper-validator-identifier": "^7.25.7", - "@babel/traverse": "^7.25.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/helper-simple-access": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.25.7.tgz", - "integrity": "sha512-FPGAkJmyoChQeM+ruBGIDyrT2tKfZJO8NcxdC+CWNJi7N8/rZpSxK7yvBJ5O/nF1gfu5KzN7VKG3YVSLFfRSxQ==", - "dev": true, - "dependencies": { - "@babel/traverse": "^7.25.7", - "@babel/types": "^7.25.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-string-parser": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.25.7.tgz", - "integrity": "sha512-CbkjYdsJNHFk8uqpEkpCvRs3YRp9tY6FmFY7wLMSYuGYkrdUi7r2lc4/wqsvlHoMznX3WJ9IP8giGPq68T/Y6g==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-validator-identifier": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.7.tgz", - "integrity": "sha512-AM6TzwYqGChO45oiuPqwL2t20/HdMC1rTPAesnBCgPCSF1x3oN9MVUwQV2iyz4xqWrctwK5RNC8LV22kaQCNYg==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-validator-option": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.25.7.tgz", - "integrity": "sha512-ytbPLsm+GjArDYXJ8Ydr1c/KJuutjF2besPNbIZnZ6MKUxi/uTA22t2ymmA4WFjZFpjiAMO0xuuJPqK2nvDVfQ==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helpers": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.25.7.tgz", - "integrity": "sha512-Sv6pASx7Esm38KQpF/U/OXLwPPrdGHNKoeblRxgZRLXnAtnkEe4ptJPDtAZM7fBLadbc1Q07kQpSiGQ0Jg6tRA==", - "dev": true, - "dependencies": { - "@babel/template": "^7.25.7", - "@babel/types": "^7.25.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/highlight": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.25.7.tgz", - "integrity": "sha512-iYyACpW3iW8Fw+ZybQK+drQre+ns/tKpXbNESfrhNnPLIklLbXr7MYJ6gPEd0iETGLOK+SxMjVvKb/ffmk+FEw==", - "dev": true, - "dependencies": { - "@babel/helper-validator-identifier": "^7.25.7", - "chalk": "^2.4.2", - "js-tokens": "^4.0.0", - "picocolors": "^1.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/highlight/node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/@babel/highlight/node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true - }, - "node_modules/@babel/highlight/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, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/@babel/highlight/node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/parser": { - "version": "7.25.8", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.25.8.tgz", - "integrity": "sha512-HcttkxzdPucv3nNFmfOOMfFf64KgdJVqm1KaCm25dPGMLElo9nsLvXeJECQg8UzPuBGLyTSA0ZzqCtDSzKTEoQ==", - "dev": true, - "dependencies": { - "@babel/types": "^7.25.8" - }, - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@babel/template": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.25.7.tgz", - "integrity": "sha512-wRwtAgI3bAS+JGU2upWNL9lSlDcRCqD05BZ1n3X2ONLH1WilFP6O1otQjeMK/1g0pvYcXC7b/qVUB1keofjtZA==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.25.7", - "@babel/parser": "^7.25.7", - "@babel/types": "^7.25.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/traverse": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.25.7.tgz", - "integrity": "sha512-jatJPT1Zjqvh/1FyJs6qAHL+Dzb7sTb+xr7Q+gM1b+1oBsMsQQ4FkVKb6dFlJvLlVssqkRzV05Jzervt9yhnzg==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.25.7", - "@babel/generator": "^7.25.7", - "@babel/parser": "^7.25.7", - "@babel/template": "^7.25.7", - "@babel/types": "^7.25.7", - "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, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/types": { - "version": "7.25.8", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.25.8.tgz", - "integrity": "sha512-JWtuCu8VQsMladxVz/P4HzHUGCAwpuqacmowgXFs5XjxIgKuNjnLokQzuVjlTvIzODaDmpjT3oxcC48vyk9EWg==", - "dev": true, - "dependencies": { - "@babel/helper-string-parser": "^7.25.7", - "@babel/helper-validator-identifier": "^7.25.7", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.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, - "dependencies": { - "@jridgewell/trace-mapping": "0.3.9" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/@eslint-community/eslint-utils": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", - "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", - "dev": true, - "dependencies": { - "eslint-visitor-keys": "^3.3.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" - } - }, - "node_modules/@eslint-community/regexpp": { - "version": "4.11.0", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.11.0.tgz", - "integrity": "sha512-G/M/tIiMrTAxEWRfLfQJMmGNX28IxBg4PBz8XqQhqUHLFI6TL2htpIB1iQCj144V5ee/JaKyT9/WZ0MGZWfA7A==", - "dev": true, - "engines": { - "node": "^12.0.0 || ^14.0.0 || >=16.0.0" - } - }, - "node_modules/@eslint/eslintrc": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", - "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", - "dev": true, - "dependencies": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^9.6.0", - "globals": "^13.19.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": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/@eslint/eslintrc/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, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/@eslint/eslintrc/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, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/@eslint/js": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz", - "integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==", - "dev": true, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "node_modules/@humanwhocodes/config-array": { - "version": "0.11.14", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", - "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", - "deprecated": "Use @eslint/config-array instead", - "dev": true, - "dependencies": { - "@humanwhocodes/object-schema": "^2.0.2", - "debug": "^4.3.1", - "minimatch": "^3.0.5" - }, - "engines": { - "node": ">=10.10.0" - } - }, - "node_modules/@humanwhocodes/config-array/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, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/@humanwhocodes/config-array/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, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "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, - "engines": { - "node": ">=12.22" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } - }, - "node_modules/@humanwhocodes/object-schema": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", - "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", - "deprecated": "Use @eslint/object-schema instead", - "dev": true - }, - "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", - "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", - "dev": true, - "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/gen-mapping/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, - "dependencies": { - "@jridgewell/resolve-uri": "^3.1.0", - "@jridgewell/sourcemap-codec": "^1.4.14" - } - }, - "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, - "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, - "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 - }, - "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, - "dependencies": { - "@jridgewell/resolve-uri": "^3.0.3", - "@jridgewell/sourcemap-codec": "^1.4.10" - } - }, - "node_modules/@nautilus-js/eip12-types": { - "version": "0.1.11", - "resolved": "https://registry.npmjs.org/@nautilus-js/eip12-types/-/eip12-types-0.1.11.tgz", - "integrity": "sha512-2KNUHUe5Gtmgyo9g+wZronQGXUYap57CpER9msV2mveMk7i4Lrn3t7Xth8HE2jviOSlZ970arDvbVmrxyv5Q6g==", - "dev": true - }, - "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, - "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, - "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, - "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@pkgr/core": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@pkgr/core/-/core-0.1.1.tgz", - "integrity": "sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==", - "dev": true, - "engines": { - "node": "^12.20.0 || ^14.18.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/unts" - } - }, - "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 - }, - "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 - }, - "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 - }, - "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 - }, - "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==", - "dev": true - }, - "node_modules/@types/node": { - "version": "20.14.12", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.12.tgz", - "integrity": "sha512-r7wNXakLeSsGT0H1AU863vS2wa5wBOK4bWMjZz2wj+8nBx+m5PeIn0k8AloSLpRuiwdRQZwarZqHE4FNArPuJQ==", - "dev": true, - "dependencies": { - "undici-types": "~5.26.4" - } - }, - "node_modules/@typescript-eslint/eslint-plugin": { - "version": "7.17.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.17.0.tgz", - "integrity": "sha512-pyiDhEuLM3PuANxH7uNYan1AaFs5XE0zw1hq69JBvGvE7gSuEoQl1ydtEe/XQeoC3GQxLXyOVa5kNOATgM638A==", - "dev": true, - "dependencies": { - "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "7.17.0", - "@typescript-eslint/type-utils": "7.17.0", - "@typescript-eslint/utils": "7.17.0", - "@typescript-eslint/visitor-keys": "7.17.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.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "@typescript-eslint/parser": "^7.0.0", - "eslint": "^8.56.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/parser": { - "version": "7.17.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.17.0.tgz", - "integrity": "sha512-puiYfGeg5Ydop8eusb/Hy1k7QmOU6X3nvsqCgzrB2K4qMavK//21+PzNE8qeECgNOIoertJPUC1SpegHDI515A==", - "dev": true, - "dependencies": { - "@typescript-eslint/scope-manager": "7.17.0", - "@typescript-eslint/types": "7.17.0", - "@typescript-eslint/typescript-estree": "7.17.0", - "@typescript-eslint/visitor-keys": "7.17.0", - "debug": "^4.3.4" - }, - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.56.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/scope-manager": { - "version": "7.17.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.17.0.tgz", - "integrity": "sha512-0P2jTTqyxWp9HiKLu/Vemr2Rg1Xb5B7uHItdVZ6iAenXmPo4SZ86yOPCJwMqpCyaMiEHTNqizHfsbmCFT1x9SA==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "7.17.0", - "@typescript-eslint/visitor-keys": "7.17.0" - }, - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/type-utils": { - "version": "7.17.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.17.0.tgz", - "integrity": "sha512-XD3aaBt+orgkM/7Cei0XNEm1vwUxQ958AOLALzPlbPqb8C1G8PZK85tND7Jpe69Wualri81PLU+Zc48GVKIMMA==", - "dev": true, - "dependencies": { - "@typescript-eslint/typescript-estree": "7.17.0", - "@typescript-eslint/utils": "7.17.0", - "debug": "^4.3.4", - "ts-api-utils": "^1.3.0" - }, - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.56.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/types": { - "version": "7.17.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.17.0.tgz", - "integrity": "sha512-a29Ir0EbyKTKHnZWbNsrc/gqfIBqYPwj3F2M+jWE/9bqfEHg0AMtXzkbUkOG6QgEScxh2+Pz9OXe11jHDnHR7A==", - "dev": true, - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/typescript-estree": { - "version": "7.17.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.17.0.tgz", - "integrity": "sha512-72I3TGq93t2GoSBWI093wmKo0n6/b7O4j9o8U+f65TVD0FS6bI2180X5eGEr8MA8PhKMvYe9myZJquUT2JkCZw==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "7.17.0", - "@typescript-eslint/visitor-keys": "7.17.0", - "debug": "^4.3.4", - "globby": "^11.1.0", - "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.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/utils": { - "version": "7.17.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.17.0.tgz", - "integrity": "sha512-r+JFlm5NdB+JXc7aWWZ3fKSm1gn0pkswEwIYsrGPdsT2GjsRATAKXiNtp3vgAAO1xZhX8alIOEQnNMl3kbTgJw==", - "dev": true, - "dependencies": { - "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "7.17.0", - "@typescript-eslint/types": "7.17.0", - "@typescript-eslint/typescript-estree": "7.17.0" - }, - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.56.0" - } - }, - "node_modules/@typescript-eslint/visitor-keys": { - "version": "7.17.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.17.0.tgz", - "integrity": "sha512-RVGC9UhPOCsfCdI9pU++K4nD7to+jTcMIbXTSOcrLqUEW6gF2pU1UUbYJKc9cvcRSK1UDeMJ7pdMxf4bhMpV/A==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "7.17.0", - "eslint-visitor-keys": "^3.4.3" - }, - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@ungap/structured-clone": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", - "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", - "dev": true - }, - "node_modules/acorn": { - "version": "8.12.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz", - "integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==", - "dev": true, - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/acorn-jsx": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", - "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", - "dev": true, - "peerDependencies": { - "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, - "node_modules/acorn-walk": { - "version": "8.3.3", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.3.tgz", - "integrity": "sha512-MxXdReSRhGO7VlFe1bRG/oI7/mdLV9B9JJT0N8vZOhF7gFRR5l3M8W9G8JxmKV+JC5mGqJ0QvqfSOLsCPa4nUw==", - "dev": true, - "dependencies": { - "acorn": "^8.11.0" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "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==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/arg": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", - "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", - "dev": true - }, - "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 - }, - "node_modules/array-union": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", - "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", - "dev": true - }, - "node_modules/axios": { - "version": "1.7.3", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.3.tgz", - "integrity": "sha512-Ar7ND9pU99eJ9GpoGQKhKf58GpUOgnzuaB7ueNQ5BMi0p+LZ5oaEnfF999fAArcTIBwXTCHAmGcHOZJaWPq9Nw==", - "dev": true, - "dependencies": { - "follow-redirects": "^1.15.6", - "form-data": "^4.0.0", - "proxy-from-env": "^1.1.0" - } - }, - "node_modules/babylon": { - "version": "7.0.0-beta.47", - "resolved": "https://registry.npmjs.org/babylon/-/babylon-7.0.0-beta.47.tgz", - "integrity": "sha512-+rq2cr4GDhtToEzKFD6KZZMDBXhjFAr9JjPw9pAppZACeEWqNM294j+NdBzkSHYXwzzBmVjZ3nEVJlOhbR2gOQ==", - "dev": true, - "bin": { - "babylon": "bin/babylon.js" - }, - "engines": { - "node": ">=6.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==", - "dev": true - }, - "node_modules/big.js": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", - "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==", - "dev": true, - "engines": { - "node": "*" - } - }, - "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==", - "engines": { - "node": "*" - } - }, - "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, - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "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, - "dependencies": { - "fill-range": "^7.1.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/browserslist": { - "version": "4.24.0", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.0.tgz", - "integrity": "sha512-Rmb62sR1Zpjql25eSanFGEhAxcFwfA1K0GuQcLoaJBAcENegrQut3hYdhXFF1obQfiDyqIW/cLM5HSJ/9k884A==", - "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" - } - ], - "dependencies": { - "caniuse-lite": "^1.0.30001663", - "electron-to-chromium": "^1.5.28", - "node-releases": "^2.0.18", - "update-browserslist-db": "^1.1.0" - }, - "bin": { - "browserslist": "cli.js" - }, - "engines": { - "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" - } - }, - "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, - "engines": { - "node": ">=6" - } - }, - "node_modules/caniuse-lite": { - "version": "1.0.30001669", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001669.tgz", - "integrity": "sha512-DlWzFDJqstqtIVx1zeSpIMLjunf5SmwOw0N2Ck/QSQdS8PLS4+9HrLaYei4w8BIAL7IB/UEDu889d8vhCTPA0w==", - "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" - } - ] - }, - "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, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "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==", - "dev": true, - "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 - }, - "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 - }, - "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 - }, - "node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/debug": { - "version": "4.3.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.6.tgz", - "integrity": "sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==", - "dev": true, - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/deep-is": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", - "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", - "dev": true - }, - "node_modules/delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", - "dev": true, - "engines": { - "node": ">=0.4.0" - } - }, - "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, - "engines": { - "node": ">=0.3.1" - } - }, - "node_modules/dir-glob": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", - "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", - "dev": true, - "dependencies": { - "path-type": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", - "dev": true, - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/electron-to-chromium": { - "version": "1.5.41", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.41.tgz", - "integrity": "sha512-dfdv/2xNjX0P8Vzme4cfzHqnPm5xsZXwsolTYr0eyW18IUmNyG08vL+fttvinTfhKfIKdRoqkDIC9e9iWQCNYQ==", - "dev": true - }, - "node_modules/emojis-list": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz", - "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==", - "dev": true, - "engines": { - "node": ">= 4" - } - }, - "node_modules/ergo-lib-wasm-browser": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/ergo-lib-wasm-browser/-/ergo-lib-wasm-browser-0.23.0.tgz", - "integrity": "sha512-wtxob1TJo8ocODqdWrOASOIbD0Gtd8ge6S6snMuqOVsX4hTgHupfNozJK0TAdGbWl1uo6Oo4hKZxUDi8xQOuiA==" - }, - "node_modules/ergo-lib-wasm-nodejs": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/ergo-lib-wasm-nodejs/-/ergo-lib-wasm-nodejs-0.23.0.tgz", - "integrity": "sha512-1CMiu2gM8c9F4LqQ+j4ib2CS9FTTvnwxKYGQvkZN7beaiIqPFr1AQvMVT3dn/9JfQmEz9zcp2OejvIamcQitFQ==" - }, - "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, - "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, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/eslint": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz", - "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==", - "dev": true, - "dependencies": { - "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.4", - "@eslint/js": "8.57.0", - "@humanwhocodes/config-array": "^0.11.14", - "@humanwhocodes/module-importer": "^1.0.1", - "@nodelib/fs.walk": "^1.2.8", - "@ungap/structured-clone": "^1.2.0", - "ajv": "^6.12.4", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", - "debug": "^4.3.2", - "doctrine": "^3.0.0", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.2.2", - "eslint-visitor-keys": "^3.4.3", - "espree": "^9.6.1", - "esquery": "^1.4.2", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", - "find-up": "^5.0.0", - "glob-parent": "^6.0.2", - "globals": "^13.19.0", - "graphemer": "^1.4.0", - "ignore": "^5.2.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "is-path-inside": "^3.0.3", - "js-yaml": "^4.1.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", - "lodash.merge": "^4.6.2", - "minimatch": "^3.1.2", - "natural-compare": "^1.4.0", - "optionator": "^0.9.3", - "strip-ansi": "^6.0.1", - "text-table": "^0.2.0" - }, - "bin": { - "eslint": "bin/eslint.js" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint-config-prettier": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.1.0.tgz", - "integrity": "sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==", - "dev": true, - "bin": { - "eslint-config-prettier": "bin/cli.js" - }, - "peerDependencies": { - "eslint": ">=7.0.0" - } - }, - "node_modules/eslint-plugin-prettier": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.2.1.tgz", - "integrity": "sha512-gH3iR3g4JfF+yYPaJYkN7jEl9QbweL/YfkoRlNnuIEHEz1vHVlCmWOS+eGGiRuzHQXdJFCOTxRgvju9b8VUmrw==", - "dev": true, - "dependencies": { - "prettier-linter-helpers": "^1.0.0", - "synckit": "^0.9.1" - }, - "engines": { - "node": "^14.18.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint-plugin-prettier" - }, - "peerDependencies": { - "@types/eslint": ">=8.0.0", - "eslint": ">=8.0.0", - "eslint-config-prettier": "*", - "prettier": ">=3.0.0" - }, - "peerDependenciesMeta": { - "@types/eslint": { - "optional": true - }, - "eslint-config-prettier": { - "optional": true - } - } - }, - "node_modules/eslint-scope": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", - "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", - "dev": true, - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "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, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint/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, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/eslint/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, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/espree": { - "version": "9.6.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", - "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", - "dev": true, - "dependencies": { - "acorn": "^8.9.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/esquery": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", - "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", - "dev": true, - "dependencies": { - "estraverse": "^5.1.0" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/esrecurse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", - "dev": true, - "dependencies": { - "estraverse": "^5.2.0" - }, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true - }, - "node_modules/fast-diff": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.3.0.tgz", - "integrity": "sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==", - "dev": true - }, - "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, - "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, - "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 - }, - "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 - }, - "node_modules/fastq": { - "version": "1.17.1", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", - "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", - "dev": true, - "dependencies": { - "reusify": "^1.0.4" - } - }, - "node_modules/file-entry-cache": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", - "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", - "dev": true, - "dependencies": { - "flat-cache": "^3.0.4" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "node_modules/fill-range": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", - "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", - "dev": true, - "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, - "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": "3.2.0", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", - "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", - "dev": true, - "dependencies": { - "flatted": "^3.2.9", - "keyv": "^4.5.3", - "rimraf": "^3.0.2" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "node_modules/flatted": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz", - "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==", - "dev": true - }, - "node_modules/follow-redirects": { - "version": "1.15.6", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", - "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://github.com/sponsors/RubenVerborgh" - } - ], - "engines": { - "node": ">=4.0" - }, - "peerDependenciesMeta": { - "debug": { - "optional": true - } - } - }, - "node_modules/form-data": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", - "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", - "dev": true, - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 6" - } - }, - "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 - }, - "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, - "engines": { - "node": ">=6.9.0" - } - }, - "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, - "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, - "dependencies": { - "is-glob": "^4.0.3" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/glob/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, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/glob/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, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/globals": { - "version": "13.24.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", - "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", - "dev": true, - "dependencies": { - "type-fest": "^0.20.2" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/globby": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", - "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", - "dev": true, - "dependencies": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.9", - "ignore": "^5.2.0", - "merge2": "^1.4.1", - "slash": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/graphemer": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", - "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", - "dev": true - }, - "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, - "engines": { - "node": ">=8" - } - }, - "node_modules/ignore": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", - "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==", - "dev": true, - "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, - "dependencies": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", - "dev": true, - "engines": { - "node": ">=0.8.19" - } - }, - "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, - "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 - }, - "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, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "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, - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/is-path-inside": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", - "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true - }, - "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 - }, - "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, - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/jsesc": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.0.2.tgz", - "integrity": "sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g==", - "dev": true, - "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==", - "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==", - "dev": true - }, - "node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "node_modules/json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", - "dev": true - }, - "node_modules/json5": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", - "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", - "dev": true, - "dependencies": { - "minimist": "^1.2.0" - }, - "bin": { - "json5": "lib/cli.js" - } - }, - "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==", - "dev": true, - "dependencies": { - "json-buffer": "3.0.1" - } - }, - "node_modules/levn": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", - "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", - "dev": true, - "dependencies": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/loader-utils": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.2.tgz", - "integrity": "sha512-I5d00Pd/jwMD2QCduo657+YM/6L3KZu++pmX9VFncxaxvHcru9jx1lBaFft+r4Mt2jK0Yhp41XlRAihzPxHNCg==", - "dev": true, - "dependencies": { - "big.js": "^5.2.2", - "emojis-list": "^3.0.0", - "json5": "^1.0.1" - }, - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", - "dev": true, - "dependencies": { - "p-locate": "^5.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/lodash.merge": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", - "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", - "dev": true - }, - "node_modules/long": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/long/-/long-3.2.0.tgz", - "integrity": "sha512-ZYvPPOMqUwPoDsbJaR10iQJYnMuZhRTvHYl62ErLIEX7RgFlziSBUUvrt3OVfc47QlHHpzPZYP17g3Fv7oeJkg==", - "dev": true, - "engines": { - "node": ">=0.6" - } - }, - "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, - "dependencies": { - "yallist": "^3.0.2" - } - }, - "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 - }, - "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, - "engines": { - "node": ">= 8" - } - }, - "node_modules/micromatch": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.7.tgz", - "integrity": "sha512-LPP/3KorzCwBxfeUuZmaR6bG2kdeHSbe0P2tY3FLRU4vYrjYz5hI4QZwV0njUx3jeuKe67YukQ1LSPZBKDqO/Q==", - "dev": true, - "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==", - "dev": true, - "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==", - "dev": true, - "dependencies": { - "mime-db": "1.52.0" - }, - "engines": { - "node": ">= 0.6" - } - }, - "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, - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/minimist": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", - "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, - "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 - }, - "node_modules/node-releases": { - "version": "2.0.18", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.18.tgz", - "integrity": "sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==", - "dev": true - }, - "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==", - "dev": true, - "dependencies": { - "wrappy": "1" - } - }, - "node_modules/optionator": { - "version": "0.9.4", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", - "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", - "dev": true, - "dependencies": { - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.5" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dev": true, - "dependencies": { - "yocto-queue": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", - "dev": true, - "dependencies": { - "p-limit": "^3.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/parent-module": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", - "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", - "dev": true, - "dependencies": { - "callsites": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true, - "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, - "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==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/path-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "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 - }, - "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true, - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/prelude-ls": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", - "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", - "dev": true, - "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, - "bin": { - "prettier": "bin/prettier.cjs" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/prettier/prettier?sponsor=1" - } - }, - "node_modules/prettier-linter-helpers": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", - "integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==", - "dev": true, - "dependencies": { - "fast-diff": "^1.1.2" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/proxy-from-env": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", - "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", - "dev": true - }, - "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, - "engines": { - "node": ">=6" - } - }, - "node_modules/queue-microtask": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "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" - } - ] - }, - "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, - "engines": { - "node": ">=4" - } - }, - "node_modules/reusify": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", - "dev": true, - "engines": { - "iojs": ">=1.0.0", - "node": ">=0.10.0" - } - }, - "node_modules/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "deprecated": "Rimraf versions prior to v4 are no longer supported", - "dev": true, - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "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" - } - ], - "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, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true, - "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==", - "dev": true, - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "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, - "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, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/synckit": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.9.1.tgz", - "integrity": "sha512-7gr8p9TQP6RAHusBOSLs46F4564ZrjV8xFmw5zCmgmhGUcw2hxsShhJ6CEiHQMgPDwAQ1fWHPM0ypc4RMAig4A==", - "dev": true, - "dependencies": { - "@pkgr/core": "^0.1.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": "^14.18.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/unts" - } - }, - "node_modules/text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", - "dev": true - }, - "node_modules/to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "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, - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "node_modules/ts-api-utils": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.3.0.tgz", - "integrity": "sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==", - "dev": true, - "engines": { - "node": ">=16" - }, - "peerDependencies": { - "typescript": ">=4.2.0" - } - }, - "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, - "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.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==", - "dev": true - }, - "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, - "dependencies": { - "prelude-ls": "^1.2.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/typescript": { - "version": "5.5.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.4.tgz", - "integrity": "sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==", - "dev": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" - } - }, - "node_modules/undici-types": { - "version": "5.26.5", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", - "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", - "dev": true - }, - "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" - } - ], - "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, - "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 - }, - "node_modules/wasm-dce": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wasm-dce/-/wasm-dce-1.0.2.tgz", - "integrity": "sha512-Fq1+nu43ybsjSnBquLrW/cULmKs61qbv9k8ep13QUe0nABBezMoNAA+j6QY66MW0/eoDVDp1rjXDqQ2VKyS/Xg==", - "dev": true, - "dependencies": { - "@babel/core": "^7.0.0-beta.39", - "@babel/traverse": "^7.0.0-beta.39", - "@babel/types": "^7.0.0-beta.39", - "babylon": "^7.0.0-beta.39", - "webassembly-interpreter": "0.0.30" - } - }, - "node_modules/wasm-loader": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/wasm-loader/-/wasm-loader-1.3.0.tgz", - "integrity": "sha512-R4s75XH+o8qM+WaRrAU9S2rbAMDzob18/S3V8R9ZoFpZkPWLAohWWlzWAp1ybeTkOuuku/X1zJtxiV0pBYxZww==", - "dev": true, - "dependencies": { - "loader-utils": "^1.1.0", - "wasm-dce": "^1.0.0" - }, - "peerDependencies": { - "wasm-dce": "1.x" - } - }, - "node_modules/webassembly-floating-point-hex-parser": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/webassembly-floating-point-hex-parser/-/webassembly-floating-point-hex-parser-0.1.2.tgz", - "integrity": "sha512-TUf1H++8U10+stJbFydnvrpG5Sznz5Rilez/oZlV5zI0C/e4cSxd8rALAJ8VpTvjVWxLmL3SVSJUK6Ap9AoiNg==", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/webassembly-interpreter": { - "version": "0.0.30", - "resolved": "https://registry.npmjs.org/webassembly-interpreter/-/webassembly-interpreter-0.0.30.tgz", - "integrity": "sha512-+Jdy2piEvz9T5j751mOE8+rBO12p+nNW6Fg4kJZ+zP1oUfsm+151sbAbM8AFxWTURmWCGP+r8Lxwfv3pzN1bCQ==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.0.0-beta.36", - "long": "^3.2.0", - "webassembly-floating-point-hex-parser": "0.1.2" - }, - "bin": { - "wasm": "lib/bin/repl.js", - "wasm2wast": "lib/bin/wasm2wast.js", - "wasmast": "lib/bin/wasmast.js", - "wasmdump": "lib/bin/wasmdump.js", - "wasmrun": "lib/bin/wasmrun.js", - "wastast": "lib/bin/wastast.js" - } - }, - "node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/word-wrap": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", - "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "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==", - "dev": true - }, - "node_modules/yallist": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", - "dev": true - }, - "node_modules/yn": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", - "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", - "dev": true, - "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, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - } - } -} diff --git a/lib/gluon-gold-sdk/package.json b/lib/gluon-gold-sdk/package.json deleted file mode 100644 index 5db0480..0000000 --- a/lib/gluon-gold-sdk/package.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "name": "gluon-gold-sdk", - "version": "1.0.0", - "description": "A SDK for the Gluon Gold protocol", - "main": "dist/index.js", - "module": "dist/index.js", - "types": "dist/index.d.ts", - "type": "module", - "files": [ - "dist" - ], - "scripts": { - "build": "tsc", - "start": "node dist/index.js", - "dev": "ts-node --esm src/test.ts", - "lint": "eslint src --ext .ts", - "format": "prettier --write src" - }, - "keywords": [], - "author": "", - "license": "ISC", - "devDependencies": { - "@types/node": "^20.14.12", - "@typescript-eslint/eslint-plugin": "^7.17.0", - "@typescript-eslint/parser": "^7.17.0", - "axios": "^1.7.3", - "eslint": "^8.57.0", - "eslint-config-prettier": "^9.1.0", - "eslint-plugin-prettier": "^5.2.1", - "prettier": "^3.3.3", - "ts-node": "^10.9.2", - "typescript": "^5.5.4", - "wasm-loader": "^1.3.0" - }, - "dependencies": { - "@nautilus-js/eip12-types": "^0.1.9", - "@types/json-bigint": "^1.0.4", - "axios": "^1.7.3", - "ergo-lib-wasm-browser": "^0.23.0", - "ergo-lib-wasm-nodejs": "^0.23.0", - "json-bigint": "^1.0.0" - }, - "browser": { - "fs": false, - "path": false, - "os": false - } -} diff --git a/lib/gluon-gold-sdk/src/config.ts b/lib/gluon-gold-sdk/src/config.ts deleted file mode 100644 index c2efc92..0000000 --- a/lib/gluon-gold-sdk/src/config.ts +++ /dev/null @@ -1,75 +0,0 @@ -import { - NETWORK, - MINER_FEE, - MIN_BOX_VAL, - DEV_TREE, - ORACLE_FEE_TREE, - ORACLE_BUYBACK_NFT, - ORACLE_POOL_NFT, - GLUON_NFT, - NEUTRON_ID, - PROTON_ID, - GLUON_TREE, - DEV_FEE, - ORACLE_FEE, - MIN_FEE, - NODE_URL, -} from "./consts"; - -export class Config { - NETWORK: string; - MINER_FEE: number; - MIN_BOX_VAL: number; - DEV_TREE: string; - ORACLE_FEE_TREE: string; - ORACLE_BUYBACK_NFT: string; - ORACLE_POOL_NFT: string; - GLUON_NFT: string; - NEUTRON_ID: string; - PROTON_ID: string; - GLUON_TREE: string; - UI_TREE: string; - DEV_FEE: number; - UI_FEE: number; - ORACLE_FEE: number; - MIN_FEE: number; - NODE_URL: string; - - constructor( - network: string = NETWORK, - minerFee: number = MINER_FEE, - minBoxVal: number = MIN_BOX_VAL, - devTree: string = DEV_TREE, - oracleFeeTree: string = ORACLE_FEE_TREE, - oracleBuybackNft: string = ORACLE_BUYBACK_NFT, - oraclePoolNft: string = ORACLE_POOL_NFT, - gluonNft: string = GLUON_NFT, - neutronId: string = NEUTRON_ID, - protonId: string = PROTON_ID, - gluonTree: string = GLUON_TREE, - devFee: number = DEV_FEE, - uiFee: number = 0, - oracleFee: number = ORACLE_FEE, - uiTree: string = "", - minFee: number = MIN_FEE, - nodeUrl: string = NODE_URL - ) { - this.NETWORK = network; - this.MINER_FEE = minerFee; - this.MIN_BOX_VAL = minBoxVal; - this.DEV_TREE = devTree; - this.ORACLE_FEE_TREE = oracleFeeTree; - this.ORACLE_BUYBACK_NFT = oracleBuybackNft; - this.ORACLE_POOL_NFT = oraclePoolNft; - this.GLUON_NFT = gluonNft; - this.NEUTRON_ID = neutronId; - this.PROTON_ID = protonId; - this.GLUON_TREE = gluonTree; - this.DEV_FEE = devFee; - this.UI_FEE = uiFee; - this.ORACLE_FEE = oracleFee; - this.UI_TREE = uiTree; - this.MIN_FEE = minFee; - this.NODE_URL = nodeUrl; - } -} diff --git a/lib/gluon-gold-sdk/src/consts.ts b/lib/gluon-gold-sdk/src/consts.ts deleted file mode 100644 index 6885e81..0000000 --- a/lib/gluon-gold-sdk/src/consts.ts +++ /dev/null @@ -1,20 +0,0 @@ -// Mainnet -export const NETWORK = "mainnet"; -export const MINER_FEE = 1000000; -export const MIN_FEE = 1000000; -export const MIN_BOX_VAL = 100000; -export const DEV_TREE = "0008cd03bdb0b78bd28ee69b0f62e3692abf3c95df8aac72d52086949871f9d3a337b467"; -export const ORACLE_FEE_TREE = - "10250400040004020402040204000e20d1c9e20657b4e37de3cd279a994266db34b18e6e786371832ad014fd46583198040404000400040004020e207ba2a85fdb302a181578b1f64cb4a533d89b3f8de4159efece75da41041537f90500040405c80105d20104000402040404040402040004000400040204000e203c45f29a5165b030fdb5eaf5d81f8108f9d8f507b31487dd51f4ae08fe07cf4a0400040204020502043c04000e206183680b1c4caaf8ede8c60dc5128e38417bc5b656321388b22baa43a9d150c201000404d801d601e4e30004959372017300d808d602b2a4730100d603db63087202d604b2a5730200d605db63087204d606db6308a7d607998cb27205730300028cb2720673040002d60899c1a7c17204d609c17202d1ededed938cb27203730500017306afb4a57307b1a5d9010a6393b1db6308720a7308ed938cb27205730900018cb27206730a0001938cb27205730b0001730ceded917207730d9072089c9d9c9d72098cb27203730e00027207730f73109399c1b2a573110072097208959372017312d801d602b2a5731300d1eded93db63087202db6308a793c27202c2a78fc1a7c17202d806d602b2a5731400d603db63087202d604db6308a7d605b27204731500d606b2a4731600d607db63087206d1edededed93b27203731700b27204731800938cb27203731900018c72050193c27202c2a793c1a7c17202ed938cb27207731a0001731b928cb2db6308b2a5731c00731d0002999a8cb27207731e0002998c720502731f7e9cb1b5a4d901086395e6c672080605eded928cc772080199a37320938cb2db6308720873210001732293e4c672080504e4c6720605047323732405"; -export const ORACLE_BUYBACK_NFT = "119a068a0119670de8a5d2467da33df572903c64aaa7b6ea4c9668ef0cfe0325"; -export const ORACLE_POOL_NFT = "3c45f29a5165b030fdb5eaf5d81f8108f9d8f507b31487dd51f4ae08fe07cf4a"; -export const GLUON_NFT = "797e331df22c5cfd0aae654703ebc12dcbcba99b80d32e2b7e151eac2d27b6fa"; -export const NEUTRON_ID = "886b7721bef42f60c6317d37d8752da8aca01898cae7dae61808c4a14225edc8"; -export const PROTON_ID = "9944ff273ff169f32b851b96bbecdbb67f223101c15ae143de82b3e7f75b19d2"; -export const GLUON_TREE = - "10730400040204020404040404000400040006043b9aca00060203e80580897a0601420601640601040601000601050ef10410250400040004020402040204000e20d1c9e20657b4e37de3cd279a994266db34b18e6e786371832ad014fd46583198040404000400040004020e207ba2a85fdb302a181578b1f64cb4a533d89b3f8de4159efece75da41041537f90500040405c80105d20104000402040404040402040004000400040204000e203c45f29a5165b030fdb5eaf5d81f8108f9d8f507b31487dd51f4ae08fe07cf4a0400040204020502043c04000e206183680b1c4caaf8ede8c60dc5128e38417bc5b656321388b22baa43a9d150c201000404d801d601e4e30004959372017300d808d602b2a4730100d603db63087202d604b2a5730200d605db63087204d606db6308a7d607998cb27205730300028cb2720673040002d60899c1a7c17204d609c17202d1ededed938cb27203730500017306afb4a57307b1a5d9010a6393b1db6308720a7308ed938cb27205730900018cb27206730a0001938cb27205730b0001730ceded917207730d9072089c9d9c9d72098cb27203730e00027207730f73109399c1b2a573110072097208959372017312d801d602b2a5731300d1eded93db63087202db6308a793c27202c2a78fc1a7c17202d806d602b2a5731400d603db63087202d604db6308a7d605b27204731500d606b2a4731600d607db63087206d1edededed93b27203731700b27204731800938cb27203731900018c72050193c27202c2a793c1a7c17202ed938cb27207731a0001731b928cb2db6308b2a5731c00731d0002999a8cb27207731e0002998c720502731f7e9cb1b5a4d901086395e6c672080605eded928cc772080199a37320938cb2db6308720873210001732293e4c672080504e4c67206050473237324050601010201040004020404040606030f424001010406040806030f424001010101040204000e20119a068a0119670de8a5d2467da33df572903c64aaa7b6ea4c9668ef0cfe032506030f42400101010105000446040004000e203c45f29a5165b030fdb5eaf5d81f8108f9d8f507b31487dd51f4ae08fe07cf4a0101060200c8010104a00b04000400041c060200c80601020101041c040005000400041c04000402041c0402041c04020500041c040004000500041c04000402041c0402041c0402050004a00b04a00b04a00b041c041c04000400041c0101060200c8060102041c040005000400041c04000402041c0402041c04020500041c040004000500041c04000402041c0402041c0402050004a00b04a00b010004020100d828d601db6308a7d602b2a5730000d603db63087202d604b27201730100d605b27203730200d606b27201730300d607b27203730400d608e4c6a70459d609937208e4c672020459d60ae4c6a70508d60be4c672020508d60ce4c6a70659d60d8c720c02d60ee4c672020659d60f8c720e02d61096830701938cb27201730500018cb2720373060001938c7204018c720501938c7206018c72070193c2a7c27202720993720a720b93720d720fd6118c720402d6128c720502d6139172117212d6148c720602d6158c720702d6169172147215d617c1a7d618c17202d619968304017210721372168f72177218d61a8f72117212d61b8f72147215d61c968304017210721a721b9172177218d61d9372177218d61e9683040172107213721b721dd61f968304017210721a7216721dd620b2db6501fe730700d6218c720c01d622d0720ad623e4c6a70711d624e4c672020711d625e4c6a70811d626e4c672020811d627e4c6a70905d628e4c67202090595978304017219721c721e721fd81dd6297e998c720801721106d62a7308d62b7309d62c7e997217730a06d62d7e998c720802721406d62ee30008d62fa19d9c730b722a730c9d9c72299d7ee4c67220040506722b722cd63099722a722fd631d90131059d9c7e7231069d9c7230722c722d722ad632d90132059d9c7e7232069d9c722f722c7229722ad6339572197e99721872170695721c7e99721772180695721eda7231019972157214da7232019972127211d6349d9c730d7233722bd635730ed63686027222958f7221720d9d9c9d9c730f7233722b7e99720d7221067e720d067235d637860273109d9c73117233722bd638860283010273127235d63995ec721f721e95e6722e83034e0e723672378602d0e4722e723483034e0e72367237723895e6722e83034e0e72368602d0e4722e7234723883034e0e723672387238d63ab27239731300d63b8c723a02d63cb27239731400d63d8c723c02d63eb2a5731500d63f8c723c01d64091723d7235d64196830301eded9591723b7235d801d6419590723d7235723eb2a57316009683020193c272418c723a01937ec17241069a723b7317731895e6722e957240d801d6419590723d7235b2a5731900b2a5731a009683020193c27241723f937ec17241069a723d731b731c731d95ec721e721f957240d802d641c2723ed642b2a499b1a4731e0096830401937241723f937241c27242938cb2db6308723e731f00017320937ec1723e069a9a7ec1724206723d732173227323937e998c720e01722106723b93720f720dd64296830301937223722493722572269372277228d643d90143117eb072437324d90145599a8c7245018c72450206d64499a38cc7722001d64596830201ed8f724473259272447326938cb2db63087220732700017328957219d802d6467e997218721706d64799722a9d722a722bd1968306017210937e9972117212069d9d9c9c724672297247722c722a937e9972147215069d9d9c9c7246722d7247722c722a73297241724295721cd802d6467e997217721806d6479c722c99722a9d722a732ad1968306017210937e9972127211069d9c9c72467229722a7247937e9972157214069d9c9c7246722d722a7247732b7241724295721ed807d6469972157214d647da7243017226d648da7243017224d6497d9d997ea30572277e732c0504d64a937249732dd64b917249732ed64c99732f7249d1968309017210937e9972117212069d9c9d9c7e72460699722a9a9d722a73309d9c9d722a733195917247724872359972487247722c722d9d9c72307229722a722f7332937e7218067e72170672419683040193b1722673339395724ab272257334007335b2722673360095724b93b4722672497337b472257338724c93b472267339733ab47225733b733cafb47226733d7249d9014d0593724d733e9683040193b17224733f937eb27224734000069a7e95724ab27223734100734206da723101724695724b93b4722472497343b472237344724c93b4722473457346b4722373477348afb4722473497249d9014d0593724d734a9372287e9c9da3734b734c05724595721fd808d6469972127211d647da7243017224d648da7243017226d6497d9d997ea30572277e734d0504d64a95927249734e734f7249d64b93724a7350d64c91724a7351d64d997352724ad19683090172107353937e9972147215069d9c9d9c7e72460699722a9a9d722a73549d9c9d722a735595917247724872359972487247722c72299d9c722f722d722a7230937e7218067e72170672419683040193b1722473569395724bb272237357007358b2722473590095724c93b47224724a735ab47223735b724d93b47224735c735db47223735e735fafb472247360724ad9014e0593724e73619683040193b172267362937eb27226736300069a7e95724bb27225736400736506da723201724695724c93b47226724a7366b472257367724d93b4722673687369b47225736a736bafb47226736c724ad9014e0593724e736d9372287e9c9da3736e736f057245d173709593c2b2a47371007222ea02d19683020196830701721d9372017203720993720c720e93722372249372257226937227722894720b720a720ad17372"; -export const DEV_FEE = 500; -export const UI_FEE = 0; -export const ORACLE_FEE = 100; -export const NODE_URL = "https://node.sigmaspace.io/"; -export const BUCKET_LEN = 14; diff --git a/lib/gluon-gold-sdk/src/gluon.ts b/lib/gluon-gold-sdk/src/gluon.ts deleted file mode 100644 index 5b118a3..0000000 --- a/lib/gluon-gold-sdk/src/gluon.ts +++ /dev/null @@ -1,668 +0,0 @@ -import { GluonBox } from "./gluonBox"; -import { getChangeBoxJs, getOutBoxJs, jsToUnsignedTx, unsignedToEip12Tx } from "./txUtils"; -import { Config } from "./config"; -import { JSONBI, NodeService } from "./nodeService"; -import { GoldOracleBox } from "./goldOracleBox"; -// import { Constant, ErgoBox, ErgoStateContext, Transaction, UnsignedTransaction } from "ergo-lib-wasm-nodejs"; -import { UnsignedTransaction } from "@nautilus-js/eip12-types"; -let ergolib: any; - -if (typeof window !== "undefined") { - ergolib = import("ergo-lib-wasm-browser"); -} else { - ergolib = import("ergo-lib-wasm-nodejs"); -} - -export class Gluon { - config: Config; - nodeService: NodeService; - - /** - * creates Gluon instance to interact with the protocol - * @param gluonConfig - configuration for the Gluon instance - */ - constructor(gluonConfig: Config = new Config()) { - this.config = gluonConfig; - this.nodeService = new NodeService(this.config.NODE_URL); - } - - private async getDecayedDevFee(gluonBox: GluonBox, devFee: number): Promise { - const fees = await gluonBox.getFees(); - const maxFee = fees[1]; - const maxFeeMinusRepaid = BigInt(maxFee - fees[0]); - const devFeeMultiplyMaxFeeMinusRepaid = BigInt(devFee) * maxFeeMinusRepaid; - const decayed = devFeeMultiplyMaxFeeMinusRepaid / BigInt(maxFee); - return Math.floor(Number(decayed)); - } - - /** - * get dev fee for the transaction either fission or fusion - * @param gluonBox - * @param ergVal - */ - async getDevFee(gluonBox: GluonBox, ergVal: number): Promise { - return await this.getDecayedDevFee(gluonBox, Math.floor(Number((this.config.DEV_FEE * ergVal) / 1e5))); - } - - /** - * get fee boxes for the transaction either fission or fusion - * @param gluonBox - input gluon box - * @param ergVal - erg value of the transaction - * @param withOracleFee whether to include oracle fee or not - */ - async getFeeBoxes(gluonBox: GluonBox, ergVal: number, withOracleFee: boolean = true): Promise<{ devFee?: any; uiFee?: any; oracleFee?: any }> { - const fees: { devFee?: any; uiFee?: any; oracleFee?: any } = {}; - const devFee = await this.getDevFee(gluonBox, ergVal); - fees.devFee = await getOutBoxJs(this.config.DEV_TREE, devFee + this.config.MIN_FEE); - if (this.config.UI_FEE > 0) fees.uiFee = await getOutBoxJs(this.config.UI_TREE, Math.floor(Number((this.config.UI_FEE * ergVal) / 1e5)) + this.config.MIN_FEE); - if (this.config.ORACLE_FEE > 0 && withOracleFee) - fees.oracleFee = await getOutBoxJs(this.config.ORACLE_FEE_TREE, Math.floor(Number((this.config.ORACLE_FEE * ergVal) / 1e5)) + this.config.MIN_FEE); - return fees; - } - - /** - * Get total fee amounts required for the Fission transaction - * @param gluonBox - input gluon box - * @param ergToFission - erg value for fission - * @returns An object containing the following fee amounts: - * - devFee: The fee for the developer - * - uiFee: The fee for the UI (if applicable) - * - oracleFee: The fee for the oracle (always 0 for fission) - * - minerFee: The fee for the miner - * - totalFee: The sum of all fees - */ - async getTotalFeeAmountFission( - gluonBox: GluonBox, - ergToFission: number - ): Promise<{ - devFee: number; - uiFee: number; - oracleFee: number; - minerFee: number; - totalFee: number; - }> { - const feeBoxes = await this.getFeeBoxes(gluonBox, ergToFission, false); - const devFee = feeBoxes.devFee?.value || 0; - const uiFee = feeBoxes.uiFee?.value || 0; - const oracleFee = 0; - const minerFee = this.config.MINER_FEE || 0; - const totalFee = devFee + uiFee + oracleFee + minerFee; - return { devFee, uiFee, oracleFee, minerFee, totalFee }; - } - - /** - * Get fee percentages for the Fission transaction - * @param gluonBox - input gluon box - * @param ergToFission - erg value for fission - * @returns An object containing the following fee percentages: - * - devFee: The fee percentage for the developer - * - uiFee: The fee percentage for the UI (if applicable) - * - oracleFee: The fee percentage for the oracle (always 0 for fission) - * - minerFee: The fee percentage for the miner - * - totalFee: The total fee percentage - */ - async getFeePercentageFission( - gluonBox: GluonBox, - ergToFission: number - ): Promise<{ - devFee: number; - uiFee: number; - oracleFee: number; - minerFee: number; - totalFee: number; - }> { - const fees = await this.getTotalFeeAmountFission(gluonBox, ergToFission); - return { - devFee: fees.devFee / ergToFission, - uiFee: fees.uiFee / ergToFission, - oracleFee: fees.oracleFee / ergToFission, - minerFee: this.config.MINER_FEE / ergToFission, - totalFee: fees.totalFee / ergToFission, - }; - } - - /** - * Get total fee amounts required for the Fusion transaction - * @param ergToFusion - erg value for fusion - * @param gluonBox - input gluon box - * @returns An object containing the following fee amounts: - * - devFee: The fee for the developer - * - uiFee: The fee for the UI (if applicable) - * - oracleFee: The fee for the oracle (always 0 for fusion) - * - minerFee: The fee for the miner - * - totalFee: The sum of all fees - */ - async getTotalFeeAmountFusion( - gluonBox: GluonBox, - ergToFusion: number - ): Promise<{ - devFee: number; - uiFee: number; - oracleFee: number; - minerFee: number; - totalFee: number; - }> { - const feeBoxes = await this.getFeeBoxes(gluonBox, ergToFusion, false); - const devFee = feeBoxes.devFee?.value || 0; - const uiFee = feeBoxes.uiFee?.value || 0; - const oracleFee = 0; - const minerFee = this.config.MINER_FEE || 0; - const totalFee = devFee + uiFee + oracleFee + minerFee; - return { devFee, uiFee, oracleFee, minerFee, totalFee }; - } - - /** - * Get fee percentages for the Fusion transaction - * @param gluonBox - input gluon box - * @param ergToFusion - erg value for fusion - * @returns An object containing the following fee percentages: - * - devFee: The fee percentage for the developer - * - uiFee: The fee percentage for the UI (if applicable) - * - oracleFee: The fee percentage for the oracle (always 0 for fusion) - * - minerFee: The fee percentage for the miner - * - totalFee: The total fee percentage - */ - async getFeePercentageFusion( - gluonBox: GluonBox, - ergToFusion: number - ): Promise<{ - devFee: number; - uiFee: number; - oracleFee: number; - minerFee: number; - totalFee: number; - }> { - const fees = await this.getTotalFeeAmountFusion(gluonBox, ergToFusion); - return { - devFee: fees.devFee / ergToFusion, - uiFee: fees.uiFee / ergToFusion, - oracleFee: fees.oracleFee / ergToFusion, - minerFee: this.config.MINER_FEE / ergToFusion, - totalFee: fees.totalFee / ergToFusion, - }; - } - - /** - * Get total fee amounts required for the Transmute to Gold transaction - * @param gluonBox - input gluon box - * @param goldOracleBox - gold oracle box - * @param protonsToTransmute - number of protons to transmute - * @returns An object containing the following fee amounts: - * - devFee: The fee for the developer - * - uiFee: The fee for the UI (if applicable) - * - oracleFee: The fee for the oracle - * - minerFee: The fee for the miner - * - totalFee: The sum of all fees - */ - async getTotalFeeAmountTransmuteToGold( - gluonBox: GluonBox, - goldOracleBox: GoldOracleBox, - protonsToTransmute: number - ): Promise<{ - devFee: number; - uiFee: number; - oracleFee: number; - minerFee: number; - totalFee: number; - }> { - const protonVol = ((await gluonBox.protonPrice(goldOracleBox)) * BigInt(protonsToTransmute)) / BigInt(1e9); - const feeBoxes = await this.getFeeBoxes(gluonBox, Number(protonVol), true); - const devFee = feeBoxes.devFee?.value || 0; - const uiFee = feeBoxes.uiFee?.value || 0; - const oracleFee = feeBoxes.oracleFee?.value || 0; - const minerFee = this.config.MINER_FEE || 0; - const totalFee = devFee + uiFee + oracleFee + minerFee; - return { devFee, uiFee, oracleFee, minerFee, totalFee }; - } - - /** - * Get fee percentages for the Transmute to Gold transaction - * @param gluonBox - input gluon box - * @param goldOracleBox - gold oracle box - * @param protonsToTransmute - number of protons to transmute - * @returns An object containing the following fee percentages: - * - devFee: The fee percentage for the developer - * - uiFee: The fee percentage for the UI (if applicable) - * - oracleFee: The fee percentage for the oracle - * - minerFee: The fee percentage for the miner - * - totalFee: The total fee percentage - */ - async getFeePercentageTransmuteToGold( - gluonBox: GluonBox, - goldOracleBox: GoldOracleBox, - protonsToTransmute: number - ): Promise<{ - devFee: number; - uiFee: number; - oracleFee: number; - minerFee: number; - totalFee: number; - }> { - const fees = await this.getTotalFeeAmountTransmuteToGold(gluonBox, goldOracleBox, protonsToTransmute); - const protonVol = ((await gluonBox.protonPrice(goldOracleBox)) * BigInt(protonsToTransmute)) / BigInt(1e9); - return { - devFee: fees.devFee / Number(protonVol), - uiFee: fees.uiFee / Number(protonVol), - oracleFee: fees.oracleFee / Number(protonVol), - minerFee: this.config.MINER_FEE / Number(protonVol), - totalFee: fees.totalFee / Number(protonVol), - }; - } - - /** - * Get total fee amounts required for the Transmute from Gold transaction - * @param gluonBox - input gluon box - * @param goldOracleBox - gold oracle box - * @param neutronsToDecay - number of neutrons to decay - * @returns An object containing the following fee amounts: - * - devFee: The fee for the developer - * - uiFee: The fee for the UI (if applicable) - * - oracleFee: The fee for the oracle - * - minerFee: The fee for the miner - * - totalFee: The sum of all fees - */ - async getTotalFeeAmountTransmuteFromGold( - gluonBox: GluonBox, - goldOracleBox: GoldOracleBox, - neutronsToDecay: number - ): Promise<{ - devFee: number; - uiFee: number; - oracleFee: number; - minerFee: number; - totalFee: number; - }> { - const neutronVol = ((await gluonBox.neutronPrice(goldOracleBox)) * BigInt(neutronsToDecay)) / BigInt(1e9); - const feeBoxes = await this.getFeeBoxes(gluonBox, Number(neutronVol), true); - const devFee = feeBoxes.devFee?.value || 0; - const uiFee = feeBoxes.uiFee?.value || 0; - const oracleFee = feeBoxes.oracleFee?.value || 0; - const minerFee = this.config.MINER_FEE || 0; - const totalFee = devFee + uiFee + oracleFee + minerFee; - return { devFee, uiFee, oracleFee, minerFee, totalFee }; - } - - /** - * Get fee percentages for the Transmute from Gold transaction - * @param gluonBox - input gluon box - // * @param goldOracleBox - gold oracle box - * @param neutronsToDecay - number of neutrons to decay - * @returns An object containing the following fee percentages: - * - devFee: The fee percentage for the developer - * - uiFee: The fee percentage for the UI (if applicable) - * - minerFee: The fee percentage for the miner - * - oracleFee: The fee percentage for the oracle - */ - async getFeePercentageTransmuteFromGold( - gluonBox: GluonBox, - goldOracleBox: GoldOracleBox, - neutronsToDecay: number - ): Promise<{ - devFee: number; - uiFee: number; - oracleFee: number; - minerFee: number; - totalFee: number; - }> { - const fees = await this.getTotalFeeAmountTransmuteFromGold(gluonBox, goldOracleBox, neutronsToDecay); - const neutronVol = ((await gluonBox.neutronPrice(goldOracleBox)) * BigInt(neutronsToDecay)) / BigInt(1e9); - return { - devFee: fees.devFee / Number(neutronVol), - uiFee: fees.uiFee / Number(neutronVol), - oracleFee: fees.oracleFee / Number(neutronVol), - minerFee: this.config.MINER_FEE / Number(neutronVol), - totalFee: fees.totalFee / Number(neutronVol), - }; - } - - /** - * get amount of neutrons and protons that will be received after fission - * @param gluonBox - input gluon box - * @param ergToFission - erg value of the fission transaction (user request) - */ - async fissionWillGet(gluonBox: GluonBox, ergToFission: number): Promise<{ neutrons: number; protons: number }> { - const sNeutrons = await gluonBox.getNeutronsCirculatingSupply(); - const sProtons = await gluonBox.getProtonsCirculatingSupply(); - const ergFissioned = gluonBox.getErgFissioned(); - const outNeutronsAmount = Number((BigInt(ergToFission) * BigInt(sNeutrons) * (BigInt(1e9) - BigInt(1e6))) / BigInt(ergFissioned) / BigInt(1e9)); - const outProtonsAmount = Number((BigInt(ergToFission) * BigInt(sProtons) * (BigInt(1e9) - BigInt(1e6))) / BigInt(ergFissioned) / BigInt(1e9)); - return { neutrons: outNeutronsAmount, protons: outProtonsAmount }; - } - - /** - * returns fission transaction in the form of UnsignedTransaction - * change will be sent to the first user box - * @param gluonBox - gluon box - * @param userBoxes - user boxes - * @param oracle - oracle box - * @param ergToFission - erg value of the fission transaction (user request) - */ - async fission(gluonBox: GluonBox, oracle: GoldOracleBox, userBoxes: any, ergToFission: number): Promise { - const willGet = await this.fissionWillGet(gluonBox, ergToFission); - const outNeutronsAmount = willGet.neutrons; - const outProtonsAmount = willGet.protons; - - const fees = await this.getFeeBoxes(gluonBox, ergToFission, false); - - const outGluonBoxJs = JSONBI.parse(JSONBI.stringify(gluonBox.boxJs)); - const neutInd = gluonBox.neutronInd(); - const protInd = gluonBox.protonInd(); - outGluonBoxJs.assets[neutInd].amount -= BigInt(outNeutronsAmount); - outGluonBoxJs.assets[protInd].amount -= BigInt(outProtonsAmount); - outGluonBoxJs.value += ergToFission; - outGluonBoxJs.additionalRegisters.R6 = await gluonBox.newFeeRegister(await this.getDevFee(gluonBox, ergToFission)); - - const feeBoxesArray = Object.values(fees).filter(Boolean); - const userOutBox = getChangeBoxJs(userBoxes.concat([gluonBox.boxJs]), feeBoxesArray.concat([outGluonBoxJs]), userBoxes[0].ergoTree, this.config.MINER_FEE); - const outs = [outGluonBoxJs, userOutBox].concat(feeBoxesArray); - const ins = [gluonBox.boxJs].concat(userBoxes); - return await jsToUnsignedTx(ins, outs, [oracle.boxJs], this.config.MINER_FEE); - } - - /** - * returns fission transaction in the form of json which could be used in the Eip12 wallet without needing change - * @param gluonBox - gluon box - * @param oracle - oracle box - * @param userBoxes - user boxes - * @param ergToFission - erg value of the fission transaction (user request) - */ - async fissionForEip12(gluonBox: GluonBox, oracle: GoldOracleBox, userBoxes: any, ergToFission: number): Promise { - let tx = await this.fission(gluonBox, oracle, userBoxes, ergToFission); - return await unsignedToEip12Tx(tx, [gluonBox.boxJs].concat(userBoxes), oracle.boxJs); - } - - /** - * get amount of neutrons and protons that will be needed for fusion of ergToRedeem amount - * @param gluonBox - input gluon box - * @param ergToRedeem - erg value of the fusion transaction (user request) - */ - async fusionWillNeed(gluonBox: GluonBox, ergToRedeem: number): Promise<{ neutrons: number; protons: number }> { - const sNeutrons = await gluonBox.getNeutronsCirculatingSupply(); - const sProtons = await gluonBox.getProtonsCirculatingSupply(); - const ergFissioned = gluonBox.getErgFissioned(); - const inNeutronsNumerator = BigInt(ergToRedeem) * BigInt(sNeutrons) * BigInt(1e9); - const inProtonsNumerator = BigInt(ergToRedeem) * BigInt(sProtons) * BigInt(1e9); - const denominator = BigInt(ergFissioned) * (BigInt(1e9) - BigInt(5e6)); - const inNeutronsAmount = Number(inNeutronsNumerator / denominator); - const inProtonsAmount = Number(inProtonsNumerator / denominator); - return { neutrons: inNeutronsAmount, protons: inProtonsAmount }; - } - - /** - * returns fusion transaction in the form of UnsignedTransaction - * change will be sent to the first user box - * @param gluonBox - input gluon box - * @param oracle - oracle box - * @param userBoxes - user boxes - * @param ergToRedeem - erg value of the fusion transaction (user request) - */ - async fusion(gluonBox: GluonBox, oracle: GoldOracleBox, userBoxes: any, ergToRedeem: number): Promise { - const willNeed = await this.fusionWillNeed(gluonBox, ergToRedeem); - const inNeutronsAmount = willNeed.neutrons; - const inProtonsAmount = willNeed.protons; - - const fees = await this.getFeeBoxes(gluonBox, ergToRedeem, false); - - const outGluonBoxJs = JSONBI.parse(JSONBI.stringify(gluonBox.boxJs)); - const neutInd = gluonBox.neutronInd(); - const protInd = gluonBox.protonInd(); - outGluonBoxJs.assets[neutInd].amount += BigInt(inNeutronsAmount); - outGluonBoxJs.assets[protInd].amount += BigInt(inProtonsAmount); - outGluonBoxJs.value -= ergToRedeem; - outGluonBoxJs.additionalRegisters.R6 = await gluonBox.newFeeRegister(await this.getDevFee(gluonBox, ergToRedeem)); - - const feeBoxesArray = Object.values(fees).filter(Boolean); - const userOutBox = getChangeBoxJs(userBoxes.concat([gluonBox.boxJs]), feeBoxesArray.concat([outGluonBoxJs]), userBoxes[0].ergoTree, this.config.MINER_FEE); - const outs = [outGluonBoxJs, userOutBox].concat(feeBoxesArray); - const ins = [gluonBox.boxJs].concat(userBoxes); - return await jsToUnsignedTx(ins, outs, [oracle.boxJs], this.config.MINER_FEE); - } - - /** - * returns fusion transaction in the form of json which could be used in the Eip12 wallet without needing change - * @param gluonBox - gluon box - * @param oracle - oracle box - * @param userBoxes - user boxes - * @param ergToFusion - erg value of the fusion transaction (user request) - */ - async fusionForEip12(gluonBox: GluonBox, oracle: GoldOracleBox, userBoxes: any, ergToFusion: number): Promise { - let tx = await this.fusion(gluonBox, oracle, userBoxes, ergToFusion); - return await unsignedToEip12Tx(tx, [gluonBox.boxJs].concat(userBoxes), oracle.boxJs); - } - - /** - * returns the amount of Neutrons that will be received by transmuting protons - * @param gluonBox - input gluon box - * @param goldOracleBox - oracle box - * @param protonsToTransmute - number of protons to transmute - * @param height - current height - */ - async transmuteToGoldWillGet(gluonBox: GluonBox, goldOracleBox: GoldOracleBox, protonsToTransmute: number, height: number): Promise { - const protonVol = ((await gluonBox.protonPrice(goldOracleBox)) * BigInt(protonsToTransmute)) / BigInt(1e9); - const volPlus = await gluonBox.addVolume(height, Number(protonVol)); - const volMinus = await gluonBox.subVolume(height, 0); - const circProtons = await gluonBox.getProtonsCirculatingSupply(); - const circNeutrons = await gluonBox.getNeutronsCirculatingSupply(); - - const fusionRatio = await gluonBox.fusionRatio(goldOracleBox); - const fusionRatioMin = BigInt(1e9) - fusionRatio; - const phiBetaMin = BigInt(1e9) - gluonBox.varPhiBeta(BigInt(await gluonBox.getErgFissioned()), volPlus, volMinus); - - const ratio1 = (BigInt(protonsToTransmute) * phiBetaMin) / circProtons; - const ratio2 = (fusionRatioMin * circNeutrons) / BigInt(1e9); - return Number((ratio1 * ratio2) / fusionRatio); - } - - /** - * returns the transaction in the form of UnsignedTransaction for transmuting protons to neutrons - * @param gluonBox - input gluon box - * @param goldOracleBox - oracle box - * @param userBoxes - user boxes - * @param buybackBoxJs - buyback box - * @param protonsToTransmute - number of protons to transmute - * @param height - current height of the network - */ - async transmuteToGold( - gluonBox: GluonBox, - goldOracleBox: GoldOracleBox, - userBoxes: any, - buybackBoxJs: any, - protonsToTransmute: number, - height: number - ): Promise { - const outNeutronsAmount = await this.transmuteToGoldWillGet(gluonBox, goldOracleBox, protonsToTransmute, height); - - const protonErgs = ((await gluonBox.protonPrice(goldOracleBox)) * BigInt(protonsToTransmute)) / BigInt(1e9); - const volPlus = await gluonBox.addVolume(height, Number(protonErgs)); - const volMinus = await gluonBox.subVolume(height, 0); - - const fees = await this.getFeeBoxes(gluonBox, Number(protonErgs)); - const buyBackFee = fees.oracleFee || {}; - buyBackFee.value = (buyBackFee.value || 0) + buybackBoxJs.value; - buyBackFee.assets = buybackBoxJs.assets; - - const outGluonBoxJs = JSONBI.parse(JSONBI.stringify(gluonBox.boxJs)); - outGluonBoxJs.assets[gluonBox.neutronInd()].amount -= BigInt(outNeutronsAmount); - outGluonBoxJs.assets[gluonBox.protonInd()].amount += BigInt(protonsToTransmute); - outGluonBoxJs.additionalRegisters.R6 = await gluonBox.newFeeRegister(await this.getDevFee(gluonBox, Number(protonErgs))); - outGluonBoxJs.additionalRegisters.R7 = await gluonBox.newVolumeRegister(volPlus); - outGluonBoxJs.additionalRegisters.R8 = await gluonBox.newVolumeRegister(volMinus); - outGluonBoxJs.additionalRegisters.R9 = await gluonBox.newLastDayRegister(height); - - const feeBoxesArray = Object.values(fees).filter(Boolean); - const userOutBox = getChangeBoxJs(userBoxes.concat([gluonBox.boxJs, buybackBoxJs]), feeBoxesArray.concat([outGluonBoxJs]), userBoxes[0].ergoTree, this.config.MINER_FEE); - const outs = [outGluonBoxJs, userOutBox, buyBackFee].concat(feeBoxesArray.filter((box) => box !== fees.oracleFee)); - const ins = [gluonBox.boxJs].concat(userBoxes).concat([buybackBoxJs]); - const tx = await jsToUnsignedTx(ins, outs, [goldOracleBox.boxJs], this.config.MINER_FEE, height); - const txJs = tx.to_js_eip12(); - txJs.inputs[txJs.inputs.length - 1].extension = { - "0": "0402", - }; - return (await ergolib).UnsignedTransaction.from_json(JSON.stringify(txJs)); - } - - /** - * returns the transaction in Eip12 (for use in for example Nautilus) format for transmuting protons to neutrons - * @param gluonBox - input gluon box - * @param oracle - oracle box - * @param userBoxes - user boxes - * @param buybackBoxJs - buyback box - * @param protonsToTransmute - number of protons to transmute - * @param height - current height of the blockchain - */ - async transmuteToGoldForEip12(gluonBox: GluonBox, oracle: GoldOracleBox, userBoxes: any, buybackBoxJs: any, protonsToTransmute: number, height: number): Promise { - let tx = await this.transmuteToGold(gluonBox, oracle, userBoxes, buybackBoxJs, protonsToTransmute, height); - return await unsignedToEip12Tx(tx, [gluonBox.boxJs].concat(userBoxes).concat([buybackBoxJs]), oracle.boxJs); - } - - /** - * returns the amount of protons that will be received by decaying neutrons - * @param gluonBox - input gluon box - * @param goldOracleBox - oracle box - * @param neutronsToDecay - number of neutrons to decay - * @param height - current height of the blockchain - */ - async transmuteFromGoldWillGet(gluonBox: GluonBox, goldOracleBox: GoldOracleBox, neutronsToDecay: number, height: number): Promise { - const neutronVol = ((await gluonBox.neutronPrice(goldOracleBox)) * BigInt(neutronsToDecay)) / BigInt(1e9); - const volPlus = await gluonBox.addVolume(height, 0); - const volMinus = await gluonBox.subVolume(height, Number(neutronVol)); - const circProtons = await gluonBox.getProtonsCirculatingSupply(); - const circNeutrons = await gluonBox.getNeutronsCirculatingSupply(); - - const fusionRatio = await gluonBox.fusionRatio(goldOracleBox); - const fusionRatioMin = BigInt(1e9) - fusionRatio; - const phiBetaMin = BigInt(1e9) - gluonBox.varPhiBeta(BigInt(gluonBox.getErgFissioned()), volMinus, volPlus); - - const ratio1 = (BigInt(neutronsToDecay) * phiBetaMin) / circNeutrons; - const ratio2 = (fusionRatio * circProtons) / BigInt(1e9); - return Number((ratio1 * ratio2) / fusionRatioMin); - } - - /** - * returns the transaction in the form of UnsignedTransaction for decaying neutrons to protons - * @param gluonBox - input gluon box - * @param goldOracleBox - oracle box - * @param userBoxes - user boxes - * @param buybackBoxJs - buyback box - * @param neutronsToDecay - number of neutrons to decay - * @param height - current height of the blockchain - */ - async transmuteFromGold( - gluonBox: GluonBox, - goldOracleBox: GoldOracleBox, - userBoxes: any, - buybackBoxJs: any, - neutronsToDecay: number, - height: number - ): Promise { - const outProtonAmount = await this.transmuteFromGoldWillGet(gluonBox, goldOracleBox, neutronsToDecay, height); - - const neutronsErgs = ((await gluonBox.neutronPrice(goldOracleBox)) * BigInt(neutronsToDecay)) / BigInt(1e9); - const volPlus = await gluonBox.addVolume(height, 0); - const volMinus = await gluonBox.subVolume(height, Number(neutronsErgs)); - - const feesJs = await this.getFeeBoxes(gluonBox, Number(neutronsErgs)); - const fees = Object.values(feesJs).filter(Boolean); - const buyBackFee = fees[fees.length - 1]; - buyBackFee.value += buybackBoxJs.value; - buyBackFee.assets = buybackBoxJs.assets; - - const outGluonBoxJs = JSONBI.parse(JSONBI.stringify(gluonBox.boxJs)); - outGluonBoxJs.assets[gluonBox.neutronInd()].amount += BigInt(neutronsToDecay); - outGluonBoxJs.assets[gluonBox.protonInd()].amount -= BigInt(outProtonAmount); - outGluonBoxJs.additionalRegisters.R6 = await gluonBox.newFeeRegister(await this.getDevFee(gluonBox, Number(neutronsErgs))); - outGluonBoxJs.additionalRegisters.R7 = await gluonBox.newVolumeRegister(volPlus); - outGluonBoxJs.additionalRegisters.R8 = await gluonBox.newVolumeRegister(volMinus); - outGluonBoxJs.additionalRegisters.R9 = await gluonBox.newLastDayRegister(height); - - const userOutBox = getChangeBoxJs(userBoxes.concat([gluonBox.boxJs, buybackBoxJs]), fees.concat([outGluonBoxJs]), userBoxes[0].ergoTree, this.config.MINER_FEE); - const outs = [outGluonBoxJs, userOutBox, buyBackFee].concat(fees.slice(0, fees.length - 1)); - const ins = [gluonBox.boxJs].concat(userBoxes).concat([buybackBoxJs]); - const tx = await jsToUnsignedTx(ins, outs, [goldOracleBox.boxJs], this.config.MINER_FEE, height); - const txJs = tx.to_js_eip12(); - txJs.inputs[txJs.inputs.length - 1].extension = { - "0": "0402", - }; - return (await ergolib).UnsignedTransaction.from_json(JSON.stringify(txJs)); - } - - /** - * returns the transaction in Eip12 (for use in for example Nautilus) format for decaying neutrons to protons - * @param gluonBox - gluon box - * @param oracle - oracle box - * @param userBoxes - user boxes - * @param buybackBoxJs - buyback box - * @param neutronsToDecay - number of neutrons to decay - * @param height - current height of the blockchain - */ - async transmuteFromGoldForEip12(gluonBox: GluonBox, oracle: GoldOracleBox, userBoxes: any, buybackBoxJs: any, neutronsToDecay: number, height: number): Promise { - let tx = await this.transmuteFromGold(gluonBox, oracle, userBoxes, buybackBoxJs, neutronsToDecay, height); - return await unsignedToEip12Tx(tx, [gluonBox.boxJs].concat(userBoxes).concat([buybackBoxJs]), oracle.boxJs); - } - - /** - * get the current unspent gold oracle box - * works only if valid NODE_URL is set in the config - */ - async getGoldOracleBox(): Promise { - if (!this.config.NODE_URL) throw new Error("NODE_URL is not set"); - const oracleJs = await this.nodeService.getUnspentBoxByTokenId(this.config.ORACLE_POOL_NFT); - return new GoldOracleBox(oracleJs[0]); - } - - /** - * get the current unspent gluon box - * works only if valid NODE_URL is set in the config - */ - async getGluonBox(): Promise { - if (!this.config.NODE_URL) throw new Error("NODE_URL is not set"); - const gluonJs = await this.nodeService.getUnspentBoxByTokenId(this.config.GLUON_NFT); - return new GluonBox(gluonJs[0]); - } - - async getOracleBuyBackBoxJs(): Promise { - if (!this.config.NODE_URL) throw new Error("NODE_URL is not set"); - const buybackJs = await this.nodeService.getUnspentBoxByTokenId(this.config.ORACLE_BUYBACK_NFT); - return buybackJs[0]; - } - - /** - * Calculate the Total Value Locked (TVL) in the protocol - * @param gluonBox - input gluon box - * @param goldOracleBox - gold oracle box - * @returns The total value locked in nanoERG - */ - async getTVL(gluonBox: GluonBox, goldOracleBox: GoldOracleBox): Promise { - const neutronPrice = await gluonBox.neutronPrice(goldOracleBox); - const protonPrice = await gluonBox.protonPrice(goldOracleBox); - - const neutronSupply = await gluonBox.getNeutronsCirculatingSupply(); - const protonSupply = await gluonBox.getProtonsCirculatingSupply(); - - const neutronValue = (neutronPrice * neutronSupply) / BigInt(1e9); - const protonValue = (protonPrice * protonSupply) / BigInt(1e9); - console.log(protonValue / BigInt(1e9)); - console.log(neutronValue / BigInt(1e9)); - - return neutronValue + protonValue; - } - - /** - * Calculate the reserve ratio of the protocol (proton value / neutron value) - * @param gluonBox - input gluon box - * @param goldOracleBox - gold oracle box - * @returns The reserve ratio in percentage - */ - async getReserveRatio(gluonBox: GluonBox, goldOracleBox: GoldOracleBox): Promise { - const neutronPrice = await gluonBox.neutronPrice(goldOracleBox); - const protonPrice = await gluonBox.protonPrice(goldOracleBox); - - const neutronSupply = await gluonBox.getNeutronsCirculatingSupply(); - const protonSupply = await gluonBox.getProtonsCirculatingSupply(); - - const neutronValue = (neutronPrice * neutronSupply) / BigInt(1e9); - const protonValue = (protonPrice * protonSupply) / BigInt(1e9); - - return (100 * (Number(protonValue) + Number(neutronValue))) / Number(neutronValue); - } -} diff --git a/lib/gluon-gold-sdk/src/gluonBox.ts b/lib/gluon-gold-sdk/src/gluonBox.ts deleted file mode 100644 index ffcadf3..0000000 --- a/lib/gluon-gold-sdk/src/gluonBox.ts +++ /dev/null @@ -1,259 +0,0 @@ -import { ErgoTree } from "@nautilus-js/eip12-types"; -import { Serializer } from "./serializer"; -import { BUCKET_LEN, NEUTRON_ID, PROTON_ID } from "./consts"; -import { GoldOracleBox } from "./goldOracleBox"; - -export class GluonBox { - boxJs: any; - serializer: Serializer; - qstar = BigInt(660000000); - - constructor(box: any) { - this.boxJs = box; - this.serializer = new Serializer(); - } - - private getRegisters = (): string[] => { - return ["R4", "R5", "R6", "R7", "R8", "R9"] - .map((reg) => { - if (this.boxJs.additionalRegisters[reg]) { - return this.boxJs.additionalRegisters[reg]; - } - return ""; - }) - .filter((reg) => reg !== ""); - }; - - /** - * @returns {Promise} [volumePlus, volumeMinus] - */ - async getVolumeProtonsToNeutronsArray(): Promise { - return await this.serializer.decodeCollLong(this.getRegisters()[3]); - } - - /** - * @returns {Promise} [volumePlus, volumeMinus] - */ - async getVolumeNeutronsToProtonsArray(): Promise { - return await this.serializer.decodeCollLong(this.getRegisters()[4]); - } - - /** - * @returns {Promise} last day of the epoch - */ - async getLastDay(): Promise { - return Number(await this.serializer.decodeJs(this.getRegisters()[5])); - } - - /** - * @returns {Promise} [devFee, maxFee] - */ - async getFees(): Promise { - return await this.serializer.decodeCollLong(this.getRegisters()[2]); - } - - /** - * @returns {Promise} dev tree - */ - async getDevTree(): Promise { - return await this.serializer.decodeTree(this.getRegisters()[1]); - } - - /** - * @returns {Promise} [neutrons, protons] - */ - async getTotalSupply(): Promise { - const decodedJs = await this.serializer.decodeJs(this.getRegisters()[0]); - return decodedJs.map((x: any) => BigInt(x)); - } - - /** - * @returns {bigint} neutrons in the box - */ - getNeutrons(): bigint { - return BigInt(this.boxJs.assets.filter((asset: any) => asset.tokenId === NEUTRON_ID)[0].amount); - } - - /** - * @returns {number} index of neutron in the assets array - */ - neutronInd(): number { - return this.boxJs.assets.findIndex((asset: any) => asset.tokenId === NEUTRON_ID); - } - - /** - * @returns {bigint} protons in the box - */ - getProtons(): bigint { - return BigInt(this.boxJs.assets.filter((asset: any) => asset.tokenId === PROTON_ID)[0].amount); - } - - /** - * @returns {number} index of proton in the assets array - */ - protonInd(): number { - return this.boxJs.assets.findIndex((asset: any) => asset.tokenId === PROTON_ID); - } - - /** - * @returns {bigint} neutrons circulating supply - */ - async getNeutronsCirculatingSupply(): Promise { - return (await this.getTotalSupply())[0] - this.getNeutrons(); - } - - /** - * @returns {bigint} protons circulating supply - */ - async getProtonsCirculatingSupply(): Promise { - return (await this.getTotalSupply())[1] - this.getProtons(); - } - - /** - * @returns {number} erg fissioned - */ - getErgFissioned(): number { - return this.boxJs.value - 1000000; - } - - /** - * returns the new register by adding the fee to the current fee - * @param fee fee to add - */ - async newFeeRegister(fee: number): Promise { - const current = await this.getFees(); - current[0] += fee; - return await this.serializer.encodeTupleLong(current[0], current[1]); - } - - /** - * returns the new last day of the epoch - * @param height current height of the blockchain - */ - newLastDay(height: number): number { - return Math.floor(height / 720) * 720; - } - - /** - * returns the new last day of the epoch - * @param height current height of the blockchain - */ - async newLastDayRegister(height: number): Promise { - return await this.serializer.encodeNumber(this.newLastDay(height)); - } - - /** - * returns the fusion ratio - * @param goldOracle gold oracle - */ - async fusionRatio(goldOracle: GoldOracleBox): Promise { - const pricePerGram = await goldOracle.getPricePerGram(); // this is pt - const fissionedErg = this.getErgFissioned(); - const neutronsInCirculation = await this.getNeutronsCirculatingSupply(); - const rightHandMinVal = (neutronsInCirculation * BigInt(pricePerGram)) / BigInt(fissionedErg); - return rightHandMinVal < this.qstar ? rightHandMinVal : this.qstar; - } - - /** - * returns variable phi beta - * @param rErg fissioned erg - * @param volumeToBeNegate volume to be negated - * @param volumeToMinus volume - */ - varPhiBeta(rErg: bigint, volumeToBeNegate: number[], volumeToMinus: number[]): bigint { - const phi0 = BigInt(5000000); - const phi1 = BigInt(500000000); - const sumVolumeToBeNegate = volumeToBeNegate.reduce((acc, x) => acc + BigInt(x), BigInt(0)); - const sumVolumeToMinus = volumeToMinus.reduce((acc, x) => acc + BigInt(x), BigInt(0)); - const volume = sumVolumeToBeNegate < sumVolumeToMinus ? BigInt(0) : sumVolumeToBeNegate - sumVolumeToMinus; - return phi0 + (phi1 * volume) / rErg; - } - - /** - * returns the neutron price in nano ERG - * @param goldOracle gold oracle - */ - async neutronPrice(goldOracle: GoldOracleBox): Promise { - const neutronsInCirculation = await this.getNeutronsCirculatingSupply(); - const fissonedErg = this.getErgFissioned(); - const fusionRatio = await this.fusionRatio(goldOracle); - return (fusionRatio * BigInt(fissonedErg)) / neutronsInCirculation; - } - - /** - * returns the proton price in nano ERG - * @param goldOracle gold oracle - */ - async protonPrice(goldOracle: GoldOracleBox): Promise { - const protonsInCirculation = await this.getProtonsCirculatingSupply(); - const fissonedErg = this.getErgFissioned(); - const fusionRatio = await this.fusionRatio(goldOracle); - const oneMinusFusionRatio = BigInt(1e9) - fusionRatio; - return (oneMinusFusionRatio * BigInt(fissonedErg)) / protonsInCirculation; - } - - /** - * returns the new volume - * @param height current height of the blockchain - * @param curVolume current - */ - private async newVolume(height: number, curVolume: number[]): Promise { - const lastDayHeight = await this.getLastDay(); - const daysPassed = Math.min(Math.floor((height - lastDayHeight) / 720), BUCKET_LEN); - let newVol = Array.from({ length: daysPassed }, () => 0).concat(curVolume); - newVol = newVol.slice(0, BUCKET_LEN); - return newVol; - } - - /** - * encodes the new volume - * @param volume to be encoded - */ - async newVolumeRegister(volume: number[]): Promise { - return await this.serializer.encodeCollLong(volume); - } - - /** - * adds volume to the neutrons of gluon box - * @param height current height of the blockchain - * @param toAdd volume to be added - */ - async addVolume(height: number, toAdd: number): Promise { - const curVolumePlus = await this.getVolumeProtonsToNeutronsArray(); - const newVol = await this.newVolume(height, curVolumePlus); - newVol[0] += toAdd; - return newVol; - } - - /** - * adds volume to the protons of gluon box - * @param height current height of the blockchain - * @param toDec - */ - async subVolume(height: number, toDec: number): Promise { - const curVolumeMinus = await this.getVolumeNeutronsToProtonsArray(); - const newVol = await this.newVolume(height, curVolumeMinus); - newVol[0] += toDec; - return newVol; - } - - /** - * returns the accumulated volume for the last n days - * @param days number of days to accumulate (1-BUCKET_LEN) - */ - async accumulateVolumeProtonsToNeutrons(days: number = BUCKET_LEN): Promise { - if (days > BUCKET_LEN) throw new Error(`Cannot accumulate volume for more than ${BUCKET_LEN} days`); - const volume = await this.getVolumeProtonsToNeutronsArray(); - return volume.slice(0, days).reduce((acc, x) => acc + x, 0); - } - - /** - * returns the accumulated volume for the last n days - * @param days number of days to accumulate (1-BUCKET_LEN) - */ - async accumulateVolumeNeutronsToProtons(days: number = BUCKET_LEN): Promise { - if (days > BUCKET_LEN) throw new Error(`Cannot accumulate volume for more than ${BUCKET_LEN} days`); - const volume = await this.getVolumeNeutronsToProtonsArray(); - return volume.slice(0, days).reduce((acc, x) => acc + x, 0); - } -} diff --git a/lib/gluon-gold-sdk/src/goldOracleBox.ts b/lib/gluon-gold-sdk/src/goldOracleBox.ts deleted file mode 100644 index c128d80..0000000 --- a/lib/gluon-gold-sdk/src/goldOracleBox.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { Serializer } from "./serializer"; - -export class GoldOracleBox { - boxJs: any; - serializer: Serializer; - - constructor(box: any) { - this.boxJs = box; - this.serializer = new Serializer(); - } - - private getRegisters = (): string[] => { - return ["R4", "R5", "R6", "R7", "R8", "R9"] - .map((reg) => { - if (this.boxJs.additionalRegisters[reg]) { - return this.boxJs.additionalRegisters[reg]; - } - return ""; - }) - .filter((reg) => reg !== ""); - }; - - /** - * returns gold price for 1 kg - */ - async getPrice(): Promise { - const registers = this.getRegisters(); - const decodedValue = await this.serializer.decodeJs(registers[0]); - return Number(decodedValue); - } - - /** - * returns gold price for 1 gram - */ - async getPricePerGram(): Promise { - const price = await this.getPrice(); - return Math.floor(price / 1000); - } -} diff --git a/lib/gluon-gold-sdk/src/index.ts b/lib/gluon-gold-sdk/src/index.ts deleted file mode 100644 index 0ba6e7a..0000000 --- a/lib/gluon-gold-sdk/src/index.ts +++ /dev/null @@ -1,11 +0,0 @@ -// Export all public modules and functions -export * from "./gluon"; -export * from "./txUtils"; -export * from "./gluonBox"; -export * from "./serializer"; -export * from "./nodeService"; -export * from "./goldOracleBox"; - -// You can also export specific items if needed -// export { SomeClass } from './someFile'; -// export { someFunction } from './anotherFile'; diff --git a/lib/gluon-gold-sdk/src/nodeService.ts b/lib/gluon-gold-sdk/src/nodeService.ts deleted file mode 100644 index 6b33ef9..0000000 --- a/lib/gluon-gold-sdk/src/nodeService.ts +++ /dev/null @@ -1,224 +0,0 @@ -import axios, { AxiosInstance } from "axios"; -import JSONbig from "json-bigint"; -export const JSONBI = JSONbig({ useNativeBigInt: true }); -let ergolib: any; - -if (typeof window !== "undefined") { - ergolib = import("ergo-lib-wasm-browser"); -} else { - ergolib = import("ergo-lib-wasm-nodejs"); -} - -export class NodeService { - private backend: AxiosInstance; - private apiKey = ""; - - constructor(url: string) { - this.backend = axios.create({ - baseURL: url, - transformResponse: (data: any) => JSONBI.parse(data), - timeout: 2000, - headers: { "Content-Type": "application/json" }, - }); - } - - async get(url: string, headers?: any, params?: any) { - return this.backend - .get(url, { - timeout: 25000, - headers: { - "Content-Type": "application/json", - ...headers, - }, - params, - }) - .then((res: any) => res.data); - } - - async head(url: string) { - return this.backend - .head(url, { - timeout: 1000, - }) - .then((res: any) => res.status) - .catch((e: any) => e.response.status); - } - - async post(url: string, headers?: any, params?: any) { - this.backend.defaults.headers = { - "Content-Type": "application/json", - ...headers, - }; - this.backend.defaults.timeout = 25000; - return this.backend.post(url, params).then((res: any) => res); - } - - async getAuthorized(url: string, params: any) { - return this.get(url, { api_key: this.apiKey }, params); - } - - async checkUnconfirmedTx(id: string) { - return this.head(`/transactions/unconfirmed/${id}`); - } - - async postAuthorized(url: string, params: any) { - return this.post(url, { api_key: this.apiKey }, params); - } - - async getUnspentBoxByTokenId(tokenId: string, offset?: number, limit?: number) { - return this.get(`/blockchain/box/unspent/byTokenId/${tokenId}`); - } - - async getTokenInfo(tokenId: string) { - return this.get(`/blockchain/token/byId/${tokenId}`); - } - - async getWalletTxsByScanId(scanId: number, minInclusionHeight?: number, maxInclusionHeight?: number, minConfirmations?: number, maxConfirmations?: number): Promise { - return this.getAuthorized(`/wallet/transactionsByScanId/${scanId}`, { - minInclusionHeight, - maxInclusionHeight, - minConfirmations, - maxConfirmations, - }); - } - - async getSpentBoxesByScanId(scanId: number, minInclusionHeight?: number, maxInclusionHeight?: number, minConfirmations?: number, maxConfirmations?: number): Promise { - return this.getAuthorized(`/scan/spentBoxes/${scanId}`, { - minInclusionHeight, - maxInclusionHeight, - minConfirmations, - maxConfirmations, - }); - } - - async getUnSpentBoxesByScanId(scanId: number, minInclusionHeight?: number, maxInclusionHeight?: number, minConfirmations?: number, maxConfirmations?: number): Promise { - return this.getAuthorized(`/scan/unspentBoxes/${scanId}`, { - minInclusionHeight, - maxInclusionHeight, - minConfirmations, - maxConfirmations, - }); - } - - async getUnSpentBoxesByAddress(address: string, offset: number, limit: number, sortDirection = "desc"): Promise { - return this.post(`/blockchain/box/unspent/byAddress?offset=${offset}&limit=${limit}&sortDirection=${sortDirection}`, { "Content-Type": "text/plain" }, `${address}`).then( - (res) => res.data - ); - } - - async getUnconfirmedTxByErgoTree(ergoTree: string, offset: number, limit: number): Promise { - return this.post(`/transactions/unconfirmed/byErgoTree?offset=${offset}&limit=${limit}`, {}, `${ergoTree}`).then((res) => res.data); - } - - async getInfo(): Promise { - return this.get("/info"); - } - - async getLastHeadersTimestamp(): Promise { - const lastHeader = (await this.get("/blocks/lastHeaders/1"))[0]; - return lastHeader.timestamp; - } - - async getStatus(): Promise { - return this.getAuthorized("/wallet/status", {}); - } - - async getWalletHeight(): Promise { - const status = await this.getStatus(); - return status.walletHeight; - } - - async getNetworkHeight(): Promise { - const info = await this.get(`/info`); - return info.fullHeight; - } - - async getNetworkIndexedHeight(): Promise { - const info = await this.get(`/blockchain/indexedHeight`); - return info.indexedHeight; - } - - async getUTXOBoxByIdWithPool(boxId: string): Promise { - const data = await this.get(`/utxo/withPool/byId/${boxId}`); - for (const i of Object.keys(data.additionalRegisters)) { - data.additionalRegisters[i] = { - serializedValue: data.additionalRegisters[i], - }; - } - return data; - } - - async getUTXOBoxById(boxId: string): Promise { - const data = await this.get(`/utxo/byId/${boxId}`); - for (const i of Object.keys(data.additionalRegisters)) { - data.additionalRegisters[i] = { - serializedValue: data.additionalRegisters[i], - }; - } - return data; - } - - async getBalance(address: string): Promise { - return this.post(`/blockchain/balance`, { "Content-Type": "text/plain" }, `${address}`).then((res) => res.data); - } - - async getHeaderIdByHeight(height: number): Promise { - return (await this.get(`/blocks/at/${height}`))[0]; - } - - async getInfoByHeight(height: number): Promise { - const HeaderId = await this.getHeaderIdByHeight(height); - return this.get(`/blocks/${HeaderId}/header`); - } - - async checkTransaction(tx: any): Promise { - return this.post(`transactions/check`, [], tx); - } - - async chainSliceInfo(height: number): Promise { - return this.get(`blocks/chainSlice?fromHeight=${height - 10}&toHeight=${height}`); - } - - async getBoxById(Id: string) { - const data = await this.get(`/blockchain/box/byId/${Id}`); - return data; - } - - async getTokenById(Id: string) { - return await this.get(`/blockchain/token/byId/${Id}`); - } - - async getTxsById(Id: string) { - return await this.get(`/blockchain/transaction/byId/${Id}`); - } - - async postTransaction(tx: any): Promise { - return this.post(`transactions`, [], tx).then((res) => res.data); - } - - async p2s(body: any): Promise { - return this.postAuthorized(`script/p2sAddress`, body).then((res) => res.data.address); - } - - async getTransactionById(id: string): Promise { - return this.getAuthorized(`/wallet/transactionById`, { - id, - }); - } - - async getUnconfirmedTransactionById(id: string): Promise { - return this.get(`/transactions/unconfirmed/byTransactionId/${id}`, null); - } - - async getBlockInfo(blockHeight: number): Promise { - const blockId = (await this.get(`/blocks/at/${blockHeight}`))[0]; - return await this.get(`/blocks/${blockId}`); - } - - async getCtx() { - const height = await this.getNetworkHeight(); - const blockHeaders = (await ergolib).BlockHeaders.from_json(await this.chainSliceInfo(height)); - const pre_header = (await ergolib).PreHeader.from_block_header(blockHeaders.get(blockHeaders.len() - 1)); - return new (await ergolib).ErgoStateContext(pre_header, blockHeaders); - } -} diff --git a/lib/gluon-gold-sdk/src/serializer.ts b/lib/gluon-gold-sdk/src/serializer.ts deleted file mode 100644 index f7c4e65..0000000 --- a/lib/gluon-gold-sdk/src/serializer.ts +++ /dev/null @@ -1,65 +0,0 @@ -import { ErgoTree } from "@nautilus-js/eip12-types"; -import { NETWORK } from "./consts"; - -let ergolib: any; - -if (typeof window !== "undefined") { - ergolib = import("ergo-lib-wasm-browser"); -} else { - ergolib = import("ergo-lib-wasm-nodejs"); -} - -export class Serializer { - networkPrefix = NETWORK === "mainnet" ? 0 : 1; - constructor() {} - - async decodeTree(encodedTree: string): Promise { - const byteArray = (await ergolib).Constant.decode_from_base16(encodedTree).to_byte_array(); - return (await ergolib).ErgoTree.from_bytes(byteArray); - } - - async treeToAddrs(tree: ErgoTree): Promise { - return (await ergolib).Address.recreate_from_ergo_tree(tree).to_base58(this.networkPrefix); - } - - async encodeNumber(num: number): Promise { - const num64 = (await ergolib).I64.from_str(num.toString()); - return (await ergolib).Constant.from_i64(num64).encode_to_base16(); - } - - async decodeCollLong(encodedColl: string): Promise { - return (await ergolib).Constant.decode_from_base16(encodedColl) - .to_js() - .map((x: any) => Number(x)); - } - - async encodeCollLong(coll: number[]): Promise { - const collStr = coll.map((x: number) => x.toString()); - return (await ergolib).Constant.from_i64_str_array(collStr).encode_to_base16(); - } - - async encodeTupleLong(a: number, b: number): Promise { - const a64 = (await ergolib).I64.from_str(a.toString()); - const b64 = (await ergolib).I64.from_str(b.toString()); - return (await ergolib).Constant.from_tuple_i64(a64, b64).encode_to_base16(); - } - - async decodeCollByte(encodedColl: string): Promise { - return (await ergolib).Constant.decode_from_base16(encodedColl) - .to_js() - .map((x: any) => Buffer.from(x).toString("hex")); - } - - async decodeJs(encodedColl: string): Promise { - return (await ergolib).Constant.decode_from_base16(encodedColl).to_js(); - } - - async decodeId(encodedId: string): Promise { - const bytes = (await ergolib).Constant.decode_from_base16(encodedId).to_byte_array(); - return Buffer.from(bytes).toString("hex"); - } - - async encodeId(id: string): Promise { - return (await ergolib).Constant.from_byte_array(Buffer.from(id, "hex")).encode_to_base16(); - } -} diff --git a/lib/gluon-gold-sdk/src/txUtils.ts b/lib/gluon-gold-sdk/src/txUtils.ts deleted file mode 100644 index 500615e..0000000 --- a/lib/gluon-gold-sdk/src/txUtils.ts +++ /dev/null @@ -1,208 +0,0 @@ -import { UnsignedTransaction } from "@nautilus-js/eip12-types"; -import { JSONBI } from "./nodeService"; - -let ergolib: any; - -if (typeof window !== "undefined") { - ergolib = import("ergo-lib-wasm-browser"); -} else { - ergolib = import("ergo-lib-wasm-nodejs"); -} - -async function getBoxValue(val: any) { - const resolvedLib = await ergolib; - return resolvedLib.BoxValue.from_i64(resolvedLib.I64.from_str(val.toString())); -} - -async function addressToContract(address: string) { - const resolvedLib = await ergolib; - return resolvedLib.Contract.pay_to_address(resolvedLib.Address.from_mainnet_str(address)); -} - -async function jsToCandidate(out: any, height: number) { - const resolvedLib = await ergolib; - const tree = resolvedLib.ErgoTree.from_base16_bytes(out.ergoTree); - const address = resolvedLib.Address.recreate_from_ergo_tree(tree).to_base58(resolvedLib.NetworkPrefix.Mainnet); - const boxVal = await getBoxValue(out.value); - const contract = await addressToContract(address); - const myOut = new resolvedLib.ErgoBoxCandidateBuilder(boxVal, contract, height); - - if (out.assets === undefined) out.assets = []; - for (const i of out.assets) { - const tokAm = resolvedLib.TokenAmount.from_i64(resolvedLib.I64.from_str(i.amount.toString())); - myOut.add_token(resolvedLib.TokenId.from_str(i.tokenId), tokAm); - } - if (out.additionalRegisters === undefined) out.additionalRegisters = {}; - - const vals: any = Object.values(out.additionalRegisters); - for (let i = 0; i < vals.length; i++) { - myOut.set_register_value(i + 4, resolvedLib.Constant.decode_from_base16(vals[i].toString())); - } - return myOut.build(); -} - -async function idToBoxId(id: string) { - const resolvedLib = await ergolib; - return resolvedLib.BoxId.from_str(id); -} - -/** - * get outbox from tree and value - * @param tree ergo tree - * @param ergVal value - */ -export async function getOutBoxJs(tree: string, ergVal: number) { - return { - value: ergVal, - ergoTree: tree, - extension: {}, - additionalRegisters: {}, - }; -} - -function getTokens(assets: any) { - const inTokens: any = {}; - assets.forEach((asset: any) => { - const tid = asset.tokenId; - if (!(tid in inTokens)) { - inTokens[tid] = BigInt(0); - } - inTokens[tid] += BigInt(asset.amount); - }); - return inTokens; -} - -/** - * get unsigned tx from inputs, outputs, dInputs and fee - * @param inputs inputs to the tx - * @param outputs outputs to the tx - * @param dInputs data inputs to the tx - * @param fee miner fee - * @param realHeight current height of the blockchain - */ -export async function jsToUnsignedTx(inputs: any, outputs: any, dInputs: any, fee: Number, realHeight: number = 0) { - const resolvedLib = await ergolib; - var height = Math.max(...inputs.map((i: any) => i.creationHeight)); - const unsignedInputs = new resolvedLib.UnsignedInputs(); - for (const box of inputs) { - const unsignedInput = resolvedLib.UnsignedInput.from_box_id(await idToBoxId(box.boxId)); - unsignedInputs.add(unsignedInput); - } - - const dataInputs = new resolvedLib.DataInputs(); - for (const d of dInputs) dataInputs.add(new resolvedLib.DataInput(await idToBoxId(d.boxId))); - - const unsignedOutputs = resolvedLib.ErgoBoxCandidates.empty(); - for (const i of outputs) { - const box = await jsToCandidate(i, height); - unsignedOutputs.add(box); - } - const feeBox = resolvedLib.ErgoBoxCandidate.new_miner_fee_box(await getBoxValue(fee), height); - unsignedOutputs.add(feeBox); - - const unsignedTx = new resolvedLib.UnsignedTransaction(unsignedInputs, dataInputs, unsignedOutputs); - return unsignedTx; -} - -/** - * get change box from inputs, outputs, changeTree and fee - * @param ins inputs to the tx except the change box - * @param outs outputs to the tx except the change box - * @param changeTree ergo tree of the change box - * @param fee miner fee - */ -export function getChangeBoxJs(ins: any, outs: any, changeTree: string, fee: number) { - const inVal = ins.reduce((acc: number, i: any) => acc + Number(i.value), 0); - const outVal = outs.reduce((acc: number, i: any) => acc + Number(i.value), 0); - const inTokens = getTokens( - ins - .map((i: any) => i.assets) - .flat() - .filter((assets: any) => assets !== undefined) - ); - const outTokens = getTokens( - outs - .map((i: any) => i.assets) - .flat() - .filter((assets: any) => assets !== undefined) - ); - - const keys = new Set(Object.keys(inTokens).concat(Object.keys(outTokens))); - - keys.forEach((tokenId) => { - if (!(tokenId in inTokens)) { - inTokens[tokenId] = BigInt(0); - } - if (tokenId in outTokens) { - inTokens[tokenId] -= outTokens[tokenId]; - } - }); - let assets = Object.keys(inTokens) - .map((tokenId) => { - return { tokenId, amount: inTokens[tokenId] }; - }) - .filter((i: any) => i.amount > 0); - - if (inVal - outVal - fee < 0 || Object.values(inTokens).filter((i: any) => i < 0).length > 0) { - throw new Error("Not enough funds"); - } - - assets = assets.filter((i: any) => i.amount > 0); - return { - value: inVal - outVal - fee, - ergoTree: changeTree, - assets: assets, - }; -} - -/** - * signs the tx if no secrets are needed; useful for combining contracts that require only satisfying some conditions - * @param unsignedTx unsigned tx - * @param boxes boxes to sign - * @param dataInptus data inputs - * @param ctx ErgoStateContext - */ -export async function signTx(unsignedTx: UnsignedTransaction, boxes: any, dataInputs: any, ctx: any): Promise { - const resolvedLib = await ergolib; - const wallet = resolvedLib.Wallet.from_secrets(new resolvedLib.SecretKeys()); - return wallet.sign_transaction(ctx, unsignedTx, boxes, dataInputs); -} - -/** - * signs the tx if secrets are needed; useful for combining contracts that require satisfying all conditions - * @param inputsJs inputs to the tx - * @param outsJs outputs to the tx - * @param dataInptusJs data inputs to the tx - * @param ctx ErgoStateContext - */ -export async function signTxJs(inputsJs: any, outsJs: any, dataInputsJs: any, ctx: any): Promise { - const resolvedLib = await ergolib; - const inVal = inputsJs.reduce((acc: number, i: any) => acc + Number(i.value), 0); - const outVal = outsJs.reduce((acc: number, i: any) => acc + Number(i.value), 0); - const rFee = inVal - outVal; - - const unsignedTx = await jsToUnsignedTx(inputsJs, outsJs, dataInputsJs, rFee); - const boxes = resolvedLib.ErgoBoxes.empty(); - for (const i of inputsJs) { - const box = resolvedLib.ErgoBox.from_json(JSONBI.stringify(i)); - boxes.add(box); - } - const dataInputs = resolvedLib.ErgoBoxes.from_boxes_json(dataInputsJs); - return signTx(unsignedTx, boxes, dataInputs, ctx); -} - -export async function unsignedToEip12Tx(tx: any, ins: any, dataInput: any): Promise { - const resolvedLib = await ergolib; - const txJs = tx.to_js_eip12(); - for (let i = 0; i < txJs.inputs.length; i++) { - const prevExtension = txJs.inputs[i].extension; - txJs.inputs[i] = resolvedLib.ErgoBox.from_json(JSONBI.stringify(ins[i])).to_js_eip12(); - if (prevExtension !== undefined) txJs.inputs[i].extension = prevExtension; - } - for (let i = 0; i < txJs.outputs.length; i++) if (txJs.outputs[i].extension === undefined) txJs.outputs[i].extension = {}; - - txJs.dataInputs[0] = resolvedLib.ErgoBox.from_json(JSONBI.stringify(dataInput)).to_js_eip12(); - txJs.dataInputs[0].extension = {}; - - return txJs; -} diff --git a/lib/gluon-gold-sdk/tsconfig.json b/lib/gluon-gold-sdk/tsconfig.json deleted file mode 100644 index c5be32c..0000000 --- a/lib/gluon-gold-sdk/tsconfig.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "compilerOptions": { - "target": "ES2020", - "module": "esnext", - "moduleResolution": "node", - "strict": true, - "esModuleInterop": true, - "skipLibCheck": true, - "forceConsistentCasingInFileNames": true, - "outDir": "dist", - "rootDir": "src", - "types": ["@nautilus-js/eip12-types", "@types/node"], - "declaration": true, - "declarationMap": true - }, - "include": ["src"], - "exclude": ["node_modules", "dist"] -} diff --git a/next.config.ts b/next.config.ts index ccfcf0a..36d5b84 100644 --- a/next.config.ts +++ b/next.config.ts @@ -2,7 +2,40 @@ import { NextConfig } from "next"; const nextConfig: NextConfig = { reactStrictMode: true, - turbopack: {}, + transpilePackages: ['gluon-ergo-sdk'], + experimental: { + externalDir: true, + }, + // Disable turbopack to use webpack which has better symlink support + // turbopack: {}, + async headers() { + return [ + { + source: '/:path*', + headers: [ + { + key: 'Content-Security-Policy', + value: "script-src 'self' 'unsafe-eval' 'unsafe-inline'; object-src 'none';", + }, + ], + }, + ]; + }, + webpack: (config, { isServer }) => { + // Enable symlink resolution + config.resolve.symlinks = true; + + // Enable WebAssembly support for ergo-lib-wasm + config.experiments = { + ...config.experiments, + asyncWebAssembly: true, + }; + + // Set target to support async/await for WebAssembly + config.target = isServer ? 'node16' : ['web', 'es2020']; + + return config; + }, }; export default nextConfig; diff --git a/package.json b/package.json index d7f2e5a..5690723 100644 --- a/package.json +++ b/package.json @@ -3,22 +3,17 @@ "version": "0.0.1", "private": true, "scripts": { - "check:sdk": "node -e \"const fs=require('fs'); if(!fs.existsSync('lib/gluon-gold-sdk/dist')){ process.exit(1) }\" || bun run build:sdk", - "dev": "bun run check:sdk && next dev", + "dev": "next dev --webpack", "buildtest": "next build", - "build": "bun run build:sdk && next build", + "build": "next build", "start": "next start", "lint": "next lint", - "build:sdk": "cd lib/gluon-gold-sdk && bun install && bun run build", "test": "bun test", "test:watch": "bun test --watch", "test:coverage": "bun test --coverage", "format": "prettier --write .", "prepare": "husky" }, - "workspaces": [ - "lib/*" - ], "dependencies": { "@fleet-sdk/core": "^0.8.1", "@radix-ui/react-dialog": "^1.1.4", @@ -39,7 +34,7 @@ "ergo-lib-wasm-browser": "^0.28.0", "ergo-lib-wasm-nodejs": "^0.28.0", "framer-motion": "^11.17.0", - "gluon-gold-sdk": "file:lib/gluon-gold-sdk", + "gluon-ergo-sdk": "*", "json-bigint": "^1.0.0", "lodash": "^4.17.21", "lucide-react": "^0.471.0", diff --git a/src/lib/components/blockchain/swap/ReactorSwap.tsx b/src/lib/components/blockchain/swap/ReactorSwap.tsx index 7f1c66a..488f156 100644 --- a/src/lib/components/blockchain/swap/ReactorSwap.tsx +++ b/src/lib/components/blockchain/swap/ReactorSwap.tsx @@ -19,7 +19,7 @@ import { Token, TokenSymbol, ReceiptDetails } from "@/lib/functions/reactor/type import { defaultTokens, getValidToTokens, getActionType, getDescription, getTitle, formatValue } from "@/lib/functions/reactor/utils"; import { calculateFissionAmounts, handleFissionSwap } from "@/lib/functions/reactor/handleFission"; import { calculateFusionAmounts, handleFusionSwap } from "@/lib/functions/reactor/handleFusion"; -import { calculateTransmutationAmounts, handleTransmuteToGoldSwap, handleTransmuteFromGoldSwap } from "@/lib/functions/reactor/handleTransmutation"; +import { calculateTransmutationAmounts, handleTransmuteToNeutronSwap, handleTransmuteToProtonSwap } from "@/lib/functions/reactor/handleTransmutation"; import { debounce } from "lodash"; import { handleInitializationError } from "@/lib/utils/error-handler"; import ErgIcon from "@/lib/components/icons/ErgIcon"; @@ -439,12 +439,12 @@ export function ReactorSwap() { setBoxesReady(false); setInitError(null); try { - const sdk = await import("gluon-gold-sdk"); + const sdk = await import("gluon-ergo-sdk"); const gluon = new sdk.Gluon(); gluon.config.NETWORK = process.env.NEXT_PUBLIC_DEPLOYMENT || "testnet"; setGluonInstance(gluon); const gBox = await gluon.getGluonBox(); - const oBox = await gluon.getGoldOracleBox(); + const oBox = await gluon.getOracleBox(); if (!gBox || !oBox) { throw new Error("Failed to initialize Gluon boxes"); } @@ -823,7 +823,7 @@ export function ReactorSwap() { } else if (fromToken.symbol === pairSymbol && toToken.symbol === "ERG") { result = await handleFusionSwap(gluonInstance, gluonBox, oracleBox, utxos, nodeService, ergoWallet, toAmount); } else if (fromToken.symbol === volatileSymbol && toToken.symbol === stableSymbol) { - result = await handleTransmuteToGoldSwap({ + result = await handleTransmuteToNeutronSwap({ gluonInstance, gluonBoxJs: gluonBox, oracleBoxJs: oracleBox, @@ -833,7 +833,7 @@ export function ReactorSwap() { amount: fromAmount, }); } else if (fromToken.symbol === stableSymbol && toToken.symbol === volatileSymbol) { - result = await handleTransmuteFromGoldSwap({ + result = await handleTransmuteToProtonSwap({ gluonInstance, gluonBoxJs: gluonBox, oracleBoxJs: oracleBox, diff --git a/src/lib/components/blocks/dashboard/GluonStats.tsx b/src/lib/components/blocks/dashboard/GluonStats.tsx index 529b990..1fa13b6 100644 --- a/src/lib/components/blocks/dashboard/GluonStats.tsx +++ b/src/lib/components/blocks/dashboard/GluonStats.tsx @@ -74,13 +74,13 @@ export function GluonStats() { async function fetchStats() { try { setHasError(false); - const [ergPriceRes, sdk] = await Promise.all([fetch("/api/getErgPrice"), import("gluon-gold-sdk")]); + const [ergPriceRes, sdk] = await Promise.all([fetch("/api/getErgPrice"), import("gluon-ergo-sdk")]); const { price: ergPrice } = await ergPriceRes.json(); const gluon = new sdk.Gluon(); gluon.config.NETWORK = process.env.NEXT_PUBLIC_DEPLOYMENT || "testnet"; const gluonBox = await gluon.getGluonBox(); - const oracleBox = await gluon.getGoldOracleBox(); + const oracleBox = await gluon.getOracleBox(); // Fetch basic stats const [gaucPrice, goldPrice, normalizedReserveRatio, tvl] = await Promise.all([ diff --git a/src/lib/components/blocks/dashboard/MyStats.tsx b/src/lib/components/blocks/dashboard/MyStats.tsx index 726b3da..f649b16 100644 --- a/src/lib/components/blocks/dashboard/MyStats.tsx +++ b/src/lib/components/blocks/dashboard/MyStats.tsx @@ -66,7 +66,7 @@ export function MyStats() { json: () => ({ price: null }), })), getBalance(), - import("gluon-gold-sdk"), + import("gluon-ergo-sdk"), ]); const { price: ergPrice } = await ergPriceRes.json(); @@ -75,7 +75,7 @@ export function MyStats() { const gluon = new sdk.Gluon(); gluon.config.NETWORK = process.env.NEXT_PUBLIC_DEPLOYMENT || "testnet"; const gluonBox = await gluon.getGluonBox(); - const oracleBox = await gluon.getGoldOracleBox(); + const oracleBox = await gluon.getOracleBox(); const [gaucPrice, goldKgPrice] = await Promise.all([gluonBox.protonPrice(oracleBox), oracleBox.getPrice()]); diff --git a/src/lib/components/blocks/dashboard/VolumeChart.tsx b/src/lib/components/blocks/dashboard/VolumeChart.tsx index 0db868e..ac5d0af 100644 --- a/src/lib/components/blocks/dashboard/VolumeChart.tsx +++ b/src/lib/components/blocks/dashboard/VolumeChart.tsx @@ -33,7 +33,7 @@ export function VolumeChart({ isLoading: externalLoading = false, hasError: exte setLoadingChart(true); setChartError(false); - const sdk = await import("gluon-gold-sdk"); + const sdk = await import("gluon-ergo-sdk"); const gluon = new sdk.Gluon(); gluon.config.NETWORK = process.env.NEXT_PUBLIC_DEPLOYMENT || "testnet"; diff --git a/src/lib/functions/reactor/handleFission.ts b/src/lib/functions/reactor/handleFission.ts index 7df91fd..1bcab87 100644 --- a/src/lib/functions/reactor/handleFission.ts +++ b/src/lib/functions/reactor/handleFission.ts @@ -142,7 +142,7 @@ export const handleFissionSwap = async ( } // Fetch fresh boxes to avoid stale data issues - const oracleBoxJs = await gluonInstance.getGoldOracleBox(); + const oracleBoxJs = await gluonInstance.getOracleBox(); const gluonBoxJs = await gluonInstance.getGluonBox(); if (!oracleBoxJs || !gluonBoxJs) { diff --git a/src/lib/functions/reactor/handleFusion.ts b/src/lib/functions/reactor/handleFusion.ts index 554f0ac..2bd0580 100644 --- a/src/lib/functions/reactor/handleFusion.ts +++ b/src/lib/functions/reactor/handleFusion.ts @@ -173,7 +173,7 @@ export const handleFusionSwap = async ( throw new Error("Failed to get network height"); } - const oracleBoxJs = await gluonInstance.getGoldOracleBox(); + const oracleBoxJs = await gluonInstance.getOracleBox(); const gluonBoxJs = await gluonInstance.getGluonBox(); if (!oracleBoxJs || !gluonBoxJs) { diff --git a/src/lib/functions/reactor/handleTransmutation.ts b/src/lib/functions/reactor/handleTransmutation.ts index 8e9a08c..0d018e4 100644 --- a/src/lib/functions/reactor/handleTransmutation.ts +++ b/src/lib/functions/reactor/handleTransmutation.ts @@ -68,9 +68,9 @@ export const calculateTransmutationAmounts = async ({ let willGet: bigint; try { if (fromTokenSymbol === volatileSymbol) { - willGet = BigInt(await gluonInstance.transmuteToGoldWillGet(gluonBox, oracleBox, Number(inputAmount), height)); + willGet = BigInt(await gluonInstance.transmuteToNeutronWillGet(gluonBox, oracleBox, Number(inputAmount), height)); } else { - willGet = BigInt(await gluonInstance.transmuteFromGoldWillGet(gluonBox, oracleBox, Number(inputAmount), height)); + willGet = BigInt(await gluonInstance.transmuteToProtonWillGet(gluonBox, oracleBox, Number(inputAmount), height)); } console.log("🔍 [DEBUG] TRANSMUTATION PREDICTION RAW", { @@ -101,8 +101,8 @@ export const calculateTransmutationAmounts = async ({ try { fees = fromTokenSymbol === volatileSymbol - ? await gluonInstance.getTotalFeeAmountTransmuteToGold(gluonBox, oracleBox, Number(inputAmount)) - : await gluonInstance.getTotalFeeAmountTransmuteFromGold(gluonBox, oracleBox, Number(inputAmount)); + ? await gluonInstance.getTotalFeeAmountTransmuteToNeutron(gluonBox, oracleBox, Number(inputAmount)) + : await gluonInstance.getTotalFeeAmountTransmuteToProton(gluonBox, oracleBox, Number(inputAmount)); } catch (error) { console.error("Failed to get transmutation fees:", error); throw new Error("Failed to calculate transmutation fees"); @@ -166,7 +166,7 @@ export const calculateTransmutationAmounts = async ({ } }; -export const handleTransmuteToGoldSwap = async ({ +export const handleTransmuteToNeutronSwap = async ({ gluonInstance, gluonBoxJs, oracleBoxJs, @@ -184,13 +184,13 @@ export const handleTransmuteToGoldSwap = async ({ amount: string; }): Promise<{ txHash?: string; error?: string }> => { try { - console.log("🔍 TRANSMUTE TO GOLD SWAP INPUT:", { + console.log("🔍 TRANSMUTE TO NEUTRON SWAP INPUT:", { amount, type: typeof amount, }); // Fetch fresh boxes to avoid stale data issues - const oracleBoxJs = await gluonInstance.getGoldOracleBox(); + const oracleBoxJs = await gluonInstance.getOracleBox(); const gluonBoxJs = await gluonInstance.getGluonBox(); // Validate inputs @@ -226,12 +226,12 @@ export const handleTransmuteToGoldSwap = async ({ } const protonsToTransmute = convertToDecimals(amount); - console.log("🔍 TRANSMUTE TO GOLD AMOUNT:", { + console.log("🔍 TRANSMUTE TO NEUTRON AMOUNT:", { protonsToTransmute: protonsToTransmute.toString(), }); // Create unsigned transaction - const unsignedTransaction = await gluonInstance.transmuteToGoldForEip12(gluonBoxJs, oracleBoxJs, userBoxes, oracleBuyBackJs, Number(protonsToTransmute), height); + const unsignedTransaction = await gluonInstance.transmuteToNeutronForEip12(gluonBoxJs, oracleBoxJs, userBoxes, oracleBuyBackJs, Number(protonsToTransmute), height); if (!unsignedTransaction) { throw new Error("Failed to create unsigned transaction"); @@ -254,20 +254,20 @@ export const handleTransmuteToGoldSwap = async ({ console.log("Transaction submitted successfully. TxId:", txHash); // Handle success with toast notification - handleTransactionSuccess(txHash, "transmute to gold"); + handleTransactionSuccess(txHash, "transmute to neutron"); return { txHash }; } catch (error) { - console.error("TransmuteToGold failed:", error); + console.error("TransmuteToNeutron failed:", error); // Use the error handler for proper classification and toast notification - const errorDetails = handleTransactionError(error, "transmute to gold"); + const errorDetails = handleTransactionError(error, "transmute to neutron"); return { error: errorDetails.userMessage }; } }; -export const handleTransmuteFromGoldSwap = async ({ +export const handleTransmuteToProtonSwap = async ({ gluonInstance, gluonBoxJs, oracleBoxJs, @@ -285,13 +285,13 @@ export const handleTransmuteFromGoldSwap = async ({ amount: string; }): Promise<{ txHash?: string; error?: string }> => { try { - console.log("🔍 TRANSMUTE FROM GOLD SWAP INPUT:", { + console.log("🔍 TRANSMUTE TO PROTON SWAP INPUT:", { amount, type: typeof amount, }); // Fetch fresh boxes to avoid stale data issues - const oracleBoxJs = await gluonInstance.getGoldOracleBox(); + const oracleBoxJs = await gluonInstance.getOracleBox(); const gluonBoxJs = await gluonInstance.getGluonBox(); // Validate inputs @@ -322,12 +322,12 @@ export const handleTransmuteFromGoldSwap = async ({ } const neutronsToDecay = convertToDecimals(amount); - console.log("🔍 TRANSMUTE FROM GOLD AMOUNT:", { + console.log("🔍 TRANSMUTE TO PROTON AMOUNT:", { neutronsToDecay: neutronsToDecay.toString(), }); // Create unsigned transaction - const unsignedTransaction = await gluonInstance.transmuteFromGoldForEip12(gluonBoxJs, oracleBoxJs, userBoxes, oracleBuyBackJs, Number(neutronsToDecay), height); + const unsignedTransaction = await gluonInstance.transmuteToProtonForEip12(gluonBoxJs, oracleBoxJs, userBoxes, oracleBuyBackJs, Number(neutronsToDecay), height); if (!unsignedTransaction) { throw new Error("Failed to create unsigned transaction"); @@ -350,14 +350,14 @@ export const handleTransmuteFromGoldSwap = async ({ console.log("Transaction submitted successfully. TxId:", txHash); // Handle success with toast notification - handleTransactionSuccess(txHash, "transmute from gold"); + handleTransactionSuccess(txHash, "transmute to proton"); return { txHash }; } catch (error) { - console.error("TransmuteFromGold failed:", error); + console.error("TransmuteToProton failed:", error); // Use the error handler for proper classification and toast notification - const errorDetails = handleTransactionError(error, "transmute from gold"); + const errorDetails = handleTransactionError(error, "transmute to proton"); return { error: errorDetails.userMessage }; }