diff --git a/README.md b/README.md index 41f6b508..4407a209 100644 --- a/README.md +++ b/README.md @@ -1,482 +1,237 @@ -

Mangata Finance SDK

+

Gasp SDK

- The Mangata SDK is comprehensive toolset designed for facilitating seamless communication with the Mangata Substrate node. + Gasp SDK is comprehensive toolset designed for facilitating seamless communication with the Gasp node.

-![Artwork](https://blog.mangata.finance/assets/posts/themis-cover.png) +![npm](https://img.shields.io/npm/v/gasp-sdk) +![Issues](https://img.shields.io/github/issues/mangata-finance/gasp-dev-kit) +![Pull Request](https://img.shields.io/github/issues-pr/mangata-finance/gasp-dev-kit) +![GitHub last commit](https://img.shields.io/github/last-commit/mangata-finance/gasp-dev-kit) -![npm](https://img.shields.io/npm/v/%40mangata-finance%2Fsdk) -![Issues](https://img.shields.io/github/issues/mangata-finance/mangata-dev-kit) -![Pull Request](https://img.shields.io/github/issues-pr/mangata-finance/mangata-dev-kit) -![GitHub last commit](https://img.shields.io/github/last-commit/mangata-finance/mangata-dev-kit) -![Build Status](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Fmangata-finance%2Fmangata-dev-kit%2Fbadge%3Fref%3Ddevelop&style=flat) +## Table of Contents -# Getting Started +- [Introduction](#introduction) +- [Table of Contents](#table-of-contents) +- [Installation & Setup](#installation--setup) +- [Quick Start / Getting Started](#quick-start--getting-started) +- [Usage & Examples](#usage--examples) +- [Core SDK Components & Available Features](#core-sdk-components--available-features) -The Mangata SDK is the TypeScript library that offers a wide range of convenient methods for effortlessly buying and selling assets on the Mangata DEX. Its primary objective is to streamline the development process for client applications, specifically targeting algorithmic traders and frontend interface builders. By utilizing the Mangata SDK, developers can significantly reduce time and effort required to integrate with the platform. +## Installation & Setup -## Installation +### Supported Languages & Frameworks -```sh -# with npm -npm i @mangata-finance/sdk +The Gasp SDK is built for **TypeScript/JavaScript** and is designed to work seamlessly in both Node.js and browser environments. All examples are provided in TypeScript, but you can easily use them in JavaScript as well. -# with yarn -yarn add @mangata-finance/sdk -``` +### Prerequisites -## Migration from v1 to v2 - -To migrate from v1 to v2, certain modifications need to be made. This guide aims to help you refactor your codebase. We have divided the methods into specific groups: - -1. xTokens -2. xyk -3. rpc -4. tokens -5. submitableExtrinsic -6. query -7. fee -8. util - -The **buyAsset** and **sellAsset** methods have been removed and replaced by **multiswapBuyAsset** and **multiswapSellAsset** respectively. - -We also made a change by transitioning from using arguments for functions to using objects as parameters. -Example: - -```js -// V1: -await instance.createPool( - testUser, - firstTokenId, - new BN("10000000000000000000000"), - secondTokenId, - new BN("10000000000000000000000"), - txOptions: { - extrinsicStatus: (data) => { - console.log(data) - } - } -); - - -// V2: -const args: CreatePool = { - account: testUser, - firstTokenId: firstTokenId!, - secondTokenId: secondTokenId!, - firstTokenAmount: new BN("10000000000000000000000"), - secondTokenAmount: new BN("10000000000000000000000"), - txOptions: { - extrinsicStatus: (data) => { - console.log(data) - } - } -}; -await instance.xyk.createPool(args); +Before installing the SDK, ensure you have the following: + +- A supported version of [Node.js](https://nodejs.org/) (v20 or above) installed. +- A package manager such as [npm](https://www.npmjs.com/) or [yarn](https://yarnpkg.com/). + +### Installation + +You can install the SDK via npm or yarn: + +```bash +## Using npm +npm install gasp-sdk + +## Using yarn +yarn add gasp-sdk ``` -We no longer support the implementation of depositing to Mangata within the SDK. However, we do provide the necessary raw methods for depositing, which should be implemented separately outside of the SDK. For specific examples of how to deposit to Mangata using the SDK, please refer to the provided examples. +### Setup -To obtain an instance of the Mangata node, please follow this step: +After installation, import and initialize the SDK in your project: -```js -// V1: -const mangata = Mangata.getInstance(["wss://kusama-archive.mangata.online"]); +```ts +import { Gasp } from 'gasp-sdk'; -// V2: -import { MangataInstance } from "@mangata-finance/sdk" -const mangata: MangataInstance = Mangata.instance(["wss://kusama-archive.mangata.online"]); +const sdk = await Gasp.create('wss://rollup-prod-rpc.gasp.xyz/', { + debug: true, + // Optionally, pass a custom logger instance if needed + logger, +}).catch((e) => { + console.error('Error creating Gasp SDK instance:', e); +}); ``` -Method **getAmountOfTokenIdInPool** has been renamed to **getAmountOfTokensInPool** +### Additional Configuration + +#### Signer + +The SDK allows you to pass a signer instance after the initialization. This is useful if you want to avoid passing the signer for every call. The signer should implement the necessary methods for signing transactions. + +To use signer provided by the SDK, you can initialize it as follows: -```js -// V1: -const amount = await mangata.getAmountOfTokenIdInPool("0", "4") +```ts +import { Gasp } from 'gasp-sdk'; -// V2: -const amount = await mangata.query.getAmountOfTokensInPool("0", "4") +const pk = '...'; +const sdk = await Gasp.create('wss://rollup-prod-rpc.gasp.xyz/'); +sdk.setSigner(sdk.signers.ethers.create(pk)) ``` -Please replace the existing "buyAsset" and "sellAsset" methods with the newly introduced "multiswapBuyAsset" and "multiswapSellAsset" methods. - -```js -// V1: -await mangata.buyAsset( - account: string | KeyringPair, - soldAssetId: string, - boughtAssetId: string, - amount: BN, - maxAmountIn: BN, - txOptions?: TxOptions -) - -// V2: -const args: MultiswapBuyAsset = { - account: Account; - tokenIds: TokenId[]; - amount: TokenAmount; - maxAmountIn: TokenAmount; - txOptions?: Partial | undefined; -} -await mangata.xyk.multiswapBuyAsset(args) +In case you want to use your own signer, you can implement the `Signer` interface and pass it to the SDK. Example implementation can be found [here](./packages/sdk/src/modules/signer/EthersSigner.ts). + +#### Logger + +The SDK uses a logger to output debug and error messages. When you enable debug mode (by setting `debug: true`), the SDK will output detailed logs. By default, if you don't provide a custom logger, the SDK uses its built-in logger. + +If you prefer to integrate with your own logging system, you can supply a custom logger by implementing the necessary logging methods (e.g., `debug`, `error`) and passing it via the `logger` property. + +Example with a custom logger: + +```javascript +const customLogger = { + debug: (...args) => console.log('[Custom Debug]', ...args), + error: (...args) => console.error('[Custom Error]', ...args), + // Implement other logging methods as needed. +}; + +const config = { + debug: true, + logger: customLogger, +}; + +const sdk = await Gasp.create('...', config); ``` -To illustrate how to retrieve asset information, you need to determine its corresponding section within the SDK. The method **getAssetInfo** is located within the query block. +## Usage & Examples -```js -// V1: -const assetInfo = await mangata.getAssetInfo() +Once you have successfully created an instance of the Gasp SDK, you can access its different modules to interact with the Gasp node. Below are some example use cases to help you get started. -// V2: -const assetInfo = await mangata.query.getAssetInfo() +### Accessing the Account Module + +The Account module allows you to manage and retrieve account-related information. + +```ts +// Retrieve account balances +import { Gasp } from 'gasp-sdk'; + +const sdk = await Gasp.create('wss://rollup-prod-rpc.gasp.xyz/'); + +const account = '0x...'; +const balances = await sdk.account.getBalances({ account }); + +console.log('balances', balances); ``` -# Basic use case +### Working with the Pool Module -Here is a quick example to get you started, **all you need is Mangata instance**: +The Pool module enables operations related to liquidity pools -Support: Only ESM +```ts +import { Gasp, PoolType } from 'gasp-sdk'; -```js -import { Mangata } from "@mangata-finance/sdk"; +const sdk = await Gasp.create('wss://rollup-prod-rpc.gasp.xyz/'); -async function main() { - // Connect to the mainnet (also testnet, mainnet) - const mangata = Mangata.instance(["wss://kusama-archive.mangata.online"]); +sdk.setSigner(sdk.signers.ethers.create('...')); - // Retrieve the chainName, nodeName & nodeVersion information - const [chain, nodeName, nodeVersion] = await Promise.all([ - mangata.rpc.getChain(), - mangata.rpc.getNodeName(), - mangata.rpc.getNodeVersion() - ]); +// Retrieve pools information +const pools = await sdk.pool.getPools(); - console.log( - `You are connected to chain ${chain} using ${nodeName} v${nodeVersion}` - ); -} +console.log('pools', pools); + +// Create a new pool +const tx = sdk.pool.createPool({ + type: PoolType.Xyk, + firstAssetId: '0', + firstAssetAmount: '1000000000000000000', + secondAssetId: '1', + secondAssetAmount: '100000000000000', + account: '0x...', +}); -main() - .catch(console.error) - .finally(() => process.exit()); +// Before submitting the transaction, it is possible to check the fee information +const feeInfo = await tx.paymentInfo(); +console.log('feeInfo', feeInfo); + +const result = await tx.execute(); +console.log('result', result); ``` -For available methods please visit [docs](https://docs.mangata.finance/sdk/) - -# Documentation - -```js -import { - Mangata, - MangataInstance, - MainTokens, - PoolWithShare, - TokenId, - Token, - PoolWithRatio, - TokenBalance, - TokenInfo -} from "../"; -import { BN } from "@polkadot/util"; - -const ENDPOINT = "wss://kusama-archive.mangata.online"; -const KSM_TOKEN = "4"; -const MGX_TOKEN = "0"; -const ADDRESS = "5CP5sgWw94GoQCGvm4qeNgKTw41Scnk2F41uPe4SSAPVPoCU"; -const LPTOKENKSMANDMGX = "5"; - -const main = async () => { - const mangata: MangataInstance = Mangata.instance([ENDPOINT]); - /** - * Retrieves the amount of tokens in a liquidity pool for a given pair of - * tokens. - * @param {string} firstTokenId - * @param {string} secondTokenId - * - * @returns {BN | Array} - */ - - const amountOfTokens: BN[] = await mangata.query.getAmountOfTokensInPool( - KSM_TOKEN, - MGX_TOKEN - ); - - /** - * Retrieves information about the assets. - * - * @returns {MainTokens} - */ - const assetInfo: MainTokens = await mangata.query.getAssetsInfo(); - - /** - * Retrieves the current block number. - * - * @returns {string} - */ - const blockNumber: string = await mangata.query.getBlockNumber(); - - /** - * Retrieves the pools in which the specified address has invested - * - * @returns {PoolWithShare | Array} - */ - - const investedPools: PoolWithShare[] = await mangata.query.getInvestedPools( - ADDRESS - ); - - /** - * Retrieves the liquidity pool information for a specific liquidity token * ID. - * - * @returns {TokenId | Array} - */ - - const liquidityPool: TokenId[] = await mangata.query.getLiquidityPool( - LPTOKENKSMANDMGX - ); - - /** - * Retrieves the liquidity token ID for a given pair of tokens. - * - * @returns {TokenId} - */ - const liquidityTokenId: TokenId = await mangata.query.getLiquidityTokenId( - KSM_TOKEN, - MGX_TOKEN - ); - - /** - * Retrieves the liquidity token IDs. - * - * @returns {TokenId | Array} - */ - const liquidityTokenIds: TokenId[] = - await mangata.query.getLiquidityTokenIds(); - - /** - * Retrieves the liquidity tokens. - * - * @returns {MainTokens} - */ - const liquidityTokens: MainTokens = await mangata.query.getLiquidityTokens(); - - /** - * Retrieves the nonce of the specified address. - * - * @returns {BN} - */ - const nonce: BN = await mangata.query.getNonce(ADDRESS); - - /** - * Retrieves the tokens owned by a specific address. - * - * @returns {[id: TokenId]: Token}} - */ - const ownedTokens: { - [id: TokenId]: Token - } = await mangata.query.getOwnedTokens(ADDRESS); - - /** - * Retrieves the detailed information about a specific pool. - * - * @returns {PoolWithRatio} - */ - const pool: PoolWithRatio = await mangata.query.getPool(LPTOKENKSMANDMGX); - - /** - * Retrieves information about all the available pools. - * - * @returns {PoolWithRatio | Array} - */ - const pools: PoolWithRatio[] = await mangata.query.getPools(); - - /** - * Retrieves the token balance for a specific address and token ID. - * - * @returns {TokenBalance} - */ - const tokenBalance: TokenBalance = await mangata.query.getTokenBalance( - MGX_TOKEN, - ADDRESS - ); - - /** - * Retrieves detailed information about a specific token. - * - * @returns {TokenInfo} - */ - const tokenInfo: TokenInfo = await mangata.query.getTokenInfo(MGX_TOKEN); - - /** - * Retrieves the total issuance of a specific token. - * - * @returns {BN} - */ - const issuance: BN = await mangata.query.getTotalIssuance(MGX_TOKEN); - - /** - * Retrieves the total issuance of all tokens. - * - * @returns {Record} - */ - const totalIssuanceOfTokens: Record = - await mangata.query.getTotalIssuanceOfTokens(); - - /** - * Calculates the buy price based on the reserve parameters - * - * @returns {BN} - */ - const argsReserve: Reserve = { - inputReserve: new BN("1000000000000000000"), - outputReserve: new BN("10000000000000000000"), - amount: new BN("10000") - }; - const price: BN = await mangata.rpc.calculateBuyPrice(argsReserve); - - /** - * Calculates the buy price based on the asset's ID. - * - * @returns {BN} - */ - const price: BN = await mangata.rpc.calculateBuyPriceId( - KSM_TOKEN, - MGX_TOKEN, - new BN("10000") - ); - - /** - * Calculates the rewards amount based on the rewards parameters. - * - * @returns {BN} - */ - const argsRewards: Rewards = { - address: ADDRESS, - liquidityTokenId: LPTOKENKSMANDMGX - }; - const rewards: BN = await mangata.rpc.calculateRewardsAmount(argsRewards); - - /** - * Calculates the sell price based on the reserve parameters. - * - * @returns {BN} - */ - const argsReserve: Reserve = { - inputReserve: new BN("1000000000000000000"), - outputReserve: new BN("10000000000000000000"), - amount: new BN("10000") - }; - const price: BN = await mangata.rpc.calculateSellPrice(argsReserve); - - /** - * Calculates the sell price based on the asset's ID. - * - * @returns {BN} - */ - const price: BN = await mangata.rpc.calculateSellPriceId( - KSM_TOKEN, - MGX_TOKEN, - new BN("10000") - ); -}; +### Using the Rewards Module + +The Rewards module allows you to manage and retrieve information about rewards. + +```ts +import { Gasp, PoolType } from 'gasp-sdk'; -main() - .catch(console.error) - .finally(() => process.exit()); +const sdk = await Gasp.create('wss://rollup-prod-rpc.gasp.xyz/'); + +const signer = sdk.signers.ethers.create('...'); + +// Create a new pool +const result = await sdk.rewards + .claimNativeRewardsForPool( + { + pool: '160', + account: '0x...', + }, + { signer } // You can always pass the signer to every call as a second parameter + ) + .execute(); + +console.log('result', result); ``` -# Transactions - -```js -import { - Mangata, - MangataInstance - TransferTokens, - MangataGenericEvent, - MangataGenericEvent, - MultiswapBuyAsset, - Batch, - MintLiquidity -} from "@mangata-finance/sdk"; -import { BN } from "@polkadot/util"; -import { Keyring } from "@polkadot/api"; -import { v4 as uuidv4 } from "uuid"; -import { ISubmittableResult } from "@polkadot/types/types"; -const mangata: MangataInstance = Mangata.instance([ENDPOINT]); - -const keyring = new Keyring({ type: "sr25519" }); -const testUser = "//testUser_" + uuidv4(); -const account = keyring.createFromUri(testUser); -keyring.addPair(account); - -const args: TransferTokens = { - account: account, - tokenId: MGX_TOKEN, - address: ADDRESS, - amount: new BN(100e18), // 100 MGX - txOptions: { - statusCallback: (status: ISubmittableResult) => { - // Here you can check for status of your transaction - console.log(status); - }, - extrinsicStatus: (result: MangataGenericEvent[]) => { - // here will be the result of your transaction - console.log(result); - } - } -}; -await mangata.tokens.transferTokens(args); - -const args: MultiswapBuyAsset = { - account, - tokenIds: [MGX_TOKEN, KSM_TOKEN], - amount: new BN(1000e18), // 100 MGX - maxAmountIn: new BN(60000e18), - txOptions: { - statusCallback: (status: ISubmittableResult) => { - // Here you can check for status of your transaction - console.log(status); - }, - extrinsicStatus: (result: MangataGenericEvent[]) => { - // here will be the result of your transaction - console.log(result); - } - } -}; -await mangata.xyk.multiswapBuyAsset(args); +--- -const argsBuy: MultiswapBuyAsset = { - account, - tokenIds: [MGX_TOKEN, KSM_TOKEN], - amount: new BN(1000e18), // 100 MGX - maxAmountIn: new BN(60000e18) -}; -const tx1 = await mangata.submitableExtrinsic.multiswapBuyAsset(argsBuy); - -const argsMint: MintLiquidity = { - account, - firstTokenId: KSM_TOKEN, - secondTokenId: MGX_TOKEN, - firstTokenAmount: new BN(100e12), - expectedSecondTokenAmount: new BN(1000e18) -}; -const tx2 = await mangata.submitableExtrinsic.mintLiquidity(argsMint); - -const args: Batch = { - account, - calls: [tx1, tx2], - txOptions: { - statusCallback: (status: ISubmittableResult) => { - // Here you can check for status of your transaction - console.log(status); - }, - extrinsicStatus: (result: MangataGenericEvent[]) => { - // here will be the result of your transaction - console.log(result); +### Core SDK Components & Available Features + +The SDK is built around several core components that offer a comprehensive toolset for interacting with the Gasp node: + +- [**Account Module:**](./packages/sdk/src/modules/account/Account.ts) + Manage account details, retrieve balances, and obtain nonce values. + +- [**Pool Module:**](./packages/sdk/src/modules/pool/Pool.ts) + Query and manage liquidity pool information. + +- [**Asset Module:**](./packages/sdk/src/modules/asset/Asset.ts) + Access and manage asset-related data. + +- [**Market Module:**](./packages/sdk/src/modules/market/Market.ts) + Retrieve market data and execute trading operations. + +- [**Rewards Module:**](./packages/sdk/src/modules/rewards/Rewards.ts) + Claim rewards for your account. + +- [**Rolldown Module:**](./packages/sdk/src/modules/rolldown/Rolldown.ts) + Withdraw your assets from Gasp chain. + +--- + +### Error Handling + +The Gasp SDK implements robust error handling to ensure developers can effectively manage exceptions and edge cases. Key points include: + +- **Custom Error Class:** + The SDK utilizes custom error class (`GaspError`) to provide meaningful error messages and error codes. + +- **Error Types:** + + - **Initialization Errors:** Thrown when the SDK fails to initialize (e.g., network issues or invalid configuration). + - **Validation Errors:** Raised when required parameters are missing or invalid. + - **Transaction Errors:** Detailed errors related to transaction submission failures. + - **Argument Errors:** Raised when the arguments passed to a function are invalid or not as expected. + - **Parsing Errors:** Raised when the SDK fails to parse a response from the Gasp node. + +```typescript +try { + const result = await sdk.account.getAssetBalance({ + account: '0x123', + asset: '0', + }); + console.log(result); +} catch (error) { + if (error instanceof GaspError) { + console.error(`SDK Error [${error.code}]: ${error.message}`); + } else { + console.error('An unexpected error occurred:', error); } - } -}; -await mangata.batch(args); +} ``` diff --git a/package-lock.json b/package-lock.json index f91cf364..92bdb0d7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1720,6 +1720,7 @@ "version": "7.26.9", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.26.9.tgz", "integrity": "sha512-aA63XwOkcl4xxQa3HjPMqOP6LiK0ZDv3mUPYEFXkpHbaFjtGggE1A61FjFzJnB+p7/oy2gA8E+rcBNl/zC1tMg==", + "dev": true, "license": "MIT", "dependencies": { "regenerator-runtime": "^0.14.0" @@ -1783,18 +1784,6 @@ "dev": true, "license": "MIT" }, - "node_modules/@coinbase/wallet-sdk": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/@coinbase/wallet-sdk/-/wallet-sdk-4.3.0.tgz", - "integrity": "sha512-T3+SNmiCw4HzDm4we9wCHCxlP0pqCiwKe4sOwPH3YAK2KSKjxPRydKu6UQJrdONFVLG7ujXvbd/6ZqmvJb8rkw==", - "license": "Apache-2.0", - "dependencies": { - "@noble/hashes": "^1.4.0", - "clsx": "^1.2.1", - "eventemitter3": "^5.0.1", - "preact": "^10.24.2" - } - }, "node_modules/@colors/colors": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.5.0.tgz", @@ -1810,7 +1799,7 @@ "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, + "devOptional": true, "license": "MIT", "dependencies": { "@jridgewell/trace-mapping": "0.3.9" @@ -1823,27 +1812,13 @@ "version": "0.3.9", "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "@jridgewell/resolve-uri": "^3.0.3", "@jridgewell/sourcemap-codec": "^1.4.10" } }, - "node_modules/@ecies/ciphers": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/@ecies/ciphers/-/ciphers-0.2.2.tgz", - "integrity": "sha512-ylfGR7PyTd+Rm2PqQowG08BCKA22QuX8NzrL+LxAAvazN10DMwdJ2fWwAzRj05FI/M8vNFGm3cv9Wq/GFWCBLg==", - "license": "MIT", - "engines": { - "bun": ">=1", - "deno": ">=2", - "node": ">=16" - }, - "peerDependencies": { - "@noble/ciphers": "^1.0.0" - } - }, "node_modules/@esbuild/android-arm": { "version": "0.18.20", "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.18.20.tgz", @@ -1851,7 +1826,6 @@ "cpu": [ "arm" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -1868,7 +1842,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -1885,7 +1858,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -1902,7 +1874,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -1919,7 +1890,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -1936,7 +1906,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -1953,7 +1922,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -1970,7 +1938,6 @@ "cpu": [ "arm" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -1987,7 +1954,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -2004,7 +1970,6 @@ "cpu": [ "ia32" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -2021,7 +1986,6 @@ "cpu": [ "loong64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -2038,7 +2002,6 @@ "cpu": [ "mips64el" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -2055,7 +2018,6 @@ "cpu": [ "ppc64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -2072,7 +2034,6 @@ "cpu": [ "riscv64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -2089,7 +2050,6 @@ "cpu": [ "s390x" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -2106,7 +2066,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -2123,7 +2082,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -2140,7 +2098,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -2157,7 +2114,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -2174,7 +2130,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -2191,7 +2146,6 @@ "cpu": [ "ia32" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -2208,7 +2162,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -2323,57 +2276,6 @@ "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, - "node_modules/@ethereumjs/common": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/@ethereumjs/common/-/common-3.2.0.tgz", - "integrity": "sha512-pksvzI0VyLgmuEF2FA/JR/4/y6hcPq8OUail3/AvycBaW1d5VSauOZzqGvJ3RTmR4MU35lWE8KseKOsEhrFRBA==", - "license": "MIT", - "dependencies": { - "@ethereumjs/util": "^8.1.0", - "crc-32": "^1.2.0" - } - }, - "node_modules/@ethereumjs/rlp": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@ethereumjs/rlp/-/rlp-4.0.1.tgz", - "integrity": "sha512-tqsQiBQDQdmPWE1xkkBq4rlSW5QZpLOUJ5RJh2/9fug+q9tnUhuZoVLk7s0scUIKTOzEtR72DFBXI4WiZcMpvw==", - "license": "MPL-2.0", - "bin": { - "rlp": "bin/rlp" - }, - "engines": { - "node": ">=14" - } - }, - "node_modules/@ethereumjs/tx": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@ethereumjs/tx/-/tx-4.2.0.tgz", - "integrity": "sha512-1nc6VO4jtFd172BbSnTnDQVr9IYBFl1y4xPzZdtkrkKIncBCkdbgfdRV+MiTkJYAtTxvV12GRZLqBFT1PNK6Yw==", - "license": "MPL-2.0", - "dependencies": { - "@ethereumjs/common": "^3.2.0", - "@ethereumjs/rlp": "^4.0.1", - "@ethereumjs/util": "^8.1.0", - "ethereum-cryptography": "^2.0.0" - }, - "engines": { - "node": ">=14" - } - }, - "node_modules/@ethereumjs/util": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/@ethereumjs/util/-/util-8.1.0.tgz", - "integrity": "sha512-zQ0IqbdX8FZ9aw11vP+dZkKDkS+kgIvQPHnSAXzP9pLu+Rfu3D3XEeLbicvoXJTYnhZiPmsZUxgdzXwNKxRPbA==", - "license": "MPL-2.0", - "dependencies": { - "@ethereumjs/rlp": "^4.0.1", - "ethereum-cryptography": "^2.0.0", - "micro-ftch": "^0.3.1" - }, - "engines": { - "node": ">=14" - } - }, "node_modules/@goestav/nx-semantic-release": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/@goestav/nx-semantic-release/-/nx-semantic-release-1.0.0.tgz", @@ -2438,7 +2340,6 @@ "version": "8.0.2", "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", - "dev": true, "license": "ISC", "dependencies": { "string-width": "^5.1.2", @@ -2456,7 +2357,6 @@ "version": "6.1.0", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", - "dev": true, "license": "MIT", "engines": { "node": ">=12" @@ -2469,7 +2369,6 @@ "version": "6.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", - "dev": true, "license": "MIT", "engines": { "node": ">=12" @@ -2482,14 +2381,12 @@ "version": "9.2.2", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", - "dev": true, "license": "MIT" }, "node_modules/@isaacs/cliui/node_modules/string-width": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", - "dev": true, "license": "MIT", "dependencies": { "eastasianwidth": "^0.2.0", @@ -2507,7 +2404,6 @@ "version": "7.1.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", - "dev": true, "license": "MIT", "dependencies": { "ansi-regex": "^6.0.1" @@ -2523,7 +2419,6 @@ "version": "8.1.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", - "dev": true, "license": "MIT", "dependencies": { "ansi-styles": "^6.1.0", @@ -2564,7 +2459,6 @@ "version": "0.3.8", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.8.tgz", "integrity": "sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA==", - "dev": true, "license": "MIT", "dependencies": { "@jridgewell/set-array": "^1.2.1", @@ -2579,7 +2473,6 @@ "version": "3.1.2", "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", - "dev": true, "license": "MIT", "engines": { "node": ">=6.0.0" @@ -2589,7 +2482,6 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", - "dev": true, "license": "MIT", "engines": { "node": ">=6.0.0" @@ -2599,369 +2491,271 @@ "version": "1.5.0", "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", - "dev": true, "license": "MIT" }, "node_modules/@jridgewell/trace-mapping": { "version": "0.3.25", "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", - "dev": true, "license": "MIT", "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" } }, - "node_modules/@lit-labs/ssr-dom-shim": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@lit-labs/ssr-dom-shim/-/ssr-dom-shim-1.3.0.tgz", - "integrity": "sha512-nQIWonJ6eFAvUUrSlwyHDm/aE8PBDu5kRpL0vHMg6K8fK3Diq1xdPjTnsJSwxABhaZ+5eBi1btQB5ShUTKo4nQ==", - "license": "BSD-3-Clause" - }, - "node_modules/@lit/reactive-element": { - "version": "1.6.3", - "resolved": "https://registry.npmjs.org/@lit/reactive-element/-/reactive-element-1.6.3.tgz", - "integrity": "sha512-QuTgnG52Poic7uM1AN5yJ09QMe0O28e10XzSvWDz02TJiiKee4stsiownEIadWm8nYzyDAyT+gKzUoZmiWQtsQ==", - "license": "BSD-3-Clause", - "dependencies": { - "@lit-labs/ssr-dom-shim": "^1.0.0" - } - }, - "node_modules/@metamask/eth-json-rpc-provider": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@metamask/eth-json-rpc-provider/-/eth-json-rpc-provider-1.0.1.tgz", - "integrity": "sha512-whiUMPlAOrVGmX8aKYVPvlKyG4CpQXiNNyt74vE1xb5sPvmx5oA7B/kOi/JdBvhGQq97U1/AVdXEdk2zkP8qyA==", + "node_modules/@mole-inc/bin-wrapper": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/@mole-inc/bin-wrapper/-/bin-wrapper-8.0.1.tgz", + "integrity": "sha512-sTGoeZnjI8N4KS+sW2AN95gDBErhAguvkw/tWdCjeM8bvxpz5lqrnd0vOJABA1A+Ic3zED7PYoLP/RANLgVotA==", + "dev": true, + "license": "MIT", "dependencies": { - "@metamask/json-rpc-engine": "^7.0.0", - "@metamask/safe-event-emitter": "^3.0.0", - "@metamask/utils": "^5.0.1" + "bin-check": "^4.1.0", + "bin-version-check": "^5.0.0", + "content-disposition": "^0.5.4", + "ext-name": "^5.0.0", + "file-type": "^17.1.6", + "filenamify": "^5.0.2", + "got": "^11.8.5", + "os-filter-obj": "^2.0.0" }, "engines": { - "node": ">=14.0.0" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" } }, - "node_modules/@metamask/eth-json-rpc-provider/node_modules/@metamask/json-rpc-engine": { - "version": "7.3.3", - "resolved": "https://registry.npmjs.org/@metamask/json-rpc-engine/-/json-rpc-engine-7.3.3.tgz", - "integrity": "sha512-dwZPq8wx9yV3IX2caLi9q9xZBw2XeIoYqdyihDDDpuHVCEiqadJLwqM3zy+uwf6F1QYQ65A8aOMQg1Uw7LMLNg==", - "license": "ISC", + "node_modules/@noble/curves": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.8.1.tgz", + "integrity": "sha512-warwspo+UYUPep0Q+vtdVB4Ugn8GGQj8iyB3gnRWsztmUHTI3S1nhdiWNsPUGL0vud7JlRRk1XEu7Lq1KGTnMQ==", + "license": "MIT", "dependencies": { - "@metamask/rpc-errors": "^6.2.1", - "@metamask/safe-event-emitter": "^3.0.0", - "@metamask/utils": "^8.3.0" + "@noble/hashes": "1.7.1" }, "engines": { - "node": ">=16.0.0" + "node": "^14.21.3 || >=16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" } }, - "node_modules/@metamask/eth-json-rpc-provider/node_modules/@metamask/json-rpc-engine/node_modules/@metamask/utils": { - "version": "8.5.0", - "resolved": "https://registry.npmjs.org/@metamask/utils/-/utils-8.5.0.tgz", - "integrity": "sha512-I6bkduevXb72TIM9q2LRO63JSsF9EXduh3sBr9oybNX2hNNpr/j1tEjXrsG0Uabm4MJ1xkGAQEMwifvKZIkyxQ==", - "license": "ISC", - "dependencies": { - "@ethereumjs/tx": "^4.2.0", - "@metamask/superstruct": "^3.0.0", - "@noble/hashes": "^1.3.1", - "@scure/base": "^1.1.3", - "@types/debug": "^4.1.7", - "debug": "^4.3.4", - "pony-cause": "^2.1.10", - "semver": "^7.5.4", - "uuid": "^9.0.1" - }, + "node_modules/@noble/hashes": { + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.7.1.tgz", + "integrity": "sha512-B8XBPsn4vT/KJAGqDzbwztd+6Yte3P4V7iafm24bxgDe/mlRuK6xmWPuCNrKt2vDafZ8MfJLlchDG/vYafQEjQ==", + "license": "MIT", "engines": { - "node": ">=16.0.0" + "node": "^14.21.3 || >=16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" } }, - "node_modules/@metamask/eth-json-rpc-provider/node_modules/@metamask/utils": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@metamask/utils/-/utils-5.0.2.tgz", - "integrity": "sha512-yfmE79bRQtnMzarnKfX7AEJBwFTxvTyw3nBQlu/5rmGXrjAeAMltoGxO62TFurxrQAFMNa/fEjIHNvungZp0+g==", - "license": "ISC", + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "license": "MIT", "dependencies": { - "@ethereumjs/tx": "^4.1.2", - "@types/debug": "^4.1.7", - "debug": "^4.3.4", - "semver": "^7.3.8", - "superstruct": "^1.0.3" + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" }, "engines": { - "node": ">=14.0.0" + "node": ">= 8" } }, - "node_modules/@metamask/eth-json-rpc-provider/node_modules/semver": { - "version": "7.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz", - "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==", - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "license": "MIT", "engines": { - "node": ">=10" + "node": ">= 8" } }, - "node_modules/@metamask/eth-json-rpc-provider/node_modules/uuid": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", - "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", - "funding": [ - "https://github.com/sponsors/broofa", - "https://github.com/sponsors/ctavan" - ], + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", "license": "MIT", - "bin": { - "uuid": "dist/bin/uuid" - } - }, - "node_modules/@metamask/json-rpc-engine": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/@metamask/json-rpc-engine/-/json-rpc-engine-8.0.2.tgz", - "integrity": "sha512-IoQPmql8q7ABLruW7i4EYVHWUbF74yrp63bRuXV5Zf9BQwcn5H9Ww1eLtROYvI1bUXwOiHZ6qT5CWTrDc/t/AA==", - "license": "ISC", "dependencies": { - "@metamask/rpc-errors": "^6.2.1", - "@metamask/safe-event-emitter": "^3.0.0", - "@metamask/utils": "^8.3.0" + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" }, "engines": { - "node": ">=16.0.0" + "node": ">= 8" } }, - "node_modules/@metamask/json-rpc-middleware-stream": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@metamask/json-rpc-middleware-stream/-/json-rpc-middleware-stream-7.0.2.tgz", - "integrity": "sha512-yUdzsJK04Ev98Ck4D7lmRNQ8FPioXYhEUZOMS01LXW8qTvPGiRVXmVltj2p4wrLkh0vW7u6nv0mNl5xzC5Qmfg==", - "license": "ISC", + "node_modules/@nrwl/devkit": { + "version": "16.0.0", + "resolved": "https://registry.npmjs.org/@nrwl/devkit/-/devkit-16.0.0.tgz", + "integrity": "sha512-ycd4wD4v1N/ywjU1cwTVCPQJwxnGjEsWIll5z5cMtfHwJf+0OhMTqC3zeZibIwnjjoh721pyEzXODyUmjkGmVw==", + "dev": true, + "license": "MIT", "dependencies": { - "@metamask/json-rpc-engine": "^8.0.2", - "@metamask/safe-event-emitter": "^3.0.0", - "@metamask/utils": "^8.3.0", - "readable-stream": "^3.6.2" - }, - "engines": { - "node": ">=16.0.0" + "@nx/devkit": "16.0.0" } }, - "node_modules/@metamask/object-multiplex": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@metamask/object-multiplex/-/object-multiplex-2.1.0.tgz", - "integrity": "sha512-4vKIiv0DQxljcXwfpnbsXcfa5glMj5Zg9mqn4xpIWqkv6uJ2ma5/GtUfLFSxhlxnR8asRMv8dDmWya1Tc1sDFA==", - "license": "ISC", + "node_modules/@nrwl/eslint-plugin-nx": { + "version": "16.9.1", + "resolved": "https://registry.npmjs.org/@nrwl/eslint-plugin-nx/-/eslint-plugin-nx-16.9.1.tgz", + "integrity": "sha512-G1bHWYgZuuXz51leJgleFltiyVzXpE5jKcApnSMnzbnP0HzeJO9QHruCX+t7bST3SXDV1uVXgovLyqfffCkNNA==", + "dev": true, + "license": "MIT", "dependencies": { - "once": "^1.4.0", - "readable-stream": "^3.6.2" - }, - "engines": { - "node": "^16.20 || ^18.16 || >=20" + "@nx/eslint-plugin": "16.9.1" } }, - "node_modules/@metamask/onboarding": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@metamask/onboarding/-/onboarding-1.0.1.tgz", - "integrity": "sha512-FqHhAsCI+Vacx2qa5mAFcWNSrTcVGMNjzxVgaX8ECSny/BJ9/vgXP9V7WF/8vb9DltPeQkxr+Fnfmm6GHfmdTQ==", + "node_modules/@nrwl/js": { + "version": "16.9.1", + "resolved": "https://registry.npmjs.org/@nrwl/js/-/js-16.9.1.tgz", + "integrity": "sha512-v4EZ5nCmqsSHm5iKDwK2fv8Yg+i2UwGlt3wcbULmuFTAD/F1/VM68yWK2hBQSPCENhua1BAQ2T+VXBtGmZShaQ==", + "dev": true, "license": "MIT", "dependencies": { - "bowser": "^2.9.0" + "@nx/js": "16.9.1" } }, - "node_modules/@metamask/providers": { - "version": "16.1.0", - "resolved": "https://registry.npmjs.org/@metamask/providers/-/providers-16.1.0.tgz", - "integrity": "sha512-znVCvux30+3SaUwcUGaSf+pUckzT5ukPRpcBmy+muBLC0yaWnBcvDqGfcsw6CBIenUdFrVoAFa8B6jsuCY/a+g==", + "node_modules/@nrwl/linter": { + "version": "16.9.1", + "resolved": "https://registry.npmjs.org/@nrwl/linter/-/linter-16.9.1.tgz", + "integrity": "sha512-T8HIKMTYdlW8b/HK2k8ZOFn4MH6LUDC5TfGhbvPL4lM/zbbYPa0YfyqYBan7QoBG0WRqVvgZLIVk7Ho211Uyow==", + "dev": true, "license": "MIT", "dependencies": { - "@metamask/json-rpc-engine": "^8.0.1", - "@metamask/json-rpc-middleware-stream": "^7.0.1", - "@metamask/object-multiplex": "^2.0.0", - "@metamask/rpc-errors": "^6.2.1", - "@metamask/safe-event-emitter": "^3.1.1", - "@metamask/utils": "^8.3.0", - "detect-browser": "^5.2.0", - "extension-port-stream": "^3.0.0", - "fast-deep-equal": "^3.1.3", - "is-stream": "^2.0.0", - "readable-stream": "^3.6.2", - "webextension-polyfill": "^0.10.0" - }, - "engines": { - "node": "^18.18 || >=20" + "@nx/linter": "16.9.1" } }, - "node_modules/@metamask/rpc-errors": { - "version": "6.4.0", - "resolved": "https://registry.npmjs.org/@metamask/rpc-errors/-/rpc-errors-6.4.0.tgz", - "integrity": "sha512-1ugFO1UoirU2esS3juZanS/Fo8C8XYocCuBpfZI5N7ECtoG+zu0wF+uWZASik6CkO6w9n/Iebt4iI4pT0vptpg==", + "node_modules/@nrwl/tao": { + "version": "16.9.1", + "resolved": "https://registry.npmjs.org/@nrwl/tao/-/tao-16.9.1.tgz", + "integrity": "sha512-KsRBRAE5mSP83ZjO9cPW6ZQZWOtkMfCBih/WE9qpaiHn+hCydtYStyAO2QSic4tHVV+8VpPUQWYnpf5rhkNzWg==", + "dev": true, "license": "MIT", "dependencies": { - "@metamask/utils": "^9.0.0", - "fast-safe-stringify": "^2.0.6" + "nx": "16.9.1", + "tslib": "^2.3.0" }, - "engines": { - "node": ">=16.0.0" + "bin": { + "tao": "index.js" } }, - "node_modules/@metamask/rpc-errors/node_modules/@metamask/utils": { - "version": "9.3.0", - "resolved": "https://registry.npmjs.org/@metamask/utils/-/utils-9.3.0.tgz", - "integrity": "sha512-w8CVbdkDrVXFJbfBSlDfafDR6BAkpDmv1bC1UJVCoVny5tW2RKAdn9i68Xf7asYT4TnUhl/hN4zfUiKQq9II4g==", - "license": "ISC", + "node_modules/@nrwl/vite": { + "version": "16.9.1", + "resolved": "https://registry.npmjs.org/@nrwl/vite/-/vite-16.9.1.tgz", + "integrity": "sha512-v7ttx8xIdlfsq4zW0JiyX3hi8btp8B4DlqlXQCTR9RWjEKnLEvRpv28vA50BIAVFk9JDjJhuBdelTKlETZzTew==", + "dev": true, + "license": "MIT", "dependencies": { - "@ethereumjs/tx": "^4.2.0", - "@metamask/superstruct": "^3.1.0", - "@noble/hashes": "^1.3.1", - "@scure/base": "^1.1.3", - "@types/debug": "^4.1.7", - "debug": "^4.3.4", - "pony-cause": "^2.1.10", - "semver": "^7.5.4", - "uuid": "^9.0.1" - }, - "engines": { - "node": ">=16.0.0" + "@nx/vite": "16.9.1" } }, - "node_modules/@metamask/rpc-errors/node_modules/semver": { - "version": "7.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz", - "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==", - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" + "node_modules/@nrwl/workspace": { + "version": "16.9.1", + "resolved": "https://registry.npmjs.org/@nrwl/workspace/-/workspace-16.9.1.tgz", + "integrity": "sha512-jtQmsC1dmM/aUXFHw261tYu7tMqOHw4Sb3NWH4hXoasOn862L4kwkTYWn/MdQ4JTbv9uTf4+cRohP2F6aOj+jA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nx/workspace": "16.9.1" } }, - "node_modules/@metamask/rpc-errors/node_modules/uuid": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", - "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", - "funding": [ - "https://github.com/sponsors/broofa", - "https://github.com/sponsors/ctavan" - ], + "node_modules/@nx/devkit": { + "version": "16.0.0", + "resolved": "https://registry.npmjs.org/@nx/devkit/-/devkit-16.0.0.tgz", + "integrity": "sha512-ooIaAcheEUJ0pRdLv91btVssGL7TLOcvW8EF0yKYAdCNv3HRHtZX7Ompc6NPMauLuHYmp4eeRly3wADa7xBzAg==", + "dev": true, "license": "MIT", - "bin": { - "uuid": "dist/bin/uuid" - } - }, - "node_modules/@metamask/safe-event-emitter": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@metamask/safe-event-emitter/-/safe-event-emitter-3.1.2.tgz", - "integrity": "sha512-5yb2gMI1BDm0JybZezeoX/3XhPDOtTbcFvpTXM9kxsoZjPZFh4XciqRbpD6N86HYZqWDhEaKUDuOyR0sQHEjMA==", - "license": "ISC", - "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/@metamask/sdk": { - "version": "0.32.0", - "resolved": "https://registry.npmjs.org/@metamask/sdk/-/sdk-0.32.0.tgz", - "integrity": "sha512-WmGAlP1oBuD9hk4CsdlG1WJFuPtYJY+dnTHJMeCyohTWD2GgkcLMUUuvu9lO1/NVzuOoSi1OrnjbuY1O/1NZ1g==", "dependencies": { - "@babel/runtime": "^7.26.0", - "@metamask/onboarding": "^1.0.1", - "@metamask/providers": "16.1.0", - "@metamask/sdk-communication-layer": "0.32.0", - "@metamask/sdk-install-modal-web": "0.32.0", - "@paulmillr/qr": "^0.2.1", - "bowser": "^2.9.0", - "cross-fetch": "^4.0.0", - "debug": "^4.3.4", - "eciesjs": "^0.4.11", - "eth-rpc-errors": "^4.0.3", - "eventemitter2": "^6.4.9", - "obj-multiplex": "^1.0.0", - "pump": "^3.0.0", - "readable-stream": "^3.6.2", - "socket.io-client": "^4.5.1", - "tslib": "^2.6.0", - "util": "^0.12.4", - "uuid": "^8.3.2" - } - }, - "node_modules/@metamask/sdk-communication-layer": { - "version": "0.32.0", - "resolved": "https://registry.npmjs.org/@metamask/sdk-communication-layer/-/sdk-communication-layer-0.32.0.tgz", - "integrity": "sha512-dmj/KFjMi1fsdZGIOtbhxdg3amxhKL/A5BqSU4uh/SyDKPub/OT+x5pX8bGjpTL1WPWY/Q0OIlvFyX3VWnT06Q==", - "dependencies": { - "bufferutil": "^4.0.8", - "date-fns": "^2.29.3", - "debug": "^4.3.4", - "utf-8-validate": "^5.0.2", - "uuid": "^8.3.2" + "@nrwl/devkit": "16.0.0", + "ejs": "^3.1.7", + "ignore": "^5.0.4", + "semver": "7.3.4", + "tmp": "~0.2.1", + "tslib": "^2.3.0" }, "peerDependencies": { - "cross-fetch": "^4.0.0", - "eciesjs": "*", - "eventemitter2": "^6.4.9", - "readable-stream": "^3.6.2", - "socket.io-client": "^4.5.1" + "nx": ">= 15 <= 17" } }, - "node_modules/@metamask/sdk-communication-layer/node_modules/uuid": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "node_modules/@nx/eslint-plugin": { + "version": "16.9.1", + "resolved": "https://registry.npmjs.org/@nx/eslint-plugin/-/eslint-plugin-16.9.1.tgz", + "integrity": "sha512-pBZYZRyeM+rxDW3mBXFz4fjXEb43sVLWHcjgMOlSkYQz79NY0YK0sntBxBCVIUNQF/rES8ZEzhfr3a+3fWgptA==", + "dev": true, "license": "MIT", - "bin": { - "uuid": "dist/bin/uuid" - } - }, - "node_modules/@metamask/sdk-install-modal-web": { - "version": "0.32.0", - "resolved": "https://registry.npmjs.org/@metamask/sdk-install-modal-web/-/sdk-install-modal-web-0.32.0.tgz", - "integrity": "sha512-TFoktj0JgfWnQaL3yFkApqNwcaqJ+dw4xcnrJueMP3aXkSNev2Ido+WVNOg4IIMxnmOrfAC9t0UJ0u/dC9MjOQ==", "dependencies": { - "@paulmillr/qr": "^0.2.1" + "@nrwl/eslint-plugin-nx": "16.9.1", + "@nx/devkit": "16.9.1", + "@nx/js": "16.9.1", + "@typescript-eslint/type-utils": "^5.60.1", + "@typescript-eslint/utils": "^5.60.1", + "chalk": "^4.1.0", + "confusing-browser-globals": "^1.0.9", + "jsonc-eslint-parser": "^2.1.0", + "semver": "7.5.3", + "tslib": "^2.3.0" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^5.60.1", + "eslint-config-prettier": "^8.1.0" + }, + "peerDependenciesMeta": { + "eslint-config-prettier": { + "optional": true + } } }, - "node_modules/@metamask/sdk/node_modules/uuid": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "node_modules/@nx/eslint-plugin/node_modules/@nrwl/devkit": { + "version": "16.9.1", + "resolved": "https://registry.npmjs.org/@nrwl/devkit/-/devkit-16.9.1.tgz", + "integrity": "sha512-+iR7tg+LOrGWAGmGv0hr45hYUOeKjK/Jm6WV3Ldmx6I7LaaYM5Fu6Ev2KXL669QMzLJpg3kqgKQsneWbFT3MAw==", + "dev": true, "license": "MIT", - "bin": { - "uuid": "dist/bin/uuid" + "dependencies": { + "@nx/devkit": "16.9.1" } }, - "node_modules/@metamask/superstruct": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@metamask/superstruct/-/superstruct-3.1.0.tgz", - "integrity": "sha512-N08M56HdOgBfRKkrgCMZvQppkZGcArEop3kixNEtVbJKm6P9Cfg0YkI6X0s1g78sNrj2fWUwvJADdZuzJgFttA==", + "node_modules/@nx/eslint-plugin/node_modules/@nx/devkit": { + "version": "16.9.1", + "resolved": "https://registry.npmjs.org/@nx/devkit/-/devkit-16.9.1.tgz", + "integrity": "sha512-jQMLX8pUKsOIk0tLFzJms5awPxKfJEi0uxY7+IUfRNHcnDkOFiv6gf1QqJ3pobmgwBdbC6Nv/dhDP3JT2wA1gA==", + "dev": true, "license": "MIT", - "engines": { - "node": ">=16.0.0" + "dependencies": { + "@nrwl/devkit": "16.9.1", + "ejs": "^3.1.7", + "enquirer": "~2.3.6", + "ignore": "^5.0.4", + "semver": "7.5.3", + "tmp": "~0.2.1", + "tslib": "^2.3.0" + }, + "peerDependencies": { + "nx": ">= 15 <= 17" } }, - "node_modules/@metamask/utils": { - "version": "8.5.0", - "resolved": "https://registry.npmjs.org/@metamask/utils/-/utils-8.5.0.tgz", - "integrity": "sha512-I6bkduevXb72TIM9q2LRO63JSsF9EXduh3sBr9oybNX2hNNpr/j1tEjXrsG0Uabm4MJ1xkGAQEMwifvKZIkyxQ==", + "node_modules/@nx/eslint-plugin/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, "license": "ISC", "dependencies": { - "@ethereumjs/tx": "^4.2.0", - "@metamask/superstruct": "^3.0.0", - "@noble/hashes": "^1.3.1", - "@scure/base": "^1.1.3", - "@types/debug": "^4.1.7", - "debug": "^4.3.4", - "pony-cause": "^2.1.10", - "semver": "^7.5.4", - "uuid": "^9.0.1" + "yallist": "^4.0.0" }, "engines": { - "node": ">=16.0.0" + "node": ">=10" } }, - "node_modules/@metamask/utils/node_modules/semver": { - "version": "7.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz", - "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==", + "node_modules/@nx/eslint-plugin/node_modules/semver": { + "version": "7.5.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.3.tgz", + "integrity": "sha512-QBlUtyVk/5EeHbi7X0fw6liDZc7BBmEaSYn01fMU1OUYbf6GPsbTtd8WmnqbI20SeycoHSeiybkE/q1Q+qlThQ==", + "dev": true, "license": "ISC", + "dependencies": { + "lru-cache": "^6.0.0" + }, "bin": { "semver": "bin/semver.js" }, @@ -2969,322 +2763,405 @@ "node": ">=10" } }, - "node_modules/@metamask/utils/node_modules/uuid": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", - "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", - "funding": [ - "https://github.com/sponsors/broofa", - "https://github.com/sponsors/ctavan" - ], - "license": "MIT", - "bin": { - "uuid": "dist/bin/uuid" - } + "node_modules/@nx/eslint-plugin/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true, + "license": "ISC" }, - "node_modules/@mole-inc/bin-wrapper": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/@mole-inc/bin-wrapper/-/bin-wrapper-8.0.1.tgz", - "integrity": "sha512-sTGoeZnjI8N4KS+sW2AN95gDBErhAguvkw/tWdCjeM8bvxpz5lqrnd0vOJABA1A+Ic3zED7PYoLP/RANLgVotA==", + "node_modules/@nx/js": { + "version": "16.9.1", + "resolved": "https://registry.npmjs.org/@nx/js/-/js-16.9.1.tgz", + "integrity": "sha512-gUs1GoFtQ4OkJhgQmOkgY9bEZd3aWZwi1OsZHiDxQ7NQzNzP438ZibiZua/YCrzd0lmdwU9YPHfG9tXyoAZKuA==", "dev": true, "license": "MIT", "dependencies": { - "bin-check": "^4.1.0", - "bin-version-check": "^5.0.0", - "content-disposition": "^0.5.4", - "ext-name": "^5.0.0", - "file-type": "^17.1.6", - "filenamify": "^5.0.2", - "got": "^11.8.5", - "os-filter-obj": "^2.0.0" + "@babel/core": "^7.22.9", + "@babel/plugin-proposal-class-properties": "^7.18.6", + "@babel/plugin-proposal-decorators": "^7.22.7", + "@babel/plugin-transform-runtime": "^7.22.9", + "@babel/preset-env": "^7.22.9", + "@babel/preset-typescript": "^7.22.5", + "@babel/runtime": "^7.22.6", + "@nrwl/js": "16.9.1", + "@nx/devkit": "16.9.1", + "@nx/workspace": "16.9.1", + "@phenomnomnominal/tsquery": "~5.0.1", + "babel-plugin-const-enum": "^1.0.1", + "babel-plugin-macros": "^2.8.0", + "babel-plugin-transform-typescript-metadata": "^0.3.1", + "chalk": "^4.1.0", + "columnify": "^1.6.0", + "detect-port": "^1.5.1", + "fast-glob": "3.2.7", + "fs-extra": "^11.1.0", + "ignore": "^5.0.4", + "js-tokens": "^4.0.0", + "minimatch": "3.0.5", + "npm-package-arg": "11.0.1", + "npm-run-path": "^4.0.1", + "ora": "5.3.0", + "semver": "7.5.3", + "source-map-support": "0.5.19", + "ts-node": "10.9.1", + "tsconfig-paths": "^4.1.2", + "tslib": "^2.3.0" }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + "peerDependencies": { + "verdaccio": "^5.0.4" + }, + "peerDependenciesMeta": { + "verdaccio": { + "optional": true + } } }, - "node_modules/@motionone/animation": { - "version": "10.18.0", - "resolved": "https://registry.npmjs.org/@motionone/animation/-/animation-10.18.0.tgz", - "integrity": "sha512-9z2p5GFGCm0gBsZbi8rVMOAJCtw1WqBTIPw3ozk06gDvZInBPIsQcHgYogEJ4yuHJ+akuW8g1SEIOpTOvYs8hw==", + "node_modules/@nx/js/node_modules/@nrwl/devkit": { + "version": "16.9.1", + "resolved": "https://registry.npmjs.org/@nrwl/devkit/-/devkit-16.9.1.tgz", + "integrity": "sha512-+iR7tg+LOrGWAGmGv0hr45hYUOeKjK/Jm6WV3Ldmx6I7LaaYM5Fu6Ev2KXL669QMzLJpg3kqgKQsneWbFT3MAw==", + "dev": true, "license": "MIT", "dependencies": { - "@motionone/easing": "^10.18.0", - "@motionone/types": "^10.17.1", - "@motionone/utils": "^10.18.0", - "tslib": "^2.3.1" + "@nx/devkit": "16.9.1" } }, - "node_modules/@motionone/dom": { - "version": "10.18.0", - "resolved": "https://registry.npmjs.org/@motionone/dom/-/dom-10.18.0.tgz", - "integrity": "sha512-bKLP7E0eyO4B2UaHBBN55tnppwRnaE3KFfh3Ps9HhnAkar3Cb69kUCJY9as8LrccVYKgHA+JY5dOQqJLOPhF5A==", + "node_modules/@nx/js/node_modules/@nx/devkit": { + "version": "16.9.1", + "resolved": "https://registry.npmjs.org/@nx/devkit/-/devkit-16.9.1.tgz", + "integrity": "sha512-jQMLX8pUKsOIk0tLFzJms5awPxKfJEi0uxY7+IUfRNHcnDkOFiv6gf1QqJ3pobmgwBdbC6Nv/dhDP3JT2wA1gA==", + "dev": true, "license": "MIT", "dependencies": { - "@motionone/animation": "^10.18.0", - "@motionone/generators": "^10.18.0", - "@motionone/types": "^10.17.1", - "@motionone/utils": "^10.18.0", - "hey-listen": "^1.0.8", - "tslib": "^2.3.1" + "@nrwl/devkit": "16.9.1", + "ejs": "^3.1.7", + "enquirer": "~2.3.6", + "ignore": "^5.0.4", + "semver": "7.5.3", + "tmp": "~0.2.1", + "tslib": "^2.3.0" + }, + "peerDependencies": { + "nx": ">= 15 <= 17" } }, - "node_modules/@motionone/easing": { - "version": "10.18.0", - "resolved": "https://registry.npmjs.org/@motionone/easing/-/easing-10.18.0.tgz", - "integrity": "sha512-VcjByo7XpdLS4o9T8t99JtgxkdMcNWD3yHU/n6CLEz3bkmKDRZyYQ/wmSf6daum8ZXqfUAgFeCZSpJZIMxaCzg==", - "license": "MIT", + "node_modules/@nx/js/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "license": "ISC", "dependencies": { - "@motionone/utils": "^10.18.0", - "tslib": "^2.3.1" + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" } }, - "node_modules/@motionone/generators": { - "version": "10.18.0", - "resolved": "https://registry.npmjs.org/@motionone/generators/-/generators-10.18.0.tgz", - "integrity": "sha512-+qfkC2DtkDj4tHPu+AFKVfR/C30O1vYdvsGYaR13W/1cczPrrcjdvYCj0VLFuRMN+lP1xvpNZHCRNM4fBzn1jg==", - "license": "MIT", + "node_modules/@nx/js/node_modules/semver": { + "version": "7.5.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.3.tgz", + "integrity": "sha512-QBlUtyVk/5EeHbi7X0fw6liDZc7BBmEaSYn01fMU1OUYbf6GPsbTtd8WmnqbI20SeycoHSeiybkE/q1Q+qlThQ==", + "dev": true, + "license": "ISC", "dependencies": { - "@motionone/types": "^10.17.1", - "@motionone/utils": "^10.18.0", - "tslib": "^2.3.1" + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" } }, - "node_modules/@motionone/svelte": { - "version": "10.16.4", - "resolved": "https://registry.npmjs.org/@motionone/svelte/-/svelte-10.16.4.tgz", - "integrity": "sha512-zRVqk20lD1xqe+yEDZhMYgftsuHc25+9JSo+r0a0OWUJFocjSV9D/+UGhX4xgJsuwB9acPzXLr20w40VnY2PQA==", + "node_modules/@nx/js/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true, + "license": "ISC" + }, + "node_modules/@nx/linter": { + "version": "16.9.1", + "resolved": "https://registry.npmjs.org/@nx/linter/-/linter-16.9.1.tgz", + "integrity": "sha512-UZ7cMNIt4Zu/LHRPwsfUkX+cgxbv9bpzn3f9+mf4a88nA80QdPnBaroZajHzyUK+8fsHWnzlwLMBE5iqrAfbNQ==", + "dev": true, "license": "MIT", "dependencies": { - "@motionone/dom": "^10.16.4", - "tslib": "^2.3.1" + "@nrwl/linter": "16.9.1", + "@nx/devkit": "16.9.1", + "@nx/js": "16.9.1", + "@phenomnomnominal/tsquery": "~5.0.1", + "tmp": "~0.2.1", + "tslib": "^2.3.0", + "typescript": "~5.1.3" + }, + "peerDependencies": { + "eslint": "^8.0.0" + }, + "peerDependenciesMeta": { + "eslint": { + "optional": true + } } }, - "node_modules/@motionone/types": { - "version": "10.17.1", - "resolved": "https://registry.npmjs.org/@motionone/types/-/types-10.17.1.tgz", - "integrity": "sha512-KaC4kgiODDz8hswCrS0btrVrzyU2CSQKO7Ps90ibBVSQmjkrt2teqta6/sOG59v7+dPnKMAg13jyqtMKV2yJ7A==", - "license": "MIT" - }, - "node_modules/@motionone/utils": { - "version": "10.18.0", - "resolved": "https://registry.npmjs.org/@motionone/utils/-/utils-10.18.0.tgz", - "integrity": "sha512-3XVF7sgyTSI2KWvTf6uLlBJ5iAgRgmvp3bpuOiQJvInd4nZ19ET8lX5unn30SlmRH7hXbBbH+Gxd0m0klJ3Xtw==", + "node_modules/@nx/linter/node_modules/@nrwl/devkit": { + "version": "16.9.1", + "resolved": "https://registry.npmjs.org/@nrwl/devkit/-/devkit-16.9.1.tgz", + "integrity": "sha512-+iR7tg+LOrGWAGmGv0hr45hYUOeKjK/Jm6WV3Ldmx6I7LaaYM5Fu6Ev2KXL669QMzLJpg3kqgKQsneWbFT3MAw==", + "dev": true, "license": "MIT", "dependencies": { - "@motionone/types": "^10.17.1", - "hey-listen": "^1.0.8", - "tslib": "^2.3.1" + "@nx/devkit": "16.9.1" } }, - "node_modules/@motionone/vue": { - "version": "10.16.4", - "resolved": "https://registry.npmjs.org/@motionone/vue/-/vue-10.16.4.tgz", - "integrity": "sha512-z10PF9JV6SbjFq+/rYabM+8CVlMokgl8RFGvieSGNTmrkQanfHn+15XBrhG3BgUfvmTeSeyShfOHpG0i9zEdcg==", - "deprecated": "Motion One for Vue is deprecated. Use Oku Motion instead https://oku-ui.com/motion", + "node_modules/@nx/linter/node_modules/@nx/devkit": { + "version": "16.9.1", + "resolved": "https://registry.npmjs.org/@nx/devkit/-/devkit-16.9.1.tgz", + "integrity": "sha512-jQMLX8pUKsOIk0tLFzJms5awPxKfJEi0uxY7+IUfRNHcnDkOFiv6gf1QqJ3pobmgwBdbC6Nv/dhDP3JT2wA1gA==", + "dev": true, "license": "MIT", "dependencies": { - "@motionone/dom": "^10.16.4", - "tslib": "^2.3.1" - } - }, - "node_modules/@noble/ciphers": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@noble/ciphers/-/ciphers-1.2.1.tgz", - "integrity": "sha512-rONPWMC7PeExE077uLE4oqWrZ1IvAfz3oH9LibVAcVCopJiA9R62uavnbEzdkVmJYI6M6Zgkbeb07+tWjlq2XA==", - "license": "MIT", - "engines": { - "node": "^14.21.3 || >=16" + "@nrwl/devkit": "16.9.1", + "ejs": "^3.1.7", + "enquirer": "~2.3.6", + "ignore": "^5.0.4", + "semver": "7.5.3", + "tmp": "~0.2.1", + "tslib": "^2.3.0" }, - "funding": { - "url": "https://paulmillr.com/funding/" + "peerDependencies": { + "nx": ">= 15 <= 17" } }, - "node_modules/@noble/curves": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.8.1.tgz", - "integrity": "sha512-warwspo+UYUPep0Q+vtdVB4Ugn8GGQj8iyB3gnRWsztmUHTI3S1nhdiWNsPUGL0vud7JlRRk1XEu7Lq1KGTnMQ==", - "license": "MIT", + "node_modules/@nx/linter/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "license": "ISC", "dependencies": { - "@noble/hashes": "1.7.1" + "yallist": "^4.0.0" }, "engines": { - "node": "^14.21.3 || >=16" - }, - "funding": { - "url": "https://paulmillr.com/funding/" + "node": ">=10" } }, - "node_modules/@noble/hashes": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.7.1.tgz", - "integrity": "sha512-B8XBPsn4vT/KJAGqDzbwztd+6Yte3P4V7iafm24bxgDe/mlRuK6xmWPuCNrKt2vDafZ8MfJLlchDG/vYafQEjQ==", - "license": "MIT", - "engines": { - "node": "^14.21.3 || >=16" + "node_modules/@nx/linter/node_modules/semver": { + "version": "7.5.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.3.tgz", + "integrity": "sha512-QBlUtyVk/5EeHbi7X0fw6liDZc7BBmEaSYn01fMU1OUYbf6GPsbTtd8WmnqbI20SeycoHSeiybkE/q1Q+qlThQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "lru-cache": "^6.0.0" }, - "funding": { - "url": "https://paulmillr.com/funding/" + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" } }, - "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==", + "node_modules/@nx/linter/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true, + "license": "ISC" + }, + "node_modules/@nx/nx-darwin-arm64": { + "version": "16.9.1", + "resolved": "https://registry.npmjs.org/@nx/nx-darwin-arm64/-/nx-darwin-arm64-16.9.1.tgz", + "integrity": "sha512-JWGrPxxt3XjgIYzvnaNAeNmK24wyF6yEE1bV+wnnKzd7yavVps3c2TOVE/AT4sgvdVj3xFzztyixYGV58tCYrg==", + "cpu": [ + "arm64" + ], "dev": true, "license": "MIT", - "dependencies": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - }, + "optional": true, + "os": [ + "darwin" + ], "engines": { - "node": ">= 8" + "node": ">= 10" } }, - "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==", + "node_modules/@nx/nx-darwin-x64": { + "version": "16.9.1", + "resolved": "https://registry.npmjs.org/@nx/nx-darwin-x64/-/nx-darwin-x64-16.9.1.tgz", + "integrity": "sha512-b1Hw1AmKrR+Kp361WTiKC1RFoQwERyW9R/9XJGNIdgtr+V2wa775eCEdxB9r9mwCqyEmM9iVadpRHPaFSAfQfQ==", + "cpu": [ + "x64" + ], "dev": true, "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], "engines": { - "node": ">= 8" + "node": ">= 10" } }, - "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==", + "node_modules/@nx/nx-freebsd-x64": { + "version": "16.9.1", + "resolved": "https://registry.npmjs.org/@nx/nx-freebsd-x64/-/nx-freebsd-x64-16.9.1.tgz", + "integrity": "sha512-jscl/Xu86tLQYbC8b1wy9FjEgGyuLpYnvP9d+34AHDi6CbCNSodbv93xFDlfYcLOeOD/mJXqR1Ru/1MF86OB5A==", + "cpu": [ + "x64" + ], "dev": true, "license": "MIT", - "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - }, + "optional": true, + "os": [ + "freebsd" + ], "engines": { - "node": ">= 8" + "node": ">= 10" } }, - "node_modules/@nrwl/devkit": { - "version": "16.0.0", - "resolved": "https://registry.npmjs.org/@nrwl/devkit/-/devkit-16.0.0.tgz", - "integrity": "sha512-ycd4wD4v1N/ywjU1cwTVCPQJwxnGjEsWIll5z5cMtfHwJf+0OhMTqC3zeZibIwnjjoh721pyEzXODyUmjkGmVw==", + "node_modules/@nx/nx-linux-arm-gnueabihf": { + "version": "16.9.1", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm-gnueabihf/-/nx-linux-arm-gnueabihf-16.9.1.tgz", + "integrity": "sha512-NMAyxjYv9y4LwzU76htcPWfdmRoN/ZziTNKT3jaMbn38x4e7DoXYs9GGh267z45yWHscQWoV0v+X39LmB819aQ==", + "cpu": [ + "arm" + ], "dev": true, "license": "MIT", - "dependencies": { - "@nx/devkit": "16.0.0" + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" } }, - "node_modules/@nrwl/eslint-plugin-nx": { + "node_modules/@nx/nx-linux-arm64-gnu": { "version": "16.9.1", - "resolved": "https://registry.npmjs.org/@nrwl/eslint-plugin-nx/-/eslint-plugin-nx-16.9.1.tgz", - "integrity": "sha512-G1bHWYgZuuXz51leJgleFltiyVzXpE5jKcApnSMnzbnP0HzeJO9QHruCX+t7bST3SXDV1uVXgovLyqfffCkNNA==", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm64-gnu/-/nx-linux-arm64-gnu-16.9.1.tgz", + "integrity": "sha512-A5UbK5rFhqzs3kMiEKA+xr3LAJsQBA97VDyMH6WPraSl+XRIt4EePx0MyEqo1pnEgeuoOCvR1tjDot5E7ldInw==", + "cpu": [ + "arm64" + ], "dev": true, "license": "MIT", - "dependencies": { - "@nx/eslint-plugin": "16.9.1" + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" } }, - "node_modules/@nrwl/js": { + "node_modules/@nx/nx-linux-arm64-musl": { "version": "16.9.1", - "resolved": "https://registry.npmjs.org/@nrwl/js/-/js-16.9.1.tgz", - "integrity": "sha512-v4EZ5nCmqsSHm5iKDwK2fv8Yg+i2UwGlt3wcbULmuFTAD/F1/VM68yWK2hBQSPCENhua1BAQ2T+VXBtGmZShaQ==", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm64-musl/-/nx-linux-arm64-musl-16.9.1.tgz", + "integrity": "sha512-eIn5PnKH7Y/u1LuanAM0wPNdcb9Z7seDjQzQ0hFMCCvV75Z8A02ztbiueLGaEsDLx35MPBdBmuyo4hsmvmLgpg==", + "cpu": [ + "arm64" + ], "dev": true, "license": "MIT", - "dependencies": { - "@nx/js": "16.9.1" + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" } }, - "node_modules/@nrwl/linter": { + "node_modules/@nx/nx-linux-x64-gnu": { "version": "16.9.1", - "resolved": "https://registry.npmjs.org/@nrwl/linter/-/linter-16.9.1.tgz", - "integrity": "sha512-T8HIKMTYdlW8b/HK2k8ZOFn4MH6LUDC5TfGhbvPL4lM/zbbYPa0YfyqYBan7QoBG0WRqVvgZLIVk7Ho211Uyow==", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-x64-gnu/-/nx-linux-x64-gnu-16.9.1.tgz", + "integrity": "sha512-MMvhoS1pZjyIjwfeZNH2dDZuVF2xxURLTXC4UmmpY/wOWCuXhvD7QUv5A5QShxfaVXmXceo/fGLK+/Qm5e2+7g==", + "cpu": [ + "x64" + ], "dev": true, "license": "MIT", - "dependencies": { - "@nx/linter": "16.9.1" + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" } }, - "node_modules/@nrwl/tao": { + "node_modules/@nx/nx-linux-x64-musl": { "version": "16.9.1", - "resolved": "https://registry.npmjs.org/@nrwl/tao/-/tao-16.9.1.tgz", - "integrity": "sha512-KsRBRAE5mSP83ZjO9cPW6ZQZWOtkMfCBih/WE9qpaiHn+hCydtYStyAO2QSic4tHVV+8VpPUQWYnpf5rhkNzWg==", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-x64-musl/-/nx-linux-x64-musl-16.9.1.tgz", + "integrity": "sha512-ca0d00YCHo0+OIT80MZdtseJj9wTlWMucmdm0OCXLf/l+Dma4MO4LR09WMH2VIpjoz4Gj7+xP0QtKtH4fWFD8Q==", + "cpu": [ + "x64" + ], "dev": true, "license": "MIT", - "dependencies": { - "nx": "16.9.1", - "tslib": "^2.3.0" - }, - "bin": { - "tao": "index.js" + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" } }, - "node_modules/@nrwl/vite": { + "node_modules/@nx/nx-win32-arm64-msvc": { "version": "16.9.1", - "resolved": "https://registry.npmjs.org/@nrwl/vite/-/vite-16.9.1.tgz", - "integrity": "sha512-v7ttx8xIdlfsq4zW0JiyX3hi8btp8B4DlqlXQCTR9RWjEKnLEvRpv28vA50BIAVFk9JDjJhuBdelTKlETZzTew==", + "resolved": "https://registry.npmjs.org/@nx/nx-win32-arm64-msvc/-/nx-win32-arm64-msvc-16.9.1.tgz", + "integrity": "sha512-UIDAWH6/LfouFaXLJWyZKggzH/698lSrLkEE1fa9VrrGEOhumk7MPAVQc/XxgkWgPDDR1TJl0ij+J1bOREn73Q==", + "cpu": [ + "arm64" + ], "dev": true, "license": "MIT", - "dependencies": { - "@nx/vite": "16.9.1" + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" } }, - "node_modules/@nrwl/workspace": { + "node_modules/@nx/nx-win32-x64-msvc": { "version": "16.9.1", - "resolved": "https://registry.npmjs.org/@nrwl/workspace/-/workspace-16.9.1.tgz", - "integrity": "sha512-jtQmsC1dmM/aUXFHw261tYu7tMqOHw4Sb3NWH4hXoasOn862L4kwkTYWn/MdQ4JTbv9uTf4+cRohP2F6aOj+jA==", + "resolved": "https://registry.npmjs.org/@nx/nx-win32-x64-msvc/-/nx-win32-x64-msvc-16.9.1.tgz", + "integrity": "sha512-isnElU5RaQEGPAJhx6VNY0P/avD79s146kmZOn1Ff5fAjReqR7kRxSWXQOdIqc6nPH9Y0c9wNwEAuhBJoor+Mw==", + "cpu": [ + "x64" + ], "dev": true, "license": "MIT", - "dependencies": { - "@nx/workspace": "16.9.1" + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" } }, - "node_modules/@nx/devkit": { - "version": "16.0.0", - "resolved": "https://registry.npmjs.org/@nx/devkit/-/devkit-16.0.0.tgz", - "integrity": "sha512-ooIaAcheEUJ0pRdLv91btVssGL7TLOcvW8EF0yKYAdCNv3HRHtZX7Ompc6NPMauLuHYmp4eeRly3wADa7xBzAg==", + "node_modules/@nx/vite": { + "version": "16.9.1", + "resolved": "https://registry.npmjs.org/@nx/vite/-/vite-16.9.1.tgz", + "integrity": "sha512-+AlUq3XIefGE49KFAcXDO9P0rWGCouQrmTyZCD3O7q4Ym8CHpKc1cIRhrkRLV341Z7cLv0JXGIl7Bv5vLnnkEQ==", "dev": true, "license": "MIT", "dependencies": { - "@nrwl/devkit": "16.0.0", - "ejs": "^3.1.7", - "ignore": "^5.0.4", - "semver": "7.3.4", - "tmp": "~0.2.1", - "tslib": "^2.3.0" - }, - "peerDependencies": { - "nx": ">= 15 <= 17" - } - }, - "node_modules/@nx/eslint-plugin": { - "version": "16.9.1", - "resolved": "https://registry.npmjs.org/@nx/eslint-plugin/-/eslint-plugin-16.9.1.tgz", - "integrity": "sha512-pBZYZRyeM+rxDW3mBXFz4fjXEb43sVLWHcjgMOlSkYQz79NY0YK0sntBxBCVIUNQF/rES8ZEzhfr3a+3fWgptA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@nrwl/eslint-plugin-nx": "16.9.1", + "@nrwl/vite": "16.9.1", "@nx/devkit": "16.9.1", "@nx/js": "16.9.1", - "@typescript-eslint/type-utils": "^5.60.1", - "@typescript-eslint/utils": "^5.60.1", - "chalk": "^4.1.0", - "confusing-browser-globals": "^1.0.9", - "jsonc-eslint-parser": "^2.1.0", - "semver": "7.5.3", - "tslib": "^2.3.0" + "@phenomnomnominal/tsquery": "~5.0.1", + "@swc/helpers": "~0.5.0", + "enquirer": "~2.3.6", + "tsconfig-paths": "^4.1.2" }, "peerDependencies": { - "@typescript-eslint/parser": "^5.60.1", - "eslint-config-prettier": "^8.1.0" - }, - "peerDependenciesMeta": { - "eslint-config-prettier": { - "optional": true - } + "vite": "^4.3.4", + "vitest": ">=0.31.0 <1.0.0" } }, - "node_modules/@nx/eslint-plugin/node_modules/@nrwl/devkit": { + "node_modules/@nx/vite/node_modules/@nrwl/devkit": { "version": "16.9.1", "resolved": "https://registry.npmjs.org/@nrwl/devkit/-/devkit-16.9.1.tgz", "integrity": "sha512-+iR7tg+LOrGWAGmGv0hr45hYUOeKjK/Jm6WV3Ldmx6I7LaaYM5Fu6Ev2KXL669QMzLJpg3kqgKQsneWbFT3MAw==", @@ -3294,7 +3171,7 @@ "@nx/devkit": "16.9.1" } }, - "node_modules/@nx/eslint-plugin/node_modules/@nx/devkit": { + "node_modules/@nx/vite/node_modules/@nx/devkit": { "version": "16.9.1", "resolved": "https://registry.npmjs.org/@nx/devkit/-/devkit-16.9.1.tgz", "integrity": "sha512-jQMLX8pUKsOIk0tLFzJms5awPxKfJEi0uxY7+IUfRNHcnDkOFiv6gf1QqJ3pobmgwBdbC6Nv/dhDP3JT2wA1gA==", @@ -3313,7 +3190,7 @@ "nx": ">= 15 <= 17" } }, - "node_modules/@nx/eslint-plugin/node_modules/lru-cache": { + "node_modules/@nx/vite/node_modules/lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", @@ -3326,7 +3203,7 @@ "node": ">=10" } }, - "node_modules/@nx/eslint-plugin/node_modules/semver": { + "node_modules/@nx/vite/node_modules/semver": { "version": "7.5.3", "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.3.tgz", "integrity": "sha512-QBlUtyVk/5EeHbi7X0fw6liDZc7BBmEaSYn01fMU1OUYbf6GPsbTtd8WmnqbI20SeycoHSeiybkE/q1Q+qlThQ==", @@ -3342,61 +3219,32 @@ "node": ">=10" } }, - "node_modules/@nx/eslint-plugin/node_modules/yallist": { + "node_modules/@nx/vite/node_modules/yallist": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true, "license": "ISC" }, - "node_modules/@nx/js": { + "node_modules/@nx/workspace": { "version": "16.9.1", - "resolved": "https://registry.npmjs.org/@nx/js/-/js-16.9.1.tgz", - "integrity": "sha512-gUs1GoFtQ4OkJhgQmOkgY9bEZd3aWZwi1OsZHiDxQ7NQzNzP438ZibiZua/YCrzd0lmdwU9YPHfG9tXyoAZKuA==", + "resolved": "https://registry.npmjs.org/@nx/workspace/-/workspace-16.9.1.tgz", + "integrity": "sha512-cLTcViSwHZ6M0+YuuKOFrvSaObQVZRAlxa/rvxyZD0xcQGXVY7lWZ1IzkVJueBtSoiBVfjXETXo3KX+qZcfB8A==", "dev": true, "license": "MIT", "dependencies": { - "@babel/core": "^7.22.9", - "@babel/plugin-proposal-class-properties": "^7.18.6", - "@babel/plugin-proposal-decorators": "^7.22.7", - "@babel/plugin-transform-runtime": "^7.22.9", - "@babel/preset-env": "^7.22.9", - "@babel/preset-typescript": "^7.22.5", - "@babel/runtime": "^7.22.6", - "@nrwl/js": "16.9.1", + "@nrwl/workspace": "16.9.1", "@nx/devkit": "16.9.1", - "@nx/workspace": "16.9.1", - "@phenomnomnominal/tsquery": "~5.0.1", - "babel-plugin-const-enum": "^1.0.1", - "babel-plugin-macros": "^2.8.0", - "babel-plugin-transform-typescript-metadata": "^0.3.1", "chalk": "^4.1.0", - "columnify": "^1.6.0", - "detect-port": "^1.5.1", - "fast-glob": "3.2.7", - "fs-extra": "^11.1.0", + "enquirer": "~2.3.6", "ignore": "^5.0.4", - "js-tokens": "^4.0.0", - "minimatch": "3.0.5", - "npm-package-arg": "11.0.1", - "npm-run-path": "^4.0.1", - "ora": "5.3.0", - "semver": "7.5.3", - "source-map-support": "0.5.19", - "ts-node": "10.9.1", - "tsconfig-paths": "^4.1.2", - "tslib": "^2.3.0" - }, - "peerDependencies": { - "verdaccio": "^5.0.4" - }, - "peerDependenciesMeta": { - "verdaccio": { - "optional": true - } + "nx": "16.9.1", + "rxjs": "^7.8.0", + "tslib": "^2.3.0", + "yargs-parser": "21.1.1" } }, - "node_modules/@nx/js/node_modules/@nrwl/devkit": { + "node_modules/@nx/workspace/node_modules/@nrwl/devkit": { "version": "16.9.1", "resolved": "https://registry.npmjs.org/@nrwl/devkit/-/devkit-16.9.1.tgz", "integrity": "sha512-+iR7tg+LOrGWAGmGv0hr45hYUOeKjK/Jm6WV3Ldmx6I7LaaYM5Fu6Ev2KXL669QMzLJpg3kqgKQsneWbFT3MAw==", @@ -3406,7 +3254,7 @@ "@nx/devkit": "16.9.1" } }, - "node_modules/@nx/js/node_modules/@nx/devkit": { + "node_modules/@nx/workspace/node_modules/@nx/devkit": { "version": "16.9.1", "resolved": "https://registry.npmjs.org/@nx/devkit/-/devkit-16.9.1.tgz", "integrity": "sha512-jQMLX8pUKsOIk0tLFzJms5awPxKfJEi0uxY7+IUfRNHcnDkOFiv6gf1QqJ3pobmgwBdbC6Nv/dhDP3JT2wA1gA==", @@ -3425,7 +3273,7 @@ "nx": ">= 15 <= 17" } }, - "node_modules/@nx/js/node_modules/lru-cache": { + "node_modules/@nx/workspace/node_modules/lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", @@ -3438,7 +3286,7 @@ "node": ">=10" } }, - "node_modules/@nx/js/node_modules/semver": { + "node_modules/@nx/workspace/node_modules/semver": { "version": "7.5.3", "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.3.tgz", "integrity": "sha512-QBlUtyVk/5EeHbi7X0fw6liDZc7BBmEaSYn01fMU1OUYbf6GPsbTtd8WmnqbI20SeycoHSeiybkE/q1Q+qlThQ==", @@ -3454,839 +3302,656 @@ "node": ">=10" } }, - "node_modules/@nx/js/node_modules/yallist": { + "node_modules/@nx/workspace/node_modules/yallist": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true, "license": "ISC" }, - "node_modules/@nx/linter": { - "version": "16.9.1", - "resolved": "https://registry.npmjs.org/@nx/linter/-/linter-16.9.1.tgz", - "integrity": "sha512-UZ7cMNIt4Zu/LHRPwsfUkX+cgxbv9bpzn3f9+mf4a88nA80QdPnBaroZajHzyUK+8fsHWnzlwLMBE5iqrAfbNQ==", + "node_modules/@octokit/auth-token": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-3.0.4.tgz", + "integrity": "sha512-TWFX7cZF2LXoCvdmJWY7XVPi74aSY0+FfBZNSXEXFkMpjcqsQwDSYVv5FhRFaI0V1ECnwbz4j59T/G+rXNWaIQ==", "dev": true, "license": "MIT", - "dependencies": { - "@nrwl/linter": "16.9.1", - "@nx/devkit": "16.9.1", - "@nx/js": "16.9.1", - "@phenomnomnominal/tsquery": "~5.0.1", - "tmp": "~0.2.1", - "tslib": "^2.3.0", - "typescript": "~5.1.3" - }, - "peerDependencies": { - "eslint": "^8.0.0" - }, - "peerDependenciesMeta": { - "eslint": { - "optional": true - } + "engines": { + "node": ">= 14" } }, - "node_modules/@nx/linter/node_modules/@nrwl/devkit": { - "version": "16.9.1", - "resolved": "https://registry.npmjs.org/@nrwl/devkit/-/devkit-16.9.1.tgz", - "integrity": "sha512-+iR7tg+LOrGWAGmGv0hr45hYUOeKjK/Jm6WV3Ldmx6I7LaaYM5Fu6Ev2KXL669QMzLJpg3kqgKQsneWbFT3MAw==", + "node_modules/@octokit/core": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/@octokit/core/-/core-4.2.4.tgz", + "integrity": "sha512-rYKilwgzQ7/imScn3M9/pFfUf4I1AZEH3KhyJmtPdE2zfaXAn2mFfUy4FbKewzc2We5y/LlKLj36fWJLKC2SIQ==", "dev": true, "license": "MIT", "dependencies": { - "@nx/devkit": "16.9.1" + "@octokit/auth-token": "^3.0.0", + "@octokit/graphql": "^5.0.0", + "@octokit/request": "^6.0.0", + "@octokit/request-error": "^3.0.0", + "@octokit/types": "^9.0.0", + "before-after-hook": "^2.2.0", + "universal-user-agent": "^6.0.0" + }, + "engines": { + "node": ">= 14" } }, - "node_modules/@nx/linter/node_modules/@nx/devkit": { - "version": "16.9.1", - "resolved": "https://registry.npmjs.org/@nx/devkit/-/devkit-16.9.1.tgz", - "integrity": "sha512-jQMLX8pUKsOIk0tLFzJms5awPxKfJEi0uxY7+IUfRNHcnDkOFiv6gf1QqJ3pobmgwBdbC6Nv/dhDP3JT2wA1gA==", + "node_modules/@octokit/endpoint": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-7.0.6.tgz", + "integrity": "sha512-5L4fseVRUsDFGR00tMWD/Trdeeihn999rTMGRMC1G/Ldi1uWlWJzI98H4Iak5DB/RVvQuyMYKqSK/R6mbSOQyg==", "dev": true, "license": "MIT", "dependencies": { - "@nrwl/devkit": "16.9.1", - "ejs": "^3.1.7", - "enquirer": "~2.3.6", - "ignore": "^5.0.4", - "semver": "7.5.3", - "tmp": "~0.2.1", - "tslib": "^2.3.0" + "@octokit/types": "^9.0.0", + "is-plain-object": "^5.0.0", + "universal-user-agent": "^6.0.0" }, - "peerDependencies": { - "nx": ">= 15 <= 17" + "engines": { + "node": ">= 14" } }, - "node_modules/@nx/linter/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "node_modules/@octokit/graphql": { + "version": "5.0.6", + "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-5.0.6.tgz", + "integrity": "sha512-Fxyxdy/JH0MnIB5h+UQ3yCoh1FG4kWXfFKkpWqjZHw/p+Kc8Y44Hu/kCgNBT6nU1shNumEchmW/sUO1JuQnPcw==", "dev": true, - "license": "ISC", + "license": "MIT", "dependencies": { - "yallist": "^4.0.0" + "@octokit/request": "^6.0.0", + "@octokit/types": "^9.0.0", + "universal-user-agent": "^6.0.0" }, "engines": { - "node": ">=10" + "node": ">= 14" } }, - "node_modules/@nx/linter/node_modules/semver": { - "version": "7.5.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.3.tgz", - "integrity": "sha512-QBlUtyVk/5EeHbi7X0fw6liDZc7BBmEaSYn01fMU1OUYbf6GPsbTtd8WmnqbI20SeycoHSeiybkE/q1Q+qlThQ==", + "node_modules/@octokit/openapi-types": { + "version": "18.1.1", + "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-18.1.1.tgz", + "integrity": "sha512-VRaeH8nCDtF5aXWnjPuEMIYf1itK/s3JYyJcWFJT8X9pSNnBtriDf7wlEWsGuhPLl4QIH4xM8fqTXDwJ3Mu6sw==", "dev": true, - "license": "ISC", + "license": "MIT" + }, + "node_modules/@octokit/plugin-paginate-rest": { + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-6.1.2.tgz", + "integrity": "sha512-qhrmtQeHU/IivxucOV1bbI/xZyC/iOBhclokv7Sut5vnejAIAEXVcGQeRpQlU39E0WwK9lNvJHphHri/DB6lbQ==", + "dev": true, + "license": "MIT", "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" + "@octokit/tsconfig": "^1.0.2", + "@octokit/types": "^9.2.3" }, "engines": { - "node": ">=10" + "node": ">= 14" + }, + "peerDependencies": { + "@octokit/core": ">=4" } }, - "node_modules/@nx/linter/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true, - "license": "ISC" - }, - "node_modules/@nx/nx-darwin-arm64": { - "version": "16.9.1", - "resolved": "https://registry.npmjs.org/@nx/nx-darwin-arm64/-/nx-darwin-arm64-16.9.1.tgz", - "integrity": "sha512-JWGrPxxt3XjgIYzvnaNAeNmK24wyF6yEE1bV+wnnKzd7yavVps3c2TOVE/AT4sgvdVj3xFzztyixYGV58tCYrg==", - "cpu": [ - "arm64" - ], + "node_modules/@octokit/plugin-retry": { + "version": "4.1.6", + "resolved": "https://registry.npmjs.org/@octokit/plugin-retry/-/plugin-retry-4.1.6.tgz", + "integrity": "sha512-obkYzIgEC75r8+9Pnfiiqy3y/x1bc3QLE5B7qvv9wi9Kj0R5tGQFC6QMBg1154WQ9lAVypuQDGyp3hNpp15gQQ==", "dev": true, "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], + "dependencies": { + "@octokit/types": "^9.0.0", + "bottleneck": "^2.15.3" + }, "engines": { - "node": ">= 10" + "node": ">= 14" + }, + "peerDependencies": { + "@octokit/core": ">=3" } }, - "node_modules/@nx/nx-darwin-x64": { - "version": "16.9.1", - "resolved": "https://registry.npmjs.org/@nx/nx-darwin-x64/-/nx-darwin-x64-16.9.1.tgz", - "integrity": "sha512-b1Hw1AmKrR+Kp361WTiKC1RFoQwERyW9R/9XJGNIdgtr+V2wa775eCEdxB9r9mwCqyEmM9iVadpRHPaFSAfQfQ==", - "cpu": [ - "x64" - ], + "node_modules/@octokit/plugin-throttling": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/@octokit/plugin-throttling/-/plugin-throttling-5.2.3.tgz", + "integrity": "sha512-C9CFg9mrf6cugneKiaI841iG8DOv6P5XXkjmiNNut+swePxQ7RWEdAZRp5rJoE1hjsIqiYcKa/ZkOQ+ujPI39Q==", "dev": true, "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], + "dependencies": { + "@octokit/types": "^9.0.0", + "bottleneck": "^2.15.3" + }, "engines": { - "node": ">= 10" + "node": ">= 14" + }, + "peerDependencies": { + "@octokit/core": "^4.0.0" } }, - "node_modules/@nx/nx-freebsd-x64": { - "version": "16.9.1", - "resolved": "https://registry.npmjs.org/@nx/nx-freebsd-x64/-/nx-freebsd-x64-16.9.1.tgz", - "integrity": "sha512-jscl/Xu86tLQYbC8b1wy9FjEgGyuLpYnvP9d+34AHDi6CbCNSodbv93xFDlfYcLOeOD/mJXqR1Ru/1MF86OB5A==", - "cpu": [ - "x64" - ], + "node_modules/@octokit/request": { + "version": "6.2.8", + "resolved": "https://registry.npmjs.org/@octokit/request/-/request-6.2.8.tgz", + "integrity": "sha512-ow4+pkVQ+6XVVsekSYBzJC0VTVvh/FCTUUgTsboGq+DTeWdyIFV8WSCdo0RIxk6wSkBTHqIK1mYuY7nOBXOchw==", "dev": true, "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], + "dependencies": { + "@octokit/endpoint": "^7.0.0", + "@octokit/request-error": "^3.0.0", + "@octokit/types": "^9.0.0", + "is-plain-object": "^5.0.0", + "node-fetch": "^2.6.7", + "universal-user-agent": "^6.0.0" + }, "engines": { - "node": ">= 10" + "node": ">= 14" } }, - "node_modules/@nx/nx-linux-arm-gnueabihf": { - "version": "16.9.1", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm-gnueabihf/-/nx-linux-arm-gnueabihf-16.9.1.tgz", - "integrity": "sha512-NMAyxjYv9y4LwzU76htcPWfdmRoN/ZziTNKT3jaMbn38x4e7DoXYs9GGh267z45yWHscQWoV0v+X39LmB819aQ==", - "cpu": [ - "arm" - ], + "node_modules/@octokit/request-error": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-3.0.3.tgz", + "integrity": "sha512-crqw3V5Iy2uOU5Np+8M/YexTlT8zxCfI+qu+LxUB7SZpje4Qmx3mub5DfEKSO8Ylyk0aogi6TYdf6kxzh2BguQ==", "dev": true, "license": "MIT", - "optional": true, - "os": [ - "linux" - ], + "dependencies": { + "@octokit/types": "^9.0.0", + "deprecation": "^2.0.0", + "once": "^1.4.0" + }, "engines": { - "node": ">= 10" + "node": ">= 14" } }, - "node_modules/@nx/nx-linux-arm64-gnu": { - "version": "16.9.1", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm64-gnu/-/nx-linux-arm64-gnu-16.9.1.tgz", - "integrity": "sha512-A5UbK5rFhqzs3kMiEKA+xr3LAJsQBA97VDyMH6WPraSl+XRIt4EePx0MyEqo1pnEgeuoOCvR1tjDot5E7ldInw==", - "cpu": [ - "arm64" - ], + "node_modules/@octokit/request/node_modules/node-fetch": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", "dev": true, "license": "MIT", - "optional": true, - "os": [ - "linux" - ], + "dependencies": { + "whatwg-url": "^5.0.0" + }, "engines": { - "node": ">= 10" + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } } }, - "node_modules/@nx/nx-linux-arm64-musl": { - "version": "16.9.1", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm64-musl/-/nx-linux-arm64-musl-16.9.1.tgz", - "integrity": "sha512-eIn5PnKH7Y/u1LuanAM0wPNdcb9Z7seDjQzQ0hFMCCvV75Z8A02ztbiueLGaEsDLx35MPBdBmuyo4hsmvmLgpg==", - "cpu": [ - "arm64" - ], + "node_modules/@octokit/tsconfig": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@octokit/tsconfig/-/tsconfig-1.0.2.tgz", + "integrity": "sha512-I0vDR0rdtP8p2lGMzvsJzbhdOWy405HcGovrspJ8RRibHnyRgggUSNO5AIox5LmqiwmatHKYsvj6VGFHkqS7lA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@octokit/types": { + "version": "9.3.2", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-9.3.2.tgz", + "integrity": "sha512-D4iHGTdAnEEVsB8fl95m1hiz7D5YiRdQ9b/OEb3BYRVwbLsGHcRVPz+u+BgRLNk0Q0/4iZCBqDN96j2XNxfXrA==", "dev": true, "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" + "dependencies": { + "@octokit/openapi-types": "^18.0.0" } }, - "node_modules/@nx/nx-linux-x64-gnu": { - "version": "16.9.1", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-x64-gnu/-/nx-linux-x64-gnu-16.9.1.tgz", - "integrity": "sha512-MMvhoS1pZjyIjwfeZNH2dDZuVF2xxURLTXC4UmmpY/wOWCuXhvD7QUv5A5QShxfaVXmXceo/fGLK+/Qm5e2+7g==", - "cpu": [ - "x64" - ], + "node_modules/@parcel/watcher": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@parcel/watcher/-/watcher-2.0.4.tgz", + "integrity": "sha512-cTDi+FUDBIUOBKEtj+nhiJ71AZVlkAsQFuGQTun5tV9mwQBQgZvhCzG+URPQc8myeN32yRVZEfVAPCs1RW+Jvg==", "dev": true, + "hasInstallScript": true, "license": "MIT", - "optional": true, - "os": [ - "linux" - ], + "dependencies": { + "node-addon-api": "^3.2.1", + "node-gyp-build": "^4.3.0" + }, "engines": { - "node": ">= 10" + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" } }, - "node_modules/@nx/nx-linux-x64-musl": { - "version": "16.9.1", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-x64-musl/-/nx-linux-x64-musl-16.9.1.tgz", - "integrity": "sha512-ca0d00YCHo0+OIT80MZdtseJj9wTlWMucmdm0OCXLf/l+Dma4MO4LR09WMH2VIpjoz4Gj7+xP0QtKtH4fWFD8Q==", - "cpu": [ - "x64" - ], + "node_modules/@phenomnomnominal/tsquery": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@phenomnomnominal/tsquery/-/tsquery-5.0.1.tgz", + "integrity": "sha512-3nVv+e2FQwsW8Aw6qTU6f+1rfcJ3hrcnvH/mu9i8YhxO+9sqbOfpL8m6PbET5+xKOlz/VSbp0RoYWYCtIsnmuA==", "dev": true, "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" + "dependencies": { + "esquery": "^1.4.0" + }, + "peerDependencies": { + "typescript": "^3 || ^4 || ^5" } }, - "node_modules/@nx/nx-win32-arm64-msvc": { - "version": "16.9.1", - "resolved": "https://registry.npmjs.org/@nx/nx-win32-arm64-msvc/-/nx-win32-arm64-msvc-16.9.1.tgz", - "integrity": "sha512-UIDAWH6/LfouFaXLJWyZKggzH/698lSrLkEE1fa9VrrGEOhumk7MPAVQc/XxgkWgPDDR1TJl0ij+J1bOREn73Q==", - "cpu": [ - "arm64" - ], - "dev": true, + "node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", "license": "MIT", "optional": true, - "os": [ - "win32" - ], "engines": { - "node": ">= 10" + "node": ">=14" } }, - "node_modules/@nx/nx-win32-x64-msvc": { - "version": "16.9.1", - "resolved": "https://registry.npmjs.org/@nx/nx-win32-x64-msvc/-/nx-win32-x64-msvc-16.9.1.tgz", - "integrity": "sha512-isnElU5RaQEGPAJhx6VNY0P/avD79s146kmZOn1Ff5fAjReqR7kRxSWXQOdIqc6nPH9Y0c9wNwEAuhBJoor+Mw==", - "cpu": [ - "x64" - ], + "node_modules/@pnpm/config.env-replace": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@pnpm/config.env-replace/-/config.env-replace-1.1.0.tgz", + "integrity": "sha512-htyl8TWnKL7K/ESFa1oW2UB5lVDxuF5DpM7tBi6Hu2LNL3mWkIzNLG6N4zoCUP1lCKNxWy/3iu8mS8MvToGd6w==", "dev": true, "license": "MIT", - "optional": true, - "os": [ - "win32" - ], "engines": { - "node": ">= 10" + "node": ">=12.22.0" } }, - "node_modules/@nx/vite": { - "version": "16.9.1", - "resolved": "https://registry.npmjs.org/@nx/vite/-/vite-16.9.1.tgz", - "integrity": "sha512-+AlUq3XIefGE49KFAcXDO9P0rWGCouQrmTyZCD3O7q4Ym8CHpKc1cIRhrkRLV341Z7cLv0JXGIl7Bv5vLnnkEQ==", + "node_modules/@pnpm/network.ca-file": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@pnpm/network.ca-file/-/network.ca-file-1.0.2.tgz", + "integrity": "sha512-YcPQ8a0jwYU9bTdJDpXjMi7Brhkr1mXsXrUJvjqM2mQDgkRiz8jFaQGOdaLxgjtUfQgZhKy/O3cG/YwmgKaxLA==", "dev": true, "license": "MIT", "dependencies": { - "@nrwl/vite": "16.9.1", - "@nx/devkit": "16.9.1", - "@nx/js": "16.9.1", - "@phenomnomnominal/tsquery": "~5.0.1", - "@swc/helpers": "~0.5.0", - "enquirer": "~2.3.6", - "tsconfig-paths": "^4.1.2" + "graceful-fs": "4.2.10" }, - "peerDependencies": { - "vite": "^4.3.4", - "vitest": ">=0.31.0 <1.0.0" + "engines": { + "node": ">=12.22.0" } }, - "node_modules/@nx/vite/node_modules/@nrwl/devkit": { - "version": "16.9.1", - "resolved": "https://registry.npmjs.org/@nrwl/devkit/-/devkit-16.9.1.tgz", - "integrity": "sha512-+iR7tg+LOrGWAGmGv0hr45hYUOeKjK/Jm6WV3Ldmx6I7LaaYM5Fu6Ev2KXL669QMzLJpg3kqgKQsneWbFT3MAw==", + "node_modules/@pnpm/network.ca-file/node_modules/graceful-fs": { + "version": "4.2.10", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", + "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", "dev": true, - "license": "MIT", - "dependencies": { - "@nx/devkit": "16.9.1" - } + "license": "ISC" }, - "node_modules/@nx/vite/node_modules/@nx/devkit": { - "version": "16.9.1", - "resolved": "https://registry.npmjs.org/@nx/devkit/-/devkit-16.9.1.tgz", - "integrity": "sha512-jQMLX8pUKsOIk0tLFzJms5awPxKfJEi0uxY7+IUfRNHcnDkOFiv6gf1QqJ3pobmgwBdbC6Nv/dhDP3JT2wA1gA==", + "node_modules/@pnpm/npm-conf": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@pnpm/npm-conf/-/npm-conf-2.3.1.tgz", + "integrity": "sha512-c83qWb22rNRuB0UaVCI0uRPNRr8Z0FWnEIvT47jiHAmOIUHbBOg5XvV7pM5x+rKn9HRpjxquDbXYSXr3fAKFcw==", "dev": true, "license": "MIT", "dependencies": { - "@nrwl/devkit": "16.9.1", - "ejs": "^3.1.7", - "enquirer": "~2.3.6", - "ignore": "^5.0.4", - "semver": "7.5.3", - "tmp": "~0.2.1", - "tslib": "^2.3.0" + "@pnpm/config.env-replace": "^1.1.0", + "@pnpm/network.ca-file": "^1.0.1", + "config-chain": "^1.1.11" }, - "peerDependencies": { - "nx": ">= 15 <= 17" + "engines": { + "node": ">=12" } }, - "node_modules/@nx/vite/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "node_modules/@polka/url": { + "version": "1.0.0-next.28", + "resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.28.tgz", + "integrity": "sha512-8LduaNlMZGwdZ6qWrKlfa+2M4gahzFkprZiAt2TF8uS0qQgBizKXpXURqvTJ4WtmupWxaLqjRb2UCTe72mu+Aw==", "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } + "license": "MIT" }, - "node_modules/@nx/vite/node_modules/semver": { - "version": "7.5.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.3.tgz", - "integrity": "sha512-QBlUtyVk/5EeHbi7X0fw6liDZc7BBmEaSYn01fMU1OUYbf6GPsbTtd8WmnqbI20SeycoHSeiybkE/q1Q+qlThQ==", - "dev": true, - "license": "ISC", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } + "node_modules/@polkadot-api/json-rpc-provider": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/@polkadot-api/json-rpc-provider/-/json-rpc-provider-0.0.1.tgz", + "integrity": "sha512-/SMC/l7foRjpykLTUTacIH05H3mr9ip8b5xxfwXlVezXrNVLp3Cv0GX6uItkKd+ZjzVPf3PFrDF2B2/HLSNESA==", + "license": "MIT", + "optional": true }, - "node_modules/@nx/vite/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true, - "license": "ISC" + "node_modules/@polkadot-api/json-rpc-provider-proxy": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/@polkadot-api/json-rpc-provider-proxy/-/json-rpc-provider-proxy-0.0.1.tgz", + "integrity": "sha512-gmVDUP8LpCH0BXewbzqXF2sdHddq1H1q+XrAW2of+KZj4woQkIGBRGTJHeBEVHe30EB+UejR1N2dT4PO/RvDdg==", + "license": "MIT", + "optional": true }, - "node_modules/@nx/workspace": { - "version": "16.9.1", - "resolved": "https://registry.npmjs.org/@nx/workspace/-/workspace-16.9.1.tgz", - "integrity": "sha512-cLTcViSwHZ6M0+YuuKOFrvSaObQVZRAlxa/rvxyZD0xcQGXVY7lWZ1IzkVJueBtSoiBVfjXETXo3KX+qZcfB8A==", - "dev": true, + "node_modules/@polkadot-api/metadata-builders": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/@polkadot-api/metadata-builders/-/metadata-builders-0.0.1.tgz", + "integrity": "sha512-GCI78BHDzXAF/L2pZD6Aod/yl82adqQ7ftNmKg51ixRL02JpWUA+SpUKTJE5MY1p8kiJJIo09P2um24SiJHxNA==", "license": "MIT", + "optional": true, "dependencies": { - "@nrwl/workspace": "16.9.1", - "@nx/devkit": "16.9.1", - "chalk": "^4.1.0", - "enquirer": "~2.3.6", - "ignore": "^5.0.4", - "nx": "16.9.1", - "rxjs": "^7.8.0", - "tslib": "^2.3.0", - "yargs-parser": "21.1.1" + "@polkadot-api/substrate-bindings": "0.0.1", + "@polkadot-api/utils": "0.0.1" } }, - "node_modules/@nx/workspace/node_modules/@nrwl/devkit": { - "version": "16.9.1", - "resolved": "https://registry.npmjs.org/@nrwl/devkit/-/devkit-16.9.1.tgz", - "integrity": "sha512-+iR7tg+LOrGWAGmGv0hr45hYUOeKjK/Jm6WV3Ldmx6I7LaaYM5Fu6Ev2KXL669QMzLJpg3kqgKQsneWbFT3MAw==", - "dev": true, + "node_modules/@polkadot-api/observable-client": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/@polkadot-api/observable-client/-/observable-client-0.1.0.tgz", + "integrity": "sha512-GBCGDRztKorTLna/unjl/9SWZcRmvV58o9jwU2Y038VuPXZcr01jcw/1O3x+yeAuwyGzbucI/mLTDa1QoEml3A==", "license": "MIT", + "optional": true, "dependencies": { - "@nx/devkit": "16.9.1" + "@polkadot-api/metadata-builders": "0.0.1", + "@polkadot-api/substrate-bindings": "0.0.1", + "@polkadot-api/substrate-client": "0.0.1", + "@polkadot-api/utils": "0.0.1" + }, + "peerDependencies": { + "rxjs": ">=7.8.0" } }, - "node_modules/@nx/workspace/node_modules/@nx/devkit": { - "version": "16.9.1", - "resolved": "https://registry.npmjs.org/@nx/devkit/-/devkit-16.9.1.tgz", - "integrity": "sha512-jQMLX8pUKsOIk0tLFzJms5awPxKfJEi0uxY7+IUfRNHcnDkOFiv6gf1QqJ3pobmgwBdbC6Nv/dhDP3JT2wA1gA==", - "dev": true, + "node_modules/@polkadot-api/substrate-bindings": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/@polkadot-api/substrate-bindings/-/substrate-bindings-0.0.1.tgz", + "integrity": "sha512-bAe7a5bOPnuFVmpv7y4BBMRpNTnMmE0jtTqRUw/+D8ZlEHNVEJQGr4wu3QQCl7k1GnSV1wfv3mzIbYjErEBocg==", "license": "MIT", + "optional": true, "dependencies": { - "@nrwl/devkit": "16.9.1", - "ejs": "^3.1.7", - "enquirer": "~2.3.6", - "ignore": "^5.0.4", - "semver": "7.5.3", - "tmp": "~0.2.1", - "tslib": "^2.3.0" - }, - "peerDependencies": { - "nx": ">= 15 <= 17" + "@noble/hashes": "^1.3.1", + "@polkadot-api/utils": "0.0.1", + "@scure/base": "^1.1.1", + "scale-ts": "^1.6.0" } }, - "node_modules/@nx/workspace/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "license": "ISC", + "node_modules/@polkadot-api/substrate-client": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/@polkadot-api/substrate-client/-/substrate-client-0.0.1.tgz", + "integrity": "sha512-9Bg9SGc3AwE+wXONQoW8GC00N3v6lCZLW74HQzqB6ROdcm5VAHM4CB/xRzWSUF9CXL78ugiwtHx3wBcpx4H4Wg==", + "license": "MIT", + "optional": true + }, + "node_modules/@polkadot-api/utils": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/@polkadot-api/utils/-/utils-0.0.1.tgz", + "integrity": "sha512-3j+pRmlF9SgiYDabSdZsBSsN5XHbpXOAce1lWj56IEEaFZVjsiCaxDOA7C9nCcgfVXuvnbxqqEGQvnY+QfBAUw==", + "license": "MIT", + "optional": true + }, + "node_modules/@polkadot/api": { + "version": "11.3.1", + "resolved": "https://registry.npmjs.org/@polkadot/api/-/api-11.3.1.tgz", + "integrity": "sha512-q4kFIIHTLvKxM24b0Eo8hJevsPMme+aITJGrDML9BgdZYTRN14+cu5nXiCsQvaEamdyYj+uCXWe2OV9X7pPxsA==", + "license": "Apache-2.0", "dependencies": { - "yallist": "^4.0.0" + "@polkadot/api-augment": "11.3.1", + "@polkadot/api-base": "11.3.1", + "@polkadot/api-derive": "11.3.1", + "@polkadot/keyring": "^12.6.2", + "@polkadot/rpc-augment": "11.3.1", + "@polkadot/rpc-core": "11.3.1", + "@polkadot/rpc-provider": "11.3.1", + "@polkadot/types": "11.3.1", + "@polkadot/types-augment": "11.3.1", + "@polkadot/types-codec": "11.3.1", + "@polkadot/types-create": "11.3.1", + "@polkadot/types-known": "11.3.1", + "@polkadot/util": "^12.6.2", + "@polkadot/util-crypto": "^12.6.2", + "eventemitter3": "^5.0.1", + "rxjs": "^7.8.1", + "tslib": "^2.6.2" }, "engines": { - "node": ">=10" + "node": ">=18" } }, - "node_modules/@nx/workspace/node_modules/semver": { - "version": "7.5.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.3.tgz", - "integrity": "sha512-QBlUtyVk/5EeHbi7X0fw6liDZc7BBmEaSYn01fMU1OUYbf6GPsbTtd8WmnqbI20SeycoHSeiybkE/q1Q+qlThQ==", - "dev": true, - "license": "ISC", + "node_modules/@polkadot/api-augment": { + "version": "11.3.1", + "resolved": "https://registry.npmjs.org/@polkadot/api-augment/-/api-augment-11.3.1.tgz", + "integrity": "sha512-Yj+6rb6h0WwY3yJ+UGhjGW+tyMRFUMsKQuGw+eFsXdjiNU9UoXsAqA2dG7Q1F+oeX/g+y2gLGBezNoCwbl6HfA==", + "license": "Apache-2.0", "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" + "@polkadot/api-base": "11.3.1", + "@polkadot/rpc-augment": "11.3.1", + "@polkadot/types": "11.3.1", + "@polkadot/types-augment": "11.3.1", + "@polkadot/types-codec": "11.3.1", + "@polkadot/util": "^12.6.2", + "tslib": "^2.6.2" }, "engines": { - "node": ">=10" + "node": ">=18" } }, - "node_modules/@nx/workspace/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true, - "license": "ISC" - }, - "node_modules/@octokit/auth-token": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-3.0.4.tgz", - "integrity": "sha512-TWFX7cZF2LXoCvdmJWY7XVPi74aSY0+FfBZNSXEXFkMpjcqsQwDSYVv5FhRFaI0V1ECnwbz4j59T/G+rXNWaIQ==", - "dev": true, - "license": "MIT", + "node_modules/@polkadot/api-base": { + "version": "11.3.1", + "resolved": "https://registry.npmjs.org/@polkadot/api-base/-/api-base-11.3.1.tgz", + "integrity": "sha512-b8UkNL00NN7+3QaLCwL5cKg+7YchHoKCAhwKusWHNBZkkO6Oo2BWilu0dZkPJOyqV9P389Kbd9+oH+SKs9u2VQ==", + "license": "Apache-2.0", + "dependencies": { + "@polkadot/rpc-core": "11.3.1", + "@polkadot/types": "11.3.1", + "@polkadot/util": "^12.6.2", + "rxjs": "^7.8.1", + "tslib": "^2.6.2" + }, "engines": { - "node": ">= 14" + "node": ">=18" } }, - "node_modules/@octokit/core": { - "version": "4.2.4", - "resolved": "https://registry.npmjs.org/@octokit/core/-/core-4.2.4.tgz", - "integrity": "sha512-rYKilwgzQ7/imScn3M9/pFfUf4I1AZEH3KhyJmtPdE2zfaXAn2mFfUy4FbKewzc2We5y/LlKLj36fWJLKC2SIQ==", - "dev": true, - "license": "MIT", + "node_modules/@polkadot/api-derive": { + "version": "11.3.1", + "resolved": "https://registry.npmjs.org/@polkadot/api-derive/-/api-derive-11.3.1.tgz", + "integrity": "sha512-9dopzrh4cRuft1nANmBvMY/hEhFDu0VICMTOGxQLOl8NMfcOFPTLAN0JhSBUoicGZhV+c4vpv01NBx/7/IL1HA==", + "license": "Apache-2.0", "dependencies": { - "@octokit/auth-token": "^3.0.0", - "@octokit/graphql": "^5.0.0", - "@octokit/request": "^6.0.0", - "@octokit/request-error": "^3.0.0", - "@octokit/types": "^9.0.0", - "before-after-hook": "^2.2.0", - "universal-user-agent": "^6.0.0" + "@polkadot/api": "11.3.1", + "@polkadot/api-augment": "11.3.1", + "@polkadot/api-base": "11.3.1", + "@polkadot/rpc-core": "11.3.1", + "@polkadot/types": "11.3.1", + "@polkadot/types-codec": "11.3.1", + "@polkadot/util": "^12.6.2", + "@polkadot/util-crypto": "^12.6.2", + "rxjs": "^7.8.1", + "tslib": "^2.6.2" }, "engines": { - "node": ">= 14" + "node": ">=18" } }, - "node_modules/@octokit/endpoint": { - "version": "7.0.6", - "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-7.0.6.tgz", - "integrity": "sha512-5L4fseVRUsDFGR00tMWD/Trdeeihn999rTMGRMC1G/Ldi1uWlWJzI98H4Iak5DB/RVvQuyMYKqSK/R6mbSOQyg==", - "dev": true, - "license": "MIT", + "node_modules/@polkadot/keyring": { + "version": "12.6.2", + "resolved": "https://registry.npmjs.org/@polkadot/keyring/-/keyring-12.6.2.tgz", + "integrity": "sha512-O3Q7GVmRYm8q7HuB3S0+Yf/q/EB2egKRRU3fv9b3B7V+A52tKzA+vIwEmNVaD1g5FKW9oB97rmpggs0zaKFqHw==", + "license": "Apache-2.0", "dependencies": { - "@octokit/types": "^9.0.0", - "is-plain-object": "^5.0.0", - "universal-user-agent": "^6.0.0" + "@polkadot/util": "12.6.2", + "@polkadot/util-crypto": "12.6.2", + "tslib": "^2.6.2" }, "engines": { - "node": ">= 14" + "node": ">=18" + }, + "peerDependencies": { + "@polkadot/util": "12.6.2", + "@polkadot/util-crypto": "12.6.2" } }, - "node_modules/@octokit/graphql": { - "version": "5.0.6", - "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-5.0.6.tgz", - "integrity": "sha512-Fxyxdy/JH0MnIB5h+UQ3yCoh1FG4kWXfFKkpWqjZHw/p+Kc8Y44Hu/kCgNBT6nU1shNumEchmW/sUO1JuQnPcw==", - "dev": true, - "license": "MIT", + "node_modules/@polkadot/networks": { + "version": "12.6.2", + "resolved": "https://registry.npmjs.org/@polkadot/networks/-/networks-12.6.2.tgz", + "integrity": "sha512-1oWtZm1IvPWqvMrldVH6NI2gBoCndl5GEwx7lAuQWGr7eNL+6Bdc5K3Z9T0MzFvDGoi2/CBqjX9dRKo39pDC/w==", + "license": "Apache-2.0", "dependencies": { - "@octokit/request": "^6.0.0", - "@octokit/types": "^9.0.0", - "universal-user-agent": "^6.0.0" + "@polkadot/util": "12.6.2", + "@substrate/ss58-registry": "^1.44.0", + "tslib": "^2.6.2" }, "engines": { - "node": ">= 14" + "node": ">=18" } }, - "node_modules/@octokit/openapi-types": { - "version": "18.1.1", - "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-18.1.1.tgz", - "integrity": "sha512-VRaeH8nCDtF5aXWnjPuEMIYf1itK/s3JYyJcWFJT8X9pSNnBtriDf7wlEWsGuhPLl4QIH4xM8fqTXDwJ3Mu6sw==", - "dev": true, - "license": "MIT" - }, - "node_modules/@octokit/plugin-paginate-rest": { - "version": "6.1.2", - "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-6.1.2.tgz", - "integrity": "sha512-qhrmtQeHU/IivxucOV1bbI/xZyC/iOBhclokv7Sut5vnejAIAEXVcGQeRpQlU39E0WwK9lNvJHphHri/DB6lbQ==", - "dev": true, - "license": "MIT", + "node_modules/@polkadot/rpc-augment": { + "version": "11.3.1", + "resolved": "https://registry.npmjs.org/@polkadot/rpc-augment/-/rpc-augment-11.3.1.tgz", + "integrity": "sha512-2PaDcKNju4QYQpxwVkWbRU3M0t340nMX9cMo+8awgvgL1LliV/fUDZueMKLuSS910JJMTPQ7y2pK4eQgMt08gQ==", + "license": "Apache-2.0", "dependencies": { - "@octokit/tsconfig": "^1.0.2", - "@octokit/types": "^9.2.3" + "@polkadot/rpc-core": "11.3.1", + "@polkadot/types": "11.3.1", + "@polkadot/types-codec": "11.3.1", + "@polkadot/util": "^12.6.2", + "tslib": "^2.6.2" }, "engines": { - "node": ">= 14" - }, - "peerDependencies": { - "@octokit/core": ">=4" + "node": ">=18" } }, - "node_modules/@octokit/plugin-retry": { - "version": "4.1.6", - "resolved": "https://registry.npmjs.org/@octokit/plugin-retry/-/plugin-retry-4.1.6.tgz", - "integrity": "sha512-obkYzIgEC75r8+9Pnfiiqy3y/x1bc3QLE5B7qvv9wi9Kj0R5tGQFC6QMBg1154WQ9lAVypuQDGyp3hNpp15gQQ==", - "dev": true, - "license": "MIT", + "node_modules/@polkadot/rpc-core": { + "version": "11.3.1", + "resolved": "https://registry.npmjs.org/@polkadot/rpc-core/-/rpc-core-11.3.1.tgz", + "integrity": "sha512-KKNepsDd/mpmXcA6v/h14eFFPEzLGd7nrvx2UUXUxoZ0Fq2MH1hplP3s93k1oduNY/vOXJR2K9S4dKManA6GVQ==", + "license": "Apache-2.0", "dependencies": { - "@octokit/types": "^9.0.0", - "bottleneck": "^2.15.3" + "@polkadot/rpc-augment": "11.3.1", + "@polkadot/rpc-provider": "11.3.1", + "@polkadot/types": "11.3.1", + "@polkadot/util": "^12.6.2", + "rxjs": "^7.8.1", + "tslib": "^2.6.2" }, "engines": { - "node": ">= 14" - }, - "peerDependencies": { - "@octokit/core": ">=3" + "node": ">=18" } }, - "node_modules/@octokit/plugin-throttling": { - "version": "5.2.3", - "resolved": "https://registry.npmjs.org/@octokit/plugin-throttling/-/plugin-throttling-5.2.3.tgz", - "integrity": "sha512-C9CFg9mrf6cugneKiaI841iG8DOv6P5XXkjmiNNut+swePxQ7RWEdAZRp5rJoE1hjsIqiYcKa/ZkOQ+ujPI39Q==", - "dev": true, - "license": "MIT", + "node_modules/@polkadot/rpc-provider": { + "version": "11.3.1", + "resolved": "https://registry.npmjs.org/@polkadot/rpc-provider/-/rpc-provider-11.3.1.tgz", + "integrity": "sha512-pqERChoHo45hd3WAgW8UuzarRF+G/o/eXEbl0PXLubiayw4X4qCmIzmtntUcKYgxGNcYGZaG87ZU8OjN97m6UA==", + "license": "Apache-2.0", "dependencies": { - "@octokit/types": "^9.0.0", - "bottleneck": "^2.15.3" + "@polkadot/keyring": "^12.6.2", + "@polkadot/types": "11.3.1", + "@polkadot/types-support": "11.3.1", + "@polkadot/util": "^12.6.2", + "@polkadot/util-crypto": "^12.6.2", + "@polkadot/x-fetch": "^12.6.2", + "@polkadot/x-global": "^12.6.2", + "@polkadot/x-ws": "^12.6.2", + "eventemitter3": "^5.0.1", + "mock-socket": "^9.3.1", + "nock": "^13.5.0", + "tslib": "^2.6.2" }, "engines": { - "node": ">= 14" + "node": ">=18" }, - "peerDependencies": { - "@octokit/core": "^4.0.0" + "optionalDependencies": { + "@substrate/connect": "0.8.10" } }, - "node_modules/@octokit/request": { - "version": "6.2.8", - "resolved": "https://registry.npmjs.org/@octokit/request/-/request-6.2.8.tgz", - "integrity": "sha512-ow4+pkVQ+6XVVsekSYBzJC0VTVvh/FCTUUgTsboGq+DTeWdyIFV8WSCdo0RIxk6wSkBTHqIK1mYuY7nOBXOchw==", + "node_modules/@polkadot/typegen": { + "version": "11.3.1", + "resolved": "https://registry.npmjs.org/@polkadot/typegen/-/typegen-11.3.1.tgz", + "integrity": "sha512-DylbDbVYgtlfbHpilZeXgvlYJqPhvDavwjha/g73Sz2vTgQTO6hPU+Pbj7c2YslQ/xfmobgQ5GiEjnCP1XGcEw==", "dev": true, - "license": "MIT", + "license": "Apache-2.0", "dependencies": { - "@octokit/endpoint": "^7.0.0", - "@octokit/request-error": "^3.0.0", - "@octokit/types": "^9.0.0", - "is-plain-object": "^5.0.0", - "node-fetch": "^2.6.7", - "universal-user-agent": "^6.0.0" + "@polkadot/api": "11.3.1", + "@polkadot/api-augment": "11.3.1", + "@polkadot/rpc-augment": "11.3.1", + "@polkadot/rpc-provider": "11.3.1", + "@polkadot/types": "11.3.1", + "@polkadot/types-augment": "11.3.1", + "@polkadot/types-codec": "11.3.1", + "@polkadot/types-create": "11.3.1", + "@polkadot/types-support": "11.3.1", + "@polkadot/util": "^12.6.2", + "@polkadot/util-crypto": "^12.6.2", + "@polkadot/x-ws": "^12.6.2", + "handlebars": "^4.7.8", + "tslib": "^2.6.2", + "yargs": "^17.7.2" + }, + "bin": { + "polkadot-types-chain-info": "scripts/polkadot-types-chain-info.mjs", + "polkadot-types-from-chain": "scripts/polkadot-types-from-chain.mjs", + "polkadot-types-from-defs": "scripts/polkadot-types-from-defs.mjs", + "polkadot-types-internal-interfaces": "scripts/polkadot-types-internal-interfaces.mjs", + "polkadot-types-internal-metadata": "scripts/polkadot-types-internal-metadata.mjs" }, "engines": { - "node": ">= 14" + "node": ">=18" } }, - "node_modules/@octokit/request-error": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-3.0.3.tgz", - "integrity": "sha512-crqw3V5Iy2uOU5Np+8M/YexTlT8zxCfI+qu+LxUB7SZpje4Qmx3mub5DfEKSO8Ylyk0aogi6TYdf6kxzh2BguQ==", - "dev": true, - "license": "MIT", + "node_modules/@polkadot/types": { + "version": "11.3.1", + "resolved": "https://registry.npmjs.org/@polkadot/types/-/types-11.3.1.tgz", + "integrity": "sha512-5c7uRFXQTT11Awi6T0yFIdAfD6xGDAOz06Kp7M5S9OGNZY28wSPk5x6BYfNphWPaIBmHHewYJB5qmnrdYQAWKQ==", + "license": "Apache-2.0", "dependencies": { - "@octokit/types": "^9.0.0", - "deprecation": "^2.0.0", - "once": "^1.4.0" + "@polkadot/keyring": "^12.6.2", + "@polkadot/types-augment": "11.3.1", + "@polkadot/types-codec": "11.3.1", + "@polkadot/types-create": "11.3.1", + "@polkadot/util": "^12.6.2", + "@polkadot/util-crypto": "^12.6.2", + "rxjs": "^7.8.1", + "tslib": "^2.6.2" }, "engines": { - "node": ">= 14" + "node": ">=18" } }, - "node_modules/@octokit/request/node_modules/node-fetch": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", - "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", - "dev": true, - "license": "MIT", + "node_modules/@polkadot/types-augment": { + "version": "11.3.1", + "resolved": "https://registry.npmjs.org/@polkadot/types-augment/-/types-augment-11.3.1.tgz", + "integrity": "sha512-eR3HVpvUmB3v7q2jTWVmVfAVfb1/kuNn7ij94Zqadg/fuUq0pKqIOKwkUj3OxRM3A/5BnW3MbgparjKD3r+fyw==", + "license": "Apache-2.0", "dependencies": { - "whatwg-url": "^5.0.0" + "@polkadot/types": "11.3.1", + "@polkadot/types-codec": "11.3.1", + "@polkadot/util": "^12.6.2", + "tslib": "^2.6.2" }, "engines": { - "node": "4.x || >=6.0.0" - }, - "peerDependencies": { - "encoding": "^0.1.0" - }, - "peerDependenciesMeta": { - "encoding": { - "optional": true - } + "node": ">=18" } }, - "node_modules/@octokit/tsconfig": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@octokit/tsconfig/-/tsconfig-1.0.2.tgz", - "integrity": "sha512-I0vDR0rdtP8p2lGMzvsJzbhdOWy405HcGovrspJ8RRibHnyRgggUSNO5AIox5LmqiwmatHKYsvj6VGFHkqS7lA==", - "dev": true, - "license": "MIT" - }, - "node_modules/@octokit/types": { - "version": "9.3.2", - "resolved": "https://registry.npmjs.org/@octokit/types/-/types-9.3.2.tgz", - "integrity": "sha512-D4iHGTdAnEEVsB8fl95m1hiz7D5YiRdQ9b/OEb3BYRVwbLsGHcRVPz+u+BgRLNk0Q0/4iZCBqDN96j2XNxfXrA==", - "dev": true, - "license": "MIT", + "node_modules/@polkadot/types-codec": { + "version": "11.3.1", + "resolved": "https://registry.npmjs.org/@polkadot/types-codec/-/types-codec-11.3.1.tgz", + "integrity": "sha512-i7IiiuuL+Z/jFoKTA9xeh4wGQnhnNNjMT0+1ohvlOvnFsoKZKFQQOaDPPntGJVL1JDCV+KjkN2uQKZSeW8tguQ==", + "license": "Apache-2.0", "dependencies": { - "@octokit/openapi-types": "^18.0.0" + "@polkadot/util": "^12.6.2", + "@polkadot/x-bigint": "^12.6.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18" } }, - "node_modules/@parcel/watcher": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@parcel/watcher/-/watcher-2.0.4.tgz", - "integrity": "sha512-cTDi+FUDBIUOBKEtj+nhiJ71AZVlkAsQFuGQTun5tV9mwQBQgZvhCzG+URPQc8myeN32yRVZEfVAPCs1RW+Jvg==", - "dev": true, - "hasInstallScript": true, - "license": "MIT", + "node_modules/@polkadot/types-create": { + "version": "11.3.1", + "resolved": "https://registry.npmjs.org/@polkadot/types-create/-/types-create-11.3.1.tgz", + "integrity": "sha512-pBXtpz5FehcRJ6j5MzFUIUN8ZWM7z6HbqK1GxBmYbJVRElcGcOg7a/rL2pQVphU0Rx1E8bSO4thzGf4wUxSX7w==", + "license": "Apache-2.0", "dependencies": { - "node-addon-api": "^3.2.1", - "node-gyp-build": "^4.3.0" + "@polkadot/types-codec": "11.3.1", + "@polkadot/util": "^12.6.2", + "tslib": "^2.6.2" }, "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@paulmillr/qr": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/@paulmillr/qr/-/qr-0.2.1.tgz", - "integrity": "sha512-IHnV6A+zxU7XwmKFinmYjUcwlyK9+xkG3/s9KcQhI9BjQKycrJ1JRO+FbNYPwZiPKW3je/DR0k7w8/gLa5eaxQ==", - "license": "(MIT OR Apache-2.0)", - "funding": { - "url": "https://paulmillr.com/funding/" + "node": ">=18" } }, - "node_modules/@phenomnomnominal/tsquery": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/@phenomnomnominal/tsquery/-/tsquery-5.0.1.tgz", - "integrity": "sha512-3nVv+e2FQwsW8Aw6qTU6f+1rfcJ3hrcnvH/mu9i8YhxO+9sqbOfpL8m6PbET5+xKOlz/VSbp0RoYWYCtIsnmuA==", - "dev": true, - "license": "MIT", - "dependencies": { - "esquery": "^1.4.0" - }, - "peerDependencies": { - "typescript": "^3 || ^4 || ^5" - } - }, - "node_modules/@pkgjs/parseargs": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", - "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", - "dev": true, - "license": "MIT", - "optional": true, - "engines": { - "node": ">=14" - } - }, - "node_modules/@pnpm/config.env-replace": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@pnpm/config.env-replace/-/config.env-replace-1.1.0.tgz", - "integrity": "sha512-htyl8TWnKL7K/ESFa1oW2UB5lVDxuF5DpM7tBi6Hu2LNL3mWkIzNLG6N4zoCUP1lCKNxWy/3iu8mS8MvToGd6w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12.22.0" - } - }, - "node_modules/@pnpm/network.ca-file": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@pnpm/network.ca-file/-/network.ca-file-1.0.2.tgz", - "integrity": "sha512-YcPQ8a0jwYU9bTdJDpXjMi7Brhkr1mXsXrUJvjqM2mQDgkRiz8jFaQGOdaLxgjtUfQgZhKy/O3cG/YwmgKaxLA==", - "dev": true, - "license": "MIT", - "dependencies": { - "graceful-fs": "4.2.10" - }, - "engines": { - "node": ">=12.22.0" - } - }, - "node_modules/@pnpm/network.ca-file/node_modules/graceful-fs": { - "version": "4.2.10", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", - "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", - "dev": true, - "license": "ISC" - }, - "node_modules/@pnpm/npm-conf": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/@pnpm/npm-conf/-/npm-conf-2.3.1.tgz", - "integrity": "sha512-c83qWb22rNRuB0UaVCI0uRPNRr8Z0FWnEIvT47jiHAmOIUHbBOg5XvV7pM5x+rKn9HRpjxquDbXYSXr3fAKFcw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@pnpm/config.env-replace": "^1.1.0", - "@pnpm/network.ca-file": "^1.0.1", - "config-chain": "^1.1.11" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/@polka/url": { - "version": "1.0.0-next.28", - "resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.28.tgz", - "integrity": "sha512-8LduaNlMZGwdZ6qWrKlfa+2M4gahzFkprZiAt2TF8uS0qQgBizKXpXURqvTJ4WtmupWxaLqjRb2UCTe72mu+Aw==", - "dev": true, - "license": "MIT" - }, - "node_modules/@polkadot-api/json-rpc-provider": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/@polkadot-api/json-rpc-provider/-/json-rpc-provider-0.0.1.tgz", - "integrity": "sha512-/SMC/l7foRjpykLTUTacIH05H3mr9ip8b5xxfwXlVezXrNVLp3Cv0GX6uItkKd+ZjzVPf3PFrDF2B2/HLSNESA==", - "license": "MIT", - "optional": true - }, - "node_modules/@polkadot-api/json-rpc-provider-proxy": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/@polkadot-api/json-rpc-provider-proxy/-/json-rpc-provider-proxy-0.0.1.tgz", - "integrity": "sha512-gmVDUP8LpCH0BXewbzqXF2sdHddq1H1q+XrAW2of+KZj4woQkIGBRGTJHeBEVHe30EB+UejR1N2dT4PO/RvDdg==", - "license": "MIT", - "optional": true - }, - "node_modules/@polkadot-api/metadata-builders": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/@polkadot-api/metadata-builders/-/metadata-builders-0.0.1.tgz", - "integrity": "sha512-GCI78BHDzXAF/L2pZD6Aod/yl82adqQ7ftNmKg51ixRL02JpWUA+SpUKTJE5MY1p8kiJJIo09P2um24SiJHxNA==", - "license": "MIT", - "optional": true, - "dependencies": { - "@polkadot-api/substrate-bindings": "0.0.1", - "@polkadot-api/utils": "0.0.1" - } - }, - "node_modules/@polkadot-api/observable-client": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/@polkadot-api/observable-client/-/observable-client-0.1.0.tgz", - "integrity": "sha512-GBCGDRztKorTLna/unjl/9SWZcRmvV58o9jwU2Y038VuPXZcr01jcw/1O3x+yeAuwyGzbucI/mLTDa1QoEml3A==", - "license": "MIT", - "optional": true, - "dependencies": { - "@polkadot-api/metadata-builders": "0.0.1", - "@polkadot-api/substrate-bindings": "0.0.1", - "@polkadot-api/substrate-client": "0.0.1", - "@polkadot-api/utils": "0.0.1" - }, - "peerDependencies": { - "rxjs": ">=7.8.0" - } - }, - "node_modules/@polkadot-api/substrate-bindings": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/@polkadot-api/substrate-bindings/-/substrate-bindings-0.0.1.tgz", - "integrity": "sha512-bAe7a5bOPnuFVmpv7y4BBMRpNTnMmE0jtTqRUw/+D8ZlEHNVEJQGr4wu3QQCl7k1GnSV1wfv3mzIbYjErEBocg==", - "license": "MIT", - "optional": true, - "dependencies": { - "@noble/hashes": "^1.3.1", - "@polkadot-api/utils": "0.0.1", - "@scure/base": "^1.1.1", - "scale-ts": "^1.6.0" - } - }, - "node_modules/@polkadot-api/substrate-client": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/@polkadot-api/substrate-client/-/substrate-client-0.0.1.tgz", - "integrity": "sha512-9Bg9SGc3AwE+wXONQoW8GC00N3v6lCZLW74HQzqB6ROdcm5VAHM4CB/xRzWSUF9CXL78ugiwtHx3wBcpx4H4Wg==", - "license": "MIT", - "optional": true - }, - "node_modules/@polkadot-api/utils": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/@polkadot-api/utils/-/utils-0.0.1.tgz", - "integrity": "sha512-3j+pRmlF9SgiYDabSdZsBSsN5XHbpXOAce1lWj56IEEaFZVjsiCaxDOA7C9nCcgfVXuvnbxqqEGQvnY+QfBAUw==", - "license": "MIT", - "optional": true - }, - "node_modules/@polkadot/api": { + "node_modules/@polkadot/types-known": { "version": "11.3.1", - "resolved": "https://registry.npmjs.org/@polkadot/api/-/api-11.3.1.tgz", - "integrity": "sha512-q4kFIIHTLvKxM24b0Eo8hJevsPMme+aITJGrDML9BgdZYTRN14+cu5nXiCsQvaEamdyYj+uCXWe2OV9X7pPxsA==", + "resolved": "https://registry.npmjs.org/@polkadot/types-known/-/types-known-11.3.1.tgz", + "integrity": "sha512-3BIof7u6tn9bk3ZCIxA07iNoQ3uj4+vn3DTOjCKECozkRlt6V+kWRvqh16Hc0SHMg/QjcMb2fIu/WZhka1McUQ==", "license": "Apache-2.0", "dependencies": { - "@polkadot/api-augment": "11.3.1", - "@polkadot/api-base": "11.3.1", - "@polkadot/api-derive": "11.3.1", - "@polkadot/keyring": "^12.6.2", - "@polkadot/rpc-augment": "11.3.1", - "@polkadot/rpc-core": "11.3.1", - "@polkadot/rpc-provider": "11.3.1", + "@polkadot/networks": "^12.6.2", "@polkadot/types": "11.3.1", - "@polkadot/types-augment": "11.3.1", "@polkadot/types-codec": "11.3.1", "@polkadot/types-create": "11.3.1", - "@polkadot/types-known": "11.3.1", "@polkadot/util": "^12.6.2", - "@polkadot/util-crypto": "^12.6.2", - "eventemitter3": "^5.0.1", - "rxjs": "^7.8.1", "tslib": "^2.6.2" }, "engines": { "node": ">=18" } }, - "node_modules/@polkadot/api-augment": { + "node_modules/@polkadot/types-support": { "version": "11.3.1", - "resolved": "https://registry.npmjs.org/@polkadot/api-augment/-/api-augment-11.3.1.tgz", - "integrity": "sha512-Yj+6rb6h0WwY3yJ+UGhjGW+tyMRFUMsKQuGw+eFsXdjiNU9UoXsAqA2dG7Q1F+oeX/g+y2gLGBezNoCwbl6HfA==", + "resolved": "https://registry.npmjs.org/@polkadot/types-support/-/types-support-11.3.1.tgz", + "integrity": "sha512-jTFz1GKyF7nI29yIOq4v0NiWTOf5yX4HahJNeFD8TcxoLhF+6tH/XXqrUXJEfbaTlSrRWiW1LZYlb+snctqKHA==", "license": "Apache-2.0", "dependencies": { - "@polkadot/api-base": "11.3.1", - "@polkadot/rpc-augment": "11.3.1", - "@polkadot/types": "11.3.1", - "@polkadot/types-augment": "11.3.1", - "@polkadot/types-codec": "11.3.1", "@polkadot/util": "^12.6.2", "tslib": "^2.6.2" }, @@ -4294,565 +3959,282 @@ "node": ">=18" } }, - "node_modules/@polkadot/api-base": { - "version": "11.3.1", - "resolved": "https://registry.npmjs.org/@polkadot/api-base/-/api-base-11.3.1.tgz", - "integrity": "sha512-b8UkNL00NN7+3QaLCwL5cKg+7YchHoKCAhwKusWHNBZkkO6Oo2BWilu0dZkPJOyqV9P389Kbd9+oH+SKs9u2VQ==", + "node_modules/@polkadot/util": { + "version": "12.6.2", + "resolved": "https://registry.npmjs.org/@polkadot/util/-/util-12.6.2.tgz", + "integrity": "sha512-l8TubR7CLEY47240uki0TQzFvtnxFIO7uI/0GoWzpYD/O62EIAMRsuY01N4DuwgKq2ZWD59WhzsLYmA5K6ksdw==", "license": "Apache-2.0", "dependencies": { - "@polkadot/rpc-core": "11.3.1", - "@polkadot/types": "11.3.1", - "@polkadot/util": "^12.6.2", - "rxjs": "^7.8.1", + "@polkadot/x-bigint": "12.6.2", + "@polkadot/x-global": "12.6.2", + "@polkadot/x-textdecoder": "12.6.2", + "@polkadot/x-textencoder": "12.6.2", + "@types/bn.js": "^5.1.5", + "bn.js": "^5.2.1", "tslib": "^2.6.2" }, "engines": { "node": ">=18" } }, - "node_modules/@polkadot/api-derive": { - "version": "11.3.1", - "resolved": "https://registry.npmjs.org/@polkadot/api-derive/-/api-derive-11.3.1.tgz", - "integrity": "sha512-9dopzrh4cRuft1nANmBvMY/hEhFDu0VICMTOGxQLOl8NMfcOFPTLAN0JhSBUoicGZhV+c4vpv01NBx/7/IL1HA==", + "node_modules/@polkadot/util-crypto": { + "version": "12.6.2", + "resolved": "https://registry.npmjs.org/@polkadot/util-crypto/-/util-crypto-12.6.2.tgz", + "integrity": "sha512-FEWI/dJ7wDMNN1WOzZAjQoIcCP/3vz3wvAp5QQm+lOrzOLj0iDmaIGIcBkz8HVm3ErfSe/uKP0KS4jgV/ib+Mg==", "license": "Apache-2.0", "dependencies": { - "@polkadot/api": "11.3.1", - "@polkadot/api-augment": "11.3.1", - "@polkadot/api-base": "11.3.1", - "@polkadot/rpc-core": "11.3.1", - "@polkadot/types": "11.3.1", - "@polkadot/types-codec": "11.3.1", - "@polkadot/util": "^12.6.2", - "@polkadot/util-crypto": "^12.6.2", - "rxjs": "^7.8.1", + "@noble/curves": "^1.3.0", + "@noble/hashes": "^1.3.3", + "@polkadot/networks": "12.6.2", + "@polkadot/util": "12.6.2", + "@polkadot/wasm-crypto": "^7.3.2", + "@polkadot/wasm-util": "^7.3.2", + "@polkadot/x-bigint": "12.6.2", + "@polkadot/x-randomvalues": "12.6.2", + "@scure/base": "^1.1.5", "tslib": "^2.6.2" }, "engines": { "node": ">=18" + }, + "peerDependencies": { + "@polkadot/util": "12.6.2" } }, - "node_modules/@polkadot/keyring": { - "version": "12.6.2", - "resolved": "https://registry.npmjs.org/@polkadot/keyring/-/keyring-12.6.2.tgz", - "integrity": "sha512-O3Q7GVmRYm8q7HuB3S0+Yf/q/EB2egKRRU3fv9b3B7V+A52tKzA+vIwEmNVaD1g5FKW9oB97rmpggs0zaKFqHw==", + "node_modules/@polkadot/wasm-bridge": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/@polkadot/wasm-bridge/-/wasm-bridge-7.4.1.tgz", + "integrity": "sha512-tdkJaV453tezBxhF39r4oeG0A39sPKGDJmN81LYLf+Fihb7astzwju+u75BRmDrHZjZIv00un3razJEWCxze6g==", "license": "Apache-2.0", "dependencies": { - "@polkadot/util": "12.6.2", - "@polkadot/util-crypto": "12.6.2", - "tslib": "^2.6.2" + "@polkadot/wasm-util": "7.4.1", + "tslib": "^2.7.0" }, "engines": { "node": ">=18" }, "peerDependencies": { - "@polkadot/util": "12.6.2", - "@polkadot/util-crypto": "12.6.2" + "@polkadot/util": "*", + "@polkadot/x-randomvalues": "*" } }, - "node_modules/@polkadot/networks": { - "version": "12.6.2", - "resolved": "https://registry.npmjs.org/@polkadot/networks/-/networks-12.6.2.tgz", - "integrity": "sha512-1oWtZm1IvPWqvMrldVH6NI2gBoCndl5GEwx7lAuQWGr7eNL+6Bdc5K3Z9T0MzFvDGoi2/CBqjX9dRKo39pDC/w==", + "node_modules/@polkadot/wasm-crypto": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/@polkadot/wasm-crypto/-/wasm-crypto-7.4.1.tgz", + "integrity": "sha512-kHN/kF7hYxm1y0WeFLWeWir6oTzvcFmR4N8fJJokR+ajYbdmrafPN+6iLgQVbhZnDdxyv9jWDuRRsDnBx8tPMQ==", "license": "Apache-2.0", "dependencies": { - "@polkadot/util": "12.6.2", - "@substrate/ss58-registry": "^1.44.0", - "tslib": "^2.6.2" + "@polkadot/wasm-bridge": "7.4.1", + "@polkadot/wasm-crypto-asmjs": "7.4.1", + "@polkadot/wasm-crypto-init": "7.4.1", + "@polkadot/wasm-crypto-wasm": "7.4.1", + "@polkadot/wasm-util": "7.4.1", + "tslib": "^2.7.0" }, "engines": { "node": ">=18" + }, + "peerDependencies": { + "@polkadot/util": "*", + "@polkadot/x-randomvalues": "*" } }, - "node_modules/@polkadot/rpc-augment": { - "version": "11.3.1", - "resolved": "https://registry.npmjs.org/@polkadot/rpc-augment/-/rpc-augment-11.3.1.tgz", - "integrity": "sha512-2PaDcKNju4QYQpxwVkWbRU3M0t340nMX9cMo+8awgvgL1LliV/fUDZueMKLuSS910JJMTPQ7y2pK4eQgMt08gQ==", + "node_modules/@polkadot/wasm-crypto-asmjs": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/@polkadot/wasm-crypto-asmjs/-/wasm-crypto-asmjs-7.4.1.tgz", + "integrity": "sha512-pwU8QXhUW7IberyHJIQr37IhbB6DPkCG5FhozCiNTq4vFBsFPjm9q8aZh7oX1QHQaiAZa2m2/VjIVE+FHGbvHQ==", "license": "Apache-2.0", "dependencies": { - "@polkadot/rpc-core": "11.3.1", - "@polkadot/types": "11.3.1", - "@polkadot/types-codec": "11.3.1", - "@polkadot/util": "^12.6.2", - "tslib": "^2.6.2" + "tslib": "^2.7.0" }, "engines": { "node": ">=18" + }, + "peerDependencies": { + "@polkadot/util": "*" } }, - "node_modules/@polkadot/rpc-core": { - "version": "11.3.1", - "resolved": "https://registry.npmjs.org/@polkadot/rpc-core/-/rpc-core-11.3.1.tgz", - "integrity": "sha512-KKNepsDd/mpmXcA6v/h14eFFPEzLGd7nrvx2UUXUxoZ0Fq2MH1hplP3s93k1oduNY/vOXJR2K9S4dKManA6GVQ==", + "node_modules/@polkadot/wasm-crypto-init": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/@polkadot/wasm-crypto-init/-/wasm-crypto-init-7.4.1.tgz", + "integrity": "sha512-AVka33+f7MvXEEIGq5U0dhaA2SaXMXnxVCQyhJTaCnJ5bRDj0Xlm3ijwDEQUiaDql7EikbkkRtmlvs95eSUWYQ==", "license": "Apache-2.0", "dependencies": { - "@polkadot/rpc-augment": "11.3.1", - "@polkadot/rpc-provider": "11.3.1", - "@polkadot/types": "11.3.1", - "@polkadot/util": "^12.6.2", - "rxjs": "^7.8.1", - "tslib": "^2.6.2" + "@polkadot/wasm-bridge": "7.4.1", + "@polkadot/wasm-crypto-asmjs": "7.4.1", + "@polkadot/wasm-crypto-wasm": "7.4.1", + "@polkadot/wasm-util": "7.4.1", + "tslib": "^2.7.0" }, "engines": { "node": ">=18" + }, + "peerDependencies": { + "@polkadot/util": "*", + "@polkadot/x-randomvalues": "*" } }, - "node_modules/@polkadot/rpc-provider": { - "version": "11.3.1", - "resolved": "https://registry.npmjs.org/@polkadot/rpc-provider/-/rpc-provider-11.3.1.tgz", - "integrity": "sha512-pqERChoHo45hd3WAgW8UuzarRF+G/o/eXEbl0PXLubiayw4X4qCmIzmtntUcKYgxGNcYGZaG87ZU8OjN97m6UA==", + "node_modules/@polkadot/wasm-crypto-wasm": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/@polkadot/wasm-crypto-wasm/-/wasm-crypto-wasm-7.4.1.tgz", + "integrity": "sha512-PE1OAoupFR0ZOV2O8tr7D1FEUAwaggzxtfs3Aa5gr+yxlSOaWUKeqsOYe1KdrcjmZVV3iINEAXxgrbzCmiuONg==", "license": "Apache-2.0", "dependencies": { - "@polkadot/keyring": "^12.6.2", - "@polkadot/types": "11.3.1", - "@polkadot/types-support": "11.3.1", - "@polkadot/util": "^12.6.2", - "@polkadot/util-crypto": "^12.6.2", - "@polkadot/x-fetch": "^12.6.2", - "@polkadot/x-global": "^12.6.2", - "@polkadot/x-ws": "^12.6.2", - "eventemitter3": "^5.0.1", - "mock-socket": "^9.3.1", - "nock": "^13.5.0", - "tslib": "^2.6.2" + "@polkadot/wasm-util": "7.4.1", + "tslib": "^2.7.0" }, "engines": { "node": ">=18" }, - "optionalDependencies": { - "@substrate/connect": "0.8.10" + "peerDependencies": { + "@polkadot/util": "*" } }, - "node_modules/@polkadot/typegen": { - "version": "11.3.1", - "resolved": "https://registry.npmjs.org/@polkadot/typegen/-/typegen-11.3.1.tgz", - "integrity": "sha512-DylbDbVYgtlfbHpilZeXgvlYJqPhvDavwjha/g73Sz2vTgQTO6hPU+Pbj7c2YslQ/xfmobgQ5GiEjnCP1XGcEw==", - "dev": true, + "node_modules/@polkadot/wasm-util": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/@polkadot/wasm-util/-/wasm-util-7.4.1.tgz", + "integrity": "sha512-RAcxNFf3zzpkr+LX/ItAsvj+QyM56TomJ0xjUMo4wKkHjwsxkz4dWJtx5knIgQz/OthqSDMR59VNEycQeNuXzA==", "license": "Apache-2.0", "dependencies": { - "@polkadot/api": "11.3.1", - "@polkadot/api-augment": "11.3.1", - "@polkadot/rpc-augment": "11.3.1", - "@polkadot/rpc-provider": "11.3.1", - "@polkadot/types": "11.3.1", - "@polkadot/types-augment": "11.3.1", - "@polkadot/types-codec": "11.3.1", - "@polkadot/types-create": "11.3.1", - "@polkadot/types-support": "11.3.1", - "@polkadot/util": "^12.6.2", - "@polkadot/util-crypto": "^12.6.2", - "@polkadot/x-ws": "^12.6.2", - "handlebars": "^4.7.8", - "tslib": "^2.6.2", - "yargs": "^17.7.2" - }, - "bin": { - "polkadot-types-chain-info": "scripts/polkadot-types-chain-info.mjs", - "polkadot-types-from-chain": "scripts/polkadot-types-from-chain.mjs", - "polkadot-types-from-defs": "scripts/polkadot-types-from-defs.mjs", - "polkadot-types-internal-interfaces": "scripts/polkadot-types-internal-interfaces.mjs", - "polkadot-types-internal-metadata": "scripts/polkadot-types-internal-metadata.mjs" + "tslib": "^2.7.0" }, "engines": { "node": ">=18" + }, + "peerDependencies": { + "@polkadot/util": "*" } }, - "node_modules/@polkadot/types": { - "version": "11.3.1", - "resolved": "https://registry.npmjs.org/@polkadot/types/-/types-11.3.1.tgz", - "integrity": "sha512-5c7uRFXQTT11Awi6T0yFIdAfD6xGDAOz06Kp7M5S9OGNZY28wSPk5x6BYfNphWPaIBmHHewYJB5qmnrdYQAWKQ==", + "node_modules/@polkadot/x-bigint": { + "version": "12.6.2", + "resolved": "https://registry.npmjs.org/@polkadot/x-bigint/-/x-bigint-12.6.2.tgz", + "integrity": "sha512-HSIk60uFPX4GOFZSnIF7VYJz7WZA7tpFJsne7SzxOooRwMTWEtw3fUpFy5cYYOeLh17/kHH1Y7SVcuxzVLc74Q==", "license": "Apache-2.0", "dependencies": { - "@polkadot/keyring": "^12.6.2", - "@polkadot/types-augment": "11.3.1", - "@polkadot/types-codec": "11.3.1", - "@polkadot/types-create": "11.3.1", - "@polkadot/util": "^12.6.2", - "@polkadot/util-crypto": "^12.6.2", - "rxjs": "^7.8.1", + "@polkadot/x-global": "12.6.2", "tslib": "^2.6.2" }, "engines": { "node": ">=18" } }, - "node_modules/@polkadot/types-augment": { - "version": "11.3.1", - "resolved": "https://registry.npmjs.org/@polkadot/types-augment/-/types-augment-11.3.1.tgz", - "integrity": "sha512-eR3HVpvUmB3v7q2jTWVmVfAVfb1/kuNn7ij94Zqadg/fuUq0pKqIOKwkUj3OxRM3A/5BnW3MbgparjKD3r+fyw==", + "node_modules/@polkadot/x-fetch": { + "version": "12.6.2", + "resolved": "https://registry.npmjs.org/@polkadot/x-fetch/-/x-fetch-12.6.2.tgz", + "integrity": "sha512-8wM/Z9JJPWN1pzSpU7XxTI1ldj/AfC8hKioBlUahZ8gUiJaOF7K9XEFCrCDLis/A1BoOu7Ne6WMx/vsJJIbDWw==", "license": "Apache-2.0", "dependencies": { - "@polkadot/types": "11.3.1", - "@polkadot/types-codec": "11.3.1", - "@polkadot/util": "^12.6.2", + "@polkadot/x-global": "12.6.2", + "node-fetch": "^3.3.2", "tslib": "^2.6.2" }, "engines": { "node": ">=18" } }, - "node_modules/@polkadot/types-codec": { - "version": "11.3.1", - "resolved": "https://registry.npmjs.org/@polkadot/types-codec/-/types-codec-11.3.1.tgz", - "integrity": "sha512-i7IiiuuL+Z/jFoKTA9xeh4wGQnhnNNjMT0+1ohvlOvnFsoKZKFQQOaDPPntGJVL1JDCV+KjkN2uQKZSeW8tguQ==", + "node_modules/@polkadot/x-global": { + "version": "12.6.2", + "resolved": "https://registry.npmjs.org/@polkadot/x-global/-/x-global-12.6.2.tgz", + "integrity": "sha512-a8d6m+PW98jmsYDtAWp88qS4dl8DyqUBsd0S+WgyfSMtpEXu6v9nXDgPZgwF5xdDvXhm+P0ZfVkVTnIGrScb5g==", "license": "Apache-2.0", "dependencies": { - "@polkadot/util": "^12.6.2", - "@polkadot/x-bigint": "^12.6.2", "tslib": "^2.6.2" }, "engines": { "node": ">=18" } }, - "node_modules/@polkadot/types-create": { - "version": "11.3.1", - "resolved": "https://registry.npmjs.org/@polkadot/types-create/-/types-create-11.3.1.tgz", - "integrity": "sha512-pBXtpz5FehcRJ6j5MzFUIUN8ZWM7z6HbqK1GxBmYbJVRElcGcOg7a/rL2pQVphU0Rx1E8bSO4thzGf4wUxSX7w==", + "node_modules/@polkadot/x-randomvalues": { + "version": "12.6.2", + "resolved": "https://registry.npmjs.org/@polkadot/x-randomvalues/-/x-randomvalues-12.6.2.tgz", + "integrity": "sha512-Vr8uG7rH2IcNJwtyf5ebdODMcr0XjoCpUbI91Zv6AlKVYOGKZlKLYJHIwpTaKKB+7KPWyQrk4Mlym/rS7v9feg==", "license": "Apache-2.0", "dependencies": { - "@polkadot/types-codec": "11.3.1", - "@polkadot/util": "^12.6.2", + "@polkadot/x-global": "12.6.2", "tslib": "^2.6.2" }, "engines": { "node": ">=18" + }, + "peerDependencies": { + "@polkadot/util": "12.6.2", + "@polkadot/wasm-util": "*" } }, - "node_modules/@polkadot/types-known": { - "version": "11.3.1", - "resolved": "https://registry.npmjs.org/@polkadot/types-known/-/types-known-11.3.1.tgz", - "integrity": "sha512-3BIof7u6tn9bk3ZCIxA07iNoQ3uj4+vn3DTOjCKECozkRlt6V+kWRvqh16Hc0SHMg/QjcMb2fIu/WZhka1McUQ==", + "node_modules/@polkadot/x-textdecoder": { + "version": "12.6.2", + "resolved": "https://registry.npmjs.org/@polkadot/x-textdecoder/-/x-textdecoder-12.6.2.tgz", + "integrity": "sha512-M1Bir7tYvNappfpFWXOJcnxUhBUFWkUFIdJSyH0zs5LmFtFdbKAeiDXxSp2Swp5ddOZdZgPac294/o2TnQKN1w==", "license": "Apache-2.0", "dependencies": { - "@polkadot/networks": "^12.6.2", - "@polkadot/types": "11.3.1", - "@polkadot/types-codec": "11.3.1", - "@polkadot/types-create": "11.3.1", - "@polkadot/util": "^12.6.2", + "@polkadot/x-global": "12.6.2", "tslib": "^2.6.2" }, "engines": { "node": ">=18" } }, - "node_modules/@polkadot/types-support": { - "version": "11.3.1", - "resolved": "https://registry.npmjs.org/@polkadot/types-support/-/types-support-11.3.1.tgz", - "integrity": "sha512-jTFz1GKyF7nI29yIOq4v0NiWTOf5yX4HahJNeFD8TcxoLhF+6tH/XXqrUXJEfbaTlSrRWiW1LZYlb+snctqKHA==", + "node_modules/@polkadot/x-textencoder": { + "version": "12.6.2", + "resolved": "https://registry.npmjs.org/@polkadot/x-textencoder/-/x-textencoder-12.6.2.tgz", + "integrity": "sha512-4N+3UVCpI489tUJ6cv3uf0PjOHvgGp9Dl+SZRLgFGt9mvxnvpW/7+XBADRMtlG4xi5gaRK7bgl5bmY6OMDsNdw==", "license": "Apache-2.0", "dependencies": { - "@polkadot/util": "^12.6.2", + "@polkadot/x-global": "12.6.2", "tslib": "^2.6.2" }, "engines": { "node": ">=18" } }, - "node_modules/@polkadot/util": { + "node_modules/@polkadot/x-ws": { "version": "12.6.2", - "resolved": "https://registry.npmjs.org/@polkadot/util/-/util-12.6.2.tgz", - "integrity": "sha512-l8TubR7CLEY47240uki0TQzFvtnxFIO7uI/0GoWzpYD/O62EIAMRsuY01N4DuwgKq2ZWD59WhzsLYmA5K6ksdw==", + "resolved": "https://registry.npmjs.org/@polkadot/x-ws/-/x-ws-12.6.2.tgz", + "integrity": "sha512-cGZWo7K5eRRQCRl2LrcyCYsrc3lRbTlixZh3AzgU8uX4wASVGRlNWi/Hf4TtHNe1ExCDmxabJzdIsABIfrr7xw==", "license": "Apache-2.0", "dependencies": { - "@polkadot/x-bigint": "12.6.2", "@polkadot/x-global": "12.6.2", - "@polkadot/x-textdecoder": "12.6.2", - "@polkadot/x-textencoder": "12.6.2", - "@types/bn.js": "^5.1.5", - "bn.js": "^5.2.1", - "tslib": "^2.6.2" + "tslib": "^2.6.2", + "ws": "^8.15.1" }, "engines": { "node": ">=18" } }, - "node_modules/@polkadot/util-crypto": { - "version": "12.6.2", - "resolved": "https://registry.npmjs.org/@polkadot/util-crypto/-/util-crypto-12.6.2.tgz", - "integrity": "sha512-FEWI/dJ7wDMNN1WOzZAjQoIcCP/3vz3wvAp5QQm+lOrzOLj0iDmaIGIcBkz8HVm3ErfSe/uKP0KS4jgV/ib+Mg==", - "license": "Apache-2.0", + "node_modules/@scure/base": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.2.4.tgz", + "integrity": "sha512-5Yy9czTO47mqz+/J8GM6GIId4umdCk1wc1q8rKERQulIoc8VP9pzDcghv10Tl2E7R96ZUx/PhND3ESYUQX8NuQ==", + "license": "MIT", + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@scure/bip32": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.6.2.tgz", + "integrity": "sha512-t96EPDMbtGgtb7onKKqxRLfE5g05k7uHnHRM2xdE6BP/ZmxaLtPek4J4KfVn/90IQNrU1IOAqMgiDtUdtbe3nw==", + "license": "MIT", "dependencies": { - "@noble/curves": "^1.3.0", - "@noble/hashes": "^1.3.3", - "@polkadot/networks": "12.6.2", - "@polkadot/util": "12.6.2", - "@polkadot/wasm-crypto": "^7.3.2", - "@polkadot/wasm-util": "^7.3.2", - "@polkadot/x-bigint": "12.6.2", - "@polkadot/x-randomvalues": "12.6.2", - "@scure/base": "^1.1.5", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18" + "@noble/curves": "~1.8.1", + "@noble/hashes": "~1.7.1", + "@scure/base": "~1.2.2" }, - "peerDependencies": { - "@polkadot/util": "12.6.2" + "funding": { + "url": "https://paulmillr.com/funding/" } }, - "node_modules/@polkadot/wasm-bridge": { - "version": "7.4.1", - "resolved": "https://registry.npmjs.org/@polkadot/wasm-bridge/-/wasm-bridge-7.4.1.tgz", - "integrity": "sha512-tdkJaV453tezBxhF39r4oeG0A39sPKGDJmN81LYLf+Fihb7astzwju+u75BRmDrHZjZIv00un3razJEWCxze6g==", - "license": "Apache-2.0", + "node_modules/@scure/bip39": { + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.5.4.tgz", + "integrity": "sha512-TFM4ni0vKvCfBpohoh+/lY05i9gRbSwXWngAsF4CABQxoaOHijxuaZ2R6cStDQ5CHtHO9aGJTr4ksVJASRRyMA==", + "license": "MIT", "dependencies": { - "@polkadot/wasm-util": "7.4.1", - "tslib": "^2.7.0" - }, - "engines": { - "node": ">=18" + "@noble/hashes": "~1.7.1", + "@scure/base": "~1.2.4" }, - "peerDependencies": { - "@polkadot/util": "*", - "@polkadot/x-randomvalues": "*" - } - }, - "node_modules/@polkadot/wasm-crypto": { - "version": "7.4.1", - "resolved": "https://registry.npmjs.org/@polkadot/wasm-crypto/-/wasm-crypto-7.4.1.tgz", - "integrity": "sha512-kHN/kF7hYxm1y0WeFLWeWir6oTzvcFmR4N8fJJokR+ajYbdmrafPN+6iLgQVbhZnDdxyv9jWDuRRsDnBx8tPMQ==", - "license": "Apache-2.0", - "dependencies": { - "@polkadot/wasm-bridge": "7.4.1", - "@polkadot/wasm-crypto-asmjs": "7.4.1", - "@polkadot/wasm-crypto-init": "7.4.1", - "@polkadot/wasm-crypto-wasm": "7.4.1", - "@polkadot/wasm-util": "7.4.1", - "tslib": "^2.7.0" - }, - "engines": { - "node": ">=18" - }, - "peerDependencies": { - "@polkadot/util": "*", - "@polkadot/x-randomvalues": "*" - } - }, - "node_modules/@polkadot/wasm-crypto-asmjs": { - "version": "7.4.1", - "resolved": "https://registry.npmjs.org/@polkadot/wasm-crypto-asmjs/-/wasm-crypto-asmjs-7.4.1.tgz", - "integrity": "sha512-pwU8QXhUW7IberyHJIQr37IhbB6DPkCG5FhozCiNTq4vFBsFPjm9q8aZh7oX1QHQaiAZa2m2/VjIVE+FHGbvHQ==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.7.0" - }, - "engines": { - "node": ">=18" - }, - "peerDependencies": { - "@polkadot/util": "*" - } - }, - "node_modules/@polkadot/wasm-crypto-init": { - "version": "7.4.1", - "resolved": "https://registry.npmjs.org/@polkadot/wasm-crypto-init/-/wasm-crypto-init-7.4.1.tgz", - "integrity": "sha512-AVka33+f7MvXEEIGq5U0dhaA2SaXMXnxVCQyhJTaCnJ5bRDj0Xlm3ijwDEQUiaDql7EikbkkRtmlvs95eSUWYQ==", - "license": "Apache-2.0", - "dependencies": { - "@polkadot/wasm-bridge": "7.4.1", - "@polkadot/wasm-crypto-asmjs": "7.4.1", - "@polkadot/wasm-crypto-wasm": "7.4.1", - "@polkadot/wasm-util": "7.4.1", - "tslib": "^2.7.0" - }, - "engines": { - "node": ">=18" - }, - "peerDependencies": { - "@polkadot/util": "*", - "@polkadot/x-randomvalues": "*" - } - }, - "node_modules/@polkadot/wasm-crypto-wasm": { - "version": "7.4.1", - "resolved": "https://registry.npmjs.org/@polkadot/wasm-crypto-wasm/-/wasm-crypto-wasm-7.4.1.tgz", - "integrity": "sha512-PE1OAoupFR0ZOV2O8tr7D1FEUAwaggzxtfs3Aa5gr+yxlSOaWUKeqsOYe1KdrcjmZVV3iINEAXxgrbzCmiuONg==", - "license": "Apache-2.0", - "dependencies": { - "@polkadot/wasm-util": "7.4.1", - "tslib": "^2.7.0" - }, - "engines": { - "node": ">=18" - }, - "peerDependencies": { - "@polkadot/util": "*" - } - }, - "node_modules/@polkadot/wasm-util": { - "version": "7.4.1", - "resolved": "https://registry.npmjs.org/@polkadot/wasm-util/-/wasm-util-7.4.1.tgz", - "integrity": "sha512-RAcxNFf3zzpkr+LX/ItAsvj+QyM56TomJ0xjUMo4wKkHjwsxkz4dWJtx5knIgQz/OthqSDMR59VNEycQeNuXzA==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.7.0" - }, - "engines": { - "node": ">=18" - }, - "peerDependencies": { - "@polkadot/util": "*" - } - }, - "node_modules/@polkadot/x-bigint": { - "version": "12.6.2", - "resolved": "https://registry.npmjs.org/@polkadot/x-bigint/-/x-bigint-12.6.2.tgz", - "integrity": "sha512-HSIk60uFPX4GOFZSnIF7VYJz7WZA7tpFJsne7SzxOooRwMTWEtw3fUpFy5cYYOeLh17/kHH1Y7SVcuxzVLc74Q==", - "license": "Apache-2.0", - "dependencies": { - "@polkadot/x-global": "12.6.2", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@polkadot/x-fetch": { - "version": "12.6.2", - "resolved": "https://registry.npmjs.org/@polkadot/x-fetch/-/x-fetch-12.6.2.tgz", - "integrity": "sha512-8wM/Z9JJPWN1pzSpU7XxTI1ldj/AfC8hKioBlUahZ8gUiJaOF7K9XEFCrCDLis/A1BoOu7Ne6WMx/vsJJIbDWw==", - "license": "Apache-2.0", - "dependencies": { - "@polkadot/x-global": "12.6.2", - "node-fetch": "^3.3.2", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@polkadot/x-global": { - "version": "12.6.2", - "resolved": "https://registry.npmjs.org/@polkadot/x-global/-/x-global-12.6.2.tgz", - "integrity": "sha512-a8d6m+PW98jmsYDtAWp88qS4dl8DyqUBsd0S+WgyfSMtpEXu6v9nXDgPZgwF5xdDvXhm+P0ZfVkVTnIGrScb5g==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@polkadot/x-randomvalues": { - "version": "12.6.2", - "resolved": "https://registry.npmjs.org/@polkadot/x-randomvalues/-/x-randomvalues-12.6.2.tgz", - "integrity": "sha512-Vr8uG7rH2IcNJwtyf5ebdODMcr0XjoCpUbI91Zv6AlKVYOGKZlKLYJHIwpTaKKB+7KPWyQrk4Mlym/rS7v9feg==", - "license": "Apache-2.0", - "dependencies": { - "@polkadot/x-global": "12.6.2", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18" - }, - "peerDependencies": { - "@polkadot/util": "12.6.2", - "@polkadot/wasm-util": "*" - } - }, - "node_modules/@polkadot/x-textdecoder": { - "version": "12.6.2", - "resolved": "https://registry.npmjs.org/@polkadot/x-textdecoder/-/x-textdecoder-12.6.2.tgz", - "integrity": "sha512-M1Bir7tYvNappfpFWXOJcnxUhBUFWkUFIdJSyH0zs5LmFtFdbKAeiDXxSp2Swp5ddOZdZgPac294/o2TnQKN1w==", - "license": "Apache-2.0", - "dependencies": { - "@polkadot/x-global": "12.6.2", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@polkadot/x-textencoder": { - "version": "12.6.2", - "resolved": "https://registry.npmjs.org/@polkadot/x-textencoder/-/x-textencoder-12.6.2.tgz", - "integrity": "sha512-4N+3UVCpI489tUJ6cv3uf0PjOHvgGp9Dl+SZRLgFGt9mvxnvpW/7+XBADRMtlG4xi5gaRK7bgl5bmY6OMDsNdw==", - "license": "Apache-2.0", - "dependencies": { - "@polkadot/x-global": "12.6.2", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@polkadot/x-ws": { - "version": "12.6.2", - "resolved": "https://registry.npmjs.org/@polkadot/x-ws/-/x-ws-12.6.2.tgz", - "integrity": "sha512-cGZWo7K5eRRQCRl2LrcyCYsrc3lRbTlixZh3AzgU8uX4wASVGRlNWi/Hf4TtHNe1ExCDmxabJzdIsABIfrr7xw==", - "license": "Apache-2.0", - "dependencies": { - "@polkadot/x-global": "12.6.2", - "tslib": "^2.6.2", - "ws": "^8.15.1" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@safe-global/safe-apps-provider": { - "version": "0.18.5", - "resolved": "https://registry.npmjs.org/@safe-global/safe-apps-provider/-/safe-apps-provider-0.18.5.tgz", - "integrity": "sha512-9v9wjBi3TwLsEJ3C2ujYoexp3pFJ0omDLH/GX91e2QB+uwCKTBYyhxFSrTQ9qzoyQd+bfsk4gjOGW87QcJhf7g==", - "license": "MIT", - "dependencies": { - "@safe-global/safe-apps-sdk": "^9.1.0", - "events": "^3.3.0" - } - }, - "node_modules/@safe-global/safe-apps-sdk": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/@safe-global/safe-apps-sdk/-/safe-apps-sdk-9.1.0.tgz", - "integrity": "sha512-N5p/ulfnnA2Pi2M3YeWjULeWbjo7ei22JwU/IXnhoHzKq3pYCN6ynL9mJBOlvDVv892EgLPCWCOwQk/uBT2v0Q==", - "license": "MIT", - "dependencies": { - "@safe-global/safe-gateway-typescript-sdk": "^3.5.3", - "viem": "^2.1.1" - } - }, - "node_modules/@safe-global/safe-gateway-typescript-sdk": { - "version": "3.22.9", - "resolved": "https://registry.npmjs.org/@safe-global/safe-gateway-typescript-sdk/-/safe-gateway-typescript-sdk-3.22.9.tgz", - "integrity": "sha512-7ojVK/crhOaGowEO8uYWaopZzcr5rR76emgllGIfjCLR70aY4PbASpi9Pbs+7jIRzPDBBkM0RBo+zYx5UduX8Q==", - "license": "MIT", - "engines": { - "node": ">=16" - } - }, - "node_modules/@scure/base": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.2.4.tgz", - "integrity": "sha512-5Yy9czTO47mqz+/J8GM6GIId4umdCk1wc1q8rKERQulIoc8VP9pzDcghv10Tl2E7R96ZUx/PhND3ESYUQX8NuQ==", - "license": "MIT", - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/@scure/bip32": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.6.2.tgz", - "integrity": "sha512-t96EPDMbtGgtb7onKKqxRLfE5g05k7uHnHRM2xdE6BP/ZmxaLtPek4J4KfVn/90IQNrU1IOAqMgiDtUdtbe3nw==", - "license": "MIT", - "dependencies": { - "@noble/curves": "~1.8.1", - "@noble/hashes": "~1.7.1", - "@scure/base": "~1.2.2" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/@scure/bip39": { - "version": "1.5.4", - "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.5.4.tgz", - "integrity": "sha512-TFM4ni0vKvCfBpohoh+/lY05i9gRbSwXWngAsF4CABQxoaOHijxuaZ2R6cStDQ5CHtHO9aGJTr4ksVJASRRyMA==", - "license": "MIT", - "dependencies": { - "@noble/hashes": "~1.7.1", - "@scure/base": "~1.2.4" - }, - "funding": { - "url": "https://paulmillr.com/funding/" + "funding": { + "url": "https://paulmillr.com/funding/" } }, "node_modules/@semantic-release/changelog": { @@ -5139,188 +4521,18 @@ "url": "https://github.com/sindresorhus/is?sponsor=1" } }, - "node_modules/@socket.io/component-emitter": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@socket.io/component-emitter/-/component-emitter-3.1.2.tgz", - "integrity": "sha512-9BCxFwvbGg/RsZK9tjXd8s4UcwR0MWeFQ1XEKIQVVvAGJyINdrqKMcTRyLoK8Rse1GjzLV9cwjWV1olXRWEXVA==", - "license": "MIT" - }, - "node_modules/@stablelib/aead": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@stablelib/aead/-/aead-1.0.1.tgz", - "integrity": "sha512-q39ik6sxGHewqtO0nP4BuSe3db5G1fEJE8ukvngS2gLkBXyy6E7pLubhbYgnkDFv6V8cWaxcE4Xn0t6LWcJkyg==", - "license": "MIT" - }, - "node_modules/@stablelib/binary": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@stablelib/binary/-/binary-1.0.1.tgz", - "integrity": "sha512-ClJWvmL6UBM/wjkvv/7m5VP3GMr9t0osr4yVgLZsLCOz4hGN9gIAFEqnJ0TsSMAN+n840nf2cHZnA5/KFqHC7Q==", - "license": "MIT", + "node_modules/@substrate/connect": { + "version": "0.8.10", + "resolved": "https://registry.npmjs.org/@substrate/connect/-/connect-0.8.10.tgz", + "integrity": "sha512-DIyQ13DDlXqVFnLV+S6/JDgiGowVRRrh18kahieJxhgvzcWicw5eLc6jpfQ0moVVLBYkO7rctB5Wreldwpva8w==", + "deprecated": "versions below 1.x are no longer maintained", + "license": "GPL-3.0-only", + "optional": true, "dependencies": { - "@stablelib/int": "^1.0.1" - } - }, - "node_modules/@stablelib/bytes": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@stablelib/bytes/-/bytes-1.0.1.tgz", - "integrity": "sha512-Kre4Y4kdwuqL8BR2E9hV/R5sOrUj6NanZaZis0V6lX5yzqC3hBuVSDXUIBqQv/sCpmuWRiHLwqiT1pqqjuBXoQ==", - "license": "MIT" - }, - "node_modules/@stablelib/chacha": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@stablelib/chacha/-/chacha-1.0.1.tgz", - "integrity": "sha512-Pmlrswzr0pBzDofdFuVe1q7KdsHKhhU24e8gkEwnTGOmlC7PADzLVxGdn2PoNVBBabdg0l/IfLKg6sHAbTQugg==", - "license": "MIT", - "dependencies": { - "@stablelib/binary": "^1.0.1", - "@stablelib/wipe": "^1.0.1" - } - }, - "node_modules/@stablelib/chacha20poly1305": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@stablelib/chacha20poly1305/-/chacha20poly1305-1.0.1.tgz", - "integrity": "sha512-MmViqnqHd1ymwjOQfghRKw2R/jMIGT3wySN7cthjXCBdO+qErNPUBnRzqNpnvIwg7JBCg3LdeCZZO4de/yEhVA==", - "license": "MIT", - "dependencies": { - "@stablelib/aead": "^1.0.1", - "@stablelib/binary": "^1.0.1", - "@stablelib/chacha": "^1.0.1", - "@stablelib/constant-time": "^1.0.1", - "@stablelib/poly1305": "^1.0.1", - "@stablelib/wipe": "^1.0.1" - } - }, - "node_modules/@stablelib/constant-time": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@stablelib/constant-time/-/constant-time-1.0.1.tgz", - "integrity": "sha512-tNOs3uD0vSJcK6z1fvef4Y+buN7DXhzHDPqRLSXUel1UfqMB1PWNsnnAezrKfEwTLpN0cGH2p9NNjs6IqeD0eg==", - "license": "MIT" - }, - "node_modules/@stablelib/ed25519": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@stablelib/ed25519/-/ed25519-1.0.3.tgz", - "integrity": "sha512-puIMWaX9QlRsbhxfDc5i+mNPMY+0TmQEskunY1rZEBPi1acBCVQAhnsk/1Hk50DGPtVsZtAWQg4NHGlVaO9Hqg==", - "license": "MIT", - "dependencies": { - "@stablelib/random": "^1.0.2", - "@stablelib/sha512": "^1.0.1", - "@stablelib/wipe": "^1.0.1" - } - }, - "node_modules/@stablelib/hash": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@stablelib/hash/-/hash-1.0.1.tgz", - "integrity": "sha512-eTPJc/stDkdtOcrNMZ6mcMK1e6yBbqRBaNW55XA1jU8w/7QdnCF0CmMmOD1m7VSkBR44PWrMHU2l6r8YEQHMgg==", - "license": "MIT" - }, - "node_modules/@stablelib/hkdf": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@stablelib/hkdf/-/hkdf-1.0.1.tgz", - "integrity": "sha512-SBEHYE16ZXlHuaW5RcGk533YlBj4grMeg5TooN80W3NpcHRtLZLLXvKyX0qcRFxf+BGDobJLnwkvgEwHIDBR6g==", - "license": "MIT", - "dependencies": { - "@stablelib/hash": "^1.0.1", - "@stablelib/hmac": "^1.0.1", - "@stablelib/wipe": "^1.0.1" - } - }, - "node_modules/@stablelib/hmac": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@stablelib/hmac/-/hmac-1.0.1.tgz", - "integrity": "sha512-V2APD9NSnhVpV/QMYgCVMIYKiYG6LSqw1S65wxVoirhU/51ACio6D4yDVSwMzuTJXWZoVHbDdINioBwKy5kVmA==", - "license": "MIT", - "dependencies": { - "@stablelib/constant-time": "^1.0.1", - "@stablelib/hash": "^1.0.1", - "@stablelib/wipe": "^1.0.1" - } - }, - "node_modules/@stablelib/int": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@stablelib/int/-/int-1.0.1.tgz", - "integrity": "sha512-byr69X/sDtDiIjIV6m4roLVWnNNlRGzsvxw+agj8CIEazqWGOQp2dTYgQhtyVXV9wpO6WyXRQUzLV/JRNumT2w==", - "license": "MIT" - }, - "node_modules/@stablelib/keyagreement": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@stablelib/keyagreement/-/keyagreement-1.0.1.tgz", - "integrity": "sha512-VKL6xBwgJnI6l1jKrBAfn265cspaWBPAPEc62VBQrWHLqVgNRE09gQ/AnOEyKUWrrqfD+xSQ3u42gJjLDdMDQg==", - "license": "MIT", - "dependencies": { - "@stablelib/bytes": "^1.0.1" - } - }, - "node_modules/@stablelib/poly1305": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@stablelib/poly1305/-/poly1305-1.0.1.tgz", - "integrity": "sha512-1HlG3oTSuQDOhSnLwJRKeTRSAdFNVB/1djy2ZbS35rBSJ/PFqx9cf9qatinWghC2UbfOYD8AcrtbUQl8WoxabA==", - "license": "MIT", - "dependencies": { - "@stablelib/constant-time": "^1.0.1", - "@stablelib/wipe": "^1.0.1" - } - }, - "node_modules/@stablelib/random": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@stablelib/random/-/random-1.0.2.tgz", - "integrity": "sha512-rIsE83Xpb7clHPVRlBj8qNe5L8ISQOzjghYQm/dZ7VaM2KHYwMW5adjQjrzTZCchFnNCNhkwtnOBa9HTMJCI8w==", - "license": "MIT", - "dependencies": { - "@stablelib/binary": "^1.0.1", - "@stablelib/wipe": "^1.0.1" - } - }, - "node_modules/@stablelib/sha256": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@stablelib/sha256/-/sha256-1.0.1.tgz", - "integrity": "sha512-GIIH3e6KH+91FqGV42Kcj71Uefd/QEe7Dy42sBTeqppXV95ggCcxLTk39bEr+lZfJmp+ghsR07J++ORkRELsBQ==", - "license": "MIT", - "dependencies": { - "@stablelib/binary": "^1.0.1", - "@stablelib/hash": "^1.0.1", - "@stablelib/wipe": "^1.0.1" - } - }, - "node_modules/@stablelib/sha512": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@stablelib/sha512/-/sha512-1.0.1.tgz", - "integrity": "sha512-13gl/iawHV9zvDKciLo1fQ8Bgn2Pvf7OV6amaRVKiq3pjQ3UmEpXxWiAfV8tYjUpeZroBxtyrwtdooQT/i3hzw==", - "license": "MIT", - "dependencies": { - "@stablelib/binary": "^1.0.1", - "@stablelib/hash": "^1.0.1", - "@stablelib/wipe": "^1.0.1" - } - }, - "node_modules/@stablelib/wipe": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@stablelib/wipe/-/wipe-1.0.1.tgz", - "integrity": "sha512-WfqfX/eXGiAd3RJe4VU2snh/ZPwtSjLG4ynQ/vYzvghTh7dHFcI1wl+nrkWG6lGhukOxOsUHfv8dUXr58D0ayg==", - "license": "MIT" - }, - "node_modules/@stablelib/x25519": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@stablelib/x25519/-/x25519-1.0.3.tgz", - "integrity": "sha512-KnTbKmUhPhHavzobclVJQG5kuivH+qDLpe84iRqX3CLrKp881cF160JvXJ+hjn1aMyCwYOKeIZefIH/P5cJoRw==", - "license": "MIT", - "dependencies": { - "@stablelib/keyagreement": "^1.0.1", - "@stablelib/random": "^1.0.2", - "@stablelib/wipe": "^1.0.1" - } - }, - "node_modules/@substrate/connect": { - "version": "0.8.10", - "resolved": "https://registry.npmjs.org/@substrate/connect/-/connect-0.8.10.tgz", - "integrity": "sha512-DIyQ13DDlXqVFnLV+S6/JDgiGowVRRrh18kahieJxhgvzcWicw5eLc6jpfQ0moVVLBYkO7rctB5Wreldwpva8w==", - "deprecated": "versions below 1.x are no longer maintained", - "license": "GPL-3.0-only", - "optional": true, - "dependencies": { - "@substrate/connect-extension-protocol": "^2.0.0", - "@substrate/connect-known-chains": "^1.1.4", - "@substrate/light-client-extension-helpers": "^0.0.6", - "smoldot": "2.0.22" + "@substrate/connect-extension-protocol": "^2.0.0", + "@substrate/connect-known-chains": "^1.1.4", + "@substrate/light-client-extension-helpers": "^0.0.6", + "smoldot": "2.0.22" } }, "node_modules/@substrate/connect-extension-protocol": { @@ -5411,7 +4623,7 @@ "version": "1.3.85", "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.3.85.tgz", "integrity": "sha512-qnoxp+2O0GtvRdYnXgR1v8J7iymGGYpx6f6yCK9KxipOZOjrlKILFANYlghQxZyPUfXwK++TFxfSlX4r9wK+kg==", - "dev": true, + "devOptional": true, "hasInstallScript": true, "license": "Apache-2.0", "dependencies": { @@ -5452,7 +4664,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "Apache-2.0 AND MIT", "optional": true, "os": [ @@ -5469,7 +4680,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "Apache-2.0 AND MIT", "optional": true, "os": [ @@ -5486,7 +4696,6 @@ "cpu": [ "arm" ], - "dev": true, "license": "Apache-2.0 AND MIT", "optional": true, "os": [ @@ -5503,7 +4712,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "Apache-2.0 AND MIT", "optional": true, "os": [ @@ -5520,7 +4728,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "Apache-2.0 AND MIT", "optional": true, "os": [ @@ -5537,7 +4744,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "Apache-2.0 AND MIT", "optional": true, "os": [ @@ -5554,7 +4760,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "Apache-2.0 AND MIT", "optional": true, "os": [ @@ -5571,7 +4776,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "Apache-2.0 AND MIT", "optional": true, "os": [ @@ -5588,7 +4792,6 @@ "cpu": [ "ia32" ], - "dev": true, "license": "Apache-2.0 AND MIT", "optional": true, "os": [ @@ -5605,7 +4808,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "Apache-2.0 AND MIT", "optional": true, "os": [ @@ -5619,14 +4821,14 @@ "version": "0.1.3", "resolved": "https://registry.npmjs.org/@swc/counter/-/counter-0.1.3.tgz", "integrity": "sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ==", - "dev": true, + "devOptional": true, "license": "Apache-2.0" }, "node_modules/@swc/helpers": { "version": "0.5.15", "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.15.tgz", "integrity": "sha512-JQ5TuMi45Owi4/BIMAJBoSQoOJu12oOk/gADqlcUL9JEdHB8vyjUSsxqeNXnmXHjYKMi2WcYtezGEEhqUI/E2g==", - "dev": true, + "devOptional": true, "license": "Apache-2.0", "dependencies": { "tslib": "^2.8.0" @@ -5636,873 +4838,370 @@ "version": "0.1.17", "resolved": "https://registry.npmjs.org/@swc/types/-/types-0.1.17.tgz", "integrity": "sha512-V5gRru+aD8YVyCOMAjMpWR1Ui577DD5KSJsHP8RAxopAH22jFz6GZd/qxqjO6MJHQhcsjvjOFXyDhyLQUnMveQ==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@swc/counter": "^0.1.3" - } - }, - "node_modules/@szmarczak/http-timer": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-4.0.6.tgz", - "integrity": "sha512-4BAffykYOgO+5nzBWYwE3W90sBgLJoUPRWWcL8wlyiM8IB8ipJz3UMJ9KXQd1RKQXpKp8Tutn80HZtWsu2u76w==", - "dev": true, - "license": "MIT", - "dependencies": { - "defer-to-connect": "^2.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/@tanstack/query-core": { - "version": "5.66.4", - "resolved": "https://registry.npmjs.org/@tanstack/query-core/-/query-core-5.66.4.tgz", - "integrity": "sha512-skM/gzNX4shPkqmdTCSoHtJAPMTtmIJNS0hE+xwTTUVYwezArCT34NMermABmBVUg5Ls5aiUXEDXfqwR1oVkcA==", - "license": "MIT", - "peer": true, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/tannerlinsley" - } - }, - "node_modules/@tanstack/react-query": { - "version": "5.66.8", - "resolved": "https://registry.npmjs.org/@tanstack/react-query/-/react-query-5.66.8.tgz", - "integrity": "sha512-LqYHYArmM7ycyT1I/Txc/n6KzI8S/hBFw2SQ9Uj1GpbZ89AvZLEvetquiQEHkZ5rFEm+iVNpZ6zYjTiPmJ9N5Q==", - "license": "MIT", - "peer": true, - "dependencies": { - "@tanstack/query-core": "5.66.4" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/tannerlinsley" - }, - "peerDependencies": { - "react": "^18 || ^19" - } - }, - "node_modules/@tokenizer/token": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/@tokenizer/token/-/token-0.3.0.tgz", - "integrity": "sha512-OvjF+z51L3ov0OyAU0duzsYuvO01PH7x4t6DJx+guahgTnBHkhJdG7soQeTSFLWN3efnHyibZ4Z8l2EuWwJN3A==", - "dev": true, - "license": "MIT" - }, - "node_modules/@tsconfig/node10": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.11.tgz", - "integrity": "sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==", - "dev": true, - "license": "MIT" - }, - "node_modules/@tsconfig/node12": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", - "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", - "dev": true, - "license": "MIT" - }, - "node_modules/@tsconfig/node14": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", - "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", - "dev": true, - "license": "MIT" - }, - "node_modules/@tsconfig/node16": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", - "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/big.js": { - "version": "6.1.6", - "resolved": "https://registry.npmjs.org/@types/big.js/-/big.js-6.1.6.tgz", - "integrity": "sha512-0r9J+Zz9rYm2hOTwiMAVkm3XFQ4u5uTK37xrQMhc9bysn/sf/okzovWMYYIBMFTn/yrEZ11pusgLEaoarTlQbA==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/bn.js": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.6.tgz", - "integrity": "sha512-Xh8vSwUeMKeYYrj3cX4lGQgFSF/N03r+tv4AiLl1SucqV+uTQpxRcnM8AkXKHwYP9ZPXOYXRr2KPXpVlIvqh9w==", - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/cacheable-request": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/@types/cacheable-request/-/cacheable-request-6.0.3.tgz", - "integrity": "sha512-IQ3EbTzGxIigb1I3qPZc1rWJnH0BmSKv5QYTalEwweFvyBDLSAe24zP0le/hyi7ecGfZVlIVAg4BZqb8WBwKqw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/http-cache-semantics": "*", - "@types/keyv": "^3.1.4", - "@types/node": "*", - "@types/responselike": "^1.0.0" - } - }, - "node_modules/@types/chai": { - "version": "4.3.20", - "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.20.tgz", - "integrity": "sha512-/pC9HAB5I/xMlc5FP77qjCnI16ChlJfW0tGa0IUcFn38VJrTV6DeZ60NU5KZBtaOZqjdpwTWohz5HU1RrhiYxQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/chai-subset": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/@types/chai-subset/-/chai-subset-1.3.5.tgz", - "integrity": "sha512-c2mPnw+xHtXDoHmdtcCXGwyLMiauiAyxWMzhGpqHC4nqI/Y5G2XhTampslK2rb59kpcuHon03UH8W6iYUzw88A==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/chai": "*" - } - }, - "node_modules/@types/debug": { - "version": "4.1.12", - "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.12.tgz", - "integrity": "sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==", - "license": "MIT", - "dependencies": { - "@types/ms": "*" - } - }, - "node_modules/@types/http-cache-semantics": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.4.tgz", - "integrity": "sha512-1m0bIFVc7eJWyve9S0RnuRgcQqF/Xd5QsUZAZeQFr1Q3/p9JWoQQEqmVy+DPTNpGXwhgIetAoYF8JSc33q29QA==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/istanbul-lib-coverage": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", - "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/json-schema": { - "version": "7.0.15", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", - "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/keyv": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/@types/keyv/-/keyv-3.1.4.tgz", - "integrity": "sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-hov8bUuiLiyFPGyFPE1lwWhmzYbirOXQNNo40+y3zow8aFVTeyn3VWL0VFFfdNddA8S4Vf0Tc062rzyNr7Paag==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/ms": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@types/ms/-/ms-2.1.0.tgz", - "integrity": "sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA==", - "license": "MIT" - }, - "node_modules/@types/node": { - "version": "18.7.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.7.1.tgz", - "integrity": "sha512-GKX1Qnqxo4S+Z/+Z8KKPLpH282LD7jLHWJcVryOflnsnH+BtSDfieR6ObwBMwpnNws0bUK8GI7z0unQf9bARNQ==", - "license": "MIT" - }, - "node_modules/@types/normalize-package-data": { - "version": "2.4.4", - "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.4.tgz", - "integrity": "sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/parse-json": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.2.tgz", - "integrity": "sha512-dISoDXWWQwUquiKsyZ4Ng+HX2KsPL7LyHKHQwgGFEA3IaKac4Obd+h2a/a6waisAoepJlBcx9paWqjA8/HVjCw==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/responselike": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@types/responselike/-/responselike-1.0.3.tgz", - "integrity": "sha512-H/+L+UkTV33uf49PH5pCAUBVPNj2nDBXTN+qS1dOwyyg24l3CcicicCA7ca+HMvJBZcFgl5r8e+RR6elsb4Lyw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/semver": { - "version": "7.5.8", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.8.tgz", - "integrity": "sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/trusted-types": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.7.tgz", - "integrity": "sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==", - "license": "MIT" - }, - "node_modules/@types/uuid": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-9.0.1.tgz", - "integrity": "sha512-rFT3ak0/2trgvp4yYZo5iKFEPsET7vKydKF+VRCxlQ9bpheehyAJH89dAkaLEq/j/RZXJIqcgsmPJKUP1Z28HA==", - "dev": true, - "license": "MIT" - }, - "node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.60.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.60.1.tgz", - "integrity": "sha512-KSWsVvsJsLJv3c4e73y/Bzt7OpqMCADUO846bHcuWYSYM19bldbAeDv7dYyV0jwkbMfJ2XdlzwjhXtuD7OY6bw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/regexpp": "^4.4.0", - "@typescript-eslint/scope-manager": "5.60.1", - "@typescript-eslint/type-utils": "5.60.1", - "@typescript-eslint/utils": "5.60.1", - "debug": "^4.3.4", - "grapheme-splitter": "^1.0.4", - "ignore": "^5.2.0", - "natural-compare-lite": "^1.4.0", - "semver": "^7.3.7", - "tsutils": "^3.21.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "@typescript-eslint/parser": "^5.0.0", - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/type-utils": { - "version": "5.60.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.60.1.tgz", - "integrity": "sha512-vN6UztYqIu05nu7JqwQGzQKUJctzs3/Hg7E2Yx8rz9J+4LgtIDFWjjl1gm3pycH0P3mHAcEUBd23LVgfrsTR8A==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/typescript-estree": "5.60.1", - "@typescript-eslint/utils": "5.60.1", - "debug": "^4.3.4", - "tsutils": "^3.21.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "*" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/utils": { - "version": "5.60.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.60.1.tgz", - "integrity": "sha512-tiJ7FFdFQOWssFa3gqb94Ilexyw0JVxj6vBzaSpfN/8IhoKkDuSAenUKvsSHw2A/TMpJb26izIszTXaqygkvpQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/eslint-utils": "^4.2.0", - "@types/json-schema": "^7.0.9", - "@types/semver": "^7.3.12", - "@typescript-eslint/scope-manager": "5.60.1", - "@typescript-eslint/types": "5.60.1", - "@typescript-eslint/typescript-estree": "5.60.1", - "eslint-scope": "^5.1.1", - "semver": "^7.3.7" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, - "node_modules/@typescript-eslint/eslint-plugin/node_modules/semver": { - "version": "7.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz", - "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/@typescript-eslint/parser": { - "version": "5.60.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.60.1.tgz", - "integrity": "sha512-pHWlc3alg2oSMGwsU/Is8hbm3XFbcrb6P5wIxcQW9NsYBfnrubl/GhVVD/Jm/t8HXhA2WncoIRfBtnCgRGV96Q==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "@typescript-eslint/scope-manager": "5.60.1", - "@typescript-eslint/types": "5.60.1", - "@typescript-eslint/typescript-estree": "5.60.1", - "debug": "^4.3.4" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/scope-manager": { - "version": "5.60.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.60.1.tgz", - "integrity": "sha512-Dn/LnN7fEoRD+KspEOV0xDMynEmR3iSHdgNsarlXNLGGtcUok8L4N71dxUgt3YvlO8si7E+BJ5Fe3wb5yUw7DQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "5.60.1", - "@typescript-eslint/visitor-keys": "5.60.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/type-utils": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.62.0.tgz", - "integrity": "sha512-xsSQreu+VnfbqQpW5vnCJdq1Z3Q0U31qiWmRhr98ONQmcp/yhiPJFPq8MXiJVLiksmOKSjIldZzkebzHuCGzew==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/typescript-estree": "5.62.0", - "@typescript-eslint/utils": "5.62.0", - "debug": "^4.3.4", - "tsutils": "^3.21.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "*" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/types": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.62.0.tgz", - "integrity": "sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/typescript-estree": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.62.0.tgz", - "integrity": "sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "@typescript-eslint/types": "5.62.0", - "@typescript-eslint/visitor-keys": "5.62.0", - "debug": "^4.3.4", - "globby": "^11.1.0", - "is-glob": "^4.0.3", - "semver": "^7.3.7", - "tsutils": "^3.21.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/visitor-keys": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz", - "integrity": "sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "5.62.0", - "eslint-visitor-keys": "^3.3.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/type-utils/node_modules/semver": { - "version": "7.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz", - "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/@typescript-eslint/types": { - "version": "5.60.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.60.1.tgz", - "integrity": "sha512-zDcDx5fccU8BA0IDZc71bAtYIcG9PowaOwaD8rjYbqwK7dpe/UMQl3inJ4UtUK42nOCT41jTSCwg76E62JpMcg==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/typescript-estree": { - "version": "5.60.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.60.1.tgz", - "integrity": "sha512-hkX70J9+2M2ZT6fhti5Q2FoU9zb+GeZK2SLP1WZlvUDqdMbEKhexZODD1WodNRyO8eS+4nScvT0dts8IdaBzfw==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "@typescript-eslint/types": "5.60.1", - "@typescript-eslint/visitor-keys": "5.60.1", - "debug": "^4.3.4", - "globby": "^11.1.0", - "is-glob": "^4.0.3", - "semver": "^7.3.7", - "tsutils": "^3.21.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/semver": { - "version": "7.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz", - "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/@typescript-eslint/utils": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.62.0.tgz", - "integrity": "sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/eslint-utils": "^4.2.0", - "@types/json-schema": "^7.0.9", - "@types/semver": "^7.3.12", - "@typescript-eslint/scope-manager": "5.62.0", - "@typescript-eslint/types": "5.62.0", - "@typescript-eslint/typescript-estree": "5.62.0", - "eslint-scope": "^5.1.1", - "semver": "^7.3.7" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, - "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/scope-manager": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.62.0.tgz", - "integrity": "sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "5.62.0", - "@typescript-eslint/visitor-keys": "5.62.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/types": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.62.0.tgz", - "integrity": "sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/typescript-estree": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.62.0.tgz", - "integrity": "sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==", - "dev": true, - "license": "BSD-2-Clause", + "devOptional": true, + "license": "Apache-2.0", "dependencies": { - "@typescript-eslint/types": "5.62.0", - "@typescript-eslint/visitor-keys": "5.62.0", - "debug": "^4.3.4", - "globby": "^11.1.0", - "is-glob": "^4.0.3", - "semver": "^7.3.7", - "tsutils": "^3.21.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } + "@swc/counter": "^0.1.3" } }, - "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/visitor-keys": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz", - "integrity": "sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==", + "node_modules/@szmarczak/http-timer": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-4.0.6.tgz", + "integrity": "sha512-4BAffykYOgO+5nzBWYwE3W90sBgLJoUPRWWcL8wlyiM8IB8ipJz3UMJ9KXQd1RKQXpKp8Tutn80HZtWsu2u76w==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "5.62.0", - "eslint-visitor-keys": "^3.3.0" + "defer-to-connect": "^2.0.0" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, + "node": ">=10" + } + }, + "node_modules/@tanstack/query-core": { + "version": "5.66.4", + "resolved": "https://registry.npmjs.org/@tanstack/query-core/-/query-core-5.66.4.tgz", + "integrity": "sha512-skM/gzNX4shPkqmdTCSoHtJAPMTtmIJNS0hE+xwTTUVYwezArCT34NMermABmBVUg5Ls5aiUXEDXfqwR1oVkcA==", + "license": "MIT", + "optional": true, + "peer": true, "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" + "type": "github", + "url": "https://github.com/sponsors/tannerlinsley" } }, - "node_modules/@typescript-eslint/utils/node_modules/semver": { - "version": "7.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz", - "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==", + "node_modules/@tokenizer/token": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/@tokenizer/token/-/token-0.3.0.tgz", + "integrity": "sha512-OvjF+z51L3ov0OyAU0duzsYuvO01PH7x4t6DJx+guahgTnBHkhJdG7soQeTSFLWN3efnHyibZ4Z8l2EuWwJN3A==", "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } + "license": "MIT" }, - "node_modules/@typescript-eslint/visitor-keys": { - "version": "5.60.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.60.1.tgz", - "integrity": "sha512-xEYIxKcultP6E/RMKqube11pGjXH1DCo60mQoWhVYyKfLkwbIVVjYxmOenNMxILx0TjCujPTjjnTIVzm09TXIw==", + "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==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/@tsconfig/node12": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", + "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/@tsconfig/node14": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", + "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/@tsconfig/node16": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", + "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/@types/big.js": { + "version": "6.1.6", + "resolved": "https://registry.npmjs.org/@types/big.js/-/big.js-6.1.6.tgz", + "integrity": "sha512-0r9J+Zz9rYm2hOTwiMAVkm3XFQ4u5uTK37xrQMhc9bysn/sf/okzovWMYYIBMFTn/yrEZ11pusgLEaoarTlQbA==", "dev": true, + "license": "MIT" + }, + "node_modules/@types/bn.js": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.6.tgz", + "integrity": "sha512-Xh8vSwUeMKeYYrj3cX4lGQgFSF/N03r+tv4AiLl1SucqV+uTQpxRcnM8AkXKHwYP9ZPXOYXRr2KPXpVlIvqh9w==", "license": "MIT", "dependencies": { - "@typescript-eslint/types": "5.60.1", - "eslint-visitor-keys": "^3.3.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" + "@types/node": "*" } }, - "node_modules/@vitest/coverage-c8": { - "version": "0.32.4", - "resolved": "https://registry.npmjs.org/@vitest/coverage-c8/-/coverage-c8-0.32.4.tgz", - "integrity": "sha512-ahJowPxgSBnaI2J+L/xmzM2oWFkk/+HtjnRfkQZrZd7H80JyG1/D6Xp6UPSZk8MXnoa90NThoyXRDBt12tNBRg==", - "deprecated": "v8 coverage is moved to @vitest/coverage-v8 package", + "node_modules/@types/cacheable-request": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/@types/cacheable-request/-/cacheable-request-6.0.3.tgz", + "integrity": "sha512-IQ3EbTzGxIigb1I3qPZc1rWJnH0BmSKv5QYTalEwweFvyBDLSAe24zP0le/hyi7ecGfZVlIVAg4BZqb8WBwKqw==", "dev": true, "license": "MIT", "dependencies": { - "@ampproject/remapping": "^2.2.1", - "c8": "^7.14.0", - "magic-string": "^0.30.0", - "picocolors": "^1.0.0", - "std-env": "^3.3.3" - }, - "funding": { - "url": "https://opencollective.com/vitest" - }, - "peerDependencies": { - "vitest": ">=0.30.0 <1" + "@types/http-cache-semantics": "*", + "@types/keyv": "^3.1.4", + "@types/node": "*", + "@types/responselike": "^1.0.0" } }, - "node_modules/@vitest/expect": { - "version": "0.32.4", - "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-0.32.4.tgz", - "integrity": "sha512-m7EPUqmGIwIeoU763N+ivkFjTzbaBn0n9evsTOcde03ugy2avPs3kZbYmw3DkcH1j5mxhMhdamJkLQ6dM1bk/A==", + "node_modules/@types/chai": { + "version": "4.3.20", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.20.tgz", + "integrity": "sha512-/pC9HAB5I/xMlc5FP77qjCnI16ChlJfW0tGa0IUcFn38VJrTV6DeZ60NU5KZBtaOZqjdpwTWohz5HU1RrhiYxQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/chai-subset": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/@types/chai-subset/-/chai-subset-1.3.5.tgz", + "integrity": "sha512-c2mPnw+xHtXDoHmdtcCXGwyLMiauiAyxWMzhGpqHC4nqI/Y5G2XhTampslK2rb59kpcuHon03UH8W6iYUzw88A==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/spy": "0.32.4", - "@vitest/utils": "0.32.4", - "chai": "^4.3.7" - }, - "funding": { - "url": "https://opencollective.com/vitest" + "@types/chai": "*" } }, - "node_modules/@vitest/runner": { - "version": "0.32.4", - "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-0.32.4.tgz", - "integrity": "sha512-cHOVCkiRazobgdKLnczmz2oaKK9GJOw6ZyRcaPdssO1ej+wzHVIkWiCiNacb3TTYPdzMddYkCgMjZ4r8C0JFCw==", + "node_modules/@types/http-cache-semantics": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.4.tgz", + "integrity": "sha512-1m0bIFVc7eJWyve9S0RnuRgcQqF/Xd5QsUZAZeQFr1Q3/p9JWoQQEqmVy+DPTNpGXwhgIetAoYF8JSc33q29QA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/istanbul-lib-coverage": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", + "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/keyv": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/@types/keyv/-/keyv-3.1.4.tgz", + "integrity": "sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/utils": "0.32.4", - "p-limit": "^4.0.0", - "pathe": "^1.1.1" - }, - "funding": { - "url": "https://opencollective.com/vitest" + "@types/node": "*" } }, - "node_modules/@vitest/runner/node_modules/p-limit": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-4.0.0.tgz", - "integrity": "sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==", + "node_modules/@types/minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-hov8bUuiLiyFPGyFPE1lwWhmzYbirOXQNNo40+y3zow8aFVTeyn3VWL0VFFfdNddA8S4Vf0Tc062rzyNr7Paag==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/node": { + "version": "18.7.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.7.1.tgz", + "integrity": "sha512-GKX1Qnqxo4S+Z/+Z8KKPLpH282LD7jLHWJcVryOflnsnH+BtSDfieR6ObwBMwpnNws0bUK8GI7z0unQf9bARNQ==", + "license": "MIT" + }, + "node_modules/@types/normalize-package-data": { + "version": "2.4.4", + "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.4.tgz", + "integrity": "sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/parse-json": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.2.tgz", + "integrity": "sha512-dISoDXWWQwUquiKsyZ4Ng+HX2KsPL7LyHKHQwgGFEA3IaKac4Obd+h2a/a6waisAoepJlBcx9paWqjA8/HVjCw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/responselike": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@types/responselike/-/responselike-1.0.3.tgz", + "integrity": "sha512-H/+L+UkTV33uf49PH5pCAUBVPNj2nDBXTN+qS1dOwyyg24l3CcicicCA7ca+HMvJBZcFgl5r8e+RR6elsb4Lyw==", "dev": true, "license": "MIT", "dependencies": { - "yocto-queue": "^1.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "@types/node": "*" } }, - "node_modules/@vitest/runner/node_modules/yocto-queue": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.1.1.tgz", - "integrity": "sha512-b4JR1PFR10y1mKjhHY9LaGo6tmrgjit7hxVIeAmyMw3jegXR4dhYqLaQF5zMXZxY7tLpMyJeLjr1C4rLmkVe8g==", + "node_modules/@types/semver": { + "version": "7.5.8", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.8.tgz", + "integrity": "sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-rFT3ak0/2trgvp4yYZo5iKFEPsET7vKydKF+VRCxlQ9bpheehyAJH89dAkaLEq/j/RZXJIqcgsmPJKUP1Z28HA==", "dev": true, - "license": "MIT", - "engines": { - "node": ">=12.20" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } + "license": "MIT" }, - "node_modules/@vitest/snapshot": { - "version": "0.32.4", - "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-0.32.4.tgz", - "integrity": "sha512-IRpyqn9t14uqsFlVI2d7DFMImGMs1Q9218of40bdQQgMePwVdmix33yMNnebXcTzDU5eiV3eUsoxxH5v0x/IQA==", + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "5.60.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.60.1.tgz", + "integrity": "sha512-KSWsVvsJsLJv3c4e73y/Bzt7OpqMCADUO846bHcuWYSYM19bldbAeDv7dYyV0jwkbMfJ2XdlzwjhXtuD7OY6bw==", "dev": true, "license": "MIT", "dependencies": { - "magic-string": "^0.30.0", - "pathe": "^1.1.1", - "pretty-format": "^29.5.0" + "@eslint-community/regexpp": "^4.4.0", + "@typescript-eslint/scope-manager": "5.60.1", + "@typescript-eslint/type-utils": "5.60.1", + "@typescript-eslint/utils": "5.60.1", + "debug": "^4.3.4", + "grapheme-splitter": "^1.0.4", + "ignore": "^5.2.0", + "natural-compare-lite": "^1.4.0", + "semver": "^7.3.7", + "tsutils": "^3.21.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { - "url": "https://opencollective.com/vitest" + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^5.0.0", + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } } }, - "node_modules/@vitest/spy": { - "version": "0.32.4", - "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-0.32.4.tgz", - "integrity": "sha512-oA7rCOqVOOpE6rEoXuCOADX7Lla1LIa4hljI2MSccbpec54q+oifhziZIJXxlE/CvI2E+ElhBHzVu0VEvJGQKQ==", + "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/type-utils": { + "version": "5.60.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.60.1.tgz", + "integrity": "sha512-vN6UztYqIu05nu7JqwQGzQKUJctzs3/Hg7E2Yx8rz9J+4LgtIDFWjjl1gm3pycH0P3mHAcEUBd23LVgfrsTR8A==", "dev": true, "license": "MIT", "dependencies": { - "tinyspy": "^2.1.1" + "@typescript-eslint/typescript-estree": "5.60.1", + "@typescript-eslint/utils": "5.60.1", + "debug": "^4.3.4", + "tsutils": "^3.21.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { - "url": "https://opencollective.com/vitest" + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "*" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } } }, - "node_modules/@vitest/ui": { - "version": "0.32.4", - "resolved": "https://registry.npmjs.org/@vitest/ui/-/ui-0.32.4.tgz", - "integrity": "sha512-92y7bkjf55L08nomvHHYQkDWQEIkb36dJkgi+F/zpO5cFbrmk1pv/dYiaZKQ772uP96fAWinmux6sXNMNUh16w==", + "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/utils": { + "version": "5.60.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.60.1.tgz", + "integrity": "sha512-tiJ7FFdFQOWssFa3gqb94Ilexyw0JVxj6vBzaSpfN/8IhoKkDuSAenUKvsSHw2A/TMpJb26izIszTXaqygkvpQ==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/utils": "0.32.4", - "fast-glob": "^3.2.12", - "fflate": "^0.8.0", - "flatted": "^3.2.7", - "pathe": "^1.1.1", - "picocolors": "^1.0.0", - "sirv": "^2.0.3" + "@eslint-community/eslint-utils": "^4.2.0", + "@types/json-schema": "^7.0.9", + "@types/semver": "^7.3.12", + "@typescript-eslint/scope-manager": "5.60.1", + "@typescript-eslint/types": "5.60.1", + "@typescript-eslint/typescript-estree": "5.60.1", + "eslint-scope": "^5.1.1", + "semver": "^7.3.7" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { - "url": "https://opencollective.com/vitest" + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "vitest": ">=0.30.1 <1" + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, - "node_modules/@vitest/ui/node_modules/fast-glob": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", - "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", + "node_modules/@typescript-eslint/eslint-plugin/node_modules/semver": { + "version": "7.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz", + "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==", "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.8" + "license": "ISC", + "bin": { + "semver": "bin/semver.js" }, "engines": { - "node": ">=8.6.0" + "node": ">=10" } }, - "node_modules/@vitest/ui/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==", + "node_modules/@typescript-eslint/parser": { + "version": "5.60.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.60.1.tgz", + "integrity": "sha512-pHWlc3alg2oSMGwsU/Is8hbm3XFbcrb6P5wIxcQW9NsYBfnrubl/GhVVD/Jm/t8HXhA2WncoIRfBtnCgRGV96Q==", "dev": true, - "license": "ISC", + "license": "BSD-2-Clause", "dependencies": { - "is-glob": "^4.0.1" + "@typescript-eslint/scope-manager": "5.60.1", + "@typescript-eslint/types": "5.60.1", + "@typescript-eslint/typescript-estree": "5.60.1", + "debug": "^4.3.4" }, "engines": { - "node": ">= 6" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } } }, - "node_modules/@vitest/utils": { - "version": "0.32.4", - "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-0.32.4.tgz", - "integrity": "sha512-Gwnl8dhd1uJ+HXrYyV0eRqfmk9ek1ASE/LWfTCuWMw+d07ogHqp4hEAV28NiecimK6UY9DpSEPh+pXBA5gtTBg==", + "node_modules/@typescript-eslint/scope-manager": { + "version": "5.60.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.60.1.tgz", + "integrity": "sha512-Dn/LnN7fEoRD+KspEOV0xDMynEmR3iSHdgNsarlXNLGGtcUok8L4N71dxUgt3YvlO8si7E+BJ5Fe3wb5yUw7DQ==", "dev": true, "license": "MIT", "dependencies": { - "diff-sequences": "^29.4.3", - "loupe": "^2.3.6", - "pretty-format": "^29.5.0" + "@typescript-eslint/types": "5.60.1", + "@typescript-eslint/visitor-keys": "5.60.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { - "url": "https://opencollective.com/vitest" + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/@wagmi/connectors": { - "version": "5.7.7", - "resolved": "https://registry.npmjs.org/@wagmi/connectors/-/connectors-5.7.7.tgz", - "integrity": "sha512-hveKxuR35ZQQyteLo7aiN/TBVECYKVbLNTYGGgqzTNHJ8vVoblTP9PwPrRPGOPi5ji8raYSFWShxNK7QpGL+Kg==", + "node_modules/@typescript-eslint/type-utils": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.62.0.tgz", + "integrity": "sha512-xsSQreu+VnfbqQpW5vnCJdq1Z3Q0U31qiWmRhr98ONQmcp/yhiPJFPq8MXiJVLiksmOKSjIldZzkebzHuCGzew==", + "dev": true, "license": "MIT", "dependencies": { - "@coinbase/wallet-sdk": "4.3.0", - "@metamask/sdk": "0.32.0", - "@safe-global/safe-apps-provider": "0.18.5", - "@safe-global/safe-apps-sdk": "9.1.0", - "@walletconnect/ethereum-provider": "2.17.0", - "cbw-sdk": "npm:@coinbase/wallet-sdk@3.9.3" + "@typescript-eslint/typescript-estree": "5.62.0", + "@typescript-eslint/utils": "5.62.0", + "debug": "^4.3.4", + "tsutils": "^3.21.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { - "url": "https://github.com/sponsors/wevm" + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@wagmi/core": "2.16.4", - "typescript": ">=5.0.4", - "viem": "2.x" + "eslint": "*" }, "peerDependenciesMeta": { "typescript": { @@ -6510,454 +5209,445 @@ } } }, - "node_modules/@wagmi/core": { - "version": "2.16.4", - "resolved": "https://registry.npmjs.org/@wagmi/core/-/core-2.16.4.tgz", - "integrity": "sha512-E4jY4A98gwuHCjzuEajHIG/WhNDY5BChVHMjflV9Bx5CO7COqYRG2dcRLuF6Bo0LQNvVvXDAFUwR2JShJnT5pA==", + "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/types": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.62.0.tgz", + "integrity": "sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==", + "dev": true, "license": "MIT", - "dependencies": { - "eventemitter3": "5.0.1", - "mipd": "0.0.7", - "zustand": "5.0.0" + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { - "url": "https://github.com/sponsors/wevm" - }, - "peerDependencies": { - "@tanstack/query-core": ">=5.0.0", - "typescript": ">=5.0.4", - "viem": "2.x" - }, - "peerDependenciesMeta": { - "@tanstack/query-core": { - "optional": true - }, - "typescript": { - "optional": true - } + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/@walletconnect/core": { - "version": "2.17.0", - "resolved": "https://registry.npmjs.org/@walletconnect/core/-/core-2.17.0.tgz", - "integrity": "sha512-On+uSaCfWdsMIQsECwWHZBmUXfrnqmv6B8SXRRuTJgd8tUpEvBkLQH4X7XkSm3zW6ozEkQTCagZ2ox2YPn3kbw==", - "license": "Apache-2.0", + "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/typescript-estree": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.62.0.tgz", + "integrity": "sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==", + "dev": true, + "license": "BSD-2-Clause", "dependencies": { - "@walletconnect/heartbeat": "1.2.2", - "@walletconnect/jsonrpc-provider": "1.0.14", - "@walletconnect/jsonrpc-types": "1.0.4", - "@walletconnect/jsonrpc-utils": "1.0.8", - "@walletconnect/jsonrpc-ws-connection": "1.0.14", - "@walletconnect/keyvaluestorage": "1.1.1", - "@walletconnect/logger": "2.1.2", - "@walletconnect/relay-api": "1.0.11", - "@walletconnect/relay-auth": "1.0.4", - "@walletconnect/safe-json": "1.0.2", - "@walletconnect/time": "1.0.2", - "@walletconnect/types": "2.17.0", - "@walletconnect/utils": "2.17.0", - "events": "3.3.0", - "lodash.isequal": "4.5.0", - "uint8arrays": "3.1.0" + "@typescript-eslint/types": "5.62.0", + "@typescript-eslint/visitor-keys": "5.62.0", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "semver": "^7.3.7", + "tsutils": "^3.21.0" }, "engines": { - "node": ">=18" - } - }, - "node_modules/@walletconnect/environment": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@walletconnect/environment/-/environment-1.0.1.tgz", - "integrity": "sha512-T426LLZtHj8e8rYnKfzsw1aG6+M0BT1ZxayMdv/p8yM0MU+eJDISqNY3/bccxRr4LrF9csq02Rhqt08Ibl0VRg==", - "license": "MIT", - "dependencies": { - "tslib": "1.14.1" - } - }, - "node_modules/@walletconnect/environment/node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "license": "0BSD" - }, - "node_modules/@walletconnect/ethereum-provider": { - "version": "2.17.0", - "resolved": "https://registry.npmjs.org/@walletconnect/ethereum-provider/-/ethereum-provider-2.17.0.tgz", - "integrity": "sha512-b+KTAXOb6JjoxkwpgYQQKPUcTwENGmdEdZoIDLeRicUmZTn/IQKfkMoC2frClB4YxkyoVMtj1oMV2JAax+yu9A==", - "license": "Apache-2.0", - "dependencies": { - "@walletconnect/jsonrpc-http-connection": "1.0.8", - "@walletconnect/jsonrpc-provider": "1.0.14", - "@walletconnect/jsonrpc-types": "1.0.4", - "@walletconnect/jsonrpc-utils": "1.0.8", - "@walletconnect/modal": "2.7.0", - "@walletconnect/sign-client": "2.17.0", - "@walletconnect/types": "2.17.0", - "@walletconnect/universal-provider": "2.17.0", - "@walletconnect/utils": "2.17.0", - "events": "3.3.0" - } - }, - "node_modules/@walletconnect/events": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@walletconnect/events/-/events-1.0.1.tgz", - "integrity": "sha512-NPTqaoi0oPBVNuLv7qPaJazmGHs5JGyO8eEAk5VGKmJzDR7AHzD4k6ilox5kxk1iwiOnFopBOOMLs86Oa76HpQ==", - "license": "MIT", - "dependencies": { - "keyvaluestorage-interface": "^1.0.0", - "tslib": "1.14.1" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } } }, - "node_modules/@walletconnect/events/node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "license": "0BSD" - }, - "node_modules/@walletconnect/heartbeat": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/@walletconnect/heartbeat/-/heartbeat-1.2.2.tgz", - "integrity": "sha512-uASiRmC5MwhuRuf05vq4AT48Pq8RMi876zV8rr8cV969uTOzWdB/k+Lj5yI2PBtB1bGQisGen7MM1GcZlQTBXw==", + "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/visitor-keys": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz", + "integrity": "sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==", + "dev": true, "license": "MIT", "dependencies": { - "@walletconnect/events": "^1.0.1", - "@walletconnect/time": "^1.0.2", - "events": "^3.3.0" + "@typescript-eslint/types": "5.62.0", + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/@walletconnect/jsonrpc-http-connection": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/@walletconnect/jsonrpc-http-connection/-/jsonrpc-http-connection-1.0.8.tgz", - "integrity": "sha512-+B7cRuaxijLeFDJUq5hAzNyef3e3tBDIxyaCNmFtjwnod5AGis3RToNqzFU33vpVcxFhofkpE7Cx+5MYejbMGw==", - "license": "MIT", - "dependencies": { - "@walletconnect/jsonrpc-utils": "^1.0.6", - "@walletconnect/safe-json": "^1.0.1", - "cross-fetch": "^3.1.4", - "events": "^3.3.0" + "node_modules/@typescript-eslint/type-utils/node_modules/semver": { + "version": "7.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz", + "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" } }, - "node_modules/@walletconnect/jsonrpc-http-connection/node_modules/cross-fetch": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.2.0.tgz", - "integrity": "sha512-Q+xVJLoGOeIMXZmbUK4HYk+69cQH6LudR0Vu/pRm2YlU/hDV9CiS0gKUMaWY5f2NeUH9C1nV3bsTlCo0FsTV1Q==", + "node_modules/@typescript-eslint/types": { + "version": "5.60.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.60.1.tgz", + "integrity": "sha512-zDcDx5fccU8BA0IDZc71bAtYIcG9PowaOwaD8rjYbqwK7dpe/UMQl3inJ4UtUK42nOCT41jTSCwg76E62JpMcg==", + "dev": true, "license": "MIT", - "dependencies": { - "node-fetch": "^2.7.0" + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/@walletconnect/jsonrpc-http-connection/node_modules/node-fetch": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", - "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", - "license": "MIT", + "node_modules/@typescript-eslint/typescript-estree": { + "version": "5.60.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.60.1.tgz", + "integrity": "sha512-hkX70J9+2M2ZT6fhti5Q2FoU9zb+GeZK2SLP1WZlvUDqdMbEKhexZODD1WodNRyO8eS+4nScvT0dts8IdaBzfw==", + "dev": true, + "license": "BSD-2-Clause", "dependencies": { - "whatwg-url": "^5.0.0" + "@typescript-eslint/types": "5.60.1", + "@typescript-eslint/visitor-keys": "5.60.1", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "semver": "^7.3.7", + "tsutils": "^3.21.0" }, "engines": { - "node": "4.x || >=6.0.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, - "peerDependencies": { - "encoding": "^0.1.0" + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" }, "peerDependenciesMeta": { - "encoding": { + "typescript": { "optional": true } } }, - "node_modules/@walletconnect/jsonrpc-provider": { - "version": "1.0.14", - "resolved": "https://registry.npmjs.org/@walletconnect/jsonrpc-provider/-/jsonrpc-provider-1.0.14.tgz", - "integrity": "sha512-rtsNY1XqHvWj0EtITNeuf8PHMvlCLiS3EjQL+WOkxEOA4KPxsohFnBDeyPYiNm4ZvkQdLnece36opYidmtbmow==", - "license": "MIT", - "dependencies": { - "@walletconnect/jsonrpc-utils": "^1.0.8", - "@walletconnect/safe-json": "^1.0.2", - "events": "^3.3.0" + "node_modules/@typescript-eslint/typescript-estree/node_modules/semver": { + "version": "7.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz", + "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" } }, - "node_modules/@walletconnect/jsonrpc-types": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@walletconnect/jsonrpc-types/-/jsonrpc-types-1.0.4.tgz", - "integrity": "sha512-P6679fG/M+wuWg9TY8mh6xFSdYnFyFjwFelxyISxMDrlbXokorEVXYOxiqEbrU3x1BmBoCAJJ+vtEaEoMlpCBQ==", + "node_modules/@typescript-eslint/utils": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.62.0.tgz", + "integrity": "sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ==", + "dev": true, "license": "MIT", "dependencies": { - "events": "^3.3.0", - "keyvaluestorage-interface": "^1.0.0" + "@eslint-community/eslint-utils": "^4.2.0", + "@types/json-schema": "^7.0.9", + "@types/semver": "^7.3.12", + "@typescript-eslint/scope-manager": "5.62.0", + "@typescript-eslint/types": "5.62.0", + "@typescript-eslint/typescript-estree": "5.62.0", + "eslint-scope": "^5.1.1", + "semver": "^7.3.7" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, - "node_modules/@walletconnect/jsonrpc-utils": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/@walletconnect/jsonrpc-utils/-/jsonrpc-utils-1.0.8.tgz", - "integrity": "sha512-vdeb03bD8VzJUL6ZtzRYsFMq1eZQcM3EAzT0a3st59dyLfJ0wq+tKMpmGH7HlB7waD858UWgfIcudbPFsbzVdw==", + "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/scope-manager": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.62.0.tgz", + "integrity": "sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w==", + "dev": true, "license": "MIT", "dependencies": { - "@walletconnect/environment": "^1.0.1", - "@walletconnect/jsonrpc-types": "^1.0.3", - "tslib": "1.14.1" + "@typescript-eslint/types": "5.62.0", + "@typescript-eslint/visitor-keys": "5.62.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/@walletconnect/jsonrpc-utils/node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "license": "0BSD" - }, - "node_modules/@walletconnect/jsonrpc-ws-connection": { - "version": "1.0.14", - "resolved": "https://registry.npmjs.org/@walletconnect/jsonrpc-ws-connection/-/jsonrpc-ws-connection-1.0.14.tgz", - "integrity": "sha512-Jsl6fC55AYcbkNVkwNM6Jo+ufsuCQRqViOQ8ZBPH9pRREHH9welbBiszuTLqEJiQcO/6XfFDl6bzCJIkrEi8XA==", + "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/types": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.62.0.tgz", + "integrity": "sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==", + "dev": true, "license": "MIT", - "dependencies": { - "@walletconnect/jsonrpc-utils": "^1.0.6", - "@walletconnect/safe-json": "^1.0.2", - "events": "^3.3.0", - "ws": "^7.5.1" + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/@walletconnect/jsonrpc-ws-connection/node_modules/ws": { - "version": "7.5.10", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz", - "integrity": "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==", - "license": "MIT", + "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/typescript-estree": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.62.0.tgz", + "integrity": "sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "@typescript-eslint/types": "5.62.0", + "@typescript-eslint/visitor-keys": "5.62.0", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "semver": "^7.3.7", + "tsutils": "^3.21.0" + }, "engines": { - "node": ">=8.3.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": "^5.0.2" + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" }, "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { + "typescript": { "optional": true } } }, - "node_modules/@walletconnect/keyvaluestorage": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@walletconnect/keyvaluestorage/-/keyvaluestorage-1.1.1.tgz", - "integrity": "sha512-V7ZQq2+mSxAq7MrRqDxanTzu2RcElfK1PfNYiaVnJgJ7Q7G7hTVwF8voIBx92qsRyGHZihrwNPHuZd1aKkd0rA==", + "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/visitor-keys": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz", + "integrity": "sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==", + "dev": true, "license": "MIT", "dependencies": { - "@walletconnect/safe-json": "^1.0.1", - "idb-keyval": "^6.2.1", - "unstorage": "^1.9.0" + "@typescript-eslint/types": "5.62.0", + "eslint-visitor-keys": "^3.3.0" }, - "peerDependencies": { - "@react-native-async-storage/async-storage": "1.x" + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, - "peerDependenciesMeta": { - "@react-native-async-storage/async-storage": { - "optional": true - } + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/@walletconnect/logger": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/@walletconnect/logger/-/logger-2.1.2.tgz", - "integrity": "sha512-aAb28I3S6pYXZHQm5ESB+V6rDqIYfsnHaQyzFbwUUBFY4H0OXx/YtTl8lvhUNhMMfb9UxbwEBS253TlXUYJWSw==", - "license": "MIT", - "dependencies": { - "@walletconnect/safe-json": "^1.0.2", - "pino": "7.11.0" + "node_modules/@typescript-eslint/utils/node_modules/semver": { + "version": "7.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz", + "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" } }, - "node_modules/@walletconnect/modal": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/@walletconnect/modal/-/modal-2.7.0.tgz", - "integrity": "sha512-RQVt58oJ+rwqnPcIvRFeMGKuXb9qkgSmwz4noF8JZGUym3gUAzVs+uW2NQ1Owm9XOJAV+sANrtJ+VoVq1ftElw==", - "license": "Apache-2.0", + "node_modules/@typescript-eslint/visitor-keys": { + "version": "5.60.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.60.1.tgz", + "integrity": "sha512-xEYIxKcultP6E/RMKqube11pGjXH1DCo60mQoWhVYyKfLkwbIVVjYxmOenNMxILx0TjCujPTjjnTIVzm09TXIw==", + "dev": true, + "license": "MIT", "dependencies": { - "@walletconnect/modal-core": "2.7.0", - "@walletconnect/modal-ui": "2.7.0" + "@typescript-eslint/types": "5.60.1", + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/@walletconnect/modal-core": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/@walletconnect/modal-core/-/modal-core-2.7.0.tgz", - "integrity": "sha512-oyMIfdlNdpyKF2kTJowTixZSo0PGlCJRdssUN/EZdA6H6v03hZnf09JnwpljZNfir2M65Dvjm/15nGrDQnlxSA==", - "license": "Apache-2.0", + "node_modules/@vitest/coverage-c8": { + "version": "0.32.4", + "resolved": "https://registry.npmjs.org/@vitest/coverage-c8/-/coverage-c8-0.32.4.tgz", + "integrity": "sha512-ahJowPxgSBnaI2J+L/xmzM2oWFkk/+HtjnRfkQZrZd7H80JyG1/D6Xp6UPSZk8MXnoa90NThoyXRDBt12tNBRg==", + "deprecated": "v8 coverage is moved to @vitest/coverage-v8 package", + "dev": true, + "license": "MIT", "dependencies": { - "valtio": "1.11.2" + "@ampproject/remapping": "^2.2.1", + "c8": "^7.14.0", + "magic-string": "^0.30.0", + "picocolors": "^1.0.0", + "std-env": "^3.3.3" + }, + "funding": { + "url": "https://opencollective.com/vitest" + }, + "peerDependencies": { + "vitest": ">=0.30.0 <1" } }, - "node_modules/@walletconnect/modal-ui": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/@walletconnect/modal-ui/-/modal-ui-2.7.0.tgz", - "integrity": "sha512-gERYvU7D7K1ANCN/8vUgsE0d2hnRemfAFZ2novm9aZBg7TEd/4EgB+AqbJ+1dc7GhOL6dazckVq78TgccHb7mQ==", - "license": "Apache-2.0", + "node_modules/@vitest/expect": { + "version": "0.32.4", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-0.32.4.tgz", + "integrity": "sha512-m7EPUqmGIwIeoU763N+ivkFjTzbaBn0n9evsTOcde03ugy2avPs3kZbYmw3DkcH1j5mxhMhdamJkLQ6dM1bk/A==", + "dev": true, + "license": "MIT", "dependencies": { - "@walletconnect/modal-core": "2.7.0", - "lit": "2.8.0", - "motion": "10.16.2", - "qrcode": "1.5.3" + "@vitest/spy": "0.32.4", + "@vitest/utils": "0.32.4", + "chai": "^4.3.7" + }, + "funding": { + "url": "https://opencollective.com/vitest" } }, - "node_modules/@walletconnect/relay-api": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/@walletconnect/relay-api/-/relay-api-1.0.11.tgz", - "integrity": "sha512-tLPErkze/HmC9aCmdZOhtVmYZq1wKfWTJtygQHoWtgg722Jd4homo54Cs4ak2RUFUZIGO2RsOpIcWipaua5D5Q==", + "node_modules/@vitest/runner": { + "version": "0.32.4", + "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-0.32.4.tgz", + "integrity": "sha512-cHOVCkiRazobgdKLnczmz2oaKK9GJOw6ZyRcaPdssO1ej+wzHVIkWiCiNacb3TTYPdzMddYkCgMjZ4r8C0JFCw==", + "dev": true, "license": "MIT", "dependencies": { - "@walletconnect/jsonrpc-types": "^1.0.2" + "@vitest/utils": "0.32.4", + "p-limit": "^4.0.0", + "pathe": "^1.1.1" + }, + "funding": { + "url": "https://opencollective.com/vitest" } }, - "node_modules/@walletconnect/relay-auth": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@walletconnect/relay-auth/-/relay-auth-1.0.4.tgz", - "integrity": "sha512-kKJcS6+WxYq5kshpPaxGHdwf5y98ZwbfuS4EE/NkQzqrDFm5Cj+dP8LofzWvjrrLkZq7Afy7WrQMXdLy8Sx7HQ==", + "node_modules/@vitest/runner/node_modules/p-limit": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-4.0.0.tgz", + "integrity": "sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==", + "dev": true, "license": "MIT", "dependencies": { - "@stablelib/ed25519": "^1.0.2", - "@stablelib/random": "^1.0.1", - "@walletconnect/safe-json": "^1.0.1", - "@walletconnect/time": "^1.0.2", - "tslib": "1.14.1", - "uint8arrays": "^3.0.0" + "yocto-queue": "^1.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@walletconnect/relay-auth/node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "license": "0BSD" - }, - "node_modules/@walletconnect/safe-json": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@walletconnect/safe-json/-/safe-json-1.0.2.tgz", - "integrity": "sha512-Ogb7I27kZ3LPC3ibn8ldyUr5544t3/STow9+lzz7Sfo808YD7SBWk7SAsdBFlYgP2zDRy2hS3sKRcuSRM0OTmA==", + "node_modules/@vitest/runner/node_modules/yocto-queue": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.1.1.tgz", + "integrity": "sha512-b4JR1PFR10y1mKjhHY9LaGo6tmrgjit7hxVIeAmyMw3jegXR4dhYqLaQF5zMXZxY7tLpMyJeLjr1C4rLmkVe8g==", + "dev": true, "license": "MIT", - "dependencies": { - "tslib": "1.14.1" + "engines": { + "node": ">=12.20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@walletconnect/safe-json/node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "license": "0BSD" - }, - "node_modules/@walletconnect/sign-client": { - "version": "2.17.0", - "resolved": "https://registry.npmjs.org/@walletconnect/sign-client/-/sign-client-2.17.0.tgz", - "integrity": "sha512-sErYwvSSHQolNXni47L3Bm10ptJc1s1YoJvJd34s5E9h9+d3rj7PrhbiW9X82deN+Dm5oA8X9tC4xty1yIBrVg==", - "license": "Apache-2.0", + "node_modules/@vitest/snapshot": { + "version": "0.32.4", + "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-0.32.4.tgz", + "integrity": "sha512-IRpyqn9t14uqsFlVI2d7DFMImGMs1Q9218of40bdQQgMePwVdmix33yMNnebXcTzDU5eiV3eUsoxxH5v0x/IQA==", + "dev": true, + "license": "MIT", "dependencies": { - "@walletconnect/core": "2.17.0", - "@walletconnect/events": "1.0.1", - "@walletconnect/heartbeat": "1.2.2", - "@walletconnect/jsonrpc-utils": "1.0.8", - "@walletconnect/logger": "2.1.2", - "@walletconnect/time": "1.0.2", - "@walletconnect/types": "2.17.0", - "@walletconnect/utils": "2.17.0", - "events": "3.3.0" + "magic-string": "^0.30.0", + "pathe": "^1.1.1", + "pretty-format": "^29.5.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" } }, - "node_modules/@walletconnect/time": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@walletconnect/time/-/time-1.0.2.tgz", - "integrity": "sha512-uzdd9woDcJ1AaBZRhqy5rNC9laqWGErfc4dxA9a87mPdKOgWMD85mcFo9dIYIts/Jwocfwn07EC6EzclKubk/g==", + "node_modules/@vitest/spy": { + "version": "0.32.4", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-0.32.4.tgz", + "integrity": "sha512-oA7rCOqVOOpE6rEoXuCOADX7Lla1LIa4hljI2MSccbpec54q+oifhziZIJXxlE/CvI2E+ElhBHzVu0VEvJGQKQ==", + "dev": true, "license": "MIT", "dependencies": { - "tslib": "1.14.1" + "tinyspy": "^2.1.1" + }, + "funding": { + "url": "https://opencollective.com/vitest" } }, - "node_modules/@walletconnect/time/node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "license": "0BSD" - }, - "node_modules/@walletconnect/types": { - "version": "2.17.0", - "resolved": "https://registry.npmjs.org/@walletconnect/types/-/types-2.17.0.tgz", - "integrity": "sha512-i1pn9URpvt9bcjRDkabuAmpA9K7mzyKoLJlbsAujRVX7pfaG7wur7u9Jz0bk1HxvuABL5LHNncTnVKSXKQ5jZA==", - "license": "Apache-2.0", + "node_modules/@vitest/ui": { + "version": "0.32.4", + "resolved": "https://registry.npmjs.org/@vitest/ui/-/ui-0.32.4.tgz", + "integrity": "sha512-92y7bkjf55L08nomvHHYQkDWQEIkb36dJkgi+F/zpO5cFbrmk1pv/dYiaZKQ772uP96fAWinmux6sXNMNUh16w==", + "dev": true, + "license": "MIT", "dependencies": { - "@walletconnect/events": "1.0.1", - "@walletconnect/heartbeat": "1.2.2", - "@walletconnect/jsonrpc-types": "1.0.4", - "@walletconnect/keyvaluestorage": "1.1.1", - "@walletconnect/logger": "2.1.2", - "events": "3.3.0" + "@vitest/utils": "0.32.4", + "fast-glob": "^3.2.12", + "fflate": "^0.8.0", + "flatted": "^3.2.7", + "pathe": "^1.1.1", + "picocolors": "^1.0.0", + "sirv": "^2.0.3" + }, + "funding": { + "url": "https://opencollective.com/vitest" + }, + "peerDependencies": { + "vitest": ">=0.30.1 <1" } }, - "node_modules/@walletconnect/universal-provider": { - "version": "2.17.0", - "resolved": "https://registry.npmjs.org/@walletconnect/universal-provider/-/universal-provider-2.17.0.tgz", - "integrity": "sha512-d3V5Be7AqLrvzcdMZSBS8DmGDRdqnyLk1DWmRKAGgR6ieUWykhhUKlvfeoZtvJrIXrY7rUGYpH1X41UtFkW5Pw==", - "license": "Apache-2.0", - "dependencies": { - "@walletconnect/jsonrpc-http-connection": "1.0.8", - "@walletconnect/jsonrpc-provider": "1.0.14", - "@walletconnect/jsonrpc-types": "1.0.4", - "@walletconnect/jsonrpc-utils": "1.0.8", - "@walletconnect/logger": "2.1.2", - "@walletconnect/sign-client": "2.17.0", - "@walletconnect/types": "2.17.0", - "@walletconnect/utils": "2.17.0", - "events": "3.3.0" - } - }, - "node_modules/@walletconnect/utils": { - "version": "2.17.0", - "resolved": "https://registry.npmjs.org/@walletconnect/utils/-/utils-2.17.0.tgz", - "integrity": "sha512-1aeQvjwsXy4Yh9G6g2eGmXrEl+BzkNjHRdCrGdMYqFTFa8ROEJfTGsSH3pLsNDlOY94CoBUvJvM55q/PMoN/FQ==", - "license": "Apache-2.0", - "dependencies": { - "@stablelib/chacha20poly1305": "1.0.1", - "@stablelib/hkdf": "1.0.1", - "@stablelib/random": "1.0.2", - "@stablelib/sha256": "1.0.1", - "@stablelib/x25519": "1.0.3", - "@walletconnect/relay-api": "1.0.11", - "@walletconnect/relay-auth": "1.0.4", - "@walletconnect/safe-json": "1.0.2", - "@walletconnect/time": "1.0.2", - "@walletconnect/types": "2.17.0", - "@walletconnect/window-getters": "1.0.1", - "@walletconnect/window-metadata": "1.0.1", - "detect-browser": "5.3.0", - "elliptic": "^6.5.7", - "query-string": "7.1.3", - "uint8arrays": "3.1.0" - } - }, - "node_modules/@walletconnect/window-getters": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@walletconnect/window-getters/-/window-getters-1.0.1.tgz", - "integrity": "sha512-vHp+HqzGxORPAN8gY03qnbTMnhqIwjeRJNOMOAzePRg4xVEEE2WvYsI9G2NMjOknA8hnuYbU3/hwLcKbjhc8+Q==", + "node_modules/@vitest/ui/node_modules/fast-glob": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", + "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", + "dev": true, "license": "MIT", "dependencies": { - "tslib": "1.14.1" + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.8" + }, + "engines": { + "node": ">=8.6.0" } }, - "node_modules/@walletconnect/window-getters/node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "license": "0BSD" + "node_modules/@vitest/ui/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } }, - "node_modules/@walletconnect/window-metadata": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@walletconnect/window-metadata/-/window-metadata-1.0.1.tgz", - "integrity": "sha512-9koTqyGrM2cqFRW517BPY/iEtUDx2r1+Pwwu5m7sJ7ka79wi3EyqhqcICk/yDmv6jAS1rjKgTKXlEhanYjijcA==", + "node_modules/@vitest/utils": { + "version": "0.32.4", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-0.32.4.tgz", + "integrity": "sha512-Gwnl8dhd1uJ+HXrYyV0eRqfmk9ek1ASE/LWfTCuWMw+d07ogHqp4hEAV28NiecimK6UY9DpSEPh+pXBA5gtTBg==", + "dev": true, "license": "MIT", "dependencies": { - "@walletconnect/window-getters": "^1.0.1", - "tslib": "1.14.1" + "diff-sequences": "^29.4.3", + "loupe": "^2.3.6", + "pretty-format": "^29.5.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" } }, - "node_modules/@walletconnect/window-metadata/node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "license": "0BSD" - }, "node_modules/@yarnpkg/lockfile": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz", @@ -7054,7 +5744,7 @@ "version": "8.14.0", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz", "integrity": "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==", - "dev": true, + "devOptional": true, "license": "MIT", "bin": { "acorn": "bin/acorn" @@ -7077,7 +5767,7 @@ "version": "8.3.4", "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.4.tgz", "integrity": "sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "acorn": "^8.11.0" @@ -7096,6 +5786,12 @@ "node": ">= 10.0.0" } }, + "node_modules/aes-js": { + "version": "4.0.0-beta.5", + "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-4.0.0-beta.5.tgz", + "integrity": "sha512-G965FqalsNyrPqgEGON7nIx1e/OVENSgiEIzyC63haUMuvNnwIgIjMs52hlTCKhkBny7A2ORNlfY9Zu+jmGk1Q==", + "license": "MIT" + }, "node_modules/agent-base": { "version": "7.1.3", "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.3.tgz", @@ -7202,7 +5898,6 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", "integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==", - "dev": true, "license": "MIT" }, "node_modules/anymatch": { @@ -7243,7 +5938,7 @@ "version": "4.1.3", "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", - "dev": true, + "devOptional": true, "license": "MIT" }, "node_modules/argparse": { @@ -7271,7 +5966,6 @@ "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, "license": "MIT", "engines": { "node": ">=8" @@ -7304,15 +5998,6 @@ "dev": true, "license": "MIT" }, - "node_modules/async-mutex": { - "version": "0.2.6", - "resolved": "https://registry.npmjs.org/async-mutex/-/async-mutex-0.2.6.tgz", - "integrity": "sha512-Hs4R+4SPgamu6rSGW8C7cV9gaWUKEHykfzCCvIRuaVv636Ju10ZdeUbvb4TBEW0INuq2DHZqXbK4Nd3yG4RaRw==", - "license": "MIT", - "dependencies": { - "tslib": "^2.0.0" - } - }, "node_modules/asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", @@ -7320,30 +6005,6 @@ "dev": true, "license": "MIT" }, - "node_modules/atomic-sleep": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/atomic-sleep/-/atomic-sleep-1.0.0.tgz", - "integrity": "sha512-kNOjDqAh7px0XWNI+4QbzoiR/nTkHAWNud2uvnJquD1/x5a7EQZMJT0AczqK0Qn67oY/TTQ1LbUKajZpp3I9tQ==", - "license": "MIT", - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/available-typed-arrays": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", - "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", - "license": "MIT", - "dependencies": { - "possible-typed-array-names": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/axios": { "version": "1.7.9", "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.9.tgz", @@ -7466,13 +6127,13 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true, "license": "MIT" }, "node_modules/base64-js": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "dev": true, "funding": [ { "type": "github", @@ -7736,12 +6397,6 @@ "dev": true, "license": "MIT" }, - "node_modules/bowser": { - "version": "2.11.0", - "resolved": "https://registry.npmjs.org/bowser/-/bowser-2.11.0.tgz", - "integrity": "sha512-AlcaJBi/pqqJBIQ8U9Mcpc9i8Aqxn88Skv5d+xBX006BY5u8N3mGLHa5Lgppa7L/HfwgwLgZ6NYs+Ag6uUmJRA==", - "license": "MIT" - }, "node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -7765,12 +6420,6 @@ "node": ">=8" } }, - "node_modules/brorand": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", - "integrity": "sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==", - "license": "MIT" - }, "node_modules/browserslist": { "version": "4.24.4", "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.4.tgz", @@ -7842,6 +6491,8 @@ "integrity": "sha512-WDtdLmJvAuNNPzByAYpRo2rF1Mmradw6gvWsQKf63476DDXmomT9zUiGypLcG4ibIM67vhAj8jJRdbmEws2Aqw==", "hasInstallScript": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "node-gyp-build": "^4.3.0" }, @@ -7853,7 +6504,6 @@ "version": "4.2.1", "resolved": "https://registry.npmjs.org/bundle-require/-/bundle-require-4.2.1.tgz", "integrity": "sha512-7Q/6vkyYAwOmQNRw75x+4yRtZCZJXUDmHHlFdkiV0wgv/reNjtJwpu1jPJ0w2kbEpIM0uoKI3S4/f39dU7AjSA==", - "dev": true, "license": "MIT", "dependencies": { "load-tsconfig": "^0.2.3" @@ -7925,7 +6575,6 @@ "version": "6.7.14", "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz", "integrity": "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==", - "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -7976,28 +6625,11 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/call-bind": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.8.tgz", - "integrity": "sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww==", - "license": "MIT", - "dependencies": { - "call-bind-apply-helpers": "^1.0.0", - "es-define-property": "^1.0.0", - "get-intrinsic": "^1.2.4", - "set-function-length": "^1.2.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/call-bind-apply-helpers": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", + "dev": true, "license": "MIT", "dependencies": { "es-errors": "^1.3.0", @@ -8007,22 +6639,6 @@ "node": ">= 0.4" } }, - "node_modules/call-bound": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.3.tgz", - "integrity": "sha512-YTd+6wGlNlPxSuri7Y6X8tY2dmm12UMH66RpKMhiX6rsk5wXXnYgbUcOt8kiS31/AjfoTOvCsE+w8nZQLQnzHA==", - "license": "MIT", - "dependencies": { - "call-bind-apply-helpers": "^1.0.1", - "get-intrinsic": "^1.2.6" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -8037,6 +6653,7 @@ "version": "5.3.1", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true, "license": "MIT", "engines": { "node": ">=6" @@ -8073,78 +6690,36 @@ "node_modules/caniuse-lite": { "version": "1.0.30001700", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001700.tgz", - "integrity": "sha512-2S6XIXwaE7K7erT8dY+kLQcpa5ms63XlRkMkReXjle+kf6c5g38vyMl+Z5y8dSxOFDhcFe+nxnn261PLxBSQsQ==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/caniuse-lite" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "CC-BY-4.0" - }, - "node_modules/cardinal": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/cardinal/-/cardinal-2.1.1.tgz", - "integrity": "sha512-JSr5eOgoEymtYHBjNWyjrMqet9Am2miJhlfKNdqLp6zoeAh0KN5dRAcxlecj5mAJrmQomgiOBj35xHLrFjqBpw==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansicolors": "~0.3.2", - "redeyed": "~2.1.0" - }, - "bin": { - "cdl": "bin/cdl.js" - } - }, - "node_modules/cbw-sdk": { - "name": "@coinbase/wallet-sdk", - "version": "3.9.3", - "resolved": "https://registry.npmjs.org/@coinbase/wallet-sdk/-/wallet-sdk-3.9.3.tgz", - "integrity": "sha512-N/A2DRIf0Y3PHc1XAMvbBUu4zisna6qAdqABMZwBMNEfWrXpAwx16pZGkYCLGE+Rvv1edbcB2LYDRnACNcmCiw==", - "license": "Apache-2.0", - "dependencies": { - "bn.js": "^5.2.1", - "buffer": "^6.0.3", - "clsx": "^1.2.1", - "eth-block-tracker": "^7.1.0", - "eth-json-rpc-filters": "^6.0.0", - "eventemitter3": "^5.0.1", - "keccak": "^3.0.3", - "preact": "^10.16.0", - "sha.js": "^2.4.11" - } - }, - "node_modules/cbw-sdk/node_modules/buffer": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", - "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "integrity": "sha512-2S6XIXwaE7K7erT8dY+kLQcpa5ms63XlRkMkReXjle+kf6c5g38vyMl+Z5y8dSxOFDhcFe+nxnn261PLxBSQsQ==", + "dev": true, "funding": [ { - "type": "github", - "url": "https://github.com/sponsors/feross" + "type": "opencollective", + "url": "https://opencollective.com/browserslist" }, { - "type": "patreon", - "url": "https://www.patreon.com/feross" + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" }, { - "type": "consulting", - "url": "https://feross.org/support" + "type": "github", + "url": "https://github.com/sponsors/ai" } ], + "license": "CC-BY-4.0" + }, + "node_modules/cardinal": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/cardinal/-/cardinal-2.1.1.tgz", + "integrity": "sha512-JSr5eOgoEymtYHBjNWyjrMqet9Am2miJhlfKNdqLp6zoeAh0KN5dRAcxlecj5mAJrmQomgiOBj35xHLrFjqBpw==", + "dev": true, "license": "MIT", "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.2.1" + "ansicolors": "~0.3.2", + "redeyed": "~2.1.0" + }, + "bin": { + "cdl": "bin/cdl.js" } }, "node_modules/chai": { @@ -8319,15 +6894,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/clsx": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/clsx/-/clsx-1.2.1.tgz", - "integrity": "sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg==", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, "node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", @@ -8529,12 +7095,6 @@ "dev": true, "license": "MIT" }, - "node_modules/cookie-es": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/cookie-es/-/cookie-es-1.2.2.tgz", - "integrity": "sha512-+W7VmiVINB+ywl1HGXJXmrqkOhpKrIiVZV6tQuV54ZyQC7MMuBt81Vc336GMLoHBq5hV/F9eXgt5Mnx0Rha5Fg==", - "license": "MIT" - }, "node_modules/core-js-compat": { "version": "3.40.0", "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.40.0.tgz", @@ -8553,6 +7113,7 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", + "dev": true, "license": "MIT" }, "node_modules/cosmiconfig": { @@ -8572,59 +7133,17 @@ "node": ">=10" } }, - "node_modules/crc-32": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.2.tgz", - "integrity": "sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ==", - "license": "Apache-2.0", - "bin": { - "crc32": "bin/crc32.njs" - }, - "engines": { - "node": ">=0.8" - } - }, "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, + "devOptional": true, "license": "MIT" }, - "node_modules/cross-fetch": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-4.1.0.tgz", - "integrity": "sha512-uKm5PU+MHTootlWEY+mZ4vvXoCn4fLQxT9dSc1sXVMSFkINTJVN8cAQROpwcKm8bJ/c7rgZVIBWzH5T78sNZZw==", - "license": "MIT", - "dependencies": { - "node-fetch": "^2.7.0" - } - }, - "node_modules/cross-fetch/node_modules/node-fetch": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", - "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", - "license": "MIT", - "dependencies": { - "whatwg-url": "^5.0.0" - }, - "engines": { - "node": "4.x || >=6.0.0" - }, - "peerDependencies": { - "encoding": "^0.1.0" - }, - "peerDependenciesMeta": { - "encoding": { - "optional": true - } - } - }, "node_modules/cross-spawn": { "version": "7.0.6", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", - "dev": true, "license": "MIT", "dependencies": { "path-key": "^3.1.0", @@ -8635,15 +7154,6 @@ "node": ">= 8" } }, - "node_modules/crossws": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/crossws/-/crossws-0.3.4.tgz", - "integrity": "sha512-uj0O1ETYX1Bh6uSgktfPvwDiPYGQ3aI4qVsaC/LWpkIzGj1nUYm5FK3K+t11oOlpN01lGbprFCH4wBlKdJjVgw==", - "license": "MIT", - "dependencies": { - "uncrypto": "^0.1.3" - } - }, "node_modules/crypto-random-string": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-2.0.0.tgz", @@ -8663,22 +7173,6 @@ "node": ">= 12" } }, - "node_modules/date-fns": { - "version": "2.30.0", - "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.30.0.tgz", - "integrity": "sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw==", - "license": "MIT", - "dependencies": { - "@babel/runtime": "^7.21.0" - }, - "engines": { - "node": ">=0.11" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/date-fns" - } - }, "node_modules/dateformat": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-3.0.3.tgz", @@ -8710,6 +7204,7 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", + "dev": true, "license": "MIT", "engines": { "node": ">=0.10.0" @@ -8742,15 +7237,6 @@ "node": ">=0.10.0" } }, - "node_modules/decode-uri-component": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.2.tgz", - "integrity": "sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==", - "license": "MIT", - "engines": { - "node": ">=0.10" - } - }, "node_modules/decompress-response": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", @@ -8833,23 +7319,6 @@ "node": ">=10" } }, - "node_modules/define-data-property": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", - "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", - "license": "MIT", - "dependencies": { - "es-define-property": "^1.0.0", - "es-errors": "^1.3.0", - "gopd": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/define-lazy-prop": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz", @@ -8860,12 +7329,6 @@ "node": ">=8" } }, - "node_modules/defu": { - "version": "6.1.4", - "resolved": "https://registry.npmjs.org/defu/-/defu-6.1.4.tgz", - "integrity": "sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg==", - "license": "MIT" - }, "node_modules/del": { "version": "6.1.1", "resolved": "https://registry.npmjs.org/del/-/del-6.1.1.tgz", @@ -8922,18 +7385,6 @@ "dev": true, "license": "ISC" }, - "node_modules/destr": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/destr/-/destr-2.0.3.tgz", - "integrity": "sha512-2N3BOUU4gYMpTP24s5rF5iP7BDr7uNTCs4ozw3kf/eKfvWSIu93GEBi5m427YoyJoeOzQ5smuu4nNAPGb8idSQ==", - "license": "MIT" - }, - "node_modules/detect-browser": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/detect-browser/-/detect-browser-5.3.0.tgz", - "integrity": "sha512-53rsFbGdwMwlF7qvCt0ypLM5V5/Mbl0szB7GPN8y9NCcbknYOeVVXdrXEq+90IwAfrrzt6Hd+u2E2ntakICU8w==", - "license": "MIT" - }, "node_modules/detect-port": { "version": "1.6.1", "resolved": "https://registry.npmjs.org/detect-port/-/detect-port-1.6.1.tgz", @@ -8956,7 +7407,7 @@ "version": "4.0.2", "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", - "dev": true, + "devOptional": true, "license": "BSD-3-Clause", "engines": { "node": ">=0.3.1" @@ -8972,17 +7423,10 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/dijkstrajs": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/dijkstrajs/-/dijkstrajs-1.0.3.tgz", - "integrity": "sha512-qiSlmBq9+BCdCA/L46dw8Uy93mloxsPSbwnm5yrKn2vMPiy8KyAskTF6zuV/j5BMsmOGZDPs7KjU+mjb670kfA==", - "license": "MIT" - }, "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, "license": "MIT", "dependencies": { "path-type": "^4.0.0" @@ -9044,6 +7488,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "dev": true, "license": "MIT", "dependencies": { "call-bind-apply-helpers": "^1.0.1", @@ -9104,42 +7549,12 @@ "safe-buffer": "~5.1.0" } }, - "node_modules/duplexify": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-4.1.3.tgz", - "integrity": "sha512-M3BmBhwJRZsSx38lZyhE53Csddgzl5R7xGJNk7CVddZD6CcmwMCH8J+7AprIrQKH7TonKxaCjcv27Qmf+sQ+oA==", - "license": "MIT", - "dependencies": { - "end-of-stream": "^1.4.1", - "inherits": "^2.0.3", - "readable-stream": "^3.1.1", - "stream-shift": "^1.0.2" - } - }, "node_modules/eastasianwidth": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", - "dev": true, "license": "MIT" }, - "node_modules/eciesjs": { - "version": "0.4.13", - "resolved": "https://registry.npmjs.org/eciesjs/-/eciesjs-0.4.13.tgz", - "integrity": "sha512-zBdtR4K+wbj10bWPpIOF9DW+eFYQu8miU5ypunh0t4Bvt83ZPlEWgT5Dq/0G6uwEXumZKjfb5BZxYUZQ2Hzn/Q==", - "license": "MIT", - "dependencies": { - "@ecies/ciphers": "^0.2.2", - "@noble/ciphers": "^1.0.0", - "@noble/curves": "^1.6.0", - "@noble/hashes": "^1.5.0" - }, - "engines": { - "bun": ">=1", - "deno": ">=2", - "node": ">=16" - } - }, "node_modules/ejs": { "version": "3.1.10", "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.10.tgz", @@ -9163,108 +7578,22 @@ "dev": true, "license": "ISC" }, - "node_modules/elliptic": { - "version": "6.6.1", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.6.1.tgz", - "integrity": "sha512-RaddvvMatK2LJHqFJ+YA4WysVN5Ita9E35botqIYspQ4TkRAlCicdzKOjlyv/1Za5RyTNn7di//eEV0uTAfe3g==", - "license": "MIT", - "dependencies": { - "bn.js": "^4.11.9", - "brorand": "^1.1.0", - "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.1", - "inherits": "^2.0.4", - "minimalistic-assert": "^1.0.1", - "minimalistic-crypto-utils": "^1.0.1" - } - }, - "node_modules/elliptic/node_modules/bn.js": { - "version": "4.12.1", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.1.tgz", - "integrity": "sha512-k8TVBiPkPJT9uHLdOKfFpqcfprwBFOAAXXozRubr7R7PfIuKvQlzcI4M0pALeqXN09vdaMbUdUj+pass+uULAg==", - "license": "MIT" - }, "node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "license": "MIT" }, - "node_modules/encode-utf8": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/encode-utf8/-/encode-utf8-1.0.3.tgz", - "integrity": "sha512-ucAnuBEhUK4boH2HjVYG5Q2mQyPorvv0u/ocS+zhdw0S8AlHYY+GOFhP1Gio5z4icpP2ivFSvhtFjQi8+T9ppw==", - "license": "MIT" - }, "node_modules/end-of-stream": { "version": "1.4.4", "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "dev": true, "license": "MIT", "dependencies": { "once": "^1.4.0" } }, - "node_modules/engine.io-client": { - "version": "6.6.3", - "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-6.6.3.tgz", - "integrity": "sha512-T0iLjnyNWahNyv/lcjS2y4oE358tVS/SYQNxYXGAJ9/GLgH4VCvOQ/mhTjqU88mLZCQgiG8RIegFHYCdVC+j5w==", - "license": "MIT", - "dependencies": { - "@socket.io/component-emitter": "~3.1.0", - "debug": "~4.3.1", - "engine.io-parser": "~5.2.1", - "ws": "~8.17.1", - "xmlhttprequest-ssl": "~2.1.1" - } - }, - "node_modules/engine.io-client/node_modules/debug": { - "version": "4.3.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", - "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", - "license": "MIT", - "dependencies": { - "ms": "^2.1.3" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/engine.io-client/node_modules/ws": { - "version": "8.17.1", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz", - "integrity": "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==", - "license": "MIT", - "engines": { - "node": ">=10.0.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": ">=5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } - } - }, - "node_modules/engine.io-parser": { - "version": "5.2.3", - "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-5.2.3.tgz", - "integrity": "sha512-HqD3yTBfnBxIrbnM1DoD6Pcq8NECnh8d4As1Qgh0z5Gg3jRRIqijury0CL3ghu/edArpUYiYqQiDUQBIs4np3Q==", - "license": "MIT", - "engines": { - "node": ">=10.0.0" - } - }, "node_modules/enquirer": { "version": "2.3.6", "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", @@ -9424,6 +7753,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", + "dev": true, "license": "MIT", "engines": { "node": ">= 0.4" @@ -9433,6 +7763,7 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "dev": true, "license": "MIT", "engines": { "node": ">= 0.4" @@ -9442,6 +7773,7 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", + "dev": true, "license": "MIT", "dependencies": { "es-errors": "^1.3.0" @@ -9470,7 +7802,6 @@ "version": "0.18.20", "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.18.20.tgz", "integrity": "sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==", - "dev": true, "hasInstallScript": true, "license": "MIT", "bin": { @@ -9785,139 +8116,61 @@ "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/eth-block-tracker": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/eth-block-tracker/-/eth-block-tracker-7.1.0.tgz", - "integrity": "sha512-8YdplnuE1IK4xfqpf4iU7oBxnOYAc35934o083G8ao+8WM8QQtt/mVlAY6yIAdY1eMeLqg4Z//PZjJGmWGPMRg==", - "license": "MIT", - "dependencies": { - "@metamask/eth-json-rpc-provider": "^1.0.0", - "@metamask/safe-event-emitter": "^3.0.0", - "@metamask/utils": "^5.0.1", - "json-rpc-random-id": "^1.0.1", - "pify": "^3.0.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/eth-block-tracker/node_modules/@metamask/utils": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@metamask/utils/-/utils-5.0.2.tgz", - "integrity": "sha512-yfmE79bRQtnMzarnKfX7AEJBwFTxvTyw3nBQlu/5rmGXrjAeAMltoGxO62TFurxrQAFMNa/fEjIHNvungZp0+g==", - "license": "ISC", - "dependencies": { - "@ethereumjs/tx": "^4.1.2", - "@types/debug": "^4.1.7", - "debug": "^4.3.4", - "semver": "^7.3.8", - "superstruct": "^1.0.3" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/eth-block-tracker/node_modules/pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==", - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/eth-block-tracker/node_modules/semver": { - "version": "7.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz", - "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==", - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/eth-json-rpc-filters": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/eth-json-rpc-filters/-/eth-json-rpc-filters-6.0.1.tgz", - "integrity": "sha512-ITJTvqoCw6OVMLs7pI8f4gG92n/St6x80ACtHodeS+IXmO0w+t1T5OOzfSt7KLSMLRkVUoexV7tztLgDxg+iig==", - "license": "ISC", - "dependencies": { - "@metamask/safe-event-emitter": "^3.0.0", - "async-mutex": "^0.2.6", - "eth-query": "^2.1.2", - "json-rpc-engine": "^6.1.0", - "pify": "^5.0.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/eth-json-rpc-filters/node_modules/pify": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-5.0.0.tgz", - "integrity": "sha512-eW/gHNMlxdSP6dmG6uJip6FXN0EQBwm2clYYd8Wul42Cwu/DK8HEftzsapcNdYe2MfLiIwZqsDk2RDEsTE79hA==", - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/eth-query": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/eth-query/-/eth-query-2.1.2.tgz", - "integrity": "sha512-srES0ZcvwkR/wd5OQBRA1bIJMww1skfGS0s8wlwK3/oNP4+wnds60krvu5R1QbpRQjMmpG5OMIWro5s7gvDPsA==", - "license": "ISC", - "dependencies": { - "json-rpc-random-id": "^1.0.0", - "xtend": "^4.0.1" + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.10.0" } }, - "node_modules/eth-rpc-errors": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/eth-rpc-errors/-/eth-rpc-errors-4.0.3.tgz", - "integrity": "sha512-Z3ymjopaoft7JDoxZcEb3pwdGh7yiYMhOwm2doUt6ASXlMavpNlK6Cre0+IMl2VSGyEU9rkiperQhp5iRxn5Pg==", + "node_modules/ethers": { + "version": "6.13.5", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-6.13.5.tgz", + "integrity": "sha512-+knKNieu5EKRThQJWwqaJ10a6HE9sSehGeqWN65//wE7j47ZpFhKAnHB/JJFibwwg61I/koxaPsXbXpD/skNOQ==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/ethers-io/" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], "license": "MIT", "dependencies": { - "fast-safe-stringify": "^2.0.6" + "@adraffy/ens-normalize": "1.10.1", + "@noble/curves": "1.2.0", + "@noble/hashes": "1.3.2", + "@types/node": "22.7.5", + "aes-js": "4.0.0-beta.5", + "tslib": "2.7.0", + "ws": "8.17.1" + }, + "engines": { + "node": ">=14.0.0" } }, - "node_modules/ethereum-cryptography": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-2.2.1.tgz", - "integrity": "sha512-r/W8lkHSiTLxUxW8Rf3u4HGB0xQweG2RyETjywylKZSzLWoWAijRz8WCuOtJ6wah+avllXBqZuk29HCCvhEIRg==", - "license": "MIT", - "dependencies": { - "@noble/curves": "1.4.2", - "@noble/hashes": "1.4.0", - "@scure/bip32": "1.4.0", - "@scure/bip39": "1.3.0" - } + "node_modules/ethers/node_modules/@adraffy/ens-normalize": { + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/@adraffy/ens-normalize/-/ens-normalize-1.10.1.tgz", + "integrity": "sha512-96Z2IP3mYmF1Xg2cDm8f1gWGf/HUVedQ3FMifV4kG/PQ4yEP51xDtRAEfhVNt5f/uzpNkZHwWQuUcu6D6K+Ekw==", + "license": "MIT" }, - "node_modules/ethereum-cryptography/node_modules/@noble/curves": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.4.2.tgz", - "integrity": "sha512-TavHr8qycMChk8UwMld0ZDRvatedkzWfH8IiaeGCfymOP5i0hSCozz9vHOL0nkwk7HRMlFnAiKpS2jrUmSybcw==", + "node_modules/ethers/node_modules/@noble/curves": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.2.0.tgz", + "integrity": "sha512-oYclrNgRaM9SsBUBVbb8M6DTV7ZHRTKugureoYEncY5c65HOmRzvSiTE3y5CYaPYJA/GVkrhXEoF0M3Ya9PMnw==", "license": "MIT", "dependencies": { - "@noble/hashes": "1.4.0" + "@noble/hashes": "1.3.2" }, "funding": { "url": "https://paulmillr.com/funding/" } }, - "node_modules/ethereum-cryptography/node_modules/@noble/hashes": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.4.0.tgz", - "integrity": "sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==", + "node_modules/ethers/node_modules/@noble/hashes": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.2.tgz", + "integrity": "sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ==", "license": "MIT", "engines": { "node": ">= 16" @@ -9926,40 +8179,40 @@ "url": "https://paulmillr.com/funding/" } }, - "node_modules/ethereum-cryptography/node_modules/@scure/base": { - "version": "1.1.9", - "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.1.9.tgz", - "integrity": "sha512-8YKhl8GHiNI/pU2VMaofa2Tor7PJRAjwQLBBuilkJ9L5+13yVbC7JO/wS7piioAvPSwR3JKM1IJ/u4xQzbcXKg==", - "license": "MIT", - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/ethereum-cryptography/node_modules/@scure/bip32": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.4.0.tgz", - "integrity": "sha512-sVUpc0Vq3tXCkDGYVWGIZTRfnvu8LoTDaev7vbwh0omSvVORONr960MQWdKqJDCReIEmTj3PAr73O3aoxz7OPg==", + "node_modules/ethers/node_modules/@types/node": { + "version": "22.7.5", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.7.5.tgz", + "integrity": "sha512-jML7s2NAzMWc//QSJ1a3prpk78cOPchGvXJsC3C6R6PSMoooztvRVQEz89gmBTBY1SPMaqo5teB4uNHPdetShQ==", "license": "MIT", "dependencies": { - "@noble/curves": "~1.4.0", - "@noble/hashes": "~1.4.0", - "@scure/base": "~1.1.6" - }, - "funding": { - "url": "https://paulmillr.com/funding/" + "undici-types": "~6.19.2" } }, - "node_modules/ethereum-cryptography/node_modules/@scure/bip39": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.3.0.tgz", - "integrity": "sha512-disdg7gHuTDZtY+ZdkmLpPCk7fxZSu3gBiEGuoC1XYxv9cGx3Z6cpTggCgW6odSOOIXCiDjuGejW+aJKCY/pIQ==", + "node_modules/ethers/node_modules/tslib": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.7.0.tgz", + "integrity": "sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==", + "license": "0BSD" + }, + "node_modules/ethers/node_modules/ws": { + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz", + "integrity": "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==", "license": "MIT", - "dependencies": { - "@noble/hashes": "~1.4.0", - "@scure/base": "~1.1.6" + "engines": { + "node": ">=10.0.0" }, - "funding": { - "url": "https://paulmillr.com/funding/" + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } } }, "node_modules/event-target-shim": { @@ -9972,12 +8225,6 @@ "node": ">=6" } }, - "node_modules/eventemitter2": { - "version": "6.4.9", - "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-6.4.9.tgz", - "integrity": "sha512-JEPTiaOt9f04oa6NOkc4aH+nVp5I3wEjpHbIPqfgCdD5v5bUzy7xQqwcVO2aDQgOWhI28da57HksMrzK9HlRxg==", - "license": "MIT" - }, "node_modules/eventemitter3": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz", @@ -9988,6 +8235,7 @@ "version": "3.3.0", "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", + "dev": true, "license": "MIT", "engines": { "node": ">=0.8.x" @@ -9997,7 +8245,6 @@ "version": "5.1.1", "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", - "dev": true, "license": "MIT", "dependencies": { "cross-spawn": "^7.0.3", @@ -10057,23 +8304,11 @@ "node": ">=4" } }, - "node_modules/extension-port-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/extension-port-stream/-/extension-port-stream-3.0.0.tgz", - "integrity": "sha512-an2S5quJMiy5bnZKEf6AkfH/7r8CzHvhchU40gxN+OM6HPhe7Z9T1FUychcf2M9PpPOO0Hf7BAEfJkw2TDIBDw==", - "license": "ISC", - "dependencies": { - "readable-stream": "^3.6.2 || ^4.4.2", - "webextension-polyfill": ">=0.10.0 <1.0" - }, - "engines": { - "node": ">=12.0.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, "license": "MIT" }, "node_modules/fast-glob": { @@ -10120,26 +8355,10 @@ "dev": true, "license": "MIT" }, - "node_modules/fast-redact": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/fast-redact/-/fast-redact-3.5.0.tgz", - "integrity": "sha512-dwsoQlS7h9hMeYUq1W++23NDcBLV4KqONnITDV9DjfS3q1SgDGVrBdvvTLUotWtPSD7asWDV9/CmsZPy8Hf70A==", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/fast-safe-stringify": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz", - "integrity": "sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==", - "license": "MIT" - }, "node_modules/fastq": { "version": "1.19.0", "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.19.0.tgz", "integrity": "sha512-7SFSRCNjBQIZH/xZR3iy5iQYR8aGBE0h3VG6/cwlbrpdciNYBMotQav8c1XI3HjHH+NikUpP53nPdlZSdWmFzA==", - "dev": true, "license": "ISC", "dependencies": { "reusify": "^1.0.4" @@ -10308,15 +8527,6 @@ "node": ">=8" } }, - "node_modules/filter-obj": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/filter-obj/-/filter-obj-1.1.0.tgz", - "integrity": "sha512-8rXg1ZnX7xzy2NGDVkBVaAy+lSlPNwad13BtgSlLuxfIslyt5Vg64U7tFcCt4WS1R0hvtnQybT/IyCkGZ3DpXQ==", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/find-up": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", @@ -10403,21 +8613,6 @@ } } }, - "node_modules/for-each": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.5.tgz", - "integrity": "sha512-dKx12eRCVIzqCxFGplyFKJMPvLEWgmNtUrpTiJIR5u97zEhRG8ySrtboPHZXx7daLxQVrl643cTzbab2tkQjxg==", - "license": "MIT", - "dependencies": { - "is-callable": "^1.2.7" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/foreground-child": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-2.0.0.tgz", @@ -10551,6 +8746,7 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true, "license": "MIT", "funding": { "url": "https://github.com/sponsors/ljharb" @@ -10582,6 +8778,7 @@ "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, "license": "ISC", "engines": { "node": "6.* || 8.* || >= 10.*" @@ -10601,6 +8798,7 @@ "version": "1.2.7", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.7.tgz", "integrity": "sha512-VW6Pxhsrk0KAOqs3WEd0klDiF/+V7gQOpAvY1jVU/LHmaD/kQO4523aiJuikX/QAKYiW6x8Jh+RJej1almdtCA==", + "dev": true, "license": "MIT", "dependencies": { "call-bind-apply-helpers": "^1.0.1", @@ -10625,6 +8823,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "dev": true, "license": "MIT", "dependencies": { "dunder-proto": "^1.0.1", @@ -10638,7 +8837,6 @@ "version": "6.0.1", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", - "dev": true, "license": "MIT", "engines": { "node": ">=10" @@ -10762,7 +8960,6 @@ "version": "11.1.0", "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", - "dev": true, "license": "MIT", "dependencies": { "array-union": "^2.1.0", @@ -10783,7 +8980,6 @@ "version": "3.3.3", "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", - "dev": true, "license": "MIT", "dependencies": { "@nodelib/fs.stat": "^2.0.2", @@ -10800,7 +8996,6 @@ "version": "5.1.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, "license": "ISC", "dependencies": { "is-glob": "^4.0.1" @@ -10813,6 +9008,7 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "dev": true, "license": "MIT", "engines": { "node": ">= 0.4" @@ -10868,24 +9064,6 @@ "dev": true, "license": "MIT" }, - "node_modules/h3": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/h3/-/h3-1.15.0.tgz", - "integrity": "sha512-OsjX4JW8J4XGgCgEcad20pepFQWnuKH+OwkCJjogF3C+9AZ1iYdtB4hX6vAb5DskBiu5ljEXqApINjR8CqoCMQ==", - "license": "MIT", - "dependencies": { - "cookie-es": "^1.2.2", - "crossws": "^0.3.3", - "defu": "^6.1.4", - "destr": "^2.0.3", - "iron-webcrypto": "^1.2.1", - "node-mock-http": "^1.0.0", - "ohash": "^1.1.4", - "radix3": "^1.1.2", - "ufo": "^1.5.4", - "uncrypto": "^0.1.3" - } - }, "node_modules/handlebars": { "version": "4.7.8", "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.8.tgz", @@ -10938,22 +9116,11 @@ "node": ">=8" } }, - "node_modules/has-property-descriptors": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", - "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", - "license": "MIT", - "dependencies": { - "es-define-property": "^1.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/has-symbols": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", + "dev": true, "license": "MIT", "engines": { "node": ">= 0.4" @@ -10966,6 +9133,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "dev": true, "license": "MIT", "dependencies": { "has-symbols": "^1.0.3" @@ -10977,20 +9145,11 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/hash.js": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", - "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", - "license": "MIT", - "dependencies": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.1" - } - }, "node_modules/hasown": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "dev": true, "license": "MIT", "dependencies": { "function-bind": "^1.1.2" @@ -10999,23 +9158,6 @@ "node": ">= 0.4" } }, - "node_modules/hey-listen": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/hey-listen/-/hey-listen-1.0.8.tgz", - "integrity": "sha512-COpmrF2NOg4TBWUJ5UVyaCU2A88wEMkUPK4hNqyCkqHbxT92BbvfjoSozkAIIm6XhicGlJHhFdullInrdhwU8Q==", - "license": "MIT" - }, - "node_modules/hmac-drbg": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", - "integrity": "sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==", - "license": "MIT", - "dependencies": { - "hash.js": "^1.0.3", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.1" - } - }, "node_modules/hook-std": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/hook-std/-/hook-std-3.0.0.tgz", @@ -11109,22 +9251,16 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", - "dev": true, "license": "Apache-2.0", "engines": { "node": ">=10.17.0" } }, - "node_modules/idb-keyval": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/idb-keyval/-/idb-keyval-6.2.1.tgz", - "integrity": "sha512-8Sb3veuYCyrZL+VBt9LJfZjLUPWVvqn8tG28VqYNFCo43KHcKuq+b4EiXGeuaLAQWL2YmyDgMp2aSpH9JHsEQg==", - "license": "Apache-2.0" - }, "node_modules/ieee754": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "dev": true, "funding": [ { "type": "github", @@ -11145,7 +9281,6 @@ "version": "5.3.2", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", - "dev": true, "license": "MIT", "engines": { "node": ">= 4" @@ -11217,6 +9352,7 @@ "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true, "license": "ISC" }, "node_modules/ini": { @@ -11243,31 +9379,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/iron-webcrypto": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/iron-webcrypto/-/iron-webcrypto-1.2.1.tgz", - "integrity": "sha512-feOM6FaSr6rEABp/eDfVseKyTMDt+KGpeB35SkVn9Tyn0CqvVsY3EwI0v5i8nMHyJnzCIQf7nsy3p41TPkJZhg==", - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/brc-dd" - } - }, - "node_modules/is-arguments": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.2.0.tgz", - "integrity": "sha512-7bVbi0huj/wrIAOzb8U1aszg9kdi3KN/CyU19CTI7tAoZYEZoL9yCDXpbXN+uPsuWnP02cyug1gleqq+TU+YCA==", - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.2", - "has-tostringtag": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", @@ -11287,18 +9398,6 @@ "node": ">=8" } }, - "node_modules/is-callable": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", - "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-core-module": { "version": "2.16.1", "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.1.tgz", @@ -11349,24 +9448,6 @@ "node": ">=8" } }, - "node_modules/is-generator-function": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.1.0.tgz", - "integrity": "sha512-nPUB5km40q9e8UfN/Zc24eLlzdSf9OfKByBw9CIdw4H1giPMeA0OIJvbchsCu4npfI2QcMVBsGEBHKZ7wLTWmQ==", - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "get-proto": "^1.0.0", - "has-tostringtag": "^1.0.2", - "safe-regex-test": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-glob": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", @@ -11448,24 +9529,6 @@ "node": ">=0.10.0" } }, - "node_modules/is-regex": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.2.1.tgz", - "integrity": "sha512-MjYsKHO5O7mCsmRGxWcLWheFqN9DJ/2TmngvjKXihe6efViPqc274+Fx/4fYj/r03+ESvBdTXK0V6tA3rgez1g==", - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.2", - "gopd": "^1.2.0", - "has-tostringtag": "^1.0.2", - "hasown": "^2.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-stream": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", @@ -11491,21 +9554,6 @@ "node": ">=0.10.0" } }, - "node_modules/is-typed-array": { - "version": "1.1.15", - "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.15.tgz", - "integrity": "sha512-p3EcsicXjit7SaskXHs1hA91QxgTw46Fv6EFKKGS5DRFLD8yKnohjF3hxoju94b/OcMZoQukzpPpBE9uLVKzgQ==", - "license": "MIT", - "dependencies": { - "which-typed-array": "^1.1.16" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-unicode-supported": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", @@ -11536,13 +9584,13 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", + "dev": true, "license": "MIT" }, "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true, "license": "ISC" }, "node_modules/isows": { @@ -11620,7 +9668,6 @@ "version": "3.4.3", "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", - "dev": true, "license": "BlueOak-1.0.0", "dependencies": { "@isaacs/cliui": "^8.0.2" @@ -11704,7 +9751,6 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/joycon/-/joycon-3.1.1.tgz", "integrity": "sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw==", - "dev": true, "license": "MIT", "engines": { "node": ">=10" @@ -11714,6 +9760,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "devOptional": true, "license": "MIT" }, "node_modules/js-yaml": { @@ -11763,31 +9810,6 @@ "dev": true, "license": "MIT" }, - "node_modules/json-rpc-engine": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/json-rpc-engine/-/json-rpc-engine-6.1.0.tgz", - "integrity": "sha512-NEdLrtrq1jUZyfjkr9OCz9EzCNhnRyWtt1PAnvnhwy6e8XETS0Dtc+ZNCO2gvuAoKsIn2+vCSowXTYE4CkgnAQ==", - "license": "ISC", - "dependencies": { - "@metamask/safe-event-emitter": "^2.0.0", - "eth-rpc-errors": "^4.0.2" - }, - "engines": { - "node": ">=10.0.0" - } - }, - "node_modules/json-rpc-engine/node_modules/@metamask/safe-event-emitter": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@metamask/safe-event-emitter/-/safe-event-emitter-2.0.0.tgz", - "integrity": "sha512-/kSXhY692qiV1MXu6EeOZvg5nECLclxNXcKCxJ3cXQgYuRymRHpdx/t7JXfsK+JLjwA1e1c1/SBrlQYpusC29Q==", - "license": "ISC" - }, - "node_modules/json-rpc-random-id": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-rpc-random-id/-/json-rpc-random-id-1.0.1.tgz", - "integrity": "sha512-RJ9YYNCkhVDBuP4zN5BBtYAzEl03yq/jIIsyif0JY9qyJuQQZNeDK7anAPKKlyEtLSj2s8h6hNh2F8zO5q7ScA==", - "license": "ISC" - }, "node_modules/json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", @@ -11900,27 +9922,6 @@ "node": "*" } }, - "node_modules/keccak": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/keccak/-/keccak-3.0.4.tgz", - "integrity": "sha512-3vKuW0jV8J3XNTzvfyicFR5qvxrSAGl7KIhvgOu5cmWwM7tZRj3fMbj/pfIf4be7aznbc+prBWGjywox/g2Y6Q==", - "hasInstallScript": true, - "license": "MIT", - "dependencies": { - "node-addon-api": "^2.0.0", - "node-gyp-build": "^4.2.0", - "readable-stream": "^3.6.0" - }, - "engines": { - "node": ">=10.0.0" - } - }, - "node_modules/keccak/node_modules/node-addon-api": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-2.0.2.tgz", - "integrity": "sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA==", - "license": "MIT" - }, "node_modules/keyv": { "version": "4.5.4", "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", @@ -11931,12 +9932,6 @@ "json-buffer": "3.0.1" } }, - "node_modules/keyvaluestorage-interface": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/keyvaluestorage-interface/-/keyvaluestorage-interface-1.0.0.tgz", - "integrity": "sha512-8t6Q3TclQ4uZynJY9IGr2+SsIGwK9JHcO6ootkHCGA0CrQCRy+VkouYNO2xicET6b9al7QKzpebNow+gkpCL8g==", - "license": "MIT" - }, "node_modules/kind-of": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", @@ -11965,7 +9960,6 @@ "version": "3.1.3", "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.3.tgz", "integrity": "sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw==", - "dev": true, "license": "MIT", "engines": { "node": ">=14" @@ -11984,37 +9978,6 @@ "node": "^12.20.0 || ^14.13.1 || >=16.0.0" } }, - "node_modules/lit": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/lit/-/lit-2.8.0.tgz", - "integrity": "sha512-4Sc3OFX9QHOJaHbmTMk28SYgVxLN3ePDjg7hofEft2zWlehFL3LiAuapWc4U/kYwMYJSh2hTCPZ6/LIC7ii0MA==", - "license": "BSD-3-Clause", - "dependencies": { - "@lit/reactive-element": "^1.6.0", - "lit-element": "^3.3.0", - "lit-html": "^2.8.0" - } - }, - "node_modules/lit-element": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/lit-element/-/lit-element-3.3.3.tgz", - "integrity": "sha512-XbeRxmTHubXENkV4h8RIPyr8lXc+Ff28rkcQzw3G6up2xg5E8Zu1IgOWIwBLEQsu3cOVFqdYwiVi0hv0SlpqUA==", - "license": "BSD-3-Clause", - "dependencies": { - "@lit-labs/ssr-dom-shim": "^1.1.0", - "@lit/reactive-element": "^1.3.0", - "lit-html": "^2.8.0" - } - }, - "node_modules/lit-html": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/lit-html/-/lit-html-2.8.0.tgz", - "integrity": "sha512-o9t+MQM3P4y7M7yNzqAyjp7z+mQGa4NS4CxiyLqFPyFWyc4O+nodLrkrxSaCTrla6M5YOLaT3RpbbqjszB5g3Q==", - "license": "BSD-3-Clause", - "dependencies": { - "@types/trusted-types": "^2.0.2" - } - }, "node_modules/load-json-file": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", @@ -12059,7 +10022,6 @@ "version": "0.2.5", "resolved": "https://registry.npmjs.org/load-tsconfig/-/load-tsconfig-0.2.5.tgz", "integrity": "sha512-IXO6OCs9yg8tMKzfPZ1YmheJbZCiEsnBdcB03l0OcfK9prKnJb96siuHCr5Fl37/yo9DnKU+TLpxzTUspw9shg==", - "dev": true, "license": "MIT", "engines": { "node": "^12.20.0 || ^14.13.1 || >=16.0.0" @@ -12125,15 +10087,8 @@ "node_modules/lodash.escaperegexp": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/lodash.escaperegexp/-/lodash.escaperegexp-4.1.2.tgz", - "integrity": "sha512-TM9YBvyC84ZxE3rgfefxUWiQKLilstD6k7PTGt6wfbtXF8ixIJLOL3VYyV/z+ZiPLsVxAsKAFVwWlWeb2Y8Yyw==", - "dev": true, - "license": "MIT" - }, - "node_modules/lodash.isequal": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", - "integrity": "sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==", - "deprecated": "This package is deprecated. Use require('node:util').isDeepStrictEqual instead.", + "integrity": "sha512-TM9YBvyC84ZxE3rgfefxUWiQKLilstD6k7PTGt6wfbtXF8ixIJLOL3VYyV/z+ZiPLsVxAsKAFVwWlWeb2Y8Yyw==", + "dev": true, "license": "MIT" }, "node_modules/lodash.ismatch": { @@ -12168,7 +10123,6 @@ "version": "4.7.0", "resolved": "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz", "integrity": "sha512-HDWXG8isMntAyRF5vZ7xKuEvOhT4AhlRt/3czTSjvGUxjYCBVRQY48ViDHyfYz9VIoBkW4TMGQNapx+l3RUwdA==", - "dev": true, "license": "MIT" }, "node_modules/lodash.uniqby": { @@ -12200,6 +10154,7 @@ "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", "license": "MIT", + "optional": true, "peer": true, "dependencies": { "js-tokens": "^3.0.0 || ^4.0.0" @@ -12288,7 +10243,7 @@ "version": "1.3.6", "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", - "dev": true, + "devOptional": true, "license": "ISC" }, "node_modules/map-obj": { @@ -12355,6 +10310,7 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "dev": true, "license": "MIT", "engines": { "node": ">= 0.4" @@ -12546,30 +10502,21 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", - "dev": true, "license": "MIT" }, "node_modules/merge2": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "dev": true, "license": "MIT", "engines": { "node": ">= 8" } }, - "node_modules/micro-ftch": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/micro-ftch/-/micro-ftch-0.3.1.tgz", - "integrity": "sha512-/0LLxhzP0tfiR5hcQebtudP56gUurs2CLkGarnCiB/OqEyUFQ6U3paQi/tgLv0hBJYt2rnr9MNpxz4fiiugstg==", - "license": "MIT" - }, "node_modules/micromatch": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", - "dev": true, "license": "MIT", "dependencies": { "braces": "^3.0.3", @@ -12629,7 +10576,6 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", - "dev": true, "license": "MIT", "engines": { "node": ">=6" @@ -12655,18 +10601,6 @@ "node": ">=4" } }, - "node_modules/minimalistic-assert": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", - "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", - "license": "ISC" - }, - "node_modules/minimalistic-crypto-utils": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", - "integrity": "sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==", - "license": "MIT" - }, "node_modules/minimatch": { "version": "3.0.5", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.5.tgz", @@ -12709,7 +10643,6 @@ "version": "7.1.2", "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", - "dev": true, "license": "ISC", "engines": { "node": ">=16 || 14 >=14.17" @@ -12726,6 +10659,7 @@ } ], "license": "MIT", + "optional": true, "peerDependencies": { "typescript": ">=5.0.4" }, @@ -12774,20 +10708,6 @@ "node": ">=0.10.0" } }, - "node_modules/motion": { - "version": "10.16.2", - "resolved": "https://registry.npmjs.org/motion/-/motion-10.16.2.tgz", - "integrity": "sha512-p+PurYqfUdcJZvtnmAqu5fJgV2kR0uLFQuBKtLeFVTrYEVllI99tiOTSefVNYuip9ELTEkepIIDftNdze76NAQ==", - "license": "MIT", - "dependencies": { - "@motionone/animation": "^10.15.1", - "@motionone/dom": "^10.16.2", - "@motionone/svelte": "^10.16.2", - "@motionone/types": "^10.15.1", - "@motionone/utils": "^10.15.1", - "@motionone/vue": "^10.16.2" - } - }, "node_modules/mrmime": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/mrmime/-/mrmime-2.0.1.tgz", @@ -12804,17 +10724,10 @@ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "license": "MIT" }, - "node_modules/multiformats": { - "version": "9.9.0", - "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-9.9.0.tgz", - "integrity": "sha512-HoMUjhH9T8DDBNT+6xzkrd9ga/XiBI4xLr58LJACwK6G3HTOPeMz4nB4KJs33L2BelrIJa7P0VuNaVF3hMYfjg==", - "license": "(Apache-2.0 AND MIT)" - }, "node_modules/mz": { "version": "2.7.0", "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==", - "dev": true, "license": "MIT", "dependencies": { "any-promise": "^1.0.0", @@ -12826,7 +10739,7 @@ "version": "3.3.8", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.8.tgz", "integrity": "sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==", - "dev": true, + "devOptional": true, "funding": [ { "type": "github", @@ -12937,16 +10850,11 @@ "url": "https://opencollective.com/node-fetch" } }, - "node_modules/node-fetch-native": { - "version": "1.6.6", - "resolved": "https://registry.npmjs.org/node-fetch-native/-/node-fetch-native-1.6.6.tgz", - "integrity": "sha512-8Mc2HhqPdlIfedsuZoc3yioPuzp6b+L5jRCRY1QzuWZh2EGJVQrGppC6V6cF0bLdbW0+O2YpqCA25aF/1lvipQ==", - "license": "MIT" - }, "node_modules/node-gyp-build": { "version": "4.8.4", "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.8.4.tgz", "integrity": "sha512-LA4ZjwlnUblHVgq0oBF3Jl/6h/Nvs5fzBLwdEF4nuxnFdsfajde4WfxtJr3CaiH+F6ewcIB/q4jQ4UzPyid+CQ==", + "devOptional": true, "license": "MIT", "bin": { "node-gyp-build": "bin.js", @@ -12961,12 +10869,6 @@ "dev": true, "license": "MIT" }, - "node_modules/node-mock-http": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/node-mock-http/-/node-mock-http-1.0.0.tgz", - "integrity": "sha512-0uGYQ1WQL1M5kKvGRXWQ3uZCHtLTO8hln3oBjIusM75WoesZ909uQJs/Hb946i2SS+Gsrhkaa6iAO17jRIv6DQ==", - "license": "MIT" - }, "node_modules/node-releases": { "version": "2.0.19", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.19.tgz", @@ -13228,7 +11130,6 @@ "version": "4.0.1", "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", - "dev": true, "license": "MIT", "dependencies": { "path-key": "^3.0.0" @@ -15749,84 +13650,20 @@ "dev": true, "license": "ISC" }, - "node_modules/obj-multiplex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/obj-multiplex/-/obj-multiplex-1.0.0.tgz", - "integrity": "sha512-0GNJAOsHoBHeNTvl5Vt6IWnpUEcc3uSRxzBri7EDyIcMgYvnY2JL2qdeV5zTMjWQX5OHcD5amcW2HFfDh0gjIA==", - "license": "ISC", - "dependencies": { - "end-of-stream": "^1.4.0", - "once": "^1.4.0", - "readable-stream": "^2.3.3" - } - }, - "node_modules/obj-multiplex/node_modules/readable-stream": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", - "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", - "license": "MIT", - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "node_modules/obj-multiplex/node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "license": "MIT" - }, - "node_modules/obj-multiplex/node_modules/string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "license": "MIT", - "dependencies": { - "safe-buffer": "~5.1.0" - } - }, "node_modules/object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", - "dev": true, "license": "MIT", "engines": { "node": ">=0.10.0" } }, - "node_modules/ofetch": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/ofetch/-/ofetch-1.4.1.tgz", - "integrity": "sha512-QZj2DfGplQAr2oj9KzceK9Hwz6Whxazmn85yYeVuS3u9XTMOGMRx0kO95MQ+vLsj/S/NwBDMMLU5hpxvI6Tklw==", - "license": "MIT", - "dependencies": { - "destr": "^2.0.3", - "node-fetch-native": "^1.6.4", - "ufo": "^1.5.4" - } - }, - "node_modules/ohash": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/ohash/-/ohash-1.1.4.tgz", - "integrity": "sha512-FlDryZAahJmEF3VR3w1KogSEdWX3WhA5GPakFx4J81kEAiHyLMpdLLElS8n8dfNadMgAne/MywcvmogzscVt4g==", - "license": "MIT" - }, - "node_modules/on-exit-leak-free": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/on-exit-leak-free/-/on-exit-leak-free-0.2.0.tgz", - "integrity": "sha512-dqaz3u44QbRXQooZLTUKU41ZrzYrcvLISVgbrzbyCMxpmSLJvZ3ZamIJIZ29P6OhZIkNIQKosdeM6t1LYbA9hg==", - "license": "MIT" - }, "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, "license": "ISC", "dependencies": { "wrappy": "1" @@ -15836,7 +13673,6 @@ "version": "5.1.2", "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", - "dev": true, "license": "MIT", "dependencies": { "mimic-fn": "^2.1.0" @@ -16032,6 +13868,7 @@ "version": "2.2.0", "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true, "license": "MIT", "engines": { "node": ">=6" @@ -16041,7 +13878,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", - "dev": true, "license": "BlueOak-1.0.0" }, "node_modules/parent-module": { @@ -16087,6 +13923,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -16106,7 +13943,6 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -16123,7 +13959,6 @@ "version": "1.11.1", "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", - "dev": true, "license": "BlueOak-1.0.0", "dependencies": { "lru-cache": "^10.2.0", @@ -16140,14 +13975,12 @@ "version": "10.4.3", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", - "dev": true, "license": "ISC" }, "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, "license": "MIT", "engines": { "node": ">=8" @@ -16188,7 +14021,7 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", - "dev": true, + "devOptional": true, "license": "ISC" }, "node_modules/picomatch": { @@ -16213,58 +14046,10 @@ "node": ">=0.10.0" } }, - "node_modules/pino": { - "version": "7.11.0", - "resolved": "https://registry.npmjs.org/pino/-/pino-7.11.0.tgz", - "integrity": "sha512-dMACeu63HtRLmCG8VKdy4cShCPKaYDR4youZqoSWLxl5Gu99HUw8bw75thbPv9Nip+H+QYX8o3ZJbTdVZZ2TVg==", - "license": "MIT", - "dependencies": { - "atomic-sleep": "^1.0.0", - "fast-redact": "^3.0.0", - "on-exit-leak-free": "^0.2.0", - "pino-abstract-transport": "v0.5.0", - "pino-std-serializers": "^4.0.0", - "process-warning": "^1.0.0", - "quick-format-unescaped": "^4.0.3", - "real-require": "^0.1.0", - "safe-stable-stringify": "^2.1.0", - "sonic-boom": "^2.2.1", - "thread-stream": "^0.15.1" - }, - "bin": { - "pino": "bin.js" - } - }, - "node_modules/pino-abstract-transport": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/pino-abstract-transport/-/pino-abstract-transport-0.5.0.tgz", - "integrity": "sha512-+KAgmVeqXYbTtU2FScx1XS3kNyfZ5TrXY07V96QnUSFqo2gAqlvmaxH67Lj7SWazqsMabf+58ctdTcBgnOLUOQ==", - "license": "MIT", - "dependencies": { - "duplexify": "^4.1.2", - "split2": "^4.0.0" - } - }, - "node_modules/pino-abstract-transport/node_modules/split2": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/split2/-/split2-4.2.0.tgz", - "integrity": "sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==", - "license": "ISC", - "engines": { - "node": ">= 10.x" - } - }, - "node_modules/pino-std-serializers": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/pino-std-serializers/-/pino-std-serializers-4.0.0.tgz", - "integrity": "sha512-cK0pekc1Kjy5w9V2/n+8MkZwusa6EyyxfeQCB799CQRhRt/CqYKiWs5adeu8Shve2ZNffvfC/7J64A2PJo1W/Q==", - "license": "MIT" - }, "node_modules/pirates": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.6.tgz", "integrity": "sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==", - "dev": true, "license": "MIT", "engines": { "node": ">= 6" @@ -16376,38 +14161,11 @@ "dev": true, "license": "MIT" }, - "node_modules/pngjs": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/pngjs/-/pngjs-5.0.0.tgz", - "integrity": "sha512-40QW5YalBNfQo5yRYmiw7Yz6TKKVr3h6970B2YE+3fQpsWcrbj1PzJgxeJ19DRQjhMbKPIuMY8rFaXc8moolVw==", - "license": "MIT", - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/pony-cause": { - "version": "2.1.11", - "resolved": "https://registry.npmjs.org/pony-cause/-/pony-cause-2.1.11.tgz", - "integrity": "sha512-M7LhCsdNbNgiLYiP4WjsfLUuFmCfnjdF6jKe2R9NKl4WFN+HZPGHJZ9lnLP7f9ZnKe3U9nuWD0szirmj+migUg==", - "license": "0BSD", - "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/possible-typed-array-names": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.1.0.tgz", - "integrity": "sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg==", - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, "node_modules/postcss": { "version": "8.5.3", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.3.tgz", "integrity": "sha512-dle9A3yYxlBSrt8Fu+IpjGT8SY8hN0mlaA6GY8t0P5PjIOZemULz/E2Bnm/2dcUOena75OTNkHI76uZBNUUq3A==", - "dev": true, + "devOptional": true, "funding": [ { "type": "opencollective", @@ -16436,7 +14194,6 @@ "version": "4.0.2", "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-4.0.2.tgz", "integrity": "sha512-bSVhyJGL00wMVoPUzAVAnbEoWyqRxkjv64tUl427SKnPrENtq6hJwUojroMz2VB+Q1edmi4IfrAPpami5VVgMQ==", - "dev": true, "funding": [ { "type": "opencollective", @@ -16472,7 +14229,6 @@ "version": "2.7.0", "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.7.0.tgz", "integrity": "sha512-+hSoy/QHluxmC9kCIJyL/uyFmLmc+e5CFR5Wa+bpIhIj85LVb9ZH2nVnqrHoSvKogwODv0ClqZkmiSSaIH5LTA==", - "dev": true, "license": "ISC", "bin": { "yaml": "bin.mjs" @@ -16481,16 +14237,6 @@ "node": ">= 14" } }, - "node_modules/preact": { - "version": "10.26.2", - "resolved": "https://registry.npmjs.org/preact/-/preact-10.26.2.tgz", - "integrity": "sha512-0gNmv4qpS9HaN3+40CLBAnKe0ZfyE4ZWo5xKlC1rVrr0ckkEvJvAQqKaHANdFKsGstoxrY4AItZ7kZSGVoVjgg==", - "license": "MIT", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/preact" - } - }, "node_modules/prelude-ls": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", @@ -16569,12 +14315,7 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", - "license": "MIT" - }, - "node_modules/process-warning": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/process-warning/-/process-warning-1.0.0.tgz", - "integrity": "sha512-du4wfLyj4yCZq1VupnVSZmRsPJsNuxoDQFdCFHLaYiEbFBD7QE0a+I4D7hOxrVnh78QE/YipFAj9lXHiXocV+Q==", + "dev": true, "license": "MIT" }, "node_modules/propagate": { @@ -16593,12 +14334,6 @@ "dev": true, "license": "ISC" }, - "node_modules/proxy-compare": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/proxy-compare/-/proxy-compare-2.5.1.tgz", - "integrity": "sha512-oyfc0Tx87Cpwva5ZXezSp5V9vht1c7dZBhvuV/y3ctkgMVUmiAGDVeeB0dKhGSyT0v1ZTEQYpe/RXlBVBNuCLA==", - "license": "MIT" - }, "node_modules/proxy-from-env": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", @@ -16607,203 +14342,48 @@ "license": "MIT" }, "node_modules/pseudomap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==", - "dev": true, - "license": "ISC" - }, - "node_modules/pump": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.2.tgz", - "integrity": "sha512-tUPXtzlGM8FE3P0ZL6DVs/3P58k9nk8/jZeQCurTJylQA8qFYzHFfhBJkuqyE0FifOsQ0uKWekiZ5g8wtr28cw==", - "license": "MIT", - "dependencies": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, - "node_modules/punycode": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", - "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/q": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", - "integrity": "sha512-kV/CThkXo6xyFEZUugw/+pIOywXcDbFYgSct5cT3gqlbkBE1SJdwy6UQoZvodiWF/ckQLZyDE/Bu1M6gVu5lVw==", - "deprecated": "You or someone you depend on is using Q, the JavaScript Promise library that gave JavaScript developers strong feelings about promises. They can almost certainly migrate to the native JavaScript promise now. Thank you literally everyone for joining me in this bet against the odds. Be excellent to each other.\n\n(For a CapTP with native promises, see @endo/eventual-send and @endo/captp)", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.6.0", - "teleport": ">=0.2.0" - } - }, - "node_modules/qrcode": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/qrcode/-/qrcode-1.5.3.tgz", - "integrity": "sha512-puyri6ApkEHYiVl4CFzo1tDkAZ+ATcnbJrJ6RiBM1Fhctdn/ix9MTE3hRph33omisEbC/2fcfemsseiKgBPKZg==", - "license": "MIT", - "dependencies": { - "dijkstrajs": "^1.0.1", - "encode-utf8": "^1.0.3", - "pngjs": "^5.0.0", - "yargs": "^15.3.1" - }, - "bin": { - "qrcode": "bin/qrcode" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/qrcode/node_modules/cliui": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", - "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", - "license": "ISC", - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^6.2.0" - } - }, - "node_modules/qrcode/node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "license": "MIT", - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/qrcode/node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "license": "MIT", - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/qrcode/node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "license": "MIT", - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/qrcode/node_modules/p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "license": "MIT", - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/qrcode/node_modules/wrap-ansi": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", - "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/qrcode/node_modules/y18n": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", - "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==", + "dev": true, "license": "ISC" }, - "node_modules/qrcode/node_modules/yargs": { - "version": "15.4.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", - "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", + "node_modules/pump": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.2.tgz", + "integrity": "sha512-tUPXtzlGM8FE3P0ZL6DVs/3P58k9nk8/jZeQCurTJylQA8qFYzHFfhBJkuqyE0FifOsQ0uKWekiZ5g8wtr28cw==", + "dev": true, "license": "MIT", "dependencies": { - "cliui": "^6.0.0", - "decamelize": "^1.2.0", - "find-up": "^4.1.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^4.2.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^18.1.2" - }, - "engines": { - "node": ">=8" + "end-of-stream": "^1.1.0", + "once": "^1.3.1" } }, - "node_modules/qrcode/node_modules/yargs-parser": { - "version": "18.1.3", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", - "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", - "license": "ISC", - "dependencies": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - }, + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "license": "MIT", "engines": { "node": ">=6" } }, - "node_modules/query-string": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/query-string/-/query-string-7.1.3.tgz", - "integrity": "sha512-hh2WYhq4fi8+b+/2Kg9CEge4fDPvHS534aOOvOZeQ3+Vf2mCFsaFBYj0i+iXcAq6I9Vzp5fjMFBlONvayDC1qg==", + "node_modules/q": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", + "integrity": "sha512-kV/CThkXo6xyFEZUugw/+pIOywXcDbFYgSct5cT3gqlbkBE1SJdwy6UQoZvodiWF/ckQLZyDE/Bu1M6gVu5lVw==", + "deprecated": "You or someone you depend on is using Q, the JavaScript Promise library that gave JavaScript developers strong feelings about promises. They can almost certainly migrate to the native JavaScript promise now. Thank you literally everyone for joining me in this bet against the odds. Be excellent to each other.\n\n(For a CapTP with native promises, see @endo/eventual-send and @endo/captp)", + "dev": true, "license": "MIT", - "dependencies": { - "decode-uri-component": "^0.2.2", - "filter-obj": "^1.1.0", - "split-on-first": "^1.0.0", - "strict-uri-encode": "^2.0.0" - }, "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=0.6.0", + "teleport": ">=0.2.0" } }, "node_modules/queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "dev": true, "funding": [ { "type": "github", @@ -16820,12 +14400,6 @@ ], "license": "MIT" }, - "node_modules/quick-format-unescaped": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/quick-format-unescaped/-/quick-format-unescaped-4.0.4.tgz", - "integrity": "sha512-tYC1Q1hgyRuHgloV/YXs2w15unPVh8qfu/qCTfhTYamaw7fyhumKa2yGpdSo87vY32rIclj+4fWYQXUMs9EHvg==", - "license": "MIT" - }, "node_modules/quick-lru": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz", @@ -16839,12 +14413,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/radix3": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/radix3/-/radix3-1.1.2.tgz", - "integrity": "sha512-b484I/7b8rDEdSDKckSSBA8knMpcdsXudlE/LNL639wFoHKwLbEkQFZHWEYwDC0wa0FKUcCY+GAF73Z7wxNVFA==", - "license": "MIT" - }, "node_modules/rc": { "version": "1.2.8", "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", @@ -16876,6 +14444,7 @@ "resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz", "integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==", "license": "MIT", + "optional": true, "peer": true, "dependencies": { "loose-envify": "^1.1.0" @@ -17108,6 +14677,7 @@ "version": "3.6.2", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dev": true, "license": "MIT", "dependencies": { "inherits": "^2.0.3", @@ -17189,15 +14759,6 @@ "node": ">=8.10.0" } }, - "node_modules/real-require": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/real-require/-/real-require-0.1.0.tgz", - "integrity": "sha512-r/H9MzAWtrv8aSVjPCMFpDMl5q66GqtmmRkRjpHTsp4zBAa+snZyiQNlMONiUmEJcsnaw0wCauJ2GWODr/aFkg==", - "license": "MIT", - "engines": { - "node": ">= 12.13.0" - } - }, "node_modules/redent": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/redent/-/redent-3.0.0.tgz", @@ -17246,6 +14807,7 @@ "version": "0.14.1", "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==", + "dev": true, "license": "MIT" }, "node_modules/regenerator-transform": { @@ -17333,17 +14895,12 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "dev": true, "license": "MIT", "engines": { "node": ">=0.10.0" } }, - "node_modules/require-main-filename": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", - "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", - "license": "ISC" - }, "node_modules/resolve": { "version": "1.22.10", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.10.tgz", @@ -17413,7 +14970,6 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", - "dev": true, "license": "MIT", "engines": { "iojs": ">=1.0.0", @@ -17441,7 +14997,6 @@ "version": "3.29.5", "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.29.5.tgz", "integrity": "sha512-GVsDdsbJzzy4S/v3dqWPJ7EfvZJfCHiDqe80IyrF59LYuP+e6U1LJoUqeuqRbwAWoMNoXivMNeNAOf5E22VA1w==", - "dev": true, "license": "MIT", "bin": { "rollup": "dist/bin/rollup" @@ -17458,7 +15013,6 @@ "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", @@ -17491,6 +15045,7 @@ "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true, "funding": [ { "type": "github", @@ -17507,32 +15062,6 @@ ], "license": "MIT" }, - "node_modules/safe-regex-test": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.1.0.tgz", - "integrity": "sha512-x/+Cz4YrimQxQccJf5mKEbIa1NzeCRNI5Ecl/ekmlYaampdNLPalVyIcCZNNH3MvmqBugV5TMYZXv0ljslUlaw==", - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.2", - "es-errors": "^1.3.0", - "is-regex": "^1.2.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/safe-stable-stringify": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/safe-stable-stringify/-/safe-stable-stringify-2.5.0.tgz", - "integrity": "sha512-b3rppTKm9T+PsVCBEOUR46GWI7fdOs00VKZ1+9c1EWDaDMvjQc6tUwuFyIprgGgTcWoVHSKrU8H31ZHA2e0RHA==", - "license": "MIT", - "engines": { - "node": ">=10" - } - }, "node_modules/scale-ts": { "version": "1.6.1", "resolved": "https://registry.npmjs.org/scale-ts/-/scale-ts-1.6.1.tgz", @@ -17979,47 +15508,10 @@ "dev": true, "license": "ISC" }, - "node_modules/set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==", - "license": "ISC" - }, - "node_modules/set-function-length": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", - "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", - "license": "MIT", - "dependencies": { - "define-data-property": "^1.1.4", - "es-errors": "^1.3.0", - "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.4", - "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/sha.js": { - "version": "2.4.11", - "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", - "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", - "license": "(MIT AND BSD-3-Clause)", - "dependencies": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - }, - "bin": { - "sha.js": "bin.js" - } - }, "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, "license": "MIT", "dependencies": { "shebang-regex": "^3.0.0" @@ -18032,7 +15524,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -18062,7 +15553,6 @@ "version": "3.0.7", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", - "dev": true, "license": "ISC" }, "node_modules/signale": { @@ -18190,7 +15680,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -18206,77 +15695,6 @@ "ws": "^8.8.1" } }, - "node_modules/socket.io-client": { - "version": "4.8.1", - "resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-4.8.1.tgz", - "integrity": "sha512-hJVXfu3E28NmzGk8o1sHhN3om52tRvwYeidbj7xKy2eIIse5IoKX3USlS6Tqt3BHAtflLIkCQBkzVrEEfWUyYQ==", - "license": "MIT", - "dependencies": { - "@socket.io/component-emitter": "~3.1.0", - "debug": "~4.3.2", - "engine.io-client": "~6.6.1", - "socket.io-parser": "~4.2.4" - }, - "engines": { - "node": ">=10.0.0" - } - }, - "node_modules/socket.io-client/node_modules/debug": { - "version": "4.3.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", - "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", - "license": "MIT", - "dependencies": { - "ms": "^2.1.3" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/socket.io-parser": { - "version": "4.2.4", - "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.2.4.tgz", - "integrity": "sha512-/GbIKmo8ioc+NIWIhwdecY0ge+qVBSMdgxGygevmdHj24bsfgtCmcUUcQ5ZzcylGFHsN3k4HB4Cgkl96KVnuew==", - "license": "MIT", - "dependencies": { - "@socket.io/component-emitter": "~3.1.0", - "debug": "~4.3.1" - }, - "engines": { - "node": ">=10.0.0" - } - }, - "node_modules/socket.io-parser/node_modules/debug": { - "version": "4.3.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", - "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", - "license": "MIT", - "dependencies": { - "ms": "^2.1.3" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/sonic-boom": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/sonic-boom/-/sonic-boom-2.8.0.tgz", - "integrity": "sha512-kuonw1YOYYNOve5iHdSahXPOK49GqwA+LZhI6Wz/l0rP57iKyXXIHaRagOBHAPmGwJC6od2Z9zgvZ5loSgMlVg==", - "license": "MIT", - "dependencies": { - "atomic-sleep": "^1.0.0" - } - }, "node_modules/sort-keys": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-1.1.2.tgz", @@ -18317,7 +15735,7 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", - "dev": true, + "devOptional": true, "license": "BSD-3-Clause", "engines": { "node": ">=0.10.0" @@ -18400,15 +15818,6 @@ "node": "*" } }, - "node_modules/split-on-first": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/split-on-first/-/split-on-first-1.1.0.tgz", - "integrity": "sha512-43ZssAJaMusuKWL8sKUBQXHWOpq8d6CfN/u1p4gUzfJkM05C8rxTmYrkIPTXapZpORA6LkkzcUulJ8FqA7Uudw==", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, "node_modules/split2": { "version": "3.2.2", "resolved": "https://registry.npmjs.org/split2/-/split2-3.2.2.tgz", @@ -18484,25 +15893,11 @@ "safe-buffer": "~5.1.0" } }, - "node_modules/stream-shift": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.3.tgz", - "integrity": "sha512-76ORR0DO1o1hlKwTbi/DM3EXWGf3ZJYO8cXX5RJwnul2DEg2oyoZyjLNoQM8WsvZiFKCRfC1O0J7iCvie3RZmQ==", - "license": "MIT" - }, - "node_modules/strict-uri-encode": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz", - "integrity": "sha512-QwiXZgpRcKkhTj2Scnn++4PKtWsH0kpzZ62L2R6c/LUVYv7hVnZqcg2+sMuT6R7Jusu1vviK/MFsu6kNJfWlEQ==", - "license": "MIT", - "engines": { - "node": ">=4" - } - }, "node_modules/string_decoder": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dev": true, "license": "MIT", "dependencies": { "safe-buffer": "~5.2.0" @@ -18527,7 +15922,6 @@ "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, "license": "MIT", "dependencies": { "emoji-regex": "^8.0.0", @@ -18555,7 +15949,6 @@ "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, "license": "MIT", "dependencies": { "ansi-regex": "^5.0.1" @@ -18588,7 +15981,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", - "dev": true, "license": "MIT", "engines": { "node": ">=6" @@ -18686,7 +16078,6 @@ "version": "3.35.0", "resolved": "https://registry.npmjs.org/sucrase/-/sucrase-3.35.0.tgz", "integrity": "sha512-8EbVDiu9iN/nESwxeSxDKe0dunta1GOlHufmSSXxMD2z2/tMZpDMpvXQGsc+ajGo8y2uYUmixaSRUc/QPoQ0GA==", - "dev": true, "license": "MIT", "dependencies": { "@jridgewell/gen-mapping": "^0.3.2", @@ -18709,7 +16100,6 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, "license": "MIT", "dependencies": { "balanced-match": "^1.0.0" @@ -18719,7 +16109,6 @@ "version": "4.1.1", "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==", - "dev": true, "license": "MIT", "engines": { "node": ">= 6" @@ -18729,7 +16118,6 @@ "version": "3.3.0", "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.0.tgz", "integrity": "sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg==", - "dev": true, "license": "ISC", "dependencies": { "cross-spawn": "^7.0.0", @@ -18746,7 +16134,6 @@ "version": "10.4.5", "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", - "dev": true, "license": "ISC", "dependencies": { "foreground-child": "^3.1.0", @@ -18767,14 +16154,12 @@ "version": "1.2.4", "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", - "dev": true, "license": "MIT" }, "node_modules/sucrase/node_modules/minimatch": { "version": "9.0.5", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", - "dev": true, "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" @@ -18790,7 +16175,6 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", - "dev": true, "license": "ISC", "engines": { "node": ">=14" @@ -18799,15 +16183,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/superstruct": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/superstruct/-/superstruct-1.0.4.tgz", - "integrity": "sha512-7JpaAoX2NGyoFlI9NBh66BQXGONc+uE+MRS5i2iOBKuS4e+ccgMDjATgZldkah+33DakBxDHiss9kvUcGAO8UQ==", - "license": "MIT", - "engines": { - "node": ">=14.0.0" - } - }, "node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -18944,7 +16319,6 @@ "version": "3.3.1", "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", "integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==", - "dev": true, "license": "MIT", "dependencies": { "any-promise": "^1.0.0" @@ -18954,7 +16328,6 @@ "version": "1.6.0", "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz", "integrity": "sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==", - "dev": true, "license": "MIT", "dependencies": { "thenify": ">= 3.1.0 < 4" @@ -18963,15 +16336,6 @@ "node": ">=0.8" } }, - "node_modules/thread-stream": { - "version": "0.15.2", - "resolved": "https://registry.npmjs.org/thread-stream/-/thread-stream-0.15.2.tgz", - "integrity": "sha512-UkEhKIg2pD+fjkHQKyJO3yoIvAP3N6RlNFt2dUhcS1FGvCD1cQa1M/PGknCLFIyZdtJOWQjejp7bdNqmN7zwdA==", - "license": "MIT", - "dependencies": { - "real-require": "^0.1.0" - } - }, "node_modules/through": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", @@ -19070,6 +16434,7 @@ "version": "0.0.3", "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", + "dev": true, "license": "MIT" }, "node_modules/traverse": { @@ -19089,7 +16454,6 @@ "version": "1.2.2", "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==", - "dev": true, "license": "MIT", "bin": { "tree-kill": "cli.js" @@ -19135,14 +16499,13 @@ "version": "0.1.13", "resolved": "https://registry.npmjs.org/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz", "integrity": "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==", - "dev": true, "license": "Apache-2.0" }, "node_modules/ts-node": { "version": "10.9.1", "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "@cspotcode/source-map-support": "^0.8.0", @@ -19219,7 +16582,6 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/tsup/-/tsup-7.2.0.tgz", "integrity": "sha512-vDHlczXbgUvY3rWvqFEbSqmC1L7woozbzngMqTtL2PGBODTtWlRwGDDawhvWzr5c1QjKe4OAKqJGfE1xeXUvtQ==", - "dev": true, "license": "MIT", "dependencies": { "bundle-require": "^4.0.0", @@ -19265,7 +16627,6 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", - "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -19275,7 +16636,6 @@ "version": "0.8.0-beta.0", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.8.0-beta.0.tgz", "integrity": "sha512-2ymg6oRBpebeZi9UUNsgQ89bhx01TcTkmNTGnNO88imTmbSgy4nfujrgVEFKWpMTEGA11EDkTt7mqObTPdigIA==", - "dev": true, "license": "BSD-3-Clause", "dependencies": { "whatwg-url": "^7.0.0" @@ -19288,7 +16648,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/tr46/-/tr46-1.0.1.tgz", "integrity": "sha512-dTpowEjclQ7Kgx5SdBkqRzVhERQXov8/l9Ft9dVM9fmg0W0KQSVaXX9T4i6twCPNtYiZM53lpSSUAwJbFPOHxA==", - "dev": true, "license": "MIT", "dependencies": { "punycode": "^2.1.0" @@ -19298,14 +16657,12 @@ "version": "4.0.2", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-4.0.2.tgz", "integrity": "sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==", - "dev": true, "license": "BSD-2-Clause" }, "node_modules/tsup/node_modules/whatwg-url": { "version": "7.1.0", "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-7.1.0.tgz", "integrity": "sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg==", - "dev": true, "license": "MIT", "dependencies": { "lodash.sortby": "^4.7.0", @@ -19477,6 +16834,7 @@ "version": "1.5.4", "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.5.4.tgz", "integrity": "sha512-UsUk3byDzKd04EyoZ7U4DOlxQaD14JUKQl6/P7wiX4FNvUfm3XL246n9W5AmqwW5RSFJ27NAuM0iLscAOYUiGQ==", + "dev": true, "license": "MIT" }, "node_modules/uglify-js": { @@ -19493,19 +16851,10 @@ "node": ">=0.8.0" } }, - "node_modules/uint8arrays": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.1.0.tgz", - "integrity": "sha512-ei5rfKtoRO8OyOIor2Rz5fhzjThwIHJZ3uyDPnDHTXbP0aMQ1RN/6AI5B5d9dBxJOU+BvOAk7ZQ1xphsX8Lrog==", - "license": "MIT", - "dependencies": { - "multiformats": "^9.4.2" - } - }, - "node_modules/uncrypto": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/uncrypto/-/uncrypto-0.1.3.tgz", - "integrity": "sha512-Ql87qFHB3s/De2ClA9e0gsnS6zXG27SkTiSJwjCc9MebbfapQfuPzumMIUMi38ezPZVNFcHI9sUIepeQfw8J8Q==", + "node_modules/undici-types": { + "version": "6.19.8", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", + "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==", "license": "MIT" }, "node_modules/unicode-canonical-property-names-ecmascript": { @@ -19579,107 +16928,9 @@ "dev": true, "license": "MIT", "engines": { - "node": ">= 10.0.0" - } - }, - "node_modules/unstorage": { - "version": "1.14.4", - "resolved": "https://registry.npmjs.org/unstorage/-/unstorage-1.14.4.tgz", - "integrity": "sha512-1SYeamwuYeQJtJ/USE1x4l17LkmQBzg7deBJ+U9qOBoHo15d1cDxG4jM31zKRgF7pG0kirZy4wVMX6WL6Zoscg==", - "license": "MIT", - "dependencies": { - "anymatch": "^3.1.3", - "chokidar": "^3.6.0", - "destr": "^2.0.3", - "h3": "^1.13.0", - "lru-cache": "^10.4.3", - "node-fetch-native": "^1.6.4", - "ofetch": "^1.4.1", - "ufo": "^1.5.4" - }, - "peerDependencies": { - "@azure/app-configuration": "^1.8.0", - "@azure/cosmos": "^4.2.0", - "@azure/data-tables": "^13.3.0", - "@azure/identity": "^4.5.0", - "@azure/keyvault-secrets": "^4.9.0", - "@azure/storage-blob": "^12.26.0", - "@capacitor/preferences": "^6.0.3", - "@deno/kv": ">=0.8.4", - "@netlify/blobs": "^6.5.0 || ^7.0.0 || ^8.1.0", - "@planetscale/database": "^1.19.0", - "@upstash/redis": "^1.34.3", - "@vercel/blob": ">=0.27.0", - "@vercel/kv": "^1.0.1", - "aws4fetch": "^1.0.20", - "db0": ">=0.2.1", - "idb-keyval": "^6.2.1", - "ioredis": "^5.4.2", - "uploadthing": "^7.4.1" - }, - "peerDependenciesMeta": { - "@azure/app-configuration": { - "optional": true - }, - "@azure/cosmos": { - "optional": true - }, - "@azure/data-tables": { - "optional": true - }, - "@azure/identity": { - "optional": true - }, - "@azure/keyvault-secrets": { - "optional": true - }, - "@azure/storage-blob": { - "optional": true - }, - "@capacitor/preferences": { - "optional": true - }, - "@deno/kv": { - "optional": true - }, - "@netlify/blobs": { - "optional": true - }, - "@planetscale/database": { - "optional": true - }, - "@upstash/redis": { - "optional": true - }, - "@vercel/blob": { - "optional": true - }, - "@vercel/kv": { - "optional": true - }, - "aws4fetch": { - "optional": true - }, - "db0": { - "optional": true - }, - "idb-keyval": { - "optional": true - }, - "ioredis": { - "optional": true - }, - "uploadthing": { - "optional": true - } + "node": ">= 10.0.0" } }, - "node_modules/unstorage/node_modules/lru-cache": { - "version": "10.4.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", - "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", - "license": "ISC" - }, "node_modules/update-browserslist-db": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.2.tgz", @@ -19733,6 +16984,8 @@ "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.4.0.tgz", "integrity": "sha512-9WXSPC5fMv61vaupRkCKCxsPxBocVnwakBEkMIHHpkTTg6icbJtg6jzgtLDm4bl3cSHAca52rYWih0k4K3PfHw==", "license": "MIT", + "optional": true, + "peer": true, "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" } @@ -19743,6 +16996,8 @@ "integrity": "sha512-Z6czzLq4u8fPOyx7TU6X3dvUZVvoJmxSQ+IcrlmagKhilxlhZgxPK6C5Jqbkw1IDUmFTM+cz9QDnnLTwDz/2gQ==", "hasInstallScript": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "node-gyp-build": "^4.3.0" }, @@ -19750,23 +17005,11 @@ "node": ">=6.14.2" } }, - "node_modules/util": { - "version": "0.12.5", - "resolved": "https://registry.npmjs.org/util/-/util-0.12.5.tgz", - "integrity": "sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA==", - "license": "MIT", - "dependencies": { - "inherits": "^2.0.3", - "is-arguments": "^1.0.4", - "is-generator-function": "^1.0.7", - "is-typed-array": "^1.1.3", - "which-typed-array": "^1.1.2" - } - }, "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true, "license": "MIT" }, "node_modules/uuid": { @@ -19790,7 +17033,7 @@ "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, + "devOptional": true, "license": "MIT" }, "node_modules/v8-to-istanbul": { @@ -19829,40 +17072,6 @@ "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/valtio": { - "version": "1.11.2", - "resolved": "https://registry.npmjs.org/valtio/-/valtio-1.11.2.tgz", - "integrity": "sha512-1XfIxnUXzyswPAPXo1P3Pdx2mq/pIqZICkWN60Hby0d9Iqb+MEIpqgYVlbflvHdrp2YR/q3jyKWRPJJ100yxaw==", - "license": "MIT", - "dependencies": { - "proxy-compare": "2.5.1", - "use-sync-external-store": "1.2.0" - }, - "engines": { - "node": ">=12.20.0" - }, - "peerDependencies": { - "@types/react": ">=16.8", - "react": ">=16.8" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - }, - "react": { - "optional": true - } - } - }, - "node_modules/valtio/node_modules/use-sync-external-store": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.2.0.tgz", - "integrity": "sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==", - "license": "MIT", - "peerDependencies": { - "react": "^16.8.0 || ^17.0.0 || ^18.0.0" - } - }, "node_modules/viem": { "version": "2.23.3", "resolved": "https://registry.npmjs.org/viem/-/viem-2.23.3.tgz", @@ -20499,31 +17708,6 @@ "dev": true, "license": "MIT" }, - "node_modules/wagmi": { - "version": "2.14.11", - "resolved": "https://registry.npmjs.org/wagmi/-/wagmi-2.14.11.tgz", - "integrity": "sha512-Qj79cq+9MAcnKict9QLo60Lc4S2IXVVE94HBwCmczDrFtoM31NxfX4uQP73Elj2fV9lXH4/dw3jlb8eDhlm6iQ==", - "license": "MIT", - "dependencies": { - "@wagmi/connectors": "5.7.7", - "@wagmi/core": "2.16.4", - "use-sync-external-store": "1.4.0" - }, - "funding": { - "url": "https://github.com/sponsors/wevm" - }, - "peerDependencies": { - "@tanstack/react-query": ">=5.0.0", - "react": ">=18", - "typescript": ">=5.0.4", - "viem": "2.x" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, "node_modules/wcwidth": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", @@ -20543,22 +17727,18 @@ "node": ">= 8" } }, - "node_modules/webextension-polyfill": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/webextension-polyfill/-/webextension-polyfill-0.10.0.tgz", - "integrity": "sha512-c5s35LgVa5tFaHhrZDnr3FpQpjj1BB+RXhLTYUxGqBVN460HkbM8TBtEqdXWbpTKfzwCcjAZVF7zXCYSKtcp9g==", - "license": "MPL-2.0" - }, "node_modules/webidl-conversions": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", + "dev": true, "license": "BSD-2-Clause" }, "node_modules/whatwg-url": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "dev": true, "license": "MIT", "dependencies": { "tr46": "~0.0.3", @@ -20569,7 +17749,6 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, "license": "ISC", "dependencies": { "isexe": "^2.0.0" @@ -20581,32 +17760,6 @@ "node": ">= 8" } }, - "node_modules/which-module": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.1.tgz", - "integrity": "sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==", - "license": "ISC" - }, - "node_modules/which-typed-array": { - "version": "1.1.18", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.18.tgz", - "integrity": "sha512-qEcY+KJYlWyLH9vNbsr6/5j59AXk5ni5aakf8ldzBvGde6Iz4sxZGkJyWSAueTG7QhOvNRYb1lDdFmL5Td0QKA==", - "license": "MIT", - "dependencies": { - "available-typed-arrays": "^1.0.7", - "call-bind": "^1.0.8", - "call-bound": "^1.0.3", - "for-each": "^0.3.3", - "gopd": "^1.2.0", - "has-tostringtag": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/why-is-node-running": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.3.0.tgz", @@ -20664,7 +17817,6 @@ "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, "license": "MIT", "dependencies": { "ansi-styles": "^4.0.0", @@ -20682,6 +17834,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true, "license": "ISC" }, "node_modules/ws": { @@ -20705,18 +17858,11 @@ } } }, - "node_modules/xmlhttprequest-ssl": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/xmlhttprequest-ssl/-/xmlhttprequest-ssl-2.1.2.tgz", - "integrity": "sha512-TEU+nJVUUnA4CYJFLvK5X9AOeH4KvDvhIfm0vV1GaQRtchnG0hgK5p8hw/xjv8cunWYCsiPCSDzObPyhEwq3KQ==", - "engines": { - "node": ">=0.4.0" - } - }, "node_modules/xtend": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "dev": true, "license": "MIT", "engines": { "node": ">=0.4" @@ -20797,7 +17943,7 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", - "dev": true, + "devOptional": true, "license": "MIT", "engines": { "node": ">=6" @@ -20821,6 +17967,7 @@ "resolved": "https://registry.npmjs.org/zustand/-/zustand-5.0.0.tgz", "integrity": "sha512-LE+VcmbartOPM+auOjCCLQOsQ05zUTp8RkgwRzefUk+2jISdMMFnxvyTjA4YNWr5ZGXYbVsEMZosttuxUBkojQ==", "license": "MIT", + "optional": true, "engines": { "node": ">=12.20.0" }, @@ -20850,34 +17997,284 @@ "version": "0.0.2-eth-rollup-develop.242", "license": "ISC", "dependencies": { + "@polkadot/api": "11.1.1", "big.js": "6.2.1", + "bn.js": "^5.2.1", + "ethers": "^6.13.5", "gasp-type-definitions": "0.0.2-eth-rollup-develop.246", + "gasp-types": "0.0.2-eth-rollup-develop.242", "tslib": "^2.3.0", "tslog": "4.8.2", - "viem": "^2.17.4", - "wagmi": "^2.10.10" - }, - "devDependencies": { - "gasp-types": "0.0.2-eth-rollup-develop.241" + "tsup": "^7.2.0", + "viem": "^2.17.4" }, "engines": { "node": ">=18.0.0" }, - "peerDependencies": { - "@polkadot/api": "^11.1.1" + "optionalDependencies": { + "@wagmi/core": "^2.16.7" } }, - "packages/sdk/node_modules/gasp-types": { - "version": "0.0.2-eth-rollup-develop.241", - "resolved": "https://registry.npmjs.org/gasp-types/-/gasp-types-0.0.2-eth-rollup-develop.241.tgz", - "integrity": "sha512-mM58fhTtgS1Bwh2FQyjyB3IK4ZIIapfVNO+a9ZirDoSYmQpNTXgJUxa5liv6xMyo8W3VO5egBZ+KHNkpwtGPNg==", - "dev": true, - "license": "GPL-3.0", + "packages/sdk/node_modules/@polkadot/api": { + "version": "11.1.1", + "resolved": "https://registry.npmjs.org/@polkadot/api/-/api-11.1.1.tgz", + "integrity": "sha512-SGKIFMan0o4cjRxpndAaEG7aPb9TwAPVgjS/DKJDpzdKA7rEqDTe+SFw/vuzbt9CSl2nx1LBd10xbOeV7Ak+KA==", + "license": "Apache-2.0", + "dependencies": { + "@polkadot/api-augment": "11.1.1", + "@polkadot/api-base": "11.1.1", + "@polkadot/api-derive": "11.1.1", + "@polkadot/keyring": "^12.6.2", + "@polkadot/rpc-augment": "11.1.1", + "@polkadot/rpc-core": "11.1.1", + "@polkadot/rpc-provider": "11.1.1", + "@polkadot/types": "11.1.1", + "@polkadot/types-augment": "11.1.1", + "@polkadot/types-codec": "11.1.1", + "@polkadot/types-create": "11.1.1", + "@polkadot/types-known": "11.1.1", + "@polkadot/util": "^12.6.2", + "@polkadot/util-crypto": "^12.6.2", + "eventemitter3": "^5.0.1", + "rxjs": "^7.8.1", + "tslib": "^2.6.2" + }, "engines": { - "node": ">=18.0.0" + "node": ">=18" + } + }, + "packages/sdk/node_modules/@polkadot/api-augment": { + "version": "11.1.1", + "resolved": "https://registry.npmjs.org/@polkadot/api-augment/-/api-augment-11.1.1.tgz", + "integrity": "sha512-3rJZmW5RH/A9ajO75Fmc20FMQRFytk/hZOqFAlhik/UuRCOgtU4fNouSWaWN0a75iBT8+01/sS917XRibHDysQ==", + "license": "Apache-2.0", + "dependencies": { + "@polkadot/api-base": "11.1.1", + "@polkadot/rpc-augment": "11.1.1", + "@polkadot/types": "11.1.1", + "@polkadot/types-augment": "11.1.1", + "@polkadot/types-codec": "11.1.1", + "@polkadot/util": "^12.6.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18" + } + }, + "packages/sdk/node_modules/@polkadot/api-base": { + "version": "11.1.1", + "resolved": "https://registry.npmjs.org/@polkadot/api-base/-/api-base-11.1.1.tgz", + "integrity": "sha512-+hH7Azj7pOj0iyjLj8ORxJVNUKAfZCH68rM9VQRs+/N9NmpxSMx8AxBKCynSgSJoiDXr84Zm862wJHoa4Ytf2g==", + "license": "Apache-2.0", + "dependencies": { + "@polkadot/rpc-core": "11.1.1", + "@polkadot/types": "11.1.1", + "@polkadot/util": "^12.6.2", + "rxjs": "^7.8.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18" + } + }, + "packages/sdk/node_modules/@polkadot/api-derive": { + "version": "11.1.1", + "resolved": "https://registry.npmjs.org/@polkadot/api-derive/-/api-derive-11.1.1.tgz", + "integrity": "sha512-OR2DfUg9Nd3JvCw3hUXbLPyiaUBPzb1mVXc2qngqdz4Y1Sg0yakTwKjSiFBEgQE7qO0Fjq9BYKLi5Ci66jciAw==", + "license": "Apache-2.0", + "dependencies": { + "@polkadot/api": "11.1.1", + "@polkadot/api-augment": "11.1.1", + "@polkadot/api-base": "11.1.1", + "@polkadot/rpc-core": "11.1.1", + "@polkadot/types": "11.1.1", + "@polkadot/types-codec": "11.1.1", + "@polkadot/util": "^12.6.2", + "@polkadot/util-crypto": "^12.6.2", + "rxjs": "^7.8.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18" + } + }, + "packages/sdk/node_modules/@polkadot/rpc-augment": { + "version": "11.1.1", + "resolved": "https://registry.npmjs.org/@polkadot/rpc-augment/-/rpc-augment-11.1.1.tgz", + "integrity": "sha512-jkKhKAqgPivgNltmLmeD7oiMD6ekxe9bv2qOGEc1BVopSnS+PXCuGOeftTuv7Qo4rXaoEkMP1rlxmbjOZ4o3sg==", + "license": "Apache-2.0", + "dependencies": { + "@polkadot/rpc-core": "11.1.1", + "@polkadot/types": "11.1.1", + "@polkadot/types-codec": "11.1.1", + "@polkadot/util": "^12.6.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18" + } + }, + "packages/sdk/node_modules/@polkadot/rpc-core": { + "version": "11.1.1", + "resolved": "https://registry.npmjs.org/@polkadot/rpc-core/-/rpc-core-11.1.1.tgz", + "integrity": "sha512-XDEIxWajwS0DIJeqImWYeSDHcMZNXUDunI+mXK/ihtZJY6/s3CY1UHo6SgdWCK05IukQhr9CjRVtKNU7DYGS4Q==", + "license": "Apache-2.0", + "dependencies": { + "@polkadot/rpc-augment": "11.1.1", + "@polkadot/rpc-provider": "11.1.1", + "@polkadot/types": "11.1.1", + "@polkadot/util": "^12.6.2", + "rxjs": "^7.8.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18" + } + }, + "packages/sdk/node_modules/@polkadot/rpc-provider": { + "version": "11.1.1", + "resolved": "https://registry.npmjs.org/@polkadot/rpc-provider/-/rpc-provider-11.1.1.tgz", + "integrity": "sha512-m4v964Cs7dM9cLiMD5XVLPvKAT1yOcvTX618875pLe5LU67b7MLUT2xxCchXf61jvM6b3NKNKulKSMmlQJkYtw==", + "license": "Apache-2.0", + "dependencies": { + "@polkadot/keyring": "^12.6.2", + "@polkadot/types": "11.1.1", + "@polkadot/types-support": "11.1.1", + "@polkadot/util": "^12.6.2", + "@polkadot/util-crypto": "^12.6.2", + "@polkadot/x-fetch": "^12.6.2", + "@polkadot/x-global": "^12.6.2", + "@polkadot/x-ws": "^12.6.2", + "eventemitter3": "^5.0.1", + "mock-socket": "^9.3.1", + "nock": "^13.5.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@substrate/connect": "0.8.10" + } + }, + "packages/sdk/node_modules/@polkadot/types": { + "version": "11.1.1", + "resolved": "https://registry.npmjs.org/@polkadot/types/-/types-11.1.1.tgz", + "integrity": "sha512-v4cbkRXYGcgtESg5oF/fVFNSrkmxw+rFxWslOWVB0mDJ74ooPDyasBR0FjxrPdoMlbxtrBbs+TixFEKng63chA==", + "license": "Apache-2.0", + "dependencies": { + "@polkadot/keyring": "^12.6.2", + "@polkadot/types-augment": "11.1.1", + "@polkadot/types-codec": "11.1.1", + "@polkadot/types-create": "11.1.1", + "@polkadot/util": "^12.6.2", + "@polkadot/util-crypto": "^12.6.2", + "rxjs": "^7.8.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18" + } + }, + "packages/sdk/node_modules/@polkadot/types-augment": { + "version": "11.1.1", + "resolved": "https://registry.npmjs.org/@polkadot/types-augment/-/types-augment-11.1.1.tgz", + "integrity": "sha512-aBfM+vu76YIym8Dvy00FJZRVz9cHqeghlTj3Lj1WjolVc+GuFxAWDx87p778Sb9d+iebA3pVY0wXNF+ZlRNDtg==", + "license": "Apache-2.0", + "dependencies": { + "@polkadot/types": "11.1.1", + "@polkadot/types-codec": "11.1.1", + "@polkadot/util": "^12.6.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18" + } + }, + "packages/sdk/node_modules/@polkadot/types-codec": { + "version": "11.1.1", + "resolved": "https://registry.npmjs.org/@polkadot/types-codec/-/types-codec-11.1.1.tgz", + "integrity": "sha512-YMLEwerOO17M++EUAnh0SQWcDQNZ/l2nGmbSSvLEUBZdjXdtfLQ8NFVZakH5ehNHD+X3t0NLOQJg0hOBlVIj4A==", + "license": "Apache-2.0", + "dependencies": { + "@polkadot/util": "^12.6.2", + "@polkadot/x-bigint": "^12.6.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18" + } + }, + "packages/sdk/node_modules/@polkadot/types-create": { + "version": "11.1.1", + "resolved": "https://registry.npmjs.org/@polkadot/types-create/-/types-create-11.1.1.tgz", + "integrity": "sha512-Ro/9lYyEhGYTFoIvFUvAzdJ+0Of/tVnqewtwV35iXX9C86GazE8URJPrHFh4J/GBLQY0/JiT++PwxwFNH/kJsw==", + "license": "Apache-2.0", + "dependencies": { + "@polkadot/types-codec": "11.1.1", + "@polkadot/util": "^12.6.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18" + } + }, + "packages/sdk/node_modules/@polkadot/types-known": { + "version": "11.1.1", + "resolved": "https://registry.npmjs.org/@polkadot/types-known/-/types-known-11.1.1.tgz", + "integrity": "sha512-Kp+KrCIxy8FkfqzyV/KpRGJC8bBAK8eKC/ta7bCo++kmdGc9FFfpmTMPIYOtd8vxYdL71KA40bI9LqodCaopQg==", + "license": "Apache-2.0", + "dependencies": { + "@polkadot/networks": "^12.6.2", + "@polkadot/types": "11.1.1", + "@polkadot/types-codec": "11.1.1", + "@polkadot/types-create": "11.1.1", + "@polkadot/util": "^12.6.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18" + } + }, + "packages/sdk/node_modules/@polkadot/types-support": { + "version": "11.1.1", + "resolved": "https://registry.npmjs.org/@polkadot/types-support/-/types-support-11.1.1.tgz", + "integrity": "sha512-Wf1aYs5lEtwksFH8EBNZMxBJlcRFx/sewErzpwGJJFT8BGcrQpc6HlNjVXJpTdXj+0VzUBHE9B8eAWfWQl8YIA==", + "license": "Apache-2.0", + "dependencies": { + "@polkadot/util": "^12.6.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18" + } + }, + "packages/sdk/node_modules/@wagmi/core": { + "version": "2.16.7", + "resolved": "https://registry.npmjs.org/@wagmi/core/-/core-2.16.7.tgz", + "integrity": "sha512-Kpgrw6OXV0VBhDs4toQVKQ0NK5yUO6uxEqnvRGjNjbO85d93Gbfsp5BlxSLeWq6iVMSBFSitdl5i9W7b1miq1g==", + "license": "MIT", + "optional": true, + "dependencies": { + "eventemitter3": "5.0.1", + "mipd": "0.0.7", + "zustand": "5.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/wevm" }, "peerDependencies": { - "@polkadot/api": "^11.1.1" + "@tanstack/query-core": ">=5.0.0", + "typescript": ">=5.0.4", + "viem": "2.x" + }, + "peerDependenciesMeta": { + "@tanstack/query-core": { + "optional": true + }, + "typescript": { + "optional": true + } } }, "packages/type-definitions": { diff --git a/package.json b/package.json index a3b40c89..345ec5e0 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,10 @@ "vite": "~4.3.9", "vitest": "~0.32.0" }, - "workspaces": [ - "packages/*" - ] + "resolutions": { + "@polkadot/api": "11.1.1", + "@polkadot/types": "11.1.1", + "@polkadot/types-codec": "11.1.1" + }, + "workspaces": ["packages/*"] } diff --git a/packages/sdk/README.md b/packages/sdk/README.md index eef55f32..d412ca4e 100644 --- a/packages/sdk/README.md +++ b/packages/sdk/README.md @@ -1,484 +1,237 @@ -## Mangata Finance SDK +

Gasp SDK

-

- The GASP SDK is a comprehensive toolset designed for facilitating seamless communication with the Mangata node. +

+ Gasp SDK is comprehensive toolset designed for facilitating seamless communication with the Gasp node.

-![Artwork](https://blog.mangata.finance/assets/posts/themis-cover.png) +![npm](https://img.shields.io/npm/v/gasp-sdk) +![Issues](https://img.shields.io/github/issues/mangata-finance/gasp-dev-kit) +![Pull Request](https://img.shields.io/github/issues-pr/mangata-finance/gasp-dev-kit) +![GitHub last commit](https://img.shields.io/github/last-commit/mangata-finance/gasp-dev-kit) -![npm](https://img.shields.io/npm/v/%40mangata-finance%2Fsdk) -![Issues](https://img.shields.io/github/issues/mangata-finance/mangata-sdk) -![Pull Request](https://img.shields.io/github/issues-pr/mangata-finance/mangata-sdk) -![GitHub last commit](https://img.shields.io/github/last-commit/mangata-finance/mangata-sdk) -![Build Status](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Fmangata-finance%2Fmangata-sdk%2Fbadge%3Fref%3Ddevelop&style=flat) -![npm type definitions](https://img.shields.io/npm/types/%40mangata-finance%2Fsdk) +## Table of Contents -# Getting Started +- [Introduction](#introduction) +- [Table of Contents](#table-of-contents) +- [Installation & Setup](#installation--setup) +- [Quick Start / Getting Started](#quick-start--getting-started) +- [Usage & Examples](#usage--examples) +- [Core SDK Components & Available Features](#core-sdk-components--available-features) -The GASP SDK is the TypeScript library that offers a wide range of convenient methods for effortlessly buying and selling assets on the Mangata DEX. Its primary objective is to streamline the development process for client applications, specifically targeting algorithmic traders and frontend interface builders. By utilizing the Mangata SDK, developers can significantly reduce time and effort required to integrate with the platform. +## Installation & Setup -## Installation +### Supported Languages & Frameworks -```sh -// with npm -npm i gasp-sdk +The Gasp SDK is built for **TypeScript/JavaScript** and is designed to work seamlessly in both Node.js and browser environments. All examples are provided in TypeScript, but you can easily use them in JavaScript as well. -// with yarn +### Prerequisites + +Before installing the SDK, ensure you have the following: + +- A supported version of [Node.js](https://nodejs.org/) (v20 or above) installed. +- A package manager such as [npm](https://www.npmjs.com/) or [yarn](https://yarnpkg.com/). + +### Installation + +You can install the SDK via npm or yarn: + +```bash +## Using npm +npm install gasp-sdk + +## Using yarn yarn add gasp-sdk ``` -## Migration from v1 to v2 - -To migrate from v1 to v2, certain modifications need to be made. This guide aims to help you refactor your codebase. We have divided the methods into specific groups: - -1. xTokens -2. xyk -3. rpc -4. tokens -5. submitableExtrinsic -6. query -7. fee -8. util - -The **buyAsset** and **sellAsset** methods have been removed and replaced by **multiswapBuyAsset** and **multiswapSellAsset** respectively. - -We also made a change by transitioning from using arguments for functions to using objects as parameters. -Example: - -```js -V1: -await instance.createPool( - testUser, - firstTokenId, - new BN("10000000000000000000000"), - secondTokenId, - new BN("10000000000000000000000"), - txOptions: { - extrinsicStatus: (data) => { - console.log(data) - } - } - ); - - -V2: -const args: CreatePool = { - account: testUser, - firstTokenId: firstTokenId!, - secondTokenId: secondTokenId!, - firstTokenAmount: new BN("10000000000000000000000"), - secondTokenAmount: new BN("10000000000000000000000"), - txOptions: { - extrinsicStatus: (data) => { - console.log(data) - } - } - }; - await instance.xyk.createPool(args); +### Setup + +After installation, import and initialize the SDK in your project: + +```ts +import { Gasp } from 'gasp-sdk'; + +const sdk = await Gasp.create('wss://rollup-prod-rpc.gasp.xyz/', { + debug: true, + // Optionally, pass a custom logger instance if needed + logger, +}).catch((e) => { + console.error('Error creating Gasp SDK instance:', e); +}); ``` -We no longer support the implementation of depositing to Mangata within the SDK. However, we do provide the necessary raw methods for depositing, which should be implemented separately outside of the SDK. For specific examples of how to deposit to Mangata using the SDK, please refer to the provided examples. +### Additional Configuration -To obtain an instance of the Mangata node, please follow this step: +#### Signer -```js -V1: -const mangata = Mangata.getInstance(["wss://kusama-archive.mangata.online"]); +The SDK allows you to pass a signer instance after the initialization. This is useful if you want to avoid passing the signer for every call. The signer should implement the necessary methods for signing transactions. -V2: -import { MangataInstance } from "@mangata-finance/sdk" -const mangata: MangataInstance = Mangata.instance(["wss://kusama-archive.mangata.online"]); +To use signer provided by the SDK, you can initialize it as follows: + +```ts +import { Gasp } from 'gasp-sdk'; + +const pk = '...'; +const sdk = await Gasp.create('wss://rollup-prod-rpc.gasp.xyz/'); +sdk.setSigner(sdk.signers.ethers.create(pk)); ``` -Method **getAmountOfTokenIdInPool** has been renamed to **getAmountOfTokensInPool** +In case you want to use your own signer, you can implement the `Signer` interface and pass it to the SDK. Example implementation can be found [here](./src/modules/signer/EthersSigner.ts). -```js -V1: -const amount = await mangata.getAmountOfTokenIdInPool("0", "4") +#### Logger -V2: -const amount = await mangata.query.getAmountOfTokensInPool("0", "4") -``` +The SDK uses a logger to output debug and error messages. When you enable debug mode (by setting `debug: true`), the SDK will output detailed logs. By default, if you don't provide a custom logger, the SDK uses its built-in logger. -Please replace the existing "buyAsset" and "sellAsset" methods with the newly introduced "multiswapBuyAsset" and "multiswapSellAsset" methods. - -```js -V1: -await mangata.buyAsset( - account: string | KeyringPair, - soldAssetId: string, - boughtAssetId: string, - amount: BN, - maxAmountIn: BN, - txOptions?: TxOptions - ) - -V2: -const args: MultiswapBuyAsset = { - account: Account; - tokenIds: TokenId[]; - amount: TokenAmount; - maxAmountIn: TokenAmount; - txOptions?: Partial | undefined; -} -await mangata.xyk.multiswapBuyAsset(args) +If you prefer to integrate with your own logging system, you can supply a custom logger by implementing the necessary logging methods (e.g., `debug`, `error`) and passing it via the `logger` property. + +Example with a custom logger: + +```javascript +const customLogger = { + debug: (...args) => console.log('[Custom Debug]', ...args), + error: (...args) => console.error('[Custom Error]', ...args), + // Implement other logging methods as needed. +}; + +const config = { + debug: true, + logger: customLogger, +}; + +const sdk = await Gasp.create('...', config); ``` -To illustrate how to retrieve asset information, you need to determine its corresponding section within the SDK. The method **getAssetInfo** is located within the query block. +## Usage & Examples -```js -V1: -const assetInfo = await mangata.getAssetInfo() +Once you have successfully created an instance of the Gasp SDK, you can access its different modules to interact with the Gasp node. Below are some example use cases to help you get started. -V2: -const assetInfo = await mangata.query.getAssetInfo() +### Accessing the Account Module + +The Account module allows you to manage and retrieve account-related information. + +```ts +// Retrieve account balances +import { Gasp } from 'gasp-sdk'; + +const sdk = await Gasp.create('wss://rollup-prod-rpc.gasp.xyz/'); + +const account = '0x...'; +const balances = await sdk.account.getBalances({ account }); + +console.log('balances', balances); ``` -# Basic use case +### Working with the Pool Module -Here is a quick example to get you started, **all you need is Mangata instance**: +The Pool module enables operations related to liquidity pools -Support: Only ESM +```ts +import { Gasp, PoolType } from 'gasp-sdk'; -```js -import { Mangata } from "@mangata-finance/sdk"; +const sdk = await Gasp.create('wss://rollup-prod-rpc.gasp.xyz/'); -async function main() { - // Connect to the mainet (also testnet, mainnet) - const mangata = Mangata.instance(["wss://kusama-archive.mangata.online"]); +sdk.setSigner(sdk.signers.ethers.create('...')); - // Retrieve the chainName, nodeName & nodeVersion information - const [chain, nodeName, nodeVersion] = await Promise.all([ - mangata.rpc.getChain(), - mangata.rpc.getNodeName(), - mangata.rpc.getNodeVersion() - ]); +// Retrieve pools information +const pools = await sdk.pool.getPools(); - console.log( - `You are connected to chain ${chain} using ${nodeName} v${nodeVersion}` - ); -} +console.log('pools', pools); -main() - .catch(console.error) - .finally(() => process.exit()); +// Create a new pool +const tx = sdk.pool.createPool({ + type: PoolType.Xyk, + firstAssetId: '0', + firstAssetAmount: '1000000000000000000', + secondAssetId: '1', + secondAssetAmount: '100000000000000', + account: '0x...', +}); + +// Before submitting the transaction, it is possible to check the fee information +const feeInfo = await tx.paymentInfo(); +console.log('feeInfo', feeInfo); + +const result = await tx.execute(); +console.log('result', result); ``` -For available methods please visit [docs](https://mangata-finance.github.io/mangata-sdk/) - -# Documentation - -```js -import { - Mangata, - MangataInstance, - MainTokens, - PoolWithShare, - TokenId, - Token, - PoolWithRatio, - TokenBalance, - TokenInfo -} from "../"; -import { BN } from "@polkadot/util"; - -const ENDPOINT = "wss://kusama-archive.mangata.online"; -const KSM_TOKEN = "4"; -const MGX_TOKEN = "0"; -const ADDRESS = "5CP5sgWw94GoQCGvm4qeNgKTw41Scnk2F41uPe4SSAPVPoCU"; -const LPTOKENKSMANDMGX = "5"; - -const main = async () => { - const mangata: MangataInstance = Mangata.instance([ENDPOINT]); - /** - * Retrieves the amount of tokens in a liquidity pool for a given pair of - * tokens. - * @param {string} firstTokenId - * @param {string} secondTokenId - * - * @returns {BN | Array} - */ - - const amountOfTokens: BN[] = await mangata.query.getAmountOfTokensInPool( - KSM_TOKEN, - MGX_TOKEN - ); - - /** - * Retrieves information about the assets. - * - * @returns {MainTokens} - */ - const assetInfo: MainTokens = await mangata.query.getAssetsInfo(); - - /** - * Retrieves the current block number. - * - * @returns {string} - */ - const blockNumber: string = await mangata.query.getBlockNumber(); - - /** - * Retrieves the pools in which the specified address has invested - * - * @returns {PoolWithShare | Array} - */ - - const investedPools: PoolWithShare[] = await mangata.query.getInvestedPools( - ADDRESS - ); - - /** - * Retrieves the liquidity pool information for a specific liquidity token * ID. - * - * @returns {TokenId | Array} - */ - - const liquidityPool: TokenId[] = await mangata.query.getLiquidityPool( - LPTOKENKSMANDMGX - ); - - /** - * Retrieves the liquidity token ID for a given pair of tokens. - * - * @returns {TokenId} - */ - const liquidityTokenId: TokenId = await mangata.query.getLiquidityTokenId( - KSM_TOKEN, - MGX_TOKEN - ); - - /** - * Retrieves the liquidity token IDs. - * - * @returns {TokenId | Array} - */ - const liquidityTokenIds: TokenId[] = - await mangata.query.getLiquidityTokenIds(); - - /** - * Retrieves the liquidity tokens. - * - * @returns {MainTokens} - */ - const liquidityTokens: MainTokens = await mangata.query.getLiquidityTokens(); - - /** - * Retrieves the nonce of the specified address. - * - * @returns {BN} - */ - const nonce: BN = await mangata.query.getNonce(ADDRESS); - - /** - * Retrieves the tokens owned by a specific address. - * - * @returns {[id: TokenId]: Token}} - */ - const ownedTokens: { - [id: TokenId]: Token - } = await mangata.query.getOwnedTokens(ADDRESS); - - /** - * Retrieves the detailed information about a specific pool. - * - * @returns {PoolWithRatio} - */ - const pool: PoolWithRatio = await mangata.query.getPool(LPTOKENKSMANDMGX); - - /** - * Retrieves information about all the available pools. - * - * @returns {PoolWithRatio | Array} - */ - const pools: PoolWithRatio[] = await mangata.query.getPools(); - - /** - * Retrieves the token balance for a specific address and token ID. - * - * @returns {TokenBalance} - */ - const tokenBalance: TokenBalance = await mangata.query.getTokenBalance( - MGX_TOKEN, - ADDRESS - ); - - /** - * Retrieves detailed information about a specific token. - * - * @returns {TokenInfo} - */ - const tokenInfo: TokenInfo = await mangata.query.getTokenInfo(MGX_TOKEN); - - /** - * Retrieves the total issuance of a specific token. - * - * @returns {BN} - */ - const issuance: BN = await mangata.query.getTotalIssuance(MGX_TOKEN); - - /** - * Retrieves the total issuance of all tokens. - * - * @returns {Record} - */ - const totalIssuanceOfTokens: Record = - await mangata.query.getTotalIssuanceOfTokens(); - - /** - * Calculates the buy price based on the reserve parameters - * - * @returns {BN} - */ - const argsReserve: Reserve = { - inputReserve: new BN("1000000000000000000"), - outputReserve: new BN("10000000000000000000"), - amount: new BN("10000") - }; - const price: BN = await mangata.rpc.calculateBuyPrice(argsReserve); - - /** - * Calculates the buy price based on the asset's ID. - * - * @returns {BN} - */ - const price: BN = await mangata.rpc.calculateBuyPriceId( - KSM_TOKEN, - MGX_TOKEN, - new BN("10000") - ); - - /** - * Calculates the rewards amount based on the rewards parameters. - * - * @returns {BN} - */ - const argsRewards: Rewards = { - address: ADDRESS, - liquidityTokenId: LPTOKENKSMANDMGX - }; - const rewards: BN = await mangata.rpc.calculateRewardsAmount(argsRewards); - - /** - * Calculates the sell price based on the reserve parameters. - * - * @returns {BN} - */ - const argsReserve: Reserve = { - inputReserve: new BN("1000000000000000000"), - outputReserve: new BN("10000000000000000000"), - amount: new BN("10000") - }; - const price: BN = await mangata.rpc.calculateSellPrice(argsReserve); - - /** - * Calculates the sell price based on the asset's ID. - * - * @returns {BN} - */ - const price: BN = await mangata.rpc.calculateSellPriceId( - KSM_TOKEN, - MGX_TOKEN, - new BN("10000") - ); -}; +### Using the Rewards Module + +The Rewards module allows you to manage and retrieve information about rewards. + +```ts +import { Gasp, PoolType } from 'gasp-sdk'; + +const sdk = await Gasp.create('wss://rollup-prod-rpc.gasp.xyz/'); + +const signer = sdk.signers.ethers.create('...'); -main() - .catch(console.error) - .finally(() => process.exit()); +// Create a new pool +const result = await sdk.rewards + .claimNativeRewardsForPool( + { + pool: '160', + account: '0x...', + }, + { signer } // You can always pass the signer to every call as a second parameter + ) + .execute(); + +console.log('result', result); ``` -# Transactions - -```js -import { - Mangata, - MangataInstance - TransferTokens, - MangataGenericEvent, - MangataGenericEvent, - MultiswapBuyAsset, - Batch, - MintLiquidity -} from "@mangata-finance/sdk"; -import { BN } from "@polkadot/util"; -import { Keyring } from "@polkadot/api"; -import { v4 as uuidv4 } from "uuid"; -import { ISubmittableResult } from "@polkadot/types/types"; -const mangata: MangataInstance = Mangata.instance([ENDPOINT]); - -const keyring = new Keyring({ type: "sr25519" }); -const testUser = "//testUser_" + uuidv4(); -const account = keyring.createFromUri(testUser); -keyring.addPair(account); - -const args: TransferTokens = { - account: account, - tokenId: MGX_TOKEN, - address: ADDRESS, - amount: new BN(100e18), // 100 MGX - txOptions: { - statusCallback: (status: ISubmittableResult) => { - // Here you can check for status of your transaction - console.log(status); - }, - extrinsicStatus: (result: MangataGenericEvent[]) => { - // here will be the result of your transaction - console.log(result); - } - } -}; -await mangata.tokens.transferTokens(args); - -const args: MultiswapBuyAsset = { - account, - tokenIds: [MGX_TOKEN, KSM_TOKEN], - amount: new BN(1000e18), // 100 MGX - maxAmountIn: new BN(60000e18), - txOptions: { - statusCallback: (status: ISubmittableResult) => { - // Here you can check for status of your transaction - console.log(status); - }, - extrinsicStatus: (result: MangataGenericEvent[]) => { - // here will be the result of your transaction - console.log(result); - } - } - }; - await mangata.xyk.multiswapBuyAsset(args); - - const argsBuy: MultiswapBuyAsset = { - account, - tokenIds: [MGX_TOKEN, KSM_TOKEN], - amount: new BN(1000e18), // 100 MGX - maxAmountIn: new BN(60000e18) - }; - const tx1 = await mangata.submitableExtrinsic.multiswapBuyAsset(argsBuy); - - const argsMint: MintLiquidity = { - account, - firstTokenId: KSM_TOKEN, - secondTokenId: MGX_TOKEN, - firstTokenAmount: new BN(100e12), - expectedSecondTokenAmount: new BN(1000e18) - }; - - const tx2 = await mangata.submitableExtrinsic.mintLiquidity(argsMint); - - const args: Batch = { - account, - calls: [tx1, tx2], - txOptions: { - statusCallback: (status: ISubmittableResult) => { - // Here you can check for status of your transaction - console.log(status); - }, - extrinsicStatus: (result: MangataGenericEvent[]) => { - // here will be the result of your transaction - console.log(result); - } +--- + +### Core SDK Components & Available Features + +The SDK is built around several core components that offer a comprehensive toolset for interacting with the Gasp node: + +- [**Account Module:**](./src/modules/account/Account.ts) + Manage account details, retrieve balances, and obtain nonce values. + +- [**Pool Module:**](./src/modules/pool/Pool.ts) + Query and manage liquidity pool information. + +- [**Asset Module:**](./src/modules/asset/Asset.ts) + Access and manage asset-related data. + +- [**Market Module:**](./src/modules/market/Market.ts) + Retrieve market data and execute trading operations. + +- [**Rewards Module:**](./src/modules/rewards/Rewards.ts) + Claim rewards for your account. + +- [**Rolldown Module:**](./src/modules/rolldown/Rolldown.ts) + Withdraw your assets from Gasp chain. + +--- + +### Error Handling + +The Gasp SDK implements robust error handling to ensure developers can effectively manage exceptions and edge cases. Key points include: + +- **Custom Error Class:** + The SDK utilizes custom error class (`GaspError`) to provide meaningful error messages and error codes. + +- **Error Types:** + + - **Initialization Errors:** Thrown when the SDK fails to initialize (e.g., network issues or invalid configuration). + - **Validation Errors:** Raised when required parameters are missing or invalid. + - **Transaction Errors:** Detailed errors related to transaction submission failures. + - **Argument Errors:** Raised when the arguments passed to a function are invalid or not as expected. + - **Parsing Errors:** Raised when the SDK fails to parse a response from the Gasp node. + +```typescript +try { + const result = await sdk.account.getAssetBalance({ + account: '0x123', + asset: '0', + }); + console.log(result); +} catch (error) { + if (error instanceof GaspError) { + console.error(`SDK Error [${error.code}]: ${error.message}`); + } else { + console.error('An unexpected error occurred:', error); } - }; - await mangata.batch(args); +} ``` diff --git a/packages/sdk/package.json b/packages/sdk/package.json index dfa4e085..0e5c05f3 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -19,19 +19,17 @@ "type": "git", "url": "https://github.com/mangata-finance/gasp-dev-kit" }, - "peerDependencies": { - "@polkadot/api": "^11.1.1" - }, - "devDependencies": { - "gasp-types": "0.0.2-eth-rollup-develop.241" - }, "dependencies": { "gasp-type-definitions": "0.0.2-eth-rollup-develop.246", + "@polkadot/api": "11.1.1", "big.js": "6.2.1", + "bn.js": "^5.2.1", + "ethers": "^6.13.5", + "gasp-types": "0.0.2-eth-rollup-develop.242", "tslib": "^2.3.0", "tslog": "4.8.2", - "viem": "^2.17.4", - "wagmi": "^2.10.10" + "tsup": "^7.2.0", + "viem": "^2.17.4" }, "exports": { ".": { @@ -43,5 +41,8 @@ "access": "public", "registry": "https://registry.npmjs.org/" }, - "private": false + "private": false, + "optionalDependencies": { + "@wagmi/core": "^2.16.7" + } } diff --git a/packages/sdk/project.json b/packages/sdk/project.json index 5f62ec48..3a781d9a 100644 --- a/packages/sdk/project.json +++ b/packages/sdk/project.json @@ -9,7 +9,7 @@ "options": { "cwd": "packages/sdk", "commands": [ - "tsup ./src/index.ts --dts --format esm --clean --splitting false --tsconfig tsconfig.lib.json --outDir dist/packages/sdk", + "tsup --config tsup.config.ts", "mkdir -p ../../dist/packages/sdk", "cp dist/packages/sdk/index.js ../../dist/packages/sdk/", "cp dist/packages/sdk/index.d.ts ../../dist/packages/sdk/", @@ -24,9 +24,7 @@ "executor": "@nx/linter:eslint", "outputs": ["{options.outputFile}"], "options": { - "lintFilePatterns": [ - "packages/sdk/**/*.ts" - ] + "lintFilePatterns": ["packages/sdk/**/*.ts"] } }, "test": { diff --git a/packages/sdk/src/error/GaspError.ts b/packages/sdk/src/error/GaspError.ts new file mode 100644 index 00000000..9c60aa35 --- /dev/null +++ b/packages/sdk/src/error/GaspError.ts @@ -0,0 +1,33 @@ +import { Logger } from '../modules/core/Logger'; + +export enum GaspErrorType { + API_RESPONSE_ERROR = 'API_RESPONSE_ERROR', + UNKNOWN_ERROR = 'UNKNOWN_ERROR', + TRANSACTION_ERROR = 'TRANSACTION_ERROR', + ALREADY_EXISTS = 'ALREADY_EXISTS', + PARSING_ERROR = 'PARSING_ERROR', + ARGS_ERROR = 'ARGS_ERROR', + INIT_ERROR = 'INIT_ERROR', +} + +export class GaspError extends Error { + public code: GaspErrorType; + public context?: any; + + constructor( + message: string, + code: GaspErrorType, + context?: any, + logger?: Logger + ) { + super(message); + this.code = code; + this.context = context; + + logger?.error(`[${this.code}] ${message}`, context); + + Object.setPrototypeOf(this, new.target.prototype); + } + + public static error = GaspErrorType; +} diff --git a/packages/sdk/src/index.ts b/packages/sdk/src/index.ts index a83c2eef..e789879c 100644 --- a/packages/sdk/src/index.ts +++ b/packages/sdk/src/index.ts @@ -1,19 +1,6 @@ -export { sendTx, signTx } from './utils/signTx'; -export { signTypedData } from './utils/signTypedData'; - -export { Mangata } from './mangata'; - -export * from './utils/bigConstants'; -export * from './utils/bnConstants'; -export * from './utils/bnUtility'; -export * from './utils/toFixed'; -export * from './utils/isMultiSwapAssetTransactionSuccessful'; -export * from './utils/isBuyAssetTransactionSuccessful'; -export * from './utils/isSellAssetTransactionSuccessful'; -export { setLoggerOptions } from './utils/mangataLogger'; - +export * from 'gasp-types'; +export { Gasp } from './instance'; export * from './types/common'; -export * from './types/query'; -export * from './types/tokens'; -export * from './types/xyk'; -export * from './types/utility'; +export * from './modules'; +export * from './utils'; +export * from './error/GaspError'; diff --git a/packages/sdk/src/instance.ts b/packages/sdk/src/instance.ts new file mode 100644 index 00000000..c5c28a22 --- /dev/null +++ b/packages/sdk/src/instance.ts @@ -0,0 +1,70 @@ +import { AccountModule } from './modules/account'; +import { getOrCreateInstance } from './utils/getOrCreateInstance'; +import { PoolModule } from './modules/pool'; +import { ApiPromise } from '@polkadot/api'; +import { AssetModule } from './modules/asset/Asset'; +import { MarketModule } from './modules/market'; +import { RewardsModule } from './modules/rewards/Rewards'; +import { RolldownModule } from './modules/rolldown/Rolldown'; +import { Signer } from './types/common'; +import { GaspLogger, Logger, emptyLogger } from './modules/core/Logger'; +import { TxModule } from './modules/tx/TxModule'; +import { GaspError } from './error/GaspError'; +import { SignerModule } from './modules/signer/Signer'; + +interface SDKConfig { + debug?: boolean; + logger?: Logger; +} + +export class Gasp { + public readonly pool: PoolModule; + public readonly account: AccountModule; + public readonly asset: AssetModule; + public readonly market: MarketModule; + public readonly rewards: RewardsModule; + public readonly rolldown: RolldownModule; + + public readonly tx: TxModule; + public readonly signers: SignerModule; + + public readonly api: ApiPromise; + + public signer?: Signer; + + private constructor(api: ApiPromise, logger: Logger) { + this.pool = new PoolModule(this, api, logger); + this.account = new AccountModule(this, api, logger); + this.asset = new AssetModule(this, api, logger); + this.market = new MarketModule(this, api, logger); + this.rewards = new RewardsModule(this, api, logger); + this.rolldown = new RolldownModule(this, api, logger); + + this.tx = new TxModule(this, api, logger); + this.signers = new SignerModule(this, api, logger); + + this.api = api; + } + + setSigner(signer: Signer) { + this.signer = signer; + } + + static async create(_urls: string[] | string, config?: SDKConfig) { + const urls = Array.isArray(_urls) ? _urls : [_urls]; + + const api = await getOrCreateInstance(urls).catch((e) => { + throw new GaspError( + 'Unable to initialize API', + GaspError.error.INIT_ERROR, + e + ); + }); + + const logger = config?.debug + ? config?.logger ?? new GaspLogger() + : emptyLogger; + + return new Gasp(api, logger); + } +} diff --git a/packages/sdk/src/mangata.ts b/packages/sdk/src/mangata.ts deleted file mode 100644 index 2e8826cc..00000000 --- a/packages/sdk/src/mangata.ts +++ /dev/null @@ -1,14 +0,0 @@ -import "gasp-types"; -import { PriceImpact } from "./types/utility"; -import { getPriceImpact } from "./utils/getPriceImpact"; -import { createMangataInstance } from "./mangataInstance"; -import { getRatio } from "./utils/getRatio"; -import { BN } from "@polkadot/util"; - -const Mangata = { - instance: createMangataInstance, - getPriceImpact: (args: PriceImpact) => getPriceImpact(args), - getPoolRatio: (left: BN, right: BN) => getRatio(left, right) -}; - -export { Mangata }; diff --git a/packages/sdk/src/mangataInstance.ts b/packages/sdk/src/mangataInstance.ts deleted file mode 100644 index 60df52ac..00000000 --- a/packages/sdk/src/mangataInstance.ts +++ /dev/null @@ -1,279 +0,0 @@ -import { BN } from "@polkadot/util"; -import { deactivateLiquidity } from "./methods/xyk/deactivateLiquidity"; -import { - ActivateLiquidityFee, - BurnLiquidity, - BurnLiquidityFee, - ClaimRewardsFee, - CreatePool, - CreatePoolFee, - DeactivateLiquidityFee, - Liquidity, - MintLiquidity, - MintLiquidityFee, - MultiswapBuyAsset, - MultiswapSellAsset, - Price, - Reserve, - Rewards -} from "./types/xyk"; -import { activateLiquidity } from "./methods/xyk/activateLiquidity"; -import { burnLiquidity } from "./methods/xyk/burnLiquidity"; -import { transferAllTokens } from "./methods/tokens/transferAllTokens"; -import { transferTokens } from "./methods/tokens/transferTokens"; - -import { - Transfer, - TransferAllFee, - TransferTokenFee, - TransferTokens -} from "./types/tokens"; -import { - Address, - MangataInstance, - ExtrinsicCommon, - Prettify, - TokenAmount, - TokenId -} from "./types/common"; -import { mintLiquidity } from "./methods/xyk/mintLiquidity"; -import { createPool } from "./methods/xyk/createPool"; -import { claimRewards } from "./methods/xyk/claimRewards"; -import { claimRewardsAll } from "./methods/xyk/claimRewardsAll"; -import { calculateBuyPriceId } from "./methods/rpc/calculateBuyPriceId"; -import { calculateSellPriceId } from "./methods/rpc/calculateSellPriceId"; -import { getBurnAmount } from "./methods/rpc/getBurnAmount"; -import { calculateSellPrice } from "./methods/rpc/calculateSellPrice"; -import { calculateBuyPrice } from "./methods/rpc/calculateBuyPrice"; -import { calculateRewardsAmount } from "./methods/rpc/calculateRewardsAmount"; -import { getNodeVersion } from "./methods/rpc/getNodeVersion"; -import { getNodeName } from "./methods/rpc/getNodeName"; -import { getChain } from "./methods/rpc/getChain"; -import { getPools } from "./methods/query/getPools"; -import { getPool } from "./methods/query/getPool"; -import { getLiquidityPool } from "./methods/query/getLiquidityPool"; -import { getAmountOfTokensInPool } from "./methods/query/getAmountOfTokensInPool"; -import { getInvestedPools } from "./methods/query/getInvestedPools"; -import { getTotalIssuanceOfTokens } from "./methods/query/getTotalIssuanceOfTokens"; -import { getOwnedTokens } from "./methods/query/getOwnedTokens"; -import { getAssetsInfo } from "./methods/query/getAssetsInfo"; -import { getBlockNumber } from "./methods/query/getBlockNumber"; -import { getLiquidityTokens } from "./methods/query/getLiquidityTokens"; -import { getLiquidityTokenIds } from "./methods/query/getLiquidityTokenIds"; -import { getTokenInfo } from "./methods/query/getTokenInfo"; -import { getTokenBalance } from "./methods/query/getTokenBalance"; -import { getTotalIssuance } from "./methods/query/getTotalIssuance"; -import { getLiquidityTokenId } from "./methods/query/getLiquidityTokenId"; -import { getNonce } from "./methods/query/getNonce"; -import { batch } from "./methods/utility/batch"; -import { batchAll } from "./methods/utility/batchAll"; -import { forceBatch } from "./methods/utility/forceBatch"; -import { getOrCreateInstance } from "./utils/getOrCreateInstance"; -import { waitForNewBlock } from "./methods/rpc/waitForNewBlock"; -import { calculateMintingFutureRewards } from "./utils/calculateMintingFutureRewards"; -import { Batch } from "./types/utility"; -import { getActivateLiquidityFee } from "./methods/fee/getActivateLiquidityFee"; -import { getDeactivateLiquidityFee } from "./methods/fee/getDeactivateLiquidityFee"; -import { getClaimRewardsFee } from "./methods/fee/getClaimRewardsFee"; -import { getCreatePoolFee } from "./methods/fee/getCreatePoolFee"; -import { getMintLiquidityFee } from "./methods/fee/getMintLiquidityFee"; -import { getBurnLiquidityFee } from "./methods/fee/getBurnLiquidityFee"; -import { getTransferAllTokenFee } from "./methods/fee/getTransferAllTokenFee"; -import { getTransferTokenFee } from "./methods/fee/getTransferTokenFee"; -import { multiswapBuyAsset } from "./methods/xyk/multiswapBuyAsset"; -import { multiswapSellAsset } from "./methods/xyk/multiswapSellAsset"; -import { isBuyAssetLockFree } from "./methods/rpc/isBuyAssetLockFree"; -import { isSellAssetLockFree } from "./methods/rpc/isSellAssetLockFree"; -import {getTradeableTokens} from "./methods/rpc/getTradeableTokens"; -import {getLiquidityTokensForTrading} from "./methods/rpc/getLiquidityTokensForTrading"; -import { logger } from "./utils/mangataLogger"; - -/** - * Creates a MangataInstance object with various methods for interacting with the Mangata node. - * @param urls - An array of URLs for connecting to the Mangata node. - * @returns A MangataInstance object. - */ -export function createMangataInstance(urls: string[]): MangataInstance { - const instancePromise = getOrCreateInstance(urls); - logger.info("Endpoints: ", urls); - - return { - api: () => instancePromise, - batch: (args: Batch) => batch(instancePromise, args), - batchAll: (args: Batch) => batchAll(instancePromise, args), - forceBatch: (args: Batch) => forceBatch(instancePromise, args), - xyk: { - deactivateLiquidity: (args: Liquidity) => - deactivateLiquidity(instancePromise, args, false), - activateLiquidity: ( - args: Liquidity, - balanceFrom: - | "AvailableBalance" - | "StakedUnactivatedReserves" - | "UnspentReserves" = "AvailableBalance" - ) => activateLiquidity(instancePromise, args, balanceFrom, false), - burnLiquidity: (args: BurnLiquidity) => - burnLiquidity(instancePromise, args, false), - mintLiquidity: (args: MintLiquidity) => - mintLiquidity(instancePromise, args, false), - createPool: (args: CreatePool) => - createPool(instancePromise, args, false), - claimRewardsAll: (args: ExtrinsicCommon) => - claimRewardsAll(instancePromise, args, false), - claimRewards: (args: Prettify>) => - claimRewards(instancePromise, args, false), - multiswapBuyAsset: (args: MultiswapBuyAsset) => - multiswapBuyAsset(instancePromise, args, false), - multiswapSellAsset: (args: MultiswapSellAsset) => - multiswapSellAsset(instancePromise, args, false) - }, - rpc: { - getTradeableTokens: () => getTradeableTokens(instancePromise), - getLiquidityTokensForTrading: () => getLiquidityTokensForTrading(instancePromise), - isBuyAssetLockFree: (tokenIds: TokenId[], amount: BN) => - isBuyAssetLockFree(instancePromise, tokenIds, amount), - isSellAssetLockFree: (tokenIds: TokenId[], amount: BN) => - isSellAssetLockFree(instancePromise, tokenIds, amount), - calculateBuyPriceId: ( - soldTokenId: TokenId, - boughtTokenId: TokenId, - amount: TokenAmount - ) => - calculateBuyPriceId( - instancePromise, - soldTokenId, - boughtTokenId, - amount - ), - calculateSellPriceId: ( - soldTokenId: TokenId, - boughtTokenId: TokenId, - amount: TokenAmount - ) => - calculateSellPriceId( - instancePromise, - soldTokenId, - boughtTokenId, - amount - ), - getBurnAmount: (args: Price) => - getBurnAmount(instancePromise, args), - calculateSellPrice: (args: Reserve) => - calculateSellPrice(instancePromise, args), - calculateBuyPrice: (args: Reserve) => - calculateBuyPrice(instancePromise, args), - calculateRewardsAmount: (args: Rewards) => - calculateRewardsAmount(instancePromise, args), - getNodeVersion: () => getNodeVersion(instancePromise), - getNodeName: () => getNodeName(instancePromise), - getChain: () => getChain(instancePromise), - waitForNewBlock: (blockNumber?: number) => - waitForNewBlock(instancePromise, blockNumber) - }, - tokens: { - transferAllTokens: (args: Transfer) => - transferAllTokens(instancePromise, args, false), - transferTokens: (args: TransferTokens) => - transferTokens(instancePromise, args, false) - }, - submitableExtrinsic: { - createPool: (args: CreatePool) => - createPool(instancePromise, args, true), - claimRewards: (args: Omit) => - claimRewards(instancePromise, args, true), - mintLiquidity: (args: MintLiquidity) => - mintLiquidity(instancePromise, args, true), - burnLiquidity: (args: BurnLiquidity) => - burnLiquidity(instancePromise, args, true), - activateLiquidity: ( - args: Liquidity, - balanceFrom: - | "AvailableBalance" - | "StakedUnactivatedReserves" - | "UnspentReserves" = "AvailableBalance" - ) => activateLiquidity(instancePromise, args, balanceFrom, true), - deactivateLiquidity: (args: Liquidity) => - deactivateLiquidity(instancePromise, args, true), - transferAllTokens: (args: Transfer) => - transferAllTokens(instancePromise, args, true), - transferTokens: (args: Transfer & { amount: TokenAmount }) => - transferTokens(instancePromise, args, true), - multiswapBuyAsset: (args: MultiswapBuyAsset) => - multiswapBuyAsset(instancePromise, args, true), - multiswapSellAsset: (args: MultiswapSellAsset) => - multiswapSellAsset(instancePromise, args, true) - }, - query: { - getNonce: (address: Address) => - getNonce(instancePromise, address), - getLiquidityTokenId: ( - firstTokenId: TokenId, - secondTokenId: TokenId - ) => - getLiquidityTokenId(instancePromise, firstTokenId, secondTokenId), - getTotalIssuance: (tokenId: TokenId) => - getTotalIssuance(instancePromise, tokenId), - getTokenBalance: (tokenId: TokenId, address: Address) => - getTokenBalance(instancePromise, tokenId, address), - getTokenInfo: (tokenId: TokenId) => - getTokenInfo(instancePromise, tokenId), - getLiquidityTokenIds: () => - getLiquidityTokenIds(instancePromise), - getLiquidityTokens: () => getLiquidityTokens(instancePromise), - getBlockNumber: () => getBlockNumber(instancePromise), - getOwnedTokens: (address: Address) => - getOwnedTokens(instancePromise, address), - getAssetsInfo: () => getAssetsInfo(instancePromise), - getInvestedPools: (address: Address) => - getInvestedPools(instancePromise, address), - getAmountOfTokensInPool: ( - firstTokenId: TokenId, - secondTokenId: TokenId - ) => - getAmountOfTokensInPool( - instancePromise, - firstTokenId, - secondTokenId - ), - getLiquidityPool: (liquidityTokenId: TokenId) => - getLiquidityPool(instancePromise, liquidityTokenId), - getPool: (liquidityTokenId: TokenId) => - getPool(instancePromise, liquidityTokenId), - getPools: () => getPools(instancePromise), - getTotalIssuanceOfTokens: () => - getTotalIssuanceOfTokens(instancePromise) - }, - fee: { - activateLiquidity: (args: ActivateLiquidityFee) => - getActivateLiquidityFee(instancePromise, args), - deactivateLiquidity: (args: DeactivateLiquidityFee) => - getDeactivateLiquidityFee(instancePromise, args), - claimRewards: (args: ClaimRewardsFee) => - getClaimRewardsFee(instancePromise, args), - createPool: (args: CreatePoolFee) => - getCreatePoolFee(instancePromise, args), - mintLiquidity: (args: MintLiquidityFee) => - getMintLiquidityFee(instancePromise, args), - burnLiquidity: (args: BurnLiquidityFee) => - getBurnLiquidityFee(instancePromise, args), - transferAllToken: (args: TransferAllFee) => - getTransferAllTokenFee(instancePromise, args), - transferToken: (args: TransferTokenFee) => - getTransferTokenFee(instancePromise, args) - }, - util: { - getUrls: () => urls, - calculateMintingFutureRewards: ( - liquidityTokenId: string, - mintingAmount: BN, - blocksToPass: BN - ) => - calculateMintingFutureRewards( - instancePromise, - liquidityTokenId, - mintingAmount, - blocksToPass - ) - } - }; -} diff --git a/packages/sdk/src/methods/fee/getActivateLiquidityFee.ts b/packages/sdk/src/methods/fee/getActivateLiquidityFee.ts deleted file mode 100644 index 5b22b704..00000000 --- a/packages/sdk/src/methods/fee/getActivateLiquidityFee.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { ApiPromise } from "@polkadot/api"; -import { BN } from "@polkadot/util"; -import { ActivateLiquidityFee } from "../../types/xyk"; -import { fromBN } from "../../utils/bnUtility"; - -/** - * @since 2.0.0 - */ -export const getActivateLiquidityFee = async ( - instancePromise: Promise, - args: ActivateLiquidityFee -): Promise => { - const api = await instancePromise; - const { liquidityTokenId, amount, account } = args; - const dispatchInfo = await api.tx.proofOfStake - .activateLiquidity(liquidityTokenId, amount, null) - .paymentInfo(account); - return fromBN(new BN(dispatchInfo.partialFee.toString())); -}; diff --git a/packages/sdk/src/methods/fee/getBurnLiquidityFee.ts b/packages/sdk/src/methods/fee/getBurnLiquidityFee.ts deleted file mode 100644 index 7e2d2f36..00000000 --- a/packages/sdk/src/methods/fee/getBurnLiquidityFee.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { ApiPromise } from "@polkadot/api"; -import { BN } from "@polkadot/util"; -import { BurnLiquidityFee } from "../../types/xyk"; -import { fromBN } from "../../utils/bnUtility"; - -/** - * @since 2.0.0 - */ -export const getBurnLiquidityFee = async ( - instancePromise: Promise, - args: BurnLiquidityFee -): Promise => { - const api = await instancePromise; - const { amount, firstTokenId, secondTokenId, account } = args; - const dispatchInfo = await api.tx.xyk - .burnLiquidity(firstTokenId, secondTokenId, amount) - .paymentInfo(account); - return fromBN(new BN(dispatchInfo.partialFee.toString())); -}; diff --git a/packages/sdk/src/methods/fee/getClaimRewardsFee.ts b/packages/sdk/src/methods/fee/getClaimRewardsFee.ts deleted file mode 100644 index e10c4fe5..00000000 --- a/packages/sdk/src/methods/fee/getClaimRewardsFee.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { ApiPromise } from "@polkadot/api"; -import { BN } from "@polkadot/util"; -import { ClaimRewardsFee } from "../../types/xyk"; -import { fromBN } from "../../utils/bnUtility"; - -/** - * @since 2.0.0 - */ -export const getClaimRewardsFee = async ( - instancePromise: Promise, - args: ClaimRewardsFee -): Promise => { - const api = await instancePromise; - const { liquidityTokenId, account } = args; - const dispatchInfo = await api.tx.proofOfStake - .claimRewardsAll(liquidityTokenId) - .paymentInfo(account); - return fromBN(new BN(dispatchInfo.partialFee.toString())); -}; diff --git a/packages/sdk/src/methods/fee/getCreatePoolFee.ts b/packages/sdk/src/methods/fee/getCreatePoolFee.ts deleted file mode 100644 index c944966a..00000000 --- a/packages/sdk/src/methods/fee/getCreatePoolFee.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { ApiPromise } from "@polkadot/api"; -import { BN } from "@polkadot/util"; -import { CreatePoolFee } from "../../types/xyk"; -import { fromBN } from "../../utils/bnUtility"; - -/** - * @since 2.0.0 - */ -export const getCreatePoolFee = async ( - instancePromise: Promise, - args: CreatePoolFee -): Promise => { - const api = await instancePromise; - const { - firstTokenId, - firstTokenAmount, - secondTokenId, - secondTokenAmount, - account - } = args; - const dispatchInfo = await api.tx.xyk - .createPool( - firstTokenId, - firstTokenAmount, - secondTokenId, - secondTokenAmount - ) - .paymentInfo(account); - return fromBN(new BN(dispatchInfo.partialFee.toString())); -}; diff --git a/packages/sdk/src/methods/fee/getDeactivateLiquidityFee.ts b/packages/sdk/src/methods/fee/getDeactivateLiquidityFee.ts deleted file mode 100644 index 5cbd6447..00000000 --- a/packages/sdk/src/methods/fee/getDeactivateLiquidityFee.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { ApiPromise } from "@polkadot/api"; -import { BN } from "@polkadot/util"; -import { DeactivateLiquidityFee } from "../../types/xyk"; -import { fromBN } from "../../utils/bnUtility"; - -/** - * @since 2.0.0 - */ -export const getDeactivateLiquidityFee = async ( - instancePromise: Promise, - args: DeactivateLiquidityFee -): Promise => { - const api = await instancePromise; - const { liquidityTokenId, amount, account } = args; - const dispatchInfo = await api.tx.proofOfStake - .deactivateLiquidity(liquidityTokenId, amount) - .paymentInfo(account); - return fromBN(new BN(dispatchInfo.partialFee.toString())); -}; diff --git a/packages/sdk/src/methods/fee/getMintLiquidityFee.ts b/packages/sdk/src/methods/fee/getMintLiquidityFee.ts deleted file mode 100644 index 293da04d..00000000 --- a/packages/sdk/src/methods/fee/getMintLiquidityFee.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { ApiPromise } from "@polkadot/api"; -import { BN } from "@polkadot/util"; -import { MintLiquidityFee } from "../../types/xyk"; -import { fromBN } from "../../utils/bnUtility"; - -/** - * @since 2.0.0 - */ -export const getMintLiquidityFee = async ( - instancePromise: Promise, - args: MintLiquidityFee -): Promise => { - const api = await instancePromise; - const { - firstTokenId, - secondTokenId, - firstTokenAmount, - expectedSecondTokenAmount, - account - } = args; - const dispatchInfo = await api.tx.xyk - .mintLiquidity( - firstTokenId, - secondTokenId, - firstTokenAmount, - expectedSecondTokenAmount - ) - .paymentInfo(account); - return fromBN(new BN(dispatchInfo.partialFee.toString())); -}; diff --git a/packages/sdk/src/methods/fee/getTransferAllTokenFee.ts b/packages/sdk/src/methods/fee/getTransferAllTokenFee.ts deleted file mode 100644 index 27d83f48..00000000 --- a/packages/sdk/src/methods/fee/getTransferAllTokenFee.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { ApiPromise } from "@polkadot/api"; -import { BN } from "@polkadot/util"; -import { TransferAllFee } from "../../types/tokens"; -import { fromBN } from "../../utils/bnUtility"; - -/** - * @since 2.0.0 - */ -export const getTransferAllTokenFee = async ( - instancePromise: Promise, - args: TransferAllFee -): Promise => { - const api = await instancePromise; - const { account, address, tokenId } = args; - const dispatchInfo = await api.tx.tokens - .transferAll(address, tokenId, true) - .paymentInfo(account); - return fromBN(new BN(dispatchInfo.partialFee.toString())); -}; diff --git a/packages/sdk/src/methods/fee/getTransferTokenFee.ts b/packages/sdk/src/methods/fee/getTransferTokenFee.ts deleted file mode 100644 index 823171ba..00000000 --- a/packages/sdk/src/methods/fee/getTransferTokenFee.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { ApiPromise } from "@polkadot/api"; -import { BN } from "@polkadot/util"; -import { TransferTokenFee } from "../../types/tokens"; -import { fromBN } from "../../utils/bnUtility"; - -/** - * @since 2.0.0 - */ -export const getTransferTokenFee = async ( - instancePromise: Promise, - args: TransferTokenFee -): Promise => { - const api = await instancePromise; - const { address, tokenId, amount, account } = args; - const dispatchInfo = await api.tx.tokens - .transfer(address, tokenId, amount) - .paymentInfo(account); - return fromBN(new BN(dispatchInfo.partialFee.toString())); -}; diff --git a/packages/sdk/src/methods/query/getAmountOfTokensInPool.ts b/packages/sdk/src/methods/query/getAmountOfTokensInPool.ts deleted file mode 100644 index 1d8ef1ba..00000000 --- a/packages/sdk/src/methods/query/getAmountOfTokensInPool.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { ApiPromise } from "@polkadot/api"; -import { BN } from "@polkadot/util"; -import { TokenId } from "../../types/common"; -import { logger } from "../../utils/mangataLogger"; - -/** - * @since 2.0.0 - */ -export const getAmountOfTokensInPool = async ( - instancePromise: Promise, - firstTokenId: TokenId, - secondTokenId: TokenId -): Promise => { - logger.info("getAmountOfTokensInPool", { firstTokenId, secondTokenId }); - const api = await instancePromise; - const balance = await api.query.xyk.pools([firstTokenId, secondTokenId]); - - if (balance[0].eq(0) && balance[1].eq(0)) { - const balance = await api.query.xyk.pools([secondTokenId, firstTokenId]); - return [new BN(balance[1]), new BN(balance[0])]; - } - - return [new BN(balance[0]), new BN(balance[1])]; -}; diff --git a/packages/sdk/src/methods/query/getAssetsInfo.ts b/packages/sdk/src/methods/query/getAssetsInfo.ts deleted file mode 100644 index 410782a1..00000000 --- a/packages/sdk/src/methods/query/getAssetsInfo.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { ApiPromise } from "@polkadot/api"; -import { hexToBn } from "@polkadot/util"; -import { MainTokens } from "../../types/query"; -import { getCompleteAssetsInfo } from "../../utils/getCompleteAssetsInfo"; - -/** - * @since 2.0.0 - */ -export const getAssetsInfo = async ( - instancePromise: Promise -): Promise => { - const api = await instancePromise; - const completeAssetsInfo = await getCompleteAssetsInfo(api); - // we need to filter out ETH and Dummy liquidity token - // then we need to display symbol for liquidity token - return Object.values(completeAssetsInfo) - .filter((asset) => asset.name || asset.symbol) - .reduce((obj, item) => { - const asset = { - ...item, - name: item.name - .replace(/(LiquidityPoolToken)0x[a-fA-F0-9]+/, "$1") - .replace(/([a-z])([A-Z])/g, "$1 $2"), - symbol: item.symbol.includes("TKN") - ? item.symbol - .split("-") - .reduce((acc, curr) => { - const currentValue = curr.replace("TKN", ""); - const tokenId = currentValue.startsWith("0x") - ? hexToBn(currentValue).toString() - : currentValue; - const symbol = completeAssetsInfo[tokenId].symbol; - acc.push(symbol); - return acc; - }, [] as string[]) - .join("-") - : item.symbol - }; - obj[asset.id] = asset; - return obj; - }, {} as MainTokens); -}; diff --git a/packages/sdk/src/methods/query/getBlockNumber.ts b/packages/sdk/src/methods/query/getBlockNumber.ts deleted file mode 100644 index cad15a07..00000000 --- a/packages/sdk/src/methods/query/getBlockNumber.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { ApiPromise } from "@polkadot/api"; - -/** - * @since 2.0.0 - */ -export const getBlockNumber = async ( - instancePromise: Promise -): Promise => { - const api = await instancePromise; - const block = await api.rpc.chain.getBlock(); - return block.block.header.number.toString(); -}; diff --git a/packages/sdk/src/methods/query/getInvestedPools.ts b/packages/sdk/src/methods/query/getInvestedPools.ts deleted file mode 100644 index 8abeb6fd..00000000 --- a/packages/sdk/src/methods/query/getInvestedPools.ts +++ /dev/null @@ -1,78 +0,0 @@ -import { ApiPromise } from "@polkadot/api"; -import { BN } from "@polkadot/util"; -import { PoolWithShare } from "../../types/query"; -import { BN_ZERO } from "../../utils/bnConstants"; -import { calculateLiquidityShare } from "../../utils/calculateLiquidityShare"; -import { getAccountBalances } from "../../utils/getAccountBalances"; -import { getAssetsInfoWithIds } from "../../utils/getAssetsInfoWithIds"; -import { getLiquidityPromotedPools } from "../../utils/getLiquidityPromotedPools"; -import { getRatio } from "../../utils/getRatio"; -import { Address } from "../../types/common"; -import { getAmountOfTokensInPool } from "./getAmountOfTokensInPool"; -import { logger } from "../../utils/mangataLogger"; - -/** - * @since 2.0.0 - */ -export const getInvestedPools = async ( - instancePromise: Promise, - address: Address -): Promise => { - logger.info("getInvestedPools", { address }); - const api = await instancePromise; - const [assetsInfo, accountBalances, liquidityTokensPromoted] = - await Promise.all([ - getAssetsInfoWithIds(api), - getAccountBalances(api, address), - getLiquidityPromotedPools(api) - ]); - - const poolsInfo = Object.values(assetsInfo) - .filter( - (asset) => - Object.keys(accountBalances).includes(asset.id.toString()) && - asset.name.includes("Liquidity Pool Token") - ) - .map(async (asset) => { - const userLiquidityBalance = accountBalances[asset.id]; - const [firstTokenId, secondTokenId] = asset.symbol.split("-"); - const [firstTokenAmount, secondTokenAmount] = - await getAmountOfTokensInPool( - instancePromise, - firstTokenId, - secondTokenId - ); - const rewardsInfo = await api.query.proofOfStake.rewardsInfo(address, asset.id) - const reserveStatus = await api.query.multiPurposeLiquidity.reserveStatus(address, asset.id) - const stakedUnactivatedReserves = new BN(reserveStatus.stakedUnactivatedReserves) - const unspentReserves = new BN(reserveStatus.unspentReserves) - const activatedLPTokens = new BN(rewardsInfo.activatedAmount) - const nonActivatedLPTokens = userLiquidityBalance.free.add(stakedUnactivatedReserves).add(unspentReserves) - - const share = await calculateLiquidityShare( - api, - asset.id, - activatedLPTokens.add(nonActivatedLPTokens) - ); - - return { - firstTokenId, - secondTokenId, - firstTokenAmount, - secondTokenAmount, - liquidityTokenId: asset.id, - isPromoted: liquidityTokensPromoted.includes(asset.id), - share, - firstTokenRatio: share.eq(BN_ZERO) - ? BN_ZERO - : getRatio(firstTokenAmount, secondTokenAmount), - secondTokenRatio: share.eq(BN_ZERO) - ? BN_ZERO - : getRatio(secondTokenAmount, firstTokenAmount), - activatedLPTokens: activatedLPTokens, - nonActivatedLPTokens: nonActivatedLPTokens - } as PoolWithShare; - }); - - return Promise.all(poolsInfo); -}; diff --git a/packages/sdk/src/methods/query/getLiquidityPool.ts b/packages/sdk/src/methods/query/getLiquidityPool.ts deleted file mode 100644 index 2acc9056..00000000 --- a/packages/sdk/src/methods/query/getLiquidityPool.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { ApiPromise } from "@polkadot/api"; -import { TokenId } from "../../types/common"; -import { logger } from "../../utils/mangataLogger"; - -/** - * @since 2.0.0 - */ -export const getLiquidityPool = async ( - instancePromise: Promise, - liquidityTokenId: TokenId -): Promise => { - logger.info("getLiquidityPool", { liquidityTokenId }); - const api = await instancePromise; - const liquidityPool = await api.query.xyk.liquidityPools(liquidityTokenId); - if (liquidityPool.isNone) return ["-1", "-1"]; - return liquidityPool.unwrap().map((num) => num.toString()); -}; diff --git a/packages/sdk/src/methods/query/getLiquidityTokenId.ts b/packages/sdk/src/methods/query/getLiquidityTokenId.ts deleted file mode 100644 index 0a1e676d..00000000 --- a/packages/sdk/src/methods/query/getLiquidityTokenId.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { ApiPromise } from "@polkadot/api"; -import { TokenId } from "../../types/common"; -import { logger } from "../../utils/mangataLogger"; - -/** - * @since 2.0.0 - */ -export const getLiquidityTokenId = async ( - instancePromise: Promise, - firstTokenId: TokenId, - secondTokenId: TokenId -): Promise => { - const api = await instancePromise; - logger.info("getLiquidityTokenId", { firstTokenId, secondTokenId }); - const liquidityAssetId = await api.query.xyk.liquidityAssets([ - firstTokenId, - secondTokenId - ]); - - if (liquidityAssetId.isNone) { - const liquidityAssetId = await api.query.xyk.liquidityAssets([ - secondTokenId, - firstTokenId - ]); - return liquidityAssetId.unwrap().toString(); - } - - return liquidityAssetId.unwrap().toString(); -}; diff --git a/packages/sdk/src/methods/query/getLiquidityTokenIds.ts b/packages/sdk/src/methods/query/getLiquidityTokenIds.ts deleted file mode 100644 index 270504f4..00000000 --- a/packages/sdk/src/methods/query/getLiquidityTokenIds.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { ApiPromise } from "@polkadot/api"; -import { TokenId } from "../../types/common"; - -/** - * @since 2.0.0 - */ -export const getLiquidityTokenIds = async ( - instancePromise: Promise -): Promise => { - const api = await instancePromise; - const liquidityTokens = await api.query.xyk.liquidityAssets.entries(); - return liquidityTokens.map((liquidityToken) => - liquidityToken[1].unwrap().toString() - ); -}; diff --git a/packages/sdk/src/methods/query/getLiquidityTokens.ts b/packages/sdk/src/methods/query/getLiquidityTokens.ts deleted file mode 100644 index acb96b79..00000000 --- a/packages/sdk/src/methods/query/getLiquidityTokens.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { ApiPromise } from "@polkadot/api"; - -import { MainTokens } from "../../types/query"; -import { getAssetsInfo } from "./getAssetsInfo"; - -/** - * @since 2.0.0 - */ -export const getLiquidityTokens = async ( - instancePromise: Promise -): Promise => { - const assetsInfo = await getAssetsInfo(instancePromise); - - return Object.values(assetsInfo) - .filter((asset) => asset.name.includes("Liquidity Pool Token")) - .reduce((acc, curr) => { - acc[curr.id] = curr; - return acc; - }, {} as MainTokens); -}; diff --git a/packages/sdk/src/methods/query/getNonce.ts b/packages/sdk/src/methods/query/getNonce.ts deleted file mode 100644 index f7918004..00000000 --- a/packages/sdk/src/methods/query/getNonce.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { ApiPromise } from "@polkadot/api"; -import { BN } from "@polkadot/util"; -import { Address } from "../../types/common"; -import { logger } from "../../utils/mangataLogger"; - -/** - * @since 2.0.0 - */ -export const getNonce = async ( - instancePromise: Promise, - address: Address -): Promise => { - logger.info("getNonce", { address }); - const api = await instancePromise; - const nonce = await api.rpc.system.accountNextIndex(address); - return nonce.toBn(); -}; diff --git a/packages/sdk/src/methods/query/getOwnedTokens.ts b/packages/sdk/src/methods/query/getOwnedTokens.ts deleted file mode 100644 index 880fa501..00000000 --- a/packages/sdk/src/methods/query/getOwnedTokens.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { ApiPromise } from "@polkadot/api"; - -import { TokenId } from "../../types/common"; -import { Token } from "../../types/query"; -import { getAccountBalances } from "../../utils/getAccountBalances"; -import { getAssetsInfo } from "./getAssetsInfo"; -import { logger } from "../../utils/mangataLogger"; - -/** - * @since 2.0.0 - */ -export const getOwnedTokens = async ( - instancePromise: Promise, - address: string -): Promise<{ [id: TokenId]: Token }> => { - logger.info("getOwnedTokens", { address }); - const api = await instancePromise; - const [assetsInfo, accountBalances] = await Promise.all([ - getAssetsInfo(instancePromise), - getAccountBalances(api, address) - ]); - - const ownedTokens = Object.fromEntries( - Object.entries(assetsInfo) - .filter(([id]) => Object.keys(accountBalances).includes(id)) - .map(([id, assetInfo]) => [ - id, - { - ...assetInfo, - balance: accountBalances[id] - } - ]) - ); - - return ownedTokens as { [id: TokenId]: Token }; -}; diff --git a/packages/sdk/src/methods/query/getPool.ts b/packages/sdk/src/methods/query/getPool.ts deleted file mode 100644 index e84720c0..00000000 --- a/packages/sdk/src/methods/query/getPool.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { ApiPromise } from "@polkadot/api"; -import { getRatio } from "../../utils/getRatio"; -import { TokenId } from "../../types/common"; -import { PoolWithRatio } from "../../types/query"; -import { getLiquidityPool } from "./getLiquidityPool"; -import { getAmountOfTokensInPool } from "./getAmountOfTokensInPool"; -import { getLiquidityPromotedPools } from "../../utils/getLiquidityPromotedPools"; -import { logger } from "../../utils/mangataLogger"; - -/** - * @since 2.0.0 - */ -export const getPool = async ( - instancePromise: Promise, - liquidityTokenId: TokenId -) => { - logger.info("getPool", { liquidityTokenId }); - const api = await instancePromise; - const [liquidityPoolTokens, promotedPoolRewards] = await Promise.all([ - getLiquidityPool(instancePromise, liquidityTokenId), - getLiquidityPromotedPools(api) - ]); - - const isPoolPromoted = promotedPoolRewards.includes(liquidityTokenId); - - const [firstTokenId, secondTokenId] = liquidityPoolTokens; - const [firstTokenAmount, secondTokenAmount] = await getAmountOfTokensInPool( - instancePromise, - firstTokenId, - secondTokenId - ); - return { - firstTokenId, - secondTokenId, - firstTokenAmount, - secondTokenAmount, - liquidityTokenId, - isPromoted: isPoolPromoted, - firstTokenRatio: getRatio(firstTokenAmount, secondTokenAmount), - secondTokenRatio: getRatio(secondTokenAmount, firstTokenAmount) - } as PoolWithRatio; -}; diff --git a/packages/sdk/src/methods/query/getPools.ts b/packages/sdk/src/methods/query/getPools.ts deleted file mode 100644 index e616f3fa..00000000 --- a/packages/sdk/src/methods/query/getPools.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { ApiPromise } from "@polkadot/api"; -import { BN } from "@polkadot/util"; -import { Pool, PoolWithRatio } from "../../types/query"; -import { getAssetsInfoWithIds } from "../../utils/getAssetsInfoWithIds"; -import { getLiquidityAssets } from "../../utils/getLiquidityAssets"; -import { getLiquidityPromotedPools } from "../../utils/getLiquidityPromotedPools"; -import { getPoolsBalance } from "../../utils/getPoolsBalance"; -import { getRatio } from "../../utils/getRatio"; - -/** - * @since 2.0.0 - */ -export const getPools = async ( - instancePromise: Promise -): Promise => { - const api = await instancePromise; - const [assetsInfo, liquidityAssets, liquidityTokensPromoted] = - await Promise.all([ - getAssetsInfoWithIds(api), - getLiquidityAssets(api), - getLiquidityPromotedPools(api) - ]); - const poolBalances = await getPoolsBalance(api, liquidityAssets); - - return Object.values(assetsInfo) - .filter((asset) => Object.values(liquidityAssets).includes(asset.id)) - .map((asset) => { - const [firstTokenAmount, secondTokenAmount] = poolBalances[asset.id]; - const [firstTokenId, secondTokenId] = asset.symbol.split("-"); - const firstTokenRatio = getRatio(firstTokenAmount, secondTokenAmount); - const secondTokenRatio = getRatio(secondTokenAmount, firstTokenAmount); - const isPromoted = liquidityTokensPromoted.includes(asset.id); - return { - firstTokenId, - secondTokenId, - firstTokenAmount, - secondTokenAmount, - liquidityTokenId: asset.id, - firstTokenRatio, - secondTokenRatio, - isPromoted - } as Pool & { firstTokenRatio: BN; secondTokenRatio: BN }; - }); -}; diff --git a/packages/sdk/src/methods/query/getTokenBalance.ts b/packages/sdk/src/methods/query/getTokenBalance.ts deleted file mode 100644 index 6d82be4f..00000000 --- a/packages/sdk/src/methods/query/getTokenBalance.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { ApiPromise } from "@polkadot/api"; -import { Address, TokenId } from "../../types/common"; -import { TokenBalance } from "../../types/query"; -import { BN } from "@polkadot/util"; -import { logger } from "../../utils/mangataLogger"; - -/** - * @since 2.0.0 - */ -export const getTokenBalance = async ( - instancePromise: Promise, - tokenId: TokenId, - address: Address -): Promise => { - logger.info("getTokenBalance", { tokenId, address }); - const api = await instancePromise; - const { free, reserved, frozen } = await api.query.tokens.accounts( - address, - tokenId - ); - - return { - free: new BN(free), - reserved: new BN(reserved), - frozen: new BN(frozen) - }; -}; diff --git a/packages/sdk/src/methods/query/getTokenInfo.ts b/packages/sdk/src/methods/query/getTokenInfo.ts deleted file mode 100644 index bbc201d5..00000000 --- a/packages/sdk/src/methods/query/getTokenInfo.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { ApiPromise } from "@polkadot/api"; -import { TokenId } from "../../types/common"; -import { TokenInfo } from "../../types/query"; -import { getAssetsInfo } from "./getAssetsInfo"; -import { logger } from "../../utils/mangataLogger"; - -/** - * @since 2.0.0 - */ -export const getTokenInfo = async ( - instancePromise: Promise, - tokenId: TokenId -): Promise => { - logger.info("getTokenInfo", { tokenId }); - const assetsInfo = await getAssetsInfo(instancePromise); - return assetsInfo[tokenId]; -}; diff --git a/packages/sdk/src/methods/query/getTotalIssuance.ts b/packages/sdk/src/methods/query/getTotalIssuance.ts deleted file mode 100644 index e105a669..00000000 --- a/packages/sdk/src/methods/query/getTotalIssuance.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { ApiPromise } from "@polkadot/api"; -import { TokenId } from "../../types/common"; -import { BN } from "@polkadot/util"; -import { logger } from "../../utils/mangataLogger"; - -/** - * @since 2.0.0 - */ -export const getTotalIssuance = async ( - instancePromise: Promise, - tokenId: TokenId -): Promise => { - logger.info("getTotalIssuance", { tokenId }); - const api = await instancePromise; - const tokenSupply = await api.query.tokens.totalIssuance(tokenId); - return new BN(tokenSupply); -}; diff --git a/packages/sdk/src/methods/query/getTotalIssuanceOfTokens.ts b/packages/sdk/src/methods/query/getTotalIssuanceOfTokens.ts deleted file mode 100644 index da541db7..00000000 --- a/packages/sdk/src/methods/query/getTotalIssuanceOfTokens.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { ApiPromise } from "@polkadot/api"; -import { BN } from "@polkadot/util"; -import { TokenId } from "../../types/common"; - -/** - * @since 2.0.0 - */ -export const getTotalIssuanceOfTokens = async ( - instancePromise: Promise -): Promise> => { - const api = await instancePromise; - const balancesResponse = await api.query.tokens.totalIssuance.entries(); - return balancesResponse.reduce((acc, [key, value]) => { - const [id] = key.args; - acc[id.toString()] = new BN(value); - return acc; - }, {} as Record); -}; diff --git a/packages/sdk/src/methods/rpc/calculateBuyPrice.ts b/packages/sdk/src/methods/rpc/calculateBuyPrice.ts deleted file mode 100644 index 00d2802a..00000000 --- a/packages/sdk/src/methods/rpc/calculateBuyPrice.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { ApiPromise } from "@polkadot/api"; -import { BN } from "@polkadot/util"; -import { Reserve } from "../../types/xyk"; -import { logger } from "../../utils/mangataLogger"; - -/** - * @since 2.0.0 - */ -export const calculateBuyPrice = async ( - instancePromise: Promise, - args: Reserve -) => { - logger.info("calculateBuyPrice", { - inputReserve: args.inputReserve.toString(), - outputReserve: args.outputReserve.toString(), - amount: args.amount.toString() - }); - const api = await instancePromise; - const { inputReserve, outputReserve, amount } = args; - const price = await api.rpc.xyk.calculate_buy_price(inputReserve, outputReserve, amount) - return new BN(price); -}; diff --git a/packages/sdk/src/methods/rpc/calculateBuyPriceId.ts b/packages/sdk/src/methods/rpc/calculateBuyPriceId.ts deleted file mode 100644 index dbd68cb6..00000000 --- a/packages/sdk/src/methods/rpc/calculateBuyPriceId.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { ApiPromise } from "@polkadot/api"; -import { BN } from "@polkadot/util"; -import { TokenAmount, TokenId } from "../../types/common"; -import { logger } from "../../utils/mangataLogger"; - -/** - * @since 2.0.0 - */ -export const calculateBuyPriceId = async ( - instancePromise: Promise, - soldTokenId: TokenId, - boughtTokenId: TokenId, - amount: TokenAmount -) => { - logger.info("calculateBuyPriceId", { - soldTokenId, - boughtTokenId, - amount: amount.toString() - }); - const api = await instancePromise; - const price = await api.rpc.xyk.calculate_buy_price_id( - soldTokenId, - boughtTokenId, - amount - ); - return new BN(price); -}; diff --git a/packages/sdk/src/methods/rpc/calculateRewardsAmount.ts b/packages/sdk/src/methods/rpc/calculateRewardsAmount.ts deleted file mode 100644 index 8e3e17f7..00000000 --- a/packages/sdk/src/methods/rpc/calculateRewardsAmount.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { ApiPromise } from "@polkadot/api"; -import { BN, isHex, hexToBn } from "@polkadot/util"; -import { Rewards } from "../../types/xyk"; -import { logger } from "../../utils/mangataLogger"; - -/** - * @since 2.0.0 - */ -export const calculateRewardsAmount = async ( - instancePromise: Promise, - args: Rewards -) => { - logger.info("calculateRewardsAmount", { - address: args.address, - liquidityTokenId: args.liquidityTokenId - }); - const api = await instancePromise; - const { address, liquidityTokenId } = args; - const rewards = await api.rpc.xyk.calculate_rewards_amount( - address, - liquidityTokenId - ); - - return isHex(rewards.toString()) - ? hexToBn(rewards.toString()) - : new BN(rewards); -}; diff --git a/packages/sdk/src/methods/rpc/calculateSellPrice.ts b/packages/sdk/src/methods/rpc/calculateSellPrice.ts deleted file mode 100644 index 067b9c14..00000000 --- a/packages/sdk/src/methods/rpc/calculateSellPrice.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { ApiPromise } from "@polkadot/api"; -import { BN } from "@polkadot/util"; -import { Reserve } from "../../types/xyk"; -import { logger } from "../../utils/mangataLogger"; - -/** - * @since 2.0.0 - */ -export const calculateSellPrice = async ( - instancePromise: Promise, - args: Reserve -) => { - logger.info("calculateSellPrice", { - inputReserve: args.inputReserve.toString(), - outputReserve: args.outputReserve.toString(), - amount: args.amount.toString() - }); - const api = await instancePromise; - const { inputReserve, outputReserve, amount } = args; - const price = await api.rpc.xyk.calculate_sell_price( - inputReserve, - outputReserve, - amount - ); - return new BN(price); -}; diff --git a/packages/sdk/src/methods/rpc/calculateSellPriceId.ts b/packages/sdk/src/methods/rpc/calculateSellPriceId.ts deleted file mode 100644 index 5f38e2e8..00000000 --- a/packages/sdk/src/methods/rpc/calculateSellPriceId.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { ApiPromise } from "@polkadot/api"; -import { BN } from "@polkadot/util"; -import { TokenAmount, TokenId } from "../../types/common"; -import { logger } from "../../utils/mangataLogger"; - -/** - * @since 2.0.0 - */ -export const calculateSellPriceId = async ( - instancePromise: Promise, - soldTokenId: TokenId, - boughtTokenId: TokenId, - amount: TokenAmount -) => { - logger.info("calculateSellPriceId", { - soldTokenId, - boughtTokenId, - amount: amount.toString() - }); - const api = await instancePromise; - const price = await api.rpc.xyk.calculate_sell_price_id( - soldTokenId, - boughtTokenId, - amount - ); - return new BN(price); -}; diff --git a/packages/sdk/src/methods/rpc/getBurnAmount.ts b/packages/sdk/src/methods/rpc/getBurnAmount.ts deleted file mode 100644 index 975854d3..00000000 --- a/packages/sdk/src/methods/rpc/getBurnAmount.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { ApiPromise } from "@polkadot/api"; -import { BurnAmount, Price } from "../../types/xyk"; -import { logger } from "../../utils/mangataLogger"; -import {BN} from "@polkadot/util"; - -/** - * @since 2.0.0 - */ -export const getBurnAmount = async ( - instancePromise: Promise, - args: Price -) => { - logger.info("getBurnAmount", { - firstTokenId: args.firstTokenId, - secondTokenId: args.secondTokenId, - amount: args.amount.toString() - }); - const api = await instancePromise; - const { firstTokenId, secondTokenId, amount } = args; - const result = await api.rpc.xyk.get_burn_amount( - firstTokenId, - secondTokenId, - amount - ); - return { - firstAssetAmount: new BN(result[0]), - secondAssetAmount: new BN(result[1]) - } as BurnAmount -}; diff --git a/packages/sdk/src/methods/rpc/getChain.ts b/packages/sdk/src/methods/rpc/getChain.ts deleted file mode 100644 index 7cc62614..00000000 --- a/packages/sdk/src/methods/rpc/getChain.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { ApiPromise } from "@polkadot/api"; - -/** - * @since 2.0.0 - */ -export const getChain = async (instancePromise: Promise) => { - const api = await instancePromise; - const chain = await api.rpc.system.chain(); - return chain.toHuman(); -}; diff --git a/packages/sdk/src/methods/rpc/getLiquidityTokensForTrading.ts b/packages/sdk/src/methods/rpc/getLiquidityTokensForTrading.ts deleted file mode 100644 index 10180ad6..00000000 --- a/packages/sdk/src/methods/rpc/getLiquidityTokensForTrading.ts +++ /dev/null @@ -1,16 +0,0 @@ - -import { ApiPromise } from "@polkadot/api"; -import { logger } from "../../utils/mangataLogger"; - -/** - * @since 2.0.0 - */ -export const getLiquidityTokensForTrading = async ( - instancePromise: Promise -) => { - logger.info("getLiquidityTokensForTrading"); - const api = await instancePromise; - const lpTokens = await api.rpc.xyk.get_liq_tokens_for_trading() - const lpTokensForTrading: string[] = lpTokens.map((item: any) => item.toString()); - return lpTokensForTrading -}; \ No newline at end of file diff --git a/packages/sdk/src/methods/rpc/getNodeName.ts b/packages/sdk/src/methods/rpc/getNodeName.ts deleted file mode 100644 index f115897d..00000000 --- a/packages/sdk/src/methods/rpc/getNodeName.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { ApiPromise } from "@polkadot/api"; - -/** - * @since 2.0.0 - */ -export const getNodeName = async (instancePromise: Promise) => { - const api = await instancePromise; - const name = await api.rpc.system.name(); - return name.toHuman(); -}; diff --git a/packages/sdk/src/methods/rpc/getNodeVersion.ts b/packages/sdk/src/methods/rpc/getNodeVersion.ts deleted file mode 100644 index 30bf9ba7..00000000 --- a/packages/sdk/src/methods/rpc/getNodeVersion.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { ApiPromise } from "@polkadot/api"; - -/** - * @since 2.0.0 - */ -export const getNodeVersion = async (instancePromise: Promise) => { - const api = await instancePromise; - const version = await api.rpc.system.version(); - return version.toHuman(); -}; diff --git a/packages/sdk/src/methods/rpc/getTradeableTokens.ts b/packages/sdk/src/methods/rpc/getTradeableTokens.ts deleted file mode 100644 index 5aeb7375..00000000 --- a/packages/sdk/src/methods/rpc/getTradeableTokens.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { ApiPromise } from "@polkadot/api"; -import {TradeAbleTokens} from "../../types/xyk"; -import { logger } from "../../utils/mangataLogger"; - -/** - * @since 2.0.0 - */ -export const getTradeableTokens = async ( - instancePromise: Promise -) => { - logger.info("getTradeableTokens"); - const api = await instancePromise; - const tokens = await api.rpc.xyk.get_tradeable_tokens() - const tradeableTokens: TradeAbleTokens[] = tokens.map((item: any) => ({ - tokenId: item.tokenId.toString(), - decimals: parseInt(item.decimals, 10), - name: item.name.toUtf8(), - symbol: item.symbol.toUtf8(), - })); - return tradeableTokens -}; \ No newline at end of file diff --git a/packages/sdk/src/methods/rpc/isBuyAssetLockFree.ts b/packages/sdk/src/methods/rpc/isBuyAssetLockFree.ts deleted file mode 100644 index 6ff49782..00000000 --- a/packages/sdk/src/methods/rpc/isBuyAssetLockFree.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { ApiPromise } from "@polkadot/api"; -import { BN } from "@polkadot/util"; -import { TokenId } from "../../types/common"; -import { logger } from "../../utils/mangataLogger"; - -/** - * @since 2.0.0 - */ -export const isBuyAssetLockFree = async ( - instancePromise: Promise, - tokenIds: TokenId[], - amount: BN -) => { - logger.info("isBuyAssetLockFree", { - tokenIds, - amount: amount.toString() - }); - const api = await instancePromise; - const result = await api.rpc.xyk.is_buy_asset_lock_free( - tokenIds, - amount - ); - return result.toPrimitive() as boolean; -}; diff --git a/packages/sdk/src/methods/rpc/isSellAssetLockFree.ts b/packages/sdk/src/methods/rpc/isSellAssetLockFree.ts deleted file mode 100644 index d464c9fc..00000000 --- a/packages/sdk/src/methods/rpc/isSellAssetLockFree.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { ApiPromise } from "@polkadot/api"; -import { BN } from "@polkadot/util"; -import { TokenId } from "../../types/common"; -import { logger } from "../../utils/mangataLogger"; - -/** - * @since 2.0.0 - */ -export const isSellAssetLockFree = async ( - instancePromise: Promise, - tokenIds: TokenId[], - amount: BN -) => { - logger.info("isSellAssetLockFree", { - tokenIds, - amount: amount.toString() - }); - const api = await instancePromise; - const result = await api.rpc.xyk.is_sell_asset_lock_free( - tokenIds, - amount - ); - return result.toPrimitive() as boolean; -}; diff --git a/packages/sdk/src/methods/rpc/waitForNewBlock.ts b/packages/sdk/src/methods/rpc/waitForNewBlock.ts deleted file mode 100644 index 8ec47a96..00000000 --- a/packages/sdk/src/methods/rpc/waitForNewBlock.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { ApiPromise } from "@polkadot/api"; -import { logger } from "../../utils/mangataLogger"; - -/** - * @since 2.0.0 - */ -export const waitForNewBlock = async ( - instancePromise: Promise, - blockCount?: number -): Promise => { - let count = 0; - const api = await instancePromise; - - const numberOfBlocks = blockCount || 1; - - logger.info("waitForNewBlock", { - numberOfBlocks - }); - - /* eslint-disable no-async-promise-executor */ - return new Promise(async (resolve) => { - const unsubscribe = await api.rpc.chain.subscribeNewHeads(() => { - if (++count === numberOfBlocks) { - unsubscribe(); - resolve(true); - } - }); - }); -}; diff --git a/packages/sdk/src/methods/tokens/transferAllTokens.ts b/packages/sdk/src/methods/tokens/transferAllTokens.ts deleted file mode 100644 index 4e9d17e7..00000000 --- a/packages/sdk/src/methods/tokens/transferAllTokens.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { ApiPromise } from "@polkadot/api"; -import { SubmittableExtrinsic } from "@polkadot/api/types"; -import { MangataGenericEvent } from "../../types/common"; -import { Transfer } from "../../types/tokens"; -import { signTx } from "../../utils/signTx"; -import { logger } from "../../utils/mangataLogger"; - -async function transferAllTokens( - instancePromise: Promise, - args: Transfer, - isForBatch: false -): Promise; - -async function transferAllTokens( - instancePromise: Promise, - args: Transfer, - isForBatch: true -): Promise>; - -/** - * @since 2.0.0 - */ -async function transferAllTokens( - instancePromise: Promise, - args: Transfer, - isForBatch: boolean -) { - const api = await instancePromise; - const { account, tokenId, address, txOptions } = args; - logger.info("transferAllTokens", { - tokenId, - address, - isBatch: isForBatch - }); - const tx = api.tx.tokens.transferAll(address, tokenId, true); - return isForBatch ? tx : await signTx(api, tx, account, txOptions); -} - -export { transferAllTokens }; diff --git a/packages/sdk/src/methods/tokens/transferTokens.ts b/packages/sdk/src/methods/tokens/transferTokens.ts deleted file mode 100644 index 4d47230b..00000000 --- a/packages/sdk/src/methods/tokens/transferTokens.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { ApiPromise } from "@polkadot/api"; -import { SubmittableExtrinsic } from "@polkadot/api/types"; -import { MangataGenericEvent } from "../../types/common"; -import { TransferTokens } from "../../types/tokens"; -import { signTx } from "../../utils/signTx"; -import { logger } from "../../utils/mangataLogger"; - -async function transferTokens( - instancePromise: Promise, - args: TransferTokens, - isForBatch: false -): Promise; - -async function transferTokens( - instancePromise: Promise, - args: TransferTokens, - isForBatch: true -): Promise>; - -/** - * @since 2.0.0 - */ -async function transferTokens( - instancePromise: Promise, - args: TransferTokens, - isForBatch: boolean -) { - const api = await instancePromise; - const { account, tokenId, address, txOptions, amount } = args; - logger.info("transferTokens", { - tokenId, - address, - isBatch: isForBatch - }); - const tx = api.tx.tokens.transfer(address, tokenId, amount); - return isForBatch ? tx : await signTx(api, tx, account, txOptions); -} - -export { transferTokens }; diff --git a/packages/sdk/src/methods/utility/batch.ts b/packages/sdk/src/methods/utility/batch.ts deleted file mode 100644 index bba7a005..00000000 --- a/packages/sdk/src/methods/utility/batch.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { ApiPromise } from "@polkadot/api"; -import { signTx } from "../../utils/signTx"; -import { Batch } from "../../types/utility"; -import { logger } from "../../utils/mangataLogger"; - -export const batch = async ( - instancePromise: Promise, - args: Batch -) => { - logger.info("Batch operation started ..."); - const api = await instancePromise; - const { account, txOptions, calls } = args; - const tx = api.tx.utility.batch(calls); - logger.info("batch", { - nonce: txOptions?.nonce?.toString(), - numberOfTxs: calls.length - }); - return await signTx(api, tx, account, txOptions); -}; diff --git a/packages/sdk/src/methods/utility/batchAll.ts b/packages/sdk/src/methods/utility/batchAll.ts deleted file mode 100644 index 16c537db..00000000 --- a/packages/sdk/src/methods/utility/batchAll.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { ApiPromise } from "@polkadot/api"; -import { signTx } from "../../utils/signTx"; -import { Batch } from "../../types/utility"; -import { logger } from "../../utils/mangataLogger"; - -export const batchAll = async ( - instancePromise: Promise, - args: Batch -) => { - logger.info("BatchAll operation started ..."); - const api = await instancePromise; - const { account, txOptions, calls } = args; - logger.info("batchAll", { - nonce: txOptions?.nonce?.toString(), - numberOfTxs: calls.length - }); - const tx = api.tx.utility.batchAll(calls); - return await signTx(api, tx, account, txOptions); -}; diff --git a/packages/sdk/src/methods/utility/forceBatch.ts b/packages/sdk/src/methods/utility/forceBatch.ts deleted file mode 100644 index 965b295a..00000000 --- a/packages/sdk/src/methods/utility/forceBatch.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { ApiPromise } from "@polkadot/api"; -import { signTx } from "../../utils/signTx"; -import { Batch } from "../../types/utility"; -import { logger } from "../../utils/mangataLogger"; - -export const forceBatch = async ( - instancePromise: Promise, - args: Batch -) => { - logger.info("ForceBatch operation started ..."); - const api = await instancePromise; - const { account, txOptions, calls } = args; - logger.info("forceBatch", { - nonce: txOptions?.nonce?.toString(), - numberOfTxs: calls.length - }); - const tx = api.tx.utility.forceBatch(calls); - return await signTx(api, tx, account, txOptions); -}; diff --git a/packages/sdk/src/methods/xyk/activateLiquidity.ts b/packages/sdk/src/methods/xyk/activateLiquidity.ts deleted file mode 100644 index 106dd235..00000000 --- a/packages/sdk/src/methods/xyk/activateLiquidity.ts +++ /dev/null @@ -1,67 +0,0 @@ -import { ApiPromise } from "@polkadot/api"; -import { SubmittableExtrinsic } from "@polkadot/api/types"; -import { MangataGenericEvent } from "../../types/common"; -import { signTx } from "../../utils/signTx"; -import { Liquidity } from "../../types/xyk"; -import { logger } from "../../utils/mangataLogger"; - -async function activateLiquidity( - instancePromise: Promise, - args: Liquidity, - balanceFrom: - | "AvailableBalance" - | "StakedUnactivatedReserves" - | "UnspentReserves", - isForBatch: false -): Promise; - -async function activateLiquidity( - instancePromise: Promise, - args: Liquidity, - balanceFrom: - | "AvailableBalance" - | "StakedUnactivatedReserves" - | "UnspentReserves", - isForBatch: true -): Promise>; - -/** - * @since 2.0.0 - * Activates liquidity for the given liquidity token ID and amount. Returns the events generated by the transaction. - * - * @param instancePromise - A Promise resolving to an `ApiPromise` instance. - * @param args - The liquidity details for the transaction. - * @param isForBatch - Whether the transaction is to be included in a batch. - * - * @returns If `isForBatch` is `true`, returns a `SubmittableExtrinsic` representing the transaction. If `isForBatch` is `false`, returns the events generated by the transaction. - * - * @throws Throws an error if signing the transaction fails. - */ - -async function activateLiquidity( - instancePromise: Promise, - args: Liquidity, - balanceFrom: - | "AvailableBalance" - | "StakedUnactivatedReserves" - | "UnspentReserves", - isForBatch: boolean -) { - logger.info("Active Liquidity operation started ..."); - const api = await instancePromise; - const { account, liquidityTokenId, amount, txOptions } = args; - logger.info("activateLiquidity", { - liquidityTokenId, - amount: amount.toString(), - balanceFrom, - isBatch: isForBatch - }); - const tx = api.tx.proofOfStake.activateLiquidity( - liquidityTokenId, - amount, - balanceFrom - ); - return isForBatch ? tx : await signTx(api, tx, account, txOptions); -} - -export { activateLiquidity }; diff --git a/packages/sdk/src/methods/xyk/burnLiquidity.ts b/packages/sdk/src/methods/xyk/burnLiquidity.ts deleted file mode 100644 index db898b61..00000000 --- a/packages/sdk/src/methods/xyk/burnLiquidity.ts +++ /dev/null @@ -1,55 +0,0 @@ -import { ApiPromise } from "@polkadot/api"; -import { SubmittableExtrinsic } from "@polkadot/api/types"; -import { MangataGenericEvent } from "../../types/common"; -import { signTx } from "../../utils/signTx"; -import { BurnLiquidity } from "../../types/xyk"; -import { logger } from "../../utils/mangataLogger"; - -async function burnLiquidity( - instancePromise: Promise, - args: BurnLiquidity, - isForBatch: false -): Promise; - -async function burnLiquidity( - instancePromise: Promise, - args: BurnLiquidity, - isForBatch: true -): Promise>; - -/** - * @since 2.0.0 - * Burn liquidity tokens and receive back the underlying assets. - * - * - * @param instancePromise - A promise that resolves to an instance of `ApiPromise`. - * @param args - An object containing the arguments for the transaction. - * @param args.account - The account that will sign and submit the transaction. - * @param args.firstTokenId - The ID of the first token. - * @param args.secondTokenId - The ID of the second token. - * @param args.amount - The amount of liquidity tokens to burn. - * @param args.txOptions - Optional transaction options. - * @param isForBatch - A flag indicating whether the transaction is for a batch call. - * @returns If `isForBatch` is `true`, returns a `SubmittableExtrinsic`. Otherwise, signs and submits the transaction - * and returns an array of `MangataGenericEvent` objects. - */ - -async function burnLiquidity( - instancePromise: Promise, - args: BurnLiquidity, - isForBatch: boolean -) { - logger.info("Burn Liquidity operation started ..."); - const api = await instancePromise; - const { account, firstTokenId, secondTokenId, amount, txOptions } = args; - logger.info("burnLiquidity", { - firstTokenId, - secondTokenId, - amount: amount.toString(), - isBatch: isForBatch - }); - const tx = api.tx.xyk.burnLiquidity(firstTokenId, secondTokenId, amount); - return isForBatch ? tx : await signTx(api, tx, account, txOptions); -} - -export { burnLiquidity }; diff --git a/packages/sdk/src/methods/xyk/claimRewards.ts b/packages/sdk/src/methods/xyk/claimRewards.ts deleted file mode 100644 index a1f71cd3..00000000 --- a/packages/sdk/src/methods/xyk/claimRewards.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { ApiPromise } from "@polkadot/api"; -import { SubmittableExtrinsic } from "@polkadot/api/types"; -import { MangataGenericEvent } from "../../types/common"; -import { signTx } from "../../utils/signTx"; -import { Liquidity } from "../../types/xyk"; -import { logger } from "../../utils/mangataLogger"; - -async function claimRewards( - instancePromise: Promise, - args: Omit, - isForBatch: false -): Promise; - -async function claimRewards( - instancePromise: Promise, - args: Omit, - isForBatch: true -): Promise>; - -/** - *@since 2.0.0 - * Claims rewards for liquidity providers. - * @param instancePromise A Promise that resolves to an ApiPromise object from the Polkadot JS API. - * @param args An object of type Liquidity containing the liquidity pool token ID, the amount of liquidity to claim rewards for, and the account to claim rewards for. - * @param isForBatch A boolean value indicating whether or not the function is being called as part of a batch transaction. - * @returns If isForBatch is false, a Promise that resolves to an array of MangataGenericEvent objects. Otherwise, a Promise that resolves to a SubmittableExtrinsic object. - */ - -async function claimRewards( - instancePromise: Promise, - args: Omit, - isForBatch: boolean -) { - logger.info("Claim Rewards operation started ..."); - const api = await instancePromise; - const { account, txOptions, liquidityTokenId } = args; - logger.info("claimRewards", { - liquidityTokenId, - isBatch: isForBatch - }); - const tx = api.tx.proofOfStake.claimRewardsAll(liquidityTokenId); - return isForBatch ? tx : await signTx(api, tx, account, txOptions); -} - -export { claimRewards }; diff --git a/packages/sdk/src/methods/xyk/claimRewardsAll.ts b/packages/sdk/src/methods/xyk/claimRewardsAll.ts deleted file mode 100644 index 3ef4576a..00000000 --- a/packages/sdk/src/methods/xyk/claimRewardsAll.ts +++ /dev/null @@ -1,84 +0,0 @@ -import { ApiPromise } from "@polkadot/api" -import { SubmittableExtrinsic } from "@polkadot/api/types"; -import { KeyringPair } from "@polkadot/keyring/types"; -import { calculateRewardsAmount } from "../rpc/calculateRewardsAmount"; -import { MangataGenericEvent } from "../../types/common"; -import { signTx } from "../../utils/signTx"; -import { ExtrinsicCommon } from "../../types/common"; -import { logger } from "../../utils/mangataLogger"; -import { Liquidity } from "../../types/xyk"; -import { claimRewards } from "./claimRewards"; - -async function claimRewardsAll( - instancePromise: Promise, - args: ExtrinsicCommon, - isForBatch: false -): Promise; - -// eslint-disable-next-line @typescript-eslint/ban-ts-comment -// @ts-ignore -async function claimRewardsAll( - instancePromise: Promise, - args: ExtrinsicCommon, - isForBatch: true -): Promise>; - -/** - *@since 2.0.0 - * Claims rewards for liquidity providers from all pools that user participated. - * @param instancePromise A Promise that resolves to an ApiPromise object from the Polkadot JS API. - * @param args An object of type ExtrinsicCommon, note that you need to provide your keyring and not address - * if you want to use blocking api (when isForBatch == false) - * @param isForBatch A boolean value indicating whether or not the function is being called as part of a batch transaction. - * @returns If isForBatch is false, a Promise that resolves to an array of MangataGenericEvent objects. Otherwise, a Promise that resolves to a SubmittableExtrinsic object. - */ - -const TOKENS_CLAIM_LIMIT = 10; -// eslint-disable-next-line @typescript-eslint/adjacent-overload-signatures -async function claimRewardsAll( - instancePromise: Promise, - args: ExtrinsicCommon, - isForBatch: boolean -) { - - logger.info("Claim Rewards operation started ..."); - const api = await instancePromise; - const { account, txOptions } = args; - - let rewardsAddr: string; - if (typeof account === "string"){ - rewardsAddr = account; - }else { - rewardsAddr = (account as KeyringPair).address; - } - - logger.info("claimRewardsAll", { isBatch: isForBatch }); - - const promotedPools = await api.query.proofOfStake.promotedPoolRewards(); - - const liquidityTokens = Object.entries(promotedPools.toHuman()).map(([token]) => { - return Promise.all([ - Promise.resolve(token), - calculateRewardsAmount(instancePromise, { - address: rewardsAddr, - liquidityTokenId: token - }) - ]) - }) - - const txs = (await Promise.all(liquidityTokens)) - // eslint-disable-next-line @typescript-eslint/no-unused-vars - .filter(([_, rewards])=> rewards.gtn(0)) - .map(([pool, rewards]) => { - const claimRewardsArgs: Liquidity = {...args, ...{amount: rewards, liquidityTokenId: pool}}; - return claimRewards(instancePromise, claimRewardsArgs, true); - }); - - if (txs.length > TOKENS_CLAIM_LIMIT) { - throw new Error(`Only up to ${TOKENS_CLAIM_LIMIT} can be claimed automatically, consider claiming rewards separately for each liquidity pool`); - } - const claimAllTx = api.tx.utility.batchAll(await Promise.all(txs)); - return isForBatch ? claimAllTx : await signTx(api, claimAllTx, account, txOptions); -} - -export { claimRewardsAll }; diff --git a/packages/sdk/src/methods/xyk/createPool.ts b/packages/sdk/src/methods/xyk/createPool.ts deleted file mode 100644 index 87860ef0..00000000 --- a/packages/sdk/src/methods/xyk/createPool.ts +++ /dev/null @@ -1,59 +0,0 @@ -import { ApiPromise } from "@polkadot/api"; -import { MangataGenericEvent } from "../../types/common"; -import { signTx } from "../../utils/signTx"; -import { CreatePool } from "../../types/xyk"; -import { SubmittableExtrinsic } from "@polkadot/api/types"; -import { logger } from "../../utils/mangataLogger"; - -async function createPool( - instancePromise: Promise, - args: CreatePool, - isForBatch: false -): Promise; -async function createPool( - instancePromise: Promise, - args: CreatePool, - isForBatch: true -): Promise>; - -/** - * @since 2.0.0 -Creates a new pool -@param instancePromise - The API promise that resolves to a PolkadotJS API instance -@param args - An object containing the necessary information to create a new pool -@param isForBatch - A boolean flag indicating whether the function should return an unsigned extrinsic or sign and send the transaction -@returns - If isForBatch is true, returns an unsigned extrinsic wrapped in a promise. Otherwise, returns an array of events wrapped in a promise after the transaction has been signed and sent -*/ -async function createPool( - instancePromise: Promise, - args: CreatePool, - isForBatch: boolean -) { - logger.info("Create Pool Operation started ..."); - const api = await instancePromise; - const { - account, - txOptions, - firstTokenId, - firstTokenAmount, - secondTokenId, - secondTokenAmount - } = args; - logger.info("createPool", { - firstTokenId, - firstTokenAmount: firstTokenAmount.toString(), - secondTokenId, - secondTokenAmount: secondTokenAmount.toString(), - isBatch: isForBatch - }); - const tx = api.tx.xyk.createPool( - firstTokenId, - firstTokenAmount, - secondTokenId, - secondTokenAmount - ); - - return isForBatch ? tx : await signTx(api, tx, account, txOptions); -} - -export { createPool }; diff --git a/packages/sdk/src/methods/xyk/deactivateLiquidity.ts b/packages/sdk/src/methods/xyk/deactivateLiquidity.ts deleted file mode 100644 index 4f8589e3..00000000 --- a/packages/sdk/src/methods/xyk/deactivateLiquidity.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { ApiPromise } from "@polkadot/api"; -import { SubmittableExtrinsic } from "@polkadot/api/types"; -import { MangataGenericEvent } from "../../types/common"; -import { signTx } from "../../utils/signTx"; -import { Liquidity } from "../../types/xyk"; -import { logger } from "../../utils/mangataLogger"; - -async function deactivateLiquidity( - instancePromise: Promise, - args: Liquidity, - isForBatch: false -): Promise; - -async function deactivateLiquidity( - instancePromise: Promise, - args: Liquidity, - isForBatch: true -): Promise>; - -/** -* @since 2.0.0 -Deactivates liquidity for a given liquidity token ID and amount. -@param instancePromise A promise that resolves to an instance of the Polkadot API. -@param args An object containing account, liquidityTokenId, amount, and txOptions properties. -@param isForBatch A flag indicating whether the transaction is for a batch of transactions or a single transaction. -@returns If isForBatch is false, returns a promise that resolves to an array of MangataGenericEvent objects representing the result of the transaction. If isForBatch is true, returns a promise that resolves to a SubmittableExtrinsic object representing the transaction. -*/ -async function deactivateLiquidity( - instancePromise: Promise, - args: Liquidity, - isForBatch: boolean -) { - logger.info("Deactivate Liquidity operation started ..."); - const api = await instancePromise; - const { account, liquidityTokenId, amount, txOptions } = args; - logger.info("deactivateLiquidity", { - liquidityTokenId, - amount: amount.toString(), - isBatch: isForBatch - }); - const tx = api.tx.proofOfStake.deactivateLiquidity(liquidityTokenId, amount); - return isForBatch ? tx : await signTx(api, tx, account, txOptions); -} - -export { deactivateLiquidity }; diff --git a/packages/sdk/src/methods/xyk/mintLiquidity.ts b/packages/sdk/src/methods/xyk/mintLiquidity.ts deleted file mode 100644 index 9ea69c5b..00000000 --- a/packages/sdk/src/methods/xyk/mintLiquidity.ts +++ /dev/null @@ -1,73 +0,0 @@ -import { ApiPromise } from "@polkadot/api"; -import { SubmittableExtrinsic } from "@polkadot/api/types"; -import { MangataGenericEvent } from "../../types/common"; -import { signTx } from "../../utils/signTx"; -import { MintLiquidity } from "../../types/xyk"; -import { logger } from "../../utils/mangataLogger"; - -async function mintLiquidity( - instancePromise: Promise, - args: MintLiquidity, - isForBatch: false -): Promise; - -async function mintLiquidity( - instancePromise: Promise, - args: MintLiquidity, - isForBatch: true -): Promise>; - -/** - * Mint liquidity tokens by providing two assets - * @since 2.0.0 - * @remarks - * This function allows a user to mint liquidity tokens by providing two assets. - * The user must provide an account to send the transaction from, as well as the - * ID and amount of each asset they wish to provide. They must also provide the - * expected amount of the second asset they will receive in exchange for the first. - * - * @param instancePromise - A promise that resolves to an `ApiPromise` instance. - * @param args - An object containing the arguments for the transaction. - * @param args.account - The account to send the transaction from. - * @param args.firstTokenId - The ID of the first asset to provide. - * @param args.secondTokenId - The ID of the second asset to provide. - * @param args.firstTokenAmount - The amount of the first asset to provide. - * @param args.expectedSecondTokenAmount - The expected amount of the second asset to receive. - * @param args.txOptions - An optional object containing options for the transaction. - * @param isForBatch - A boolean indicating whether the transaction is intended to be part of a batch. - * - * @returns If `isForBatch` is `true`, returns a `SubmittableExtrinsic` object that can be included in a batch. - * Otherwise, returns a `Promise` that resolves to an array of `MangataGenericEvent` objects. - */ -async function mintLiquidity( - instancePromise: Promise, - args: MintLiquidity, - isForBatch: boolean -) { - logger.info("Mint Liquidity operation started ..."); - const api = await instancePromise; - const { - account, - firstTokenId, - secondTokenId, - firstTokenAmount, - expectedSecondTokenAmount, - txOptions - } = args; - logger.info("mintLiquidity", { - firstTokenId, - secondTokenId, - firstTokenAmount: firstTokenAmount.toString(), - expectedSecondTokenAmount: expectedSecondTokenAmount.toString(), - isBatch: isForBatch - }); - const tx = api.tx.xyk.mintLiquidity( - firstTokenId, - secondTokenId, - firstTokenAmount, - expectedSecondTokenAmount - ); - return isForBatch ? tx : await signTx(api, tx, account, txOptions); -} - -export { mintLiquidity }; diff --git a/packages/sdk/src/methods/xyk/multiswapBuyAsset.ts b/packages/sdk/src/methods/xyk/multiswapBuyAsset.ts deleted file mode 100644 index d8328811..00000000 --- a/packages/sdk/src/methods/xyk/multiswapBuyAsset.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { ApiPromise } from "@polkadot/api"; -import { SubmittableExtrinsic } from "@polkadot/api/types"; -import { MangataGenericEvent } from "../../types/common"; -import { signTx } from "../../utils/signTx"; -import { MultiswapBuyAsset } from "../../types/xyk"; -import { logger } from "../../utils/mangataLogger"; - -async function multiswapBuyAsset( - instancePromise: Promise, - args: MultiswapBuyAsset, - isForBatch: false -): Promise; - -async function multiswapBuyAsset( - instancePromise: Promise, - args: MultiswapBuyAsset, - isForBatch: true -): Promise>; - -/** - * @since 2.0.0 - */ -async function multiswapBuyAsset( - instancePromise: Promise, - args: MultiswapBuyAsset, - isForBatch: boolean -) { - logger.info("Multiswap Buy Asset operation started ..."); - const api = await instancePromise; - const { account, tokenIds, amount, maxAmountIn, txOptions } = args; - logger.info("multiswapBuyAsset", { - tokenIds, - amount: amount.toString(), - maxAmountIn: maxAmountIn.toString(), - isBatch: isForBatch - }); - const tx = api.tx.xyk.multiswapBuyAsset(tokenIds, amount, maxAmountIn); - return isForBatch ? tx : await signTx(api, tx, account, txOptions); -} - -export { multiswapBuyAsset }; diff --git a/packages/sdk/src/methods/xyk/multiswapSellAsset.ts b/packages/sdk/src/methods/xyk/multiswapSellAsset.ts deleted file mode 100644 index 5dea1489..00000000 --- a/packages/sdk/src/methods/xyk/multiswapSellAsset.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { ApiPromise } from "@polkadot/api"; -import { SubmittableExtrinsic } from "@polkadot/api/types"; -import { MangataGenericEvent } from "../../types/common"; -import { signTx } from "../../utils/signTx"; -import { MultiswapSellAsset } from "../../types/xyk"; -import { logger } from "../../utils/mangataLogger"; - -async function multiswapSellAsset( - instancePromise: Promise, - args: MultiswapSellAsset, - isForBatch: false -): Promise; - -async function multiswapSellAsset( - instancePromise: Promise, - args: MultiswapSellAsset, - isForBatch: true -): Promise>; - -/** - * @since 2.0.0 - */ -async function multiswapSellAsset( - instancePromise: Promise, - args: MultiswapSellAsset, - isForBatch: boolean -) { - logger.info("Multiswap Sell Asset operation started ..."); - const api = await instancePromise; - const { account, tokenIds, amount, minAmountOut, txOptions } = args; - logger.info("multiswapSellAsset", { - tokenIds, - amount: amount.toString(), - minAmountOut: minAmountOut.toString(), - isBatch: isForBatch - }); - const tx = api.tx.xyk.multiswapSellAsset(tokenIds, amount, minAmountOut); - return isForBatch ? tx : await signTx(api, tx, account, txOptions); -} - -export { multiswapSellAsset }; diff --git a/packages/sdk/src/modules/account/Account.ts b/packages/sdk/src/modules/account/Account.ts new file mode 100644 index 00000000..92914963 --- /dev/null +++ b/packages/sdk/src/modules/account/Account.ts @@ -0,0 +1,68 @@ +import { BaseModule } from '../core/BaseModule'; +import { GetAssetBalanceParams, getAssetBalance } from './getAssetBalance'; +import { GetBalancesParams, getBalances } from './getBalances'; +import { GetNonceParams, getNonce } from './getNonce'; + +export class AccountModule extends BaseModule { + /** + * Retrieves the asset balance for a specific account and asset. + * + * @param params - Configuration object containing the account and asset details. + * @param params.account - The account address to query. + * @param params.asset - The asset id to query. + * + * @returns A promise that resolves with the asset balance information. + * + * @example + * ```typescript + * const account = '0x123'; + * const asset = '0'; + * + * const result = await getAssetBalance({ account, asset }); + * console.log(result); + * ``` + */ + async getAssetBalance(params: GetAssetBalanceParams) { + return getAssetBalance(this.context, params); + } + + /** + * Retrieves balances for a specific account. + * + * @param params - Configuration object containing the account details. + * @param params.account - The account address to query. + * + * @returns A promise that resolves with the balance information for all assets. + * + * @example + * ```typescript + * const account = '0x123'; + * + * const result = await getBalances({ account }); + * console.log(result); + * ``` + */ + async getBalances(params: GetBalancesParams) { + return getBalances(this.context, params); + } + + /** + * Retrieves the nonce for a specific account. + * + * @param params - Configuration object containing the account details. + * @param params.account - The account address to query. + * + * @returns A promise that resolves with the nonce value. + * + * @example + * ```typescript + * const account = '0x123'; + * + * const result = await getNonce({ account }); + * console.log(result); + * ``` + * */ + async getNonce(params: GetNonceParams) { + return getNonce(this.context, params); + } +} diff --git a/packages/sdk/src/modules/account/getAssetBalance.ts b/packages/sdk/src/modules/account/getAssetBalance.ts new file mode 100644 index 00000000..b76b0540 --- /dev/null +++ b/packages/sdk/src/modules/account/getAssetBalance.ts @@ -0,0 +1,31 @@ +import { GaspError } from '../../error/GaspError'; +import { Balance } from './types'; +import { ModuleContext } from '../core/BaseModule'; +import { BN } from 'bn.js'; + +export interface GetAssetBalanceParams { + account: string; + asset: string; +} + +export const getAssetBalance = async ( + { api }: ModuleContext, + { account, asset }: GetAssetBalanceParams +): Promise => { + const res = await api.query.tokens.accounts(account, asset).catch((e) => { + throw new GaspError( + 'Unable to fetch asset balance', + GaspError.error.API_RESPONSE_ERROR, + e + ); + }); + + return { + asset, + balance: { + free: new BN(res.free), + reserved: new BN(res.reserved), + frozen: new BN(res.frozen), + }, + }; +}; diff --git a/packages/sdk/src/modules/account/getBalances.ts b/packages/sdk/src/modules/account/getBalances.ts new file mode 100644 index 00000000..adf97b8a --- /dev/null +++ b/packages/sdk/src/modules/account/getBalances.ts @@ -0,0 +1,32 @@ +import { Balance } from './types'; +import { ModuleContext } from '../core/BaseModule'; +import { GaspError } from '../../error/GaspError'; +import BN from 'bn.js'; + +export interface GetBalancesParams { + account: string; +} + +export const getBalances = async ( + { api }: ModuleContext, + { account }: GetBalancesParams +): Promise => { + const res = await api.query.tokens.accounts.entries(account).catch((e) => { + throw new GaspError( + 'Unable to fetch balances', + GaspError.error.API_RESPONSE_ERROR, + e + ); + }); + + return res.map(([key, value]) => { + return { + asset: key.args[1].toString(), + balance: { + free: new BN(value.free), + reserved: new BN(value.reserved), + frozen: new BN(value.frozen), + }, + }; + }); +}; diff --git a/packages/sdk/src/modules/account/getNonce.ts b/packages/sdk/src/modules/account/getNonce.ts new file mode 100644 index 00000000..da0b06b9 --- /dev/null +++ b/packages/sdk/src/modules/account/getNonce.ts @@ -0,0 +1,21 @@ +import { GaspError } from '../../error/GaspError'; +import { ModuleContext } from '../core/BaseModule'; + +export interface GetNonceParams { + account: string; +} + +export const getNonce = async ( + { api }: ModuleContext, + { account }: GetNonceParams +): Promise => { + const nonce = await api.rpc.system.accountNextIndex(account).catch((e) => { + throw new GaspError( + 'Unable to fetch asset balance', + GaspError.error.API_RESPONSE_ERROR, + e + ); + }); + + return nonce.toString(); +}; diff --git a/packages/sdk/src/modules/account/index.ts b/packages/sdk/src/modules/account/index.ts new file mode 100644 index 00000000..ef1f8ea5 --- /dev/null +++ b/packages/sdk/src/modules/account/index.ts @@ -0,0 +1,2 @@ +export * from './types'; +export * from './Account'; diff --git a/packages/sdk/src/modules/account/types.ts b/packages/sdk/src/modules/account/types.ts new file mode 100644 index 00000000..c4f197bf --- /dev/null +++ b/packages/sdk/src/modules/account/types.ts @@ -0,0 +1,10 @@ +import BN from 'bn.js'; + +export interface Balance { + asset: string; + balance: { + free: BN; + reserved: BN; + frozen: BN; + }; +} diff --git a/packages/sdk/src/modules/asset/Asset.ts b/packages/sdk/src/modules/asset/Asset.ts new file mode 100644 index 00000000..bee36877 --- /dev/null +++ b/packages/sdk/src/modules/asset/Asset.ts @@ -0,0 +1,97 @@ +import { Signer } from '../../types/common'; +import { BaseModule } from '../core/BaseModule'; +import { GetAssetParams, getAsset } from './getAsset'; +import { getAssets } from './getAssets'; +import { GetIssuanceParams, getIssuance } from './getIssuance'; +import { TransferParams, transfer } from './transfer'; + +export class AssetModule extends BaseModule { + /** + * Retrieves the asset metadata for a specific asset. + * + * @param params - Configuration object containing the asset details. + * @param params.asset - The asset id to query. + * + * @returns A promise that resolves with the asset metadata information. + * + * @example + * ```typescript + * const asset = '0'; + * + * const result = await getAsset({ asset }); + * console.log(result); + * ``` + */ + async getAsset(params: GetAssetParams) { + return getAsset(this.context, params); + } + + /** + * Retrieves the metadata for all assets. + * + * @returns A promise that resolves with an array of asset metadata information. + * + * @example + * ```typescript + * const result = await getAssets(); + * console.log(result); + * ``` + */ + async getAssets() { + return getAssets(this.context); + } + + /** + * Retrieves the issuance information for a specific asset. + * + * @param params - Configuration object containing the asset details. + * @param params.asset - The asset id to query. + * + * @returns A promise that resolves with the asset issuance information. + * + * @example + * ```typescript + * const asset = '0'; + * + * const result = await getIssuance({ asset }); + * console.log(result); + * ``` + */ + async getIssuance(params: GetIssuanceParams) { + return getIssuance(this.context, params); + } + + /** + * Transfers an asset from one account to another on GASP network. + * + * @param params - Configuration object containing transfer details. + * @param params.sender - The sender's account address. + * @param params.recipient - The recipient's account address. + * @param params.asset - The asset id to transfer. + * @param params.amount - The amount of the asset to transfer. + * + * @param signer - Optional. The signer instance used to authorize the transaction. + * Defaults to the signer used when initializing the SDK + * + * @returns A promise that resolves with the result of the signed transaction submission. + * + * @example + * ```typescript + * const result = await transfer({ + * sender: '0x123', + * recipient: '0x456', + * asset: '0', + * amount: '100', + * }, signer); + * console.log(result); + * ``` + */ + transfer(params: TransferParams, signer?: Signer) { + return transfer( + this.context, + params, + this.getSigner(signer), + this.submitTx + ); + } +} diff --git a/packages/sdk/src/modules/asset/getAsset.ts b/packages/sdk/src/modules/asset/getAsset.ts new file mode 100644 index 00000000..7aacb13c --- /dev/null +++ b/packages/sdk/src/modules/asset/getAsset.ts @@ -0,0 +1,36 @@ +import { Asset } from './types'; +import { ModuleContext } from '../core/BaseModule'; +import { GaspError } from '../../error/GaspError'; + +export interface GetAssetParams { + asset: string; +} + +export const getAsset = async ( + { api }: ModuleContext, + { asset }: GetAssetParams +): Promise => { + const metadata = await api.query.assetRegistry.metadata(asset).catch((e) => { + throw new GaspError( + 'Unable to fetch asset metadata', + GaspError.error.API_RESPONSE_ERROR, + e + ); + }); + + const idToL1Entries = await api.query.assetRegistry + .idToL1Asset(asset) + .catch((e) => { + throw new GaspError( + 'Unable to fetch asset L1 info', + GaspError.error.API_RESPONSE_ERROR, + e + ); + }); + + return { + id: asset, + contract: idToL1Entries.value.value.toString(), + decimals: metadata.value.decimals.toString(), + }; +}; diff --git a/packages/sdk/src/modules/asset/getAssets.ts b/packages/sdk/src/modules/asset/getAssets.ts new file mode 100644 index 00000000..8e30cd54 --- /dev/null +++ b/packages/sdk/src/modules/asset/getAssets.ts @@ -0,0 +1,46 @@ +import { GaspError } from '../../error/GaspError'; +import { Asset } from './types'; +import { ModuleContext } from '../core/BaseModule'; + +export const getAssets = async ({ api }: ModuleContext): Promise => { + const metadata = await api.query.assetRegistry.metadata + .entries() + .catch((e) => { + throw new GaspError( + 'Unable to fetch asset metadata', + GaspError.error.API_RESPONSE_ERROR, + e + ); + }); + + const idToL1Entries = await api.query.assetRegistry.idToL1Asset + .entries() + .catch((e) => { + throw new GaspError( + 'Unable to fetch asset L1 info', + GaspError.error.API_RESPONSE_ERROR, + e + ); + }); + + const idToL1EntriesMap = new Map( + idToL1Entries.map((e) => [ + e[0].args[0].toString(), + e[1].value.value.toString(), + ]) + ); + + const assets = metadata.map((m) => { + const decimals = m[1].value.decimals.toString(); + const id = m[0].args[0].toString(); + const contract = idToL1EntriesMap.get(id); + + return { + id, + contract, + decimals, + }; + }); + + return assets; +}; diff --git a/packages/sdk/src/modules/asset/getIssuance.ts b/packages/sdk/src/modules/asset/getIssuance.ts new file mode 100644 index 00000000..455bd150 --- /dev/null +++ b/packages/sdk/src/modules/asset/getIssuance.ts @@ -0,0 +1,22 @@ +import { GaspError } from '../../error/GaspError'; +import { ModuleContext } from '../core/BaseModule'; +import BN from 'bn.js'; + +export interface GetIssuanceParams { + asset: string; +} + +export const getIssuance = async ( + { api }: ModuleContext, + { asset }: GetIssuanceParams +): Promise => { + const issuance = await api.query.tokens.totalIssuance(asset).catch((e) => { + throw new GaspError( + 'Unable to fetch asset metadata', + GaspError.error.API_RESPONSE_ERROR, + e + ); + }); + + return new BN(issuance); +}; diff --git a/packages/sdk/src/modules/asset/index.ts b/packages/sdk/src/modules/asset/index.ts new file mode 100644 index 00000000..f0f62a50 --- /dev/null +++ b/packages/sdk/src/modules/asset/index.ts @@ -0,0 +1,4 @@ +export * from './types'; + +export { getAsset } from './getAsset'; +export { getAssets } from './getAssets'; diff --git a/packages/sdk/src/modules/asset/transfer.ts b/packages/sdk/src/modules/asset/transfer.ts new file mode 100644 index 00000000..e46cefe4 --- /dev/null +++ b/packages/sdk/src/modules/asset/transfer.ts @@ -0,0 +1,44 @@ +import { Signer } from '../../types/common'; +import { FeeMetadata } from '../core/Fee'; +import { + ModuleContext, + SubmitHandler, + SubmittableTx, +} from '../core/BaseModule'; +import BN from 'bn.js'; + +export interface TransferParams { + sender: string; + recipient: string; + asset: string; + amount: BN | string; +} + +export interface TransferResult extends FeeMetadata { + asset: string; + from: string; + to: string; + amount: BN; +} + +export const transfer = ( + { api }: ModuleContext, + { asset, sender, recipient, amount }: TransferParams, + signer: Signer, + submitHandler: SubmitHandler +): SubmittableTx => { + const extrinsic = api.tx.tokens.transfer(recipient, asset, amount); + + return submitHandler({ + extrinsic, + signer, + account: sender, + parseResponse: (data) => ({ + asset: data.currencyId.toString(), + from: data.from.toString(), + to: data.to.toString(), + amount: new BN(data.amount), + }), + eventType: api.events.tokens.Transfer, + }); +}; diff --git a/packages/sdk/src/modules/asset/types.ts b/packages/sdk/src/modules/asset/types.ts new file mode 100644 index 00000000..37fd311d --- /dev/null +++ b/packages/sdk/src/modules/asset/types.ts @@ -0,0 +1,6 @@ +export interface Asset { + id: string; + contract?: string; + decimals: string; +} + diff --git a/packages/sdk/src/modules/core/BaseModule.ts b/packages/sdk/src/modules/core/BaseModule.ts new file mode 100644 index 00000000..387a27c8 --- /dev/null +++ b/packages/sdk/src/modules/core/BaseModule.ts @@ -0,0 +1,208 @@ +import { ApiPromise } from '@polkadot/api'; +import { Gasp } from '../../instance'; +import { Logger } from './Logger'; +import { Signer } from '../../types/common'; +import { FrameSystemEventRecord } from '@polkadot/types/lookup'; +import { Event, EventType, ParsedEventData } from './Event'; +import { Fee, FeeInfo } from './Fee'; +import { TxError } from './Tx'; +import { SubmittableExtrinsic } from '@polkadot/api/types'; +import { GaspError } from '../../error/GaspError'; + +export interface ModuleContext { + sdk: Gasp; + api: ApiPromise; + logger: Logger; +} + +export interface SubmittableTx { + execute: () => Promise & FeeEntity>; + paymentInfo: () => Promise; +} + +type ResponseParser = (event: ParsedEventData) => R; + +export interface SubmitHandlerArgs { + /** + * The extrinsic to be submitted. + */ + extrinsic: SubmittableExtrinsic<'promise'>; + /** + * The signer to be used for the transaction. + */ + signer: Signer; + /** + * The account address from which the transaction is sent. + */ + account: string; + /** + * The type of event expected from the transaction. + */ + eventType: EventType; + /** + * A function to parse the event data from the response. + */ + parseResponse: ResponseParser>; + /** + * An optional function for performing validations before submission. + */ + preSubmitValidation?: () => Promise; +} + +export type SubmitHandler = ( + args: SubmitHandlerArgs +) => SubmittableTx; + +type FeeEntity = { fee: FeeInfo }; + +/** + * A response handler function that processes blockchain events and returns + * a parsed response object containing both the response data and fee info. + * + * @param events - Array of blockchain event records. + * @param eventType - The type of event to search for. + * @param parseResponse - Function to parse the event data. + * + * @returns Parsed response merged with fee information. + */ +export type ResponseHandler = ( + events: FrameSystemEventRecord[], + eventType: E, + parseResponse: ResponseParser> +) => Promise & FeeEntity>; + +export class BaseModule { + protected readonly context: ModuleContext; + protected readonly signer?: Signer; + + constructor(sdk: Gasp, api: ApiPromise, logger: Logger) { + this.context = { + sdk, + api, + logger, + }; + } + + protected getSigner(customSigner?: Signer): Signer { + const config = customSigner ?? this.context.sdk.signer; + + if (!config) { + throw new GaspError('No signer provided', GaspError.error.ARGS_ERROR); + } + + return config; + } + + protected submitTx: SubmitHandler = ({ + extrinsic, + signer, + account, + parseResponse, + preSubmitValidation, + eventType, + }) => { + const execute = async () => { + if (preSubmitValidation) { + try { + await preSubmitValidation(); + } catch (e) { + this.context.logger.error(`Tx pre-submit validation error`, e); + return Promise.reject(e); + } + } + + const tx = await this.context.sdk.tx.create({ + account, + signer: this.getSigner(signer), + }); + + const events = await tx.signAndSend({ extrinsic }).catch((e) => { + this.context.logger.error(`Error executing transaction: ${e.message}`); + + throw new GaspError( + 'Transaction error', + GaspError.error.TRANSACTION_ERROR, + e + ); + }); + + return this.handleResponse(events, eventType, parseResponse); + }; + + const paymentInfo = async () => { + const tx = await this.context.sdk.tx.create({ + account, + signer: this.getSigner(signer), + }); + + const feeInfo = await tx.paymentInfo({ extrinsic }); + + return feeInfo; + }; + + return { + execute, + paymentInfo, + }; + }; + + protected handleResponse: ResponseHandler = async ( + events, + eventType, + parseResponse + ) => { + const fee = Fee.parseFromEvent( + Event.find( + events, + this.context.api.events.transactionPayment.TransactionFeePaid + ) + ); + + if (!fee) { + this.context.logger.error('Unable to get FeeInfo'); + + throw new GaspError( + 'Unable to get FeeInfo', + GaspError.error.TRANSACTION_ERROR + ); + } + + const _error = Event.findAndParseData( + events, + this.context.api.events.system.ExtrinsicFailed + ); + + if (_error) { + const error = this.context.api.registry.findMetaError( + _error.dispatchError.asModule + ); + + const errData: TxError = { + type: error.name, + details: error.docs.join(' '), + }; + + throw new GaspError( + 'Transaction failed', + GaspError.error.TRANSACTION_ERROR, + errData + ); + } + + const data = Event.findAndParseData(events, eventType); + + if (!data) { + this.context.logger.error('Unable to get tx info'); + + throw new GaspError( + 'Unable to get tx info', + GaspError.error.TRANSACTION_ERROR + ); + } + + return { + fee, + ...parseResponse(data), + }; + }; +} diff --git a/packages/sdk/src/modules/core/Event.ts b/packages/sdk/src/modules/core/Event.ts new file mode 100644 index 00000000..830402f6 --- /dev/null +++ b/packages/sdk/src/modules/core/Event.ts @@ -0,0 +1,99 @@ +import { AugmentedEvent } from '@polkadot/api/types'; +import { FrameSystemEventRecord } from '@polkadot/types/lookup'; + +/** + * Extracts the named arguments type from an AugmentedEvent. + * If the event does not have a named argument type, resolves to never. + * + * @template E - The event type. + */ +export type EventNamedArgs = E extends AugmentedEvent< + 'promise', + any, + infer Named +> + ? unknown extends Named + ? never + : Named + : never; + +/** + * Extracts the tuple arguments type from an AugmentedEvent. + * + * @template E - The event type. + */ +export type EventTupleArgs = E extends AugmentedEvent< + 'promise', + infer Tuple, + any +> + ? Tuple + : never; + +export type EventType = AugmentedEvent<'promise', any, any>; + +/** + * Determines the parsed event data type. + * If the event has named arguments, those are used. + * Otherwise, the tuple arguments are used. + * + * @template E - The event type. + */ +export type ParsedEventData = EventNamedArgs extends never + ? EventTupleArgs + : EventNamedArgs; + +export class Event { + /** + * Searches for an event in a list of event records that matches the specified event type. + * + * @param events - An array of blockchain event records. + * @param eventType - The event type to search for. + * @returns The matching event record or null if not found. + */ + static find(events: FrameSystemEventRecord[], eventType: EventType) { + const event = events.find((e) => { + return eventType.is(e.event); + }); + + if (!event) { + return null; + } + + return event; + } + + /** + * Parses the data from a given event record. + * + * @param record - The event record to parse. + * + * @returns The parsed event data. + */ + static parseData( + record: FrameSystemEventRecord + ): ParsedEventData { + return record.event.data as ParsedEventData; + } + + /** + * Combines event searching and parsing. It first finds an event of the specified type + * in the provided event records, then parses its data. + * + * @param events - An array of blockchain event records. + * @param eventType - The event type to search for. + * + * @returns The parsed event data or null if the event is not found. + */ + static findAndParseData( + events: FrameSystemEventRecord[], + eventType: E + ): ParsedEventData | null { + const event = this.find(events, eventType); + if (!event) { + return null; + } + + return this.parseData(event); + } +} diff --git a/packages/sdk/src/modules/core/ExtrinsicTracker.ts b/packages/sdk/src/modules/core/ExtrinsicTracker.ts new file mode 100644 index 00000000..efd1cd9e --- /dev/null +++ b/packages/sdk/src/modules/core/ExtrinsicTracker.ts @@ -0,0 +1,176 @@ +import { ApiPromise } from '@polkadot/api'; +import { TxOptions } from './Tx'; +import { GaspError } from '../../error/GaspError'; +import { ExtrinsicStatus, BlockHash } from '@polkadot/types/interfaces'; +import { FrameSystemEventRecord } from '@polkadot/types/lookup'; +import { GenericExtrinsic } from '@polkadot/types'; +import { Logger } from './Logger'; + +export class ExtrinsicTracker { + private static DEFAULT_TRACKING_TIMEOUT_MS = 60_000; + private isSubscribed = false; + + constructor( + private api: ApiPromise, + private logger: Logger, + private tx: GenericExtrinsic, + private status: ExtrinsicStatus, + private options?: TxOptions + ) {} + + async track(): Promise { + try { + this.options?.statusCallback?.({ status: this.status }); + + if ( + (this.status.isInBlock || this.status.isFinalized) && + !this.isSubscribed + ) { + this.isSubscribed = true; + const events = await this.waitForEvents(this.status); + this.options?.extrinsicStatus?.(events); + return events; + } + return null; + } catch (e) { + throw ExtrinsicTracker.trackingError(e); + } + } + + private async waitForEvents( + status: ExtrinsicStatus + ): Promise { + const inclusionBlockHash = status.isInBlock + ? status.asInBlock.toString() + : status.asFinalized.toString(); + + const inclusionHeader = await this.api.rpc.chain + .getHeader(inclusionBlockHash) + .catch((e) => { + throw new GaspError( + 'Failed to get header', + GaspError.error.TRANSACTION_ERROR, + e + ); + }); + const inclusionBlockNumber = inclusionHeader.number.toBn(); + + const stopAt = inclusionBlockNumber.addn(10); + const currentBlockNr = inclusionBlockNumber.clone(); + + const eventsPromise = new Promise( + // eslint-disable-next-line no-async-promise-executor + async (resolve, reject) => { + const unsub = await this.api.rpc.chain.subscribeNewHeads( + async (header) => { + try { + const blockFromSub = header.number.toBn(); + + if (currentBlockNr.gt(stopAt)) { + this.logger.error( + `Tx not executed in blocks ${inclusionBlockNumber.toString()}...${stopAt}` + ); + + unsub(); + reject( + new GaspError( + `Tx not executed in blocks ${inclusionBlockNumber.toString()}...${stopAt}`, + GaspError.error.TRANSACTION_ERROR + ) + ); + return; + } + + if (blockFromSub.gte(currentBlockNr)) { + const blockHash = await this.api.rpc.chain + .getBlockHash(currentBlockNr) + .catch((e) => { + this.logger.error('Failed to get block hash', e); + throw new GaspError( + 'Failed to get block hash', + GaspError.error.TRANSACTION_ERROR, + e + ); + }); + + const block = await this.api.rpc.chain + .getBlock(blockHash) + .catch((e) => { + this.logger.error('Failed to get block', e); + throw new GaspError( + 'Failed to get block', + GaspError.error.TRANSACTION_ERROR, + [blockHash.toString(), e] + ); + }); + + const extrinsics = block.block.extrinsics; + + const index = extrinsics.findIndex( + (extrinsic) => + extrinsic.hash.toString() === this.tx.hash.toString() + ); + + if (index < 0) { + return; + } + + const events = this.findEventsAtBlock(blockHash, index); + + resolve(events); + } + currentBlockNr.iaddn(1); + } catch (e) { + unsub(); + reject(e); + } + } + ); + } + ); + + return Promise.race([this.timeoutPromise, eventsPromise]); + } + + private async findEventsAtBlock(hash: BlockHash, extrinsicIndex: number) { + const api = await this.api.at(hash); + + const _events = await api.query.system.events().catch((e) => { + this.logger.error(`Failed to fetch events at block hash ${hash}`, e); + throw new GaspError( + 'Failed to fetch events at block hash', + GaspError.error.TRANSACTION_ERROR, + [hash.toString(), e] + ); + }); + + const events = _events.filter( + (e) => + e.phase.isApplyExtrinsic && + e.phase.asApplyExtrinsic.toNumber() === extrinsicIndex + ); + + return events; + } + + private get timeoutPromise() { + return new Promise((_, reject) => + setTimeout(() => { + reject( + new GaspError( + `Tx tracking timed out after ${this.options?.timeoutMs}ms`, + GaspError.error.TRANSACTION_ERROR + ) + ); + }, this.options?.timeoutMs || ExtrinsicTracker.DEFAULT_TRACKING_TIMEOUT_MS) + ); + } + + private static trackingError(e: unknown) { + throw new GaspError( + 'Tx tracking error', + GaspError.error.TRANSACTION_ERROR, + e + ); + } +} diff --git a/packages/sdk/src/modules/core/Fee.ts b/packages/sdk/src/modules/core/Fee.ts new file mode 100644 index 00000000..13ee3db4 --- /dev/null +++ b/packages/sdk/src/modules/core/Fee.ts @@ -0,0 +1,30 @@ +import { FrameSystemEventRecord } from '@polkadot/types/lookup'; +import BN from 'bn.js'; + +export interface FeeInfo { + asset: string; + amount: BN; +} + +export interface FeeMetadata { + fee: FeeInfo; +} + +export class Fee { + static parseFromEvent(event: FrameSystemEventRecord | null): FeeInfo | null { + if (!event) { + return null; + } + + if (event.event.method !== 'TransactionFeePaid') { + return null; + } + + const [, asset, amount] = event.event.data; + + return { + asset: asset.toString(), + amount: new BN(amount.toString()), + }; + } +} diff --git a/packages/sdk/src/modules/core/Logger.ts b/packages/sdk/src/modules/core/Logger.ts new file mode 100644 index 00000000..958b94c8 --- /dev/null +++ b/packages/sdk/src/modules/core/Logger.ts @@ -0,0 +1,46 @@ +import { ILogObj, Logger as _Logger } from 'tslog'; + +export interface Logger { + debug: (...args: unknown[]) => void; + info: (...args: unknown[]) => void; + warn: (...args: unknown[]) => void; + error: (...args: unknown[]) => void; +} + +export class GaspLogger implements Logger { + private logger = new _Logger({ + name: 'GaspSDK', + type: 'hidden', + prettyLogTimeZone: 'UTC', + hideLogPositionForProduction: true, + stylePrettyLogs: true, + prettyLogStyles: { + dateIsoStr: 'blue', + filePathWithLine: 'yellow', + fileName: ['yellow'], + }, + }); + + debug(...args: unknown[]) { + this.logger.debug(...args); + } + + info(...args: unknown[]) { + this.logger.info(...args); + } + + warn(...args: unknown[]) { + this.logger.warn(...args); + } + + error(...args: unknown[]) { + this.logger.error(...args); + } +} + +export const emptyLogger: Logger = { + debug: () => null, + info: () => null, + warn: () => null, + error: () => null, +}; diff --git a/packages/sdk/src/modules/core/ReserveSource.ts b/packages/sdk/src/modules/core/ReserveSource.ts new file mode 100644 index 00000000..a5a9e3a1 --- /dev/null +++ b/packages/sdk/src/modules/core/ReserveSource.ts @@ -0,0 +1,55 @@ +export enum ReserveSource { + ActivateKind = 'ActivateKind', + ActivatedLiquidity = 'ActivatedLiquidity', + NativeRewardsLiquidity = 'NativeRewardsLiquidity', + AvailableBalance = 'AvailableBalance', + UnspentReserves = 'UnspentReserves', + ActivatedUnstakedReserves = 'ActivatedUnstakedReserves', + StakedUnactivatedReserves = 'StakedUnactivatedReserves', +} + +export type ActivateLiquidityFor3rdPartyRewardsReserveSource = + | ReserveSource.AvailableBalance + | ReserveSource.UnspentReserves + | ReserveSource.StakedUnactivatedReserves + | ReserveSource.NativeRewardsLiquidity + | ReserveSource.ActivatedLiquidity; + +export type ActivateLiquidityReserveSource = + | ReserveSource.AvailableBalance + | ReserveSource.UnspentReserves + | ReserveSource.StakedUnactivatedReserves; + +export type StakeReserveSource = + | ReserveSource.AvailableBalance + | ReserveSource.UnspentReserves + | ReserveSource.ActivatedUnstakedReserves; + +export type AvailableBalanceReserveSource = ReserveSource.AvailableBalance; + +export enum TxType { + Swap = 'swap', + AddLiquidity = 'addLiquidity', + RemoveLiquidity = 'removeLiquidity', + CreatePool = 'createPool', + Claim = 'claim', + ClaimAll = 'claimAll', + ClaimPoolRewards = 'claimAllPoolRewards', + Claim3rdParty = 'claim3rdParty', + ActivateLP = 'activateLP', + ActivateLPFor3rdPartyRewards = 'activateLPFor3rdPartyRewards', + DeactivateLPFor3rdPartyRewards = 'deactivateLPFor3rdPartyRewards', + DeactivateLP = 'deactivateLP', + Deposit = 'deposit', + Withdraw = 'withdraw', + Stake = 'stake', + StakeChangeLP = 'stakeChangeLP', + ConfirmStakeIncreaseLP = 'confirmStakeIncreaseLP', + ConfirmStakeDecreaseLP = 'confirmStakeDecreaseLP', + StakeChange = 'stakeChange', + ConfirmStakeIncrease = 'confirmStakeIncrease', + ConfirmStakeDecrease = 'confirmStakeDecrease', + ApproveContract = 'approveContract', + RollupDeposit = 'rollupDeposit', + RollupWithdrawal = 'rollupWithdrawal', +} diff --git a/packages/sdk/src/modules/core/Tx.ts b/packages/sdk/src/modules/core/Tx.ts new file mode 100644 index 00000000..c858f539 --- /dev/null +++ b/packages/sdk/src/modules/core/Tx.ts @@ -0,0 +1,116 @@ +import { ApiPromise } from '@polkadot/api'; +import { SubmittableExtrinsic } from '@polkadot/api/types'; +import { GenericExtrinsic } from '@polkadot/types'; +import { ExtrinsicSubscriptionData, Signer } from '../../types/common'; +import { FrameSystemEventRecord } from '@polkadot/types/lookup'; +import { GaspError } from '../../error/GaspError'; +import { ExtrinsicTracker } from './ExtrinsicTracker'; +import { Logger } from './Logger'; +import { FeeInfo } from './Fee'; +import BN from 'bn.js'; + +export interface TxOptions { + statusCallback?: (data: ExtrinsicSubscriptionData) => void; + extrinsicStatus?: (events: FrameSystemEventRecord[]) => void; + timeoutMs?: number; +} + +export interface TxError { + type: string; + details: string; +} + +export interface TxSignParams { + extrinsic: SubmittableExtrinsic<'promise'>; +} + +export class Tx { + constructor( + private api: ApiPromise, + private logger: Logger, + private signer: Signer, + private account: string, + private options?: TxOptions + ) {} + + async signAndSend(params: TxSignParams): Promise { + const signed = await this.sign(params); + this.logger.debug('Sending transaction', signed.hash.toHex()); + return this.send(signed); + } + + async sign({ extrinsic }: TxSignParams): Promise { + this.logger.debug('Signing transaction', extrinsic.hash.toHex()); + return this.signer.sign({ extrinsic }); + } + + async send(tx: GenericExtrinsic) { + return this.submitAndWatchExtrinsic(tx); + } + + async paymentInfo({ extrinsic }: TxSignParams): Promise { + const paymentInfo = await extrinsic.paymentInfo(this.account); + + const amount = new BN(paymentInfo.partialFee); + + return { + amount, + // TODO + asset: '0', + }; + } + + private async submitAndWatchExtrinsic( + tx: GenericExtrinsic + ): Promise { + this.logger.debug('Tracking transaction: ', tx.hash.toHex()); + + // eslint-disable-next-line no-async-promise-executor + return new Promise(async (resolve, reject) => { + try { + const unsub = await this.api.rpc.author.submitAndWatchExtrinsic( + tx, + async (status) => { + try { + this.logger.debug('Transaction status: ', status.toString()); + + const tracker = new ExtrinsicTracker( + this.api, + this.logger, + tx, + status, + this.options + ); + + const events = await tracker.track().catch((e) => { + this.logger.error('Error tracking transaction: ', e); + + throw new GaspError( + 'Failed to track transaction', + GaspError.error.TRANSACTION_ERROR, + e + ); + }); + + if (events) { + resolve(events); + unsub(); + } + } catch (e) { + unsub(); + reject(e); + } + } + ); + } catch (error) { + reject( + new GaspError( + 'Failed to submit and watch extrinsic', + GaspError.error.TRANSACTION_ERROR, + error + ) + ); + } + }); + } +} diff --git a/packages/sdk/src/modules/core/index.ts b/packages/sdk/src/modules/core/index.ts new file mode 100644 index 00000000..dafe1ba1 --- /dev/null +++ b/packages/sdk/src/modules/core/index.ts @@ -0,0 +1 @@ +export * from './Tx'; diff --git a/packages/sdk/src/modules/index.ts b/packages/sdk/src/modules/index.ts new file mode 100644 index 00000000..53f475e3 --- /dev/null +++ b/packages/sdk/src/modules/index.ts @@ -0,0 +1,5 @@ +export * from './account/types'; +export * from './pool/types'; +export * from './market/types'; +export * from './asset/types'; +export * from './core' diff --git a/packages/sdk/src/modules/market/Market.ts b/packages/sdk/src/modules/market/Market.ts new file mode 100644 index 00000000..bb2c298f --- /dev/null +++ b/packages/sdk/src/modules/market/Market.ts @@ -0,0 +1,74 @@ +import { Signer } from '../../types/common'; +import { BaseModule } from '../core/BaseModule'; +import { + CalculateBuyPriceParams, + calculateBuyPrice, +} from './calculateBuyPrice'; +import { SwapParams, SwapResult, swap } from './swap'; + +export class MarketModule extends BaseModule { + /** + * Swaps assets + * + * @param params - Configuration object containing swap details. + * @param params.account - The account address that will be credited for the swap. + * @param params.assetIn - The asset id to swap from. + * @param params.assetOut - The asset id to swap to. + * @param params.amountIn - The amount of the asset to swap. + * @param params.minAmountOut - Optional. The minimum amount of the asset to receive from the swap. + * + * @param params.route - Optional. The route to use for the swap. Defaults to the direct route. + * @param signer - Optional. The signer instance used to authorize the transaction. + * Defaults to the signer used when initializing the SDK + * + * @returns A promise that resolves with the result of the signed transaction submission. + * + * @example + * ```typescript + * const result = await swap( + * { + * account: '0x123', + * assetIn: '0', + * assetOut: '1', + * amountIn: '100', + * minAmountOut: '10', + * route: ['10', '20'], + * }, + * signer + * ); + * + * ``` + */ + async swap(params: SwapParams, signer?: Signer): Promise { + return swap( + this.context, + params, + this.getSigner(signer), + this.handleResponse + ); + } + + /** + * Calculates the buy price for a given asset. + * + * @param params - Configuration object + * @param params.inputReserve - The input reserve amount. + * @param params.outputReserve - The output reserve amount. + * @param params.amount - The input amount to swap. + * + * @returns A promise that resolves with the calculated buy price. + * + * @example + * ```typescript + * const result = await calculateBuyPrice({ + * inputReserve: '100', + * outputReserve: '200', + * amount: '50', + * }); + * console.log(result); + * ``` + */ + async calculateBuyPrice(params: CalculateBuyPriceParams) { + return calculateBuyPrice(this.context, params); + } +} diff --git a/packages/sdk/src/modules/market/calculateBuyPrice.ts b/packages/sdk/src/modules/market/calculateBuyPrice.ts new file mode 100644 index 00000000..452b9f69 --- /dev/null +++ b/packages/sdk/src/modules/market/calculateBuyPrice.ts @@ -0,0 +1,26 @@ +import { GaspError } from '../../error/GaspError'; +import { ModuleContext } from '../core/BaseModule'; +import BN from 'bn.js'; + +export interface CalculateBuyPriceParams { + inputReserve: BN | string; + outputReserve: BN | string; + amount: BN | string; +} + +export const calculateBuyPrice = async ( + { api }: ModuleContext, + { inputReserve, outputReserve, amount }: CalculateBuyPriceParams +): Promise => { + const price = await api.rpc.xyk + .calculate_buy_price(inputReserve, outputReserve, amount) + .catch((e) => { + throw new GaspError( + 'Unable to calculate buy price', + GaspError.error.API_RESPONSE_ERROR, + e + ); + }); + + return new BN(price); +}; diff --git a/packages/sdk/src/modules/market/index.ts b/packages/sdk/src/modules/market/index.ts new file mode 100644 index 00000000..a8a5b444 --- /dev/null +++ b/packages/sdk/src/modules/market/index.ts @@ -0,0 +1,2 @@ +export * from './types'; +export * from './Market'; diff --git a/packages/sdk/src/modules/market/swap.ts b/packages/sdk/src/modules/market/swap.ts new file mode 100644 index 00000000..a07bc403 --- /dev/null +++ b/packages/sdk/src/modules/market/swap.ts @@ -0,0 +1,84 @@ +import { FeeMetadata } from '../core/Fee'; +import { PoolType } from '../pool'; +import { AtomicSwap } from './types'; +import { ModuleContext, ResponseHandler } from '../core/BaseModule'; +import { Signer } from '../../types/common'; +import { GaspError } from '../../error/GaspError'; +import BN from 'bn.js'; + +export interface SwapParams { + account: string; + assetIn: string; + assetOut: string; + amountIn: BN | string; + minAmountOut?: BN | string; + route?: string[]; +} + +export interface SwapResult extends FeeMetadata { + swaps: AtomicSwap[]; +} + +export const swap = async ( + { api, sdk }: ModuleContext, + { + account, + assetIn, + assetOut, + amountIn, + minAmountOut = '0', + route: _route, + }: SwapParams, + signer: Signer, + responseHandler: ResponseHandler +): Promise => { + let route = _route; + + if (!route) { + const pool = await sdk.pool.getPoolByAssets({ + assets: [assetIn, assetOut], + }); + + if (!pool) { + throw new GaspError( + 'Unable to construct swap route for given assets', + GaspError.error.ARGS_ERROR, + [assetIn, assetOut] + ); + } + + route = [pool.id]; + } + + const tx = await sdk.tx.create({ account, signer }); + const extrinsic = api.tx.market.multiswapAsset( + route, + assetIn, + amountIn, + assetOut, + minAmountOut ?? '0' + ); + + const events = await tx.signAndSend({ extrinsic }).catch((e) => { + throw new GaspError( + 'Transaction error', + GaspError.error.TRANSACTION_ERROR, + e + ); + }); + + return responseHandler( + events, + api.events.market.AssetsSwapped, + (data) => ({ + swaps: data.swaps.map((swap) => ({ + poolId: swap.poolId.toString(), + kind: swap.kind.toString() as PoolType, + assetIn: swap.amountIn.toString(), + assetOut: swap.amountOut.toString(), + amountIn: new BN(swap.amountIn), + amountOut: new BN(swap.amountOut), + })), + }) + ); +}; diff --git a/packages/sdk/src/modules/market/types.ts b/packages/sdk/src/modules/market/types.ts new file mode 100644 index 00000000..4616a156 --- /dev/null +++ b/packages/sdk/src/modules/market/types.ts @@ -0,0 +1,11 @@ +import { PoolType } from "../pool"; +import BN from "bn.js"; + +export interface AtomicSwap { + poolId: string; + kind: PoolType; + assetIn: string; + assetOut: string; + amountIn: BN; + amountOut: BN; +} diff --git a/packages/sdk/src/modules/pool/Pool.ts b/packages/sdk/src/modules/pool/Pool.ts new file mode 100644 index 00000000..19fe0b17 --- /dev/null +++ b/packages/sdk/src/modules/pool/Pool.ts @@ -0,0 +1,270 @@ +import { + ActivateNativeRewardsLiquidityParams, + activateNativeRewardsLiquidity, +} from './activateLiquidity'; +import { Signer } from '../../types/common'; +import { BaseModule } from '../core/BaseModule'; +import { + DeactivateNativeRewardsLiquidityParams, + deactivateNativeRewardsLiquidity, +} from './deactivateLiquidity'; +import { GetPoolTvlParams, getTvl } from './getTvl'; +import { CreatePoolParams, createPool } from './createPool'; +import { getPools } from './getPools'; +import { GetPoolParams, getPool } from './getPool'; +import { AddLiquidityParams, addLiquidity } from './addLiquidity'; +import { RemoveLiquidityParams, removeLiquidity } from './removeLiquidity'; +import { GetPoolByAssetsParams, getPoolByAssets } from './getPoolByAssets'; +import { GetInvestedPoolsParams, getInvestedPools } from './getInvestedPools'; + +export class PoolModule extends BaseModule { + /** + * Activates liquidity for native rewards on a given asset and account. + * + * @param params - Configuration object containing activation details. + * @param params.asset - The LP asset id to activate rewards for. + * @param params.account - The account address that will be credited for the activation. + * @param params.amount - The amount of the LP assets activate. + * @param params.balanceFrom - Optional. The balance source to use for funding the activation. + * Defaults to `ReserveSource.AvailableBalance`. + * @param signer - Optional. The signer instance used to authorize the transaction. + * Defaults to the signer used when initializing the SDK + * + * @returns A promise that resolves with the result of the signed transaction submission. + * + * @example + * ```typescript + * const asset = '120'; + * const account = '0x123'; + * const amount = '100'; + * + * const result = await activateNativeRewardsLiquidity( + * { asset, account, amount }, + * signer + * ); + * ``` + */ + activateNativeRewardsLiquidity( + params: ActivateNativeRewardsLiquidityParams, + signer?: Signer + ) { + return activateNativeRewardsLiquidity( + this.context, + params, + this.getSigner(signer), + this.submitTx + ); + } + + /** + * Deactivates liquidity for native rewards on a given asset and account. + * + * @param params - Configuration object containing deactivation details. + * @param params.asset - The LP asset id to deactivate rewards for. + * @param params.account - The account address that will be debited for the deactivation. + * @param params.amount - The amount of the LP assets to deactivate. + * + * @param signer - Optional. The signer instance used to authorize the transaction. + * Defaults to the signer used when initializing the SDK + * + * @returns A promise that resolves with the result of the signed transaction submission. + * + * @example + * ```typescript + * const asset = '120'; + * const account = '0x123'; + * const amount = '100'; + * + * const result = await deactivateNativeRewardsLiquidity( + * { asset, account, amount }, + * signer + * ); + * + * ``` + * */ + deactivateNativeRewardsLiquidity( + params: DeactivateNativeRewardsLiquidityParams, + signer?: Signer + ) { + return deactivateNativeRewardsLiquidity( + this.context, + params, + this.getSigner(signer), + this.submitTx + ); + } + + /** + * Retrieves the TVL for the specified pool. + * + * @param params - The parameters for the TVL retrieval. + * @param params.pool - The pool for which to retrieve the TVL. + * + * @returns A promise that resolves with a PoolTvl object. + * + * @example + * ```typescript + * const tvl = await gasp.getTvl({ pool: '160' }).catch(console.error); + * console.log(tvl); + * ``` + * */ + async getTvl(params: GetPoolTvlParams) { + return getTvl(this.context, params); + } + + /** + * Creates a new pool if it does not already exist. + * @param params - The parameters for the pool creation. + * @param params.type - The type of pool to create. + * @param params.firstAssetId - The first asset id in the pool. + * @param params.firstAssetAmount - The amount of the first asset to add to the pool. + * @param params.secondAssetId - The second asset id in the pool. + * @param params.secondAssetAmount - The amount of the second asset to add to the pool. + * @param params.account - The account address that will be debited for the pool creation. + * @param signer - Optional. The signer instance used to authorize the transaction. + * Defaults to the signer used when initializing the SDK + * + * @returns A promise that resolves with the result of the signed transaction submission. + * + * @example + * ```typescript + * const result = await gasp.createPool( + * { + * type: PoolType.Xyk, + * firstAssetId: '120', + * firstAssetAmount: '100', + * secondAssetId: '110', + * secondAssetAmount: '100', + * account: '0x123', + * }, + * signer + * ); + * ``` + * */ + createPool(params: CreatePoolParams, signer?: Signer) { + return createPool( + this.context, + params, + this.getSigner(signer), + this.submitTx + ); + } + + /** + * Retrieves all pools. + * + * @returns A promise that resolves with an array of pool objects. + * */ + async getPools() { + return getPools(this.context); + } + + /** + * Retrieves all pools that the user has invested in. + * + * @param params - The parameters for the pool retrieval. + * @param params.account - The account address to retrieve pools for. + * + * @returns A promise that resolves with an array of invested pool objects. + * */ + async getInvestedPools(params: GetInvestedPoolsParams) { + return getInvestedPools(this.context, params); + } + + /** + * Retrieves a pool by its id. + * + * @param params - The parameters for the pool retrieval. + * @param params.pool - The pool id to retrieve. + * + * @returns A promise that resolves with a pool object. + * */ + async getPool(params: GetPoolParams) { + return getPool(this.context, params); + } + + /** + * Retrieves a pool by its assets. + * + * @param params - The parameters for the pool retrieval. + * @param params.assets - The assets to retrieve the pool for. + * + * @returns A promise that resolves with a pool object. + * */ + async getPoolByAssets(params: GetPoolByAssetsParams) { + return getPoolByAssets(this.context, params); + } + + /** + * Adds liquidity to a pool. + * + * @param params - The parameters for the liquidity addition. + * @param params.pool - The pool id to add liquidity to. + * @param params.amount - The amount of liquidity to add. + * @param params.maxOtherAssetAmount - The maximum amount of the other asset to add. + * @param params.account - The account address that will be debited for the liquidity addition. + * @param signer - Optional. The signer instance used to authorize the transaction. + * Defaults to the signer used when initializing the SDK + * + * @returns A promise that resolves with the result of the signed transaction submission. + * + * @example + * ```typescript + * const result = await gasp.addLiquidity( + * { + * pool: '160', + * amount: '100', + * maxOtherAssetAmount: '100', + * account: '0x123', + * }, + * signer + * ); + * ``` + * */ + addLiquidity(params: AddLiquidityParams, signer?: Signer) { + return addLiquidity( + this.context, + params, + this.getSigner(signer), + this.submitTx + ); + } + + /** + * Removes liquidity from a pool. + * + * @param params - The parameters for the liquidity removal. + * @param params.pool - The pool id to remove liquidity from. + * @param params.amount - The amount of liquidity to remove. + * @param params.minFirstAssetAmount - The minimum amount of the first asset to receive. + * @param params.minSecondAssetAmount - The minimum amount of the second asset to receive. + * @param params.account - The account address that will be debited for the liquidity removal. + * + * @param signer - Optional. The signer instance used to authorize the transaction. + * Defaults to the signer used when initializing the SDK + * + * @returns A promise that resolves with the result of the signed transaction submission. + * + * @example + * ```typescript + * const result = await gasp.removeLiquidity( + * { + * pool: '160', + * amount: '100', + * minFirstAssetAmount: '100', + * minSecondAssetAmount: '100', + * account: '0x123', + * }, + * signer + * ); + * ``` + * */ + removeLiquidity(params: RemoveLiquidityParams, signer?: Signer) { + return removeLiquidity( + this.context, + params, + this.getSigner(signer), + this.submitTx + ); + } +} diff --git a/packages/sdk/src/modules/pool/activateLiquidity.ts b/packages/sdk/src/modules/pool/activateLiquidity.ts new file mode 100644 index 00000000..4fb3e06f --- /dev/null +++ b/packages/sdk/src/modules/pool/activateLiquidity.ts @@ -0,0 +1,56 @@ +import { Signer } from '../../types/common'; +import { FeeMetadata } from '../core/Fee'; +import { + ModuleContext, + SubmitHandler, + SubmittableTx, +} from '../core/BaseModule'; +import { + ActivateLiquidityReserveSource, + ReserveSource, +} from '../core/ReserveSource'; +import BN from 'bn.js'; + +export interface ActivateNativeRewardsLiquidityParams { + asset: string; + account: string; + amount: BN | string; + balanceFrom?: ActivateLiquidityReserveSource; +} + +export interface ActivateNativeRewardsLiquidityResult extends FeeMetadata { + amount: BN; + asset: string; +} + +export const activateNativeRewardsLiquidity = ( + { api }: ModuleContext, + { + asset, + account, + amount, + balanceFrom = ReserveSource.AvailableBalance, + }: ActivateNativeRewardsLiquidityParams, + signer: Signer, + submitHandler: SubmitHandler +): SubmittableTx => { + const extrinsic = api.tx.proofOfStake.activateLiquidityForNativeRewards( + asset, + amount, + balanceFrom + ); + + return submitHandler< + ActivateNativeRewardsLiquidityResult, + typeof api.events.proofOfStake.LiquidityActivated + >({ + extrinsic, + signer, + account, + parseResponse: (data) => ({ + asset: data[1].toString(), + amount: new BN(data[2]), + }), + eventType: api.events.proofOfStake.LiquidityActivated, + }); +}; diff --git a/packages/sdk/src/modules/pool/addLiquidity.ts b/packages/sdk/src/modules/pool/addLiquidity.ts new file mode 100644 index 00000000..fa9f82f4 --- /dev/null +++ b/packages/sdk/src/modules/pool/addLiquidity.ts @@ -0,0 +1,53 @@ +import { Signer } from '../../types/common'; +import { FeeMetadata } from '../core/Fee'; +import { + ModuleContext, + SubmitHandler, + SubmittableTx, +} from '../core/BaseModule'; +import BN from 'bn.js'; + +export interface AddLiquidityParams { + pool: string; + asset: string; + amount: BN | string; + maxOtherAssetAmount: BN | string; + account: string; +} + +export interface AddLiquidityResult extends FeeMetadata { + pool: string; + firstAssetAmount: BN; + secondAssetAmount: BN; + lpMinted: BN; +} + +export const addLiquidity = ( + { api }: ModuleContext, + { pool, asset, amount, maxOtherAssetAmount, account }: AddLiquidityParams, + signer: Signer, + submitHandler: SubmitHandler +): SubmittableTx => { + const extrinsic = api.tx.market.mintLiquidity( + pool, + asset, + amount, + maxOtherAssetAmount + ); + + return submitHandler< + AddLiquidityResult, + typeof api.events.market.LiquidityMinted + >({ + extrinsic, + signer, + account, + parseResponse: (data) => ({ + pool: data.poolId.toString(), + firstAssetAmount: new BN(data.amountsProvided[0]), + secondAssetAmount: new BN(data.amountsProvided[1]), + lpMinted: new BN(data.lpTokenMinted), + }), + eventType: api.events.market.LiquidityMinted, + }); +}; diff --git a/packages/sdk/src/modules/pool/createPool.ts b/packages/sdk/src/modules/pool/createPool.ts new file mode 100644 index 00000000..becc7daa --- /dev/null +++ b/packages/sdk/src/modules/pool/createPool.ts @@ -0,0 +1,82 @@ +import { GaspError } from '../../error/GaspError'; +import { Signer } from '../../types/common'; +import { PoolType } from './types'; +import { FeeMetadata } from '../core/Fee'; +import { + ModuleContext, + SubmitHandler, + SubmittableTx, +} from '../core/BaseModule'; +import BN from 'bn.js'; + +export interface CreatePoolParams { + type: PoolType; + firstAssetId: string; + firstAssetAmount: BN | string; + secondAssetId: string; + secondAssetAmount: BN | string; + account: string; +} + +export interface CreatePoolResult extends FeeMetadata { + pool: string; + assets: string[]; + creator: string; +} + +export const createPool = ( + { api }: ModuleContext, + { + type, + firstAssetId, + firstAssetAmount, + secondAssetId, + secondAssetAmount, + account, + }: CreatePoolParams, + signer: Signer, + submitHandler: SubmitHandler +): SubmittableTx => { + const extrinsic = api.tx.market.createPool( + type, + firstAssetId, + firstAssetAmount, + secondAssetId, + secondAssetAmount + ); + + const preSubmitValidation = async () => { + const poolData = await Promise.all([ + api.query.xyk.liquidityAssets([firstAssetId, secondAssetId]), + api.query.xyk.liquidityAssets([secondAssetId, firstAssetId]), + ]).catch((e) => { + throw new GaspError( + 'Unable to fetch pool data', + GaspError.error.API_RESPONSE_ERROR, + e + ); + }); + + const poolExists = poolData.some((pool) => !pool.isNone); + + if (poolExists) { + throw new GaspError('Pool already exists', GaspError.error.ALREADY_EXISTS, [ + firstAssetId, + secondAssetId, + ]); + } + }; + + return submitHandler({ + eventType: api.events.market.PoolCreated, + extrinsic, + signer, + account, + preSubmitValidation, + parseResponse: (data) => ({ + pool: data.poolId.toString(), + assets: data.assets.map((asset) => asset.toString()), + creator: data.creator.toString(), + }), + }); +}; diff --git a/packages/sdk/src/modules/pool/deactivateLiquidity.ts b/packages/sdk/src/modules/pool/deactivateLiquidity.ts new file mode 100644 index 00000000..5be5a5b8 --- /dev/null +++ b/packages/sdk/src/modules/pool/deactivateLiquidity.ts @@ -0,0 +1,45 @@ +import { Signer } from '../../types/common'; +import { FeeMetadata } from '../core/Fee'; +import { + ModuleContext, + SubmitHandler, + SubmittableTx, +} from '../core/BaseModule'; +import BN from 'bn.js'; + +export interface DeactivateNativeRewardsLiquidityParams { + asset: string; + account: string; + amount: BN | string; +} + +export interface DeactivateNativeRewardsLiquidityResult extends FeeMetadata { + amount: BN; + asset: string; +} + +export const deactivateNativeRewardsLiquidity = ( + { api }: ModuleContext, + { asset, account, amount }: DeactivateNativeRewardsLiquidityParams, + signer: Signer, + submitHandler: SubmitHandler +): SubmittableTx => { + const extrinsic = api.tx.proofOfStake.deactivateLiquidityForNativeRewards( + asset, + amount + ); + + return submitHandler< + DeactivateNativeRewardsLiquidityResult, + typeof api.events.proofOfStake.LiquidityDeactivated + >({ + extrinsic, + signer, + account, + parseResponse: (data) => ({ + asset: data[1].toString(), + amount: new BN(data[2]), + }), + eventType: api.events.proofOfStake.LiquidityDeactivated, + }); +}; diff --git a/packages/sdk/src/modules/pool/getInvestedPools.ts b/packages/sdk/src/modules/pool/getInvestedPools.ts new file mode 100644 index 00000000..7999b0f6 --- /dev/null +++ b/packages/sdk/src/modules/pool/getInvestedPools.ts @@ -0,0 +1,78 @@ +import { GaspError } from '../../error/GaspError'; +import { InvestedPool } from './types'; +import { PalletProofOfStakeRewardInfo } from '@polkadot/types/lookup'; +import { ModuleContext } from '../core/BaseModule'; +import BN from 'bn.js'; + +export interface GetInvestedPoolsParams { + account: string; +} + +export const getInvestedPools = async ( + { api, sdk }: ModuleContext, + { account }: GetInvestedPoolsParams +): Promise => { + const [balances, rewardsInfo, reserveStatus] = await Promise.all([ + sdk.account.getBalances({ account }), + api.query.proofOfStake.rewardsInfo.entries(account), + api.query.multiPurposeLiquidity.reserveStatus.entries(account), + ]).catch((e) => { + throw new GaspError( + 'Error fetching invested pool metadata', + GaspError.error.API_RESPONSE_ERROR, + e + ); + }); + + const balancesMap = new Map( + balances.map(({ asset, balance }) => [asset, balance]) + ); + const reservesMap = new Map( + reserveStatus.map(([key, value]) => [key.args[1].toString(), value]) + ); + + const poolRewardsInfo = new Map( + rewardsInfo.map<[string, PalletProofOfStakeRewardInfo]>(([key, info]) => [ + key.args[1].toString(), + info, + ]) + ); + + const investedPoolIds = Array.from(poolRewardsInfo.keys()); + + const pools = await Promise.all( + investedPoolIds.map((pool) => sdk.pool.getPool({ pool })) + ).catch((e) => { + throw new GaspError( + 'Error fetching pools', + GaspError.error.API_RESPONSE_ERROR, + e + ); + }); + + return pools.map((pool) => { + const balance = balancesMap.get(pool.id)?.free; + const rewardsInfo = poolRewardsInfo.get(pool.id); + const reserveStatus = reservesMap.get(pool.id); + + if (!balance || !rewardsInfo || !reserveStatus) { + throw new GaspError( + 'Error fetching pool data', + GaspError.error.API_RESPONSE_ERROR, + [balance?.toString(), rewardsInfo?.toHuman(), reserveStatus?.toHuman()] + ); + } + + const activatedTokens = new BN(rewardsInfo.activatedAmount); + + const nonActivatedTokens = new BN(balance) + .add(reserveStatus.stakedUnactivatedReserves) + .add(reserveStatus.unspentReserves); + + return { + ...pool, + activatedTokens, + nonActivatedTokens, + }; + }); +}; diff --git a/packages/sdk/src/modules/pool/getPool.ts b/packages/sdk/src/modules/pool/getPool.ts new file mode 100644 index 00000000..c140a134 --- /dev/null +++ b/packages/sdk/src/modules/pool/getPool.ts @@ -0,0 +1,55 @@ +import { Pool } from './types'; +import { ModuleContext } from '../core/BaseModule'; +import { GaspError } from '../../error/GaspError'; +import BN from 'bn.js'; + +export interface GetPoolParams { + pool: string; +} + +export const getPool = async ( + { api }: ModuleContext, + { pool }: GetPoolParams +): Promise => { + const _pool = await api.query.xyk.liquidityPools(pool).catch((e) => { + throw new GaspError( + 'Error fetching pool', + GaspError.error.API_RESPONSE_ERROR, + e + ); + }); + const poolAssets = _pool.unwrapOr(null); + + if (poolAssets === null) { + throw new GaspError( + 'Unable to fetch pool assets info', + GaspError.error.PARSING_ERROR, + pool + ); + } + + const amounts = await api.query.xyk.pools(poolAssets); + + const promoted = await api.query.proofOfStake + .promotedPoolRewards() + .catch((e) => { + throw new GaspError( + 'Error fetching promoted pool rewards info', + GaspError.error.API_RESPONSE_ERROR, + e + ); + }); + + const promotedPoolIds = new Set( + Array.from(promoted.entries()).map(([key]) => key.toString()) + ); + + return { + id: pool, + isPromoted: promotedPoolIds.has(pool.toString()), + firstAsset: pool[0].toString(), + secondAsset: pool[1].toString(), + firstAssetAmount: new BN(amounts[0]), + secondAssetAmount: new BN(amounts[1]), + }; +}; diff --git a/packages/sdk/src/modules/pool/getPoolByAssets.ts b/packages/sdk/src/modules/pool/getPoolByAssets.ts new file mode 100644 index 00000000..6ca85f3d --- /dev/null +++ b/packages/sdk/src/modules/pool/getPoolByAssets.ts @@ -0,0 +1,39 @@ +import { GaspError } from '../../error/GaspError'; +import { Pool } from './types'; +import { ModuleContext } from '../core/BaseModule'; + +export interface GetPoolByAssetsParams { + assets: [string, string]; +} + +export const getPoolByAssets = async ( + { api, sdk }: ModuleContext, + { assets }: GetPoolByAssetsParams +): Promise => { + const result = await Promise.all([ + api.query.xyk.liquidityAssets(assets), + api.query.xyk.liquidityAssets(assets.slice().reverse()), + ]).catch((e) => { + throw new GaspError( + 'Unable to fetch pool data', + GaspError.error.API_RESPONSE_ERROR, + e + ); + }); + + const id = result.find((pool) => !pool.isEmpty); + + if (id === undefined) { + return null; + } + + const pool = await sdk.pool.getPool({ pool: id.toString() }).catch((e) => { + throw new GaspError( + 'Error fetching pool data', + GaspError.error.API_RESPONSE_ERROR, + e + ); + }); + + return pool; +}; diff --git a/packages/sdk/src/modules/pool/getPools.ts b/packages/sdk/src/modules/pool/getPools.ts new file mode 100644 index 00000000..d8dcdc55 --- /dev/null +++ b/packages/sdk/src/modules/pool/getPools.ts @@ -0,0 +1,75 @@ +import { GaspError } from '../../error/GaspError'; +import { Pool } from './types'; +import { ModuleContext } from '../core/BaseModule'; +import BN from 'bn.js'; + +export const getPools = async ({ api }: ModuleContext): Promise => { + const [poolIds, lpAssets, amounts, promoted] = await Promise.all([ + api.query.xyk.liquidityPools.entries(), + api.query.xyk.liquidityAssets.entries(), + api.query.xyk.pools.entries(), + api.query.proofOfStake.promotedPoolRewards(), + ]).catch((e) => { + throw new GaspError( + 'Error fetching pools', + GaspError.error.API_RESPONSE_ERROR, + e + ); + }); + + const lpAssetMap = new Map( + lpAssets.map(([key, value]) => [key.args[0].toHex(), value]) + ); + + const poolAmounts = new Map( + amounts.map(([key, value]) => { + const id = lpAssetMap.get(key.args[0].toHex())?.unwrapOr(null); + if (!id) { + throw new GaspError( + 'Error parsing pool amounts', + GaspError.error.PARSING_ERROR, + [key.toHuman(), value.toHuman()] + ); + } + + return [ + id.toString(), + new Map(value.map((v, i) => [key.args[0][i].toString(), v.toString()])), + ]; + }) + ); + + const promotedPoolIds = new Set( + Array.from(promoted.entries()).map(([key]) => key.toString()) + ); + + const pools = poolIds.map(([key, value]) => { + const poolId = key.args[0].toString(); + const tokens = value.unwrapOr(null); + if (!tokens) { + throw new GaspError( + 'Error parsing pools', + GaspError.error.PARSING_ERROR, + [key.toHuman(), value.toHuman()] + ); + } + + const firstAsset = tokens[0].toString(); + const secondAsset = tokens[1].toString(); + + const isPromoted = promotedPoolIds.has(poolId); + + return { + id: poolId, + isPromoted, + firstAsset, + firstAssetAmount: new BN(poolAmounts.get(poolId)?.get(firstAsset) ?? '0'), + secondAsset, + secondAssetAmount: new BN( + poolAmounts.get(poolId)?.get(secondAsset) ?? '0' + ), + }; + }); + + return pools; +}; diff --git a/packages/sdk/src/modules/pool/getTvl.ts b/packages/sdk/src/modules/pool/getTvl.ts new file mode 100644 index 00000000..4787e5db --- /dev/null +++ b/packages/sdk/src/modules/pool/getTvl.ts @@ -0,0 +1,44 @@ +import { GaspError } from '../../error/GaspError'; +import BN from 'bn.js'; +import { ModuleContext } from '../core/BaseModule'; + +export interface GetPoolTvlParams { + pool: string; +} + +export interface GetTvlResult { + pool: string; + tvl: Array<[string, BN]>; +} + +export const getTvl = async ( + { api }: ModuleContext, + { pool }: GetPoolTvlParams +): Promise => { + const poolAssetsResult = await api.query.xyk.liquidityPools(pool); + const poolAssets = poolAssetsResult.unwrapOr(null); + + if (poolAssets === null) { + throw new GaspError( + 'Unable to fetch pool assets', + GaspError.error.API_RESPONSE_ERROR + ); + } + + const tvl = await api.query.xyk.pools(poolAssets).catch((e) => { + throw new GaspError( + 'Unable to fetch pool tvl', + GaspError.error.API_RESPONSE_ERROR, + e + ); + }); + + const parsedTvl = poolAssets.map<[string, BN]>((asset, index) => { + return [asset.toString(), new BN(tvl[index])]; + }); + + return { + pool, + tvl: parsedTvl, + }; +}; diff --git a/packages/sdk/src/modules/pool/index.ts b/packages/sdk/src/modules/pool/index.ts new file mode 100644 index 00000000..27c3a7aa --- /dev/null +++ b/packages/sdk/src/modules/pool/index.ts @@ -0,0 +1,2 @@ +export * from './Pool'; +export * from './types'; diff --git a/packages/sdk/src/modules/pool/removeLiquidity.ts b/packages/sdk/src/modules/pool/removeLiquidity.ts new file mode 100644 index 00000000..e63ac321 --- /dev/null +++ b/packages/sdk/src/modules/pool/removeLiquidity.ts @@ -0,0 +1,59 @@ +import { FeeMetadata } from '../core/Fee'; +import { + ModuleContext, + SubmitHandler, + SubmittableTx, +} from '../core/BaseModule'; +import { Signer } from '../../types/common'; +import BN from 'bn.js'; + +export interface RemoveLiquidityParams { + pool: string; + amount: string; + minFirstAssetAmount: BN | string; + minSecondAssetAmount: BN | string; + account: string; +} + +export interface RemoveLiquidityResult extends FeeMetadata { + pool: string; + removedLpAmount: BN; + mintedFirstAssetAmount: BN; + mintedSecondAssetAmount: BN; +} + +export const removeLiquidity = ( + { api }: ModuleContext, + { + pool, + amount, + minFirstAssetAmount, + minSecondAssetAmount, + account, + }: RemoveLiquidityParams, + signer: Signer, + submitHandler: SubmitHandler +): SubmittableTx => { + const extrinsic = api.tx.market.burnLiquidity( + pool, + amount, + minFirstAssetAmount, + minSecondAssetAmount + ); + + return submitHandler< + RemoveLiquidityResult, + typeof api.events.market.LiquidityBurned + >({ + extrinsic, + signer, + account, + parseResponse: (data) => ({ + pool: data.poolId.toString(), + removedLpAmount: new BN(data.burnedAmount), + mintedFirstAssetAmount: new BN(data.amounts[0]), + mintedSecondAssetAmount: new BN(data.amounts[1]), + }), + eventType: api.events.market.LiquidityBurned, + }); +}; diff --git a/packages/sdk/src/modules/pool/types.ts b/packages/sdk/src/modules/pool/types.ts new file mode 100644 index 00000000..08064e3b --- /dev/null +++ b/packages/sdk/src/modules/pool/types.ts @@ -0,0 +1,25 @@ +import BN from 'bn.js'; + +export interface PoolTvl { + pool: string; + tvl: Array<[string, BN]>; +} + +export enum PoolType { + Xyk = 'Xyk', + StableSwap = 'StableSwap', +} + +export interface Pool { + firstAsset: string; + firstAssetAmount: BN; + secondAsset: string; + secondAssetAmount: BN; + id: string; + isPromoted: boolean; +} + +export interface InvestedPool extends Pool { + activatedTokens: BN; + nonActivatedTokens: BN; +} diff --git a/packages/sdk/src/modules/rewards/Rewards.ts b/packages/sdk/src/modules/rewards/Rewards.ts new file mode 100644 index 00000000..6878fddb --- /dev/null +++ b/packages/sdk/src/modules/rewards/Rewards.ts @@ -0,0 +1,74 @@ +import { Signer } from '../../types/common'; +import { BaseModule } from '../core/BaseModule'; +import { + ClaimAllNativeRewardsParams, + claimAllNativeRewards, +} from './claimAllNativeRewards'; +import { + ClaimNativeRewardsForPoolParams, + claimNativeRewardsForPool, +} from './claimNativeRewardsForPool'; + +export class RewardsModule extends BaseModule { + /** + * Claims native rewards for a specific pool + * + * @param params - Configuration object containing claim details. + * @param params.pool - The pool id to claim rewards for. + * @param params.account - The account address that will be credited for the claim. + * + * @param signer - Optional. The signer instance used to authorize the transaction. + * Defaults to the signer used when initializing the SDK + * @returns A promise that resolves with the amount of rewards claimed. + * + * @example + * ```typescript + * const pool = '120'; + * const account = '0x123'; + * + * const result = await claimNativeRewardsForPool( + * { pool, account }, + * signer + * ); + * ``` + */ + claimNativeRewardsForPool( + params: ClaimNativeRewardsForPoolParams, + signer?: Signer + ) { + return claimNativeRewardsForPool( + this.context, + params, + this.getSigner(signer), + this.submitTx + ); + } + + /** + * Claims all native rewards for the account + * + * @param params - Configuration object containing claim details. + * @param params.account - The account address that will be credited for the claim. + * + * @param signer - Optional. The signer instance used to authorize the transaction. + * Defaults to the signer used when initializing the SDK + * + * @returns A promise that resolves with the amount of rewards claimed. + * + * @example + * ```typescript + * const account = '0x123'; + * + * const result = await claimAllNativeRewards( + * { account }, + * signer + * ); + * ``` + */ + async claimAllNativeRewards( + params: ClaimAllNativeRewardsParams, + signer?: Signer + ) { + return claimAllNativeRewards(this.context, params, this.getSigner(signer)); + } +} diff --git a/packages/sdk/src/modules/rewards/claimAllNativeRewards.ts b/packages/sdk/src/modules/rewards/claimAllNativeRewards.ts new file mode 100644 index 00000000..d7c3d558 --- /dev/null +++ b/packages/sdk/src/modules/rewards/claimAllNativeRewards.ts @@ -0,0 +1,45 @@ +import { Signer } from '../../types/common'; +import { FeeMetadata } from '../core/Fee'; +import { ModuleContext } from '../core/BaseModule'; +import { GaspError } from '../../error/GaspError'; +import BN from 'bn.js'; + +export interface ClaimAllNativeRewardsParams { + account: string; +} + +export interface ClaimAllNativeRewardsResult extends FeeMetadata { + pool: string; + amount: BN; +} + +export const claimAllNativeRewards = async ( + { api, sdk }: ModuleContext, + { account }: ClaimAllNativeRewardsParams, + signer: Signer +): Promise => { + const rewardsInfo = await api.query.proofOfStake.rewardsInfo + .entries(account) + .catch((e) => { + throw new GaspError( + 'Unable to fetch rewards info', + GaspError.error.API_RESPONSE_ERROR, + e + ); + }); + + return Promise.all( + rewardsInfo.map(([[, id]]) => + sdk.rewards + .claimNativeRewardsForPool({ pool: id.toString(), account }, signer) + .execute() + ) + ).catch((e) => { + + throw new GaspError( + 'Transaction error', + GaspError.error.TRANSACTION_ERROR, + e + ); + }); +}; diff --git a/packages/sdk/src/modules/rewards/claimNativeRewardsForPool.ts b/packages/sdk/src/modules/rewards/claimNativeRewardsForPool.ts new file mode 100644 index 00000000..81e36704 --- /dev/null +++ b/packages/sdk/src/modules/rewards/claimNativeRewardsForPool.ts @@ -0,0 +1,41 @@ +import { Signer } from '../../types/common'; +import { FeeMetadata } from '../core/Fee'; +import { + ModuleContext, + SubmitHandler, + SubmittableTx, +} from '../core/BaseModule'; +import BN from 'bn.js'; + +export interface ClaimNativeRewardsForPoolParams { + pool: string; + account: string; +} + +export interface ClaimNativeRewardsForPoolResult extends FeeMetadata { + pool: string; + amount: BN; +} + +export const claimNativeRewardsForPool = ( + { api }: ModuleContext, + { pool, account }: ClaimNativeRewardsForPoolParams, + signer: Signer, + submitHandler: SubmitHandler +): SubmittableTx => { + const extrinsic = api.tx.proofOfStake.claimNativeRewards(pool); + + return submitHandler< + ClaimNativeRewardsForPoolResult, + typeof api.events.proofOfStake.RewardsClaimed + >({ + extrinsic, + signer, + account, + parseResponse: ([, id, amount]) => ({ + pool: id.toString(), + amount: new BN(amount), + }), + eventType: api.events.proofOfStake.RewardsClaimed, + }); +}; diff --git a/packages/sdk/src/modules/rolldown/Rolldown.ts b/packages/sdk/src/modules/rolldown/Rolldown.ts new file mode 100644 index 00000000..64681c0a --- /dev/null +++ b/packages/sdk/src/modules/rolldown/Rolldown.ts @@ -0,0 +1,42 @@ +import { Signer } from '../../types/common'; +import { BaseModule } from '../core/BaseModule'; +import { WithdrawParams, withdraw } from './withdraw'; + +export class RolldownModule extends BaseModule { + /** + * Withdraws an asset from GASP. + * + * @param params - Configuration object containing withdrawal details. + * @param params.asset - The asset to withdraw. + * @param params.account - The account address that will be credited for the withdrawal. + * @param params.recipient - The recipient address for the withdrawal. + * @param params.chain - The chain to withdraw from. + * @param params.amount - The amount to withdraw. + * @param params.ferryTip - The ferry tip for the withdrawal. + * + * @param signer - Optional. The signer instance used to authorize the transaction. + * Defaults to the signer used when initializing the SDK + * + * @returns A promise that resolves with the withdrawal result. + * + * @example + * ```typescript + * const result = await withdraw({ + * asset: '0x123', + * account: '0x456', + * recipient: '0x789', + * chain: 'Ethereum', + * amount: '1000', + * ferryTip: '10', + * }); + * ``` + */ + withdraw(params: WithdrawParams, signer?: Signer) { + return withdraw( + this.context, + params, + this.getSigner(signer), + this.submitTx + ); + } +} diff --git a/packages/sdk/src/modules/rolldown/withdraw.ts b/packages/sdk/src/modules/rolldown/withdraw.ts new file mode 100644 index 00000000..531c15ab --- /dev/null +++ b/packages/sdk/src/modules/rolldown/withdraw.ts @@ -0,0 +1,71 @@ +import { Signer } from '../../types/common'; +import { FeeMetadata } from '../core/Fee'; +import { + ModuleContext, + SubmitHandler, + SubmittableTx, +} from '../core/BaseModule'; +import BN from 'bn.js'; + +export type Chain = 'Arbitrum' | 'Ethereum' | 'Base' | 'Sonic'; + +export interface WithdrawParams { + asset: string; + account: string; + recipient?: string; + // TODO + chain: Chain; + amount: BN | string; + ferryTip?: BN | string; +} + +export interface WithdrawResult extends FeeMetadata { + chain: string; + requestId: string; + recipient: string; + tokenAddress: string; + amount: BN; + hash: string; + ferryTip: BN; +} + +export const withdraw = ( + { api }: ModuleContext, + { + asset, + account, + chain, + recipient = account, + amount, + ferryTip = '0', + }: WithdrawParams, + signer: Signer, + submitHandler: SubmitHandler +): SubmittableTx => { + const extrinsic = api.tx.rolldown.withdraw( + chain, + recipient, + asset, + amount, + ferryTip + ); + + return submitHandler< + WithdrawResult, + typeof api.events.rolldown.WithdrawalRequestCreated + >({ + extrinsic, + signer, + account, + parseResponse: (data) => ({ + chain: data.chain.toString(), + requestId: data.requestId.toString(), + recipient: data.recipient.toString(), + tokenAddress: data.tokenAddress.toString(), + amount: new BN(data.amount), + hash: data.hash_.toString(), + ferryTip: new BN(data.ferryTip), + }), + eventType: api.events.rolldown.WithdrawalRequestCreated, + }); +}; diff --git a/packages/sdk/src/modules/signer/BaseEIP712Signer.ts b/packages/sdk/src/modules/signer/BaseEIP712Signer.ts new file mode 100644 index 00000000..f317ab8e --- /dev/null +++ b/packages/sdk/src/modules/signer/BaseEIP712Signer.ts @@ -0,0 +1,133 @@ +import { GaspError } from '../../error/GaspError'; +import { Call } from '@polkadot/types/interfaces'; +import { GenericExtrinsic } from '@polkadot/types'; +import { ApiPromise } from '@polkadot/api'; +import { u8aToHex } from '@polkadot/util'; +import { IExtrinsicEra, SignatureOptions } from '@polkadot/types/types'; +import { SignerConfig } from '../../types/common'; +import { Logger } from '../core/Logger'; + +export class BaseEIP712Signer { + constructor( + protected readonly api: ApiPromise, + protected readonly logger: Logger, + protected readonly address: string, + protected readonly config?: SignerConfig, + ) {} + + protected async createSignature( + tx: GenericExtrinsic, + signFn: (data: any) => Promise + ) { + const eraOptions = await this.buildEraOptions(); + const payload = tx.inner.signature.createPayload( + tx.method as Call, + eraOptions + ); + + const raw = payload.toU8a({ method: true }); + + const result = await this.api.rpc.metamask + .get_eip712_sign_data(tx.toHex().slice(2)) + .catch((e) => { + throw new GaspError( + 'Failed to get EIP712 sign data', + GaspError.error.TRANSACTION_ERROR, + e + ); + }); + + const data = JSON.parse(result.toString()); + data.message.tx = u8aToHex(raw).slice(2); + data.account = this.address; + + const signature = await signFn(data).catch((e) => { + this.logger.debug('Error signing data', e); + throw new GaspError( + 'Failed to sign data', + GaspError.error.TRANSACTION_ERROR, + e + ); + }); + + return { + signature, + payload, + }; + } + + private async buildEraOptions() { + const { header, mortalLength, nonce } = await this.signingInfo; + + if (this.signOptions?.era && !this.signOptions.blockHash) { + throw new GaspError( + 'Era option requires blockHash', + GaspError.error.TRANSACTION_ERROR + ); + } + + if (!header) { + const { era, blockHash, ...config } = this.signOptions; + + if (era) { + return this.buildSignOptions({ nonce, ...config }); + } + + return this.buildSignOptions({ nonce, blockHash, ...config }); + } + + return this.buildSignOptions({ + blockHash: header.hash, + era: this.api.registry.createTypeUnsafe('ExtrinsicEra', [ + { + current: header.number, + period: this.signOptions?.era || mortalLength, + }, + ]) as IExtrinsicEra, + nonce, + ...this.signOptions, + }); + } + + private buildSignOptions( + options: Omit, 'nonce'> & { + nonce: SignatureOptions['nonce']; + } + ): SignatureOptions { + const config = { + blockHash: this.api.genesisHash, + genesisHash: this.api.genesisHash, + runtimeVersion: this.api.runtimeVersion, + signedExtensions: this.api.registry.signedExtensions, + ...options, + }; + + return config; + } + + private get signingInfo() { + return this.api.derive.tx.signingInfo(this.address).catch((e) => { + throw new GaspError('Failed to get signing info', e); + }); + } + + private get signOptions(): Partial { + if (!this.config) { + return {}; + } + + const { era, ...config } = this.config; + + return era + ? { + ...config, + era: this.api.registry.createTypeUnsafe('ExtrinsicEra', [ + { + current: this.api.genesisHash, + period: this.config.era, + }, + ]) as IExtrinsicEra, + } + : config; + } +} diff --git a/packages/sdk/src/modules/signer/EthersSigner.ts b/packages/sdk/src/modules/signer/EthersSigner.ts new file mode 100644 index 00000000..186b21ff --- /dev/null +++ b/packages/sdk/src/modules/signer/EthersSigner.ts @@ -0,0 +1,63 @@ +import { SignerConfig, Signer } from '../../types/common'; +import { Wallet } from 'ethers'; +import { ApiPromise } from '@polkadot/api'; +import { hexToU8a } from '@polkadot/util'; +import { BaseEIP712Signer } from './BaseEIP712Signer'; +import { Logger } from '../core/Logger'; +import { TxSignParams } from '../core/Tx'; + +export class EthersSigner extends BaseEIP712Signer implements Signer { + private wallet: Wallet; + + constructor( + api: ApiPromise, + logger: Logger, + pk: string, + readonly config?: SignerConfig + ) { + const wallet = new Wallet(pk); + + super(api, logger, wallet.address, config); + + this.wallet = wallet; + } + + async sign({ extrinsic }: TxSignParams) { + this.logger.debug('Signing transaction', extrinsic.hash.toHex()); + + const tx = this.api.createType('Extrinsic', { + method: extrinsic.method, + version: extrinsic.version, + }); + + const { signature, payload } = await this.createSignature( + tx, + this.signTypedData + ); + + const createdSignature = this.api.createType( + 'EthereumSignature', + hexToU8a(signature) + ); + + tx.addSignature(this.wallet.address, createdSignature, payload.toHex()); + + return tx; + } + + private async signTypedData(data: any): Promise { + const { domain, types, message } = data; + + const typesForEthers = { ...types }; + if (typesForEthers.EIP712Domain) { + delete typesForEthers.EIP712Domain; + } + + const signature = await this.wallet.signTypedData( + domain, + typesForEthers, + message + ); + return signature; + } +} diff --git a/packages/sdk/src/modules/signer/KeyringSigner.ts b/packages/sdk/src/modules/signer/KeyringSigner.ts new file mode 100644 index 00000000..865d2b74 --- /dev/null +++ b/packages/sdk/src/modules/signer/KeyringSigner.ts @@ -0,0 +1,19 @@ +import { Signer } from '../../types/common'; +import type { KeyringPair } from '@polkadot/keyring/types'; +import { TxSignParams } from '../core/Tx'; +import { SignerOptions } from '@polkadot/api/types'; + +export class KeyringSigner implements Signer { + private constructor( + private keypair: KeyringPair, + public readonly config?: SignerOptions + ) {} + + async sign({ extrinsic }: TxSignParams) { + return extrinsic.signAsync(this.keypair); + } + + static create(keypair: KeyringPair, config?: SignerOptions): KeyringSigner { + return new KeyringSigner(keypair, config); + } +} diff --git a/packages/sdk/src/modules/signer/Signer.ts b/packages/sdk/src/modules/signer/Signer.ts new file mode 100644 index 00000000..844a4729 --- /dev/null +++ b/packages/sdk/src/modules/signer/Signer.ts @@ -0,0 +1,19 @@ +import { KeyringSigner } from './KeyringSigner'; +import { BaseModule } from '../core/BaseModule'; +import { EthersSigner } from './EthersSigner'; +import { createSigner } from './createSigner'; +import { WagmiSigner } from './WagmiSigner'; + +export class SignerModule extends BaseModule { + readonly keyring = KeyringSigner; + readonly wagmi = createSigner( + WagmiSigner, + this.context.api, + this.context.logger + ); + readonly ethers = createSigner( + EthersSigner, + this.context.api, + this.context.logger + ); +} diff --git a/packages/sdk/src/modules/signer/WagmiSigner.ts b/packages/sdk/src/modules/signer/WagmiSigner.ts new file mode 100644 index 00000000..26716fbc --- /dev/null +++ b/packages/sdk/src/modules/signer/WagmiSigner.ts @@ -0,0 +1,47 @@ +import { SignerConfig, Signer } from '../../types/common'; +import { ApiPromise } from '@polkadot/api'; +import { hexToU8a } from '@polkadot/util'; +import { BaseEIP712Signer } from './BaseEIP712Signer'; +import { Logger } from '../core/Logger'; +import { TxSignParams } from '../core/Tx'; +import { Config, signTypedData as _signTypedData } from '@wagmi/core'; + +export class WagmiSigner extends BaseEIP712Signer implements Signer { + constructor( + api: ApiPromise, + logger: Logger, + private readonly wagmiConfig: Config, + address: string, + config?: SignerConfig + ) { + super(api, logger, address, config); + } + + async sign({ extrinsic }: TxSignParams) { + this.logger.debug('Signing transaction', extrinsic.hash.toHex()); + + const tx = this.api.createType('Extrinsic', { + method: extrinsic.method, + version: extrinsic.version, + }); + + const { signature, payload } = await this.createSignature( + tx, + this.signTypedData.bind(this) + ); + + const createdSignature = this.api.createType( + 'EthereumSignature', + hexToU8a(signature) + ); + + tx.addSignature(this.address, createdSignature, payload.toHex()); + + return tx; + } + + private async signTypedData(data: any): Promise { + const signature = await _signTypedData(this.wagmiConfig, data); + return signature; + } +} diff --git a/packages/sdk/src/modules/signer/createSigner.ts b/packages/sdk/src/modules/signer/createSigner.ts new file mode 100644 index 00000000..88084e4d --- /dev/null +++ b/packages/sdk/src/modules/signer/createSigner.ts @@ -0,0 +1,19 @@ +import { ApiPromise } from '@polkadot/api'; +import { Signer } from '../../types/common'; +import { Logger } from '../core/Logger'; + +type SignerConstructor = new ( + api: ApiPromise, + logger: Logger, + ...args: A +) => T; + +export function createSigner( + SignerClass: SignerConstructor, + api: ApiPromise, + logger: Logger +): { create: (...params: A) => T } { + return { + create: (...params: A): T => new SignerClass(api, logger, ...params), + }; +} diff --git a/packages/sdk/src/modules/tx/Tx.ts b/packages/sdk/src/modules/tx/Tx.ts new file mode 100644 index 00000000..58f5dcde --- /dev/null +++ b/packages/sdk/src/modules/tx/Tx.ts @@ -0,0 +1,116 @@ +import { ApiPromise } from '@polkadot/api'; +import { SubmittableExtrinsic } from '@polkadot/api/types'; +import { GenericExtrinsic } from '@polkadot/types'; +import { ExtrinsicSubscriptionData, Signer } from '../../types/common'; +import { FrameSystemEventRecord } from '@polkadot/types/lookup'; +import { GaspError } from '../../error/GaspError'; +import { ExtrinsicTracker } from '../core/ExtrinsicTracker'; +import { Logger } from '../core/Logger'; +import { FeeInfo } from '../core/Fee'; +import BN from 'bn.js'; + +export interface TxOptions { + statusCallback?: (data: ExtrinsicSubscriptionData) => void; + extrinsicStatus?: (events: FrameSystemEventRecord[]) => void; + timeoutMs?: number; +} + +export interface TxError { + type: string; + details: string; +} + +export interface TxSignParams { + extrinsic: SubmittableExtrinsic<'promise'>; +} + +export class Tx { + constructor( + private api: ApiPromise, + private logger: Logger, + private signer: Signer, + private account: string, + private options?: TxOptions + ) {} + + async signAndSend(params: TxSignParams): Promise { + const signed = await this.sign(params); + this.logger.debug('Sending transaction', signed.hash.toHex()); + return this.send(signed); + } + + async sign({ extrinsic }: TxSignParams): Promise { + this.logger.debug('Signing transaction', extrinsic.hash.toHex()); + return this.signer.sign({ extrinsic }); + } + + async send(tx: GenericExtrinsic) { + return this.submitAndWatchExtrinsic(tx); + } + + async paymentInfo({ extrinsic }: TxSignParams): Promise { + const paymentInfo = await extrinsic.paymentInfo(this.account); + + const amount = new BN(paymentInfo.partialFee); + + return { + amount, + // TODO + asset: '0', + }; + } + + private async submitAndWatchExtrinsic( + tx: GenericExtrinsic + ): Promise { + this.logger.debug('Tracking transaction: ', tx.hash.toHex()); + + // eslint-disable-next-line no-async-promise-executor + return new Promise(async (resolve, reject) => { + try { + const unsub = await this.api.rpc.author.submitAndWatchExtrinsic( + tx, + async (status) => { + try { + this.logger.debug('Transaction status: ', status.toString()); + + const tracker = new ExtrinsicTracker( + this.api, + this.logger, + tx, + status, + this.options + ); + + const events = await tracker.track().catch((e) => { + this.logger.error('Error tracking transaction: ', e); + + throw new GaspError( + 'Failed to track transaction', + GaspError.error.TRANSACTION_ERROR, + e + ); + }); + + if (events) { + resolve(events); + unsub(); + } + } catch (e) { + unsub(); + reject(e); + } + } + ); + } catch (error) { + reject( + new GaspError( + 'Failed to submit and watch extrinsic', + GaspError.error.TRANSACTION_ERROR, + error + ) + ); + } + }); + } +} diff --git a/packages/sdk/src/modules/tx/TxModule.ts b/packages/sdk/src/modules/tx/TxModule.ts new file mode 100644 index 00000000..17af4294 --- /dev/null +++ b/packages/sdk/src/modules/tx/TxModule.ts @@ -0,0 +1,21 @@ +import { Signer } from '../../types/common'; +import { BaseModule } from '../core/BaseModule'; +import { Tx, TxOptions } from './Tx'; + +interface CreateTxModuleParams { + account: string; + signer: Signer; + options?: TxOptions; +} + +export class TxModule extends BaseModule { + async create({ account, signer, options }: CreateTxModuleParams) { + return new Tx( + this.context.api, + this.context.logger, + this.getSigner(signer), + account, + options + ); + } +} diff --git a/packages/sdk/src/tests/activate-liquidity.test.ts b/packages/sdk/src/tests/activate-liquidity.test.ts deleted file mode 100644 index 9ed71536..00000000 --- a/packages/sdk/src/tests/activate-liquidity.test.ts +++ /dev/null @@ -1,95 +0,0 @@ -import { BN } from "@polkadot/util"; -import { Keyring } from "@polkadot/api"; -import { KeyringPair } from "@polkadot/keyring/types"; - -import { - instance, - createMangataToken, - createToken, - createUser, - getExtrinsicData -} from "./init"; -import { Batch } from "../types/utility"; -import { CreatePool, Liquidity } from "../types/xyk"; -import { signTx } from "../utils/signTx"; - -let testUser: KeyringPair; -let sudoUser: KeyringPair; -let firstTokenId: string | undefined; -let secondTokenId: string | undefined; - -beforeEach(async () => { - const keyring = new Keyring({ type: "sr25519" }); - testUser = createUser(keyring); - sudoUser = createUser(keyring, "//Alice"); - - const nonce = await instance.query.getNonce(sudoUser.address); - - const argsBatchAll: Batch = { - account: sudoUser, - calls: [ - await createToken( - instance, - testUser.address, - new BN("1000000000000000000000000") - ), - await createToken( - instance, - testUser.address, - new BN("1000000000000000000000000") - ), - await createMangataToken( - instance, - testUser.address, - new BN("10000000000000000000000000") - ) - ], - txOptions: { nonce } - }; - - const data = await instance.batchAll(argsBatchAll); - const searchTerms = ["tokens", "Created", testUser.address]; - const extrinsicData = getExtrinsicData({ data, searchTerms }); - firstTokenId = extrinsicData[0].eventData[0].data.toString(); - secondTokenId = extrinsicData[1].eventData[0].data.toString(); -}); - -it("should create pool", async () => { - const args: CreatePool = { - account: testUser, - firstTokenId: firstTokenId!, - secondTokenId: secondTokenId!, - firstTokenAmount: new BN("10000000000000000000000"), - secondTokenAmount: new BN("10000000000000000000000"), - txOptions: { - extrinsicStatus: (data) => { - const searchTerms = ["xyk", "PoolCreated", testUser.address]; - const extrinsicData = getExtrinsicData({ data, searchTerms }); - return expect(extrinsicData[0].method).toEqual("PoolCreated"); - } - } - }; - await instance.xyk.createPool(args); - - await instance.rpc.waitForNewBlock(2); - - const liqtoken = await instance.query.getLiquidityTokenId( - firstTokenId!, - secondTokenId! - ); - const api = await instance.api(); - await signTx( - api, - api.tx.sudo.sudo(api.tx.proofOfStake.updatePoolPromotion(liqtoken, 100)), - sudoUser - ); - - await instance.rpc.waitForNewBlock(2); - - const argsLiq: Liquidity = { - account: testUser, - liquidityTokenId: liqtoken.toString(), - amount: new BN(100) - }; - await instance.xyk.activateLiquidity(argsLiq, "AvailableBalance"); -}); diff --git a/packages/sdk/src/tests/burn-liquidity.test.ts b/packages/sdk/src/tests/burn-liquidity.test.ts deleted file mode 100644 index 60423eba..00000000 --- a/packages/sdk/src/tests/burn-liquidity.test.ts +++ /dev/null @@ -1,105 +0,0 @@ -import { BN } from "@polkadot/util"; -import { Keyring } from "@polkadot/api"; -import { KeyringPair } from "@polkadot/keyring/types"; - -import { - instance, - createMangataToken, - createToken, - createUser, - getExtrinsicData -} from "./init"; -import { Batch } from "../types/utility"; -import { BurnLiquidity, CreatePool } from "../types/xyk"; - -let testUser: KeyringPair; -let sudoUser: KeyringPair; -let firstTokenId: string | undefined; -let secondTokenId: string | undefined; - -beforeEach(async () => { - const keyring = new Keyring({ type: "sr25519" }); - testUser = createUser(keyring); - sudoUser = createUser(keyring, "//Alice"); - - const nonce = await instance.query.getNonce(sudoUser.address); - - const argsBatchAll: Batch = { - account: sudoUser, - calls: [ - await createToken( - instance, - testUser.address, - new BN("1000000000000000000000000") - ), - await createToken( - instance, - testUser.address, - new BN("1000000000000000000000000") - ), - await createMangataToken( - instance, - testUser.address, - new BN("10000000000000000000000000") - ) - ], - txOptions: { nonce } - }; - - const data = await instance.batchAll(argsBatchAll); - const searchTerms = ["tokens", "Created", testUser.address]; - const extrinsicData = getExtrinsicData({ data, searchTerms }); - firstTokenId = extrinsicData[0].eventData[0].data.toString(); - secondTokenId = extrinsicData[1].eventData[0].data.toString(); -}); - -it("should burn liquidity", async () => { - - const argsPool: CreatePool = { - account: testUser, - firstTokenId: firstTokenId!, - secondTokenId: secondTokenId!, - firstTokenAmount: new BN(50000), - secondTokenAmount: new BN(25000), - txOptions: { - extrinsicStatus: (data) => { - const searchTerms = ["xyk", "PoolCreated", testUser.address]; - const extrinsicData = getExtrinsicData({ data, searchTerms }); - return expect(extrinsicData[0].method).toEqual("PoolCreated"); - } - } - }; - await instance.xyk.createPool(argsPool); - - const liquidityTokenId = await instance.query.getLiquidityTokenId( - firstTokenId!, - secondTokenId! - ); - - const investedPools = await instance.query.getInvestedPools(testUser.address); - - const investedPool = investedPools.find( - (investedPool) => investedPool.liquidityTokenId === liquidityTokenId - ); - - await instance.rpc.waitForNewBlock(2); - - const amountToBurn = - investedPool && - investedPool.nonActivatedLPTokens.add(investedPool.activatedLPTokens); - - const argsBurnLiquidity: BurnLiquidity = { - account: testUser, - firstTokenId: firstTokenId!, - secondTokenId: secondTokenId!, - amount: amountToBurn! - }; - - await instance.xyk.burnLiquidity(argsBurnLiquidity); - - await instance.rpc.waitForNewBlock(2); - - const currentPool = await instance.query.getPool(liquidityTokenId) - expect(currentPool.firstTokenAmount.toString()).toEqual("0") - expect(currentPool.secondTokenAmount.toString()).toEqual("0") -}); diff --git a/packages/sdk/src/tests/claim-rewards-all.test.ts b/packages/sdk/src/tests/claim-rewards-all.test.ts deleted file mode 100644 index 45d0890d..00000000 --- a/packages/sdk/src/tests/claim-rewards-all.test.ts +++ /dev/null @@ -1,172 +0,0 @@ -import { BN } from "@polkadot/util"; -import { Keyring } from "@polkadot/api"; -import { KeyringPair } from "@polkadot/keyring/types"; -import { it, expect, beforeEach } from "vitest"; - -import { - instance, - createMangataToken, - createToken, - createUser, - getExtrinsicData -} from "./init"; -import { Batch } from "../types/utility"; -import { signTx } from "../utils/signTx"; -import { Liquidity } from "../types/xyk"; - -let testUser1: KeyringPair; -let testUser2: KeyringPair; -let sudoUser: KeyringPair; -let tokens: string[] | undefined; - -beforeEach(async () => { - const api = await instance.api(); - const keyring = new Keyring({ type: "sr25519" }); - testUser1 = createUser(keyring); - testUser2 = createUser(keyring); - sudoUser = createUser(keyring, "//Alice"); - - let nonce = await instance.query.getNonce(sudoUser.address); - - /// create tokens for liquidity minting - // eslint-disable-next-line @typescript-eslint/no-unused-vars - const calls = await Promise.all([...Array(21).keys()].map((_) => createToken( - instance, - testUser1.address, - new BN("1000000000000000000000000") - ))); - calls.push( - await createMangataToken( - instance, - testUser1.address, - new BN("10000000000000000000000000") - ) - ) - calls.push( - await createMangataToken( - instance, - testUser2.address, - new BN("10000000000000000000000000") - ) - ) - calls.push(api.tx.sudo.sudo(api.tx.issuance.finalizeTge())); - calls.push(api.tx.sudo.sudo(api.tx.issuance.initIssuanceConfig())); - - const argsBatchAll: Batch = { - account: sudoUser, - calls, - txOptions: { nonce } - }; - - const data = await instance.batchAll(argsBatchAll); - const searchTerms = ["tokens", "Created", testUser1.address]; - const extrinsicData = getExtrinsicData({ data, searchTerms }); - tokens = extrinsicData.map(data => { - return data.eventData[0].data.toString(); - }) - - /// protmote tokens - await signTx( - api, - api.tx.sudo.sudo(api.tx.utility.batch( - await Promise.all(tokens!.map( - (tokenId) => api.tx.proofOfStake.updatePoolPromotion(tokenId, 100) - )))), - sudoUser - ); - - /// transfer tokens to testUser2 - nonce = await instance.query.getNonce(sudoUser.address); - await instance.batchAll({ - account: testUser1, - calls: tokens.map((token) => api.tx.tokens.transfer(testUser2.address, token, new BN("100000000000000000000000")) - ), - }); -}); - -it.skip("should claim rewards from multiple pools", async () => { - const api = await instance.api(); - const activatedTokens = tokens!.slice(0,10); - - await Promise.all( - activatedTokens.map((tokenId) => { - const argsLiq: Liquidity = { - account: testUser1, - liquidityTokenId: tokenId.toString(), - amount: new BN(100) - }; - return instance.xyk.activateLiquidity(argsLiq, "AvailableBalance"); - })) - - /* eslint-disable no-async-promise-executor */ - // eslint-disable-next-line @typescript-eslint/no-unused-vars - const wait_for_rewards = new Promise(async (resolve, _) => { - const unsub_new_heads = await api.derive.chain.subscribeNewHeads(async (header) => { - const rewards = await Promise.all(activatedTokens.map((token)=> instance.rpc.calculateRewardsAmount( - { - address: testUser1.address, - liquidityTokenId: token - }))); - - if (rewards.every(elem => elem.gtn(0))){ - unsub_new_heads(); - resolve(); - }else{ - console.log(`#${header.number} no rewards available yet`); - } - }) - }); - await wait_for_rewards; - - const results = await instance.xyk.claimRewardsAll({account: testUser1}); - const searchTerms = ["proofOfStake", "RewardsClaimed", testUser1.address]; - const filteredEvents = getExtrinsicData({ data: results, searchTerms }); - filteredEvents.forEach((ev)=> expect(ev.method).eq("RewardsClaimed")) - -}); - -it.skip("should throw error when claiming rewards for too many tokens", async () => { - - const api = await instance.api(); - - - const promotionCalls = await Promise.all([...tokens!].map((tokenId) => - api.tx.proofOfStake.updatePoolPromotion(tokenId, 100) - )) - await signTx( - api, - api.tx.sudo.sudo(api.tx.utility.batch(promotionCalls)), - sudoUser - ); - - await Promise.all( - tokens!.map((tokenId) => { - const argsLiq: Liquidity = { - account: testUser2, - liquidityTokenId: tokenId.toString(), - amount: new BN(100) - }; - return instance.xyk.activateLiquidity(argsLiq, "AvailableBalance"); - })) - // eslint-disable-next-line @typescript-eslint/no-unused-vars - const wait_for_rewards = new Promise(async (resolve, _) => { - const unsub_new_heads = await api.derive.chain.subscribeNewHeads(async (header) => { - const rewards = await Promise.all(tokens!.map((token)=> instance.rpc.calculateRewardsAmount( - { - address: testUser2.address, - liquidityTokenId: token - }))); - - if (rewards.every(elem => elem.gtn(0))){ - unsub_new_heads(); - resolve(); - }else{ - console.log(`#${header.number} no rewards available yet`); - } - }) - }); - await wait_for_rewards; - - expect(instance.xyk.claimRewardsAll({account: testUser2})).rejects.toThrow("consider claiming rewards separately") - -}); diff --git a/packages/sdk/src/tests/create-pool.test.ts b/packages/sdk/src/tests/create-pool.test.ts deleted file mode 100644 index 020ce345..00000000 --- a/packages/sdk/src/tests/create-pool.test.ts +++ /dev/null @@ -1,72 +0,0 @@ -import { BN } from "@polkadot/util"; -import { Keyring } from "@polkadot/api"; -import { KeyringPair } from "@polkadot/keyring/types"; - -import type { CreatePool } from "../types/xyk"; -import type { Batch } from "../types/utility"; -import { - instance, - createMangataToken, - createToken, - createUser, - getExtrinsicData -} from "./init"; - -let testUser: KeyringPair; -let sudoUser: KeyringPair; -let firstTokenId: string | undefined; -let secondTokenId: string | undefined; - -beforeEach(async () => { - const keyring = new Keyring({ type: "sr25519" }); - testUser = createUser(keyring); - sudoUser = createUser(keyring, "//Alith"); - - const nonce = await instance.query.getNonce(sudoUser.address); - - const argsBatchAll: Batch = { - account: sudoUser, - calls: [ - await createToken( - instance, - testUser.address, - new BN("1000000000000000000000000") - ), - await createToken( - instance, - testUser.address, - new BN("1000000000000000000000000") - ), - await createMangataToken( - instance, - testUser.address, - new BN("10000000000000000000000000") - ) - ], - txOptions: { nonce } - }; - - const data = await instance.batchAll(argsBatchAll); - const searchTerms = ["tokens", "Created", testUser.address]; - const extrinsicData = getExtrinsicData({ data, searchTerms }); - firstTokenId = extrinsicData[0].eventData[0].data.toString(); - secondTokenId = extrinsicData[1].eventData[0].data.toString(); -}); - -it("should create pool", async () => { - const args: CreatePool = { - account: testUser, - firstTokenId: firstTokenId!, - secondTokenId: secondTokenId!, - firstTokenAmount: new BN("10000000000000000000000"), - secondTokenAmount: new BN("10000000000000000000000"), - txOptions: { - extrinsicStatus: (data) => { - const searchTerms = ["xyk", "PoolCreated", testUser.address]; - const extrinsicData = getExtrinsicData({ data, searchTerms }); - return expect(extrinsicData[0].method).toEqual("PoolCreated"); - } - } - }; - await instance.xyk.createPool(args); -}); diff --git a/packages/sdk/src/tests/init.ts b/packages/sdk/src/tests/init.ts deleted file mode 100644 index a7cd7793..00000000 --- a/packages/sdk/src/tests/init.ts +++ /dev/null @@ -1,57 +0,0 @@ -import { Mangata } from "../mangata"; -import { expect, it } from "vitest"; -import { Address, MangataGenericEvent, MangataInstance, TokenAmount } from "../types/common"; -import { v4 as uuidv4 } from "uuid"; -import { Keyring } from "@polkadot/api"; - -export const instance = Mangata.instance(["ws://127.0.0.1:9946"]) - -export type ExtrinsicData = { - data: MangataGenericEvent[]; - searchTerms: string[]; -}; - -export const createUser = (keyring: Keyring, name?: string) => { - const user: string = name ? name : "//testUser_" + uuidv4(); - const account = keyring.createFromUri(user); - keyring.addPair(account); - return account; -}; - -export const getExtrinsicData = (result: ExtrinsicData) => { - const { data, searchTerms } = result; - return data.filter((e) => { - return ( - e.method !== null && - searchTerms.every((filterTerm) => - ( - JSON.stringify(e.event.toHuman()) + - JSON.stringify(e.event.toHuman().data) - ).includes(filterTerm) - ) - ); - }); -}; - -export const createToken = async ( - instance: MangataInstance, - address: Address, - amount: TokenAmount -) => { - const api = await instance.api(); - return api.tx.sudo.sudo(api.tx.tokens.create(address, amount)); -}; - -export const createMangataToken = async ( - instance: MangataInstance, - address: Address, - amount: TokenAmount -) => { - const api = await instance.api(); - return api.tx.sudo.sudo(api.tx.tokens.mint("0", address, amount)); -}; - -it("It should check whether instance is connected", async () => { - const api = await instance.api() - expect(api.isConnected).toBe(true) -}) \ No newline at end of file diff --git a/packages/sdk/src/tests/mint-liquidity.test.ts b/packages/sdk/src/tests/mint-liquidity.test.ts deleted file mode 100644 index 4b46992b..00000000 --- a/packages/sdk/src/tests/mint-liquidity.test.ts +++ /dev/null @@ -1,91 +0,0 @@ -import { BN } from "@polkadot/util"; -import { Keyring } from "@polkadot/api"; -import { KeyringPair } from "@polkadot/keyring/types"; - -import { - instance, - createMangataToken, - createToken, - createUser, - getExtrinsicData -} from "./init"; -import { Batch } from "../types/utility"; -import { CreatePool, MintLiquidity } from "../types/xyk"; - -let testUser: KeyringPair; -let sudoUser: KeyringPair; -let firstTokenId: string | undefined; -let secondTokenId: string | undefined; - -beforeEach(async () => { - const keyring = new Keyring({ type: "sr25519" }); - testUser = createUser(keyring); - sudoUser = createUser(keyring, "//Alice"); - - const nonce = await instance.query.getNonce(sudoUser.address); - - const argsBatchAll: Batch = { - account: sudoUser, - calls: [ - await createToken( - instance, - testUser.address, - new BN("1000000000000000000000000") - ), - await createToken( - instance, - testUser.address, - new BN("1000000000000000000000000") - ), - await createMangataToken( - instance, - testUser.address, - new BN("10000000000000000000000000") - ) - ], - txOptions: { nonce } - }; - - const data = await instance.batchAll(argsBatchAll); - const searchTerms = ["tokens", "Created", testUser.address]; - const extrinsicData = getExtrinsicData({ data, searchTerms }); - firstTokenId = extrinsicData[0].eventData[0].data.toString(); - secondTokenId = extrinsicData[1].eventData[0].data.toString(); -}); - -it("should mint liquidity", async () => { - const argsPool: CreatePool = { - account: testUser, - firstTokenId: firstTokenId!, - secondTokenId: secondTokenId!, - firstTokenAmount: new BN(50000), - secondTokenAmount: new BN(25000), - txOptions: { - extrinsicStatus: (data) => { - const searchTerms = ["xyk", "PoolCreated", testUser.address]; - const extrinsicData = getExtrinsicData({ data, searchTerms }); - return expect(extrinsicData[0].method).toEqual("PoolCreated"); - } - } - }; - await instance.xyk.createPool(argsPool); - - await instance.rpc.waitForNewBlock(2); - - const argsMintLiquidity: MintLiquidity = { - account: testUser, - firstTokenId: firstTokenId!, - secondTokenId: secondTokenId!, - firstTokenAmount: new BN(10000), - expectedSecondTokenAmount: new BN(5001), - txOptions: { - extrinsicStatus: (data) => { - const searchTerms = ["xyk", "LiquidityMinted", testUser.address]; - const extrinsicData = getExtrinsicData({ data, searchTerms }); - return expect(extrinsicData[0].method).toEqual("LiquidityMinted"); - } - } - }; - - await instance.xyk.mintLiquidity(argsMintLiquidity); -}); diff --git a/packages/sdk/src/tests/multi-swap-buy-asset.test.ts b/packages/sdk/src/tests/multi-swap-buy-asset.test.ts deleted file mode 100644 index 92d2b432..00000000 --- a/packages/sdk/src/tests/multi-swap-buy-asset.test.ts +++ /dev/null @@ -1,99 +0,0 @@ -import { BN } from "@polkadot/util"; -import { Keyring } from "@polkadot/api"; -import { KeyringPair } from "@polkadot/keyring/types"; - -import { - instance, - createMangataToken, - createToken, - createUser, - getExtrinsicData -} from "./init"; -import { Batch } from "../types/utility"; -import { CreatePool, MultiswapBuyAsset } from "../types/xyk"; - -let testUser: KeyringPair; -let sudoUser: KeyringPair; -let firstTokenId: string; -let secondTokenId: string; - -beforeEach(async () => { - const keyring = new Keyring({ type: "sr25519" }); - testUser = createUser(keyring); - sudoUser = createUser(keyring, "//Alice"); - - const nonce = await instance.query.getNonce(sudoUser.address); - - const argsBatchAll: Batch = { - account: sudoUser, - calls: [ - await createToken( - instance, - testUser.address, - new BN("1000000000000000000000000") - ), - await createToken( - instance, - testUser.address, - new BN("1000000000000000000000000") - ), - await createMangataToken( - instance, - testUser.address, - new BN("10000000000000000000000000") - ) - ], - txOptions: { nonce } - }; - - const data = await instance.batchAll(argsBatchAll); - const searchTerms = ["tokens", "Created", testUser.address]; - const extrinsicData = getExtrinsicData({ data, searchTerms }); - firstTokenId = extrinsicData[0].eventData[0].data.toString(); - secondTokenId = extrinsicData[1].eventData[0].data.toString(); -}); - -it("should buy asset", async () => { - const argsPool: CreatePool = { - account: testUser, - firstTokenId: firstTokenId!, - secondTokenId: secondTokenId!, - firstTokenAmount: new BN(50000), - secondTokenAmount: new BN(25000), - txOptions: { - extrinsicStatus: (data) => { - const searchTerms = ["xyk", "PoolCreated", testUser.address]; - const extrinsicData = getExtrinsicData({ data, searchTerms }); - return expect(extrinsicData[0].method).toEqual("PoolCreated"); - } - } - }; - await instance.xyk.createPool(argsPool); - - await instance.rpc.waitForNewBlock(2); - - const argsBuyAsset: MultiswapBuyAsset = { - account: testUser, - tokenIds: [firstTokenId!, secondTokenId!], - amount: new BN(1000), - maxAmountIn: new BN(60000) - }; - - const tx1 = await instance.submitableExtrinsic.multiswapBuyAsset( - argsBuyAsset - ); - const tx2 = await instance.submitableExtrinsic.multiswapBuyAsset( - argsBuyAsset - ); - - const argsBatch: Batch = { - account: testUser, - calls: [tx1, tx2], - txOptions: { - extrinsicStatus: (data) => { - return expect(data[data.length - 1].method).toEqual("ExtrinsicSuccess"); - } - } - }; - await instance.batch(argsBatch); -}); diff --git a/packages/sdk/src/tests/multi-swap-sell-asset.test.ts b/packages/sdk/src/tests/multi-swap-sell-asset.test.ts deleted file mode 100644 index 7c9841f5..00000000 --- a/packages/sdk/src/tests/multi-swap-sell-asset.test.ts +++ /dev/null @@ -1,89 +0,0 @@ -import { BN } from "@polkadot/util"; -import { Keyring } from "@polkadot/api"; -import { KeyringPair } from "@polkadot/keyring/types"; - -import { - instance, - createMangataToken, - createToken, - createUser, - getExtrinsicData -} from "./init"; -import { Batch } from "../types/utility"; -import { CreatePool, MultiswapSellAsset } from "../types/xyk"; - -let testUser: KeyringPair; -let sudoUser: KeyringPair; -let firstTokenId: string | undefined; -let secondTokenId: string | undefined; - -beforeEach(async () => { - const keyring = new Keyring({ type: "sr25519" }); - testUser = createUser(keyring); - sudoUser = createUser(keyring, "//Alice"); - - const nonce = await instance.query.getNonce(sudoUser.address); - - const argsBatchAll: Batch = { - account: sudoUser, - calls: [ - await createToken( - instance, - testUser.address, - new BN("1000000000000000000000000") - ), - await createToken( - instance, - testUser.address, - new BN("1000000000000000000000000") - ), - await createMangataToken( - instance, - testUser.address, - new BN("10000000000000000000000000") - ) - ], - txOptions: { nonce } - }; - - const data = await instance.batchAll(argsBatchAll); - const searchTerms = ["tokens", "Created", testUser.address]; - const extrinsicData = getExtrinsicData({ data, searchTerms }); - firstTokenId = extrinsicData[0].eventData[0].data.toString(); - secondTokenId = extrinsicData[1].eventData[0].data.toString(); -}); - -it("should sell asset", async () => { - const argsPool: CreatePool = { - account: testUser, - firstTokenId: firstTokenId!, - secondTokenId: secondTokenId!, - firstTokenAmount: new BN(50000), - secondTokenAmount: new BN(25000), - txOptions: { - extrinsicStatus: (data) => { - const searchTerms = ["xyk", "PoolCreated", testUser.address]; - const extrinsicData = getExtrinsicData({ data, searchTerms }); - return expect(extrinsicData[0].method).toEqual("PoolCreated"); - } - } - }; - await instance.xyk.createPool(argsPool); - - await instance.rpc.waitForNewBlock(2); - - const argsMultiSellAsset: MultiswapSellAsset = { - account: testUser, - tokenIds: [firstTokenId!, secondTokenId!], - amount: new BN(10000), - minAmountOut: new BN(100), - txOptions: { - extrinsicStatus: (data) => { - const searchTerms = ["xyk", "AssetsSwapped", testUser.address]; - const extrinsicData = getExtrinsicData({ data, searchTerms }); - return expect(extrinsicData[0].method).toEqual("AssetsSwapped"); - } - } - }; - await instance.xyk.multiswapSellAsset(argsMultiSellAsset); -}); diff --git a/packages/sdk/src/tests/sdk.test.ts b/packages/sdk/src/tests/sdk.test.ts deleted file mode 100644 index a81009e9..00000000 --- a/packages/sdk/src/tests/sdk.test.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { BN } from "@polkadot/util"; -import { Reserve } from "../types/xyk"; -import { fromBN } from "../utils/bnUtility"; -import { instance } from "./init"; - -it("should calculate buy price for 1 KSM", async () => { - const expectedPrice = "31428.127543982131597807"; - const ksmReserve = new BN("10548504882988569"); - const mgxReserve = new BN("330493863747139058140562661"); - const oneKSM = new BN("1000000000000"); - const args: Reserve = { - inputReserve: mgxReserve, - outputReserve: ksmReserve, - amount: oneKSM - }; - const buyPrice = await instance.rpc.calculateBuyPrice(args); - const actualprice = fromBN(buyPrice); - expect(actualprice).toEqual(expectedPrice); -}); - -it("should calculate sell price for 1 KSM", async () => { - const expectedPrice = "31233.927991162450224002"; - const ksmReserve = new BN("10548504882988569"); - const mgxReserve = new BN("330493863747139058140562661"); - const oneKSM = new BN("1000000000000"); - const args: Reserve = { - inputReserve: ksmReserve, - outputReserve: mgxReserve, - amount: oneKSM - }; - const sellPrice = await instance.rpc.calculateSellPrice(args); - const actualprice = fromBN(sellPrice); - expect(actualprice).toEqual(expectedPrice); -}); \ No newline at end of file diff --git a/packages/sdk/src/tests/sell-asset-four-times.test.ts b/packages/sdk/src/tests/sell-asset-four-times.test.ts deleted file mode 100644 index fa681dcc..00000000 --- a/packages/sdk/src/tests/sell-asset-four-times.test.ts +++ /dev/null @@ -1,107 +0,0 @@ -import { BN } from "@polkadot/util"; -import { Keyring } from "@polkadot/api"; -import { KeyringPair } from "@polkadot/keyring/types"; - -import { - instance, - createMangataToken, - createToken, - createUser, - getExtrinsicData -} from "./init"; -import { Batch } from "../types/utility"; -import { CreatePool, MultiswapSellAsset } from "../types/xyk"; -import { MangataGenericEvent } from "../types/common"; - -let testUser: KeyringPair; -let sudoUser: KeyringPair; -let firstTokenId: string | undefined; -let secondTokenId: string | undefined; - -beforeEach(async () => { - const keyring = new Keyring({ type: "sr25519" }); - testUser = createUser(keyring); - sudoUser = createUser(keyring, "//Alice"); - - const nonce = await instance.query.getNonce(sudoUser.address); - - const argsBatchAll: Batch = { - account: sudoUser, - calls: [ - await createToken( - instance, - testUser.address, - new BN("1000000000000000000000000") - ), - await createToken( - instance, - testUser.address, - new BN("1000000000000000000000000") - ), - await createMangataToken( - instance, - testUser.address, - new BN("10000000000000000000000000") - ) - ], - txOptions: { nonce } - }; - - const data = await instance.batchAll(argsBatchAll); - const searchTerms = ["tokens", "Created", testUser.address]; - const extrinsicData = getExtrinsicData({ data, searchTerms }); - firstTokenId = extrinsicData[0].eventData[0].data.toString(); - secondTokenId = extrinsicData[1].eventData[0].data.toString(); -}); - -it("should sell asset 4 times", async () => { - const argsPool: CreatePool = { - account: testUser, - firstTokenId: firstTokenId!, - secondTokenId: secondTokenId!, - firstTokenAmount: new BN(100000), - secondTokenAmount: new BN(100000), - txOptions: { - extrinsicStatus: (data) => { - const searchTerms = ["xyk", "PoolCreated", testUser.address]; - const extrinsicData = getExtrinsicData({ data, searchTerms }); - return expect(extrinsicData[0].method).toEqual("PoolCreated"); - } - } - }; - await instance.xyk.createPool(argsPool); - const userNonce: BN[] = []; - userNonce.push(await instance.query.getNonce(testUser.address)); - const promises: Promise[] = []; - const maxFutureNonce = userNonce[0].toNumber() + 3; - for (let index = maxFutureNonce; index >= userNonce[0].toNumber(); index--) { - const argsSellAsset: MultiswapSellAsset = { - account: testUser, - tokenIds: [firstTokenId!, secondTokenId!], - amount: new BN(1000 + index), - minAmountOut: new BN(0), - txOptions: { - nonce: new BN(index), - extrinsicStatus: (data) => { - const searchTerms = ["xyk", "AssetsSwapped", testUser.address]; - const extrinsicData = getExtrinsicData({ data, searchTerms }); - return expect(extrinsicData[0].method).toEqual("AssetsSwapped"); - } - } - }; - promises.push(instance.xyk.multiswapSellAsset(argsSellAsset)); - } - const promisesEvents = await Promise.all(promises); - promisesEvents.forEach((events) => { - const extrinsicResultMethods = [ - "ExtrinsicSuccess", - "ExtrinsicFailed", - "ExtrinsicUndefined" - ]; - const extrinsicResult = events.find( - (e) => e.method !== null && extrinsicResultMethods.includes(e.method) - ); - - return expect(extrinsicResult?.method).toEqual("ExtrinsicSuccess"); - }); -}); diff --git a/packages/sdk/src/tests/tradeable-tokens.test.ts b/packages/sdk/src/tests/tradeable-tokens.test.ts deleted file mode 100644 index dfeec461..00000000 --- a/packages/sdk/src/tests/tradeable-tokens.test.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { instance } from "./init"; - -it("should calculate buy price for 1 KSM", async () => { - const tokens = await instance.rpc.getTradeableTokens() - const mangataToken = tokens.find(token => token.tokenId === "0") - expect(mangataToken?.name).toEqual("Mangata"); - expect(mangataToken?.decimals).toEqual(18); -}); \ No newline at end of file diff --git a/packages/sdk/src/tests/transfer-token.test.ts b/packages/sdk/src/tests/transfer-token.test.ts deleted file mode 100644 index cd803098..00000000 --- a/packages/sdk/src/tests/transfer-token.test.ts +++ /dev/null @@ -1,97 +0,0 @@ -import { BN } from "@polkadot/util"; -import { Keyring } from "@polkadot/api"; -import { KeyringPair } from "@polkadot/keyring/types"; - -import { - instance, - createMangataToken, - createToken, - createUser, - getExtrinsicData -} from "./init"; -import { Batch } from "../types/utility"; -import { Transfer, TransferTokens } from "../types/tokens"; - -let testUser: KeyringPair; -let testUser1: KeyringPair; -let sudoUser: KeyringPair; -let firstTokenId: string | undefined; -let secondTokenId: string | undefined; - -beforeEach(async () => { - const keyring = new Keyring({ type: "sr25519" }); - testUser = createUser(keyring); - testUser1 = createUser(keyring); - sudoUser = createUser(keyring, "//Alice"); - - const nonce = await instance.query.getNonce(sudoUser.address); - - const argsBatchAll: Batch = { - account: sudoUser, - calls: [ - await createToken( - instance, - testUser.address, - new BN("1000000000000000000000000") - ), - await createToken( - instance, - testUser.address, - new BN("1000000000000000000000000") - ), - await createMangataToken( - instance, - testUser.address, - new BN("10000000000000000000000000") - ) - ], - txOptions: { nonce } - }; - - const data = await instance.batchAll(argsBatchAll); - const searchTerms = ["tokens", "Created", testUser.address]; - const extrinsicData = getExtrinsicData({ data, searchTerms }); - firstTokenId = extrinsicData[0].eventData[0].data.toString(); - secondTokenId = extrinsicData[1].eventData[0].data.toString(); -}); - -it("should transfer tokens from testUser1 to testUser2", async () => { - const argsTransferToken: TransferTokens = { - account: testUser, - tokenId: secondTokenId!, - address: testUser1.address, - amount: new BN("100"), - txOptions: { - extrinsicStatus: (data) => { - const searchTerms = ["tokens", "Transfer", testUser.address]; - const extrinsicData = getExtrinsicData({ data, searchTerms }); - return expect(extrinsicData[0].method).toEqual("Transfer"); - } - } - }; - await instance.tokens.transferTokens(argsTransferToken); - - const argsTransfer: Transfer = { - account: testUser, - tokenId: firstTokenId!, - address: testUser1.address, - txOptions: { - extrinsicStatus: (data) => { - const searchTerms = ["tokens", "Transfer", testUser.address]; - const extrinsicData = getExtrinsicData({ data, searchTerms }); - return expect(extrinsicData[0].method).toEqual("Transfer"); - } - } - }; - - await instance.tokens.transferAllTokens(argsTransfer); - - const issuance = await instance.query.getTotalIssuance(firstTokenId!); - expect(issuance.toString()).toEqual("1000000000000000000000000"); - - const tokenBalance = await instance.query.getTokenBalance( - firstTokenId!, - testUser1.address - ); - expect(tokenBalance.free.toString()).toEqual("1000000000000000000000000"); -}); diff --git a/packages/sdk/src/types/common.ts b/packages/sdk/src/types/common.ts index f07a7bca..e89a3f2e 100644 --- a/packages/sdk/src/types/common.ts +++ b/packages/sdk/src/types/common.ts @@ -1,556 +1,31 @@ -import { BN } from "@polkadot/util"; -import { ApiPromise } from "@polkadot/api"; -import { KeyringPair } from "@polkadot/keyring/types"; -import { Signer } from "@polkadot/api/types"; -import type { ISubmittableResult, Codec } from "@polkadot/types/types"; -import type { Event, Phase, ExtrinsicStatus } from "@polkadot/types/interfaces"; -import { SubmittableExtrinsic } from "@polkadot/api/types"; -import { Config } from "wagmi"; -import { ILogObj, ISettingsParam } from "tslog"; +import type { ISubmittableResult } from '@polkadot/types/types'; +import type { ExtrinsicStatus } from '@polkadot/types/interfaces'; +import type { GenericExtrinsic } from '@polkadot/types'; -import { - MainTokens, - TokenBalance, - PoolWithRatio, - Token, - TokenInfo, - PoolWithShare -} from "../types/query"; - -import { - ActivateLiquidityFee, - BurnAmount, - BurnLiquidity, - BurnLiquidityFee, - ClaimRewardsFee, - CreatePool, - CreatePoolFee, - DeactivateLiquidityFee, - Liquidity, - MintLiquidity, - MintLiquidityFee, - MultiswapBuyAsset, - MultiswapSellAsset, - Price, - Reserve, - Rewards, TradeAbleTokens -} from "../types/xyk"; -import { - Transfer, - TransferAllFee, - TransferTokenFee, - TransferTokens -} from "../types/tokens"; -import { Batch } from "./utility"; - -export type Prettify = { - [K in keyof T]: T[K]; - // eslint-disable-next-line @typescript-eslint/ban-types -} & {}; - -export type ExtrinsicCommon = { - account: Account; - txOptions?: Partial; -}; +import { TxSignParams } from '../modules'; export interface ExtrinsicSubscriptionData extends Partial { status: ExtrinsicStatus; } -export interface Database { - hasAddressNonce(address: string): boolean; - setNonce(address: string, nonce: BN): void; - getNonce(address: string): BN; -} -export type ErrorData = { - Module?: { - index?: string; - error?: string; - }; -}; -export type Account = string | KeyringPair; -export type TokenSymbol = string; -export type TokenId = string; -export type TokenAmount = BN; -export type Address = string; -export type MangataEventData = { - lookupName: string; - data: Codec; -}; -export type MangataGenericEvent = { - event: Event; - phase: Phase; - section: string; - method: string; - metaDocumentation: string; - eventData: MangataEventData[]; - error: { - documentation: string[]; - name: string; - } | null; -}; -export type TxOptions = { - nonce: BN; - signer?: Signer; - wagmiConfig?: Config; - statusCallback: (data: ExtrinsicSubscriptionData) => void; - extrinsicStatus: (events: MangataGenericEvent[]) => void; -}; - -export type MangataSubmittableExtrinsic = SubmittableExtrinsic<"promise">; -export type MangataLoggerOptions = ISettingsParam; - -export interface MangataInstance { - /** - * xyk methods for interacting with XYK (Automated Market Maker) operations. - */ - xyk: { - /** - * Deactivates liquidity in a pool. - * @param args - The liquidity parameters. - * @returns A promise that resolves with an array of MangataGenericEvent objects. - */ - deactivateLiquidity: (args: Liquidity) => Promise; - - /** - * Activates liquidity in a pool. - * @param args - The liquidity parameters. - * @returns A promise that resolves with an array of MangataGenericEvent objects. - */ - activateLiquidity: ( - args: Liquidity, - balanceFrom: - | "AvailableBalance" - | "StakedUnactivatedReserves" - | "UnspentReserves" - ) => Promise; - - /** - * Burns liquidity tokens. - * @param args - The burn liquidity parameters. - * @returns A promise that resolves with an array of MangataGenericEvent objects. - */ - burnLiquidity: (args: BurnLiquidity) => Promise; - - /** - * Mints liquidity tokens. - * @param args - The mint liquidity parameters. - * @returns A promise that resolves with an array of MangataGenericEvent objects. - */ - mintLiquidity: (args: MintLiquidity) => Promise; - - /** - * Creates a new pool. - * @param args - The create pool parameters. - * @returns A promise that resolves with an array of MangataGenericEvent objects. - */ - createPool: (args: CreatePool) => Promise; - - /** - * Claims rewards from a pool. - * @param args - The liquidity parameters. - * @returns A promise that resolves with an array of MangataGenericEvent objects. - */ - claimRewards: ( - args: Prettify> - ) => Promise; - - /** - * Claims rewards from a pool. - * @param args - The liquidity parameters. - * @returns A promise that resolves with an array of MangataGenericEvent objects. - */ - claimRewardsAll: ( - args: ExtrinsicCommon, - ) => Promise; - - /** - * Executes a multiswap sell asset operation. - * @param args - The multiswap sell asset parameters. - * @returns A promise that resolves with an array of MangataGenericEvent objects. - */ - multiswapSellAsset: ( - args: MultiswapSellAsset - ) => Promise; - - /** - * Executes a multiswap buy asset operation. - * @param args - The multiswap buy asset parameters. - * @returns A promise that resolves with an array of MangataGenericEvent objects. - */ - multiswapBuyAsset: ( - args: MultiswapBuyAsset - ) => Promise; - }; - /** - * rpc methods for interacting with various RPC operations. - */ - rpc: { - getLiquidityTokensForTrading: () => Promise, - getTradeableTokens: () => Promise, - isSellAssetLockFree: (tokendIds: TokenId[], amount: BN) => Promise; - isBuyAssetLockFree: (tokendIds: TokenId[], amount: BN) => Promise; - /** - * Calculates the buy price based on the asset's ID. - * @param args - The price parameters. - * @returns A promise that resolves with a BN object. - */ - calculateBuyPriceId: ( - soldTokenId: TokenId, - boughtTokenId: TokenId, - amount: TokenAmount - ) => Promise; - - /** - * Calculates the sell price based on the asset's ID. - * @param args - The price parameters. - * @returns A promise that resolves with a BN object. - */ - calculateSellPriceId: ( - soldTokenId: TokenId, - boughtTokenId: TokenId, - amount: TokenAmount - ) => Promise; - - /** - * Retrieves the burn amount based on the price parameters. - * @param args - The price parameters. - * @returns A promise that resolves with any type of value. - */ - getBurnAmount: (args: Price) => Promise; - - /** - * Calculates the sell price based on the reserve parameters. - * @param args - The reserve parameters. - * @returns A promise that resolves with a BN object. - */ - calculateSellPrice: (args: Reserve) => Promise; - - /** - * Calculates the buy price based on the reserve parameters. - * @param args - The reserve parameters. - * @returns A promise that resolves with a BN object. - */ - calculateBuyPrice: (args: Reserve) => Promise; - - /** - * Calculates the rewards amount based on the rewards parameters. - * @param args - The rewards parameters. - * @returns A promise that resolves with a BN object. - */ - calculateRewardsAmount: (args: Rewards) => Promise; - - /** - * Retrieves the version of the connected node. - * @returns A promise that resolves with a string representing the node version. - */ - getNodeVersion: () => Promise; - - /** - * Retrieves the name of the connected node. - * @returns A promise that resolves with a string representing the node name. - */ - getNodeName: () => Promise; - - /** - * Retrieves the name of the connected chain. - * @returns A promise that resolves with a string representing the chain name. - */ - getChain: () => Promise; - - /** - * Waits for a new block to be added, optionally specifying a block number to wait for. - * @param blockNumber - The block number to wait for (optional). - * @returns A promise that resolves with a boolean indicating if a new block was added. - */ - waitForNewBlock: (blockNumber?: number) => Promise; - }; - /** - * Methods for transferring tokens. - */ - tokens: { - /** - * Transfers all tokens based on the transfer parameters. - * @param args - The transfer parameters. - * @returns A promise that resolves with an array of MangataGenericEvent objects. - */ - transferAllTokens: (args: Transfer) => Promise; - - /** - * Transfers a specific amount of tokens based on the transfer parameters. - * @param args - The transfer parameters, including the amount of tokens to transfer. - * @returns A promise that resolves with an array of MangataGenericEvent objects. - */ - transferTokens: (args: TransferTokens) => Promise; - }; - /** - * Methods for submitting extrinsics that perform actions on the blockchain. This methods are useful when using batch methods - */ - submitableExtrinsic: { - /** - * Creates a pool based on the provided parameters. - * @param args - The create pool parameters. - * @returns A promise that resolves with a MangataSubmittableExtrinsic object. - */ - createPool: (args: CreatePool) => Promise; - - /** - * Claims rewards based on the provided liquidity parameters. - * @param args - The liquidity parameters for rewards claiming. - * @returns A promise that resolves with a MangataSubmittableExtrinsic object. - */ - claimRewards: ( - args: Omit - ) => Promise; - - /** - * Mints liquidity based on the provided parameters. - * @param args - The mint liquidity parameters. - * @returns A promise that resolves with a MangataSubmittableExtrinsic object. - */ - mintLiquidity: ( - args: MintLiquidity - ) => Promise; - - /** - * Burns liquidity based on the provided parameters. - * @param args - The burn liquidity parameters. - * @returns A promise that resolves with a MangataSubmittableExtrinsic object. - */ - burnLiquidity: ( - args: BurnLiquidity - ) => Promise; - - /** - * Activates liquidity based on the provided parameters. - * @param args - The liquidity parameters for activation. - * @returns A promise that resolves with a MangataSubmittableExtrinsic object. - */ - activateLiquidity: ( - args: Liquidity, - balanceFrom: - | "AvailableBalance" - | "StakedUnactivatedReserves" - | "UnspentReserves" - ) => Promise; - /** - * Deactivates liquidity based on the provided parameters. - * @param args - The liquidity parameters for deactivation. - * @returns A promise that resolves with a MangataSubmittableExtrinsic object. - */ - deactivateLiquidity: ( - args: Liquidity - ) => Promise; - - /** - * Transfers all tokens based on the transfer parameters. - * @param args - The transfer parameters. - * @returns A promise that resolves with a MangataSubmittableExtrinsic object. - */ - transferAllTokens: (args: Transfer) => Promise; - - /** - * Transfers a specific amount of tokens based on the transfer parameters. - * @param args - The transfer parameters, including the amount of tokens to transfer. - * @returns A promise that resolves with a MangataSubmittableExtrinsic object. - */ - transferTokens: ( - args: Transfer & { amount: TokenAmount } - ) => Promise; - - /** - * Executes a multiswap transaction to buy assets. - * - * @param args - The arguments for the multiswap transaction. - * @returns A Promise that resolves to a `MangataSubmittableExtrinsic` representing the multiswap transaction. - */ - multiswapBuyAsset: ( - args: MultiswapBuyAsset - ) => Promise; - - /** - * Executes a multiswap transaction to sell assets. - * - * @param args - The arguments for the multiswap transaction. - * @returns A Promise that resolves to a `MangataSubmittableExtrinsic` representing the multiswap transaction. - */ - multiswapSellAsset: ( - args: MultiswapSellAsset - ) => Promise; - }; - /** - * Represents a set of query functions for retrieving information from the blockchain. - */ - query: { - /** - * Retrieves the nonce of the specified address. - */ - getNonce: (address: Address) => Promise; - - /** - * Retrieves the liquidity token ID for a given pair of tokens. - */ - getLiquidityTokenId: ( - firstTokenId: TokenId, - secondTokenId: TokenId - ) => Promise; - - /** - * Retrieves the total issuance of a specific token. - */ - getTotalIssuance: (tokenId: TokenId) => Promise; - - /** - * Retrieves the token balance for a specific address and token ID. - */ - getTokenBalance: ( - tokenId: TokenId, - address: Address - ) => Promise; - - /** - * Retrieves detailed information about a specific token. - */ - getTokenInfo: (tokenId: TokenId) => Promise; - - /** - * Retrieves the liquidity token IDs. - */ - getLiquidityTokenIds: () => Promise; - - /** - * Retrieves the liquidity tokens. - */ - getLiquidityTokens: () => Promise; - - /** - * Retrieves the current block number. - */ - getBlockNumber: () => Promise; - - /** - * Retrieves the tokens owned by a specific address. - */ - getOwnedTokens: (address: Address) => Promise<{ [id: TokenId]: Token }>; - - /** - * Retrieves information about the main assets. - */ - getAssetsInfo: () => Promise; - - /** - * Retrieves the pools in which the specified address has invested. - */ - getInvestedPools: (address: Address) => Promise; - - /** - * Retrieves the amount of tokens in a liquidity pool for a given pair of tokens. - */ - getAmountOfTokensInPool: ( - firstTokenId: TokenId, - secondTokenId: TokenId - ) => Promise; - - /** - * Retrieves the liquidity pool information for a specific liquidity token ID. - */ - getLiquidityPool: (liquidityTokenId: TokenId) => Promise; - - /** - * Retrieves the detailed information about a specific pool. - */ - getPool: (liquidityTokenId: TokenId) => Promise; - - /** - * Retrieves information about all the available pools. - */ - getPools: () => Promise; - - /** - * Retrieves the total issuance of all tokens. - */ - getTotalIssuanceOfTokens: () => Promise>; - }; - /** - * Represents a collection of fee calculation functions for different operations. - */ - fee: { - /** - * Calculates the fee for activating liquidity in a pool. - */ - activateLiquidity: (args: ActivateLiquidityFee) => Promise; - - /** - * Calculates the fee for deactivating liquidity in a pool. - */ - deactivateLiquidity: (args: DeactivateLiquidityFee) => Promise; - - /** - * Calculates the fee for claiming rewards from a liquidity pool. - */ - claimRewards: (args: ClaimRewardsFee) => Promise; - - /** - * Calculates the fee for creating a new pool. - */ - createPool: (args: CreatePoolFee) => Promise; - - /** - * Calculates the fee for minting liquidity in a pool. - */ - mintLiquidity: (args: MintLiquidityFee) => Promise; +export interface Signer { + sign: (params: TxSignParams) => Promise; +} - /** - * Calculates the fee for burning liquidity in a pool. - */ - burnLiquidity: (args: BurnLiquidityFee) => Promise; +interface SignerConfigBase { + genesisHash?: string; + nonce?: number; +} - /** - * Calculates the fee for transferring all tokens. - */ - transferAllToken: (args: TransferAllFee) => Promise; +interface SignerConfigWithEra { + era: number; + blockHash: string; +} - /** - * Calculates the fee for transferring tokens. - */ - transferToken: (args: TransferTokenFee) => Promise; - }; - util: { - getUrls: () => string[]; - /** - * Calculates the future minting rewards for a given liquidity token based on the specified parameters. - * @param liquidityTokenId - The ID of the liquidity token. - * @param mintingAmount - The amount of tokens to be minted. - * @param blocksToPass - The number of blocks to pass for calculating future rewards. - * @returns A promise that resolves to the calculated future rewards amount. - */ - calculateMintingFutureRewards: ( - liquidityTokenId: string, - mintingAmount: BN, - blocksToPass: BN - ) => Promise; - }; - /** - * Represents a function that retrieves the API instance. - * @returns A promise that resolves to the API instance. - */ - api: () => Promise; - /** - * Represents a function that executes a batch operation. - * @param args - The batch request object. - * @returns A promise that resolves to an array of MangataGenericEvent objects. - */ - batch: (args: Batch) => Promise; - /** - * Represents a function that executes a batch operation for all items. - * @param args - The batch request object. - * @returns A promise that resolves to an array of MangataGenericEvent objects. - */ - batchAll: (args: Batch) => Promise; - /** - * Represents a function that forcefully executes a batch operation. - * @param args - The batch request object. - * @returns A promise that resolves to an array of MangataGenericEvent objects. - */ - forceBatch: (args: Batch) => Promise; +interface SignerConfigWithoutEra { + blockHash?: string; + era?: never; } + +export type SignerConfig = SignerConfigBase & + (SignerConfigWithEra | SignerConfigWithoutEra); diff --git a/packages/sdk/src/types/query.ts b/packages/sdk/src/types/query.ts deleted file mode 100644 index 4b44096f..00000000 --- a/packages/sdk/src/types/query.ts +++ /dev/null @@ -1,47 +0,0 @@ -import { TokenId } from "./common"; -import { BN } from "@polkadot/util"; -import { Merge } from "type-fest"; -import { PoolBase } from "./xyk"; - -export type Token = { - id: TokenId; - name: string; - symbol: string; - decimals: number; - balance: TokenBalance; -}; - -export type TokenInfo = Omit; -export type MainTokens = Record; -export type TokenBalance = { - free: BN; - reserved: BN; - frozen: BN; -}; -export type Pool = Merge< - PoolBase, - { liquidityTokenId: TokenId; isPromoted: boolean } ->; - -export type PoolWithRatio = Merge< - Pool, - { - firstTokenRatio: BN; - secondTokenRatio: BN; - } ->; - -export type PoolWithShare = Pool & { - share: BN; - firstTokenRatio: BN; - secondTokenRatio: BN; - activatedLPTokens: BN; - nonActivatedLPTokens: BN; -}; - -export type FeeLockType = { - periodLength: string; - feeLockAmount: string; - swapValueThreshold: string; - whitelistedTokens: number[]; -}; diff --git a/packages/sdk/src/types/tokens.ts b/packages/sdk/src/types/tokens.ts deleted file mode 100644 index 2df56011..00000000 --- a/packages/sdk/src/types/tokens.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { Merge, Except } from "type-fest"; -import { Account, Address, TokenId, TxOptions, TokenAmount } from "./common"; - -export type Transfer = { - account: Account; - tokenId: TokenId; - address: Address; - txOptions?: Partial; -}; - -export type TransferTokens = Merge; -export type TransferTokenFee = Merge< - Except, - { amount: TokenAmount } ->; -export type TransferAllFee = Except; diff --git a/packages/sdk/src/types/utility.ts b/packages/sdk/src/types/utility.ts deleted file mode 100644 index f12ac350..00000000 --- a/packages/sdk/src/types/utility.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { Merge } from "type-fest"; -import { BN } from "@polkadot/util"; -import { - ExtrinsicCommon, - MangataSubmittableExtrinsic -} from "./common"; - -export type Batch = Merge< - ExtrinsicCommon, - { calls: MangataSubmittableExtrinsic[] } ->; - -export type PoolReserves = [BN, BN]; -export type TokenAmounts = [string, string]; -export type TokenDecimals = [number, number]; - -export type PriceImpact = { - poolReserves: PoolReserves; - decimals: TokenDecimals; - tokenAmounts: TokenAmounts; -}; diff --git a/packages/sdk/src/types/xyk.ts b/packages/sdk/src/types/xyk.ts deleted file mode 100644 index f9254967..00000000 --- a/packages/sdk/src/types/xyk.ts +++ /dev/null @@ -1,100 +0,0 @@ -import { - TokenAmount, - ExtrinsicCommon, - TokenId, - Address, - Prettify -} from "./common"; - -import { Merge, Except } from "type-fest"; - -export type BurnAmount = { - firstAssetAmount: TokenAmount; - secondAssetAmount: TokenAmount; -}; - -export type TradeAbleTokens = { - tokenId: string, - decimals: number, - name: string, - symbol: string -} - -export type Rewards = { - address: Address; - liquidityTokenId: TokenId; -}; - -export type Reserve = { - inputReserve: TokenAmount; - outputReserve: TokenAmount; - amount: TokenAmount; -}; - -export type Price = { - firstTokenId: TokenId; - secondTokenId: TokenId; - amount: TokenAmount; -}; - -export type Liquidity = Merge< - ExtrinsicCommon, - { - liquidityTokenId: TokenId; - amount: TokenAmount; - } ->; - -export type BurnLiquidity = Merge, Price>; - -export type MintLiquidity = Prettify< - Merge< - Omit, - { - firstTokenAmount: TokenAmount; - expectedSecondTokenAmount: TokenAmount; - } - > ->; - -export type Asset = { - soldTokenId: TokenId; - boughtTokenId: TokenId; - amount: TokenAmount; -}; - -export type MaxAmountIn = Merge; -export type MinAmountOut = Merge; - -export type PoolBase = { - firstTokenId: TokenId; - firstTokenAmount: TokenAmount; - secondTokenId: TokenId; - secondTokenAmount: TokenAmount; -}; - -export type CreatePool = Merge; - -export type MintLiquidityFee = Except; -export type DeactivateLiquidityFee = Except; -export type CreatePoolFee = Except; -export type ClaimRewardsFee = Except, "txOptions">; -export type BurnLiquidityFee = Except; -export type ActivateLiquidityFee = Except; -export type MultiSwapBase = Merge< - ExtrinsicCommon, - { - tokenIds: TokenId[]; - amount: TokenAmount; - } ->; - -export type MultiswapSellAsset = Merge< - MultiSwapBase, - { minAmountOut: TokenAmount } ->; - -export type MultiswapBuyAsset = Merge< - MultiSwapBase, - { maxAmountIn: TokenAmount } ->; diff --git a/packages/sdk/src/utils/calculateLiquidityShare.ts b/packages/sdk/src/utils/calculateLiquidityShare.ts deleted file mode 100644 index 6880e6d7..00000000 --- a/packages/sdk/src/utils/calculateLiquidityShare.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { ApiPromise } from "@polkadot/api"; -import { BN } from "@polkadot/util"; - -import { BN_DIV_NUMERATOR_MULTIPLIER, BN_ZERO } from "./bnConstants"; - -export const calculateLiquidityShare = async ( - api: ApiPromise, - liquidityAssetId: string, - userLiquidityTokenAmount: BN -) => { - // userLiquidityTokenAmount is the amount of liquidity token the user has but FREE .. - // when the pool is promoted and user will receive rewards those tokens are no longer free but RESERVED - if (userLiquidityTokenAmount.isZero()) return BN_ZERO; - - const tokenSupply = await api.query.tokens.totalIssuance(liquidityAssetId); - - const totalLiquidityAsset = new BN(tokenSupply); - const share = userLiquidityTokenAmount - .mul(BN_DIV_NUMERATOR_MULTIPLIER) - .div(totalLiquidityAsset); - - return share; -}; diff --git a/packages/sdk/src/utils/calculateMintingFutureRewards.ts b/packages/sdk/src/utils/calculateMintingFutureRewards.ts deleted file mode 100644 index 02684f3b..00000000 --- a/packages/sdk/src/utils/calculateMintingFutureRewards.ts +++ /dev/null @@ -1,50 +0,0 @@ -import { ApiPromise } from "@polkadot/api"; -import { BN } from "@polkadot/util"; - -export const calculateMintingFutureRewards = async ( - apiPromise: Promise, - liquidityTokenId: string, - mintingAmount: BN, - blocksToPass: BN -) => { - const api = await apiPromise; - const rewardsPerSession = new BN("136986000000000000000000"); - - const sessionsToPass = blocksToPass.div(new BN("1200")); - const totalRewardsMinted = sessionsToPass.mul(rewardsPerSession); - - const promotedPoolRewardsV2 = - await api.query.proofOfStake.promotedPoolRewards(); - const promotedPoolInfos = promotedPoolRewardsV2.toHuman() as { - [key: string]: { - weight: string; - rewards: string; - }; - }; - - const totalWeight = Object.values(promotedPoolInfos).reduce( - ( - acc: BN, - curr: { - weight: string; - rewards: string; - } - ) => acc.add(new BN(curr.weight)), - new BN(0) - ); - - const poolWeight = new BN( - promotedPoolInfos[liquidityTokenId].weight.toString() - ); - - const rewardsMintedForPool = totalRewardsMinted - .mul(poolWeight) - .div(totalWeight); - - const totalActivatedLiquidityInPool = - await api.query.proofOfStake.totalActivatedLiquidity(liquidityTokenId); - - return rewardsMintedForPool - .mul(mintingAmount) - .div(new BN(totalActivatedLiquidityInPool.toString()).add(mintingAmount)); -}; diff --git a/packages/sdk/src/utils/getAccountBalances.ts b/packages/sdk/src/utils/getAccountBalances.ts deleted file mode 100644 index 692564a1..00000000 --- a/packages/sdk/src/utils/getAccountBalances.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { ApiPromise } from "@polkadot/api"; -import { BN } from "@polkadot/util"; - -export const getAccountBalances = async (api: ApiPromise, address: string) => { - const ownedAssetsResponse = await api.query.tokens.accounts.entries(address); - - return ownedAssetsResponse.reduce( - (acc, [key, value]) => { - // eslint-disable-next-line @typescript-eslint/no-unused-vars - const [_, id] = key.args; - - acc[id.toString()] = { - free: value.free, - frozen: value.frozen, - reserved: value.reserved - }; - return acc; - }, - {} as { - [id: string]: { - free: BN; - frozen: BN; - reserved: BN; - }; - } - ); -}; diff --git a/packages/sdk/src/utils/getAssetsInfoWithIds.ts b/packages/sdk/src/utils/getAssetsInfoWithIds.ts deleted file mode 100644 index f12df889..00000000 --- a/packages/sdk/src/utils/getAssetsInfoWithIds.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { ApiPromise } from "@polkadot/api"; -import { hexToBn } from "@polkadot/util"; -import { TokenInfo } from "../types/query"; - -import { getCompleteAssetsInfo } from "./getCompleteAssetsInfo"; - -export const getAssetsInfoWithIds = async (api: ApiPromise) => { - const completeAssetsInfo = await getCompleteAssetsInfo(api); - // we need to filter out ETH and Dummy liquidity token - // then we need to display symbol for liquidity token - return Object.values(completeAssetsInfo) - .filter((asset) => asset.name || asset.symbol) - .reduce((obj, item) => { - const asset = { - ...item, - name: item.name - .replace(/(LiquidityPoolToken)0x[a-fA-F0-9]+/, "$1") - .replace(/([a-z])([A-Z])/g, "$1 $2"), - symbol: item.symbol.includes("TKN") - ? item.symbol - .split("-") - .reduce((acc, curr) => { - const currentValue = curr.replace("TKN", ""); - const tokenId = currentValue.startsWith("0x") - ? hexToBn(currentValue).toString() - : currentValue; - acc.push(tokenId); - return acc; - }, [] as string[]) - .join("-") - : item.symbol - }; - obj[asset.id] = asset; - return obj; - }, {} as { [id: string]: TokenInfo }); -}; diff --git a/packages/sdk/src/utils/getCompleteAssetsInfo.ts b/packages/sdk/src/utils/getCompleteAssetsInfo.ts deleted file mode 100644 index 754ca3f1..00000000 --- a/packages/sdk/src/utils/getCompleteAssetsInfo.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { ApiPromise } from "@polkadot/api"; - -import { TokenId } from "../types/common"; -import { TokenInfo } from "../types/query"; - -export const getCompleteAssetsInfo = async (api: ApiPromise) => { - const assets = await api.query.assetRegistry.metadata.entries(); - - return assets.reduce((obj, [key, value]) => { - const [tokenId] = key.args; - const { name, decimals, symbol } = value.unwrap(); - const assetInfo = { - id: tokenId.toString(), - decimals: Number(decimals.toPrimitive()), - name: name.toPrimitive() as string, - symbol: symbol.toPrimitive() as string - }; - - obj[tokenId.toString()] = assetInfo; - return obj; - }, {} as { [id: TokenId]: TokenInfo }); -}; diff --git a/packages/sdk/src/utils/getLiquidityAssets.ts b/packages/sdk/src/utils/getLiquidityAssets.ts deleted file mode 100644 index cb01caaf..00000000 --- a/packages/sdk/src/utils/getLiquidityAssets.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { ApiPromise } from "@polkadot/api"; - -export const getLiquidityAssets = async (api: ApiPromise) => { - const liquidityAssetsResponse = await api.query.xyk.liquidityAssets.entries(); - - return liquidityAssetsResponse.reduce((acc, [key, value]) => { - const [identificator] = key.args; - acc[identificator.toHex()] = value.unwrap().toString(); - return acc; - }, {} as { [identificator: string]: string }); -}; diff --git a/packages/sdk/src/utils/getLiquidityPromotedPools.ts b/packages/sdk/src/utils/getLiquidityPromotedPools.ts deleted file mode 100644 index 12d93ad4..00000000 --- a/packages/sdk/src/utils/getLiquidityPromotedPools.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { ApiPromise } from "@polkadot/api"; - -export const getLiquidityPromotedPools = async (api: ApiPromise) => { - try { - const promotedPoolRewards = - await api.query.proofOfStake.promotedPoolRewards(); - - return Object.keys(promotedPoolRewards.toHuman()); - } catch (error) { - return []; - } -}; diff --git a/packages/sdk/src/utils/getOrCreateInstance.ts b/packages/sdk/src/utils/getOrCreateInstance.ts index b5c0fb21..3d74a3f2 100644 --- a/packages/sdk/src/utils/getOrCreateInstance.ts +++ b/packages/sdk/src/utils/getOrCreateInstance.ts @@ -1,3 +1,4 @@ +import "gasp-types" import { ApiPromise, WsProvider } from "@polkadot/api"; import { options } from "./options"; diff --git a/packages/sdk/src/utils/getPoolsBalance.ts b/packages/sdk/src/utils/getPoolsBalance.ts deleted file mode 100644 index d8f00f37..00000000 --- a/packages/sdk/src/utils/getPoolsBalance.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { ApiPromise } from "@polkadot/api"; -import { BN } from "@polkadot/util"; - -export const getPoolsBalance = async ( - api: ApiPromise, - liquidityAssets: { - [identificator: string]: string; - } -) => { - const poolsBalanceResponse = await api.query.xyk.pools.entries(); - - return poolsBalanceResponse.reduce((acc, [key, value]) => { - const [identificator] = key.args; - - acc[liquidityAssets[identificator.toHex()]] = value.map( - (balance) => new BN(balance) - ); - return acc; - }, {} as { [identificator: string]: BN[] }); -}; diff --git a/packages/sdk/src/utils/getPriceImpact.ts b/packages/sdk/src/utils/getPriceImpact.ts deleted file mode 100644 index 8ca62d6e..00000000 --- a/packages/sdk/src/utils/getPriceImpact.ts +++ /dev/null @@ -1,43 +0,0 @@ -import Big from "big.js"; -import { BIG_HUNDRED } from "./bigConstants"; -import { BN_TEN_THOUSAND } from "./bnConstants"; -import { toBN } from "./bnUtility"; -import { isInputValid } from "./isInputValid"; -import { toFixed } from "./toFixed"; -import { PriceImpact } from "../types/utility"; - -export const getPriceImpact = (args: PriceImpact) => { - const { poolReserves, decimals, tokenAmounts } = args; - if ( - !poolReserves || - !decimals || - !isInputValid(tokenAmounts[0]) || - !isInputValid(tokenAmounts[1]) - ) { - return; - } - - const firstReserveBefore = poolReserves[0]; - const secondReserveBefore = poolReserves[1]; - - const soldAmount = toBN(tokenAmounts[0].toString(), decimals[0]); - const boughtAmount = toBN(tokenAmounts[1].toString(), decimals[1]); - - if (boughtAmount.gte(secondReserveBefore)) return ""; - - const numerator = firstReserveBefore - .add(soldAmount) - .mul(BN_TEN_THOUSAND) - .mul(secondReserveBefore); - const denominator = secondReserveBefore - .sub(boughtAmount) - .mul(firstReserveBefore); - - const res = numerator.div(denominator).sub(BN_TEN_THOUSAND); - - const resStr = res.toString(); - const resBig = Big(resStr); - const resFormatted = toFixed(resBig.div(BIG_HUNDRED).toString(), 2); - - return resFormatted; -}; diff --git a/packages/sdk/src/utils/getRatio.ts b/packages/sdk/src/utils/getRatio.ts deleted file mode 100644 index 5b528b83..00000000 --- a/packages/sdk/src/utils/getRatio.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { BN } from "@polkadot/util"; - -import { BN_DIV_NUMERATOR_MULTIPLIER, BN_ZERO } from "./bnConstants"; - -const getGcd = (a: BN, b: BN): BN => { - return b.gt(BN_ZERO) ? getGcd(b, a.mod(b)) : a; -}; - -const calculateRatio = (numerator: BN, denominator: BN) => { - const gcd = getGcd(numerator, denominator); - - if (gcd.isZero()) return [BN_ZERO, BN_ZERO]; - - const gcd1 = numerator.div(gcd); - const gcd2 = denominator.div(gcd); - - return [gcd1, gcd2]; -}; - -export const getRatio = (left: BN, right: BN) => { - if (left.isZero() && right.isZero()) return BN_ZERO; - const ratios = calculateRatio(left, right); - - const res = ratios[1].mul(BN_DIV_NUMERATOR_MULTIPLIER).div(ratios[0]); - - return res; -}; diff --git a/packages/sdk/src/utils/getTxError.ts b/packages/sdk/src/utils/getTxError.ts deleted file mode 100644 index dcedeaf9..00000000 --- a/packages/sdk/src/utils/getTxError.ts +++ /dev/null @@ -1,48 +0,0 @@ -import { ApiPromise } from "@polkadot/api"; -import { BN, isHex, hexToU8a } from "@polkadot/util"; -import { MangataEventData, ErrorData } from "../types/common"; - -export const getTxError = ( - api: ApiPromise, - method: string, - eventData: MangataEventData[] -): { - documentation: string[]; - name: string; -} | null => { - const failedEvent = method === "ExtrinsicFailed"; - - if (failedEvent) { - const error = eventData.find((item) => - item.lookupName.includes("DispatchError") - ); - const errorData = error?.data?.toHuman?.() as ErrorData | undefined; - const errorIdx = errorData?.Module?.error; - const moduleIdx = errorData?.Module?.index; - - if (errorIdx && moduleIdx) { - try { - const decode = api.registry.findMetaError({ - error: isHex(errorIdx) ? hexToU8a(errorIdx) : new BN(errorIdx), - index: new BN(moduleIdx) - }); - return { - documentation: decode.docs, - name: decode.name - }; - } catch (error) { - return { - documentation: ["Unknown error"], - name: "UnknownError" - }; - } - } else { - return { - documentation: ["Unknown error"], - name: "UnknownError" - }; - } - } - - return null; -}; diff --git a/packages/sdk/src/utils/getTxNonce.ts b/packages/sdk/src/utils/getTxNonce.ts deleted file mode 100644 index 9d149ecf..00000000 --- a/packages/sdk/src/utils/getTxNonce.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { ApiPromise } from "@polkadot/api"; -import { BN } from "@polkadot/util"; -import { getNonce } from "../methods/query/getNonce"; -import { TxOptions } from "../types/common"; - -getNonce; -import { dbInstance } from "./inMemoryDatabase"; - -export const getTxNonce = async ( - api: ApiPromise, - address: string, - txOptions?: Partial -): Promise => { - let nonce: BN; - if (txOptions && txOptions.nonce) { - nonce = txOptions.nonce; - } else { - const onChainNonce = await api.rpc.system.accountNextIndex(address); - - if (dbInstance.hasAddressNonce(address)) { - nonce = dbInstance.getNonce(address); - } else { - nonce = onChainNonce.toBn(); - } - - if (onChainNonce.toBn() && onChainNonce.toBn().gt(nonce)) { - nonce = onChainNonce.toBn(); - } - - const nextNonce: BN = nonce.addn(1); - dbInstance.setNonce(address, nextNonce); - } - - return nonce; -}; diff --git a/packages/sdk/src/utils/inMemoryDatabase.ts b/packages/sdk/src/utils/inMemoryDatabase.ts deleted file mode 100644 index a30cfd93..00000000 --- a/packages/sdk/src/utils/inMemoryDatabase.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { BN } from "@polkadot/util"; -import { Database } from "../types/common"; - -class InMemoryDatabase implements Database { - static instance: InMemoryDatabase; - private db: Record = {}; - - private constructor() { - // empty constructor - } - - public static getInstance(): InMemoryDatabase { - if (!InMemoryDatabase.instance) { - InMemoryDatabase.instance = new InMemoryDatabase(); - } - - return InMemoryDatabase.instance; - } - - public hasAddressNonce = (address: string): boolean => { - return this.db[address] ? true : false; - }; - - public setNonce = (address: string, nonce: BN): void => { - this.db[address] = nonce; - }; - - public getNonce = (address: string): BN => { - return this.db[address]; - }; -} - -export const sleep = (ms: number) => { - return new Promise((resolve) => setTimeout(resolve, ms)); -}; - -export const dbInstance = InMemoryDatabase.getInstance(); diff --git a/packages/sdk/src/utils/index.ts b/packages/sdk/src/utils/index.ts new file mode 100644 index 00000000..2700896d --- /dev/null +++ b/packages/sdk/src/utils/index.ts @@ -0,0 +1,3 @@ +export * from './bigConstants'; +export * from './bnConstants'; +export * from './bnUtility'; diff --git a/packages/sdk/src/utils/isBuyAssetTransactionSuccessful.ts b/packages/sdk/src/utils/isBuyAssetTransactionSuccessful.ts deleted file mode 100644 index 7787a09a..00000000 --- a/packages/sdk/src/utils/isBuyAssetTransactionSuccessful.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { MangataGenericEvent } from "../types/common"; - -export const isBuyAssetTransactionSuccessful = ( - events: MangataGenericEvent[] -) => { - const hasSuccess = events.some((item) => item.method === "ExtrinsicSuccess"); - const hasFailed = events.some( - (item) => - item.method === "BuyAssetFailedDueToSlippage" || - item.method === "MultiSwapAssetFailedOnAtomicSwap" - ); - return hasSuccess && !hasFailed; -}; \ No newline at end of file diff --git a/packages/sdk/src/utils/isInputValid.ts b/packages/sdk/src/utils/isInputValid.ts deleted file mode 100644 index ec7ff458..00000000 --- a/packages/sdk/src/utils/isInputValid.ts +++ /dev/null @@ -1,5 +0,0 @@ -export const isInputValid = (value: string): boolean => { - const valueNum = +value; - - return !(!value || isNaN(Number(value)) || isNaN(valueNum) || valueNum < 0); -}; diff --git a/packages/sdk/src/utils/isMultiSwapAssetTransactionSuccessful.ts b/packages/sdk/src/utils/isMultiSwapAssetTransactionSuccessful.ts deleted file mode 100644 index cfdd51e0..00000000 --- a/packages/sdk/src/utils/isMultiSwapAssetTransactionSuccessful.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { MangataGenericEvent } from "../types/common"; - -export const isMultiSwapAssetTransactionSuccessful = ( - events: MangataGenericEvent[] -) => { - const hasSuccess = events.some((item) => item.method === "ExtrinsicSuccess"); - const hasFailed = events.some( - (item) => - item.method === "BuyAssetFailedDueToSlippage" || - item.method === "SellAssetFailedDueToSlippage" || - item.method === "MultiSwapAssetFailedOnAtomicSwap" - ); - return hasSuccess && !hasFailed; -}; diff --git a/packages/sdk/src/utils/isSellAssetTransactionSuccessful.ts b/packages/sdk/src/utils/isSellAssetTransactionSuccessful.ts deleted file mode 100644 index 54cda124..00000000 --- a/packages/sdk/src/utils/isSellAssetTransactionSuccessful.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { MangataGenericEvent } from "../types/common"; - -export const isSellAssetTransactionSuccessful = ( - events: MangataGenericEvent[] -) => { - const hasSuccess = events.some((item) => item.method === "ExtrinsicSuccess"); - const hasFailed = events.some( - (item) => - item.method === "SellAssetFailedDueToSlippage" || - item.method === "MultiSwapAssetFailedOnAtomicSwap" - ); - return hasSuccess && !hasFailed; -}; \ No newline at end of file diff --git a/packages/sdk/src/utils/mangataLogger.ts b/packages/sdk/src/utils/mangataLogger.ts deleted file mode 100644 index 67f062a4..00000000 --- a/packages/sdk/src/utils/mangataLogger.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { Logger, ILogObj, ISettingsParam } from "tslog"; - -export let logger = {} as Logger; -export const setLoggerOptions = (options: ISettingsParam = {}) => { - logger = new Logger({ - ...{ - name: "MangataLogger", - type: "hidden", - prettyLogTimeZone: "UTC", - hideLogPositionForProduction: true, - stylePrettyLogs: true, - prettyLogStyles: { - dateIsoStr: "blue", - filePathWithLine: "yellow", - fileName: ["yellow"] - } - }, - ...options - }); -}; - -setLoggerOptions({}); diff --git a/packages/sdk/src/utils/serialize.ts b/packages/sdk/src/utils/serialize.ts deleted file mode 100644 index 231b1fce..00000000 --- a/packages/sdk/src/utils/serialize.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { ApiPromise } from "@polkadot/api"; -import { SubmittableExtrinsic } from "@polkadot/api/types"; - -export const serializeTx = ( - api: ApiPromise, - tx: SubmittableExtrinsic<"promise"> -) => { - if (!process.env.TX_VERBOSE) return ""; - - const methodObject = JSON.parse(tx.method.toString()); - const args = JSON.stringify(methodObject.args); - const callDecoded = api.registry.findMetaCall(tx.method.callIndex); - if (callDecoded.method == "sudo" && callDecoded.method == "sudo") { - const sudoCallIndex = (tx.method.args[0] as any).callIndex; - const sudoCallArgs = JSON.stringify(methodObject.args.call.args); - const sudoCallDecoded = api.registry.findMetaCall(sudoCallIndex); - return ` (sudo:: ${sudoCallDecoded.section}:: ${sudoCallDecoded.method}(${sudoCallArgs})`; - } else { - return ` (${callDecoded.section}:: ${callDecoded.method}(${args}))`; - } -}; diff --git a/packages/sdk/src/utils/signTx.ts b/packages/sdk/src/utils/signTx.ts deleted file mode 100644 index b3b3e693..00000000 --- a/packages/sdk/src/utils/signTx.ts +++ /dev/null @@ -1,295 +0,0 @@ -import { SubmittableExtrinsic } from '@polkadot/api/types'; -import { AnyTuple } from '@polkadot/types-codec/types'; -import { GenericExtrinsic } from '@polkadot/types'; -import { ApiPromise } from '@polkadot/api'; -import { BN } from '@polkadot/util'; - -import { - Account, - ExtrinsicSubscriptionData, - MangataEventData, - MangataGenericEvent, - TxOptions, -} from '../types/common'; -import { getTxNonce } from './getTxNonce'; -import { dbInstance } from './inMemoryDatabase'; -import { truncatedString } from './truncatedString'; -import { getTxError } from './getTxError'; -import { logger } from './mangataLogger'; -import { hexToU8a } from '@polkadot/util'; -import { signTypedData } from './signTypedData'; - -const subscribeToExtrinsic = async ( - api: ApiPromise, - tx: GenericExtrinsic, - result: ExtrinsicSubscriptionData, - extractedAccount: string, - txOptions: Partial | undefined, - state: { isSubscribed: boolean }, - resolve: ( - value: MangataGenericEvent[] | PromiseLike - ) => void, - reject: (reason?: any) => void, - unsub: () => void -) => { - const { status } = result; - - logger.debug( - `Tx[${tx.hash.toString()}]who: ${extractedAccount} nonce: ${tx.nonce.toString()} => ${ - status.type - }(${status.value.toString()})` - ); - - txOptions?.statusCallback?.(result); - - if ((status.isInBlock || status.isFinalized) && !state.isSubscribed) { - state.isSubscribed = true; - let inclusionBlockHash; - if (status.isInBlock) { - inclusionBlockHash = status.asInBlock.toString(); - } else if (status.isFinalized) { - inclusionBlockHash = status.asFinalized.toString(); - } - const inclusionBlockHeader = await api.rpc.chain.getHeader( - inclusionBlockHash - ); - const inclusionBlockNr = inclusionBlockHeader.number.toBn(); - const executionBlockStartNr = inclusionBlockNr.addn(0); - const executionBlockStopNr = inclusionBlockNr.addn(10); - const executionBlockNr = executionBlockStartNr; - - const unsubscribeNewHeads = await api.rpc.chain.subscribeNewHeads( - async (lastHeader) => { - const lastBlockNumber = lastHeader.number.toBn(); - - if (executionBlockNr.gt(executionBlockStopNr)) { - unsubscribeNewHeads(); - reject( - `Tx([${tx.hash.toString()}]) - was not executed in blocks : ${executionBlockStartNr.toString()}..${executionBlockStopNr.toString()}` - ); - const nonce = await api.rpc.system.accountNextIndex(extractedAccount); - - const currentNonce: BN = nonce.toBn(); - dbInstance.setNonce(extractedAccount, currentNonce); - unsub(); - return; - } - - if (lastBlockNumber.gte(executionBlockNr)) { - const blockHash = await api.rpc.chain.getBlockHash(executionBlockNr); - const blockHeader = await api.rpc.chain.getHeader(blockHash); - const extinsics: GenericExtrinsic[] = ( - await api.rpc.chain.getBlock(blockHeader.hash) - ).block.extrinsics; - const apiAt = await api.at(blockHeader.hash); - const events = await apiAt.query.system.events(); - - executionBlockNr.iaddn(1); - - const index = extinsics.findIndex((extrinsic) => { - return extrinsic.hash.toString() === tx.hash.toString(); - }); - - if (index < 0) { - logger.debug( - `Tx([${tx.hash.toString()}]) not found in block ${executionBlockNr} $([${truncatedString( - blockHash.toString() - )}])` - ); - return; - } else { - unsubscribeNewHeads(); - logger.debug( - `Tx[${tx.hash.toString()}]who:${extractedAccount} nonce:${tx.nonce.toString()} => Executed(${blockHash.toString()})` - ); - } - - const eventsTriggeredByTx: MangataGenericEvent[] = events - .filter((currentBlockEvent) => { - return ( - currentBlockEvent.phase.isApplyExtrinsic && - currentBlockEvent.phase.asApplyExtrinsic.toPrimitive() === index - ); - }) - .map((eventRecord) => { - const { event, phase } = eventRecord; - const types = event.typeDef; - const eventData: MangataEventData[] = event.data.map( - (d: any, i: any) => { - return { - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - lookupName: types[i].lookupName!, - data: d, - }; - } - ); - - return { - event, - phase, - section: event.section, - method: event.method, - metaDocumentation: event.meta.docs.toString(), - eventData, - error: getTxError(api, event.method, eventData), - } as MangataGenericEvent; - }); - - txOptions?.extrinsicStatus?.(eventsTriggeredByTx); - resolve(eventsTriggeredByTx); - unsub(); - } - } - ); - } -}; - -export const sendTx = async ( - api: ApiPromise, - tx: SubmittableExtrinsic<'promise'>, - userAddress: string, - txOptions?: Partial -): Promise => { - /* eslint-disable no-async-promise-executor */ - return new Promise(async (resolve, reject) => { - const nonce = await getTxNonce(api, userAddress, txOptions); - - logger.debug( - `submitting Tx[${tx.hash.toString()}]who: ${userAddress} nonce: ${nonce.toString()} ` - ); - - try { - const subscriptionState = { isSubscribed: false }; - - const unsub = await api.rpc.author.submitAndWatchExtrinsic( - tx, - async (status) => { - await subscribeToExtrinsic( - api, - tx, - { status }, - userAddress, - txOptions, - subscriptionState, - resolve, - reject, - unsub - ); - } - ); - } catch (error: any) { - const nonce = await api.rpc.system.accountNextIndex(userAddress); - const currentNonce: BN = nonce.toBn(); - dbInstance.setNonce(userAddress, currentNonce); - - reject({ - data: - error.message || - error.description || - error.data?.toString() || - error.toString(), - }); - } - }); -}; - -export const signTx = async ( - api: ApiPromise, - tx: SubmittableExtrinsic<'promise'>, - account: Account, - txOptions?: Partial -): Promise => { - /* eslint-disable no-async-promise-executor */ - return new Promise(async (resolve, reject) => { - const extractedAccount = - typeof account === 'string' ? account : account.address; - - const nonce = await getTxNonce(api, extractedAccount, txOptions); - - logger.debug( - `submitting Tx[${tx.hash.toString()}]who: ${extractedAccount} nonce: ${nonce.toString()} ` - ); - - try { - const subscriptionState = { isSubscribed: false }; - - if (txOptions?.wagmiConfig) { - const signRes = await signTypedData( - api, - tx, - txOptions?.wagmiConfig, - extractedAccount - ); - - if (!signRes) { - reject('Signature error'); - return; - } - - const { payload, signature, address } = signRes; - - const created_signature = api.createType( - 'EthereumSignature', - hexToU8a(signature) - ); - - tx.addSignature(address, created_signature, payload.toHex()); - - const unsub = await api.rpc.author.submitAndWatchExtrinsic( - tx, - async (status) => { - await subscribeToExtrinsic( - api, - tx, - { status }, - extractedAccount, - txOptions, - subscriptionState, - resolve, - reject, - unsub - ); - } - ); - } else { - await tx.signAsync(account, { nonce, signer: txOptions?.signer }); - - const unsub = await tx.send(async (result) => { - await subscribeToExtrinsic( - api, - tx, - result, - extractedAccount, - txOptions, - subscriptionState, - resolve, - reject, - unsub - ); - - if (result?.isError) { - reject(`Tx([${tx.hash.toString()}]) Transaction error`); - const nonce = await api.rpc.system.accountNextIndex( - extractedAccount - ); - const currentNonce: BN = nonce.toBn(); - dbInstance.setNonce(extractedAccount, currentNonce); - } - }); - } - } catch (error: any) { - const nonce = await api.rpc.system.accountNextIndex(extractedAccount); - const currentNonce: BN = nonce.toBn(); - dbInstance.setNonce(extractedAccount, currentNonce); - - reject({ - data: - error.message || - error.description || - error.data?.toString() || - error.toString(), - }); - } - }); -}; diff --git a/packages/sdk/src/utils/signTypedData.ts b/packages/sdk/src/utils/signTypedData.ts deleted file mode 100644 index 0a7c14df..00000000 --- a/packages/sdk/src/utils/signTypedData.ts +++ /dev/null @@ -1,114 +0,0 @@ -import { ApiPromise } from '@polkadot/api'; -import { Registry } from '@polkadot/types-codec/types'; -import { u8aToHex } from '@polkadot/util'; -import { isNumber, objectSpread } from '@polkadot/util'; -import type { Header, Index } from '@polkadot/types/interfaces'; -import { SubmittableExtrinsic } from '@polkadot/api/types'; -import type { SignatureOptions, IExtrinsicEra } from '@polkadot/types/types'; -import { GenericExtrinsicPayloadV4 } from '@polkadot/types'; -import { Call } from '@polkadot/types/interfaces'; -import type { HexString } from '@polkadot/util/types'; -import { signTypedData as _signTypedData, type Config } from '@wagmi/core'; - -interface SigningResult { - header: Header | null; - mortalLength: number; - nonce: Index; -} - -export interface SignTypedData_v4 { - address: string; - payload: GenericExtrinsicPayloadV4; - signature: HexString | null; -} - -function makeEraOptions( - api: ApiPromise, - registry: Registry, - partialOptions: Partial, - signingInfo: SigningResult -) { - const { header, mortalLength, nonce } = signingInfo; - - if (!header) { - if (partialOptions.era && !partialOptions.blockHash) { - throw new Error( - 'Expected blockHash to be passed alongside non-immortal era options' - ); - } - if (isNumber(partialOptions.era)) { - // since we have no header, it is immortal, remove any option overrides - // so we only supply the genesisHash and no era to the construction - delete partialOptions.era; - delete partialOptions.blockHash; - } - return makeSignOptions(api, partialOptions, { nonce }); - } - return makeSignOptions(api, partialOptions, { - blockHash: header.hash, - era: registry.createTypeUnsafe('ExtrinsicEra', [ - { - current: header.number, - period: partialOptions.era || mortalLength, - }, - ]) as IExtrinsicEra, - nonce, - }); -} - -function makeSignOptions( - api: ApiPromise, - partialOptions: Partial, - extras: Partial -): SignatureOptions { - return objectSpread( - { blockHash: api.genesisHash, genesisHash: api.genesisHash }, - partialOptions, - extras, - { - runtimeVersion: api.runtimeVersion, - signedExtensions: api.registry.signedExtensions, - version: undefined, - } - ); -} - -export async function signTypedData( - api: ApiPromise, - tx: SubmittableExtrinsic<'promise'>, - config: Config, - address?: string -): Promise { - const options: Partial = {}; - - if (!address) { - throw new Error('No address found'); - } - - const signingInfo = await api.derive.tx.signingInfo( - address, - options.nonce, - options.era - ); - const eraOptions = makeEraOptions(api, api.registry, options, signingInfo); - const payload = tx.inner.signature.createPayload( - tx.method as Call, - eraOptions - ); - const raw_payload = payload.toU8a({ method: true }); - - const result = await api.rpc.metamask.get_eip712_sign_data( - tx.toHex().slice(2) - ); - const data = JSON.parse(result.toString()); - data.message.tx = u8aToHex(raw_payload).slice(2); - data.account = address; - - const signature = await _signTypedData(config, data); - - return { - address, - payload, - signature: signature || null, - }; -} diff --git a/packages/sdk/src/utils/toFixed.ts b/packages/sdk/src/utils/toFixed.ts deleted file mode 100644 index 09eba345..00000000 --- a/packages/sdk/src/utils/toFixed.ts +++ /dev/null @@ -1,20 +0,0 @@ -// Replacement for the native `toFixed` function which solves the -// issue that the native one rounds the numbers by default. -export const toFixed = (value: string, decimals: number) => { - // This expression matches: - // 1. Minus sign (optional) - // 2. Any amount of digits - // 3. A decimal separator and the desired amount of decimal digits (optional) - const decimalsRegex = new RegExp(`^-?\\d+(?:\\.\\d{0,${decimals}})?`, "gm"); - const withDesiredDecimalPlaces = value.match(decimalsRegex); - // However there can be some trailing zeroes - // This expression matches: - // 1. Everything except trailing zeroes - // Source: https://www.reddit.com/r/regex/comments/dl2nug/comment/f4m8o9w/?utm_source=share&utm_medium=web2x&context=3 - const trailingZeroesRegex = /^-?0*(\d+(?:\.(?:(?!0+$)\d)+)?)/gm; - const withoutTrailingZeroes = (withDesiredDecimalPlaces?.[0] || value).match( - trailingZeroesRegex - ); - - return withoutTrailingZeroes?.[0] ?? value; -}; diff --git a/packages/sdk/src/utils/truncatedString.ts b/packages/sdk/src/utils/truncatedString.ts deleted file mode 100644 index 2dc30afc..00000000 --- a/packages/sdk/src/utils/truncatedString.ts +++ /dev/null @@ -1,6 +0,0 @@ -export const truncatedString = (str: string) => { - if (!str) return ""; - return ( - str.substring(0, 7) + "..." + str.substring(str.length - 5, str.length) - ); -}; diff --git a/packages/sdk/tsconfig.json b/packages/sdk/tsconfig.json index f1f9fa81..29358a2c 100644 --- a/packages/sdk/tsconfig.json +++ b/packages/sdk/tsconfig.json @@ -10,7 +10,7 @@ "resolveJsonModule": true, "module": "esnext", "target": "esnext", - "lib": ["esnext"], + "lib": ["esnext", "dom"], "skipLibCheck": true, "strict": true }, diff --git a/packages/sdk/tsconfig.lib.json b/packages/sdk/tsconfig.lib.json index fb4c5ae0..d32b815d 100644 --- a/packages/sdk/tsconfig.lib.json +++ b/packages/sdk/tsconfig.lib.json @@ -5,5 +5,10 @@ "types": ["node"] }, "include": ["src/**/*.ts"], - "exclude": ["vite.config.ts", "src/**/*.spec.ts", "src/**/*.test.ts", "src/tests/init.ts"] + "exclude": [ + "vite.config.ts", + "src/**/*.spec.ts", + "src/**/*.test.ts", + "src/tests/init.ts" + ] } diff --git a/packages/sdk/tsup.config.ts b/packages/sdk/tsup.config.ts new file mode 100644 index 00000000..02a855f5 --- /dev/null +++ b/packages/sdk/tsup.config.ts @@ -0,0 +1,11 @@ +import { defineConfig } from 'tsup'; + +export default defineConfig({ + entry: ['src/index.ts'], + format: ['esm', 'cjs'], // adjust formats as needed + dts: true, + clean: true, + splitting: false, + outDir: 'dist/packages/sdk', + noExternal: ["*"], // This bundles all dependencies, including PolkadotJS +});